diff options
author | Robinson Tryon <qubit@runcibility.com> | 2015-11-25 06:03:10 -0500 |
---|---|---|
committer | Robinson Tryon <qubit@runcibility.com> | 2015-11-25 06:07:38 -0500 |
commit | 49c2b9808df8a6b197dec666dfc0cda6321a4306 (patch) | |
tree | 045ef4b9b8dfdb06bfbe18cdf773d59f57d5552d | |
parent | 5470a365f25e5052b4dd74f76aa2196f0d70934b (diff) |
bin/rename-sw-abbreviations.shlibreoffice-5-1-branch-point
This commit renames the most annoying abbreviations in Writer (and
partially in the shared code too).
Change-Id: I77e5134f42f25e3786afa36b7a505c7e3237a9e8
651 files changed, 27946 insertions, 27946 deletions
diff --git a/sw/inc/EnhancedPDFExportHelper.hxx b/sw/inc/EnhancedPDFExportHelper.hxx index 74da45127883..c1d3e30654f4 100644 --- a/sw/inc/EnhancedPDFExportHelper.hxx +++ b/sw/inc/EnhancedPDFExportHelper.hxx @@ -34,9 +34,9 @@ namespace vcl class PDFExtOutDevData; } class OutputDevice; -class SwFrm; +class SwFrame; class SwLinePortion; -class SwPageFrm; +class SwPageFrame; class SwPrintData; class SwTextPainter; class SwEditShell; @@ -55,11 +55,11 @@ class SvxLanguageItem; * * Grouping elements: * - * SwRootFrm Document + * SwRootFrame Document * Part * Art * SwSection Sect - * SwFootnoteContFrm and SwFlyFrm Div + * SwFootnoteContFrame and SwFlyFrame Div * SwFormat "Quotations" BlockQuote * SwFormat "Caption" Caption * SwSection (TOC) TOC @@ -73,16 +73,16 @@ class SvxLanguageItem; * SwTextNode with Outline H1 - H6 * SwTextNode with NumRule L, LI, LBody * SwTable Table - * SwRowFrm TR - * SwCellFrm in Headline row or + * SwRowFrame TR + * SwCellFrame in Headline row or * SwFtm "Table Heading" TH - * SwCellFrm TD + * SwCellFrame TD * * Inline-Level Structure Elements: * * SwTextPortion Span * SwFormat "Quotation" Quote - * SwFootnoteFrm Note + * SwFootnoteFrame Note * Form * Reference * SwFieldPortion (AuthorityField) BibEntry @@ -91,21 +91,21 @@ class SvxLanguageItem; * * Illustration elements: * - * SwFlyFrm with SwNoTextFrm Figure - * SwFlyFrm with Math OLE Object Formula + * SwFlyFrame with SwNoTextFrame Figure + * SwFlyFrame with Math OLE Object Formula * */ struct Num_Info { - const SwFrm& mrFrm; - Num_Info( const SwFrm& rFrm ) : mrFrm( rFrm ) {}; + const SwFrame& mrFrame; + Num_Info( const SwFrame& rFrame ) : mrFrame( rFrame ) {}; }; -struct Frm_Info +struct Frame_Info { - const SwFrm& mrFrm; - Frm_Info( const SwFrm& rFrm ) : mrFrm( rFrm ) {}; + const SwFrame& mrFrame; + Frame_Info( const SwFrame& rFrame ) : mrFrame( rFrame ) {}; }; struct Por_Info @@ -141,7 +141,7 @@ class SwTaggedPDFHelper vcl::PDFExtOutDevData* mpPDFExtOutDevData; const Num_Info* mpNumInfo; - const Frm_Info* mpFrmInfo; + const Frame_Info* mpFrameInfo; const Por_Info* mpPorInfo; void BeginTag( vcl::PDFWriter::StructElement aTagRole, const OUString& rTagName ); @@ -160,10 +160,10 @@ class SwTaggedPDFHelper public: - // pFrmInfo != 0 => BeginBlockStructureElement + // pFrameInfo != 0 => BeginBlockStructureElement // pPorInfo != 0 => BeginInlineStructureElement - // pFrmInfo, pPorInfo = 0 => BeginNonStructureElement - SwTaggedPDFHelper( const Num_Info* pNumInfo, const Frm_Info* pFrmInfo, const Por_Info* pPorInfo, + // pFrameInfo, pPorInfo = 0 => BeginNonStructureElement + SwTaggedPDFHelper( const Num_Info* pNumInfo, const Frame_Info* pFrameInfo, const Por_Info* pPorInfo, OutputDevice& rOut ); ~SwTaggedPDFHelper(); @@ -187,7 +187,7 @@ typedef std::vector< IdMapEntry > LinkIdMap; typedef std::map< const SwTable*, TableColumnsMapEntry > TableColumnsMap; typedef std::map< const SwNumberTreeNode*, sal_Int32 > NumListIdMap; typedef std::map< const SwNumberTreeNode*, sal_Int32 > NumListBodyIdMap; -typedef std::map< const void*, sal_Int32 > FrmTagIdMap; +typedef std::map< const void*, sal_Int32 > FrameTagIdMap; class SwEnhancedPDFExportHelper { @@ -215,7 +215,7 @@ class SwEnhancedPDFExportHelper static LinkIdMap aLinkIdMap; static NumListIdMap aNumListIdMap; static NumListBodyIdMap aNumListBodyIdMap; - static FrmTagIdMap aFrmTagIdMap; + static FrameTagIdMap aFrameTagIdMap; static LanguageType eLanguageDefault; @@ -242,12 +242,12 @@ class SwEnhancedPDFExportHelper static LinkIdMap& GetLinkIdMap() { return aLinkIdMap; } static NumListIdMap& GetNumListIdMap() {return aNumListIdMap; } static NumListBodyIdMap& GetNumListBodyIdMap() {return aNumListBodyIdMap; } - static FrmTagIdMap& GetFrmTagIdMap() { return aFrmTagIdMap; } + static FrameTagIdMap& GetFrameTagIdMap() { return aFrameTagIdMap; } static LanguageType GetDefaultLanguage() {return eLanguageDefault; } //scale and position rRectangle if we're scaling due to notes in margins. - Rectangle SwRectToPDFRect(const SwPageFrm* pCurrPage, + Rectangle SwRectToPDFRect(const SwPageFrame* pCurrPage, const Rectangle& rRectangle) const; }; diff --git a/sw/inc/HandleAnchorNodeChg.hxx b/sw/inc/HandleAnchorNodeChg.hxx index cba6d26e545d..8261c86c16d6 100644 --- a/sw/inc/HandleAnchorNodeChg.hxx +++ b/sw/inc/HandleAnchorNodeChg.hxx @@ -21,7 +21,7 @@ class SwFlyFrameFormat; class SwFormatAnchor; -class SwFlyFrm; +class SwFlyFrame; // helper class to track change of anchor node of at-paragraph respectively // at-character anchored fly frames @@ -43,15 +43,15 @@ public: @param _rNewAnchorFormat new anchor attribute, which will be applied at the given fly frame format - @param _pKeepThisFlyFrm + @param _pKeepThisFlyFrame optional parameter - pointer to a fly frame of the given fly frame format, which isn't deleted, if re-creation of fly frames is necessary. */ SwHandleAnchorNodeChg( SwFlyFrameFormat& _rFlyFrameFormat, const SwFormatAnchor& _rNewAnchorFormat, - SwFlyFrm* _pKeepThisFlyFrm = nullptr ); + SwFlyFrame* _pKeepThisFlyFrame = nullptr ); - /** calls <SwFlyFrameFormat::MakeFrms>, if re-creation of fly frames is necessary. + /** calls <SwFlyFrameFormat::MakeFrames>, if re-creation of fly frames is necessary. @author OD */ diff --git a/sw/inc/IDocumentLayoutAccess.hxx b/sw/inc/IDocumentLayoutAccess.hxx index ab02daa108df..23f465f36f5f 100644 --- a/sw/inc/IDocumentLayoutAccess.hxx +++ b/sw/inc/IDocumentLayoutAccess.hxx @@ -23,7 +23,7 @@ #include <swtypes.hxx> class SwViewShell; -class SwRootFrm; +class SwRootFrame; class SwFrameFormat; class SfxItemSet; class SwLayouter; @@ -39,8 +39,8 @@ public: */ virtual const SwViewShell* GetCurrentViewShell() const = 0; virtual SwViewShell* GetCurrentViewShell() = 0; - virtual const SwRootFrm* GetCurrentLayout() const = 0; - virtual SwRootFrm* GetCurrentLayout() = 0; + virtual const SwRootFrame* GetCurrentLayout() const = 0; + virtual SwRootFrame* GetCurrentLayout() = 0; virtual bool HasLayout() const = 0; /** !!!The old layout must be deleted!!! @@ -64,7 +64,7 @@ public: /** */ virtual SwFrameFormat* CopyLayoutFormat( const SwFrameFormat& rSrc, const SwFormatAnchor& rNewAnchor, - bool bSetTextFlyAtt, bool bMakeFrms ) = 0; + bool bSetTextFlyAtt, bool bMakeFrames ) = 0; protected: diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx index 3c8324e3dd4d..b41bdb36159f 100644 --- a/sw/inc/PostItMgr.hxx +++ b/sw/inc/PostItMgr.hxx @@ -57,10 +57,10 @@ namespace sw { namespace annotation { }} namespace sw { namespace sidebarwindows { class SwSidebarWin; - class SwFrmSidebarWinContainer; + class SwFrameSidebarWinContainer; }} class SwSidebarItem; -class SwFrm; +class SwFrame; namespace vcl { class Window; } struct ImplSVEvent; @@ -158,8 +158,8 @@ class SwPostItMgr: public SfxListener OutlinerParaObject* mpAnswer; bool mbIsShowAnchor; - // data structure to collect the <SwSidebarWin> instances for certain <SwFrm> instances. - sw::sidebarwindows::SwFrmSidebarWinContainer* mpFrmSidebarWinContainer; + // data structure to collect the <SwSidebarWin> instances for certain <SwFrame> instances. + sw::sidebarwindows::SwFrameSidebarWinContainer* mpFrameSidebarWinContainer; typedef std::list<sw::sidebarwindows::SwSidebarWin*>::iterator SwSidebarWin_iterator; @@ -277,15 +277,15 @@ class SwPostItMgr: public SfxListener void AssureStdModeAtShell(); - void ConnectSidebarWinToFrm( const SwFrm& rFrm, + void ConnectSidebarWinToFrame( const SwFrame& rFrame, const SwFormatField& rFormatField, sw::sidebarwindows::SwSidebarWin& rSidebarWin ); - void DisconnectSidebarWinFromFrm( const SwFrm& rFrm, + void DisconnectSidebarWinFromFrame( const SwFrame& rFrame, sw::sidebarwindows::SwSidebarWin& rSidebarWin ); - bool HasFrmConnectedSidebarWins( const SwFrm& rFrm ); - vcl::Window* GetSidebarWinForFrmByIndex( const SwFrm& rFrm, + bool HasFrameConnectedSidebarWins( const SwFrame& rFrame ); + vcl::Window* GetSidebarWinForFrameByIndex( const SwFrame& rFrame, const sal_Int32 nIndex ); - void GetAllSidebarWinForFrm( const SwFrm& rFrm, + void GetAllSidebarWinForFrame( const SwFrame& rFrame, std::vector< vcl::Window* >* pChildren ); void DrawNotesForPage(OutputDevice *pOutDev, sal_uInt32 nPage); diff --git a/sw/inc/SidebarWin.hxx b/sw/inc/SidebarWin.hxx index 4d88b4623a1c..c6738fac6132 100644 --- a/sw/inc/SidebarWin.hxx +++ b/sw/inc/SidebarWin.hxx @@ -41,7 +41,7 @@ class SwEditWin; class SwView; class Edit; class MenuButton; -class SwFrm; +class SwFrame; namespace sw { namespace overlay { class OverlayRanges; @@ -247,7 +247,7 @@ class SwSidebarWin : public vcl::Window bool mbIsFollow; SwSidebarItem& mrSidebarItem; - const SwFrm* mpAnchorFrm; + const SwFrame* mpAnchorFrame; }; } } // eof namespace sw::sidebarwindows diff --git a/sw/inc/ToxTabStopTokenHandler.hxx b/sw/inc/ToxTabStopTokenHandler.hxx index 8f015b0d3a0f..60a2056e9428 100644 --- a/sw/inc/ToxTabStopTokenHandler.hxx +++ b/sw/inc/ToxTabStopTokenHandler.hxx @@ -18,7 +18,7 @@ struct SwFormToken; class SwPageDesc; -class SwRootFrm; +class SwRootFrame; class SwTextNode; namespace sw { @@ -46,7 +46,7 @@ public: */ virtual HandledTabStopToken HandleTabStopToken(const SwFormToken& aToken, const SwTextNode& targetNode, - const SwRootFrm *currentLayout) const = 0; + const SwRootFrame *currentLayout) const = 0; }; /** The default implementation of ToxTabStopTokenHandler */ @@ -84,7 +84,7 @@ public: */ ToxTabStopTokenHandler::HandledTabStopToken HandleTabStopToken(const SwFormToken& aToken, const SwTextNode& targetNode, - const SwRootFrm *currentLayout) const override; + const SwRootFrame *currentLayout) const override; private: /** Test whether the page layout can be obtained by a layout rectangle. @@ -92,7 +92,7 @@ private: * Is used to determine how to find tab stop position. */ static bool - CanUseLayoutRectangle(const SwTextNode& targetNode, const SwRootFrm *currentLayout); + CanUseLayoutRectangle(const SwTextNode& targetNode, const SwRootFrame *currentLayout); /** Calculate the page margin from the page description. * diff --git a/sw/inc/ToxTextGenerator.hxx b/sw/inc/ToxTextGenerator.hxx index 94f142c83ff3..bbd4872541be 100644 --- a/sw/inc/ToxTextGenerator.hxx +++ b/sw/inc/ToxTextGenerator.hxx @@ -32,13 +32,13 @@ class SwAttrPool; class SwFormatAutoFormat; class SwChapterField; class SwChapterFieldType; -class SwContentFrm; +class SwContentFrame; class SwContentNode; class SwDoc; class SwForm; struct SwFormToken; class SwPageDesc; -class SwRootFrm; +class SwRootFrame; class SwTextAttr; class SwTextNode; struct SwTOXSortTabBase; @@ -138,7 +138,7 @@ private: /** Generate the text for a chapter token. */ OUString - GenerateTextForChapterToken(const SwFormToken& chapterToken, const SwContentFrm* contentFrame, + GenerateTextForChapterToken(const SwFormToken& chapterToken, const SwContentFrame* contentFrame, const SwContentNode *contentNode) const; /** Obtain a ChapterField to use for the text generation. @@ -147,7 +147,7 @@ private: */ virtual SwChapterField ObtainChapterField(SwChapterFieldType* chapterFieldType, const SwFormToken* chapterToken, - const SwContentFrm* contentFrame, const SwContentNode *contentNode) const; + const SwContentFrame* contentFrame, const SwContentNode *contentNode) const; friend class ::ToxTextGeneratorTest; }; diff --git a/sw/inc/accmap.hxx b/sw/inc/accmap.hxx index a47051303379..eaf01f294e27 100644 --- a/sw/inc/accmap.hxx +++ b/sw/inc/accmap.hxx @@ -37,9 +37,9 @@ class SwAccessibleParagraph; class SwViewShell; class Rectangle; -class SwFrm; -class SwTextFrm; -class SwPageFrm; +class SwFrame; +class SwTextFrame; +class SwPageFrame; class SwAccessibleContext; class SwAccessibleContextMap_Impl; class SwAccessibleEventList_Impl; @@ -79,7 +79,7 @@ class SwAccessibleMap : public ::accessibility::IAccessibleViewForwarder, { mutable ::osl::Mutex maMutex; ::osl::Mutex maEventMutex; - SwAccessibleContextMap_Impl *mpFrmMap; + SwAccessibleContextMap_Impl *mpFrameMap; SwAccessibleShapeMap_Impl *mpShapeMap; SwShapeList_Impl *mpShapes; SwAccessibleEventList_Impl *mpEvents; @@ -107,12 +107,12 @@ class SwAccessibleMap : public ::accessibility::IAccessibleViewForwarder, void InvalidateShapeSelection(); - //mpSelectedFrmMap contains the old selected objects. - SwAccessibleContextMap_Impl *mpSeletedFrmMap; + //mpSelectedFrameMap contains the old selected objects. + SwAccessibleContextMap_Impl *mpSeletedFrameMap; //IvalidateShapeInParaSelection() method is responsible for the updating the selected states of the objects. void InvalidateShapeInParaSelection(); - void _InvalidateRelationSet( const SwFrm* pFrm, bool bFrom ); + void _InvalidateRelationSet( const SwFrame* pFrame, bool bFrom ); css::uno::Reference<css::accessibility::XAccessible> _GetDocumentView( bool bPagePreview ); @@ -136,14 +136,14 @@ public: css::uno::Reference<css::accessibility::XAccessible> GetDocumentPreview( const std::vector<PreviewPage*>& _rPreviewPages, const Fraction& _rScale, - const SwPageFrm* _pSelectedPageFrm, + const SwPageFrame* _pSelectedPageFrame, const Size& _rPreviewWinSize ); ::rtl::Reference < SwAccessibleContext > GetContextImpl( - const SwFrm *pFrm, + const SwFrame *pFrame, bool bCreate = true ); css::uno::Reference<css::accessibility::XAccessible> GetContext( - const SwFrm *pFrm, + const SwFrame *pFrame, bool bCreate = true ); ::rtl::Reference < ::accessibility::AccessibleShape > GetContextImpl( @@ -180,25 +180,25 @@ public: */ Size GetPreviewPageSize( sal_uInt16 _nPreviewPageNum ) const; - void RemoveContext( const SwFrm *pFrm ); + void RemoveContext( const SwFrame *pFrame ); void RemoveContext( const SdrObject *pObj ); // Dispose frame and its children if bRecursive is set - void Dispose( const SwFrm* pFrm, + void Dispose( const SwFrame* pFrame, const SdrObject* pObj, vcl::Window* pWindow, bool bRecursive = false ); - void InvalidatePosOrSize( const SwFrm* pFrm, + void InvalidatePosOrSize( const SwFrame* pFrame, const SdrObject* pObj, vcl::Window* pWindow, - const SwRect& rOldFrm ); + const SwRect& rOldFrame ); - void InvalidateContent( const SwFrm *pFrm ); + void InvalidateContent( const SwFrame *pFrame ); - void InvalidateAttr( const SwTextFrm& rTextFrm ); + void InvalidateAttr( const SwTextFrame& rTextFrame ); - void InvalidateCursorPosition( const SwFrm *pFrm ); + void InvalidateCursorPosition( const SwFrame *pFrame ); void InvalidateFocus(); void SetCursorContext( const ::rtl::Reference < SwAccessibleContext >& rCursorContext ); @@ -206,15 +206,15 @@ public: // Invalidate state of whole tree. If an action is open, this call // is processed when the last action ends. void InvalidateStates( AccessibleStates _nStates, - const SwFrm* _pFrm = nullptr ); + const SwFrame* _pFrame = nullptr ); - void InvalidateRelationSet( const SwFrm* pMaster, const SwFrm* pFollow ); + void InvalidateRelationSet( const SwFrame* pMaster, const SwFrame* pFollow ); /** invalidation CONTENT_FLOWS_FROM/_TO relation of a paragraph @author OD - @param _rTextFrm + @param _rTextFrame input parameter - reference to paragraph, whose CONTENT_FLOWS_FROM/_TO has to be invalidated. @@ -222,14 +222,14 @@ public: input parameter - boolean indicating, if relation CONTENT_FLOWS_FROM (value <true>) or CONTENT_FLOWS_TO (value <false>) has to be invalidated. */ - void InvalidateParaFlowRelation( const SwTextFrm& _rTextFrm, + void InvalidateParaFlowRelation( const SwTextFrame& _rTextFrame, const bool _bFrom ); /** invalidation of text selection of a paragraph @author OD */ - void InvalidateParaTextSelection( const SwTextFrm& _rTextFrm ); + void InvalidateParaTextSelection( const SwTextFrame& _rTextFrame ); /** invalidation of text selection of all paragraphs @@ -237,17 +237,17 @@ public: */ void InvalidateTextSelectionOfAllParas(); - sal_Int32 GetChildIndex( const SwFrm& rParentFrm, + sal_Int32 GetChildIndex( const SwFrame& rParentFrame, vcl::Window& rChild ) const; // update preview data (and fire events if necessary) void UpdatePreview( const std::vector<PreviewPage*>& _rPreviewPages, const Fraction& _rScale, - const SwPageFrm* _pSelectedPageFrm, + const SwPageFrame* _pSelectedPageFrame, const Size& _rPreviewWinSize ); void InvalidatePreviewSelection( sal_uInt16 nSelPage ); - bool IsPageSelected( const SwPageFrm *pPageFrm ) const; + bool IsPageSelected( const SwPageFrame *pPageFrame ) const; void FireEvents(); diff --git a/sw/inc/anchoreddrawobject.hxx b/sw/inc/anchoreddrawobject.hxx index 3d25df8ba2fc..7b097a2fb606 100644 --- a/sw/inc/anchoreddrawobject.hxx +++ b/sw/inc/anchoreddrawobject.hxx @@ -103,7 +103,7 @@ class SW_DLLPUBLIC SwAnchoredDrawObject : public SwAnchoredObject @author OD */ - void _InvalidatePage( SwPageFrm* _pPageFrm ); + void _InvalidatePage( SwPageFrame* _pPageFrame ); protected: virtual void ObjectAttachedToAnchorFrame() override; @@ -154,21 +154,21 @@ class SW_DLLPUBLIC SwAnchoredDrawObject : public SwAnchoredObject @author OD - @param <_pNewAnchorFrm> + @param <_pNewAnchorFrame> input parameter - new anchor frame for the anchored object. @param <_pNewObjRect> optional input parameter - proposed new object rectangle. If not provided the current object rectangle is taken. */ - void AdjustPositioningAttr( const SwFrm* _pNewAnchorFrm, + void AdjustPositioningAttr( const SwFrame* _pNewAnchorFrame, const SwRect* _pNewObjRect = nullptr ); /** method to notify background of drawing object @author OD */ - virtual void NotifyBackground( SwPageFrm* _pPageFrm, + virtual void NotifyBackground( SwPageFrame* _pPageFrame, const SwRect& _rRect, PrepareHint _eHint ) override; diff --git a/sw/inc/anchoredobject.hxx b/sw/inc/anchoredobject.hxx index 803a3986ec1e..8b72e4c77fe1 100644 --- a/sw/inc/anchoredobject.hxx +++ b/sw/inc/anchoredobject.hxx @@ -24,11 +24,11 @@ #include <libxml/xmlwriter.h> class SdrObject; -class SwFrm; -class SwLayoutFrm; -class SwTextFrm; +class SwFrame; +class SwLayoutFrame; +class SwTextFrame; -class SwPageFrm; +class SwPageFrame; class SwObjPositioningInProgress; class SwFrameFormat; @@ -37,8 +37,8 @@ class SwFormatAnchor; /** wrapper class for the positioning of Writer fly frames and drawing objects Purpose of this class is to provide a unified interface for the positioning - of Writer fly frames (derived classes of <SwFlyFrm>) and of drawing objects - (derived classes of <SwDrawFrm>). + of Writer fly frames (derived classes of <SwFlyFrame>) and of drawing objects + (derived classes of <SwDrawFrame>). @author OD */ @@ -48,10 +48,10 @@ class SW_DLLPUBLIC SwAnchoredObject // drawing object representing the anchored object in the drawing layer SdrObject* mpDrawObj; // frame the object is anchored at - SwFrm* mpAnchorFrm; + SwFrame* mpAnchorFrame; // #i28701 - page frame the object is registered at // note: no page frame for as-character anchored objects - SwPageFrm* mpPageFrm; + SwPageFrame* mpPageFrame; // current relative position (relative to anchor position of anchor frame) Point maRelPos; @@ -71,7 +71,7 @@ class SW_DLLPUBLIC SwAnchoredObject // Layout frame vertical position is orient at - typically its the upper // of the anchor frame, but it could also by the upper of a follow or // a following layout frame in the text flow. - const SwLayoutFrm* mpVertPosOrientFrm; + const SwLayoutFrame* mpVertPosOrientFrame; // i#i28701 boolean, indicating that the object // positioning algorithm is in progress. @@ -103,7 +103,7 @@ class SW_DLLPUBLIC SwAnchoredObject // considered during its positioning. // This boolean is used, if compatibility option 'Consider wrapping style // influence on object positioning' is OFF and a positioning loop is - // detected in method <SwFlyAtCntFrm::MakeAll()> or method + // detected in method <SwFlyAtContentFrame::MakeAll()> or method // <SwAnchoredDrawObject::_MakeObjPosAnchoredAtPara()>. // The boolean is reset to <false>, when the layout process for a // page frame starts. @@ -131,19 +131,19 @@ class SW_DLLPUBLIC SwAnchoredObject For to-character anchored Writer fly frames the member <maLastCharRect> is updated. This is checked for change and depending on the applied positioning, it's decided, if the Writer fly frame has to be invalidated. - improvement - add second parameter <_rAnchorCharFrm> + improvement - add second parameter <_rAnchorCharFrame> @author OD @param _rAnch input parameter - reference to anchor position - @param _rAnchorCharFrm + @param _rAnchorCharFrame input parameter - reference to the text frame containing the anchor character. */ void _CheckCharRect( const SwFormatAnchor& _rAnch, - const SwTextFrm& _rAnchorCharFrm ); + const SwTextFrame& _rAnchorCharFrame ); /** check top of line @@ -157,23 +157,23 @@ class SW_DLLPUBLIC SwAnchoredObject @param _rAnch input parameter - reference to anchor position - @param _rAnchorCharFrm + @param _rAnchorCharFrame input parameter - reference to the text frame containing the anchor character. */ void _CheckTopOfLine( const SwFormatAnchor& _rAnch, - const SwTextFrm& _rAnchorCharFrm ); + const SwTextFrame& _rAnchorCharFrame ); // method <sw_HideObj(..)> sets needed data structure values for the // object positioning - friend bool sw_HideObj( const SwTextFrm& _rFrm, + friend bool sw_HideObj( const SwTextFrame& _rFrame, const RndStdIds _eAnchorType, const sal_Int32 _nObjAnchorPos, SwAnchoredObject* _pAnchoredObj ); protected: SwAnchoredObject(); - void SetVertPosOrientFrm( const SwLayoutFrm& _rVertPosOrientFrm ); + void SetVertPosOrientFrame( const SwLayoutFrame& _rVertPosOrientFrame ); /** method to assure that anchored object is registered at the correct page frame @@ -215,24 +215,24 @@ class SW_DLLPUBLIC SwAnchoredObject const SdrObject* GetDrawObj() const { return mpDrawObj; } SdrObject* DrawObj() { return mpDrawObj; } - // accessors to member <mpAnchorFrm> - const SwFrm* GetAnchorFrm() const { return mpAnchorFrm; } - SwFrm* AnchorFrm() { return mpAnchorFrm; } - void ChgAnchorFrm( SwFrm* _pNewAnchorFrm ); + // accessors to member <mpAnchorFrame> + const SwFrame* GetAnchorFrame() const { return mpAnchorFrame; } + SwFrame* AnchorFrame() { return mpAnchorFrame; } + void ChgAnchorFrame( SwFrame* _pNewAnchorFrame ); /** determine anchor frame containing the anchor position - the anchor frame, which is determined, is <mpAnchorFrm> + the anchor frame, which is determined, is <mpAnchorFrame> for an at-page, at-frame or at-paragraph anchored object and the anchor character frame for an at-character and as-character anchored object. @author OD */ - SwFrm* GetAnchorFrmContainingAnchPos(); + SwFrame* GetAnchorFrameContainingAnchPos(); - SwPageFrm* GetPageFrm() { return mpPageFrm; } - const SwPageFrm* GetPageFrm() const { return mpPageFrm; } - void SetPageFrm( SwPageFrm* _pNewPageFrm ); + SwPageFrame* GetPageFrame() { return mpPageFrame; } + const SwPageFrame* GetPageFrame() const { return mpPageFrame; } + void SetPageFrame( SwPageFrame* _pNewPageFrame ); /** method to determine the page frame, on which the 'anchor' of the given anchored object is. @@ -248,30 +248,30 @@ class SW_DLLPUBLIC SwAnchoredObject input parameter - anchored object, for which the page frame of its 'anchor' has to be determined. - @return SwPageFrm& + @return SwPageFrame& page frame, the 'anchor' of the given anchored object is on */ - SwPageFrm* FindPageFrmOfAnchor(); + SwPageFrame* FindPageFrameOfAnchor(); /** get frame, which contains the anchor character, if the object is anchored at-character or as-character. @author OD - @return SwTextFrm* + @return SwTextFrame* text frame containing the anchor character. It's NULL, if the object isn't anchored at-character resp. as-character. */ - SwTextFrm* FindAnchorCharFrm(); + SwTextFrame* FindAnchorCharFrame(); // accessors to data of position calculation: // frame vertical position is orient at - const SwLayoutFrm* GetVertPosOrientFrm() const + const SwLayoutFrame* GetVertPosOrientFrame() const { - return mpVertPosOrientFrm; + return mpVertPosOrientFrame; } - // method to clear member <mpVertPosOrientFrm> - void ClearVertPosOrientFrm(); + // method to clear member <mpVertPosOrientFrame> + void ClearVertPosOrientFrame(); /** check anchor character rectangle and top of line @@ -290,8 +290,8 @@ class SW_DLLPUBLIC SwAnchoredObject // accessors to member <maLastCharRect> const SwRect& GetLastCharRect() const { return maLastCharRect;} - SwTwips GetRelCharX( const SwFrm* pFrm ) const; - SwTwips GetRelCharY( const SwFrm* pFrm ) const; + SwTwips GetRelCharX( const SwFrame* pFrame ) const; + SwTwips GetRelCharY( const SwFrame* pFrame ) const; void AddLastCharY( long nDiff ); void ResetLastCharRectHeight(); @@ -345,7 +345,7 @@ class SW_DLLPUBLIC SwAnchoredObject @author OD */ - virtual void NotifyBackground( SwPageFrm* _pPageFrm, + virtual void NotifyBackground( SwPageFrame* _pPageFrame, const SwRect& _rRect, PrepareHint _eHint ) = 0; @@ -489,7 +489,7 @@ class SW_DLLPUBLIC SwAnchoredObject @return Point - determined relative position */ - Point GetRelPosToAnchorFrm() const; + Point GetRelPosToAnchorFrame() const; /** method to determine position of anchored object relative to page frame @@ -512,7 +512,7 @@ class SW_DLLPUBLIC SwAnchoredObject @return Point - determined relative position */ - Point GetRelPosToPageFrm( const bool _bFollowTextFlow, + Point GetRelPosToPageFrame( const bool _bFollowTextFlow, bool& _obRelToTableCell ) const; /** method to determine position of anchored object relative to diff --git a/sw/inc/calc.hxx b/sw/inc/calc.hxx index 491920e1fb13..def19644ee12 100644 --- a/sw/inc/calc.hxx +++ b/sw/inc/calc.hxx @@ -154,7 +154,7 @@ class SwCalc SwHash* VarTable[ TBLSZ ]; OUString aVarName, sCurrSym; OUString sCommand; - std::vector<const SwUserFieldType*> aRekurStk; + std::vector<const SwUserFieldType*> aRekurStack; SwSbxValue nLastLeft; SwSbxValue nNumberValue; SwCalcExp aErrExpr; diff --git a/sw/inc/cellfml.hxx b/sw/inc/cellfml.hxx index a470914ddb8f..e681a25fead8 100644 --- a/sw/inc/cellfml.hxx +++ b/sw/inc/cellfml.hxx @@ -37,7 +37,7 @@ class SwTableCalcPara sal_uInt16 nStackCnt, nMaxSize; public: - SwTableSortBoxes *pBoxStk; ///< stack for recognizing recursion + SwTableSortBoxes *pBoxStack; ///< stack for recognizing recursion SwCalc& rCalc; ///< current Calculator const SwTable* pTable; ///< current table diff --git a/sw/inc/chpfld.hxx b/sw/inc/chpfld.hxx index 59b6c84f989f..9889ecbc49eb 100644 --- a/sw/inc/chpfld.hxx +++ b/sw/inc/chpfld.hxx @@ -21,7 +21,7 @@ #include "fldbas.hxx" -class SwFrm; +class SwFrame; class SwContentNode; class SwTextNode; class ToxTextGeneratorTest; @@ -63,7 +63,7 @@ public: SwChapterField(SwChapterFieldType*, sal_uInt32 nFormat = 0); // #i53420# - void ChangeExpansion( const SwFrm*, + void ChangeExpansion( const SwFrame*, const SwContentNode*, bool bSrchNum = false); void ChangeExpansion(const SwTextNode &rNd, bool bSrchNum); diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h index 6e7cd830d38d..cd0ce77edbf0 100644 --- a/sw/inc/cmdid.h +++ b/sw/inc/cmdid.h @@ -600,7 +600,7 @@ #define FN_NAVIGATION_BACK (FN_EXTRA2 + 115) #define FN_NAVIGATION_FORWARD (FN_EXTRA2 + 116) -// #i972: bool items to be passed to SwFrmPage for evaluation +// #i972: bool items to be passed to SwFramePage for evaluation #define FN_OLE_IS_MATH (FN_EXTRA2 + 114) #define FN_MATH_BASELINE_ALIGNMENT (FN_EXTRA2 + 115) diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx index 124e5de8a4f2..d53a61064cc0 100644 --- a/sw/inc/crsrsh.hxx +++ b/sw/inc/crsrsh.hxx @@ -40,8 +40,8 @@ class SfxItemSet; class SfxPoolItem; -class SwContentFrm; -class SwCrsrShell; +class SwContentFrame; +class SwCursorShell; class SwCursor; class SwField; class SwFieldType; @@ -49,11 +49,11 @@ class SwFormat; class SwFormatField; class SwNodeIndex; class SwPaM; -class SwShellCrsr; -class SwShellTableCrsr; +class SwShellCursor; +class SwShellTableCursor; class SwTableNode; class SwTextFormatColl; -class SwVisCrsr; +class SwVisibleCursor; class SwTextINetFormat; class SwFormatINetFormat; class SwTextAttr; @@ -129,29 +129,29 @@ struct SwContentAtPos bool IsInRTLText()const; }; -// return values of SetCrsr (can be combined via ||) +// return values of SetCursor (can be combined via ||) const int CRSR_POSOLD = 0x01, // cursor stays at old position CRSR_POSCHG = 0x02; // position changed by the layout /// Helperfunction to resolve backward references in regular expressions OUString *ReplaceBackReferences( const css::util::SearchOptions& rSearchOpt, SwPaM* pPam ); -class SW_DLLPUBLIC SwCrsrShell +class SW_DLLPUBLIC SwCursorShell : public SwViewShell , public SwModify , public ::sw::IShellCursorSupplier { friend class SwCallLink; - friend class SwVisCrsr; + friend class SwVisibleCursor; friend class SwSelPaintRects; - // requires the Crsr as InternalCrsr - friend bool GetAutoSumSel( const SwCrsrShell&, SwCellFrms& ); + // requires the Cursor as InternalCursor + friend bool GetAutoSumSel( const SwCursorShell&, SwCellFrames& ); public: - /** for calling UpdateCrsr */ - enum CrsrFlag { + /** for calling UpdateCursor */ + enum CursorFlag { UPDOWN = (1 << 0), ///< keep Up/Down on columns SCROLLWIN = (1 << 1), ///< scroll window CHKRANGE = (1 << 2), ///< check overlapping PaMs @@ -161,23 +161,23 @@ public: private: SwRect m_aCharRect; ///< Char-SRectangle on which the cursor is located - Point m_aCrsrHeight; ///< height & offset from visible Cursor + Point m_aCursorHeight; ///< height & offset from visible Cursor Point m_aOldRBPos; ///< Right/Bottom of last VisArea // (used in Invalidate by Cursor) - Link<const SwFlyFrameFormat*,void> m_aFlyMacroLnk; /**< Link will be called, if the Crsr is set + Link<const SwFlyFrameFormat*,void> m_aFlyMacroLnk; /**< Link will be called, if the Cursor is set into a fly. A macro can then be called */ - Link<SwCrsrShell*,void> m_aChgLnk; /**< link will be called by every attribute/ + Link<SwCursorShell*,void> m_aChgLnk; /**< link will be called by every attribute/ format changes at cursor position.*/ - Link<SwCrsrShell&,void> m_aGrfArrivedLnk; ///< Link calls to UI if a graphic is arrived + Link<SwCursorShell&,void> m_aGrfArrivedLnk; ///< Link calls to UI if a graphic is arrived - SwShellCrsr* m_pCurCrsr; ///< current cursor - SwShellCrsr* m_pCrsrStk; ///< stack for the cursor - SwVisCrsr *m_pVisCrsr; ///< the visible cursor + SwShellCursor* m_pCurrentCursor; ///< current cursor + SwShellCursor* m_pCursorStack; ///< stack for the cursor + SwVisibleCursor *m_pVisibleCursor; ///< the visible cursor - SwBlockCursor *m_pBlockCrsr; ///< interface of cursor for block (=rectangular) selection + SwBlockCursor *m_pBlockCursor; ///< interface of cursor for block (=rectangular) selection - SwShellTableCrsr* m_pTableCrsr; /**< table Crsr; only in tables when the + SwShellTableCursor* m_pTableCursor; /**< table Cursor; only in tables when the selection lays over 2 columns */ SwNodeIndex* m_pBoxIdx; ///< for recognizing of the changed @@ -185,27 +185,27 @@ private: long m_nUpDownX; /**< try to move the cursor on up/down always in the same column */ - long m_nLeftFrmPos; + long m_nLeftFramePos; sal_uLong m_nAktNode; // save CursorPos at Start-Action sal_Int32 m_nAktContent; sal_uInt16 m_nAktNdTyp; bool m_bAktSelection; /* - * Via the Method SttCrsrMove and EndCrsrMove this counter gets + * Via the Method SttCursorMove and EndCursorMove this counter gets * incremented/decremented. As long as the counter is inequal to 0, the * current Cursor gets no update. This way, "complicated" cursor movements * (via Find()) can be realised. */ - sal_uInt16 m_nCrsrMove; + sal_uInt16 m_nCursorMove; sal_uInt16 m_nBasicActionCnt; ///< Actions which are parenthesized by Basic - CrsrMoveState m_eMvState; ///< Status for Crsr-Travelling - GetCrsrOfst + CursorMoveState m_eMvState; ///< Status for Cursor-Travelling - GetCursorOfst OUString m_sMarkedListId; int m_nMarkedListLevel; bool m_bHasFocus : 1; ///< Shell is "active" in a window - bool m_bSVCrsrVis : 1; ///< SV-Cursor visible/invisible + bool m_bSVCursorVis : 1; ///< SV-Cursor visible/invisible bool m_bChgCallFlag : 1; ///< attribute change inside Start- and EndAction bool m_bVisPortChgd : 1; ///< in VisPortChg-Call // (used in Invalidate by the Cursor) @@ -215,28 +215,28 @@ private: // access only via SwChgLinkFlag bool m_bAllProtect : 1; ///< Flag for areas // true -> everything protected / hidden - bool m_bInCMvVisportChgd : 1; ///< Flag for CrsrMoves + bool m_bInCMvVisportChgd : 1; ///< Flag for CursorMoves // true -> view was moved bool m_bGCAttr : 1; // true -> non expanded attributes exist. bool m_bIgnoreReadonly : 1; // true -> make the cursor visible on next // EndAction in spite of Readonly bool m_bSelTableCells : 1; // true -> select cells over the InputWin bool m_bAutoUpdateCells : 1; // true -> autoformat cells - bool m_bBasicHideCrsr : 1; // true -> HideCrsr from Basic - bool m_bSetCrsrInReadOnly : 1;// true -> Cursor is allowed in ReadOnly-Areas - bool m_bOverwriteCrsr : 1; // true -> show Overwrite Crsr + bool m_bBasicHideCursor : 1; // true -> HideCursor from Basic + bool m_bSetCursorInReadOnly : 1;// true -> Cursor is allowed in ReadOnly-Areas + bool m_bOverwriteCursor : 1; // true -> show Overwrite Cursor bool m_bMacroExecAllowed : 1; - SwFrm* m_oldColFrm; + SwFrame* m_oldColFrame; - SAL_DLLPRIVATE void UpdateCrsr( - sal_uInt16 eFlags = SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE, + SAL_DLLPRIVATE void UpdateCursor( + sal_uInt16 eFlags = SwCursorShell::SCROLLWIN|SwCursorShell::CHKRANGE, bool bIdleEnd = false ); - SAL_DLLPRIVATE void MoveCrsrToNum(); + SAL_DLLPRIVATE void MoveCursorToNum(); - SAL_DLLPRIVATE void _ParkPams( SwPaM* pDelRg, SwShellCrsr** ppDelRing ); + SAL_DLLPRIVATE void _ParkPams( SwPaM* pDelRg, SwShellCursor** ppDelRing ); /** Mark a certain list level of a certain list @@ -258,10 +258,10 @@ private: SAL_DLLPRIVATE short GetTextDirection( const Point* pPt = nullptr ) const; - SAL_DLLPRIVATE bool isInHiddenTextFrm(SwShellCrsr* pShellCrsr); + SAL_DLLPRIVATE bool isInHiddenTextFrame(SwShellCursor* pShellCursor); -typedef bool (SwCursor:: *FNCrsr)(); - SAL_DLLPRIVATE bool CallCrsrFN( FNCrsr ); +typedef bool (SwCursor:: *FNCursor)(); + SAL_DLLPRIVATE bool CallCursorFN( FNCursor ); SAL_DLLPRIVATE const SwRangeRedline* _GotoRedline( sal_uInt16 nArrPos, bool bSelect ); @@ -272,9 +272,9 @@ protected: /* * Compare-Methode for the StackCursor and the current Cursor. * The Methods return -1, 0, 1 for lower, equal, greater. The enum - * CrsrCompareType says which position is compared. + * CursorCompareType says which position is compared. */ - enum CrsrCompareType { + enum CursorCompareType { StackPtStackMk, StackPtCurrPt, StackPtCurrMk, @@ -282,7 +282,7 @@ protected: StackMkCurrMk, CurrPtCurrMk }; - int CompareCursor( CrsrCompareType eType ) const; + int CompareCursor( CursorCompareType eType ) const; bool _SelTableRowOrCol( bool bRow, bool bRowSimple = false ); @@ -298,24 +298,24 @@ protected: virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) override; public: - SwCrsrShell( SwDoc& rDoc, vcl::Window *pWin, const SwViewOption *pOpt = nullptr ); + SwCursorShell( SwDoc& rDoc, vcl::Window *pWin, const SwViewOption *pOpt = nullptr ); // disguised copy constructor - SwCrsrShell( SwCrsrShell& rShell, vcl::Window *pWin ); - virtual ~SwCrsrShell(); + SwCursorShell( SwCursorShell& rShell, vcl::Window *pWin ); + virtual ~SwCursorShell(); // create new cursor and append the old one virtual SwPaM & CreateNewShellCursor() override; virtual SwPaM & GetCurrentShellCursor() override; - SwPaM * CreateCrsr(); + SwPaM * CreateCursor(); ///< delete the current cursor and make the following into the current - bool DestroyCrsr(); + bool DestroyCursor(); ///< transform TableCursor to normal cursor, nullify Tablemode - void TableCrsrToCursor(); + void TableCursorToCursor(); ///< enter block mode, change normal cursor into block cursor - void CrsrToBlockCrsr(); + void CursorToBlockCursor(); ///< leave block mode, change block cursor into normal cursor - void BlockCrsrToCrsr(); + void BlockCursorToCursor(); // SelAll() selects the document body content // if ExtendedSelect() is called afterwards, the whole nodes array is selected @@ -326,21 +326,21 @@ public: /// If document body starts with a table. bool StartsWithTable(); - SwPaM* GetCrsr( bool bMakeTableCrsr = true ) const; - inline SwCursor* GetSwCrsr( bool bMakeTableCrsr = true ) const; + SwPaM* GetCursor( bool bMakeTableCursor = true ) const; + inline SwCursor* GetSwCursor( bool bMakeTableCursor = true ) const; // return only the current cursor - SwShellCrsr* _GetCrsr() { return m_pCurCrsr; } - const SwShellCrsr* _GetCrsr() const { return m_pCurCrsr; } + SwShellCursor* _GetCursor() { return m_pCurrentCursor; } + const SwShellCursor* _GetCursor() const { return m_pCurrentCursor; } // show passed cursor - for UNO - void SetSelection(const SwPaM& rCrsr); + void SetSelection(const SwPaM& rCursor); // remove all cursors from ContentNodes and set to 0 - void ParkCrsr( const SwNodeIndex &rIdx ); + void ParkCursor( const SwNodeIndex &rIdx ); // return the current cursor stack // (required in EditShell when deleting contents) - inline SwPaM* GetStkCrsr() const; + inline SwPaM* GetStackCursor() const; // start parenthesing, hide SV-Cursor and selected areas void StartAction(); @@ -389,7 +389,7 @@ public: // return values: // CRSR_POSCHG: when cursor was corrected from SPoint by the layout // CRSR_POSOLD: when the cursor was not changed - int SetCrsr( const Point &rPt, bool bOnlyText = false, bool bBlock = true ); + int SetCursor( const Point &rPt, bool bOnlyText = false, bool bBlock = true ); /* * Notification that the visible area was changed. m_aVisArea is reset, then @@ -427,21 +427,21 @@ public: // story a copy of the cursor in the stack void Push(); /* - * Delete a cursor (controlled by bOldCrsr) - * - from stack or (bOldCrsr = true) + * Delete a cursor (controlled by bOldCursor) + * - from stack or (bOldCursor = true) * - delete the current one and replace it with the cursor from the * stack * Return: whether there was one left one the stack */ - bool Pop( bool bOldCrsr = true ); + bool Pop( bool bOldCursor = true ); /* * Combine 2 Cursors. * Delete the topmost from the stack and move its Mark into the current. */ void Combine(); - void SttCrsrMove(); - void EndCrsrMove( const bool bIdleEnd = false ); + void SttCursorMove(); + void EndCursorMove( const bool bIdleEnd = false ); /* * When the focus is lost the selected ranges are not displayed anymore. @@ -453,28 +453,28 @@ public: void ShGetFcs( bool bUpdate = true ); // Methods for displaying or hiding the visible text cursor. - void ShowCrsr(); - void HideCrsr(); + void ShowCursor(); + void HideCursor(); // Methods for displaying or hiding the selected ranges with visible cursor. - void ShowCrsrs( bool bCrsrVis ); - void HideCrsrs(); + void ShowCursors( bool bCursorVis ); + void HideCursors(); - bool IsOverwriteCrsr() const { return m_bOverwriteCrsr; } - void SetOverwriteCrsr( bool bFlag ) { m_bOverwriteCrsr = bFlag; } + bool IsOverwriteCursor() const { return m_bOverwriteCursor; } + void SetOverwriteCursor( bool bFlag ) { m_bOverwriteCursor = bFlag; } // Return current frame in which the cursor is placed. - SwContentFrm *GetCurrFrm( const bool bCalcFrm = true ) const; + SwContentFrame *GetCurrFrame( const bool bCalcFrame = true ) const; //true if cursor is hidden because of readonly. //false if it is working despite readonly. - bool IsCrsrReadonly() const; + bool IsCursorReadonly() const; // Cursor is placed in something that is protected or selection contains // something that is protected. bool HasReadonlySel(bool bAnnotationMode = false) const; // Can the cursor be set to read only ranges? - bool IsReadOnlyAvailable() const { return m_bSetCrsrInReadOnly; } + bool IsReadOnlyAvailable() const { return m_bSetCursorInReadOnly; } void SetReadOnlyAvailable( bool bFlag ); bool IsOverReadOnlyPos( const Point& rPt ) const; @@ -483,12 +483,12 @@ public: const Link<const SwFlyFrameFormat*,void>& GetFlyMacroLnk() const { return m_aFlyMacroLnk; } // Methods returning/altering link for changes of attributes/formates. - void SetChgLnk( const Link<SwCrsrShell*,void> &rLnk ) { m_aChgLnk = rLnk; } - const Link<SwCrsrShell*,void>& GetChgLnk() const { return m_aChgLnk; } + void SetChgLnk( const Link<SwCursorShell*,void> &rLnk ) { m_aChgLnk = rLnk; } + const Link<SwCursorShell*,void>& GetChgLnk() const { return m_aChgLnk; } // Methods returning/altering ling for "graphic completely loaded". - void SetGrfArrivedLnk( const Link<SwCrsrShell&,void> &rLnk ) { m_aGrfArrivedLnk = rLnk; } - const Link<SwCrsrShell&,void>& GetGrfArrivedLnk() const { return m_aGrfArrivedLnk; } + void SetGrfArrivedLnk( const Link<SwCursorShell&,void> &rLnk ) { m_aGrfArrivedLnk = rLnk; } + const Link<SwCursorShell&,void>& GetGrfArrivedLnk() const { return m_aGrfArrivedLnk; } //Call ChgLink. When within an action calling will be delayed. void CallChgLnk(); @@ -520,7 +520,7 @@ public: /* * Returns if cursor is wholly or partly within visible range. */ - bool IsCrsrVisible() const { return VisArea().IsOver( GetCharRect() ); } + bool IsCursorVisible() const { return VisArea().IsOver( GetCharRect() ); } /* * Returns SwRect, at which the character is located. */ @@ -530,7 +530,7 @@ public: // true: in which cursor is located. // false: which is visible at the upper margin. void GetPageNum( sal_uInt16 &rnPhyNum, sal_uInt16 &rnVirtNum, - bool bAtCrsrPos = true, const bool bCalcFrm = true ); + bool bAtCursorPos = true, const bool bCalcFrame = true ); // Determine how "empty pages" are handled // (used in PhyPage). sal_uInt16 GetNextPrevPageNum( bool bNext = true ); @@ -540,17 +540,17 @@ public: sal_uInt16 GetPageCnt(); - bool GoNextCrsr(); + bool GoNextCursor(); - bool GoPrevCrsr(); + bool GoPrevCursor(); - // at CurCrsr.SPoint + // at CurrentCursor.SPoint ::sw::mark::IMark* SetBookmark( const vcl::KeyCode&, const OUString& rName, const OUString& rShortName, IDocumentMarkAccess::MarkType eMark = IDocumentMarkAccess::MarkType::BOOKMARK); - bool GotoMark( const ::sw::mark::IMark* const pMark ); // sets CurCrsr.SPoint + bool GotoMark( const ::sw::mark::IMark* const pMark ); // sets CurrentCursor.SPoint bool GotoMark( const ::sw::mark::IMark* const pMark, bool bAtStart ); bool GoNextBookmark(); // true, if there was one bool GoPrevBookmark(); @@ -563,7 +563,7 @@ public: // update Cursr, i.e. reset it into content should only be called when the // cursor was set to a random position e.g. when deleting frames - void UpdateCrsrPos(); + void UpdateCursorPos(); // get the selected text at the current cursor. it will be filled with // fields etc. @@ -573,10 +573,10 @@ public: OUString GetText() const; // Check of SPoint or Mark of current cursor are placed within a table. - inline const SwTableNode* IsCrsrInTable( bool bIsPtInTable = true ) const; + inline const SwTableNode* IsCursorInTable( bool bIsPtInTable = true ) const; - inline Point& GetCrsrDocPos( bool bPoint = true ) const; - inline bool IsCrsrPtAtEnd() const; + inline Point& GetCursorDocPos( bool bPoint = true ) const; + inline bool IsCursorPtAtEnd() const; inline const SwPaM* GetTableCrs() const; inline SwPaM* GetTableCrs(); @@ -585,7 +585,7 @@ public: // get current table selection as text OUString GetBoxNms() const; - // set Crsr to the next/previous cell + // set Cursor to the next/previous cell bool GoNextCell( bool bAppendLine = true ); bool GoPrevCell(); // go to this box (if available and inside of table) @@ -617,28 +617,28 @@ public: /** Delivers the current shell cursor Some operations have to run on the current cursor ring, - some on the m_pTableCrsr (if exist) or the current cursor ring and - some on the m_pTableCrsr or m_pBlockCrsr or the current cursor ring. + some on the m_pTableCursor (if exist) or the current cursor ring and + some on the m_pTableCursor or m_pBlockCursor or the current cursor ring. This small function checks the existence and delivers the wished cursor. @param bBlock [bool] if the block cursor is of interest or not - @return m_pTableCrsr if exist, - m_pBlockCrsr if exist and of interest (param bBlock) - otherwise m_pCurCrsr + @return m_pTableCursor if exist, + m_pBlockCursor if exist and of interest (param bBlock) + otherwise m_pCurrentCursor */ - SwShellCrsr* getShellCrsr( bool bBlock ); - const SwShellCrsr* getShellCrsr( bool bBlock ) const - { return (const_cast<SwCrsrShell*>(this))->getShellCrsr( bBlock ); } + SwShellCursor* getShellCursor( bool bBlock ); + const SwShellCursor* getShellCursor( bool bBlock ) const + { return (const_cast<SwCursorShell*>(this))->getShellCursor( bBlock ); } - bool IsBlockMode() const { return nullptr != m_pBlockCrsr; } + bool IsBlockMode() const { return nullptr != m_pBlockCursor; } - // is the Crsr in a table and is the selection over 2 columns - bool IsTableMode() const { return nullptr != m_pTableCrsr; } + // is the Cursor in a table and is the selection over 2 columns + bool IsTableMode() const { return nullptr != m_pTableCursor; } - const SwShellTableCrsr* GetTableCrsr() const { return m_pTableCrsr; } - SwShellTableCrsr* GetTableCrsr() { return m_pTableCrsr; } + const SwShellTableCursor* GetTableCursor() const { return m_pTableCursor; } + SwShellTableCursor* GetTableCursor() { return m_pTableCursor; } size_t UpdateTableSelBoxes(); bool GotoFootnoteText(); ///< jump from content to footnote @@ -650,7 +650,7 @@ public: bool GotoHeaderText(); ///< jump from the content to the header bool GotoFooterText(); ///< jump from the content to the footer // jump to the header/footer of the given or current PageDesc - bool SetCrsrInHdFt( size_t nDescNo = SIZE_MAX, + bool SetCursorInHdFt( size_t nDescNo = SIZE_MAX, bool bInHeader = true ); // is point of cursor in header/footer. pbInHeader return true if it is // in a headerframe otherwise in a footerframe @@ -682,8 +682,8 @@ public: // Place only the visible cursor at the given position in the document. // Return false if SPoint was corrected by layout. // (This is needed for displaying the Drag&Drop/Copy-Cursor.) - bool SetVisCrsr( const Point &rPt ); - inline void UnSetVisCrsr(); + bool SetVisibleCursor( const Point &rPt ); + inline void UnSetVisibleCursor(); // jump to the next or previous field of the corresponding type bool MoveFieldType( @@ -697,11 +697,11 @@ public: static SwTextField* GetTextFieldAtPos( const SwPosition* pPos, const bool bIncludeInputFieldAtStart ); - static SwField* GetFieldAtCrsr( - const SwPaM* pCrsr, + static SwField* GetFieldAtCursor( + const SwPaM* pCursor, const bool bIncludeInputFieldAtStart ); SwField* GetCurField( const bool bIncludeInputFieldAtStart = false ) const; - bool CrsrInsideInputField() const; + bool CursorInsideInputField() const; static bool PosInsideInputField( const SwPosition& rPos ); bool DocPtInsideInputField( const Point& rDocPt ) const; static sal_Int32 StartOfInputFieldAtPos( const SwPosition& rPos ); @@ -709,7 +709,7 @@ public: // Return number of cursors in ring (The flag indicates whether // only cursors containing selections are requested). - sal_uInt16 GetCrsrCnt( bool bAll = true ) const; + sal_uInt16 GetCursorCnt( bool bAll = true ) const; // Char Travelling - methods (in crstrvl1.cxx) bool GoStartWord(); @@ -739,9 +739,9 @@ public: // delete all created cursors, set the table cursor and the last cursor to // its TextNode (or StartNode?) - // They all get created on the next ::GetCrsr again + // They all get created on the next ::GetCursor again // Used for Drag&Drop/Clipboard-Paste in tables - bool ParkTableCrsr(); + bool ParkTableCursor(); // Non expanded attributes? bool IsGCAttr() const { return m_bGCAttr; } @@ -763,7 +763,7 @@ public: bool GetContentAtPos( const Point& rPt, SwContentAtPos& rContentAtPos, - bool bSetCrsr = false, + bool bSetCursor = false, SwRect* pFieldRect = nullptr ); const SwPostItField* GetPostItFieldAtCursor() const; @@ -800,9 +800,9 @@ public: bool IsAutoUpdateCells() const { return m_bAutoUpdateCells; } void SetAutoUpdateCells( bool bFlag ) { m_bAutoUpdateCells = bFlag; } - bool GetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode, + bool GetShadowCursorPos( const Point& rPt, SwFillMode eFillMode, SwRect& rRect, short& rOrient ); - bool SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode ); + bool SetShadowCursorPos( const Point& rPt, SwFillMode eFillMode ); const SwRangeRedline* SelNextRedline(); const SwRangeRedline* SelPrevRedline(); @@ -822,7 +822,7 @@ public: bool SelectHiddenRange(); // remove all invalid cursors - void ClearUpCrsrs(); + void ClearUpCursors(); inline void SetMacroExecAllowed( const bool _bMacroExecAllowed ) { @@ -842,7 +842,7 @@ public: @return the textual description of the current selection */ - OUString GetCrsrDescr() const; + OUString GetCursorDescr() const; virtual void dumpAsXml(struct _xmlTextWriter* pWriter) const override; /// Implementation of lok::Document::getPartPageRectangles() for Writer. @@ -850,68 +850,68 @@ public: }; // Cursor Inlines: -inline SwMoveFnCollection* SwCrsrShell::MakeFindRange( +inline SwMoveFnCollection* SwCursorShell::MakeFindRange( sal_uInt16 nStt, sal_uInt16 nEnd, SwPaM* pPam ) const { - return m_pCurCrsr->MakeFindRange( (SwDocPositions)nStt, (SwDocPositions)nEnd, pPam ); + return m_pCurrentCursor->MakeFindRange( (SwDocPositions)nStt, (SwDocPositions)nEnd, pPam ); } -inline SwCursor* SwCrsrShell::GetSwCrsr( bool bMakeTableCrsr ) const +inline SwCursor* SwCursorShell::GetSwCursor( bool bMakeTableCursor ) const { - return static_cast<SwCursor*>(GetCrsr( bMakeTableCrsr )); + return static_cast<SwCursor*>(GetCursor( bMakeTableCursor )); } -inline SwPaM* SwCrsrShell::GetStkCrsr() const { return m_pCrsrStk; } +inline SwPaM* SwCursorShell::GetStackCursor() const { return m_pCursorStack; } -inline void SwCrsrShell::SetMark() { m_pCurCrsr->SetMark(); } +inline void SwCursorShell::SetMark() { m_pCurrentCursor->SetMark(); } -inline bool SwCrsrShell::HasMark() { return( m_pCurCrsr->HasMark() ); } +inline bool SwCursorShell::HasMark() { return( m_pCurrentCursor->HasMark() ); } -inline bool SwCrsrShell::IsSelection() const +inline bool SwCursorShell::IsSelection() const { - return IsTableMode() || m_pCurCrsr->HasMark() || - m_pCurCrsr->GetNext() != m_pCurCrsr; + return IsTableMode() || m_pCurrentCursor->HasMark() || + m_pCurrentCursor->GetNext() != m_pCurrentCursor; } -inline bool SwCrsrShell::IsMultiSelection() const +inline bool SwCursorShell::IsMultiSelection() const { - return m_pCurCrsr->GetNext() != m_pCurCrsr; + return m_pCurrentCursor->GetNext() != m_pCurrentCursor; } -inline bool SwCrsrShell::IsSelOnePara() const +inline bool SwCursorShell::IsSelOnePara() const { - return !m_pCurCrsr->IsMultiSelection() && - m_pCurCrsr->GetPoint()->nNode == m_pCurCrsr->GetMark()->nNode; + return !m_pCurrentCursor->IsMultiSelection() && + m_pCurrentCursor->GetPoint()->nNode == m_pCurrentCursor->GetMark()->nNode; } -inline const SwTableNode* SwCrsrShell::IsCrsrInTable( bool bIsPtInTable ) const +inline const SwTableNode* SwCursorShell::IsCursorInTable( bool bIsPtInTable ) const { - return m_pCurCrsr->GetNode( bIsPtInTable ).FindTableNode(); + return m_pCurrentCursor->GetNode( bIsPtInTable ).FindTableNode(); } -inline bool SwCrsrShell::IsCrsrPtAtEnd() const +inline bool SwCursorShell::IsCursorPtAtEnd() const { - return m_pCurCrsr->End() == m_pCurCrsr->GetPoint(); + return m_pCurrentCursor->End() == m_pCurrentCursor->GetPoint(); } -inline Point& SwCrsrShell::GetCrsrDocPos( bool bPoint ) const +inline Point& SwCursorShell::GetCursorDocPos( bool bPoint ) const { - return bPoint ? m_pCurCrsr->GetPtPos() : m_pCurCrsr->GetMkPos(); + return bPoint ? m_pCurrentCursor->GetPtPos() : m_pCurrentCursor->GetMkPos(); } -inline const SwPaM* SwCrsrShell::GetTableCrs() const +inline const SwPaM* SwCursorShell::GetTableCrs() const { - return m_pTableCrsr; + return m_pTableCursor; } -inline SwPaM* SwCrsrShell::GetTableCrs() +inline SwPaM* SwCursorShell::GetTableCrs() { - return m_pTableCrsr; + return m_pTableCursor; } -inline void SwCrsrShell::UnSetVisCrsr() +inline void SwCursorShell::UnSetVisibleCursor() { - m_pVisCrsr->Hide(); - m_pVisCrsr->SetDragCrsr( false ); + m_pVisibleCursor->Hide(); + m_pVisibleCursor->SetDragCursor( false ); } #endif // _CRSRSH_HXX diff --git a/sw/inc/crstate.hxx b/sw/inc/crstate.hxx index cdb7df2e1fc2..0663b21bc81f 100644 --- a/sw/inc/crstate.hxx +++ b/sw/inc/crstate.hxx @@ -32,16 +32,16 @@ enum SwFillMode FILL_INDENT ///< by left paragraph indention }; -struct SwFillCrsrPos +struct SwFillCursorPos { - SwRect aCrsr; ///< position and size of the ShadowCursor + SwRect aCursor; ///< position and size of the ShadowCursor sal_uInt16 nParaCnt; ///< number of paragraphs to insert sal_uInt16 nTabCnt; ///< number of tabs respectively size of indentation sal_uInt16 nSpaceCnt; ///< number of spaces to insert sal_uInt16 nColumnCnt; ///< number of necessary column breaks sal_Int16 eOrient; ///< paragraph alignment SwFillMode eMode; ///< desired fill-up rule - SwFillCrsrPos( SwFillMode eMd = FILL_TAB ) : + SwFillCursorPos( SwFillMode eMd = FILL_TAB ) : nParaCnt( 0 ), nTabCnt( 0 ), nSpaceCnt( 0 ), nColumnCnt( 0 ), eOrient( css::text::HoriOrientation::NONE ), eMode( eMd ) {} @@ -68,7 +68,7 @@ struct Sw2LinesPos /** * SwSpecialPos. This structure is used to pass some additional information - * during the call of SwTextFrm::GetCharRect(). An SwSpecialPos defines a position + * during the call of SwTextFrame::GetCharRect(). An SwSpecialPos defines a position * inside a portion which does not have a representation in the core string or * which is only represented by one position, e.g., field portions, * number portions, ergo sum and quo vadis portions. @@ -85,7 +85,7 @@ struct Sw2LinesPos * * Get the position of the second character inside a number portion: * nCharOfst = 2; nLineOfst = 0; nExtendRange = SP_EXTEND_RANGE_BEFORE; - * Call SwTextFrm:::GetCharRect with core string position 0. + * Call SwTextFrame:::GetCharRect with core string position 0. * * Example 2) * @@ -94,7 +94,7 @@ struct Sw2LinesPos * Get the position of the third character in follow field B, core position * of field A is 33. * nCharOfst = 7; nLineOfst = 0; nExtendRange = SP_EXTEND_RANGE_NONE; - * Call SwTextFrm:::GetCharRect with core string position 33. + * Call SwTextFrame:::GetCharRect with core string position 33. */ enum class SwSPExtendRange : sal_uInt8 @@ -114,11 +114,11 @@ struct SwSpecialPos {} }; -// CrsrTravelling-States (for GetCrsrOfst) -enum CrsrMoveState +// CursorTravelling-States (for GetCursorOfst) +enum CursorMoveState { MV_NONE, ///< default - MV_UPDOWN, ///< Crsr Up/Down + MV_UPDOWN, ///< Cursor Up/Down MV_RIGHTMARGIN, ///< at right margin MV_LEFTMARGIN, ///< at left margin MV_SETONLYTEXT, ///< stay with the cursor inside text @@ -126,27 +126,27 @@ enum CrsrMoveState }; // struct for later extensions -struct SwCrsrMoveState +struct SwCursorMoveState { - SwFillCrsrPos *m_pFill; ///< for automatic filling with tabs etc + SwFillCursorPos *m_pFill; ///< for automatic filling with tabs etc Sw2LinesPos *m_p2Lines; ///< for selections inside/around 2line portions SwSpecialPos* m_pSpecialPos; ///< for positions inside fields Point m_aRealHeight; ///< contains then the position/height of the cursor - CrsrMoveState m_eState; + CursorMoveState m_eState; sal_uInt8 m_nCursorBidiLevel; bool m_bStop; bool m_bRealHeight; ///< should the real height be calculated? bool m_bFieldInfo; ///< should be fields recognized? bool m_bPosCorr; ///< Point had to be corrected bool m_bFootnoteNoInfo; ///< recognized footnote numbering - bool m_bExactOnly; /**< let GetCrsrOfst look for exact matches only, + bool m_bExactOnly; /**< let GetCursorOfst look for exact matches only, i.e. never let it run into GetContentPos */ bool m_bFillRet; ///< only used temporary in FillMode bool m_bSetInReadOnly; ///< ReadOnly areas may be entered bool m_bRealWidth; ///< Calculation of the width required bool m_b2Lines; ///< Check 2line portions and fill p2Lines bool m_bNoScroll; ///< No scrolling of undersized textframes - bool m_bPosMatchesBounds; /**< GetCrsrOfst should not return the next + bool m_bPosMatchesBounds; /**< GetCursorOfst should not return the next position if screen position is inside second have of bound rect */ @@ -160,7 +160,7 @@ struct SwCrsrMoveState bool m_bInNumPortion; ///< point is in number portion #i23726# int m_nInNumPostionOffset; ///< distance from number portion's start - SwCrsrMoveState( CrsrMoveState eSt = MV_NONE ) : + SwCursorMoveState( CursorMoveState eSt = MV_NONE ) : m_pFill( nullptr ), m_p2Lines( nullptr ), m_pSpecialPos( nullptr ), @@ -183,7 +183,7 @@ struct SwCrsrMoveState m_bInNumPortion(false), // #i26726# m_nInNumPostionOffset(0) // #i26726# {} - SwCrsrMoveState( SwFillCrsrPos *pInitFill ) : + SwCursorMoveState( SwFillCursorPos *pInitFill ) : m_pFill( pInitFill ), m_p2Lines( nullptr ), m_pSpecialPos( nullptr ), diff --git a/sw/inc/cshtyp.hxx b/sw/inc/cshtyp.hxx index 2ba43ffef947..a75b3f9f878b 100644 --- a/sw/inc/cshtyp.hxx +++ b/sw/inc/cshtyp.hxx @@ -23,21 +23,21 @@ #include "swdllapi.h" class SwPaM; -class SwContentFrm; -class SwLayoutFrm; +class SwContentFrame; +class SwLayoutFrame; // Structure for SwPaM. Contains the method-pointers for cursor movement. struct SwMoveFnCollection; typedef SwMoveFnCollection* SwMoveFn; -// Type definition for CrsrShell. -// Direction-parameter for MovePage (initialized in SwContentFrm). -typedef SwLayoutFrm * (*SwWhichPage)( const SwLayoutFrm * ); -typedef SwContentFrm * (*SwPosPage)( const SwLayoutFrm * ); +// Type definition for CursorShell. +// Direction-parameter for MovePage (initialized in SwContentFrame). +typedef SwLayoutFrame * (*SwWhichPage)( const SwLayoutFrame * ); +typedef SwContentFrame * (*SwPosPage)( const SwLayoutFrame * ); extern SwWhichPage fnPagePrev, fnPageCurr, fnPageNext; extern SwPosPage fnPageStart, fnPageEnd; -// Direction-parameter for MovePara (initialized in SwContentFrm). +// Direction-parameter for MovePara (initialized in SwContentFrame). typedef SwMoveFnCollection* SwPosPara; typedef bool (*SwWhichPara)( SwPaM&, SwPosPara ); extern SwWhichPara fnParaPrev, fnParaCurr, fnParaNext; @@ -56,8 +56,8 @@ extern SwWhichTable fnTablePrev, fnTableCurr, fnTableNext; extern SwPosTable fnTableStart, fnTableEnd; // Direction-parameter for MoveColumn -typedef SwLayoutFrm * (*SwWhichColumn)( const SwLayoutFrm * ); -typedef SwContentFrm * (*SwPosColumn)( const SwLayoutFrm * ); +typedef SwLayoutFrame * (*SwWhichColumn)( const SwLayoutFrame * ); +typedef SwContentFrame * (*SwPosColumn)( const SwLayoutFrame * ); extern SwWhichColumn fnColumnPrev, fnColumnCurr, fnColumnNext; extern SwPosColumn fnColumnStart, fnColumnEnd; diff --git a/sw/inc/dbfld.hxx b/sw/inc/dbfld.hxx index 682c950b7031..3e996288f038 100644 --- a/sw/inc/dbfld.hxx +++ b/sw/inc/dbfld.hxx @@ -25,7 +25,7 @@ class SwDoc; class SwTextField; -class SwFrm; +class SwFrame; // Database field. class SW_DLLPUBLIC SwDBFieldType : public SwValueFieldType diff --git a/sw/inc/dcontact.hxx b/sw/inc/dcontact.hxx index c565b66dee82..73d4242f337e 100644 --- a/sw/inc/dcontact.hxx +++ b/sw/inc/dcontact.hxx @@ -32,9 +32,9 @@ class SfxPoolItem; class SwFrameFormat; class SwFlyFrameFormat; -class SwFlyFrm; -class SwFrm; -class SwPageFrm; +class SwFlyFrame; +class SwFrame; +class SwPageFrame; class SwVirtFlyDrawObj; class SwFormatAnchor; class SwFlyDrawObj; @@ -54,7 +54,7 @@ inline const SwFrameFormat *FindFrameFormat( const SdrObject *pObj ) { return ::FindFrameFormat( const_cast<SdrObject*>(pObj) ); } bool HasWrap( const SdrObject* pObj ); -void setContextWritingMode( SdrObject* pObj, SwFrm* pAnchor ); +void setContextWritingMode( SdrObject* pObj, SwFrame* pAnchor ); /// @return BoundRect plus distance. SwRect GetBoundRectOfAnchoredObj( const SdrObject* pObj ); @@ -253,8 +253,8 @@ class SwDrawVirtObj : public SdrVirtObj /// connection to writer layout const SwAnchoredObject& GetAnchoredObj() const { return maAnchoredDrawObj; } SwAnchoredObject& AnchoredObj() { return maAnchoredDrawObj; } - const SwFrm* GetAnchorFrm() const; - SwFrm* AnchorFrm(); + const SwFrame* GetAnchorFrame() const; + SwFrame* AnchorFrame(); void RemoveFromWriterLayout(); /// connection to drawing layer @@ -363,10 +363,10 @@ class SwDrawContact : public SwContact /** unary function used by <list> iterator to find a 'virtual' drawing object anchored at a given frame */ - struct VirtObjAnchoredAtFrmPred + struct VirtObjAnchoredAtFramePred { - const SwFrm* mpAnchorFrm; - VirtObjAnchoredAtFrmPred( const SwFrm& _rAnchorFrm ); + const SwFrame* mpAnchorFrame; + VirtObjAnchoredAtFramePred( const SwFrame& _rAnchorFrame ); bool operator() ( const SwDrawVirtObj* _pDrawVirtObj ); }; @@ -396,25 +396,25 @@ class SwDrawContact : public SwContact virtual SdrObject* GetMaster() override; virtual void SetMaster( SdrObject* _pNewMaster ) override; - const SwFrm* GetAnchorFrm( const SdrObject* _pDrawObj = nullptr ) const; - SwFrm* GetAnchorFrm( SdrObject* _pDrawObj = nullptr ); + const SwFrame* GetAnchorFrame( const SdrObject* _pDrawObj = nullptr ) const; + SwFrame* GetAnchorFrame( SdrObject* _pDrawObj = nullptr ); - inline const SwPageFrm* GetPageFrm() const + inline const SwPageFrame* GetPageFrame() const { - return maAnchoredDrawObj.GetPageFrm(); + return maAnchoredDrawObj.GetPageFrame(); } - inline SwPageFrm* GetPageFrm() + inline SwPageFrame* GetPageFrame() { - return maAnchoredDrawObj.GetPageFrm(); + return maAnchoredDrawObj.GetPageFrame(); } - void SetPageFrm( SwPageFrm* _pNewPageFrm ) + void SetPageFrame( SwPageFrame* _pNewPageFrame ) { - return maAnchoredDrawObj.SetPageFrm( _pNewPageFrm ); + return maAnchoredDrawObj.SetPageFrame( _pNewPageFrame ); } void ChkPage(); - SwPageFrm* FindPage( const SwRect &rRect ); + SwPageFrame* FindPage( const SwRect &rRect ); - /** Inserts SdrObject in the arrays of the layout ((SwPageFrm and SwFrm). + /** Inserts SdrObject in the arrays of the layout ((SwPageFrame and SwFrame). The anchor is determined according to the attribute SwFormatAnchor. If required the object gets unregistered with the old anchor. */ void ConnectToLayout( const SwFormatAnchor *pAnch = nullptr ); @@ -436,7 +436,7 @@ class SwDrawContact : public SwContact /** get drawing object ('master' or 'virtual') by frame. */ - SdrObject* GetDrawObjectByAnchorFrm( const SwFrm& _rAnchorFrm ); + SdrObject* GetDrawObjectByAnchorFrame( const SwFrame& _rAnchorFrame ); /// Virtual methods of SdrObjUserCall. virtual void Changed(const SdrObject& rObj, SdrUserCallType eType, const Rectangle& rOldBoundRect) override; diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index be104eb2abab..c752fa385526 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -78,11 +78,11 @@ class SvxMacroTableDtor; class SwAutoCompleteWord; class SwAutoCorrExceptWord; class SwCalc; -class SwCellFrm; +class SwCellFrame; class SwCharFormat; class SwCharFormats; class SwConditionTextFormatColl; -class SwCrsrShell; +class SwCursorShell; class SwCursor; class SwDBNameInfField; class SwDocShell; @@ -120,7 +120,7 @@ class SwPagePreviewPrtData; class SwRangeRedline; class SwRedlineTable; class SwExtraRedlineTable; -class SwRootFrm; +class SwRootFrame; class SwRubyList; class SwRubyListEntry; class SwSectionFormat; @@ -142,7 +142,7 @@ class SwTextBlocks; class SwTextFormatColl; class SwTextFormatColls; class SwURLStateChanged; -class SwUnoCrsr; +class SwUnoCursor; class SwViewShell; class _SetGetExpField; class SwDrawContact; @@ -168,7 +168,7 @@ class SwChartLockController_Helper; class IGrammarContact; class SwPrintData; class SwRenderData; -class SwPageFrm; +class SwPageFrame; class SwViewOption; class SwList; class IDocumentUndoRedo; @@ -392,7 +392,7 @@ private: const SwContentNode& rNode, RndStdIds eRequestId, const SfxItemSet* pFlyAttrSet, SwFrameFormat* = nullptr ); - sal_Int8 SetFlyFrmAnchor( SwFrameFormat& rFlyFormat, SfxItemSet& rSet, bool bNewFrms ); + sal_Int8 SetFlyFrameAnchor( SwFrameFormat& rFlyFormat, SfxItemSet& rSet, bool bNewFrames ); typedef SwFormat* (SwDoc:: *FNCopyFormat)( const OUString&, SwFormat*, bool, bool ); SwFormat* CopyFormat( const SwFormat& rFormat, const SwFormatsBase& rFormatArr, @@ -619,7 +619,7 @@ public: have to be surrounded completely by css::awt::Selection. ( Start < Pos < End ) !!! (Required for Writers.) */ - SwPosFlyFrms GetAllFlyFormats( const SwPaM* = nullptr, + SwPosFlyFrames GetAllFlyFormats( const SwPaM* = nullptr, bool bDrawAlso = false, bool bAsCharAlso = false ) const; @@ -656,13 +656,13 @@ public: // these items work for the UNO API and thus e.g. for ODF im/export) void CheckForUniqueItemForLineFillNameOrIndex(SfxItemSet& rSet); - bool SetFlyFrmAttr( SwFrameFormat& rFlyFormat, SfxItemSet& rSet ); + bool SetFlyFrameAttr( SwFrameFormat& rFlyFormat, SfxItemSet& rSet ); bool SetFrameFormatToFly( SwFrameFormat& rFlyFormat, SwFrameFormat& rNewFormat, SfxItemSet* pSet = nullptr, bool bKeepOrient = false ); - void SetFlyFrmTitle( SwFlyFrameFormat& rFlyFrameFormat, + void SetFlyFrameTitle( SwFlyFrameFormat& rFlyFrameFormat, const OUString& sNewTitle ); - void SetFlyFrmDescription( SwFlyFrameFormat& rFlyFrameFormat, + void SetFlyFrameDescription( SwFlyFrameFormat& rFlyFrameFormat, const OUString& sNewDescription ); // Footnotes @@ -686,7 +686,7 @@ public: SwConversionArgs *pConvArgs = nullptr ) const; css::uno::Reference< css::linguistic2::XHyphenatedWord > - Hyphenate( SwPaM *pPam, const Point &rCrsrPos, + Hyphenate( SwPaM *pPam, const Point &rCursorPos, sal_uInt16* pPageCnt, sal_uInt16* pPageSt ); // count words in pam @@ -726,7 +726,7 @@ public: OUString GetUniqueFrameName() const; OUString GetUniqueShapeName() const; - std::set<SwRootFrm*> GetAllLayouts(); + std::set<SwRootFrame*> GetAllLayouts(); void SetFlyName( SwFlyFrameFormat& rFormat, const OUString& rName ); const SwFlyFrameFormat* FindFlyByName( const OUString& rName, sal_Int8 nNdTyp = 0 ) const; @@ -898,15 +898,15 @@ public: // travel over PaM Ring bool InsertGlossary( SwTextBlocks& rBlock, const OUString& rEntry, - SwPaM& rPaM, SwCrsrShell* pShell = nullptr); + SwPaM& rPaM, SwCursorShell* pShell = nullptr); /** get the set of printable pages for the XRenderable API by evaluating the respective settings (see implementation) */ - static void CalculatePagesForPrinting( const SwRootFrm& rLayout, SwRenderData &rData, const SwPrintUIOptions &rOptions, bool bIsPDFExport, + static void CalculatePagesForPrinting( const SwRootFrame& rLayout, SwRenderData &rData, const SwPrintUIOptions &rOptions, bool bIsPDFExport, sal_Int32 nDocPageCount ); static void UpdatePagesForPrintingWithPostItData( SwRenderData &rData, const SwPrintUIOptions &rOptions, bool bIsPDFExport, sal_Int32 nDocPageCount ); - static void CalculatePagePairsForProspectPrinting( const SwRootFrm& rLayout, SwRenderData &rData, const SwPrintUIOptions &rOptions, + static void CalculatePagePairsForProspectPrinting( const SwRootFrame& rLayout, SwRenderData &rData, const SwPrintUIOptions &rOptions, sal_Int32 nDocPageCount ); // PageDescriptor interface. @@ -1013,34 +1013,34 @@ public: // Correct the SwPosition-Objects that are registered with the document // e. g. Bookmarks or tables/indices. - // If bMoveCrsr is set move Crsr too. + // If bMoveCursor is set move Cursor too. // Set everything in rOldNode on rNewPos + Offset. void CorrAbs( const SwNodeIndex& rOldNode, const SwPosition& rNewPos, const sal_Int32 nOffset = 0, - bool bMoveCrsr = false ); + bool bMoveCursor = false ); // Set everything in the range of [rStartNode, rEndNode] to rNewPos. static void CorrAbs( const SwNodeIndex& rStartNode, const SwNodeIndex& rEndNode, const SwPosition& rNewPos, - bool bMoveCrsr = false ); + bool bMoveCursor = false ); // Set everything in this range from rRange to rNewPos. static void CorrAbs( const SwPaM& rRange, const SwPosition& rNewPos, - bool bMoveCrsr = false ); + bool bMoveCursor = false ); // Set everything in rOldNode to relative Pos. void CorrRel( const SwNodeIndex& rOldNode, const SwPosition& rNewPos, const sal_Int32 nOffset = 0, - bool bMoveCrsr = false ); + bool bMoveCursor = false ); // Query / set rules for Outline. inline SwNumRule* GetOutlineNumRule() const @@ -1230,14 +1230,14 @@ public: bool IsInsTableAlignNum() const; // From FEShell (for Undo and BModified). - static void GetTabCols( SwTabCols &rFill, const SwCursor* pCrsr, - const SwCellFrm* pBoxFrm = nullptr ); + static void GetTabCols( SwTabCols &rFill, const SwCursor* pCursor, + const SwCellFrame* pBoxFrame = nullptr ); void SetTabCols( const SwTabCols &rNew, bool bCurRowOnly, - const SwCursor* pCrsr, const SwCellFrm* pBoxFrm = nullptr ); - static void GetTabRows( SwTabCols &rFill, const SwCursor* pCrsr, - const SwCellFrm* pBoxFrm = nullptr ); - void SetTabRows( const SwTabCols &rNew, bool bCurColOnly, const SwCursor* pCrsr, - const SwCellFrm* pBoxFrm = nullptr ); + const SwCursor* pCursor, const SwCellFrame* pBoxFrame = nullptr ); + static void GetTabRows( SwTabCols &rFill, const SwCursor* pCursor, + const SwCellFrame* pBoxFrame = nullptr ); + void SetTabRows( const SwTabCols &rNew, bool bCurColOnly, const SwCursor* pCursor, + const SwCellFrame* pBoxFrame = nullptr ); // Direct access for UNO. void SetTabCols(SwTable& rTab, const SwTabCols &rNew, const SwTabCols &rOld, @@ -1460,7 +1460,7 @@ public: void SetOLEObjModified(); // Uno - Interfaces - std::shared_ptr<SwUnoCrsr> CreateUnoCrsr( const SwPosition& rPos, bool bTableCrsr = false ); + std::shared_ptr<SwUnoCursor> CreateUnoCursor( const SwPosition& rPos, bool bTableCursor = false ); // FeShell - Interfaces // !!! These assume always an existing layout !!! @@ -1469,8 +1469,8 @@ public: const bool _bSameOnly, const bool _bPosCorr ); - void SetRowHeight( const SwCursor& rCursor, const SwFormatFrmSize &rNew ); - static void GetRowHeight( const SwCursor& rCursor, SwFormatFrmSize *& rpSz ); + void SetRowHeight( const SwCursor& rCursor, const SwFormatFrameSize &rNew ); + static void GetRowHeight( const SwCursor& rCursor, SwFormatFrameSize *& rpSz ); void SetRowSplit( const SwCursor& rCursor, const SwFormatRowSplit &rNew ); static void GetRowSplit( const SwCursor& rCursor, SwFormatRowSplit *& rpSz ); bool BalanceRowHeight( const SwCursor& rCursor, bool bTstOnly = true ); @@ -1501,7 +1501,7 @@ public: SwChainRet Chain( SwFrameFormat &rSource, const SwFrameFormat &rDest ); void Unchain( SwFrameFormat &rFormat ); - // For Copy/Move from FrmShell. + // For Copy/Move from FrameShell. SdrObject* CloneSdrObj( const SdrObject&, bool bMoveWithinDoc = false, bool bInsInPage = true ); @@ -1634,17 +1634,17 @@ public: void dumpAsXml(struct _xmlTextWriter* = nullptr) const; std::set<Color> GetDocColors(); - std::vector< std::weak_ptr<SwUnoCrsr> > mvUnoCrsrTable; + std::vector< std::weak_ptr<SwUnoCursor> > mvUnoCursorTable; - // Remove expired UnoCrsr weak pointers the document keeps to notify about document death. - void cleanupUnoCrsrTable() + // Remove expired UnoCursor weak pointers the document keeps to notify about document death. + void cleanupUnoCursorTable() { // In most cases we'll remove most of the elements. - std::vector< std::weak_ptr<SwUnoCrsr> > unoCrsrTable; - std::copy_if(mvUnoCrsrTable.begin(), mvUnoCrsrTable.end(), - std::back_inserter(unoCrsrTable), - [](const std::weak_ptr<SwUnoCrsr>& pWeakPtr) { return !pWeakPtr.expired(); }); - std::swap(mvUnoCrsrTable, unoCrsrTable); + std::vector< std::weak_ptr<SwUnoCursor> > unoCursorTable; + std::copy_if(mvUnoCursorTable.begin(), mvUnoCursorTable.end(), + std::back_inserter(unoCursorTable), + [](const std::weak_ptr<SwUnoCursor>& pWeakPtr) { return !pWeakPtr.expired(); }); + std::swap(mvUnoCursorTable, unoCursorTable); } private: diff --git a/sw/inc/docary.hxx b/sw/inc/docary.hxx index 07246188f681..37c5201905e4 100644 --- a/sw/inc/docary.hxx +++ b/sw/inc/docary.hxx @@ -27,7 +27,7 @@ class SwRangeRedline; class SwExtraRedline; -class SwUnoCrsr; +class SwUnoCursor; class SwOLENode; class SwTable; class SwTableLine; diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx index bd9cf5419751..52fe09828031 100644 --- a/sw/inc/docsh.hxx +++ b/sw/inc/docsh.hxx @@ -45,7 +45,7 @@ class SwWrtShell; class SwFEShell; class Reader; class SwReader; -class SwCrsrShell; +class SwCursorShell; class SwSrcView; class SwPaM; class SwgReaderOption; @@ -228,7 +228,7 @@ public: /// For inserting document. Reader* StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr, - SwCrsrShell* pCrsrSh = nullptr, SwPaM* pPaM = nullptr); + SwCursorShell* pCursorSh = nullptr, SwPaM* pPaM = nullptr); #if defined WNT virtual bool DdeGetData( const OUString& rItem, const OUString& rMimeType, diff --git a/sw/inc/docufld.hxx b/sw/inc/docufld.hxx index 2e8c9152fd24..d684e9facc71 100644 --- a/sw/inc/docufld.hxx +++ b/sw/inc/docufld.hxx @@ -29,7 +29,7 @@ class _SetGetExpFields; class SwTextField; -class SwFrm; +class SwFrame; class OutlinerParaObject; class SwTextAPIObject; class SwFormatField; @@ -273,7 +273,7 @@ public: SwDocStatField( SwDocStatFieldType*, sal_uInt16 nSubType = 0, sal_uInt32 nFormat = 0); - void ChangeExpansion( const SwFrm* pFrm ); + void ChangeExpansion( const SwFrame* pFrame ); virtual OUString Expand() const override; virtual SwField* Copy() const override; @@ -619,7 +619,7 @@ public: void SetText( const OUString& rText ) { sText = rText; } - void ChangeExpansion( const SwFrm* pFrm, const SwTextField* pField ); + void ChangeExpansion( const SwFrame* pFrame, const SwTextField* pField ); virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override; virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override; }; diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx index 74605baa5749..f786d84a8d83 100644 --- a/sw/inc/editsh.hxx +++ b/sw/inc/editsh.hxx @@ -141,7 +141,7 @@ typedef std::vector<SwGetINetAttr> SwGetINetAttrs; #define CNT_HasGrf(USH) ((USH)&CNT_GRF) #define CNT_HasOLE(USH) ((USH)&CNT_OLE) -class SW_DLLPUBLIC SwEditShell : public SwCrsrShell +class SW_DLLPUBLIC SwEditShell : public SwCursorShell { static SvxSwAutoFormatFlags* s_pAutoFormatFlags; @@ -165,7 +165,7 @@ class SW_DLLPUBLIC SwEditShell : public SwCrsrShell public: /// Edit (all selected ranges). - void Insert( sal_Unicode, bool bOnlyCurrCrsr = false ); + void Insert( sal_Unicode, bool bOnlyCurrCursor = false ); void Insert2( const OUString &, const bool bForceExpandHints = false ); void Overwrite( const OUString & ); @@ -234,7 +234,7 @@ public: bool GetCurAttr( SfxItemSet& , const bool bMergeIndentValuesOfNumRule = false ) const; void SetAttrItem( const SfxPoolItem&, SetAttrMode nFlags = SetAttrMode::DEFAULT ); - void SetAttrSet( const SfxItemSet&, SetAttrMode nFlags = SetAttrMode::DEFAULT, SwPaM* pCrsr = nullptr ); + void SetAttrSet( const SfxItemSet&, SetAttrMode nFlags = SetAttrMode::DEFAULT, SwPaM* pCursor = nullptr ); /** Get RES_CHRATR_* items of one type in the current selection. * @param nWhich WhichId of the collected items. @@ -276,7 +276,7 @@ public: /// Query default attribute of document. const SfxPoolItem& GetDefault( sal_uInt16 nFormatHint ) const; - void ResetAttr( const std::set<sal_uInt16> &attrs = std::set<sal_uInt16>(), SwPaM* pCrsr = nullptr ); + void ResetAttr( const std::set<sal_uInt16> &attrs = std::set<sal_uInt16>(), SwPaM* pCursor = nullptr ); void GCAttr(); /// @return the scripttpye of the selection. @@ -459,7 +459,7 @@ public: bool IsProtectedOutlinePara() const; - const SwNumRule* GetNumRuleAtCurrCrsrPos() const; + const SwNumRule* GetNumRuleAtCurrCursorPos() const; /** Returns the numbering rule found at the paragraphs of the current selection, if all paragraphs of the current selection have the same or none numbering rule applied. */ @@ -499,7 +499,7 @@ public: void ChangeIndentOfAllListLevels( short nDiff ); // Adjust method name void SetIndent(short nIndent, const SwPosition & rPos); - bool IsFirstOfNumRuleAtCrsrPos() const; + bool IsFirstOfNumRuleAtCursorPos() const; bool IsNoNum( bool bChkStart = true ) const; @@ -525,7 +525,7 @@ public: void ChgNumRuleFormats( const SwNumRule& rRule ); /// Set (and query if) a numbering with StartFlag starts at current PointPos. - void SetNumRuleStart( bool bFlag = true, SwPaM* pCrsr = nullptr ); + void SetNumRuleStart( bool bFlag = true, SwPaM* pCursor = nullptr ); bool IsNumRuleStart( SwPaM* pPaM = nullptr ) const; void SetNodeNumStart( sal_uInt16 nStt, SwPaM* = nullptr ); @@ -579,7 +579,7 @@ public: /// To enable set up of StartActions and EndActions. virtual void CalcLayout() override; - /// Determine form of content. Return Type at CurCrsr->SPoint. + /// Determine form of content. Return Type at CurrentCursor->SPoint. sal_uInt16 GetCntType() const; /// Are there frames, footnotes, etc. @@ -594,7 +594,7 @@ public: bool GetSelectedText( OUString &rBuf, int nHndlParaBreak = GETSELTXT_PARABRK_TO_BLANK ); - /** @return graphic, if CurCrsr->Point() points to a SwGrfNode + /** @return graphic, if CurrentCursor->Point() points to a SwGrfNode (and mark is not set or points to the same graphic). */ const Graphic* GetGraphic( bool bWait = true ) const; @@ -632,7 +632,7 @@ public: Graphic GetIMapGraphic() const; ///< @return a graphic for all Flys! const SwFlyFrameFormat* FindFlyByName( const OUString& rName, sal_uInt8 nNdTyp = 0 ) const; - /** @return a ClientObject, if CurCrsr->Point() points to a SwOLENode + /** @return a ClientObject, if CurrentCursor->Point() points to a SwOLENode (and mark is neither set not pointint to same ClientObject) else give rap on the knuckles. */ svt::EmbeddedObjectRef& GetOLEObject() const; @@ -960,7 +960,7 @@ public: ~SwActContext(); }; - /// Class for automated call of Start- and EndCrsrMove(). + /// Class for automated call of Start- and EndCursorMove(). class SwMvContext { SwEditShell & m_rShell; public: diff --git a/sw/inc/expfld.hxx b/sw/inc/expfld.hxx index 58041f3269b9..b2dbe78d15d8 100644 --- a/sw/inc/expfld.hxx +++ b/sw/inc/expfld.hxx @@ -27,7 +27,7 @@ class SfxPoolItem; class SwTextNode; -class SwFrm; +class SwFrame; struct SwPosition; class SwTextField; class SwDoc; @@ -37,7 +37,7 @@ class SwEditShell; /// Forward declaration: get "BodyTextNode" for exp.fld in Fly's headers/footers/footnotes. const SwTextNode* GetBodyTextNode( const SwDoc& pDoc, SwPosition& rPos, - const SwFrm& rFrm ); + const SwFrame& rFrame ); OUString ReplacePoint(const OUString& sTmpName, bool bWithCommandType = false); @@ -111,7 +111,7 @@ public: /** For fields in header/footer/footnotes/flys: Only called by formatting!! */ - void ChangeExpansion( const SwFrm&, const SwTextField& ); + void ChangeExpansion( const SwFrame&, const SwTextField& ); virtual OUString GetFieldName() const override; @@ -363,8 +363,8 @@ public: SwField* GetField(size_t nId); void GotoFieldPos(size_t nId); - void PushCrsr(); - void PopCrsr(); + void PushCursor(); + void PopCursor(); /** Put all that are new into SortLst for updating. @return true if not empty. (For Glossary: only update its input-fields). diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx index da9420ff973a..f0367287daf2 100644 --- a/sw/inc/fesh.hxx +++ b/sw/inc/fesh.hxx @@ -39,13 +39,13 @@ namespace editeng { class SvxBorderLine; } -class SwFlyFrm; +class SwFlyFrame; class SwTabCols; class SvxBrushItem; class SvxFrameDirectionItem; class SwTableAutoFormat; -class SwFrm; -class SwFormatFrmSize; +class SwFrame; +class SwFormatFrameSize; class SwFormatRowSplit; class SdrObject; class Color; @@ -60,9 +60,9 @@ namespace svx class ISdrObjectFilter; } -// return values for GetFrmType() und GetSelFrmType(). +// return values for GetFrameType() und GetSelFrameType(). //! values can be combined via logical or -enum class FrmTypeFlags { +enum class FrameTypeFlags { NONE = 0, PAGE = 1, HEADER = 2, @@ -82,7 +82,7 @@ enum class FrmTypeFlags { }; namespace o3tl { - template<> struct typed_flags<FrmTypeFlags> : is_typed_flags<FrmTypeFlags, 0x7fff> {}; + template<> struct typed_flags<FrameTypeFlags> : is_typed_flags<FrameTypeFlags, 0x7fff> {}; } //! values can be combined via logical or @@ -92,10 +92,10 @@ enum class GotoObjFlags DrawControl = 1, DrawSimple = 2, DrawAny = DrawControl | DrawSimple, - FlyFrm = 4, + FlyFrame = 4, FlyGrf = 8, FlyOLE = 16, - FlyAny = FlyOLE | FlyGrf | FlyFrm, + FlyAny = FlyOLE | FlyGrf | FlyFrame, Any = FlyAny | DrawAny, }; namespace o3tl @@ -141,8 +141,8 @@ enum CurRectType RECT_PAGE_CALC, ///< ... page will be formatted if required. RECT_PAGE_PRT, ///< Rect of current PrtArea of page. RECT_FRM, ///< Rect of current frame. - RECT_FLY_EMBEDDED, ///< Rect of current FlyFrm. - RECT_FLY_PRT_EMBEDDED, ///< Rect of PrtArea of FlyFrm + RECT_FLY_EMBEDDED, ///< Rect of current FlyFrame. + RECT_FLY_PRT_EMBEDDED, ///< Rect of PrtArea of FlyFrame RECT_SECTION, ///< Rect of current section. RECT_OUTTABSECTION, ///< Rect of current section but outside of table. RECT_SECTION_PRT, ///< Rect of current PrtArea of section. @@ -156,8 +156,8 @@ enum CurRectType struct SwGetCurColNumPara { const SwFrameFormat* pFrameFormat; - const SwRect* pPrtRect, *pFrmRect; - SwGetCurColNumPara() : pFrameFormat( nullptr ), pPrtRect( nullptr ), pFrmRect( nullptr ) {} + const SwRect* pPrtRect, *pFrameRect; + SwGetCurColNumPara() : pFrameFormat( nullptr ), pPrtRect( nullptr ), pFrameRect( nullptr ) {} }; enum class SwPasteSdr @@ -207,7 +207,7 @@ private: std::unique_ptr<SdrDropMarkerOverlay> m_pChainFrom; bool m_bCheckForOLEInCaption; - SAL_DLLPRIVATE SwFlyFrm *FindFlyFrm( const css::uno::Reference < css::embed::XEmbeddedObject >& ) const; + SAL_DLLPRIVATE SwFlyFrame *FindFlyFrame( const css::uno::Reference < css::embed::XEmbeddedObject >& ) const; /// Terminate actions for all shells and call ChangeLink. SAL_DLLPRIVATE void EndAllActionAndCall(); @@ -218,14 +218,14 @@ private: /** Used for mouse operations on a table: @return a cell frame that is 'close' to rPt. */ - SAL_DLLPRIVATE const SwFrm *GetBox( const Point &rPt, bool* pbRow = nullptr, bool* pbCol = nullptr ) const; + SAL_DLLPRIVATE const SwFrame *GetBox( const Point &rPt, bool* pbRow = nullptr, bool* pbCol = nullptr ) const; // 0 == not in any column. - SAL_DLLPRIVATE sal_uInt16 _GetCurColNum( const SwFrm *pFrm, + SAL_DLLPRIVATE sal_uInt16 _GetCurColNum( const SwFrame *pFrame, SwGetCurColNumPara* pPara ) const; - SAL_DLLPRIVATE void _GetTabCols( SwTabCols &rToFill, const SwFrm *pBox ) const; - SAL_DLLPRIVATE void _GetTabRows( SwTabCols &rToFill, const SwFrm *pBox ) const; + SAL_DLLPRIVATE void _GetTabCols( SwTabCols &rToFill, const SwFrame *pBox ) const; + SAL_DLLPRIVATE void _GetTabRows( SwTabCols &rToFill, const SwFrame *pBox ) const; SAL_DLLPRIVATE bool ImpEndCreate(); @@ -237,7 +237,7 @@ private: bool bSelectInsert ); /// Get list of marked SdrObjects; - /// helper method for GetSelFrmType, IsSelContainsControl. + /// helper method for GetSelFrameType, IsSelContainsControl. SAL_DLLPRIVATE const SdrMarkList* _GetMarkList() const; SAL_DLLPRIVATE bool CheckHeadline( bool bRepeat ) const; @@ -263,7 +263,7 @@ public: bool Copy( SwFEShell*, const Point& rSttPt, const Point& rInsPt, bool bIsMove = false, bool bSelectInsert = true ); - void SelectFlyFrm( SwFlyFrm& rFrm, bool bNew = false ); + void SelectFlyFrame( SwFlyFrame& rFrame, bool bNew = false ); /// Is selected frame within another frame? const SwFrameFormat* IsFlyInFly(); @@ -301,15 +301,15 @@ public: sophisticated one day. */ bool IsDirectlyInSection() const; - /** For return values see above FrmType. + /** For return values see above FrameType. pPt: Cursr or DocPos respectively; bStopAtFly: Stop at flys or continue over anchor. Although (0,TRUE) is kind of a standard, the parameters are not defaulted here in order to force more conscious use especially of bStopAtFly. */ - FrmTypeFlags GetFrmType( const Point *pPt, bool bStopAtFly ) const; - FrmTypeFlags GetSelFrmType() const; //Selektion (Drawing) + FrameTypeFlags GetFrameType( const Point *pPt, bool bStopAtFly ) const; + FrameTypeFlags GetSelFrameType() const; //Selektion (Drawing) /** check whether selected frame contains a control; - * companion method to GetSelFrmType, used for preventing + * companion method to GetSelFrameType, used for preventing * drag&drop of controls into header */ bool IsSelContainsControl() const; @@ -334,7 +334,7 @@ public: bool _bMirror = false, Point* _opRef = nullptr, Size* _opPercent = nullptr, - const SwFormatFrmSize* pFormatFrmSize = nullptr ) const; + const SwFormatFrameSize* pFormatFrameSize = nullptr ) const; /// Set size of draw objects. void SetObjRect( const SwRect& rRect ); @@ -376,12 +376,12 @@ public: OUString GetObjDescription() const; void SetObjDescription( const OUString& rDescription ); - bool IsFrmSelected() const; - bool GetFlyFrmAttr( SfxItemSet &rSet ) const; - bool SetFlyFrmAttr( SfxItemSet &rSet ); + bool IsFrameSelected() const; + bool GetFlyFrameAttr( SfxItemSet &rSet ) const; + bool SetFlyFrameAttr( SfxItemSet &rSet ); static SfxItemSet makeItemSetFromFormatAnchor(SfxItemPool& rPool, const SwFormatAnchor &rAnchor); - bool ResetFlyFrmAttr( sal_uInt16 nWhich, const SfxItemSet* pSet = nullptr ); - const SwFrameFormat *NewFlyFrm( const SfxItemSet &rSet, bool bAnchValid = false, + bool ResetFlyFrameAttr( sal_uInt16 nWhich, const SfxItemSet* pSet = nullptr ); + const SwFrameFormat *NewFlyFrame( const SfxItemSet &rSet, bool bAnchValid = false, SwFrameFormat *pParent = nullptr ); void SetFlyPos( const Point &rAbsPos); Point FindAnchorPos( const Point &rAbsPos, bool bMoveIt = false ); @@ -389,19 +389,19 @@ public: /** Determines whether a frame or its environment is vertically formatted and right-to-left. also determines, if frame or its environmane is in mongolianlayout (vertical left-to-right) - add output parameter <bVertL2R> */ - bool IsFrmVertical(const bool bEnvironment, bool& bRightToLeft, bool& bVertL2R) const; + bool IsFrameVertical(const bool bEnvironment, bool& bRightToLeft, bool& bVertL2R) const; SwFrameFormat* GetSelectedFrameFormat() const; ///< If frame then frame style, else 0. void SetFrameFormat( SwFrameFormat *pFormat, bool bKeepOrient = false, Point* pDocPos = nullptr ); ///< If frame then set frame style. // Get selected fly - SwFlyFrm* GetSelectedFlyFrm() const; + SwFlyFrame* GetSelectedFlyFrame() const; // Get current fly in which the cursor is positioned - SwFlyFrm* GetCurrFlyFrm(const bool bCalcFrm = true) const; + SwFlyFrame* GetCurrFlyFrame(const bool bCalcFrame = true) const; // Get selected fly, but if none Get current fly in which the cursor is positioned - SwFlyFrm* GetSelectedOrCurrFlyFrm(const bool bCalcFrm = true) const; + SwFlyFrame* GetSelectedOrCurrFlyFrame(const bool bCalcFrame = true) const; /// Find/delete fly containing the cursor. SwFrameFormat* WizardGetFly(); @@ -416,8 +416,8 @@ public: size_t GetFlyCount( FlyCntType eType = FLYCNTTYPE_ALL, bool bIgnoreTextBoxes = false ) const; const SwFrameFormat* GetFlyNum(size_t nIdx, FlyCntType eType = FLYCNTTYPE_ALL, bool bIgnoreTextBoxes = false) const; - /// If a fly is selected, it draws cursor into the first ContentFrm. - const SwFrameFormat* SelFlyGrabCrsr(); + /// If a fly is selected, it draws cursor into the first ContentFrame. + const SwFrameFormat* SelFlyGrabCursor(); /// Get FlyFrameFormat; fuer UI Macro Anbindung an Flys const SwFrameFormat* GetFlyFrameFormat() const; @@ -438,14 +438,14 @@ public: Else the size is provided via GetCurFlyRect(). */ virtual void CalcAndSetScale( svt::EmbeddedObjectRef& xObj, const SwRect *pFlyPrtRect = nullptr, - const SwRect *pFlyFrmRect = nullptr, - const bool bNoTextFrmPrtAreaChanged = false ) = 0; + const SwRect *pFlyFrameRect = nullptr, + const bool bNoTextFramePrtAreaChanged = false ) = 0; /** Connect objects with ActivateWhenVisible at Paint. Called by notxtfrm::Paint, implemented in wrtsh. */ virtual void ConnectObj( svt::EmbeddedObjectRef&, const SwRect &rPrt, - const SwRect &rFrm ) = 0; + const SwRect &rFrame ) = 0; /// Check resize of OLE-Object. bool IsCheckForOLEInCaption() const { return m_bCheckForOLEInCaption; } @@ -579,7 +579,7 @@ public: // --> #i972# /** for starmath formulas anchored 'as char' it aligns it baseline to baseline changing the previous vertical orientation */ - void AlignFormulaToBaseline( const css::uno::Reference < css::embed::XEmbeddedObject >& xObj, SwFlyFrm * pFly = nullptr ); + void AlignFormulaToBaseline( const css::uno::Reference < css::embed::XEmbeddedObject >& xObj, SwFlyFrame * pFly = nullptr ); /// aligns all formulas with anchor 'as char' to baseline void AlignAllFormulasToBaseline(); @@ -590,13 +590,13 @@ public: /// Convert document position into position relative to the current page. Point GetRelativePagePosition(const Point& rDocPos); - /// Hide or show layout-selection and pass call to CrsrSh. + /// Hide or show layout-selection and pass call to CursorSh. void ShLooseFcs(); void ShGetFcs( bool bUpdate = true ); /// PageDescriptor-interface void ChgCurPageDesc( const SwPageDesc& ); - size_t GetCurPageDesc( const bool bCalcFrm = true ) const; + size_t GetCurPageDesc( const bool bCalcFrame = true ) const; size_t GetMousePageDesc( const Point &rPt ) const; size_t GetPageDescCnt() const; SwPageDesc* FindPageDescByName( const OUString& rName, @@ -616,7 +616,7 @@ public: /// Page number of the page containing Point, O if no page. sal_uInt16 GetPageNumber( const Point &rPoint ) const; - bool GetPageNumber( long nYPos, bool bAtCrsrPos, sal_uInt16& rPhyNum, sal_uInt16& rVirtNum, OUString &rDisplay ) const; + bool GetPageNumber( long nYPos, bool bAtCursorPos, sal_uInt16& rPhyNum, sal_uInt16& rVirtNum, OUString &rDisplay ) const; SwFlyFrameFormat* InsertObject( const svt::EmbeddedObjectRef&, const SfxItemSet* pFlyAttrSet = nullptr, @@ -647,10 +647,10 @@ public: bool SplitTab( bool bVert = true, sal_uInt16 nCnt = 1, bool bSameHeight = false ); bool Sort(const SwSortOptions&); //Sortieren. - void SetRowHeight( const SwFormatFrmSize &rSz ); + void SetRowHeight( const SwFormatFrameSize &rSz ); /// Pointer must be destroyed by caller != 0. - void GetRowHeight( SwFormatFrmSize *&rpSz ) const; + void GetRowHeight( SwFormatFrameSize *&rpSz ) const; void SetRowSplit( const SwFormatRowSplit &rSz ); void GetRowSplit( SwFormatRowSplit *&rpSz ) const; @@ -702,7 +702,7 @@ public: sal_uInt16 GetRowsToRepeat() const; void SetRowsToRepeat( sal_uInt16 nNumOfRows ); - sal_uInt16 GetVirtPageNum( const bool bCalcFrm = true ); + sal_uInt16 GetVirtPageNum( const bool bCalcFrame = true ); /** @return the number of table rows currently selected if the selection start at the top of the table. */ diff --git a/sw/inc/flypos.hxx b/sw/inc/flypos.hxx index f4d1a97b1d3f..f4bcdfb58ad3 100644 --- a/sw/inc/flypos.hxx +++ b/sw/inc/flypos.hxx @@ -27,28 +27,28 @@ class SwFrameFormat; class SwNodeIndex; /// For querying current flys in document. -class SW_DLLPUBLIC SwPosFlyFrm +class SW_DLLPUBLIC SwPosFlyFrame { const SwFrameFormat* m_pFrameFormat; ///< FlyFrameFormat SwNodeIndex* m_pNodeIndex; ///< Index for node is sufficient. sal_uInt32 m_nOrdNum; public: - SwPosFlyFrm( const SwNodeIndex& , const SwFrameFormat*, sal_uInt16 nArrPos ); - virtual ~SwPosFlyFrm(); ///< Virtual for Writer (DLL !!) + SwPosFlyFrame( const SwNodeIndex& , const SwFrameFormat*, sal_uInt16 nArrPos ); + virtual ~SwPosFlyFrame(); ///< Virtual for Writer (DLL !!) const SwFrameFormat& GetFormat() const { return *m_pFrameFormat; } const SwNodeIndex& GetNdIndex() const { return *m_pNodeIndex; } sal_uInt32 GetOrdNum() const { return m_nOrdNum; } }; -// define needed classes to safely handle an array of allocated SwPosFlyFrm(s). -// SwPosFlyFrms can be handled by value (as return value), only refcounts to -// contained SwPosFlyFrm* will be copied. When releasing the last SwPosFlyFrmPtr +// define needed classes to safely handle an array of allocated SwPosFlyFrame(s). +// SwPosFlyFrames can be handled by value (as return value), only refcounts to +// contained SwPosFlyFrame* will be copied. When releasing the last SwPosFlyFramePtr // instance the allocated instance will be freed. The array is sorted by // GetNdIndex by using a std::set container. -typedef std::shared_ptr< SwPosFlyFrm > SwPosFlyFrmPtr; -struct SwPosFlyFrmCmp { bool operator()(const SwPosFlyFrmPtr& rA, const SwPosFlyFrmPtr& rB) const; }; -typedef std::set< SwPosFlyFrmPtr, SwPosFlyFrmCmp > SwPosFlyFrms; +typedef std::shared_ptr< SwPosFlyFrame > SwPosFlyFramePtr; +struct SwPosFlyFrameCmp { bool operator()(const SwPosFlyFramePtr& rA, const SwPosFlyFramePtr& rB) const; }; +typedef std::set< SwPosFlyFramePtr, SwPosFlyFrameCmp > SwPosFlyFrames; #endif // INCLUDED_SW_INC_FLYPOS_HXX diff --git a/sw/inc/fmtcnct.hxx b/sw/inc/fmtcnct.hxx index 2fb7ee23177b..18b02ce24081 100644 --- a/sw/inc/fmtcnct.hxx +++ b/sw/inc/fmtcnct.hxx @@ -27,7 +27,7 @@ class IntlWrapper; -/// Connection (text flow) between two FlyFrms. +/// Connection (text flow) between two FlyFrames. class SW_DLLPUBLIC SwFormatChain: public SfxPoolItem { SwClient aPrev, ///< Previous SwFlyFrameFormat (if existent). diff --git a/sw/inc/fmtflcnt.hxx b/sw/inc/fmtflcnt.hxx index 06ad1f32f2ae..64480288334c 100644 --- a/sw/inc/fmtflcnt.hxx +++ b/sw/inc/fmtflcnt.hxx @@ -43,7 +43,7 @@ public: virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override; inline SwFrameFormat *GetFrameFormat() const { return pFormat; } - /// For Undo: delete the FlyFrmFormat "logically"; it is kept in Undo-object. + /// For Undo: delete the FlyFrameFormat "logically"; it is kept in Undo-object. inline void SetFlyFormat( SwFrameFormat* pNew = nullptr ) { pFormat = pNew; } const SwTextFlyCnt *GetTextFlyCnt() const { return pTextAttr; } diff --git a/sw/inc/fmtfsize.hxx b/sw/inc/fmtfsize.hxx index 4f77040ed410..e58cdda00d68 100644 --- a/sw/inc/fmtfsize.hxx +++ b/sw/inc/fmtfsize.hxx @@ -30,7 +30,7 @@ class IntlWrapper; //Frame size. -enum SwFrmSize +enum SwFrameSize { ATT_VAR_SIZE, ///< Frame is variable in Var-direction. ATT_FIX_SIZE, ///< Frame cannot be moved in Var-direction. @@ -38,11 +38,11 @@ enum SwFrmSize (can be exceeded but not be less). */ }; -class SW_DLLPUBLIC SwFormatFrmSize: public SfxPoolItem +class SW_DLLPUBLIC SwFormatFrameSize: public SfxPoolItem { Size m_aSize; - SwFrmSize m_eFrmHeightType; - SwFrmSize m_eFrmWidthType; + SwFrameSize m_eFrameHeightType; + SwFrameSize m_eFrameWidthType; sal_uInt8 m_nWidthPercent; sal_Int16 m_eWidthPercentRelation; sal_uInt8 m_nHeightPercent; @@ -60,9 +60,9 @@ class SW_DLLPUBLIC SwFormatFrmSize: public SfxPoolItem // minus borders in BrowseView if the environment is the page. public: - SwFormatFrmSize( SwFrmSize eSize = ATT_VAR_SIZE, + SwFormatFrameSize( SwFrameSize eSize = ATT_VAR_SIZE, SwTwips nWidth = 0, SwTwips nHeight = 0 ); - SwFormatFrmSize& operator=( const SwFormatFrmSize& rCpy ); + SwFormatFrameSize& operator=( const SwFormatFrameSize& rCpy ); /// "Pure virtual methods" of SfxPoolItem. virtual bool operator==( const SfxPoolItem& ) const override; @@ -75,11 +75,11 @@ public: virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override; virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override; - SwFrmSize GetHeightSizeType() const { return m_eFrmHeightType; } - void SetHeightSizeType( SwFrmSize eSize ) { m_eFrmHeightType = eSize; } + SwFrameSize GetHeightSizeType() const { return m_eFrameHeightType; } + void SetHeightSizeType( SwFrameSize eSize ) { m_eFrameHeightType = eSize; } - SwFrmSize GetWidthSizeType() const { return m_eFrmWidthType; } - void SetWidthSizeType( SwFrmSize eSize ) { m_eFrmWidthType = eSize; } + SwFrameSize GetWidthSizeType() const { return m_eFrameWidthType; } + void SetWidthSizeType( SwFrameSize eSize ) { m_eFrameWidthType = eSize; } const Size& GetSize() const { return m_aSize; } void SetSize( const Size &rNew ) { m_aSize = rNew; } @@ -104,11 +104,11 @@ public: void dumpAsXml(struct _xmlTextWriter* pWriter) const override; }; -inline const SwFormatFrmSize &SwAttrSet::GetFrmSize(bool bInP) const - { return static_cast<const SwFormatFrmSize&>(Get( RES_FRM_SIZE,bInP)); } +inline const SwFormatFrameSize &SwAttrSet::GetFrameSize(bool bInP) const + { return static_cast<const SwFormatFrameSize&>(Get( RES_FRM_SIZE,bInP)); } -inline const SwFormatFrmSize &SwFormat::GetFrmSize(bool bInP) const - { return m_aSet.GetFrmSize(bInP); } +inline const SwFormatFrameSize &SwFormat::GetFrameSize(bool bInP) const + { return m_aSet.GetFrameSize(bInP); } #endif diff --git a/sw/inc/format.hxx b/sw/inc/format.hxx index 63d41185a8cf..d3350d9b6422 100644 --- a/sw/inc/format.hxx +++ b/sw/inc/format.hxx @@ -63,9 +63,9 @@ class SW_DLLPUBLIC SwFormat : public SwModify protected: SwFormat( SwAttrPool& rPool, const sal_Char* pFormatNm, - const sal_uInt16* pWhichRanges, SwFormat *pDrvdFrm, sal_uInt16 nFormatWhich ); + const sal_uInt16* pWhichRanges, SwFormat *pDrvdFrame, sal_uInt16 nFormatWhich ); SwFormat( SwAttrPool& rPool, const OUString &rFormatNm, const sal_uInt16* pWhichRanges, - SwFormat *pDrvdFrm, sal_uInt16 nFormatWhich ); + SwFormat *pDrvdFrame, sal_uInt16 nFormatWhich ); SwFormat( const SwFormat& rFormat ); virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNewValue ) override; @@ -190,7 +190,7 @@ public: /// Frame-attributes - implemented in frmatr.hxx. inline const SwFormatFillOrder &GetFillOrder( bool = true ) const; - inline const SwFormatFrmSize &GetFrmSize( bool = true ) const; + inline const SwFormatFrameSize &GetFrameSize( bool = true ) const; inline const SwFormatHeader &GetHeader( bool = true ) const; inline const SwFormatFooter &GetFooter( bool = true ) const; inline const SwFormatSurround &GetSurround( bool = true ) const; @@ -223,7 +223,7 @@ public: inline const SwFormatFootnoteAtTextEnd &GetFootnoteAtTextEnd( bool = true ) const; inline const SwFormatEndAtTextEnd &GetEndAtTextEnd( bool = true ) const; inline const SwFormatNoBalancedColumns &GetBalancedColumns( bool = true ) const; - inline const SvxFrameDirectionItem &GetFrmDir( bool = true ) const; + inline const SvxFrameDirectionItem &GetFrameDir( bool = true ) const; inline const SwTextGridItem &GetTextGrid( bool = true ) const; inline const SwHeaderAndFooterEatSpacingItem &GetHeaderAndFooterEatSpacing( bool = true ) const; // #i18732# diff --git a/sw/inc/frmatr.hxx b/sw/inc/frmatr.hxx index 4685e24ddbd1..d24eb57b8927 100644 --- a/sw/inc/frmatr.hxx +++ b/sw/inc/frmatr.hxx @@ -63,7 +63,7 @@ inline const SvxFormatBreakItem &SwAttrSet::GetBreak(bool bInP) const { return static_cast<const SvxFormatBreakItem&>(Get( RES_BREAK,bInP)); } inline const SvxMacroItem &SwAttrSet::GetMacro(bool bInP) const { return static_cast<const SvxMacroItem&>(Get( RES_FRMMACRO,bInP)); } -inline const SvxFrameDirectionItem &SwAttrSet::GetFrmDir(bool bInP) const +inline const SvxFrameDirectionItem &SwAttrSet::GetFrameDir(bool bInP) const { return static_cast<const SvxFrameDirectionItem&>(Get( RES_FRAMEDIR,bInP)); } inline const SdrTextVertAdjustItem &SwAttrSet::GetTextVertAdjust(bool bInP) const { return static_cast<const SdrTextVertAdjustItem&>(Get( RES_TEXT_VERT_ADJUST,bInP)); } @@ -91,8 +91,8 @@ inline const SvxFormatBreakItem &SwFormat::GetBreak(bool bInP) const { return m_aSet.GetBreak(bInP); } inline const SvxMacroItem &SwFormat::GetMacro(bool bInP) const { return m_aSet.GetMacro(bInP); } -inline const SvxFrameDirectionItem &SwFormat::GetFrmDir(bool bInP) const - { return m_aSet.GetFrmDir(bInP); } +inline const SvxFrameDirectionItem &SwFormat::GetFrameDir(bool bInP) const + { return m_aSet.GetFrameDir(bInP); } inline const SdrTextVertAdjustItem &SwFormat::GetTextVertAdjust(bool bInP) const { return m_aSet.GetTextVertAdjust(bInP); } diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx index 717f3702995a..52b0b1324850 100644 --- a/sw/inc/frmfmt.hxx +++ b/sw/inc/frmfmt.hxx @@ -25,7 +25,7 @@ #include <format.hxx> #include "swdllapi.h" -class SwFlyFrm; +class SwFlyFrame; class SwAnchoredObject; class Graphic; class ImageMap; @@ -51,14 +51,14 @@ protected: SwFrameFormat( SwAttrPool& rPool, const sal_Char* pFormatNm, - SwFrameFormat *pDrvdFrm, + SwFrameFormat *pDrvdFrame, sal_uInt16 nFormatWhich = RES_FRMFMT, const sal_uInt16* pWhichRange = nullptr); SwFrameFormat( SwAttrPool& rPool, const OUString &rFormatNm, - SwFrameFormat *pDrvdFrm, + SwFrameFormat *pDrvdFrame, sal_uInt16 nFormatWhich = RES_FRMFMT, const sal_uInt16* pWhichRange = nullptr); @@ -67,11 +67,11 @@ protected: public: virtual ~SwFrameFormat(); - /// Destroys all Frms in aDepend (Frms are identified via dynamic_cast). - virtual void DelFrms(); + /// Destroys all Frames in aDepend (Frames are identified via dynamic_cast). + virtual void DelFrames(); /// Creates the views. - virtual void MakeFrms(); + virtual void MakeFrames(); virtual Graphic MakeGraphic( ImageMap* pMap = nullptr ); @@ -80,14 +80,14 @@ public: rPoint - test on DocPosition. pFly - optional FlyFrame, in case it is already known. */ IMapObject* GetIMapObject( const Point& rPoint, - const SwFlyFrm *pFly = nullptr ) const; + const SwFlyFrame *pFly = nullptr ) const; /** @return the real size of the frame - or an empty rectangle if no layout exists. If pPoint is given, look for the frame closest to it. */ SwRect FindLayoutRect( const bool bPrtArea = false, const Point* pPoint = nullptr, - const bool bCalcFrm = false ) const; + const bool bCalcFrame = false ) const; /** Searches SdrObject. SdrObjUserCall is client of the format. The UserCall knows its SdrObject. */ @@ -97,7 +97,7 @@ public: /** @return the SdrObject, that is connected to the ContactObject. Only DrawFrameFormats are connected to the "real SdrObject". FlyFrameFormats - are connected to a Master and all FlyFrms has the "real SdrObject". + are connected to a Master and all FlyFrames has the "real SdrObject". "Real SdrObject" has position and a Z-order. */ SdrObject *FindSdrObject(); const SdrObject *FindSdrObject() const @@ -152,32 +152,32 @@ class SW_DLLPUBLIC SwFlyFrameFormat: public SwFrameFormat it stores the previous position of Prt rectangle from RequestObjectResize so it can be used to move frames of non-resizable objects to align them correctly when they get borders (this is done in SwWrtShell::CalcAndGetScale) */ - Point m_aLastFlyFrmPrtRectPos; + Point m_aLastFlyFramePrtRectPos; SwFlyFrameFormat( const SwFlyFrameFormat &rCpy ) = delete; SwFlyFrameFormat &operator=( const SwFlyFrameFormat &rCpy ) = delete; protected: SwFlyFrameFormat( SwAttrPool& rPool, const sal_Char* pFormatNm, - SwFrameFormat *pDrvdFrm ) - : SwFrameFormat( rPool, pFormatNm, pDrvdFrm, RES_FLYFRMFMT ) + SwFrameFormat *pDrvdFrame ) + : SwFrameFormat( rPool, pFormatNm, pDrvdFrame, RES_FLYFRMFMT ) {} SwFlyFrameFormat( SwAttrPool& rPool, const OUString &rFormatNm, - SwFrameFormat *pDrvdFrm ) - : SwFrameFormat( rPool, rFormatNm, pDrvdFrm, RES_FLYFRMFMT ) + SwFrameFormat *pDrvdFrame ) + : SwFrameFormat( rPool, rFormatNm, pDrvdFrame, RES_FLYFRMFMT ) {} public: virtual ~SwFlyFrameFormat(); /// Creates the views. - virtual void MakeFrms() override; + virtual void MakeFrames() override; - SwFlyFrm* GetFrm( const Point* pDocPos = nullptr, - const bool bCalcFrm = false ) const; + SwFlyFrame* GetFrame( const Point* pDocPos = nullptr, + const bool bCalcFrame = false ) const; SwAnchoredObject* GetAnchoredObj( const Point* pDocPos = nullptr, - const bool bCalcFrm = false ) const; + const bool bCalcFrame = false ) const; virtual Graphic MakeGraphic( ImageMap* pMap = nullptr ) override; @@ -214,8 +214,8 @@ public: */ bool IsBackgroundBrushInherited() const; - const Point & GetLastFlyFrmPrtRectPos() const { return m_aLastFlyFrmPrtRectPos; } - void SetLastFlyFrmPrtRectPos( const Point &rPoint ) { m_aLastFlyFrmPrtRectPos = rPoint; } + const Point & GetLastFlyFramePrtRectPos() const { return m_aLastFlyFramePrtRectPos; } + void SetLastFlyFramePrtRectPos( const Point &rPoint ) { m_aLastFlyFramePrtRectPos = rPoint; } DECL_FIXEDMEMPOOL_NEWDEL(SwFlyFrameFormat) }; @@ -240,8 +240,8 @@ class SW_DLLPUBLIC SwDrawFrameFormat: public SwFrameFormat protected: SwDrawFrameFormat( SwAttrPool& rPool, const sal_Char* pFormatNm, - SwFrameFormat *pDrvdFrm ) - : SwFrameFormat( rPool, pFormatNm, pDrvdFrm, RES_DRAWFRMFMT ), + SwFrameFormat *pDrvdFrame ) + : SwFrameFormat( rPool, pFormatNm, pDrvdFrame, RES_DRAWFRMFMT ), m_pSdrObjectCached(nullptr), meLayoutDir( SwFrameFormat::HORI_L2R ), @@ -252,8 +252,8 @@ protected: {} SwDrawFrameFormat( SwAttrPool& rPool, const OUString &rFormatNm, - SwFrameFormat *pDrvdFrm ) - : SwFrameFormat( rPool, rFormatNm, pDrvdFrm, RES_DRAWFRMFMT ), + SwFrameFormat *pDrvdFrame ) + : SwFrameFormat( rPool, rFormatNm, pDrvdFrame, RES_DRAWFRMFMT ), m_pSdrObjectCached(nullptr), meLayoutDir( SwFrameFormat::HORI_L2R ), @@ -267,11 +267,11 @@ public: /** DrawObjects are removed from the arrays at the layout. The DrawObjects are marked as deleted. */ - virtual void DelFrms() override; + virtual void DelFrames() override; /** Register DrawObjects in the arrays at layout. Reset delete marks. */ - virtual void MakeFrms() override; + virtual void MakeFrames() override; virtual Graphic MakeGraphic( ImageMap* pMap = nullptr ) override; diff --git a/sw/inc/hhcwrp.hxx b/sw/inc/hhcwrp.hxx index 587cc747f139..e7ab19790e23 100644 --- a/sw/inc/hhcwrp.hxx +++ b/sw/inc/hhcwrp.hxx @@ -66,7 +66,7 @@ class SW_DLLPUBLIC SwHHCWrapper : public editeng::HangulHanjaConversion void ChangeText( const OUString &rNewText, const OUString& rOrigText, const css::uno::Sequence< sal_Int32 > *pOffsets, - SwPaM *pCrsr ); + SwPaM *pCursor ); void ChangeText_impl( const OUString &rNewText, bool bKeepAttributes ); inline bool IsDrawObj() { return m_bIsDrawObj; } diff --git a/sw/inc/hints.hxx b/sw/inc/hints.hxx index 751dd5daae53..f5da6ee6c5c5 100644 --- a/sw/inc/hints.hxx +++ b/sw/inc/hints.hxx @@ -29,8 +29,8 @@ class SwTable; class SwNode; class SwNodes; class SwContentNode; -class SwPageFrm; -class SwFrm; +class SwPageFrame; +class SwFrame; class SwTextNode; class SwHistory; @@ -225,19 +225,19 @@ public: class SwVirtPageNumInfo: public SwMsgPoolItem { - const SwPageFrm *m_pPage; - const SwPageFrm *m_pOrigPage; - const SwFrm *m_pFrm; + const SwPageFrame *m_pPage; + const SwPageFrame *m_pOrigPage; + const SwFrame *m_pFrame; /** Multiple attributes can be attached to a single paragraph / table The frame, in the end, has to decide which attribute takes effect and which physical page it involves */ public: - SwVirtPageNumInfo( const SwPageFrm *pPg ); + SwVirtPageNumInfo( const SwPageFrame *pPg ); - const SwPageFrm *GetPage() { return m_pPage; } - const SwPageFrm *GetOrigPage() { return m_pOrigPage;} - const SwFrm *GetFrm() { return m_pFrm; } - void SetInfo( const SwPageFrm *pPg, - const SwFrm *pF ) { m_pFrm = pF, m_pPage = pPg; } + const SwPageFrame *GetPage() { return m_pPage; } + const SwPageFrame *GetOrigPage() { return m_pOrigPage;} + const SwFrame *GetFrame() { return m_pFrame; } + void SetInfo( const SwPageFrame *pPg, + const SwFrame *pF ) { m_pFrame = pF, m_pPage = pPg; } }; class SwFindNearestNode : public SwMsgPoolItem diff --git a/sw/inc/htmltbl.hxx b/sw/inc/htmltbl.hxx index 2f6e98e42d79..5711d332ba96 100644 --- a/sw/inc/htmltbl.hxx +++ b/sw/inc/htmltbl.hxx @@ -327,7 +327,7 @@ public: static sal_uInt16 GetBrowseWidth( const SwDoc& rDoc ); /// Calculates available width by table-frame. - sal_uInt16 GetBrowseWidthByTabFrm( const SwTabFrm& rTabFrm ) const; + sal_uInt16 GetBrowseWidthByTabFrame( const SwTabFrame& rTabFrame ) const; /** Calculates available width by the table-frame or static GetBrowseWidth if no layout exists. */ diff --git a/sw/inc/init.hxx b/sw/inc/init.hxx index 78932dcb5130..96fb0c15fc07 100644 --- a/sw/inc/init.hxx +++ b/sw/inc/init.hxx @@ -49,8 +49,8 @@ private: } // layout/newfrm.cxx -void _FrmInit(); -void _FrmFinit(); +void _FrameInit(); +void _FrameFinit(); void SetShell( SwViewShell *pSh ); // text/txtfrm.cxx diff --git a/sw/inc/ndarr.hxx b/sw/inc/ndarr.hxx index 8850d62d1c3a..3b55ec5974f5 100644 --- a/sw/inc/ndarr.hxx +++ b/sw/inc/ndarr.hxx @@ -121,12 +121,12 @@ class SW_DLLPUBLIC SwNodes void DelNodes( const SwNodeIndex& rStart, sal_uLong nCnt = 1 ); void ChgNode( SwNodeIndex& rDelPos, sal_uLong nSize, - SwNodeIndex& rInsPos, bool bNewFrms ); + SwNodeIndex& rInsPos, bool bNewFrames ); void UpdateOutlineIdx( const SwNode& ); ///< Update all OutlineNodes starting from Node. void _CopyNodes( const SwNodeRange&, const SwNodeIndex&, - bool bNewFrms = true, bool bTableInsDummyNode = false ) const; + bool bNewFrames = true, bool bTableInsDummyNode = false ) const; void _DelDummyNodes( const SwNodeRange& rRg ); protected: @@ -171,12 +171,12 @@ public: void Delete(const SwNodeIndex &rPos, sal_uLong nNodes = 1); bool _MoveNodes( const SwNodeRange&, SwNodes& rNodes, const SwNodeIndex&, - bool bNewFrms = true ); + bool bNewFrames = true ); void MoveRange( SwPaM&, SwPosition&, SwNodes& rNodes ); void _Copy( const SwNodeRange& rRg, const SwNodeIndex& rInsPos, - bool bNewFrms = true ) const - { _CopyNodes( rRg, rInsPos, bNewFrms ); } + bool bNewFrames = true ) const + { _CopyNodes( rRg, rInsPos, bNewFrames ); } void SectionUp( SwNodeRange *); void SectionDown( SwNodeRange *pRange, SwStartNodeType = SwNormalStartNode ); @@ -305,7 +305,7 @@ public: SwTOXBase const*const pTOXBase, SwNodeIndex const*const pEnde, bool const bInsAtStart = true, - bool const bCreateFrms = true); + bool const bCreateFrames = true); /// Which Doc contains the nodes-array? SwDoc* GetDoc() { return m_pMyDoc; } @@ -313,9 +313,9 @@ public: /** Search previous / next content node or table node with frames. If no end is given begin with the FrameIndex, else start search - with that before rFrmIdx and pEnd at the back. - If no valid node is found, return 0. rFrmIdx points to the node with frames. **/ - SwNode* FindPrvNxtFrmNode( SwNodeIndex& rFrmIdx, + with that before rFrameIdx and pEnd at the back. + If no valid node is found, return 0. rFrameIdx points to the node with frames. **/ + SwNode* FindPrvNxtFrameNode( SwNodeIndex& rFrameIdx, const SwNode* pEnd = nullptr ) const; SwNode * DocumentSectionStartNode(SwNode * pNode) const; diff --git a/sw/inc/ndgrf.hxx b/sw/inc/ndgrf.hxx index 885311d9f6d1..7b960c9c8a32 100644 --- a/sw/inc/ndgrf.hxx +++ b/sw/inc/ndgrf.hxx @@ -189,7 +189,7 @@ public: void ScaleImageMap(); /// Returns the with our graphic attributes filled Graphic-Attr-Structure. - GraphicAttr& GetGraphicAttr( GraphicAttr&, const SwFrm* pFrm ) const; + GraphicAttr& GetGraphicAttr( GraphicAttr&, const SwFrame* pFrame ) const; std::weak_ptr< SwAsyncRetrieveInputStreamThreadConsumer > GetThreadConsumer() { return mpThreadConsumer;} bool IsLinkedInputStreamReady() const { return mbLinkedInputStreamReady;} diff --git a/sw/inc/ndnotxt.hxx b/sw/inc/ndnotxt.hxx index 3c6b23439704..4a4e3c492672 100644 --- a/sw/inc/ndnotxt.hxx +++ b/sw/inc/ndnotxt.hxx @@ -28,7 +28,7 @@ namespace tools { class PolyPolygon; } class SW_DLLPUBLIC SwNoTextNode : public SwContentNode { friend class SwNodes; - friend class SwNoTextFrm; + friend class SwNoTextFrame; tools::PolyPolygon *pContour; bool bAutomaticContour : 1; // automatic contour polygon, not manipulated @@ -51,7 +51,7 @@ protected: public: virtual ~SwNoTextNode(); - virtual SwContentFrm *MakeFrm( SwFrm* ) override; + virtual SwContentFrame *MakeFrame( SwFrame* ) override; inline SwGrfFormatColl *GetGrfColl() const { return const_cast<SwGrfFormatColl*>(static_cast<const SwGrfFormatColl*>(GetRegisteredIn())); } diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx index bf0a17494684..4a58a1e3560e 100644 --- a/sw/inc/ndtxt.hxx +++ b/sw/inc/ndtxt.hxx @@ -45,7 +45,7 @@ namespace utl { } class SwTextFormatColl; -class SwContentFrm; +class SwContentFrame; class SwTextField; class SwTextInputField; class SfxItemSet; @@ -76,7 +76,7 @@ class SW_DLLPUBLIC SwTextNode: public SwContentNode, public ::sfx2::Metadatable /// For creating the first TextNode. friend class SwDoc; ///< CTOR and AppendTextNode() friend class SwNodes; - friend class SwTextFrm; + friend class SwTextFrame; friend class SwScriptInfo; /** May be 0. It is only then not 0 if it contains hard attributes. @@ -180,7 +180,7 @@ class SW_DLLPUBLIC SwTextNode: public SwContentNode, public ::sfx2::Metadatable const SwTextInputField* GetOverlappingInputField( const SwTextAttr& rTextAttr ) const; - void DelFrms_TextNodePart(); + void DelFrames_TextNodePart(); public: enum class WrongState { TODO, PENDING, DONE }; @@ -352,7 +352,7 @@ public: const css::uno::Sequence<sal_Int32>& rOffsets ); /// Virtual methods from ContentNode. - virtual SwContentFrm *MakeFrm( SwFrm* ) override; + virtual SwContentFrame *MakeFrame( SwFrame* ) override; virtual SwContentNode *SplitContentNode( const SwPosition & ) override; virtual SwContentNode *JoinNext() override; virtual SwContentNode *JoinPrev() override; @@ -674,7 +674,7 @@ public: bool IsSymbol( const sal_Int32 nBegin ) const; // In itratr.cxx. virtual SwContentNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const override; - /// Interactive hyphenation: we find TextFrm and call its CalcHyph. + /// Interactive hyphenation: we find TextFrame and call its CalcHyph. bool Hyphenate( SwInterHyphInfo &rHyphInf ); void DelSoftHyph( const sal_Int32 nStart, const sal_Int32 nEnd ); diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx index bcadbfee7408..d1ef7366d0f4 100644 --- a/sw/inc/node.hxx +++ b/sw/inc/node.hxx @@ -32,11 +32,11 @@ #include <memory> #include <vector> -class SwContentFrm; +class SwContentFrame; class SwContentNode; class SwDoc; class SwEndNode; -class SwFrm; +class SwFrame; class SwFrameFormat; class SwGrfNode; class SwNoTextNode; @@ -48,8 +48,8 @@ class SwSectionFormat; class SwTOXBase; class SwSectionNode; class SwStartNode; -class SwTabFrm; -class SwRootFrm; +class SwTabFrame; +class SwRootFrame; class SwTable; class SwTableNode; class SwTableBox; @@ -380,9 +380,9 @@ protected: public: - /** MakeFrm will be called for a certain layout - pSib is another SwFrm of the same layout (e.g. the SwRootFrm itself, a sibling, the parent) */ - virtual SwContentFrm *MakeFrm( SwFrm* pSib ) = 0; + /** MakeFrame will be called for a certain layout + pSib is another SwFrame of the same layout (e.g. the SwRootFrame itself, a sibling, the parent) */ + virtual SwContentFrame *MakeFrame( SwFrame* pSib ) = 0; virtual SwContentNode *SplitContentNode(const SwPosition & ) = 0; @@ -399,30 +399,30 @@ public: bool GoNext(SwIndex *, sal_uInt16 nMode ) const; bool GoPrevious(SwIndex *, sal_uInt16 nMode ) const; - /// Replacement for good old GetFrm(..): - SwContentFrm *getLayoutFrm( const SwRootFrm*, + /// Replacement for good old GetFrame(..): + SwContentFrame *getLayoutFrame( const SwRootFrame*, const Point* pDocPos = nullptr, const SwPosition *pPos = nullptr, - const bool bCalcFrm = true ) const; + const bool bCalcFrame = true ) const; /** @return the real size of the frame or an empty rectangle if no layout exists. Needed for export filters. */ SwRect FindLayoutRect( const bool bPrtArea = false, const Point* pPoint = nullptr, - const bool bCalcFrm = false ) const; - SwRect FindPageFrmRect( const bool bPrtArea = false, + const bool bCalcFrame = false ) const; + SwRect FindPageFrameRect( const bool bPrtArea = false, const Point* pPoint = nullptr, - const bool bCalcFrm = false ) const; + const bool bCalcFrame = false ) const; /** Method creates all views of document for given node. The content frames that are created are put in the respective layout. */ - void MakeFrms( SwContentNode& rNode ); + void MakeFrames( SwContentNode& rNode ); /** Method deletes all views of document for the node. The content- frames are removed from the respective layout. Add an input param to identify if acc table should be disposed */ - void DelFrms( bool bIsAccTableDispose = true ); + void DelFrames( bool bIsAccTableDispose = true ); /** @return count of elements of node content. Default is 1. There are differences between text node and formula node. */ @@ -502,18 +502,18 @@ public: const SwTable& GetTable() const { return *m_pTable; } SwTable& GetTable() { return *m_pTable; } - SwTabFrm *MakeFrm( SwFrm* ); + SwTabFrame *MakeFrame( SwFrame* ); - /// Creates the frms for the table node (i.e. the TabFrms). - void MakeFrms( SwNodeIndex* pIdxBehind ); + /// Creates the frms for the table node (i.e. the TabFrames). + void MakeFrames( SwNodeIndex* pIdxBehind ); /** Method deletes all views of document for the node. The content frames are removed from the respective layout. */ - void DelFrms(); + void DelFrames(); /** Method creates all views of the document for the previous node. The content frames that are created are put into the respective layout. */ - void MakeFrms( const SwNodeIndex & rIdx ); + void MakeFrames( const SwNodeIndex & rIdx ); SwTableNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const; void SetNewTable( SwTable* , bool bNewFrames=true ); @@ -547,21 +547,21 @@ public: const SwSection& GetSection() const { return *m_pSection; } SwSection& GetSection() { return *m_pSection; } - SwFrm *MakeFrm( SwFrm* ); + SwFrame *MakeFrame( SwFrame* ); - /** Creates the frms for the SectionNode (i.e. the SectionFrms). + /** Creates the frms for the SectionNode (i.e. the SectionFrames). On default the frames are created until the end of the range. - When another NodeIndex pEnd is passed a MakeFrms is called up to it. + When another NodeIndex pEnd is passed a MakeFrames is called up to it. Used by TableToText. */ - void MakeFrms( SwNodeIndex* pIdxBehind, SwNodeIndex* pEnd = nullptr ); + void MakeFrames( SwNodeIndex* pIdxBehind, SwNodeIndex* pEnd = nullptr ); /** Method deletes all views of document for the node. The content frames are removed from the respective layout. */ - void DelFrms(); + void DelFrames(); /** Method creates all views of document for the previous node. The content frames created are put into the respective layout. */ - void MakeFrms( const SwNodeIndex & rIdx ); + void MakeFrames( const SwNodeIndex & rIdx ); SwSectionNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const; diff --git a/sw/inc/pagedesc.hxx b/sw/inc/pagedesc.hxx index 258f63464b81..db943eb00686 100644 --- a/sw/inc/pagedesc.hxx +++ b/sw/inc/pagedesc.hxx @@ -106,7 +106,7 @@ public: * Access to complete m_eUse including the information on header and footer * via ReadUseOn(), WriteUseOn() (for Filter and CopyCTor)! * - * The Frmformats for header/footer are adjusted by the UI according to + * The Frameformats for header/footer are adjusted by the UI according to * the attributes for header and footer at master (height, margin, back- * ground ...) * Header/footer for left hand pages are copied or mirrored (Chg at diff --git a/sw/inc/pagepreviewlayout.hxx b/sw/inc/pagepreviewlayout.hxx index c18a43738509..7c440bede8cc 100644 --- a/sw/inc/pagepreviewlayout.hxx +++ b/sw/inc/pagepreviewlayout.hxx @@ -30,8 +30,8 @@ #include <swtypes.hxx> class SwViewShell; -class SwRootFrm; -class SwPageFrm; +class SwRootFrame; +class SwPageFrame; class Fraction; struct PreviewPage; @@ -51,7 +51,7 @@ private: /// view shell the print preview is generated for. SwViewShell& mrParentViewShell; /// top layout frame of the layout for accessing the pages - const SwRootFrm& mrLayoutRootFrm; + const SwRootFrame& mrLayoutRootFrame; /** boolean indicating, if the layout information (number of columns and rows) are valid. */ @@ -183,7 +183,7 @@ private: @return boolean, indicating, if calculation was successful. */ - bool _CalcPreviewDataForPage( const SwPageFrm& _rPage, + bool _CalcPreviewDataForPage( const SwPageFrame& _rPage, const Point& _rPreviewOffset, PreviewPage* _opPreviewPage ); @@ -230,13 +230,13 @@ public: (2) Change of the zoom at the view options. (3) Preparations for paint of the page preview. - @param _rLayoutRootFrm + @param _rLayoutRootFrame input parameter - constant reference to the root frame of the layout. - Reference will be hold as member <mrLayoutRootFrm> in order to get + Reference will be hold as member <mrLayoutRootFrame> in order to get access to the page frames. */ SwPagePreviewLayout( SwViewShell& _rParentViewShell, - const SwRootFrm& _rLayoutRootFrm ); + const SwRootFrame& _rLayoutRootFrame ); /** destructor of <SwPagePreviewLayout> diff --git a/sw/inc/postithelper.hxx b/sw/inc/postithelper.hxx index 554e5ebc6a43..373429b4782b 100644 --- a/sw/inc/postithelper.hxx +++ b/sw/inc/postithelper.hxx @@ -28,7 +28,7 @@ class SfxBroadcaster; class SwTextField; -class SwRootFrm; +class SwRootFrame; class SwPostItMgr; class SwEditWin; namespace sw { namespace sidebarwindows { @@ -41,7 +41,7 @@ typedef sal_Int64 SwPostItBits; struct SwLayoutInfo { - const SwFrm* mpAnchorFrm; + const SwFrame* mpAnchorFrame; SwRect mPosition; // optional start of the annotation @@ -57,7 +57,7 @@ struct SwLayoutInfo sal_uInt16 mRedlineAuthor; SwLayoutInfo() - : mpAnchorFrm(nullptr) + : mpAnchorFrame(nullptr) , mPosition() , mnStartNodeIdx( 0 ) , mnStartContent( -1 ) @@ -81,9 +81,9 @@ namespace SwPostItHelper const SwPosition& rAnchorPos, const SwPosition* pAnnotationStartPos = nullptr ); - long getLayoutHeight( const SwRootFrm* pRoot ); - void setSidebarChanged( SwRootFrm* pRoot, bool bBrowseMode ); - unsigned long getPageInfo( SwRect& rPageFrm, const SwRootFrm* , const Point& ); + long getLayoutHeight( const SwRootFrame* pRoot ); + void setSidebarChanged( SwRootFrame* pRoot, bool bBrowseMode ); + unsigned long getPageInfo( SwRect& rPageFrame, const SwRootFrame* , const Point& ); } class SwSidebarItem diff --git a/sw/inc/section.hxx b/sw/inc/section.hxx index 793b4147f91d..b6008d9e3961 100644 --- a/sw/inc/section.hxx +++ b/sw/inc/section.hxx @@ -142,8 +142,8 @@ class SW_DLLPUBLIC SwSection { // In order to correctly maintain the flag when creating/deleting frames. friend class SwSectionNode; - // The "read CTOR" of SwSectionFrm have to change the Hiddenflag. - friend class SwSectionFrm; + // The "read CTOR" of SwSectionFrame have to change the Hiddenflag. + friend class SwSectionFrame; private: mutable SwSectionData m_Data; @@ -249,15 +249,15 @@ public: }; // #i117863# -class SwSectionFrmMoveAndDeleteHint : public SfxSimpleHint +class SwSectionFrameMoveAndDeleteHint : public SfxSimpleHint { public: - SwSectionFrmMoveAndDeleteHint( const bool bSaveContent ) + SwSectionFrameMoveAndDeleteHint( const bool bSaveContent ) : SfxSimpleHint( SFX_HINT_DYING ) , mbSaveContent( bSaveContent ) {} - virtual ~SwSectionFrmMoveAndDeleteHint() + virtual ~SwSectionFrameMoveAndDeleteHint() {} bool IsSaveContent() const @@ -286,17 +286,17 @@ class SW_DLLPUBLIC SwSectionFormat SAL_DLLPRIVATE void UpdateParent(); // Parent has been changed. protected: - SwSectionFormat( SwFrameFormat* pDrvdFrm, SwDoc *pDoc ); + SwSectionFormat( SwFrameFormat* pDrvdFrame, SwDoc *pDoc ); virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) override; public: virtual ~SwSectionFormat(); - // Deletes all Frms in aDepend (Frms are recognized via dynamic_cast). - virtual void DelFrms() override; + // Deletes all Frames in aDepend (Frames are recognized via dynamic_cast). + virtual void DelFrames() override; // Creates views. - virtual void MakeFrms() override; + virtual void MakeFrames() override; // Get information from Format. virtual bool GetInfo( SfxPoolItem& ) const override; diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx index bf6f001ef3d2..a234095086ee 100644 --- a/sw/inc/shellio.hxx +++ b/sw/inc/shellio.hxx @@ -48,7 +48,7 @@ class SvStream; class SvxFontItem; class SvxMacroTableDtor; class SwContentNode; -class SwCrsrShell; +class SwCursorShell; class SwDoc; class SwPaM; class SwTextBlocks; @@ -151,7 +151,7 @@ class SW_DLLPUBLIC SwReader: public SwDocFac css::uno::Reference < css::embed::XStorage > xStg; SfxMedium* pMedium; // Who wants to obtain a Medium (W4W). - SwPaM* pCrsr; + SwPaM* pCursor; OUString aFileName; OUString sBaseURL; bool mbSkipImages; @@ -227,8 +227,8 @@ public: virtual void SetFltName( const OUString& rFltNm ); - // Adapt item-set of a Frm-Format to the old format. - static void ResetFrameFormatAttrs( SfxItemSet &rFrmSet ); + // Adapt item-set of a Frame-Format to the old format. + static void ResetFrameFormatAttrs( SfxItemSet &rFrameSet ); // Adapt Frame-/Graphics-/OLE- styles to the old format // (without borders etc.). @@ -491,7 +491,7 @@ class SW_DLLPUBLIC SwWriter SfxMedium* pMedium; SwPaM* pOutPam; - SwCrsrShell *pShell; + SwCursorShell *pShell; SwDoc &rDoc; bool bWriteAll; @@ -499,13 +499,13 @@ class SW_DLLPUBLIC SwWriter public: sal_uLong Write( WriterRef& rxWriter, const OUString* = nullptr); - SwWriter( SvStream&, SwCrsrShell &, bool bWriteAll = false ); + SwWriter( SvStream&, SwCursorShell &, bool bWriteAll = false ); SwWriter( SvStream&, SwDoc & ); SwWriter( SvStream&, SwPaM &, bool bWriteAll = false ); SwWriter( const css::uno::Reference < css::embed::XStorage >&, SwDoc& ); - SwWriter( SfxMedium&, SwCrsrShell &, bool bWriteAll = false ); + SwWriter( SfxMedium&, SwCursorShell &, bool bWriteAll = false ); SwWriter( SfxMedium&, SwDoc & ); }; diff --git a/sw/inc/splargs.hxx b/sw/inc/splargs.hxx index 40343400ac73..7010e6a54971 100644 --- a/sw/inc/splargs.hxx +++ b/sw/inc/splargs.hxx @@ -30,7 +30,7 @@ #include <functional> #include <limits.h> -class SwTextFrm; +class SwTextFrame; class SwTextNode; class SwIndex; namespace vcl { class Font; } @@ -107,12 +107,12 @@ struct SwSpellArgs : SwArgsBase // Parameter-class for Hyphenate. // docedt.cxx: SwDoc::Hyphenate() // txtedt.cxx: SwTextNode::Hyphenate() -// txthyph.cxx: SwTextFrm::Hyphenate() +// txthyph.cxx: SwTextFrame::Hyphenate() class SwInterHyphInfo { css::uno::Reference< css::linguistic2::XHyphenatedWord > xHyphWord; - const Point aCrsrPos; + const Point aCursorPos; bool bNoLang : 1; bool bCheck : 1; public: @@ -121,9 +121,9 @@ public: sal_Int32 nWordStart; sal_Int32 nWordLen; - SwInterHyphInfo( const Point &rCrsrPos, sal_Int32 nStartPos = 0, + SwInterHyphInfo( const Point &rCursorPos, sal_Int32 nStartPos = 0, sal_Int32 nLength = SAL_MAX_INT32 ) - : aCrsrPos(rCrsrPos) + : aCursorPos(rCursorPos) , bNoLang(false) , bCheck(false) , nStart(nStartPos) @@ -135,9 +135,9 @@ public: { return nEnd; } - const Point *GetCrsrPos() const + const Point *GetCursorPos() const { - return aCrsrPos.X() || aCrsrPos.Y() ? &aCrsrPos : nullptr; + return aCursorPos.X() || aCursorPos.Y() ? &aCursorPos : nullptr; } bool IsCheck() const { return bCheck; } void SetCheck( const bool bNew ) { bCheck = bNew; } @@ -155,8 +155,8 @@ public: namespace sw { -SwTextFrm * -SwHyphIterCacheLastTxtFrm(SwTextNode *, std::function<SwTextFrm * ()>); +SwTextFrame * +SwHyphIterCacheLastTextFrame(SwTextNode *, std::function<SwTextFrame * ()>); } diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx index 8919596a8198..6fd3e806bce1 100644 --- a/sw/inc/swabstdlg.hxx +++ b/sw/inc/swabstdlg.hxx @@ -387,10 +387,10 @@ public: virtual AbstractSwModalRedlineAcceptDlg * CreateSwModalRedlineAcceptDlg(vcl::Window *pParent) = 0; virtual VclAbstractDialog* CreateTableMergeDialog( vcl::Window* pParent, bool& rWithPrev ) = 0; - virtual SfxAbstractTabDialog* CreateFrmTabDialog(const OUString &rDialogType, + virtual SfxAbstractTabDialog* CreateFrameTabDialog(const OUString &rDialogType, SfxViewFrame *pFrame, vcl::Window *pParent, const SfxItemSet& rCoreSet, - bool bNewFrm = true, + bool bNewFrame = true, bool bFormat = false, const OString& sDefPage = OString(), const OUString* pFormatStr = nullptr) = 0; diff --git a/sw/inc/swatrset.hxx b/sw/inc/swatrset.hxx index a0d08f2a20c2..5d6763ed98b0 100644 --- a/sw/inc/swatrset.hxx +++ b/sw/inc/swatrset.hxx @@ -58,7 +58,7 @@ class SvxCharHiddenItem; // Frame attributes class SwFormatFillOrder; -class SwFormatFrmSize; +class SwFormatFrameSize; class SvxPaperBinItem; class SvxLRSpaceItem; class SvxULSpaceItem; @@ -256,7 +256,7 @@ public: // Frame attributes. Implementation in frmatr.hxx. inline const SwFormatFillOrder &GetFillOrder( bool = true ) const; - inline const SwFormatFrmSize &GetFrmSize( bool = true ) const; + inline const SwFormatFrameSize &GetFrameSize( bool = true ) const; inline const SvxPaperBinItem &GetPaperBin( bool = true ) const; inline const SvxLRSpaceItem &GetLRSpace( bool = true ) const; inline const SvxULSpaceItem &GetULSpace( bool = true ) const; @@ -287,7 +287,7 @@ public: inline const SwFormatFootnoteAtTextEnd &GetFootnoteAtTextEnd( bool = true ) const; inline const SwFormatEndAtTextEnd &GetEndAtTextEnd( bool = true ) const; inline const SwFormatNoBalancedColumns &GetBalancedColumns( bool = true ) const; - inline const SvxFrameDirectionItem &GetFrmDir( bool = true ) const; + inline const SvxFrameDirectionItem &GetFrameDir( bool = true ) const; inline const SwHeaderAndFooterEatSpacingItem &GetHeaderAndFooterEatSpacing( bool = true ) const; inline const SwFormatFollowTextFlow &GetFollowTextFlow(bool = true) const; inline const SwFormatWrapInfluenceOnObjPos& GetWrapInfluenceOnObjPos(bool = true) const; diff --git a/sw/inc/swcrsr.hxx b/sw/inc/swcrsr.hxx index 08b217e095fc..1d37cbfb960d 100644 --- a/sw/inc/swcrsr.hxx +++ b/sw/inc/swcrsr.hxx @@ -58,7 +58,7 @@ namespace nsSwCursorSelOverFlags class SW_DLLPUBLIC SwCursor : public SwPaM { - friend class SwCrsrSaveState; + friend class SwCursorSaveState; _SwCursor_SavePos* m_pSavePos; long m_nRowSpanOffset; // required for travelling in tabs with rowspans @@ -78,8 +78,8 @@ protected: const _SwCursor_SavePos* GetSavePos() const { return m_pSavePos; } - virtual const SwContentFrm* DoSetBidiLevelLeftRight( - bool & io_rbLeft, bool bVisualAllowed, bool bInsertCrsr); + virtual const SwContentFrame* DoSetBidiLevelLeftRight( + bool & io_rbLeft, bool bVisualAllowed, bool bInsertCursor); virtual void DoSetBidiLevelUpDown(); virtual bool IsSelOvrCheck(int eFlags); @@ -157,7 +157,7 @@ public: bool ExpandToSentenceBorders(); virtual bool LeftRight( bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode, - bool bAllowVisual, bool bSkipHidden, bool bInsertCrsr ); + bool bAllowVisual, bool bSkipHidden, bool bInsertCursor ); bool UpDown( bool bUp, sal_uInt16 nCnt, Point* pPt, long nUpDownX ); bool LeftRightMargin( bool bLeftMargin, bool bAPI = false ); bool IsAtLeftRightMargin( bool bLeftMargin, bool bAPI = false ) const; @@ -190,10 +190,10 @@ public: nsSwCursorSelOverFlags::SELOVER_TOGGLE | nsSwCursorSelOverFlags::SELOVER_CHANGEPOS )); bool IsInProtectTable( bool bMove = false, - bool bChgCrsr = true ); + bool bChgCursor = true ); bool IsNoContent() const; - /** Restore cursor state to the one saved by SwCrsrSaveState **/ + /** Restore cursor state to the one saved by SwCursorSaveState **/ void RestoreSavePos(); // true: cursor can be set at this position. @@ -205,31 +205,31 @@ public: virtual bool IsSkipOverProtectSections() const; virtual bool IsSkipOverHiddenSections() const; - sal_uInt8 GetCrsrBidiLevel() const { return m_nCursorBidiLevel; } - void SetCrsrBidiLevel( sal_uInt8 nNewLevel ) { m_nCursorBidiLevel = nNewLevel; } + sal_uInt8 GetCursorBidiLevel() const { return m_nCursorBidiLevel; } + void SetCursorBidiLevel( sal_uInt8 nNewLevel ) { m_nCursorBidiLevel = nNewLevel; } bool IsColumnSelection() const { return m_bColumnSelection; } void SetColumnSelection( bool bNew ) { m_bColumnSelection = bNew; } - long GetCrsrRowSpanOffset() const { return m_nRowSpanOffset; } + long GetCursorRowSpanOffset() const { return m_nRowSpanOffset; } DECL_FIXEDMEMPOOL_NEWDEL( SwCursor ) }; /** - A helper class to save cursor state (position). Create SwCrsrSaveState + A helper class to save cursor state (position). Create SwCursorSaveState object to save current state, use SwCursor::RestoreSavePos() to actually - restore cursor state to the saved state (SwCrsrSaveState destructor only + restore cursor state to the saved state (SwCursorSaveState destructor only removes the saved state from an internal stack). It is possible to stack - several SwCrsrSaveState objects. + several SwCursorSaveState objects. **/ -class SwCrsrSaveState +class SwCursorSaveState { private: - SwCursor& m_rCrsr; + SwCursor& m_rCursor; public: - SwCrsrSaveState( SwCursor& rC ) : m_rCrsr( rC ) { rC.SaveState(); } - ~SwCrsrSaveState() { m_rCrsr.RestoreState(); } + SwCursorSaveState( SwCursor& rC ) : m_rCursor( rC ) { rC.SaveState(); } + ~SwCursorSaveState() { m_rCursor.RestoreState(); } }; // internal, used by SwCursor::SaveState() etc. @@ -239,9 +239,9 @@ struct _SwCursor_SavePos sal_Int32 nContent; _SwCursor_SavePos* pNext; - _SwCursor_SavePos( const SwCursor& rCrsr ) - : nNode( rCrsr.GetPoint()->nNode.GetIndex() ), - nContent( rCrsr.GetPoint()->nContent.GetIndex() ), + _SwCursor_SavePos( const SwCursor& rCursor ) + : nNode( rCursor.GetPoint()->nNode.GetIndex() ), + nContent( rCursor.GetPoint()->nContent.GetIndex() ), pNext( nullptr ) {} virtual ~_SwCursor_SavePos() {} @@ -269,7 +269,7 @@ public: virtual ~SwTableCursor(); virtual bool LeftRight( bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode, - bool bAllowVisual, bool bSkipHidden, bool bInsertCrsr ) override; + bool bAllowVisual, bool bSkipHidden, bool bInsertCursor ) override; virtual bool GotoTable( const OUString& rName ) override; void InsertBox( const SwTableBox& rTableBox ); @@ -278,14 +278,14 @@ public: const SwSelBoxes& GetSelectedBoxes() const { return m_SelectedBoxes; } // Creates cursor for all boxes. - SwCursor* MakeBoxSels( SwCursor* pAktCrsr ); + SwCursor* MakeBoxSels( SwCursor* pAktCursor ); // Any boxes protected? bool HasReadOnlyBoxSel() const; // Has table cursor been changed? If so, save new values immediately. - bool IsCrsrMovedUpdate(); + bool IsCursorMovedUpdate(); // Has table cursor been changed? - bool IsCrsrMoved() const + bool IsCursorMoved() const { return m_nTableMkNd != GetMark()->nNode.GetIndex() || m_nTablePtNd != GetPoint()->nNode.GetIndex() || @@ -296,7 +296,7 @@ public: bool IsChgd() const { return m_bChanged; } // Park table cursor at start node of boxes. - void ParkCrsr(); + void ParkCursor(); bool NewTableSelection(); void ActualizeSelection( const SwSelBoxes &rBoxes ); diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx index 0f1b4a8ec150..fd3928622e09 100644 --- a/sw/inc/swtable.hxx +++ b/sw/inc/swtable.hxx @@ -248,7 +248,7 @@ public: sal_uInt16 nCnt = 1, bool bBehind = true ); void PrepareDelBoxes( const SwSelBoxes& rBoxes ); bool DeleteSel( SwDoc*, const SwSelBoxes& rBoxes, const SwSelBoxes* pMerged, - SwUndo* pUndo, const bool bDelMakeFrms, const bool bCorrBorder ); + SwUndo* pUndo, const bool bDelMakeFrames, const bool bCorrBorder ); bool SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt=1 ); void FindSuperfluousRows( SwSelBoxes& rBoxes ) @@ -496,13 +496,13 @@ public: void RegisterToFormat( SwFormat& rFormat ) ; }; -class SwCellFrm; +class SwCellFrame; class SW_DLLPUBLIC SwTableCellInfo : public ::boost::noncopyable { struct Impl; ::std::unique_ptr<Impl> m_pImpl; - const SwCellFrm * getCellFrm() const ; + const SwCellFrame * getCellFrame() const ; public: SwTableCellInfo(const SwTable * pTable); diff --git a/sw/inc/swtblfmt.hxx b/sw/inc/swtblfmt.hxx index 999b7c5fefe2..394716a89a20 100644 --- a/sw/inc/swtblfmt.hxx +++ b/sw/inc/swtblfmt.hxx @@ -29,12 +29,12 @@ class SW_DLLPUBLIC SwTableFormat : public SwFrameFormat protected: SwTableFormat( SwAttrPool& rPool, const sal_Char* pFormatNm, - SwFrameFormat *pDrvdFrm ) - : SwFrameFormat( rPool, pFormatNm, pDrvdFrm, RES_FRMFMT, aTableSetRange ) + SwFrameFormat *pDrvdFrame ) + : SwFrameFormat( rPool, pFormatNm, pDrvdFrame, RES_FRMFMT, aTableSetRange ) {} SwTableFormat( SwAttrPool& rPool, const OUString &rFormatNm, - SwFrameFormat *pDrvdFrm ) - : SwFrameFormat( rPool, rFormatNm, pDrvdFrm, RES_FRMFMT, aTableSetRange ) + SwFrameFormat *pDrvdFrame ) + : SwFrameFormat( rPool, rFormatNm, pDrvdFrame, RES_FRMFMT, aTableSetRange ) {} public: @@ -50,12 +50,12 @@ class SwTableLineFormat : public SwFrameFormat protected: SwTableLineFormat( SwAttrPool& rPool, const sal_Char* pFormatNm, - SwFrameFormat *pDrvdFrm ) - : SwFrameFormat( rPool, pFormatNm, pDrvdFrm, RES_FRMFMT, aTableLineSetRange ) + SwFrameFormat *pDrvdFrame ) + : SwFrameFormat( rPool, pFormatNm, pDrvdFrame, RES_FRMFMT, aTableLineSetRange ) {} SwTableLineFormat( SwAttrPool& rPool, const OUString &rFormatNm, - SwFrameFormat *pDrvdFrm ) - : SwFrameFormat( rPool, rFormatNm, pDrvdFrm, RES_FRMFMT, aTableLineSetRange ) + SwFrameFormat *pDrvdFrame ) + : SwFrameFormat( rPool, rFormatNm, pDrvdFrame, RES_FRMFMT, aTableLineSetRange ) {} public: @@ -71,12 +71,12 @@ class SW_DLLPUBLIC SwTableBoxFormat : public SwFrameFormat protected: SwTableBoxFormat( SwAttrPool& rPool, const sal_Char* pFormatNm, - SwFrameFormat *pDrvdFrm ) - : SwFrameFormat( rPool, pFormatNm, pDrvdFrm, RES_FRMFMT, aTableBoxSetRange ) + SwFrameFormat *pDrvdFrame ) + : SwFrameFormat( rPool, pFormatNm, pDrvdFrame, RES_FRMFMT, aTableBoxSetRange ) {} SwTableBoxFormat( SwAttrPool& rPool, const OUString &rFormatNm, - SwFrameFormat *pDrvdFrm ) - : SwFrameFormat( rPool, rFormatNm, pDrvdFrm, RES_FRMFMT, aTableBoxSetRange ) + SwFrameFormat *pDrvdFrame ) + : SwFrameFormat( rPool, rFormatNm, pDrvdFrame, RES_FRMFMT, aTableBoxSetRange ) {} // For recognition of changes (especially TableBoxAttribute). diff --git a/sw/inc/swtypes.hxx b/sw/inc/swtypes.hxx index 5bff42792be2..5d99dae0ce41 100644 --- a/sw/inc/swtypes.hxx +++ b/sw/inc/swtypes.hxx @@ -68,8 +68,8 @@ const sal_Int32 COMPLETE_STRING = SAL_MAX_INT32; const SwTwips cMinHdFtHeight = 56; -#define MINFLY 23 // Minimal size for FlyFrms. -#define MINLAY 23 // Minimal size for other Frms. +#define MINFLY 23 // Minimal size for FlyFrames. +#define MINLAY 23 // Minimal size for other Frames. // Default column distance of two text columns corresponds to 0.3 cm. #define DEF_GUTTER_WIDTH (MM50 / 5 * 3) @@ -247,17 +247,17 @@ enum PrepareHint PREP_FIXSIZE_CHG, // FixSize has changed. PREP_FOLLOW_FOLLOWS, // Follow is now possibly adjacent. PREP_ADJUST_FRM, // Adjust size via grow/shrink without formatting. - PREP_FLY_CHGD, // A FlyFrm has changed its size. - PREP_FLY_ATTR_CHG, // A FlyFrm hat has changed its attributes + PREP_FLY_CHGD, // A FlyFrame has changed its size. + PREP_FLY_ATTR_CHG, // A FlyFrame hat has changed its attributes // (e. g. wrap). - PREP_FLY_ARRIVE, // A FlyFrm now overlaps range. - PREP_FLY_LEAVE, // A FlyFrm has left range. + PREP_FLY_ARRIVE, // A FlyFrame now overlaps range. + PREP_FLY_LEAVE, // A FlyFrame has left range. PREP_FTN, // Invalidation of footnotes. - PREP_POS_CHGD, // Position of Frm has changed. + PREP_POS_CHGD, // Position of Frame has changed. // (Check for Fly-break). In void* of Prepare() // a sal_Bool& is passed. If this is sal_True, // it indicateds that a format has been executed. - PREP_UL_SPACE, // UL-Space has changed, TextFrms have to + PREP_UL_SPACE, // UL-Space has changed, TextFrames have to // re-calculate line space. PREP_MUST_FIT, // Make frm fit (split) even if the attributes do // not allow that (e.g. "keep together"). @@ -267,7 +267,7 @@ enum PrepareHint PREP_QUOVADIS, // If a footnote has to be split between two paragraphs // the last on the page has to receive a QUOVADIS in // order to format the text into it. - PREP_BOSS_CHGD, // If a Frm changes its column/page this additional + PREP_BOSS_CHGD, // If a Frame changes its column/page this additional // Prepare is sended to POS_CHGD in MoveFwd/Bwd // (join Footnote-numbers etc.) // Direction is communicated via pVoid: @@ -279,7 +279,7 @@ enum PrepareHint PREP_MOVEFTN, // A footnote changes its page. Its contents receives at first a // height of zero in order to avoid too much noise. At formatting // it checks whether it fits and if necessary changes its page again. - PREP_ERGOSUM, // Needed because of movement in FootnoteFrms. Check QuoVadis/ErgoSum. + PREP_ERGOSUM, // Needed because of movement in FootnoteFrames. Check QuoVadis/ErgoSum. PREP_END // END. }; diff --git a/sw/inc/tblsel.hxx b/sw/inc/tblsel.hxx index 524cb4ebd30f..dd4170893c60 100644 --- a/sw/inc/tblsel.hxx +++ b/sw/inc/tblsel.hxx @@ -29,21 +29,21 @@ #include <deque> #include <vector> -class SwCrsrShell; +class SwCursorShell; class SwCursor; class SwTableCursor; -class SwFrm; -class SwTabFrm; +class SwFrame; +class SwTabFrame; class SwTableBox; class SwTableLine; -class SwLayoutFrm; +class SwLayoutFrame; class SwPaM; class SwNode; class SwTable; class SwUndoTableMerge; -class SwCellFrm; +class SwCellFrame; -typedef ::std::deque< SwCellFrm* > SwCellFrms; +typedef ::std::deque< SwCellFrame* > SwCellFrames; struct CompareSwSelBoxes { @@ -70,23 +70,23 @@ namespace nsSwTableSearchType const SwTableSearchType TBLSEARCH_NO_UNION_CORRECT = 0x10; // Do not correct collected Union. } -SW_DLLPUBLIC void GetTableSel( const SwCrsrShell& rShell, SwSelBoxes& rBoxes, +SW_DLLPUBLIC void GetTableSel( const SwCursorShell& rShell, SwSelBoxes& rBoxes, const SwTableSearchType = nsSwTableSearchType::TBLSEARCH_NONE ); -void GetTableSel( const SwCursor& rCrsr, SwSelBoxes& rBoxes, +void GetTableSel( const SwCursor& rCursor, SwSelBoxes& rBoxes, const SwTableSearchType = nsSwTableSearchType::TBLSEARCH_NONE ); -// As before, but don't start from selection but from Start- EndFrms. -void GetTableSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd, - SwSelBoxes& rBoxes, SwCellFrms* pCells, +// As before, but don't start from selection but from Start- EndFrames. +void GetTableSel( const SwLayoutFrame* pStart, const SwLayoutFrame* pEnd, + SwSelBoxes& rBoxes, SwCellFrames* pCells, const SwTableSearchType = nsSwTableSearchType::TBLSEARCH_NONE ); // As before but directly via PaMs. -void GetTableSelCrs( const SwCrsrShell& rShell, SwSelBoxes& rBoxes ); -void GetTableSelCrs( const SwTableCursor& rTableCrsr, SwSelBoxes& rBoxes ); +void GetTableSelCrs( const SwCursorShell& rShell, SwSelBoxes& rBoxes ); +void GetTableSelCrs( const SwTableCursor& rTableCursor, SwSelBoxes& rBoxes ); // Collect boxes relevant for auto sum. -bool GetAutoSumSel( const SwCrsrShell&, SwCellFrms& ); +bool GetAutoSumSel( const SwCursorShell&, SwCellFrames& ); // Check if the SelBoxes contains protected Boxes. bool HasProtectedCells( const SwSelBoxes& rBoxes ); @@ -95,9 +95,9 @@ bool HasProtectedCells( const SwSelBoxes& rBoxes ); bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd); // Check if cell is part of SSelection. -// (Became a function, in order to make sure that GetTableSel() and MakeTableCrsr() +// (Became a function, in order to make sure that GetTableSel() and MakeTableCursor() // have always the same concept of the selection. -bool IsFrmInTableSel( const SwRect& rUnion, const SwFrm* pCell ); +bool IsFrameInTableSel( const SwRect& rUnion, const SwFrame* pCell ); // Determine boxes to be merged. // In this process the rectangle gets "adapted" on the base of the layout, @@ -113,25 +113,25 @@ sal_uInt16 CheckMergeSel( const SwSelBoxes& rBoxes ); bool IsEmptyBox( const SwTableBox& rBox, SwPaM& rPam ); // Check if Split or InsertCol lead to a box becoming smaller than MINLAY. -bool CheckSplitCells( const SwCrsrShell& rShell, sal_uInt16 nDiv, +bool CheckSplitCells( const SwCursorShell& rShell, sal_uInt16 nDiv, const SwTableSearchType = nsSwTableSearchType::TBLSEARCH_NONE ); -bool CheckSplitCells( const SwCursor& rCrsr, sal_uInt16 nDiv, +bool CheckSplitCells( const SwCursor& rCursor, sal_uInt16 nDiv, const SwTableSearchType = nsSwTableSearchType::TBLSEARCH_NONE ); // For working on tab selection also for split tables. class SwSelUnion { SwRect m_aUnion; // The rectangle enclosing the selection. - SwTabFrm *m_pTable; // The (Follow-)Table for the Union. + SwTabFrame *m_pTable; // The (Follow-)Table for the Union. public: - SwSelUnion( const SwRect &rRect, SwTabFrm *pTab ) : + SwSelUnion( const SwRect &rRect, SwTabFrame *pTab ) : m_aUnion( rRect ), m_pTable( pTab ) {} const SwRect& GetUnion() const { return m_aUnion; } SwRect& GetUnion() { return m_aUnion; } - const SwTabFrm *GetTable() const { return m_pTable; } - SwTabFrm *GetTable() { return m_pTable; } + const SwTabFrame *GetTable() const { return m_pTable; } + SwTabFrame *GetTable() { return m_pTable; } }; // Determines tables affected by a table selection and union rectangles @@ -142,8 +142,8 @@ typedef std::vector<SwSelUnion> SwSelUnions; // - also for split tables. // If a parameter is passed that != nsSwTableSearchType::TBLSEARCH_NONE // the selection is extended in the given direction. -void MakeSelUnions( SwSelUnions&, const SwLayoutFrm *pStart, - const SwLayoutFrm *pEnd, +void MakeSelUnions( SwSelUnions&, const SwLayoutFrame *pStart, + const SwLayoutFrame *pEnd, const SwTableSearchType = nsSwTableSearchType::TBLSEARCH_NONE ); // These classes copy the current table selections (rBoxes) into a @@ -181,9 +181,9 @@ public: void SetTableLines( const SwSelBoxes &rBoxes, const SwTable &rTable ); void SetTableLines( const SwTable &rTable ); //Add an input param to identify if acc table should be disposed - void DelFrms ( SwTable &rTable, bool bAccTableDispose = false ); - void MakeFrms( SwTable &rTable ); - void MakeNewFrms( SwTable &rTable, const sal_uInt16 nNumber, + void DelFrames ( SwTable &rTable, bool bAccTableDispose = false ); + void MakeFrames( SwTable &rTable ); + void MakeNewFrames( SwTable &rTable, const sal_uInt16 nNumber, const bool bBehind ); bool AreLinesToRestore( const SwTable &rTable ) const; diff --git a/sw/inc/textboxhelper.hxx b/sw/inc/textboxhelper.hxx index f4fb97a3dc6d..d72ba4da5311 100644 --- a/sw/inc/textboxhelper.hxx +++ b/sw/inc/textboxhelper.hxx @@ -60,7 +60,7 @@ public: static void getProperty(SwFrameFormat* pShape, sal_uInt16 nWID, sal_uInt8 nMemberID, css::uno::Any& rValue); /// Similar to syncProperty(), but used by the internal API (e.g. for UI purposes). - static void syncFlyFrmAttr(SwFrameFormat& rShape, SfxItemSet& rSet); + static void syncFlyFrameAttr(SwFrameFormat& rShape, SfxItemSet& rSet); /// If we have an associated TextFrame, then return that. static SwFrameFormat* findTextBox(const SwFrameFormat* pShape); @@ -73,7 +73,7 @@ public: /** * Look up TextFrames in a document, which are in fact TextBoxes. * - * If rNode has a matching SwContentFrm, then only TextBoxes of rNode are + * If rNode has a matching SwContentFrame, then only TextBoxes of rNode are * returned. */ static std::set<const SwFrameFormat*> findTextBoxes(const SwNode& rNode); diff --git a/sw/inc/txtflcnt.hxx b/sw/inc/txtflcnt.hxx index 74f78691db0f..b4530d630124 100644 --- a/sw/inc/txtflcnt.hxx +++ b/sw/inc/txtflcnt.hxx @@ -21,36 +21,36 @@ #include <txatbase.hxx> -class SwFlyInCntFrm; -class SwFrm; +class SwFlyInContentFrame; +class SwFrame; class SwTextNode; class SwDoc; // Attribute for line-bound frames (without end index). class SwTextFlyCnt : public SwTextAttr { - SwFlyInCntFrm *_GetFlyFrm( const SwFrm *pCurrFrm ); + SwFlyInContentFrame *_GetFlyFrame( const SwFrame *pCurrFrame ); public: SwTextFlyCnt( SwFormatFlyCnt& rAttr, sal_Int32 nStart ); // Sets anchor in pFormat and void SetAnchor( const SwTextNode *pNode ); - inline SwFlyInCntFrm *GetFlyFrm( const SwFrm *pCurrFrm ); - inline const SwFlyInCntFrm *GetFlyFrm( const SwFrm *pCurrFrm ) const; + inline SwFlyInContentFrame *GetFlyFrame( const SwFrame *pCurrFrame ); + inline const SwFlyInContentFrame *GetFlyFrame( const SwFrame *pCurrFrame ) const; // creates for itself a new FlyFrameFormat. void CopyFlyFormat( SwDoc* pDoc ); }; -inline SwFlyInCntFrm *SwTextFlyCnt::GetFlyFrm( const SwFrm *pCurrFrm ) +inline SwFlyInContentFrame *SwTextFlyCnt::GetFlyFrame( const SwFrame *pCurrFrame ) { - return _GetFlyFrm( pCurrFrm ); + return _GetFlyFrame( pCurrFrame ); } -inline const SwFlyInCntFrm *SwTextFlyCnt::GetFlyFrm( const SwFrm *pCurrFrm ) const +inline const SwFlyInContentFrame *SwTextFlyCnt::GetFlyFrame( const SwFrame *pCurrFrame ) const { - return (const_cast<SwTextFlyCnt*>(this))->_GetFlyFrm( pCurrFrm ); + return (const_cast<SwTextFlyCnt*>(this))->_GetFlyFrame( pCurrFrame ); } #endif diff --git a/sw/inc/txtftn.hxx b/sw/inc/txtftn.hxx index 2d34daaabae6..daf1bb163bb0 100644 --- a/sw/inc/txtftn.hxx +++ b/sw/inc/txtftn.hxx @@ -27,7 +27,7 @@ class SwNodeIndex; class SwTextNode; class SwNodes; class SwDoc; -class SwFrm; +class SwFrame; class SW_DLLPUBLIC SwTextFootnote : public SwTextAttr { @@ -52,7 +52,7 @@ public: void MakeNewTextSection( SwNodes& rNodes ); // Delete the FootnoteFrame from page. - void DelFrms( const SwFrm* ); + void DelFrames( const SwFrame* ); // Check conditional paragraph styles. void CheckCondColl(); diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx index f07aa30f3c74..d83db238ecc5 100644 --- a/sw/inc/undobj.hxx +++ b/sw/inc/undobj.hxx @@ -279,8 +279,8 @@ public: class SwUndoInsLayFormat : public SwUndoFlyBase { - sal_uLong mnCrsrSaveIndexPara; // Cursor position - sal_Int32 mnCrsrSaveIndexPos; // for undo + sal_uLong mnCursorSaveIndexPara; // Cursor position + sal_Int32 mnCursorSaveIndexPos; // for undo public: SwUndoInsLayFormat( SwFrameFormat* pFormat, sal_uLong nNodeIdx, sal_Int32 nCntIdx ); @@ -296,7 +296,7 @@ public: class SwUndoDelLayFormat : public SwUndoFlyBase { - bool bShowSelFrm; + bool bShowSelFrame; public: SwUndoDelLayFormat( SwFrameFormat* pFormat ); @@ -305,7 +305,7 @@ public: void RedoForRollback(); - void ChgShowSel( bool bNew ) { bShowSelFrm = bNew; } + void ChgShowSel( bool bNew ) { bShowSelFrame = bNew; } virtual SwRewriter GetRewriter() const override; diff --git a/sw/inc/unobaseclass.hxx b/sw/inc/unobaseclass.hxx index 8cc22f416205..367af0c47b23 100644 --- a/sw/inc/unobaseclass.hxx +++ b/sw/inc/unobaseclass.hxx @@ -29,7 +29,7 @@ class SfxPoolItem; class SwClient; class SwDoc; -class SwUnoTableCrsr; +class SwUnoTableCursor; typedef ::cppu::WeakImplHelper < css::lang::XServiceInfo @@ -79,7 +79,7 @@ private: public: UnoActionRemoveContext(SwDoc *const pDoc); - UnoActionRemoveContext(SwUnoTableCrsr const& rCursor); + UnoActionRemoveContext(SwUnoTableCursor const& rCursor); ~UnoActionRemoveContext(); }; diff --git a/sw/inc/unochart.hxx b/sw/inc/unochart.hxx index 899be66fd332..935db3d705e1 100644 --- a/sw/inc/unochart.hxx +++ b/sw/inc/unochart.hxx @@ -263,7 +263,7 @@ class SwChartDataSequence : css::uno::Reference< css::chart2::data::XDataProvider > m_xDataProvider; SwChartDataProvider * m_pDataProvider; - sw::UnoCursorPointer m_pTableCrsr; // cursor spanned over cells to use + sw::UnoCursorPointer m_pTableCursor; // cursor spanned over cells to use const SfxItemPropertySet* m_pPropSet; @@ -279,7 +279,7 @@ protected: public: SwChartDataSequence( SwChartDataProvider &rProvider, SwFrameFormat &rTableFormat, - std::shared_ptr<SwUnoCrsr> pTableCursor ); + std::shared_ptr<SwUnoCursor> pTableCursor ); virtual ~SwChartDataSequence(); static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId(); diff --git a/sw/inc/unocrsr.hxx b/sw/inc/unocrsr.hxx index 902e75530423..9ee9261de581 100644 --- a/sw/inc/unocrsr.hxx +++ b/sw/inc/unocrsr.hxx @@ -31,7 +31,7 @@ namespace sw }; } -class SwUnoCrsr : public virtual SwCursor, public SwModify +class SwUnoCursor : public virtual SwCursor, public SwModify { private: bool m_bRemainInSection : 1; @@ -39,13 +39,13 @@ private: bool m_bSkipOverProtectSections : 1; public: - SwUnoCrsr( const SwPosition &rPos, SwPaM* pRing = nullptr ); - virtual ~SwUnoCrsr(); + SwUnoCursor( const SwPosition &rPos, SwPaM* pRing = nullptr ); + virtual ~SwUnoCursor(); protected: - virtual const SwContentFrm* DoSetBidiLevelLeftRight( - bool & io_rbLeft, bool bVisualAllowed, bool bInsertCrsr) override; + virtual const SwContentFrame* DoSetBidiLevelLeftRight( + bool & io_rbLeft, bool bVisualAllowed, bool bInsertCursor) override; virtual void DoSetBidiLevelUpDown() override; public: @@ -72,10 +72,10 @@ public: void SetSkipOverHiddenSections( bool bFlag ) { m_bSkipOverHiddenSections = bFlag; } - DECL_FIXEDMEMPOOL_NEWDEL( SwUnoCrsr ) + DECL_FIXEDMEMPOOL_NEWDEL( SwUnoCursor ) }; -class SwUnoTableCrsr : public virtual SwUnoCrsr, public virtual SwTableCursor +class SwUnoTableCursor : public virtual SwUnoCursor, public virtual SwTableCursor { // The selection has the same order as the table boxes, i.e. // if something is deleted from the one array at a certain position @@ -85,8 +85,8 @@ class SwUnoTableCrsr : public virtual SwUnoCrsr, public virtual SwTableCursor using SwTableCursor::MakeBoxSels; public: - SwUnoTableCrsr( const SwPosition& rPos ); - virtual ~SwUnoTableCrsr(); + SwUnoTableCursor( const SwPosition& rPos ); + virtual ~SwUnoTableCursor(); // Does a selection of content exist in table? // Return value indicates if the cursor remains at its old position. @@ -109,7 +109,7 @@ namespace sw UnoCursorPointer() : m_pCursor(nullptr), m_bSectionRestricted(false) {} - UnoCursorPointer(std::shared_ptr<SwUnoCrsr> pCursor, bool bSectionRestricted=false) + UnoCursorPointer(std::shared_ptr<SwUnoCursor> pCursor, bool bSectionRestricted=false) : m_pCursor(pCursor), m_bSectionRestricted(bSectionRestricted) { m_pCursor->Add(this); @@ -144,9 +144,9 @@ namespace sw if(!GetRegisteredIn()) m_pCursor.reset(); }; - SwUnoCrsr& operator*() const + SwUnoCursor& operator*() const { return *m_pCursor.get(); } - SwUnoCrsr* operator->() const + SwUnoCursor* operator->() const { return m_pCursor.get(); } UnoCursorPointer& operator=(UnoCursorPointer aOther) { @@ -157,7 +157,7 @@ namespace sw } explicit operator bool() const { return static_cast<bool>(m_pCursor); } - void reset(std::shared_ptr<SwUnoCrsr> pNew) + void reset(std::shared_ptr<SwUnoCursor> pNew) { if(pNew) pNew->Add(this); @@ -166,7 +166,7 @@ namespace sw m_pCursor = pNew; } private: - std::shared_ptr<SwUnoCrsr> m_pCursor; + std::shared_ptr<SwUnoCursor> m_pCursor; const bool m_bSectionRestricted; }; } diff --git a/sw/inc/unocrsrhelper.hxx b/sw/inc/unocrsrhelper.hxx index 41f83af366ce..50154968fb00 100644 --- a/sw/inc/unocrsrhelper.hxx +++ b/sw/inc/unocrsrhelper.hxx @@ -35,8 +35,8 @@ struct SfxItemPropertySimpleEntry; class SdrObject; class SwTextNode; class SwCursor; -class SwUnoCrsr; -class SwUnoTableCrsr; +class SwUnoCursor; +class SwUnoTableCursor; class SwFormatColl; struct SwSortOptions; class SwDoc; @@ -81,7 +81,7 @@ namespace SwUnoCursorHelper GetNestedTextContent(SwTextNode & rTextNode, sal_Int32 const nIndex, bool const bParent); - bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry + bool getCursorPropertyValue(const SfxItemPropertySimpleEntry& rEntry , SwPaM& rPam , css::uno::Any *pAny , css::beans::PropertyState& eState @@ -89,14 +89,14 @@ namespace SwUnoCursorHelper void GetCurPageStyle(SwPaM& rPaM, OUString &rString); - inline bool IsStartOfPara(SwPaM& rUnoCrsr) - { return rUnoCrsr.GetPoint()->nContent == 0;} - inline bool IsEndOfPara(SwPaM& rUnoCrsr) - { return rUnoCrsr.GetContentNode() && - rUnoCrsr.GetPoint()->nContent == rUnoCrsr.GetContentNode()->Len();} + inline bool IsStartOfPara(SwPaM& rUnoCursor) + { return rUnoCursor.GetPoint()->nContent == 0;} + inline bool IsEndOfPara(SwPaM& rUnoCursor) + { return rUnoCursor.GetContentNode() && + rUnoCursor.GetPoint()->nContent == rUnoCursor.GetContentNode()->Len();} - void resetCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry, SwPaM& rPam); - void InsertFile(SwUnoCrsr* pUnoCrsr, + void resetCursorPropertyValue(const SfxItemPropertySimpleEntry& rEntry, SwPaM& rPam); + void InsertFile(SwUnoCursor* pUnoCursor, const OUString& rURL, const css::uno::Sequence< css::beans::PropertyValue >& rOptions) throw (css::lang::IllegalArgumentException, @@ -133,10 +133,10 @@ namespace SwUnoCursorHelper throw (css::lang::IllegalArgumentException, css::uno::RuntimeException); /// @param bTableMode: attributes should be applied to a table selection - void SetCrsrAttr(SwPaM & rPam, const SfxItemSet & rSet, + void SetCursorAttr(SwPaM & rPam, const SfxItemSet & rSet, const SetAttrMode nAttrMode, const bool bTableMode = false); - void GetCrsrAttr(SwPaM & rPam, SfxItemSet & rSet, + void GetCursorAttr(SwPaM & rPam, SfxItemSet & rSet, const bool bOnlyTextAttr = false, const bool bGetFromChrFormat = true); void GetTextFromPam(SwPaM & rPam, OUString & rBuffer); @@ -235,7 +235,7 @@ namespace SwUnoCursorHelper css::uno::Reference<css::uno::XInterface> const& xIfc, SwDoc & rTargetDoc, SwPaM *& o_rpPaM, std::pair<OUString, FlyCntType> & o_rFrame, - OUString & o_rTableName, SwUnoTableCrsr const*& o_rpTableCursor, + OUString & o_rTableName, SwUnoTableCursor const*& o_rpTableCursor, ::sw::mark::IMark const*& o_rpMark, std::vector<SdrObject *> & o_rSdrObjects); diff --git a/sw/inc/unoparagraph.hxx b/sw/inc/unoparagraph.hxx index 9a29e8b82178..4da09be3f151 100644 --- a/sw/inc/unoparagraph.hxx +++ b/sw/inc/unoparagraph.hxx @@ -41,7 +41,7 @@ struct SwPosition; class SwPaM; -class SwUnoCrsr; +class SwUnoCursor; class SwStartNode; class SwTextNode; class SwTable; @@ -277,7 +277,7 @@ struct SwXParagraphEnumeration { static SwXParagraphEnumeration* Create( css::uno::Reference< css::text::XText > const & xParent, - std::shared_ptr<SwUnoCrsr> pCursor, + std::shared_ptr<SwUnoCursor> pCursor, const CursorType eType, SwStartNode const*const pStartNode = nullptr, SwTable const*const pTable = nullptr); diff --git a/sw/inc/unotbl.hxx b/sw/inc/unotbl.hxx index c04b006e3720..96323c274809 100644 --- a/sw/inc/unotbl.hxx +++ b/sw/inc/unotbl.hxx @@ -270,9 +270,9 @@ public: virtual const SwDoc* GetDoc() const override; virtual SwDoc* GetDoc() override; - const SwUnoCrsr& GetCrsr() const; - SwUnoCrsr& GetCrsr(); - sw::UnoCursorPointer m_pUnoCrsr; + const SwUnoCursor& GetCursor() const; + SwUnoCursor& GetCursor(); + sw::UnoCursorPointer m_pUnoCursor; SwFrameFormat* GetFrameFormat() const { return const_cast<SwFrameFormat*>(static_cast<const SwFrameFormat*>(GetRegisteredIn())); } virtual ~SwXTextTableCursor() { }; }; @@ -456,7 +456,7 @@ class SwXCellRange : public cppu::WeakImplHelper SwRangeDescriptor aRgDesc; const SfxItemPropertySet* m_pPropSet; - sw::UnoCursorPointer m_pTableCrsr; + sw::UnoCursorPointer m_pTableCursor; bool m_bFirstRowAsLabel; bool m_bFirstColumnAsLabel; @@ -465,7 +465,7 @@ class SwXCellRange : public cppu::WeakImplHelper void setLabelDescriptions(const css::uno::Sequence<OUString>& rDesc, bool bRow); public: - SwXCellRange(sw::UnoCursorPointer pCrsr, SwFrameFormat& rFrameFormat, SwRangeDescriptor& rDesc); + SwXCellRange(sw::UnoCursorPointer pCursor, SwFrameFormat& rFrameFormat, SwRangeDescriptor& rDesc); void SetLabels(bool bFirstRowAsLabel, bool bFirstColumnAsLabel) { m_bFirstRowAsLabel = bFirstRowAsLabel, m_bFirstColumnAsLabel = bFirstColumnAsLabel; } virtual ~SwXCellRange() {}; @@ -540,7 +540,7 @@ public: sal_uInt16 getRowCount(); sal_uInt16 getColumnCount(); - const SwUnoCrsr* GetTableCrsr() const; + const SwUnoCursor* GetTableCursor() const; }; class SwXTableRows final : public cppu::WeakImplHelper diff --git a/sw/inc/unotextcursor.hxx b/sw/inc/unotextcursor.hxx index f8fa7463d2e5..998a092e326d 100644 --- a/sw/inc/unotextcursor.hxx +++ b/sw/inc/unotextcursor.hxx @@ -45,7 +45,7 @@ class SwDoc; struct SwPosition; -class SwUnoCrsr; +class SwUnoCursor; typedef ::cppu::WeakImplHelper < css::lang::XServiceInfo @@ -89,7 +89,7 @@ public: SwPaM const& rSourceCursor, const enum CursorType eType = CURSOR_ALL); - SwUnoCrsr& GetCursor(); + SwUnoCursor& GetCursor(); bool IsAtEndOfMeta() const; void DeleteAndInsert(OUString const& rText, diff --git a/sw/inc/unotextrange.hxx b/sw/inc/unotextrange.hxx index 13b020957f0b..785d9dbac41d 100644 --- a/sw/inc/unotextrange.hxx +++ b/sw/inc/unotextrange.hxx @@ -36,7 +36,7 @@ #include <unobaseclass.hxx> class SwDoc; -class SwUnoCrsr; +class SwUnoCursor; class SwFrameFormat; class SW_DLLPUBLIC SwUnoInternalPaM @@ -252,8 +252,8 @@ typedef ::cppu::WeakImplHelper struct SwXTextRanges : public SwXTextRanges_Base { - virtual SwUnoCrsr* GetCursor() =0; - static SwXTextRanges* Create(SwPaM* const pCrsr); + virtual SwUnoCursor* GetCursor() =0; + static SwXTextRanges* Create(SwPaM* const pCursor); static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId(); }; diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx index 222114b118de..87386bbd193a 100644 --- a/sw/inc/unotxdoc.hxx +++ b/sw/inc/unotxdoc.hxx @@ -80,7 +80,7 @@ class SwDocShell; class UnoActionContext; class SwXBodyText; class SwXDrawPage; -class SwUnoCrsr; +class SwUnoCursor; class SwXDocumentPropertyHelper; class SfxViewFrame; class SwPrintUIOptions; @@ -448,9 +448,9 @@ public: void InitNewDoc(); - SwUnoCrsr* CreateCursorForSearch(css::uno::Reference< css::text::XTextCursor > & xCrsr); - SwUnoCrsr* FindAny(const css::uno::Reference< css::util::XSearchDescriptor > & xDesc, - css::uno::Reference< css::text::XTextCursor > & xCrsr, bool bAll, + SwUnoCursor* CreateCursorForSearch(css::uno::Reference< css::text::XTextCursor > & xCursor); + SwUnoCursor* FindAny(const css::uno::Reference< css::util::XSearchDescriptor > & xDesc, + css::uno::Reference< css::text::XTextCursor > & xCursor, bool bAll, sal_Int32& nResult, css::uno::Reference< css::uno::XInterface > xLastResult); diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx index 42b7f9d177d7..a757d79a0234 100644 --- a/sw/inc/view.hxx +++ b/sw/inc/view.hxx @@ -78,7 +78,7 @@ class Graphic; class GraphicFilter; class SwPostItMgr; enum class SotExchangeDest; -class SwCrsrShell; +class SwCursorShell; namespace com{ namespace sun { namespace star { namespace view{ class XSelectionSupplier; } @@ -170,7 +170,7 @@ class SW_DLLPUBLIC SwView: public SfxViewShell Timer m_aTimer; // for delayed ChgLnks during an action OUString m_sSwViewData, //and the new cursor position if the user double click in the PagePreview - m_sNewCrsrPos; + m_sNewCursorPos; // to support keyboard the number of the page to go to can be set too sal_uInt16 m_nNewPage; @@ -232,8 +232,8 @@ class SW_DLLPUBLIC SwView: public SfxViewShell bool m_bWheelScrollInProgress; - bool m_bCenterCrsr : 1, - m_bTopCrsr : 1, + bool m_bCenterCursor : 1, + m_bTopCursor : 1, m_bAlwaysShowSel : 1, m_bTabColFromDoc : 1, m_bTabRowFromDoc : 1, @@ -284,8 +284,8 @@ class SW_DLLPUBLIC SwView: public SfxViewShell // scrollbar movements SAL_DLLPRIVATE long PageUp(); SAL_DLLPRIVATE long PageDown(); - SAL_DLLPRIVATE bool PageUpCrsr(bool bSelect); - SAL_DLLPRIVATE bool PageDownCrsr(bool bSelect); + SAL_DLLPRIVATE bool PageUpCursor(bool bSelect); + SAL_DLLPRIVATE bool PageDownCursor(bool bSelect); SAL_DLLPRIVATE long PhyPageUp(); SAL_DLLPRIVATE long PhyPageDown(); @@ -312,7 +312,7 @@ class SW_DLLPUBLIC SwView: public SfxViewShell SAL_DLLPRIVATE void HyphStart( SvxSpellArea eSpell ); SAL_DLLPRIVATE void SpellKontext(bool bOn = true) - { m_bCenterCrsr = bOn; m_bAlwaysShowSel = bOn; } + { m_bCenterCursor = bOn; m_bAlwaysShowSel = bOn; } // for readonly switching SAL_DLLPRIVATE virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override; @@ -459,7 +459,7 @@ public: bool HandleWheelCommands( const CommandEvent& ); // insert frames - void InsFrmMode(sal_uInt16 nCols); + void InsFrameMode(sal_uInt16 nCols); void SetZoom( SvxZoomType eZoomType, short nFactor = 100, bool bViewOnly = false); virtual void SetZoomFactor( const Fraction &rX, const Fraction & ) override; @@ -539,7 +539,7 @@ public: void StateTabWin(SfxItemSet&); // attributes have changed - DECL_LINK_TYPED( AttrChangedNotify, SwCrsrShell*, void ); + DECL_LINK_TYPED( AttrChangedNotify, SwCursorShell*, void ); // form control has been activated DECL_LINK_TYPED( FormControlActivated, LinkParamNone*, void ); @@ -569,10 +569,10 @@ public: virtual void ReadUserDataSequence ( const css::uno::Sequence < css::beans::PropertyValue >&, bool bBrowse ) override; virtual void WriteUserDataSequence ( css::uno::Sequence < css::beans::PropertyValue >&, bool bBrowse ) override; - void SetCrsrAtTop( bool bFlag, bool bCenter = false ) - { m_bTopCrsr = bFlag, m_bCenterCrsr = bCenter; } - bool IsCrsrAtTop() const { return m_bTopCrsr; } - bool IsCrsrAtCenter() const { return m_bCenterCrsr; } + void SetCursorAtTop( bool bFlag, bool bCenter = false ) + { m_bTopCursor = bFlag, m_bCenterCursor = bCenter; } + bool IsCursorAtTop() const { return m_bTopCursor; } + bool IsCursorAtCenter() const { return m_bCenterCursor; } bool JumpToSwMark( const OUString& rMark ); diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx index a3cf5b317eed..8f3179039d4d 100644 --- a/sw/inc/viewopt.hxx +++ b/sw/inc/viewopt.hxx @@ -138,7 +138,7 @@ protected: short m_nDivisionY; sal_uInt8 m_nPagePreviewRow; // Page Preview Row/Columns. sal_uInt8 m_nPagePreviewCol; // Page Preview Row/Columns. - sal_uInt8 m_nShadowCrsrFillMode; // FillMode for ShadowCrsr. + sal_uInt8 m_nShadowCursorFillMode; // FillMode for ShadowCursor. bool m_bReadonly : 1; // Readonly-Doc. bool m_bStarOneSetting : 1;// Prevent from UI automatics (no scrollbars in readonly documents). bool m_bIsPagePreview : 1; // The preview mustn't print field/footnote/... shadings. @@ -549,8 +549,8 @@ public: bool IsPagePreview() const {return m_bIsPagePreview; } void SetPagePreview(bool bSet) { m_bIsPagePreview= bSet; } - sal_uInt8 GetShdwCrsrFillMode() const { return m_nShadowCrsrFillMode; } - void SetShdwCrsrFillMode( sal_uInt8 nMode ) { m_nShadowCrsrFillMode = nMode; }; + sal_uInt8 GetShdwCursorFillMode() const { return m_nShadowCursorFillMode; } + void SetShdwCursorFillMode( sal_uInt8 nMode ) { m_nShadowCursorFillMode = nMode; }; bool IsShowPlaceHolderFields() const { return m_bShowPlaceHolderFields; } void SetShowPlaceHolderFields(bool bSet) { m_bShowPlaceHolderFields = bSet; } @@ -602,7 +602,7 @@ inline void SwViewOption::SetUIOptions( const SwViewOption& rVOpt ) { m_nUIOptions = rVOpt.m_nUIOptions; m_nTableDestination = rVOpt.m_nTableDestination; - m_nShadowCrsrFillMode = rVOpt.m_nShadowCrsrFillMode; + m_nShadowCursorFillMode = rVOpt.m_nShadowCursorFillMode; } // Helper function for checking HTML-capabilities. diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx index 254e4ec5b840..283ba948f009 100644 --- a/sw/inc/viewsh.hxx +++ b/sw/inc/viewsh.hxx @@ -53,7 +53,7 @@ class IDocumentListItems; class IDocumentOutlineNodes; class SfxPrinter; class SfxProgress; -class SwRootFrm; +class SwRootFrame; class SwNodes; class SdrView; class SfxItemPool; @@ -67,10 +67,10 @@ class OutputDevice; class SwLayIdle; struct ShellResource; class SwRegionRects; -class SwFrm; +class SwFrame; class SvtAccessibilityOptions; class SwPagePreviewLayout; -class SwTextFrm; +class SwTextFrame; class BitmapEx; struct SwAccessibilityOptions; @@ -89,7 +89,7 @@ namespace vcl // Currently the Preview flag is needed for DrawPage. #define VSHELLFLAG_ISPREVIEW ((long)0x1) #define VSHELLFLAG_SHARELAYOUT ((long)0x2) -typedef std::shared_ptr<SwRootFrm> SwRootFrmPtr; +typedef std::shared_ptr<SwRootFrame> SwRootFramePtr; class SwViewShell; class SW_DLLPUBLIC SwViewShell : public sw::Ring<SwViewShell> @@ -158,7 +158,7 @@ class SW_DLLPUBLIC SwViewShell : public sw::Ring<SwViewShell> SdrPaintWindow* mpTargetPaintWindow; VclPtr<OutputDevice> mpBufferedOut; - SwRootFrmPtr mpLayout; + SwRootFramePtr mpLayout; // Initialization; called by the diverse constructors. SAL_DLLPRIVATE void Init( const SwViewOption *pNewOpt ); @@ -278,7 +278,7 @@ public: // Invalidate first visible page for all Shells in ring. void SetFirstVisPageInvalid(); - SwRootFrm *GetLayout() const; + SwRootFrame *GetLayout() const; bool IsNewLayout() const; // Has Layout been loaded or created? Size GetDocSize() const; // Get document size. @@ -511,18 +511,18 @@ public: @author OD - @param _pFromTextFrm + @param _pFromTextFrame input parameter - paragraph frame, for which the relation CONTENT_FLOWS_FROM has to be invalidated. If NULL, no CONTENT_FLOWS_FROM relation has to be invalidated - @param _pToTextFrm + @param _pToTextFrame input parameter - paragraph frame, for which the relation CONTENT_FLOWS_TO has to be invalidated. If NULL, no CONTENT_FLOWS_TO relation has to be invalidated */ - void InvalidateAccessibleParaFlowRelation( const SwTextFrm* _pFromTextFrm, - const SwTextFrm* _pToTextFrm ); + void InvalidateAccessibleParaFlowRelation( const SwTextFrame* _pFromTextFrame, + const SwTextFrame* _pToTextFrame ); /** invalidate text selection for paragraphs @@ -537,10 +537,10 @@ public: @author OD - @param rTextFrm + @param rTextFrame input parameter - paragraph frame, whose attributes have changed */ - void InvalidateAccessibleParaAttrs( const SwTextFrm& rTextFrm ); + void InvalidateAccessibleParaAttrs( const SwTextFrame& rTextFrame ); SwAccessibleMap* GetAccessibleMap(); @@ -589,7 +589,7 @@ class CurrShell { public: SwViewShell *pPrev; - SwRootFrm *pRoot; + SwRootFrame *pRoot; CurrShell( SwViewShell *pNew ); ~CurrShell(); diff --git a/sw/inc/viscrs.hxx b/sw/inc/viscrs.hxx index 0e2da96efe14..701e9cd486ed 100644 --- a/sw/inc/viscrs.hxx +++ b/sw/inc/viscrs.hxx @@ -26,22 +26,22 @@ #include "swrect.hxx" #include "swregion.hxx" -class SwCrsrShell; -class SwShellCrsr; +class SwCursorShell; +class SwShellCursor; class SwTextInputField; // From here classes/methods for non-text cursor. -class SwVisCrsr +class SwVisibleCursor { friend void _InitCore(); friend void _FinitCore(); bool m_bIsVisible; - bool m_bIsDragCrsr; + bool m_bIsDragCursor; - vcl::Cursor m_aTextCrsr; - const SwCrsrShell* m_pCrsrShell; + vcl::Cursor m_aTextCursor; + const SwCursorShell* m_pCursorShell; /// For LibreOfficeKit only - remember what page we were at the last time. sal_uInt16 m_nPageLastTime; @@ -49,14 +49,14 @@ class SwVisCrsr void _SetPosAndShow(); public: - SwVisCrsr( const SwCrsrShell * pCShell ); - ~SwVisCrsr(); + SwVisibleCursor( const SwCursorShell * pCShell ); + ~SwVisibleCursor(); void Show(); void Hide(); bool IsVisible() const { return m_bIsVisible; } - void SetDragCrsr( bool bFlag = true ) { m_bIsDragCrsr = bFlag; } + void SetDragCursor( bool bFlag = true ) { m_bIsDragCursor = bFlag; } }; // From here classes/methods for selections. @@ -72,7 +72,7 @@ class SwSelPaintRects : public SwRects static long s_nPixPtX, s_nPixPtY; static MapMode *s_pMapMode; - const SwCrsrShell* m_pCursorShell; + const SwCursorShell* m_pCursorShell; #if HAVE_FEATURE_DESKTOP || defined(ANDROID) sdr::overlay::OverlayObject* m_pCursorOverlay; @@ -88,14 +88,14 @@ class SwSelPaintRects : public SwRects void HighlightInputField(); public: - SwSelPaintRects( const SwCrsrShell& rCSh ); + SwSelPaintRects( const SwCursorShell& rCSh ); virtual ~SwSelPaintRects(); virtual void FillRects() = 0; /// Fill rStart and rEnd with a rectangle that represents the start and end for selection handles. virtual void FillStartEnd(SwRect& rStart, SwRect& rEnd) const = 0; - // #i75172# in SwCrsrShell::CreateCrsr() the content of SwSelPaintRects is exchanged. To + // #i75172# in SwCursorShell::CreateCursor() the content of SwSelPaintRects is exchanged. To // make a complete swap access to m_pCursorOverlay is needed there void swapContent(SwSelPaintRects& rSwap); @@ -108,14 +108,14 @@ public: m_bShowTextInputFieldOverlay = bShow; } - const SwCrsrShell* GetShell() const { return m_pCursorShell; } + const SwCursorShell* GetShell() const { return m_pCursorShell; } // check current MapMode of the shell and set possibly the static members. // Optional set the parameters pX, pY static void Get1PixelInLogic( const SwViewShell& rSh, long* pX = nullptr, long* pY = nullptr ); }; -class SwShellCrsr : public virtual SwCursor, public SwSelPaintRects +class SwShellCursor : public virtual SwCursor, public SwSelPaintRects { private: // Document positions of start/end characters of a SSelection. @@ -126,12 +126,12 @@ private: using SwCursor::UpDown; public: - SwShellCrsr( const SwCrsrShell& rCrsrSh, const SwPosition &rPos ); - SwShellCrsr( const SwCrsrShell& rCrsrSh, const SwPosition &rPos, + SwShellCursor( const SwCursorShell& rCursorSh, const SwPosition &rPos ); + SwShellCursor( const SwCursorShell& rCursorSh, const SwPosition &rPos, const Point& rPtPos, SwPaM* pRing = nullptr ); // note: *intentionally* links the new shell cursor into the old one's Ring - SwShellCrsr( SwShellCrsr& ); - virtual ~SwShellCrsr(); + SwShellCursor( SwShellCursor& ); + virtual ~SwShellCursor(); virtual void FillRects() override; // For Table- und normal cursors. /// @see SwSelPaintRects::FillStartEnd(), override for text selections. @@ -164,10 +164,10 @@ public: virtual bool IsReadOnlyAvailable() const override; - DECL_FIXEDMEMPOOL_NEWDEL( SwShellCrsr ) + DECL_FIXEDMEMPOOL_NEWDEL( SwShellCursor ) }; -class SwShellTableCrsr : public virtual SwShellCrsr, public virtual SwTableCursor +class SwShellTableCursor : public virtual SwShellCursor, public virtual SwTableCursor { /// Left edge of the selection start (top left cell). SwRect m_aStart; @@ -178,11 +178,11 @@ class SwShellTableCrsr : public virtual SwShellCrsr, public virtual SwTableCurso // it has to be deleted from the other one as well!! public: - SwShellTableCrsr( const SwCrsrShell& rCrsrSh, const SwPosition& rPos ); - SwShellTableCrsr( const SwCrsrShell& rCrsrSh, + SwShellTableCursor( const SwCursorShell& rCursorSh, const SwPosition& rPos ); + SwShellTableCursor( const SwCursorShell& rCursorSh, const SwPosition &rMkPos, const Point& rMkPt, const SwPosition &rPtPos, const Point& rPtPt ); - virtual ~SwShellTableCrsr(); + virtual ~SwShellTableCursor(); virtual void FillRects() override; // For table and normal cursor. /// @see SwSelPaintRects::FillStartEnd(), override for table selections. diff --git a/sw/qa/complex/writer/CheckBookmarks.java b/sw/qa/complex/writer/CheckBookmarks.java index 9acb16aadbc6..a73af1a60cc5 100644 --- a/sw/qa/complex/writer/CheckBookmarks.java +++ b/sw/qa/complex/writer/CheckBookmarks.java @@ -153,35 +153,35 @@ public class CheckBookmarks { xText.createTextCursor(), "P" + nPara + "word" + nBookmark, "P" + nPara + "word" + nBookmark); - XTextCursor xWordCrsr = xText.createTextCursor(); - xWordCrsr.setString(" "); + XTextCursor xWordCursor = xText.createTextCursor(); + xWordCursor.setString(" "); } - XTextCursor xParaCrsr = xText.createTextCursor(); - XTextRange xParaCrsrAsRange = UnoRuntime.queryInterface( + XTextCursor xParaCursor = xText.createTextCursor(); + XTextRange xParaCursorAsRange = UnoRuntime.queryInterface( XTextRange.class, - xParaCrsr); - xText.insertControlCharacter(xParaCrsrAsRange, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false); + xParaCursor); + xText.insertControlCharacter(xParaCursorAsRange, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false); } } private void insertRandomParts(long seed) { java.util.Random rnd = new java.util.Random(seed); - XTextCursor xCrsr = m_xDoc.getText().createTextCursor(); + XTextCursor xCursor = m_xDoc.getText().createTextCursor(); for(int i=0; i<600; i++) { - xCrsr.goRight((short)rnd.nextInt(100), false); - xCrsr.setString(Long.toString(rnd.nextLong())); + xCursor.goRight((short)rnd.nextInt(100), false); + xCursor.setString(Long.toString(rnd.nextLong())); } } private void deleteRandomParts(long seed) { java.util.Random rnd = new java.util.Random(seed); - XTextCursor xCrsr = m_xDoc.getText().createTextCursor(); + XTextCursor xCursor = m_xDoc.getText().createTextCursor(); for(int i=0; i<600; i++) { - xCrsr.goRight((short)rnd.nextInt(100), false); - xCrsr.goRight((short)rnd.nextInt(20), true); - xCrsr.setString(""); + xCursor.goRight((short)rnd.nextInt(100), false); + xCursor.goRight((short)rnd.nextInt(20), true); + xCursor.setString(""); } } @@ -189,13 +189,13 @@ public class CheckBookmarks { { XText xText = m_xDoc.getText(); java.util.Random rnd = new java.util.Random(seed); - XTextCursor xCrsr = m_xDoc.getText().createTextCursor(); + XTextCursor xCursor = m_xDoc.getText().createTextCursor(); for(int i=0; i<30; i++) { - xCrsr.goRight((short)rnd.nextInt(300), false); - XTextRange xCrsrAsRange = UnoRuntime.queryInterface( + xCursor.goRight((short)rnd.nextInt(300), false); + XTextRange xCursorAsRange = UnoRuntime.queryInterface( XTextRange.class, - xCrsr); - xText.insertControlCharacter(xCrsrAsRange, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false); + xCursor); + xText.insertControlCharacter(xCursorAsRange, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false); } } diff --git a/sw/qa/complex/writer/testdocuments/TESTXMLID.odt b/sw/qa/complex/writer/testdocuments/TESTXMLID.odt Binary files differindex 063d392a489f..ba7ceabc2d89 100644 --- a/sw/qa/complex/writer/testdocuments/TESTXMLID.odt +++ b/sw/qa/complex/writer/testdocuments/TESTXMLID.odt diff --git a/sw/qa/core/macros-test.cxx b/sw/qa/core/macros-test.cxx index 2223fd7e752f..6787d4f707bc 100644 --- a/sw/qa/core/macros-test.cxx +++ b/sw/qa/core/macros-test.cxx @@ -439,8 +439,8 @@ void SwMacrosTest::testFindReplace() CPPUNIT_ASSERT(pTextDoc); SwDoc *const pDoc = pTextDoc->GetDocShell()->GetDoc(); SwNodeIndex aIdx(pDoc->GetNodes().GetEndOfContent(), -1); - // use a UnoCrsr so it will be corrected when deleting nodes - auto pPaM(pDoc->CreateUnoCrsr(SwPosition(aIdx))); + // use a UnoCursor so it will be corrected when deleting nodes + auto pPaM(pDoc->CreateUnoCursor(SwPosition(aIdx))); IDocumentContentOperations & rIDCO(pDoc->getIDocumentContentOperations()); rIDCO.InsertString(*pPaM, "foo"); diff --git a/sw/qa/core/test_ToxTextGenerator.cxx b/sw/qa/core/test_ToxTextGenerator.cxx index 2a565ee05a88..983f2ecfa8f4 100644 --- a/sw/qa/core/test_ToxTextGenerator.cxx +++ b/sw/qa/core/test_ToxTextGenerator.cxx @@ -108,7 +108,7 @@ class MockedToxTabStopTokenHandler : public ToxTabStopTokenHandler { public: virtual HandledTabStopToken HandleTabStopToken(const SwFormToken& aToken, const SwTextNode& targetNode, - const SwRootFrm *currentLayout) const override { + const SwRootFrame *currentLayout) const override { (void)(aToken); (void)(targetNode); (void)(currentLayout); // avoid unused warnings. return HandledTabStopToken(); } @@ -128,7 +128,7 @@ public: private: SwChapterField ObtainChapterField(SwChapterFieldType* chapterFieldType, const SwFormToken* chapterToken, - const SwContentFrm* contentFrame, const SwContentNode *contentNode) const override { + const SwContentFrame* contentFrame, const SwContentNode *contentNode) const override { // get rid of 'unused-parameters' warnings (void)(chapterFieldType);(void)(chapterToken);(void)(contentFrame);(void)(contentNode); return mChapterField; diff --git a/sw/qa/extras/inc/swmodeltestbase.hxx b/sw/qa/extras/inc/swmodeltestbase.hxx index 09b3a95a429a..8a51f82b97df 100644 --- a/sw/qa/extras/inc/swmodeltestbase.hxx +++ b/sw/qa/extras/inc/swmodeltestbase.hxx @@ -303,7 +303,7 @@ private: SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get()); CPPUNIT_ASSERT(pTextDoc); SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc(); - SwRootFrm* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout(); + SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout(); pLayout->dumpAsXml(pXmlWriter); // delete xml writer diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx index 64be393bf170..7aa34f374fea 100644 --- a/sw/qa/extras/odfimport/odfimport.cxx +++ b/sw/qa/extras/odfimport/odfimport.cxx @@ -459,20 +459,20 @@ DECLARE_ODFIMPORT_TEST(testFdo37606, "fdo37606.odt") SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get()); CPPUNIT_ASSERT(pTextDoc); SwWrtShell* pWrtShell = pTextDoc->GetDocShell()->GetWrtShell(); - SwShellCrsr* pShellCrsr = pWrtShell->getShellCrsr(false); + SwShellCursor* pShellCursor = pWrtShell->getShellCursor(false); { pWrtShell->SelAll(); // Selects A1. - SwTextNode& rCellEnd = dynamic_cast<SwTextNode&>(pShellCrsr->End()->nNode.GetNode()); + SwTextNode& rCellEnd = dynamic_cast<SwTextNode&>(pShellCursor->End()->nNode.GetNode()); // fdo#72486 This was "Hello.", i.e. a single select-all selected the whole document, not just the cell only. CPPUNIT_ASSERT_EQUAL(OUString("A1"), rCellEnd.GetText()); pWrtShell->SelAll(); // Selects the whole table. pWrtShell->SelAll(); // Selects the whole document. - SwTextNode& rStart = dynamic_cast<SwTextNode&>(pShellCrsr->Start()->nNode.GetNode()); + SwTextNode& rStart = dynamic_cast<SwTextNode&>(pShellCursor->Start()->nNode.GetNode()); CPPUNIT_ASSERT_EQUAL(OUString("A1"), rStart.GetText()); - SwTextNode& rEnd = dynamic_cast<SwTextNode&>(pShellCrsr->End()->nNode.GetNode()); + SwTextNode& rEnd = dynamic_cast<SwTextNode&>(pShellCursor->End()->nNode.GetNode()); // This was "A1", i.e. Ctrl-A only selected the A1 cell of the table, not the whole document. CPPUNIT_ASSERT_EQUAL(OUString("Hello."), rEnd.GetText()); } @@ -480,11 +480,11 @@ DECLARE_ODFIMPORT_TEST(testFdo37606, "fdo37606.odt") { pWrtShell->SttEndDoc(false); // Go to the end of the doc. pWrtShell->SelAll(); // And now that we're outside of the table, try Ctrl-A again. - SwTextNode& rStart = dynamic_cast<SwTextNode&>(pShellCrsr->Start()->nNode.GetNode()); + SwTextNode& rStart = dynamic_cast<SwTextNode&>(pShellCursor->Start()->nNode.GetNode()); // This was "Hello", i.e. Ctrl-A did not select the starting table. CPPUNIT_ASSERT_EQUAL(OUString("A1"), rStart.GetText()); - SwTextNode& rEnd = dynamic_cast<SwTextNode&>(pShellCrsr->End()->nNode.GetNode()); + SwTextNode& rEnd = dynamic_cast<SwTextNode&>(pShellCursor->End()->nNode.GetNode()); CPPUNIT_ASSERT_EQUAL(OUString("Hello."), rEnd.GetText()); } @@ -534,16 +534,16 @@ DECLARE_ODFIMPORT_TEST(testFdo69862, "fdo69862.odt") SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get()); CPPUNIT_ASSERT(pTextDoc); SwWrtShell* pWrtShell = pTextDoc->GetDocShell()->GetWrtShell(); - SwShellCrsr* pShellCrsr = pWrtShell->getShellCrsr(false); + SwShellCursor* pShellCursor = pWrtShell->getShellCursor(false); pWrtShell->SelAll(); // Selects A1. pWrtShell->SelAll(); // Selects the whole table. pWrtShell->SelAll(); // Selects the whole document. - SwTextNode& rStart = dynamic_cast<SwTextNode&>(pShellCrsr->Start()->nNode.GetNode()); + SwTextNode& rStart = dynamic_cast<SwTextNode&>(pShellCursor->Start()->nNode.GetNode()); // This was "Footnote.", as Ctrl-A also selected footnotes, but it should not. CPPUNIT_ASSERT_EQUAL(OUString("A1"), rStart.GetText()); - SwTextNode& rEnd = dynamic_cast<SwTextNode&>(pShellCrsr->End()->nNode.GetNode()); + SwTextNode& rEnd = dynamic_cast<SwTextNode&>(pShellCursor->End()->nNode.GetNode()); CPPUNIT_ASSERT_EQUAL(OUString("H" "\x01" "ello."), rEnd.GetText()); } @@ -553,16 +553,16 @@ DECLARE_ODFIMPORT_TEST(testFdo69979, "fdo69979.odt") SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get()); CPPUNIT_ASSERT(pTextDoc); SwWrtShell* pWrtShell = pTextDoc->GetDocShell()->GetWrtShell(); - SwShellCrsr* pShellCrsr = pWrtShell->getShellCrsr(false); + SwShellCursor* pShellCursor = pWrtShell->getShellCursor(false); pWrtShell->SelAll(); // Selects A1. pWrtShell->SelAll(); // Selects the whole table. pWrtShell->SelAll(); // Selects the whole document. - SwTextNode& rStart = dynamic_cast<SwTextNode&>(pShellCrsr->Start()->nNode.GetNode()); + SwTextNode& rStart = dynamic_cast<SwTextNode&>(pShellCursor->Start()->nNode.GetNode()); // This was "", as Ctrl-A also selected headers, but it should not. CPPUNIT_ASSERT_EQUAL(OUString("A1"), rStart.GetText()); - SwTextNode& rEnd = dynamic_cast<SwTextNode&>(pShellCrsr->End()->nNode.GetNode()); + SwTextNode& rEnd = dynamic_cast<SwTextNode&>(pShellCursor->End()->nNode.GetNode()); CPPUNIT_ASSERT_EQUAL(OUString("Hello."), rEnd.GetText()); } diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx b/sw/qa/extras/tiledrendering/tiledrendering.cxx index 858e6a4332fc..a975fff35ade 100644 --- a/sw/qa/extras/tiledrendering/tiledrendering.cxx +++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx @@ -168,14 +168,14 @@ void SwTiledRenderingTest::testPostKeyEvent() SwXTextDocument* pXTextDocument = createDoc("dummy.fodt"); SwWrtShell* pWrtShell = pXTextDocument->GetDocShell()->GetWrtShell(); pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false); - SwShellCrsr* pShellCrsr = pWrtShell->getShellCrsr(false); + SwShellCursor* pShellCursor = pWrtShell->getShellCursor(false); // Did we manage to go after the first character? - CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), pShellCrsr->GetPoint()->nContent.GetIndex()); + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), pShellCursor->GetPoint()->nContent.GetIndex()); pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 'x', 0); pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 'x', 0); // Did we manage to insert the character after the first one? - CPPUNIT_ASSERT_EQUAL(OUString("Axaa bbb."), pShellCrsr->GetPoint()->nNode.GetNode().GetTextNode()->GetText()); + CPPUNIT_ASSERT_EQUAL(OUString("Axaa bbb."), pShellCursor->GetPoint()->nNode.GetNode().GetTextNode()->GetText()); } void SwTiledRenderingTest::testPostMouseEvent() @@ -183,16 +183,16 @@ void SwTiledRenderingTest::testPostMouseEvent() SwXTextDocument* pXTextDocument = createDoc("dummy.fodt"); SwWrtShell* pWrtShell = pXTextDocument->GetDocShell()->GetWrtShell(); pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false); - SwShellCrsr* pShellCrsr = pWrtShell->getShellCrsr(false); + SwShellCursor* pShellCursor = pWrtShell->getShellCursor(false); // Did we manage to go after the first character? - CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), pShellCrsr->GetPoint()->nContent.GetIndex()); + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), pShellCursor->GetPoint()->nContent.GetIndex()); - Point aStart = pShellCrsr->GetSttPos(); + Point aStart = pShellCursor->GetSttPos(); aStart.setX(aStart.getX() - 1000); pXTextDocument->postMouseEvent(LOK_MOUSEEVENT_MOUSEBUTTONDOWN, aStart.getX(), aStart.getY(), 1); pXTextDocument->postMouseEvent(LOK_MOUSEEVENT_MOUSEBUTTONUP, aStart.getX(), aStart.getY(), 1); // The new cursor position must be before the first word. - CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), pShellCrsr->GetPoint()->nContent.GetIndex()); + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), pShellCursor->GetPoint()->nContent.GetIndex()); } void SwTiledRenderingTest::testSetTextSelection() @@ -203,21 +203,21 @@ void SwTiledRenderingTest::testSetTextSelection() pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/false, 5, /*bBasicCall=*/false); // Create a selection by on the word. pWrtShell->SelWrd(); - SwShellCrsr* pShellCrsr = pWrtShell->getShellCrsr(false); + SwShellCursor* pShellCursor = pWrtShell->getShellCursor(false); // Did we indeed manage to select the second word? - CPPUNIT_ASSERT_EQUAL(OUString("bbb"), pShellCrsr->GetText()); + CPPUNIT_ASSERT_EQUAL(OUString("bbb"), pShellCursor->GetText()); // Now use setTextSelection() to move the start of the selection 1000 twips left. - Point aStart = pShellCrsr->GetSttPos(); + Point aStart = pShellCursor->GetSttPos(); aStart.setX(aStart.getX() - 1000); pXTextDocument->setTextSelection(LOK_SETTEXTSELECTION_START, aStart.getX(), aStart.getY()); // The new selection must include the first word, too -- but not the ending dot. - CPPUNIT_ASSERT_EQUAL(OUString("Aaa bbb"), pShellCrsr->GetText()); + CPPUNIT_ASSERT_EQUAL(OUString("Aaa bbb"), pShellCursor->GetText()); // Next: test that LOK_SETTEXTSELECTION_RESET + LOK_SETTEXTSELECTION_END can be used to create a selection. pXTextDocument->setTextSelection(LOK_SETTEXTSELECTION_RESET, aStart.getX(), aStart.getY()); pXTextDocument->setTextSelection(LOK_SETTEXTSELECTION_END, aStart.getX() + 1000, aStart.getY()); - CPPUNIT_ASSERT_EQUAL(OUString("Aaa b"), pShellCrsr->GetText()); + CPPUNIT_ASSERT_EQUAL(OUString("Aaa b"), pShellCursor->GetText()); } void SwTiledRenderingTest::testGetTextSelection() @@ -283,25 +283,25 @@ void SwTiledRenderingTest::testResetSelection() SwWrtShell* pWrtShell = pXTextDocument->GetDocShell()->GetWrtShell(); // Select one character. pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/true, 1, /*bBasicCall=*/false); - SwShellCrsr* pShellCrsr = pWrtShell->getShellCrsr(false); + SwShellCursor* pShellCursor = pWrtShell->getShellCursor(false); // We have a text selection. - CPPUNIT_ASSERT(pShellCrsr->HasMark()); + CPPUNIT_ASSERT(pShellCursor->HasMark()); pXTextDocument->resetSelection(); // We no longer have a text selection. - CPPUNIT_ASSERT(!pShellCrsr->HasMark()); + CPPUNIT_ASSERT(!pShellCursor->HasMark()); SdrPage* pPage = pWrtShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0); SdrObject* pObject = pPage->GetObj(0); Point aPoint = pObject->GetSnapRect().Center(); // Select the shape. - pWrtShell->EnterSelFrmMode(&aPoint); + pWrtShell->EnterSelFrameMode(&aPoint); // We have a graphic selection. - CPPUNIT_ASSERT(pWrtShell->IsSelFrmMode()); + CPPUNIT_ASSERT(pWrtShell->IsSelFrameMode()); pXTextDocument->resetSelection(); // We no longer have a graphic selection. - CPPUNIT_ASSERT(!pWrtShell->IsSelFrmMode()); + CPPUNIT_ASSERT(!pWrtShell->IsSelFrameMode()); } void lcl_search(bool bBackward) @@ -321,12 +321,12 @@ void SwTiledRenderingTest::testSearch() SwXTextDocument* pXTextDocument = createDoc("search.odt"); pXTextDocument->registerCallback(&SwTiledRenderingTest::callback, this); SwWrtShell* pWrtShell = pXTextDocument->GetDocShell()->GetWrtShell(); - size_t nNode = pWrtShell->getShellCrsr(false)->Start()->nNode.GetNode().GetIndex(); + size_t nNode = pWrtShell->getShellCursor(false)->Start()->nNode.GetNode().GetIndex(); // First hit, in the second paragraph, before the shape. lcl_search(false); CPPUNIT_ASSERT(!pWrtShell->GetDrawView()->GetTextEditObject()); - size_t nActual = pWrtShell->getShellCrsr(false)->Start()->nNode.GetNode().GetIndex(); + size_t nActual = pWrtShell->getShellCursor(false)->Start()->nNode.GetNode().GetIndex(); CPPUNIT_ASSERT_EQUAL(nNode + 1, nActual); /// Make sure we get search result selection for normal find as well, not only find all. CPPUNIT_ASSERT(!m_aSearchResultSelection.empty()); @@ -342,7 +342,7 @@ void SwTiledRenderingTest::testSearch() // Last hit, in the last paragraph, after the shape. lcl_search(false); CPPUNIT_ASSERT(!pWrtShell->GetDrawView()->GetTextEditObject()); - nActual = pWrtShell->getShellCrsr(false)->Start()->nNode.GetNode().GetIndex(); + nActual = pWrtShell->getShellCursor(false)->Start()->nNode.GetNode().GetIndex(); CPPUNIT_ASSERT_EQUAL(nNode + 7, nActual); // Now change direction and make sure that the first 2 hits are in the shape, but not the 3rd one. @@ -352,7 +352,7 @@ void SwTiledRenderingTest::testSearch() CPPUNIT_ASSERT(pWrtShell->GetDrawView()->GetTextEditObject()); lcl_search(true); CPPUNIT_ASSERT(!pWrtShell->GetDrawView()->GetTextEditObject()); - nActual = pWrtShell->getShellCrsr(false)->Start()->nNode.GetNode().GetIndex(); + nActual = pWrtShell->getShellCursor(false)->Start()->nNode.GetNode().GetIndex(); CPPUNIT_ASSERT_EQUAL(nNode + 1, nActual); comphelper::LibreOfficeKit::setActive(false); @@ -364,9 +364,9 @@ void SwTiledRenderingTest::testSearchViewArea() SwWrtShell* pWrtShell = pXTextDocument->GetDocShell()->GetWrtShell(); // Go to the second page, 1-based. pWrtShell->GotoPage(2, false); - SwShellCrsr* pShellCrsr = pWrtShell->getShellCrsr(false); + SwShellCursor* pShellCursor = pWrtShell->getShellCursor(false); // Get the ~top left corner of the second page. - Point aPoint = pShellCrsr->GetSttPos(); + Point aPoint = pShellCursor->GetSttPos(); // Go back to the first page, search while the cursor is there, but the // visible area is the second page. @@ -380,7 +380,7 @@ void SwTiledRenderingTest::testSearchViewArea() })); comphelper::dispatchCommand(".uno:ExecuteSearch", aPropertyValues); // This was just "Heading", i.e. SwView::SearchAndWrap() did not search from only the top of the second page. - CPPUNIT_ASSERT_EQUAL(OUString("Heading on second page"), pShellCrsr->GetPoint()->nNode.GetNode().GetTextNode()->GetText()); + CPPUNIT_ASSERT_EQUAL(OUString("Heading on second page"), pShellCursor->GetPoint()->nNode.GetNode().GetTextNode()->GetText()); } void SwTiledRenderingTest::testSearchTextFrame() diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index 89378366b41d..c69f3306a048 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -392,7 +392,7 @@ void SwUiWriterTest::testTdf67238() sw::UndoManager& rUndoManager = pDoc->GetUndoManager(); //insert a 3X3 table in the newly created document SwInsertTableOptions TableOpt(tabopts::DEFAULT_BORDER, 0); - const SwTable& rTbl = pWrtShell->InsertTable(TableOpt, 3, 3); + const SwTable& rTable = pWrtShell->InsertTable(TableOpt, 3, 3); //checking for the rows and columns uno::Reference<text::XTextTable> xTable(getParagraphOrTable(1), uno::UNO_QUERY); CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTable->getRows()->getCount()); @@ -403,78 +403,78 @@ void SwUiWriterTest::testTdf67238() //making the table protected pWrtShell->ProtectCells(); //checking each cell's protection, it should be protected - CPPUNIT_ASSERT(((rTbl.GetTableBox("A1"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(((rTbl.GetTableBox("A2"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(((rTbl.GetTableBox("A3"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(((rTbl.GetTableBox("B1"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(((rTbl.GetTableBox("B2"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(((rTbl.GetTableBox("B3"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(((rTbl.GetTableBox("C1"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(((rTbl.GetTableBox("C2"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(((rTbl.GetTableBox("C3"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(((rTable.GetTableBox("A1"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(((rTable.GetTableBox("A2"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(((rTable.GetTableBox("A3"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(((rTable.GetTableBox("B1"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(((rTable.GetTableBox("B2"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(((rTable.GetTableBox("B3"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(((rTable.GetTableBox("C1"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(((rTable.GetTableBox("C2"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(((rTable.GetTableBox("C3"))->GetFrameFormat()->GetProtect()).IsContentProtected()); //undo the changes, make cells [un]protected rUndoManager.Undo(); //checking each cell's protection, it should be [un]protected - CPPUNIT_ASSERT(!((rTbl.GetTableBox("A1"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(!((rTbl.GetTableBox("A2"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(!((rTbl.GetTableBox("A3"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(!((rTbl.GetTableBox("B1"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(!((rTbl.GetTableBox("B2"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(!((rTbl.GetTableBox("B3"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(!((rTbl.GetTableBox("C1"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(!((rTbl.GetTableBox("C2"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(!((rTbl.GetTableBox("C3"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(!((rTable.GetTableBox("A1"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(!((rTable.GetTableBox("A2"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(!((rTable.GetTableBox("A3"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(!((rTable.GetTableBox("B1"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(!((rTable.GetTableBox("B2"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(!((rTable.GetTableBox("B3"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(!((rTable.GetTableBox("C1"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(!((rTable.GetTableBox("C2"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(!((rTable.GetTableBox("C3"))->GetFrameFormat()->GetProtect()).IsContentProtected()); //redo the changes, make cells protected rUndoManager.Redo(); //checking each cell's protection, it should be protected - CPPUNIT_ASSERT(((rTbl.GetTableBox("A1"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(((rTbl.GetTableBox("A2"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(((rTbl.GetTableBox("A3"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(((rTbl.GetTableBox("B1"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(((rTbl.GetTableBox("B2"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(((rTbl.GetTableBox("B3"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(((rTbl.GetTableBox("C1"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(((rTbl.GetTableBox("C2"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(((rTbl.GetTableBox("C3"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(((rTable.GetTableBox("A1"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(((rTable.GetTableBox("A2"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(((rTable.GetTableBox("A3"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(((rTable.GetTableBox("B1"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(((rTable.GetTableBox("B2"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(((rTable.GetTableBox("B3"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(((rTable.GetTableBox("C1"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(((rTable.GetTableBox("C2"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(((rTable.GetTableBox("C3"))->GetFrameFormat()->GetProtect()).IsContentProtected()); //moving the cursor to the starting of the document pWrtShell->SttDoc(); //making the table [un]protected pWrtShell->SelTable(); pWrtShell->UnProtectCells(); //checking each cell's protection, it should be [un]protected - CPPUNIT_ASSERT(!((rTbl.GetTableBox("A1"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(!((rTbl.GetTableBox("A2"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(!((rTbl.GetTableBox("A3"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(!((rTbl.GetTableBox("B1"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(!((rTbl.GetTableBox("B2"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(!((rTbl.GetTableBox("B3"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(!((rTbl.GetTableBox("C1"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(!((rTbl.GetTableBox("C2"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(!((rTbl.GetTableBox("C3"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(!((rTable.GetTableBox("A1"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(!((rTable.GetTableBox("A2"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(!((rTable.GetTableBox("A3"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(!((rTable.GetTableBox("B1"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(!((rTable.GetTableBox("B2"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(!((rTable.GetTableBox("B3"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(!((rTable.GetTableBox("C1"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(!((rTable.GetTableBox("C2"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(!((rTable.GetTableBox("C3"))->GetFrameFormat()->GetProtect()).IsContentProtected()); //undo the changes, make cells protected rUndoManager.Undo(); //checking each cell's protection, it should be protected - CPPUNIT_ASSERT(((rTbl.GetTableBox("A1"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(((rTbl.GetTableBox("A2"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(((rTbl.GetTableBox("A3"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(((rTbl.GetTableBox("B1"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(((rTbl.GetTableBox("B2"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(((rTbl.GetTableBox("B3"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(((rTbl.GetTableBox("C1"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(((rTbl.GetTableBox("C2"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(((rTbl.GetTableBox("C3"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(((rTable.GetTableBox("A1"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(((rTable.GetTableBox("A2"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(((rTable.GetTableBox("A3"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(((rTable.GetTableBox("B1"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(((rTable.GetTableBox("B2"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(((rTable.GetTableBox("B3"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(((rTable.GetTableBox("C1"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(((rTable.GetTableBox("C2"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(((rTable.GetTableBox("C3"))->GetFrameFormat()->GetProtect()).IsContentProtected()); //redo the changes, make cells [un]protected rUndoManager.Redo(); //checking each cell's protection, it should be [un]protected - CPPUNIT_ASSERT(!((rTbl.GetTableBox("A1"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(!((rTbl.GetTableBox("A2"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(!((rTbl.GetTableBox("A3"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(!((rTbl.GetTableBox("B1"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(!((rTbl.GetTableBox("B2"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(!((rTbl.GetTableBox("B3"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(!((rTbl.GetTableBox("C1"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(!((rTbl.GetTableBox("C2"))->GetFrameFormat()->GetProtect()).IsContentProtected()); - CPPUNIT_ASSERT(!((rTbl.GetTableBox("C3"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(!((rTable.GetTableBox("A1"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(!((rTable.GetTableBox("A2"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(!((rTable.GetTableBox("A3"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(!((rTable.GetTableBox("B1"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(!((rTable.GetTableBox("B2"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(!((rTable.GetTableBox("B3"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(!((rTable.GetTableBox("C1"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(!((rTable.GetTableBox("C2"))->GetFrameFormat()->GetProtect()).IsContentProtected()); + CPPUNIT_ASSERT(!((rTable.GetTableBox("C3"))->GetFrameFormat()->GetProtect()).IsContentProtected()); } void SwUiWriterTest::testFdo75110() @@ -499,8 +499,8 @@ void SwUiWriterTest::testFdo75898() pWrtShell->InsertRow(1, true); // Now check if the table has 3 lines. - SwShellCrsr* pShellCrsr = pWrtShell->getShellCrsr(false); - SwTableNode* pTableNode = pShellCrsr->Start()->nNode.GetNode().FindTableNode(); + SwShellCursor* pShellCursor = pWrtShell->getShellCursor(false); + SwTableNode* pTableNode = pShellCursor->Start()->nNode.GetNode().FindTableNode(); // This was 1, when doing the same using the UI, Writer even crashed. CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(3), pTableNode->GetTable().GetTabLines().size()); } @@ -535,8 +535,8 @@ void SwUiWriterTest::testFdo69893() pWrtShell->SelAll(); // A1 is empty -> selects the whole table. pWrtShell->SelAll(); // Selects the whole document. - SwShellCrsr* pShellCrsr = pWrtShell->getShellCrsr(false); - SwTextNode& rEnd = dynamic_cast<SwTextNode&>(pShellCrsr->End()->nNode.GetNode()); + SwShellCursor* pShellCursor = pWrtShell->getShellCursor(false); + SwTextNode& rEnd = dynamic_cast<SwTextNode&>(pShellCursor->End()->nNode.GetNode()); // Selection did not include the para after table, this was "B1". CPPUNIT_ASSERT_EQUAL(OUString("Para after table."), rEnd.GetText()); } @@ -581,12 +581,12 @@ void SwUiWriterTest::testImportRTF() // Insert the RTF at the cursor position. OString aData = "{\\rtf1 Hello world!\\par}"; SvMemoryStream aStream(const_cast<sal_Char*>(aData.getStr()), aData.getLength(), StreamMode::READ); - SwReader aReader(aStream, OUString(), OUString(), *pWrtShell->GetCrsr()); + SwReader aReader(aStream, OUString(), OUString(), *pWrtShell->GetCursor()); Reader* pRTFReader = SwReaderWriter::GetReader(READER_WRITER_RTF); CPPUNIT_ASSERT(pRTFReader != nullptr); CPPUNIT_ASSERT_EQUAL(sal_uLong(0), aReader.Read(*pRTFReader)); - sal_uLong nIndex = pWrtShell->GetCrsr()->GetNode().GetIndex(); + sal_uLong nIndex = pWrtShell->GetCursor()->GetNode().GetIndex(); CPPUNIT_ASSERT_EQUAL(OUString("fooHello world!"), pDoc->GetNodes()[nIndex - 1]->GetTextNode()->GetText()); CPPUNIT_ASSERT_EQUAL(OUString("bar"), pDoc->GetNodes()[nIndex]->GetTextNode()->GetText()); } @@ -790,9 +790,9 @@ void SwUiWriterTest::testCommentedWord() pWrtShell->SelWrd(); // Make sure that not only the word, but its comment anchor is also selected. - SwShellCrsr* pShellCrsr = pWrtShell->getShellCrsr(false); + SwShellCursor* pShellCursor = pWrtShell->getShellCursor(false); // This was 9, only "word", not "word<anchor character>" was selected. - CPPUNIT_ASSERT_EQUAL(sal_Int32(10), pShellCrsr->End()->nContent.GetIndex()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(10), pShellCursor->End()->nContent.GetIndex()); // Test that getAnchor() points to "word", not to an empty string. uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY); @@ -937,13 +937,13 @@ void SwUiWriterTest::testAutoCorr() //Normal AutoCorrect pWrtShell->Insert("tset"); pWrtShell->AutoCorrect(corr, cIns); - sal_uLong nIndex = pWrtShell->GetCrsr()->GetNode().GetIndex(); + sal_uLong nIndex = pWrtShell->GetCursor()->GetNode().GetIndex(); CPPUNIT_ASSERT_EQUAL(OUString("Test "), static_cast<SwTextNode*>(pDoc->GetNodes()[nIndex])->GetText()); //AutoCorrect with change style to bolt pWrtShell->Insert("Bolt"); pWrtShell->AutoCorrect(corr, cIns); - nIndex = pWrtShell->GetCrsr()->GetNode().GetIndex(); + nIndex = pWrtShell->GetCursor()->GetNode().GetIndex(); const uno::Reference< text::XTextRange > xRun = getRun(getParagraph(1), 2); CPPUNIT_ASSERT_EQUAL(OUString("Bolt"), xRun->getString()); CPPUNIT_ASSERT_EQUAL(OUString("Arial"), getProperty<OUString>(xRun, "CharFontName")); @@ -1475,35 +1475,35 @@ void SwUiWriterTest::testTextSearch() { // Create a new empty Writer document SwDoc* pDoc = createDoc(); - SwPaM* pCrsr = pDoc->GetEditShell()->GetCrsr(); + SwPaM* pCursor = pDoc->GetEditShell()->GetCursor(); IDocumentContentOperations & rIDCO(pDoc->getIDocumentContentOperations()); // Insert some text - rIDCO.InsertString(*pCrsr, "Hello World This is a test"); + rIDCO.InsertString(*pCursor, "Hello World This is a test"); // Use cursor to select part of text for (int i = 0; i < 10; i++) { - pCrsr->Move(fnMoveBackward); + pCursor->Move(fnMoveBackward); } - pCrsr->SetMark(); + pCursor->SetMark(); for(int i = 0; i < 4; i++) { - pCrsr->Move(fnMoveBackward); + pCursor->Move(fnMoveBackward); } //Checking that the proper selection is made - CPPUNIT_ASSERT_EQUAL(OUString("This"), pCrsr->GetText()); + CPPUNIT_ASSERT_EQUAL(OUString("This"), pCursor->GetText()); // Apply a "Bold" attribute to selection SvxWeightItem aWeightItem(WEIGHT_BOLD, RES_CHRATR_WEIGHT); - rIDCO.InsertPoolItem(*pCrsr, aWeightItem); + rIDCO.InsertPoolItem(*pCursor, aWeightItem); //making another selection of text for (int i = 0; i < 7; i++) { - pCrsr->Move(fnMoveBackward); + pCursor->Move(fnMoveBackward); } - pCrsr->SetMark(); + pCursor->SetMark(); for(int i = 0; i < 5; i++) { - pCrsr->Move(fnMoveBackward); + pCursor->Move(fnMoveBackward); } //Checking that the proper selection is made - CPPUNIT_ASSERT_EQUAL(OUString("Hello"), pCrsr->GetText()); + CPPUNIT_ASSERT_EQUAL(OUString("Hello"), pCursor->GetText()); // Apply a "Bold" attribute to selection - rIDCO.InsertPoolItem(*pCrsr, aWeightItem); + rIDCO.InsertPoolItem(*pCursor, aWeightItem); //Performing Search Operation and also covering the UNO coverage for setProperty uno::Reference<util::XSearchable> xSearch(mxComponent, uno::UNO_QUERY); uno::Reference<util::XSearchDescriptor> xSearchDes(xSearch->createSearchDescriptor(), uno::UNO_QUERY); @@ -1742,25 +1742,25 @@ void SwUiWriterTest::testTdf60967() { SwDoc* pDoc = createDoc(); SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); - SwPaM* pCrsr = pDoc->GetEditShell()->GetCrsr(); + SwPaM* pCursor = pDoc->GetEditShell()->GetCursor(); sw::UndoManager& rUndoManager = pDoc->GetUndoManager(); pWrtShell->ChangeHeaderOrFooter("Default Style", true, true, true); //Inserting table SwInsertTableOptions TableOpt(tabopts::DEFAULT_BORDER, 0); pWrtShell->InsertTable(TableOpt, 2, 2); //getting the cursor's position just after the table insert - SwPosition aPosAfterTable(*(pCrsr->GetPoint())); + SwPosition aPosAfterTable(*(pCursor->GetPoint())); //moving cursor to B2 (bottom right cell) - pCrsr->Move(fnMoveBackward); - SwPosition aPosInTable(*(pCrsr->GetPoint())); + pCursor->Move(fnMoveBackward); + SwPosition aPosInTable(*(pCursor->GetPoint())); //deleting paragraph following table with Ctrl+Shift+Del sal_Int32 val = pWrtShell->DelToEndOfSentence(); CPPUNIT_ASSERT_EQUAL(sal_Int32(1), val); //getting the cursor's position just after the paragraph deletion - SwPosition aPosAfterDel(*(pCrsr->GetPoint())); + SwPosition aPosAfterDel(*(pCursor->GetPoint())); //moving cursor forward to check whether there is any node following the table, BTW there should not be any such node - pCrsr->Move(fnMoveForward); - SwPosition aPosMoveAfterDel(*(pCrsr->GetPoint())); + pCursor->Move(fnMoveForward); + SwPosition aPosMoveAfterDel(*(pCursor->GetPoint())); //checking the positions to verify that the paragraph is actually deleted CPPUNIT_ASSERT(aPosInTable == aPosAfterDel); CPPUNIT_ASSERT(aPosInTable == aPosMoveAfterDel); @@ -1768,12 +1768,12 @@ void SwUiWriterTest::testTdf60967() rUndoManager.Undo(); { //paragraph *text node* should be back - SwPosition aPosAfterUndo(*(pCrsr->GetPoint())); + SwPosition aPosAfterUndo(*(pCursor->GetPoint())); //after undo aPosAfterTable increases the node position by one, since this contains the position *text node* so aPosAfterUndo should be less than aPosAfterTable CPPUNIT_ASSERT(aPosAfterTable > aPosAfterUndo); //moving cursor forward to check whether there is any node following the paragraph, BTW there should not be any such node as paragraph node is the last one in header - pCrsr->Move(fnMoveForward); - SwPosition aPosMoveAfterUndo(*(pCrsr->GetPoint())); + pCursor->Move(fnMoveForward); + SwPosition aPosMoveAfterUndo(*(pCursor->GetPoint())); //checking positions to verify that paragraph node is the last one and we are paragraph node only CPPUNIT_ASSERT(aPosAfterTable > aPosMoveAfterUndo); CPPUNIT_ASSERT(aPosMoveAfterUndo == aPosAfterUndo); @@ -1781,12 +1781,12 @@ void SwUiWriterTest::testTdf60967() //Redo the changes rUndoManager.Redo(); //paragraph *text node* should not be there - SwPosition aPosAfterRedo(*(pCrsr->GetPoint())); + SwPosition aPosAfterRedo(*(pCursor->GetPoint())); //position should be exactly same as it was after deletion of *text node* CPPUNIT_ASSERT(aPosMoveAfterDel == aPosAfterRedo); //moving the cursor forward, but it should not actually move as there is no *text node* after the table due to this same position is expected after move as it was before move - pCrsr->Move(fnMoveForward); - SwPosition aPosAfterUndoMove(*(pCrsr->GetPoint())); + pCursor->Move(fnMoveForward); + SwPosition aPosAfterUndoMove(*(pCursor->GetPoint())); CPPUNIT_ASSERT(aPosAfterUndoMove == aPosAfterRedo); } @@ -1812,15 +1812,15 @@ void SwUiWriterTest::testSearchWithTransliterate() SearchOpt.transliterateFlags = css::i18n::TransliterationModulesExtra::IGNORE_DIACRITICS_CTL; //transliteration option set so that at least one of the search strings is not found sal_uLong case1 = pWrtShell->SearchPattern(SearchOpt,true,DOCPOS_START,DOCPOS_END); - SwShellCrsr* pShellCrsr = pWrtShell->getShellCrsr(true); - CPPUNIT_ASSERT_EQUAL(OUString(""),pShellCrsr->GetText()); + SwShellCursor* pShellCursor = pWrtShell->getShellCursor(true); + CPPUNIT_ASSERT_EQUAL(OUString(""),pShellCursor->GetText()); CPPUNIT_ASSERT_EQUAL(0,(int)case1); SearchOpt.searchString = "paragraph"; SearchOpt.transliterateFlags = css::i18n::TransliterationModulesExtra::IGNORE_KASHIDA_CTL; //transliteration option set so that all search strings are found sal_uLong case2 = pWrtShell->SearchPattern(SearchOpt,true,DOCPOS_START,DOCPOS_END); - pShellCrsr = pWrtShell->getShellCrsr(true); - CPPUNIT_ASSERT_EQUAL(OUString("paragraph"),pShellCrsr->GetText()); + pShellCursor = pWrtShell->getShellCursor(true); + CPPUNIT_ASSERT_EQUAL(OUString("paragraph"),pShellCursor->GetText()); CPPUNIT_ASSERT_EQUAL(1,(int)case2); } @@ -1838,7 +1838,7 @@ void SwUiWriterTest::testTdf77342() { SwDoc* pDoc = createDoc(); SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); - SwPaM* pCrsr = pDoc->GetEditShell()->GetCrsr(); + SwPaM* pCursor = pDoc->GetEditShell()->GetCursor(); //inserting first footnote pWrtShell->InsertFootnote(""); SwFieldType* pField = pWrtShell->GetFieldType(0, RES_GETREFFLD); @@ -1851,15 +1851,15 @@ void SwUiWriterTest::testTdf77342() //inserting second footnote pWrtShell->InsertFootnote(""); pWrtShell->SttDoc(); - pCrsr->Move(fnMoveForward); + pCursor->Move(fnMoveForward); //inserting reference field 2 SwGetRefField aField2(pRefType, OUString(""), REF_FOOTNOTE, sal_uInt16(1), REF_CONTENT); pWrtShell->Insert(aField2); //inserting third footnote pWrtShell->InsertFootnote(""); pWrtShell->SttDoc(); - pCrsr->Move(fnMoveForward); - pCrsr->Move(fnMoveForward); + pCursor->Move(fnMoveForward); + pCursor->Move(fnMoveForward); //inserting reference field 3 SwGetRefField aField3(pRefType, OUString(""), REF_FOOTNOTE, sal_uInt16(2), REF_CONTENT); pWrtShell->Insert(aField3); @@ -1873,37 +1873,37 @@ void SwUiWriterTest::testTdf77342() pClpDoc->getIDocumentFieldsAccess().LockExpFields(); //selecting reference field 2 and reference field 3 and footnote 1 and footnote 2 //selection is such that more than one and not all footnotes and ref fields are selected - pCrsr->Move(fnMoveBackward); - pCrsr->Move(fnMoveBackward); + pCursor->Move(fnMoveBackward); + pCursor->Move(fnMoveBackward); //start marking - pCrsr->SetMark(); - pCrsr->Move(fnMoveForward); - pCrsr->Move(fnMoveForward); - pCrsr->Move(fnMoveForward); + pCursor->SetMark(); + pCursor->Move(fnMoveForward); + pCursor->Move(fnMoveForward); + pCursor->Move(fnMoveForward); //copying the selection to clipboard pWrtShell->Copy(pClpDoc); //deleting selection mark after copy - pCrsr->DeleteMark(); + pCursor->DeleteMark(); //checking that the footnotes reference fields have same values after copy operation uno::Any aAny; sal_uInt16 aFormat; //reference field 1 pWrtShell->SttDoc(); - SwField* pRef1 = SwCrsrShell::GetFieldAtCrsr(pCrsr, true); + SwField* pRef1 = SwCursorShell::GetFieldAtCursor(pCursor, true); aFormat = pRef1->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat); pRef1->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1)); CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_uInt16(0)), aAny); //reference field 2 - pCrsr->Move(fnMoveForward); - SwField* pRef2 = SwCrsrShell::GetFieldAtCrsr(pCrsr, true); + pCursor->Move(fnMoveForward); + SwField* pRef2 = SwCursorShell::GetFieldAtCursor(pCursor, true); aFormat = pRef2->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat); pRef2->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1)); CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_uInt16(1)), aAny); //reference field 3 - pCrsr->Move(fnMoveForward); - SwField* pRef3 = SwCrsrShell::GetFieldAtCrsr(pCrsr, true); + pCursor->Move(fnMoveForward); + SwField* pRef3 = SwCursorShell::GetFieldAtCursor(pCursor, true); aFormat = pRef3->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat); pRef3->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1)); @@ -1915,67 +1915,67 @@ void SwUiWriterTest::testTdf77342() //checking the fields, both new and old, for proper values pWrtShell->SttDoc(); //old reference field 1 - SwField* pOldRef11 = SwCrsrShell::GetFieldAtCrsr(pCrsr, true); + SwField* pOldRef11 = SwCursorShell::GetFieldAtCursor(pCursor, true); aFormat = pOldRef11->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat); pOldRef11->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1)); CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_uInt16(0)), aAny); //old reference field 2 - pCrsr->Move(fnMoveForward); - SwField* pOldRef12 = SwCrsrShell::GetFieldAtCrsr(pCrsr, true); + pCursor->Move(fnMoveForward); + SwField* pOldRef12 = SwCursorShell::GetFieldAtCursor(pCursor, true); aFormat = pOldRef12->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat); pOldRef12->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1)); CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_uInt16(1)), aAny); //old reference field 3 - pCrsr->Move(fnMoveForward); - SwField* pOldRef13 = SwCrsrShell::GetFieldAtCrsr(pCrsr, true); + pCursor->Move(fnMoveForward); + SwField* pOldRef13 = SwCursorShell::GetFieldAtCursor(pCursor, true); aFormat = pOldRef13->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat); pOldRef13->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1)); CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_uInt16(2)), aAny); //old footnote 1 - pCrsr->Move(fnMoveForward); - SwTextNode* pTextNd1 = pCrsr->GetNode().GetTextNode(); - SwTextAttr* const pFootnote1 = pTextNd1->GetTextAttrForCharAt(pCrsr->GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN); + pCursor->Move(fnMoveForward); + SwTextNode* pTextNd1 = pCursor->GetNode().GetTextNode(); + SwTextAttr* const pFootnote1 = pTextNd1->GetTextAttrForCharAt(pCursor->GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN); const SwFormatFootnote& rFootnote1(pFootnote1->GetFootnote()); CPPUNIT_ASSERT_EQUAL(sal_uInt16(1), rFootnote1.GetNumber()); SwTextFootnote* pTFNote1 = static_cast<SwTextFootnote*> (pFootnote1); CPPUNIT_ASSERT_EQUAL(sal_uInt16(2), pTFNote1->GetSeqRefNo()); //old footnote 2 - pCrsr->Move(fnMoveForward); - SwTextNode* pTextNd2 = pCrsr->GetNode().GetTextNode(); - SwTextAttr* const pFootnote2 = pTextNd2->GetTextAttrForCharAt(pCrsr->GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN); + pCursor->Move(fnMoveForward); + SwTextNode* pTextNd2 = pCursor->GetNode().GetTextNode(); + SwTextAttr* const pFootnote2 = pTextNd2->GetTextAttrForCharAt(pCursor->GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN); const SwFormatFootnote& rFootnote2(pFootnote2->GetFootnote()); CPPUNIT_ASSERT_EQUAL(sal_uInt16(2), rFootnote2.GetNumber()); SwTextFootnote* pTFNote2 = static_cast<SwTextFootnote*> (pFootnote2); CPPUNIT_ASSERT_EQUAL(sal_uInt16(1), pTFNote2->GetSeqRefNo()); //old footnote 3 - pCrsr->Move(fnMoveForward); - SwTextNode* pTextNd3 = pCrsr->GetNode().GetTextNode(); - SwTextAttr* const pFootnote3 = pTextNd3->GetTextAttrForCharAt(pCrsr->GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN); + pCursor->Move(fnMoveForward); + SwTextNode* pTextNd3 = pCursor->GetNode().GetTextNode(); + SwTextAttr* const pFootnote3 = pTextNd3->GetTextAttrForCharAt(pCursor->GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN); const SwFormatFootnote& rFootnote3(pFootnote3->GetFootnote()); CPPUNIT_ASSERT_EQUAL(sal_uInt16(3), rFootnote3.GetNumber()); SwTextFootnote* pTFNote3 = static_cast<SwTextFootnote*> (pFootnote3); CPPUNIT_ASSERT_EQUAL(sal_uInt16(0), pTFNote3->GetSeqRefNo()); //new reference field 1 - pCrsr->Move(fnMoveForward); - SwField* pNewRef11 = SwCrsrShell::GetFieldAtCrsr(pCrsr, true); + pCursor->Move(fnMoveForward); + SwField* pNewRef11 = SwCursorShell::GetFieldAtCursor(pCursor, true); aFormat = pNewRef11->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat); pNewRef11->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1)); CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_uInt16(1)), aAny); //new reference field 2 - pCrsr->Move(fnMoveForward); - SwField* pNewRef12 = SwCrsrShell::GetFieldAtCrsr(pCrsr, true); + pCursor->Move(fnMoveForward); + SwField* pNewRef12 = SwCursorShell::GetFieldAtCursor(pCursor, true); aFormat = pNewRef12->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat); pNewRef12->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1)); CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_uInt16(3)), aAny); //new footnote 1 - pCrsr->Move(fnMoveForward); - SwTextNode* pTextNd4 = pCrsr->GetNode().GetTextNode(); - SwTextAttr* const pFootnote4 = pTextNd4->GetTextAttrForCharAt(pCrsr->GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN); + pCursor->Move(fnMoveForward); + SwTextNode* pTextNd4 = pCursor->GetNode().GetTextNode(); + SwTextAttr* const pFootnote4 = pTextNd4->GetTextAttrForCharAt(pCursor->GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN); const SwFormatFootnote& rFootnote4(pFootnote4->GetFootnote()); CPPUNIT_ASSERT_EQUAL(sal_uInt16(4), rFootnote4.GetNumber()); SwTextFootnote* pTFNote4 = static_cast<SwTextFootnote*> (pFootnote4); @@ -1987,89 +1987,89 @@ void SwUiWriterTest::testTdf77342() //checking the fields, both new and old, for proper values pWrtShell->SttDoc(); //new reference field 1 - SwField* pNewRef21 = SwCrsrShell::GetFieldAtCrsr(pCrsr, true); + SwField* pNewRef21 = SwCursorShell::GetFieldAtCursor(pCursor, true); aFormat = pNewRef21->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat); pNewRef21->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1)); CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_uInt16(1)), aAny); //new reference field 2 - pCrsr->Move(fnMoveForward); - SwField* pNewRef22 = SwCrsrShell::GetFieldAtCrsr(pCrsr, true); + pCursor->Move(fnMoveForward); + SwField* pNewRef22 = SwCursorShell::GetFieldAtCursor(pCursor, true); aFormat = pNewRef22->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat); pNewRef22->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1)); CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_uInt16(4)), aAny); //new footnote 1 - pCrsr->Move(fnMoveForward); - SwTextNode* pTextNd11 = pCrsr->GetNode().GetTextNode(); - SwTextAttr* const pFootnote11 = pTextNd11->GetTextAttrForCharAt(pCrsr->GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN); + pCursor->Move(fnMoveForward); + SwTextNode* pTextNd11 = pCursor->GetNode().GetTextNode(); + SwTextAttr* const pFootnote11 = pTextNd11->GetTextAttrForCharAt(pCursor->GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN); const SwFormatFootnote& rFootnote11(pFootnote11->GetFootnote()); CPPUNIT_ASSERT_EQUAL(sal_uInt16(1), rFootnote11.GetNumber()); SwTextFootnote* pTFNote11 = static_cast<SwTextFootnote*> (pFootnote11); CPPUNIT_ASSERT_EQUAL(sal_uInt16(4), pTFNote11->GetSeqRefNo()); //old reference field 1 - pCrsr->Move(fnMoveForward); - SwField* pOldRef21 = SwCrsrShell::GetFieldAtCrsr(pCrsr, true); + pCursor->Move(fnMoveForward); + SwField* pOldRef21 = SwCursorShell::GetFieldAtCursor(pCursor, true); aFormat = pOldRef21->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat); pOldRef21->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1)); CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_uInt16(0)), aAny); //old reference field 2 - pCrsr->Move(fnMoveForward); - SwField* pOldRef22 = SwCrsrShell::GetFieldAtCrsr(pCrsr, true); + pCursor->Move(fnMoveForward); + SwField* pOldRef22 = SwCursorShell::GetFieldAtCursor(pCursor, true); aFormat = pOldRef22->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat); pOldRef22->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1)); CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_uInt16(1)), aAny); //old reference field 3 - pCrsr->Move(fnMoveForward); - SwField* pOldRef23 = SwCrsrShell::GetFieldAtCrsr(pCrsr, true); + pCursor->Move(fnMoveForward); + SwField* pOldRef23 = SwCursorShell::GetFieldAtCursor(pCursor, true); aFormat = pOldRef23->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat); pOldRef23->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1)); CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_uInt16(2)), aAny); //old footnote 1 - pCrsr->Move(fnMoveForward); - SwTextNode* pTextNd12 = pCrsr->GetNode().GetTextNode(); - SwTextAttr* const pFootnote12 = pTextNd12->GetTextAttrForCharAt(pCrsr->GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN); + pCursor->Move(fnMoveForward); + SwTextNode* pTextNd12 = pCursor->GetNode().GetTextNode(); + SwTextAttr* const pFootnote12 = pTextNd12->GetTextAttrForCharAt(pCursor->GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN); const SwFormatFootnote& rFootnote12(pFootnote12->GetFootnote()); CPPUNIT_ASSERT_EQUAL(sal_uInt16(2), rFootnote12.GetNumber()); SwTextFootnote* pTFNote12 = static_cast<SwTextFootnote*> (pFootnote12); CPPUNIT_ASSERT_EQUAL(sal_uInt16(2), pTFNote12->GetSeqRefNo()); //old footnote 2 - pCrsr->Move(fnMoveForward); - SwTextNode* pTextNd13 = pCrsr->GetNode().GetTextNode(); - SwTextAttr* const pFootnote13 = pTextNd13->GetTextAttrForCharAt(pCrsr->GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN); + pCursor->Move(fnMoveForward); + SwTextNode* pTextNd13 = pCursor->GetNode().GetTextNode(); + SwTextAttr* const pFootnote13 = pTextNd13->GetTextAttrForCharAt(pCursor->GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN); const SwFormatFootnote& rFootnote13(pFootnote13->GetFootnote()); CPPUNIT_ASSERT_EQUAL(sal_uInt16(3), rFootnote13.GetNumber()); SwTextFootnote* pTFNote13 = static_cast<SwTextFootnote*> (pFootnote13); CPPUNIT_ASSERT_EQUAL(sal_uInt16(1), pTFNote13->GetSeqRefNo()); //old footnote 3 - pCrsr->Move(fnMoveForward); - SwTextNode* pTextNd14 = pCrsr->GetNode().GetTextNode(); - SwTextAttr* const pFootnote14 = pTextNd14->GetTextAttrForCharAt(pCrsr->GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN); + pCursor->Move(fnMoveForward); + SwTextNode* pTextNd14 = pCursor->GetNode().GetTextNode(); + SwTextAttr* const pFootnote14 = pTextNd14->GetTextAttrForCharAt(pCursor->GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN); const SwFormatFootnote& rFootnote14(pFootnote14->GetFootnote()); CPPUNIT_ASSERT_EQUAL(sal_uInt16(4), rFootnote14.GetNumber()); SwTextFootnote* pTFNote14 = static_cast<SwTextFootnote*> (pFootnote14); CPPUNIT_ASSERT_EQUAL(sal_uInt16(0), pTFNote14->GetSeqRefNo()); //old reference field 4 - pCrsr->Move(fnMoveForward); - SwField* pOldRef24 = SwCrsrShell::GetFieldAtCrsr(pCrsr, true); + pCursor->Move(fnMoveForward); + SwField* pOldRef24 = SwCursorShell::GetFieldAtCursor(pCursor, true); aFormat = pOldRef24->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat); pOldRef24->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1)); CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_uInt16(1)), aAny); //old reference field 5 - pCrsr->Move(fnMoveForward); - SwField* pOldRef25 = SwCrsrShell::GetFieldAtCrsr(pCrsr, true); + pCursor->Move(fnMoveForward); + SwField* pOldRef25 = SwCursorShell::GetFieldAtCursor(pCursor, true); aFormat = pOldRef25->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat); pOldRef25->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1)); CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_uInt16(3)), aAny); //old footnote 4 - pCrsr->Move(fnMoveForward); - SwTextNode* pTextNd15 = pCrsr->GetNode().GetTextNode(); - SwTextAttr* const pFootnote15 = pTextNd15->GetTextAttrForCharAt(pCrsr->GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN); + pCursor->Move(fnMoveForward); + SwTextNode* pTextNd15 = pCursor->GetNode().GetTextNode(); + SwTextAttr* const pFootnote15 = pTextNd15->GetTextAttrForCharAt(pCursor->GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN); const SwFormatFootnote& rFootnote15(pFootnote15->GetFootnote()); CPPUNIT_ASSERT_EQUAL(sal_uInt16(5), rFootnote15.GetNumber()); SwTextFootnote* pTFNote15 = static_cast<SwTextFootnote*> (pFootnote15); @@ -2107,7 +2107,7 @@ void SwUiWriterTest::testTdf74363() const sal_Unicode cChar = ' '; pWrtShell->AutoCorrect(corr, cChar); //The word should be capitalized due to autocorrect - sal_uLong nIndex = pWrtShell->GetCrsr()->GetNode().GetIndex(); + sal_uLong nIndex = pWrtShell->GetCursor()->GetNode().GetIndex(); CPPUNIT_ASSERT_EQUAL(OUString("Testing "), static_cast<SwTextNode*>(pDoc->GetNodes()[nIndex])->GetText()); } @@ -2286,7 +2286,7 @@ void SwUiWriterTest::testTdf90808() uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); uno::Reference<text::XTextRange> xTextRange(xTextDocument->getText(), uno::UNO_QUERY); uno::Reference<text::XText> xText(xTextRange->getText(), uno::UNO_QUERY); - uno::Reference<text::XParagraphCursor> xCrsr(xText->createTextCursor(), uno::UNO_QUERY); + uno::Reference<text::XParagraphCursor> xCursor(xText->createTextCursor(), uno::UNO_QUERY); //inserting text into document so that the paragraph is not empty xText->setString("Hello World!"); uno::Reference<lang::XMultiServiceFactory> xFact(mxComponent, uno::UNO_QUERY); @@ -2295,49 +2295,49 @@ void SwUiWriterTest::testTdf90808() uno::Reference<container::XNamed> xHeadingName1(xHeadingBookmark1, uno::UNO_QUERY); xHeadingName1->setName("__RefHeading__1"); //moving cursor to the starting of paragraph - xCrsr->gotoStartOfParagraph(false); + xCursor->gotoStartOfParagraph(false); //inserting the bookmark in paragraph - xText->insertTextContent(xCrsr, xHeadingBookmark1, true); + xText->insertTextContent(xCursor, xHeadingBookmark1, true); //creating bookmark 2 uno::Reference<text::XTextContent> xHeadingBookmark2(xFact->createInstance("com.sun.star.text.Bookmark"), uno::UNO_QUERY); uno::Reference<container::XNamed> xHeadingName2(xHeadingBookmark2, uno::UNO_QUERY); xHeadingName2->setName("__RefHeading__2"); //inserting the bookmark in same paragraph, at the end //only one bookmark of this type is allowed in each paragraph an exception of com.sun.star.lang.IllegalArgumentException must be thrown when inserting the other bookmark in same paragraph - xCrsr->gotoEndOfParagraph(true); - CPPUNIT_ASSERT_THROW(xText->insertTextContent(xCrsr, xHeadingBookmark2, true), css::lang::IllegalArgumentException); + xCursor->gotoEndOfParagraph(true); + CPPUNIT_ASSERT_THROW(xText->insertTextContent(xCursor, xHeadingBookmark2, true), css::lang::IllegalArgumentException); //now testing for __RefNumPara__ //creating bookmark 1 uno::Reference<text::XTextContent> xNumBookmark1(xFact->createInstance("com.sun.star.text.Bookmark"), uno::UNO_QUERY); uno::Reference<container::XNamed> xNumName1(xNumBookmark1, uno::UNO_QUERY); xNumName1->setName("__RefNumPara__1"); //moving cursor to the starting of paragraph - xCrsr->gotoStartOfParagraph(false); + xCursor->gotoStartOfParagraph(false); //inserting the bookmark in paragraph - xText->insertTextContent(xCrsr, xNumBookmark1, true); + xText->insertTextContent(xCursor, xNumBookmark1, true); //creating bookmark 2 uno::Reference<text::XTextContent> xNumBookmark2(xFact->createInstance("com.sun.star.text.Bookmark"), uno::UNO_QUERY); uno::Reference<container::XNamed> xNumName2(xNumBookmark2, uno::UNO_QUERY); xNumName2->setName("__RefNumPara__2"); //inserting the bookmark in same paragraph, at the end //only one bookmark of this type is allowed in each paragraph an exception of com.sun.star.lang.IllegalArgumentException must be thrown when inserting the other bookmark in same paragraph - xCrsr->gotoEndOfParagraph(true); - CPPUNIT_ASSERT_THROW(xText->insertTextContent(xCrsr, xNumBookmark2, true), css::lang::IllegalArgumentException); + xCursor->gotoEndOfParagraph(true); + CPPUNIT_ASSERT_THROW(xText->insertTextContent(xCursor, xNumBookmark2, true), css::lang::IllegalArgumentException); } void SwUiWriterTest::testTdf75137() { SwDoc* pDoc = createDoc(); SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); - SwShellCrsr* pShellCrsr = pWrtShell->getShellCrsr(true); + SwShellCursor* pShellCursor = pWrtShell->getShellCursor(true); pWrtShell->InsertFootnote("This is first footnote"); - sal_uLong firstIndex = pShellCrsr->GetNode().GetIndex(); - pShellCrsr->GotoFootnoteAnchor(); + sal_uLong firstIndex = pShellCursor->GetNode().GetIndex(); + pShellCursor->GotoFootnoteAnchor(); pWrtShell->InsertFootnote("This is second footnote"); pWrtShell->Up(false); - sal_uLong secondIndex = pShellCrsr->GetNode().GetIndex(); + sal_uLong secondIndex = pShellCursor->GetNode().GetIndex(); pWrtShell->Down(false); - sal_uLong thirdIndex = pShellCrsr->GetNode().GetIndex(); + sal_uLong thirdIndex = pShellCursor->GetNode().GetIndex(); CPPUNIT_ASSERT_EQUAL(firstIndex, thirdIndex); CPPUNIT_ASSERT(firstIndex != secondIndex); } @@ -2349,34 +2349,34 @@ void SwUiWriterTest::testTdf83798() pWrtShell->GotoNextTOXBase(); const SwTOXBase* pTOXBase = pWrtShell->GetCurTOX(); pWrtShell->UpdateTableOf(*pTOXBase); - SwPaM* pCrsr = pDoc->GetEditShell()->GetCrsr(); - pCrsr->SetMark(); - pCrsr->Move(fnMoveForward, fnGoNode); - CPPUNIT_ASSERT_EQUAL(OUString("Table of Contents"), pCrsr->GetText()); - pCrsr->DeleteMark(); - pCrsr->SetMark(); - pCrsr->Move(fnMoveForward, fnGoContent); - CPPUNIT_ASSERT_EQUAL(OUString("1"), pCrsr->GetText()); - pCrsr->DeleteMark(); - pCrsr->Move(fnMoveForward, fnGoNode); - pCrsr->SetMark(); - pCrsr->Move(fnMoveForward, fnGoContent); - pCrsr->Move(fnMoveForward, fnGoContent); - pCrsr->Move(fnMoveForward, fnGoContent); - CPPUNIT_ASSERT_EQUAL(OUString("1.A"), pCrsr->GetText()); - pCrsr->DeleteMark(); - pCrsr->Move(fnMoveForward, fnGoNode); - pCrsr->SetMark(); - pCrsr->Move(fnMoveForward, fnGoContent); - CPPUNIT_ASSERT_EQUAL(OUString("2"), pCrsr->GetText()); - pCrsr->DeleteMark(); - pCrsr->Move(fnMoveForward, fnGoNode); - pCrsr->SetMark(); - pCrsr->Move(fnMoveForward, fnGoContent); - pCrsr->Move(fnMoveForward, fnGoContent); - pCrsr->Move(fnMoveForward, fnGoContent); - CPPUNIT_ASSERT_EQUAL(OUString("2.A"), pCrsr->GetText()); - pCrsr->DeleteMark(); + SwPaM* pCursor = pDoc->GetEditShell()->GetCursor(); + pCursor->SetMark(); + pCursor->Move(fnMoveForward, fnGoNode); + CPPUNIT_ASSERT_EQUAL(OUString("Table of Contents"), pCursor->GetText()); + pCursor->DeleteMark(); + pCursor->SetMark(); + pCursor->Move(fnMoveForward, fnGoContent); + CPPUNIT_ASSERT_EQUAL(OUString("1"), pCursor->GetText()); + pCursor->DeleteMark(); + pCursor->Move(fnMoveForward, fnGoNode); + pCursor->SetMark(); + pCursor->Move(fnMoveForward, fnGoContent); + pCursor->Move(fnMoveForward, fnGoContent); + pCursor->Move(fnMoveForward, fnGoContent); + CPPUNIT_ASSERT_EQUAL(OUString("1.A"), pCursor->GetText()); + pCursor->DeleteMark(); + pCursor->Move(fnMoveForward, fnGoNode); + pCursor->SetMark(); + pCursor->Move(fnMoveForward, fnGoContent); + CPPUNIT_ASSERT_EQUAL(OUString("2"), pCursor->GetText()); + pCursor->DeleteMark(); + pCursor->Move(fnMoveForward, fnGoNode); + pCursor->SetMark(); + pCursor->Move(fnMoveForward, fnGoContent); + pCursor->Move(fnMoveForward, fnGoContent); + pCursor->Move(fnMoveForward, fnGoContent); + CPPUNIT_ASSERT_EQUAL(OUString("2.A"), pCursor->GetText()); + pCursor->DeleteMark(); } void SwUiWriterTest::testTdf89714() @@ -2527,25 +2527,25 @@ void SwUiWriterTest::testUndoCharAttribute() { // Create a new empty Writer document SwDoc* pDoc = createDoc(); - SwPaM* pCrsr = pDoc->GetEditShell()->GetCrsr(); + SwPaM* pCursor = pDoc->GetEditShell()->GetCursor(); sw::UndoManager& rUndoManager = pDoc->GetUndoManager(); IDocumentContentOperations & rIDCO(pDoc->getIDocumentContentOperations()); // Insert some text - rIDCO.InsertString(*pCrsr, "This will be bolded"); + rIDCO.InsertString(*pCursor, "This will be bolded"); // Position of word 9876543210 // Use cursor to select part of text - pCrsr->SetMark(); + pCursor->SetMark(); for (int i = 0; i < 9; i++) { - pCrsr->Move(fnMoveBackward); + pCursor->Move(fnMoveBackward); } // Check that correct text was selected - CPPUNIT_ASSERT_EQUAL(OUString("be bolded"), pCrsr->GetText()); + CPPUNIT_ASSERT_EQUAL(OUString("be bolded"), pCursor->GetText()); // Apply a "Bold" attribute to selection SvxWeightItem aWeightItem(WEIGHT_BOLD, RES_CHRATR_WEIGHT); - rIDCO.InsertPoolItem(*pCrsr, aWeightItem); + rIDCO.InsertPoolItem(*pCursor, aWeightItem); SfxItemSet aSet( pDoc->GetAttrPool(), RES_CHRATR_WEIGHT, RES_CHRATR_WEIGHT); // Adds selected text's attributes to aSet - pCrsr->GetNode().GetTextNode()->GetAttr(aSet, 10, 19); + pCursor->GetNode().GetTextNode()->GetAttr(aSet, 10, 19); SfxPoolItem const * pPoolItem = aSet.GetItem(RES_CHRATR_WEIGHT); // Check that bold is active on the selection; checks if it's in aSet CPPUNIT_ASSERT_EQUAL((*pPoolItem == aWeightItem), true); @@ -2553,7 +2553,7 @@ void SwUiWriterTest::testUndoCharAttribute() rUndoManager.Undo(); // Check that bold is no longer active aSet.ClearItem(RES_CHRATR_WEIGHT); - pCrsr->GetNode().GetTextNode()->GetAttr(aSet, 10, 19); + pCursor->GetNode().GetTextNode()->GetAttr(aSet, 10, 19); pPoolItem = aSet.GetItem(RES_CHRATR_WEIGHT); CPPUNIT_ASSERT_EQUAL((*pPoolItem == aWeightItem), false); } @@ -2639,7 +2639,7 @@ void SwUiWriterTest::testUnoCursorPointer() SwDoc* const pDoc(pxDocDocument->GetDocShell()->GetDoc()); std::unique_ptr<SwNodeIndex> pIdx(new SwNodeIndex(pDoc->GetNodes().GetEndOfContent(), -1)); std::unique_ptr<SwPosition> pPos(new SwPosition(*pIdx)); - sw::UnoCursorPointer pCursor(pDoc->CreateUnoCrsr(*pPos)); + sw::UnoCursorPointer pCursor(pDoc->CreateUnoCursor(*pPos)); CPPUNIT_ASSERT(static_cast<bool>(pCursor)); pPos.reset(); // we need to kill the SwPosition before disposing pIdx.reset(); // we need to kill the SwNodeIndex before disposing @@ -2733,16 +2733,16 @@ void SwUiWriterTest::testUnicodeNotationToggle() uno::Sequence<beans::PropertyValue> aPropertyValues; pWrtShell->EndPara(); - sOriginalDocString = pWrtShell->GetCrsr()->GetNode().GetTextNode()->GetText(); + sOriginalDocString = pWrtShell->GetCursor()->GetNode().GetTextNode()->GetText(); CPPUNIT_ASSERT_EQUAL(OUString("uU+002b"), sOriginalDocString); lcl_dispatchCommand(mxComponent, ".uno:UnicodeNotationToggle", aPropertyValues); sExpectedString = "u+"; - sDocString = pWrtShell->GetCrsr()->GetNode().GetTextNode()->GetText(); + sDocString = pWrtShell->GetCursor()->GetNode().GetTextNode()->GetText(); CPPUNIT_ASSERT( sDocString.equals(sExpectedString) ); lcl_dispatchCommand(mxComponent, ".uno:UnicodeNotationToggle", aPropertyValues); - sDocString = pWrtShell->GetCrsr()->GetNode().GetTextNode()->GetText(); + sDocString = pWrtShell->GetCursor()->GetNode().GetTextNode()->GetText(); CPPUNIT_ASSERT( sDocString.equals(sOriginalDocString) ); } @@ -2790,7 +2790,7 @@ void SwUiWriterTest::testTdf88986() // Create the item set that is normally passed to the insert frame dialog. SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); - SwFlyFrmAttrMgr aMgr(true, pWrtShell, FRMMGR_TYPE_TEXT); + SwFlyFrameAttrMgr aMgr(true, pWrtShell, FRMMGR_TYPE_TEXT); SfxItemSet aSet = aShell.CreateInsertFrameItemSet(aMgr); // This was missing along with the gradient and other tables. @@ -2810,8 +2810,8 @@ void SwUiWriterTest::testTdf87922() sal_Int32 nLength = rText.getLength(); SwDrawTextInfo aDrawTextInfo(pWrtShell, *pWrtShell->GetOut(), pScriptInfo, rText, nIndex, nLength); // Root -> page -> body -> text. - SwTextFrm* pTextFrm = static_cast<SwTextFrm*>(pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()); - aDrawTextInfo.SetFrm(pTextFrm); + SwTextFrame* pTextFrame = static_cast<SwTextFrame*>(pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()); + aDrawTextInfo.SetFrame(pTextFrame); // If no color background color is found, assume white. Color* pColor = sw::GetActiveRetoucheColor(); @@ -2878,7 +2878,7 @@ void SwUiWriterTest::testTdf92648() // and the text boxes haven't got zero height for (std::set<const SwFrameFormat*>::iterator it=aTextBoxes.begin(); it!=aTextBoxes.end(); ++it) { - SwFormatFrmSize aSize((*it)->GetFrmSize()); + SwFormatFrameSize aSize((*it)->GetFrameSize()); CPPUNIT_ASSERT(aSize.GetHeight() != 0); } } diff --git a/sw/sdi/_tabsh.sdi b/sw/sdi/_tabsh.sdi index 7d81beefad35..2508c2fc7b9b 100644 --- a/sw/sdi/_tabsh.sdi +++ b/sw/sdi/_tabsh.sdi @@ -313,7 +313,7 @@ interface BaseTextTable SID_ATTR_BORDER // status() [ ExecMethod = Execute ; - StateMethod = GetFrmBorderState ; + StateMethod = GetFrameBorderState ; GroupId = GID_TABLE; DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR"; ] diff --git a/sw/source/core/access/acccell.cxx b/sw/source/core/access/acccell.cxx index 8faf03b222ff..64315c280bbc 100644 --- a/sw/source/core/access/acccell.cxx +++ b/sw/source/core/access/acccell.cxx @@ -60,16 +60,16 @@ bool SwAccessibleCell::IsSelected() assert(GetMap()); const SwViewShell *pVSh = GetMap()->GetShell(); assert(pVSh); - if( dynamic_cast<const SwCrsrShell*>( pVSh) != nullptr ) + if( dynamic_cast<const SwCursorShell*>( pVSh) != nullptr ) { - const SwCrsrShell *pCSh = static_cast< const SwCrsrShell * >( pVSh ); + const SwCursorShell *pCSh = static_cast< const SwCursorShell * >( pVSh ); if( pCSh->IsTableMode() ) { - const SwCellFrm *pCFrm = - static_cast< const SwCellFrm * >( GetFrm() ); + const SwCellFrame *pCFrame = + static_cast< const SwCellFrame * >( GetFrame() ); SwTableBox *pBox = - const_cast< SwTableBox *>( pCFrm->GetTabBox() ); - SwSelBoxes const& rBoxes(pCSh->GetTableCrsr()->GetSelectedBoxes()); + const_cast< SwTableBox *>( pCFrame->GetTabBox() ); + SwSelBoxes const& rBoxes(pCSh->GetTableCursor()->GetSelectedBoxes()); bRet = rBoxes.find(pBox) != rBoxes.end(); } } @@ -84,7 +84,7 @@ void SwAccessibleCell::GetStates( ::utl::AccessibleStateSetHelper& rStateSet ) // SELECTABLE const SwViewShell *pVSh = GetMap()->GetShell(); assert(pVSh); - if( dynamic_cast<const SwCrsrShell*>( pVSh) != nullptr ) + if( dynamic_cast<const SwCursorShell*>( pVSh) != nullptr ) rStateSet.AddState( AccessibleStateType::SELECTABLE ); //Add resizable state to table cell. rStateSet.AddState( AccessibleStateType::RESIZABLE ); @@ -100,13 +100,13 @@ void SwAccessibleCell::GetStates( ::utl::AccessibleStateSetHelper& rStateSet ) } SwAccessibleCell::SwAccessibleCell( SwAccessibleMap *pInitMap, - const SwCellFrm *pCellFrm ) - : SwAccessibleContext( pInitMap, AccessibleRole::TABLE_CELL, pCellFrm ) + const SwCellFrame *pCellFrame ) + : SwAccessibleContext( pInitMap, AccessibleRole::TABLE_CELL, pCellFrame ) , aSelectionHelper( *this ) , bIsSelected( false ) { SolarMutexGuard aGuard; - OUString sBoxName( pCellFrm->GetTabBox()->GetName() ); + OUString sBoxName( pCellFrame->GetTabBox()->GetName() ); SetName( sBoxName ); bIsSelected = IsSelected(); @@ -151,16 +151,16 @@ bool SwAccessibleCell::_InvalidateMyCursorPos() return bChanged; } -bool SwAccessibleCell::_InvalidateChildrenCursorPos( const SwFrm *pFrm ) +bool SwAccessibleCell::_InvalidateChildrenCursorPos( const SwFrame *pFrame ) { bool bChanged = false; - const SwAccessibleChildSList aVisList( GetVisArea(), *pFrm, *GetMap() ); + const SwAccessibleChildSList aVisList( GetVisArea(), *pFrame, *GetMap() ); SwAccessibleChildSList::const_iterator aIter( aVisList.begin() ); while( aIter != aVisList.end() ) { const SwAccessibleChild& rLower = *aIter; - const SwFrm *pLower = rLower.GetSwFrm(); + const SwFrame *pLower = rLower.GetSwFrame(); if( pLower ) { if( rLower.IsAccessible( GetMap()->GetShell()->IsPreview() ) ) @@ -169,7 +169,7 @@ bool SwAccessibleCell::_InvalidateChildrenCursorPos( const SwFrm *pFrm ) GetMap()->GetContextImpl( pLower, false ) ); if( xAccImpl.is() ) { - assert(xAccImpl->GetFrm()->IsCellFrm()); + assert(xAccImpl->GetFrame()->IsCellFrame()); bChanged = static_cast< SwAccessibleCell *>( xAccImpl.get() )->_InvalidateMyCursorPos(); } @@ -195,9 +195,9 @@ void SwAccessibleCell::_InvalidateCursorPos() if (IsSelected()) { const SwAccessibleChild aChild( GetChild( *(GetMap()), 0 ) ); - if( aChild.IsValid() && aChild.GetSwFrm() ) + if( aChild.IsValid() && aChild.GetSwFrame() ) { - ::rtl::Reference < SwAccessibleContext > xChildImpl( GetMap()->GetContextImpl( aChild.GetSwFrm()) ); + ::rtl::Reference < SwAccessibleContext > xChildImpl( GetMap()->GetContextImpl( aChild.GetSwFrame()) ); if (xChildImpl.is()) { AccessibleEventObject aEvent; @@ -208,16 +208,16 @@ void SwAccessibleCell::_InvalidateCursorPos() } } - const SwFrm *pParent = GetParent( SwAccessibleChild(GetFrm()), IsInPagePreview() ); - assert(pParent->IsTabFrm()); - const SwTabFrm *pTabFrm = static_cast< const SwTabFrm * >( pParent ); - if( pTabFrm->IsFollow() ) - pTabFrm = pTabFrm->FindMaster(); + const SwFrame *pParent = GetParent( SwAccessibleChild(GetFrame()), IsInPagePreview() ); + assert(pParent->IsTabFrame()); + const SwTabFrame *pTabFrame = static_cast< const SwTabFrame * >( pParent ); + if( pTabFrame->IsFollow() ) + pTabFrame = pTabFrame->FindMaster(); - while( pTabFrm ) + while( pTabFrame ) { - _InvalidateChildrenCursorPos( pTabFrm ); - pTabFrm = pTabFrm->GetFollow(); + _InvalidateChildrenCursorPos( pTabFrame ); + pTabFrame = pTabFrame->GetFollow(); } if (m_pAccTable.is()) { @@ -265,21 +265,21 @@ uno::Sequence< OUString > SAL_CALL SwAccessibleCell::getSupportedServiceNames() void SwAccessibleCell::Dispose( bool bRecursive ) { - const SwFrm *pParent = GetParent( SwAccessibleChild(GetFrm()), IsInPagePreview() ); + const SwFrame *pParent = GetParent( SwAccessibleChild(GetFrame()), IsInPagePreview() ); ::rtl::Reference< SwAccessibleContext > xAccImpl( GetMap()->GetContextImpl( pParent, false ) ); if( xAccImpl.is() ) - xAccImpl->DisposeChild( SwAccessibleChild(GetFrm()), bRecursive ); + xAccImpl->DisposeChild( SwAccessibleChild(GetFrame()), bRecursive ); SwAccessibleContext::Dispose( bRecursive ); } void SwAccessibleCell::InvalidatePosOrSize( const SwRect& rOldBox ) { - const SwFrm *pParent = GetParent( SwAccessibleChild(GetFrm()), IsInPagePreview() ); + const SwFrame *pParent = GetParent( SwAccessibleChild(GetFrame()), IsInPagePreview() ); ::rtl::Reference< SwAccessibleContext > xAccImpl( GetMap()->GetContextImpl( pParent, false ) ); if( xAccImpl.is() ) - xAccImpl->InvalidateChildPosOrSize( SwAccessibleChild(GetFrm()), rOldBox ); + xAccImpl->InvalidateChildPosOrSize( SwAccessibleChild(GetFrame()), rOldBox ); SwAccessibleContext::InvalidatePosOrSize( rOldBox ); } @@ -339,11 +339,11 @@ uno::Sequence< sal_Int8 > SAL_CALL SwAccessibleCell::getImplementationId() SwFrameFormat* SwAccessibleCell::GetTableBoxFormat() const { - assert(GetFrm()); - assert(GetFrm()->IsCellFrm()); + assert(GetFrame()); + assert(GetFrame()->IsCellFrame()); - const SwCellFrm* pCellFrm = static_cast<const SwCellFrm*>( GetFrm() ); - return pCellFrm->GetTabBox()->GetFrameFormat(); + const SwCellFrame* pCellFrame = static_cast<const SwCellFrame*>( GetFrame() ); + return pCellFrame->GetTabBox()->GetFrameFormat(); } //Implement TableCell currentValue @@ -437,7 +437,7 @@ sal_Int32 SAL_CALL SwAccessibleCell::getBackground() { SolarMutexGuard g; - const SvxBrushItem &rBack = GetFrm()->GetAttrSet()->GetBackground(); + const SvxBrushItem &rBack = GetFrame()->GetAttrSet()->GetBackground(); sal_uInt32 crBack = rBack.GetColor().GetColor(); if (COL_AUTO == crBack) diff --git a/sw/source/core/access/acccell.hxx b/sw/source/core/access/acccell.hxx index 6814270b172b..6d66f33e35b9 100644 --- a/sw/source/core/access/acccell.hxx +++ b/sw/source/core/access/acccell.hxx @@ -24,7 +24,7 @@ #include <com/sun/star/accessibility/XAccessibleValue.hpp> #include <accselectionhelper.hxx> -class SwCellFrm; +class SwCellFrame; class SwAccessibleTable; class SwFrameFormat; @@ -40,7 +40,7 @@ class SwAccessibleCell : public SwAccessibleContext, bool IsSelected(); bool _InvalidateMyCursorPos(); - bool _InvalidateChildrenCursorPos( const SwFrm *pFrm ); + bool _InvalidateChildrenCursorPos( const SwFrame *pFrame ); rtl::Reference<SwAccessibleTable> m_pAccTable; @@ -54,7 +54,7 @@ protected: virtual ~SwAccessibleCell(); public: - SwAccessibleCell( SwAccessibleMap* pInitMap, const SwCellFrm *pCellFrm ); + SwAccessibleCell( SwAccessibleMap* pInitMap, const SwCellFrame *pCellFrame ); virtual bool HasCursor() override; // required by map to remember that object @@ -85,7 +85,7 @@ public: virtual void Dispose( bool bRecursive = false ) override; - virtual void InvalidatePosOrSize( const SwRect& rFrm ) override; + virtual void InvalidatePosOrSize( const SwRect& rFrame ) override; // XInterface diff --git a/sw/source/core/access/acccontext.cxx b/sw/source/core/access/acccontext.cxx index f10e16acd7dc..e200104967dc 100644 --- a/sw/source/core/access/acccontext.cxx +++ b/sw/source/core/access/acccontext.cxx @@ -97,43 +97,43 @@ vcl::Window *SwAccessibleContext::GetWindow() } // get SwViewShell from accessibility map, and cast to cursor shell -SwCrsrShell* SwAccessibleContext::GetCrsrShell() +SwCursorShell* SwAccessibleContext::GetCursorShell() { - SwCrsrShell* pCrsrShell; + SwCursorShell* pCursorShell; SwViewShell* pViewShell = GetMap() ? GetMap()->GetShell() : nullptr; OSL_ENSURE( pViewShell, "no view shell" ); - if( pViewShell && dynamic_cast<const SwCrsrShell*>( pViewShell) != nullptr ) - pCrsrShell = static_cast<SwCrsrShell*>( pViewShell ); + if( pViewShell && dynamic_cast<const SwCursorShell*>( pViewShell) != nullptr ) + pCursorShell = static_cast<SwCursorShell*>( pViewShell ); else - pCrsrShell = nullptr; + pCursorShell = nullptr; - return pCrsrShell; + return pCursorShell; } -const SwCrsrShell* SwAccessibleContext::GetCrsrShell() const +const SwCursorShell* SwAccessibleContext::GetCursorShell() const { - // just like non-const GetCrsrShell - const SwCrsrShell* pCrsrShell; + // just like non-const GetCursorShell + const SwCursorShell* pCursorShell; const SwViewShell* pViewShell = GetMap() ? GetMap()->GetShell() : nullptr; OSL_ENSURE( pViewShell, "no view shell" ); - if( pViewShell && dynamic_cast<const SwCrsrShell*>( pViewShell) != nullptr ) - pCrsrShell = static_cast<const SwCrsrShell*>( pViewShell ); + if( pViewShell && dynamic_cast<const SwCursorShell*>( pViewShell) != nullptr ) + pCursorShell = static_cast<const SwCursorShell*>( pViewShell ); else - pCrsrShell = nullptr; + pCursorShell = nullptr; - return pCrsrShell; + return pCursorShell; } enum class Action { NONE, SCROLLED, SCROLLED_WITHIN, SCROLLED_IN, SCROLLED_OUT }; -void SwAccessibleContext::ChildrenScrolled( const SwFrm *pFrm, +void SwAccessibleContext::ChildrenScrolled( const SwFrame *pFrame, const SwRect& rOldVisArea ) { const SwRect& rNewVisArea = GetVisArea(); - const bool bVisibleChildrenOnly = SwAccessibleChild( pFrm ).IsVisibleChildrenOnly(); + const bool bVisibleChildrenOnly = SwAccessibleChild( pFrame ).IsVisibleChildrenOnly(); - const SwAccessibleChildSList aList( *pFrm, *(GetMap()) ); + const SwAccessibleChildSList aList( *pFrame, *(GetMap()) ); SwAccessibleChildSList::const_iterator aIter( aList.begin() ); while( aIter != aList.end() ) { @@ -182,11 +182,11 @@ void SwAccessibleContext::ChildrenScrolled( const SwFrm *pFrm, } if( Action::NONE != eAction ) { - if ( rLower.GetSwFrm() ) + if ( rLower.GetSwFrame() ) { OSL_ENSURE( !rLower.AlwaysIncludeAsChild(), "<SwAccessibleContext::ChildrenScrolled(..)> - always included child not considered!" ); - const SwFrm* pLower( rLower.GetSwFrm() ); + const SwFrame* pLower( rLower.GetSwFrame() ); ::rtl::Reference< SwAccessibleContext > xAccImpl = GetMap()->GetContextImpl( pLower ); if( xAccImpl.is() ) @@ -256,13 +256,13 @@ void SwAccessibleContext::ChildrenScrolled( const SwFrm *pFrm, } } } - else if ( rLower.GetSwFrm() && + else if ( rLower.GetSwFrame() && ( !bVisibleChildrenOnly || aBox.IsOver( rOldVisArea ) || aBox.IsOver( rNewVisArea ) ) ) { // There are no unaccessible SdrObjects that need to be notified - ChildrenScrolled( rLower.GetSwFrm(), rOldVisArea ); + ChildrenScrolled( rLower.GetSwFrame(), rOldVisArea ); } ++aIter; } @@ -272,7 +272,7 @@ void SwAccessibleContext::Scrolled( const SwRect& rOldVisArea ) { SetVisArea( GetMap()->GetVisArea() ); - ChildrenScrolled( GetFrm(), rOldVisArea ); + ChildrenScrolled( GetFrame(), rOldVisArea ); bool bIsOldShowingState; bool bIsNewShowingState = IsShowing( *(GetMap()) ); @@ -291,7 +291,7 @@ void SwAccessibleContext::ScrolledWithin( const SwRect& rOldVisArea ) { SetVisArea( GetMap()->GetVisArea() ); - ChildrenScrolled( GetFrm(), rOldVisArea ); + ChildrenScrolled( GetFrame(), rOldVisArea ); FireVisibleDataEvent(); } @@ -305,7 +305,7 @@ void SwAccessibleContext::ScrolledIn() "Vis area of child is wrong. Did it exist already?" ); // Send child event at parent. That's all we have to do here. - const SwFrm* pParent = GetParent(); + const SwFrame* pParent = GetParent(); ::rtl::Reference< SwAccessibleContext > xParentImpl( GetMap()->GetContextImpl( pParent, false ) ); uno::Reference < XAccessibleContext > xThis( this ); @@ -341,7 +341,7 @@ void SwAccessibleContext::ScrolledOut( const SwRect& rOldVisArea ) // because this call will only dispose children that are in the // new vis area. The children we want to dispose however are in the // old vis area all. - ChildrenScrolled( GetFrm(), rOldVisArea ); + ChildrenScrolled( GetFrame(), rOldVisArea ); // Broadcast a state changed event for the showing state. // It might be that the child is freshly created just to send @@ -350,16 +350,16 @@ void SwAccessibleContext::ScrolledOut( const SwRect& rOldVisArea ) } // #i27301# - use new type definition for <_nStates> -void SwAccessibleContext::InvalidateChildrenStates( const SwFrm* _pFrm, +void SwAccessibleContext::InvalidateChildrenStates( const SwFrame* _pFrame, AccessibleStates _nStates ) { - const SwAccessibleChildSList aVisList( GetVisArea(), *_pFrm, *(GetMap()) ); + const SwAccessibleChildSList aVisList( GetVisArea(), *_pFrame, *(GetMap()) ); SwAccessibleChildSList::const_iterator aIter( aVisList.begin() ); while( aIter != aVisList.end() ) { const SwAccessibleChild& rLower = *aIter; - const SwFrm* pLower = rLower.GetSwFrm(); + const SwFrame* pLower = rLower.GetSwFrame(); if( pLower ) { ::rtl::Reference< SwAccessibleContext > xAccImpl; @@ -383,15 +383,15 @@ void SwAccessibleContext::InvalidateChildrenStates( const SwFrm* _pFrm, } } -void SwAccessibleContext::DisposeChildren( const SwFrm *pFrm, +void SwAccessibleContext::DisposeChildren( const SwFrame *pFrame, bool bRecursive ) { - const SwAccessibleChildSList aVisList( GetVisArea(), *pFrm, *(GetMap()) ); + const SwAccessibleChildSList aVisList( GetVisArea(), *pFrame, *(GetMap()) ); SwAccessibleChildSList::const_iterator aIter( aVisList.begin() ); while( aIter != aVisList.end() ) { const SwAccessibleChild& rLower = *aIter; - const SwFrm* pLower = rLower.GetSwFrm(); + const SwFrame* pLower = rLower.GetSwFrame(); if( pLower ) { ::rtl::Reference< SwAccessibleContext > xAccImpl; @@ -432,8 +432,8 @@ void SwAccessibleContext::_InvalidateFocus() void SwAccessibleContext::FireAccessibleEvent( AccessibleEventObject& rEvent ) { - OSL_ENSURE( GetFrm(), "fire event for disposed frame?" ); - if( !GetFrm() ) + OSL_ENSURE( GetFrame(), "fire event for disposed frame?" ); + if( !GetFrame() ) return; if( !rEvent.Source.is() ) @@ -512,7 +512,7 @@ bool SwAccessibleContext::IsEditableState() SwAccessibleContext::SwAccessibleContext( SwAccessibleMap *const pMap, sal_Int16 const nRole, - const SwFrm *pF ) + const SwFrame *pF ) : SwAccessibleFrame( pMap->GetVisArea().SVRect(), pF, pMap->GetShell()->IsPreview() ) , m_pMap( pMap ) @@ -528,7 +528,7 @@ SwAccessibleContext::SwAccessibleContext( SwAccessibleMap *const pMap, SwAccessibleContext::~SwAccessibleContext() { SolarMutexGuard aGuard; - RemoveFrmFromAccessibleMap(); + RemoveFrameFromAccessibleMap(); } uno::Reference< XAccessibleContext > SAL_CALL @@ -575,10 +575,10 @@ uno::Reference< XAccessible> SAL_CALL } uno::Reference< XAccessible > xChild; - if( aChild.GetSwFrm() ) + if( aChild.GetSwFrame() ) { ::rtl::Reference < SwAccessibleContext > xChildImpl( - GetMap()->GetContextImpl( aChild.GetSwFrm(), !m_isDisposing ) ); + GetMap()->GetContextImpl( aChild.GetSwFrame(), !m_isDisposing ) ); if( xChildImpl.is() ) { xChildImpl->SetParent( this ); @@ -608,7 +608,7 @@ uno::Reference< XAccessible> SAL_CALL SwAccessibleContext::getAccessibleParent() CHECK_FOR_DEFUNC( XAccessibleContext ) - const SwFrm *pUpper = GetParent(); + const SwFrame *pUpper = GetParent(); OSL_ENSURE( pUpper != nullptr || m_isDisposing, "no upper found" ); uno::Reference< XAccessible > xAcc; @@ -633,7 +633,7 @@ sal_Int32 SAL_CALL SwAccessibleContext::getAccessibleIndexInParent() CHECK_FOR_DEFUNC( XAccessibleContext ) - const SwFrm *pUpper = GetParent(); + const SwFrame *pUpper = GetParent(); OSL_ENSURE( pUpper != nullptr || m_isDisposing, "no upper found" ); sal_Int32 nIndex = -1; @@ -643,7 +643,7 @@ sal_Int32 SAL_CALL SwAccessibleContext::getAccessibleIndexInParent() GetMap()->GetContextImpl(pUpper, !m_isDisposing) ); OSL_ENSURE( xAccImpl.is() || m_isDisposing, "no parent found" ); if( xAccImpl.is() ) - nIndex = xAccImpl->GetChildIndex( *(GetMap()), SwAccessibleChild(GetFrm()) ); + nIndex = xAccImpl->GetChildIndex( *(GetMap()), SwAccessibleChild(GetFrame()) ); } return nIndex; @@ -776,18 +776,18 @@ uno::Reference< XAccessible > SAL_CALL SwAccessibleContext::getAccessibleAtPoint CHECK_FOR_WINDOW( XAccessibleComponent, pWin ) Point aPixPoint( aPoint.X, aPoint.Y ); // px rel to parent - if( !GetFrm()->IsRootFrm() ) + if( !GetFrame()->IsRootFrame() ) { - SwRect aLogBounds( GetBounds( *(GetMap()), GetFrm() ) ); // twip rel to doc root + SwRect aLogBounds( GetBounds( *(GetMap()), GetFrame() ) ); // twip rel to doc root Point aPixPos( GetMap()->CoreToPixel( aLogBounds.SVRect() ).TopLeft() ); aPixPoint.setX(aPixPoint.getX() + aPixPos.getX()); aPixPoint.setY(aPixPoint.getY() + aPixPos.getY()); } const SwAccessibleChild aChild( GetChildAtPixel( aPixPoint, *(GetMap()) ) ); - if( aChild.GetSwFrm() ) + if( aChild.GetSwFrame() ) { - xAcc = GetMap()->GetContext( aChild.GetSwFrm() ); + xAcc = GetMap()->GetContext( aChild.GetSwFrame() ); } else if( aChild.GetDrawObject() ) { @@ -826,30 +826,30 @@ awt::Rectangle SAL_CALL SwAccessibleContext::getBoundsImpl(bool bRelative) CHECK_FOR_DEFUNC( XAccessibleComponent ) - const SwFrm *pParent = GetParent(); + const SwFrame *pParent = GetParent(); OSL_ENSURE( pParent, "no Parent found" ); vcl::Window *pWin = GetWindow(); CHECK_FOR_WINDOW( XAccessibleComponent, pWin && pParent ) - SwRect aLogBounds( GetBounds( *(GetMap()), GetFrm() ) ); // twip rel to doc root + SwRect aLogBounds( GetBounds( *(GetMap()), GetFrame() ) ); // twip rel to doc root Rectangle aPixBounds( 0, 0, 0, 0 ); - if( GetFrm()->IsPageFrm() && - static_cast < const SwPageFrm * >( GetFrm() )->IsEmptyPage() ) + if( GetFrame()->IsPageFrame() && + static_cast < const SwPageFrame * >( GetFrame() )->IsEmptyPage() ) { OSL_ENSURE( GetShell()->IsPreview(), "empty page accessible?" ); if( GetShell()->IsPreview() ) { // adjust method call <GetMap()->GetPreviewPageSize()> sal_uInt16 nPageNum = - static_cast < const SwPageFrm * >( GetFrm() )->GetPhyPageNum(); + static_cast < const SwPageFrame * >( GetFrame() )->GetPhyPageNum(); aLogBounds.SSize( GetMap()->GetPreviewPageSize( nPageNum ) ); } } if( !aLogBounds.IsEmpty() ) { aPixBounds = GetMap()->CoreToPixel( aLogBounds.SVRect() ); - if( !pParent->IsRootFrm() && bRelative) + if( !pParent->IsRootFrame() && bRelative) { SwRect aParentLogBounds( GetBounds( *(GetMap()), pParent ) ); // twip rel to doc root Point aParentPixPos( GetMap()->CoreToPixel( aParentLogBounds.SVRect() ).TopLeft() ); @@ -910,30 +910,30 @@ void SAL_CALL SwAccessibleContext::grabFocus() CHECK_FOR_DEFUNC( XAccessibleContext ); - if( GetFrm()->IsFlyFrm() ) + if( GetFrame()->IsFlyFrame() ) { const SdrObject *pObj = - static_cast < const SwFlyFrm * >( GetFrm() )->GetVirtDrawObj(); + static_cast < const SwFlyFrame * >( GetFrame() )->GetVirtDrawObj(); if( pObj ) Select( const_cast < SdrObject * >( pObj ), false ); } else { - const SwContentFrm *pCFrm = nullptr; - if( GetFrm()->IsContentFrm() ) - pCFrm = static_cast< const SwContentFrm * >( GetFrm() ); - else if( GetFrm()->IsLayoutFrm() ) - pCFrm = static_cast< const SwLayoutFrm * >( GetFrm() )->ContainsContent(); + const SwContentFrame *pCFrame = nullptr; + if( GetFrame()->IsContentFrame() ) + pCFrame = static_cast< const SwContentFrame * >( GetFrame() ); + else if( GetFrame()->IsLayoutFrame() ) + pCFrame = static_cast< const SwLayoutFrame * >( GetFrame() )->ContainsContent(); - if( pCFrm && pCFrm->IsTextFrm() ) + if( pCFrame && pCFrame->IsTextFrame() ) { - const SwTextFrm *pTextFrm = static_cast< const SwTextFrm * >( pCFrm ); - const SwTextNode *pTextNd = pTextFrm->GetTextNode(); + const SwTextFrame *pTextFrame = static_cast< const SwTextFrame * >( pCFrame ); + const SwTextNode *pTextNd = pTextFrame->GetTextNode(); if( pTextNd ) { // create pam for selection SwIndex aIndex( const_cast< SwTextNode * >( pTextNd ), - pTextFrm->GetOfst() ); + pTextFrame->GetOfst() ); SwPosition aStartPos( *pTextNd, aIndex ); SwPaM aPaM( aStartPos ); @@ -1026,7 +1026,7 @@ void SwAccessibleContext::Dispose( bool bRecursive ) { SolarMutexGuard aGuard; - OSL_ENSURE( GetFrm() && GetMap(), "already disposed" ); + OSL_ENSURE( GetFrame() && GetMap(), "already disposed" ); OSL_ENSURE( GetMap()->GetVisArea() == GetVisArea(), "invalid vis area for dispose" ); @@ -1034,7 +1034,7 @@ void SwAccessibleContext::Dispose( bool bRecursive ) // dispose children if( bRecursive ) - DisposeChildren( GetFrm(), bRecursive ); + DisposeChildren( GetFrame(), bRecursive ); // get parent uno::Reference< XAccessible > xParent( GetWeakParent() ); @@ -1065,58 +1065,58 @@ void SwAccessibleContext::Dispose( bool bRecursive ) m_nClientId = 0; } - RemoveFrmFromAccessibleMap(); - ClearFrm(); + RemoveFrameFromAccessibleMap(); + ClearFrame(); m_pMap = nullptr; m_isDisposing = false; } -void SwAccessibleContext::DisposeChild( const SwAccessibleChild& rChildFrmOrObj, +void SwAccessibleContext::DisposeChild( const SwAccessibleChild& rChildFrameOrObj, bool bRecursive ) { SolarMutexGuard aGuard; - if ( IsShowing( *(GetMap()), rChildFrmOrObj ) || - rChildFrmOrObj.AlwaysIncludeAsChild() || - !SwAccessibleChild( GetFrm() ).IsVisibleChildrenOnly() ) + if ( IsShowing( *(GetMap()), rChildFrameOrObj ) || + rChildFrameOrObj.AlwaysIncludeAsChild() || + !SwAccessibleChild( GetFrame() ).IsVisibleChildrenOnly() ) { // If the object could have existed before, than there is nothing to do, // because no wrapper exists now and therefore no one is interested to // get notified of the movement. - if( rChildFrmOrObj.GetSwFrm() ) + if( rChildFrameOrObj.GetSwFrame() ) { ::rtl::Reference< SwAccessibleContext > xAccImpl = - GetMap()->GetContextImpl( rChildFrmOrObj.GetSwFrm() ); + GetMap()->GetContextImpl( rChildFrameOrObj.GetSwFrame() ); xAccImpl->Dispose( bRecursive ); } - else if ( rChildFrmOrObj.GetDrawObject() ) + else if ( rChildFrameOrObj.GetDrawObject() ) { ::rtl::Reference< ::accessibility::AccessibleShape > xAccImpl = - GetMap()->GetContextImpl( rChildFrmOrObj.GetDrawObject(), + GetMap()->GetContextImpl( rChildFrameOrObj.GetDrawObject(), this ); - DisposeShape( rChildFrmOrObj.GetDrawObject(), + DisposeShape( rChildFrameOrObj.GetDrawObject(), xAccImpl.get() ); } - else if ( rChildFrmOrObj.GetWindow() ) + else if ( rChildFrameOrObj.GetWindow() ) { AccessibleEventObject aEvent; aEvent.EventId = AccessibleEventId::CHILD; uno::Reference< XAccessible > xAcc = - rChildFrmOrObj.GetWindow()->GetAccessible(); + rChildFrameOrObj.GetWindow()->GetAccessible(); aEvent.OldValue <<= xAcc; FireAccessibleEvent( aEvent ); } } - else if( bRecursive && rChildFrmOrObj.GetSwFrm() ) - DisposeChildren( rChildFrmOrObj.GetSwFrm(), bRecursive ); + else if( bRecursive && rChildFrameOrObj.GetSwFrame() ) + DisposeChildren( rChildFrameOrObj.GetSwFrame(), bRecursive ); } void SwAccessibleContext::InvalidatePosOrSize( const SwRect& ) { SolarMutexGuard aGuard; - OSL_ENSURE( GetFrm() && !GetFrm()->Frm().IsEmpty(), "context should have a size" ); + OSL_ENSURE( GetFrame() && !GetFrame()->Frame().IsEmpty(), "context should have a size" ); bool bIsOldShowingState; bool bIsNewShowingState = IsShowing( *(GetMap()) ); @@ -1144,47 +1144,47 @@ void SwAccessibleContext::InvalidatePosOrSize( const SwRect& ) } void SwAccessibleContext::InvalidateChildPosOrSize( - const SwAccessibleChild& rChildFrmOrObj, - const SwRect& rOldFrm ) + const SwAccessibleChild& rChildFrameOrObj, + const SwRect& rOldFrame ) { SolarMutexGuard aGuard; - OSL_ENSURE( !rChildFrmOrObj.GetSwFrm() || - !rChildFrmOrObj.GetSwFrm()->Frm().IsEmpty(), + OSL_ENSURE( !rChildFrameOrObj.GetSwFrame() || + !rChildFrameOrObj.GetSwFrame()->Frame().IsEmpty(), "child context should have a size" ); - if ( rChildFrmOrObj.AlwaysIncludeAsChild() ) + if ( rChildFrameOrObj.AlwaysIncludeAsChild() ) { // nothing to do; return; } - const bool bVisibleChildrenOnly = SwAccessibleChild( GetFrm() ).IsVisibleChildrenOnly(); - const bool bNew = rOldFrm.IsEmpty() || - ( rOldFrm.Left() == 0 && rOldFrm.Top() == 0 ); - if( IsShowing( *(GetMap()), rChildFrmOrObj ) ) + const bool bVisibleChildrenOnly = SwAccessibleChild( GetFrame() ).IsVisibleChildrenOnly(); + const bool bNew = rOldFrame.IsEmpty() || + ( rOldFrame.Left() == 0 && rOldFrame.Top() == 0 ); + if( IsShowing( *(GetMap()), rChildFrameOrObj ) ) { // If the object could have existed before, than there is nothing to do, // because no wrapper exists now and therefore no one is interested to // get notified of the movement. - if( bNew || (bVisibleChildrenOnly && !IsShowing( rOldFrm )) ) + if( bNew || (bVisibleChildrenOnly && !IsShowing( rOldFrame )) ) { - if( rChildFrmOrObj.GetSwFrm() ) + if( rChildFrameOrObj.GetSwFrame() ) { // The frame becomes visible. A child event must be send. ::rtl::Reference< SwAccessibleContext > xAccImpl = - GetMap()->GetContextImpl( rChildFrmOrObj.GetSwFrm() ); + GetMap()->GetContextImpl( rChildFrameOrObj.GetSwFrame() ); xAccImpl->ScrolledIn(); } - else if ( rChildFrmOrObj.GetDrawObject() ) + else if ( rChildFrameOrObj.GetDrawObject() ) { ::rtl::Reference< ::accessibility::AccessibleShape > xAccImpl = - GetMap()->GetContextImpl( rChildFrmOrObj.GetDrawObject(), + GetMap()->GetContextImpl( rChildFrameOrObj.GetDrawObject(), this ); // #i37790# if ( xAccImpl.is() ) { - ScrolledInShape( rChildFrmOrObj.GetDrawObject(), + ScrolledInShape( rChildFrameOrObj.GetDrawObject(), xAccImpl.get() ); } else @@ -1192,11 +1192,11 @@ void SwAccessibleContext::InvalidateChildPosOrSize( OSL_FAIL( "<SwAccessibleContext::InvalidateChildPosOrSize(..)> - no accessible shape found." ); } } - else if ( rChildFrmOrObj.GetWindow() ) + else if ( rChildFrameOrObj.GetWindow() ) { AccessibleEventObject aEvent; aEvent.EventId = AccessibleEventId::CHILD; - aEvent.NewValue <<= (rChildFrmOrObj.GetWindow()->GetAccessible()); + aEvent.NewValue <<= (rChildFrameOrObj.GetWindow()->GetAccessible()); FireAccessibleEvent( aEvent ); } } @@ -1208,24 +1208,24 @@ void SwAccessibleContext::InvalidateChildPosOrSize( // no notifications for grandchildren are required. If the are // grandgrandchildren, they would be notified by the layout. if( bVisibleChildrenOnly && - !bNew && IsShowing( rOldFrm ) ) + !bNew && IsShowing( rOldFrame ) ) { - if( rChildFrmOrObj.GetSwFrm() ) + if( rChildFrameOrObj.GetSwFrame() ) { ::rtl::Reference< SwAccessibleContext > xAccImpl = - GetMap()->GetContextImpl( rChildFrmOrObj.GetSwFrm() ); + GetMap()->GetContextImpl( rChildFrameOrObj.GetSwFrame() ); xAccImpl->SetParent( this ); xAccImpl->Dispose( true ); } - else if ( rChildFrmOrObj.GetDrawObject() ) + else if ( rChildFrameOrObj.GetDrawObject() ) { ::rtl::Reference< ::accessibility::AccessibleShape > xAccImpl = - GetMap()->GetContextImpl( rChildFrmOrObj.GetDrawObject(), + GetMap()->GetContextImpl( rChildFrameOrObj.GetDrawObject(), this ); - DisposeShape( rChildFrmOrObj.GetDrawObject(), + DisposeShape( rChildFrameOrObj.GetDrawObject(), xAccImpl.get() ); } - else if ( rChildFrmOrObj.GetWindow() ) + else if ( rChildFrameOrObj.GetWindow() ) { OSL_FAIL( "<SwAccessibleContext::InvalidateChildPosOrSize(..)> - not expected to handle dispose of child of type <vcl::Window>." ); } @@ -1292,7 +1292,7 @@ void SwAccessibleContext::InvalidateStates( AccessibleStates _nStates ) } } - InvalidateChildrenStates( GetFrm(), _nStates ); + InvalidateChildrenStates( GetFrame(), _nStates ); } } @@ -1330,19 +1330,19 @@ bool SwAccessibleContext::HasCursor() bool SwAccessibleContext::Select( SwPaM *pPaM, SdrObject *pObj, bool bAdd ) { - SwCrsrShell* pCrsrShell = GetCrsrShell(); - if( !pCrsrShell ) + SwCursorShell* pCursorShell = GetCursorShell(); + if( !pCursorShell ) return false; - SwFEShell* pFEShell = dynamic_cast<const SwFEShell*>( pCrsrShell) != nullptr - ? static_cast<SwFEShell*>( pCrsrShell ) + SwFEShell* pFEShell = dynamic_cast<const SwFEShell*>( pCursorShell) != nullptr + ? static_cast<SwFEShell*>( pCursorShell ) : nullptr; // Get rid of activated OLE object if( pFEShell ) pFEShell->FinishOLEObj(); - SwWrtShell* pWrtShell = dynamic_cast<const SwWrtShell*>( pCrsrShell) != nullptr - ? static_cast<SwWrtShell*>( pCrsrShell ) + SwWrtShell* pWrtShell = dynamic_cast<const SwWrtShell*>( pCursorShell) != nullptr + ? static_cast<SwWrtShell*>( pCursorShell ) : nullptr; bool bRet = false; @@ -1360,28 +1360,28 @@ bool SwAccessibleContext::Select( SwPaM *pPaM, SdrObject *pObj, { // Get rid of frame selection. If there is one, make text cursor // visible again. - bool bCallShowCrsr = false; - if( pFEShell && (pFEShell->IsFrmSelected() || + bool bCallShowCursor = false; + if( pFEShell && (pFEShell->IsFrameSelected() || pFEShell->IsObjSelected()) ) { Point aPt( LONG_MIN, LONG_MIN ); pFEShell->SelectObj( aPt ); - bCallShowCrsr = true; + bCallShowCursor = true; } - pCrsrShell->KillPams(); + pCursorShell->KillPams(); if( pWrtShell && pPaM->HasMark() ) // We have to do this or SwWrtShell can't figure out that it needs // to kill the selection later, when the user moves the cursor. pWrtShell->SttSelect(); - pCrsrShell->SetSelection( *pPaM ); + pCursorShell->SetSelection( *pPaM ); if( pPaM->HasMark() && *pPaM->GetPoint() == *pPaM->GetMark()) // Setting a "Selection" that starts and ends at the same spot // should remove the selection rather than create an empty one, so // that we get defined behavior if accessibility sets the cursor // later. - pCrsrShell->ClearMark(); - if( bCallShowCrsr ) - pCrsrShell->ShowCrsr(); + pCursorShell->ClearMark(); + if( bCallShowCursor ) + pCursorShell->ShowCursor(); bRet = true; } @@ -1411,22 +1411,22 @@ OUString SwAccessibleContext::GetResource( sal_uInt16 nResId, return sStr; } -void SwAccessibleContext::RemoveFrmFromAccessibleMap() +void SwAccessibleContext::RemoveFrameFromAccessibleMap() { - if (m_isRegisteredAtAccessibleMap && GetFrm() && GetMap()) - GetMap()->RemoveContext( GetFrm() ); + if (m_isRegisteredAtAccessibleMap && GetFrame() && GetMap()) + GetMap()->RemoveContext( GetFrame() ); } bool SwAccessibleContext::HasAdditionalAccessibleChildren() { bool bRet( false ); - if ( GetFrm()->IsTextFrm() ) + if ( GetFrame()->IsTextFrame() ) { SwPostItMgr* pPostItMgr = GetMap()->GetShell()->GetPostItMgr(); if ( pPostItMgr && pPostItMgr->HasNotes() && pPostItMgr->ShowNotes() ) { - bRet = pPostItMgr->HasFrmConnectedSidebarWins( *(GetFrm()) ); + bRet = pPostItMgr->HasFrameConnectedSidebarWins( *(GetFrame()) ); } } @@ -1438,13 +1438,13 @@ vcl::Window* SwAccessibleContext::GetAdditionalAccessibleChild( const sal_Int32 { vcl::Window* pAdditionalAccessibleChild( nullptr ); - if ( GetFrm()->IsTextFrm() ) + if ( GetFrame()->IsTextFrame() ) { SwPostItMgr* pPostItMgr = GetMap()->GetShell()->GetPostItMgr(); if ( pPostItMgr && pPostItMgr->HasNotes() && pPostItMgr->ShowNotes() ) { pAdditionalAccessibleChild = - pPostItMgr->GetSidebarWinForFrmByIndex( *(GetFrm()), nIndex ); + pPostItMgr->GetSidebarWinForFrameByIndex( *(GetFrame()), nIndex ); } } @@ -1454,12 +1454,12 @@ vcl::Window* SwAccessibleContext::GetAdditionalAccessibleChild( const sal_Int32 /** #i88070# - get all additional accessible children */ void SwAccessibleContext::GetAdditionalAccessibleChildren( std::vector< vcl::Window* >* pChildren ) { - if ( GetFrm()->IsTextFrm() ) + if ( GetFrame()->IsTextFrame() ) { SwPostItMgr* pPostItMgr = GetMap()->GetShell()->GetPostItMgr(); if ( pPostItMgr && pPostItMgr->HasNotes() && pPostItMgr->ShowNotes() ) { - pPostItMgr->GetAllSidebarWinForFrm( *(GetFrm()), pChildren ); + pPostItMgr->GetAllSidebarWinForFrame( *(GetFrame()), pChildren ); } } } diff --git a/sw/source/core/access/acccontext.hxx b/sw/source/core/access/acccontext.hxx index e52daa569fed..e703bf4e6c29 100644 --- a/sw/source/core/access/acccontext.hxx +++ b/sw/source/core/access/acccontext.hxx @@ -31,7 +31,7 @@ namespace vcl { class Window; } class SwAccessibleMap; -class SwCrsrShell; +class SwCursorShell; class SdrObject; class SwPaM; namespace utl { @@ -55,7 +55,7 @@ class SwAccessibleContext : { // The implements for the XAccessibleSelection interface has been // 'externalized' and wants access to the protected members like - // GetMap, GetChild, GetParent, and GetFrm. + // GetMap, GetChild, GetParent, and GetFrame. friend class SwAccessibleSelectionHelper; protected: @@ -117,15 +117,15 @@ protected: return GetMap()->GetShell(); } - /** convenience method to get SwCrsrShell through accessibility map - * @returns SwCrsrShell, or NULL if none is found */ - SwCrsrShell* GetCrsrShell(); - const SwCrsrShell* GetCrsrShell() const; + /** convenience method to get SwCursorShell through accessibility map + * @returns SwCursorShell, or NULL if none is found */ + SwCursorShell* GetCursorShell(); + const SwCursorShell* GetCursorShell() const; // Notify all children that the vis area has changed. - // The SwFrm might belong to the current object or to any other child or + // The SwFrame might belong to the current object or to any other child or // grandchild. - void ChildrenScrolled( const SwFrm *pFrm, const SwRect& rOldVisArea ); + void ChildrenScrolled( const SwFrame *pFrame, const SwRect& rOldVisArea ); // The context's showing state changed. May only be called for context that // exist even if they aren't visible. @@ -140,15 +140,15 @@ protected: // The context has to be removed while setting the vis area void ScrolledOut( const SwRect& rOldVisArea ); - // Invalidate the states of all children of the specified SwFrm. The - // SwFrm might belong the current object or to any child or grandchild! + // Invalidate the states of all children of the specified SwFrame. The + // SwFrame might belong the current object or to any child or grandchild! // #i27301# - use new type definition for <_nStates> - void InvalidateChildrenStates( const SwFrm* _pFrm, + void InvalidateChildrenStates( const SwFrame* _pFrame, AccessibleStates _nStates ); - // Dispose children of the specified SwFrm. The SwFrm might belong to + // Dispose children of the specified SwFrame. The SwFrame might belong to // the current object or to any other child or grandchild. - void DisposeChildren( const SwFrm *pFrm, + void DisposeChildren( const SwFrame *pFrame, bool bRecursive ); void DisposeShape( const SdrObject *pObj, @@ -188,13 +188,13 @@ protected: { m_isRegisteredAtAccessibleMap = false; } - void RemoveFrmFromAccessibleMap(); + void RemoveFrameFromAccessibleMap(); virtual ~SwAccessibleContext(); public: SwAccessibleContext( SwAccessibleMap *m_pMap, sal_Int16 nRole, - const SwFrm *pFrm ); + const SwFrame *pFrame ); // XAccessible @@ -319,14 +319,14 @@ public: virtual void Dispose( bool bRecursive = false ); // The child object is not visible an longer and should be destroyed - virtual void DisposeChild( const sw::access::SwAccessibleChild& rFrmOrObj, bool bRecursive ); + virtual void DisposeChild( const sw::access::SwAccessibleChild& rFrameOrObj, bool bRecursive ); // The object has been moved by the layout - virtual void InvalidatePosOrSize( const SwRect& rFrm ); + virtual void InvalidatePosOrSize( const SwRect& rFrame ); // The child object has been moved by the layout - virtual void InvalidateChildPosOrSize( const sw::access::SwAccessibleChild& rFrmOrObj, - const SwRect& rFrm ); + virtual void InvalidateChildPosOrSize( const sw::access::SwAccessibleChild& rFrameOrObj, + const SwRect& rFrame ); // The content may have changed (but it hasn't to have changed) void InvalidateContent(); @@ -386,7 +386,7 @@ public: throw aExcept; #define CHECK_FOR_DEFUNC_THIS( ifc, ths ) \ - if( !(GetFrm() && GetMap()) ) \ + if( !(GetFrame() && GetMap()) ) \ { \ css::uno::Reference < ifc > xThis( ths ); \ css::lang::DisposedException aExcept( \ diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx index 08271f25bf16..2cb759a11876 100644 --- a/sw/source/core/access/accdoc.cxx +++ b/sw/source/core/access/accdoc.cxx @@ -93,7 +93,7 @@ void SwAccessibleDocumentBase::SetVisArea() SwAccessibleFrame::SetVisArea( GetMap()->GetVisArea() ); // #i58139# - showing state of document view needs also be updated. // Thus, call method <Scrolled(..)> instead of <ChildrenScrolled(..)> - // ChildrenScrolled( GetFrm(), aOldVisArea ); + // ChildrenScrolled( GetFrame(), aOldVisArea ); Scrolled( aOldVisArea ); } } @@ -382,7 +382,7 @@ SwAccessibleDocument::~SwAccessibleDocument() void SwAccessibleDocument::Dispose( bool bRecursive ) { - OSL_ENSURE( GetFrm() && GetMap(), "already disposed" ); + OSL_ENSURE( GetFrame() && GetMap(), "already disposed" ); vcl::Window *pWin = GetMap() ? GetMap()->GetShell()->GetWin() : nullptr; if( pWin ) @@ -559,12 +559,12 @@ uno::Any SAL_CALL SwAccessibleDocument::getExtendedAttributes() if (!pDoc) return anyAtrribute; - SwCrsrShell* pCrsrShell = GetCrsrShell(); - if( !pCrsrShell ) + SwCursorShell* pCursorShell = GetCursorShell(); + if( !pCursorShell ) return anyAtrribute; - SwFEShell* pFEShell = dynamic_cast<const SwFEShell*>( pCrsrShell) != nullptr - ? static_cast<SwFEShell*>( pCrsrShell ) + SwFEShell* pFEShell = dynamic_cast<const SwFEShell*>( pCursorShell) != nullptr + ? static_cast<SwFEShell*>( pCursorShell ) : nullptr; OUString sAttrName; OUString sValue; @@ -582,95 +582,95 @@ uno::Any SAL_CALL SwAccessibleDocument::getExtendedAttributes() sValue += OUString::number( nPage ) ; sAttrName = ";total-pages:"; sValue += sAttrName; - sValue += OUString::number( pCrsrShell->GetPageCnt() ) ; + sValue += OUString::number( pCursorShell->GetPageCnt() ) ; sValue += ";"; sAttrName = "line-number:"; - SwContentFrm* pCurrFrm = pCrsrShell->GetCurrFrm(); - SwPageFrm* pCurrPage=static_cast<SwFrm*>(pCurrFrm)->FindPageFrm(); + SwContentFrame* pCurrFrame = pCursorShell->GetCurrFrame(); + SwPageFrame* pCurrPage=static_cast<SwFrame*>(pCurrFrame)->FindPageFrame(); sal_uLong nLineNum = 0; - SwTextFrm* pTextFrm = nullptr; - SwTextFrm* pCurrTextFrm = nullptr; - pTextFrm = static_cast< SwTextFrm* >(static_cast< SwPageFrm* > (pCurrPage)->ContainsContent()); - if (pCurrFrm->IsInFly())//such as, graphic,chart + SwTextFrame* pTextFrame = nullptr; + SwTextFrame* pCurrTextFrame = nullptr; + pTextFrame = static_cast< SwTextFrame* >(static_cast< SwPageFrame* > (pCurrPage)->ContainsContent()); + if (pCurrFrame->IsInFly())//such as, graphic,chart { - SwFlyFrm *pFlyFrm = pCurrFrm->FindFlyFrm(); - const SwFormatAnchor& rAnchor = pFlyFrm->GetFormat()->GetAnchor(); + SwFlyFrame *pFlyFrame = pCurrFrame->FindFlyFrame(); + const SwFormatAnchor& rAnchor = pFlyFrame->GetFormat()->GetAnchor(); RndStdIds eAnchorId = rAnchor.GetAnchorId(); if(eAnchorId == FLY_AS_CHAR) { - const SwFrm *pSwFrm = pFlyFrm->GetAnchorFrm(); - if(pSwFrm->IsTextFrm()) - pCurrTextFrm = const_cast<SwTextFrm*>(static_cast<const SwTextFrm*>(pSwFrm)); + const SwFrame *pSwFrame = pFlyFrame->GetAnchorFrame(); + if(pSwFrame->IsTextFrame()) + pCurrTextFrame = const_cast<SwTextFrame*>(static_cast<const SwTextFrame*>(pSwFrame)); } } else - pCurrTextFrm = const_cast<SwTextFrm*>(static_cast<const SwTextFrm* >(pCurrFrm)); + pCurrTextFrame = const_cast<SwTextFrame*>(static_cast<const SwTextFrame* >(pCurrFrame)); //check whether the text frame where the Graph/OLE/Frame anchored is in the Header/Footer - SwFrm* pFrm = pCurrTextFrm; - while ( pFrm && !pFrm->IsHeaderFrm() && !pFrm->IsFooterFrm() ) - pFrm = pFrm->GetUpper(); - if ( pFrm ) - pCurrTextFrm = nullptr; + SwFrame* pFrame = pCurrTextFrame; + while ( pFrame && !pFrame->IsHeaderFrame() && !pFrame->IsFooterFrame() ) + pFrame = pFrame->GetUpper(); + if ( pFrame ) + pCurrTextFrame = nullptr; //check shape - if(pCrsrShell->Imp()->GetDrawView()) + if(pCursorShell->Imp()->GetDrawView()) { - const SdrMarkList &rMrkList = pCrsrShell->Imp()->GetDrawView()->GetMarkedObjectList(); + const SdrMarkList &rMrkList = pCursorShell->Imp()->GetDrawView()->GetMarkedObjectList(); for ( size_t i = 0; i < rMrkList.GetMarkCount(); ++i ) { SdrObject *pObj = rMrkList.GetMark(i)->GetMarkedSdrObj(); SwFrameFormat* pFormat = static_cast<SwDrawContact*>(pObj->GetUserCall())->GetFormat(); const SwFormatAnchor& rAnchor = pFormat->GetAnchor(); if( FLY_AS_CHAR != rAnchor.GetAnchorId() ) - pCurrTextFrm = nullptr; + pCurrTextFrame = nullptr; } } //calculate line number - if (pCurrTextFrm && pTextFrm) + if (pCurrTextFrame && pTextFrame) { - if (!(pCurrTextFrm->IsInTab() || pCurrTextFrm->IsInFootnote())) + if (!(pCurrTextFrame->IsInTab() || pCurrTextFrame->IsInFootnote())) { - while( pTextFrm != pCurrTextFrm ) + while( pTextFrame != pCurrTextFrame ) { //check header/footer - pFrm = pTextFrm; - while ( pFrm && !pFrm->IsHeaderFrm() && !pFrm->IsFooterFrm() ) - pFrm = pFrm->GetUpper(); - if ( pFrm ) + pFrame = pTextFrame; + while ( pFrame && !pFrame->IsHeaderFrame() && !pFrame->IsFooterFrame() ) + pFrame = pFrame->GetUpper(); + if ( pFrame ) { - pTextFrm = static_cast< SwTextFrm*>(pTextFrm->GetNextContentFrm()); + pTextFrame = static_cast< SwTextFrame*>(pTextFrame->GetNextContentFrame()); continue; } - if (!(pTextFrm->IsInTab() || pTextFrm->IsInFootnote() || pTextFrm->IsInFly())) - nLineNum += pTextFrm->GetThisLines(); - pTextFrm = static_cast< SwTextFrm* >(pTextFrm ->GetNextContentFrm()); + if (!(pTextFrame->IsInTab() || pTextFrame->IsInFootnote() || pTextFrame->IsInFly())) + nLineNum += pTextFrame->GetThisLines(); + pTextFrame = static_cast< SwTextFrame* >(pTextFrame ->GetNextContentFrame()); } - SwPaM* pCaret = pCrsrShell->GetCrsr(); - if (!pCurrTextFrm->IsEmpty() && pCaret) + SwPaM* pCaret = pCursorShell->GetCursor(); + if (!pCurrTextFrame->IsEmpty() && pCaret) { - if (pCurrTextFrm->IsTextFrm()) + if (pCurrTextFrame->IsTextFrame()) { const SwPosition* pPoint = nullptr; - if(pCurrTextFrm->IsInFly()) + if(pCurrTextFrame->IsInFly()) { - SwFlyFrm *pFlyFrm = pCurrTextFrm->FindFlyFrm(); - const SwFormatAnchor& rAnchor = pFlyFrm->GetFormat()->GetAnchor(); + SwFlyFrame *pFlyFrame = pCurrTextFrame->FindFlyFrame(); + const SwFormatAnchor& rAnchor = pFlyFrame->GetFormat()->GetAnchor(); pPoint= rAnchor.GetContentAnchor(); } else pPoint = pCaret->GetPoint(); const sal_Int32 nActPos = pPoint->nContent.GetIndex(); - nLineNum += pCurrTextFrm->GetLineCount( nActPos ); + nLineNum += pCurrTextFrame->GetLineCount( nActPos ); } else//graphic, form, shape, etc. { SwPosition* pPoint = pCaret->GetPoint(); - Point aPt = pCrsrShell->_GetCrsr()->GetPtPos(); - if( pCrsrShell->GetLayout()->GetCrsrOfst( pPoint, aPt/*,* &eTmpState*/ ) ) + Point aPt = pCursorShell->_GetCursor()->GetPtPos(); + if( pCursorShell->GetLayout()->GetCursorOfst( pPoint, aPt/*,* &eTmpState*/ ) ) { const sal_Int32 nActPos = pPoint->nContent.GetIndex(); - nLineNum += pCurrTextFrm->GetLineCount( nActPos ); + nLineNum += pCurrTextFrame->GetLineCount( nActPos ); } } } @@ -684,7 +684,7 @@ uno::Any SAL_CALL SwAccessibleDocument::getExtendedAttributes() sValue += ";"; - SwFrm* pCurrCol=static_cast<SwFrm*>(pCurrFrm)->FindColFrm(); + SwFrame* pCurrCol=static_cast<SwFrame*>(pCurrFrame)->FindColFrame(); sAttrName = "column-number:"; sValue += sAttrName; @@ -692,18 +692,18 @@ uno::Any SAL_CALL SwAccessibleDocument::getExtendedAttributes() int nCurrCol = 1; if(pCurrCol!=nullptr) { - //SwLayoutFrm* pParent = pCurrCol->GetUpper(); - SwFrm* pCurrPageCol=static_cast<SwFrm*>(pCurrFrm)->FindColFrm(); - while(pCurrPageCol && pCurrPageCol->GetUpper() && pCurrPageCol->GetUpper()->IsPageFrm()) + //SwLayoutFrame* pParent = pCurrCol->GetUpper(); + SwFrame* pCurrPageCol=static_cast<SwFrame*>(pCurrFrame)->FindColFrame(); + while(pCurrPageCol && pCurrPageCol->GetUpper() && pCurrPageCol->GetUpper()->IsPageFrame()) { pCurrPageCol = pCurrPageCol->GetUpper(); } - SwLayoutFrm* pParent = pCurrPageCol->GetUpper(); + SwLayoutFrame* pParent = pCurrPageCol->GetUpper(); if(pParent!=nullptr) { - SwFrm* pCol = pParent->Lower(); + SwFrame* pCol = pParent->Lower(); while(pCol&&(pCol!=pCurrPageCol)) { pCol = pCol->GetNext(); @@ -724,13 +724,13 @@ uno::Any SAL_CALL SwAccessibleDocument::getExtendedAttributes() sValue += ";"; - SwSectionFrm* pCurrSctFrm=static_cast<SwFrm*>(pCurrFrm)->FindSctFrm(); - if(pCurrSctFrm!=nullptr && pCurrSctFrm->GetSection()!=nullptr ) + SwSectionFrame* pCurrSctFrame=static_cast<SwFrame*>(pCurrFrame)->FindSctFrame(); + if(pCurrSctFrame!=nullptr && pCurrSctFrame->GetSection()!=nullptr ) { sAttrName = "section-name:"; sValue += sAttrName; - OUString sectionName = pCurrSctFrm->GetSection()->GetSectionName(); + OUString sectionName = pCurrSctFrame->GetSection()->GetSectionName(); sectionName = sectionName.replaceFirst( "\\" , "\\\\" ); sectionName = sectionName.replaceFirst( "=" , "\\=" ); @@ -749,10 +749,10 @@ uno::Any SAL_CALL SwAccessibleDocument::getExtendedAttributes() if(pCurrCol!=nullptr) { - SwLayoutFrm* pParent = pCurrCol->GetUpper(); + SwLayoutFrame* pParent = pCurrCol->GetUpper(); if(pParent!=nullptr) { - SwFrm* pCol = pParent->Lower(); + SwFrame* pCol = pParent->Lower(); while(pCol&&(pCol!=pCurrCol)) { pCol = pCol->GetNext(); @@ -766,7 +766,7 @@ uno::Any SAL_CALL SwAccessibleDocument::getExtendedAttributes() //section-total-columns sAttrName = "section-total-columns:"; - const SwFormatCol &rFormatSctCol=pCurrSctFrm->GetAttrSet()->GetCol(); + const SwFormatCol &rFormatSctCol=pCurrSctFrame->GetAttrSet()->GetCol(); sal_uInt16 nSctColCount=rFormatSctCol.GetNumCols(); nSctColCount = nSctColCount>0?nSctColCount:1; sValue += sAttrName; @@ -858,38 +858,38 @@ css::uno::Sequence< css::uno::Any > } else if ( nType == FORFINDREPLACEFLOWTO ) { - SwCrsrShell* pCrsrShell = GetCrsrShell(); - if ( pCrsrShell ) + SwCursorShell* pCursorShell = GetCursorShell(); + if ( pCursorShell ) { - SwPaM *_pStartCrsr = pCrsrShell->GetCrsr(), *__pStartCrsr = _pStartCrsr; + SwPaM *_pStartCursor = pCursorShell->GetCursor(), *__pStartCursor = _pStartCursor; SwContentNode* pPrevNode = nullptr; - std::vector<SwFrm*> vFrmList; + std::vector<SwFrame*> vFrameList; do { - if ( _pStartCrsr && _pStartCrsr->HasMark() ) + if ( _pStartCursor && _pStartCursor->HasMark() ) { - SwContentNode* pContentNode = _pStartCrsr->GetContentNode(); + SwContentNode* pContentNode = _pStartCursor->GetContentNode(); if ( pContentNode == pPrevNode ) { continue; } - SwFrm* pFrm = pContentNode ? pContentNode->getLayoutFrm( pCrsrShell->GetLayout() ) : nullptr; - if ( pFrm ) + SwFrame* pFrame = pContentNode ? pContentNode->getLayoutFrame( pCursorShell->GetLayout() ) : nullptr; + if ( pFrame ) { - vFrmList.push_back( pFrm ); + vFrameList.push_back( pFrame ); } pPrevNode = pContentNode; } } - while( _pStartCrsr && ( (_pStartCrsr = _pStartCrsr->GetNext()) != __pStartCrsr) ); + while( _pStartCursor && ( (_pStartCursor = _pStartCursor->GetNext()) != __pStartCursor) ); - if ( vFrmList.size() ) + if ( vFrameList.size() ) { - uno::Sequence< uno::Any > aRet(vFrmList.size()); - std::vector<SwFrm*>::iterator aIter = vFrmList.begin(); - for ( sal_Int32 nIndex = 0; aIter != vFrmList.end(); ++aIter, nIndex++ ) + uno::Sequence< uno::Any > aRet(vFrameList.size()); + std::vector<SwFrame*>::iterator aIter = vFrameList.begin(); + for ( sal_Int32 nIndex = 0; aIter != vFrameList.end(); ++aIter, nIndex++ ) { uno::Reference< XAccessible > xAcc = pAccMap->GetContext(*aIter, false); if ( xAcc.is() ) diff --git a/sw/source/core/access/accembedded.cxx b/sw/source/core/access/accembedded.cxx index fda48d759d1f..ef3b70b992d2 100644 --- a/sw/source/core/access/accembedded.cxx +++ b/sw/source/core/access/accembedded.cxx @@ -37,8 +37,8 @@ const sal_Char sImplementationName[] = "com.sun.star.comp.Writer.SwAccessibleEmb SwAccessibleEmbeddedObject::SwAccessibleEmbeddedObject( SwAccessibleMap* pInitMap, - const SwFlyFrm* pFlyFrm ) : - SwAccessibleNoTextFrame( pInitMap, AccessibleRole::EMBEDDED_OBJECT, pFlyFrm ) + const SwFlyFrame* pFlyFrame ) : + SwAccessibleNoTextFrame( pInitMap, AccessibleRole::EMBEDDED_OBJECT, pFlyFrame ) { } @@ -108,16 +108,16 @@ css::uno::Any SAL_CALL SwAccessibleEmbeddedObject::getExtendedAttributes() css::uno::Any strRet; OUString style; - SwFlyFrm* pFFrm = getFlyFrm(); + SwFlyFrame* pFFrame = getFlyFrame(); - if( pFFrm ) + if( pFFrame ) { style = "style:"; - SwContentFrm* pCFrm; - pCFrm = pFFrm->ContainsContent(); - if( pCFrm ) + SwContentFrame* pCFrame; + pCFrame = pFFrame->ContainsContent(); + if( pCFrame ) { - SwContentNode* pCNode = pCFrm->GetNode(); + SwContentNode* pCNode = pCFrame->GetNode(); if( pCNode ) { style += static_cast<SwOLENode*>(pCNode)->GetOLEObj().GetStyleString(); diff --git a/sw/source/core/access/accembedded.hxx b/sw/source/core/access/accembedded.hxx index c349edc09de4..3141ff580fa4 100644 --- a/sw/source/core/access/accembedded.hxx +++ b/sw/source/core/access/accembedded.hxx @@ -33,7 +33,7 @@ protected: public: SwAccessibleEmbeddedObject( SwAccessibleMap* pInitMap, - const SwFlyFrm* pFlyFrm ); + const SwFlyFrame* pFlyFrame ); // XInterface diff --git a/sw/source/core/access/accfootnote.cxx b/sw/source/core/access/accfootnote.cxx index c71e3fab4690..e64b0308f4e8 100644 --- a/sw/source/core/access/accfootnote.cxx +++ b/sw/source/core/access/accfootnote.cxx @@ -45,10 +45,10 @@ const sal_Char sImplementationNameEndnote[] = "com.sun.star.comp.Writer.SwAccess SwAccessibleFootnote::SwAccessibleFootnote( SwAccessibleMap* pInitMap, bool bIsEndnote, - const SwFootnoteFrm *pFootnoteFrm ) : + const SwFootnoteFrame *pFootnoteFrame ) : SwAccessibleContext( pInitMap, bIsEndnote ? AccessibleRole::END_NOTE : AccessibleRole::FOOTNOTE, - pFootnoteFrm ) + pFootnoteFrame ) { SolarMutexGuard aGuard; @@ -57,7 +57,7 @@ SwAccessibleFootnote::SwAccessibleFootnote( OUString sArg; const SwTextFootnote *pTextFootnote = - static_cast< const SwFootnoteFrm *>( GetFrm() )->GetAttr(); + static_cast< const SwFootnoteFrame *>( GetFrame() )->GetAttr(); if( pTextFootnote ) { const SwDoc *pDoc = GetShell()->GetDoc(); @@ -84,7 +84,7 @@ OUString SAL_CALL SwAccessibleFootnote::getAccessibleDescription() OUString sArg; const SwTextFootnote *pTextFootnote = - static_cast< const SwFootnoteFrm *>( GetFrm() )->GetAttr(); + static_cast< const SwFootnoteFrame *>( GetFrame() )->GetAttr(); if( pTextFootnote ) { const SwDoc *pDoc = GetMap()->GetShell()->GetDoc(); @@ -128,9 +128,9 @@ Sequence< sal_Int8 > SAL_CALL SwAccessibleFootnote::getImplementationId() return css::uno::Sequence<sal_Int8>(); } -bool SwAccessibleFootnote::IsEndnote( const SwFootnoteFrm *pFootnoteFrm ) +bool SwAccessibleFootnote::IsEndnote( const SwFootnoteFrame *pFootnoteFrame ) { - const SwTextFootnote *pTextFootnote = pFootnoteFrm ->GetAttr(); + const SwTextFootnote *pTextFootnote = pFootnoteFrame ->GetAttr(); return pTextFootnote && pTextFootnote->GetFootnote().IsEndNote() ; } diff --git a/sw/source/core/access/accfootnote.hxx b/sw/source/core/access/accfootnote.hxx index cc48ec61488b..1c715dc305b7 100644 --- a/sw/source/core/access/accfootnote.hxx +++ b/sw/source/core/access/accfootnote.hxx @@ -24,7 +24,7 @@ #include <acccontext.hxx> class SwAccessibleMap; -class SwFootnoteFrm; +class SwFootnoteFrame; class SwAccessibleFootnote : public SwAccessibleContext { @@ -34,7 +34,7 @@ protected: public: SwAccessibleFootnote( SwAccessibleMap* pInitMap, bool bIsEndnote, - const SwFootnoteFrm *pFootnoteFrm ); + const SwFootnoteFrame *pFootnoteFrame ); // XAccessibleContext @@ -64,7 +64,7 @@ public: // XTypeProvider virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(css::uno::RuntimeException, std::exception) override; - static bool IsEndnote( const SwFootnoteFrm *pFrm ); + static bool IsEndnote( const SwFootnoteFrame *pFrame ); }; #endif diff --git a/sw/source/core/access/accframe.cxx b/sw/source/core/access/accframe.cxx index 7ea913440e0a..aafafd8278d4 100644 --- a/sw/source/core/access/accframe.cxx +++ b/sw/source/core/access/accframe.cxx @@ -46,12 +46,12 @@ using namespace sw::access; // frame's paint area. sal_Int32 SwAccessibleFrame::GetChildCount( SwAccessibleMap& rAccMap, const SwRect& rVisArea, - const SwFrm *pFrm, + const SwFrame *pFrame, bool bInPagePreview ) { sal_Int32 nCount = 0; - const SwAccessibleChildSList aVisList( rVisArea, *pFrm, rAccMap ); + const SwAccessibleChildSList aVisList( rVisArea, *pFrame, rAccMap ); SwAccessibleChildSList::const_iterator aIter( aVisList.begin() ); while( aIter != aVisList.end() ) @@ -61,11 +61,11 @@ sal_Int32 SwAccessibleFrame::GetChildCount( SwAccessibleMap& rAccMap, { nCount++; } - else if( rLower.GetSwFrm() ) + else if( rLower.GetSwFrame() ) { // There are no unaccessible SdrObjects that count nCount += GetChildCount( rAccMap, - rVisArea, rLower.GetSwFrm(), + rVisArea, rLower.GetSwFrame(), bInPagePreview ); } ++aIter; @@ -77,7 +77,7 @@ sal_Int32 SwAccessibleFrame::GetChildCount( SwAccessibleMap& rAccMap, SwAccessibleChild SwAccessibleFrame::GetChild( SwAccessibleMap& rAccMap, const SwRect& rVisArea, - const SwFrm& rFrm, + const SwFrame& rFrame, sal_Int32& rPos, bool bInPagePreview ) { @@ -85,10 +85,10 @@ SwAccessibleChild SwAccessibleFrame::GetChild( if( rPos >= 0 ) { - if( SwAccessibleChildMap::IsSortingRequired( rFrm ) ) + if( SwAccessibleChildMap::IsSortingRequired( rFrame ) ) { // We need a sorted list here - const SwAccessibleChildMap aVisMap( rVisArea, rFrm, rAccMap ); + const SwAccessibleChildMap aVisMap( rVisArea, rFrame, rAccMap ); SwAccessibleChildMap::const_iterator aIter( aVisMap.cbegin() ); while( aIter != aVisMap.cend() && !aRet.IsValid() ) { @@ -100,11 +100,11 @@ SwAccessibleChild SwAccessibleFrame::GetChild( else rPos--; } - else if( rLower.GetSwFrm() ) + else if( rLower.GetSwFrame() ) { // There are no unaccessible SdrObjects that count aRet = GetChild( rAccMap, - rVisArea, *(rLower.GetSwFrm()), rPos, + rVisArea, *(rLower.GetSwFrame()), rPos, bInPagePreview ); } ++aIter; @@ -114,7 +114,7 @@ SwAccessibleChild SwAccessibleFrame::GetChild( { // The unsorted list is sorted enough, because it returns lower // frames in the correct order. - const SwAccessibleChildSList aVisList( rVisArea, rFrm, rAccMap ); + const SwAccessibleChildSList aVisList( rVisArea, rFrame, rAccMap ); SwAccessibleChildSList::const_iterator aIter( aVisList.begin() ); while( aIter != aVisList.end() && !aRet.IsValid() ) { @@ -126,11 +126,11 @@ SwAccessibleChild SwAccessibleFrame::GetChild( else rPos--; } - else if( rLower.GetSwFrm() ) + else if( rLower.GetSwFrame() ) { // There are no unaccessible SdrObjects that count aRet = GetChild( rAccMap, - rVisArea, *(rLower.GetSwFrm()), rPos, + rVisArea, *(rLower.GetSwFrame()), rPos, bInPagePreview ); } ++aIter; @@ -144,17 +144,17 @@ SwAccessibleChild SwAccessibleFrame::GetChild( bool SwAccessibleFrame::GetChildIndex( SwAccessibleMap& rAccMap, const SwRect& rVisArea, - const SwFrm& rFrm, + const SwFrame& rFrame, const SwAccessibleChild& rChild, sal_Int32& rPos, bool bInPagePreview ) { bool bFound = false; - if( SwAccessibleChildMap::IsSortingRequired( rFrm ) ) + if( SwAccessibleChildMap::IsSortingRequired( rFrame ) ) { // We need a sorted list here - const SwAccessibleChildMap aVisMap( rVisArea, rFrm, rAccMap ); + const SwAccessibleChildMap aVisMap( rVisArea, rFrame, rAccMap ); SwAccessibleChildMap::const_iterator aIter( aVisMap.cbegin() ); while( aIter != aVisMap.cend() && !bFound ) { @@ -166,11 +166,11 @@ bool SwAccessibleFrame::GetChildIndex( else rPos++; } - else if( rLower.GetSwFrm() ) + else if( rLower.GetSwFrame() ) { // There are no unaccessible SdrObjects that count bFound = GetChildIndex( rAccMap, - rVisArea, *(rLower.GetSwFrm()), rChild, + rVisArea, *(rLower.GetSwFrame()), rChild, rPos, bInPagePreview ); } ++aIter; @@ -181,7 +181,7 @@ bool SwAccessibleFrame::GetChildIndex( // The unsorted list is sorted enough, because it returns lower // frames in the correct order. - const SwAccessibleChildSList aVisList( rVisArea, rFrm, rAccMap ); + const SwAccessibleChildSList aVisList( rVisArea, rFrame, rAccMap ); SwAccessibleChildSList::const_iterator aIter( aVisList.begin() ); while( aIter != aVisList.end() && !bFound ) { @@ -193,11 +193,11 @@ bool SwAccessibleFrame::GetChildIndex( else rPos++; } - else if( rLower.GetSwFrm() ) + else if( rLower.GetSwFrame() ) { // There are no unaccessible SdrObjects that count bFound = GetChildIndex( rAccMap, - rVisArea, *(rLower.GetSwFrm()), rChild, + rVisArea, *(rLower.GetSwFrame()), rChild, rPos, bInPagePreview ); } ++aIter; @@ -208,18 +208,18 @@ bool SwAccessibleFrame::GetChildIndex( } SwAccessibleChild SwAccessibleFrame::GetChildAtPixel( const SwRect& rVisArea, - const SwFrm& rFrm, + const SwFrame& rFrame, const Point& rPixPos, bool bInPagePreview, SwAccessibleMap& rAccMap ) { SwAccessibleChild aRet; - if( SwAccessibleChildMap::IsSortingRequired( rFrm ) ) + if( SwAccessibleChildMap::IsSortingRequired( rFrame ) ) { // We need a sorted list here, and we have to reverse iterate, // because objects in front should be returned. - const SwAccessibleChildMap aVisMap( rVisArea, rFrm, rAccMap ); + const SwAccessibleChildMap aVisMap( rVisArea, rFrame, rAccMap ); SwAccessibleChildMap::const_reverse_iterator aRIter( aVisMap.crbegin() ); while( aRIter != aVisMap.crend() && !aRet.IsValid() ) { @@ -236,10 +236,10 @@ SwAccessibleChild SwAccessibleFrame::GetChildAtPixel( const SwRect& rVisArea, aRet = rLower; } } - else if( rLower.GetSwFrm() ) + else if( rLower.GetSwFrame() ) { // There are no unaccessible SdrObjects that count - aRet = GetChildAtPixel( rVisArea, *(rLower.GetSwFrm()), rPixPos, + aRet = GetChildAtPixel( rVisArea, *(rLower.GetSwFrame()), rPixPos, bInPagePreview, rAccMap ); } ++aRIter; @@ -250,7 +250,7 @@ SwAccessibleChild SwAccessibleFrame::GetChildAtPixel( const SwRect& rVisArea, // The unsorted list is sorted enough, because it returns lower // frames in the correct order. Moreover, we can iterate forward, // because the lowers don't overlap! - const SwAccessibleChildSList aVisList( rVisArea, rFrm, rAccMap ); + const SwAccessibleChildSList aVisList( rVisArea, rFrame, rAccMap ); SwAccessibleChildSList::const_iterator aIter( aVisList.begin() ); while( aIter != aVisList.end() && !aRet.IsValid() ) { @@ -267,10 +267,10 @@ SwAccessibleChild SwAccessibleFrame::GetChildAtPixel( const SwRect& rVisArea, aRet = rLower; } } - else if( rLower.GetSwFrm() ) + else if( rLower.GetSwFrame() ) { // There are no unaccessible SdrObjects that count - aRet = GetChildAtPixel( rVisArea, *(rLower.GetSwFrm()), rPixPos, + aRet = GetChildAtPixel( rVisArea, *(rLower.GetSwFrame()), rPixPos, bInPagePreview, rAccMap ); } ++aIter; @@ -282,14 +282,14 @@ SwAccessibleChild SwAccessibleFrame::GetChildAtPixel( const SwRect& rVisArea, void SwAccessibleFrame::GetChildren( SwAccessibleMap& rAccMap, const SwRect& rVisArea, - const SwFrm& rFrm, + const SwFrame& rFrame, ::std::list< SwAccessibleChild >& rChildren, bool bInPagePreview ) { - if( SwAccessibleChildMap::IsSortingRequired( rFrm ) ) + if( SwAccessibleChildMap::IsSortingRequired( rFrame ) ) { // We need a sorted list here - const SwAccessibleChildMap aVisMap( rVisArea, rFrm, rAccMap ); + const SwAccessibleChildMap aVisMap( rVisArea, rFrame, rAccMap ); SwAccessibleChildMap::const_iterator aIter( aVisMap.cbegin() ); while( aIter != aVisMap.cend() ) { @@ -298,10 +298,10 @@ void SwAccessibleFrame::GetChildren( SwAccessibleMap& rAccMap, { rChildren.push_back( rLower ); } - else if( rLower.GetSwFrm() ) + else if( rLower.GetSwFrame() ) { // There are no unaccessible SdrObjects that count - GetChildren( rAccMap, rVisArea, *(rLower.GetSwFrm()), + GetChildren( rAccMap, rVisArea, *(rLower.GetSwFrame()), rChildren, bInPagePreview ); } ++aIter; @@ -311,7 +311,7 @@ void SwAccessibleFrame::GetChildren( SwAccessibleMap& rAccMap, { // The unsorted list is sorted enough, because it returns lower // frames in the correct order. - const SwAccessibleChildSList aVisList( rVisArea, rFrm, rAccMap ); + const SwAccessibleChildSList aVisList( rVisArea, rFrame, rAccMap ); SwAccessibleChildSList::const_iterator aIter( aVisList.begin() ); while( aIter != aVisList.end() ) { @@ -320,10 +320,10 @@ void SwAccessibleFrame::GetChildren( SwAccessibleMap& rAccMap, { rChildren.push_back( rLower ); } - else if( rLower.GetSwFrm() ) + else if( rLower.GetSwFrame() ) { // There are no unaccessible SdrObjects that count - GetChildren( rAccMap, rVisArea, *(rLower.GetSwFrm()), + GetChildren( rAccMap, rVisArea, *(rLower.GetSwFrame()), rChildren, bInPagePreview ); } ++aIter; @@ -332,20 +332,20 @@ void SwAccessibleFrame::GetChildren( SwAccessibleMap& rAccMap, } SwRect SwAccessibleFrame::GetBounds( const SwAccessibleMap& rAccMap, - const SwFrm *pFrm ) + const SwFrame *pFrame ) { - if( !pFrm ) - pFrm = GetFrm(); + if( !pFrame ) + pFrame = GetFrame(); - SwAccessibleChild aFrm( pFrm ); - SwRect aBounds( aFrm.GetBounds( rAccMap ).Intersection( maVisArea ) ); + SwAccessibleChild aFrame( pFrame ); + SwRect aBounds( aFrame.GetBounds( rAccMap ).Intersection( maVisArea ) ); return aBounds; } bool SwAccessibleFrame::IsEditable( SwViewShell *pVSh ) const { - const SwFrm *pFrm = GetFrm(); - if( !pFrm ) + const SwFrame *pFrame = GetFrame(); + if( !pFrame ) return false; OSL_ENSURE( pVSh, "no view shell" ); @@ -353,7 +353,7 @@ bool SwAccessibleFrame::IsEditable( SwViewShell *pVSh ) const pVSh->IsPreview()) ) return false; - if( !pFrm->IsRootFrm() && pFrm->IsProtected() ) + if( !pFrame->IsRootFrame() && pFrame->IsProtected() ) return false; return true; @@ -361,8 +361,8 @@ bool SwAccessibleFrame::IsEditable( SwViewShell *pVSh ) const bool SwAccessibleFrame::IsOpaque( SwViewShell *pVSh ) const { - SwAccessibleChild aFrm( GetFrm() ); - if( !aFrm.GetSwFrm() ) + SwAccessibleChild aFrame( GetFrame() ); + if( !aFrame.GetSwFrame() ) return false; OSL_ENSURE( pVSh, "no view shell" ); @@ -372,49 +372,49 @@ bool SwAccessibleFrame::IsOpaque( SwViewShell *pVSh ) const const SwViewOption *pVOpt = pVSh->GetViewOptions(); do { - const SwFrm *pFrm = aFrm.GetSwFrm(); - if( pFrm->IsRootFrm() ) + const SwFrame *pFrame = aFrame.GetSwFrame(); + if( pFrame->IsRootFrame() ) return true; - if( pFrm->IsPageFrm() && !pVOpt->IsPageBack() ) + if( pFrame->IsPageFrame() && !pVOpt->IsPageBack() ) return false; - const SvxBrushItem &rBack = pFrm->GetAttrSet()->GetBackground(); + const SvxBrushItem &rBack = pFrame->GetAttrSet()->GetBackground(); if( !rBack.GetColor().GetTransparency() || rBack.GetGraphicPos() != GPOS_NONE ) return true; // If a fly frame has a transparent background color, we have to consider the background. // But a background color "no fill"/"auto fill" should *not* be considered. - if( pFrm->IsFlyFrm() && + if( pFrame->IsFlyFrame() && (rBack.GetColor().GetTransparency() != 0) && (rBack.GetColor() != COL_TRANSPARENT) ) return true; - if( pFrm->IsSctFrm() ) + if( pFrame->IsSctFrame() ) { - const SwSection* pSection = static_cast<const SwSectionFrm*>(pFrm)->GetSection(); + const SwSection* pSection = static_cast<const SwSectionFrame*>(pFrame)->GetSection(); if( pSection && ( TOX_HEADER_SECTION == pSection->GetType() || TOX_CONTENT_SECTION == pSection->GetType() ) && !pVOpt->IsReadonly() && SwViewOption::IsIndexShadings() ) return true; } - if( pFrm->IsFlyFrm() ) - aFrm = static_cast<const SwFlyFrm*>(pFrm)->GetAnchorFrm(); + if( pFrame->IsFlyFrame() ) + aFrame = static_cast<const SwFlyFrame*>(pFrame)->GetAnchorFrame(); else - aFrm = pFrm->GetUpper(); - } while( aFrm.GetSwFrm() && !aFrm.IsAccessible( IsInPagePreview() ) ); + aFrame = pFrame->GetUpper(); + } while( aFrame.GetSwFrame() && !aFrame.IsAccessible( IsInPagePreview() ) ); return false; } SwAccessibleFrame::SwAccessibleFrame( const SwRect& rVisArea, - const SwFrm *pF, + const SwFrame *pF, bool bIsPagePreview ) : maVisArea( rVisArea ), - mpFrm( pF ), + mpFrame( pF ), mbIsInPagePreview( bIsPagePreview ), bIsAccDocUse( false ) { @@ -424,16 +424,16 @@ SwAccessibleFrame::~SwAccessibleFrame() { } -const SwFrm* SwAccessibleFrame::GetParent( const SwAccessibleChild& rFrmOrObj, +const SwFrame* SwAccessibleFrame::GetParent( const SwAccessibleChild& rFrameOrObj, bool bInPagePreview ) { - return rFrmOrObj.GetParent( bInPagePreview ); + return rFrameOrObj.GetParent( bInPagePreview ); } OUString SwAccessibleFrame::GetFormattedPageNumber() const { - sal_uInt16 nPageNum = GetFrm()->GetVirtPageNum(); - sal_uInt32 nFormat = GetFrm()->FindPageFrm()->GetPageDesc() + sal_uInt16 nPageNum = GetFrame()->GetVirtPageNum(); + sal_uInt32 nFormat = GetFrame()->FindPageFrame()->GetPageDesc() ->GetNumType().GetNumberingType(); if( SVX_NUM_NUMBER_NONE == nFormat ) nFormat = SVX_NUM_ARABIC; @@ -444,21 +444,21 @@ OUString SwAccessibleFrame::GetFormattedPageNumber() const sal_Int32 SwAccessibleFrame::GetChildCount( SwAccessibleMap& rAccMap ) const { - return GetChildCount( rAccMap, maVisArea, mpFrm, IsInPagePreview() ); + return GetChildCount( rAccMap, maVisArea, mpFrame, IsInPagePreview() ); } sw::access::SwAccessibleChild SwAccessibleFrame::GetChild( SwAccessibleMap& rAccMap, sal_Int32 nPos ) const { - return SwAccessibleFrame::GetChild( rAccMap, maVisArea, *mpFrm, nPos, IsInPagePreview() ); + return SwAccessibleFrame::GetChild( rAccMap, maVisArea, *mpFrame, nPos, IsInPagePreview() ); } sal_Int32 SwAccessibleFrame::GetChildIndex( SwAccessibleMap& rAccMap, const sw::access::SwAccessibleChild& rChild ) const { sal_Int32 nPos = 0; - return GetChildIndex( rAccMap, maVisArea, *mpFrm, rChild, nPos, IsInPagePreview() ) + return GetChildIndex( rAccMap, maVisArea, *mpFrame, rChild, nPos, IsInPagePreview() ) ? nPos : -1L; } @@ -467,19 +467,19 @@ sw::access::SwAccessibleChild SwAccessibleFrame::GetChildAtPixel( const Point& rPos, SwAccessibleMap& rAccMap ) const { - return GetChildAtPixel( maVisArea, *mpFrm, rPos, IsInPagePreview(), rAccMap ); + return GetChildAtPixel( maVisArea, *mpFrame, rPos, IsInPagePreview(), rAccMap ); } void SwAccessibleFrame::GetChildren( SwAccessibleMap& rAccMap, ::std::list< sw::access::SwAccessibleChild >& rChildren ) const { - GetChildren( rAccMap, maVisArea, *mpFrm, rChildren, IsInPagePreview() ); + GetChildren( rAccMap, maVisArea, *mpFrame, rChildren, IsInPagePreview() ); } bool SwAccessibleFrame::IsShowing( const SwAccessibleMap& rAccMap, - const sw::access::SwAccessibleChild& rFrmOrObj ) const + const sw::access::SwAccessibleChild& rFrameOrObj ) const { - return IsShowing( rFrmOrObj.GetBox( rAccMap ) ); + return IsShowing( rFrameOrObj.GetBox( rAccMap ) ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/access/accframe.hxx b/sw/source/core/access/accframe.hxx index 91462027f665..55d9e2497043 100644 --- a/sw/source/core/access/accframe.hxx +++ b/sw/source/core/access/accframe.hxx @@ -29,7 +29,7 @@ #include <accfrmobj.hxx> class SwAccessibleMap; -class SwFrm; +class SwFrame; class SwViewShell; namespace sw { namespace access { class SwAccessibleChild; @@ -40,39 +40,39 @@ namespace sw { namespace access { class SwAccessibleFrame { SwRect maVisArea; - const SwFrm* mpFrm; + const SwFrame* mpFrame; const bool mbIsInPagePreview; protected: // #i77106# - method needs to be called by new class <SwAccessibleTableColHeaders> static sal_Int32 GetChildCount( SwAccessibleMap& rAccMap, const SwRect& rVisArea, - const SwFrm *pFrm, + const SwFrame *pFrame, bool bInPagePreviewr ); // private: static sw::access::SwAccessibleChild GetChild( SwAccessibleMap& rAccMap, const SwRect& rVisArea, - const SwFrm& rFrm, + const SwFrame& rFrame, sal_Int32& rPos, bool bInPagePreview); static bool GetChildIndex( SwAccessibleMap& rAccMap, const SwRect& rVisArea, - const SwFrm& rFrm, + const SwFrame& rFrame, const sw::access::SwAccessibleChild& rChild, sal_Int32& rPos, bool bInPagePreview ); static sw::access::SwAccessibleChild GetChildAtPixel( const SwRect& rVisArea, - const SwFrm& rFrm, + const SwFrame& rFrame, const Point& rPos, bool bInPagePreview, SwAccessibleMap& rAccMap ); static void GetChildren( SwAccessibleMap& rAccMap, const SwRect& rVisArea, - const SwFrm& rFrm, + const SwFrame& rFrame, ::std::list< sw::access::SwAccessibleChild >& rChildren, bool bInPagePreview ); @@ -82,8 +82,8 @@ protected: bool IsOpaque( SwViewShell *pVSh ) const; bool IsShowing( const SwAccessibleMap& rAccMap, - const sw::access::SwAccessibleChild& rFrmOrObj ) const; - inline bool IsShowing( const SwRect& rFrm ) const; + const sw::access::SwAccessibleChild& rFrameOrObj ) const; + inline bool IsShowing( const SwRect& rFrame ) const; inline bool IsShowing( const SwAccessibleMap& rAccMap ) const; inline bool IsInPagePreview() const @@ -91,23 +91,23 @@ protected: return mbIsInPagePreview; } - inline void ClearFrm() + inline void ClearFrame() { - mpFrm = nullptr; + mpFrame = nullptr; } SwAccessibleFrame( const SwRect& rVisArea, - const SwFrm *pFrm, + const SwFrame *pFrame, bool bIsPagePreview ); virtual ~SwAccessibleFrame(); // MT: Move to private area? bool bIsAccDocUse; public: - // Return the SwFrm this context is attached to. - const SwFrm* GetFrm() const { return mpFrm; }; + // Return the SwFrame this context is attached to. + const SwFrame* GetFrame() const { return mpFrame; }; - static const SwFrm* GetParent( const sw::access::SwAccessibleChild& rFrmOrObj, + static const SwFrame* GetParent( const sw::access::SwAccessibleChild& rFrameOrObj, bool bInPagePreview ); sal_Int32 GetChildIndex( SwAccessibleMap& rAccMap, @@ -117,14 +117,14 @@ protected: // Return the bounding box of the frame clipped to the vis area. If // no frame is specified, use this' frame. SwRect GetBounds( const SwAccessibleMap& rAccMap, - const SwFrm *pFrm = nullptr ); + const SwFrame *pFrame = nullptr ); // Return the upper that has a context attached. This might be // another one than the immediate upper. - inline const SwFrm *GetParent() const; + inline const SwFrame *GetParent() const; // Return the lower count or the nth lower, there the lowers have a - // not be same one as the SwFrm's lowers + // not be same one as the SwFrame's lowers sal_Int32 GetChildCount( SwAccessibleMap& rAccMap ) const; sw::access::SwAccessibleChild GetChild( SwAccessibleMap& rAccMap, sal_Int32 nPos ) const; @@ -146,21 +146,21 @@ protected: OUString GetFormattedPageNumber() const; }; -inline bool SwAccessibleFrame::IsShowing( const SwRect& rFrm ) const +inline bool SwAccessibleFrame::IsShowing( const SwRect& rFrame ) const { - return rFrm.IsOver( maVisArea ); + return rFrame.IsOver( maVisArea ); } inline bool SwAccessibleFrame::IsShowing( const SwAccessibleMap& rAccMap ) const { - sw::access::SwAccessibleChild aFrmOrObj( GetFrm() ); - return IsShowing( rAccMap, aFrmOrObj ); + sw::access::SwAccessibleChild aFrameOrObj( GetFrame() ); + return IsShowing( rAccMap, aFrameOrObj ); } -inline const SwFrm *SwAccessibleFrame::GetParent() const +inline const SwFrame *SwAccessibleFrame::GetParent() const { - sw::access::SwAccessibleChild aFrmOrObj( GetFrm() ); - return GetParent( aFrmOrObj, IsInPagePreview() ); + sw::access::SwAccessibleChild aFrameOrObj( GetFrame() ); + return GetParent( aFrameOrObj, IsInPagePreview() ); } #endif diff --git a/sw/source/core/access/accframebase.cxx b/sw/source/core/access/accframebase.cxx index f895714fd41c..dcd7e577e0e6 100644 --- a/sw/source/core/access/accframebase.cxx +++ b/sw/source/core/access/accframebase.cxx @@ -53,8 +53,8 @@ bool SwAccessibleFrameBase::IsSelected() if( dynamic_cast<const SwFEShell*>( pVSh) != nullptr ) { const SwFEShell *pFESh = static_cast< const SwFEShell * >( pVSh ); - const SwFrm *pFlyFrm = pFESh->GetSelectedFlyFrm(); - if( pFlyFrm == GetFrm() ) + const SwFrame *pFlyFrame = pFESh->GetSelectedFlyFrame(); + if( pFlyFrame == GetFrame() ) bRet = true; } @@ -94,21 +94,21 @@ void SwAccessibleFrameBase::GetStates( rStateSet.AddState( AccessibleStateType::SELECTED ); } -sal_uInt8 SwAccessibleFrameBase::GetNodeType( const SwFlyFrm *pFlyFrm ) +sal_uInt8 SwAccessibleFrameBase::GetNodeType( const SwFlyFrame *pFlyFrame ) { sal_uInt8 nType = ND_TEXTNODE; - if( pFlyFrm->Lower() ) + if( pFlyFrame->Lower() ) { - if( pFlyFrm->Lower()->IsNoTextFrm() ) + if( pFlyFrame->Lower()->IsNoTextFrame() ) { - const SwContentFrm *pCntFrm = - static_cast<const SwContentFrm *>( pFlyFrm->Lower() ); - nType = pCntFrm->GetNode()->GetNodeType(); + const SwContentFrame *pContentFrame = + static_cast<const SwContentFrame *>( pFlyFrame->Lower() ); + nType = pContentFrame->GetNode()->GetNodeType(); } } else { - const SwFrameFormat *pFrameFormat = pFlyFrm->GetFormat(); + const SwFrameFormat *pFrameFormat = pFlyFrame->GetFormat(); const SwFormatContent& rContent = pFrameFormat->GetContent(); const SwNodeIndex *pNdIdx = rContent.GetContentIdx(); if( pNdIdx ) @@ -126,13 +126,13 @@ sal_uInt8 SwAccessibleFrameBase::GetNodeType( const SwFlyFrm *pFlyFrm ) SwAccessibleFrameBase::SwAccessibleFrameBase( SwAccessibleMap* pInitMap, sal_Int16 nInitRole, - const SwFlyFrm* pFlyFrm ) : - SwAccessibleContext( pInitMap, nInitRole, pFlyFrm ), + const SwFlyFrame* pFlyFrame ) : + SwAccessibleContext( pInitMap, nInitRole, pFlyFrame ), bIsSelected( false ) { SolarMutexGuard aGuard; - const SwFrameFormat *pFrameFormat = pFlyFrm->GetFormat(); + const SwFrameFormat *pFrameFormat = pFlyFrame->GetFormat(); const_cast< SwFrameFormat * >( pFrameFormat )->Add( this ); SetName( pFrameFormat->GetName() ); @@ -215,13 +215,13 @@ SwAccessibleFrameBase::~SwAccessibleFrameBase() void SwAccessibleFrameBase::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) { sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0 ; - const SwFlyFrm *pFlyFrm = static_cast< const SwFlyFrm * >( GetFrm() ); + const SwFlyFrame *pFlyFrame = static_cast< const SwFlyFrame * >( GetFrame() ); switch( nWhich ) { case RES_NAME_CHANGED: - if( pFlyFrm ) + if( pFlyFrame ) { - const SwFrameFormat *pFrameFormat = pFlyFrm->GetFormat(); + const SwFrameFormat *pFrameFormat = pFlyFrame->GetFormat(); assert(pFrameFormat == GetRegisteredIn() && "invalid frame"); const OUString sOldName( GetName() ); @@ -272,25 +272,25 @@ void SwAccessibleFrameBase::Dispose( bool bRecursive ) } //Get the selection cursor of the document. -SwPaM* SwAccessibleFrameBase::GetCrsr() +SwPaM* SwAccessibleFrameBase::GetCursor() { // get the cursor shell; if we don't have any, we don't have a // cursor/selection either - SwPaM* pCrsr = nullptr; - SwCrsrShell* pCrsrShell = GetCrsrShell(); - if( pCrsrShell != nullptr && !pCrsrShell->IsTableMode() ) + SwPaM* pCursor = nullptr; + SwCursorShell* pCursorShell = GetCursorShell(); + if( pCursorShell != nullptr && !pCursorShell->IsTableMode() ) { - SwFEShell *pFESh = dynamic_cast<const SwFEShell*>( pCrsrShell) != nullptr - ? static_cast< SwFEShell * >( pCrsrShell ) : nullptr; + SwFEShell *pFESh = dynamic_cast<const SwFEShell*>( pCursorShell) != nullptr + ? static_cast< SwFEShell * >( pCursorShell ) : nullptr; if( !pFESh || - !(pFESh->IsFrmSelected() || pFESh->IsObjSelected() > 0) ) + !(pFESh->IsFrameSelected() || pFESh->IsObjSelected() > 0) ) { // get the selection, and test whether it affects our text node - pCrsr = pCrsrShell->GetCrsr( false /* ??? */ ); + pCursor = pCursorShell->GetCursor( false /* ??? */ ); } } - return pCrsr; + return pCursor; } //Return the selected state of the object. @@ -305,8 +305,8 @@ bool SwAccessibleFrameBase::GetSelectedState( ) } // SELETED. - SwFlyFrm* pFlyFrm = getFlyFrm(); - const SwFrameFormat *pFrameFormat = pFlyFrm->GetFormat(); + SwFlyFrame* pFlyFrame = getFlyFrame(); + const SwFrameFormat *pFrameFormat = pFlyFrame->GetFormat(); const SwFormatAnchor& pAnchor = pFrameFormat->GetAnchor(); const SwPosition *pPos = pAnchor.GetContentAnchor(); if( !pPos ) @@ -314,23 +314,23 @@ bool SwAccessibleFrameBase::GetSelectedState( ) int pIndex = pPos->nContent.GetIndex(); if( pPos->nNode.GetNode().GetTextNode() ) { - SwPaM* pCrsr = GetCrsr(); - if( pCrsr != nullptr ) + SwPaM* pCursor = GetCursor(); + if( pCursor != nullptr ) { const SwTextNode* pNode = pPos->nNode.GetNode().GetTextNode(); sal_uLong nHere = pNode->GetIndex(); // iterate over ring - SwPaM* pRingStart = pCrsr; + SwPaM* pRingStart = pCursor; do { // ignore, if no mark - if( pCrsr->HasMark() ) + if( pCursor->HasMark() ) { - // check whether nHere is 'inside' pCrsr - SwPosition* pStart = pCrsr->Start(); + // check whether nHere is 'inside' pCursor + SwPosition* pStart = pCursor->Start(); sal_uLong nStartIndex = pStart->nNode.GetIndex(); - SwPosition* pEnd = pCrsr->End(); + SwPosition* pEnd = pCursor->End(); sal_uLong nEndIndex = pEnd->nNode.GetIndex(); if( ( nHere >= nStartIndex ) && (nHere <= nEndIndex) ) { @@ -353,26 +353,26 @@ bool SwAccessibleFrameBase::GetSelectedState( ) // else: this PaM is collapsed and doesn't select anything // next PaM in ring - pCrsr = pCrsr->GetNext(); + pCursor = pCursor->GetNext(); } - while( pCrsr != pRingStart ); + while( pCursor != pRingStart ); } } return false; } -SwFlyFrm* SwAccessibleFrameBase::getFlyFrm() const +SwFlyFrame* SwAccessibleFrameBase::getFlyFrame() const { - SwFlyFrm* pFlyFrm = nullptr; + SwFlyFrame* pFlyFrame = nullptr; - const SwFrm* pFrm = GetFrm(); - assert(pFrm); - if( pFrm->IsFlyFrm() ) + const SwFrame* pFrame = GetFrame(); + assert(pFrame); + if( pFrame->IsFlyFrame() ) { - pFlyFrm = static_cast<SwFlyFrm*>( const_cast<SwFrm*>( pFrm ) ); + pFlyFrame = static_cast<SwFlyFrame*>( const_cast<SwFrame*>( pFrame ) ); } - return pFlyFrm; + return pFlyFrame; } bool SwAccessibleFrameBase::SetSelectedState( bool ) diff --git a/sw/source/core/access/accframebase.hxx b/sw/source/core/access/accframebase.hxx index 0be3137423c5..45335a43ad31 100644 --- a/sw/source/core/access/accframebase.hxx +++ b/sw/source/core/access/accframebase.hxx @@ -24,7 +24,7 @@ #include <calbck.hxx> #include <pam.hxx> -class SwFlyFrm; +class SwFlyFrame; class SwAccessibleFrameBase : public SwAccessibleContext, public SwClient @@ -37,9 +37,9 @@ protected: // This derived class additionally sets SELECTABLE(1), SELECTED(+), // FOCUSABLE(1) and FOCUSED(+) virtual void GetStates( ::utl::AccessibleStateSetHelper& rStateSet ) override; - SwFlyFrm* getFlyFrm() const; + SwFlyFrame* getFlyFrame() const; bool GetSelectedState( ); - SwPaM* GetCrsr(); + SwPaM* GetCursor(); virtual void _InvalidateCursorPos() override; virtual void _InvalidateFocus() override; @@ -50,11 +50,11 @@ protected: public: SwAccessibleFrameBase( SwAccessibleMap* pInitMap, sal_Int16 nInitRole, - const SwFlyFrm *pFlyFrm ); + const SwFlyFrame *pFlyFrame ); virtual bool HasCursor() override; // required by map to remember that object - static sal_uInt8 GetNodeType( const SwFlyFrm *pFlyFrm ); + static sal_uInt8 GetNodeType( const SwFlyFrame *pFlyFrame ); // The object is not visible an longer and should be destroyed virtual void Dispose( bool bRecursive = false ) override; diff --git a/sw/source/core/access/accfrmobj.cxx b/sw/source/core/access/accfrmobj.cxx index a449247cd103..cbd7b518e486 100644 --- a/sw/source/core/access/accfrmobj.cxx +++ b/sw/source/core/access/accfrmobj.cxx @@ -40,45 +40,45 @@ namespace sw { namespace access { SwAccessibleChild::SwAccessibleChild() - : mpFrm( nullptr ) + : mpFrame( nullptr ) , mpDrawObj( nullptr ) , mpWindow( nullptr ) {} SwAccessibleChild::SwAccessibleChild( const SdrObject* pDrawObj ) - : mpFrm( nullptr ) + : mpFrame( nullptr ) , mpDrawObj( nullptr ) , mpWindow( nullptr ) { Init( pDrawObj ); } -SwAccessibleChild::SwAccessibleChild( const SwFrm* pFrm ) - : mpFrm( nullptr ) +SwAccessibleChild::SwAccessibleChild( const SwFrame* pFrame ) + : mpFrame( nullptr ) , mpDrawObj( nullptr ) , mpWindow( nullptr ) { - Init( pFrm ); + Init( pFrame ); } SwAccessibleChild::SwAccessibleChild( vcl::Window* pWindow ) - : mpFrm( nullptr ) + : mpFrame( nullptr ) , mpDrawObj( nullptr ) , mpWindow( nullptr ) { Init( pWindow ); } -SwAccessibleChild::SwAccessibleChild( const SwFrm* pFrm, +SwAccessibleChild::SwAccessibleChild( const SwFrame* pFrame, const SdrObject* pDrawObj, vcl::Window* pWindow ) - : mpFrm( nullptr ) + : mpFrame( nullptr ) , mpDrawObj( nullptr ) , mpWindow( nullptr ) { - if ( pFrm ) + if ( pFrame ) { - Init( pFrm ); + Init( pFrame ); } else if ( pDrawObj ) { @@ -88,7 +88,7 @@ SwAccessibleChild::SwAccessibleChild( const SwFrm* pFrm, { Init( pWindow ); } - OSL_ENSURE( (!pFrm || pFrm == mpFrm) && + OSL_ENSURE( (!pFrame || pFrame == mpFrame) && (!pDrawObj || pDrawObj == mpDrawObj) && (!pWindow || pWindow == mpWindow), "invalid frame/object/window combination" ); @@ -98,17 +98,17 @@ SwAccessibleChild::SwAccessibleChild( const SwFrm* pFrm, void SwAccessibleChild::Init( const SdrObject* pDrawObj ) { mpDrawObj = pDrawObj; - mpFrm = mpDrawObj && dynamic_cast<const SwVirtFlyDrawObj*>( mpDrawObj) != nullptr - ? static_cast < const SwVirtFlyDrawObj * >( mpDrawObj )->GetFlyFrm() + mpFrame = mpDrawObj && dynamic_cast<const SwVirtFlyDrawObj*>( mpDrawObj) != nullptr + ? static_cast < const SwVirtFlyDrawObj * >( mpDrawObj )->GetFlyFrame() : nullptr; mpWindow = nullptr; } -void SwAccessibleChild::Init( const SwFrm* pFrm ) +void SwAccessibleChild::Init( const SwFrame* pFrame ) { - mpFrm = pFrm; - mpDrawObj = mpFrm && mpFrm->IsFlyFrm() - ? static_cast < const SwFlyFrm * >( mpFrm )->GetVirtDrawObj() + mpFrame = pFrame; + mpDrawObj = mpFrame && mpFrame->IsFlyFrame() + ? static_cast < const SwFlyFrame * >( mpFrame )->GetVirtDrawObj() : nullptr; mpWindow = nullptr; } @@ -116,7 +116,7 @@ void SwAccessibleChild::Init( const SwFrm* pFrm ) void SwAccessibleChild::Init( vcl::Window* pWindow ) { mpWindow = pWindow; - mpFrm = nullptr; + mpFrame = nullptr; mpDrawObj = nullptr; } @@ -124,14 +124,14 @@ bool SwAccessibleChild::IsAccessible( bool bPagePreview ) const { bool bRet( false ); - if ( mpFrm ) + if ( mpFrame ) { - bRet = mpFrm->IsAccessibleFrm() && - ( !mpFrm->IsCellFrm() || - static_cast<const SwCellFrm *>( mpFrm )->GetTabBox()->GetSttNd() != nullptr ) && - !mpFrm->IsInCoveredCell() && + bRet = mpFrame->IsAccessibleFrame() && + ( !mpFrame->IsCellFrame() || + static_cast<const SwCellFrame *>( mpFrame )->GetTabBox()->GetSttNd() != nullptr ) && + !mpFrame->IsInCoveredCell() && ( bPagePreview || - !mpFrm->IsPageFrm() ); + !mpFrame->IsPageFrame() ); } else if ( mpDrawObj ) { @@ -149,10 +149,10 @@ bool SwAccessibleChild::IsBoundAsChar() const { bool bRet( false ); - if ( mpFrm ) + if ( mpFrame ) { - bRet = mpFrm->IsFlyFrm() && - static_cast< const SwFlyFrm *>(mpFrm)->IsFlyInCntFrm(); + bRet = mpFrame->IsFlyFrame() && + static_cast< const SwFlyFrame *>(mpFrame)->IsFlyInContentFrame(); } else if ( mpDrawObj ) { @@ -169,7 +169,7 @@ bool SwAccessibleChild::IsBoundAsChar() const } SwAccessibleChild::SwAccessibleChild( const SwAccessibleChild& r ) - : mpFrm( r.mpFrm ) + : mpFrame( r.mpFrame ) , mpDrawObj( r.mpDrawObj ) , mpWindow( r.mpWindow ) {} @@ -177,7 +177,7 @@ SwAccessibleChild::SwAccessibleChild( const SwAccessibleChild& r ) SwAccessibleChild& SwAccessibleChild::operator=( const SwAccessibleChild& r ) { mpDrawObj = r.mpDrawObj; - mpFrm = r.mpFrm; + mpFrame = r.mpFrame; mpWindow = r.mpWindow; return *this; @@ -189,9 +189,9 @@ SwAccessibleChild& SwAccessibleChild::operator=( const SdrObject* pDrawObj ) return *this; } -SwAccessibleChild& SwAccessibleChild::operator=( const SwFrm* pFrm ) +SwAccessibleChild& SwAccessibleChild::operator=( const SwFrame* pFrame ) { - Init( pFrm ); + Init( pFrame ); return *this; } @@ -203,14 +203,14 @@ SwAccessibleChild& SwAccessibleChild::operator=( vcl::Window* pWindow ) bool SwAccessibleChild::operator==( const SwAccessibleChild& r ) const { - return mpFrm == r.mpFrm && + return mpFrame == r.mpFrame && mpDrawObj == r.mpDrawObj && mpWindow == r.mpWindow; } bool SwAccessibleChild::IsValid() const { - return mpFrm != nullptr || + return mpFrame != nullptr || mpDrawObj != nullptr || mpWindow != nullptr; } @@ -219,17 +219,17 @@ bool SwAccessibleChild::IsVisibleChildrenOnly() const { bool bRet( false ); - if ( !mpFrm ) + if ( !mpFrame ) { bRet = true; } else { - bRet = mpFrm->IsRootFrm() || - !( mpFrm->IsTabFrm() || - mpFrm->IsInTab() || + bRet = mpFrame->IsRootFrame() || + !( mpFrame->IsTabFrame() || + mpFrame->IsInTab() || ( IsBoundAsChar() && - static_cast<const SwFlyFrm*>(mpFrm)->GetAnchorFrm()->IsInTab() ) ); + static_cast<const SwFlyFrame*>(mpFrame)->GetAnchorFrame()->IsInTab() ) ); } return bRet; @@ -239,21 +239,21 @@ SwRect SwAccessibleChild::GetBox( const SwAccessibleMap& rAccMap ) const { SwRect aBox; - if ( mpFrm ) + if ( mpFrame ) { - if ( mpFrm->IsPageFrm() && - static_cast< const SwPageFrm * >( mpFrm )->IsEmptyPage() ) + if ( mpFrame->IsPageFrame() && + static_cast< const SwPageFrame * >( mpFrame )->IsEmptyPage() ) { - aBox = SwRect( mpFrm->Frm().Left(), mpFrm->Frm().Top()-1, 1, 1 ); + aBox = SwRect( mpFrame->Frame().Left(), mpFrame->Frame().Top()-1, 1, 1 ); } - else if ( mpFrm->IsTabFrm() ) + else if ( mpFrame->IsTabFrame() ) { - aBox = SwRect( mpFrm->Frm() ); - aBox.Intersection( mpFrm->GetUpper()->Frm() ); + aBox = SwRect( mpFrame->Frame() ); + aBox.Intersection( mpFrame->GetUpper()->Frame() ); } else { - aBox = mpFrm->Frm(); + aBox = mpFrame->Frame(); } } else if( mpDrawObj ) @@ -278,15 +278,15 @@ SwRect SwAccessibleChild::GetBounds( const SwAccessibleMap& rAccMap ) const { SwRect aBound; - if( mpFrm ) + if( mpFrame ) { - if( mpFrm->IsPageFrm() && - static_cast< const SwPageFrm * >( mpFrm )->IsEmptyPage() ) + if( mpFrame->IsPageFrame() && + static_cast< const SwPageFrame * >( mpFrame )->IsEmptyPage() ) { - aBound = SwRect( mpFrm->Frm().Left(), mpFrm->Frm().Top()-1, 0, 0 ); + aBound = SwRect( mpFrame->Frame().Left(), mpFrame->Frame().Top()-1, 0, 0 ); } else - aBound = mpFrm->PaintArea(); + aBound = mpFrame->PaintArea(); } else if( mpDrawObj ) { @@ -312,19 +312,19 @@ bool SwAccessibleChild::AlwaysIncludeAsChild() const return bAlwaysIncludedAsChild; } -const SwFrm* SwAccessibleChild::GetParent( const bool bInPagePreview ) const +const SwFrame* SwAccessibleChild::GetParent( const bool bInPagePreview ) const { - const SwFrm* pParent( nullptr ); + const SwFrame* pParent( nullptr ); - if ( mpFrm ) + if ( mpFrame ) { - if( mpFrm->IsFlyFrm() ) + if( mpFrame->IsFlyFrame() ) { - const SwFlyFrm* pFly = static_cast< const SwFlyFrm *>( mpFrm ); - if( pFly->IsFlyInCntFrm() ) + const SwFlyFrame* pFly = static_cast< const SwFlyFrame *>( mpFrame ); + if( pFly->IsFlyInContentFrame() ) { // For FLY_AS_CHAR the parent is the anchor - pParent = pFly->GetAnchorFrm(); + pParent = pFly->GetAnchorFrame(); OSL_ENSURE( SwAccessibleChild( pParent ).IsAccessible( bInPagePreview ), "parent is not accessible" ); } @@ -333,19 +333,19 @@ const SwFrm* SwAccessibleChild::GetParent( const bool bInPagePreview ) const // In any other case the parent is the root frm // (in page preview, the page frame) if( bInPagePreview ) - pParent = pFly->FindPageFrm(); + pParent = pFly->FindPageFrame(); else - pParent = pFly->getRootFrm(); + pParent = pFly->getRootFrame(); } } else { - SwAccessibleChild aUpper( mpFrm->GetUpper() ); - while( aUpper.GetSwFrm() && !aUpper.IsAccessible(bInPagePreview) ) + SwAccessibleChild aUpper( mpFrame->GetUpper() ); + while( aUpper.GetSwFrame() && !aUpper.IsAccessible(bInPagePreview) ) { - aUpper = aUpper.GetSwFrm()->GetUpper(); + aUpper = aUpper.GetSwFrame()->GetUpper(); } - pParent = aUpper.GetSwFrm(); + pParent = aUpper.GetSwFrame(); } } else if( mpDrawObj ) @@ -360,7 +360,7 @@ const SwFrm* SwAccessibleChild::GetParent( const bool bInPagePreview ) const if( pFrameFormat && FLY_AS_CHAR == pFrameFormat->GetAnchor().GetAnchorId() ) { // For FLY_AS_CHAR the parent is the anchor - pParent = pContact->GetAnchorFrm(); + pParent = pContact->GetAnchorFrame(); OSL_ENSURE( SwAccessibleChild( pParent ).IsAccessible( bInPagePreview ), "parent is not accessible" ); @@ -369,9 +369,9 @@ const SwFrm* SwAccessibleChild::GetParent( const bool bInPagePreview ) const { // In any other case the parent is the root frm if( bInPagePreview ) - pParent = pContact->GetAnchorFrm()->FindPageFrm(); + pParent = pContact->GetAnchorFrame()->FindPageFrame(); else - pParent = pContact->GetAnchorFrm()->getRootFrm(); + pParent = pContact->GetAnchorFrame()->getRootFrame(); } } } @@ -393,7 +393,7 @@ const SwFrm* SwAccessibleChild::GetParent( const bool bInPagePreview ) const dynamic_cast< SwAccessibleContext *>( xAccParent.get() ); if ( pAccParentImpl ) { - pParent = pAccParentImpl->GetFrm(); + pParent = pAccParentImpl->GetFrame(); } } } diff --git a/sw/source/core/access/accfrmobj.hxx b/sw/source/core/access/accfrmobj.hxx index 31a489e43640..e05ddc100f45 100644 --- a/sw/source/core/access/accfrmobj.hxx +++ b/sw/source/core/access/accfrmobj.hxx @@ -23,7 +23,7 @@ #include <vcl/vclptr.hxx> class SwAccessibleMap; -class SwFrm; +class SwFrame; class SdrObject; namespace vcl { class Window; } class SwRect; @@ -35,9 +35,9 @@ class SwAccessibleChild public: SwAccessibleChild(); explicit SwAccessibleChild( const SdrObject* pDrawObj ); - explicit SwAccessibleChild( const SwFrm* pFrm ); + explicit SwAccessibleChild( const SwFrame* pFrame ); explicit SwAccessibleChild( vcl::Window* pWindow ); - SwAccessibleChild( const SwFrm* pFrm, + SwAccessibleChild( const SwFrame* pFrame, const SdrObject* pDrawObj, vcl::Window* pWindow ); @@ -45,18 +45,18 @@ class SwAccessibleChild SwAccessibleChild& operator=( const SwAccessibleChild& r ); SwAccessibleChild& operator=( const SdrObject* pDrawObj ); - SwAccessibleChild& operator=( const SwFrm* pFrm ); + SwAccessibleChild& operator=( const SwFrame* pFrame ); SwAccessibleChild& operator=( vcl::Window* pWindow ); bool operator==( const SwAccessibleChild& r ) const; bool IsValid() const; - const SwFrm* GetSwFrm() const { return mpFrm; } + const SwFrame* GetSwFrame() const { return mpFrame; } const SdrObject* GetDrawObject() const { return mpDrawObj; } vcl::Window* GetWindow() const { return mpWindow; } - const SwFrm* GetParent( const bool bInPagePreview ) const; + const SwFrame* GetParent( const bool bInPagePreview ) const; bool IsAccessible( bool bPagePreview ) const; bool IsBoundAsChar() const; @@ -70,12 +70,12 @@ class SwAccessibleChild bool AlwaysIncludeAsChild() const; private: - const SwFrm* mpFrm; + const SwFrame* mpFrame; const SdrObject* mpDrawObj; VclPtr<vcl::Window> mpWindow; void Init( const SdrObject* pDrawObj ); - void Init( const SwFrm* pFrm ); + void Init( const SwFrame* pFrame ); void Init( vcl::Window* pWindow ); }; diff --git a/sw/source/core/access/accfrmobjmap.cxx b/sw/source/core/access/accfrmobjmap.cxx index 05168a432a36..ec2622178b97 100644 --- a/sw/source/core/access/accfrmobjmap.cxx +++ b/sw/source/core/access/accfrmobjmap.cxx @@ -37,16 +37,16 @@ using namespace sw::access; SwAccessibleChildMap::SwAccessibleChildMap( const SwRect& rVisArea, - const SwFrm& rFrm, + const SwFrame& rFrame, SwAccessibleMap& rAccMap ) : nHellId( rAccMap.GetShell()->GetDoc()->getIDocumentDrawModelAccess().GetHellId() ) , nControlsId( rAccMap.GetShell()->GetDoc()->getIDocumentDrawModelAccess().GetControlsId() ) { - const bool bVisibleChildrenOnly = SwAccessibleChild( &rFrm ).IsVisibleChildrenOnly(); + const bool bVisibleChildrenOnly = SwAccessibleChild( &rFrame ).IsVisibleChildrenOnly(); sal_uInt32 nPos = 0; - SwAccessibleChild aLower( rFrm.GetLower() ); - while( aLower.GetSwFrm() ) + SwAccessibleChild aLower( rFrame.GetLower() ); + while( aLower.GetSwFrame() ) { if ( !bVisibleChildrenOnly || aLower.AlwaysIncludeAsChild() || @@ -55,15 +55,15 @@ SwAccessibleChildMap::SwAccessibleChildMap( const SwRect& rVisArea, insert( nPos++, SwAccessibleChildMapKey::TEXT, aLower ); } - aLower = aLower.GetSwFrm()->GetNext(); + aLower = aLower.GetSwFrame()->GetNext(); } - if ( rFrm.IsPageFrm() ) + if ( rFrame.IsPageFrame() ) { OSL_ENSURE( bVisibleChildrenOnly, "page frame within tab frame???" ); - const SwPageFrm *pPgFrm = - static_cast< const SwPageFrm * >( &rFrm ); - const SwSortedObjs *pObjs = pPgFrm->GetSortedObjs(); + const SwPageFrame *pPgFrame = + static_cast< const SwPageFrame * >( &rFrame ); + const SwSortedObjs *pObjs = pPgFrame->GetSortedObjs(); if ( pObjs ) { for( size_t i=0; i<pObjs->size(); ++i ) @@ -76,9 +76,9 @@ SwAccessibleChildMap::SwAccessibleChildMap( const SwRect& rVisArea, } } } - else if( rFrm.IsTextFrm() ) + else if( rFrame.IsTextFrame() ) { - const SwSortedObjs *pObjs = rFrm.GetDrawObjs(); + const SwSortedObjs *pObjs = rFrame.GetDrawObjs(); if ( pObjs ) { for( size_t i=0; i<pObjs->size(); ++i ) @@ -96,7 +96,7 @@ SwAccessibleChildMap::SwAccessibleChildMap( const SwRect& rVisArea, { ::rtl::Reference < SwAccessibleContext > xAccImpl = - rAccMap.GetContextImpl( &rFrm, false ); + rAccMap.GetContextImpl( &rFrame, false ); if( xAccImpl.is() ) { SwAccessibleContext* pAccImpl = xAccImpl.get(); @@ -149,12 +149,12 @@ SwAccessibleChildMap::SwAccessibleChildMap( const SwRect& rVisArea, return insert( aEntry ); } -bool SwAccessibleChildMap::IsSortingRequired( const SwFrm& rFrm ) +bool SwAccessibleChildMap::IsSortingRequired( const SwFrame& rFrame ) { - return ( rFrm.IsPageFrm() && - static_cast< const SwPageFrm& >( rFrm ).GetSortedObjs() ) || - ( rFrm.IsTextFrm() && - rFrm.GetDrawObjs() ); + return ( rFrame.IsPageFrame() && + static_cast< const SwPageFrame& >( rFrame ).GetSortedObjs() ) || + ( rFrame.IsTextFrame() && + rFrame.GetDrawObjs() ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/access/accfrmobjmap.hxx b/sw/source/core/access/accfrmobjmap.hxx index d2593333f819..53ccbd0dc978 100644 --- a/sw/source/core/access/accfrmobjmap.hxx +++ b/sw/source/core/access/accfrmobjmap.hxx @@ -27,7 +27,7 @@ class SwAccessibleMap; class SwRect; -class SwFrm; +class SwFrame; class SdrObject; class SwAccessibleChildMapKey @@ -75,9 +75,9 @@ public: /* MT: Need to get this position parameter stuff in dev300 somehow... //This methods are used to insert an object to the map, adding a position parameter. ::std::pair< iterator, bool > insert( sal_uInt32 nOrd, Point nPos, - const SwFrmOrObj& rLower ); + const SwFrameOrObj& rLower ); ::std::pair< iterator, bool > insert( const SdrObject *pObj, - const SwFrmOrObj& rLower, + const SwFrameOrObj& rLower, const SwDoc *pDoc, Point nPos); */ @@ -113,10 +113,10 @@ private: public: SwAccessibleChildMap( const SwRect& rVisArea, - const SwFrm& rFrm, + const SwFrame& rFrame, SwAccessibleMap& rAccMap ); - static bool IsSortingRequired( const SwFrm& rFrm ); + static bool IsSortingRequired( const SwFrame& rFrame ); const_iterator cbegin() const { return maMap.cbegin(); } const_iterator cend() const { return maMap.cend(); } diff --git a/sw/source/core/access/accfrmobjslist.cxx b/sw/source/core/access/accfrmobjslist.cxx index 5c3cb557d0a1..36d6a880b5b0 100644 --- a/sw/source/core/access/accfrmobjslist.cxx +++ b/sw/source/core/access/accfrmobjslist.cxx @@ -31,24 +31,24 @@ SwAccessibleChildSList_const_iterator::SwAccessibleChildSList_const_iterator( const SwAccessibleChildSList& rLst, SwAccessibleMap& rAccMap ) : rList( rLst ), - aCurr( rList.GetFrm().GetLower() ), + aCurr( rList.GetFrame().GetLower() ), nNextObj( 0 ) { - if( !aCurr.GetSwFrm() ) + if( !aCurr.GetSwFrame() ) { - const SwFrm& rFrm = rList.GetFrm(); - if( rFrm.IsPageFrm() ) + const SwFrame& rFrame = rList.GetFrame(); + if( rFrame.IsPageFrame() ) { - const SwPageFrm& rPgFrm = static_cast< const SwPageFrm& >( rFrm ); - const SwSortedObjs *pObjs = rPgFrm.GetSortedObjs(); + const SwPageFrame& rPgFrame = static_cast< const SwPageFrame& >( rFrame ); + const SwSortedObjs *pObjs = rPgFrame.GetSortedObjs(); if( pObjs && pObjs->size() ) { aCurr = (*pObjs)[nNextObj++]->GetDrawObj(); } } - else if( rFrm.IsTextFrm() ) + else if( rFrame.IsTextFrame() ) { - const SwSortedObjs *pObjs = rFrm.GetDrawObjs(); + const SwSortedObjs *pObjs = rFrame.GetDrawObjs(); if ( pObjs && pObjs->size() ) { aCurr = (*pObjs)[nNextObj++]->GetDrawObj(); @@ -62,7 +62,7 @@ SwAccessibleChildSList_const_iterator::SwAccessibleChildSList_const_iterator( if ( !aCurr.IsValid() ) { ::rtl::Reference < SwAccessibleContext > xAccImpl = - rAccMap.GetContextImpl( &rFrm, false ); + rAccMap.GetContextImpl( &rFrame, false ); if( xAccImpl.is() ) { SwAccessibleContext* pAccImpl = xAccImpl.get(); @@ -92,10 +92,10 @@ SwAccessibleChildSList_const_iterator& SwAccessibleChildSList_const_iterator::ne { bNextTaken = false; } - else if( aCurr.GetSwFrm() ) + else if( aCurr.GetSwFrame() ) { - aCurr = aCurr.GetSwFrm()->GetNext(); - if( !aCurr.GetSwFrm() ) + aCurr = aCurr.GetSwFrame()->GetNext(); + if( !aCurr.GetSwFrame() ) { bNextTaken = false; } @@ -103,18 +103,18 @@ SwAccessibleChildSList_const_iterator& SwAccessibleChildSList_const_iterator::ne if( !bNextTaken ) { - const SwFrm& rFrm = rList.GetFrm(); - if( rFrm.IsPageFrm() ) + const SwFrame& rFrame = rList.GetFrame(); + if( rFrame.IsPageFrame() ) { - const SwPageFrm& rPgFrm = static_cast< const SwPageFrm& >( rFrm ); - const SwSortedObjs *pObjs = rPgFrm.GetSortedObjs(); + const SwPageFrame& rPgFrame = static_cast< const SwPageFrame& >( rFrame ); + const SwSortedObjs *pObjs = rPgFrame.GetSortedObjs(); aCurr = ( pObjs && nNextObj < pObjs->size() ) ? (*pObjs)[nNextObj++]->GetDrawObj() : static_cast< const SdrObject *>( nullptr ); } - else if( rFrm.IsTextFrm() ) + else if( rFrame.IsTextFrame() ) { - const SwSortedObjs* pObjs = rFrm.GetDrawObjs(); + const SwSortedObjs* pObjs = rFrame.GetDrawObjs(); const size_t nObjsCount = pObjs ? pObjs->size() : 0; aCurr = ( pObjs && nNextObj < nObjsCount ) ? (*pObjs)[nNextObj++]->GetDrawObj() @@ -128,7 +128,7 @@ SwAccessibleChildSList_const_iterator& SwAccessibleChildSList_const_iterator::ne if ( !aCurr.IsValid() ) { ::rtl::Reference < SwAccessibleContext > xAccImpl = - rList.GetAccMap().GetContextImpl( &rFrm, false ); + rList.GetAccMap().GetContextImpl( &rFrame, false ); if( xAccImpl.is() ) { SwAccessibleContext* pAccImpl = xAccImpl.get(); diff --git a/sw/source/core/access/accfrmobjslist.hxx b/sw/source/core/access/accfrmobjslist.hxx index d009ed72cf1b..863d86e9d6d2 100644 --- a/sw/source/core/access/accfrmobjslist.hxx +++ b/sw/source/core/access/accfrmobjslist.hxx @@ -76,27 +76,27 @@ public: class SwAccessibleChildSList { const SwRect maVisArea; - const SwFrm& mrFrm; + const SwFrame& mrFrame; const bool mbVisibleChildrenOnly; SwAccessibleMap& mrAccMap; public: typedef SwAccessibleChildSList_const_iterator const_iterator; - inline SwAccessibleChildSList( const SwFrm& rFrm, + inline SwAccessibleChildSList( const SwFrame& rFrame, SwAccessibleMap& rAccMap ) : maVisArea() - , mrFrm( rFrm ) + , mrFrame( rFrame ) , mbVisibleChildrenOnly( false ) , mrAccMap( rAccMap ) {} inline SwAccessibleChildSList( const SwRect& rVisArea, - const SwFrm& rFrm, + const SwFrame& rFrame, SwAccessibleMap& rAccMap ) : maVisArea( rVisArea ) - , mrFrm( rFrm ) - , mbVisibleChildrenOnly( sw::access::SwAccessibleChild( &rFrm ).IsVisibleChildrenOnly() ) + , mrFrame( rFrame ) + , mbVisibleChildrenOnly( sw::access::SwAccessibleChild( &rFrame ).IsVisibleChildrenOnly() ) , mrAccMap( rAccMap ) { } @@ -111,9 +111,9 @@ public: return SwAccessibleChildSList_const_iterator( *this ); } - inline const SwFrm& GetFrm() const + inline const SwFrame& GetFrame() const { - return mrFrm; + return mrFrame; } inline bool IsVisibleChildrenOnly() const diff --git a/sw/source/core/access/accgraphic.cxx b/sw/source/core/access/accgraphic.cxx index c29ca478c9ca..6c6a697d9adc 100644 --- a/sw/source/core/access/accgraphic.cxx +++ b/sw/source/core/access/accgraphic.cxx @@ -33,8 +33,8 @@ using namespace ::com::sun::star::accessibility; SwAccessibleGraphic::SwAccessibleGraphic( SwAccessibleMap* pInitMap, - const SwFlyFrm* pFlyFrm ) : - SwAccessibleNoTextFrame( pInitMap, AccessibleRole::GRAPHIC, pFlyFrm ) + const SwFlyFrame* pFlyFrame ) : + SwAccessibleNoTextFrame( pInitMap, AccessibleRole::GRAPHIC, pFlyFrame ) { } @@ -76,7 +76,7 @@ sal_Int16 SAL_CALL SwAccessibleGraphic::getAccessibleRole() { SolarMutexGuard g; - SwFormatURL aURL( static_cast<const SwLayoutFrm*>(GetFrm())->GetFormat()->GetURL() ); + SwFormatURL aURL( static_cast<const SwLayoutFrame*>(GetFrame())->GetFormat()->GetURL() ); if (aURL.GetMap()) return AccessibleRole::IMAGE_MAP; diff --git a/sw/source/core/access/accgraphic.hxx b/sw/source/core/access/accgraphic.hxx index 35c50b29ddd0..44bac5c5e764 100644 --- a/sw/source/core/access/accgraphic.hxx +++ b/sw/source/core/access/accgraphic.hxx @@ -29,7 +29,7 @@ protected: public: SwAccessibleGraphic( SwAccessibleMap* pInitMap, - const SwFlyFrm *pFlyFrm ); + const SwFlyFrame *pFlyFrame ); // XServiceInfo diff --git a/sw/source/core/access/accheaderfooter.cxx b/sw/source/core/access/accheaderfooter.cxx index aa594c5fe908..36327d58f70f 100644 --- a/sw/source/core/access/accheaderfooter.cxx +++ b/sw/source/core/access/accheaderfooter.cxx @@ -38,23 +38,23 @@ const sal_Char sImplementationNameFooter[] = "com.sun.star.comp.Writer.SwAccessi SwAccessibleHeaderFooter::SwAccessibleHeaderFooter( SwAccessibleMap* pInitMap, - const SwHeaderFrm* pHdFrm ) : - SwAccessibleContext( pInitMap, AccessibleRole::HEADER, pHdFrm ) + const SwHeaderFrame* pHdFrame ) : + SwAccessibleContext( pInitMap, AccessibleRole::HEADER, pHdFrame ) { SolarMutexGuard aGuard; - OUString sArg( OUString::number( pHdFrm->GetPhyPageNum() ) ); + OUString sArg( OUString::number( pHdFrame->GetPhyPageNum() ) ); SetName( GetResource( STR_ACCESS_HEADER_NAME, &sArg ) ); } SwAccessibleHeaderFooter::SwAccessibleHeaderFooter( SwAccessibleMap* pInitMap, - const SwFooterFrm* pFtFrm ) : - SwAccessibleContext( pInitMap, AccessibleRole::FOOTER, pFtFrm ) + const SwFooterFrame* pFtFrame ) : + SwAccessibleContext( pInitMap, AccessibleRole::FOOTER, pFtFrame ) { SolarMutexGuard aGuard; - OUString sArg( OUString::number( pFtFrm->GetPhyPageNum() ) ); + OUString sArg( OUString::number( pFtFrame->GetPhyPageNum() ) ); SetName( GetResource( STR_ACCESS_FOOTER_NAME, &sArg ) ); } diff --git a/sw/source/core/access/accheaderfooter.hxx b/sw/source/core/access/accheaderfooter.hxx index 7f91d40eca7a..b3fe7aeb2796 100644 --- a/sw/source/core/access/accheaderfooter.hxx +++ b/sw/source/core/access/accheaderfooter.hxx @@ -22,8 +22,8 @@ #include "acccontext.hxx" -class SwHeaderFrm; -class SwFooterFrm; +class SwHeaderFrame; +class SwFooterFrame; class SwAccessibleHeaderFooter : public SwAccessibleContext { @@ -32,9 +32,9 @@ protected: public: SwAccessibleHeaderFooter( SwAccessibleMap* pInitMap, - const SwHeaderFrm* pHdFrm ); + const SwHeaderFrame* pHdFrame ); SwAccessibleHeaderFooter( SwAccessibleMap* pInitMap, - const SwFooterFrm* pFtFrm ); + const SwFooterFrame* pFtFrame ); // XAccessibleContext diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx index b8504b61f353..817bdfd2ebc9 100644 --- a/sw/source/core/access/accmap.cxx +++ b/sw/source/core/access/accmap.cxx @@ -76,9 +76,9 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::accessibility; using namespace ::sw::access; -struct SwFrmFunc +struct SwFrameFunc { - bool operator()( const SwFrm * p1, const SwFrm * p2) const + bool operator()( const SwFrame * p1, const SwFrame * p2) const { return p1 < p2; } @@ -87,10 +87,10 @@ struct SwFrmFunc class SwAccessibleContextMap_Impl { public: - typedef const SwFrm * key_type; + typedef const SwFrame * key_type; typedef uno::WeakReference < XAccessible > mapped_type; typedef std::pair<const key_type,mapped_type> value_type; - typedef SwFrmFunc key_compare; + typedef SwFrameFunc key_compare; typedef std::map<key_type,mapped_type,key_compare>::iterator iterator; typedef std::map<key_type,mapped_type,key_compare>::const_iterator const_iterator; private: @@ -338,36 +338,36 @@ private: SwRect maOldBox; // the old bounds for CHILD_POS_CHANGED // and POS_CHANGED uno::WeakReference < XAccessible > mxAcc; // The object that fires the event - SwAccessibleChild maFrmOrObj; // the child for CHILD_POS_CHANGED and + SwAccessibleChild maFrameOrObj; // the child for CHILD_POS_CHANGED and // the same as xAcc for any other // event type EventType meType; // The event type AccessibleStates mnStates; // check states or update caret pos public: - const SwFrm* mpParentFrm; // The object that fires the event - bool IsNoXaccParentFrm() const + const SwFrame* mpParentFrame; // The object that fires the event + bool IsNoXaccParentFrame() const { - return CHILD_POS_CHANGED == meType && mpParentFrm != nullptr; + return CHILD_POS_CHANGED == meType && mpParentFrame != nullptr; } public: SwAccessibleEvent_Impl( EventType eT, SwAccessibleContext *pA, - const SwAccessibleChild& rFrmOrObj ) + const SwAccessibleChild& rFrameOrObj ) : mxAcc( pA ), - maFrmOrObj( rFrmOrObj ), + maFrameOrObj( rFrameOrObj ), meType( eT ), mnStates( AccessibleStates::NONE ), - mpParentFrm( nullptr ) + mpParentFrame( nullptr ) {} SwAccessibleEvent_Impl( EventType eT, - const SwAccessibleChild& rFrmOrObj ) - : maFrmOrObj( rFrmOrObj ), + const SwAccessibleChild& rFrameOrObj ) + : maFrameOrObj( rFrameOrObj ), meType( eT ), mnStates( AccessibleStates::NONE ), - mpParentFrm( nullptr ) + mpParentFrame( nullptr ) { assert(SwAccessibleEvent_Impl::DISPOSE == meType && "wrong event constructor, DISPOSE only"); @@ -376,7 +376,7 @@ public: explicit SwAccessibleEvent_Impl( EventType eT ) : meType( eT ), mnStates( AccessibleStates::NONE ), - mpParentFrm( nullptr ) + mpParentFrame( nullptr ) { assert(SwAccessibleEvent_Impl::SHAPE_SELECTION == meType && "wrong event constructor, SHAPE_SELECTION only" ); @@ -384,14 +384,14 @@ public: SwAccessibleEvent_Impl( EventType eT, SwAccessibleContext *pA, - const SwAccessibleChild& rFrmOrObj, + const SwAccessibleChild& rFrameOrObj, const SwRect& rR ) : maOldBox( rR ), mxAcc( pA ), - maFrmOrObj( rFrmOrObj ), + maFrameOrObj( rFrameOrObj ), meType( eT ), mnStates( AccessibleStates::NONE ), - mpParentFrm( nullptr ) + mpParentFrame( nullptr ) { assert((SwAccessibleEvent_Impl::CHILD_POS_CHANGED == meType || SwAccessibleEvent_Impl::POS_CHANGED == meType) && @@ -400,25 +400,25 @@ public: SwAccessibleEvent_Impl( EventType eT, SwAccessibleContext *pA, - const SwAccessibleChild& rFrmOrObj, + const SwAccessibleChild& rFrameOrObj, const AccessibleStates _nStates ) : mxAcc( pA ), - maFrmOrObj( rFrmOrObj ), + maFrameOrObj( rFrameOrObj ), meType( eT ), mnStates( _nStates ), - mpParentFrm( nullptr ) + mpParentFrame( nullptr ) { assert( SwAccessibleEvent_Impl::CARET_OR_STATES == meType && "wrong event constructor, CARET_OR_STATES only" ); } - SwAccessibleEvent_Impl( EventType eT, const SwFrm *pParentFrm, - const SwAccessibleChild& rFrmOrObj, const SwRect& rR ) : + SwAccessibleEvent_Impl( EventType eT, const SwFrame *pParentFrame, + const SwAccessibleChild& rFrameOrObj, const SwRect& rR ) : maOldBox( rR ), - maFrmOrObj( rFrmOrObj ), + maFrameOrObj( rFrameOrObj ), meType( eT ), mnStates( AccessibleStates::NONE ), - mpParentFrm( pParentFrm ) + mpParentFrame( pParentFrame ) { assert( SwAccessibleEvent_Impl::CHILD_POS_CHANGED == meType && "wrong event constructor, CHILD_POS_CHANGED only" ); @@ -453,9 +453,9 @@ public: maOldBox = rOldBox; } - inline const SwAccessibleChild& GetFrmOrObj() const + inline const SwAccessibleChild& GetFrameOrObj() const { - return maFrmOrObj; + return maFrameOrObj; } // <SetStates(..)> only used in method <SwAccessibleMap::AppendEvent(..)> @@ -530,7 +530,7 @@ void SwAccessibleEventList_Impl::MoveInvalidXAccToEnd() for ( ;li != end();) { SwAccessibleEvent_Impl e = *li; - if (e.IsNoXaccParentFrm()) + if (e.IsNoXaccParentFrame()) { iterator liNext = li; ++liNext; @@ -568,13 +568,13 @@ struct SwAccessibleChildFunc bool operator()( const SwAccessibleChild& r1, const SwAccessibleChild& r2 ) const { - const void *p1 = r1.GetSwFrm() - ? static_cast < const void * >( r1.GetSwFrm()) + const void *p1 = r1.GetSwFrame() + ? static_cast < const void * >( r1.GetSwFrame()) : ( r1.GetDrawObject() ? static_cast < const void * >( r1.GetDrawObject() ) : static_cast < const void * >( r1.GetWindow() ) ); - const void *p2 = r2.GetSwFrm() - ? static_cast < const void * >( r2.GetSwFrm()) + const void *p2 = r2.GetSwFrame() + ? static_cast < const void * >( r2.GetSwFrame()) : ( r2.GetDrawObject() ? static_cast < const void * >( r2.GetDrawObject() ) : static_cast < const void * >( r2.GetWindow() ) ); @@ -653,7 +653,7 @@ class SwAccPreviewData SwRect maVisArea; Fraction maScale; - const SwPageFrm *mpSelPage; + const SwPageFrame *mpSelPage; /** adjust logic page rectangle to its visible part @@ -680,10 +680,10 @@ public: void Update( const SwAccessibleMap& rAccMap, const std::vector<PreviewPage*>& _rPreviewPages, const Fraction& _rScale, - const SwPageFrm* _pSelectedPageFrm, + const SwPageFrame* _pSelectedPageFrame, const Size& _rPreviewWinSize ); - void InvalidateSelection( const SwPageFrm* _pSelectedPageFrm ); + void InvalidateSelection( const SwPageFrame* _pSelectedPageFrame ); const SwRect& GetVisArea() const { return maVisArea;} @@ -694,9 +694,9 @@ public: void AdjustMapMode( MapMode& rMapMode, const Point& rPoint ) const; - inline const SwPageFrm *GetSelPage() const { return mpSelPage; } + inline const SwPageFrame *GetSelPage() const { return mpSelPage; } - void DisposePage(const SwPageFrm *pPageFrm ); + void DisposePage(const SwPageFrame *pPageFrame ); }; SwAccPreviewData::SwAccPreviewData() : @@ -711,12 +711,12 @@ SwAccPreviewData::~SwAccPreviewData() void SwAccPreviewData::Update( const SwAccessibleMap& rAccMap, const std::vector<PreviewPage*>& _rPreviewPages, const Fraction& _rScale, - const SwPageFrm* _pSelectedPageFrm, + const SwPageFrame* _pSelectedPageFrame, const Size& _rPreviewWinSize ) { // store preview scaling, maximal preview page size and selected page maScale = _rScale; - mpSelPage = _pSelectedPageFrm; + mpSelPage = _pSelectedPageFrame; // prepare loop on preview pages maPreviewRects.clear(); @@ -757,9 +757,9 @@ void SwAccPreviewData::Update( const SwAccessibleMap& rAccMap, } } -void SwAccPreviewData::InvalidateSelection( const SwPageFrm* _pSelectedPageFrm ) +void SwAccPreviewData::InvalidateSelection( const SwPageFrame* _pSelectedPageFrame ) { - mpSelPage = _pSelectedPageFrm; + mpSelPage = _pSelectedPageFrame; OSL_ENSURE( mpSelPage, "selected page not found" ); } @@ -797,9 +797,9 @@ void SwAccPreviewData::AdjustMapMode( MapMode& rMapMode, // else: don't adjust MapMode } -void SwAccPreviewData::DisposePage(const SwPageFrm *pPageFrm ) +void SwAccPreviewData::DisposePage(const SwPageFrame *pPageFrame ) { - if( mpSelPage == pPageFrm ) + if( mpSelPage == pPageFrame ) mpSelPage = nullptr; } @@ -835,11 +835,11 @@ void SwAccPreviewData::AdjustLogicPgRectToVisibleArea( } static bool AreInSameTable( const uno::Reference< XAccessible >& rAcc, - const SwFrm *pFrm ) + const SwFrame *pFrame ) { bool bRet = false; - if( pFrm && pFrm->IsCellFrm() && rAcc.is() ) + if( pFrame && pFrame->IsCellFrame() && rAcc.is() ) { // Is it in the same table? We check that // by comparing the last table frame in the @@ -847,23 +847,23 @@ static bool AreInSameTable( const uno::Reference< XAccessible >& rAcc, // searching the first one. SwAccessibleContext *pAccImpl = static_cast< SwAccessibleContext *>( rAcc.get() ); - if( pAccImpl->GetFrm()->IsCellFrm() ) + if( pAccImpl->GetFrame()->IsCellFrame() ) { - const SwTabFrm *pTabFrm1 = pAccImpl->GetFrm()->FindTabFrm(); - if (pTabFrm1) + const SwTabFrame *pTabFrame1 = pAccImpl->GetFrame()->FindTabFrame(); + if (pTabFrame1) { - while (pTabFrm1->GetFollow()) - pTabFrm1 = pTabFrm1->GetFollow(); + while (pTabFrame1->GetFollow()) + pTabFrame1 = pTabFrame1->GetFollow(); } - const SwTabFrm *pTabFrm2 = pFrm->FindTabFrm(); - if (pTabFrm2) + const SwTabFrame *pTabFrame2 = pFrame->FindTabFrame(); + if (pTabFrame2) { - while (pTabFrm2->GetFollow()) - pTabFrm2 = pTabFrm2->GetFollow(); + while (pTabFrame2->GetFollow()) + pTabFrame2 = pTabFrame2->GetFollow(); } - bRet = (pTabFrm1 == pTabFrm2); + bRet = (pTabFrame1 == pTabFrame2); } } @@ -873,11 +873,11 @@ static bool AreInSameTable( const uno::Reference< XAccessible >& rAcc, void SwAccessibleMap::FireEvent( const SwAccessibleEvent_Impl& rEvent ) { ::rtl::Reference < SwAccessibleContext > xAccImpl( rEvent.GetContext() ); - if (!xAccImpl.is() && rEvent.mpParentFrm != nullptr) + if (!xAccImpl.is() && rEvent.mpParentFrame != nullptr) { SwAccessibleContextMap_Impl::iterator aIter = - mpFrmMap->find( rEvent.mpParentFrm ); - if( aIter != mpFrmMap->end() ) + mpFrameMap->find( rEvent.mpParentFrame ); + if( aIter != mpFrameMap->end() ) { uno::Reference < XAccessible > xAcc( (*aIter).second ); if (xAcc.is()) @@ -894,7 +894,7 @@ void SwAccessibleMap::FireEvent( const SwAccessibleEvent_Impl& rEvent ) { DoInvalidateShapeSelection(); } - else if( xAccImpl.is() && xAccImpl->GetFrm() ) + else if( xAccImpl.is() && xAccImpl->GetFrame() ) { if ( rEvent.GetType() != SwAccessibleEvent_Impl::DISPOSE && rEvent.IsInvalidateTextAttrs() ) @@ -910,7 +910,7 @@ void SwAccessibleMap::FireEvent( const SwAccessibleEvent_Impl& rEvent ) xAccImpl->InvalidatePosOrSize( rEvent.GetOldBox() ); break; case SwAccessibleEvent_Impl::CHILD_POS_CHANGED: - xAccImpl->InvalidateChildPosOrSize( rEvent.GetFrmOrObj(), + xAccImpl->InvalidateChildPosOrSize( rEvent.GetFrameOrObj(), rEvent.GetOldBox() ); break; case SwAccessibleEvent_Impl::DISPOSE: @@ -974,7 +974,7 @@ void SwAccessibleMap::AppendEvent( const SwAccessibleEvent_Impl& rEvent ) { SwAccessibleEventMap_Impl::iterator aIter = - mpEventMap->find( rEvent.GetFrmOrObj() ); + mpEventMap->find( rEvent.GetFrameOrObj() ); if( aIter != mpEventMap->end() ) { SwAccessibleEvent_Impl aEvent( *(*aIter).second ); @@ -1059,7 +1059,7 @@ void SwAccessibleMap::AppendEvent( const SwAccessibleEvent_Impl& rEvent ) } else if( SwAccessibleEvent_Impl::DISPOSE != rEvent.GetType() ) { - SwAccessibleEventMap_Impl::value_type aEntry( rEvent.GetFrmOrObj(), + SwAccessibleEventMap_Impl::value_type aEntry( rEvent.GetFrameOrObj(), mpEvents->insert( mpEvents->end(), rEvent ) ); mpEventMap->insert( aEntry ); } @@ -1072,12 +1072,12 @@ void SwAccessibleMap::InvalidateCursorPosition( SwAccessibleContext *pAccImpl = static_cast< SwAccessibleContext *>( rAcc.get() ); OSL_ENSURE( pAccImpl, "no caret context" ); - OSL_ENSURE( pAccImpl->GetFrm(), "caret context is disposed" ); + OSL_ENSURE( pAccImpl->GetFrame(), "caret context is disposed" ); if( GetShell()->ActionPend() ) { SwAccessibleEvent_Impl aEvent( SwAccessibleEvent_Impl::CARET_OR_STATES, pAccImpl, - SwAccessibleChild(pAccImpl->GetFrm()), + SwAccessibleChild(pAccImpl->GetFrame()), AccessibleStates::CARET ); AppendEvent( aEvent ); } @@ -1088,7 +1088,7 @@ void SwAccessibleMap::InvalidateCursorPosition( // been disposed because it moved out of the vis area. // Setting the cursor for such frames is useless and even // causes asserts. - if( pAccImpl->GetFrm() ) + if( pAccImpl->GetFrame() ) pAccImpl->InvalidateCursorPos(); } } @@ -1121,7 +1121,7 @@ void SwAccessibleMap::InvalidateShapeInParaSelection() const SwViewShell *pVSh = GetShell(); const SwFEShell *pFESh = dynamic_cast<const SwFEShell*>( pVSh) != nullptr ? static_cast< const SwFEShell * >( pVSh ) : nullptr; - SwPaM* pCrsr = pFESh ? pFESh->GetCrsr( false /* ??? */ ) : nullptr; + SwPaM* pCursor = pFESh ? pFESh->GetCursor( false /* ??? */ ) : nullptr; //const size_t nSelShapes = pFESh ? pFESh->IsObjSelected() : 0; @@ -1155,7 +1155,7 @@ void SwAccessibleMap::InvalidateShapeInParaSelection() { while( aIter != aEndIter ) { - SwAccessibleChild pFrm( (*aIter).first ); + SwAccessibleChild pFrame( (*aIter).first ); const SwFrameFormat *pFrameFormat = (*aIter).first ? ::FindFrameFormat( (*aIter).first ) : nullptr; if( !pFrameFormat ) @@ -1185,21 +1185,21 @@ void SwAccessibleMap::InvalidateShapeInParaSelection() { int pIndex = pPos->nContent.GetIndex(); bool bMarked = false; - if( pCrsr != nullptr ) + if( pCursor != nullptr ) { const SwTextNode* pNode = pPos->nNode.GetNode().GetTextNode(); sal_uLong nHere = pNode->GetIndex(); - for(SwPaM& rTmpCrsr : pCrsr->GetRingContainer()) + for(SwPaM& rTmpCursor : pCursor->GetRingContainer()) { // ignore, if no mark - if( rTmpCrsr.HasMark() ) + if( rTmpCursor.HasMark() ) { bMarked = true; - // check whether nHere is 'inside' pCrsr - SwPosition* pStart = rTmpCrsr.Start(); + // check whether nHere is 'inside' pCursor + SwPosition* pStart = rTmpCursor.Start(); sal_uLong nStartIndex = pStart->nNode.GetIndex(); - SwPosition* pEnd = rTmpCrsr.End(); + SwPosition* pEnd = rTmpCursor.End(); sal_uLong nEndIndex = pEnd->nNode.GetIndex(); if( ( nHere >= nStartIndex ) && (nHere <= nEndIndex) ) { @@ -1264,25 +1264,25 @@ void SwAccessibleMap::InvalidateShapeInParaSelection() delete[] pShapes; - //Checked for FlyFrm - if (mpFrmMap) + //Checked for FlyFrame + if (mpFrameMap) { - SwAccessibleContextMap_Impl::iterator aIter = mpFrmMap->begin(); - while( aIter != mpFrmMap->end() ) + SwAccessibleContextMap_Impl::iterator aIter = mpFrameMap->begin(); + while( aIter != mpFrameMap->end() ) { - const SwFrm *pFrm = (*aIter).first; - if(pFrm->IsFlyFrm()) + const SwFrame *pFrame = (*aIter).first; + if(pFrame->IsFlyFrame()) { uno::Reference < XAccessible > xAcc = (*aIter).second; if(xAcc.is()) { SwAccessibleFrameBase *pAccFrame = (static_cast< SwAccessibleFrameBase * >(xAcc.get())); - bool bFrmChanged = pAccFrame->SetSelectedState( true ); - if (bFrmChanged) + bool bFrameChanged = pAccFrame->SetSelectedState( true ); + if (bFrameChanged) { - const SwFlyFrm *pFlyFrm = static_cast< const SwFlyFrm * >( pFrm ); - const SwFrameFormat *pFrameFormat = pFlyFrm->GetFormat(); + const SwFlyFrame *pFlyFrame = static_cast< const SwFlyFrame * >( pFrame ); + const SwFrameFormat *pFrameFormat = pFlyFrame->GetFormat(); if (pFrameFormat) { const SwFormatAnchor& pAnchor = pFrameFormat->GetAnchor(); @@ -1320,33 +1320,33 @@ void SwAccessibleMap::InvalidateShapeInParaSelection() //Checked for Paras. bool bMarkChanged = false; SwAccessibleContextMap_Impl mapTemp; - if( pCrsr != nullptr ) + if( pCursor != nullptr ) { - for(SwPaM& rTmpCrsr : pCrsr->GetRingContainer()) + for(SwPaM& rTmpCursor : pCursor->GetRingContainer()) { - if( rTmpCrsr.HasMark() ) + if( rTmpCursor.HasMark() ) { - SwNodeIndex nStartIndex( rTmpCrsr.Start()->nNode ); - SwNodeIndex nEndIndex( rTmpCrsr.End()->nNode ); + SwNodeIndex nStartIndex( rTmpCursor.Start()->nNode ); + SwNodeIndex nEndIndex( rTmpCursor.End()->nNode ); while(nStartIndex <= nEndIndex) { - SwFrm *pFrm = nullptr; + SwFrame *pFrame = nullptr; if(nStartIndex.GetNode().IsContentNode()) { SwContentNode* pCNd = static_cast<SwContentNode*>(&(nStartIndex.GetNode())); - pFrm = SwIterator<SwFrm, SwContentNode>(*pCNd).First(); + pFrame = SwIterator<SwFrame, SwContentNode>(*pCNd).First(); } else if( nStartIndex.GetNode().IsTableNode() ) { SwTableNode * pTable = static_cast<SwTableNode *>(&(nStartIndex.GetNode())); SwTableFormat* pFormat = pTable->GetTable().GetFrameFormat(); - pFrm = SwIterator<SwFrm, SwTableFormat>(*pFormat).First(); + pFrame = SwIterator<SwFrame, SwTableFormat>(*pFormat).First(); } - if( pFrm && mpFrmMap) + if( pFrame && mpFrameMap) { - SwAccessibleContextMap_Impl::iterator aIter = mpFrmMap->find( pFrm ); - if( aIter != mpFrmMap->end() ) + SwAccessibleContextMap_Impl::iterator aIter = mpFrameMap->find( pFrame ); + if( aIter != mpFrameMap->end() ) { uno::Reference < XAccessible > xAcc = (*aIter).second; bool isChanged = false; @@ -1356,9 +1356,9 @@ void SwAccessibleMap::InvalidateShapeInParaSelection() } if(!isChanged) { - SwAccessibleContextMap_Impl::iterator aEraseIter = mpSeletedFrmMap->find( pFrm ); - if(aEraseIter != mpSeletedFrmMap->end()) - mpSeletedFrmMap->erase(aEraseIter); + SwAccessibleContextMap_Impl::iterator aEraseIter = mpSeletedFrameMap->find( pFrame ); + if(aEraseIter != mpSeletedFrameMap->end()) + mpSeletedFrameMap->erase(aEraseIter); } else { @@ -1366,7 +1366,7 @@ void SwAccessibleMap::InvalidateShapeInParaSelection() vecAdd.push_back(static_cast< SwAccessibleContext * >(xAcc.get())); } - mapTemp.insert( SwAccessibleContextMap_Impl::value_type( pFrm, xAcc ) ); + mapTemp.insert( SwAccessibleContextMap_Impl::value_type( pFrame, xAcc ) ); } } ++nStartIndex; @@ -1374,12 +1374,12 @@ void SwAccessibleMap::InvalidateShapeInParaSelection() } } } - if( !mpSeletedFrmMap ) - mpSeletedFrmMap = new SwAccessibleContextMap_Impl; - if( !mpSeletedFrmMap->empty() ) + if( !mpSeletedFrameMap ) + mpSeletedFrameMap = new SwAccessibleContextMap_Impl; + if( !mpSeletedFrameMap->empty() ) { - SwAccessibleContextMap_Impl::iterator aIter = mpSeletedFrmMap->begin(); - while( aIter != mpSeletedFrmMap->end() ) + SwAccessibleContextMap_Impl::iterator aIter = mpSeletedFrameMap->begin(); + while( aIter != mpSeletedFrameMap->end() ) { uno::Reference < XAccessible > xAcc = (*aIter).second; if(xAcc.is()) @@ -1388,7 +1388,7 @@ void SwAccessibleMap::InvalidateShapeInParaSelection() vecRemove.push_back(static_cast< SwAccessibleContext * >(xAcc.get())); } bMarkChanged = true; - mpSeletedFrmMap->clear(); + mpSeletedFrameMap->clear(); } if( !mapTemp.empty() ) @@ -1396,12 +1396,12 @@ void SwAccessibleMap::InvalidateShapeInParaSelection() SwAccessibleContextMap_Impl::iterator aIter = mapTemp.begin(); while( aIter != mapTemp.end() ) { - mpSeletedFrmMap->insert( SwAccessibleContextMap_Impl::value_type( (*aIter).first, (*aIter).second ) ); + mpSeletedFrameMap->insert( SwAccessibleContextMap_Impl::value_type( (*aIter).first, (*aIter).second ) ); ++aIter; } mapTemp.clear(); } - if( bMarkChanged && mpFrmMap) + if( bMarkChanged && mpFrameMap) { VEC_PARA::iterator vi = vecAdd.begin(); for (; vi != vecAdd.end() ; ++vi) @@ -1647,7 +1647,7 @@ void SwAccessibleMap::DoInvalidateShapeFocus() */ SwAccessibleMap::SwAccessibleMap( SwViewShell *pSh ) : - mpFrmMap( nullptr ), + mpFrameMap( nullptr ), mpShapeMap( nullptr ), mpShapes( nullptr ), mpEvents( nullptr ), @@ -1657,7 +1657,7 @@ SwAccessibleMap::SwAccessibleMap( SwViewShell *pSh ) : mpPreview( nullptr ), mnPara( 1 ), mbShapeSelected( false ), - mpSeletedFrmMap(nullptr) + mpSeletedFrameMap(nullptr) { pSh->GetLayout()->AddAccessibleShell(); } @@ -1667,11 +1667,11 @@ SwAccessibleMap::~SwAccessibleMap() uno::Reference < XAccessible > xAcc; { osl::MutexGuard aGuard( maMutex ); - if( mpFrmMap ) + if( mpFrameMap ) { - const SwRootFrm *pRootFrm = GetShell()->GetLayout(); - SwAccessibleContextMap_Impl::iterator aIter = mpFrmMap->find( pRootFrm ); - if( aIter != mpFrmMap->end() ) + const SwRootFrame *pRootFrame = GetShell()->GetLayout(); + SwAccessibleContextMap_Impl::iterator aIter = mpFrameMap->find( pRootFrame ); + if( aIter != mpFrameMap->end() ) xAcc = (*aIter).second; if( !xAcc.is() ) xAcc = new SwAccessibleDocument( this ); @@ -1683,10 +1683,10 @@ SwAccessibleMap::~SwAccessibleMap() SwAccessibleDocument *pAcc = static_cast< SwAccessibleDocument * >( xAcc.get() ); pAcc->Dispose( true ); } - if( mpFrmMap ) + if( mpFrameMap ) { - SwAccessibleContextMap_Impl::iterator aIter = mpFrmMap->begin(); - while( aIter != mpFrmMap->end() ) + SwAccessibleContextMap_Impl::iterator aIter = mpFrameMap->begin(); + while( aIter != mpFrameMap->end() ) { uno::Reference < XAccessible > xTmp = (*aIter).second; if( xTmp.is() ) @@ -1700,12 +1700,12 @@ SwAccessibleMap::~SwAccessibleMap() { osl::MutexGuard aGuard( maMutex ); #if OSL_DEBUG_LEVEL > 0 - OSL_ENSURE( !mpFrmMap || mpFrmMap->empty(), + OSL_ENSURE( !mpFrameMap || mpFrameMap->empty(), "Frame map should be empty after disposing the root frame" ); - if( mpFrmMap ) + if( mpFrameMap ) { - SwAccessibleContextMap_Impl::iterator aIter = mpFrmMap->begin(); - while( aIter != mpFrmMap->end() ) + SwAccessibleContextMap_Impl::iterator aIter = mpFrameMap->begin(); + while( aIter != mpFrameMap->end() ) { uno::Reference < XAccessible > xTmp = (*aIter).second; if( xTmp.is() ) @@ -1735,8 +1735,8 @@ SwAccessibleMap::~SwAccessibleMap() } } #endif - delete mpFrmMap; - mpFrmMap = nullptr; + delete mpFrameMap; + mpFrameMap = nullptr; delete mpShapeMap; mpShapeMap = nullptr; delete mpShapes; @@ -1775,7 +1775,7 @@ SwAccessibleMap::~SwAccessibleMap() mpEvents = nullptr; } mpVSh->GetLayout()->RemoveAccessibleShell(); - delete mpSeletedFrmMap; + delete mpSeletedFrameMap; } uno::Reference< XAccessible > SwAccessibleMap::_GetDocumentView( @@ -1787,22 +1787,22 @@ uno::Reference< XAccessible > SwAccessibleMap::_GetDocumentView( { osl::MutexGuard aGuard( maMutex ); - if( !mpFrmMap ) + if( !mpFrameMap ) { - mpFrmMap = new SwAccessibleContextMap_Impl; + mpFrameMap = new SwAccessibleContextMap_Impl; #if OSL_DEBUG_LEVEL > 0 - mpFrmMap->mbLocked = false; + mpFrameMap->mbLocked = false; #endif } #if OSL_DEBUG_LEVEL > 0 - OSL_ENSURE( !mpFrmMap->mbLocked, "Map is locked" ); - mpFrmMap->mbLocked = true; + OSL_ENSURE( !mpFrameMap->mbLocked, "Map is locked" ); + mpFrameMap->mbLocked = true; #endif - const SwRootFrm *pRootFrm = GetShell()->GetLayout(); - SwAccessibleContextMap_Impl::iterator aIter = mpFrmMap->find( pRootFrm ); - if( aIter != mpFrmMap->end() ) + const SwRootFrame *pRootFrame = GetShell()->GetLayout(); + SwAccessibleContextMap_Impl::iterator aIter = mpFrameMap->find( pRootFrame ); + if( aIter != mpFrameMap->end() ) xAcc = (*aIter).second; if( xAcc.is() ) { @@ -1815,19 +1815,19 @@ uno::Reference< XAccessible > SwAccessibleMap::_GetDocumentView( else xAcc = new SwAccessibleDocument( this ); - if( aIter != mpFrmMap->end() ) + if( aIter != mpFrameMap->end() ) { (*aIter).second = xAcc; } else { - SwAccessibleContextMap_Impl::value_type aEntry( pRootFrm, xAcc ); - mpFrmMap->insert( aEntry ); + SwAccessibleContextMap_Impl::value_type aEntry( pRootFrame, xAcc ); + mpFrameMap->insert( aEntry ); } } #if OSL_DEBUG_LEVEL > 0 - mpFrmMap->mbLocked = false; + mpFrameMap->mbLocked = false; #endif } @@ -1849,19 +1849,19 @@ uno::Reference< XAccessible > SwAccessibleMap::GetDocumentView( ) uno::Reference<XAccessible> SwAccessibleMap::GetDocumentPreview( const std::vector<PreviewPage*>& _rPreviewPages, const Fraction& _rScale, - const SwPageFrm* _pSelectedPageFrm, + const SwPageFrame* _pSelectedPageFrame, const Size& _rPreviewWinSize ) { // create & update preview data object if( mpPreview == nullptr ) mpPreview = new SwAccPreviewData(); - mpPreview->Update( *this, _rPreviewPages, _rScale, _pSelectedPageFrm, _rPreviewWinSize ); + mpPreview->Update( *this, _rPreviewPages, _rScale, _pSelectedPageFrame, _rPreviewWinSize ); uno::Reference<XAccessible> xAcc = _GetDocumentView( true ); return xAcc; } -uno::Reference< XAccessible> SwAccessibleMap::GetContext( const SwFrm *pFrm, +uno::Reference< XAccessible> SwAccessibleMap::GetContext( const SwFrame *pFrame, bool bCreate ) { uno::Reference < XAccessible > xAcc; @@ -1871,73 +1871,73 @@ uno::Reference< XAccessible> SwAccessibleMap::GetContext( const SwFrm *pFrm, { osl::MutexGuard aGuard( maMutex ); - if( !mpFrmMap && bCreate ) - mpFrmMap = new SwAccessibleContextMap_Impl; - if( mpFrmMap ) + if( !mpFrameMap && bCreate ) + mpFrameMap = new SwAccessibleContextMap_Impl; + if( mpFrameMap ) { - SwAccessibleContextMap_Impl::iterator aIter = mpFrmMap->find( pFrm ); - if( aIter != mpFrmMap->end() ) + SwAccessibleContextMap_Impl::iterator aIter = mpFrameMap->find( pFrame ); + if( aIter != mpFrameMap->end() ) xAcc = (*aIter).second; if( !xAcc.is() && bCreate ) { SwAccessibleContext *pAcc = nullptr; - switch( pFrm->GetType() ) + switch( pFrame->GetType() ) { case FRM_TXT: mnPara++; pAcc = new SwAccessibleParagraph( *this, - static_cast< const SwTextFrm& >( *pFrm ) ); + static_cast< const SwTextFrame& >( *pFrame ) ); break; case FRM_HEADER: pAcc = new SwAccessibleHeaderFooter( this, - static_cast< const SwHeaderFrm *>( pFrm ) ); + static_cast< const SwHeaderFrame *>( pFrame ) ); break; case FRM_FOOTER: pAcc = new SwAccessibleHeaderFooter( this, - static_cast< const SwFooterFrm *>( pFrm ) ); + static_cast< const SwFooterFrame *>( pFrame ) ); break; case FRM_FTN: { - const SwFootnoteFrm *pFootnoteFrm = - static_cast < const SwFootnoteFrm * >( pFrm ); + const SwFootnoteFrame *pFootnoteFrame = + static_cast < const SwFootnoteFrame * >( pFrame ); bool bIsEndnote = - SwAccessibleFootnote::IsEndnote( pFootnoteFrm ); + SwAccessibleFootnote::IsEndnote( pFootnoteFrame ); pAcc = new SwAccessibleFootnote( this, bIsEndnote, /*(bIsEndnote ? mnEndnote++ : mnFootnote++),*/ - pFootnoteFrm ); + pFootnoteFrame ); } break; case FRM_FLY: { - const SwFlyFrm *pFlyFrm = - static_cast < const SwFlyFrm * >( pFrm ); - switch( SwAccessibleFrameBase::GetNodeType( pFlyFrm ) ) + const SwFlyFrame *pFlyFrame = + static_cast < const SwFlyFrame * >( pFrame ); + switch( SwAccessibleFrameBase::GetNodeType( pFlyFrame ) ) { case ND_GRFNODE: - pAcc = new SwAccessibleGraphic( this, pFlyFrm ); + pAcc = new SwAccessibleGraphic( this, pFlyFrame ); break; case ND_OLENODE: - pAcc = new SwAccessibleEmbeddedObject( this, pFlyFrm ); + pAcc = new SwAccessibleEmbeddedObject( this, pFlyFrame ); break; default: - pAcc = new SwAccessibleTextFrame( this, *pFlyFrm ); + pAcc = new SwAccessibleTextFrame( this, *pFlyFrame ); break; } } break; case FRM_CELL: pAcc = new SwAccessibleCell( this, - static_cast< const SwCellFrm *>( pFrm ) ); + static_cast< const SwCellFrame *>( pFrame ) ); break; case FRM_TAB: pAcc = new SwAccessibleTable( this, - static_cast< const SwTabFrm *>( pFrm ) ); + static_cast< const SwTabFrame *>( pFrame ) ); break; case FRM_PAGE: OSL_ENSURE( GetShell()->IsPreview(), "accessible page frames only in PagePreview" ); - pAcc = new SwAccessiblePage( this, pFrm ); + pAcc = new SwAccessiblePage( this, pFrame ); break; } xAcc = pAcc; @@ -1945,18 +1945,18 @@ uno::Reference< XAccessible> SwAccessibleMap::GetContext( const SwFrm *pFrm, OSL_ENSURE( xAcc.is(), "unknown frame type" ); if( xAcc.is() ) { - if( aIter != mpFrmMap->end() ) + if( aIter != mpFrameMap->end() ) { (*aIter).second = xAcc; } else { - SwAccessibleContextMap_Impl::value_type aEntry( pFrm, xAcc ); - mpFrmMap->insert( aEntry ); + SwAccessibleContextMap_Impl::value_type aEntry( pFrame, xAcc ); + mpFrameMap->insert( aEntry ); } if( pAcc->HasCursor() && - !AreInSameTable( mxCursorContext, pFrm ) ) + !AreInSameTable( mxCursorContext, pFrame ) ) { // If the new context has the focus, and if we know // another context that had the focus, then the focus @@ -1993,10 +1993,10 @@ uno::Reference< XAccessible> SwAccessibleMap::GetContext( const SwFrm *pFrm, } ::rtl::Reference < SwAccessibleContext > SwAccessibleMap::GetContextImpl( - const SwFrm *pFrm, + const SwFrame *pFrame, bool bCreate ) { - uno::Reference < XAccessible > xAcc( GetContext( pFrm, bCreate ) ); + uno::Reference < XAccessible > xAcc( GetContext( pFrame, bCreate ) ); ::rtl::Reference < SwAccessibleContext > xAccImpl( static_cast< SwAccessibleContext * >( xAcc.get() ) ); @@ -2182,17 +2182,17 @@ void SwAccessibleMap::AddGroupContext(const SdrObject *pParentObj, uno::Referenc return xAccImpl; } -void SwAccessibleMap::RemoveContext( const SwFrm *pFrm ) +void SwAccessibleMap::RemoveContext( const SwFrame *pFrame ) { osl::MutexGuard aGuard( maMutex ); - if( mpFrmMap ) + if( mpFrameMap ) { SwAccessibleContextMap_Impl::iterator aIter = - mpFrmMap->find( pFrm ); - if( aIter != mpFrmMap->end() ) + mpFrameMap->find( pFrame ); + if( aIter != mpFrameMap->end() ) { - mpFrmMap->erase( aIter ); + mpFrameMap->erase( aIter ); // Remove reference to old caret object. Though mxCursorContext // is a weak reference and cleared automatically, clearing it @@ -2202,18 +2202,18 @@ void SwAccessibleMap::RemoveContext( const SwFrm *pFrm ) { SwAccessibleContext *pOldAccImpl = static_cast< SwAccessibleContext *>( xOldAcc.get() ); - OSL_ENSURE( pOldAccImpl->GetFrm(), "old caret context is disposed" ); - if( pOldAccImpl->GetFrm() == pFrm ) + OSL_ENSURE( pOldAccImpl->GetFrame(), "old caret context is disposed" ); + if( pOldAccImpl->GetFrame() == pFrame ) { xOldAcc.clear(); // get an empty ref mxCursorContext = xOldAcc; } } - if( mpFrmMap->empty() ) + if( mpFrameMap->empty() ) { - delete mpFrmMap; - mpFrmMap = nullptr; + delete mpFrameMap; + mpFrameMap = nullptr; } } } @@ -2244,23 +2244,23 @@ void SwAccessibleMap::RemoveContext( const SdrObject *pObj ) } } -void SwAccessibleMap::Dispose( const SwFrm *pFrm, +void SwAccessibleMap::Dispose( const SwFrame *pFrame, const SdrObject *pObj, vcl::Window* pWindow, bool bRecursive ) { - SwAccessibleChild aFrmOrObj( pFrm, pObj, pWindow ); + SwAccessibleChild aFrameOrObj( pFrame, pObj, pWindow ); // Indeed, the following assert checks the frame's accessible flag, // because that's the one that is evaluated in the layout. The frame // might not be accessible anyway. That's the case for cell frames that // contain further cells. - OSL_ENSURE( !aFrmOrObj.GetSwFrm() || aFrmOrObj.GetSwFrm()->IsAccessibleFrm(), + OSL_ENSURE( !aFrameOrObj.GetSwFrame() || aFrameOrObj.GetSwFrame()->IsAccessibleFrame(), "non accessible frame should be disposed" ); - if (aFrmOrObj.IsAccessible( GetShell()->IsPreview() ) + if (aFrameOrObj.IsAccessible( GetShell()->IsPreview() ) // fdo#87199 dispose the darn thing if it ever was accessible - || (pFrm && mpFrmMap && mpFrmMap->find(pFrm) != mpFrmMap->end())) + || (pFrame && mpFrameMap && mpFrameMap->find(pFrame) != mpFrameMap->end())) { ::rtl::Reference< SwAccessibleContext > xAccImpl; ::rtl::Reference< SwAccessibleContext > xParentAccImpl; @@ -2270,28 +2270,28 @@ void SwAccessibleMap::Dispose( const SwFrm *pFrm, osl::MutexGuard aGuard( maMutex ); // First of all look for an accessible context for a frame - if( aFrmOrObj.GetSwFrm() && mpFrmMap ) + if( aFrameOrObj.GetSwFrame() && mpFrameMap ) { SwAccessibleContextMap_Impl::iterator aIter = - mpFrmMap->find( aFrmOrObj.GetSwFrm() ); - if( aIter != mpFrmMap->end() ) + mpFrameMap->find( aFrameOrObj.GetSwFrame() ); + if( aIter != mpFrameMap->end() ) { uno::Reference < XAccessible > xAcc( (*aIter).second ); xAccImpl = static_cast< SwAccessibleContext *>( xAcc.get() ); } } - if( !xAccImpl.is() && mpFrmMap ) + if( !xAccImpl.is() && mpFrameMap ) { // If there is none, look if the parent is accessible. - const SwFrm *pParent = - SwAccessibleFrame::GetParent( aFrmOrObj, + const SwFrame *pParent = + SwAccessibleFrame::GetParent( aFrameOrObj, GetShell()->IsPreview()); if( pParent ) { SwAccessibleContextMap_Impl::iterator aIter = - mpFrmMap->find( pParent ); - if( aIter != mpFrmMap->end() ) + mpFrameMap->find( pParent ); + if( aIter != mpFrameMap->end() ) { uno::Reference < XAccessible > xAcc( (*aIter).second ); xParentAccImpl = @@ -2299,10 +2299,10 @@ void SwAccessibleMap::Dispose( const SwFrm *pFrm, } } } - if( !xParentAccImpl.is() && !aFrmOrObj.GetSwFrm() && mpShapeMap ) + if( !xParentAccImpl.is() && !aFrameOrObj.GetSwFrame() && mpShapeMap ) { SwAccessibleShapeMap_Impl::iterator aIter = - mpShapeMap->find( aFrmOrObj.GetDrawObject() ); + mpShapeMap->find( aFrameOrObj.GetDrawObject() ); if( aIter != mpShapeMap->end() ) { uno::Reference < XAccessible > xAcc( (*aIter).second ); @@ -2333,11 +2333,11 @@ void SwAccessibleMap::Dispose( const SwFrm *pFrm, if( mpEvents ) { SwAccessibleEventMap_Impl::iterator aIter = - mpEventMap->find( aFrmOrObj ); + mpEventMap->find( aFrameOrObj ); if( aIter != mpEventMap->end() ) { SwAccessibleEvent_Impl aEvent( - SwAccessibleEvent_Impl::DISPOSE, aFrmOrObj ); + SwAccessibleEvent_Impl::DISPOSE, aFrameOrObj ); AppendEvent( aEvent ); } } @@ -2358,40 +2358,40 @@ void SwAccessibleMap::Dispose( const SwFrm *pFrm, // be broadcasted at the end of the action to give the table // a chance to generate a single table change event. - xParentAccImpl->DisposeChild( aFrmOrObj, bRecursive ); + xParentAccImpl->DisposeChild( aFrameOrObj, bRecursive ); } else if( xShapeAccImpl.is() ) { - RemoveContext( aFrmOrObj.GetDrawObject() ); + RemoveContext( aFrameOrObj.GetDrawObject() ); xShapeAccImpl->dispose(); } - if( mpPreview && pFrm && pFrm->IsPageFrm() ) - mpPreview->DisposePage( static_cast< const SwPageFrm *>( pFrm ) ); + if( mpPreview && pFrame && pFrame->IsPageFrame() ) + mpPreview->DisposePage( static_cast< const SwPageFrame *>( pFrame ) ); } } -void SwAccessibleMap::InvalidatePosOrSize( const SwFrm *pFrm, +void SwAccessibleMap::InvalidatePosOrSize( const SwFrame *pFrame, const SdrObject *pObj, vcl::Window* pWindow, const SwRect& rOldBox ) { - SwAccessibleChild aFrmOrObj( pFrm, pObj, pWindow ); - if( aFrmOrObj.IsAccessible( GetShell()->IsPreview() ) ) + SwAccessibleChild aFrameOrObj( pFrame, pObj, pWindow ); + if( aFrameOrObj.IsAccessible( GetShell()->IsPreview() ) ) { ::rtl::Reference< SwAccessibleContext > xAccImpl; ::rtl::Reference< SwAccessibleContext > xParentAccImpl; - const SwFrm *pParent =nullptr; + const SwFrame *pParent =nullptr; { osl::MutexGuard aGuard( maMutex ); - if( mpFrmMap ) + if( mpFrameMap ) { - if( aFrmOrObj.GetSwFrm() ) + if( aFrameOrObj.GetSwFrame() ) { SwAccessibleContextMap_Impl::iterator aIter = - mpFrmMap->find( aFrmOrObj.GetSwFrm() ); - if( aIter != mpFrmMap->end() ) + mpFrameMap->find( aFrameOrObj.GetSwFrame() ); + if( aIter != mpFrameMap->end() ) { // If there is an accessible object already it is // notified directly. @@ -2405,14 +2405,14 @@ void SwAccessibleMap::InvalidatePosOrSize( const SwFrm *pFrm, // Otherwise we look if the parent is accessible. // If not, there is nothing to do. pParent = - SwAccessibleFrame::GetParent( aFrmOrObj, + SwAccessibleFrame::GetParent( aFrameOrObj, GetShell()->IsPreview()); if( pParent ) { SwAccessibleContextMap_Impl::iterator aIter = - mpFrmMap->find( pParent ); - if( aIter != mpFrmMap->end() ) + mpFrameMap->find( pParent ); + if( aIter != mpFrameMap->end() ) { uno::Reference < XAccessible > xAcc( (*aIter).second ); xParentAccImpl = @@ -2429,7 +2429,7 @@ void SwAccessibleMap::InvalidatePosOrSize( const SwFrm *pFrm, { SwAccessibleEvent_Impl aEvent( SwAccessibleEvent_Impl::POS_CHANGED, xAccImpl.get(), - aFrmOrObj, rOldBox ); + aFrameOrObj, rOldBox ); AppendEvent( aEvent ); } else @@ -2444,13 +2444,13 @@ void SwAccessibleMap::InvalidatePosOrSize( const SwFrm *pFrm, { SwAccessibleEvent_Impl aEvent( SwAccessibleEvent_Impl::CHILD_POS_CHANGED, - xParentAccImpl.get(), aFrmOrObj, rOldBox ); + xParentAccImpl.get(), aFrameOrObj, rOldBox ); AppendEvent( aEvent ); } else { FireEvents(); - xParentAccImpl->InvalidateChildPosOrSize( aFrmOrObj, + xParentAccImpl->InvalidateChildPosOrSize( aFrameOrObj, rOldBox ); } } @@ -2459,19 +2459,19 @@ void SwAccessibleMap::InvalidatePosOrSize( const SwFrm *pFrm, /* For child graphic and its parent paragraph,if split 2 graphic to 2 paragraph, will delete one graphic swfrm and new create 1 graphic swfrm , -then the new paragraph and the new graphic SwFrm will add . -but when add graphic SwFrm ,the accessible of the new Paragraph is not created yet. +then the new paragraph and the new graphic SwFrame will add . +but when add graphic SwFrame ,the accessible of the new Paragraph is not created yet. so the new graphic accessible 'parent is NULL, -so run here: save the parent's SwFrm not the accessible object parent, +so run here: save the parent's SwFrame not the accessible object parent, */ - bool bIsValidFrm = false; + bool bIsValidFrame = false; bool bIsTextParent = false; - if (aFrmOrObj.GetSwFrm()) + if (aFrameOrObj.GetSwFrame()) { - int nType = pFrm->GetType(); + int nType = pFrame->GetType(); if ( FRM_FLY == nType ) { - bIsValidFrm =true; + bIsValidFrame =true; } } else if(pObj) @@ -2482,15 +2482,15 @@ so run here: save the parent's SwFrm not the accessible object parent, bIsTextParent =true; } } -// bool bIsVisibleChildrenOnly =aFrmOrObj.IsVisibleChildrenOnly() ; -// bool bIsBoundAsChar =aFrmOrObj.IsBoundAsChar() ;//bIsVisibleChildrenOnly && bIsBoundAsChar && - if((bIsValidFrm || bIsTextParent) ) +// bool bIsVisibleChildrenOnly =aFrameOrObj.IsVisibleChildrenOnly() ; +// bool bIsBoundAsChar =aFrameOrObj.IsBoundAsChar() ;//bIsVisibleChildrenOnly && bIsBoundAsChar && + if((bIsValidFrame || bIsTextParent) ) { if( GetShell()->ActionPend() ) { SwAccessibleEvent_Impl aEvent( SwAccessibleEvent_Impl::CHILD_POS_CHANGED, - pParent, aFrmOrObj, rOldBox ); + pParent, aFrameOrObj, rOldBox ); AppendEvent( aEvent ); } else @@ -2502,20 +2502,20 @@ so run here: save the parent's SwFrm not the accessible object parent, } } -void SwAccessibleMap::InvalidateContent( const SwFrm *pFrm ) +void SwAccessibleMap::InvalidateContent( const SwFrame *pFrame ) { - SwAccessibleChild aFrmOrObj( pFrm ); - if( aFrmOrObj.IsAccessible( GetShell()->IsPreview() ) ) + SwAccessibleChild aFrameOrObj( pFrame ); + if( aFrameOrObj.IsAccessible( GetShell()->IsPreview() ) ) { uno::Reference < XAccessible > xAcc; { osl::MutexGuard aGuard( maMutex ); - if( mpFrmMap ) + if( mpFrameMap ) { SwAccessibleContextMap_Impl::iterator aIter = - mpFrmMap->find( aFrmOrObj.GetSwFrm() ); - if( aIter != mpFrmMap->end() ) + mpFrameMap->find( aFrameOrObj.GetSwFrame() ); + if( aIter != mpFrameMap->end() ) xAcc = (*aIter).second; } } @@ -2528,7 +2528,7 @@ void SwAccessibleMap::InvalidateContent( const SwFrm *pFrm ) { SwAccessibleEvent_Impl aEvent( SwAccessibleEvent_Impl::INVALID_CONTENT, pAccImpl, - aFrmOrObj ); + aFrameOrObj ); AppendEvent( aEvent ); } else @@ -2540,20 +2540,20 @@ void SwAccessibleMap::InvalidateContent( const SwFrm *pFrm ) } } -void SwAccessibleMap::InvalidateAttr( const SwTextFrm& rTextFrm ) +void SwAccessibleMap::InvalidateAttr( const SwTextFrame& rTextFrame ) { - SwAccessibleChild aFrmOrObj( &rTextFrm ); - if( aFrmOrObj.IsAccessible( GetShell()->IsPreview() ) ) + SwAccessibleChild aFrameOrObj( &rTextFrame ); + if( aFrameOrObj.IsAccessible( GetShell()->IsPreview() ) ) { uno::Reference < XAccessible > xAcc; { osl::MutexGuard aGuard( maMutex ); - if( mpFrmMap ) + if( mpFrameMap ) { SwAccessibleContextMap_Impl::iterator aIter = - mpFrmMap->find( aFrmOrObj.GetSwFrm() ); - if( aIter != mpFrmMap->end() ) + mpFrameMap->find( aFrameOrObj.GetSwFrame() ); + if( aIter != mpFrameMap->end() ) xAcc = (*aIter).second; } } @@ -2565,7 +2565,7 @@ void SwAccessibleMap::InvalidateAttr( const SwTextFrm& rTextFrm ) if( GetShell()->ActionPend() ) { SwAccessibleEvent_Impl aEvent( SwAccessibleEvent_Impl::INVALID_ATTR, - pAccImpl, aFrmOrObj ); + pAccImpl, aFrameOrObj ); aEvent.SetStates( AccessibleStates::TEXT_ATTRIBUTE_CHANGED ); AppendEvent( aEvent ); } @@ -2578,38 +2578,38 @@ void SwAccessibleMap::InvalidateAttr( const SwTextFrm& rTextFrm ) } } -void SwAccessibleMap::InvalidateCursorPosition( const SwFrm *pFrm ) +void SwAccessibleMap::InvalidateCursorPosition( const SwFrame *pFrame ) { - SwAccessibleChild aFrmOrObj( pFrm ); + SwAccessibleChild aFrameOrObj( pFrame ); bool bShapeSelected = false; const SwViewShell *pVSh = GetShell(); - if( dynamic_cast<const SwCrsrShell*>( pVSh) != nullptr ) + if( dynamic_cast<const SwCursorShell*>( pVSh) != nullptr ) { - const SwCrsrShell *pCSh = static_cast< const SwCrsrShell * >( pVSh ); + const SwCursorShell *pCSh = static_cast< const SwCursorShell * >( pVSh ); if( pCSh->IsTableMode() ) { - while( aFrmOrObj.GetSwFrm() && !aFrmOrObj.GetSwFrm()->IsCellFrm() ) - aFrmOrObj = aFrmOrObj.GetSwFrm()->GetUpper(); + while( aFrameOrObj.GetSwFrame() && !aFrameOrObj.GetSwFrame()->IsCellFrame() ) + aFrameOrObj = aFrameOrObj.GetSwFrame()->GetUpper(); } else if( dynamic_cast<const SwFEShell*>( pVSh) != nullptr ) { const SwFEShell *pFESh = static_cast< const SwFEShell * >( pVSh ); - const SwFrm *pFlyFrm = pFESh->GetSelectedFlyFrm(); - if( pFlyFrm ) + const SwFrame *pFlyFrame = pFESh->GetSelectedFlyFrame(); + if( pFlyFrame ) { - OSL_ENSURE( !pFrm || pFrm->FindFlyFrm() == pFlyFrm, + OSL_ENSURE( !pFrame || pFrame->FindFlyFrame() == pFlyFrame, "cursor is not contained in fly frame" ); - aFrmOrObj = pFlyFrm; + aFrameOrObj = pFlyFrame; } else if( pFESh->IsObjSelected() > 0 ) { bShapeSelected = true; - aFrmOrObj = static_cast<const SwFrm *>( nullptr ); + aFrameOrObj = static_cast<const SwFrame *>( nullptr ); } } } - OSL_ENSURE( bShapeSelected || aFrmOrObj.IsAccessible(GetShell()->IsPreview()), + OSL_ENSURE( bShapeSelected || aFrameOrObj.IsAccessible(GetShell()->IsPreview()), "frame is not accessible" ); uno::Reference < XAccessible > xOldAcc; @@ -2625,27 +2625,27 @@ void SwAccessibleMap::InvalidateCursorPosition( const SwFrm *pFrm ) bOldShapeSelected = mbShapeSelected; mbShapeSelected = bShapeSelected; - if( aFrmOrObj.GetSwFrm() && mpFrmMap ) + if( aFrameOrObj.GetSwFrame() && mpFrameMap ) { SwAccessibleContextMap_Impl::iterator aIter = - mpFrmMap->find( aFrmOrObj.GetSwFrm() ); - if( aIter != mpFrmMap->end() ) + mpFrameMap->find( aFrameOrObj.GetSwFrame() ); + if( aIter != mpFrameMap->end() ) xAcc = (*aIter).second; else { SwRect rcEmpty; - const SwTabFrm* pTabFrm = aFrmOrObj.GetSwFrm()->FindTabFrm(); - if (pTabFrm) + const SwTabFrame* pTabFrame = aFrameOrObj.GetSwFrame()->FindTabFrame(); + if (pTabFrame) { - InvalidatePosOrSize(pTabFrm, nullptr, nullptr, rcEmpty); + InvalidatePosOrSize(pTabFrame, nullptr, nullptr, rcEmpty); } else { - InvalidatePosOrSize(aFrmOrObj.GetSwFrm(), nullptr, nullptr, rcEmpty); + InvalidatePosOrSize(aFrameOrObj.GetSwFrame(), nullptr, nullptr, rcEmpty); } - aIter = mpFrmMap->find( aFrmOrObj.GetSwFrm() ); - if( aIter != mpFrmMap->end() ) + aIter = mpFrameMap->find( aFrameOrObj.GetSwFrame() ); + if( aIter != mpFrameMap->end() ) { xAcc = (*aIter).second; } @@ -2664,10 +2664,10 @@ void SwAccessibleMap::InvalidateCursorPosition( const SwFrm *pFrm ) // table, its the best choice, because using it avoids // an unnecessary cursor invalidation cycle when creating // a new object for the current cell. - if( aFrmOrObj.GetSwFrm()->IsCellFrm() ) + if( aFrameOrObj.GetSwFrame()->IsCellFrame() ) { if( xOldAcc.is() && - AreInSameTable( xOldAcc, aFrmOrObj.GetSwFrm() ) ) + AreInSameTable( xOldAcc, aFrameOrObj.GetSwFrame() ) ) { if( xAcc.is() ) xOldAcc = xAcc; // avoid extra invalidation @@ -2675,7 +2675,7 @@ void SwAccessibleMap::InvalidateCursorPosition( const SwFrm *pFrm ) xAcc = xOldAcc; // make sure ate least one } if( !xAcc.is() ) - xAcc = GetContext( aFrmOrObj.GetSwFrm() ); + xAcc = GetContext( aFrameOrObj.GetSwFrame() ); } } else if (bShapeSelected) @@ -2694,19 +2694,19 @@ void SwAccessibleMap::InvalidateCursorPosition( const SwFrm *pFrm ) } if (pObj != nullptr) { - const SwFrm *pParent = SwAccessibleFrame::GetParent( SwAccessibleChild(pObj), GetShell()->IsPreview() ); + const SwFrame *pParent = SwAccessibleFrame::GetParent( SwAccessibleChild(pObj), GetShell()->IsPreview() ); if( pParent ) { ::rtl::Reference< SwAccessibleContext > xParentAccImpl = GetContextImpl(pParent,false); if (!xParentAccImpl.is()) { - const SwTabFrm* pTabFrm = pParent->FindTabFrm(); - if (pTabFrm) + const SwTabFrame* pTabFrame = pParent->FindTabFrame(); + if (pTabFrame) { //The Table should not add in acc.because the "pParent" is not add to acc . - uno::Reference< XAccessible> xAccParentTab = GetContext(pTabFrm);//Should Create. + uno::Reference< XAccessible> xAccParentTab = GetContext(pTabFrame);//Should Create. - const SwFrm *pParentRoot = SwAccessibleFrame::GetParent( SwAccessibleChild(pTabFrm), GetShell()->IsPreview() ); + const SwFrame *pParentRoot = SwAccessibleFrame::GetParent( SwAccessibleChild(pTabFrame), GetShell()->IsPreview() ); if (pParentRoot) { ::rtl::Reference< SwAccessibleContext > xParentAccImplRoot = GetContextImpl(pParentRoot,false); @@ -2727,7 +2727,7 @@ void SwAccessibleMap::InvalidateCursorPosition( const SwFrm *pFrm ) //directly create this acc para . xParentAccImpl = GetContextImpl(pParent);//Should Create. - const SwFrm *pParentRoot = SwAccessibleFrame::GetParent( SwAccessibleChild(pParent), GetShell()->IsPreview() ); + const SwFrame *pParentRoot = SwAccessibleFrame::GetParent( SwAccessibleChild(pParent), GetShell()->IsPreview() ); ::rtl::Reference< SwAccessibleContext > xParentAccImplRoot = GetContextImpl(pParentRoot,false); if(xParentAccImplRoot.is()) @@ -2836,23 +2836,23 @@ void SwAccessibleMap::SetCursorContext( } void SwAccessibleMap::InvalidateStates( AccessibleStates _nStates, - const SwFrm* _pFrm ) + const SwFrame* _pFrame ) { // Start with the frame or the first upper that is accessible - SwAccessibleChild aFrmOrObj( _pFrm ); - while( aFrmOrObj.GetSwFrm() && - !aFrmOrObj.IsAccessible( GetShell()->IsPreview() ) ) - aFrmOrObj = aFrmOrObj.GetSwFrm()->GetUpper(); - if( !aFrmOrObj.GetSwFrm() ) - aFrmOrObj = GetShell()->GetLayout(); - - uno::Reference< XAccessible > xAcc( GetContext( aFrmOrObj.GetSwFrm() ) ); + SwAccessibleChild aFrameOrObj( _pFrame ); + while( aFrameOrObj.GetSwFrame() && + !aFrameOrObj.IsAccessible( GetShell()->IsPreview() ) ) + aFrameOrObj = aFrameOrObj.GetSwFrame()->GetUpper(); + if( !aFrameOrObj.GetSwFrame() ) + aFrameOrObj = GetShell()->GetLayout(); + + uno::Reference< XAccessible > xAcc( GetContext( aFrameOrObj.GetSwFrame() ) ); SwAccessibleContext *pAccImpl = static_cast< SwAccessibleContext *>( xAcc.get() ); if( GetShell()->ActionPend() ) { SwAccessibleEvent_Impl aEvent( SwAccessibleEvent_Impl::CARET_OR_STATES, pAccImpl, - SwAccessibleChild(pAccImpl->GetFrm()), + SwAccessibleChild(pAccImpl->GetFrame()), _nStates ); AppendEvent( aEvent ); } @@ -2863,22 +2863,22 @@ void SwAccessibleMap::InvalidateStates( AccessibleStates _nStates, } } -void SwAccessibleMap::_InvalidateRelationSet( const SwFrm* pFrm, +void SwAccessibleMap::_InvalidateRelationSet( const SwFrame* pFrame, bool bFrom ) { // first, see if this frame is accessible, and if so, get the respective - SwAccessibleChild aFrmOrObj( pFrm ); - if( aFrmOrObj.IsAccessible( GetShell()->IsPreview() ) ) + SwAccessibleChild aFrameOrObj( pFrame ); + if( aFrameOrObj.IsAccessible( GetShell()->IsPreview() ) ) { uno::Reference < XAccessible > xAcc; { osl::MutexGuard aGuard( maMutex ); - if( mpFrmMap ) + if( mpFrameMap ) { SwAccessibleContextMap_Impl::iterator aIter = - mpFrmMap->find( aFrmOrObj.GetSwFrm() ); - if( aIter != mpFrmMap->end() ) + mpFrameMap->find( aFrameOrObj.GetSwFrame() ); + if( aIter != mpFrameMap->end() ) { xAcc = (*aIter).second; } @@ -2893,7 +2893,7 @@ void SwAccessibleMap::_InvalidateRelationSet( const SwFrm* pFrm, if( GetShell()->ActionPend() ) { SwAccessibleEvent_Impl aEvent( SwAccessibleEvent_Impl::CARET_OR_STATES, - pAccImpl, SwAccessibleChild(pFrm), + pAccImpl, SwAccessibleChild(pFrame), ( bFrom ? AccessibleStates::RELATION_FROM : AccessibleStates::RELATION_TO ) ); @@ -2910,36 +2910,36 @@ void SwAccessibleMap::_InvalidateRelationSet( const SwFrm* pFrm, } } -void SwAccessibleMap::InvalidateRelationSet( const SwFrm* pMaster, - const SwFrm* pFollow ) +void SwAccessibleMap::InvalidateRelationSet( const SwFrame* pMaster, + const SwFrame* pFollow ) { _InvalidateRelationSet( pMaster, false ); _InvalidateRelationSet( pFollow, true ); } // invalidation of CONTENT_FLOW_FROM/_TO relation of a paragraph -void SwAccessibleMap::InvalidateParaFlowRelation( const SwTextFrm& _rTextFrm, +void SwAccessibleMap::InvalidateParaFlowRelation( const SwTextFrame& _rTextFrame, const bool _bFrom ) { - _InvalidateRelationSet( &_rTextFrm, _bFrom ); + _InvalidateRelationSet( &_rTextFrame, _bFrom ); } // invalidation of text selection of a paragraph -void SwAccessibleMap::InvalidateParaTextSelection( const SwTextFrm& _rTextFrm ) +void SwAccessibleMap::InvalidateParaTextSelection( const SwTextFrame& _rTextFrame ) { // first, see if this frame is accessible, and if so, get the respective - SwAccessibleChild aFrmOrObj( &_rTextFrm ); - if( aFrmOrObj.IsAccessible( GetShell()->IsPreview() ) ) + SwAccessibleChild aFrameOrObj( &_rTextFrame ); + if( aFrameOrObj.IsAccessible( GetShell()->IsPreview() ) ) { uno::Reference < XAccessible > xAcc; { osl::MutexGuard aGuard( maMutex ); - if( mpFrmMap ) + if( mpFrameMap ) { SwAccessibleContextMap_Impl::iterator aIter = - mpFrmMap->find( aFrmOrObj.GetSwFrm() ); - if( aIter != mpFrmMap->end() ) + mpFrameMap->find( aFrameOrObj.GetSwFrame() ); + if( aIter != mpFrameMap->end() ) { xAcc = (*aIter).second; } @@ -2956,7 +2956,7 @@ void SwAccessibleMap::InvalidateParaTextSelection( const SwTextFrm& _rTextFrm ) SwAccessibleEvent_Impl aEvent( SwAccessibleEvent_Impl::CARET_OR_STATES, pAccImpl, - SwAccessibleChild( &_rTextFrm ), + SwAccessibleChild( &_rTextFrame ), AccessibleStates::TEXT_SELECTION_CHANGED ); AppendEvent( aEvent ); } @@ -2969,23 +2969,23 @@ void SwAccessibleMap::InvalidateParaTextSelection( const SwTextFrm& _rTextFrm ) } } -sal_Int32 SwAccessibleMap::GetChildIndex( const SwFrm& rParentFrm, +sal_Int32 SwAccessibleMap::GetChildIndex( const SwFrame& rParentFrame, vcl::Window& rChild ) const { sal_Int32 nIndex( -1 ); - SwAccessibleChild aFrmOrObj( &rParentFrm ); - if( aFrmOrObj.IsAccessible( GetShell()->IsPreview() ) ) + SwAccessibleChild aFrameOrObj( &rParentFrame ); + if( aFrameOrObj.IsAccessible( GetShell()->IsPreview() ) ) { uno::Reference < XAccessible > xAcc; { osl::MutexGuard aGuard( maMutex ); - if( mpFrmMap ) + if( mpFrameMap ) { SwAccessibleContextMap_Impl::iterator aIter = - mpFrmMap->find( aFrmOrObj.GetSwFrm() ); - if( aIter != mpFrmMap->end() ) + mpFrameMap->find( aFrameOrObj.GetSwFrame() ); + if( aIter != mpFrameMap->end() ) { xAcc = (*aIter).second; } @@ -3007,13 +3007,13 @@ sal_Int32 SwAccessibleMap::GetChildIndex( const SwFrm& rParentFrm, void SwAccessibleMap::UpdatePreview( const std::vector<PreviewPage*>& _rPreviewPages, const Fraction& _rScale, - const SwPageFrm* _pSelectedPageFrm, + const SwPageFrame* _pSelectedPageFrame, const Size& _rPreviewWinSize ) { assert(GetShell()->IsPreview() && "no preview?"); assert(mpPreview != nullptr && "no preview data?"); - mpPreview->Update( *this, _rPreviewPages, _rScale, _pSelectedPageFrm, _rPreviewWinSize ); + mpPreview->Update( *this, _rPreviewPages, _rScale, _pSelectedPageFrame, _rPreviewWinSize ); // propagate change of VisArea through the document's // accessibility tree; this will also send appropriate scroll @@ -3029,12 +3029,12 @@ void SwAccessibleMap::UpdatePreview( const std::vector<PreviewPage*>& _rPreviewP xOldAcc = mxCursorContext; - const SwPageFrm *pSelPage = mpPreview->GetSelPage(); - if( pSelPage && mpFrmMap ) + const SwPageFrame *pSelPage = mpPreview->GetSelPage(); + if( pSelPage && mpFrameMap ) { SwAccessibleContextMap_Impl::iterator aIter = - mpFrmMap->find( pSelPage ); - if( aIter != mpFrmMap->end() ) + mpFrameMap->find( pSelPage ); + if( aIter != mpFrameMap->end() ) xAcc = (*aIter).second; } } @@ -3059,11 +3059,11 @@ void SwAccessibleMap::InvalidatePreviewSelection( sal_uInt16 nSelPage ) xOldAcc = mxCursorContext; - const SwPageFrm *pSelPage = mpPreview->GetSelPage(); - if( pSelPage && mpFrmMap ) + const SwPageFrame *pSelPage = mpPreview->GetSelPage(); + if( pSelPage && mpFrameMap ) { - SwAccessibleContextMap_Impl::iterator aIter = mpFrmMap->find( pSelPage ); - if( aIter != mpFrmMap->end() ) + SwAccessibleContextMap_Impl::iterator aIter = mpFrameMap->find( pSelPage ); + if( aIter != mpFrameMap->end() ) xAcc = (*aIter).second; } } @@ -3074,9 +3074,9 @@ void SwAccessibleMap::InvalidatePreviewSelection( sal_uInt16 nSelPage ) InvalidateCursorPosition( xAcc ); } -bool SwAccessibleMap::IsPageSelected( const SwPageFrm *pPageFrm ) const +bool SwAccessibleMap::IsPageSelected( const SwPageFrame *pPageFrame ) const { - return mpPreview && mpPreview->GetSelPage() == pPageFrm; + return mpPreview && mpPreview->GetSelPage() == pPageFrame; } void SwAccessibleMap::FireEvents() @@ -3364,29 +3364,29 @@ Size SwAccessibleMap::GetPreviewPageSize( sal_uInt16 _nPreviewPageNum ) const SwAccessibleSelectedParas_Impl* SwAccessibleMap::_BuildSelectedParas() { // no accessible contexts, no selection - if ( !mpFrmMap ) + if ( !mpFrameMap ) { return nullptr; } // get cursor as an instance of its base class <SwPaM> - SwPaM* pCrsr( nullptr ); + SwPaM* pCursor( nullptr ); { - SwCrsrShell* pCrsrShell = dynamic_cast<SwCrsrShell*>(GetShell()); - if ( pCrsrShell ) + SwCursorShell* pCursorShell = dynamic_cast<SwCursorShell*>(GetShell()); + if ( pCursorShell ) { - SwFEShell* pFEShell = dynamic_cast<SwFEShell*>(pCrsrShell); + SwFEShell* pFEShell = dynamic_cast<SwFEShell*>(pCursorShell); if ( !pFEShell || - ( !pFEShell->IsFrmSelected() && + ( !pFEShell->IsFrameSelected() && pFEShell->IsObjSelected() == 0 ) ) { // get cursor without updating an existing table cursor. - pCrsr = pCrsrShell->GetCrsr( false ); + pCursor = pCursorShell->GetCursor( false ); } } } // no cursor, no selection - if ( !pCrsr ) + if ( !pCursor ) { return nullptr; } @@ -3394,17 +3394,17 @@ SwAccessibleSelectedParas_Impl* SwAccessibleMap::_BuildSelectedParas() SwAccessibleSelectedParas_Impl* pRetSelectedParas( nullptr ); // loop on all cursors - SwPaM* pRingStart = pCrsr; + SwPaM* pRingStart = pCursor; do { // for a selection the cursor has to have a mark. // for safety reasons assure that point and mark are in text nodes - if ( pCrsr->HasMark() && - pCrsr->GetPoint()->nNode.GetNode().IsTextNode() && - pCrsr->GetMark()->nNode.GetNode().IsTextNode() ) + if ( pCursor->HasMark() && + pCursor->GetPoint()->nNode.GetNode().IsTextNode() && + pCursor->GetMark()->nNode.GetNode().IsTextNode() ) { - SwPosition* pStartPos = pCrsr->Start(); - SwPosition* pEndPos = pCrsr->End(); + SwPosition* pStartPos = pCursor->Start(); + SwPosition* pEndPos = pCursor->End(); // loop on all text nodes inside the selection SwNodeIndex aIdx( pStartPos->nNode ); for ( ; aIdx.GetIndex() <= pEndPos->nNode.GetIndex(); ++aIdx ) @@ -3413,13 +3413,13 @@ SwAccessibleSelectedParas_Impl* SwAccessibleMap::_BuildSelectedParas() if ( pTextNode ) { // loop on all text frames registered at the text node. - SwIterator<SwTextFrm,SwTextNode> aIter( *pTextNode ); - for( SwTextFrm* pTextFrm = aIter.First(); pTextFrm; pTextFrm = aIter.Next() ) + SwIterator<SwTextFrame,SwTextNode> aIter( *pTextNode ); + for( SwTextFrame* pTextFrame = aIter.First(); pTextFrame; pTextFrame = aIter.Next() ) { uno::WeakReference < XAccessible > xWeakAcc; SwAccessibleContextMap_Impl::iterator aMapIter = - mpFrmMap->find( pTextFrm ); - if( aMapIter != mpFrmMap->end() ) + mpFrameMap->find( pTextFrame ); + if( aMapIter != mpFrameMap->end() ) { xWeakAcc = (*aMapIter).second; SwAccessibleParaSelection aDataEntry( @@ -3444,8 +3444,8 @@ SwAccessibleSelectedParas_Impl* SwAccessibleMap::_BuildSelectedParas() } // prepare next turn: get next cursor in ring - pCrsr = static_cast<SwPaM*>( pCrsr->GetNext() ); - } while ( pCrsr != pRingStart ); + pCursor = static_cast<SwPaM*>( pCursor->GetNext() ); + } while ( pCursor != pRingStart ); return pRetSelectedParas; } @@ -3507,15 +3507,15 @@ void SwAccessibleMap::InvalidateTextSelectionOfAllParas() { ::rtl::Reference < SwAccessibleContext > xAccImpl( static_cast<SwAccessibleContext*>( xAcc.get() ) ); - if ( xAccImpl.is() && xAccImpl->GetFrm() ) + if ( xAccImpl.is() && xAccImpl->GetFrame() ) { - const SwTextFrm* pTextFrm( - dynamic_cast<const SwTextFrm*>(xAccImpl->GetFrm()) ); - OSL_ENSURE( pTextFrm, + const SwTextFrame* pTextFrame( + dynamic_cast<const SwTextFrame*>(xAccImpl->GetFrame()) ); + OSL_ENSURE( pTextFrame, "<SwAccessibleMap::_SubmitTextSelectionChangedEvents()> - unexpected type of frame" ); - if ( pTextFrm ) + if ( pTextFrame ) { - InvalidateParaTextSelection( *pTextFrm ); + InvalidateParaTextSelection( *pTextFrame ); } } } @@ -3535,15 +3535,15 @@ void SwAccessibleMap::InvalidateTextSelectionOfAllParas() { ::rtl::Reference < SwAccessibleContext > xAccImpl( static_cast<SwAccessibleContext*>( xAcc.get() ) ); - if ( xAccImpl.is() && xAccImpl->GetFrm() ) + if ( xAccImpl.is() && xAccImpl->GetFrame() ) { - const SwTextFrm* pTextFrm( - dynamic_cast<const SwTextFrm*>(xAccImpl->GetFrm()) ); - OSL_ENSURE( pTextFrm, + const SwTextFrame* pTextFrame( + dynamic_cast<const SwTextFrame*>(xAccImpl->GetFrame()) ); + OSL_ENSURE( pTextFrame, "<SwAccessibleMap::_SubmitTextSelectionChangedEvents()> - unexpected type of frame" ); - if ( pTextFrm ) + if ( pTextFrame ) { - InvalidateParaTextSelection( *pTextFrm ); + InvalidateParaTextSelection( *pTextFrame ); } } } diff --git a/sw/source/core/access/accnotextframe.cxx b/sw/source/core/access/accnotextframe.cxx index 5bb25d3048ce..9b7a1bfdd7ee 100644 --- a/sw/source/core/access/accnotextframe.cxx +++ b/sw/source/core/access/accnotextframe.cxx @@ -44,12 +44,12 @@ using utl::AccessibleRelationSetHelper; const SwNoTextNode *SwAccessibleNoTextFrame::GetNoTextNode() const { const SwNoTextNode *pNd = nullptr; - const SwFlyFrm *pFlyFrm = static_cast< const SwFlyFrm *>( GetFrm() ); - if( pFlyFrm->Lower() && pFlyFrm->Lower()->IsNoTextFrm() ) + const SwFlyFrame *pFlyFrame = static_cast< const SwFlyFrame *>( GetFrame() ); + if( pFlyFrame->Lower() && pFlyFrame->Lower()->IsNoTextFrame() ) { - const SwContentFrm *pCntFrm = - static_cast<const SwContentFrm *>( pFlyFrm->Lower() ); - const SwContentNode* pSwContentNode = pCntFrm->GetNode(); + const SwContentFrame *pContentFrame = + static_cast<const SwContentFrame *>( pFlyFrame->Lower() ); + const SwContentNode* pSwContentNode = pContentFrame->GetNode(); if(pSwContentNode != nullptr) { pNd = pSwContentNode->GetNoTextNode(); @@ -62,8 +62,8 @@ const SwNoTextNode *SwAccessibleNoTextFrame::GetNoTextNode() const SwAccessibleNoTextFrame::SwAccessibleNoTextFrame( SwAccessibleMap* pInitMap, sal_Int16 nInitRole, - const SwFlyFrm* pFlyFrm ) : - SwAccessibleFrameBase( pInitMap, nInitRole, pFlyFrm ), + const SwFlyFrame* pFlyFrame ) : + SwAccessibleFrameBase( pInitMap, nInitRole, pFlyFrame ), aDepend( this, const_cast < SwNoTextNode * >( GetNoTextNode() ) ), msTitle(), msDesc() @@ -138,7 +138,7 @@ void SwAccessibleNoTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem // intentional no break here case RES_DESCRIPTION_CHANGED: { - if ( pNd && GetFrm() ) + if ( pNd && GetFrame() ) { const OUString sOldDesc( msDesc ); @@ -311,7 +311,7 @@ throw (uno::RuntimeException, std::exception) CHECK_FOR_DEFUNC( XAccessibleHypertext ); sal_Int32 nCount = 0; - SwFormatURL aURL( static_cast<const SwLayoutFrm*>(GetFrm())->GetFormat()->GetURL() ); + SwFormatURL aURL( static_cast<const SwLayoutFrame*>(GetFrame())->GetFormat()->GetURL() ); if(aURL.GetMap() || !aURL.GetURL().isEmpty()) nCount = 1; @@ -328,7 +328,7 @@ uno::Reference< XAccessibleHyperlink > SAL_CALL uno::Reference< XAccessibleHyperlink > xRet; - SwFormatURL aURL( static_cast<const SwLayoutFrm*>(GetFrm())->GetFormat()->GetURL() ); + SwFormatURL aURL( static_cast<const SwLayoutFrame*>(GetFrame())->GetFormat()->GetURL() ); if( nLinkIndex > 0 ) throw lang::IndexOutOfBoundsException(); @@ -337,7 +337,7 @@ uno::Reference< XAccessibleHyperlink > SAL_CALL { if ( !alink.is() ) { - alink = new SwAccessibleNoTextHyperlink( this, GetFrm() ); + alink = new SwAccessibleNoTextHyperlink( this, GetFrame() ); } return alink; diff --git a/sw/source/core/access/accnotextframe.hxx b/sw/source/core/access/accnotextframe.hxx index 17c7d5216a85..d11dd25455fb 100644 --- a/sw/source/core/access/accnotextframe.hxx +++ b/sw/source/core/access/accnotextframe.hxx @@ -29,7 +29,7 @@ namespace com { namespace star { namespace accessibility { struct AccessibleRelation; } } } -class SwFlyFrm; +class SwFlyFrame; class SwNoTextNode; class SwAccessibleNoTextHyperlink; @@ -53,7 +53,7 @@ protected: public: SwAccessibleNoTextFrame( SwAccessibleMap* pInitMap, sal_Int16 nInitRole, - const SwFlyFrm *pFlyFrm ); + const SwFlyFrame *pFlyFrame ); // XAccessibleContext diff --git a/sw/source/core/access/accnotexthyperlink.cxx b/sw/source/core/access/accnotexthyperlink.cxx index ddea63954254..b8dbbbf42bc6 100644 --- a/sw/source/core/access/accnotexthyperlink.cxx +++ b/sw/source/core/access/accnotexthyperlink.cxx @@ -37,9 +37,9 @@ using namespace css::lang; using namespace css::uno; using namespace css::accessibility; -SwAccessibleNoTextHyperlink::SwAccessibleNoTextHyperlink( SwAccessibleNoTextFrame *p, const SwFrm *aFrm ) : +SwAccessibleNoTextHyperlink::SwAccessibleNoTextHyperlink( SwAccessibleNoTextFrame *p, const SwFrame *aFrame ) : xFrame( p ), - mpFrm( aFrm ) + mpFrame( aFrame ) { } @@ -180,8 +180,8 @@ Any SAL_CALL SwAccessibleNoTextHyperlink::getAccessibleActionAnchor( throw lang::IndexOutOfBoundsException(); Any aRet; - //SwFrm* pAnchor = static_cast<SwFlyFrm*>(mpFrm)->GetAnchor(); - Reference< XAccessible > xAnchor = xFrame->GetAccessibleMap()->GetContext(mpFrm); + //SwFrame* pAnchor = static_cast<SwFlyFrame*>(mpFrame)->GetAnchor(); + Reference< XAccessible > xAnchor = xFrame->GetAccessibleMap()->GetContext(mpFrame); //SwAccessibleNoTextFrame* pFrame = xFrame.get(); //Reference< XAccessible > xAnchor = (XAccessible*)pFrame; aRet <<= xAnchor; diff --git a/sw/source/core/access/accnotexthyperlink.hxx b/sw/source/core/access/accnotexthyperlink.hxx index bd1c881338b8..7629ef8272cc 100644 --- a/sw/source/core/access/accnotexthyperlink.hxx +++ b/sw/source/core/access/accnotexthyperlink.hxx @@ -35,15 +35,15 @@ class SwAccessibleNoTextHyperlink : friend class SwAccessibleNoTextFrame; ::rtl::Reference< SwAccessibleNoTextFrame > xFrame; - const SwFrm *mpFrm; + const SwFrame *mpFrame; SwFrameFormat *GetFormat() { - return const_cast<SwLayoutFrm*>(static_cast<const SwLayoutFrm*>(mpFrm))->GetFormat(); + return const_cast<SwLayoutFrame*>(static_cast<const SwLayoutFrame*>(mpFrame))->GetFormat(); } public: - SwAccessibleNoTextHyperlink( SwAccessibleNoTextFrame *p, const SwFrm* aFrm ); + SwAccessibleNoTextHyperlink( SwAccessibleNoTextFrame *p, const SwFrame* aFrame ); // XAccessibleAction virtual sal_Int32 SAL_CALL getAccessibleActionCount() diff --git a/sw/source/core/access/accpage.cxx b/sw/source/core/access/accpage.cxx index 32e4a9083e81..f1f2c0ce9118 100644 --- a/sw/source/core/access/accpage.cxx +++ b/sw/source/core/access/accpage.cxx @@ -41,7 +41,7 @@ const sal_Char sImplementationName[] = "com.sun.star.comp.Writer.SwAccessiblePag bool SwAccessiblePage::IsSelected() { - return GetMap()->IsPageSelected( static_cast < const SwPageFrm * >( GetFrm() ) ); + return GetMap()->IsPageSelected( static_cast < const SwPageFrame * >( GetFrame() ) ); } void SwAccessiblePage::GetStates( @@ -111,18 +111,18 @@ void SwAccessiblePage::_InvalidateFocus() } SwAccessiblePage::SwAccessiblePage( SwAccessibleMap* pInitMap, - const SwFrm* pFrame ) + const SwFrame* pFrame ) : SwAccessibleContext( pInitMap, AccessibleRole::PANEL, pFrame ) , bIsSelected( false ) { OSL_ENSURE( pFrame != nullptr, "need frame" ); OSL_ENSURE( pInitMap != nullptr, "need map" ); - OSL_ENSURE( pFrame->IsPageFrm(), "need page frame" ); + OSL_ENSURE( pFrame->IsPageFrame(), "need page frame" ); SolarMutexGuard aGuard; OUString sPage = OUString::number( - static_cast<const SwPageFrm*>( GetFrm() )->GetPhyPageNum() ); + static_cast<const SwPageFrame*>( GetFrame() )->GetPhyPageNum() ); SetName( GetResource( STR_ACCESS_PAGE_NAME, &sPage ) ); } diff --git a/sw/source/core/access/accpage.hxx b/sw/source/core/access/accpage.hxx index 03e4ac8baede..784bcc161196 100644 --- a/sw/source/core/access/accpage.hxx +++ b/sw/source/core/access/accpage.hxx @@ -23,7 +23,7 @@ #include "acccontext.hxx" /** - * accessibility implementation for the page (SwPageFrm) + * accessibility implementation for the page (SwPageFrame) * The page is _only_ visible in the page preview. For the regular * document view, it doesn't make sense to add this additional element * into the hierarchy. For the page preview, however, the page is the @@ -50,8 +50,8 @@ protected: public: // convenience constructor to avoid typecast; - // may only be called with SwPageFrm argument - SwAccessiblePage( SwAccessibleMap* pInitMap, const SwFrm* pFrame ); + // may only be called with SwPageFrame argument + SwAccessiblePage( SwAccessibleMap* pInitMap, const SwFrame* pFrame ); // XAccessibleContext methods that need to be overridden diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx index fdcf1ab6821f..7fdd058a9d63 100644 --- a/sw/source/core/access/accpara.cxx +++ b/sw/source/core/access/accpara.cxx @@ -121,10 +121,10 @@ const sal_Char sImplementationName[] = "com.sun.star.comp.Writer.SwAccessiblePar const SwTextNode* SwAccessibleParagraph::GetTextNode() const { - const SwFrm* pFrm = GetFrm(); - OSL_ENSURE( pFrm->IsTextFrm(), "The text frame has mutated!" ); + const SwFrame* pFrame = GetFrame(); + OSL_ENSURE( pFrame->IsTextFrame(), "The text frame has mutated!" ); - const SwTextNode* pNode = static_cast<const SwTextFrm*>(pFrm)->GetTextNode(); + const SwTextNode* pNode = static_cast<const SwTextFrame*>(pFrame)->GetTextNode(); OSL_ENSURE( pNode != nullptr, "A text frame without a text node." ); return pNode; @@ -162,8 +162,8 @@ sal_Int32 SwAccessibleParagraph::GetCaretPos() if(!GetPortionData().IsValidCorePosition( nIndex ) || ( GetPortionData().IsZeroCorePositionData() && nIndex== 0) ) { - const SwTextFrm *pTextFrm = dynamic_cast<const SwTextFrm*>( GetFrm() ); - bool bFormat = (pTextFrm && pTextFrm->HasPara()); + const SwTextFrame *pTextFrame = dynamic_cast<const SwTextFrame*>( GetFrame() ); + bool bFormat = (pTextFrame && pTextFrame->HasPara()); if(bFormat) { ClearPortionData(); @@ -204,23 +204,23 @@ bool SwAccessibleParagraph::GetSelection( nEnd = -1; // get the selection, and test whether it affects our text node - SwPaM* pCrsr = GetCursor( true ); // #i27301# - consider adjusted method signature - if( pCrsr != nullptr ) + SwPaM* pCursor = GetCursor( true ); // #i27301# - consider adjusted method signature + if( pCursor != nullptr ) { // get SwPosition for my node const SwTextNode* pNode = GetTextNode(); sal_uLong nHere = pNode->GetIndex(); // iterate over ring - for(SwPaM& rTmpCrsr : pCrsr->GetRingContainer()) + for(SwPaM& rTmpCursor : pCursor->GetRingContainer()) { // ignore, if no mark - if( rTmpCrsr.HasMark() ) + if( rTmpCursor.HasMark() ) { - // check whether nHere is 'inside' pCrsr - SwPosition* pStart = rTmpCrsr.Start(); + // check whether nHere is 'inside' pCursor + SwPosition* pStart = rTmpCursor.Start(); sal_uLong nStartIndex = pStart->nNode.GetIndex(); - SwPosition* pEnd = rTmpCrsr.End(); + SwPosition* pEnd = rTmpCursor.End(); sal_uLong nEndIndex = pEnd->nNode.GetIndex(); if( ( nHere >= nStartIndex ) && ( nHere <= nEndIndex ) ) @@ -324,24 +324,24 @@ SwPaM* SwAccessibleParagraph::GetCursor( const bool _bForSelection ) { // get the cursor shell; if we don't have any, we don't have a // cursor/selection either - SwPaM* pCrsr = nullptr; - SwCrsrShell* pCrsrShell = SwAccessibleParagraph::GetCrsrShell(); + SwPaM* pCursor = nullptr; + SwCursorShell* pCursorShell = SwAccessibleParagraph::GetCursorShell(); // #i27301# - if cursor is retrieved for selection, the cursors for // a table selection has to be returned. - if ( pCrsrShell != nullptr && - ( _bForSelection || !pCrsrShell->IsTableMode() ) ) + if ( pCursorShell != nullptr && + ( _bForSelection || !pCursorShell->IsTableMode() ) ) { - SwFEShell *pFESh = dynamic_cast<const SwFEShell*>( pCrsrShell) != nullptr - ? static_cast< SwFEShell * >( pCrsrShell ) : nullptr; + SwFEShell *pFESh = dynamic_cast<const SwFEShell*>( pCursorShell) != nullptr + ? static_cast< SwFEShell * >( pCursorShell ) : nullptr; if( !pFESh || - !(pFESh->IsFrmSelected() || pFESh->IsObjSelected() > 0) ) + !(pFESh->IsFrameSelected() || pFESh->IsObjSelected() > 0) ) { // get the selection, and test whether it affects our text node - pCrsr = pCrsrShell->GetCrsr( false /* ??? */ ); + pCursor = pCursorShell->GetCursor( false /* ??? */ ); } } - return pCrsr; + return pCursor; } bool SwAccessibleParagraph::IsHeading() const @@ -359,12 +359,12 @@ void SwAccessibleParagraph::GetStates( rStateSet.AddState( AccessibleStateType::MULTI_LINE ); // MULTISELECTABLE - SwCrsrShell *pCrsrSh = GetCrsrShell(); - if( pCrsrSh ) + SwCursorShell *pCursorSh = GetCursorShell(); + if( pCursorSh ) rStateSet.AddState( AccessibleStateType::MULTI_SELECTABLE ); // FOCUSABLE - if( pCrsrSh ) + if( pCursorSh ) rStateSet.AddState( AccessibleStateType::FOCUSABLE ); // FOCUSED (simulates node index of cursor) @@ -532,9 +532,9 @@ void SwAccessibleParagraph::_InvalidateFocus() SwAccessibleParagraph::SwAccessibleParagraph( SwAccessibleMap& rInitMap, - const SwTextFrm& rTextFrm ) - : SwClient( const_cast<SwTextNode*>(rTextFrm.GetTextNode()) ) // #i108125# - , SwAccessibleContext( &rInitMap, AccessibleRole::PARAGRAPH, &rTextFrm ) + const SwTextFrame& rTextFrame ) + : SwClient( const_cast<SwTextNode*>(rTextFrame.GetTextNode()) ) // #i108125# + , SwAccessibleContext( &rInitMap, AccessibleRole::PARAGRAPH, &rTextFrame ) , sDesc() , pPortionData( nullptr ) , pHyperTextData( nullptr ) @@ -543,7 +543,7 @@ SwAccessibleParagraph::SwAccessibleParagraph( //Get the real heading level, Heading1 ~ Heading10 , nHeadingLevel (-1) , aSelectionHelper( *this ) - , mpParaChangeTrackInfo( new SwParaChangeTrackingInfo( rTextFrm ) ) // #i108125# + , mpParaChangeTrackInfo( new SwParaChangeTrackingInfo( rTextFrame ) ) // #i108125# , m_bLastHasSelection(false) //To add TEXT_SELECTION_CHANGED event { SolarMutexGuard aGuard; @@ -578,15 +578,15 @@ void SwAccessibleParagraph::UpdatePortionData() throw( uno::RuntimeException ) { // obtain the text frame - OSL_ENSURE( GetFrm() != nullptr, "The text frame has vanished!" ); - OSL_ENSURE( GetFrm()->IsTextFrm(), "The text frame has mutated!" ); - const SwTextFrm* pFrm = static_cast<const SwTextFrm*>( GetFrm() ); + OSL_ENSURE( GetFrame() != nullptr, "The text frame has vanished!" ); + OSL_ENSURE( GetFrame()->IsTextFrame(), "The text frame has mutated!" ); + const SwTextFrame* pFrame = static_cast<const SwTextFrame*>( GetFrame() ); // build new portion data delete pPortionData; pPortionData = new SwAccessiblePortionData( - pFrm->GetTextNode(), GetMap()->GetShell()->GetViewOptions() ); - pFrm->VisitPortions( *pPortionData ); + pFrame->GetTextNode(), GetMap()->GetShell()->GetViewOptions() ); + pFrame->VisitPortions( *pPortionData ); OSL_ENSURE( pPortionData != nullptr, "UpdatePortionData() failed" ); } @@ -642,7 +642,7 @@ SwXTextPortion* SwAccessibleParagraph::CreateUnoPortion( SwTextNode* pTextNode = const_cast<SwTextNode*>( GetTextNode() ); SwIndex aIndex( pTextNode, nStart ); SwPosition aStartPos( *pTextNode, aIndex ); - auto pUnoCursor(pTextNode->GetDoc()->CreateUnoCrsr( aStartPos )); + auto pUnoCursor(pTextNode->GetDoc()->CreateUnoCursor( aStartPos )); pUnoCursor->SetMark(); pUnoCursor->GetMark()->nContent = nEnd; @@ -947,13 +947,13 @@ lang::Locale SAL_CALL SwAccessibleParagraph::getLocale() { SolarMutexGuard aGuard; - const SwTextFrm *pTextFrm = dynamic_cast<const SwTextFrm*>( GetFrm() ); - if( !pTextFrm ) + const SwTextFrame *pTextFrame = dynamic_cast<const SwTextFrame*>( GetFrame() ); + if( !pTextFrame ) { THROW_RUNTIME_EXCEPTION( XAccessibleContext, "internal error (no text frame)" ); } - const SwTextNode *pTextNd = pTextFrm->GetTextNode(); + const SwTextNode *pTextNd = pTextFrame->GetTextNode(); lang::Locale aLoc( g_pBreakIt->GetLocale( pTextNd->GetLang( 0 ) ) ); return aLoc; @@ -968,24 +968,24 @@ uno::Reference<XAccessibleRelationSet> SAL_CALL SwAccessibleParagraph::getAccess utl::AccessibleRelationSetHelper* pHelper = new utl::AccessibleRelationSetHelper(); - const SwTextFrm* pTextFrm = dynamic_cast<const SwTextFrm*>(GetFrm()); - OSL_ENSURE( pTextFrm, + const SwTextFrame* pTextFrame = dynamic_cast<const SwTextFrame*>(GetFrame()); + OSL_ENSURE( pTextFrame, "<SwAccessibleParagraph::getAccessibleRelationSet()> - missing text frame"); - if ( pTextFrm ) + if ( pTextFrame ) { - const SwContentFrm* pPrevCntFrm( pTextFrm->FindPrevCnt( true ) ); - if ( pPrevCntFrm ) + const SwContentFrame* pPrevContentFrame( pTextFrame->FindPrevCnt( true ) ); + if ( pPrevContentFrame ) { - uno::Sequence< uno::Reference<XInterface> > aSequence { GetMap()->GetContext( pPrevCntFrm ) }; + uno::Sequence< uno::Reference<XInterface> > aSequence { GetMap()->GetContext( pPrevContentFrame ) }; AccessibleRelation aAccRel( AccessibleRelationType::CONTENT_FLOWS_FROM, aSequence ); pHelper->AddRelation( aAccRel ); } - const SwContentFrm* pNextCntFrm( pTextFrm->FindNextCnt( true ) ); - if ( pNextCntFrm ) + const SwContentFrame* pNextContentFrame( pTextFrame->FindNextCnt( true ) ); + if ( pNextContentFrame ) { - uno::Sequence< uno::Reference<XInterface> > aSequence { GetMap()->GetContext( pNextCntFrm ) }; + uno::Sequence< uno::Reference<XInterface> > aSequence { GetMap()->GetContext( pNextContentFrame ) }; AccessibleRelation aAccRel( AccessibleRelationType::CONTENT_FLOWS_TO, aSequence ); pHelper->AddRelation( aAccRel ); @@ -1003,19 +1003,19 @@ void SAL_CALL SwAccessibleParagraph::grabFocus() CHECK_FOR_DEFUNC( XAccessibleContext ); // get cursor shell - SwCrsrShell *pCrsrSh = GetCrsrShell(); - SwPaM *pCrsr = GetCursor( false ); // #i27301# - consider new method signature - const SwTextFrm *pTextFrm = static_cast<const SwTextFrm*>( GetFrm() ); - const SwTextNode* pTextNd = pTextFrm->GetTextNode(); + SwCursorShell *pCursorSh = GetCursorShell(); + SwPaM *pCursor = GetCursor( false ); // #i27301# - consider new method signature + const SwTextFrame *pTextFrame = static_cast<const SwTextFrame*>( GetFrame() ); + const SwTextNode* pTextNd = pTextFrame->GetTextNode(); - if( pCrsrSh != nullptr && pTextNd != nullptr && - ( pCrsr == nullptr || - pCrsr->GetPoint()->nNode.GetIndex() != pTextNd->GetIndex() || - !pTextFrm->IsInside( pCrsr->GetPoint()->nContent.GetIndex()) ) ) + if( pCursorSh != nullptr && pTextNd != nullptr && + ( pCursor == nullptr || + pCursor->GetPoint()->nNode.GetIndex() != pTextNd->GetIndex() || + !pTextFrame->IsInside( pCursor->GetPoint()->nContent.GetIndex()) ) ) { // create pam for selection SwIndex aIndex( const_cast< SwTextNode * >( pTextNd ), - pTextFrm->GetOfst() ); + pTextFrame->GetOfst() ); SwPosition aStartPos( *pTextNd, aIndex ); SwPaM aPaM( aStartPos ); @@ -1034,8 +1034,8 @@ void SAL_CALL SwAccessibleParagraph::grabFocus() // #i71385# static bool lcl_GetBackgroundColor( Color & rColor, - const SwFrm* pFrm, - SwCrsrShell* pCrsrSh ) + const SwFrame* pFrame, + SwCursorShell* pCursorSh ) { const SvxBrushItem* pBackgrdBrush = nullptr; const Color* pSectionTOXColor = nullptr; @@ -1044,8 +1044,8 @@ static bool lcl_GetBackgroundColor( Color & rColor, //UUUU drawinglayer::attribute::SdrAllFillAttributesHelperPtr aFillAttributes; - if ( pFrm && - pFrm->GetBackgroundBrush( aFillAttributes, pBackgrdBrush, pSectionTOXColor, aDummyRect, false ) ) + if ( pFrame && + pFrame->GetBackgroundBrush( aFillAttributes, pBackgrdBrush, pSectionTOXColor, aDummyRect, false ) ) { if ( pSectionTOXColor ) { @@ -1058,9 +1058,9 @@ static bool lcl_GetBackgroundColor( Color & rColor, return true; } } - else if ( pCrsrSh ) + else if ( pCursorSh ) { - rColor = pCrsrSh->Imp()->GetRetoucheColor(); + rColor = pCursorSh->Imp()->GetRetoucheColor(); return true; } @@ -1072,7 +1072,7 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getForeground() { Color aBackgroundCol; - if ( lcl_GetBackgroundColor( aBackgroundCol, GetFrm(), GetCrsrShell() ) ) + if ( lcl_GetBackgroundColor( aBackgroundCol, GetFrame(), GetCursorShell() ) ) { if ( aBackgroundCol.IsDark() ) { @@ -1092,7 +1092,7 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getBackground() { Color aBackgroundCol; - if ( lcl_GetBackgroundColor( aBackgroundCol, GetFrm(), GetCrsrShell() ) ) + if ( lcl_GetBackgroundColor( aBackgroundCol, GetFrame(), GetCursorShell() ) ) { return aBackgroundCol.GetColor(); } @@ -1317,8 +1317,8 @@ sal_Bool SAL_CALL SwAccessibleParagraph::setCaretPosition( sal_Int32 nIndex ) bool bRet = false; // get cursor shell - SwCrsrShell* pCrsrShell = GetCrsrShell(); - if( pCrsrShell != nullptr ) + SwCursorShell* pCursorShell = GetCursorShell(); + if( pCursorShell != nullptr ) { // create pam for selection SwTextNode* pNode = const_cast<SwTextNode*>( GetTextNode() ); @@ -1369,7 +1369,7 @@ css::uno::Sequence< css::style::TabStop > SwAccessibleParagraph::GetCurrentTabSt bBehindText = true; // get model position & prepare GetCharRect() arguments - SwCrsrMoveState aMoveState; + SwCursorMoveState aMoveState; aMoveState.m_bRealHeight = true; aMoveState.m_bRealWidth = true; SwSpecialPos aSpecialPos; @@ -1388,15 +1388,15 @@ css::uno::Sequence< css::style::TabStop > SwAccessibleParagraph::GetCurrentTabSt SwRect aCoreRect; SwIndex aIndex( pNode, nPos ); SwPosition aPosition( *pNode, aIndex ); - GetFrm()->GetCharRect( aCoreRect, aPosition, &aMoveState ); + GetFrame()->GetCharRect( aCoreRect, aPosition, &aMoveState ); // already get the caret position css::uno::Sequence< css::style::TabStop > tabs; const sal_Int32 nStrLen = GetTextNode()->GetText().getLength(); if( nStrLen > 0 ) { - SwFrm* pTFrm = const_cast<SwFrm*>(GetFrm()); - tabs = pTFrm->GetTabStopInfo(aCoreRect.Left()); + SwFrame* pTFrame = const_cast<SwFrame*>(GetFrame()); + tabs = pTFrame->GetTabStopInfo(aCoreRect.Left()); } if( tabs.hasElements() ) @@ -1408,10 +1408,10 @@ css::uno::Sequence< css::style::TabStop > SwAccessibleParagraph::GetCurrentTabSt SwRect aTmpRect(0, 0, tabs[0].Position, 0); Rectangle aScreenRect( GetMap()->CoreToPixel( aTmpRect.SVRect() )); - SwRect aFrmLogBounds( GetBounds( *(GetMap()) ) ); // twip rel to doc root + SwRect aFrameLogBounds( GetBounds( *(GetMap()) ) ); // twip rel to doc root - Point aFrmPixPos( GetMap()->CoreToPixel( aFrmLogBounds.SVRect() ).TopLeft() ); - aScreenRect.Move( -aFrmPixPos.X(), -aFrmPixPos.Y() ); + Point aFramePixPos( GetMap()->CoreToPixel( aFrameLogBounds.SVRect() ).TopLeft() ); + aScreenRect.Move( -aFramePixPos.X(), -aFramePixPos.Y() ); tabs[0].Position = aScreenRect.GetWidth(); } @@ -1820,7 +1820,7 @@ void SwAccessibleParagraph::_getDefaultAttributesImpl( // #i73371# // resolve value text::WritingMode2::PAGE of property value entry WritingMode - if ( !bOnlyCharAttrs && GetFrm() ) + if ( !bOnlyCharAttrs && GetFrame() ) { tAccParaPropValMap::iterator aIter = aDefAttrSeq.find( UNO_NAME_WRITING_MODE ); if ( aIter != aDefAttrSeq.end() ) @@ -1829,17 +1829,17 @@ void SwAccessibleParagraph::_getDefaultAttributesImpl( sal_Int16 nVal = rPropVal.Value.get<sal_Int16>(); if ( nVal == text::WritingMode2::PAGE ) { - const SwFrm* pUpperFrm( GetFrm()->GetUpper() ); - while ( pUpperFrm ) + const SwFrame* pUpperFrame( GetFrame()->GetUpper() ); + while ( pUpperFrame ) { - if ( pUpperFrm->GetType() & + if ( pUpperFrame->GetType() & ( FRM_PAGE | FRM_FLY | FRM_SECTION | FRM_TAB | FRM_CELL ) ) { - if ( pUpperFrm->IsVertical() ) + if ( pUpperFrame->IsVertical() ) { nVal = text::WritingMode2::TB_RL; } - else if ( pUpperFrm->IsRightToLeft() ) + else if ( pUpperFrame->IsRightToLeft() ) { nVal = text::WritingMode2::RL_TB; } @@ -1852,13 +1852,13 @@ void SwAccessibleParagraph::_getDefaultAttributesImpl( break; } - if ( const SwFlyFrm* pFlyFrm = dynamic_cast<const SwFlyFrm*>(pUpperFrm) ) + if ( const SwFlyFrame* pFlyFrame = dynamic_cast<const SwFlyFrame*>(pUpperFrame) ) { - pUpperFrm = pFlyFrm->GetAnchorFrm(); + pUpperFrame = pFlyFrame->GetAnchorFrame(); } else { - pUpperFrm = pUpperFrm->GetUpper(); + pUpperFrame = pUpperFrame->GetUpper(); } } } @@ -1969,7 +1969,7 @@ void SwAccessibleParagraph::_getRunAttributesImpl( // From the perspective of the a11y API the character attributes, which // are set at the automatic paragraph style of the paragraph, are treated // as run attributes. - // SwXTextCursor::GetCrsrAttr( *pPaM, aSet, sal_True, sal_True ); + // SwXTextCursor::GetCursorAttr( *pPaM, aSet, sal_True, sal_True ); // get character attributes from automatic paragraph style and merge these into <aSet> { const SwTextNode* pTextNode( GetTextNode() ); @@ -1987,7 +1987,7 @@ void SwAccessibleParagraph::_getRunAttributesImpl( SfxItemSet aCharAttrsAtPaM( pPaM->GetDoc()->GetAttrPool(), RES_CHRATR_BEGIN, RES_CHRATR_END -1, 0 ); - SwUnoCursorHelper::GetCrsrAttr(*pPaM, aCharAttrsAtPaM, true); + SwUnoCursorHelper::GetCursorAttr(*pPaM, aCharAttrsAtPaM, true); aSet.Put( aCharAttrsAtPaM ); } @@ -2269,8 +2269,8 @@ void SwAccessibleParagraph::_correctValues( const sal_Int32 nIndex, if (rValue.Name == UNO_NAME_CHAR_UNDERLINE) { //misspelled word - SwCrsrShell* pCrsrShell = GetCrsrShell(); - if( pCrsrShell != nullptr && pCrsrShell->GetViewOptions() && pCrsrShell->GetViewOptions()->IsOnlineSpell()) + SwCursorShell* pCursorShell = GetCursorShell(); + if( pCursorShell != nullptr && pCursorShell->GetViewOptions() && pCursorShell->GetViewOptions()->IsOnlineSpell()) { const SwWrongList* pWrongList = pTextNode->GetWrong(); if( nullptr != pWrongList ) @@ -2290,8 +2290,8 @@ void SwAccessibleParagraph::_correctValues( const sal_Int32 nIndex, if (rValue.Name == UNO_NAME_CHAR_UNDERLINE_COLOR) { //misspelled word - SwCrsrShell* pCrsrShell = GetCrsrShell(); - if( pCrsrShell != nullptr && pCrsrShell->GetViewOptions() && pCrsrShell->GetViewOptions()->IsOnlineSpell()) + SwCursorShell* pCursorShell = GetCursorShell(); + if( pCursorShell != nullptr && pCursorShell->GetViewOptions() && pCursorShell->GetViewOptions()->IsOnlineSpell()) { const SwWrongList* pWrongList = pTextNode->GetWrong(); if( nullptr != pWrongList ) @@ -2376,7 +2376,7 @@ awt::Rectangle SwAccessibleParagraph::getCharacterBounds( bBehindText = true; // get model position & prepare GetCharRect() arguments - SwCrsrMoveState aMoveState; + SwCursorMoveState aMoveState; aMoveState.m_bRealHeight = true; aMoveState.m_bRealWidth = true; SwSpecialPos aSpecialPos; @@ -2395,17 +2395,17 @@ awt::Rectangle SwAccessibleParagraph::getCharacterBounds( SwRect aCoreRect; SwIndex aIndex( pNode, nPos ); SwPosition aPosition( *pNode, aIndex ); - GetFrm()->GetCharRect( aCoreRect, aPosition, &aMoveState ); + GetFrame()->GetCharRect( aCoreRect, aPosition, &aMoveState ); // translate core coordinates into accessibility coordinates vcl::Window *pWin = GetWindow(); CHECK_FOR_WINDOW( XAccessibleComponent, pWin ); Rectangle aScreenRect( GetMap()->CoreToPixel( aCoreRect.SVRect() )); - SwRect aFrmLogBounds( GetBounds( *(GetMap()) ) ); // twip rel to doc root + SwRect aFrameLogBounds( GetBounds( *(GetMap()) ) ); // twip rel to doc root - Point aFrmPixPos( GetMap()->CoreToPixel( aFrmLogBounds.SVRect() ).TopLeft() ); - aScreenRect.Move( -aFrmPixPos.getX(), -aFrmPixPos.getY() ); + Point aFramePixPos( GetMap()->CoreToPixel( aFrameLogBounds.SVRect() ).TopLeft() ); + aScreenRect.Move( -aFramePixPos.getX(), -aFramePixPos.getY() ); // convert into AWT Rectangle return awt::Rectangle( @@ -2430,7 +2430,7 @@ sal_Int32 SwAccessibleParagraph::getIndexAtPoint( const awt::Point& rPoint ) CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this ); - // construct SwPosition (where GetCrsrOfst() will put the result into) + // construct SwPosition (where GetCursorOfst() will put the result into) SwTextNode* pNode = const_cast<SwTextNode*>( GetTextNode() ); SwIndex aIndex( pNode, 0); SwPosition aPos( *pNode, aIndex ); @@ -2439,7 +2439,7 @@ sal_Int32 SwAccessibleParagraph::getIndexAtPoint( const awt::Point& rPoint ) vcl::Window *pWin = GetWindow(); CHECK_FOR_WINDOW( XAccessibleComponent, pWin ); Point aPoint( rPoint.X, rPoint.Y ); - SwRect aLogBounds( GetBounds( *(GetMap()), GetFrm() ) ); // twip rel to doc root + SwRect aLogBounds( GetBounds( *(GetMap()), GetFrame() ) ); // twip rel to doc root Point aPixPos( GetMap()->CoreToPixel( aLogBounds.SVRect() ).TopLeft() ); aPoint.setX(aPoint.getX() + aPixPos.getX()); aPoint.setY(aPoint.getY() + aPixPos.getY()); @@ -2463,21 +2463,21 @@ sal_Int32 SwAccessibleParagraph::getIndexAtPoint( const awt::Point& rPoint ) } // ask core for position - OSL_ENSURE( GetFrm() != nullptr, "The text frame has vanished!" ); - OSL_ENSURE( GetFrm()->IsTextFrm(), "The text frame has mutated!" ); - const SwTextFrm* pFrm = static_cast<const SwTextFrm*>( GetFrm() ); - SwCrsrMoveState aMoveState; + OSL_ENSURE( GetFrame() != nullptr, "The text frame has vanished!" ); + OSL_ENSURE( GetFrame()->IsTextFrame(), "The text frame has mutated!" ); + const SwTextFrame* pFrame = static_cast<const SwTextFrame*>( GetFrame() ); + SwCursorMoveState aMoveState; aMoveState.m_bPosMatchesBounds = true; - const bool bSuccess = pFrm->GetCrsrOfst( &aPos, aCorePoint, &aMoveState ); + const bool bSuccess = pFrame->GetCursorOfst( &aPos, aCorePoint, &aMoveState ); SwIndex aContentIdx = aPos.nContent; const sal_Int32 nIndex = aContentIdx.GetIndex(); if ( nIndex > 0 ) { SwRect aResultRect; - pFrm->GetCharRect( aResultRect, aPos ); - bool bVert = pFrm->IsVertical(); - bool bR2L = pFrm->IsRightToLeft(); + pFrame->GetCharRect( aResultRect, aPos ); + bool bVert = pFrame->IsVertical(); + bool bR2L = pFrame->IsRightToLeft(); if ( (!bVert && aResultRect.Pos().getX() > aCorePoint.getX()) || ( bVert && aResultRect.Pos().getY() > aCorePoint.getY()) || @@ -2486,7 +2486,7 @@ sal_Int32 SwAccessibleParagraph::getIndexAtPoint( const awt::Point& rPoint ) SwIndex aIdxPrev( pNode, nIndex - 1); SwPosition aPosPrev( *pNode, aIdxPrev ); SwRect aResultRectPrev; - pFrm->GetCharRect( aResultRectPrev, aPosPrev ); + pFrame->GetCharRect( aResultRectPrev, aPosPrev ); if ( (!bVert && aResultRectPrev.Pos().getX() < aCorePoint.getX() && aResultRect.Pos().getY() == aResultRectPrev.Pos().getY()) || ( bVert && aResultRectPrev.Pos().getY() < aCorePoint.getY() && aResultRect.Pos().getX() == aResultRectPrev.Pos().getX()) || ( bR2L && aResultRectPrev.Right() > aCorePoint.getX() && aResultRect.Pos().getY() == aResultRectPrev.Pos().getY()) ) @@ -2554,8 +2554,8 @@ sal_Bool SwAccessibleParagraph::setSelection( sal_Int32 nStartIndex, sal_Int32 n bool bRet = false; // get cursor shell - SwCrsrShell* pCrsrShell = GetCrsrShell(); - if( pCrsrShell != nullptr ) + SwCursorShell* pCursorShell = GetCursorShell(); + if( pCursorShell != nullptr ) { // create pam for selection SwTextNode* pNode = const_cast<SwTextNode*>( GetTextNode() ); @@ -3053,7 +3053,7 @@ class SwHyperlinkIter_Impl size_t nPos; public: - explicit SwHyperlinkIter_Impl( const SwTextFrm *pTextFrm ); + explicit SwHyperlinkIter_Impl( const SwTextFrame *pTextFrame ); const SwTextAttr *next(); size_t getCurrHintPos() const { return nPos-1; } @@ -3061,13 +3061,13 @@ public: sal_Int32 endIdx() const { return nEnd; } }; -SwHyperlinkIter_Impl::SwHyperlinkIter_Impl( const SwTextFrm *pTextFrm ) : - pHints( pTextFrm->GetTextNode()->GetpSwpHints() ), - nStt( pTextFrm->GetOfst() ), +SwHyperlinkIter_Impl::SwHyperlinkIter_Impl( const SwTextFrame *pTextFrame ) : + pHints( pTextFrame->GetTextNode()->GetpSwpHints() ), + nStt( pTextFrame->GetOfst() ), nPos( 0 ) { - const SwTextFrm *pFollFrm = pTextFrm->GetFollow(); - nEnd = pFollFrm ? pFollFrm->GetOfst() : pTextFrm->GetTextNode()->Len(); + const SwTextFrame *pFollFrame = pTextFrame->GetFollow(); + nEnd = pFollFrame ? pFollFrame->GetOfst() : pTextFrame->GetTextNode()->Len(); } const SwTextAttr *SwHyperlinkIter_Impl::next() @@ -3106,8 +3106,8 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getHyperLinkCount() sal_Int32 nCount = 0; // #i77108# - provide hyperlinks also in editable documents. - const SwTextFrm *pTextFrm = static_cast<const SwTextFrm*>( GetFrm() ); - SwHyperlinkIter_Impl aIter( pTextFrm ); + const SwTextFrame *pTextFrame = static_cast<const SwTextFrame*>( GetFrame() ); + SwHyperlinkIter_Impl aIter( pTextFrame ); while( aIter.next() ) nCount++; @@ -3123,8 +3123,8 @@ uno::Reference< XAccessibleHyperlink > SAL_CALL uno::Reference< XAccessibleHyperlink > xRet; - const SwTextFrm *pTextFrm = static_cast<const SwTextFrm*>( GetFrm() ); - SwHyperlinkIter_Impl aHIter( pTextFrm ); + const SwTextFrame *pTextFrame = static_cast<const SwTextFrame*>( GetFrame() ); + SwHyperlinkIter_Impl aHIter( pTextFrame ); sal_Int32 nTIndex = -1; SwTOXSortTabBase* pTBase = GetTOXSortTabBase(); SwTextAttr* pHt = const_cast<SwTextAttr*>(aHIter.next()); @@ -3220,8 +3220,8 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getHyperLinkIndex( sal_Int32 nCharInde sal_Int32 nRet = -1; // #i77108# { - const SwTextFrm *pTextFrm = static_cast<const SwTextFrm*>( GetFrm() ); - SwHyperlinkIter_Impl aHIter( pTextFrm ); + const SwTextFrame *pTextFrame = static_cast<const SwTextFrame*>( GetFrame() ); + SwHyperlinkIter_Impl aHIter( pTextFrame ); const sal_Int32 nIdx = GetPortionData().GetModelPosition( nCharIndex ); sal_Int32 nPos = 0; @@ -3283,23 +3283,23 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getSelectedPortionCount( ) SolarMutexGuard g; sal_Int32 nSeleted = 0; - SwPaM* pCrsr = GetCursor( true ); - if( pCrsr != nullptr ) + SwPaM* pCursor = GetCursor( true ); + if( pCursor != nullptr ) { // get SwPosition for my node const SwTextNode* pNode = GetTextNode(); sal_uLong nHere = pNode->GetIndex(); // iterate over ring - for(SwPaM& rTmpCrsr : pCrsr->GetRingContainer()) + for(SwPaM& rTmpCursor : pCursor->GetRingContainer()) { // ignore, if no mark - if( rTmpCrsr.HasMark() ) + if( rTmpCursor.HasMark() ) { - // check whether nHere is 'inside' pCrsr - SwPosition* pStart = rTmpCrsr.Start(); + // check whether nHere is 'inside' pCursor + SwPosition* pStart = rTmpCursor.Start(); sal_uLong nStartIndex = pStart->nNode.GetIndex(); - SwPosition* pEnd = rTmpCrsr.End(); + SwPosition* pEnd = rTmpCursor.End(); sal_uLong nEndIndex = pEnd->nNode.GetIndex(); if( ( nHere >= nStartIndex ) && ( nHere <= nEndIndex ) ) @@ -3355,9 +3355,9 @@ sal_Bool SAL_CALL SwAccessibleParagraph::removeSelection( sal_Int32 selectionInd sal_Int32 nSelected = selectionIndex; // get the selection, and test whether it affects our text node - SwPaM* pCrsr = GetCursor( true ); + SwPaM* pCursor = GetCursor( true ); - if( pCrsr != nullptr ) + if( pCursor != nullptr ) { bool bRet = false; @@ -3366,24 +3366,24 @@ sal_Bool SAL_CALL SwAccessibleParagraph::removeSelection( sal_Int32 selectionInd sal_uLong nHere = pNode->GetIndex(); // iterate over ring - SwPaM* pRingStart = pCrsr; + SwPaM* pRingStart = pCursor; do { // ignore, if no mark - if( pCrsr->HasMark() ) + if( pCursor->HasMark() ) { - // check whether nHere is 'inside' pCrsr - SwPosition* pStart = pCrsr->Start(); + // check whether nHere is 'inside' pCursor + SwPosition* pStart = pCursor->Start(); sal_uLong nStartIndex = pStart->nNode.GetIndex(); - SwPosition* pEnd = pCrsr->End(); + SwPosition* pEnd = pCursor->End(); sal_uLong nEndIndex = pEnd->nNode.GetIndex(); if( ( nHere >= nStartIndex ) && ( nHere <= nEndIndex ) ) { if( nSelected == 0 ) { - pCrsr->MoveTo(nullptr); - delete pCrsr; + pCursor->MoveTo(nullptr); + delete pCursor; bRet = true; } else @@ -3394,9 +3394,9 @@ sal_Bool SAL_CALL SwAccessibleParagraph::removeSelection( sal_Int32 selectionInd } // else: this PaM is collapsed and doesn't select anything if(!bRet) - pCrsr = pCrsr->GetNext(); + pCursor = pCursor->GetNext(); } - while( !bRet && (pCrsr != pRingStart) ); + while( !bRet && (pCursor != pRingStart) ); } return sal_True; } @@ -3451,16 +3451,16 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::addSelection( sal_Int32, sal_Int32 sta } // get cursor shell - SwCrsrShell* pCrsrShell = GetCrsrShell(); - if( pCrsrShell != nullptr ) + SwCursorShell* pCursorShell = GetCursorShell(); + if( pCursorShell != nullptr ) { // create pam for selection - pCrsrShell->StartAction(); - SwPaM* aPaM = pCrsrShell->CreateCrsr(); + pCursorShell->StartAction(); + SwPaM* aPaM = pCursorShell->CreateCursor(); aPaM->SetMark(); aPaM->GetPoint()->nContent = GetPortionData().GetModelPosition(startOffset); aPaM->GetMark()->nContent = GetPortionData().GetModelPosition(endOffset); - pCrsrShell->EndAction(); + pCursorShell->EndAction(); } return 0; @@ -3603,21 +3603,21 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getNumberOfLineWithCaret() GetPortionData().GetBoundaryOfLine( nLineNo, aLineBound ); if ( nCaretPos == aLineBound.startPos ) { - SwCrsrShell* pCrsrShell = SwAccessibleParagraph::GetCrsrShell(); - if ( pCrsrShell != nullptr ) + SwCursorShell* pCursorShell = SwAccessibleParagraph::GetCursorShell(); + if ( pCursorShell != nullptr ) { const awt::Rectangle aCharRect = getCharacterBounds( nCaretPos ); - const SwRect& aCursorCoreRect = pCrsrShell->GetCharRect(); + const SwRect& aCursorCoreRect = pCursorShell->GetCharRect(); // translate core coordinates into accessibility coordinates vcl::Window *pWin = GetWindow(); CHECK_FOR_WINDOW( XAccessibleComponent, pWin ); Rectangle aScreenRect( GetMap()->CoreToPixel( aCursorCoreRect.SVRect() )); - SwRect aFrmLogBounds( GetBounds( *(GetMap()) ) ); // twip rel to doc root - Point aFrmPixPos( GetMap()->CoreToPixel( aFrmLogBounds.SVRect() ).TopLeft() ); - aScreenRect.Move( -aFrmPixPos.getX(), -aFrmPixPos.getY() ); + SwRect aFrameLogBounds( GetBounds( *(GetMap()) ) ); // twip rel to doc root + Point aFramePixPos( GetMap()->CoreToPixel( aFrameLogBounds.SVRect() ).TopLeft() ); + aScreenRect.Move( -aFramePixPos.getX(), -aFramePixPos.getY() ); // convert into AWT Rectangle const awt::Rectangle aCursorRect( aScreenRect.Left(), @@ -3656,23 +3656,23 @@ bool SwAccessibleParagraph::GetSelectionAtIndex( sal_Int32 nSelected = nIndex; // get the selection, and test whether it affects our text node - SwPaM* pCrsr = GetCursor( true ); - if( pCrsr != nullptr ) + SwPaM* pCursor = GetCursor( true ); + if( pCursor != nullptr ) { // get SwPosition for my node const SwTextNode* pNode = GetTextNode(); sal_uLong nHere = pNode->GetIndex(); // iterate over ring - for(SwPaM& rTmpCrsr : pCrsr->GetRingContainer()) + for(SwPaM& rTmpCursor : pCursor->GetRingContainer()) { // ignore, if no mark - if( rTmpCrsr.HasMark() ) + if( rTmpCursor.HasMark() ) { - // check whether nHere is 'inside' pCrsr - SwPosition* pStart = rTmpCrsr.Start(); + // check whether nHere is 'inside' pCursor + SwPosition* pStart = rTmpCursor.Start(); sal_uLong nStartIndex = pStart->nNode.GetIndex(); - SwPosition* pEnd = rTmpCrsr.End(); + SwPosition* pEnd = rTmpCursor.End(); sal_uLong nEndIndex = pEnd->nNode.GetIndex(); if( ( nHere >= nStartIndex ) && ( nHere <= nEndIndex ) ) diff --git a/sw/source/core/access/accpara.hxx b/sw/source/core/access/accpara.hxx index 2433e03ad6a1..60444bf3a234 100644 --- a/sw/source/core/access/accpara.hxx +++ b/sw/source/core/access/accpara.hxx @@ -34,7 +34,7 @@ #include <unordered_map> class SwField; -class SwTextFrm; +class SwTextFrame; class SwTextNode; class SwPaM; class SwAccessiblePortionData; @@ -238,7 +238,7 @@ protected: public: SwAccessibleParagraph( SwAccessibleMap& rInitMap, - const SwTextFrm& rTextFrm ); + const SwTextFrame& rTextFrame ); inline operator css::accessibility::XAccessibleText *(); diff --git a/sw/source/core/access/accportions.hxx b/sw/source/core/access/accportions.hxx index 5f631e14170e..18e857ed9d23 100644 --- a/sw/source/core/access/accportions.hxx +++ b/sw/source/core/access/accportions.hxx @@ -146,7 +146,7 @@ public: sal_Int32 GetModelPosition( sal_Int32 nPos ) const; /// fill a SwSpecialPos structure, suitable for calling - /// SwTextFrm->GetCharRect + /// SwTextFrame->GetCharRect /// Returns the core position, and fills rpPos either with NULL or /// with the &rPos, after putting the appropriate data into it. sal_Int32 FillSpecialPos( sal_Int32 nPos, diff --git a/sw/source/core/access/accselectionhelper.cxx b/sw/source/core/access/accselectionhelper.cxx index 07f17d27fc64..dd674de28d30 100644 --- a/sw/source/core/access/accselectionhelper.cxx +++ b/sw/source/core/access/accselectionhelper.cxx @@ -84,7 +84,7 @@ void SwAccessibleSelectionHelper::selectAccessibleChild( { SolarMutexGuard aGuard; - // Get the respective child as SwFrm (also do index checking), ... + // Get the respective child as SwFrame (also do index checking), ... const SwAccessibleChild aChild = m_rContext.GetChild( *(m_rContext.GetMap()), nChildIndex ); if( !aChild.IsValid() ) @@ -97,20 +97,20 @@ void SwAccessibleSelectionHelper::selectAccessibleChild( { const SdrObject *pObj = aChild.GetDrawObject(); if( pObj ) - m_rContext.Select( const_cast< SdrObject *>( pObj ), nullptr==aChild.GetSwFrm()); + m_rContext.Select( const_cast< SdrObject *>( pObj ), nullptr==aChild.GetSwFrame()); } // no frame shell, or no frame, or no fly frame -> can't select } -//When the selected state of the SwFrmOrObj is setted, return true. +//When the selected state of the SwFrameOrObj is setted, return true. static bool lcl_getSelectedState(const SwAccessibleChild& aChild, SwAccessibleContext* pContext, SwAccessibleMap* pMap) { Reference< XAccessible > xAcc; - if ( aChild.GetSwFrm() ) + if ( aChild.GetSwFrame() ) { - xAcc = pMap->GetContext( aChild.GetSwFrm(), false ); + xAcc = pMap->GetContext( aChild.GetSwFrame(), false ); } else if ( aChild.GetDrawObject() ) { @@ -144,7 +144,7 @@ bool SwAccessibleSelectionHelper::isAccessibleChildSelected( { SolarMutexGuard aGuard; - // Get the respective child as SwFrm (also do index checking), ... + // Get the respective child as SwFrame (also do index checking), ... const SwAccessibleChild aChild = m_rContext.GetChild( *(m_rContext.GetMap()), nChildIndex ); if( !aChild.IsValid() ) @@ -155,15 +155,15 @@ bool SwAccessibleSelectionHelper::isAccessibleChildSelected( const SwFEShell* pFEShell = GetFEShell(); if( pFEShell ) { - if ( aChild.GetSwFrm() != nullptr ) + if ( aChild.GetSwFrame() != nullptr ) { - bRet = (pFEShell->GetSelectedFlyFrm() == aChild.GetSwFrm()); + bRet = (pFEShell->GetSelectedFlyFrame() == aChild.GetSwFrame()); } else if ( aChild.GetDrawObject() ) { bRet = pFEShell->IsObjSelected( *aChild.GetDrawObject() ); } - //If the SwFrmOrObj is not selected directly in the UI, we should check whether it is selected in the selection cursor. + //If the SwFrameOrObj is not selected directly in the UI, we should check whether it is selected in the selection cursor. if( !bRet ) { if( lcl_getSelectedState( aChild, &m_rContext, m_rContext.GetMap() ) ) @@ -194,11 +194,11 @@ void SwAccessibleSelectionHelper::selectAllAccessibleChildren( ) { const SwAccessibleChild& rChild = *aIter; const SdrObject* pObj = rChild.GetDrawObject(); - const SwFrm* pFrm = rChild.GetSwFrm(); - if( pObj && !(pFrm != nullptr && pFEShell->IsObjSelected()) ) + const SwFrame* pFrame = rChild.GetSwFrame(); + if( pObj && !(pFrame != nullptr && pFEShell->IsObjSelected()) ) { - m_rContext.Select( const_cast< SdrObject *>( pObj ), nullptr==pFrm ); - if( pFrm ) + m_rContext.Select( const_cast< SdrObject *>( pObj ), nullptr==pFrame ); + if( pFrame ) break; } ++aIter; @@ -217,8 +217,8 @@ sal_Int32 SwAccessibleSelectionHelper::getSelectedAccessibleChildCount( ) const SwFEShell* pFEShell = GetFEShell(); if( pFEShell != nullptr ) { - const SwFlyFrm* pFlyFrm = pFEShell->GetSelectedFlyFrm(); - if( pFlyFrm ) + const SwFlyFrame* pFlyFrame = pFEShell->GetSelectedFlyFrame(); + if( pFlyFrame ) { nCount = 1; } @@ -237,9 +237,9 @@ sal_Int32 SwAccessibleSelectionHelper::getSelectedAccessibleChildCount( ) while( aIter != aEndIter && static_cast<size_t>(nCount) < nSelObjs ) { const SwAccessibleChild& rChild = *aIter; - if( rChild.GetDrawObject() && !rChild.GetSwFrm() && + if( rChild.GetDrawObject() && !rChild.GetSwFrame() && SwAccessibleFrame::GetParent(rChild, m_rContext.IsInPagePreview()) - == m_rContext.GetFrm() && + == m_rContext.GetFrame() && pFEShell->IsObjSelected( *rChild.GetDrawObject() ) ) { nCount++; @@ -248,7 +248,7 @@ sal_Int32 SwAccessibleSelectionHelper::getSelectedAccessibleChildCount( ) } } } - //If the SwFrmOrObj is not selected directly in the UI, + //If the SwFrameOrObj is not selected directly in the UI, //we should check whether it is selected in the selection cursor. if( nCount == 0 ) { @@ -286,25 +286,25 @@ Reference<XAccessible> SwAccessibleSelectionHelper::getSelectedAccessibleChild( throwIndexOutOfBoundsException(); SwAccessibleChild aChild; - const SwFlyFrm *pFlyFrm = pFEShell->GetSelectedFlyFrm(); - if( pFlyFrm ) + const SwFlyFrame *pFlyFrame = pFEShell->GetSelectedFlyFrame(); + if( pFlyFrame ) { if( 0 == nSelectedChildIndex ) { - if(SwAccessibleFrame::GetParent( SwAccessibleChild(pFlyFrm), m_rContext.IsInPagePreview()) == m_rContext.GetFrm() ) + if(SwAccessibleFrame::GetParent( SwAccessibleChild(pFlyFrame), m_rContext.IsInPagePreview()) == m_rContext.GetFrame() ) { - aChild = pFlyFrm; + aChild = pFlyFrame; } else { - const SwFrameFormat *pFrameFormat = pFlyFrm->GetFormat(); + const SwFrameFormat *pFrameFormat = pFlyFrame->GetFormat(); if (pFrameFormat) { const SwFormatAnchor& pAnchor = pFrameFormat->GetAnchor(); if( pAnchor.GetAnchorId() == FLY_AS_CHAR ) { - const SwFrm *pParaFrm = SwAccessibleFrame::GetParent( SwAccessibleChild(pFlyFrm), m_rContext.IsInPagePreview() ); - aChild = pParaFrm; + const SwFrame *pParaFrame = SwAccessibleFrame::GetParent( SwAccessibleChild(pFlyFrame), m_rContext.IsInPagePreview() ); + aChild = pParaFrame; } } } @@ -324,9 +324,9 @@ Reference<XAccessible> SwAccessibleSelectionHelper::getSelectedAccessibleChild( while( aIter != aEndIter && !aChild.IsValid() ) { const SwAccessibleChild& rChild = *aIter; - if( rChild.GetDrawObject() && !rChild.GetSwFrm() && + if( rChild.GetDrawObject() && !rChild.GetSwFrame() && SwAccessibleFrame::GetParent(rChild, m_rContext.IsInPagePreview()) == - m_rContext.GetFrm() && + m_rContext.GetFrame() && pFEShell->IsObjSelected( *rChild.GetDrawObject() ) ) { if( 0 == nSelectedChildIndex ) @@ -343,10 +343,10 @@ Reference<XAccessible> SwAccessibleSelectionHelper::getSelectedAccessibleChild( OSL_ENSURE( m_rContext.GetMap() != nullptr, "We need the map." ); Reference< XAccessible > xChild; - if( aChild.GetSwFrm() ) + if( aChild.GetSwFrame() ) { ::rtl::Reference < SwAccessibleContext > xChildImpl( - m_rContext.GetMap()->GetContextImpl( aChild.GetSwFrm() ) ); + m_rContext.GetMap()->GetContextImpl( aChild.GetSwFrame() ) ); if( xChildImpl.is() ) { xChildImpl->SetParent( &m_rContext ); diff --git a/sw/source/core/access/acctable.cxx b/sw/source/core/access/acctable.cxx index f94a05537659..04541c8fa9ac 100644 --- a/sw/source/core/access/acctable.cxx +++ b/sw/source/core/access/acctable.cxx @@ -78,34 +78,34 @@ class SwAccessibleTableData_Impl Int32Set_Impl maRows; Int32Set_Impl maColumns; ::std::list < Int32Pair_Impl > maExtents; // cell extends for event processing only - Point maTabFrmPos; - const SwTabFrm *mpTabFrm; + Point maTabFramePos; + const SwTabFrame *mpTabFrame; bool mbIsInPagePreview; bool mbOnlyTableColumnHeader; - void CollectData( const SwFrm *pFrm ); - void CollectColumnHeaderData( const SwFrm *pFrm ); - void CollectRowHeaderData( const SwFrm *pFrm ); - void CollectExtents( const SwFrm *pFrm ); + void CollectData( const SwFrame *pFrame ); + void CollectColumnHeaderData( const SwFrame *pFrame ); + void CollectRowHeaderData( const SwFrame *pFrame ); + void CollectExtents( const SwFrame *pFrame ); - bool FindCell( const Point& rPos, const SwFrm *pFrm , - bool bExact, const SwFrm *& rFrm ) const; + bool FindCell( const Point& rPos, const SwFrame *pFrame , + bool bExact, const SwFrame *& rFrame ) const; void GetSelection( const Point& rTabPos, const SwRect& rArea, - const SwSelBoxes& rSelBoxes, const SwFrm *pFrm, + const SwSelBoxes& rSelBoxes, const SwFrame *pFrame, SwAccTableSelHander_Impl& rSelHdl, bool bColumns ) const; // #i77106# - inline bool IncludeRow( const SwFrm& rFrm ) const + inline bool IncludeRow( const SwFrame& rFrame ) const { return !mbOnlyTableColumnHeader || - mpTabFrm->IsInHeadline( rFrm ); + mpTabFrame->IsInHeadline( rFrame ); } public: // #i77106# - add third optional parameter <bOnlyTableColumnHeader>, default value <false> SwAccessibleTableData_Impl( SwAccessibleMap& rAccMap, - const SwTabFrm *pTabFrm, + const SwTabFrame *pTabFrame, bool bIsInPagePreview, bool bOnlyTableColumnHeader = false ); @@ -115,10 +115,10 @@ public: inline Int32Set_Impl::const_iterator GetRowIter( sal_Int32 nRow ) const; inline Int32Set_Impl::const_iterator GetColumnIter( sal_Int32 nCol ) const; - const SwFrm *GetCell( sal_Int32 nRow, sal_Int32 nColumn, bool bExact, + const SwFrame *GetCell( sal_Int32 nRow, sal_Int32 nColumn, bool bExact, SwAccessibleTable *pThis ) const throw (lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception); - const SwFrm *GetCellAtPos( sal_Int32 nLeft, sal_Int32 nTop, + const SwFrame *GetCellAtPos( sal_Int32 nLeft, sal_Int32 nTop, bool bExact ) const; inline sal_Int32 GetRowCount() const; inline sal_Int32 GetColumnCount() const; @@ -138,34 +138,34 @@ public: sal_Int32& rRowExtent, sal_Int32& rColumnExtent ) const; - const Point& GetTablePos() const { return maTabFrmPos; } - void SetTablePos( const Point& rPos ) { maTabFrmPos = rPos; } + const Point& GetTablePos() const { return maTabFramePos; } + void SetTablePos( const Point& rPos ) { maTabFramePos = rPos; } }; -void SwAccessibleTableData_Impl::CollectData( const SwFrm *pFrm ) +void SwAccessibleTableData_Impl::CollectData( const SwFrame *pFrame ) { - const SwAccessibleChildSList aList( *pFrm, mrAccMap ); + const SwAccessibleChildSList aList( *pFrame, mrAccMap ); SwAccessibleChildSList::const_iterator aIter( aList.begin() ); SwAccessibleChildSList::const_iterator aEndIter( aList.end() ); while( aIter != aEndIter ) { const SwAccessibleChild& rLower = *aIter; - const SwFrm *pLower = rLower.GetSwFrm(); + const SwFrame *pLower = rLower.GetSwFrame(); if( pLower ) { - if( pLower->IsRowFrm() ) + if( pLower->IsRowFrame() ) { // #i77106# if ( IncludeRow( *pLower ) ) { - maRows.insert( pLower->Frm().Top() - maTabFrmPos.getY() ); + maRows.insert( pLower->Frame().Top() - maTabFramePos.getY() ); CollectData( pLower ); } } - else if( pLower->IsCellFrm() && + else if( pLower->IsCellFrame() && rLower.IsAccessible( mbIsInPagePreview ) ) { - maColumns.insert( pLower->Frm().Left() - maTabFrmPos.getX() ); + maColumns.insert( pLower->Frame().Left() - maTabFramePos.getX() ); } else { @@ -176,39 +176,39 @@ void SwAccessibleTableData_Impl::CollectData( const SwFrm *pFrm ) } } -void SwAccessibleTableData_Impl::CollectRowHeaderData( const SwFrm *pFrm ) +void SwAccessibleTableData_Impl::CollectRowHeaderData( const SwFrame *pFrame ) { - const SwAccessibleChildSList aList( *pFrm, mrAccMap ); + const SwAccessibleChildSList aList( *pFrame, mrAccMap ); SwAccessibleChildSList::const_iterator aIter( aList.begin() ); SwAccessibleChildSList::const_iterator aEndIter( aList.end() ); while( aIter != aEndIter ) { const SwAccessibleChild& rLower = *aIter; - const SwFrm *pLower = rLower.GetSwFrm(); + const SwFrame *pLower = rLower.GetSwFrame(); if( pLower ) { - if( pLower->IsRowFrm() ) + if( pLower->IsRowFrame() ) { - const SwTableLine* pLine = static_cast<const SwRowFrm*>(pLower)->GetTabLine(); + const SwTableLine* pLine = static_cast<const SwRowFrame*>(pLower)->GetTabLine(); while( pLine->GetUpper() ) pLine = pLine->GetUpper()->GetUpper(); // Headerline? - //if(mpTabFrm->GetTable()->GetTabLines()[ 0 ] != pLine) + //if(mpTabFrame->GetTable()->GetTabLines()[ 0 ] != pLine) //return ; - maRows.insert( pLower->Frm().Top() - maTabFrmPos.Y() ); + maRows.insert( pLower->Frame().Top() - maTabFramePos.Y() ); CollectRowHeaderData( pLower ); } - else if( pLower->IsCellFrm() && + else if( pLower->IsCellFrame() && rLower.IsAccessible( mbIsInPagePreview ) ) { //Added by yanjun. Can't find the "GetRowHeaderFlag" function (need verify). - //if(static_cast<SwCellFrm*>(pLower)->GetRowHeaderFlag()) - // maColumns.insert( pLower->Frm().Left() - maTabFrmPos.X() ); + //if(static_cast<SwCellFrame*>(pLower)->GetRowHeaderFlag()) + // maColumns.insert( pLower->Frame().Left() - maTabFramePos.X() ); } else { @@ -219,42 +219,42 @@ void SwAccessibleTableData_Impl::CollectRowHeaderData( const SwFrm *pFrm ) } } -void SwAccessibleTableData_Impl::CollectColumnHeaderData( const SwFrm *pFrm ) +void SwAccessibleTableData_Impl::CollectColumnHeaderData( const SwFrame *pFrame ) { - const SwAccessibleChildSList aList( *pFrm, mrAccMap ); + const SwAccessibleChildSList aList( *pFrame, mrAccMap ); SwAccessibleChildSList::const_iterator aIter( aList.begin() ); SwAccessibleChildSList::const_iterator aEndIter( aList.end() ); while( aIter != aEndIter ) { const SwAccessibleChild& rLower = *aIter; - const SwFrm *pLower = rLower.GetSwFrm(); + const SwFrame *pLower = rLower.GetSwFrame(); if( pLower ) { - if( pLower->IsRowFrm() ) + if( pLower->IsRowFrame() ) { - const SwTableLine* pLine = static_cast<const SwRowFrm*>(pLower)->GetTabLine(); + const SwTableLine* pLine = static_cast<const SwRowFrame*>(pLower)->GetTabLine(); while( pLine->GetUpper() ) pLine = pLine->GetUpper()->GetUpper(); // Headerline? - //if(mpTabFrm->GetTable()->GetTabLines()[ 0 ] != pLine) + //if(mpTabFrame->GetTable()->GetTabLines()[ 0 ] != pLine) //return ; //if the current line is now header line, then return ; - sal_Int16 iCurrentRowIndex = mpTabFrm->GetTable()->GetTabLines().GetPos( pLine); - if(iCurrentRowIndex >= mpTabFrm->GetTable()->_GetRowsToRepeat()) + sal_Int16 iCurrentRowIndex = mpTabFrame->GetTable()->GetTabLines().GetPos( pLine); + if(iCurrentRowIndex >= mpTabFrame->GetTable()->_GetRowsToRepeat()) return ; - maRows.insert( pLower->Frm().Top() - maTabFrmPos.Y() ); + maRows.insert( pLower->Frame().Top() - maTabFramePos.Y() ); CollectColumnHeaderData( pLower ); } - else if( pLower->IsCellFrm() && + else if( pLower->IsCellFrame() && rLower.IsAccessible( mbIsInPagePreview ) ) { - maColumns.insert( pLower->Frm().Left() - maTabFrmPos.X() ); + maColumns.insert( pLower->Frame().Left() - maTabFramePos.X() ); } else { @@ -265,23 +265,23 @@ void SwAccessibleTableData_Impl::CollectColumnHeaderData( const SwFrm *pFrm ) } } -void SwAccessibleTableData_Impl::CollectExtents( const SwFrm *pFrm ) +void SwAccessibleTableData_Impl::CollectExtents( const SwFrame *pFrame ) { - const SwAccessibleChildSList aList( *pFrm, mrAccMap ); + const SwAccessibleChildSList aList( *pFrame, mrAccMap ); SwAccessibleChildSList::const_iterator aIter( aList.begin() ); SwAccessibleChildSList::const_iterator aEndIter( aList.end() ); while( aIter != aEndIter ) { const SwAccessibleChild& rLower = *aIter; - const SwFrm *pLower = rLower.GetSwFrm(); + const SwFrame *pLower = rLower.GetSwFrame(); if( pLower ) { - if( pLower->IsCellFrm() && + if( pLower->IsCellFrame() && rLower.IsAccessible( mbIsInPagePreview ) ) { sal_Int32 nRow, nCol; Int32Pair_Impl aCellExtents; - GetRowColumnAndExtent( pLower->Frm(), nRow, nCol, + GetRowColumnAndExtent( pLower->Frame(), nRow, nCol, aCellExtents.first, aCellExtents.second ); @@ -290,7 +290,7 @@ void SwAccessibleTableData_Impl::CollectExtents( const SwFrm *pFrm ) else { // #i77106# - if ( !pLower->IsRowFrm() || + if ( !pLower->IsRowFrame() || IncludeRow( *pLower ) ) { CollectExtents( pLower ); @@ -302,33 +302,33 @@ void SwAccessibleTableData_Impl::CollectExtents( const SwFrm *pFrm ) } bool SwAccessibleTableData_Impl::FindCell( - const Point& rPos, const SwFrm *pFrm, bool bExact, - const SwFrm *& rRet ) const + const Point& rPos, const SwFrame *pFrame, bool bExact, + const SwFrame *& rRet ) const { bool bFound = false; - const SwAccessibleChildSList aList( *pFrm, mrAccMap ); + const SwAccessibleChildSList aList( *pFrame, mrAccMap ); SwAccessibleChildSList::const_iterator aIter( aList.begin() ); SwAccessibleChildSList::const_iterator aEndIter( aList.end() ); while( !bFound && aIter != aEndIter ) { const SwAccessibleChild& rLower = *aIter; - const SwFrm *pLower = rLower.GetSwFrm(); + const SwFrame *pLower = rLower.GetSwFrame(); OSL_ENSURE( pLower, "child should be a frame" ); if( pLower ) { if( rLower.IsAccessible( mbIsInPagePreview ) ) { - OSL_ENSURE( pLower->IsCellFrm(), "lower is not a cell frame" ); - const SwRect& rFrm = pLower->Frm(); - if( rFrm.Right() >= rPos.X() && rFrm.Bottom() >= rPos.Y() ) + OSL_ENSURE( pLower->IsCellFrame(), "lower is not a cell frame" ); + const SwRect& rFrame = pLower->Frame(); + if( rFrame.Right() >= rPos.X() && rFrame.Bottom() >= rPos.Y() ) { // We have found the cell - OSL_ENSURE( rFrm.Left() <= rPos.X() && rFrm.Top() <= rPos.Y(), + OSL_ENSURE( rFrame.Left() <= rPos.X() && rFrame.Top() <= rPos.Y(), "find frame moved to far!" ); bFound = true; if( !bExact || - (rFrm.Top() == rPos.Y() && rFrm.Left() == rPos.Y() ) ) + (rFrame.Top() == rPos.Y() && rFrame.Left() == rPos.Y() ) ) { rRet = pLower; } @@ -337,7 +337,7 @@ bool SwAccessibleTableData_Impl::FindCell( else { // #i77106# - if ( !pLower->IsRowFrm() || + if ( !pLower->IsRowFrame() || IncludeRow( *pLower ) ) { bFound = FindCell( rPos, pLower, bExact, rRet ); @@ -354,28 +354,28 @@ void SwAccessibleTableData_Impl::GetSelection( const Point& rTabPos, const SwRect& rArea, const SwSelBoxes& rSelBoxes, - const SwFrm *pFrm, + const SwFrame *pFrame, SwAccTableSelHander_Impl& rSelHdl, bool bColumns ) const { - const SwAccessibleChildSList aList( *pFrm, mrAccMap ); + const SwAccessibleChildSList aList( *pFrame, mrAccMap ); SwAccessibleChildSList::const_iterator aIter( aList.begin() ); SwAccessibleChildSList::const_iterator aEndIter( aList.end() ); while( aIter != aEndIter ) { const SwAccessibleChild& rLower = *aIter; - const SwFrm *pLower = rLower.GetSwFrm(); + const SwFrame *pLower = rLower.GetSwFrame(); OSL_ENSURE( pLower, "child should be a frame" ); const SwRect& rBox = rLower.GetBox( mrAccMap ); if( pLower && rBox.IsOver( rArea ) ) { if( rLower.IsAccessible( mbIsInPagePreview ) ) { - OSL_ENSURE( pLower->IsCellFrm(), "lower is not a cell frame" ); - const SwCellFrm *pCFrm = - static_cast < const SwCellFrm * >( pLower ); + OSL_ENSURE( pLower->IsCellFrame(), "lower is not a cell frame" ); + const SwCellFrame *pCFrame = + static_cast < const SwCellFrame * >( pLower ); SwTableBox *pBox = - const_cast< SwTableBox *>( pCFrm->GetTabBox() ); + const_cast< SwTableBox *>( pCFrame->GetTabBox() ); if( rSelBoxes.find( pBox ) == rSelBoxes.end() ) { const Int32Set_Impl rRowsOrCols = @@ -403,7 +403,7 @@ void SwAccessibleTableData_Impl::GetSelection( else { // #i77106# - if ( !pLower->IsRowFrm() || + if ( !pLower->IsRowFrame() || IncludeRow( *pLower ) ) { GetSelection( rTabPos, rArea, rSelBoxes, pLower, rSelHdl, @@ -415,7 +415,7 @@ void SwAccessibleTableData_Impl::GetSelection( } } -const SwFrm *SwAccessibleTableData_Impl::GetCell( +const SwFrame *SwAccessibleTableData_Impl::GetCell( sal_Int32 nRow, sal_Int32 nColumn, bool, SwAccessibleTable *pThis ) const throw (lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception) @@ -424,9 +424,9 @@ const SwFrm *SwAccessibleTableData_Impl::GetCell( Int32Set_Impl::const_iterator aSttCol( GetColumnIter( nColumn ) ); Int32Set_Impl::const_iterator aSttRow( GetRowIter( nRow ) ); - const SwFrm *pCellFrm = GetCellAtPos( *aSttCol, *aSttRow, false ); + const SwFrame *pCellFrame = GetCellAtPos( *aSttCol, *aSttRow, false ); - return pCellFrm; + return pCellFrame; } void SwAccessibleTableData_Impl::GetSelection( @@ -435,7 +435,7 @@ void SwAccessibleTableData_Impl::GetSelection( SwAccTableSelHander_Impl& rSelHdl, bool bColumns ) const { - SwRect aArea( mpTabFrm->Frm() ); + SwRect aArea( mpTabFrame->Frame() ); Point aPos( aArea.Pos() ); const Int32Set_Impl& rRowsOrColumns = bColumns ? maColumns : maRows; @@ -460,16 +460,16 @@ void SwAccessibleTableData_Impl::GetSelection( aArea.Bottom( *aEnd + aPos.getY() - 1 ); } - GetSelection( aPos, aArea, rSelBoxes, mpTabFrm, rSelHdl, bColumns ); + GetSelection( aPos, aArea, rSelBoxes, mpTabFrame, rSelHdl, bColumns ); } -const SwFrm *SwAccessibleTableData_Impl::GetCellAtPos( +const SwFrame *SwAccessibleTableData_Impl::GetCellAtPos( sal_Int32 nLeft, sal_Int32 nTop, bool bExact ) const { - Point aPos( mpTabFrm->Frm().Pos() ); + Point aPos( mpTabFrame->Frame().Pos() ); aPos.Move( nLeft, nTop ); - const SwFrm *pRet = nullptr; - FindCell( aPos, mpTabFrm, bExact, pRet ); + const SwFrame *pRet = nullptr; + FindCell( aPos, mpTabFrame, bExact, pRet ); return pRet; } @@ -496,17 +496,17 @@ bool SwAccessibleTableData_Impl::CompareExtents( } SwAccessibleTableData_Impl::SwAccessibleTableData_Impl( SwAccessibleMap& rAccMap, - const SwTabFrm *pTabFrm, + const SwTabFrame *pTabFrame, bool bIsInPagePreview, bool bOnlyTableColumnHeader ) : mrAccMap( rAccMap ) - , maTabFrmPos( pTabFrm->Frm().Pos() ) - , mpTabFrm( pTabFrm ) + , maTabFramePos( pTabFrame->Frame().Pos() ) + , mpTabFrame( pTabFrame ) , mbIsInPagePreview( bIsInPagePreview ) , mbOnlyTableColumnHeader( bOnlyTableColumnHeader ) { - CollectData( mpTabFrm ); - CollectExtents( mpTabFrm ); + CollectData( mpTabFrame ); + CollectExtents( mpTabFrame ); } inline Int32Set_Impl::const_iterator SwAccessibleTableData_Impl::GetRowIter( @@ -554,16 +554,16 @@ void SwAccessibleTableData_Impl::GetRowColumnAndExtent( sal_Int32& rRowExtent, sal_Int32& rColumnExtent ) const { Int32Set_Impl::const_iterator aStt( - maRows.lower_bound( rBox.Top() - maTabFrmPos.Y() ) ); + maRows.lower_bound( rBox.Top() - maTabFramePos.Y() ) ); Int32Set_Impl::const_iterator aEnd( - maRows.upper_bound( rBox.Bottom() - maTabFrmPos.Y() ) ); + maRows.upper_bound( rBox.Bottom() - maTabFramePos.Y() ) ); rRow = static_cast< sal_Int32 >( ::std::distance( maRows.begin(), aStt ) ); rRowExtent = static_cast< sal_Int32 >( ::std::distance( aStt, aEnd ) ); - aStt = maColumns.lower_bound( rBox.Left() - maTabFrmPos.X() ); - aEnd = maColumns.upper_bound( rBox.Right() - maTabFrmPos.X() ); + aStt = maColumns.lower_bound( rBox.Left() - maTabFramePos.X() ); + aEnd = maColumns.upper_bound( rBox.Right() - maTabFramePos.X() ); rColumn = static_cast< sal_Int32 >( ::std::distance( maColumns.begin(), aStt ) ); rColumnExtent = @@ -661,10 +661,10 @@ void SwAccAllTableSelHander_Impl::Unselect( sal_Int32 nRowOrCol, const SwSelBoxes *SwAccessibleTable::GetSelBoxes() const { const SwSelBoxes *pSelBoxes = nullptr; - const SwCrsrShell *pCSh = GetCrsrShell(); + const SwCursorShell *pCSh = GetCursorShell(); if( (pCSh != nullptr) && pCSh->IsTableMode() ) { - pSelBoxes = &pCSh->GetTableCrsr()->GetSelectedBoxes(); + pSelBoxes = &pCSh->GetTableCursor()->GetSelectedBoxes(); } return pSelBoxes; @@ -696,14 +696,14 @@ const SwTableBox* SwAccessibleTable::GetTableBox( sal_Int32 nChildIndex ) const // get table box for 'our' table cell SwAccessibleChild aCell( GetChild( *(const_cast<SwAccessibleMap*>(GetMap())), nChildIndex ) ); - if( aCell.GetSwFrm() ) + if( aCell.GetSwFrame() ) { - const SwFrm* pChildFrm = aCell.GetSwFrm(); - if( (pChildFrm != nullptr) && pChildFrm->IsCellFrm() ) + const SwFrame* pChildFrame = aCell.GetSwFrame(); + if( (pChildFrame != nullptr) && pChildFrame->IsCellFrame() ) { - const SwCellFrm* pCellFrm = - static_cast<const SwCellFrm*>( pChildFrm ); - pBox = pCellFrm->GetTabBox(); + const SwCellFrame* pCellFrame = + static_cast<const SwCellFrame*>( pChildFrame ); + pBox = pCellFrame->GetTabBox(); } } @@ -757,25 +757,25 @@ void SwAccessibleTable::GetStates( rStateSet.AddState( AccessibleStateType::RESIZABLE ); // MULTISELECTABLE rStateSet.AddState( AccessibleStateType::MULTI_SELECTABLE ); - SwCrsrShell* pCrsrShell = GetCrsrShell(); - if( pCrsrShell ) + SwCursorShell* pCursorShell = GetCursorShell(); + if( pCursorShell ) rStateSet.AddState( AccessibleStateType::MULTI_SELECTABLE ); } SwAccessibleTable::SwAccessibleTable( SwAccessibleMap* pInitMap, - const SwTabFrm* pTabFrm ) : - SwAccessibleContext( pInitMap, AccessibleRole::TABLE, pTabFrm ), + const SwTabFrame* pTabFrame ) : + SwAccessibleContext( pInitMap, AccessibleRole::TABLE, pTabFrame ), mpTableData( nullptr ) { SolarMutexGuard aGuard; - const SwFrameFormat *pFrameFormat = pTabFrm->GetFormat(); + const SwFrameFormat *pFrameFormat = pTabFrame->GetFormat(); const_cast< SwFrameFormat * >( pFrameFormat )->Add( this ); - SetName( pFrameFormat->GetName() + "-" + OUString::number( pTabFrm->GetPhyPageNum() ) ); + SetName( pFrameFormat->GetName() + "-" + OUString::number( pTabFrame->GetPhyPageNum() ) ); - const OUString sArg1( static_cast< const SwTabFrm * >( GetFrm() )->GetFormat()->GetName() ); + const OUString sArg1( static_cast< const SwTabFrame * >( GetFrame() )->GetFormat()->GetName() ); const OUString sArg2( GetFormattedPageNumber() ); sDesc = GetResource( STR_ACCESS_TABLE_DESC, &sArg1, &sArg2 ); @@ -792,19 +792,19 @@ SwAccessibleTable::~SwAccessibleTable() void SwAccessibleTable::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) { sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0 ; - const SwTabFrm *pTabFrm = static_cast< const SwTabFrm * >( GetFrm() ); + const SwTabFrame *pTabFrame = static_cast< const SwTabFrame * >( GetFrame() ); switch( nWhich ) { case RES_NAME_CHANGED: - if( pTabFrm ) + if( pTabFrame ) { - const SwFrameFormat *pFrameFormat = pTabFrm->GetFormat(); + const SwFrameFormat *pFrameFormat = pTabFrame->GetFormat(); OSL_ENSURE( pFrameFormat == GetRegisteredIn(), "invalid frame" ); const OUString sOldName( GetName() ); const OUString sNewTabName = pFrameFormat->GetName(); - SetName( sNewTabName + "-" + OUString::number( pTabFrm->GetPhyPageNum() ) ); + SetName( sNewTabName + "-" + OUString::number( pTabFrame->GetPhyPageNum() ) ); if( sOldName != GetName() ) { @@ -894,8 +894,8 @@ uno::Sequence< sal_Int8 > SAL_CALL SwAccessibleTable::getImplementationId() // #i77106# SwAccessibleTableData_Impl* SwAccessibleTable::CreateNewTableData() { - const SwTabFrm* pTabFrm = static_cast<const SwTabFrm*>( GetFrm() ); - return new SwAccessibleTableData_Impl( *GetMap(), pTabFrm, IsInPagePreview() ); + const SwTabFrame* pTabFrame = static_cast<const SwTabFrame*>( GetFrame() ); + return new SwAccessibleTableData_Impl( *GetMap(), pTabFrame, IsInPagePreview() ); } void SwAccessibleTable::UpdateTableData() @@ -1026,12 +1026,12 @@ sal_Int32 SAL_CALL SwAccessibleTable::getAccessibleRowExtentAt( GetTableData().GetColumnIter( nColumn ) ); Int32Set_Impl::const_iterator aSttRow( GetTableData().GetRowIter( nRow ) ); - const SwFrm *pCellFrm = GetTableData().GetCellAtPos( *aSttCol, *aSttRow, + const SwFrame *pCellFrame = GetTableData().GetCellAtPos( *aSttCol, *aSttRow, false ); - if( pCellFrm ) + if( pCellFrame ) { - sal_Int32 nBottom = pCellFrm->Frm().Bottom(); - nBottom -= GetFrm()->Frm().Top(); + sal_Int32 nBottom = pCellFrame->Frame().Bottom(); + nBottom -= GetFrame()->Frame().Top(); Int32Set_Impl::const_iterator aEndRow( GetTableData().GetRows().upper_bound( nBottom ) ); nExtend = @@ -1058,12 +1058,12 @@ sal_Int32 SAL_CALL SwAccessibleTable::getAccessibleColumnExtentAt( GetTableData().GetColumnIter( nColumn ) ); Int32Set_Impl::const_iterator aSttRow( GetTableData().GetRowIter( nRow ) ); - const SwFrm *pCellFrm = GetTableData().GetCellAtPos( *aSttCol, *aSttRow, + const SwFrame *pCellFrame = GetTableData().GetCellAtPos( *aSttCol, *aSttRow, false ); - if( pCellFrm ) + if( pCellFrame ) { - sal_Int32 nRight = pCellFrm->Frm().Right(); - nRight -= GetFrm()->Frm().Left(); + sal_Int32 nRight = pCellFrame->Frame().Right(); + nRight -= GetFrame()->Frame().Left(); Int32Set_Impl::const_iterator aEndCol( GetTableData().GetColumns().upper_bound( nRight ) ); nExtend = @@ -1088,7 +1088,7 @@ uno::Reference< XAccessibleTable > SAL_CALL // #i87532# - assure that return accessible object is empty, // if no column header exists. SwAccessibleTableColHeaders* pTableColHeaders = - new SwAccessibleTableColHeaders( GetMap(), static_cast< const SwTabFrm *>( GetFrm() ) ); + new SwAccessibleTableColHeaders( GetMap(), static_cast< const SwTabFrame *>( GetFrame() ) ); uno::Reference< XAccessibleTable > xTableColumnHeaders( pTableColHeaders ); if ( pTableColHeaders->getAccessibleChildCount() <= 0 ) { @@ -1209,10 +1209,10 @@ uno::Reference< XAccessible > SAL_CALL SwAccessibleTable::getAccessibleCellAt( CHECK_FOR_DEFUNC( XAccessibleTable ) - const SwFrm *pCellFrm = + const SwFrame *pCellFrame = GetTableData().GetCell( nRow, nColumn, false, this ); - if( pCellFrm ) - xRet = GetMap()->GetContext( pCellFrm ); + if( pCellFrame ) + xRet = GetMap()->GetContext( pCellFrame ); return xRet; } @@ -1241,16 +1241,16 @@ sal_Bool SAL_CALL SwAccessibleTable::isAccessibleSelected( CHECK_FOR_DEFUNC( XAccessibleTable ) - const SwFrm *pFrm = + const SwFrame *pFrame = GetTableData().GetCell( nRow, nColumn, false, this ); - if( pFrm && pFrm->IsCellFrm() ) + if( pFrame && pFrame->IsCellFrame() ) { const SwSelBoxes *pSelBoxes = GetSelBoxes(); if( pSelBoxes ) { - const SwCellFrm *pCFrm = static_cast < const SwCellFrm * >( pFrm ); + const SwCellFrame *pCFrame = static_cast < const SwCellFrame * >( pFrame ); SwTableBox *pBox = - const_cast< SwTableBox *>( pCFrm->GetTabBox() ); + const_cast< SwTableBox *>( pCFrame->GetTabBox() ); bRet = pSelBoxes->find( pBox ) != pSelBoxes->end(); } } @@ -1294,10 +1294,10 @@ sal_Int32 SAL_CALL SwAccessibleTable::getAccessibleRow( sal_Int32 nChildIndex ) } SwAccessibleChild aCell( GetChild( *(GetMap()), nChildIndex ) ); - if ( aCell.GetSwFrm() ) + if ( aCell.GetSwFrame() ) { - sal_Int32 nTop = aCell.GetSwFrm()->Frm().Top(); - nTop -= GetFrm()->Frm().Top(); + sal_Int32 nTop = aCell.GetSwFrame()->Frame().Top(); + nTop -= GetFrame()->Frame().Top(); Int32Set_Impl::const_iterator aRow( GetTableData().GetRows().lower_bound( nTop ) ); nRet = static_cast< sal_Int32 >( ::std::distance( @@ -1332,10 +1332,10 @@ sal_Int32 SAL_CALL SwAccessibleTable::getAccessibleColumn( } SwAccessibleChild aCell( GetChild( *(GetMap()), nChildIndex ) ); - if ( aCell.GetSwFrm() ) + if ( aCell.GetSwFrame() ) { - sal_Int32 nLeft = aCell.GetSwFrm()->Frm().Left(); - nLeft -= GetFrm()->Frm().Left(); + sal_Int32 nLeft = aCell.GetSwFrame()->Frame().Left(); + nLeft -= GetFrame()->Frame().Left(); Int32Set_Impl::const_iterator aCol( GetTableData().GetColumns().lower_bound( nLeft ) ); nRet = static_cast< sal_Int32 >( ::std::distance( @@ -1388,7 +1388,7 @@ void SwAccessibleTable::InvalidatePosOrSize( const SwRect& rOldBox ) FireTableChangeEvent(*mpTableData); } if( HasTableData() ) - GetTableData().SetTablePos( GetFrm()->Frm().Pos() ); + GetTableData().SetTablePos( GetFrame()->Frame().Pos() ); SwAccessibleContext::InvalidatePosOrSize( rOldBox ); } @@ -1403,13 +1403,13 @@ void SwAccessibleTable::Dispose( bool bRecursive ) SwAccessibleContext::Dispose( bRecursive ); } -void SwAccessibleTable::DisposeChild( const SwAccessibleChild& rChildFrmOrObj, +void SwAccessibleTable::DisposeChild( const SwAccessibleChild& rChildFrameOrObj, bool bRecursive ) { SolarMutexGuard aGuard; - const SwFrm *pFrm = rChildFrmOrObj.GetSwFrm(); - OSL_ENSURE( pFrm, "frame expected" ); + const SwFrame *pFrame = rChildFrameOrObj.GetSwFrame(); + OSL_ENSURE( pFrame, "frame expected" ); if( HasTableData() ) { FireTableChangeEvent( GetTableData() ); @@ -1417,16 +1417,16 @@ void SwAccessibleTable::DisposeChild( const SwAccessibleChild& rChildFrmOrObj, } // There are two reason why this method has been called. The first one - // is there is no context for pFrm. The method is then called by + // is there is no context for pFrame. The method is then called by // the map, and we have to call our superclass. // The other situation is that we have been call by a call to get notified // about its change. We then must not call the superclass - uno::Reference< XAccessible > xAcc( GetMap()->GetContext( pFrm, false ) ); + uno::Reference< XAccessible > xAcc( GetMap()->GetContext( pFrame, false ) ); if( !xAcc.is() ) - SwAccessibleContext::DisposeChild( rChildFrmOrObj, bRecursive ); + SwAccessibleContext::DisposeChild( rChildFrameOrObj, bRecursive ); } -void SwAccessibleTable::InvalidateChildPosOrSize( const SwAccessibleChild& rChildFrmOrObj, +void SwAccessibleTable::InvalidateChildPosOrSize( const SwAccessibleChild& rChildFrameOrObj, const SwRect& rOldBox ) { SolarMutexGuard aGuard; @@ -1434,7 +1434,7 @@ void SwAccessibleTable::InvalidateChildPosOrSize( const SwAccessibleChild& rChil if( HasTableData() ) { SAL_WARN_IF( HasTableData() && - GetFrm()->Frm().Pos() != GetTableData().GetTablePos(), "sw.core", + GetFrame()->Frame().Pos() != GetTableData().GetTablePos(), "sw.core", "table has invalid position" ); if( HasTableData() ) { @@ -1446,12 +1446,12 @@ void SwAccessibleTable::InvalidateChildPosOrSize( const SwAccessibleChild& rChil { Int32Set_Impl::const_iterator aSttCol( GetTableData().GetColumnIter( 0 ) ); Int32Set_Impl::const_iterator aSttRow( GetTableData().GetRowIter( 1 ) ); - const SwFrm *pCellFrm = GetTableData().GetCellAtPos( *aSttCol, *aSttRow, false ); + const SwFrame *pCellFrame = GetTableData().GetCellAtPos( *aSttCol, *aSttRow, false ); Int32Set_Impl::const_iterator aSttCol2( pNewTableData->GetColumnIter( 0 ) ); Int32Set_Impl::const_iterator aSttRow2( pNewTableData->GetRowIter( 0 ) ); - const SwFrm *pCellFrm2 = pNewTableData->GetCellAtPos( *aSttCol2, *aSttRow2, false ); + const SwFrame *pCellFrame2 = pNewTableData->GetCellAtPos( *aSttCol2, *aSttRow2, false ); - if(pCellFrm == pCellFrm2) + if(pCellFrame == pCellFrame2) { AccessibleTableModelChange aModelChange; aModelChange.Type = AccessibleTableModelChangeType::UPDATE; @@ -1480,7 +1480,7 @@ void SwAccessibleTable::InvalidateChildPosOrSize( const SwAccessibleChild& rChil } // #i013961# - always call super class method - SwAccessibleContext::InvalidateChildPosOrSize( rChildFrmOrObj, rOldBox ); + SwAccessibleContext::InvalidateChildPosOrSize( rChildFrameOrObj, rOldBox ); } // XAccessibleSelection @@ -1499,8 +1499,8 @@ void SAL_CALL SwAccessibleTable::selectAccessibleChild( const SwTableBox* pBox = GetTableBox( nChildIndex ); OSL_ENSURE( pBox != nullptr, "We need the table box." ); - SwCrsrShell* pCrsrShell = GetCrsrShell(); - if( pCrsrShell == nullptr ) + SwCursorShell* pCursorShell = GetCursorShell(); + if( pCursorShell == nullptr ) return; // assure, that child, identified by the given index, isn't already selected. @@ -1515,7 +1515,7 @@ void SAL_CALL SwAccessibleTable::selectAccessibleChild( // if we have a selection in a table, check if it's in the // same table that we're trying to select in - const SwTableNode* pSelectedTable = pCrsrShell->IsCrsrInTable(); + const SwTableNode* pSelectedTable = pCursorShell->IsCursorInTable(); if( pSelectedTable != nullptr ) { // get top-most table line @@ -1530,22 +1530,22 @@ void SAL_CALL SwAccessibleTable::selectAccessibleChild( // create the new selection const SwStartNode* pStartNode = pBox->GetSttNd(); - if( pSelectedTable == nullptr || !pCrsrShell->GetTableCrs() ) + if( pSelectedTable == nullptr || !pCursorShell->GetTableCrs() ) { - pCrsrShell->StartAction(); + pCursorShell->StartAction(); // Set cursor into current cell. This deletes any table cursor. SwPaM aPaM( *pStartNode ); aPaM.Move( fnMoveForward, fnGoNode ); Select( aPaM ); // Move cursor to the end of the table creating a selection and a table // cursor. - pCrsrShell->SetMark(); - pCrsrShell->MoveTable( fnTableCurr, fnTableEnd ); + pCursorShell->SetMark(); + pCursorShell->MoveTable( fnTableCurr, fnTableEnd ); // now set the cursor into the cell again. - SwPaM *pPaM = pCrsrShell->GetTableCrs() ? pCrsrShell->GetTableCrs() - : pCrsrShell->GetCrsr(); + SwPaM *pPaM = pCursorShell->GetTableCrs() ? pCursorShell->GetTableCrs() + : pCursorShell->GetCursor(); *pPaM->GetPoint() = *pPaM->GetMark(); - pCrsrShell->EndAction(); + pCursorShell->EndAction(); // we now have one cell selected! } else @@ -1556,8 +1556,8 @@ void SAL_CALL SwAccessibleTable::selectAccessibleChild( SwPaM aPaM( *pStartNode ); aPaM.Move( fnMoveForward, fnGoNode ); aPaM.SetMark(); - const SwPaM *pPaM = pCrsrShell->GetTableCrs() ? pCrsrShell->GetTableCrs() - : pCrsrShell->GetCrsr(); + const SwPaM *pPaM = pCursorShell->GetTableCrs() ? pCursorShell->GetTableCrs() + : pCursorShell->GetCursor(); *(aPaM.GetMark()) = *pPaM->GetMark(); Select( aPaM ); @@ -1585,12 +1585,12 @@ void SAL_CALL SwAccessibleTable::clearAccessibleSelection( ) CHECK_FOR_DEFUNC( XAccessibleTable ); - SwCrsrShell* pCrsrShell = GetCrsrShell(); - if( pCrsrShell != nullptr ) + SwCursorShell* pCursorShell = GetCursorShell(); + if( pCursorShell != nullptr ) { - pCrsrShell->StartAction(); - pCrsrShell->ClearMark(); - pCrsrShell->EndAction(); + pCursorShell->StartAction(); + pCursorShell->ClearMark(); + pCursorShell->EndAction(); } } @@ -1656,10 +1656,10 @@ void SAL_CALL SwAccessibleTable::deselectAccessibleChild( SolarMutexGuard aGuard; CHECK_FOR_DEFUNC( XAccessibleTable ); - SwCrsrShell* pCrsrShell = GetCrsrShell(); + SwCursorShell* pCursorShell = GetCursorShell(); // index has to be treated as global child index - if ( !pCrsrShell ) + if ( !pCursorShell ) throw lang::IndexOutOfBoundsException(); // assure, that given child index is in bounds. @@ -1676,33 +1676,33 @@ void SAL_CALL SwAccessibleTable::deselectAccessibleChild( // If we unselect point, then set cursor to mark. If we clear another // selected box, then set cursor to point. // reduce selection to mark. - SwPaM *pPaM = pCrsrShell->GetTableCrs() ? pCrsrShell->GetTableCrs() - : pCrsrShell->GetCrsr(); + SwPaM *pPaM = pCursorShell->GetTableCrs() ? pCursorShell->GetTableCrs() + : pCursorShell->GetCursor(); bool bDeselectPoint = pBox->GetSttNd() == pPaM->GetPoint()->nNode.GetNode().FindTableBoxStartNode(); SwPaM aPaM( bDeselectPoint ? *pPaM->GetMark() : *pPaM->GetPoint() ); - pCrsrShell->StartAction(); + pCursorShell->StartAction(); // Set cursor into either point or mark Select( aPaM ); // Move cursor to the end of the table creating a selection and a table // cursor. - pCrsrShell->SetMark(); - pCrsrShell->MoveTable( fnTableCurr, fnTableEnd ); + pCursorShell->SetMark(); + pCursorShell->MoveTable( fnTableCurr, fnTableEnd ); // now set the cursor into the cell again. - pPaM = pCrsrShell->GetTableCrs() ? pCrsrShell->GetTableCrs() - : pCrsrShell->GetCrsr(); + pPaM = pCursorShell->GetTableCrs() ? pCursorShell->GetTableCrs() + : pCursorShell->GetCursor(); *pPaM->GetPoint() = *pPaM->GetMark(); - pCrsrShell->EndAction(); + pCursorShell->EndAction(); } sal_Int32 SAL_CALL SwAccessibleTable::getBackground() throw (css::uno::RuntimeException, std::exception) { - const SvxBrushItem &rBack = GetFrm()->GetAttrSet()->GetBackground(); + const SvxBrushItem &rBack = GetFrame()->GetAttrSet()->GetBackground(); sal_uInt32 crBack = rBack.GetColor().GetColor(); if (COL_AUTO == crBack) @@ -1822,12 +1822,12 @@ sal_Bool SAL_CALL SwAccessibleTable::unselectRow( sal_Int32 row ) if( isAccessibleSelected( row , 0 ) && isAccessibleSelected( row , getAccessibleColumnCount()-1 ) ) { - SwCrsrShell* pCrsrShell = GetCrsrShell(); - if( pCrsrShell != nullptr ) + SwCursorShell* pCursorShell = GetCursorShell(); + if( pCursorShell != nullptr ) { - pCrsrShell->StartAction(); - pCrsrShell->ClearMark(); - pCrsrShell->EndAction(); + pCursorShell->StartAction(); + pCursorShell->ClearMark(); + pCursorShell->EndAction(); return sal_True; } } @@ -1843,12 +1843,12 @@ sal_Bool SAL_CALL SwAccessibleTable::unselectColumn( sal_Int32 column ) if( isAccessibleSelected( 0 , column ) && isAccessibleSelected( getAccessibleRowCount()-1,column)) { - SwCrsrShell* pCrsrShell = GetCrsrShell(); - if( pCrsrShell != nullptr ) + SwCursorShell* pCursorShell = GetCursorShell(); + if( pCursorShell != nullptr ) { - pCrsrShell->StartAction(); - pCrsrShell->ClearMark(); - pCrsrShell->EndAction(); + pCursorShell->StartAction(); + pCursorShell->ClearMark(); + pCursorShell->EndAction(); return sal_True; } } @@ -1857,16 +1857,16 @@ sal_Bool SAL_CALL SwAccessibleTable::unselectColumn( sal_Int32 column ) // #i77106# - implementation of class <SwAccessibleTableColHeaders> SwAccessibleTableColHeaders::SwAccessibleTableColHeaders( SwAccessibleMap *pMap2, - const SwTabFrm *pTabFrm ) - : SwAccessibleTable( pMap2, pTabFrm ) + const SwTabFrame *pTabFrame ) + : SwAccessibleTable( pMap2, pTabFrame ) { SolarMutexGuard aGuard; - const SwFrameFormat *pFrameFormat = pTabFrm->GetFormat(); + const SwFrameFormat *pFrameFormat = pTabFrame->GetFormat(); const_cast< SwFrameFormat * >( pFrameFormat )->Add( this ); const OUString aName = pFrameFormat->GetName() + "-ColumnHeaders"; - SetName( aName + "-" + OUString::number( pTabFrm->GetPhyPageNum() ) ); + SetName( aName + "-" + OUString::number( pTabFrame->GetPhyPageNum() ) ); const OUString sArg2( GetFormattedPageNumber() ); @@ -1877,8 +1877,8 @@ SwAccessibleTableColHeaders::SwAccessibleTableColHeaders( SwAccessibleMap *pMap2 SwAccessibleTableData_Impl* SwAccessibleTableColHeaders::CreateNewTableData() { - const SwTabFrm* pTabFrm = static_cast<const SwTabFrm*>( GetFrm() ); - return new SwAccessibleTableData_Impl( *(GetMap()), pTabFrm, IsInPagePreview(), true ); + const SwTabFrame* pTabFrame = static_cast<const SwTabFrame*>( GetFrame() ); + return new SwAccessibleTableData_Impl( *(GetMap()), pTabFrame, IsInPagePreview(), true ); } void SwAccessibleTableColHeaders::Modify( const SfxPoolItem * /*pOld*/, const SfxPoolItem * /*pNew*/ ) @@ -1902,8 +1902,8 @@ sal_Int32 SAL_CALL SwAccessibleTableColHeaders::getAccessibleChildCount() sal_Int32 nCount = 0; - const SwTabFrm* pTabFrm = static_cast<const SwTabFrm*>( GetFrm() ); - const SwAccessibleChildSList aVisList( GetVisArea(), *pTabFrm, *(GetMap()) ); + const SwTabFrame* pTabFrame = static_cast<const SwTabFrame*>( GetFrame() ); + const SwAccessibleChildSList aVisList( GetVisArea(), *pTabFrame, *(GetMap()) ); SwAccessibleChildSList::const_iterator aIter( aVisList.begin() ); while( aIter != aVisList.end() ) { @@ -1912,15 +1912,15 @@ sal_Int32 SAL_CALL SwAccessibleTableColHeaders::getAccessibleChildCount() { nCount++; } - else if( rLower.GetSwFrm() ) + else if( rLower.GetSwFrame() ) { // There are no unaccessible SdrObjects that count - if ( !rLower.GetSwFrm()->IsRowFrm() || - pTabFrm->IsInHeadline( *(rLower.GetSwFrm()) ) ) + if ( !rLower.GetSwFrame()->IsRowFrame() || + pTabFrame->IsInHeadline( *(rLower.GetSwFrame()) ) ) { nCount += SwAccessibleFrame::GetChildCount( *(GetMap()), GetVisArea(), - rLower.GetSwFrm(), + rLower.GetSwFrame(), IsInPagePreview() ); } } diff --git a/sw/source/core/access/acctable.hxx b/sw/source/core/access/acctable.hxx index b2f3800b44c1..8afd565b5c14 100644 --- a/sw/source/core/access/acctable.hxx +++ b/sw/source/core/access/acctable.hxx @@ -27,7 +27,7 @@ #include <acccontext.hxx> -class SwTabFrm; +class SwTabFrame; class SwAccessibleTableData_Impl; class SwTableBox; class SwSelBoxes; @@ -86,7 +86,7 @@ protected: virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) override; public: - SwAccessibleTable( SwAccessibleMap* pInitMap, const SwTabFrm* pTableFrm ); + SwAccessibleTable( SwAccessibleMap* pInitMap, const SwTabFrame* pTableFrame ); // XInterface @@ -226,10 +226,10 @@ public: // The object is not visible an longer and should be destroyed virtual void Dispose( bool bRecursive = false ) override; - virtual void DisposeChild( const sw::access::SwAccessibleChild& rFrmOrObj, + virtual void DisposeChild( const sw::access::SwAccessibleChild& rFrameOrObj, bool bRecursive ) override; - virtual void InvalidateChildPosOrSize( const sw::access::SwAccessibleChild& rFrmOrObj, - const SwRect& rFrm ) override; + virtual void InvalidateChildPosOrSize( const sw::access::SwAccessibleChild& rFrameOrObj, + const SwRect& rFrame ) override; // XAccessibleSelection @@ -292,7 +292,7 @@ protected: virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) override; public: - SwAccessibleTableColHeaders( SwAccessibleMap *pMap, const SwTabFrm *pTabFrm ); + SwAccessibleTableColHeaders( SwAccessibleMap *pMap, const SwTabFrame *pTabFrame ); // XInterface diff --git a/sw/source/core/access/acctextframe.cxx b/sw/source/core/access/acctextframe.cxx index ae2bc97feb5f..ac338185363d 100644 --- a/sw/source/core/access/acctextframe.cxx +++ b/sw/source/core/access/acctextframe.cxx @@ -45,13 +45,13 @@ using ::com::sun::star::accessibility::XAccessibleContext; SwAccessibleTextFrame::SwAccessibleTextFrame( SwAccessibleMap* pInitMap, - const SwFlyFrm& rFlyFrm ) : - SwAccessibleFrameBase( pInitMap, AccessibleRole::TEXT_FRAME, &rFlyFrm ), + const SwFlyFrame& rFlyFrame ) : + SwAccessibleFrameBase( pInitMap, AccessibleRole::TEXT_FRAME, &rFlyFrame ), msTitle(), msDesc() { const SwFlyFrameFormat* pFlyFrameFormat = - dynamic_cast<const SwFlyFrameFormat*>( rFlyFrm.GetFormat() ); + dynamic_cast<const SwFlyFrameFormat*>( rFlyFrame.GetFormat() ); msTitle = pFlyFrameFormat->GetObjTitle(); msDesc = pFlyFrameFormat->GetObjDescription(); @@ -77,7 +77,7 @@ void SwAccessibleTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem * SwAccessibleFrameBase::Modify( pOld, pNew ); } - const SwFlyFrm *pFlyFrm = static_cast< const SwFlyFrm * >( GetFrm() ); + const SwFlyFrame *pFlyFrame = static_cast< const SwFlyFrame * >( GetFrame() ); switch( nWhich ) { // #i73249# @@ -102,7 +102,7 @@ void SwAccessibleTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem * FireAccessibleEvent( aEvent ); const SwFlyFrameFormat* pFlyFrameFormat = - dynamic_cast<const SwFlyFrameFormat*>( pFlyFrm->GetFormat() ); + dynamic_cast<const SwFlyFrameFormat*>( pFlyFrame->GetFormat() ); if (!pFlyFrameFormat || !pFlyFrameFormat->GetObjDescription().isEmpty()) { break; @@ -111,12 +111,12 @@ void SwAccessibleTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem * // intentionally no break here case RES_DESCRIPTION_CHANGED: { - if ( pFlyFrm ) + if ( pFlyFrame ) { const OUString sOldDesc( msDesc ); const SwFlyFrameFormat* pFlyFrameFormat = - dynamic_cast<const SwFlyFrameFormat*>( pFlyFrm->GetFormat() ); + dynamic_cast<const SwFlyFrameFormat*>( pFlyFrame->GetFormat() ); const OUString& rDesc = pFlyFrameFormat->GetObjDescription(); msDesc = rDesc; if ( msDesc.isEmpty() && @@ -305,23 +305,23 @@ uno::Sequence< sal_Int8 > SAL_CALL SwAccessibleTextFrame::getImplementationId() // XAccessibleRelationSet -SwFlyFrm* SwAccessibleTextFrame::getFlyFrm() const +SwFlyFrame* SwAccessibleTextFrame::getFlyFrame() const { - SwFlyFrm* pFlyFrm = nullptr; + SwFlyFrame* pFlyFrame = nullptr; - const SwFrm* pFrm = GetFrm(); - assert(pFrm); - if( pFrm->IsFlyFrm() ) + const SwFrame* pFrame = GetFrame(); + assert(pFrame); + if( pFrame->IsFlyFrame() ) { - pFlyFrm = static_cast<SwFlyFrm*>( const_cast<SwFrm*>( pFrm ) ); + pFlyFrame = static_cast<SwFlyFrame*>( const_cast<SwFrame*>( pFrame ) ); } - return pFlyFrm; + return pFlyFrame; } -AccessibleRelation SwAccessibleTextFrame::makeRelation( sal_Int16 nType, const SwFlyFrm* pFrm ) +AccessibleRelation SwAccessibleTextFrame::makeRelation( sal_Int16 nType, const SwFlyFrame* pFrame ) { - uno::Sequence<uno::Reference<XInterface> > aSequence { GetMap()->GetContext( pFrm ) }; + uno::Sequence<uno::Reference<XInterface> > aSequence { GetMap()->GetContext( pFrame ) }; return AccessibleRelation( nType, aSequence ); } @@ -335,18 +335,18 @@ uno::Reference<XAccessibleRelationSet> SAL_CALL SwAccessibleTextFrame::getAccess AccessibleRelationSetHelper* pHelper = new AccessibleRelationSetHelper(); - SwFlyFrm* pFlyFrm = getFlyFrm(); - assert(pFlyFrm); + SwFlyFrame* pFlyFrame = getFlyFrame(); + assert(pFlyFrame); - const SwFlyFrm* pPrevFrm = pFlyFrm->GetPrevLink(); - if( pPrevFrm != nullptr ) + const SwFlyFrame* pPrevFrame = pFlyFrame->GetPrevLink(); + if( pPrevFrame != nullptr ) pHelper->AddRelation( makeRelation( - AccessibleRelationType::CONTENT_FLOWS_FROM, pPrevFrm ) ); + AccessibleRelationType::CONTENT_FLOWS_FROM, pPrevFrame ) ); - const SwFlyFrm* pNextFrm = pFlyFrm->GetNextLink(); - if( pNextFrm != nullptr ) + const SwFlyFrame* pNextFrame = pFlyFrame->GetNextLink(); + if( pNextFrame != nullptr ) pHelper->AddRelation( makeRelation( - AccessibleRelationType::CONTENT_FLOWS_TO, pNextFrm ) ); + AccessibleRelationType::CONTENT_FLOWS_TO, pNextFrame ) ); return pHelper; } diff --git a/sw/source/core/access/acctextframe.hxx b/sw/source/core/access/acctextframe.hxx index d276c65656e2..f5420c979753 100644 --- a/sw/source/core/access/acctextframe.hxx +++ b/sw/source/core/access/acctextframe.hxx @@ -24,7 +24,7 @@ #include <com/sun/star/accessibility/XAccessibleSelection.hpp> -class SwFlyFrm; +class SwFlyFrame; namespace utl { class AccessibleRelationSetHelper; } namespace com { namespace star { namespace accessibility { struct AccessibleRelation; } @@ -43,7 +43,7 @@ protected: virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) override; public: - SwAccessibleTextFrame( SwAccessibleMap* pInitMap, const SwFlyFrm& rFlyFrm ); + SwAccessibleTextFrame( SwAccessibleMap* pInitMap, const SwFlyFrame& rFlyFrame ); virtual css::uno::Any SAL_CALL queryInterface( css::uno::Type const & rType ) @@ -122,10 +122,10 @@ public: private: // helper methods for getAccessibleRelationSet: - SwFlyFrm* getFlyFrm() const; + SwFlyFrame* getFlyFrame() const; css::accessibility::AccessibleRelation makeRelation( - sal_Int16 nType, const SwFlyFrm* pFrm ); + sal_Int16 nType, const SwFlyFrame* pFrame ); public: virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet> SAL_CALL getAccessibleRelationSet() diff --git a/sw/source/core/access/parachangetrackinginfo.cxx b/sw/source/core/access/parachangetrackinginfo.cxx index 3ab9b8a5d593..938d77975632 100644 --- a/sw/source/core/access/parachangetrackinginfo.cxx +++ b/sw/source/core/access/parachangetrackinginfo.cxx @@ -31,7 +31,7 @@ #include <algorithm> namespace { - void initChangeTrackTextMarkupLists( const SwTextFrm& rTextFrm, + void initChangeTrackTextMarkupLists( const SwTextFrame& rTextFrame, SwWrongList*& opChangeTrackInsertionTextMarkupList, SwWrongList*& opChangeTrackDeletionTextMarkupList, SwWrongList*& opChangeTrackFormatChangeTextMarkupList ) @@ -40,12 +40,12 @@ namespace { opChangeTrackDeletionTextMarkupList = new SwWrongList( WRONGLIST_CHANGETRACKING ); opChangeTrackFormatChangeTextMarkupList = new SwWrongList( WRONGLIST_CHANGETRACKING ); - if ( !rTextFrm.GetTextNode() ) + if ( !rTextFrame.GetTextNode() ) { OSL_FAIL( "<initChangeTrackTextMarkupLists(..) - missing <SwTextNode> instance!" ); return; } - const SwTextNode& rTextNode( *(rTextFrm.GetTextNode()) ); + const SwTextNode& rTextNode( *(rTextFrame.GetTextNode()) ); const IDocumentRedlineAccess& rIDocChangeTrack( rTextNode.getIDocumentRedlineAccess() ); @@ -64,12 +64,12 @@ namespace { return; } - const sal_Int32 nTextFrmTextStartPos = rTextFrm.IsFollow() - ? rTextFrm.GetOfst() + const sal_Int32 nTextFrameTextStartPos = rTextFrame.IsFollow() + ? rTextFrame.GetOfst() : 0; - const sal_Int32 nTextFrmTextEndPos = rTextFrm.HasFollow() - ? rTextFrm.GetFollow()->GetOfst() - : rTextFrm.GetText().getLength(); + const sal_Int32 nTextFrameTextEndPos = rTextFrame.HasFollow() + ? rTextFrame.GetFollow()->GetOfst() + : rTextFrame.GetText().getLength(); // iteration over the redlines which overlap with the text node. const SwRedlineTable& rRedlineTable = rIDocChangeTrack.GetRedlineTable(); @@ -89,8 +89,8 @@ namespace { pActRedline->CalcStartEnd( rTextNode.GetIndex(), nTextNodeChangeTrackStart, nTextNodeChangeTrackEnd ); - if ( nTextNodeChangeTrackStart > nTextFrmTextEndPos || - nTextNodeChangeTrackEnd < nTextFrmTextStartPos ) + if ( nTextNodeChangeTrackStart > nTextFrameTextEndPos || + nTextNodeChangeTrackEnd < nTextFrameTextStartPos ) { // Consider only redlines which overlap with the text frame's text. continue; @@ -121,23 +121,23 @@ namespace { } if ( pMarkupList ) { - const sal_Int32 nTextFrmChangeTrackStart = - std::max(nTextNodeChangeTrackStart, nTextFrmTextStartPos); + const sal_Int32 nTextFrameChangeTrackStart = + std::max(nTextNodeChangeTrackStart, nTextFrameTextStartPos); - const sal_Int32 nTextFrmChangeTrackEnd = - std::min(nTextNodeChangeTrackEnd, nTextFrmTextEndPos); + const sal_Int32 nTextFrameChangeTrackEnd = + std::min(nTextNodeChangeTrackEnd, nTextFrameTextEndPos); pMarkupList->Insert( OUString(), nullptr, - nTextFrmChangeTrackStart, - nTextFrmChangeTrackEnd - nTextFrmChangeTrackStart, + nTextFrameChangeTrackStart, + nTextFrameChangeTrackEnd - nTextFrameChangeTrackStart, pMarkupList->Count() ); } } // eof iteration over the redlines which overlap with the text node } } // eof anonymous namespace -SwParaChangeTrackingInfo::SwParaChangeTrackingInfo( const SwTextFrm& rTextFrm ) - : mrTextFrm( rTextFrm ) +SwParaChangeTrackingInfo::SwParaChangeTrackingInfo( const SwTextFrame& rTextFrame ) + : mrTextFrame( rTextFrame ) , mpChangeTrackInsertionTextMarkupList( nullptr ) , mpChangeTrackDeletionTextMarkupList( nullptr ) , mpChangeTrackFormatChangeTextMarkupList( nullptr ) @@ -171,7 +171,7 @@ const SwWrongList* SwParaChangeTrackingInfo::getChangeTrackingTextMarkupList( co "<SwParaChangeTrackingInfo::getChangeTrackingTextMarkupList(..) - <mpChangeTrackDeletionTextMarkupList> expected to be NULL." ); OSL_ENSURE( mpChangeTrackFormatChangeTextMarkupList == nullptr, "<SwParaChangeTrackingInfo::getChangeTrackingTextMarkupList(..) - <mpChangeTrackFormatChangeTextMarkupList> expected to be NULL." ); - initChangeTrackTextMarkupLists( mrTextFrm, + initChangeTrackTextMarkupLists( mrTextFrame, mpChangeTrackInsertionTextMarkupList, mpChangeTrackDeletionTextMarkupList, mpChangeTrackFormatChangeTextMarkupList ); diff --git a/sw/source/core/access/parachangetrackinginfo.hxx b/sw/source/core/access/parachangetrackinginfo.hxx index d25a50ca0726..4a83beedc5d5 100644 --- a/sw/source/core/access/parachangetrackinginfo.hxx +++ b/sw/source/core/access/parachangetrackinginfo.hxx @@ -22,13 +22,13 @@ #include <sal/types.h> -class SwTextFrm; +class SwTextFrame; class SwWrongList; class SwParaChangeTrackingInfo { public: - explicit SwParaChangeTrackingInfo( const SwTextFrm& rTextFrm ); + explicit SwParaChangeTrackingInfo( const SwTextFrame& rTextFrame ); ~SwParaChangeTrackingInfo(); void reset(); @@ -39,7 +39,7 @@ class SwParaChangeTrackingInfo SwParaChangeTrackingInfo( const SwParaChangeTrackingInfo& ) = delete; SwParaChangeTrackingInfo& operator=( const SwParaChangeTrackingInfo& ) = delete; - const SwTextFrm& mrTextFrm; + const SwTextFrame& mrTextFrame; SwWrongList* mpChangeTrackInsertionTextMarkupList; SwWrongList* mpChangeTrackDeletionTextMarkupList; diff --git a/sw/source/core/attr/calbck.cxx b/sw/source/core/attr/calbck.cxx index e98cd5cac8ca..8c671de14cee 100644 --- a/sw/source/core/attr/calbck.cxx +++ b/sw/source/core/attr/calbck.cxx @@ -91,7 +91,7 @@ SwModify::~SwModify() OSL_ENSURE( !IsModifyLocked(), "Modify destroyed but locked." ); if ( IsInCache() ) - SwFrm::GetCache().Delete( this ); + SwFrame::GetCache().Delete( this ); if ( IsInSwFntCache() ) pSwFontCache->Delete( this ); @@ -258,7 +258,7 @@ void SwModify::CheckCaching( const sal_uInt16 nWhich ) case RES_BREAK: if( IsInCache() ) { - SwFrm::GetCache().Delete( this ); + SwFrame::GetCache().Delete( this ); SetInCache( false ); } break; diff --git a/sw/source/core/attr/format.cxx b/sw/source/core/attr/format.cxx index 1c86b77d92e2..d350b3278519 100644 --- a/sw/source/core/attr/format.cxx +++ b/sw/source/core/attr/format.cxx @@ -40,9 +40,9 @@ using namespace com::sun::star; SwFormat::SwFormat( SwAttrPool& rPool, const sal_Char* pFormatNm, - const sal_uInt16* pWhichRanges, SwFormat *pDrvdFrm, + const sal_uInt16* pWhichRanges, SwFormat *pDrvdFrame, sal_uInt16 nFormatWhich ) - : SwModify( pDrvdFrm ), + : SwModify( pDrvdFrame ), m_aFormatName( OUString::createFromAscii(pFormatNm) ), m_aSet( rPool, pWhichRanges ), m_nWhichId( nFormatWhich ), @@ -54,14 +54,14 @@ SwFormat::SwFormat( SwAttrPool& rPool, const sal_Char* pFormatNm, m_bAutoFormat = true; m_bWritten = m_bFormatInDTOR = m_bHidden = false; - if( pDrvdFrm ) - m_aSet.SetParent( &pDrvdFrm->m_aSet ); + if( pDrvdFrame ) + m_aSet.SetParent( &pDrvdFrame->m_aSet ); } SwFormat::SwFormat( SwAttrPool& rPool, const OUString& rFormatNm, - const sal_uInt16* pWhichRanges, SwFormat* pDrvdFrm, + const sal_uInt16* pWhichRanges, SwFormat* pDrvdFrame, sal_uInt16 nFormatWhich ) - : SwModify( pDrvdFrm ), + : SwModify( pDrvdFrame ), m_aFormatName( rFormatNm ), m_aSet( rPool, pWhichRanges ), m_nWhichId( nFormatWhich ), @@ -73,8 +73,8 @@ SwFormat::SwFormat( SwAttrPool& rPool, const OUString& rFormatNm, m_bAutoFormat = true; m_bWritten = m_bFormatInDTOR = m_bHidden = false; - if( pDrvdFrm ) - m_aSet.SetParent( &pDrvdFrm->m_aSet ); + if( pDrvdFrame ) + m_aSet.SetParent( &pDrvdFrame->m_aSet ); } SwFormat::SwFormat( const SwFormat& rFormat ) @@ -106,7 +106,7 @@ SwFormat &SwFormat::operator=(const SwFormat& rFormat) if ( IsInCache() ) { - SwFrm::GetCache().Delete( this ); + SwFrame::GetCache().Delete( this ); SetInCache( false ); } SetInSwFntCache( false ); @@ -180,7 +180,7 @@ void SwFormat::CopyAttrs( const SwFormat& rFormat, bool bReplace ) // copy only array with attributes delta if ( IsInCache() ) { - SwFrm::GetCache().Delete( this ); + SwFrame::GetCache().Delete( this ); SetInCache( false ); } SetInSwFntCache( false ); @@ -376,7 +376,7 @@ bool SwFormat::SetDerivedFrom(SwFormat *pDerFrom) if ( IsInCache() ) { - SwFrm::GetCache().Delete( this ); + SwFrame::GetCache().Delete( this ); SetInCache( false ); } SetInSwFntCache( false ); @@ -571,7 +571,7 @@ bool SwFormat::SetFormatAttr( const SfxItemSet& rSet ) if ( IsInCache() ) { - SwFrm::GetCache().Delete( this ); + SwFrame::GetCache().Delete( this ); SetInCache( false ); } SetInSwFntCache( false ); @@ -707,7 +707,7 @@ sal_uInt16 SwFormat::ResetAllFormatAttr() if ( IsInCache() ) { - SwFrm::GetCache().Delete( this ); + SwFrame::GetCache().Delete( this ); SetInCache( false ); } SetInSwFntCache( false ); @@ -740,7 +740,7 @@ void SwFormat::DelDiffs( const SfxItemSet& rSet ) if ( IsInCache() ) { - SwFrm::GetCache().Delete( this ); + SwFrame::GetCache().Delete( this ); SetInCache( false ); } SetInSwFntCache( false ); diff --git a/sw/source/core/attr/hints.cxx b/sw/source/core/attr/hints.cxx index 04176ba1e703..32f92d7bf444 100644 --- a/sw/source/core/attr/hints.cxx +++ b/sw/source/core/attr/hints.cxx @@ -144,8 +144,8 @@ SwCondCollCondChg::SwCondCollCondChg( SwFormat *pFormat ) { } -SwVirtPageNumInfo::SwVirtPageNumInfo( const SwPageFrm *pPg ) : - SwMsgPoolItem( RES_VIRTPAGENUM_INFO ), m_pPage( nullptr ), m_pOrigPage( pPg ), m_pFrm( nullptr ) +SwVirtPageNumInfo::SwVirtPageNumInfo( const SwPageFrame *pPg ) : + SwMsgPoolItem( RES_VIRTPAGENUM_INFO ), m_pPage( nullptr ), m_pOrigPage( pPg ), m_pFrame( nullptr ) { } diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx index 7864657a54e0..f03a943cc74f 100644 --- a/sw/source/core/bastyp/calc.cxx +++ b/sw/source/core/bastyp/calc.cxx @@ -629,18 +629,18 @@ void SwCalc::VarChange( const OUString& rStr, const SwSbxValue& rValue ) bool SwCalc::Push( const SwUserFieldType* pUserFieldType ) { - if( aRekurStk.end() != std::find(aRekurStk.begin(), aRekurStk.end(), pUserFieldType ) ) + if( aRekurStack.end() != std::find(aRekurStack.begin(), aRekurStack.end(), pUserFieldType ) ) return false; - aRekurStk.push_back( pUserFieldType ); + aRekurStack.push_back( pUserFieldType ); return true; } void SwCalc::Pop() { - OSL_ENSURE( aRekurStk.size(), "SwCalc: Pop on an invalid pointer" ); + OSL_ENSURE( aRekurStack.size(), "SwCalc: Pop on an invalid pointer" ); - aRekurStk.pop_back(); + aRekurStack.pop_back(); } SwCalcOper SwCalc::GetToken() diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx index 35c59bffc556..f82193b32177 100644 --- a/sw/source/core/bastyp/init.cxx +++ b/sw/source/core/bastyp/init.cxx @@ -573,7 +573,7 @@ void _InitCore() aAttrTab[ RES_PARATR_LIST_ISCOUNTED - POOLATTR_BEGIN ] = new SfxBoolItem( RES_PARATR_LIST_ISCOUNTED, true ); aAttrTab[ RES_FILL_ORDER- POOLATTR_BEGIN ] = new SwFormatFillOrder; - aAttrTab[ RES_FRM_SIZE- POOLATTR_BEGIN ] = new SwFormatFrmSize; + aAttrTab[ RES_FRM_SIZE- POOLATTR_BEGIN ] = new SwFormatFrameSize; aAttrTab[ RES_PAPER_BIN- POOLATTR_BEGIN ] = new SvxPaperBinItem( RES_PAPER_BIN ); aAttrTab[ RES_LR_SPACE- POOLATTR_BEGIN ] = new SvxLRSpaceItem( RES_LR_SPACE ); aAttrTab[ RES_UL_SPACE- POOLATTR_BEGIN ] = new SvxULSpaceItem( RES_UL_SPACE ); @@ -733,7 +733,7 @@ void _InitCore() SwBreakIt::_Create( ::comphelper::getProcessComponentContext() ); pCheckIt = nullptr; - _FrmInit(); + _FrameInit(); _TextInit(); SwSelPaintRects::s_pMapMode = new MapMode; @@ -755,7 +755,7 @@ void _InitCore() void _FinitCore() { - _FrmFinit(); + _FrameFinit(); _TextFinit(); sw::proofreadingiterator::dispose(); diff --git a/sw/source/core/bastyp/swtypes.cxx b/sw/source/core/bastyp/swtypes.cxx index 0910dd967beb..8446e63ddb42 100644 --- a/sw/source/core/bastyp/swtypes.cxx +++ b/sw/source/core/bastyp/swtypes.cxx @@ -57,22 +57,22 @@ IMPL_FIXEDMEMPOOL_NEWDEL( SwUndoDelete ) IMPL_FIXEDMEMPOOL_NEWDEL( SwUndoInsert ) IMPL_FIXEDMEMPOOL_NEWDEL( SwPaM ) IMPL_FIXEDMEMPOOL_NEWDEL( SwCursor ) -IMPL_FIXEDMEMPOOL_NEWDEL( SwShellCrsr ) +IMPL_FIXEDMEMPOOL_NEWDEL( SwShellCursor ) IMPL_FIXEDMEMPOOL_NEWDEL( SwTextNode ) IMPL_FIXEDMEMPOOL_NEWDEL( SwpHints ) IMPL_FIXEDMEMPOOL_NEWDEL( SwFntObj ) IMPL_FIXEDMEMPOOL_NEWDEL( SwFontObj ) IMPL_FIXEDMEMPOOL_NEWDEL( SwBorderAttrs ) -IMPL_FIXEDMEMPOOL_NEWDEL( SwCellFrm ) -IMPL_FIXEDMEMPOOL_NEWDEL( SwRowFrm ) -IMPL_FIXEDMEMPOOL_NEWDEL( SwColumnFrm ) -IMPL_FIXEDMEMPOOL_NEWDEL( SwSectionFrm ) -IMPL_FIXEDMEMPOOL_NEWDEL( SwTabFrm ) -IMPL_FIXEDMEMPOOL_NEWDEL( SwPageFrm ) -IMPL_FIXEDMEMPOOL_NEWDEL( SwBodyFrm ) -IMPL_FIXEDMEMPOOL_NEWDEL( SwHeaderFrm ) -IMPL_FIXEDMEMPOOL_NEWDEL( SwFooterFrm ) -IMPL_FIXEDMEMPOOL_NEWDEL( SwTextFrm ) +IMPL_FIXEDMEMPOOL_NEWDEL( SwCellFrame ) +IMPL_FIXEDMEMPOOL_NEWDEL( SwRowFrame ) +IMPL_FIXEDMEMPOOL_NEWDEL( SwColumnFrame ) +IMPL_FIXEDMEMPOOL_NEWDEL( SwSectionFrame ) +IMPL_FIXEDMEMPOOL_NEWDEL( SwTabFrame ) +IMPL_FIXEDMEMPOOL_NEWDEL( SwPageFrame ) +IMPL_FIXEDMEMPOOL_NEWDEL( SwBodyFrame ) +IMPL_FIXEDMEMPOOL_NEWDEL( SwHeaderFrame ) +IMPL_FIXEDMEMPOOL_NEWDEL( SwFooterFrame ) +IMPL_FIXEDMEMPOOL_NEWDEL( SwTextFrame ) IMPL_FIXEDMEMPOOL_NEWDEL( SwTableFormat ) IMPL_FIXEDMEMPOOL_NEWDEL( SwTableLineFormat ) IMPL_FIXEDMEMPOOL_NEWDEL( SwTableBoxFormat ) diff --git a/sw/source/core/crsr/BlockCursor.cxx b/sw/source/core/crsr/BlockCursor.cxx index e8a21ccdb74c..89c8d8f745fe 100644 --- a/sw/source/core/crsr/BlockCursor.cxx +++ b/sw/source/core/crsr/BlockCursor.cxx @@ -26,7 +26,7 @@ SwBlockCursor::~SwBlockCursor() delete pEndPt; } -SwShellCrsr& SwBlockCursor::getShellCrsr() +SwShellCursor& SwBlockCursor::getShellCursor() { return aCursor; } diff --git a/sw/source/core/crsr/BlockCursor.hxx b/sw/source/core/crsr/BlockCursor.hxx index a68b1117cc51..3238993c87cd 100644 --- a/sw/source/core/crsr/BlockCursor.hxx +++ b/sw/source/core/crsr/BlockCursor.hxx @@ -21,34 +21,34 @@ #include <crsrsh.hxx> -class SwCrsrShell; +class SwCursorShell; struct SwPosition; class Point; /** Access to the block cursor - A block cursor contains a SwShellCrsr and additional information about + A block cursor contains a SwShellCursor and additional information about the rectangle which has been created by pressing the mouse button and moving the mouse. - It's simply an aggregation of a SwShellCrsr and a rectangle defined by + It's simply an aggregation of a SwShellCursor and a rectangle defined by a start and an end point. */ class SwBlockCursor { - SwShellCrsr aCursor; + SwShellCursor aCursor; Point *pStartPt; Point *pEndPt; public: - SwBlockCursor( const SwCrsrShell& rCrsrSh, const SwPosition &rPos ) : - aCursor( rCrsrSh, rPos ), pStartPt(nullptr), pEndPt(nullptr) {} + SwBlockCursor( const SwCursorShell& rCursorSh, const SwPosition &rPos ) : + aCursor( rCursorSh, rPos ), pStartPt(nullptr), pEndPt(nullptr) {} /** Access to the shell cursor - @return SwShellCrsr& which represents the start and end position of the + @return SwShellCursor& which represents the start and end position of the current block selection */ - SwShellCrsr& getShellCrsr(); + SwShellCursor& getShellCursor(); /** Defines the starting vertex of the block selection @param rPt diff --git a/sw/source/core/crsr/callnk.cxx b/sw/source/core/crsr/callnk.cxx index f24c6fb9f3a5..e93a6c9d7014 100644 --- a/sw/source/core/crsr/callnk.cxx +++ b/sw/source/core/crsr/callnk.cxx @@ -36,31 +36,31 @@ #include <breakit.hxx> #include <vcl/window.hxx> -SwCallLink::SwCallLink( SwCrsrShell & rSh, sal_uLong nAktNode, sal_Int32 nAktContent, +SwCallLink::SwCallLink( SwCursorShell & rSh, sal_uLong nAktNode, sal_Int32 nAktContent, sal_uInt8 nAktNdTyp, long nLRPos, bool bAktSelection ) : rShell( rSh ), nNode( nAktNode ), nContent( nAktContent ), - nNdTyp( nAktNdTyp ), nLeftFrmPos( nLRPos ), + nNdTyp( nAktNdTyp ), nLeftFramePos( nLRPos ), bHasSelection( bAktSelection ) { } -SwCallLink::SwCallLink( SwCrsrShell & rSh ) +SwCallLink::SwCallLink( SwCursorShell & rSh ) : rShell( rSh ) { // remember SPoint-values of current cursor - SwPaM* pCrsr = rShell.IsTableMode() ? rShell.GetTableCrs() : rShell.GetCrsr(); - SwNode& rNd = pCrsr->GetPoint()->nNode.GetNode(); + SwPaM* pCursor = rShell.IsTableMode() ? rShell.GetTableCrs() : rShell.GetCursor(); + SwNode& rNd = pCursor->GetPoint()->nNode.GetNode(); nNode = rNd.GetIndex(); - nContent = pCrsr->GetPoint()->nContent.GetIndex(); + nContent = pCursor->GetPoint()->nContent.GetIndex(); nNdTyp = rNd.GetNodeType(); - bHasSelection = ( *pCrsr->GetPoint() != *pCrsr->GetMark() ); + bHasSelection = ( *pCursor->GetPoint() != *pCursor->GetMark() ); if( rNd.IsTextNode() ) - nLeftFrmPos = SwCallLink::getLayoutFrm( rShell.GetLayout(), *rNd.GetTextNode(), nContent, + nLeftFramePos = SwCallLink::getLayoutFrame( rShell.GetLayout(), *rNd.GetTextNode(), nContent, !rShell.ActionPend() ); else { - nLeftFrmPos = 0; + nLeftFramePos = 0; // A special treatment for SwFeShell: // When deleting the header/footer, footnotes SwFeShell sets the @@ -72,30 +72,30 @@ SwCallLink::SwCallLink( SwCrsrShell & rSh ) } } -static void lcl_notifyRow(const SwContentNode* pNode, SwCrsrShell& rShell) +static void lcl_notifyRow(const SwContentNode* pNode, SwCursorShell& rShell) { if ( !pNode ) return; - SwFrm *const pMyFrm = pNode->getLayoutFrm( rShell.GetLayout() ); - if ( !pMyFrm ) + SwFrame *const pMyFrame = pNode->getLayoutFrame( rShell.GetLayout() ); + if ( !pMyFrame ) return; // We need to emulated a change of the row height in order // to have the complete row redrawn - SwRowFrm *const pRow = pMyFrm->FindRowFrm(); + SwRowFrame *const pRow = pMyFrame->FindRowFrame(); if ( !pRow ) return; const SwTableLine* pLine = pRow->GetTabLine( ); // Avoid redrawing the complete row if there are no nested tables - for (SwFrm *pCell = pRow->GetLower(); pCell; pCell = pCell->GetNext()) + for (SwFrame *pCell = pRow->GetLower(); pCell; pCell = pCell->GetNext()) { - for (SwFrm *pContent = pCell->GetLower(); pContent; pContent = pContent->GetNext()) + for (SwFrame *pContent = pCell->GetLower(); pContent; pContent = pContent->GetNext()) { if (pContent->GetType() == FRM_TAB) { - SwFormatFrmSize pSize = pLine->GetFrameFormat()->GetFrmSize(); + SwFormatFrameSize pSize = pLine->GetFrameFormat()->GetFrameSize(); pRow->ModifyNotification(nullptr, &pSize); return; } @@ -110,8 +110,8 @@ SwCallLink::~SwCallLink() // If travelling over Nodes check formats and register them anew at the // new Node. - SwPaM* pCurCrsr = rShell.IsTableMode() ? rShell.GetTableCrs() : rShell.GetCrsr(); - SwContentNode * pCNd = pCurCrsr->GetContentNode(); + SwPaM* pCurrentCursor = rShell.IsTableMode() ? rShell.GetTableCrs() : rShell.GetCursor(); + SwContentNode * pCNd = pCurrentCursor->GetContentNode(); if( !pCNd ) return; @@ -125,9 +125,9 @@ SwCallLink::~SwCallLink() } lcl_notifyRow(pNode, rShell); - sal_Int32 nCmp, nAktContent = pCurCrsr->GetPoint()->nContent.GetIndex(); + sal_Int32 nCmp, nAktContent = pCurrentCursor->GetPoint()->nContent.GetIndex(); sal_uInt16 nNdWhich = pCNd->GetNodeType(); - sal_uLong nAktNode = pCurCrsr->GetPoint()->nNode.GetIndex(); + sal_uLong nAktNode = pCurrentCursor->GetPoint()->nNode.GetIndex(); // Register the Shell as dependent at the current Node. By doing this all // attribute changes can be signaled over the link. @@ -141,7 +141,7 @@ SwCallLink::~SwCallLink() // That can be done in one go by the handler. rShell.CallChgLnk(); } - else if( !bHasSelection != !(*pCurCrsr->GetPoint() != *pCurCrsr->GetMark()) ) + else if( !bHasSelection != !(*pCurrentCursor->GetPoint() != *pCurrentCursor->GetMark()) ) { // always call change link when selection changes rShell.CallChgLnk(); @@ -151,12 +151,12 @@ SwCallLink::~SwCallLink() { // If travelling with left/right only and the frame is // unchanged (columns!) then check text hints. - if( nLeftFrmPos == SwCallLink::getLayoutFrm( rShell.GetLayout(), *pCNd->GetTextNode(), nAktContent, + if( nLeftFramePos == SwCallLink::getLayoutFrame( rShell.GetLayout(), *pCNd->GetTextNode(), nAktContent, !rShell.ActionPend() ) && (( nCmp = nContent ) + 1 == nAktContent || // Right nContent -1 == ( nCmp = nAktContent )) ) // Left { - if( nCmp == nAktContent && pCurCrsr->HasMark() ) // left & select + if( nCmp == nAktContent && pCurrentCursor->HasMark() ) // left & select ++nCmp; if ( pCNd->GetTextNode()->HasHints() ) @@ -210,12 +210,12 @@ SwCallLink::~SwCallLink() rShell.CallChgLnk(); } - const SwFrm* pFrm; - const SwFlyFrm *pFlyFrm; - if( !rShell.ActionPend() && nullptr != ( pFrm = pCNd->getLayoutFrm(rShell.GetLayout(), nullptr, nullptr, false) ) && - nullptr != ( pFlyFrm = pFrm->FindFlyFrm() ) && !rShell.IsTableMode() ) + const SwFrame* pFrame; + const SwFlyFrame *pFlyFrame; + if( !rShell.ActionPend() && nullptr != ( pFrame = pCNd->getLayoutFrame(rShell.GetLayout(), nullptr, nullptr, false) ) && + nullptr != ( pFlyFrame = pFrame->FindFlyFrame() ) && !rShell.IsTableMode() ) { - const SwNodeIndex* pIndex = pFlyFrm->GetFormat()->GetContent().GetContentIdx(); + const SwNodeIndex* pIndex = pFlyFrame->GetFormat()->GetContent().GetContentIdx(); OSL_ENSURE( pIndex, "Fly without Content" ); if (!pIndex) @@ -225,22 +225,22 @@ SwCallLink::~SwCallLink() if( rStNd.EndOfSectionNode()->StartOfSectionIndex() > nNode || nNode > rStNd.EndOfSectionIndex() ) - rShell.GetFlyMacroLnk().Call( pFlyFrm->GetFormat() ); + rShell.GetFlyMacroLnk().Call( pFlyFrame->GetFormat() ); } } -long SwCallLink::getLayoutFrm( const SwRootFrm* pRoot, SwTextNode& rNd, sal_Int32 nCntPos, bool bCalcFrm ) +long SwCallLink::getLayoutFrame( const SwRootFrame* pRoot, SwTextNode& rNd, sal_Int32 nCntPos, bool bCalcFrame ) { - SwTextFrm* pFrm = static_cast<SwTextFrm*>(rNd.getLayoutFrm(pRoot,nullptr,nullptr,bCalcFrm)); - SwTextFrm* pNext; - if ( pFrm && !pFrm->IsHiddenNow() ) + SwTextFrame* pFrame = static_cast<SwTextFrame*>(rNd.getLayoutFrame(pRoot,nullptr,nullptr,bCalcFrame)); + SwTextFrame* pNext; + if ( pFrame && !pFrame->IsHiddenNow() ) { - if( pFrm->HasFollow() ) - while( nullptr != ( pNext = pFrm->GetFollow() ) && + if( pFrame->HasFollow() ) + while( nullptr != ( pNext = pFrame->GetFollow() ) && nCntPos >= pNext->GetOfst() ) - pFrm = pNext; + pFrame = pNext; - return pFrm->Frm().Left(); + return pFrame->Frame().Left(); } return 0; } diff --git a/sw/source/core/crsr/callnk.hxx b/sw/source/core/crsr/callnk.hxx index b0aebe7aa21b..d2a7b4df4643 100644 --- a/sw/source/core/crsr/callnk.hxx +++ b/sw/source/core/crsr/callnk.hxx @@ -22,27 +22,27 @@ #include <tools/solar.h> -class SwCrsrShell; +class SwCursorShell; class SwTextNode; -class SwRootFrm; +class SwRootFrame; class SwCallLink { public: - SwCrsrShell & rShell; + SwCursorShell & rShell; sal_uLong nNode; sal_Int32 nContent; sal_uInt8 nNdTyp; - long nLeftFrmPos; + long nLeftFramePos; bool bHasSelection; - explicit SwCallLink( SwCrsrShell & rSh ); - SwCallLink( SwCrsrShell & rSh, sal_uLong nAktNode, sal_Int32 nAktContent, + explicit SwCallLink( SwCursorShell & rSh ); + SwCallLink( SwCursorShell & rSh, sal_uLong nAktNode, sal_Int32 nAktContent, sal_uInt8 nAktNdTyp, long nLRPos, bool bAktSelection ); ~SwCallLink(); - static long getLayoutFrm( const SwRootFrm*, SwTextNode& rNd, sal_Int32 nCntPos, bool bCalcFrm ); + static long getLayoutFrame( const SwRootFrame*, SwTextNode& rNd, sal_Int32 nCntPos, bool bCalcFrame ); }; #endif // INCLUDED_SW_SOURCE_CORE_CRSR_CALLNK_HXX diff --git a/sw/source/core/crsr/crbm.cxx b/sw/source/core/crsr/crbm.cxx index 8b55c24d62e9..91b6f3f10617 100644 --- a/sw/source/core/crsr/crbm.cxx +++ b/sw/source/core/crsr/crbm.cxx @@ -30,40 +30,40 @@ using namespace std; namespace { - struct CrsrStateHelper + struct CursorStateHelper { - explicit CrsrStateHelper(SwCrsrShell& rShell) + explicit CursorStateHelper(SwCursorShell& rShell) : m_aLink(rShell) - , m_pCrsr(rShell.GetSwCrsr()) - , m_aSaveState(*m_pCrsr) + , m_pCursor(rShell.GetSwCursor()) + , m_aSaveState(*m_pCursor) { } - void SetCrsrToMark(::sw::mark::IMark const * const pMark) + void SetCursorToMark(::sw::mark::IMark const * const pMark) { - *(m_pCrsr->GetPoint()) = pMark->GetMarkStart(); + *(m_pCursor->GetPoint()) = pMark->GetMarkStart(); if(pMark->IsExpanded()) { - m_pCrsr->SetMark(); - *(m_pCrsr->GetMark()) = pMark->GetMarkEnd(); + m_pCursor->SetMark(); + *(m_pCursor->GetMark()) = pMark->GetMarkEnd(); } } /// returns true if the Cursor had been rolled back bool RollbackIfIllegal() { - if(m_pCrsr->IsSelOvr(nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION + if(m_pCursor->IsSelOvr(nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION | nsSwCursorSelOverFlags::SELOVER_TOGGLE)) { - m_pCrsr->DeleteMark(); - m_pCrsr->RestoreSavePos(); + m_pCursor->DeleteMark(); + m_pCursor->RestoreSavePos(); return true; } return false; } SwCallLink m_aLink; - SwCursor* m_pCrsr; - SwCrsrSaveState m_aSaveState; + SwCursor* m_pCursor; + SwCursorSaveState m_aSaveState; }; static bool lcl_ReverseMarkOrderingByEnd(const IDocumentMarkAccess::pMark_t& rpFirst, @@ -78,8 +78,8 @@ namespace } } -// at CurCrsr.SPoint -::sw::mark::IMark* SwCrsrShell::SetBookmark( +// at CurrentCursor.SPoint +::sw::mark::IMark* SwCursorShell::SetBookmark( const vcl::KeyCode& rCode, const OUString& rName, const OUString& rShortName, @@ -87,7 +87,7 @@ namespace { StartAction(); ::sw::mark::IMark* pMark = getIDocumentMarkAccess()->makeMark( - *GetCrsr(), + *GetCursor(), rName, eMark); ::sw::mark::IBookmark* pBookmark = dynamic_cast< ::sw::mark::IBookmark* >(pMark); @@ -99,36 +99,36 @@ namespace EndAction(); return pMark; } -// set CurCrsr.SPoint +// set CurrentCursor.SPoint -bool SwCrsrShell::GotoMark(const ::sw::mark::IMark* const pMark, bool bAtStart) +bool SwCursorShell::GotoMark(const ::sw::mark::IMark* const pMark, bool bAtStart) { - // watch Crsr-Moves - CrsrStateHelper aCrsrSt(*this); + // watch Cursor-Moves + CursorStateHelper aCursorSt(*this); if ( bAtStart ) - *(aCrsrSt.m_pCrsr)->GetPoint() = pMark->GetMarkStart(); + *(aCursorSt.m_pCursor)->GetPoint() = pMark->GetMarkStart(); else - *(aCrsrSt.m_pCrsr)->GetPoint() = pMark->GetMarkEnd(); + *(aCursorSt.m_pCursor)->GetPoint() = pMark->GetMarkEnd(); - if(aCrsrSt.RollbackIfIllegal()) return false; + if(aCursorSt.RollbackIfIllegal()) return false; - UpdateCrsr(SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE|SwCrsrShell::READONLY); + UpdateCursor(SwCursorShell::SCROLLWIN|SwCursorShell::CHKRANGE|SwCursorShell::READONLY); return true; } -bool SwCrsrShell::GotoMark(const ::sw::mark::IMark* const pMark) +bool SwCursorShell::GotoMark(const ::sw::mark::IMark* const pMark) { - // watch Crsr-Moves - CrsrStateHelper aCrsrSt(*this); - aCrsrSt.SetCrsrToMark(pMark); + // watch Cursor-Moves + CursorStateHelper aCursorSt(*this); + aCursorSt.SetCursorToMark(pMark); - if(aCrsrSt.RollbackIfIllegal()) return false; + if(aCursorSt.RollbackIfIllegal()) return false; - UpdateCrsr(SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE|SwCrsrShell::READONLY); + UpdateCursor(SwCursorShell::SCROLLWIN|SwCursorShell::CHKRANGE|SwCursorShell::READONLY); return true; } -bool SwCrsrShell::GoNextBookmark() +bool SwCursorShell::GoNextBookmark() { IDocumentMarkAccess* pMarkAccess = getIDocumentMarkAccess(); IDocumentMarkAccess::container_t vCandidates; @@ -136,19 +136,19 @@ bool SwCrsrShell::GoNextBookmark() upper_bound( // finds the first that is starting after pMarkAccess->getBookmarksBegin(), pMarkAccess->getBookmarksEnd(), - *GetCrsr()->GetPoint(), + *GetCursor()->GetPoint(), sw::mark::CompareIMarkStartsAfter()), pMarkAccess->getBookmarksEnd(), back_inserter(vCandidates), &lcl_IsInvisibleBookmark); - // watch Crsr-Moves - CrsrStateHelper aCrsrSt(*this); + // watch Cursor-Moves + CursorStateHelper aCursorSt(*this); IDocumentMarkAccess::const_iterator_t ppMark = vCandidates.begin(); for(; ppMark!=vCandidates.end(); ++ppMark) { - aCrsrSt.SetCrsrToMark(ppMark->get()); - if(!aCrsrSt.RollbackIfIllegal()) + aCursorSt.SetCursorToMark(ppMark->get()); + if(!aCursorSt.RollbackIfIllegal()) break; // found legal move } if(ppMark==vCandidates.end()) @@ -157,11 +157,11 @@ bool SwCrsrShell::GoNextBookmark() return false; } - UpdateCrsr(SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE|SwCrsrShell::READONLY); + UpdateCursor(SwCursorShell::SCROLLWIN|SwCursorShell::CHKRANGE|SwCursorShell::READONLY); return true; } -bool SwCrsrShell::GoPrevBookmark() +bool SwCursorShell::GoPrevBookmark() { IDocumentMarkAccess* pMarkAccess = getIDocumentMarkAccess(); // candidates from which to choose the mark before @@ -172,7 +172,7 @@ bool SwCrsrShell::GoPrevBookmark() upper_bound( pMarkAccess->getBookmarksBegin(), pMarkAccess->getBookmarksEnd(), - *GetCrsr()->GetPoint(), + *GetCursor()->GetPoint(), sw::mark::CompareIMarkStartsAfter()), back_inserter(vCandidates), &lcl_IsInvisibleBookmark); @@ -181,19 +181,19 @@ bool SwCrsrShell::GoPrevBookmark() vCandidates.end(), &lcl_ReverseMarkOrderingByEnd); - // watch Crsr-Moves - CrsrStateHelper aCrsrSt(*this); + // watch Cursor-Moves + CursorStateHelper aCursorSt(*this); IDocumentMarkAccess::const_iterator_t ppMark = vCandidates.begin(); for(; ppMark!=vCandidates.end(); ++ppMark) { - // ignoring those not ending before the Crsr + // ignoring those not ending before the Cursor // (we were only able to eliminate those starting - // behind the Crsr by the upper_bound(..) + // behind the Cursor by the upper_bound(..) // above) - if(!(**ppMark).EndsBefore(*GetCrsr()->GetPoint())) + if(!(**ppMark).EndsBefore(*GetCursor()->GetPoint())) continue; - aCrsrSt.SetCrsrToMark(ppMark->get()); - if(!aCrsrSt.RollbackIfIllegal()) + aCursorSt.SetCursorToMark(ppMark->get()); + if(!aCursorSt.RollbackIfIllegal()) break; // found legal move } if(ppMark==vCandidates.end()) @@ -202,47 +202,47 @@ bool SwCrsrShell::GoPrevBookmark() return false; } - UpdateCrsr(SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE|SwCrsrShell::READONLY); + UpdateCursor(SwCursorShell::SCROLLWIN|SwCursorShell::CHKRANGE|SwCursorShell::READONLY); return true; } -bool SwCrsrShell::IsFormProtected() +bool SwCursorShell::IsFormProtected() { return getIDocumentSettingAccess().get(DocumentSettingId::PROTECT_FORM); } -::sw::mark::IFieldmark* SwCrsrShell::GetCurrentFieldmark() +::sw::mark::IFieldmark* SwCursorShell::GetCurrentFieldmark() { // TODO: Refactor - SwPosition pos(*GetCrsr()->GetPoint()); + SwPosition pos(*GetCursor()->GetPoint()); return getIDocumentMarkAccess()->getFieldmarkFor(pos); } -::sw::mark::IFieldmark* SwCrsrShell::GetFieldmarkAfter() +::sw::mark::IFieldmark* SwCursorShell::GetFieldmarkAfter() { - SwPosition pos(*GetCrsr()->GetPoint()); + SwPosition pos(*GetCursor()->GetPoint()); return getIDocumentMarkAccess()->getFieldmarkAfter(pos); } -::sw::mark::IFieldmark* SwCrsrShell::GetFieldmarkBefore() +::sw::mark::IFieldmark* SwCursorShell::GetFieldmarkBefore() { - SwPosition pos(*GetCrsr()->GetPoint()); + SwPosition pos(*GetCursor()->GetPoint()); return getIDocumentMarkAccess()->getFieldmarkBefore(pos); } -bool SwCrsrShell::GotoFieldmark(::sw::mark::IFieldmark const * const pMark) +bool SwCursorShell::GotoFieldmark(::sw::mark::IFieldmark const * const pMark) { if(pMark==nullptr) return false; - // watch Crsr-Moves - CrsrStateHelper aCrsrSt(*this); - aCrsrSt.SetCrsrToMark(pMark); - ++aCrsrSt.m_pCrsr->GetPoint()->nContent; - --aCrsrSt.m_pCrsr->GetMark()->nContent; + // watch Cursor-Moves + CursorStateHelper aCursorSt(*this); + aCursorSt.SetCursorToMark(pMark); + ++aCursorSt.m_pCursor->GetPoint()->nContent; + --aCursorSt.m_pCursor->GetMark()->nContent; - if(aCrsrSt.RollbackIfIllegal()) return false; + if(aCursorSt.RollbackIfIllegal()) return false; - UpdateCrsr(SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE|SwCrsrShell::READONLY); + UpdateCursor(SwCursorShell::SCROLLWIN|SwCursorShell::CHKRANGE|SwCursorShell::READONLY); return true; } diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 2ad23ba28c39..a3375beceeb0 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -78,19 +78,19 @@ using namespace util; void CheckRange( SwCursor* ); /** - * Check if pCurCrsr points into already existing ranges and delete those. + * Check if pCurrentCursor points into already existing ranges and delete those. * @param Pointer to SwCursor object */ -void CheckRange( SwCursor* pCurCrsr ) +void CheckRange( SwCursor* pCurrentCursor ) { - const SwPosition *pStt = pCurCrsr->Start(), - *pEnd = pCurCrsr->GetPoint() == pStt ? pCurCrsr->GetMark() : pCurCrsr->GetPoint(); + const SwPosition *pStt = pCurrentCursor->Start(), + *pEnd = pCurrentCursor->GetPoint() == pStt ? pCurrentCursor->GetMark() : pCurrentCursor->GetPoint(); SwPaM *pTmpDel = nullptr, - *pTmp = pCurCrsr->GetNext(); + *pTmp = pCurrentCursor->GetNext(); // Search the complete ring - while( pTmp != pCurCrsr ) + while( pTmp != pCurrentCursor ) { const SwPosition *pTmpStt = pTmp->Start(), *pTmpEnd = pTmp->GetPoint() == pTmpStt ? @@ -105,7 +105,7 @@ void CheckRange( SwCursor* pCurCrsr ) if( *pStt < *pTmpEnd ) pTmpDel = pTmp; - // If Point or Mark is within the Crsr range, we need to remove the old + // If Point or Mark is within the Cursor range, we need to remove the old // range. Take note that Point does not belong to the range anymore. pTmp = pTmp->GetNext(); delete pTmpDel; // Remove old range @@ -113,24 +113,24 @@ void CheckRange( SwCursor* pCurCrsr ) } } -// SwCrsrShell +// SwCursorShell -SwPaM * SwCrsrShell::CreateCrsr() +SwPaM * SwCursorShell::CreateCursor() { - // don't create Crsr in a table Selection (sic!) + // don't create Cursor in a table Selection (sic!) OSL_ENSURE( !IsTableMode(), "in table Selection" ); // New cursor as copy of current one. Add to the ring. // Links point to previously created one, ie forward. - SwShellCrsr* pNew = new SwShellCrsr( *m_pCurCrsr ); + SwShellCursor* pNew = new SwShellCursor( *m_pCurrentCursor ); // Hide PaM logically, to avoid undoing the inverting from // copied PaM (#i75172#) - pNew->swapContent(*m_pCurCrsr); + pNew->swapContent(*m_pCurrentCursor); - m_pCurCrsr->DeleteMark(); + m_pCurrentCursor->DeleteMark(); - UpdateCrsr( SwCrsrShell::SCROLLWIN ); + UpdateCursor( SwCursorShell::SCROLLWIN ); return pNew; } @@ -139,20 +139,20 @@ SwPaM * SwCrsrShell::CreateCrsr() * Note, this function does not delete anything if there is no other cursor. * @return - returns true if there was another cursor and we deleted one. */ -bool SwCrsrShell::DestroyCrsr() +bool SwCursorShell::DestroyCursor() { - // don't delete Crsr within table selection + // don't delete Cursor within table selection OSL_ENSURE( !IsTableMode(), "in table Selection" ); // Is there a next one? Don't do anything if not. - if(!m_pCurCrsr->IsMultiSelection()) + if(!m_pCurrentCursor->IsMultiSelection()) return false; - SwCallLink aLk( *this ); // watch Crsr-Moves - SwCursor* pNextCrsr = static_cast<SwCursor*>(m_pCurCrsr->GetNext()); - delete m_pCurCrsr; - m_pCurCrsr = dynamic_cast<SwShellCrsr*>(pNextCrsr); - UpdateCrsr(); + SwCallLink aLk( *this ); // watch Cursor-Moves + SwCursor* pNextCursor = static_cast<SwCursor*>(m_pCurrentCursor->GetNext()); + delete m_pCurrentCursor; + m_pCurrentCursor = dynamic_cast<SwShellCursor*>(pNextCursor); + UpdateCursor(); return true; } @@ -161,87 +161,87 @@ bool SwCrsrShell::DestroyCrsr() * Simply returns the current shell cursor if there is no selection * (HasSelection()). */ -SwPaM & SwCrsrShell::CreateNewShellCursor() +SwPaM & SwCursorShell::CreateNewShellCursor() { if (HasSelection()) { - (void) CreateCrsr(); // n.b. returns old cursor + (void) CreateCursor(); // n.b. returns old cursor } - return *GetCrsr(); + return *GetCursor(); } /** * Return the current shell cursor * @return - returns current `SwPaM` shell cursor */ -SwPaM & SwCrsrShell::GetCurrentShellCursor() +SwPaM & SwCursorShell::GetCurrentShellCursor() { - return *GetCrsr(); + return *GetCursor(); } /** * Return pointer to the current shell cursor * @return - returns pointer to current `SwPaM` shell cursor */ -SwPaM* SwCrsrShell::GetCrsr( bool bMakeTableCrsr ) const +SwPaM* SwCursorShell::GetCursor( bool bMakeTableCursor ) const { - if( m_pTableCrsr ) + if( m_pTableCursor ) { - if( bMakeTableCrsr && m_pTableCrsr->IsCrsrMovedUpdate() ) + if( bMakeTableCursor && m_pTableCursor->IsCursorMovedUpdate() ) { //don't re-create 'parked' cursors const SwContentNode* pCNd; - if( m_pTableCrsr->GetPoint()->nNode.GetIndex() && - m_pTableCrsr->GetMark()->nNode.GetIndex() && - nullptr != ( pCNd = m_pTableCrsr->GetContentNode() ) && pCNd->getLayoutFrm( GetLayout() ) && - nullptr != ( pCNd = m_pTableCrsr->GetContentNode(false) ) && pCNd->getLayoutFrm( GetLayout() ) ) + if( m_pTableCursor->GetPoint()->nNode.GetIndex() && + m_pTableCursor->GetMark()->nNode.GetIndex() && + nullptr != ( pCNd = m_pTableCursor->GetContentNode() ) && pCNd->getLayoutFrame( GetLayout() ) && + nullptr != ( pCNd = m_pTableCursor->GetContentNode(false) ) && pCNd->getLayoutFrame( GetLayout() ) ) { - SwShellTableCrsr* pTC = m_pTableCrsr; - GetLayout()->MakeTableCrsrs( *pTC ); + SwShellTableCursor* pTC = m_pTableCursor; + GetLayout()->MakeTableCursors( *pTC ); } } - if( m_pTableCrsr->IsChgd() ) + if( m_pTableCursor->IsChgd() ) { - const_cast<SwCrsrShell*>(this)->m_pCurCrsr = - dynamic_cast<SwShellCrsr*>(m_pTableCrsr->MakeBoxSels( m_pCurCrsr )); + const_cast<SwCursorShell*>(this)->m_pCurrentCursor = + dynamic_cast<SwShellCursor*>(m_pTableCursor->MakeBoxSels( m_pCurrentCursor )); } } - return m_pCurCrsr; + return m_pCurrentCursor; } -void SwCrsrShell::StartAction() +void SwCursorShell::StartAction() { if( !ActionPend() ) { // save for update of the ribbon bar - const SwNode& rNd = m_pCurCrsr->GetPoint()->nNode.GetNode(); + const SwNode& rNd = m_pCurrentCursor->GetPoint()->nNode.GetNode(); m_nAktNode = rNd.GetIndex(); - m_nAktContent = m_pCurCrsr->GetPoint()->nContent.GetIndex(); + m_nAktContent = m_pCurrentCursor->GetPoint()->nContent.GetIndex(); m_nAktNdTyp = rNd.GetNodeType(); - m_bAktSelection = *m_pCurCrsr->GetPoint() != *m_pCurCrsr->GetMark(); + m_bAktSelection = *m_pCurrentCursor->GetPoint() != *m_pCurrentCursor->GetMark(); if( rNd.IsTextNode() ) - m_nLeftFrmPos = SwCallLink::getLayoutFrm( GetLayout(), const_cast<SwTextNode&>(*rNd.GetTextNode()), m_nAktContent, true ); + m_nLeftFramePos = SwCallLink::getLayoutFrame( GetLayout(), const_cast<SwTextNode&>(*rNd.GetTextNode()), m_nAktContent, true ); else - m_nLeftFrmPos = 0; + m_nLeftFramePos = 0; } SwViewShell::StartAction(); // to the SwViewShell } -void SwCrsrShell::EndAction( const bool bIdleEnd, const bool DoSetPosX ) +void SwCursorShell::EndAction( const bool bIdleEnd, const bool DoSetPosX ) { comphelper::FlagRestorationGuard g(mbSelectAll, StartsWithTable() && ExtendedSelectedAll(/*bFootnotes =*/ false)); - bool bVis = m_bSVCrsrVis; + bool bVis = m_bSVCursorVis; - sal_uInt16 eFlags = SwCrsrShell::CHKRANGE; + sal_uInt16 eFlags = SwCursorShell::CHKRANGE; if ( !DoSetPosX ) - eFlags |= SwCrsrShell::UPDOWN; + eFlags |= SwCursorShell::UPDOWN; // Idle-formatting? if( bIdleEnd && Imp()->GetRegion() ) { - m_pCurCrsr->Hide(); + m_pCurrentCursor->Hide(); } // Update all invalid numberings before the last action @@ -249,18 +249,18 @@ void SwCrsrShell::EndAction( const bool bIdleEnd, const bool DoSetPosX ) GetDoc()->UpdateNumRule(); // #i76923#: Don't show the cursor in the SwViewShell::EndAction() - call. - // Only the UpdateCrsr shows the cursor. - bool bSavSVCrsrVis = m_bSVCrsrVis; - m_bSVCrsrVis = false; + // Only the UpdateCursor shows the cursor. + bool bSavSVCursorVis = m_bSVCursorVis; + m_bSVCursorVis = false; SwViewShell::EndAction( bIdleEnd ); // have SwViewShell go first - m_bSVCrsrVis = bSavSVCrsrVis; + m_bSVCursorVis = bSavSVCursorVis; if( ActionPend() ) { if( bVis ) // display SV-Cursor again - m_pVisCrsr->Show(); + m_pVisibleCursor->Show(); // If there is still a ChgCall and just the "basic // parenthiszing(?) (Basic-Klammerung)" exists, call it. This @@ -270,13 +270,13 @@ void SwCrsrShell::EndAction( const bool bIdleEnd, const bool DoSetPosX ) { // Within a Basic action, one needs to update the cursor, // to e.g. create the table cursor. This is being done in - // UpdateCrsr. - UpdateCrsr( eFlags, bIdleEnd ); + // UpdateCursor. + UpdateCursor( eFlags, bIdleEnd ); { - // watch Crsr-Moves, call Link if needed, the DTOR is key here! + // watch Cursor-Moves, call Link if needed, the DTOR is key here! SwCallLink aLk( *this, m_nAktNode, m_nAktContent, (sal_uInt8)m_nAktNdTyp, - m_nLeftFrmPos, m_bAktSelection ); + m_nLeftFramePos, m_bAktSelection ); } if( m_bCallChgLnk && m_bChgCallFlag && m_aChgLnk.IsSet() ) @@ -289,21 +289,21 @@ void SwCrsrShell::EndAction( const bool bIdleEnd, const bool DoSetPosX ) } if ( !bIdleEnd ) - eFlags |= SwCrsrShell::SCROLLWIN; + eFlags |= SwCursorShell::SCROLLWIN; - UpdateCrsr( eFlags, bIdleEnd ); // Show Cursor changes + UpdateCursor( eFlags, bIdleEnd ); // Show Cursor changes { - SwCallLink aLk( *this ); // watch Crsr-Moves + SwCallLink aLk( *this ); // watch Cursor-Moves aLk.nNode = m_nAktNode; // call Link if needed aLk.nNdTyp = (sal_uInt8)m_nAktNdTyp; aLk.nContent = m_nAktContent; - aLk.nLeftFrmPos = m_nLeftFrmPos; + aLk.nLeftFramePos = m_nLeftFramePos; - if( !m_nCrsrMove || - ( 1 == m_nCrsrMove && m_bInCMvVisportChgd ) ) + if( !m_nCursorMove || + ( 1 == m_nCursorMove && m_bInCMvVisportChgd ) ) // display Cursor & Selektions again - ShowCrsrs( m_bSVCrsrVis ); + ShowCursors( m_bSVCursorVis ); } // call ChgCall if there is still one if( m_bCallChgLnk && m_bChgCallFlag && m_aChgLnk.IsSet() ) @@ -313,56 +313,56 @@ void SwCrsrShell::EndAction( const bool bIdleEnd, const bool DoSetPosX ) } } -void SwCrsrShell::SttCrsrMove() +void SwCursorShell::SttCursorMove() { #ifdef DBG_UTIL - OSL_ENSURE( m_nCrsrMove < USHRT_MAX, "To many nested CrsrMoves." ); + OSL_ENSURE( m_nCursorMove < USHRT_MAX, "To many nested CursorMoves." ); #endif - ++m_nCrsrMove; + ++m_nCursorMove; StartAction(); } -void SwCrsrShell::EndCrsrMove( const bool bIdleEnd ) +void SwCursorShell::EndCursorMove( const bool bIdleEnd ) { #ifdef DBG_UTIL - OSL_ENSURE( m_nCrsrMove, "EndCrsrMove() without SttCrsrMove()." ); + OSL_ENSURE( m_nCursorMove, "EndCursorMove() without SttCursorMove()." ); #endif EndAction( bIdleEnd, true ); - --m_nCrsrMove; + --m_nCursorMove; #ifdef DBG_UTIL - if( !m_nCrsrMove ) + if( !m_nCursorMove ) m_bInCMvVisportChgd = false; #endif } -bool SwCrsrShell::LeftRight( bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode, +bool SwCursorShell::LeftRight( bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode, bool bVisualAllowed ) { if( IsTableMode() ) return bLeft ? GoPrevCell() : GoNextCell(); - SwCallLink aLk( *this ); // watch Crsr-Moves; call Link if needed + SwCallLink aLk( *this ); // watch Cursor-Moves; call Link if needed bool bRet = false; // #i27615# Handle cursor in front of label. const SwTextNode* pTextNd = nullptr; - if( m_pBlockCrsr ) - m_pBlockCrsr->clearPoints(); + if( m_pBlockCursor ) + m_pBlockCursor->clearPoints(); // 1. CASE: Cursor is in front of label. A move to the right // will simply reset the bInFrontOfLabel flag: - SwShellCrsr* pShellCrsr = getShellCrsr( true ); - if ( !bLeft && pShellCrsr->IsInFrontOfLabel() ) + SwShellCursor* pShellCursor = getShellCursor( true ); + if ( !bLeft && pShellCursor->IsInFrontOfLabel() ) { SetInFrontOfLabel( false ); bRet = true; } // 2. CASE: Cursor is at beginning of numbered paragraph. A move // to the left will simply set the bInFrontOfLabel flag: - else if ( bLeft && 0 == pShellCrsr->GetPoint()->nContent.GetIndex() && - !pShellCrsr->IsInFrontOfLabel() && !pShellCrsr->HasMark() && - nullptr != ( pTextNd = pShellCrsr->GetNode().GetTextNode() ) && + else if ( bLeft && 0 == pShellCursor->GetPoint()->nContent.GetIndex() && + !pShellCursor->IsInFrontOfLabel() && !pShellCursor->HasMark() && + nullptr != ( pTextNd = pShellCursor->GetNode().GetTextNode() ) && pTextNd->HasVisibleNumberingOrBullet() ) { SetInFrontOfLabel( true ); @@ -376,8 +376,8 @@ bool SwCrsrShell::LeftRight( bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode, // To avoid loop the reset of <bInFrontOfLabel> flag is no longer // reflected in the return value <bRet>. const bool bResetOfInFrontOfLabel = SetInFrontOfLabel( false ); - bRet = pShellCrsr->LeftRight( bLeft, nCnt, nMode, bVisualAllowed, - bSkipHidden, !IsOverwriteCrsr() ); + bRet = pShellCursor->LeftRight( bLeft, nCnt, nMode, bVisualAllowed, + bSkipHidden, !IsOverwriteCursor() ); if ( !bRet && bLeft && bResetOfInFrontOfLabel ) { // undo reset of <bInFrontOfLabel> flag @@ -387,13 +387,13 @@ bool SwCrsrShell::LeftRight( bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode, if( bRet ) { - UpdateCrsr(); + UpdateCursor(); } return bRet; } -void SwCrsrShell::MarkListLevel( const OUString& sListId, +void SwCursorShell::MarkListLevel( const OUString& sListId, const int nListLevel ) { if ( sListId != m_sMarkedListId || @@ -412,18 +412,18 @@ void SwCrsrShell::MarkListLevel( const OUString& sListId, } } -void SwCrsrShell::UpdateMarkedListLevel() +void SwCursorShell::UpdateMarkedListLevel() { - SwTextNode * pTextNd = _GetCrsr()->GetNode().GetTextNode(); + SwTextNode * pTextNd = _GetCursor()->GetNode().GetTextNode(); if ( pTextNd ) { if ( !pTextNd->IsNumbered() ) { - m_pCurCrsr->_SetInFrontOfLabel( false ); + m_pCurrentCursor->_SetInFrontOfLabel( false ); MarkListLevel( OUString(), 0 ); } - else if ( m_pCurCrsr->IsInFrontOfLabel() ) + else if ( m_pCurrentCursor->IsInFrontOfLabel() ) { if ( pTextNd->IsInList() ) { @@ -440,7 +440,7 @@ void SwCrsrShell::UpdateMarkedListLevel() } } -void SwCrsrShell::FirePageChangeEvent(sal_uInt16 nOldPage, sal_uInt16 nNewPage) +void SwCursorShell::FirePageChangeEvent(sal_uInt16 nOldPage, sal_uInt16 nNewPage) { #ifdef ACCESSIBLE_LAYOUT if( Imp()->IsAccessible() ) @@ -451,7 +451,7 @@ void SwCrsrShell::FirePageChangeEvent(sal_uInt16 nOldPage, sal_uInt16 nNewPage) #endif } -void SwCrsrShell::FireColumnChangeEvent(sal_uInt16 nOldColumn, sal_uInt16 nNewColumn) +void SwCursorShell::FireColumnChangeEvent(sal_uInt16 nOldColumn, sal_uInt16 nNewColumn) { #ifdef ACCESSIBLE_LAYOUT if( Imp()->IsAccessible() ) @@ -462,7 +462,7 @@ void SwCrsrShell::FireColumnChangeEvent(sal_uInt16 nOldColumn, sal_uInt16 nNewCo #endif } -void SwCrsrShell::FireSectionChangeEvent(sal_uInt16 nOldSection, sal_uInt16 nNewSection) +void SwCursorShell::FireSectionChangeEvent(sal_uInt16 nOldSection, sal_uInt16 nNewSection) { #ifdef ACCESSIBLE_LAYOUT if( Imp()->IsAccessible() ) @@ -473,24 +473,24 @@ void SwCrsrShell::FireSectionChangeEvent(sal_uInt16 nOldSection, sal_uInt16 nNew #endif } -bool SwCrsrShell::bColumnChange() +bool SwCursorShell::bColumnChange() { - SwFrm* pCurrFrm = GetCurrFrm(false); + SwFrame* pCurrFrame = GetCurrFrame(false); - if (pCurrFrm == nullptr) + if (pCurrFrame == nullptr) { return false; } - SwFrm* pCurrCol=static_cast<SwFrm*>(pCurrFrm)->FindColFrm(); + SwFrame* pCurrCol=static_cast<SwFrame*>(pCurrFrame)->FindColFrame(); - while(pCurrCol== nullptr && pCurrFrm!=nullptr ) + while(pCurrCol== nullptr && pCurrFrame!=nullptr ) { - SwLayoutFrm* pParent = pCurrFrm->GetUpper(); + SwLayoutFrame* pParent = pCurrFrame->GetUpper(); if(pParent!=nullptr) { - pCurrCol=static_cast<SwFrm*>(pParent)->FindColFrm(); - pCurrFrm = static_cast<SwFrm*>(pParent); + pCurrCol=static_cast<SwFrame*>(pParent)->FindColFrame(); + pCurrFrame = static_cast<SwFrame*>(pParent); } else { @@ -498,65 +498,65 @@ bool SwCrsrShell::bColumnChange() } } - if(m_oldColFrm == pCurrCol) + if(m_oldColFrame == pCurrCol) return false; else { - m_oldColFrm = pCurrCol; + m_oldColFrame = pCurrCol; return true; } } -bool SwCrsrShell::UpDown( bool bUp, sal_uInt16 nCnt ) +bool SwCursorShell::UpDown( bool bUp, sal_uInt16 nCnt ) { SET_CURR_SHELL( this ); - SwCallLink aLk( *this ); // watch Crsr-Moves; call Link if needed + SwCallLink aLk( *this ); // watch Cursor-Moves; call Link if needed bool bTableMode = IsTableMode(); - SwShellCrsr* pTmpCrsr = getShellCrsr( true ); + SwShellCursor* pTmpCursor = getShellCursor( true ); - bool bRet = pTmpCrsr->UpDown( bUp, nCnt ); + bool bRet = pTmpCursor->UpDown( bUp, nCnt ); // #i40019# UpDown should always reset the bInFrontOfLabel flag: bRet |= SetInFrontOfLabel(false); - if( m_pBlockCrsr ) - m_pBlockCrsr->clearPoints(); + if( m_pBlockCursor ) + m_pBlockCursor->clearPoints(); if( bRet ) { - m_eMvState = MV_UPDOWN; // status for Crsr travelling - GetCrsrOfst + m_eMvState = MV_UPDOWN; // status for Cursor travelling - GetCursorOfst if( !ActionPend() ) { - CrsrFlag eUpdateMode = SwCrsrShell::SCROLLWIN; + CursorFlag eUpdateMode = SwCursorShell::SCROLLWIN; if( !bTableMode ) - eUpdateMode = (CrsrFlag) (eUpdateMode - | SwCrsrShell::UPDOWN | SwCrsrShell::CHKRANGE); - UpdateCrsr( static_cast<sal_uInt16>(eUpdateMode) ); + eUpdateMode = (CursorFlag) (eUpdateMode + | SwCursorShell::UPDOWN | SwCursorShell::CHKRANGE); + UpdateCursor( static_cast<sal_uInt16>(eUpdateMode) ); } } return bRet; } -bool SwCrsrShell::LRMargin( bool bLeft, bool bAPI) +bool SwCursorShell::LRMargin( bool bLeft, bool bAPI) { - SwCallLink aLk( *this ); // watch Crsr-Moves; call Link if needed + SwCallLink aLk( *this ); // watch Cursor-Moves; call Link if needed SET_CURR_SHELL( this ); - m_eMvState = MV_LEFTMARGIN; // status for Crsr travelling - GetCrsrOfst + m_eMvState = MV_LEFTMARGIN; // status for Cursor travelling - GetCursorOfst const bool bTableMode = IsTableMode(); - SwShellCrsr* pTmpCrsr = getShellCrsr( true ); + SwShellCursor* pTmpCursor = getShellCursor( true ); - if( m_pBlockCrsr ) - m_pBlockCrsr->clearPoints(); + if( m_pBlockCursor ) + m_pBlockCursor->clearPoints(); const bool bWasAtLM = - ( 0 == _GetCrsr()->GetPoint()->nContent.GetIndex() ); + ( 0 == _GetCursor()->GetPoint()->nContent.GetIndex() ); - bool bRet = pTmpCrsr->LeftRightMargin( bLeft, bAPI ); + bool bRet = pTmpCursor->LeftRightMargin( bLeft, bAPI ); - if ( bLeft && !bTableMode && bRet && bWasAtLM && !_GetCrsr()->HasMark() ) + if ( bLeft && !bTableMode && bRet && bWasAtLM && !_GetCursor()->HasMark() ) { - const SwTextNode * pTextNd = _GetCrsr()->GetNode().GetTextNode(); + const SwTextNode * pTextNd = _GetCursor()->GetNode().GetTextNode(); if ( pTextNd && pTextNd->HasVisibleNumberingOrBullet() ) SetInFrontOfLabel( true ); } @@ -567,51 +567,51 @@ bool SwCrsrShell::LRMargin( bool bLeft, bool bAPI) if( bRet ) { - UpdateCrsr(); + UpdateCursor(); } return bRet; } -bool SwCrsrShell::IsAtLRMargin( bool bLeft, bool bAPI ) const +bool SwCursorShell::IsAtLRMargin( bool bLeft, bool bAPI ) const { - const SwShellCrsr* pTmpCrsr = getShellCrsr( true ); - return pTmpCrsr->IsAtLeftRightMargin( bLeft, bAPI ); + const SwShellCursor* pTmpCursor = getShellCursor( true ); + return pTmpCursor->IsAtLeftRightMargin( bLeft, bAPI ); } -bool SwCrsrShell::SttEndDoc( bool bStt ) +bool SwCursorShell::SttEndDoc( bool bStt ) { - SwCallLink aLk( *this ); // watch Crsr-Moves; call Link if needed + SwCallLink aLk( *this ); // watch Cursor-Moves; call Link if needed - SwShellCrsr* pTmpCrsr = m_pBlockCrsr ? &m_pBlockCrsr->getShellCrsr() : m_pCurCrsr; - bool bRet = pTmpCrsr->SttEndDoc( bStt ); + SwShellCursor* pTmpCursor = m_pBlockCursor ? &m_pBlockCursor->getShellCursor() : m_pCurrentCursor; + bool bRet = pTmpCursor->SttEndDoc( bStt ); if( bRet ) { if( bStt ) - pTmpCrsr->GetPtPos().Y() = 0; // set to 0 explicitly (table header) - if( m_pBlockCrsr ) + pTmpCursor->GetPtPos().Y() = 0; // set to 0 explicitly (table header) + if( m_pBlockCursor ) { - m_pBlockCrsr->clearPoints(); + m_pBlockCursor->clearPoints(); RefreshBlockCursor(); } - UpdateCrsr(SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE|SwCrsrShell::READONLY); + UpdateCursor(SwCursorShell::SCROLLWIN|SwCursorShell::CHKRANGE|SwCursorShell::READONLY); } return bRet; } -void SwCrsrShell::ExtendedSelectAll(bool bFootnotes) +void SwCursorShell::ExtendedSelectAll(bool bFootnotes) { SwNodes& rNodes = GetDoc()->GetNodes(); - SwPosition* pPos = m_pCurCrsr->GetPoint(); + SwPosition* pPos = m_pCurrentCursor->GetPoint(); pPos->nNode = bFootnotes ? rNodes.GetEndOfPostIts() : rNodes.GetEndOfAutotext(); pPos->nContent.Assign( rNodes.GoNext( &pPos->nNode ), 0 ); - pPos = m_pCurCrsr->GetMark(); + pPos = m_pCurrentCursor->GetMark(); pPos->nNode = rNodes.GetEndOfContent(); SwContentNode* pCNd = SwNodes::GoPrevious( &pPos->nNode ); pPos->nContent.Assign( pCNd, pCNd ? pCNd->Len() : 0 ); } -bool SwCrsrShell::ExtendedSelectedAll(bool bFootnotes) +bool SwCursorShell::ExtendedSelectedAll(bool bFootnotes) { SwNodes& rNodes = GetDoc()->GetNodes(); SwNodeIndex nNode = bFootnotes ? rNodes.GetEndOfPostIts() : rNodes.GetEndOfAutotext(); @@ -625,11 +625,11 @@ bool SwCrsrShell::ExtendedSelectedAll(bool bFootnotes) SwPosition aStart(*pStart, 0); SwPosition aEnd(*pEnd, pEnd->Len()); - SwShellCrsr* pShellCrsr = getShellCrsr(false); - return aStart == *pShellCrsr->Start() && aEnd == *pShellCrsr->End(); + SwShellCursor* pShellCursor = getShellCursor(false); + return aStart == *pShellCursor->Start() && aEnd == *pShellCursor->End(); } -bool SwCrsrShell::StartsWithTable() +bool SwCursorShell::StartsWithTable() { SwNodes& rNodes = GetDoc()->GetNodes(); SwNodeIndex nNode(rNodes.GetEndOfExtras()); @@ -637,117 +637,117 @@ bool SwCrsrShell::StartsWithTable() return pContentNode->FindTableNode(); } -bool SwCrsrShell::MovePage( SwWhichPage fnWhichPage, SwPosPage fnPosPage ) +bool SwCursorShell::MovePage( SwWhichPage fnWhichPage, SwPosPage fnPosPage ) { bool bRet = false; // never jump of section borders at selection - if( !m_pCurCrsr->HasMark() || !m_pCurCrsr->IsNoContent() ) + if( !m_pCurrentCursor->HasMark() || !m_pCurrentCursor->IsNoContent() ) { - SwCallLink aLk( *this ); // watch Crsr-Moves; call Link if needed + SwCallLink aLk( *this ); // watch Cursor-Moves; call Link if needed SET_CURR_SHELL( this ); - SwCrsrSaveState aSaveState( *m_pCurCrsr ); - Point& rPt = m_pCurCrsr->GetPtPos(); - SwContentFrm * pFrm = m_pCurCrsr->GetContentNode()-> - getLayoutFrm( GetLayout(), &rPt, m_pCurCrsr->GetPoint(), false ); - if( pFrm && ( bRet = GetFrmInPage( pFrm, fnWhichPage, - fnPosPage, m_pCurCrsr ) ) && - !m_pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE | + SwCursorSaveState aSaveState( *m_pCurrentCursor ); + Point& rPt = m_pCurrentCursor->GetPtPos(); + SwContentFrame * pFrame = m_pCurrentCursor->GetContentNode()-> + getLayoutFrame( GetLayout(), &rPt, m_pCurrentCursor->GetPoint(), false ); + if( pFrame && ( bRet = GetFrameInPage( pFrame, fnWhichPage, + fnPosPage, m_pCurrentCursor ) ) && + !m_pCurrentCursor->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE | nsSwCursorSelOverFlags::SELOVER_CHANGEPOS )) - UpdateCrsr(); + UpdateCursor(); else bRet = false; } return bRet; } -bool SwCrsrShell::isInHiddenTextFrm(SwShellCrsr* pShellCrsr) +bool SwCursorShell::isInHiddenTextFrame(SwShellCursor* pShellCursor) { - SwContentNode *pCNode = pShellCrsr->GetContentNode(); - SwContentFrm *pFrm = pCNode ? - pCNode->getLayoutFrm( GetLayout(), &pShellCrsr->GetPtPos(), pShellCrsr->GetPoint(), false ) : nullptr; - return !pFrm || (pFrm->IsTextFrm() && static_cast<SwTextFrm*>(pFrm)->IsHiddenNow()); + SwContentNode *pCNode = pShellCursor->GetContentNode(); + SwContentFrame *pFrame = pCNode ? + pCNode->getLayoutFrame( GetLayout(), &pShellCursor->GetPtPos(), pShellCursor->GetPoint(), false ) : nullptr; + return !pFrame || (pFrame->IsTextFrame() && static_cast<SwTextFrame*>(pFrame)->IsHiddenNow()); } -bool SwCrsrShell::MovePara(SwWhichPara fnWhichPara, SwPosPara fnPosPara ) +bool SwCursorShell::MovePara(SwWhichPara fnWhichPara, SwPosPara fnPosPara ) { - SwCallLink aLk( *this ); // watch Crsr-Moves; call Link if needed - SwShellCrsr* pTmpCrsr = getShellCrsr( true ); - bool bRet = pTmpCrsr->MovePara( fnWhichPara, fnPosPara ); + SwCallLink aLk( *this ); // watch Cursor-Moves; call Link if needed + SwShellCursor* pTmpCursor = getShellCursor( true ); + bool bRet = pTmpCursor->MovePara( fnWhichPara, fnPosPara ); if( bRet ) { //keep going until we get something visible, i.e. skip //over hidden paragraphs, don't get stuck at the start - //which is what SwCrsrShell::UpdateCrsrPos will reset + //which is what SwCursorShell::UpdateCursorPos will reset //the position to if we pass it a position in an //invisible hidden paragraph field - while (isInHiddenTextFrm(pTmpCrsr)) + while (isInHiddenTextFrame(pTmpCursor)) { - if (!pTmpCrsr->MovePara(fnWhichPara, fnPosPara)) + if (!pTmpCursor->MovePara(fnWhichPara, fnPosPara)) break; } - UpdateCrsr(); + UpdateCursor(); } return bRet; } -bool SwCrsrShell::MoveSection( SwWhichSection fnWhichSect, +bool SwCursorShell::MoveSection( SwWhichSection fnWhichSect, SwPosSection fnPosSect) { - SwCallLink aLk( *this ); // watch Crsr-Moves; call Link if needed - SwCursor* pTmpCrsr = getShellCrsr( true ); - bool bRet = pTmpCrsr->MoveSection( fnWhichSect, fnPosSect ); + SwCallLink aLk( *this ); // watch Cursor-Moves; call Link if needed + SwCursor* pTmpCursor = getShellCursor( true ); + bool bRet = pTmpCursor->MoveSection( fnWhichSect, fnPosSect ); if( bRet ) - UpdateCrsr(); + UpdateCursor(); return bRet; } // position cursor -static SwFrm* lcl_IsInHeaderFooter( const SwNodeIndex& rIdx, Point& rPt ) +static SwFrame* lcl_IsInHeaderFooter( const SwNodeIndex& rIdx, Point& rPt ) { - SwFrm* pFrm = nullptr; + SwFrame* pFrame = nullptr; SwContentNode* pCNd = rIdx.GetNode().GetContentNode(); if( pCNd ) { - SwContentFrm *pCntFrm = pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &rPt, nullptr, false ); - pFrm = pCntFrm ? pCntFrm->GetUpper() : nullptr; - while( pFrm && !pFrm->IsHeaderFrm() && !pFrm->IsFooterFrm() ) - pFrm = pFrm->IsFlyFrm() ? static_cast<SwFlyFrm*>(pFrm)->AnchorFrm() - : pFrm->GetUpper(); + SwContentFrame *pContentFrame = pCNd->getLayoutFrame( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &rPt, nullptr, false ); + pFrame = pContentFrame ? pContentFrame->GetUpper() : nullptr; + while( pFrame && !pFrame->IsHeaderFrame() && !pFrame->IsFooterFrame() ) + pFrame = pFrame->IsFlyFrame() ? static_cast<SwFlyFrame*>(pFrame)->AnchorFrame() + : pFrame->GetUpper(); } - return pFrm; + return pFrame; } -bool SwCrsrShell::IsInHeaderFooter( bool* pbInHeader ) const +bool SwCursorShell::IsInHeaderFooter( bool* pbInHeader ) const { Point aPt; - SwFrm* pFrm = ::lcl_IsInHeaderFooter( m_pCurCrsr->GetPoint()->nNode, aPt ); - if( pFrm && pbInHeader ) - *pbInHeader = pFrm->IsHeaderFrm(); - return nullptr != pFrm; + SwFrame* pFrame = ::lcl_IsInHeaderFooter( m_pCurrentCursor->GetPoint()->nNode, aPt ); + if( pFrame && pbInHeader ) + *pbInHeader = pFrame->IsHeaderFrame(); + return nullptr != pFrame; } -int SwCrsrShell::SetCrsr( const Point &rLPt, bool bOnlyText, bool bBlock ) +int SwCursorShell::SetCursor( const Point &rLPt, bool bOnlyText, bool bBlock ) { SET_CURR_SHELL( this ); - SwShellCrsr* pCrsr = getShellCrsr( bBlock ); - SwPosition aPos( *pCrsr->GetPoint() ); + SwShellCursor* pCursor = getShellCursor( bBlock ); + SwPosition aPos( *pCursor->GetPoint() ); Point aPt( rLPt ); - Point & rAktCrsrPt = pCrsr->GetPtPos(); - SwCrsrMoveState aTmpState( IsTableMode() ? MV_TBLSEL : + Point & rAktCursorPt = pCursor->GetPtPos(); + SwCursorMoveState aTmpState( IsTableMode() ? MV_TBLSEL : bOnlyText ? MV_SETONLYTEXT : MV_NONE ); aTmpState.m_bSetInReadOnly = IsReadOnlyAvailable(); - SwTextNode * pTextNd = pCrsr->GetNode().GetTextNode(); + SwTextNode * pTextNd = pCursor->GetNode().GetTextNode(); if ( pTextNd && !IsTableMode() && // #i37515# No bInFrontOfLabel during selection - !pCrsr->HasMark() && + !pCursor->HasMark() && pTextNd->HasVisibleNumberingOrBullet() ) { aTmpState.m_bInFrontOfLabel = true; // #i27615# @@ -758,48 +758,48 @@ int SwCrsrShell::SetCrsr( const Point &rLPt, bool bOnlyText, bool bBlock ) } int bRet = CRSR_POSOLD | - ( GetLayout()->GetCrsrOfst( &aPos, aPt, &aTmpState ) + ( GetLayout()->GetCursorOfst( &aPos, aPt, &aTmpState ) ? 0 : CRSR_POSCHG ); const bool bOldInFrontOfLabel = IsInFrontOfLabel(); const bool bNewInFrontOfLabel = aTmpState.m_bInFrontOfLabel; - pCrsr->SetCrsrBidiLevel( aTmpState.m_nCursorBidiLevel ); + pCursor->SetCursorBidiLevel( aTmpState.m_nCursorBidiLevel ); if( MV_RIGHTMARGIN == aTmpState.m_eState ) m_eMvState = MV_RIGHTMARGIN; // is the new position in header or footer? - SwFrm* pFrm = lcl_IsInHeaderFooter( aPos.nNode, aPt ); - if( IsTableMode() && !pFrm && aPos.nNode.GetNode().StartOfSectionNode() == - pCrsr->GetPoint()->nNode.GetNode().StartOfSectionNode() ) + SwFrame* pFrame = lcl_IsInHeaderFooter( aPos.nNode, aPt ); + if( IsTableMode() && !pFrame && aPos.nNode.GetNode().StartOfSectionNode() == + pCursor->GetPoint()->nNode.GetNode().StartOfSectionNode() ) // same table column and not in header/footer -> back return bRet; - if( m_pBlockCrsr && bBlock ) + if( m_pBlockCursor && bBlock ) { - m_pBlockCrsr->setEndPoint( rLPt ); - if( !pCrsr->HasMark() ) - m_pBlockCrsr->setStartPoint( rLPt ); - else if( !m_pBlockCrsr->getStartPoint() ) - m_pBlockCrsr->setStartPoint( pCrsr->GetMkPos() ); + m_pBlockCursor->setEndPoint( rLPt ); + if( !pCursor->HasMark() ) + m_pBlockCursor->setStartPoint( rLPt ); + else if( !m_pBlockCursor->getStartPoint() ) + m_pBlockCursor->setStartPoint( pCursor->GetMkPos() ); } - if( !pCrsr->HasMark() ) + if( !pCursor->HasMark() ) { // is at the same position and if in header/footer -> in the same - if( aPos == *pCrsr->GetPoint() && + if( aPos == *pCursor->GetPoint() && bOldInFrontOfLabel == bNewInFrontOfLabel ) { - if( pFrm ) + if( pFrame ) { - if( pFrm->Frm().IsInside( rAktCrsrPt )) + if( pFrame->Frame().IsInside( rAktCursorPt )) return bRet; } else if( aPos.nNode.GetNode().IsContentNode() ) { // in the same frame? - SwFrm* pOld = static_cast<SwContentNode&>(aPos.nNode.GetNode()).getLayoutFrm( + SwFrame* pOld = static_cast<SwContentNode&>(aPos.nNode.GetNode()).getLayoutFrame( GetLayout(), &m_aCharRect.Pos(), nullptr, false ); - SwFrm* pNew = static_cast<SwContentNode&>(aPos.nNode.GetNode()).getLayoutFrm( + SwFrame* pNew = static_cast<SwContentNode&>(aPos.nNode.GetNode()).getLayoutFrame( GetLayout(), &aPt, nullptr, false ); if( pNew == pOld ) return bRet; @@ -809,51 +809,51 @@ int SwCrsrShell::SetCrsr( const Point &rLPt, bool bOnlyText, bool bBlock ) else { // SSelection over not allowed sections or if in header/footer -> different - if( !CheckNodesRange( aPos.nNode, pCrsr->GetMark()->nNode, true ) - || ( pFrm && !pFrm->Frm().IsInside( pCrsr->GetMkPos() ) )) + if( !CheckNodesRange( aPos.nNode, pCursor->GetMark()->nNode, true ) + || ( pFrame && !pFrame->Frame().IsInside( pCursor->GetMkPos() ) )) return bRet; // is at same position but not in header/footer - if( aPos == *pCrsr->GetPoint() ) + if( aPos == *pCursor->GetPoint() ) return bRet; } - SwCallLink aLk( *this ); // watch Crsr-Moves; call Link if needed - SwCrsrSaveState aSaveState( *pCrsr ); + SwCallLink aLk( *this ); // watch Cursor-Moves; call Link if needed + SwCursorSaveState aSaveState( *pCursor ); - *pCrsr->GetPoint() = aPos; - rAktCrsrPt = aPt; + *pCursor->GetPoint() = aPos; + rAktCursorPt = aPt; // #i41424# Only update the marked number levels if necessary // Force update of marked number levels if necessary. if ( bNewInFrontOfLabel || bOldInFrontOfLabel ) - m_pCurCrsr->_SetInFrontOfLabel( !bNewInFrontOfLabel ); + m_pCurrentCursor->_SetInFrontOfLabel( !bNewInFrontOfLabel ); SetInFrontOfLabel( bNewInFrontOfLabel ); - if( !pCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ) ) + if( !pCursor->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ) ) { - sal_uInt16 nFlag = SwCrsrShell::SCROLLWIN | SwCrsrShell::CHKRANGE; - UpdateCrsr( nFlag ); + sal_uInt16 nFlag = SwCursorShell::SCROLLWIN | SwCursorShell::CHKRANGE; + UpdateCursor( nFlag ); bRet &= ~CRSR_POSOLD; } - else if( bOnlyText && !m_pCurCrsr->HasMark() ) + else if( bOnlyText && !m_pCurrentCursor->HasMark() ) { if( FindValidContentNode( bOnlyText ) ) { // position cursor in a valid content - if( aPos == *pCrsr->GetPoint() ) + if( aPos == *pCursor->GetPoint() ) bRet = CRSR_POSOLD; else { - UpdateCrsr(); + UpdateCursor(); bRet &= ~CRSR_POSOLD; } } else { // there is no valid content -> hide cursor - m_pVisCrsr->Hide(); // always hide visible cursor - m_eMvState = MV_NONE; // status for Crsr travelling + m_pVisibleCursor->Hide(); // always hide visible cursor + m_eMvState = MV_NONE; // status for Cursor travelling m_bAllProtect = true; if( GetDoc()->GetDocShell() ) { @@ -865,87 +865,87 @@ int SwCrsrShell::SetCrsr( const Point &rLPt, bool bOnlyText, bool bBlock ) return bRet; } -void SwCrsrShell::TableCrsrToCursor() +void SwCursorShell::TableCursorToCursor() { - OSL_ENSURE( m_pTableCrsr, "TableCrsrToCursor: Why?" ); - delete m_pTableCrsr, m_pTableCrsr = nullptr; + OSL_ENSURE( m_pTableCursor, "TableCursorToCursor: Why?" ); + delete m_pTableCursor, m_pTableCursor = nullptr; } -void SwCrsrShell::BlockCrsrToCrsr() +void SwCursorShell::BlockCursorToCursor() { - OSL_ENSURE( m_pBlockCrsr, "BlockCrsrToCrsr: Why?" ); - if( m_pBlockCrsr && !HasSelection() ) + OSL_ENSURE( m_pBlockCursor, "BlockCursorToCursor: Why?" ); + if( m_pBlockCursor && !HasSelection() ) { - SwPaM& rPam = m_pBlockCrsr->getShellCrsr(); - m_pCurCrsr->SetMark(); - *m_pCurCrsr->GetPoint() = *rPam.GetPoint(); + SwPaM& rPam = m_pBlockCursor->getShellCursor(); + m_pCurrentCursor->SetMark(); + *m_pCurrentCursor->GetPoint() = *rPam.GetPoint(); if( rPam.HasMark() ) - *m_pCurCrsr->GetMark() = *rPam.GetMark(); + *m_pCurrentCursor->GetMark() = *rPam.GetMark(); else - m_pCurCrsr->DeleteMark(); + m_pCurrentCursor->DeleteMark(); } - delete m_pBlockCrsr, m_pBlockCrsr = nullptr; + delete m_pBlockCursor, m_pBlockCursor = nullptr; } -void SwCrsrShell::CrsrToBlockCrsr() +void SwCursorShell::CursorToBlockCursor() { - if( !m_pBlockCrsr ) + if( !m_pBlockCursor ) { - SwPosition aPos( *m_pCurCrsr->GetPoint() ); - m_pBlockCrsr = new SwBlockCursor( *this, aPos ); - SwShellCrsr &rBlock = m_pBlockCrsr->getShellCrsr(); - rBlock.GetPtPos() = m_pCurCrsr->GetPtPos(); - if( m_pCurCrsr->HasMark() ) + SwPosition aPos( *m_pCurrentCursor->GetPoint() ); + m_pBlockCursor = new SwBlockCursor( *this, aPos ); + SwShellCursor &rBlock = m_pBlockCursor->getShellCursor(); + rBlock.GetPtPos() = m_pCurrentCursor->GetPtPos(); + if( m_pCurrentCursor->HasMark() ) { rBlock.SetMark(); - *rBlock.GetMark() = *m_pCurCrsr->GetMark(); - rBlock.GetMkPos() = m_pCurCrsr->GetMkPos(); + *rBlock.GetMark() = *m_pCurrentCursor->GetMark(); + rBlock.GetMkPos() = m_pCurrentCursor->GetMkPos(); } } - m_pBlockCrsr->clearPoints(); + m_pBlockCursor->clearPoints(); RefreshBlockCursor(); } -void SwCrsrShell::ClearMark() +void SwCursorShell::ClearMark() { // is there any GetMark? - if( m_pTableCrsr ) + if( m_pTableCursor ) { - std::vector<SwPaM*> vCrsrs; - for(auto& rCrsr : m_pCurCrsr->GetRingContainer()) - if(&rCrsr != m_pCurCrsr) - vCrsrs.push_back(&rCrsr); - for(auto pCrsr : vCrsrs) - delete pCrsr; - m_pTableCrsr->DeleteMark(); + std::vector<SwPaM*> vCursors; + for(auto& rCursor : m_pCurrentCursor->GetRingContainer()) + if(&rCursor != m_pCurrentCursor) + vCursors.push_back(&rCursor); + for(auto pCursor : vCursors) + delete pCursor; + m_pTableCursor->DeleteMark(); - m_pCurCrsr->DeleteMark(); + m_pCurrentCursor->DeleteMark(); - *m_pCurCrsr->GetPoint() = *m_pTableCrsr->GetPoint(); - m_pCurCrsr->GetPtPos() = m_pTableCrsr->GetPtPos(); - delete m_pTableCrsr, m_pTableCrsr = nullptr; - m_pCurCrsr->SwSelPaintRects::Show(); + *m_pCurrentCursor->GetPoint() = *m_pTableCursor->GetPoint(); + m_pCurrentCursor->GetPtPos() = m_pTableCursor->GetPtPos(); + delete m_pTableCursor, m_pTableCursor = nullptr; + m_pCurrentCursor->SwSelPaintRects::Show(); } else { - if( !m_pCurCrsr->HasMark() ) + if( !m_pCurrentCursor->HasMark() ) return; - m_pCurCrsr->DeleteMark(); - if( !m_nCrsrMove ) - m_pCurCrsr->SwSelPaintRects::Show(); + m_pCurrentCursor->DeleteMark(); + if( !m_nCursorMove ) + m_pCurrentCursor->SwSelPaintRects::Show(); } } -void SwCrsrShell::NormalizePam(bool bPointFirst) +void SwCursorShell::NormalizePam(bool bPointFirst) { - SwCallLink aLk( *this ); // watch Crsr-Moves; call Link if needed - m_pCurCrsr->Normalize(bPointFirst); + SwCallLink aLk( *this ); // watch Cursor-Moves; call Link if needed + m_pCurrentCursor->Normalize(bPointFirst); } -void SwCrsrShell::SwapPam() +void SwCursorShell::SwapPam() { - SwCallLink aLk( *this ); // watch Crsr-Moves; call Link if needed - m_pCurCrsr->Exchange(); + SwCallLink aLk( *this ); // watch Cursor-Moves; call Link if needed + m_pCurrentCursor->Exchange(); } //TODO: provide documentation @@ -959,7 +959,7 @@ void SwCrsrShell::SwapPam() @param bTstOnly Should I only do a test run? If true so do not move cursor. @param bTstHit ??? */ -bool SwCrsrShell::ChgCurrPam( +bool SwCursorShell::ChgCurrPam( const Point & rPt, bool bTstOnly, bool bTstHit ) @@ -967,98 +967,98 @@ bool SwCrsrShell::ChgCurrPam( SET_CURR_SHELL( this ); // check if the SPoint is in a table selection - if( bTstOnly && m_pTableCrsr ) - return m_pTableCrsr->IsInside( rPt ); + if( bTstOnly && m_pTableCursor ) + return m_pTableCursor->IsInside( rPt ); - SwCallLink aLk( *this ); // watch Crsr-Moves; call Link if needed + SwCallLink aLk( *this ); // watch Cursor-Moves; call Link if needed // search position <rPt> in document - SwPosition aPtPos( *m_pCurCrsr->GetPoint() ); + SwPosition aPtPos( *m_pCurrentCursor->GetPoint() ); Point aPt( rPt ); - SwCrsrMoveState aTmpState( MV_NONE ); + SwCursorMoveState aTmpState( MV_NONE ); aTmpState.m_bSetInReadOnly = IsReadOnlyAvailable(); - if ( !GetLayout()->GetCrsrOfst( &aPtPos, aPt, &aTmpState ) && bTstHit ) + if ( !GetLayout()->GetCursorOfst( &aPtPos, aPt, &aTmpState ) && bTstHit ) return false; // search in all selections for this position - SwShellCrsr* pCmp = m_pCurCrsr; // keep the pointer on cursor + SwShellCursor* pCmp = m_pCurrentCursor; // keep the pointer on cursor do { if( pCmp && pCmp->HasMark() && *pCmp->Start() <= aPtPos && *pCmp->End() > aPtPos ) { - if( bTstOnly || m_pCurCrsr == pCmp ) // is the current + if( bTstOnly || m_pCurrentCursor == pCmp ) // is the current return true; // return without update - m_pCurCrsr = pCmp; - UpdateCrsr(); // cursor is already at the right position + m_pCurrentCursor = pCmp; + UpdateCursor(); // cursor is already at the right position return true; } - } while( m_pCurCrsr != - ( pCmp = dynamic_cast<SwShellCrsr*>(pCmp->GetNext()) ) ); + } while( m_pCurrentCursor != + ( pCmp = dynamic_cast<SwShellCursor*>(pCmp->GetNext()) ) ); return false; } -void SwCrsrShell::KillPams() +void SwCursorShell::KillPams() { // Does any exist for deletion? - if( !m_pTableCrsr && !m_pBlockCrsr && !m_pCurCrsr->IsMultiSelection() ) + if( !m_pTableCursor && !m_pBlockCursor && !m_pCurrentCursor->IsMultiSelection() ) return; - while( m_pCurCrsr->GetNext() != m_pCurCrsr ) - delete m_pCurCrsr->GetNext(); - m_pCurCrsr->SetColumnSelection( false ); + while( m_pCurrentCursor->GetNext() != m_pCurrentCursor ) + delete m_pCurrentCursor->GetNext(); + m_pCurrentCursor->SetColumnSelection( false ); - if( m_pTableCrsr ) + if( m_pTableCursor ) { // delete the ring of cursors - m_pCurCrsr->DeleteMark(); - *m_pCurCrsr->GetPoint() = *m_pTableCrsr->GetPoint(); - m_pCurCrsr->GetPtPos() = m_pTableCrsr->GetPtPos(); - delete m_pTableCrsr; - m_pTableCrsr = nullptr; + m_pCurrentCursor->DeleteMark(); + *m_pCurrentCursor->GetPoint() = *m_pTableCursor->GetPoint(); + m_pCurrentCursor->GetPtPos() = m_pTableCursor->GetPtPos(); + delete m_pTableCursor; + m_pTableCursor = nullptr; } - else if( m_pBlockCrsr ) + else if( m_pBlockCursor ) { // delete the ring of cursors - m_pCurCrsr->DeleteMark(); - SwShellCrsr &rBlock = m_pBlockCrsr->getShellCrsr(); - *m_pCurCrsr->GetPoint() = *rBlock.GetPoint(); - m_pCurCrsr->GetPtPos() = rBlock.GetPtPos(); + m_pCurrentCursor->DeleteMark(); + SwShellCursor &rBlock = m_pBlockCursor->getShellCursor(); + *m_pCurrentCursor->GetPoint() = *rBlock.GetPoint(); + m_pCurrentCursor->GetPtPos() = rBlock.GetPtPos(); rBlock.DeleteMark(); - m_pBlockCrsr->clearPoints(); + m_pBlockCursor->clearPoints(); } - UpdateCrsr( SwCrsrShell::SCROLLWIN ); + UpdateCursor( SwCursorShell::SCROLLWIN ); } -int SwCrsrShell::CompareCursor( CrsrCompareType eType ) const +int SwCursorShell::CompareCursor( CursorCompareType eType ) const { int nRet = 0; const SwPosition *pFirst = nullptr, *pSecond = nullptr; - const SwPaM *pCur = GetCrsr(), *pStk = m_pCrsrStk; + const SwPaM *pCur = GetCursor(), *pStack = m_pCursorStack; // cursor on stack is needed if we compare against stack - if( pStk || ( eType == CurrPtCurrMk ) ) + if( pStack || ( eType == CurrPtCurrMk ) ) { switch ( eType) { case StackPtStackMk: - pFirst = pStk->GetPoint(); - pSecond = pStk->GetMark(); + pFirst = pStack->GetPoint(); + pSecond = pStack->GetMark(); break; case StackPtCurrPt: - pFirst = pStk->GetPoint(); + pFirst = pStack->GetPoint(); pSecond = pCur->GetPoint(); break; case StackPtCurrMk: - pFirst = pStk->GetPoint(); + pFirst = pStack->GetPoint(); pSecond = pCur->GetMark(); break; case StackMkCurrPt: - pFirst = pStk->GetMark(); + pFirst = pStack->GetMark(); pSecond = pCur->GetPoint(); break; case StackMkCurrMk: - pFirst = pStk->GetMark(); - pSecond = pStk->GetMark(); + pFirst = pStack->GetMark(); + pSecond = pStack->GetMark(); break; case CurrPtCurrMk: pFirst = pCur->GetPoint(); @@ -1077,19 +1077,19 @@ int SwCrsrShell::CompareCursor( CrsrCompareType eType ) const return nRet; } -bool SwCrsrShell::IsSttPara() const -{ return m_pCurCrsr->GetPoint()->nContent == 0; } +bool SwCursorShell::IsSttPara() const +{ return m_pCurrentCursor->GetPoint()->nContent == 0; } -bool SwCrsrShell::IsEndPara() const -{ return m_pCurCrsr->GetPoint()->nContent == m_pCurCrsr->GetContentNode()->Len(); } +bool SwCursorShell::IsEndPara() const +{ return m_pCurrentCursor->GetPoint()->nContent == m_pCurrentCursor->GetContentNode()->Len(); } -bool SwCrsrShell::IsEndOfTable() const +bool SwCursorShell::IsEndOfTable() const { if (IsTableMode() || IsBlockMode() || !IsEndPara()) { return false; } - SwTableNode const*const pTableNode( IsCrsrInTable() ); + SwTableNode const*const pTableNode( IsCursorInTable() ); if (!pTableNode) { return false; @@ -1098,122 +1098,122 @@ bool SwCrsrShell::IsEndOfTable() const SwNodeIndex const lastNode(*pEndTableNode, -2); SAL_WARN_IF(!lastNode.GetNode().GetTextNode(), "sw.core", "text node expected"); - return (lastNode == m_pCurCrsr->GetPoint()->nNode); + return (lastNode == m_pCurrentCursor->GetPoint()->nNode); } -bool SwCrsrShell::IsInFrontOfLabel() const +bool SwCursorShell::IsInFrontOfLabel() const { - return m_pCurCrsr->IsInFrontOfLabel(); + return m_pCurrentCursor->IsInFrontOfLabel(); } -bool SwCrsrShell::SetInFrontOfLabel( bool bNew ) +bool SwCursorShell::SetInFrontOfLabel( bool bNew ) { if ( bNew != IsInFrontOfLabel() ) { - m_pCurCrsr->_SetInFrontOfLabel( bNew ); + m_pCurrentCursor->_SetInFrontOfLabel( bNew ); UpdateMarkedListLevel(); return true; } return false; } -bool SwCrsrShell::GotoPage( sal_uInt16 nPage ) +bool SwCursorShell::GotoPage( sal_uInt16 nPage ) { SET_CURR_SHELL( this ); - SwCallLink aLk( *this ); // watch Crsr-Moves; call Link if needed - SwCrsrSaveState aSaveState( *m_pCurCrsr ); - bool bRet = GetLayout()->SetCurrPage( m_pCurCrsr, nPage ) && - !m_pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE | + SwCallLink aLk( *this ); // watch Cursor-Moves; call Link if needed + SwCursorSaveState aSaveState( *m_pCurrentCursor ); + bool bRet = GetLayout()->SetCurrPage( m_pCurrentCursor, nPage ) && + !m_pCurrentCursor->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE | nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ); if( bRet ) - UpdateCrsr(SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE|SwCrsrShell::READONLY); + UpdateCursor(SwCursorShell::SCROLLWIN|SwCursorShell::CHKRANGE|SwCursorShell::READONLY); return bRet; } -bool SwCrsrShell::GetCharRectAt(SwRect& rRect, const SwPosition* pPos) +bool SwCursorShell::GetCharRectAt(SwRect& rRect, const SwPosition* pPos) { - SwContentFrm* pFrm = GetCurrFrm(); - return pFrm->GetCharRect( rRect, *pPos ); + SwContentFrame* pFrame = GetCurrFrame(); + return pFrame->GetCharRect( rRect, *pPos ); } -void SwCrsrShell::GetPageNum( sal_uInt16 &rnPhyNum, sal_uInt16 &rnVirtNum, - bool bAtCrsrPos, const bool bCalcFrm ) +void SwCursorShell::GetPageNum( sal_uInt16 &rnPhyNum, sal_uInt16 &rnVirtNum, + bool bAtCursorPos, const bool bCalcFrame ) { SET_CURR_SHELL( this ); // page number: first visible page or the one at the cursor - const SwContentFrm* pCFrm; - const SwPageFrm *pPg = nullptr; + const SwContentFrame* pCFrame; + const SwPageFrame *pPg = nullptr; - if( !bAtCrsrPos || nullptr == (pCFrm = GetCurrFrm( bCalcFrm )) || - nullptr == (pPg = pCFrm->FindPageFrm()) ) + if( !bAtCursorPos || nullptr == (pCFrame = GetCurrFrame( bCalcFrame )) || + nullptr == (pPg = pCFrame->FindPageFrame()) ) { pPg = Imp()->GetFirstVisPage(GetOut()); while( pPg && pPg->IsEmptyPage() ) - pPg = static_cast<const SwPageFrm *>(pPg->GetNext()); + pPg = static_cast<const SwPageFrame *>(pPg->GetNext()); } // pPg has to exist with a default of 1 for the special case "Writerstart" rnPhyNum = pPg? pPg->GetPhyPageNum() : 1; rnVirtNum = pPg? pPg->GetVirtPageNum() : 1; } -sal_uInt16 SwCrsrShell::GetNextPrevPageNum( bool bNext ) +sal_uInt16 SwCursorShell::GetNextPrevPageNum( bool bNext ) { SET_CURR_SHELL( this ); // page number: first visible page or the one at the cursor - const SwPageFrm *pPg = Imp()->GetFirstVisPage(GetOut()); + const SwPageFrame *pPg = Imp()->GetFirstVisPage(GetOut()); if( pPg ) { - const SwTwips nPageTop = pPg->Frm().Top(); + const SwTwips nPageTop = pPg->Frame().Top(); if( bNext ) { // go to next view layout row: do { - pPg = static_cast<const SwPageFrm *>(pPg->GetNext()); + pPg = static_cast<const SwPageFrame *>(pPg->GetNext()); } - while( pPg && pPg->Frm().Top() == nPageTop ); + while( pPg && pPg->Frame().Top() == nPageTop ); while( pPg && pPg->IsEmptyPage() ) - pPg = static_cast<const SwPageFrm *>(pPg->GetNext()); + pPg = static_cast<const SwPageFrame *>(pPg->GetNext()); } else { // go to previous view layout row: do { - pPg = static_cast<const SwPageFrm *>(pPg->GetPrev()); + pPg = static_cast<const SwPageFrame *>(pPg->GetPrev()); } - while( pPg && pPg->Frm().Top() == nPageTop ); + while( pPg && pPg->Frame().Top() == nPageTop ); while( pPg && pPg->IsEmptyPage() ) - pPg = static_cast<const SwPageFrm *>(pPg->GetPrev()); + pPg = static_cast<const SwPageFrame *>(pPg->GetPrev()); } } // pPg has to exist with a default of 1 for the special case "Writerstart" return pPg ? pPg->GetPhyPageNum() : USHRT_MAX; } -sal_uInt16 SwCrsrShell::GetPageCnt() +sal_uInt16 SwCursorShell::GetPageCnt() { SET_CURR_SHELL( this ); // return number of pages return GetLayout()->GetPageNum(); } -OUString SwCrsrShell::getPageRectangles() +OUString SwCursorShell::getPageRectangles() { CurrShell aCurr(this); - SwRootFrm* pLayout = GetLayout(); + SwRootFrame* pLayout = GetLayout(); std::vector<OString> v; - for (const SwFrm* pFrm = pLayout->GetLower(); pFrm; pFrm = pFrm->GetNext()) + for (const SwFrame* pFrame = pLayout->GetLower(); pFrame; pFrame = pFrame->GetNext()) { std::vector<OString> aRectangle { - OString::number(pFrm->Frm().Left()), - OString::number(pFrm->Frm().Top()), - OString::number(pFrm->Frm().Width()), - OString::number(pFrm->Frm().Height()) + OString::number(pFrame->Frame().Left()), + OString::number(pFrame->Frame().Top()), + OString::number(pFrame->Frame().Width()), + OString::number(pFrame->Frame().Height()) }; v.push_back(comphelper::string::join(", ", aRectangle)); } @@ -1221,44 +1221,44 @@ OUString SwCrsrShell::getPageRectangles() } /// go to the next SSelection -bool SwCrsrShell::GoNextCrsr() +bool SwCursorShell::GoNextCursor() { - if( !m_pCurCrsr->IsMultiSelection() ) + if( !m_pCurrentCursor->IsMultiSelection() ) return false; SET_CURR_SHELL( this ); - SwCallLink aLk( *this ); // watch Crsr-Moves; call Link if needed - m_pCurCrsr = dynamic_cast<SwShellCrsr*>(m_pCurCrsr->GetNext()); + SwCallLink aLk( *this ); // watch Cursor-Moves; call Link if needed + m_pCurrentCursor = dynamic_cast<SwShellCursor*>(m_pCurrentCursor->GetNext()); // #i24086#: show also all others if( !ActionPend() ) { - UpdateCrsr(); - m_pCurCrsr->Show(); + UpdateCursor(); + m_pCurrentCursor->Show(); } return true; } /// go to the previous SSelection -bool SwCrsrShell::GoPrevCrsr() +bool SwCursorShell::GoPrevCursor() { - if( !m_pCurCrsr->IsMultiSelection() ) + if( !m_pCurrentCursor->IsMultiSelection() ) return false; SET_CURR_SHELL( this ); - SwCallLink aLk( *this ); // watch Crsr-Moves; call Link if needed - m_pCurCrsr = dynamic_cast<SwShellCrsr*>(m_pCurCrsr->GetPrev()); + SwCallLink aLk( *this ); // watch Cursor-Moves; call Link if needed + m_pCurrentCursor = dynamic_cast<SwShellCursor*>(m_pCurrentCursor->GetPrev()); // #i24086#: show also all others if( !ActionPend() ) { - UpdateCrsr(); - m_pCurCrsr->Show(); + UpdateCursor(); + m_pCurrentCursor->Show(); } return true; } -void SwCrsrShell::Paint(vcl::RenderContext& rRenderContext, const Rectangle &rRect) +void SwCursorShell::Paint(vcl::RenderContext& rRenderContext, const Rectangle &rRect) { comphelper::FlagRestorationGuard g(mbSelectAll, StartsWithTable() && ExtendedSelectedAll(/*bFootnotes =*/ false)); SET_CURR_SHELL( this ); @@ -1268,27 +1268,27 @@ void SwCrsrShell::Paint(vcl::RenderContext& rRenderContext, const Rectangle &rRe bool bVis = false; // if a cursor is visible then hide the SV cursor - if( m_pVisCrsr->IsVisible() && !aRect.IsOver( m_aCharRect ) ) + if( m_pVisibleCursor->IsVisible() && !aRect.IsOver( m_aCharRect ) ) { bVis = true; - m_pVisCrsr->Hide(); + m_pVisibleCursor->Hide(); } // re-paint area SwViewShell::Paint(rRenderContext, rRect); - if( m_bHasFocus && !m_bBasicHideCrsr ) + if( m_bHasFocus && !m_bBasicHideCursor ) { - SwShellCrsr* pAktCrsr = m_pTableCrsr ? m_pTableCrsr : m_pCurCrsr; + SwShellCursor* pAktCursor = m_pTableCursor ? m_pTableCursor : m_pCurrentCursor; if( !ActionPend() ) { // so that right/bottom borders will not be cropped - pAktCrsr->Invalidate( VisArea() ); - pAktCrsr->Show(); + pAktCursor->Invalidate( VisArea() ); + pAktCursor->Show(); } else - pAktCrsr->Invalidate( aRect ); + pAktCursor->Invalidate( aRect ); } @@ -1300,18 +1300,18 @@ void SwCrsrShell::Paint(vcl::RenderContext& rRenderContext, const Rectangle &rRe bVis = !pPostItMgr->HasActiveSidebarWin(); } - if( m_bSVCrsrVis && bVis ) // also show SV cursor again - m_pVisCrsr->Show(); + if( m_bSVCursorVis && bVis ) // also show SV cursor again + m_pVisibleCursor->Show(); } -void SwCrsrShell::VisPortChgd( const SwRect & rRect ) +void SwCursorShell::VisPortChgd( const SwRect & rRect ) { SET_CURR_SHELL( this ); bool bVis; // switch off all cursors when scrolling // if a cursor is visible then hide the SV cursor - if( ( bVis = m_pVisCrsr->IsVisible() ) ) - m_pVisCrsr->Hide(); + if( ( bVis = m_pVisibleCursor->IsVisible() ) ) + m_pVisibleCursor->Hide(); m_bVisPortChgd = true; m_aOldRBPos.setX(VisArea().Right()); @@ -1322,10 +1322,10 @@ void SwCrsrShell::VisPortChgd( const SwRect & rRect ) // During painting no selections should be shown, thus the call is encapsulated. <- TODO: old artefact? SwViewShell::VisPortChgd( rRect ); // move area - if( m_bSVCrsrVis && bVis ) // show SV cursor again - m_pVisCrsr->Show(); + if( m_bSVCursorVis && bVis ) // show SV cursor again + m_pVisibleCursor->Show(); - if( m_nCrsrMove ) + if( m_nCursorMove ) m_bInCMvVisportChgd = true; m_bVisPortChgd = false; @@ -1337,24 +1337,24 @@ void SwCrsrShell::VisPortChgd( const SwRect & rRect ) deleting a border). The new position is calculated from its current position in the layout. */ -void SwCrsrShell::UpdateCrsrPos() +void SwCursorShell::UpdateCursorPos() { SET_CURR_SHELL( this ); ++mnStartAction; - SwShellCrsr* pShellCrsr = getShellCrsr( true ); + SwShellCursor* pShellCursor = getShellCursor( true ); Size aOldSz( GetDocSize() ); - if( isInHiddenTextFrm(pShellCrsr) ) + if( isInHiddenTextFrame(pShellCursor) ) { - SwCrsrMoveState aTmpState( MV_NONE ); + SwCursorMoveState aTmpState( MV_NONE ); aTmpState.m_bSetInReadOnly = IsReadOnlyAvailable(); - GetLayout()->GetCrsrOfst( pShellCrsr->GetPoint(), pShellCrsr->GetPtPos(), + GetLayout()->GetCursorOfst( pShellCursor->GetPoint(), pShellCursor->GetPtPos(), &aTmpState ); - pShellCrsr->DeleteMark(); + pShellCursor->DeleteMark(); } IGrammarContact *pGrammarContact = GetDoc() ? GetDoc()->getGrammarContact() : nullptr; if( pGrammarContact ) - pGrammarContact->updateCursorPosition( *m_pCurCrsr->GetPoint() ); + pGrammarContact->updateCursorPosition( *m_pCurrentCursor->GetPoint() ); --mnStartAction; if( aOldSz != GetDocSize() ) SizeChgNotify(); @@ -1368,9 +1368,9 @@ static bool lcl_CheckHiddenSection( SwNodeIndex& rIdx ) if( pSectNd && pSectNd->GetSection().IsHiddenFlag() ) { SwNodeIndex aTmp( *pSectNd ); - const SwNode* pFrmNd = - rIdx.GetNodes().FindPrvNxtFrmNode( aTmp, pSectNd->EndOfSectionNode() ); - bOk = pFrmNd != nullptr; + const SwNode* pFrameNd = + rIdx.GetNodes().FindPrvNxtFrameNode( aTmp, pSectNd->EndOfSectionNode() ); + bOk = pFrameNd != nullptr; SAL_WARN_IF(!bOk, "sw", "found no Node with Frames"); rIdx = aTmp; } @@ -1400,29 +1400,29 @@ static void lcl_CheckHiddenPara( SwPosition& rPos ) class SwNotifyAccAboutInvalidTextSelections { private: - SwCrsrShell& mrCrsrSh; + SwCursorShell& mrCursorSh; public: - explicit SwNotifyAccAboutInvalidTextSelections( SwCrsrShell& _rCrsrSh ) - : mrCrsrSh( _rCrsrSh ) + explicit SwNotifyAccAboutInvalidTextSelections( SwCursorShell& _rCursorSh ) + : mrCursorSh( _rCursorSh ) {} ~SwNotifyAccAboutInvalidTextSelections() { - mrCrsrSh.InvalidateAccessibleParaTextSelection(); + mrCursorSh.InvalidateAccessibleParaTextSelection(); } }; -void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, bool bIdleEnd ) +void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd ) { SET_CURR_SHELL( this ); - ClearUpCrsrs(); + ClearUpCursors(); // In a BasicAction the cursor must be updated, e.g. to create the - // TableCursor. EndAction now calls UpdateCrsr! + // TableCursor. EndAction now calls UpdateCursor! if( ActionPend() && BasicActionPend() ) { - if ( eFlags & SwCrsrShell::READONLY ) + if ( eFlags & SwCursorShell::READONLY ) m_bIgnoreReadonly = true; return; // if not then no update } @@ -1432,70 +1432,70 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, bool bIdleEnd ) if ( m_bIgnoreReadonly ) { m_bIgnoreReadonly = false; - eFlags |= SwCrsrShell::READONLY; + eFlags |= SwCursorShell::READONLY; } - if( eFlags & SwCrsrShell::CHKRANGE ) // check all cursor moves for - CheckRange( m_pCurCrsr ); // overlapping ranges + if( eFlags & SwCursorShell::CHKRANGE ) // check all cursor moves for + CheckRange( m_pCurrentCursor ); // overlapping ranges if( !bIdleEnd ) CheckTableBoxContent(); // If the current cursor is in a table and point/mark in different boxes, - // then the table mode is active (also if it is already active: m_pTableCrsr) - SwPaM* pTstCrsr = getShellCrsr( true ); - if( pTstCrsr->HasMark() && !m_pBlockCrsr && - mpDoc->IsIdxInTable( pTstCrsr->GetPoint()->nNode ) && - ( m_pTableCrsr || - pTstCrsr->GetNode().StartOfSectionNode() != - pTstCrsr->GetNode( false ).StartOfSectionNode() ) && !mbSelectAll) - { - SwShellCrsr* pITmpCrsr = getShellCrsr( true ); - Point aTmpPt( pITmpCrsr->GetPtPos() ); - Point aTmpMk( pITmpCrsr->GetMkPos() ); - SwPosition* pPos = pITmpCrsr->GetPoint(); + // then the table mode is active (also if it is already active: m_pTableCursor) + SwPaM* pTstCursor = getShellCursor( true ); + if( pTstCursor->HasMark() && !m_pBlockCursor && + mpDoc->IsIdxInTable( pTstCursor->GetPoint()->nNode ) && + ( m_pTableCursor || + pTstCursor->GetNode().StartOfSectionNode() != + pTstCursor->GetNode( false ).StartOfSectionNode() ) && !mbSelectAll) + { + SwShellCursor* pITmpCursor = getShellCursor( true ); + Point aTmpPt( pITmpCursor->GetPtPos() ); + Point aTmpMk( pITmpCursor->GetMkPos() ); + SwPosition* pPos = pITmpCursor->GetPoint(); // Bug 65475 (1999) - if Point/Mark in hidden sections, move them out lcl_CheckHiddenSection( pPos->nNode ); - lcl_CheckHiddenSection( pITmpCrsr->GetMark()->nNode ); + lcl_CheckHiddenSection( pITmpCursor->GetMark()->nNode ); // Move cursor out of hidden paragraphs if ( !GetViewOptions()->IsShowHiddenChar() ) { lcl_CheckHiddenPara( *pPos ); - lcl_CheckHiddenPara( *pITmpCrsr->GetMark() ); + lcl_CheckHiddenPara( *pITmpCursor->GetMark() ); } - SwContentFrm *pTableFrm = pPos->nNode.GetNode().GetContentNode()-> - getLayoutFrm( GetLayout(), &aTmpPt, pPos, false ); + SwContentFrame *pTableFrame = pPos->nNode.GetNode().GetContentNode()-> + getLayoutFrame( GetLayout(), &aTmpPt, pPos, false ); - OSL_ENSURE( pTableFrm, "Tabelle Crsr nicht im Content ??" ); + OSL_ENSURE( pTableFrame, "Tabelle Cursor nicht im Content ??" ); // --> Make code robust. The table cursor may point // to a table in a currently inactive header. - SwTabFrm *pTab = pTableFrm ? pTableFrm->FindTabFrm() : nullptr; + SwTabFrame *pTab = pTableFrame ? pTableFrame->FindTabFrame() : nullptr; if ( pTab && pTab->GetTable()->GetRowsToRepeat() > 0 ) { // First check if point is in repeated headline: - bool bInRepeatedHeadline = pTab->IsFollow() && pTab->IsInHeadline( *pTableFrm ); + bool bInRepeatedHeadline = pTab->IsFollow() && pTab->IsInHeadline( *pTableFrame ); // Second check if mark is in repeated headline: if ( !bInRepeatedHeadline ) { - SwContentFrm* pMarkTableFrm = pITmpCrsr->GetContentNode( false )-> - getLayoutFrm( GetLayout(), &aTmpMk, pITmpCrsr->GetMark(), false ); - OSL_ENSURE( pMarkTableFrm, "Tabelle Crsr nicht im Content ??" ); + SwContentFrame* pMarkTableFrame = pITmpCursor->GetContentNode( false )-> + getLayoutFrame( GetLayout(), &aTmpMk, pITmpCursor->GetMark(), false ); + OSL_ENSURE( pMarkTableFrame, "Tabelle Cursor nicht im Content ??" ); - if ( pMarkTableFrm ) + if ( pMarkTableFrame ) { - SwTabFrm* pMarkTab = pMarkTableFrm->FindTabFrm(); - OSL_ENSURE( pMarkTab, "Tabelle Crsr nicht im Content ??" ); + SwTabFrame* pMarkTab = pMarkTableFrame->FindTabFrame(); + OSL_ENSURE( pMarkTab, "Tabelle Cursor nicht im Content ??" ); // Make code robust: if ( pMarkTab ) { - bInRepeatedHeadline = pMarkTab->IsFollow() && pMarkTab->IsInHeadline( *pMarkTableFrm ); + bInRepeatedHeadline = pMarkTab->IsFollow() && pMarkTab->IsInHeadline( *pMarkTableFrame ); } } } @@ -1503,40 +1503,40 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, bool bIdleEnd ) // No table cursor in repeated headlines: if ( bInRepeatedHeadline ) { - pTableFrm = nullptr; + pTableFrame = nullptr; - SwPosSection fnPosSect = *pPos < *pITmpCrsr->GetMark() + SwPosSection fnPosSect = *pPos < *pITmpCursor->GetMark() ? fnSectionStart : fnSectionEnd; // then only select inside the Box - if( m_pTableCrsr ) + if( m_pTableCursor ) { - m_pCurCrsr->SetMark(); - *m_pCurCrsr->GetMark() = *m_pTableCrsr->GetMark(); - m_pCurCrsr->GetMkPos() = m_pTableCrsr->GetMkPos(); - m_pTableCrsr->DeleteMark(); - m_pTableCrsr->SwSelPaintRects::Hide(); + m_pCurrentCursor->SetMark(); + *m_pCurrentCursor->GetMark() = *m_pTableCursor->GetMark(); + m_pCurrentCursor->GetMkPos() = m_pTableCursor->GetMkPos(); + m_pTableCursor->DeleteMark(); + m_pTableCursor->SwSelPaintRects::Hide(); } - *m_pCurCrsr->GetPoint() = *m_pCurCrsr->GetMark(); - (*fnSectionCurr)( *m_pCurCrsr, fnPosSect ); + *m_pCurrentCursor->GetPoint() = *m_pCurrentCursor->GetMark(); + (*fnSectionCurr)( *m_pCurrentCursor, fnPosSect ); } } // we really want a table selection - if( pTab && pTableFrm ) + if( pTab && pTableFrame ) { - if( !m_pTableCrsr ) + if( !m_pTableCursor ) { - m_pTableCrsr = new SwShellTableCrsr( *this, - *m_pCurCrsr->GetMark(), m_pCurCrsr->GetMkPos(), + m_pTableCursor = new SwShellTableCursor( *this, + *m_pCurrentCursor->GetMark(), m_pCurrentCursor->GetMkPos(), *pPos, aTmpPt ); - m_pCurCrsr->DeleteMark(); - m_pCurCrsr->SwSelPaintRects::Hide(); + m_pCurrentCursor->DeleteMark(); + m_pCurrentCursor->SwSelPaintRects::Hide(); CheckTableBoxContent(); - if(!m_pTableCrsr) + if(!m_pTableCursor) { SAL_WARN("sw", "fdo#74854: " "this should not happen, but better lose the selection " @@ -1545,76 +1545,76 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, bool bIdleEnd ) } } - SwCrsrMoveState aTmpState( MV_NONE ); + SwCursorMoveState aTmpState( MV_NONE ); aTmpState.m_bRealHeight = true; - if( !pTableFrm->GetCharRect( m_aCharRect, *m_pTableCrsr->GetPoint(), &aTmpState ) ) + if( !pTableFrame->GetCharRect( m_aCharRect, *m_pTableCursor->GetPoint(), &aTmpState ) ) { Point aCentrPt( m_aCharRect.Center() ); aTmpState.m_bSetInReadOnly = IsReadOnlyAvailable(); - pTableFrm->GetCrsrOfst( m_pTableCrsr->GetPoint(), aCentrPt, &aTmpState ); + pTableFrame->GetCursorOfst( m_pTableCursor->GetPoint(), aCentrPt, &aTmpState ); bool const bResult = - pTableFrm->GetCharRect( m_aCharRect, *m_pTableCrsr->GetPoint() ); + pTableFrame->GetCharRect( m_aCharRect, *m_pTableCursor->GetPoint() ); OSL_ENSURE( bResult, "GetCharRect failed." ); (void) bResult; // non-debug: unused } - m_pVisCrsr->Hide(); // always hide visible Cursor + m_pVisibleCursor->Hide(); // always hide visible Cursor // scroll Cursor to visible area - if( (eFlags & SwCrsrShell::SCROLLWIN) && - (HasSelection() || eFlags & SwCrsrShell::READONLY || - !IsCrsrReadonly()) ) + if( (eFlags & SwCursorShell::SCROLLWIN) && + (HasSelection() || eFlags & SwCursorShell::READONLY || + !IsCursorReadonly()) ) { - SwFrm* pBoxFrm = pTableFrm; - while( pBoxFrm && !pBoxFrm->IsCellFrm() ) - pBoxFrm = pBoxFrm->GetUpper(); - if( pBoxFrm && pBoxFrm->Frm().HasArea() ) - MakeVisible( pBoxFrm->Frm() ); + SwFrame* pBoxFrame = pTableFrame; + while( pBoxFrame && !pBoxFrame->IsCellFrame() ) + pBoxFrame = pBoxFrame->GetUpper(); + if( pBoxFrame && pBoxFrame->Frame().HasArea() ) + MakeVisible( pBoxFrame->Frame() ); else MakeVisible( m_aCharRect ); } // let Layout create the Cursors in the Boxes - if( m_pTableCrsr->IsCrsrMovedUpdate() ) - GetLayout()->MakeTableCrsrs( *m_pTableCrsr ); - if( m_bHasFocus && !m_bBasicHideCrsr ) - m_pTableCrsr->Show(); + if( m_pTableCursor->IsCursorMovedUpdate() ) + GetLayout()->MakeTableCursors( *m_pTableCursor ); + if( m_bHasFocus && !m_bBasicHideCursor ) + m_pTableCursor->Show(); // set Cursor-Points to the new Positions - m_pTableCrsr->GetPtPos().setX(m_aCharRect.Left()); - m_pTableCrsr->GetPtPos().setY(m_aCharRect.Top()); + m_pTableCursor->GetPtPos().setX(m_aCharRect.Left()); + m_pTableCursor->GetPtPos().setY(m_aCharRect.Top()); - if( m_bSVCrsrVis ) + if( m_bSVCursorVis ) { - m_aCrsrHeight.setX(0); - m_aCrsrHeight.setY(aTmpState.m_aRealHeight.getY() < 0 ? + m_aCursorHeight.setX(0); + m_aCursorHeight.setY(aTmpState.m_aRealHeight.getY() < 0 ? -m_aCharRect.Width() : m_aCharRect.Height()); - m_pVisCrsr->Show(); // show again + m_pVisibleCursor->Show(); // show again } - m_eMvState = MV_NONE; // state for cursor travelling - GetCrsrOfst - if( pTableFrm && Imp()->IsAccessible() ) - Imp()->InvalidateAccessibleCursorPosition( pTableFrm ); + m_eMvState = MV_NONE; // state for cursor travelling - GetCursorOfst + if( pTableFrame && Imp()->IsAccessible() ) + Imp()->InvalidateAccessibleCursorPosition( pTableFrame ); return; } } - if( m_pTableCrsr ) + if( m_pTableCursor ) { // delete Ring - while( m_pCurCrsr->GetNext() != m_pCurCrsr ) - delete m_pCurCrsr->GetNext(); - m_pCurCrsr->DeleteMark(); - *m_pCurCrsr->GetPoint() = *m_pTableCrsr->GetPoint(); - m_pCurCrsr->GetPtPos() = m_pTableCrsr->GetPtPos(); - delete m_pTableCrsr, m_pTableCrsr = nullptr; + while( m_pCurrentCursor->GetNext() != m_pCurrentCursor ) + delete m_pCurrentCursor->GetNext(); + m_pCurrentCursor->DeleteMark(); + *m_pCurrentCursor->GetPoint() = *m_pTableCursor->GetPoint(); + m_pCurrentCursor->GetPtPos() = m_pTableCursor->GetPtPos(); + delete m_pTableCursor, m_pTableCursor = nullptr; } - m_pVisCrsr->Hide(); // always hide visible Cursor + m_pVisibleCursor->Hide(); // always hide visible Cursor // are we perhaps in a protected / hidden Section ? { - SwShellCrsr* pShellCrsr = getShellCrsr( true ); + SwShellCursor* pShellCursor = getShellCursor( true ); bool bChgState = true; - const SwSectionNode* pSectNd = pShellCrsr->GetNode().FindSectionNode(); + const SwSectionNode* pSectNd = pShellCursor->GetNode().FindSectionNode(); if( pSectNd && ( pSectNd->GetSection().IsHiddenFlag() || ( !IsReadOnlyAvailable() && pSectNd->GetSection().IsProtectFlag() && @@ -1654,14 +1654,14 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, bool bIdleEnd ) } } - UpdateCrsrPos(); + UpdateCursorPos(); // The cursor must always point into content; there's some code // that relies on this. (E.g. in SwEditShell::GetScriptType, which always // loops _behind_ the last node in the selection, which always works if you // are in content.) To achieve this, we'll force cursor(s) to point into - // content, if UpdateCrsrPos() hasn't already done so. - for(SwPaM& rCmp : m_pCurCrsr->GetRingContainer()) + // content, if UpdateCursorPos() hasn't already done so. + for(SwPaM& rCmp : m_pCurrentCursor->GetRingContainer()) { // start will move forwards, end will move backwards bool bPointIsStart = ( rCmp.Start() == rCmp.GetPoint() ); @@ -1686,33 +1686,33 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, bool bIdleEnd ) SwRect aOld( m_aCharRect ); bool bFirst = true; - SwContentFrm *pFrm; + SwContentFrame *pFrame; int nLoopCnt = 100; - SwShellCrsr* pShellCrsr = getShellCrsr( true ); + SwShellCursor* pShellCursor = getShellCursor( true ); do { bool bAgainst; do { bAgainst = false; - pFrm = pShellCrsr->GetContentNode()->getLayoutFrm( GetLayout(), - &pShellCrsr->GetPtPos(), pShellCrsr->GetPoint(), false ); - // if the Frm doesn't exist anymore, the complete Layout has to be - // created, because there used to be a Frm here! - if ( !pFrm ) + pFrame = pShellCursor->GetContentNode()->getLayoutFrame( GetLayout(), + &pShellCursor->GetPtPos(), pShellCursor->GetPoint(), false ); + // if the Frame doesn't exist anymore, the complete Layout has to be + // created, because there used to be a Frame here! + if ( !pFrame ) { do { CalcLayout(); - pFrm = pShellCrsr->GetContentNode()->getLayoutFrm( GetLayout(), - &pShellCrsr->GetPtPos(), pShellCrsr->GetPoint(), false ); - } while( !pFrm ); + pFrame = pShellCursor->GetContentNode()->getLayoutFrame( GetLayout(), + &pShellCursor->GetPtPos(), pShellCursor->GetPoint(), false ); + } while( !pFrame ); } else if ( Imp()->IsIdleAction() ) // Guarantee everything's properly formatted - pFrm->PrepareCrsr(); + pFrame->PrepareCursor(); // In protected Fly? but ignore in case of frame selection - if( !IsReadOnlyAvailable() && pFrm->IsProtected() && + if( !IsReadOnlyAvailable() && pFrame->IsProtected() && ( !Imp()->GetDrawView() || !Imp()->GetDrawView()->GetMarkedObjectList().GetMarkCount() ) && (!mpDoc->GetDocShell() || @@ -1750,40 +1750,40 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, bool bIdleEnd ) CallChgLnk(); // notify UI! } m_bAllProtect = false; - bAgainst = true; // look for the right Frm again + bAgainst = true; // look for the right Frame again } } } while( bAgainst ); - SwCrsrMoveState aTmpState( m_eMvState ); + SwCursorMoveState aTmpState( m_eMvState ); aTmpState.m_bSetInReadOnly = IsReadOnlyAvailable(); aTmpState.m_bRealHeight = true; - aTmpState.m_bRealWidth = IsOverwriteCrsr(); - aTmpState.m_nCursorBidiLevel = pShellCrsr->GetCrsrBidiLevel(); + aTmpState.m_bRealWidth = IsOverwriteCursor(); + aTmpState.m_nCursorBidiLevel = pShellCursor->GetCursorBidiLevel(); // #i27615#,#i30453# SwSpecialPos aSpecialPos; aSpecialPos.nExtendRange = SwSPExtendRange::BEFORE; - if (pShellCrsr->IsInFrontOfLabel()) + if (pShellCursor->IsInFrontOfLabel()) { aTmpState.m_pSpecialPos = &aSpecialPos; } ++mnStartAction; // tdf#91602 prevent recursive Action! - if( !pFrm->GetCharRect( m_aCharRect, *pShellCrsr->GetPoint(), &aTmpState ) ) + if( !pFrame->GetCharRect( m_aCharRect, *pShellCursor->GetPoint(), &aTmpState ) ) { - Point& rPt = pShellCrsr->GetPtPos(); + Point& rPt = pShellCursor->GetPtPos(); rPt = m_aCharRect.Center(); - pFrm->GetCrsrOfst( pShellCrsr->GetPoint(), rPt, &aTmpState ); + pFrame->GetCursorOfst( pShellCursor->GetPoint(), rPt, &aTmpState ); } --mnStartAction; - if( !pShellCrsr->HasMark() ) - m_aCrsrHeight = aTmpState.m_aRealHeight; + if( !pShellCursor->HasMark() ) + m_aCursorHeight = aTmpState.m_aRealHeight; else { - m_aCrsrHeight.setX(0); - m_aCrsrHeight.setY(aTmpState.m_aRealHeight.getY() < 0 ? + m_aCursorHeight.setX(0); + m_aCursorHeight.setY(aTmpState.m_aRealHeight.getY() < 0 ? -m_aCharRect.Width() : m_aCharRect.Height()); } @@ -1802,64 +1802,64 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, bool bIdleEnd ) bFirst = false; // update cursor Points to the new Positions - pShellCrsr->GetPtPos().setX(m_aCharRect.Left()); - pShellCrsr->GetPtPos().setY(m_aCharRect.Top()); + pShellCursor->GetPtPos().setX(m_aCharRect.Left()); + pShellCursor->GetPtPos().setY(m_aCharRect.Top()); - if( !(eFlags & SwCrsrShell::UPDOWN )) // delete old Pos. of Up/Down + if( !(eFlags & SwCursorShell::UPDOWN )) // delete old Pos. of Up/Down { - pFrm->Calc(GetOut()); - m_nUpDownX = pFrm->IsVertical() ? - m_aCharRect.Top() - pFrm->Frm().Top() : - m_aCharRect.Left() - pFrm->Frm().Left(); + pFrame->Calc(GetOut()); + m_nUpDownX = pFrame->IsVertical() ? + m_aCharRect.Top() - pFrame->Frame().Top() : + m_aCharRect.Left() - pFrame->Frame().Left(); } // scroll Cursor to visible area - if( m_bHasFocus && eFlags & SwCrsrShell::SCROLLWIN && - (HasSelection() || eFlags & SwCrsrShell::READONLY || - !IsCrsrReadonly() || GetViewOptions()->IsSelectionInReadonly()) ) + if( m_bHasFocus && eFlags & SwCursorShell::SCROLLWIN && + (HasSelection() || eFlags & SwCursorShell::READONLY || + !IsCursorReadonly() || GetViewOptions()->IsSelectionInReadonly()) ) { // in case of scrolling this EndAction doesn't show the SV cursor // again, thus save and reset the flag here - bool bSav = m_bSVCrsrVis; - m_bSVCrsrVis = false; + bool bSav = m_bSVCursorVis; + m_bSVCursorVis = false; MakeSelVisible(); - m_bSVCrsrVis = bSav; + m_bSVCursorVis = bSav; } - } while( eFlags & SwCrsrShell::SCROLLWIN ); + } while( eFlags & SwCursorShell::SCROLLWIN ); - if( m_pBlockCrsr ) + if( m_pBlockCursor ) RefreshBlockCursor(); - if( !bIdleEnd && m_bHasFocus && !m_bBasicHideCrsr ) + if( !bIdleEnd && m_bHasFocus && !m_bBasicHideCursor ) { - if( m_pTableCrsr ) - m_pTableCrsr->SwSelPaintRects::Show(); + if( m_pTableCursor ) + m_pTableCursor->SwSelPaintRects::Show(); else { - m_pCurCrsr->SwSelPaintRects::Show(); - if( m_pBlockCrsr ) + m_pCurrentCursor->SwSelPaintRects::Show(); + if( m_pBlockCursor ) { - SwShellCrsr* pNxt = dynamic_cast<SwShellCrsr*>(m_pCurCrsr->GetNext()); - while( pNxt && pNxt != m_pCurCrsr ) + SwShellCursor* pNxt = dynamic_cast<SwShellCursor*>(m_pCurrentCursor->GetNext()); + while( pNxt && pNxt != m_pCurrentCursor ) { pNxt->SwSelPaintRects::Show(); - pNxt = dynamic_cast<SwShellCrsr*>(pNxt->GetNext()); + pNxt = dynamic_cast<SwShellCursor*>(pNxt->GetNext()); } } } } - m_eMvState = MV_NONE; // state for cursor tavelling - GetCrsrOfst + m_eMvState = MV_NONE; // state for cursor tavelling - GetCursorOfst - if( pFrm && Imp()->IsAccessible() ) - Imp()->InvalidateAccessibleCursorPosition( pFrm ); + if( pFrame && Imp()->IsAccessible() ) + Imp()->InvalidateAccessibleCursorPosition( pFrame ); // switch from blinking cursor to read-only-text-selection cursor const sal_uInt64 nBlinkTime = GetOut()->GetSettings().GetStyleSettings(). GetCursorBlinkTime(); - if ( (IsCrsrReadonly() && GetViewOptions()->IsSelectionInReadonly()) == + if ( (IsCursorReadonly() && GetViewOptions()->IsSelectionInReadonly()) == ( nBlinkTime != STYLE_CURSOR_NOBLINKTIME ) ) { // non blinking cursor in read only - text selection mode @@ -1873,195 +1873,195 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, bool bIdleEnd ) GetOut()->SetSettings( aSettings ); } - if( m_bSVCrsrVis ) - m_pVisCrsr->Show(); // show again + if( m_bSVCursorVis ) + m_pVisibleCursor->Show(); // show again } -void SwCrsrShell::RefreshBlockCursor() +void SwCursorShell::RefreshBlockCursor() { - OSL_ENSURE( m_pBlockCrsr, "Don't call me without a block cursor" ); - SwShellCrsr &rBlock = m_pBlockCrsr->getShellCrsr(); + OSL_ENSURE( m_pBlockCursor, "Don't call me without a block cursor" ); + SwShellCursor &rBlock = m_pBlockCursor->getShellCursor(); Point aPt = rBlock.GetPtPos(); - SwContentFrm* pFrm = rBlock.GetContentNode()->getLayoutFrm( GetLayout(), &aPt, rBlock.GetPoint(), false ); + SwContentFrame* pFrame = rBlock.GetContentNode()->getLayoutFrame( GetLayout(), &aPt, rBlock.GetPoint(), false ); Point aMk; - if( m_pBlockCrsr->getEndPoint() && m_pBlockCrsr->getStartPoint() ) + if( m_pBlockCursor->getEndPoint() && m_pBlockCursor->getStartPoint() ) { - aPt = *m_pBlockCrsr->getStartPoint(); - aMk = *m_pBlockCrsr->getEndPoint(); + aPt = *m_pBlockCursor->getStartPoint(); + aMk = *m_pBlockCursor->getEndPoint(); } else { aPt = rBlock.GetPtPos(); - if( pFrm ) + if( pFrame ) { - if( pFrm->IsVertical() ) - aPt.setY(pFrm->Frm().Top() + GetUpDownX()); + if( pFrame->IsVertical() ) + aPt.setY(pFrame->Frame().Top() + GetUpDownX()); else - aPt.setX(pFrm->Frm().Left() + GetUpDownX()); + aPt.setX(pFrame->Frame().Left() + GetUpDownX()); } aMk = rBlock.GetMkPos(); } SwRect aRect( aMk, aPt ); aRect.Justify(); - SwSelectionList aSelList( pFrm ); + SwSelectionList aSelList( pFrame ); if( GetLayout()->FillSelection( aSelList, aRect ) ) { - SwCursor* pNxt = static_cast<SwCursor*>(m_pCurCrsr->GetNext()); - while( pNxt != m_pCurCrsr ) + SwCursor* pNxt = static_cast<SwCursor*>(m_pCurrentCursor->GetNext()); + while( pNxt != m_pCurrentCursor ) { delete pNxt; - pNxt = static_cast<SwCursor*>(m_pCurCrsr->GetNext()); + pNxt = static_cast<SwCursor*>(m_pCurrentCursor->GetNext()); } std::list<SwPaM*>::iterator pStart = aSelList.getStart(); std::list<SwPaM*>::iterator pPam = aSelList.getEnd(); OSL_ENSURE( pPam != pStart, "FillSelection should deliver at least one PaM" ); - m_pCurCrsr->SetMark(); + m_pCurrentCursor->SetMark(); --pPam; // If there is only one text portion inside the rectangle, a simple // selection is created if( pPam == pStart ) { - *m_pCurCrsr->GetPoint() = *(*pPam)->GetPoint(); + *m_pCurrentCursor->GetPoint() = *(*pPam)->GetPoint(); if( (*pPam)->HasMark() ) - *m_pCurCrsr->GetMark() = *(*pPam)->GetMark(); + *m_pCurrentCursor->GetMark() = *(*pPam)->GetMark(); else - m_pCurCrsr->DeleteMark(); + m_pCurrentCursor->DeleteMark(); delete *pPam; - m_pCurCrsr->SetColumnSelection( false ); + m_pCurrentCursor->SetColumnSelection( false ); } else { // The order of the SwSelectionList has to be preserved but - // the order inside the ring created by CreateCrsr() is not like + // the order inside the ring created by CreateCursor() is not like // expected => First create the selections before the last one // downto the first selection. // At least create the cursor for the last selection --pPam; - *m_pCurCrsr->GetPoint() = *(*pPam)->GetPoint(); // n-1 (if n == number of selections) + *m_pCurrentCursor->GetPoint() = *(*pPam)->GetPoint(); // n-1 (if n == number of selections) if( (*pPam)->HasMark() ) - *m_pCurCrsr->GetMark() = *(*pPam)->GetMark(); + *m_pCurrentCursor->GetMark() = *(*pPam)->GetMark(); else - m_pCurCrsr->DeleteMark(); + m_pCurrentCursor->DeleteMark(); delete *pPam; - m_pCurCrsr->SetColumnSelection( true ); + m_pCurrentCursor->SetColumnSelection( true ); while( pPam != pStart ) { --pPam; - SwShellCrsr* pNew = new SwShellCrsr( *m_pCurCrsr ); - pNew->insert( pNew->begin(), m_pCurCrsr->begin(), m_pCurCrsr->end()); - m_pCurCrsr->clear(); - m_pCurCrsr->DeleteMark(); + SwShellCursor* pNew = new SwShellCursor( *m_pCurrentCursor ); + pNew->insert( pNew->begin(), m_pCurrentCursor->begin(), m_pCurrentCursor->end()); + m_pCurrentCursor->clear(); + m_pCurrentCursor->DeleteMark(); - *m_pCurCrsr->GetPoint() = *(*pPam)->GetPoint(); // n-2, n-3, .., 2, 1 + *m_pCurrentCursor->GetPoint() = *(*pPam)->GetPoint(); // n-2, n-3, .., 2, 1 if( (*pPam)->HasMark() ) { - m_pCurCrsr->SetMark(); - *m_pCurCrsr->GetMark() = *(*pPam)->GetMark(); + m_pCurrentCursor->SetMark(); + *m_pCurrentCursor->GetMark() = *(*pPam)->GetMark(); } else - m_pCurCrsr->DeleteMark(); - m_pCurCrsr->SetColumnSelection( true ); + m_pCurrentCursor->DeleteMark(); + m_pCurrentCursor->SetColumnSelection( true ); delete *pPam; } { - SwShellCrsr* pNew = new SwShellCrsr( *m_pCurCrsr ); - pNew->insert( pNew->begin(), m_pCurCrsr->begin(), m_pCurCrsr->end() ); - m_pCurCrsr->clear(); - m_pCurCrsr->DeleteMark(); + SwShellCursor* pNew = new SwShellCursor( *m_pCurrentCursor ); + pNew->insert( pNew->begin(), m_pCurrentCursor->begin(), m_pCurrentCursor->end() ); + m_pCurrentCursor->clear(); + m_pCurrentCursor->DeleteMark(); } pPam = aSelList.getEnd(); --pPam; - *m_pCurCrsr->GetPoint() = *(*pPam)->GetPoint(); // n, the last selection + *m_pCurrentCursor->GetPoint() = *(*pPam)->GetPoint(); // n, the last selection if( (*pPam)->HasMark() ) { - m_pCurCrsr->SetMark(); - *m_pCurCrsr->GetMark() = *(*pPam)->GetMark(); + m_pCurrentCursor->SetMark(); + *m_pCurrentCursor->GetMark() = *(*pPam)->GetMark(); } else - m_pCurCrsr->DeleteMark(); - m_pCurCrsr->SetColumnSelection( true ); + m_pCurrentCursor->DeleteMark(); + m_pCurrentCursor->SetColumnSelection( true ); delete *pPam; } } } /// create a copy of the cursor and save it in the stack -void SwCrsrShell::Push() +void SwCursorShell::Push() { // fdo#60513: if we have a table cursor, copy that; else copy current. - // This seems to work because UpdateCrsr() will fix this up on Pop(), - // then MakeBoxSels() will re-create the current m_pCurCrsr cell ring. - SwShellCrsr *const pCurrent((m_pTableCrsr) ? m_pTableCrsr : m_pCurCrsr); - m_pCrsrStk = new SwShellCrsr( *this, *pCurrent->GetPoint(), - pCurrent->GetPtPos(), m_pCrsrStk ); + // This seems to work because UpdateCursor() will fix this up on Pop(), + // then MakeBoxSels() will re-create the current m_pCurrentCursor cell ring. + SwShellCursor *const pCurrent((m_pTableCursor) ? m_pTableCursor : m_pCurrentCursor); + m_pCursorStack = new SwShellCursor( *this, *pCurrent->GetPoint(), + pCurrent->GetPtPos(), m_pCursorStack ); if (pCurrent->HasMark()) { - m_pCrsrStk->SetMark(); - *m_pCrsrStk->GetMark() = *pCurrent->GetMark(); + m_pCursorStack->SetMark(); + *m_pCursorStack->GetMark() = *pCurrent->GetMark(); } } /** delete cursor - @param bOldCrsr If <true> so delete from stack, if <false> delete current + @param bOldCursor If <true> so delete from stack, if <false> delete current and assign the one from stack as the new current cursor. @return <true> if there was one on the stack, <false> otherwise */ -bool SwCrsrShell::Pop( bool bOldCrsr ) +bool SwCursorShell::Pop( bool bOldCursor ) { - SwCallLink aLk( *this ); // watch Crsr-Moves; call Link if needed + SwCallLink aLk( *this ); // watch Cursor-Moves; call Link if needed // are there any left? - if( nullptr == m_pCrsrStk ) + if( nullptr == m_pCursorStack ) return false; - SwShellCrsr *pTmp = nullptr, *pOldStk = m_pCrsrStk; + SwShellCursor *pTmp = nullptr, *pOldStack = m_pCursorStack; // the successor becomes the current one - if( m_pCrsrStk->GetNext() != m_pCrsrStk ) + if( m_pCursorStack->GetNext() != m_pCursorStack ) { - pTmp = dynamic_cast<SwShellCrsr*>(m_pCrsrStk->GetNext()); + pTmp = dynamic_cast<SwShellCursor*>(m_pCursorStack->GetNext()); } - if( bOldCrsr ) // delete from stack - delete m_pCrsrStk; + if( bOldCursor ) // delete from stack + delete m_pCursorStack; - m_pCrsrStk = pTmp; // assign new one + m_pCursorStack = pTmp; // assign new one - if( !bOldCrsr ) + if( !bOldCursor ) { - SwCrsrSaveState aSaveState( *m_pCurCrsr ); + SwCursorSaveState aSaveState( *m_pCurrentCursor ); // If the visible SSelection was not changed - const Point& rPoint = pOldStk->GetPtPos(); - if (rPoint == m_pCurCrsr->GetPtPos() || rPoint == m_pCurCrsr->GetMkPos()) + const Point& rPoint = pOldStack->GetPtPos(); + if (rPoint == m_pCurrentCursor->GetPtPos() || rPoint == m_pCurrentCursor->GetMkPos()) { // move "Selections Rectangles" - m_pCurCrsr->insert( m_pCurCrsr->begin(), pOldStk->begin(), pOldStk->end() ); - pOldStk->clear(); + m_pCurrentCursor->insert( m_pCurrentCursor->begin(), pOldStack->begin(), pOldStack->end() ); + pOldStack->clear(); } - if( pOldStk->HasMark() ) + if( pOldStack->HasMark() ) { - m_pCurCrsr->SetMark(); - *m_pCurCrsr->GetMark() = *pOldStk->GetMark(); - m_pCurCrsr->GetMkPos() = pOldStk->GetMkPos(); + m_pCurrentCursor->SetMark(); + *m_pCurrentCursor->GetMark() = *pOldStack->GetMark(); + m_pCurrentCursor->GetMkPos() = pOldStack->GetMkPos(); } else // no selection so revoke old one and set to old position - m_pCurCrsr->DeleteMark(); - *m_pCurCrsr->GetPoint() = *pOldStk->GetPoint(); - m_pCurCrsr->GetPtPos() = pOldStk->GetPtPos(); - delete pOldStk; + m_pCurrentCursor->DeleteMark(); + *m_pCurrentCursor->GetPoint() = *pOldStack->GetPoint(); + m_pCurrentCursor->GetPtPos() = pOldStack->GetPtPos(); + delete pOldStack; - if( !m_pCurCrsr->IsInProtectTable( true ) && - !m_pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE | + if( !m_pCurrentCursor->IsInProtectTable( true ) && + !m_pCurrentCursor->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE | nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ) ) - UpdateCrsr(); // update current cursor + UpdateCursor(); // update current cursor } return true; } @@ -2070,75 +2070,75 @@ bool SwCrsrShell::Pop( bool bOldCrsr ) Delete topmost from stack and use its GetMark in the current. */ -void SwCrsrShell::Combine() +void SwCursorShell::Combine() { // any others left? - if( nullptr == m_pCrsrStk ) + if( nullptr == m_pCursorStack ) return; - SwCallLink aLk( *this ); // watch Crsr-Moves; call Link if needed + SwCallLink aLk( *this ); // watch Cursor-Moves; call Link if needed // rhbz#689053: IsSelOvr must restore the saved stack position, not the // current one, because current point + stack mark may be invalid PaM - SwCrsrSaveState aSaveState(*m_pCrsrStk); + SwCursorSaveState aSaveState(*m_pCursorStack); // stack cursor & current cursor in same Section? - assert(!m_pCrsrStk->HasMark() || - CheckNodesRange(m_pCrsrStk->GetMark()->nNode, - m_pCurCrsr->GetPoint()->nNode, true)); - *m_pCrsrStk->GetPoint() = *m_pCurCrsr->GetPoint(); - m_pCrsrStk->GetPtPos() = m_pCurCrsr->GetPtPos(); - - SwShellCrsr * pTmp = nullptr; - if( m_pCrsrStk->GetNext() != m_pCrsrStk ) - { - pTmp = dynamic_cast<SwShellCrsr*>(m_pCrsrStk->GetNext()); - } - delete m_pCurCrsr; - m_pCurCrsr = m_pCrsrStk; - m_pCrsrStk->MoveTo(nullptr); // remove from ring - m_pCrsrStk = pTmp; - if( !m_pCurCrsr->IsInProtectTable( true ) && - !m_pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE | + assert(!m_pCursorStack->HasMark() || + CheckNodesRange(m_pCursorStack->GetMark()->nNode, + m_pCurrentCursor->GetPoint()->nNode, true)); + *m_pCursorStack->GetPoint() = *m_pCurrentCursor->GetPoint(); + m_pCursorStack->GetPtPos() = m_pCurrentCursor->GetPtPos(); + + SwShellCursor * pTmp = nullptr; + if( m_pCursorStack->GetNext() != m_pCursorStack ) + { + pTmp = dynamic_cast<SwShellCursor*>(m_pCursorStack->GetNext()); + } + delete m_pCurrentCursor; + m_pCurrentCursor = m_pCursorStack; + m_pCursorStack->MoveTo(nullptr); // remove from ring + m_pCursorStack = pTmp; + if( !m_pCurrentCursor->IsInProtectTable( true ) && + !m_pCurrentCursor->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE | nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ) ) { - UpdateCrsr(); // update current cursor + UpdateCursor(); // update current cursor } } -void SwCrsrShell::HideCrsrs() +void SwCursorShell::HideCursors() { - if( !m_bHasFocus || m_bBasicHideCrsr ) + if( !m_bHasFocus || m_bBasicHideCursor ) return; // if cursor is visible then hide SV cursor - if( m_pVisCrsr->IsVisible() ) + if( m_pVisibleCursor->IsVisible() ) { SET_CURR_SHELL( this ); - m_pVisCrsr->Hide(); + m_pVisibleCursor->Hide(); } // revoke inversion of SSelection - SwShellCrsr* pAktCrsr = m_pTableCrsr ? m_pTableCrsr : m_pCurCrsr; - pAktCrsr->Hide(); + SwShellCursor* pAktCursor = m_pTableCursor ? m_pTableCursor : m_pCurrentCursor; + pAktCursor->Hide(); } -void SwCrsrShell::ShowCrsrs( bool bCrsrVis ) +void SwCursorShell::ShowCursors( bool bCursorVis ) { - if( !m_bHasFocus || m_bAllProtect || m_bBasicHideCrsr ) + if( !m_bHasFocus || m_bAllProtect || m_bBasicHideCursor ) return; SET_CURR_SHELL( this ); - SwShellCrsr* pAktCrsr = m_pTableCrsr ? m_pTableCrsr : m_pCurCrsr; - pAktCrsr->Show(); + SwShellCursor* pAktCursor = m_pTableCursor ? m_pTableCursor : m_pCurrentCursor; + pAktCursor->Show(); - if( m_bSVCrsrVis && bCrsrVis ) // also show SV cursor again - m_pVisCrsr->Show(); + if( m_bSVCursorVis && bCursorVis ) // also show SV cursor again + m_pVisibleCursor->Show(); } -void SwCrsrShell::ShowCrsr() +void SwCursorShell::ShowCursor() { - if( !m_bBasicHideCrsr ) + if( !m_bBasicHideCursor ) { - m_bSVCrsrVis = true; - m_pCurCrsr->SetShowTextInputFieldOverlay( true ); + m_bSVCursorVis = true; + m_pCurrentCursor->SetShowTextInputFieldOverlay( true ); if (comphelper::LibreOfficeKit::isActive()) { @@ -2148,19 +2148,19 @@ void SwCrsrShell::ShowCrsr() libreOfficeKitCallback(LOK_CALLBACK_CURSOR_VISIBLE, OString::boolean(true).getStr()); } - UpdateCrsr(); + UpdateCursor(); } } -void SwCrsrShell::HideCrsr() +void SwCursorShell::HideCursor() { - if( !m_bBasicHideCrsr ) + if( !m_bBasicHideCursor ) { - m_bSVCrsrVis = false; + m_bSVCursorVis = false; // possibly reverse selected areas!! SET_CURR_SHELL( this ); - m_pCurCrsr->SetShowTextInputFieldOverlay( false ); - m_pVisCrsr->Hide(); + m_pCurrentCursor->SetShowTextInputFieldOverlay( false ); + m_pVisibleCursor->Hide(); if (comphelper::LibreOfficeKit::isActive()) { @@ -2172,45 +2172,45 @@ void SwCrsrShell::HideCrsr() } } -void SwCrsrShell::ShLooseFcs() +void SwCursorShell::ShLooseFcs() { - if( !m_bBasicHideCrsr ) - HideCrsrs(); + if( !m_bBasicHideCursor ) + HideCursors(); m_bHasFocus = false; } -void SwCrsrShell::ShGetFcs( bool bUpdate ) +void SwCursorShell::ShGetFcs( bool bUpdate ) { m_bHasFocus = true; - if( !m_bBasicHideCrsr && VisArea().Width() ) + if( !m_bBasicHideCursor && VisArea().Width() ) { - UpdateCrsr( static_cast<sal_uInt16>( bUpdate ? - SwCrsrShell::CHKRANGE|SwCrsrShell::SCROLLWIN - : SwCrsrShell::CHKRANGE ) ); - ShowCrsrs( m_bSVCrsrVis ); + UpdateCursor( static_cast<sal_uInt16>( bUpdate ? + SwCursorShell::CHKRANGE|SwCursorShell::SCROLLWIN + : SwCursorShell::CHKRANGE ) ); + ShowCursors( m_bSVCursorVis ); } } /** Get current frame in which the cursor is positioned. */ -SwContentFrm *SwCrsrShell::GetCurrFrm( const bool bCalcFrm ) const +SwContentFrame *SwCursorShell::GetCurrFrame( const bool bCalcFrame ) const { - SET_CURR_SHELL( static_cast<SwViewShell*>(const_cast<SwCrsrShell *>(this)) ); - SwContentFrm *pRet = nullptr; - SwContentNode *pNd = m_pCurCrsr->GetContentNode(); + SET_CURR_SHELL( static_cast<SwViewShell*>(const_cast<SwCursorShell *>(this)) ); + SwContentFrame *pRet = nullptr; + SwContentNode *pNd = m_pCurrentCursor->GetContentNode(); if ( pNd ) { - if ( bCalcFrm ) + if ( bCalcFrame ) { sal_uInt16* pST = const_cast<sal_uInt16*>(&mnStartAction); ++(*pST); const Size aOldSz( GetDocSize() ); - pRet = pNd->getLayoutFrm( GetLayout(), &m_pCurCrsr->GetPtPos(), m_pCurCrsr->GetPoint() ); + pRet = pNd->getLayoutFrame( GetLayout(), &m_pCurrentCursor->GetPtPos(), m_pCurrentCursor->GetPoint() ); --(*pST); if( aOldSz != GetDocSize() ) - const_cast<SwCrsrShell*>(this)->SizeChgNotify(); + const_cast<SwCursorShell*>(this)->SizeChgNotify(); } else - pRet = pNd->getLayoutFrm( GetLayout(), &m_pCurCrsr->GetPtPos(), m_pCurCrsr->GetPoint(), false); + pRet = pNd->getLayoutFrame( GetLayout(), &m_pCurrentCursor->GetPtPos(), m_pCurrentCursor->GetPoint(), false); } return pRet; } @@ -2221,7 +2221,7 @@ SwContentFrm *SwCrsrShell::GetCurrFrm( const bool bCalcFrm ) const @param pOld ??? @param pNew ??? */ -void SwCrsrShell::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) +void SwCursorShell::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) { const sal_uInt16 nWhich = pOld ? pOld->Which() : @@ -2248,13 +2248,13 @@ void SwCrsrShell::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) This means checking if GetMark is set and if SPoint and GetMark differ. */ -bool SwCrsrShell::HasSelection() const +bool SwCursorShell::HasSelection() const { - const SwPaM* pCrsr = getShellCrsr( true ); - return IsTableMode() || ( pCrsr->HasMark() && *pCrsr->GetPoint() != *pCrsr->GetMark() ); + const SwPaM* pCursor = getShellCursor( true ); + return IsTableMode() || ( pCursor->HasMark() && *pCursor->GetPoint() != *pCursor->GetMark() ); } -void SwCrsrShell::CallChgLnk() +void SwCursorShell::CallChgLnk() { // Do not make any call in start/end action but just remember the change. // This will be taken care of in the end action. @@ -2269,34 +2269,34 @@ void SwCrsrShell::CallChgLnk() } /// get selected text of a node at current cursor -OUString SwCrsrShell::GetSelText() const +OUString SwCursorShell::GetSelText() const { OUString aText; - if( m_pCurCrsr->GetPoint()->nNode.GetIndex() == - m_pCurCrsr->GetMark()->nNode.GetIndex() ) + if( m_pCurrentCursor->GetPoint()->nNode.GetIndex() == + m_pCurrentCursor->GetMark()->nNode.GetIndex() ) { - SwTextNode* pTextNd = m_pCurCrsr->GetNode().GetTextNode(); + SwTextNode* pTextNd = m_pCurrentCursor->GetNode().GetTextNode(); if( pTextNd ) { - const sal_Int32 nStt = m_pCurCrsr->Start()->nContent.GetIndex(); + const sal_Int32 nStt = m_pCurrentCursor->Start()->nContent.GetIndex(); aText = pTextNd->GetExpandText( nStt, - m_pCurCrsr->End()->nContent.GetIndex() - nStt ); + m_pCurrentCursor->End()->nContent.GetIndex() - nStt ); } } return aText; } /// get text only from current cursor position (until end of node) -OUString SwCrsrShell::GetText() const +OUString SwCursorShell::GetText() const { OUString aText; - if( m_pCurCrsr->GetPoint()->nNode.GetIndex() == - m_pCurCrsr->GetMark()->nNode.GetIndex() ) + if( m_pCurrentCursor->GetPoint()->nNode.GetIndex() == + m_pCurrentCursor->GetMark()->nNode.GetIndex() ) { - SwTextNode* pTextNd = m_pCurCrsr->GetNode().GetTextNode(); + SwTextNode* pTextNd = m_pCurrentCursor->GetNode().GetTextNode(); if( pTextNd ) aText = pTextNd->GetText().copy( - m_pCurCrsr->GetPoint()->nContent.GetIndex() ); + m_pCurrentCursor->GetPoint()->nContent.GetIndex() ); } return aText; } @@ -2306,13 +2306,13 @@ OUString SwCrsrShell::GetText() const @param bEnd Start counting from the end? From start otherwise. @param nOffset position of the character */ -sal_Unicode SwCrsrShell::GetChar( bool bEnd, long nOffset ) +sal_Unicode SwCursorShell::GetChar( bool bEnd, long nOffset ) { if( IsTableMode() ) // not possible in table mode return 0; - const SwPosition* pPos = !m_pCurCrsr->HasMark() ? m_pCurCrsr->GetPoint() - : bEnd ? m_pCurCrsr->End() : m_pCurCrsr->Start(); + const SwPosition* pPos = !m_pCurrentCursor->HasMark() ? m_pCurrentCursor->GetPoint() + : bEnd ? m_pCurrentCursor->End() : m_pCurrentCursor->Start(); SwTextNode* pTextNd = pPos->nNode.GetNode().GetTextNode(); if( !pTextNd ) return 0; @@ -2332,12 +2332,12 @@ sal_Unicode SwCrsrShell::GetChar( bool bEnd, long nOffset ) @param bEnd Start counting from the end? From start otherwise. @param nCount Number of characters. */ -bool SwCrsrShell::ExtendSelection( bool bEnd, sal_Int32 nCount ) +bool SwCursorShell::ExtendSelection( bool bEnd, sal_Int32 nCount ) { - if( !m_pCurCrsr->HasMark() || IsTableMode() ) + if( !m_pCurrentCursor->HasMark() || IsTableMode() ) return false; // no selection - SwPosition* pPos = bEnd ? m_pCurCrsr->End() : m_pCurCrsr->Start(); + SwPosition* pPos = bEnd ? m_pCurrentCursor->End() : m_pCurrentCursor->Start(); SwTextNode* pTextNd = pPos->nNode.GetNode().GetTextNode(); OSL_ENSURE( pTextNd, "no text node; how should this then be extended?" ); @@ -2354,10 +2354,10 @@ bool SwCrsrShell::ExtendSelection( bool bEnd, sal_Int32 nCount ) else return false; // not possible anymore - SwCallLink aLk( *this ); // watch Crsr-Moves; call Link if needed + SwCallLink aLk( *this ); // watch Cursor-Moves; call Link if needed pPos->nContent = nPos; - UpdateCrsr(); + UpdateCursor(); return true; } @@ -2367,16 +2367,16 @@ bool SwCrsrShell::ExtendSelection( bool bEnd, sal_Int32 nCount ) @param rPt The position to move the visible cursor to. @return <false> if SPoint was corrected by the layout. */ -bool SwCrsrShell::SetVisCrsr( const Point &rPt ) +bool SwCursorShell::SetVisibleCursor( const Point &rPt ) { SET_CURR_SHELL( this ); Point aPt( rPt ); - SwPosition aPos( *m_pCurCrsr->GetPoint() ); - SwCrsrMoveState aTmpState( MV_SETONLYTEXT ); + SwPosition aPos( *m_pCurrentCursor->GetPoint() ); + SwCursorMoveState aTmpState( MV_SETONLYTEXT ); aTmpState.m_bSetInReadOnly = IsReadOnlyAvailable(); aTmpState.m_bRealHeight = true; - const bool bRet = GetLayout()->GetCrsrOfst( &aPos, aPt /*, &aTmpState*/ ); + const bool bRet = GetLayout()->GetCursorOfst( &aPos, aPt /*, &aTmpState*/ ); SetInFrontOfLabel( false ); // #i27615# @@ -2391,44 +2391,44 @@ bool SwCrsrShell::SetVisCrsr( const Point &rPt ) pSectNd->GetSection().IsProtectFlag())) ) return false; - SwContentFrm *pFrm = pTextNd->getLayoutFrm( GetLayout(), &aPt, &aPos ); + SwContentFrame *pFrame = pTextNd->getLayoutFrame( GetLayout(), &aPt, &aPos ); if ( Imp()->IsIdleAction() ) - pFrm->PrepareCrsr(); + pFrame->PrepareCursor(); SwRect aTmp( m_aCharRect ); - pFrm->GetCharRect( m_aCharRect, aPos, &aTmpState ); + pFrame->GetCharRect( m_aCharRect, aPos, &aTmpState ); // #i10137# - if( aTmp == m_aCharRect && m_pVisCrsr->IsVisible() ) + if( aTmp == m_aCharRect && m_pVisibleCursor->IsVisible() ) return true; - m_pVisCrsr->Hide(); // always hide visible cursor + m_pVisibleCursor->Hide(); // always hide visible cursor if( IsScrollMDI( this, m_aCharRect )) { MakeVisible( m_aCharRect ); - m_pCurCrsr->Show(); + m_pCurrentCursor->Show(); } { if( aTmpState.m_bRealHeight ) - m_aCrsrHeight = aTmpState.m_aRealHeight; + m_aCursorHeight = aTmpState.m_aRealHeight; else { - m_aCrsrHeight.setX(0); - m_aCrsrHeight.setY(m_aCharRect.Height()); + m_aCursorHeight.setX(0); + m_aCursorHeight.setY(m_aCharRect.Height()); } - m_pVisCrsr->SetDragCrsr(); - m_pVisCrsr->Show(); // show again + m_pVisibleCursor->SetDragCursor(); + m_pVisibleCursor->Show(); // show again } return bRet; } -bool SwCrsrShell::IsOverReadOnlyPos( const Point& rPt ) const +bool SwCursorShell::IsOverReadOnlyPos( const Point& rPt ) const { Point aPt( rPt ); - SwPaM aPam( *m_pCurCrsr->GetPoint() ); - GetLayout()->GetCrsrOfst( aPam.GetPoint(), aPt ); + SwPaM aPam( *m_pCurrentCursor->GetPoint() ); + GetLayout()->GetCursorOfst( aPam.GetPoint(), aPt ); // Formular view return aPam.HasReadonlySel( GetViewOptions()->IsFormView() ); } @@ -2437,12 +2437,12 @@ bool SwCrsrShell::IsOverReadOnlyPos( const Point& rPt ) const @param bAll If <false> get only spanned ones (= with selections) (Basic). */ -sal_uInt16 SwCrsrShell::GetCrsrCnt( bool bAll ) const +sal_uInt16 SwCursorShell::GetCursorCnt( bool bAll ) const { - SwPaM* pTmp = GetCrsr()->GetNext(); - sal_uInt16 n = (bAll || ( m_pCurCrsr->HasMark() && - *m_pCurCrsr->GetPoint() != *m_pCurCrsr->GetMark())) ? 1 : 0; - while( pTmp != m_pCurCrsr ) + SwPaM* pTmp = GetCursor()->GetNext(); + sal_uInt16 n = (bAll || ( m_pCurrentCursor->HasMark() && + *m_pCurrentCursor->GetPoint() != *m_pCurrentCursor->GetMark())) ? 1 : 0; + while( pTmp != m_pCurrentCursor ) { if( bAll || ( static_cast<SwPaM*>(pTmp)->HasMark() && *static_cast<SwPaM*>(pTmp)->GetPoint() != *static_cast<SwPaM*>(pTmp)->GetMark())) @@ -2452,54 +2452,54 @@ sal_uInt16 SwCrsrShell::GetCrsrCnt( bool bAll ) const return n; } -bool SwCrsrShell::IsStartOfDoc() const +bool SwCursorShell::IsStartOfDoc() const { - if( m_pCurCrsr->GetPoint()->nContent.GetIndex() ) + if( m_pCurrentCursor->GetPoint()->nContent.GetIndex() ) return false; // after EndOfIcons comes the content selection (EndNd+StNd+ContentNd) SwNodeIndex aIdx( GetDoc()->GetNodes().GetEndOfExtras(), 2 ); if( !aIdx.GetNode().IsContentNode() ) GetDoc()->GetNodes().GoNext( &aIdx ); - return aIdx == m_pCurCrsr->GetPoint()->nNode; + return aIdx == m_pCurrentCursor->GetPoint()->nNode; } -bool SwCrsrShell::IsEndOfDoc() const +bool SwCursorShell::IsEndOfDoc() const { SwNodeIndex aIdx( GetDoc()->GetNodes().GetEndOfContent(), -1 ); SwContentNode* pCNd = aIdx.GetNode().GetContentNode(); if( !pCNd ) pCNd = SwNodes::GoPrevious( &aIdx ); - return aIdx == m_pCurCrsr->GetPoint()->nNode && - pCNd->Len() == m_pCurCrsr->GetPoint()->nContent.GetIndex(); + return aIdx == m_pCurrentCursor->GetPoint()->nNode && + pCNd->Len() == m_pCurrentCursor->GetPoint()->nContent.GetIndex(); } /** Invalidate cursors Delete all created cursors, set table crsr and last crsr to their TextNode - (or StartNode?). They will then all re-created at the next ::GetCrsr() call. + (or StartNode?). They will then all re-created at the next ::GetCursor() call. This is needed for Drag&Drop/ Clipboard-paste in tables. */ -bool SwCrsrShell::ParkTableCrsr() +bool SwCursorShell::ParkTableCursor() { - if( !m_pTableCrsr ) + if( !m_pTableCursor ) return false; - m_pTableCrsr->ParkCrsr(); + m_pTableCursor->ParkCursor(); - while( m_pCurCrsr->GetNext() != m_pCurCrsr ) - delete m_pCurCrsr->GetNext(); + while( m_pCurrentCursor->GetNext() != m_pCurrentCursor ) + delete m_pCurrentCursor->GetNext(); // *always* move cursor's Point and Mark - m_pCurCrsr->DeleteMark(); - *m_pCurCrsr->GetPoint() = *m_pTableCrsr->GetPoint(); + m_pCurrentCursor->DeleteMark(); + *m_pCurrentCursor->GetPoint() = *m_pTableCursor->GetPoint(); return true; } -void SwCrsrShell::_ParkPams( SwPaM* pDelRg, SwShellCrsr** ppDelRing ) +void SwCursorShell::_ParkPams( SwPaM* pDelRg, SwShellCursor** ppDelRing ) { const SwPosition *pStt = pDelRg->Start(), *pEnd = pDelRg->GetPoint() == pStt ? pDelRg->GetMark() : pDelRg->GetPoint(); @@ -2534,16 +2534,16 @@ void SwCrsrShell::_ParkPams( SwPaM* pDelRg, SwShellCrsr** ppDelRing ) bool bDelete = true; if( *ppDelRing == pTmpDel ) { - if( *ppDelRing == m_pCurCrsr ) + if( *ppDelRing == m_pCurrentCursor ) { - if( ( bDelete = GoNextCrsr() ) ) + if( ( bDelete = GoNextCursor() ) ) { bGoNext = false; pTmp = pTmp->GetNext(); } } else - bDelete = false; // never delete the StackCrsr + bDelete = false; // never delete the StackCursor } if( bDelete ) @@ -2571,12 +2571,12 @@ void SwCrsrShell::_ParkPams( SwPaM* pDelRg, SwShellCrsr** ppDelRing ) @param rIdx ??? */ -void SwCrsrShell::ParkCrsr( const SwNodeIndex &rIdx ) +void SwCursorShell::ParkCursor( const SwNodeIndex &rIdx ) { SwNode *pNode = &rIdx.GetNode(); // create a new PaM - SwPaM * pNew = new SwPaM( *GetCrsr()->GetPoint() ); + SwPaM * pNew = new SwPaM( *GetCursor()->GetPoint() ); if( pNode->GetStartNode() ) { if( ( pNode = pNode->StartOfSectionNode())->IsTableNode() ) @@ -2599,23 +2599,23 @@ void SwCrsrShell::ParkCrsr( const SwNodeIndex &rIdx ) // take care of all shells for(SwViewShell& rTmp : GetRingContainer()) { - if( dynamic_cast<const SwCrsrShell *>(&rTmp) != nullptr) + if( dynamic_cast<const SwCursorShell *>(&rTmp) != nullptr) { - SwCrsrShell* pSh = static_cast<SwCrsrShell*>(&rTmp); - if( pSh->m_pCrsrStk ) - pSh->_ParkPams( pNew, &pSh->m_pCrsrStk ); + SwCursorShell* pSh = static_cast<SwCursorShell*>(&rTmp); + if( pSh->m_pCursorStack ) + pSh->_ParkPams( pNew, &pSh->m_pCursorStack ); - pSh->_ParkPams( pNew, &pSh->m_pCurCrsr ); - if( pSh->m_pTableCrsr ) + pSh->_ParkPams( pNew, &pSh->m_pCurrentCursor ); + if( pSh->m_pTableCursor ) { // set table cursor always to 0 and the current one always to // the beginning of the table - SwPaM* pTCrsr = pSh->GetTableCrs(); - SwNode* pTableNd = pTCrsr->GetPoint()->nNode.GetNode().FindTableNode(); + SwPaM* pTCursor = pSh->GetTableCrs(); + SwNode* pTableNd = pTCursor->GetPoint()->nNode.GetNode().FindTableNode(); if ( pTableNd ) { - pTCrsr->DeleteMark(); - pSh->m_pCurCrsr->GetPoint()->nNode = *pTableNd; + pTCursor->DeleteMark(); + pSh->m_pCurrentCursor->GetPoint()->nNode = *pTableNd; } } } @@ -2628,68 +2628,68 @@ void SwCrsrShell::ParkCrsr( const SwNodeIndex &rIdx ) Copy cursor position and add it to the ring. All views of a document are in the ring of the shell. */ -SwCrsrShell::SwCrsrShell( SwCrsrShell& rShell, vcl::Window *pInitWin ) +SwCursorShell::SwCursorShell( SwCursorShell& rShell, vcl::Window *pInitWin ) : SwViewShell( rShell, pInitWin ) , SwModify( nullptr ) - , m_pCrsrStk( nullptr ) - , m_pBlockCrsr( nullptr ) - , m_pTableCrsr( nullptr ) + , m_pCursorStack( nullptr ) + , m_pBlockCursor( nullptr ) + , m_pTableCursor( nullptr ) , m_pBoxIdx( nullptr ) , m_pBoxPtr( nullptr ) , m_nUpDownX(0) - , m_nLeftFrmPos(0) + , m_nLeftFramePos(0) , m_nAktNode(0) , m_nAktContent(0) , m_nAktNdTyp(0) , m_bAktSelection(false) - , m_nCrsrMove( 0 ) + , m_nCursorMove( 0 ) , m_nBasicActionCnt( 0 ) , m_eMvState( MV_NONE ) , m_sMarkedListId() , m_nMarkedListLevel( 0 ) - , m_oldColFrm(nullptr) + , m_oldColFrame(nullptr) { SET_CURR_SHELL( this ); // only keep the position of the current cursor of the copy shell - m_pCurCrsr = new SwShellCrsr( *this, *(rShell.m_pCurCrsr->GetPoint()) ); - m_pCurCrsr->GetContentNode()->Add( this ); + m_pCurrentCursor = new SwShellCursor( *this, *(rShell.m_pCurrentCursor->GetPoint()) ); + m_pCurrentCursor->GetContentNode()->Add( this ); m_bAllProtect = m_bVisPortChgd = m_bChgCallFlag = m_bInCMvVisportChgd = - m_bGCAttr = m_bIgnoreReadonly = m_bSelTableCells = m_bBasicHideCrsr = - m_bOverwriteCrsr = false; + m_bGCAttr = m_bIgnoreReadonly = m_bSelTableCells = m_bBasicHideCursor = + m_bOverwriteCursor = false; m_bCallChgLnk = m_bHasFocus = m_bAutoUpdateCells = true; - m_bSVCrsrVis = true; - m_bSetCrsrInReadOnly = true; - m_pVisCrsr = new SwVisCrsr( this ); + m_bSVCursorVis = true; + m_bSetCursorInReadOnly = true; + m_pVisibleCursor = new SwVisibleCursor( this ); m_bMacroExecAllowed = rShell.IsMacroExecAllowed(); #if defined(IOS) - HideCrsr(); + HideCursor(); #endif } /// default constructor -SwCrsrShell::SwCrsrShell( SwDoc& rDoc, vcl::Window *pInitWin, +SwCursorShell::SwCursorShell( SwDoc& rDoc, vcl::Window *pInitWin, const SwViewOption *pInitOpt ) : SwViewShell( rDoc, pInitWin, pInitOpt ) , SwModify( nullptr ) - , m_pCrsrStk( nullptr ) - , m_pBlockCrsr( nullptr ) - , m_pTableCrsr( nullptr ) + , m_pCursorStack( nullptr ) + , m_pBlockCursor( nullptr ) + , m_pTableCursor( nullptr ) , m_pBoxIdx( nullptr ) , m_pBoxPtr( nullptr ) , m_nUpDownX(0) - , m_nLeftFrmPos(0) + , m_nLeftFramePos(0) , m_nAktNode(0) , m_nAktContent(0) , m_nAktNdTyp(0) , m_bAktSelection(false) - , m_nCrsrMove( 0 ) + , m_nCursorMove( 0 ) , m_nBasicActionCnt( 0 ) - , m_eMvState( MV_NONE ) // state for crsr-travelling - GetCrsrOfst + , m_eMvState( MV_NONE ) // state for crsr-travelling - GetCursorOfst , m_sMarkedListId() , m_nMarkedListLevel( 0 ) - , m_oldColFrm(nullptr) + , m_oldColFrame(nullptr) { SET_CURR_SHELL( this ); // create initial cursor and set it to first content position @@ -2698,50 +2698,50 @@ SwCrsrShell::SwCrsrShell( SwDoc& rDoc, vcl::Window *pInitWin, SwNodeIndex aNodeIdx( *rNds.GetEndOfContent().StartOfSectionNode() ); SwContentNode* pCNd = rNds.GoNext( &aNodeIdx ); // go to the first ContentNode - m_pCurCrsr = new SwShellCrsr( *this, SwPosition( aNodeIdx, SwIndex( pCNd, 0 ))); + m_pCurrentCursor = new SwShellCursor( *this, SwPosition( aNodeIdx, SwIndex( pCNd, 0 ))); // Register shell as dependent at current node. As a result all attribute // changes can be forwarded via the Link. pCNd->Add( this ); m_bAllProtect = m_bVisPortChgd = m_bChgCallFlag = m_bInCMvVisportChgd = - m_bGCAttr = m_bIgnoreReadonly = m_bSelTableCells = m_bBasicHideCrsr = - m_bOverwriteCrsr = false; + m_bGCAttr = m_bIgnoreReadonly = m_bSelTableCells = m_bBasicHideCursor = + m_bOverwriteCursor = false; m_bCallChgLnk = m_bHasFocus = m_bAutoUpdateCells = true; - m_bSVCrsrVis = true; - m_bSetCrsrInReadOnly = true; + m_bSVCursorVis = true; + m_bSetCursorInReadOnly = true; - m_pVisCrsr = new SwVisCrsr( this ); + m_pVisibleCursor = new SwVisibleCursor( this ); m_bMacroExecAllowed = true; #if defined(IOS) - HideCrsr(); + HideCursor(); #endif } -SwCrsrShell::~SwCrsrShell() +SwCursorShell::~SwCursorShell() { // if it is not the last view then at least the field should be updated if( !unique() ) - CheckTableBoxContent( m_pCurCrsr->GetPoint() ); + CheckTableBoxContent( m_pCurrentCursor->GetPoint() ); else ClearTableBoxContent(); - delete m_pVisCrsr; - delete m_pBlockCrsr; - delete m_pTableCrsr; + delete m_pVisibleCursor; + delete m_pBlockCursor; + delete m_pTableCursor; // release cursors - while(m_pCurCrsr->GetNext() != m_pCurCrsr) - delete m_pCurCrsr->GetNext(); - delete m_pCurCrsr; + while(m_pCurrentCursor->GetNext() != m_pCurrentCursor) + delete m_pCurrentCursor->GetNext(); + delete m_pCurrentCursor; // free stack - if( m_pCrsrStk ) + if( m_pCursorStack ) { - while( m_pCrsrStk->GetNext() != m_pCrsrStk ) - delete m_pCrsrStk->GetNext(); - delete m_pCrsrStk; + while( m_pCursorStack->GetNext() != m_pCursorStack ) + delete m_pCursorStack->GetNext(); + delete m_pCursorStack; } // #i54025# - do not give a HTML parser that might potentially hang as @@ -2750,55 +2750,55 @@ SwCrsrShell::~SwCrsrShell() GetRegisteredInNonConst()->Remove( this ); } -SwShellCrsr* SwCrsrShell::getShellCrsr( bool bBlock ) +SwShellCursor* SwCursorShell::getShellCursor( bool bBlock ) { - if( m_pTableCrsr ) - return m_pTableCrsr; - if( m_pBlockCrsr && bBlock ) - return &m_pBlockCrsr->getShellCrsr(); - return m_pCurCrsr; + if( m_pTableCursor ) + return m_pTableCursor; + if( m_pBlockCursor && bBlock ) + return &m_pBlockCursor->getShellCursor(); + return m_pCurrentCursor; } /** Should WaitPtr be switched on for the clipboard? Wait for TableMode, multiple selections and more than x selected paragraphs. */ -bool SwCrsrShell::ShouldWait() const +bool SwCursorShell::ShouldWait() const { - if ( IsTableMode() || GetCrsrCnt() > 1 ) + if ( IsTableMode() || GetCursorCnt() > 1 ) return true; if( HasDrawView() && GetDrawView()->GetMarkedObjectList().GetMarkCount() ) return true; - SwPaM* pPam = GetCrsr(); + SwPaM* pPam = GetCursor(); return pPam->Start()->nNode.GetIndex() + 10 < pPam->End()->nNode.GetIndex(); } -size_t SwCrsrShell::UpdateTableSelBoxes() +size_t SwCursorShell::UpdateTableSelBoxes() { - if (m_pTableCrsr && (m_pTableCrsr->IsChgd() || !m_pTableCrsr->GetSelectedBoxesCount())) + if (m_pTableCursor && (m_pTableCursor->IsChgd() || !m_pTableCursor->GetSelectedBoxesCount())) { - GetLayout()->MakeTableCrsrs( *m_pTableCrsr ); + GetLayout()->MakeTableCursors( *m_pTableCursor ); } - return (m_pTableCrsr) ? m_pTableCrsr->GetSelectedBoxesCount() : 0; + return (m_pTableCursor) ? m_pTableCursor->GetSelectedBoxesCount() : 0; } /// show the current selected "object" -void SwCrsrShell::MakeSelVisible() +void SwCursorShell::MakeSelVisible() { OSL_ENSURE( m_bHasFocus, "no focus but cursor should be made visible?" ); - if( m_aCrsrHeight.Y() < m_aCharRect.Height() && m_aCharRect.Height() > VisArea().Height() ) + if( m_aCursorHeight.Y() < m_aCharRect.Height() && m_aCharRect.Height() > VisArea().Height() ) { SwRect aTmp( m_aCharRect ); long nDiff = m_aCharRect.Height() - VisArea().Height(); - if( nDiff < m_aCrsrHeight.getX() ) + if( nDiff < m_aCursorHeight.getX() ) aTmp.Top( nDiff + m_aCharRect.Top() ); else { - aTmp.Top( m_aCrsrHeight.getX() + m_aCharRect.Top() ); - aTmp.Height( m_aCrsrHeight.getY() ); + aTmp.Top( m_aCursorHeight.getX() + m_aCharRect.Top() ); + aTmp.Height( m_aCursorHeight.getY() ); } if( !aTmp.HasArea() ) { @@ -2821,9 +2821,9 @@ void SwCrsrShell::MakeSelVisible() } /// search a valid content position (not protected/hidden) -bool SwCrsrShell::FindValidContentNode( bool bOnlyText ) +bool SwCursorShell::FindValidContentNode( bool bOnlyText ) { - if( m_pTableCrsr ) + if( m_pTableCursor ) { OSL_ENSURE( false, "Did not remove table selection!" ); return false; @@ -2834,22 +2834,22 @@ bool SwCrsrShell::FindValidContentNode( bool bOnlyText ) GetDoc()->GetDocShell()->IsReadOnlyUI() ) return true; - if( m_pCurCrsr->HasMark() ) + if( m_pCurrentCursor->HasMark() ) ClearMark(); // first check for frames - SwNodeIndex& rNdIdx = m_pCurCrsr->GetPoint()->nNode; + SwNodeIndex& rNdIdx = m_pCurrentCursor->GetPoint()->nNode; sal_uLong nNdIdx = rNdIdx.GetIndex(); // keep backup SwNodes& rNds = mpDoc->GetNodes(); SwContentNode* pCNd = rNdIdx.GetNode().GetContentNode(); - const SwContentFrm * pFrm; + const SwContentFrame * pFrame; - if( pCNd && nullptr != (pFrm = pCNd->getLayoutFrm( GetLayout(), nullptr, m_pCurCrsr->GetPoint(), false)) && - !IsReadOnlyAvailable() && pFrm->IsProtected() && + if( pCNd && nullptr != (pFrame = pCNd->getLayoutFrame( GetLayout(), nullptr, m_pCurrentCursor->GetPoint(), false)) && + !IsReadOnlyAvailable() && pFrame->IsProtected() && nNdIdx < rNds.GetEndOfExtras().GetIndex() ) { // skip protected frame - SwPaM aPam( *m_pCurCrsr->GetPoint() ); + SwPaM aPam( *m_pCurrentCursor->GetPoint() ); aPam.SetMark(); aPam.GetMark()->nNode = rNds.GetEndOfContent(); aPam.GetPoint()->nNode = *pCNd->EndOfSectionNode(); @@ -2866,13 +2866,13 @@ bool SwCrsrShell::FindValidContentNode( bool bOnlyText ) rNdIdx = nNdIdx; // back to old node return false; } - *m_pCurCrsr->GetPoint() = *aPam.GetPoint(); + *m_pCurrentCursor->GetPoint() = *aPam.GetPoint(); } else if( bOnlyText && pCNd && pCNd->IsNoTextNode() ) { // set to beginning of document rNdIdx = mpDoc->GetNodes().GetEndOfExtras(); - m_pCurCrsr->GetPoint()->nContent.Assign( mpDoc->GetNodes().GoNext( + m_pCurrentCursor->GetPoint()->nContent.Assign( mpDoc->GetNodes().GoNext( &rNdIdx ), 0 ); nNdIdx = rNdIdx.GetIndex(); } @@ -2907,7 +2907,7 @@ bool SwCrsrShell::FindValidContentNode( bool bOnlyText ) // if we're successful, set the new position if( ! aPam.GetNode().IsProtect() ) { - *m_pCurCrsr->GetPoint() = *aPam.GetPoint(); + *m_pCurrentCursor->GetPoint() = *aPam.GetPoint(); } } @@ -2937,9 +2937,9 @@ bool SwCrsrShell::FindValidContentNode( bool bOnlyText ) if( pCNd->FindTableNode() ) { SwCallLink aTmp( *this ); - SwCrsrSaveState aSaveState( *m_pCurCrsr ); + SwCursorSaveState aSaveState( *m_pCurrentCursor ); aTmp.nNdTyp = 0; // don't do anything in DTOR - if( !m_pCurCrsr->IsInProtectTable( true ) ) + if( !m_pCurrentCursor->IsInProtectTable( true ) ) { const SwSectionNode* pSNd = pCNd->FindSectionNode(); if( !pSNd || !pSNd->GetSection().IsHiddenFlag() @@ -2962,8 +2962,8 @@ bool SwCrsrShell::FindValidContentNode( bool bOnlyText ) if( bOk && rNdIdx.GetIndex() < rNds.GetEndOfExtras().GetIndex() ) { // also check for Fly - might be protected as well - if( nullptr == (pFrm = pCNd->getLayoutFrm( GetLayout(), nullptr, nullptr, false)) || - ( !IsReadOnlyAvailable() && pFrm->IsProtected() ) || + if( nullptr == (pFrame = pCNd->getLayoutFrame( GetLayout(), nullptr, nullptr, false)) || + ( !IsReadOnlyAvailable() && pFrame->IsProtected() ) || ( bOnlyText && pCNd->IsNoTextNode() ) ) { // continue search @@ -2985,48 +2985,48 @@ bool SwCrsrShell::FindValidContentNode( bool bOnlyText ) { pCNd = rNdIdx.GetNode().GetContentNode(); const sal_Int32 nContent = rNdIdx.GetIndex() < nNdIdx ? pCNd->Len() : 0; - m_pCurCrsr->GetPoint()->nContent.Assign( pCNd, nContent ); + m_pCurrentCursor->GetPoint()->nContent.Assign( pCNd, nContent ); } else { pCNd = rNdIdx.GetNode().GetContentNode(); // if cursor in hidden frame, always move it - if( !pCNd || !pCNd->getLayoutFrm( GetLayout(), nullptr, nullptr, false) ) + if( !pCNd || !pCNd->getLayoutFrame( GetLayout(), nullptr, nullptr, false) ) { - SwCrsrMoveState aTmpState( MV_NONE ); + SwCursorMoveState aTmpState( MV_NONE ); aTmpState.m_bSetInReadOnly = IsReadOnlyAvailable(); - GetLayout()->GetCrsrOfst( m_pCurCrsr->GetPoint(), m_pCurCrsr->GetPtPos(), + GetLayout()->GetCursorOfst( m_pCurrentCursor->GetPoint(), m_pCurrentCursor->GetPtPos(), &aTmpState ); } } return bOk; } -bool SwCrsrShell::IsCrsrReadonly() const +bool SwCursorShell::IsCursorReadonly() const { if ( GetViewOptions()->IsReadonly() || GetViewOptions()->IsFormView() /* Formula view */ ) { - SwFrm *pFrm = GetCurrFrm( false ); - const SwFlyFrm* pFly; + SwFrame *pFrame = GetCurrFrame( false ); + const SwFlyFrame* pFly; const SwSection* pSection; - if( pFrm && pFrm->IsInFly() && - (pFly = pFrm->FindFlyFrm())->GetFormat()->GetEditInReadonly().GetValue() && + if( pFrame && pFrame->IsInFly() && + (pFly = pFrame->FindFlyFrame())->GetFormat()->GetEditInReadonly().GetValue() && pFly->Lower() && - !pFly->Lower()->IsNoTextFrm() && + !pFly->Lower()->IsNoTextFrame() && !GetDrawView()->GetMarkedObjectList().GetMarkCount() ) { return false; } // edit in readonly sections - else if ( pFrm && pFrm->IsInSct() && - nullptr != ( pSection = pFrm->FindSctFrm()->GetSection() ) && + else if ( pFrame && pFrame->IsInSct() && + nullptr != ( pSection = pFrame->FindSctFrame()->GetSection() ) && pSection->IsEditInReadonlyFlag() ) { return false; } - else if ( !IsMultiSelection() && CrsrInsideInputField() ) + else if ( !IsMultiSelection() && CursorInsideInputField() ) { return false; } @@ -3037,12 +3037,12 @@ bool SwCrsrShell::IsCrsrReadonly() const } /// is the cursor allowed to enter ReadOnly sections? -void SwCrsrShell::SetReadOnlyAvailable( bool bFlag ) +void SwCursorShell::SetReadOnlyAvailable( bool bFlag ) { // *never* switch in GlobalDoc if( (!GetDoc()->GetDocShell() || dynamic_cast<const SwGlobalDocShell*>(GetDoc()->GetDocShell()) == nullptr ) && - bFlag != m_bSetCrsrInReadOnly ) + bFlag != m_bSetCursorInReadOnly ) { // If the flag is switched off then all selections need to be // invalidated. Otherwise we would trust that nothing protected is selected. @@ -3050,27 +3050,27 @@ void SwCrsrShell::SetReadOnlyAvailable( bool bFlag ) { ClearMark(); } - m_bSetCrsrInReadOnly = bFlag; - UpdateCrsr(); + m_bSetCursorInReadOnly = bFlag; + UpdateCursor(); } } -bool SwCrsrShell::HasReadonlySel(bool bAnnotationMode) const +bool SwCursorShell::HasReadonlySel(bool bAnnotationMode) const { bool bRet = false; // If protected area is to be ignored, then selections are never read-only. if ((IsReadOnlyAvailable() || GetViewOptions()->IsFormView()) && !GetViewOptions()->IsIgnoreProtectedArea()) { - if ( m_pTableCrsr != nullptr ) + if ( m_pTableCursor != nullptr ) { - bRet = m_pTableCrsr->HasReadOnlyBoxSel() - || m_pTableCrsr->HasReadonlySel( GetViewOptions()->IsFormView() ); + bRet = m_pTableCursor->HasReadOnlyBoxSel() + || m_pTableCursor->HasReadonlySel( GetViewOptions()->IsFormView() ); } else { - for(const SwPaM& rCrsr : m_pCurCrsr->GetRingContainer()) + for(const SwPaM& rCursor : m_pCurrentCursor->GetRingContainer()) { - if( rCrsr.HasReadonlySel( GetViewOptions()->IsFormView(), bAnnotationMode ) ) + if( rCursor.HasReadonlySel( GetViewOptions()->IsFormView(), bAnnotationMode ) ) { bRet = true; break; @@ -3081,49 +3081,49 @@ bool SwCrsrShell::HasReadonlySel(bool bAnnotationMode) const return bRet; } -bool SwCrsrShell::IsSelFullPara() const +bool SwCursorShell::IsSelFullPara() const { bool bRet = false; - if( m_pCurCrsr->GetPoint()->nNode.GetIndex() == - m_pCurCrsr->GetMark()->nNode.GetIndex() && !m_pCurCrsr->IsMultiSelection() ) + if( m_pCurrentCursor->GetPoint()->nNode.GetIndex() == + m_pCurrentCursor->GetMark()->nNode.GetIndex() && !m_pCurrentCursor->IsMultiSelection() ) { - sal_Int32 nStt = m_pCurCrsr->GetPoint()->nContent.GetIndex(); - sal_Int32 nEnd = m_pCurCrsr->GetMark()->nContent.GetIndex(); + sal_Int32 nStt = m_pCurrentCursor->GetPoint()->nContent.GetIndex(); + sal_Int32 nEnd = m_pCurrentCursor->GetMark()->nContent.GetIndex(); if( nStt > nEnd ) { sal_Int32 nTmp = nStt; nStt = nEnd; nEnd = nTmp; } - const SwContentNode* pCNd = m_pCurCrsr->GetContentNode(); + const SwContentNode* pCNd = m_pCurrentCursor->GetContentNode(); bRet = pCNd && !nStt && nEnd == pCNd->Len(); } return bRet; } -short SwCrsrShell::GetTextDirection( const Point* pPt ) const +short SwCursorShell::GetTextDirection( const Point* pPt ) const { - SwPosition aPos( *m_pCurCrsr->GetPoint() ); - Point aPt( pPt ? *pPt : m_pCurCrsr->GetPtPos() ); + SwPosition aPos( *m_pCurrentCursor->GetPoint() ); + Point aPt( pPt ? *pPt : m_pCurrentCursor->GetPtPos() ); if( pPt ) { - SwCrsrMoveState aTmpState( MV_NONE ); + SwCursorMoveState aTmpState( MV_NONE ); aTmpState.m_bSetInReadOnly = IsReadOnlyAvailable(); - GetLayout()->GetCrsrOfst( &aPos, aPt, &aTmpState ); + GetLayout()->GetCursorOfst( &aPos, aPt, &aTmpState ); } return mpDoc->GetTextDirection( aPos, &aPt ); } -bool SwCrsrShell::IsInVerticalText( const Point* pPt ) const +bool SwCursorShell::IsInVerticalText( const Point* pPt ) const { const short nDir = GetTextDirection( pPt ); return FRMDIR_VERT_TOP_RIGHT == nDir || FRMDIR_VERT_TOP_LEFT == nDir; } -bool SwCrsrShell::IsInRightToLeftText( const Point* pPt ) const +bool SwCursorShell::IsInRightToLeftText( const Point* pPt ) const { const short nDir = GetTextDirection( pPt ); // GetTextDirection uses FRMDIR_VERT_TOP_LEFT to indicate RTL in @@ -3133,12 +3133,12 @@ bool SwCrsrShell::IsInRightToLeftText( const Point* pPt ) const /// If the current cursor position is inside a hidden range, the hidden range /// is selected. -bool SwCrsrShell::SelectHiddenRange() +bool SwCursorShell::SelectHiddenRange() { bool bRet = false; - if ( !GetViewOptions()->IsShowHiddenChar() && !m_pCurCrsr->HasMark() ) + if ( !GetViewOptions()->IsShowHiddenChar() && !m_pCurrentCursor->HasMark() ) { - SwPosition& rPt = *m_pCurCrsr->GetPoint(); + SwPosition& rPt = *m_pCurrentCursor->GetPoint(); const SwTextNode* pNode = rPt.nNode.GetNode().GetTextNode(); if ( pNode ) { @@ -3151,8 +3151,8 @@ bool SwCrsrShell::SelectHiddenRange() if ( COMPLETE_STRING != nHiddenStart ) { // make selection: - m_pCurCrsr->SetMark(); - m_pCurCrsr->GetMark()->nContent = nHiddenEnd; + m_pCurrentCursor->SetMark(); + m_pCurrentCursor->GetMark()->nContent = nHiddenEnd; bRet = true; } } @@ -3161,42 +3161,42 @@ bool SwCrsrShell::SelectHiddenRange() return bRet; } -sal_uLong SwCrsrShell::Find( const SearchOptions& rSearchOpt, +sal_uLong SwCursorShell::Find( const SearchOptions& rSearchOpt, bool bSearchInNotes, SwDocPositions eStart, SwDocPositions eEnd, bool& bCancel, FindRanges eRng, bool bReplace ) { - if( m_pTableCrsr ) - GetCrsr(); - delete m_pTableCrsr, m_pTableCrsr = nullptr; - SwCallLink aLk( *this ); // watch Crsr-Moves; call Link if needed - sal_uLong nRet = m_pCurCrsr->Find( rSearchOpt, bSearchInNotes, eStart, eEnd, + if( m_pTableCursor ) + GetCursor(); + delete m_pTableCursor, m_pTableCursor = nullptr; + SwCallLink aLk( *this ); // watch Cursor-Moves; call Link if needed + sal_uLong nRet = m_pCurrentCursor->Find( rSearchOpt, bSearchInNotes, eStart, eEnd, bCancel, eRng, bReplace ); if( nRet || bCancel ) - UpdateCrsr(); + UpdateCursor(); return nRet; } -sal_uLong SwCrsrShell::Find( const SwTextFormatColl& rFormatColl, +sal_uLong SwCursorShell::Find( const SwTextFormatColl& rFormatColl, SwDocPositions eStart, SwDocPositions eEnd, bool& bCancel, FindRanges eRng, const SwTextFormatColl* pReplFormat ) { - if( m_pTableCrsr ) - GetCrsr(); - delete m_pTableCrsr, m_pTableCrsr = nullptr; - SwCallLink aLk( *this ); // watch Crsr-Moves; call Link if needed - sal_uLong nRet = m_pCurCrsr->Find( rFormatColl, eStart, eEnd, bCancel, eRng, + if( m_pTableCursor ) + GetCursor(); + delete m_pTableCursor, m_pTableCursor = nullptr; + SwCallLink aLk( *this ); // watch Cursor-Moves; call Link if needed + sal_uLong nRet = m_pCurrentCursor->Find( rFormatColl, eStart, eEnd, bCancel, eRng, pReplFormat ); if( nRet ) - UpdateCrsr(); + UpdateCursor(); return nRet; } -sal_uLong SwCrsrShell::Find( const SfxItemSet& rSet, +sal_uLong SwCursorShell::Find( const SfxItemSet& rSet, bool bNoCollections, SwDocPositions eStart, SwDocPositions eEnd, bool& bCancel, @@ -3204,40 +3204,40 @@ sal_uLong SwCrsrShell::Find( const SfxItemSet& rSet, const SearchOptions* pSearchOpt, const SfxItemSet* rReplSet ) { - if( m_pTableCrsr ) - GetCrsr(); - delete m_pTableCrsr, m_pTableCrsr = nullptr; - SwCallLink aLk( *this ); // watch Crsr-Moves; call Link if needed - sal_uLong nRet = m_pCurCrsr->Find( rSet, bNoCollections, eStart, eEnd, + if( m_pTableCursor ) + GetCursor(); + delete m_pTableCursor, m_pTableCursor = nullptr; + SwCallLink aLk( *this ); // watch Cursor-Moves; call Link if needed + sal_uLong nRet = m_pCurrentCursor->Find( rSet, bNoCollections, eStart, eEnd, bCancel, eRng, pSearchOpt, rReplSet ); if( nRet ) - UpdateCrsr(); + UpdateCursor(); return nRet; } -void SwCrsrShell::SetSelection( const SwPaM& rCrsr ) +void SwCursorShell::SetSelection( const SwPaM& rCursor ) { StartAction(); - SwPaM* pCrsr = GetCrsr(); - *pCrsr->GetPoint() = *rCrsr.GetPoint(); - if(rCrsr.HasMark()) + SwPaM* pCursor = GetCursor(); + *pCursor->GetPoint() = *rCursor.GetPoint(); + if(rCursor.HasMark()) { - pCrsr->SetMark(); - *pCrsr->GetMark() = *rCrsr.GetMark(); + pCursor->SetMark(); + *pCursor->GetMark() = *rCursor.GetMark(); } - if(rCrsr.GetNext() != &rCrsr) + if(rCursor.GetNext() != &rCursor) { - const SwPaM *_pStartCrsr = rCrsr.GetNext(); + const SwPaM *_pStartCursor = rCursor.GetNext(); do { - SwPaM* pCurrentCrsr = CreateCrsr(); - *pCurrentCrsr->GetPoint() = *_pStartCrsr->GetPoint(); - if(_pStartCrsr->HasMark()) + SwPaM* pCurrentCursor = CreateCursor(); + *pCurrentCursor->GetPoint() = *_pStartCursor->GetPoint(); + if(_pStartCursor->HasMark()) { - pCurrentCrsr->SetMark(); - *pCurrentCrsr->GetMark() = *_pStartCrsr->GetMark(); + pCurrentCursor->SetMark(); + *pCurrentCursor->GetMark() = *_pStartCursor->GetMark(); } - } while( (_pStartCrsr = _pStartCrsr->GetNext()) != &rCrsr ); + } while( (_pStartCursor = _pStartCursor->GetNext()) != &rCursor ); } EndAction(); } @@ -3271,44 +3271,44 @@ bool sw_PosOk(const SwPosition & aPos) @param aPam the PaM to check */ -static bool lcl_CrsrOk(SwPaM & aPam) +static bool lcl_CursorOk(SwPaM & aPam) { return sw_PosOk(*aPam.GetPoint()) && (! aPam.HasMark() || sw_PosOk(*aPam.GetMark())); } -void SwCrsrShell::ClearUpCrsrs() +void SwCursorShell::ClearUpCursors() { // start of the ring - SwPaM * pStartCrsr = GetCrsr(); + SwPaM * pStartCursor = GetCursor(); // start loop with second entry of the ring - SwPaM * pCrsr = pStartCrsr->GetNext(); - SwPaM * pTmpCrsr; + SwPaM * pCursor = pStartCursor->GetNext(); + SwPaM * pTmpCursor; bool bChanged = false; // For all entries in the ring except the start entry delete the entry if // it is invalid. - while (pCrsr != pStartCrsr) + while (pCursor != pStartCursor) { - pTmpCrsr = pCrsr->GetNext(); - if ( ! lcl_CrsrOk(*pCrsr)) + pTmpCursor = pCursor->GetNext(); + if ( ! lcl_CursorOk(*pCursor)) { - delete pCrsr; + delete pCursor; bChanged = true; } - pCrsr = pTmpCrsr; + pCursor = pTmpCursor; } - if( pStartCrsr->HasMark() && !sw_PosOk( *pStartCrsr->GetMark() ) ) + if( pStartCursor->HasMark() && !sw_PosOk( *pStartCursor->GetMark() ) ) { - pStartCrsr->DeleteMark(); + pStartCursor->DeleteMark(); bChanged = true; } - if( !sw_PosOk( *pStartCrsr->GetPoint() ) ) + if( !sw_PosOk( *pStartCursor->GetPoint() ) ) { SwNodes & aNodes = GetDoc()->GetNodes(); - const SwNode* pStart = lcl_NodeContext( pStartCrsr->GetPoint()->nNode.GetNode() ); - SwNodeIndex aIdx( pStartCrsr->GetPoint()->nNode ); + const SwNode* pStart = lcl_NodeContext( pStartCursor->GetPoint()->nNode.GetNode() ); + SwNodeIndex aIdx( pStartCursor->GetPoint()->nNode ); SwNode * pNode = SwNodes::GoPrevious(&aIdx); if( pNode == nullptr || lcl_NodeContext( *pNode ) != pStart ) aNodes.GoNext( &aIdx ); @@ -3327,7 +3327,7 @@ void SwCrsrShell::ClearUpCrsrs() if (bFound) { SwPaM aTmpPam(*pNode); - *pStartCrsr = aTmpPam; + *pStartCursor = aTmpPam; } bChanged = true; @@ -3335,30 +3335,30 @@ void SwCrsrShell::ClearUpCrsrs() // If at least one of the cursors in the ring have been deleted or replaced, // remove the table cursor. - if (m_pTableCrsr != nullptr && bChanged) - TableCrsrToCursor(); + if (m_pTableCursor != nullptr && bChanged) + TableCursorToCursor(); } -OUString SwCrsrShell::GetCrsrDescr() const +OUString SwCursorShell::GetCursorDescr() const { OUString aResult; if (IsMultiSelection()) aResult += SW_RES(STR_MULTISEL); else - aResult = SwDoc::GetPaMDescr(*GetCrsr()); + aResult = SwDoc::GetPaMDescr(*GetCursor()); return aResult; } -void SwCrsrShell::dumpAsXml(xmlTextWriterPtr pWriter) const +void SwCursorShell::dumpAsXml(xmlTextWriterPtr pWriter) const { - xmlTextWriterStartElement(pWriter, BAD_CAST("swCrsrShell")); + xmlTextWriterStartElement(pWriter, BAD_CAST("swCursorShell")); SwViewShell::dumpAsXml(pWriter); - xmlTextWriterStartElement(pWriter, BAD_CAST("m_pCurCrsr")); - for (SwPaM& rPaM : m_pCurCrsr->GetRingContainer()) + xmlTextWriterStartElement(pWriter, BAD_CAST("m_pCurrentCursor")); + for (SwPaM& rPaM : m_pCurrentCursor->GetRingContainer()) rPaM.dumpAsXml(pWriter); xmlTextWriterEndElement(pWriter); @@ -3423,15 +3423,15 @@ static void lcl_FillTextRange( uno::Reference<text::XTextRange>& rRange, rRange = xRange; } -void SwCrsrShell::GetSmartTagTerm( uno::Sequence< OUString >& rSmartTagTypes, +void SwCursorShell::GetSmartTagTerm( uno::Sequence< OUString >& rSmartTagTypes, uno::Sequence< uno::Reference< container::XStringKeyMap > >& rStringKeyMaps, uno::Reference< text::XTextRange>& rRange ) const { if ( !SwSmartTagMgr::Get().IsSmartTagsEnabled() ) return; - SwPaM* pCrsr = GetCrsr(); - SwPosition aPos( *pCrsr->GetPoint() ); + SwPaM* pCursor = GetCursor(); + SwPosition aPos( *pCursor->GetPoint() ); SwTextNode *pNode = aPos.nNode.GetNode().GetTextNode(); if ( pNode && !pNode->IsInProtectSect() ) { @@ -3460,7 +3460,7 @@ void SwCrsrShell::GetSmartTagTerm( uno::Sequence< OUString >& rSmartTagTypes, } // see also SwEditShell::GetCorrection( const Point* pPt, SwRect& rSelectRect ) -void SwCrsrShell::GetSmartTagTerm( const Point& rPt, SwRect& rSelectRect, +void SwCursorShell::GetSmartTagTerm( const Point& rPt, SwRect& rSelectRect, uno::Sequence< OUString >& rSmartTagTypes, uno::Sequence< uno::Reference< container::XStringKeyMap > >& rStringKeyMaps, uno::Reference<text::XTextRange>& rRange ) @@ -3468,16 +3468,16 @@ void SwCrsrShell::GetSmartTagTerm( const Point& rPt, SwRect& rSelectRect, if ( !SwSmartTagMgr::Get().IsSmartTagsEnabled() ) return; - SwPaM* pCrsr = GetCrsr(); - SwPosition aPos( *pCrsr->GetPoint() ); + SwPaM* pCursor = GetCursor(); + SwPosition aPos( *pCursor->GetPoint() ); Point aPt( rPt ); - SwCrsrMoveState eTmpState( MV_SETONLYTEXT ); + SwCursorMoveState eTmpState( MV_SETONLYTEXT ); SwSpecialPos aSpecialPos; eTmpState.m_pSpecialPos = &aSpecialPos; SwTextNode *pNode; const SwWrongList *pSmartTagList; - if( GetLayout()->GetCrsrOfst( &aPos, aPt, &eTmpState ) && + if( GetLayout()->GetCursorOfst( &aPos, aPt, &eTmpState ) && nullptr != (pNode = aPos.nNode.GetNode().GetTextNode()) && nullptr != (pSmartTagList = pNode->GetSmartTags()) && !pNode->IsInProtectSect() ) @@ -3505,9 +3505,9 @@ void SwCrsrShell::GetSmartTagTerm( const Point& rPt, SwRect& rSelectRect, //save the start and end positions of the line and the starting point Push(); LeftMargin(); - const sal_Int32 nLineStart = GetCrsr()->GetPoint()->nContent.GetIndex(); + const sal_Int32 nLineStart = GetCursor()->GetPoint()->nContent.GetIndex(); RightMargin(); - const sal_Int32 nLineEnd = GetCrsr()->GetPoint()->nContent.GetIndex(); + const sal_Int32 nLineEnd = GetCursor()->GetPoint()->nContent.GetIndex(); Pop(false); // make sure the selection build later from the data below does not @@ -3524,9 +3524,9 @@ void SwCrsrShell::GetSmartTagTerm( const Point& rPt, SwRect& rSelectRect, ++nRight; aPos.nContent = nBegin + nLeft; - pCrsr = GetCrsr(); - *pCrsr->GetPoint() = aPos; - pCrsr->SetMark(); + pCursor = GetCursor(); + *pCursor->GetPoint() = aPos; + pCursor->SetMark(); ExtendSelection( true, nLen - nLeft - nRight ); // do not determine the rectangle in the current line const sal_Int32 nWordStart = (nBegin + nLeft) < nLineStart ? nLineStart : nBegin + nLeft; @@ -3534,19 +3534,19 @@ void SwCrsrShell::GetSmartTagTerm( const Point& rPt, SwRect& rSelectRect, // be calculated const sal_Int32 nWordEnd = (nBegin + nLen - nLeft - nRight) > nLineEnd ? nLineEnd : (nBegin + nLen - nLeft - nRight); Push(); - pCrsr->DeleteMark(); - SwIndex& rContent = GetCrsr()->GetPoint()->nContent; + pCursor->DeleteMark(); + SwIndex& rContent = GetCursor()->GetPoint()->nContent; rContent = nWordStart; SwRect aStartRect; - SwCrsrMoveState aState; + SwCursorMoveState aState; aState.m_bRealWidth = true; - SwContentNode* pContentNode = pCrsr->GetContentNode(); - SwContentFrm *pContentFrame = pContentNode->getLayoutFrm( GetLayout(), &rPt, pCrsr->GetPoint(), false); + SwContentNode* pContentNode = pCursor->GetContentNode(); + SwContentFrame *pContentFrame = pContentNode->getLayoutFrame( GetLayout(), &rPt, pCursor->GetPoint(), false); - pContentFrame->GetCharRect( aStartRect, *pCrsr->GetPoint(), &aState ); + pContentFrame->GetCharRect( aStartRect, *pCursor->GetPoint(), &aState ); rContent = nWordEnd - 1; SwRect aEndRect; - pContentFrame->GetCharRect( aEndRect, *pCrsr->GetPoint(),&aState ); + pContentFrame->GetCharRect( aEndRect, *pCursor->GetPoint(),&aState ); rSelectRect = aStartRect.Union( aEndRect ); Pop(false); } diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index a7f1d341cd93..f9ce84c17371 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -71,123 +71,123 @@ using namespace ::com::sun::star; -void SwCrsrShell::MoveCrsrToNum() +void SwCursorShell::MoveCursorToNum() { - SwCallLink aLk( *this ); // watch Crsr-Moves - SwCrsrSaveState aSaveState( *m_pCurCrsr ); + SwCallLink aLk( *this ); // watch Cursor-Moves + SwCursorSaveState aSaveState( *m_pCurrentCursor ); if( ActionPend() ) return; SET_CURR_SHELL( this ); // try to set cursor onto this position, at half of the char- // SRectangle's height - Point aPt( m_pCurCrsr->GetPtPos() ); - SwContentFrm * pFrm = m_pCurCrsr->GetContentNode()->getLayoutFrm( GetLayout(), &aPt, - m_pCurCrsr->GetPoint() ); - pFrm->GetCharRect( m_aCharRect, *m_pCurCrsr->GetPoint() ); - pFrm->Calc(GetOut()); - if( pFrm->IsVertical() ) + Point aPt( m_pCurrentCursor->GetPtPos() ); + SwContentFrame * pFrame = m_pCurrentCursor->GetContentNode()->getLayoutFrame( GetLayout(), &aPt, + m_pCurrentCursor->GetPoint() ); + pFrame->GetCharRect( m_aCharRect, *m_pCurrentCursor->GetPoint() ); + pFrame->Calc(GetOut()); + if( pFrame->IsVertical() ) { aPt.setX(m_aCharRect.Center().getX()); - aPt.setY(pFrm->Frm().Top() + GetUpDownX()); + aPt.setY(pFrame->Frame().Top() + GetUpDownX()); } else { aPt.setY(m_aCharRect.Center().getY()); - aPt.setX(pFrm->Frm().Left() + GetUpDownX()); + aPt.setX(pFrame->Frame().Left() + GetUpDownX()); } - pFrm->GetCrsrOfst( m_pCurCrsr->GetPoint(), aPt ); - if ( !m_pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE | + pFrame->GetCursorOfst( m_pCurrentCursor->GetPoint(), aPt ); + if ( !m_pCurrentCursor->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE | nsSwCursorSelOverFlags::SELOVER_CHANGEPOS )) { - UpdateCrsr(SwCrsrShell::UPDOWN | - SwCrsrShell::SCROLLWIN | SwCrsrShell::CHKRANGE | - SwCrsrShell::READONLY ); + UpdateCursor(SwCursorShell::UPDOWN | + SwCursorShell::SCROLLWIN | SwCursorShell::CHKRANGE | + SwCursorShell::READONLY ); } } /// go to next/previous point on the same level -bool SwCrsrShell::GotoNextNum() +bool SwCursorShell::GotoNextNum() { - if (!SwDoc::GotoNextNum( *m_pCurCrsr->GetPoint() )) + if (!SwDoc::GotoNextNum( *m_pCurrentCursor->GetPoint() )) return false; - MoveCrsrToNum(); + MoveCursorToNum(); return true; } -bool SwCrsrShell::GotoPrevNum() +bool SwCursorShell::GotoPrevNum() { - if (!SwDoc::GotoPrevNum( *m_pCurCrsr->GetPoint() )) + if (!SwDoc::GotoPrevNum( *m_pCurrentCursor->GetPoint() )) return false; - MoveCrsrToNum(); + MoveCursorToNum(); return true; } /// jump from content to header -bool SwCrsrShell::GotoHeaderText() +bool SwCursorShell::GotoHeaderText() { - const SwFrm* pFrm = GetCurrFrm()->FindPageFrm(); - while( pFrm && !pFrm->IsHeaderFrm() ) - pFrm = pFrm->GetLower(); + const SwFrame* pFrame = GetCurrFrame()->FindPageFrame(); + while( pFrame && !pFrame->IsHeaderFrame() ) + pFrame = pFrame->GetLower(); // found header, search 1. content frame - while( pFrm && !pFrm->IsContentFrm() ) - pFrm = pFrm->GetLower(); + while( pFrame && !pFrame->IsContentFrame() ) + pFrame = pFrame->GetLower(); - if( pFrm ) + if( pFrame ) { SET_CURR_SHELL( this ); // get header frame - SwCallLink aLk( *this ); // watch Crsr-Moves - SwCursor *pTmpCrsr = getShellCrsr( true ); - SwCrsrSaveState aSaveState( *pTmpCrsr ); - pFrm->Calc(GetOut()); - Point aPt( pFrm->Frm().Pos() + pFrm->Prt().Pos() ); - pFrm->GetCrsrOfst( pTmpCrsr->GetPoint(), aPt ); - if( !pTmpCrsr->IsSelOvr() ) - UpdateCrsr(); + SwCallLink aLk( *this ); // watch Cursor-Moves + SwCursor *pTmpCursor = getShellCursor( true ); + SwCursorSaveState aSaveState( *pTmpCursor ); + pFrame->Calc(GetOut()); + Point aPt( pFrame->Frame().Pos() + pFrame->Prt().Pos() ); + pFrame->GetCursorOfst( pTmpCursor->GetPoint(), aPt ); + if( !pTmpCursor->IsSelOvr() ) + UpdateCursor(); else - pFrm = nullptr; + pFrame = nullptr; } - return nullptr != pFrm; + return nullptr != pFrame; } /// jump from content to footer -bool SwCrsrShell::GotoFooterText() +bool SwCursorShell::GotoFooterText() { - const SwPageFrm* pFrm = GetCurrFrm()->FindPageFrm(); - if( pFrm ) + const SwPageFrame* pFrame = GetCurrFrame()->FindPageFrame(); + if( pFrame ) { - const SwFrm* pLower = pFrm->GetLastLower(); + const SwFrame* pLower = pFrame->GetLastLower(); - while( pLower && !pLower->IsFooterFrm() ) + while( pLower && !pLower->IsFooterFrame() ) pLower = pLower->GetLower(); // found footer, search 1. content frame - while( pLower && !pLower->IsContentFrm() ) + while( pLower && !pLower->IsContentFrame() ) pLower = pLower->GetLower(); if( pLower ) { - SwCursor *pTmpCrsr = getShellCrsr( true ); + SwCursor *pTmpCursor = getShellCursor( true ); SET_CURR_SHELL( this ); // get position in footer - SwCallLink aLk( *this ); // watch Crsr-Moves - SwCrsrSaveState aSaveState( *pTmpCrsr ); + SwCallLink aLk( *this ); // watch Cursor-Moves + SwCursorSaveState aSaveState( *pTmpCursor ); pLower->Calc(GetOut()); - Point aPt( pLower->Frm().Pos() + pLower->Prt().Pos() ); - pLower->GetCrsrOfst( pTmpCrsr->GetPoint(), aPt ); - if( !pTmpCrsr->IsSelOvr() ) - UpdateCrsr(); + Point aPt( pLower->Frame().Pos() + pLower->Prt().Pos() ); + pLower->GetCursorOfst( pTmpCursor->GetPoint(), aPt ); + if( !pTmpCursor->IsSelOvr() ) + UpdateCursor(); else - pFrm = nullptr; + pFrame = nullptr; } else - pFrm = nullptr; + pFrame = nullptr; } else - pFrm = nullptr; - return nullptr != pFrm; + pFrame = nullptr; + return nullptr != pFrame; } -bool SwCrsrShell::SetCrsrInHdFt( size_t nDescNo, bool bInHeader ) +bool SwCursorShell::SetCursorInHdFt( size_t nDescNo, bool bInHeader ) { bool bRet = false; SwDoc *pMyDoc = GetDoc(); @@ -198,7 +198,7 @@ bool SwCrsrShell::SetCrsrInHdFt( size_t nDescNo, bool bInHeader ) if( SIZE_MAX == nDescNo ) { // take the current one - const SwPageFrm* pPage = GetCurrFrm()->FindPageFrm(); + const SwPageFrame* pPage = GetCurrFrame()->FindPageFrame(); if( pPage && pMyDoc->ContainsPageDesc( pPage->GetPageDesc(), &nDescNo) ) pDesc = pPage->GetPageDesc(); @@ -232,24 +232,24 @@ bool SwCrsrShell::SetCrsrInHdFt( size_t nDescNo, bool bInHeader ) if( !pCNd ) pCNd = pMyDoc->GetNodes().GoNext( &aIdx ); - Point aPt( m_pCurCrsr->GetPtPos() ); + Point aPt( m_pCurrentCursor->GetPtPos() ); - if( pCNd && nullptr != pCNd->getLayoutFrm( GetLayout(), &aPt, nullptr, false ) ) + if( pCNd && nullptr != pCNd->getLayoutFrame( GetLayout(), &aPt, nullptr, false ) ) { // then we can set the cursor in here - SwCallLink aLk( *this ); // watch Crsr-Moves - SwCrsrSaveState aSaveState( *m_pCurCrsr ); + SwCallLink aLk( *this ); // watch Cursor-Moves + SwCursorSaveState aSaveState( *m_pCurrentCursor ); ClearMark(); - SwPosition& rPos = *m_pCurCrsr->GetPoint(); + SwPosition& rPos = *m_pCurrentCursor->GetPoint(); rPos.nNode = *pCNd; rPos.nContent.Assign( pCNd, 0 ); - bRet = !m_pCurCrsr->IsSelOvr(); + bRet = !m_pCurrentCursor->IsSelOvr(); if( bRet ) - UpdateCrsr( SwCrsrShell::SCROLLWIN | SwCrsrShell::CHKRANGE | - SwCrsrShell::READONLY ); + UpdateCursor( SwCursorShell::SCROLLWIN | SwCursorShell::CHKRANGE | + SwCursorShell::READONLY ); } } } @@ -257,7 +257,7 @@ bool SwCrsrShell::SetCrsrInHdFt( size_t nDescNo, bool bInHeader ) } /// jump to the next index -bool SwCrsrShell::GotoNextTOXBase( const OUString* pName ) +bool SwCursorShell::GotoNextTOXBase( const OUString* pName ) { bool bRet = false; @@ -271,7 +271,7 @@ bool SwCrsrShell::GotoNextTOXBase( const OUString* pName ) SwSectionNode const*const pSectNd( pSect->GetFormat()->GetSectionNode()); if ( pSectNd - && m_pCurCrsr->GetPoint()->nNode < pSectNd->GetIndex() + && m_pCurrentCursor->GetPoint()->nNode < pSectNd->GetIndex() && (!pFnd || pFnd->GetIndex() > pSectNd->GetIndex()) && (!pName || *pName == static_cast<SwTOXBaseSection const*>(pSect)->GetTOXName())) @@ -283,10 +283,10 @@ bool SwCrsrShell::GotoNextTOXBase( const OUString* pName ) if (pCNd && pCNd->EndOfSectionIndex() <= pSectNd->EndOfSectionIndex()) { - SwContentFrm const*const pCFrm( - pCNd->getLayoutFrm(GetLayout())); - if (pCFrm && - (IsReadOnlyAvailable() || !pCFrm->IsProtected())) + SwContentFrame const*const pCFrame( + pCNd->getLayoutFrame(GetLayout())); + if (pCFrame && + (IsReadOnlyAvailable() || !pCFrame->IsProtected())) { pFnd = pCNd; } @@ -296,19 +296,19 @@ bool SwCrsrShell::GotoNextTOXBase( const OUString* pName ) } if( pFnd ) { - SwCallLink aLk( *this ); // watch Crsr-Moves - SwCrsrSaveState aSaveState( *m_pCurCrsr ); - m_pCurCrsr->GetPoint()->nNode = *pFnd; - m_pCurCrsr->GetPoint()->nContent.Assign( pFnd, 0 ); - bRet = !m_pCurCrsr->IsSelOvr(); + SwCallLink aLk( *this ); // watch Cursor-Moves + SwCursorSaveState aSaveState( *m_pCurrentCursor ); + m_pCurrentCursor->GetPoint()->nNode = *pFnd; + m_pCurrentCursor->GetPoint()->nContent.Assign( pFnd, 0 ); + bRet = !m_pCurrentCursor->IsSelOvr(); if( bRet ) - UpdateCrsr(SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE|SwCrsrShell::READONLY); + UpdateCursor(SwCursorShell::SCROLLWIN|SwCursorShell::CHKRANGE|SwCursorShell::READONLY); } return bRet; } /// jump to previous index -bool SwCrsrShell::GotoPrevTOXBase( const OUString* pName ) +bool SwCursorShell::GotoPrevTOXBase( const OUString* pName ) { bool bRet = false; @@ -322,7 +322,7 @@ bool SwCrsrShell::GotoPrevTOXBase( const OUString* pName ) SwSectionNode const*const pSectNd( pSect->GetFormat()->GetSectionNode()); if ( pSectNd - && m_pCurCrsr->GetPoint()->nNode > pSectNd->EndOfSectionIndex() + && m_pCurrentCursor->GetPoint()->nNode > pSectNd->EndOfSectionIndex() && (!pFnd || pFnd->GetIndex() < pSectNd->GetIndex()) && (!pName || *pName == static_cast<SwTOXBaseSection const*>(pSect)->GetTOXName())) @@ -334,10 +334,10 @@ bool SwCrsrShell::GotoPrevTOXBase( const OUString* pName ) if (pCNd && pCNd->EndOfSectionIndex() <= pSectNd->EndOfSectionIndex()) { - SwContentFrm const*const pCFrm( - pCNd->getLayoutFrm(GetLayout())); - if (pCFrm && - (IsReadOnlyAvailable() || !pCFrm->IsProtected())) + SwContentFrame const*const pCFrame( + pCNd->getLayoutFrame(GetLayout())); + if (pCFrame && + (IsReadOnlyAvailable() || !pCFrame->IsProtected())) { pFnd = pCNd; } @@ -348,24 +348,24 @@ bool SwCrsrShell::GotoPrevTOXBase( const OUString* pName ) if( pFnd ) { - SwCallLink aLk( *this ); // watch Crsr-Moves - SwCrsrSaveState aSaveState( *m_pCurCrsr ); - m_pCurCrsr->GetPoint()->nNode = *pFnd; - m_pCurCrsr->GetPoint()->nContent.Assign( pFnd, 0 ); - bRet = !m_pCurCrsr->IsSelOvr(); + SwCallLink aLk( *this ); // watch Cursor-Moves + SwCursorSaveState aSaveState( *m_pCurrentCursor ); + m_pCurrentCursor->GetPoint()->nNode = *pFnd; + m_pCurrentCursor->GetPoint()->nContent.Assign( pFnd, 0 ); + bRet = !m_pCurrentCursor->IsSelOvr(); if( bRet ) - UpdateCrsr(SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE|SwCrsrShell::READONLY); + UpdateCursor(SwCursorShell::SCROLLWIN|SwCursorShell::CHKRANGE|SwCursorShell::READONLY); } return bRet; } /// jump to index of TOXMark -bool SwCrsrShell::GotoTOXMarkBase() +bool SwCursorShell::GotoTOXMarkBase() { bool bRet = false; SwTOXMarks aMarks; - sal_uInt16 nCnt = SwDoc::GetCurTOXMark( *m_pCurCrsr->GetPoint(), aMarks ); + sal_uInt16 nCnt = SwDoc::GetCurTOXMark( *m_pCurrentCursor->GetPoint(), aMarks ); if( nCnt ) { // Take the 1. and get the index type. Search in its dependency list @@ -385,20 +385,20 @@ bool SwCrsrShell::GotoTOXMarkBase() SwContentNode* pCNd = aIdx.GetNode().GetContentNode(); if( !pCNd ) pCNd = GetDoc()->GetNodes().GoNext( &aIdx ); - const SwContentFrm* pCFrm; + const SwContentFrame* pCFrame; if( pCNd && pCNd->EndOfSectionIndex() < pSectNd->EndOfSectionIndex() && - nullptr != ( pCFrm = pCNd->getLayoutFrm( GetLayout() ) ) && - ( IsReadOnlyAvailable() || !pCFrm->IsProtected() )) + nullptr != ( pCFrame = pCNd->getLayoutFrame( GetLayout() ) ) && + ( IsReadOnlyAvailable() || !pCFrame->IsProtected() )) { - SwCallLink aLk( *this ); // watch Crsr-Moves - SwCrsrSaveState aSaveState( *m_pCurCrsr ); - m_pCurCrsr->GetPoint()->nNode = *pCNd; - m_pCurCrsr->GetPoint()->nContent.Assign( pCNd, 0 ); - bRet = !m_pCurCrsr->IsInProtectTable() && - !m_pCurCrsr->IsSelOvr(); + SwCallLink aLk( *this ); // watch Cursor-Moves + SwCursorSaveState aSaveState( *m_pCurrentCursor ); + m_pCurrentCursor->GetPoint()->nNode = *pCNd; + m_pCurrentCursor->GetPoint()->nContent.Assign( pCNd, 0 ); + bRet = !m_pCurrentCursor->IsInProtectTable() && + !m_pCurrentCursor->IsSelOvr(); if( bRet ) - UpdateCrsr(SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE|SwCrsrShell::READONLY); + UpdateCursor(SwCursorShell::SCROLLWIN|SwCursorShell::CHKRANGE|SwCursorShell::READONLY); break; } } @@ -409,13 +409,13 @@ bool SwCrsrShell::GotoTOXMarkBase() /// Jump to next/previous table formula /// Optionally it is possible to also jump to broken formulas -bool SwCrsrShell::GotoNxtPrvTableFormula( bool bNext, bool bOnlyErrors ) +bool SwCursorShell::GotoNxtPrvTableFormula( bool bNext, bool bOnlyErrors ) { if( IsTableMode() ) return false; bool bFnd = false; - SwPosition& rPos = *m_pCurCrsr->GetPoint(); + SwPosition& rPos = *m_pCurrentCursor->GetPoint(); Point aPt; SwPosition aFndPos( GetDoc()->GetNodes().GetEndOfContent() ); @@ -436,7 +436,7 @@ bool SwCrsrShell::GotoNxtPrvTableFormula( bool bNext, bool bOnlyErrors ) if( rPos.nNode < GetDoc()->GetNodes().GetEndOfExtras() ) // also at collection use only the first frame - aCurGEF.SetBodyPos( *rPos.nNode.GetNode().GetContentNode()->getLayoutFrm( GetLayout(), + aCurGEF.SetBodyPos( *rPos.nNode.GetNode().GetContentNode()->getLayoutFrame( GetLayout(), &aPt, &rPos, false ) ); { sal_uInt32 n, nMaxItems = GetDoc()->GetAttrPool().GetItemCount2( RES_BOXATR_FORMULA ); @@ -453,14 +453,14 @@ bool SwCrsrShell::GotoNxtPrvTableFormula( bool bNext, bool bOnlyErrors ) ( !bOnlyErrors || !static_cast<const SwTableBoxFormula*>(pItem)->HasValidBoxes() ) ) { - const SwContentFrm* pCFrm; + const SwContentFrame* pCFrame; SwNodeIndex aIdx( *pTBox->GetSttNd() ); const SwContentNode* pCNd = GetDoc()->GetNodes().GoNext( &aIdx ); - if( pCNd && nullptr != ( pCFrm = pCNd->getLayoutFrm( GetLayout(), &aPt, nullptr, false ) ) && - (IsReadOnlyAvailable() || !pCFrm->IsProtected() )) + if( pCNd && nullptr != ( pCFrame = pCNd->getLayoutFrame( GetLayout(), &aPt, nullptr, false ) ) && + (IsReadOnlyAvailable() || !pCFrame->IsProtected() )) { _SetGetExpField aCmp( *pTBox ); - aCmp.SetBodyPos( *pCFrm ); + aCmp.SetBodyPos( *pCFrame ); if( bNext ? ( aCurGEF < aCmp && aCmp < aFndGEF ) : ( aCmp < aCurGEF && aFndGEF < aCmp )) @@ -476,28 +476,28 @@ bool SwCrsrShell::GotoNxtPrvTableFormula( bool bNext, bool bOnlyErrors ) if( bFnd ) { SET_CURR_SHELL( this ); - SwCallLink aLk( *this ); // watch Crsr-Moves - SwCrsrSaveState aSaveState( *m_pCurCrsr ); + SwCallLink aLk( *this ); // watch Cursor-Moves + SwCursorSaveState aSaveState( *m_pCurrentCursor ); aFndGEF.GetPosOfContent( rPos ); - m_pCurCrsr->DeleteMark(); + m_pCurrentCursor->DeleteMark(); - bFnd = !m_pCurCrsr->IsSelOvr(); + bFnd = !m_pCurrentCursor->IsSelOvr(); if( bFnd ) - UpdateCrsr( SwCrsrShell::SCROLLWIN | SwCrsrShell::CHKRANGE | - SwCrsrShell::READONLY ); + UpdateCursor( SwCursorShell::SCROLLWIN | SwCursorShell::CHKRANGE | + SwCursorShell::READONLY ); } return bFnd; } /// jump to next/previous index marker -bool SwCrsrShell::GotoNxtPrvTOXMark( bool bNext ) +bool SwCursorShell::GotoNxtPrvTOXMark( bool bNext ) { if( IsTableMode() ) return false; bool bFnd = false; - SwPosition& rPos = *m_pCurCrsr->GetPoint(); + SwPosition& rPos = *m_pCurrentCursor->GetPoint(); Point aPt; SwPosition aFndPos( GetDoc()->GetNodes().GetEndOfContent() ); @@ -508,7 +508,7 @@ bool SwCrsrShell::GotoNxtPrvTOXMark( bool bNext ) if( rPos.nNode.GetIndex() < GetDoc()->GetNodes().GetEndOfExtras().GetIndex() ) // also at collection use only the first frame aCurGEF.SetBodyPos( *rPos.nNode.GetNode(). - GetContentNode()->getLayoutFrm( GetLayout(), &aPt, &rPos, false ) ); + GetContentNode()->getLayoutFrame( GetLayout(), &aPt, &rPos, false ) ); { const SwTextNode* pTextNd; @@ -518,18 +518,18 @@ bool SwCrsrShell::GotoNxtPrvTOXMark( bool bNext ) for( n = 0; n < nMaxItems; ++n ) { const SfxPoolItem* pItem; - const SwContentFrm* pCFrm; + const SwContentFrame* pCFrame; if( nullptr != (pItem = GetDoc()->GetAttrPool().GetItem2( RES_TXTATR_TOXMARK, n ) ) && nullptr != (pTextTOX = static_cast<const SwTOXMark*>(pItem)->GetTextTOXMark() ) && ( pTextNd = &pTextTOX->GetTextNode())->GetNodes().IsDocNodes() && - nullptr != ( pCFrm = pTextNd->getLayoutFrm( GetLayout(), &aPt, nullptr, false )) && - ( IsReadOnlyAvailable() || !pCFrm->IsProtected() )) + nullptr != ( pCFrame = pTextNd->getLayoutFrame( GetLayout(), &aPt, nullptr, false )) && + ( IsReadOnlyAvailable() || !pCFrame->IsProtected() )) { SwNodeIndex aNdIndex( *pTextNd ); // UNIX needs this object _SetGetExpField aCmp( aNdIndex, *pTextTOX, nullptr ); - aCmp.SetBodyPos( *pCFrm ); + aCmp.SetBodyPos( *pCFrame ); if( bNext ? ( aCurGEF < aCmp && aCmp < aFndGEF ) : ( aCmp < aCurGEF && aFndGEF < aCmp )) @@ -544,38 +544,38 @@ bool SwCrsrShell::GotoNxtPrvTOXMark( bool bNext ) if( bFnd ) { SET_CURR_SHELL( this ); - SwCallLink aLk( *this ); // watch Crsr-Moves - SwCrsrSaveState aSaveState( *m_pCurCrsr ); + SwCallLink aLk( *this ); // watch Cursor-Moves + SwCursorSaveState aSaveState( *m_pCurrentCursor ); aFndGEF.GetPosOfContent( rPos ); - bFnd = !m_pCurCrsr->IsSelOvr(); + bFnd = !m_pCurrentCursor->IsSelOvr(); if( bFnd ) - UpdateCrsr( SwCrsrShell::SCROLLWIN | SwCrsrShell::CHKRANGE | - SwCrsrShell::READONLY ); + UpdateCursor( SwCursorShell::SCROLLWIN | SwCursorShell::CHKRANGE | + SwCursorShell::READONLY ); } return bFnd; } /// traveling between marks -const SwTOXMark& SwCrsrShell::GotoTOXMark( const SwTOXMark& rStart, +const SwTOXMark& SwCursorShell::GotoTOXMark( const SwTOXMark& rStart, SwTOXSearch eDir ) { SET_CURR_SHELL( this ); - SwCallLink aLk( *this ); // watch Crsr-Moves - SwCrsrSaveState aSaveState( *m_pCurCrsr ); + SwCallLink aLk( *this ); // watch Cursor-Moves + SwCursorSaveState aSaveState( *m_pCurrentCursor ); const SwTOXMark& rNewMark = GetDoc()->GotoTOXMark( rStart, eDir, IsReadOnlyAvailable() ); // set position - SwPosition& rPos = *GetCrsr()->GetPoint(); + SwPosition& rPos = *GetCursor()->GetPoint(); rPos.nNode = rNewMark.GetTextTOXMark()->GetTextNode(); rPos.nContent.Assign( rPos.nNode.GetNode().GetContentNode(), rNewMark.GetTextTOXMark()->GetStart() ); - if( !m_pCurCrsr->IsSelOvr() ) - UpdateCrsr( SwCrsrShell::SCROLLWIN | SwCrsrShell::CHKRANGE | - SwCrsrShell::READONLY ); + if( !m_pCurrentCursor->IsSelOvr() ) + UpdateCursor( SwCursorShell::SCROLLWIN | SwCursorShell::CHKRANGE | + SwCursorShell::READONLY ); return rNewMark; } @@ -599,13 +599,13 @@ void lcl_MakeFieldLst( || static_cast<const SwSetExpField*>(pTextField->GetFormatField().GetField())->GetInputFlag() ) ) { const SwTextNode& rTextNode = pTextField->GetTextNode(); - const SwContentFrm* pCFrm = - rTextNode.getLayoutFrm( rTextNode.GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ); - if ( pCFrm != nullptr - && ( bInReadOnly || !pCFrm->IsProtected() ) ) + const SwContentFrame* pCFrame = + rTextNode.getLayoutFrame( rTextNode.GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ); + if ( pCFrame != nullptr + && ( bInReadOnly || !pCFrame->IsProtected() ) ) { _SetGetExpField* pNew = new _SetGetExpField( SwNodeIndex( rTextNode ), pTextField ); - pNew->SetBodyPos( *pCFrm ); + pNew->SetBodyPos( *pCFrame ); rLst.insert( pNew ); } } @@ -614,7 +614,7 @@ void lcl_MakeFieldLst( static _SetGetExpFields::const_iterator lcl_FindField(bool & o_rFound, _SetGetExpFields const& rSrtLst, - SwRootFrm *const pLayout, SwTextNode *const pTextNode, + SwRootFrame *const pLayout, SwTextNode *const pTextNode, SwTextField *const pTextField, SwPosition const& rPos, sal_Int32 const nContentOffset) { @@ -634,7 +634,7 @@ lcl_FindField(bool & o_rFound, _SetGetExpFields const& rSrtLst, { // also at collection use only the first frame Point aPt; - pSrch->SetBodyPos(*pTextNode->getLayoutFrm(pLayout, &aPt, &rPos, false)); + pSrch->SetBodyPos(*pTextNode->getLayoutFrame(pLayout, &aPt, &rPos, false)); } _SetGetExpFields::const_iterator it = rSrtLst.lower_bound(pSrch.get()); @@ -643,7 +643,7 @@ lcl_FindField(bool & o_rFound, _SetGetExpFields const& rSrtLst, return it; } -bool SwCrsrShell::MoveFieldType( +bool SwCursorShell::MoveFieldType( const SwFieldType* pFieldType, const bool bNext, const sal_uInt16 nResType, @@ -696,12 +696,12 @@ bool SwCrsrShell::MoveFieldType( return false; _SetGetExpFields::const_iterator it; - SwCursor* pCrsr = getShellCrsr( true ); + SwCursor* pCursor = getShellCursor( true ); { // (1998): Always use field for search so that the right one is found as // well some are in frames that are anchored to a paragraph that has a // field - const SwPosition& rPos = *pCrsr->GetPoint(); + const SwPosition& rPos = *pCursor->GetPoint(); SwTextNode* pTNd = rPos.nNode.GetNode().GetTextNode(); OSL_ENSURE( pTNd, "No ContentNode" ); @@ -770,40 +770,40 @@ bool SwCrsrShell::MoveFieldType( const _SetGetExpField& rFnd = **it; SET_CURR_SHELL( this ); - SwCallLink aLk( *this ); // watch Crsr-Moves - SwCrsrSaveState aSaveState( *pCrsr ); + SwCallLink aLk( *this ); // watch Cursor-Moves + SwCursorSaveState aSaveState( *pCursor ); - rFnd.GetPosOfContent( *pCrsr->GetPoint() ); - bool bRet = !m_pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION | + rFnd.GetPosOfContent( *pCursor->GetPoint() ); + bool bRet = !m_pCurrentCursor->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION | nsSwCursorSelOverFlags::SELOVER_TOGGLE ); if( bRet ) - UpdateCrsr(SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE|SwCrsrShell::READONLY); + UpdateCursor(SwCursorShell::SCROLLWIN|SwCursorShell::CHKRANGE|SwCursorShell::READONLY); return bRet; } -bool SwCrsrShell::GotoFormatField( const SwFormatField& rField ) +bool SwCursorShell::GotoFormatField( const SwFormatField& rField ) { bool bRet = false; if( rField.GetTextField() ) { SET_CURR_SHELL( this ); - SwCallLink aLk( *this ); // watch Crsr-Moves + SwCallLink aLk( *this ); // watch Cursor-Moves - SwCursor* pCrsr = getShellCrsr( true ); - SwCrsrSaveState aSaveState( *pCrsr ); + SwCursor* pCursor = getShellCursor( true ); + SwCursorSaveState aSaveState( *pCursor ); SwTextNode* pTNd = rField.GetTextField()->GetpTextNode(); - pCrsr->GetPoint()->nNode = *pTNd; - pCrsr->GetPoint()->nContent.Assign( pTNd, rField.GetTextField()->GetStart() ); + pCursor->GetPoint()->nNode = *pTNd; + pCursor->GetPoint()->nContent.Assign( pTNd, rField.GetTextField()->GetStart() ); - bRet = !pCrsr->IsSelOvr(); + bRet = !pCursor->IsSelOvr(); if( bRet ) - UpdateCrsr(SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE|SwCrsrShell::READONLY); + UpdateCursor(SwCursorShell::SCROLLWIN|SwCursorShell::CHKRANGE|SwCursorShell::READONLY); } return bRet; } -SwTextField * SwCrsrShell::GetTextFieldAtPos( +SwTextField * SwCursorShell::GetTextFieldAtPos( const SwPosition* pPos, const bool bIncludeInputFieldAtStart ) { @@ -818,77 +818,77 @@ SwTextField * SwCrsrShell::GetTextFieldAtPos( return pTextField; } -SwField* SwCrsrShell::GetFieldAtCrsr( - const SwPaM* pCrsr, +SwField* SwCursorShell::GetFieldAtCursor( + const SwPaM* pCursor, const bool bIncludeInputFieldAtStart ) { - SwField* pFieldAtCrsr = nullptr; + SwField* pFieldAtCursor = nullptr; - SwTextField* pTextField = GetTextFieldAtPos( pCrsr->Start(), bIncludeInputFieldAtStart ); + SwTextField* pTextField = GetTextFieldAtPos( pCursor->Start(), bIncludeInputFieldAtStart ); if ( pTextField != nullptr - && pCrsr->Start()->nNode == pCrsr->End()->nNode ) + && pCursor->Start()->nNode == pCursor->End()->nNode ) { const sal_Int32 nTextFieldLength = pTextField->End() != nullptr ? *(pTextField->End()) - pTextField->GetStart() : 1; - if ( ( pCrsr->End()->nContent.GetIndex() - pCrsr->Start()->nContent.GetIndex() ) <= nTextFieldLength ) + if ( ( pCursor->End()->nContent.GetIndex() - pCursor->Start()->nContent.GetIndex() ) <= nTextFieldLength ) { - pFieldAtCrsr = const_cast<SwField*>(pTextField->GetFormatField().GetField()); + pFieldAtCursor = const_cast<SwField*>(pTextField->GetFormatField().GetField()); } } - return pFieldAtCrsr; + return pFieldAtCursor; } -SwField* SwCrsrShell::GetCurField( const bool bIncludeInputFieldAtStart ) const +SwField* SwCursorShell::GetCurField( const bool bIncludeInputFieldAtStart ) const { - SwPaM* pCrsr = GetCrsr(); - if ( pCrsr->IsMultiSelection() ) + SwPaM* pCursor = GetCursor(); + if ( pCursor->IsMultiSelection() ) { // multi selection not handled. return nullptr; } - SwField* pCurField = GetFieldAtCrsr( pCrsr, bIncludeInputFieldAtStart );; + SwField* pCurField = GetFieldAtCursor( pCursor, bIncludeInputFieldAtStart );; if ( pCurField != nullptr && RES_TABLEFLD == pCurField->GetTyp()->Which() ) { // TabellenFormel ? wandel internen in externen Namen um - const SwTableNode* pTableNd = IsCrsrInTable(); + const SwTableNode* pTableNd = IsCursorInTable(); static_cast<SwTableField*>(pCurField)->PtrToBoxNm( pTableNd ? &pTableNd->GetTable() : nullptr ); } return pCurField; } -bool SwCrsrShell::CrsrInsideInputField() const +bool SwCursorShell::CursorInsideInputField() const { - for(SwPaM& rCrsr : GetCrsr()->GetRingContainer()) + for(SwPaM& rCursor : GetCursor()->GetRingContainer()) { - if(dynamic_cast<const SwInputField*>(GetFieldAtCrsr( &rCrsr, false ))) + if(dynamic_cast<const SwInputField*>(GetFieldAtCursor( &rCursor, false ))) return true; } return false; } -bool SwCrsrShell::PosInsideInputField( const SwPosition& rPos ) +bool SwCursorShell::PosInsideInputField( const SwPosition& rPos ) { return dynamic_cast<const SwTextInputField*>(GetTextFieldAtPos( &rPos, false )) != nullptr; } -bool SwCrsrShell::DocPtInsideInputField( const Point& rDocPt ) const +bool SwCursorShell::DocPtInsideInputField( const Point& rDocPt ) const { - SwPosition aPos( *(GetCrsr()->Start()) ); + SwPosition aPos( *(GetCursor()->Start()) ); Point aDocPt( rDocPt ); - if ( GetLayout()->GetCrsrOfst( &aPos, aDocPt ) ) + if ( GetLayout()->GetCursorOfst( &aPos, aDocPt ) ) { return PosInsideInputField( aPos ); } return false; } -sal_Int32 SwCrsrShell::StartOfInputFieldAtPos( const SwPosition& rPos ) +sal_Int32 SwCursorShell::StartOfInputFieldAtPos( const SwPosition& rPos ) { const SwTextInputField* pTextInputField = dynamic_cast<const SwTextInputField*>(GetTextFieldAtPos( &rPos, true )); if ( pTextInputField == nullptr ) @@ -899,7 +899,7 @@ sal_Int32 SwCrsrShell::StartOfInputFieldAtPos( const SwPosition& rPos ) return pTextInputField->GetStart(); } -sal_Int32 SwCrsrShell::EndOfInputFieldAtPos( const SwPosition& rPos ) +sal_Int32 SwCursorShell::EndOfInputFieldAtPos( const SwPosition& rPos ) { const SwTextInputField* pTextInputField = dynamic_cast<const SwTextInputField*>(GetTextFieldAtPos( &rPos, true )); if ( pTextInputField == nullptr ) @@ -910,47 +910,47 @@ sal_Int32 SwCrsrShell::EndOfInputFieldAtPos( const SwPosition& rPos ) return *(pTextInputField->End()); } -void SwCrsrShell::GotoOutline( sal_uInt16 nIdx ) +void SwCursorShell::GotoOutline( sal_uInt16 nIdx ) { - SwCursor* pCrsr = getShellCrsr( true ); + SwCursor* pCursor = getShellCursor( true ); SET_CURR_SHELL( this ); - SwCallLink aLk( *this ); // watch Crsr-Moves - SwCrsrSaveState aSaveState( *pCrsr ); + SwCallLink aLk( *this ); // watch Cursor-Moves + SwCursorSaveState aSaveState( *pCursor ); const SwNodes& rNds = GetDoc()->GetNodes(); SwTextNode* pTextNd = rNds.GetOutLineNds()[ nIdx ]->GetTextNode(); - pCrsr->GetPoint()->nNode = *pTextNd; - pCrsr->GetPoint()->nContent.Assign( pTextNd, 0 ); + pCursor->GetPoint()->nNode = *pTextNd; + pCursor->GetPoint()->nContent.Assign( pTextNd, 0 ); - if( !pCrsr->IsSelOvr() ) - UpdateCrsr(SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE|SwCrsrShell::READONLY); + if( !pCursor->IsSelOvr() ) + UpdateCursor(SwCursorShell::SCROLLWIN|SwCursorShell::CHKRANGE|SwCursorShell::READONLY); } -bool SwCrsrShell::GotoOutline( const OUString& rName ) +bool SwCursorShell::GotoOutline( const OUString& rName ) { - SwCursor* pCrsr = getShellCrsr( true ); + SwCursor* pCursor = getShellCursor( true ); SET_CURR_SHELL( this ); - SwCallLink aLk( *this ); // watch Crsr-Moves - SwCrsrSaveState aSaveState( *pCrsr ); + SwCallLink aLk( *this ); // watch Cursor-Moves + SwCursorSaveState aSaveState( *pCursor ); bool bRet = false; - if( mpDoc->GotoOutline( *pCrsr->GetPoint(), rName ) && !pCrsr->IsSelOvr() ) + if( mpDoc->GotoOutline( *pCursor->GetPoint(), rName ) && !pCursor->IsSelOvr() ) { - UpdateCrsr(SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE|SwCrsrShell::READONLY); + UpdateCursor(SwCursorShell::SCROLLWIN|SwCursorShell::CHKRANGE|SwCursorShell::READONLY); bRet = true; } return bRet; } /// jump to next node with outline num. -bool SwCrsrShell::GotoNextOutline() +bool SwCursorShell::GotoNextOutline() { - SwCursor* pCrsr = getShellCrsr( true ); + SwCursor* pCursor = getShellCursor( true ); const SwNodes& rNds = GetDoc()->GetNodes(); - SwNode* pNd = &(pCrsr->GetNode()); + SwNode* pNd = &(pCursor->GetNode()); sal_uInt16 nPos; if( rNds.GetOutLineNds().Seek_Entry( pNd, &nPos )) ++nPos; @@ -961,24 +961,24 @@ bool SwCrsrShell::GotoNextOutline() pNd = rNds.GetOutLineNds()[ nPos ]; SET_CURR_SHELL( this ); - SwCallLink aLk( *this ); // watch Crsr-Moves - SwCrsrSaveState aSaveState( *pCrsr ); - pCrsr->GetPoint()->nNode = *pNd; - pCrsr->GetPoint()->nContent.Assign( pNd->GetTextNode(), 0 ); + SwCallLink aLk( *this ); // watch Cursor-Moves + SwCursorSaveState aSaveState( *pCursor ); + pCursor->GetPoint()->nNode = *pNd; + pCursor->GetPoint()->nContent.Assign( pNd->GetTextNode(), 0 ); - bool bRet = !pCrsr->IsSelOvr(); + bool bRet = !pCursor->IsSelOvr(); if( bRet ) - UpdateCrsr(SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE|SwCrsrShell::READONLY); + UpdateCursor(SwCursorShell::SCROLLWIN|SwCursorShell::CHKRANGE|SwCursorShell::READONLY); return bRet; } /// jump to previous node with outline num. -bool SwCrsrShell::GotoPrevOutline() +bool SwCursorShell::GotoPrevOutline() { - SwCursor* pCrsr = getShellCrsr( true ); + SwCursor* pCursor = getShellCursor( true ); const SwNodes& rNds = GetDoc()->GetNodes(); - SwNode* pNd = &(pCrsr->GetNode()); + SwNode* pNd = &(pCursor->GetNode()); sal_uInt16 nPos; bool bRet = rNds.GetOutLineNds().Seek_Entry(pNd, &nPos); if (bRet && nPos) @@ -986,29 +986,29 @@ bool SwCrsrShell::GotoPrevOutline() --nPos; // before pNd = rNds.GetOutLineNds()[ nPos ]; - if( pNd->GetIndex() > pCrsr->GetPoint()->nNode.GetIndex() ) + if( pNd->GetIndex() > pCursor->GetPoint()->nNode.GetIndex() ) return false; SET_CURR_SHELL( this ); - SwCallLink aLk( *this ); // watch Crsr-Moves - SwCrsrSaveState aSaveState( *pCrsr ); - pCrsr->GetPoint()->nNode = *pNd; - pCrsr->GetPoint()->nContent.Assign( pNd->GetTextNode(), 0 ); + SwCallLink aLk( *this ); // watch Cursor-Moves + SwCursorSaveState aSaveState( *pCursor ); + pCursor->GetPoint()->nNode = *pNd; + pCursor->GetPoint()->nContent.Assign( pNd->GetTextNode(), 0 ); - bRet = !pCrsr->IsSelOvr(); + bRet = !pCursor->IsSelOvr(); if( bRet ) - UpdateCrsr(SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE|SwCrsrShell::READONLY); + UpdateCursor(SwCursorShell::SCROLLWIN|SwCursorShell::CHKRANGE|SwCursorShell::READONLY); } return bRet; } /// search "outline position" before previous outline node at given level -sal_uInt16 SwCrsrShell::GetOutlinePos( sal_uInt8 nLevel ) +sal_uInt16 SwCursorShell::GetOutlinePos( sal_uInt8 nLevel ) { - SwPaM* pCrsr = getShellCrsr( true ); + SwPaM* pCursor = getShellCursor( true ); const SwNodes& rNds = GetDoc()->GetNodes(); - SwNode* pNd = &(pCrsr->GetNode()); + SwNode* pNd = &(pCursor->GetNode()); sal_uInt16 nPos; if( rNds.GetOutLineNds().Seek_Entry( pNd, &nPos )) nPos++; // is at correct position; take next for while @@ -1024,7 +1024,7 @@ sal_uInt16 SwCrsrShell::GetOutlinePos( sal_uInt8 nLevel ) return USHRT_MAX; // no more left } -bool SwCrsrShell::MakeOutlineSel( sal_uInt16 nSttPos, sal_uInt16 nEndPos, +bool SwCursorShell::MakeOutlineSel( sal_uInt16 nSttPos, sal_uInt16 nEndPos, bool bWithChildren ) { const SwNodes& rNds = GetDoc()->GetNodes(); @@ -1033,7 +1033,7 @@ bool SwCrsrShell::MakeOutlineSel( sal_uInt16 nSttPos, sal_uInt16 nEndPos, return false; SET_CURR_SHELL( this ); - SwCallLink aLk( *this ); // watch Crsr-Moves + SwCallLink aLk( *this ); // watch Cursor-Moves if( nSttPos > nEndPos ) // parameters switched? { @@ -1066,57 +1066,57 @@ bool SwCrsrShell::MakeOutlineSel( sal_uInt16 nSttPos, sal_uInt16 nEndPos, KillPams(); - SwCrsrSaveState aSaveState( *m_pCurCrsr ); + SwCursorSaveState aSaveState( *m_pCurrentCursor ); // set end to the end of the previous content node - m_pCurCrsr->GetPoint()->nNode = *pSttNd; - m_pCurCrsr->GetPoint()->nContent.Assign( pSttNd->GetContentNode(), 0 ); - m_pCurCrsr->SetMark(); - m_pCurCrsr->GetPoint()->nNode = *pEndNd; - m_pCurCrsr->Move( fnMoveBackward, fnGoNode ); // end of predecessor + m_pCurrentCursor->GetPoint()->nNode = *pSttNd; + m_pCurrentCursor->GetPoint()->nContent.Assign( pSttNd->GetContentNode(), 0 ); + m_pCurrentCursor->SetMark(); + m_pCurrentCursor->GetPoint()->nNode = *pEndNd; + m_pCurrentCursor->Move( fnMoveBackward, fnGoNode ); // end of predecessor // and everything is already selected - bool bRet = !m_pCurCrsr->IsSelOvr(); + bool bRet = !m_pCurrentCursor->IsSelOvr(); if( bRet ) - UpdateCrsr(SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE|SwCrsrShell::READONLY); + UpdateCursor(SwCursorShell::SCROLLWIN|SwCursorShell::CHKRANGE|SwCursorShell::READONLY); return bRet; } /// jump to reference marker -bool SwCrsrShell::GotoRefMark( const OUString& rRefMark, sal_uInt16 nSubType, +bool SwCursorShell::GotoRefMark( const OUString& rRefMark, sal_uInt16 nSubType, sal_uInt16 nSeqNo ) { SET_CURR_SHELL( this ); - SwCallLink aLk( *this ); // watch Crsr-Moves - SwCrsrSaveState aSaveState( *m_pCurCrsr ); + SwCallLink aLk( *this ); // watch Cursor-Moves + SwCursorSaveState aSaveState( *m_pCurrentCursor ); sal_Int32 nPos = -1; SwTextNode* pTextNd = SwGetRefFieldType::FindAnchor( GetDoc(), rRefMark, nSubType, nSeqNo, &nPos ); if( pTextNd && pTextNd->GetNodes().IsDocNodes() ) { - m_pCurCrsr->GetPoint()->nNode = *pTextNd; - m_pCurCrsr->GetPoint()->nContent.Assign( pTextNd, nPos ); + m_pCurrentCursor->GetPoint()->nNode = *pTextNd; + m_pCurrentCursor->GetPoint()->nContent.Assign( pTextNd, nPos ); - if( !m_pCurCrsr->IsSelOvr() ) + if( !m_pCurrentCursor->IsSelOvr() ) { - UpdateCrsr(SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE|SwCrsrShell::READONLY); + UpdateCursor(SwCursorShell::SCROLLWIN|SwCursorShell::CHKRANGE|SwCursorShell::READONLY); return true; } } return false; } -bool SwCrsrShell::IsPageAtPos( const Point &rPt ) const +bool SwCursorShell::IsPageAtPos( const Point &rPt ) const { if( GetLayout() ) return nullptr != GetLayout()->GetPageAtPos( rPt ); return false; } -bool SwCrsrShell::GetContentAtPos( const Point& rPt, +bool SwCursorShell::GetContentAtPos( const Point& rPt, SwContentAtPos& rContentAtPos, - bool bSetCrsr, + bool bSetCursor, SwRect* pFieldRect ) { SET_CURR_SHELL( this ); @@ -1125,12 +1125,12 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt, if( !IsTableMode() ) { Point aPt( rPt ); - SwPosition aPos( *m_pCurCrsr->GetPoint() ); + SwPosition aPos( *m_pCurrentCursor->GetPoint() ); SwTextNode* pTextNd; - SwContentFrm *pFrm(nullptr); + SwContentFrame *pFrame(nullptr); SwTextAttr* pTextAttr; - SwCrsrMoveState aTmpState; + SwCursorMoveState aTmpState; aTmpState.m_bFieldInfo = true; aTmpState.m_bExactOnly = !( SwContentAtPos::SW_OUTLINE & rContentAtPos.eContentAtPos ); aTmpState.m_bContentCheck = (SwContentAtPos::SW_CONTENT_CHECK & rContentAtPos.eContentAtPos) != 0; @@ -1140,7 +1140,7 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt, aTmpState.m_pSpecialPos = ( SwContentAtPos::SW_SMARTTAG & rContentAtPos.eContentAtPos ) ? &aSpecialPos : nullptr; - const bool bCrsrFoundExact = GetLayout()->GetCrsrOfst( &aPos, aPt, &aTmpState ); + const bool bCursorFoundExact = GetLayout()->GetCursorOfst( &aPos, aPt, &aTmpState ); pTextNd = aPos.nNode.GetNode().GetTextNode(); const SwNodes& rNds = GetDoc()->GetNodes(); @@ -1157,7 +1157,7 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt, } } else if ( SwContentAtPos::SW_CONTENT_CHECK & rContentAtPos.eContentAtPos - && bCrsrFoundExact ) + && bCursorFoundExact ) { bRet = true; } @@ -1171,7 +1171,7 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt, Size aSizePixel = GetWin()->LogicToPixel(aSizeLogic); rContentAtPos.nDist = aSizePixel.Width(); } - else if( bCrsrFoundExact && pTextNd ) + else if( bCursorFoundExact && pTextNd ) { if( !aTmpState.m_bPosCorr ) { @@ -1198,23 +1198,23 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt, else bRet = true; - if( bRet && bSetCrsr ) + if( bRet && bSetCursor ) { - SwCrsrSaveState aSaveState( *m_pCurCrsr ); - SwCallLink aLk( *this ); // watch Crsr-Moves - m_pCurCrsr->DeleteMark(); - *m_pCurCrsr->GetPoint() = aPos; - if( m_pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION | nsSwCursorSelOverFlags::SELOVER_TOGGLE) ) + SwCursorSaveState aSaveState( *m_pCurrentCursor ); + SwCallLink aLk( *this ); // watch Cursor-Moves + m_pCurrentCursor->DeleteMark(); + *m_pCurrentCursor->GetPoint() = aPos; + if( m_pCurrentCursor->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION | nsSwCursorSelOverFlags::SELOVER_TOGGLE) ) bRet = false; else - UpdateCrsr(); + UpdateCursor(); } if( bRet ) { rContentAtPos.eContentAtPos = SwContentAtPos::SW_SMARTTAG; - if( pFieldRect && nullptr != ( pFrm = pTextNd->getLayoutFrm( GetLayout(), &aPt ) ) ) - pFrm->GetCharRect( *pFieldRect, aPos, &aTmpState ); + if( pFieldRect && nullptr != ( pFrame = pTextNd->getLayoutFrame( GetLayout(), &aPt ) ) ) + pFrame->GetCharRect( *pFieldRect, aPos, &aTmpState ); } } } @@ -1235,16 +1235,16 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt, if ( pField ) { - if( pFieldRect && nullptr != ( pFrm = pTextNd->getLayoutFrm( GetLayout(), &aPt ) ) ) - pFrm->GetCharRect( *pFieldRect, aPos, &aTmpState ); + if( pFieldRect && nullptr != ( pFrame = pTextNd->getLayoutFrame( GetLayout(), &aPt ) ) ) + pFrame->GetCharRect( *pFieldRect, aPos, &aTmpState ); - if( bSetCrsr ) + if( bSetCursor ) { - SwCallLink aLk( *this ); // watch Crsr-Moves - SwCrsrSaveState aSaveState( *m_pCurCrsr ); - m_pCurCrsr->DeleteMark(); - *m_pCurCrsr->GetPoint() = aPos; - if( m_pCurCrsr->IsSelOvr() ) + SwCallLink aLk( *this ); // watch Cursor-Moves + SwCursorSaveState aSaveState( *m_pCurrentCursor ); + m_pCurrentCursor->DeleteMark(); + *m_pCurrentCursor->GetPoint() = aPos; + if( m_pCurrentCursor->IsSelOvr() ) { // allow click fields in protected sections // only placeholder is not possible @@ -1253,7 +1253,7 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt, pField = nullptr; } else - UpdateCrsr(); + UpdateCursor(); } else if( RES_TABLEFLD == pField->Which() && static_cast<const SwTableField*>(pField)->IsIntrnlName() ) @@ -1279,7 +1279,7 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt, { IDocumentMarkAccess* pMarksAccess = GetDoc()->getIDocumentMarkAccess( ); sw::mark::IFieldmark* pFieldBookmark = pMarksAccess->getFieldmarkFor( aPos ); - if( bCrsrFoundExact && pTextNd && pFieldBookmark) { + if( bCursorFoundExact && pTextNd && pFieldBookmark) { rContentAtPos.eContentAtPos = SwContentAtPos::SW_FORMCTRL; rContentAtPos.aFnd.pFieldmark = pFieldBookmark; bRet=true; @@ -1292,9 +1292,9 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt, { // over the footnote's char bRet = true; - if( bSetCrsr ) + if( bSetCursor ) { - *m_pCurCrsr->GetPoint() = aPos; + *m_pCurrentCursor->GetPoint() = aPos; if( !GotoFootnoteAnchor() ) bRet = false; } @@ -1305,23 +1305,23 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt, aPos.nContent.GetIndex(), RES_TXTATR_FTN )) ) { bRet = true; - if( bSetCrsr ) + if( bSetCursor ) { - SwCallLink aLk( *this ); // watch Crsr-Moves - SwCrsrSaveState aSaveState( *m_pCurCrsr ); - m_pCurCrsr->GetPoint()->nNode = *static_cast<SwTextFootnote*>(pTextAttr)->GetStartNode(); + SwCallLink aLk( *this ); // watch Cursor-Moves + SwCursorSaveState aSaveState( *m_pCurrentCursor ); + m_pCurrentCursor->GetPoint()->nNode = *static_cast<SwTextFootnote*>(pTextAttr)->GetStartNode(); SwContentNode* pCNd = GetDoc()->GetNodes().GoNextSection( - &m_pCurCrsr->GetPoint()->nNode, + &m_pCurrentCursor->GetPoint()->nNode, true, !IsReadOnlyAvailable() ); if( pCNd ) { - m_pCurCrsr->GetPoint()->nContent.Assign( pCNd, 0 ); - if( m_pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION | + m_pCurrentCursor->GetPoint()->nContent.Assign( pCNd, 0 ); + if( m_pCurrentCursor->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION | nsSwCursorSelOverFlags::SELOVER_TOGGLE )) bRet = false; else - UpdateCrsr(); + UpdateCursor(); } else bRet = false; @@ -1333,8 +1333,8 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt, rContentAtPos.pFndTextAttr = pTextAttr; rContentAtPos.aFnd.pAttr = &pTextAttr->GetAttr(); - if( pFieldRect && nullptr != ( pFrm = pTextNd->getLayoutFrm( GetLayout(), &aPt ) ) ) - pFrm->GetCharRect( *pFieldRect, aPos, &aTmpState ); + if( pFieldRect && nullptr != ( pFrame = pTextNd->getLayoutFrame( GetLayout(), &aPt ) ) ) + pFrame->GetCharRect( *pFieldRect, aPos, &aTmpState ); } } } @@ -1370,16 +1370,16 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt, if( pTextAttr ) { bRet = true; - if( bSetCrsr ) + if( bSetCursor ) { - SwCallLink aLk( *this ); // watch Crsr-Moves - SwCrsrSaveState aSaveState( *m_pCurCrsr ); - m_pCurCrsr->DeleteMark(); - *m_pCurCrsr->GetPoint() = aPos; - if( m_pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION | nsSwCursorSelOverFlags::SELOVER_TOGGLE ) ) + SwCallLink aLk( *this ); // watch Cursor-Moves + SwCursorSaveState aSaveState( *m_pCurrentCursor ); + m_pCurrentCursor->DeleteMark(); + *m_pCurrentCursor->GetPoint() = aPos; + if( m_pCurrentCursor->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION | nsSwCursorSelOverFlags::SELOVER_TOGGLE ) ) bRet = false; else - UpdateCrsr(); + UpdateCursor(); } if( bRet ) @@ -1399,8 +1399,8 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt, rContentAtPos.pFndTextAttr = pTextAttr; rContentAtPos.aFnd.pAttr = &pTextAttr->GetAttr(); - if( pFieldRect && nullptr != ( pFrm = pTextNd->getLayoutFrm( GetLayout(), &aPt ) ) ) - pFrm->GetCharRect( *pFieldRect, aPos, &aTmpState ); + if( pFieldRect && nullptr != ( pFrame = pTextNd->getLayoutFrame( GetLayout(), &aPt ) ) ) + pFrame->GetCharRect( *pFieldRect, aPos, &aTmpState ); } } } @@ -1415,17 +1415,17 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt, if( pTextAttr && !pTextAttr->GetINetFormat().GetValue().isEmpty() ) { bRet = true; - if( bSetCrsr ) + if( bSetCursor ) { - SwCrsrSaveState aSaveState( *m_pCurCrsr ); - SwCallLink aLk( *this ); // watch Crsr-Moves - m_pCurCrsr->DeleteMark(); - *m_pCurCrsr->GetPoint() = aPos; - if( m_pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION | + SwCursorSaveState aSaveState( *m_pCurrentCursor ); + SwCallLink aLk( *this ); // watch Cursor-Moves + m_pCurrentCursor->DeleteMark(); + *m_pCurrentCursor->GetPoint() = aPos; + if( m_pCurrentCursor->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION | nsSwCursorSelOverFlags::SELOVER_TOGGLE) ) bRet = false; else - UpdateCrsr(); + UpdateCursor(); } if( bRet ) { @@ -1437,8 +1437,8 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt, rContentAtPos.eContentAtPos = SwContentAtPos::SW_INETATTR; rContentAtPos.pFndTextAttr = pTextAttr; - if( pFieldRect && nullptr != ( pFrm = pTextNd->getLayoutFrm( GetLayout(), &aPt ) ) ) - pFrm->GetCharRect( *pFieldRect, aPos, &aTmpState ); + if( pFieldRect && nullptr != ( pFrame = pTextNd->getLayoutFrame( GetLayout(), &aPt ) ) ) + pFrame->GetCharRect( *pFieldRect, aPos, &aTmpState ); } } } @@ -1453,8 +1453,8 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt, rContentAtPos.pFndTextAttr = nullptr; bRet = true; - if( pFieldRect && nullptr != ( pFrm = pTextNd->getLayoutFrm( GetLayout(), &aPt ) ) ) - pFrm->GetCharRect( *pFieldRect, aPos, &aTmpState ); + if( pFieldRect && nullptr != ( pFrame = pTextNd->getLayoutFrame( GetLayout(), &aPt ) ) ) + pFrame->GetCharRect( *pFieldRect, aPos, &aTmpState ); } } } @@ -1484,22 +1484,22 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt, #endif ) { - SwFrm* pF = pTextNd->getLayoutFrm( GetLayout(), &aPt ); + SwFrame* pF = pTextNd->getLayoutFrame( GetLayout(), &aPt ); if( pF ) { // then the CellFrame - pFrm = static_cast<SwContentFrm*>(pF); - while( pF && !pF->IsCellFrm() ) + pFrame = static_cast<SwContentFrame*>(pF); + while( pF && !pF->IsCellFrame() ) pF = pF->GetUpper(); } if( aTmpState.m_bPosCorr ) { - if( pF && !pF->Frm().IsInside( aPt )) + if( pF && !pF->Frame().IsInside( aPt )) pF = nullptr; } else if( !pF ) - pF = pFrm; + pF = pFrame; if( pF ) // only then it is valid { @@ -1514,16 +1514,16 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt, const_cast<SwTableBoxFormula*>(static_cast<const SwTableBoxFormula*>(pItem))->PtrToBoxNm( &pTableNd->GetTable() ); bRet = true; - if( bSetCrsr ) + if( bSetCursor ) { - SwCallLink aLk( *this ); // watch Crsr-Moves - SwCrsrSaveState aSaveState( *m_pCurCrsr ); - *m_pCurCrsr->GetPoint() = aPos; - if( m_pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION | + SwCallLink aLk( *this ); // watch Cursor-Moves + SwCursorSaveState aSaveState( *m_pCurrentCursor ); + *m_pCurrentCursor->GetPoint() = aPos; + if( m_pCurrentCursor->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION | nsSwCursorSelOverFlags::SELOVER_TOGGLE) ) bRet = false; else - UpdateCrsr(); + UpdateCursor(); } if( bRet ) @@ -1531,7 +1531,7 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt, if( pFieldRect ) { *pFieldRect = pF->Prt(); - *pFieldRect += pF->Frm().Pos(); + *pFieldRect += pF->Frame().Pos(); } rContentAtPos.pFndTextAttr = nullptr; rContentAtPos.aFnd.pAttr = pItem; @@ -1633,13 +1633,13 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt, } // #i90516# -const SwPostItField* SwCrsrShell::GetPostItFieldAtCursor() const +const SwPostItField* SwCursorShell::GetPostItFieldAtCursor() const { const SwPostItField* pPostItField = nullptr; if ( !IsTableMode() ) { - const SwPosition* pCursorPos = _GetCrsr()->GetPoint(); + const SwPosition* pCursorPos = _GetCursor()->GetPoint(); const SwTextNode* pTextNd = pCursorPos->nNode.GetNode().GetTextNode(); if ( pTextNd ) { @@ -1681,10 +1681,10 @@ bool SwContentAtPos::IsInProtectSect() const } } - const SwContentFrm* pFrm; + const SwContentFrame* pFrame; return pNd && ( pNd->IsInProtectSect() || - ( nullptr != ( pFrm = pNd->getLayoutFrm( pNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, nullptr, false)) && - pFrm->IsProtected() )); + ( nullptr != ( pFrame = pNd->getLayoutFrame( pNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, nullptr, false)) && + pFrame->IsProtected() )); } bool SwContentAtPos::IsInRTLText()const @@ -1706,46 +1706,46 @@ bool SwContentAtPos::IsInRTLText()const } if(pNd) { - SwIterator<SwTextFrm,SwTextNode> aIter(*pNd); - SwTextFrm* pTmpFrm = aIter.First(); - while( pTmpFrm ) + SwIterator<SwTextFrame,SwTextNode> aIter(*pNd); + SwTextFrame* pTmpFrame = aIter.First(); + while( pTmpFrame ) { - if ( !pTmpFrm->IsFollow()) + if ( !pTmpFrame->IsFollow()) { - bRet = pTmpFrm->IsRightToLeft(); + bRet = pTmpFrame->IsRightToLeft(); break; } - pTmpFrm = aIter.Next(); + pTmpFrame = aIter.Next(); } } return bRet; } -bool SwCrsrShell::SelectText( const sal_Int32 nStart, +bool SwCursorShell::SelectText( const sal_Int32 nStart, const sal_Int32 nEnd ) { SET_CURR_SHELL( this ); bool bRet = false; SwCallLink aLk( *this ); - SwCrsrSaveState aSaveState( *m_pCurCrsr ); + SwCursorSaveState aSaveState( *m_pCurrentCursor ); - SwPosition& rPos = *m_pCurCrsr->GetPoint(); - m_pCurCrsr->DeleteMark(); + SwPosition& rPos = *m_pCurrentCursor->GetPoint(); + m_pCurrentCursor->DeleteMark(); rPos.nContent = nStart; - m_pCurCrsr->SetMark(); + m_pCurrentCursor->SetMark(); rPos.nContent = nEnd; - if( !m_pCurCrsr->IsSelOvr() ) + if( !m_pCurrentCursor->IsSelOvr() ) { - UpdateCrsr(); + UpdateCursor(); bRet = true; } return bRet; } -bool SwCrsrShell::SelectTextAttr( sal_uInt16 nWhich, +bool SwCursorShell::SelectTextAttr( sal_uInt16 nWhich, bool bExpand, const SwTextAttr* pTextAttr ) { @@ -1756,7 +1756,7 @@ bool SwCrsrShell::SelectTextAttr( sal_uInt16 nWhich, { if( !pTextAttr ) { - SwPosition& rPos = *m_pCurCrsr->GetPoint(); + SwPosition& rPos = *m_pCurrentCursor->GetPoint(); SwTextNode* pTextNd = rPos.nNode.GetNode().GetTextNode(); pTextAttr = (pTextNd) ? pTextNd->GetTextAttrAt(rPos.nContent.GetIndex(), @@ -1774,33 +1774,33 @@ bool SwCrsrShell::SelectTextAttr( sal_uInt16 nWhich, return bRet; } -bool SwCrsrShell::GotoINetAttr( const SwTextINetFormat& rAttr ) +bool SwCursorShell::GotoINetAttr( const SwTextINetFormat& rAttr ) { bool bRet = false; if( rAttr.GetpTextNode() ) { - SwCursor* pCrsr = getShellCrsr( true ); + SwCursor* pCursor = getShellCursor( true ); SET_CURR_SHELL( this ); - SwCallLink aLk( *this ); // watch Crsr-Moves - SwCrsrSaveState aSaveState( *pCrsr ); + SwCallLink aLk( *this ); // watch Cursor-Moves + SwCursorSaveState aSaveState( *pCursor ); - pCrsr->GetPoint()->nNode = *rAttr.GetpTextNode(); - pCrsr->GetPoint()->nContent.Assign( const_cast<SwTextNode*>(rAttr.GetpTextNode()), + pCursor->GetPoint()->nNode = *rAttr.GetpTextNode(); + pCursor->GetPoint()->nContent.Assign( const_cast<SwTextNode*>(rAttr.GetpTextNode()), rAttr.GetStart() ); - bRet = !pCrsr->IsSelOvr(); + bRet = !pCursor->IsSelOvr(); if( bRet ) - UpdateCrsr(SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE|SwCrsrShell::READONLY); + UpdateCursor(SwCursorShell::SCROLLWIN|SwCursorShell::CHKRANGE|SwCursorShell::READONLY); } return bRet; } -const SwFormatINetFormat* SwCrsrShell::FindINetAttr( const OUString& rName ) const +const SwFormatINetFormat* SwCursorShell::FindINetAttr( const OUString& rName ) const { return mpDoc->FindINetAttr( rName ); } -bool SwCrsrShell::GetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode, +bool SwCursorShell::GetShadowCursorPos( const Point& rPt, SwFillMode eFillMode, SwRect& rRect, sal_Int16& rOrient ) { @@ -1811,16 +1811,16 @@ bool SwCrsrShell::GetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode, && GetDoc()->GetIDocumentUndoRedo().DoesUndo()) { Point aPt( rPt ); - SwPosition aPos( *m_pCurCrsr->GetPoint() ); + SwPosition aPos( *m_pCurrentCursor->GetPoint() ); - SwFillCrsrPos aFPos( eFillMode ); - SwCrsrMoveState aTmpState( &aFPos ); + SwFillCursorPos aFPos( eFillMode ); + SwCursorMoveState aTmpState( &aFPos ); - if( GetLayout()->GetCrsrOfst( &aPos, aPt, &aTmpState ) && + if( GetLayout()->GetCursorOfst( &aPos, aPt, &aTmpState ) && !aPos.nNode.GetNode().IsProtect()) { // start position in protected section? - rRect = aFPos.aCrsr; + rRect = aFPos.aCursor; rOrient = aFPos.eOrient; bRet = true; } @@ -1828,7 +1828,7 @@ bool SwCrsrShell::GetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode, return bRet; } -bool SwCrsrShell::SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode ) +bool SwCursorShell::SetShadowCursorPos( const Point& rPt, SwFillMode eFillMode ) { SET_CURR_SHELL( this ); bool bRet = false; @@ -1837,14 +1837,14 @@ bool SwCrsrShell::SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode ) && GetDoc()->GetIDocumentUndoRedo().DoesUndo()) { Point aPt( rPt ); - SwPosition aPos( *m_pCurCrsr->GetPoint() ); + SwPosition aPos( *m_pCurrentCursor->GetPoint() ); - SwFillCrsrPos aFPos( eFillMode ); - SwCrsrMoveState aTmpState( &aFPos ); + SwFillCursorPos aFPos( eFillMode ); + SwCursorMoveState aTmpState( &aFPos ); - if( GetLayout()->GetCrsrOfst( &aPos, aPt, &aTmpState ) ) + if( GetLayout()->GetCursorOfst( &aPos, aPt, &aTmpState ) ) { - SwCallLink aLk( *this ); // watch Crsr-Moves + SwCallLink aLk( *this ); // watch Cursor-Moves StartAction(); SwContentNode* pCNd = aPos.nNode.GetNode().GetContentNode(); @@ -1884,18 +1884,18 @@ bool SwCrsrShell::SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode ) GetDoc()->getIDocumentContentOperations().AppendTextNode( aPos ); if( !n && pNextFormat ) { - *m_pCurCrsr->GetPoint() = aPos; - GetDoc()->SetTextFormatColl( *m_pCurCrsr, pNextFormat, false ); + *m_pCurrentCursor->GetPoint() = aPos; + GetDoc()->SetTextFormatColl( *m_pCurrentCursor, pNextFormat, false ); } if( n < aFPos.nColumnCnt ) { - *m_pCurCrsr->GetPoint() = aPos; - GetDoc()->getIDocumentContentOperations().InsertPoolItem( *m_pCurCrsr, + *m_pCurrentCursor->GetPoint() = aPos; + GetDoc()->getIDocumentContentOperations().InsertPoolItem( *m_pCurrentCursor, SvxFormatBreakItem( SVX_BREAK_COLUMN_BEFORE, RES_BREAK ) ); } } - *m_pCurCrsr->GetPoint() = aPos; + *m_pCurrentCursor->GetPoint() = aPos; switch( aFPos.eMode ) { case FILL_INDENT: @@ -1916,7 +1916,7 @@ bool SwCrsrShell::SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode ) if( SVX_ADJUST_LEFT != rAdj.GetAdjust() ) aSet.Put( SvxAdjustItem( SVX_ADJUST_LEFT, RES_PARATR_ADJUST ) ); - GetDoc()->getIDocumentContentOperations().InsertItemSet( *m_pCurCrsr, aSet ); + GetDoc()->getIDocumentContentOperations().InsertItemSet( *m_pCurrentCursor, aSet ); } else { OSL_ENSURE( false, "No ContentNode" ); @@ -1932,7 +1932,7 @@ bool SwCrsrShell::SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode ) if (aFPos.nSpaceCnt) comphelper::string::padToLength(sInsert, sInsert.getLength() + aFPos.nSpaceCnt, ' '); if (!sInsert.isEmpty()) - GetDoc()->getIDocumentContentOperations().InsertString( *m_pCurCrsr, sInsert.makeStringAndClear()); + GetDoc()->getIDocumentContentOperations().InsertString( *m_pCurrentCursor, sInsert.makeStringAndClear()); } // no break - still need to set orientation case FILL_MARGIN: @@ -1950,7 +1950,7 @@ bool SwCrsrShell::SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode ) default: break; } - GetDoc()->getIDocumentContentOperations().InsertPoolItem( *m_pCurCrsr, aAdj ); + GetDoc()->getIDocumentContentOperations().InsertPoolItem( *m_pCurrentCursor, aAdj ); } break; } @@ -1964,84 +1964,84 @@ bool SwCrsrShell::SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode ) return bRet; } -const SwRangeRedline* SwCrsrShell::SelNextRedline() +const SwRangeRedline* SwCursorShell::SelNextRedline() { const SwRangeRedline* pFnd = nullptr; if( !IsTableMode() ) { SET_CURR_SHELL( this ); - SwCallLink aLk( *this ); // watch Crsr-Moves - SwCrsrSaveState aSaveState( *m_pCurCrsr ); + SwCallLink aLk( *this ); // watch Cursor-Moves + SwCursorSaveState aSaveState( *m_pCurrentCursor ); - pFnd = GetDoc()->getIDocumentRedlineAccess().SelNextRedline( *m_pCurCrsr ); - if( pFnd && !m_pCurCrsr->IsInProtectTable() && !m_pCurCrsr->IsSelOvr() ) - UpdateCrsr( SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE|SwCrsrShell::READONLY); + pFnd = GetDoc()->getIDocumentRedlineAccess().SelNextRedline( *m_pCurrentCursor ); + if( pFnd && !m_pCurrentCursor->IsInProtectTable() && !m_pCurrentCursor->IsSelOvr() ) + UpdateCursor( SwCursorShell::SCROLLWIN|SwCursorShell::CHKRANGE|SwCursorShell::READONLY); else pFnd = nullptr; } return pFnd; } -const SwRangeRedline* SwCrsrShell::SelPrevRedline() +const SwRangeRedline* SwCursorShell::SelPrevRedline() { const SwRangeRedline* pFnd = nullptr; if( !IsTableMode() ) { SET_CURR_SHELL( this ); - SwCallLink aLk( *this ); // watch Crsr-Moves - SwCrsrSaveState aSaveState( *m_pCurCrsr ); + SwCallLink aLk( *this ); // watch Cursor-Moves + SwCursorSaveState aSaveState( *m_pCurrentCursor ); - pFnd = GetDoc()->getIDocumentRedlineAccess().SelPrevRedline( *m_pCurCrsr ); - if( pFnd && !m_pCurCrsr->IsInProtectTable() && !m_pCurCrsr->IsSelOvr() ) - UpdateCrsr( SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE|SwCrsrShell::READONLY); + pFnd = GetDoc()->getIDocumentRedlineAccess().SelPrevRedline( *m_pCurrentCursor ); + if( pFnd && !m_pCurrentCursor->IsInProtectTable() && !m_pCurrentCursor->IsSelOvr() ) + UpdateCursor( SwCursorShell::SCROLLWIN|SwCursorShell::CHKRANGE|SwCursorShell::READONLY); else pFnd = nullptr; } return pFnd; } -const SwRangeRedline* SwCrsrShell::_GotoRedline( sal_uInt16 nArrPos, bool bSelect ) +const SwRangeRedline* SwCursorShell::_GotoRedline( sal_uInt16 nArrPos, bool bSelect ) { const SwRangeRedline* pFnd = nullptr; - SwCallLink aLk( *this ); // watch Crsr-Moves - SwCrsrSaveState aSaveState( *m_pCurCrsr ); + SwCallLink aLk( *this ); // watch Cursor-Moves + SwCursorSaveState aSaveState( *m_pCurrentCursor ); pFnd = GetDoc()->getIDocumentRedlineAccess().GetRedlineTable()[ nArrPos ]; if( pFnd ) { - *m_pCurCrsr->GetPoint() = *pFnd->Start(); + *m_pCurrentCursor->GetPoint() = *pFnd->Start(); SwContentNode* pCNd; - SwNodeIndex* pIdx = &m_pCurCrsr->GetPoint()->nNode; + SwNodeIndex* pIdx = &m_pCurrentCursor->GetPoint()->nNode; if( !pIdx->GetNode().IsContentNode() && nullptr != ( pCNd = GetDoc()->GetNodes().GoNextSection( pIdx, true, IsReadOnlyAvailable() )) ) { if( *pIdx <= pFnd->End()->nNode ) - m_pCurCrsr->GetPoint()->nContent.Assign( pCNd, 0 ); + m_pCurrentCursor->GetPoint()->nContent.Assign( pCNd, 0 ); else pFnd = nullptr; } if( pFnd && bSelect ) { - m_pCurCrsr->SetMark(); + m_pCurrentCursor->SetMark(); if( nsRedlineType_t::REDLINE_FMTCOLL == pFnd->GetType() ) { pCNd = pIdx->GetNode().GetContentNode(); - m_pCurCrsr->GetPoint()->nContent.Assign( pCNd, pCNd->Len() ); - m_pCurCrsr->GetMark()->nContent.Assign( pCNd, 0 ); + m_pCurrentCursor->GetPoint()->nContent.Assign( pCNd, pCNd->Len() ); + m_pCurrentCursor->GetMark()->nContent.Assign( pCNd, 0 ); } else - *m_pCurCrsr->GetPoint() = *pFnd->End(); + *m_pCurrentCursor->GetPoint() = *pFnd->End(); - pIdx = &m_pCurCrsr->GetPoint()->nNode; + pIdx = &m_pCurrentCursor->GetPoint()->nNode; if( !pIdx->GetNode().IsContentNode() && nullptr != ( pCNd = SwNodes::GoPrevSection( pIdx, true, IsReadOnlyAvailable() )) ) { - if( *pIdx >= m_pCurCrsr->GetMark()->nNode ) - m_pCurCrsr->GetPoint()->nContent.Assign( pCNd, pCNd->Len() ); + if( *pIdx >= m_pCurrentCursor->GetMark()->nNode ) + m_pCurrentCursor->GetPoint()->nContent.Assign( pCNd, pCNd->Len() ); else pFnd = nullptr; } @@ -2049,26 +2049,26 @@ const SwRangeRedline* SwCrsrShell::_GotoRedline( sal_uInt16 nArrPos, bool bSelec if( !pFnd ) { - m_pCurCrsr->DeleteMark(); - m_pCurCrsr->RestoreSavePos(); + m_pCurrentCursor->DeleteMark(); + m_pCurrentCursor->RestoreSavePos(); } - else if( bSelect && *m_pCurCrsr->GetMark() == *m_pCurCrsr->GetPoint() ) - m_pCurCrsr->DeleteMark(); + else if( bSelect && *m_pCurrentCursor->GetMark() == *m_pCurrentCursor->GetPoint() ) + m_pCurrentCursor->DeleteMark(); - if( pFnd && !m_pCurCrsr->IsInProtectTable() && !m_pCurCrsr->IsSelOvr() ) - UpdateCrsr( SwCrsrShell::SCROLLWIN | SwCrsrShell::CHKRANGE - | SwCrsrShell::READONLY ); + if( pFnd && !m_pCurrentCursor->IsInProtectTable() && !m_pCurrentCursor->IsSelOvr() ) + UpdateCursor( SwCursorShell::SCROLLWIN | SwCursorShell::CHKRANGE + | SwCursorShell::READONLY ); else { pFnd = nullptr; if( bSelect ) - m_pCurCrsr->DeleteMark(); + m_pCurrentCursor->DeleteMark(); } } return pFnd; } -const SwRangeRedline* SwCrsrShell::GotoRedline( sal_uInt16 nArrPos, bool bSelect ) +const SwRangeRedline* SwCursorShell::GotoRedline( sal_uInt16 nArrPos, bool bSelect ) { const SwRangeRedline* pFnd = nullptr; if( !IsTableMode() ) @@ -2094,7 +2094,7 @@ const SwRangeRedline* SwCrsrShell::GotoRedline( sal_uInt16 nArrPos, bool bSelect { // Check for overlaps. These can happen when FormatColl- // Redlines were stretched over a whole paragraph - SwPaM* pCur = m_pCurCrsr; + SwPaM* pCur = m_pCurrentCursor; SwPaM* pNextPam = pCur->GetNext(); SwPosition* pCStt = pCur->Start(), *pCEnd = pCur->End(); while( pCur != pNextPam ) @@ -2161,7 +2161,7 @@ const SwRangeRedline* SwCrsrShell::GotoRedline( sal_uInt16 nArrPos, bool bSelect if( pTmp ) { // create new cursor - CreateCrsr(); + CreateCursor(); bCheck = true; } nArrPos = nFndPos; @@ -2177,7 +2177,7 @@ const SwRangeRedline* SwCrsrShell::GotoRedline( sal_uInt16 nArrPos, bool bSelect return pFnd; } -bool SwCrsrShell::SelectNxtPrvHyperlink( bool bNext ) +bool SwCursorShell::SelectNxtPrvHyperlink( bool bNext ) { SwNodes& rNds = GetDoc()->GetNodes(); const SwNode* pBodyEndNd = &rNds.GetEndOfContent(); @@ -2186,13 +2186,13 @@ bool SwCrsrShell::SelectNxtPrvHyperlink( bool bNext ) Point aPt; _SetGetExpField aCmpPos( SwPosition( bNext ? *pBodyEndNd : *pBodySttNd ) ); - _SetGetExpField aCurPos( bNext ? *m_pCurCrsr->End() : *m_pCurCrsr->Start() ); + _SetGetExpField aCurPos( bNext ? *m_pCurrentCursor->End() : *m_pCurrentCursor->Start() ); if( aCurPos.GetNode() < nBodySttNdIdx ) { const SwContentNode* pCNd = aCurPos.GetNodeFromContent()->GetContentNode(); - SwContentFrm* pFrm; - if( pCNd && nullptr != ( pFrm = pCNd->getLayoutFrm( GetLayout(), &aPt )) ) - aCurPos.SetBodyPos( *pFrm ); + SwContentFrame* pFrame; + if( pCNd && nullptr != ( pFrame = pCNd->getLayoutFrame( GetLayout(), &aPt )) ) + aCurPos.SetBodyPos( *pFrame ); } // check first all the hyperlink fields @@ -2210,10 +2210,10 @@ bool SwCrsrShell::SelectNxtPrvHyperlink( bool bNext ) SwTextINetFormat& rAttr = *pFnd; SwPosition aTmpPos( *pTextNd ); _SetGetExpField aPos( aTmpPos.nNode, rAttr ); - SwContentFrm* pFrm; + SwContentFrame* pFrame; if( pTextNd->GetIndex() < nBodySttNdIdx && - nullptr != ( pFrm = pTextNd->getLayoutFrm( GetLayout(), &aPt )) ) - aPos.SetBodyPos( *pFrm ); + nullptr != ( pFrame = pTextNd->getLayoutFrame( GetLayout(), &aPt )) ) + aPos.SetBodyPos( *pFrame ); if( bNext ? ( aPos < aCmpPos && aCurPos < aPos ) @@ -2241,7 +2241,7 @@ bool SwCrsrShell::SelectNxtPrvHyperlink( bool bNext ) const SwFormatURL& rURLItem = pFormat->GetURL(); if( rURLItem.GetMap() || !rURLItem.GetURL().isEmpty() ) { - SwFlyFrm* pFly = pFormat->GetFrm( &aPt ); + SwFlyFrame* pFly = pFormat->GetFrame( &aPt ); SwPosition aTmpPos( *pBodySttNd ); if( pFly && GetBodyTextNode( *GetDoc(), aTmpPos, *pFly->GetLower() ) ) @@ -2269,17 +2269,17 @@ bool SwCrsrShell::SelectNxtPrvHyperlink( bool bNext ) // found a text attribute ? if( pFndAttr ) { - SwCrsrSaveState aSaveState( *m_pCurCrsr ); + SwCursorSaveState aSaveState( *m_pCurrentCursor ); - aCmpPos.GetPosOfContent( *m_pCurCrsr->GetPoint() ); - m_pCurCrsr->DeleteMark(); - m_pCurCrsr->SetMark(); - m_pCurCrsr->GetPoint()->nContent = *pFndAttr->End(); + aCmpPos.GetPosOfContent( *m_pCurrentCursor->GetPoint() ); + m_pCurrentCursor->DeleteMark(); + m_pCurrentCursor->SetMark(); + m_pCurrentCursor->GetPoint()->nContent = *pFndAttr->End(); - if( !m_pCurCrsr->IsInProtectTable() && !m_pCurCrsr->IsSelOvr() ) + if( !m_pCurrentCursor->IsInProtectTable() && !m_pCurrentCursor->IsSelOvr() ) { - UpdateCrsr( SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE| - SwCrsrShell::READONLY ); + UpdateCursor( SwCursorShell::SCROLLWIN|SwCursorShell::CHKRANGE| + SwCursorShell::READONLY ); bRet = true; } } @@ -2296,10 +2296,10 @@ bool SwCrsrShell::SelectNxtPrvHyperlink( bool bNext ) } else // then is it a fly { - SwFlyFrm* pFly = pFndFormat->GetFrm(&aPt); + SwFlyFrame* pFly = pFndFormat->GetFrame(&aPt); if( pFly ) { - static_cast<SwFEShell*>(this)->SelectFlyFrm( *pFly, true ); + static_cast<SwFEShell*>(this)->SelectFlyFrame( *pFly, true ); MakeSelVisible(); bRet = true; } diff --git a/sw/source/core/crsr/crstrvl1.cxx b/sw/source/core/crsr/crstrvl1.cxx index 699302a7e4e1..1ac7374d12db 100644 --- a/sw/source/core/crsr/crstrvl1.cxx +++ b/sw/source/core/crsr/crstrvl1.cxx @@ -21,69 +21,69 @@ #include <viscrs.hxx> #include <callnk.hxx> -bool SwCrsrShell::IsStartWord( sal_Int16 nWordType ) const +bool SwCursorShell::IsStartWord( sal_Int16 nWordType ) const { - return m_pCurCrsr->IsStartWord( nWordType ); + return m_pCurrentCursor->IsStartWord( nWordType ); } -bool SwCrsrShell::IsEndWord( sal_Int16 nWordType ) const +bool SwCursorShell::IsEndWord( sal_Int16 nWordType ) const { - return m_pCurCrsr->IsEndWord( nWordType ); + return m_pCurrentCursor->IsEndWord( nWordType ); } -bool SwCrsrShell::IsInWord( sal_Int16 nWordType ) const +bool SwCursorShell::IsInWord( sal_Int16 nWordType ) const { - return m_pCurCrsr->IsInWord( nWordType ); + return m_pCurrentCursor->IsInWord( nWordType ); } -bool SwCrsrShell::IsStartSentence() const +bool SwCursorShell::IsStartSentence() const { - return m_pCurCrsr->IsStartEndSentence( false ); + return m_pCurrentCursor->IsStartEndSentence( false ); } -bool SwCrsrShell::IsEndSentence() const +bool SwCursorShell::IsEndSentence() const { - return m_pCurCrsr->IsStartEndSentence( true ); + return m_pCurrentCursor->IsStartEndSentence( true ); } -bool SwCrsrShell::GoStartWord() +bool SwCursorShell::GoStartWord() { - return CallCrsrFN( &SwCursor::GoStartWord ); + return CallCursorFN( &SwCursor::GoStartWord ); } -bool SwCrsrShell::GoEndWord() +bool SwCursorShell::GoEndWord() { - return CallCrsrFN( &SwCursor::GoEndWord ); + return CallCursorFN( &SwCursor::GoEndWord ); } -bool SwCrsrShell::GoNextWord() +bool SwCursorShell::GoNextWord() { - return CallCrsrFN( &SwCursor::GoNextWord ); + return CallCursorFN( &SwCursor::GoNextWord ); } -bool SwCrsrShell::GoPrevWord() +bool SwCursorShell::GoPrevWord() { - return CallCrsrFN( &SwCursor::GoPrevWord ); + return CallCursorFN( &SwCursor::GoPrevWord ); } -bool SwCrsrShell::GoNextSentence() +bool SwCursorShell::GoNextSentence() { - return CallCrsrFN( &SwCursor::GoNextSentence ); + return CallCursorFN( &SwCursor::GoNextSentence ); } -bool SwCrsrShell::GoEndSentence() +bool SwCursorShell::GoEndSentence() { - return CallCrsrFN( &SwCursor::GoEndSentence ); + return CallCursorFN( &SwCursor::GoEndSentence ); } -bool SwCrsrShell::GoStartSentence() +bool SwCursorShell::GoStartSentence() { - return CallCrsrFN( &SwCursor::GoStartSentence ); + return CallCursorFN( &SwCursor::GoStartSentence ); } -bool SwCrsrShell::SelectWord( const Point* pPt ) +bool SwCursorShell::SelectWord( const Point* pPt ) { - return m_pCurCrsr->SelectWord( this, pPt ); + return m_pCurrentCursor->SelectWord( this, pPt ); } -bool SwCrsrShell::ExpandToSentenceBorders() +bool SwCursorShell::ExpandToSentenceBorders() { - return m_pCurCrsr->ExpandToSentenceBorders(); + return m_pCurrentCursor->ExpandToSentenceBorders(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx index 24c66d454b4e..3cbd168b35ff 100644 --- a/sw/source/core/crsr/findattr.cxx +++ b/sw/source/core/crsr/findattr.cxx @@ -1062,9 +1062,9 @@ struct SwFindParaAttr : public SwFindParas SwFindParaAttr( const SfxItemSet& rSet, bool bNoCollection, const SearchOptions* pOpt, const SfxItemSet* pRSet, - SwCursor& rCrsr ) + SwCursor& rCursor ) : bValue( bNoCollection ), pSet( &rSet ), pReplSet( pRSet ), - pSearchOpt( pOpt ), m_rCursor( rCrsr ),pSText( nullptr ) {} + pSearchOpt( pOpt ), m_rCursor( rCursor ),pSText( nullptr ) {} virtual ~SwFindParaAttr() { delete pSText; } @@ -1072,7 +1072,7 @@ struct SwFindParaAttr : public SwFindParas virtual bool IsReplaceMode() const override; }; -int SwFindParaAttr::Find( SwPaM* pCrsr, SwMoveFn fnMove, const SwPaM* pRegion, +int SwFindParaAttr::Find( SwPaM* pCursor, SwMoveFn fnMove, const SwPaM* pRegion, bool bInReadOnly ) { // replace string (only if text given and search is not parameterized)? @@ -1087,7 +1087,7 @@ int SwFindParaAttr::Find( SwPaM* pCrsr, SwMoveFn fnMove, const SwPaM* pRegion, { SwPaM aRegion( *pRegion->GetMark(), *pRegion->GetPoint() ); SwPaM* pTextRegion = &aRegion; - SwPaM aSrchPam( *pCrsr->GetPoint() ); + SwPaM aSrchPam( *pCursor->GetPoint() ); while( true ) { @@ -1133,16 +1133,16 @@ int SwFindParaAttr::Find( SwPaM* pCrsr, SwMoveFn fnMove, const SwPaM* pRegion, *aRegion.GetMark() = *aSrchPam.GetPoint(); } - *pCrsr->GetPoint() = *aSrchPam.GetPoint(); - pCrsr->SetMark(); - *pCrsr->GetMark() = *aSrchPam.GetMark(); + *pCursor->GetPoint() = *aSrchPam.GetPoint(); + pCursor->SetMark(); + *pCursor->GetMark() = *aSrchPam.GetMark(); } if( bReplaceText ) { const bool bRegExp( SearchAlgorithms_REGEXP == pSearchOpt->algorithmType); - SwIndex& rSttCntIdx = pCrsr->Start()->nContent; + SwIndex& rSttCntIdx = pCursor->Start()->nContent; const sal_Int32 nSttCnt = rSttCntIdx.GetIndex(); // add to shell-cursor-ring so that the regions will be moved eventually @@ -1154,11 +1154,11 @@ int SwFindParaAttr::Find( SwPaM* pCrsr, SwMoveFn fnMove, const SwPaM* pRegion, } std::unique_ptr<OUString> pRepl( (bRegExp) ? - ReplaceBackReferences( *pSearchOpt, pCrsr ) : nullptr ); - m_rCursor.GetDoc()->getIDocumentContentOperations().ReplaceRange( *pCrsr, + ReplaceBackReferences( *pSearchOpt, pCursor ) : nullptr ); + m_rCursor.GetDoc()->getIDocumentContentOperations().ReplaceRange( *pCursor, (pRepl.get()) ? *pRepl : pSearchOpt->replaceString, bRegExp ); - m_rCursor.SaveTableBoxContent( pCrsr->GetPoint() ); + m_rCursor.SaveTableBoxContent( pCursor->GetPoint() ); if( bRegExp ) { @@ -1181,7 +1181,7 @@ int SwFindParaAttr::Find( SwPaM* pCrsr, SwMoveFn fnMove, const SwPaM* pRegion, // they are not in ReplaceSet if( !pSet->Count() ) { - pCrsr->GetDoc()->getIDocumentContentOperations().InsertItemSet( *pCrsr, *pReplSet ); + pCursor->GetDoc()->getIDocumentContentOperations().InsertItemSet( *pCursor, *pReplSet ); } else { @@ -1202,7 +1202,7 @@ int SwFindParaAttr::Find( SwPaM* pCrsr, SwMoveFn fnMove, const SwPaM* pRegion, pItem = aIter.NextItem(); } aSet.Put( *pReplSet ); - pCrsr->GetDoc()->getIDocumentContentOperations().InsertItemSet( *pCrsr, aSet ); + pCursor->GetDoc()->getIDocumentContentOperations().InsertItemSet( *pCursor, aSet ); } return FIND_NO_RING; diff --git a/sw/source/core/crsr/findcoll.cxx b/sw/source/core/crsr/findcoll.cxx index dea31786b436..0be773e139b6 100644 --- a/sw/source/core/crsr/findcoll.cxx +++ b/sw/source/core/crsr/findcoll.cxx @@ -39,18 +39,18 @@ struct SwFindParaFormatColl : public SwFindParas virtual bool IsReplaceMode() const override; }; -int SwFindParaFormatColl::Find( SwPaM* pCrsr, SwMoveFn fnMove, const SwPaM* pRegion, +int SwFindParaFormatColl::Find( SwPaM* pCursor, SwMoveFn fnMove, const SwPaM* pRegion, bool bInReadOnly ) { int nRet = FIND_FOUND; if( bInReadOnly && pReplColl ) bInReadOnly = false; - if( !pCrsr->Find( *pFormatColl, fnMove, pRegion, bInReadOnly ) ) + if( !pCursor->Find( *pFormatColl, fnMove, pRegion, bInReadOnly ) ) nRet = FIND_NOT_FOUND; else if( pReplColl ) { - pCrsr->GetDoc()->SetTextFormatColl( *pCrsr, const_cast<SwTextFormatColl*>(pReplColl) ); + pCursor->GetDoc()->SetTextFormatColl( *pCursor, const_cast<SwTextFormatColl*>(pReplColl) ); nRet = FIND_NO_RING; } return nRet; diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx index 9bd8ca174cbf..abd3763b47e6 100644 --- a/sw/source/core/crsr/findtxt.cxx +++ b/sw/source/core/crsr/findtxt.cxx @@ -634,8 +634,8 @@ struct SwFindParaText : public SwFindParas bool m_bReplace; bool m_bSearchInNotes; - SwFindParaText( const SearchOptions& rOpt, bool bSearchInNotes, bool bRepl, SwCursor& rCrsr ) - : m_rSearchOpt( rOpt ), m_rCursor( rCrsr ), m_aSText( rOpt ), m_bReplace( bRepl ), m_bSearchInNotes( bSearchInNotes ) + SwFindParaText( const SearchOptions& rOpt, bool bSearchInNotes, bool bRepl, SwCursor& rCursor ) + : m_rSearchOpt( rOpt ), m_rCursor( rCursor ), m_aSText( rOpt ), m_bReplace( bRepl ), m_bSearchInNotes( bSearchInNotes ) {} virtual int Find( SwPaM* , SwMoveFn , const SwPaM*, bool bInReadOnly ) override; virtual bool IsReplaceMode() const override; @@ -646,19 +646,19 @@ SwFindParaText::~SwFindParaText() { } -int SwFindParaText::Find( SwPaM* pCrsr, SwMoveFn fnMove, +int SwFindParaText::Find( SwPaM* pCursor, SwMoveFn fnMove, const SwPaM* pRegion, bool bInReadOnly ) { if( bInReadOnly && m_bReplace ) bInReadOnly = false; - const bool bFnd = pCrsr->Find( m_rSearchOpt, m_bSearchInNotes, m_aSText, fnMove, pRegion, bInReadOnly ); + const bool bFnd = pCursor->Find( m_rSearchOpt, m_bSearchInNotes, m_aSText, fnMove, pRegion, bInReadOnly ); if( bFnd && m_bReplace ) // replace string { // use replace method in SwDoc const bool bRegExp(SearchAlgorithms_REGEXP == m_rSearchOpt.algorithmType); - SwIndex& rSttCntIdx = pCrsr->Start()->nContent; + SwIndex& rSttCntIdx = pCursor->Start()->nContent; const sal_Int32 nSttCnt = rSttCntIdx.GetIndex(); // add to shell-cursor-ring so that the regions will be moved eventually SwPaM* pPrev(nullptr); @@ -669,13 +669,13 @@ int SwFindParaText::Find( SwPaM* pCrsr, SwMoveFn fnMove, } std::unique_ptr<OUString> pRepl( (bRegExp) - ? ReplaceBackReferences( m_rSearchOpt, pCrsr ) : nullptr ); + ? ReplaceBackReferences( m_rSearchOpt, pCursor ) : nullptr ); bool const bReplaced = m_rCursor.GetDoc()->getIDocumentContentOperations().ReplaceRange( - *pCrsr, + *pCursor, (pRepl.get()) ? *pRepl : m_rSearchOpt.replaceString, bRegExp ); - m_rCursor.SaveTableBoxContent( pCrsr->GetPoint() ); + m_rCursor.SaveTableBoxContent( pCursor->GetPoint() ); if( bRegExp ) { @@ -691,12 +691,12 @@ int SwFindParaText::Find( SwPaM* pCrsr, SwMoveFn fnMove, if (bRegExp && !bReplaced) { // fdo#80715 avoid infinite loop if join failed bool bRet = ((fnMoveForward == fnMove) ? &GoNextPara : &GoPrevPara) - (*pCrsr, fnMove); + (*pCursor, fnMove); (void) bRet; assert(bRet); // if join failed, next node must be SwTextNode } else - pCrsr->Start()->nContent = nSttCnt; + pCursor->Start()->nContent = nSttCnt; return FIND_NO_RING; } return bFnd ? FIND_FOUND : FIND_NOT_FOUND; diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx index 3a0bb284f63e..65b347c6be11 100644 --- a/sw/source/core/crsr/pam.cxx +++ b/sw/source/core/crsr/pam.cxx @@ -543,38 +543,38 @@ SwPaM & SwPaM::Normalize(bool bPointFirst) /// return page number at cursor (for reader and page bound frames) sal_uInt16 SwPaM::GetPageNum( bool bAtPoint, const Point* pLayPos ) { - const SwContentFrm* pCFrm; - const SwPageFrm *pPg; + const SwContentFrame* pCFrame; + const SwPageFrame *pPg; const SwContentNode *pNd ; const SwPosition* pPos = bAtPoint ? m_pPoint : m_pMark; if( nullptr != ( pNd = pPos->nNode.GetNode().GetContentNode() ) && - nullptr != ( pCFrm = pNd->getLayoutFrm( pNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), pLayPos, pPos, false )) && - nullptr != ( pPg = pCFrm->FindPageFrm() )) + nullptr != ( pCFrame = pNd->getLayoutFrame( pNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), pLayPos, pPos, false )) && + nullptr != ( pPg = pCFrame->FindPageFrame() )) return pPg->GetPhyPageNum(); return 0; } -// Formular view - See also SwCrsrShell::IsCrsrReadonly() -static const SwFrm* lcl_FindEditInReadonlyFrm( const SwFrm& rFrm ) +// Formular view - See also SwCursorShell::IsCursorReadonly() +static const SwFrame* lcl_FindEditInReadonlyFrame( const SwFrame& rFrame ) { - const SwFrm* pRet = nullptr; + const SwFrame* pRet = nullptr; - const SwFlyFrm* pFly; - const SwSectionFrm* pSectionFrm; + const SwFlyFrame* pFly; + const SwSectionFrame* pSectionFrame; - if( rFrm.IsInFly() && - (pFly = rFrm.FindFlyFrm())->GetFormat()->GetEditInReadonly().GetValue() && + if( rFrame.IsInFly() && + (pFly = rFrame.FindFlyFrame())->GetFormat()->GetEditInReadonly().GetValue() && pFly->Lower() && - !pFly->Lower()->IsNoTextFrm() ) + !pFly->Lower()->IsNoTextFrame() ) { pRet = pFly; } - else if ( rFrm.IsInSct() && - nullptr != ( pSectionFrm = rFrm.FindSctFrm() )->GetSection() && - pSectionFrm->GetSection()->IsEditInReadonlyFlag() ) + else if ( rFrame.IsInSct() && + nullptr != ( pSectionFrame = rFrame.FindSctFrame() )->GetSection() && + pSectionFrame->GetSection()->IsEditInReadonlyFlag() ) { - pRet = pSectionFrm; + pRet = pSectionFrame; } return pRet; @@ -586,19 +586,19 @@ bool SwPaM::HasReadonlySel( bool bFormView, bool bAnnotationMode ) const bool bRet = false; const SwContentNode* pNd = GetPoint()->nNode.GetNode().GetContentNode(); - const SwContentFrm *pFrm = nullptr; + const SwContentFrame *pFrame = nullptr; if ( pNd != nullptr ) { Point aTmpPt; - pFrm = pNd->getLayoutFrm( pNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aTmpPt, GetPoint(), false ); + pFrame = pNd->getLayoutFrame( pNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aTmpPt, GetPoint(), false ); } // Will be set if point are inside edit-in-readonly environment - const SwFrm* pPointEditInReadonlyFrm = nullptr; - if ( pFrm != nullptr - && ( pFrm->IsProtected() + const SwFrame* pPointEditInReadonlyFrame = nullptr; + if ( pFrame != nullptr + && ( pFrame->IsProtected() || ( bFormView - && nullptr == ( pPointEditInReadonlyFrm = lcl_FindEditInReadonlyFrm( *pFrm ) ) ) ) ) + && nullptr == ( pPointEditInReadonlyFrame = lcl_FindEditInReadonlyFrame( *pFrame ) ) ) ) ) { bRet = true; } @@ -619,18 +619,18 @@ bool SwPaM::HasReadonlySel( bool bFormView, bool bAnnotationMode ) const && GetPoint()->nNode != GetMark()->nNode ) { pNd = GetMark()->nNode.GetNode().GetContentNode(); - pFrm = nullptr; + pFrame = nullptr; if ( pNd != nullptr ) { Point aTmpPt; - pFrm = pNd->getLayoutFrm( pNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aTmpPt, GetMark(), false ); + pFrame = pNd->getLayoutFrame( pNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aTmpPt, GetMark(), false ); } - const SwFrm* pMarkEditInReadonlyFrm = nullptr; - if ( pFrm != nullptr - && ( pFrm->IsProtected() + const SwFrame* pMarkEditInReadonlyFrame = nullptr; + if ( pFrame != nullptr + && ( pFrame->IsProtected() || ( bFormView - && nullptr == ( pMarkEditInReadonlyFrm = lcl_FindEditInReadonlyFrm( *pFrm ) ) ) ) ) + && nullptr == ( pMarkEditInReadonlyFrame = lcl_FindEditInReadonlyFrame( *pFrame ) ) ) ) ) { bRet = true; } @@ -650,7 +650,7 @@ bool SwPaM::HasReadonlySel( bool bFormView, bool bAnnotationMode ) const { // Check if start and end frame are inside the _same_ // edit-in-readonly-environment. Otherwise we better return 'true' - if ( pPointEditInReadonlyFrm != pMarkEditInReadonlyFrm ) + if ( pPointEditInReadonlyFrame != pMarkEditInReadonlyFrame ) bRet = true; } @@ -756,7 +756,7 @@ SwContentNode* GetNode( SwPaM & rPam, bool& rbFirst, SwMoveFn fnMove, if( ((*rPam.GetPoint()).*fnMove->fnCmpOp)( *rPam.GetMark() ) || ( *rPam.GetPoint() == *rPam.GetMark() && rbFirst ) ) { - SwContentFrm* pFrm; + SwContentFrame* pFrame; if( rbFirst ) { rbFirst = false; @@ -765,9 +765,9 @@ SwContentNode* GetNode( SwPaM & rPam, bool& rbFirst, SwMoveFn fnMove, { if( ( - nullptr == ( pFrm = pNd->getLayoutFrm( pNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ) ) || - ( !bInReadOnly && pFrm->IsProtected() ) || - (pFrm->IsTextFrm() && static_cast<SwTextFrm*>(pFrm)->IsHiddenNow()) + nullptr == ( pFrame = pNd->getLayoutFrame( pNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ) ) || + ( !bInReadOnly && pFrame->IsProtected() ) || + (pFrame->IsTextFrame() && static_cast<SwTextFrame*>(pFrame)->IsHiddenNow()) ) || ( !bInReadOnly && pNd->FindSectionNode() && pNd->FindSectionNode()->GetSection().IsProtect() @@ -798,10 +798,10 @@ SwContentNode* GetNode( SwPaM & rPam, bool& rbFirst, SwMoveFn fnMove, if( (aPos.*fnMove->fnCmpOp)( *rPam.GetMark() ) ) { // only in AutoTextSection can be nodes that are hidden - if( nullptr == ( pFrm = pNd->getLayoutFrm( pNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ) ) || - ( !bInReadOnly && pFrm->IsProtected() ) || - ( pFrm->IsTextFrm() && - static_cast<SwTextFrm*>(pFrm)->IsHiddenNow() ) ) + if( nullptr == ( pFrame = pNd->getLayoutFrame( pNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ) ) || + ( !bInReadOnly && pFrame->IsProtected() ) || + ( pFrame->IsTextFrame() && + static_cast<SwTextFrame*>(pFrame)->IsHiddenNow() ) ) { pNd = nullptr; continue; diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx index 578af2c3ecc5..dfba8e38369d 100644 --- a/sw/source/core/crsr/swcrsr.cxx +++ b/sw/source/core/crsr/swcrsr.cxx @@ -340,34 +340,34 @@ bool SwCursor::IsSelOvr( int eFlags ) } const SwNode* pNd = &GetPoint()->nNode.GetNode(); - if( pNd->IsContentNode() && !dynamic_cast<SwUnoCrsr*>(this) ) + if( pNd->IsContentNode() && !dynamic_cast<SwUnoCursor*>(this) ) { - const SwContentFrm* pFrm = static_cast<const SwContentNode*>(pNd)->getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ); + const SwContentFrame* pFrame = static_cast<const SwContentNode*>(pNd)->getLayoutFrame( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ); if ( (nsSwCursorSelOverFlags::SELOVER_CHANGEPOS & eFlags) //allowed to change position if it's a bad one - && pFrm && pFrm->IsValid() && !pFrm->Frm().Height() //a bad zero height position + && pFrame && pFrame->IsValid() && !pFrame->Frame().Height() //a bad zero height position && !InputFieldAtPos(GetPoint()) ) //unless it's a (vertical) input field { // skip to the next/prev valid paragraph with a layout SwNodeIndex& rPtIdx = GetPoint()->nNode; bool bGoNxt = m_pSavePos->nNode < rPtIdx.GetIndex(); - while( nullptr != ( pFrm = ( bGoNxt ? pFrm->GetNextContentFrm() : pFrm->GetPrevContentFrm() )) - && 0 == pFrm->Frm().Height() ) + while( nullptr != ( pFrame = ( bGoNxt ? pFrame->GetNextContentFrame() : pFrame->GetPrevContentFrame() )) + && 0 == pFrame->Frame().Height() ) ; // #i72394# skip to prev/next valid paragraph with a layout in case // the first search did not succeed: - if( !pFrm ) + if( !pFrame ) { bGoNxt = !bGoNxt; - pFrm = static_cast<const SwContentNode*>(pNd)->getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ); - while ( pFrm && 0 == pFrm->Frm().Height() ) + pFrame = static_cast<const SwContentNode*>(pNd)->getLayoutFrame( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ); + while ( pFrame && 0 == pFrame->Frame().Height() ) { - pFrm = bGoNxt ? pFrm->GetNextContentFrm() - : pFrm->GetPrevContentFrm(); + pFrame = bGoNxt ? pFrame->GetNextContentFrame() + : pFrame->GetPrevContentFrame(); } } - SwContentNode* pCNd = (pFrm != nullptr) ? const_cast<SwContentNode*>(pFrm->GetNode()) : nullptr; + SwContentNode* pCNd = (pFrame != nullptr) ? const_cast<SwContentNode*>(pFrame->GetNode()) : nullptr; if ( pCNd != nullptr ) { // set this ContentNode as new position @@ -381,20 +381,20 @@ bool SwCursor::IsSelOvr( int eFlags ) && nTmpPos == m_pSavePos->nContent) { // new position equals saved one - // --> trigger restore of saved pos by setting <pFrm> to NULL - see below - pFrm = nullptr; + // --> trigger restore of saved pos by setting <pFrame> to NULL - see below + pFrame = nullptr; } if ( IsInProtectTable( true ) ) { // new position in protected table - // --> trigger restore of saved pos by setting <pFrm> to NULL - see below - pFrm = nullptr; + // --> trigger restore of saved pos by setting <pFrame> to NULL - see below + pFrame = nullptr; } } } - if( !pFrm ) + if( !pFrame ) { DeleteMark(); RestoreSavePos(); @@ -422,8 +422,8 @@ bool SwCursor::IsSelOvr( int eFlags ) } if( (pNd = &GetMark()->nNode.GetNode())->IsContentNode() - && !static_cast<const SwContentNode*>(pNd)->getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ) - && !dynamic_cast<SwUnoCrsr*>(this) ) + && !static_cast<const SwContentNode*>(pNd)->getLayoutFrame( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ) + && !dynamic_cast<SwUnoCursor*>(this) ) { DeleteMark(); RestoreSavePos(); @@ -479,7 +479,7 @@ bool SwCursor::IsSelOvr( int eFlags ) { // not allowed, so go back to old position RestoreSavePos(); - // Crsr stays at old position + // Cursor stays at old position return true; } @@ -544,7 +544,7 @@ bool SwCursor::IsSelOvr( int eFlags ) return true; } -bool SwCursor::IsInProtectTable( bool bMove, bool bChgCrsr ) +bool SwCursor::IsInProtectTable( bool bMove, bool bChgCursor ) { SwContentNode* pCNd = GetContentNode(); if( !pCNd ) @@ -583,11 +583,11 @@ bool SwCursor::IsInProtectTable( bool bMove, bool bChgCrsr ) if( !bMove ) { - if( bChgCrsr ) + if( bChgCursor ) // restore the last save position RestoreSavePos(); - return true; // Crsr stays at old position + return true; // Cursor stays at old position } // We are in a protected table cell. Traverse top to bottom? @@ -610,7 +610,7 @@ GoNextCell: aCellStt.Assign( *pCNd->FindTableBoxStartNode()->EndOfSectionNode(), 1 ); } while( bProt ); -SetNextCrsr: +SetNextCursor: if( !bProt ) // found free cell { GetPoint()->nNode = aCellStt; @@ -629,7 +629,7 @@ SetNextCrsr: if( ( pNd = &aCellStt.GetNode())->IsEndNode() || HasMark()) { // if only table in FlyFrame or SSelection then stay on old position - if( bChgCrsr ) + if( bChgCursor ) RestoreSavePos(); return true; } @@ -637,7 +637,7 @@ SetNextCrsr: goto GoNextCell; bProt = false; // index is now on a content node - goto SetNextCrsr; + goto SetNextCursor; } // search for the previous valid box @@ -659,7 +659,7 @@ GoPrevCell: aCellStt.Assign( *pNd->FindTableBoxStartNode(), -1 ); } while( bProt ); -SetPrevCrsr: +SetPrevCursor: if( !bProt ) // found free cell { GetPoint()->nNode = aCellStt; @@ -677,7 +677,7 @@ SetPrevCrsr: if( ( pNd = &aCellStt.GetNode())->IsStartNode() || HasMark() ) { // if only table in FlyFrame or SSelection then stay on old position - if( bChgCrsr ) + if( bChgCursor ) RestoreSavePos(); return true; } @@ -685,7 +685,7 @@ SetPrevCrsr: goto GoPrevCell; bProt = false; // index is now on a content node - goto SetPrevCrsr; + goto SetPrevCursor; } } @@ -696,8 +696,8 @@ bool SwCursor::IsAtValidPos( bool bPoint ) const const SwPosition* pPos = bPoint ? GetPoint() : GetMark(); const SwNode* pNd = &pPos->nNode.GetNode(); - if( pNd->IsContentNode() && !static_cast<const SwContentNode*>(pNd)->getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ) && - !dynamic_cast<const SwUnoCrsr*>(this) ) + if( pNd->IsContentNode() && !static_cast<const SwContentNode*>(pNd)->getLayoutFrame( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ) && + !dynamic_cast<const SwUnoCursor*>(this) ) { return false; } @@ -706,13 +706,13 @@ bool SwCursor::IsAtValidPos( bool bPoint ) const if( !pDoc->GetDocShell() || !pDoc->GetDocShell()->IsReadOnlyUI() ) return true; - const bool bCrsrInReadOnly = IsReadOnlyAvailable(); - if( !bCrsrInReadOnly && pNd->IsProtect() ) + const bool bCursorInReadOnly = IsReadOnlyAvailable(); + if( !bCursorInReadOnly && pNd->IsProtect() ) return false; const SwSectionNode* pSectNd = pNd->FindSectionNode(); if( pSectNd && (pSectNd->GetSection().IsHiddenFlag() || - ( !bCrsrInReadOnly && pSectNd->GetSection().IsProtectFlag() ))) + ( !bCursorInReadOnly && pSectNd->GetSection().IsProtectFlag() ))) return false; return true; @@ -735,31 +735,31 @@ SwMoveFnCollection* SwCursor::MakeFindRange( SwDocPositions nStart, ? fnMoveForward : fnMoveBackward; } -static sal_uLong lcl_FindSelection( SwFindParas& rParas, SwCursor* pCurCrsr, +static sal_uLong lcl_FindSelection( SwFindParas& rParas, SwCursor* pCurrentCursor, SwMoveFn fnMove, SwCursor*& pFndRing, SwPaM& aRegion, FindRanges eFndRngs, bool bInReadOnly, bool& bCancel ) { - SwDoc* pDoc = pCurCrsr->GetDoc(); + SwDoc* pDoc = pCurrentCursor->GetDoc(); bool const bDoesUndo = pDoc->GetIDocumentUndoRedo().DoesUndo(); int nFndRet = 0; sal_uLong nFound = 0; const bool bSrchBkwrd = fnMove == fnMoveBackward; - SwPaM *pTmpCrsr = pCurCrsr, *pSaveCrsr = pCurCrsr; + SwPaM *pTmpCursor = pCurrentCursor, *pSaveCursor = pCurrentCursor; - // only create progress bar for ShellCrsr - bool bIsUnoCrsr = dynamic_cast<SwUnoCrsr*>(pCurCrsr) != nullptr; + // only create progress bar for ShellCursor + bool bIsUnoCursor = dynamic_cast<SwUnoCursor*>(pCurrentCursor) != nullptr; std::unique_ptr<_PercentHdl> pPHdl; - sal_uInt16 nCrsrCnt = 0; + sal_uInt16 nCursorCnt = 0; if( FND_IN_SEL & eFndRngs ) { - while( pCurCrsr != ( pTmpCrsr = pTmpCrsr->GetNext() )) - ++nCrsrCnt; - if( nCrsrCnt && !bIsUnoCrsr ) - pPHdl.reset(new _PercentHdl( 0, nCrsrCnt, pDoc->GetDocShell() )); + while( pCurrentCursor != ( pTmpCursor = pTmpCursor->GetNext() )) + ++nCursorCnt; + if( nCursorCnt && !bIsUnoCursor ) + pPHdl.reset(new _PercentHdl( 0, nCursorCnt, pDoc->GetDocShell() )); } else - pSaveCrsr = static_cast<SwPaM*>(pSaveCrsr->GetPrev()); + pSaveCursor = static_cast<SwPaM*>(pSaveCursor->GetPrev()); bool bEnd = false; do { @@ -768,31 +768,31 @@ static sal_uLong lcl_FindSelection( SwFindParas& rParas, SwCursor* pCurCrsr, // if the search area is valid SwPosition *pSttPos = aRegion.GetMark(), *pEndPos = aRegion.GetPoint(); - *pSttPos = *pTmpCrsr->Start(); - *pEndPos = *pTmpCrsr->End(); + *pSttPos = *pTmpCursor->Start(); + *pEndPos = *pTmpCursor->End(); if( bSrchBkwrd ) aRegion.Exchange(); - if( !nCrsrCnt && !pPHdl && !bIsUnoCrsr ) + if( !nCursorCnt && !pPHdl && !bIsUnoCursor ) pPHdl.reset(new _PercentHdl( aRegion )); // as long as found and not at same position while( *pSttPos <= *pEndPos && - 0 != ( nFndRet = rParas.Find( pCurCrsr, fnMove, + 0 != ( nFndRet = rParas.Find( pCurrentCursor, fnMove, &aRegion, bInReadOnly )) && ( !pFndRing || - *pFndRing->GetPoint() != *pCurCrsr->GetPoint() || - *pFndRing->GetMark() != *pCurCrsr->GetMark() )) + *pFndRing->GetPoint() != *pCurrentCursor->GetPoint() || + *pFndRing->GetMark() != *pCurrentCursor->GetMark() )) { if( !( FIND_NO_RING & nFndRet )) { - // #i24084# - create ring similar to the one in CreateCrsr - SwCursor* pNew = pCurCrsr->Create( pFndRing ); + // #i24084# - create ring similar to the one in CreateCursor + SwCursor* pNew = pCurrentCursor->Create( pFndRing ); if( !pFndRing ) pFndRing = pNew; pNew->SetMark(); - *pNew->GetMark() = *pCurCrsr->GetMark(); + *pNew->GetMark() = *pCurrentCursor->GetMark(); } ++nFound; @@ -807,7 +807,7 @@ static sal_uLong lcl_FindSelection( SwFindParas& rParas, SwCursor* pCurCrsr, && pDoc->GetIDocumentUndoRedo().DoesUndo() && rParas.IsReplaceMode()) { - short nRet = pCurCrsr->MaxReplaceArived(); + short nRet = pCurrentCursor->MaxReplaceArived(); if( RET_YES == nRet ) { pDoc->GetIDocumentUndoRedo().DelAllUndoObj(); @@ -826,16 +826,16 @@ static sal_uLong lcl_FindSelection( SwFindParas& rParas, SwCursor* pCurCrsr, if( bSrchBkwrd ) // move pEndPos in front of the found area - *pEndPos = *pCurCrsr->Start(); + *pEndPos = *pCurrentCursor->Start(); else // move pSttPos behind the found area - *pSttPos = *pCurCrsr->End(); + *pSttPos = *pCurrentCursor->End(); if( *pSttPos == *pEndPos ) // in area but at the end => done break; - if( !nCrsrCnt && pPHdl ) + if( !nCursorCnt && pPHdl ) { pPHdl->NextPos( *aRegion.GetMark() ); } @@ -844,16 +844,16 @@ static sal_uLong lcl_FindSelection( SwFindParas& rParas, SwCursor* pCurCrsr, if( bEnd || !( eFndRngs & ( FND_IN_SELALL | FND_IN_SEL )) ) break; - pTmpCrsr = pTmpCrsr->GetNext(); - if( nCrsrCnt && pPHdl ) + pTmpCursor = pTmpCursor->GetNext(); + if( nCursorCnt && pPHdl ) { pPHdl->NextPos( ++pPHdl->nActPos ); } - } while( pTmpCrsr != pSaveCrsr ); + } while( pTmpCursor != pSaveCursor ); if( nFound && !pFndRing ) // if no ring should be created - pFndRing = pCurCrsr->Create(); + pFndRing = pCurrentCursor->Create(); pDoc->GetIDocumentUndoRedo().DoUndo(bDoesUndo); return nFound; @@ -929,7 +929,7 @@ sal_uLong SwCursor::FindAll( SwFindParas& rParas, FindRanges eFndRngs, bool& bCancel ) { bCancel = false; - SwCrsrSaveState aSaveState( *this ); + SwCursorSaveState aSaveState( *this ); // create region without adding it to the ring SwPaM aRegion( *GetPoint() ); @@ -952,7 +952,7 @@ sal_uLong SwCursor::FindAll( SwFindParas& rParas, bInReadOnly, bCancel ) )) return nFound; - // found string at least once; it's all in new Crsr ring thus delete old one + // found string at least once; it's all in new Cursor ring thus delete old one while( GetNext() != this ) delete GetNext(); @@ -1010,7 +1010,7 @@ sal_uLong SwCursor::FindAll( SwFindParas& rParas, } else { - // found string at least once; it's all in new Crsr ring thus delete old one + // found string at least once; it's all in new Cursor ring thus delete old one while( GetNext() != this ) delete GetNext(); @@ -1223,10 +1223,10 @@ bool SwCursor::IsStartEndSentence( bool bEnd ) const if( !bRet ) { - SwCursor aCrsr(*GetPoint(), nullptr, false); - SwPosition aOrigPos = *aCrsr.GetPoint(); - aCrsr.GoSentence( bEnd ? SwCursor::END_SENT : SwCursor::START_SENT ); - bRet = aOrigPos == *aCrsr.GetPoint(); + SwCursor aCursor(*GetPoint(), nullptr, false); + SwPosition aOrigPos = *aCursor.GetPoint(); + aCursor.GoSentence( bEnd ? SwCursor::END_SENT : SwCursor::START_SENT ); + bRet = aOrigPos == *aCursor.GetPoint(); } return bRet; } @@ -1237,7 +1237,7 @@ bool SwCursor::GoStartWordWT( sal_Int16 nWordType ) const SwTextNode* pTextNd = GetNode().GetTextNode(); if( pTextNd && g_pBreakIt->GetBreakIter().is() ) { - SwCrsrSaveState aSave( *this ); + SwCursorSaveState aSave( *this ); sal_Int32 nPtPos = GetPoint()->nContent.GetIndex(); nPtPos = g_pBreakIt->GetBreakIter()->getWordBoundary( pTextNd->GetText(), nPtPos, @@ -1261,7 +1261,7 @@ bool SwCursor::GoEndWordWT( sal_Int16 nWordType ) const SwTextNode* pTextNd = GetNode().GetTextNode(); if( pTextNd && g_pBreakIt->GetBreakIter().is() ) { - SwCrsrSaveState aSave( *this ); + SwCursorSaveState aSave( *this ); sal_Int32 nPtPos = GetPoint()->nContent.GetIndex(); nPtPos = g_pBreakIt->GetBreakIter()->getWordBoundary( pTextNd->GetText(), nPtPos, @@ -1286,7 +1286,7 @@ bool SwCursor::GoNextWordWT( sal_Int16 nWordType ) const SwTextNode* pTextNd = GetNode().GetTextNode(); if( pTextNd && g_pBreakIt->GetBreakIter().is() ) { - SwCrsrSaveState aSave( *this ); + SwCursorSaveState aSave( *this ); sal_Int32 nPtPos = GetPoint()->nContent.GetIndex(); nPtPos = g_pBreakIt->GetBreakIter()->nextWord( @@ -1310,7 +1310,7 @@ bool SwCursor::GoPrevWordWT( sal_Int16 nWordType ) const SwTextNode* pTextNd = GetNode().GetTextNode(); if( pTextNd && g_pBreakIt->GetBreakIter().is() ) { - SwCrsrSaveState aSave( *this ); + SwCursorSaveState aSave( *this ); sal_Int32 nPtPos = GetPoint()->nContent.GetIndex(); const sal_Int32 nPtStart = nPtPos; @@ -1333,16 +1333,16 @@ bool SwCursor::GoPrevWordWT( sal_Int16 nWordType ) bool SwCursor::SelectWordWT( SwViewShell* pViewShell, sal_Int16 nWordType, const Point* pPt ) { - SwCrsrSaveState aSave( *this ); + SwCursorSaveState aSave( *this ); bool bRet = false; DeleteMark(); - const SwRootFrm* pLayout = pViewShell->GetLayout(); + const SwRootFrame* pLayout = pViewShell->GetLayout(); if( pPt && nullptr != pLayout ) { // set the cursor to the layout position Point aPt( *pPt ); - pLayout->GetCrsrOfst( GetPoint(), aPt ); + pLayout->GetCursorOfst( GetPoint(), aPt ); } const SwTextNode* pTextNd = GetNode().GetTextNode(); @@ -1465,7 +1465,7 @@ bool SwCursor::GoSentence( SentenceMoveType eMoveType ) { OUString sNodeText( lcl_MaskDeletedRedlines( pTextNd ) ); - SwCrsrSaveState aSave( *this ); + SwCursorSaveState aSave( *this ); sal_Int32 nPtPos = GetPoint()->nContent.GetIndex(); switch ( eMoveType ) { @@ -1532,7 +1532,7 @@ bool SwCursor::ExpandToSentenceBorders() OUString sStartText( lcl_MaskDeletedRedlines( pStartNd ) ); OUString sEndText( pStartNd == pEndNd? sStartText : lcl_MaskDeletedRedlines( pEndNd ) ); - SwCrsrSaveState aSave( *this ); + SwCursorSaveState aSave( *this ); sal_Int32 nStartPos = Start()->nContent.GetIndex(); sal_Int32 nEndPos = End()->nContent.GetIndex(); @@ -1563,19 +1563,19 @@ bool SwCursor::ExpandToSentenceBorders() } bool SwTableCursor::LeftRight( bool bLeft, sal_uInt16 nCnt, sal_uInt16 /*nMode*/, - bool /*bVisualAllowed*/, bool /*bSkipHidden*/, bool /*bInsertCrsr*/ ) + bool /*bVisualAllowed*/, bool /*bSkipHidden*/, bool /*bInsertCursor*/ ) { return bLeft ? GoPrevCell( nCnt ) : GoNextCell( nCnt ); } // calculate cursor bidi level: extracted from LeftRight() -const SwContentFrm* +const SwContentFrame* SwCursor::DoSetBidiLevelLeftRight( - bool & io_rbLeft, bool bVisualAllowed, bool bInsertCrsr) + bool & io_rbLeft, bool bVisualAllowed, bool bInsertCursor) { // calculate cursor bidi level - const SwContentFrm* pSttFrm = nullptr; + const SwContentFrame* pSttFrame = nullptr; SwNode& rNode = GetPoint()->nNode.GetNode(); if( rNode.IsTextNode() ) @@ -1592,15 +1592,15 @@ SwCursor::DoSetBidiLevelLeftRight( // for visual cursor travelling (used in bidi layout) // we first have to convert the logic to a visual position Point aPt; - pSttFrm = rTNd.getLayoutFrm( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, GetPoint() ); - if( pSttFrm ) + pSttFrame = rTNd.getLayoutFrame( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, GetPoint() ); + if( pSttFrame ) { - sal_uInt8 nCrsrLevel = GetCrsrBidiLevel(); + sal_uInt8 nCursorLevel = GetCursorBidiLevel(); bool bForward = ! io_rbLeft; - const_cast<SwTextFrm*>(static_cast<const SwTextFrm*>(pSttFrm))->PrepareVisualMove( nPos, nCrsrLevel, - bForward, bInsertCrsr ); + const_cast<SwTextFrame*>(static_cast<const SwTextFrame*>(pSttFrame))->PrepareVisualMove( nPos, nCursorLevel, + bForward, bInsertCursor ); rIdx = nPos; - SetCrsrBidiLevel( nCrsrLevel ); + SetCursorBidiLevel( nCursorLevel ); io_rbLeft = ! bForward; } } @@ -1612,23 +1612,23 @@ SwCursor::DoSetBidiLevelLeftRight( const sal_Int32 nMoveOverPos = io_rbLeft ? ( nPos ? nPos - 1 : 0 ) : nPos; - SetCrsrBidiLevel( pSI->DirType( nMoveOverPos ) ); + SetCursorBidiLevel( pSI->DirType( nMoveOverPos ) ); } } } - return pSttFrm; + return pSttFrame; } bool SwCursor::LeftRight( bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode, - bool bVisualAllowed,bool bSkipHidden, bool bInsertCrsr ) + bool bVisualAllowed,bool bSkipHidden, bool bInsertCursor ) { // calculate cursor bidi level SwNode& rNode = GetPoint()->nNode.GetNode(); - const SwContentFrm* pSttFrm = // may side-effect bLeft! - DoSetBidiLevelLeftRight(bLeft, bVisualAllowed, bInsertCrsr); + const SwContentFrame* pSttFrame = // may side-effect bLeft! + DoSetBidiLevelLeftRight(bLeft, bVisualAllowed, bInsertCursor); // can the cursor be moved n times? - SwCrsrSaveState aSave( *this ); + SwCursorSaveState aSave( *this ); SwMoveFn fnMove = bLeft ? fnMoveBackward : fnMoveForward; SwGoInDoc fnGo; @@ -1718,21 +1718,21 @@ bool SwCursor::LeftRight( bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode, } // here come some special rules for visual cursor travelling - if ( pSttFrm ) + if ( pSttFrame ) { SwNode& rTmpNode = GetPoint()->nNode.GetNode(); if ( &rTmpNode != &rNode && rTmpNode.IsTextNode() ) { Point aPt; - const SwContentFrm* pEndFrm = rTmpNode.GetTextNode()->getLayoutFrm( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, GetPoint() ); - if ( pEndFrm ) + const SwContentFrame* pEndFrame = rTmpNode.GetTextNode()->getLayoutFrame( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, GetPoint() ); + if ( pEndFrame ) { - if ( ! pEndFrm->IsRightToLeft() != ! pSttFrm->IsRightToLeft() ) + if ( ! pEndFrame->IsRightToLeft() != ! pSttFrame->IsRightToLeft() ) { if ( ! bLeft ) - pEndFrm->RightMargin( this ); + pEndFrame->RightMargin( this ); else - pEndFrm->LeftMargin( this ); + pEndFrame->LeftMargin( this ); } } } @@ -1764,10 +1764,10 @@ void SwCursor::DoSetBidiLevelUpDown() if ( nCurrLevel % 2 != nPrevLevel % 2 ) { // set cursor level to the lower of the two levels - SetCrsrBidiLevel( std::min( nCurrLevel, nPrevLevel ) ); + SetCursorBidiLevel( std::min( nCurrLevel, nPrevLevel ) ); } else - SetCrsrBidiLevel( nCurrLevel ); + SetCursorBidiLevel( nCurrLevel ); } } } @@ -1776,69 +1776,69 @@ void SwCursor::DoSetBidiLevelUpDown() bool SwCursor::UpDown( bool bUp, sal_uInt16 nCnt, Point* pPt, long nUpDownX ) { - SwTableCursor* pTableCrsr = dynamic_cast<SwTableCursor*>(this); - bool bAdjustTableCrsr = false; + SwTableCursor* pTableCursor = dynamic_cast<SwTableCursor*>(this); + bool bAdjustTableCursor = false; // If the point/mark of the table cursor in the same box then set cursor to // beginning of the box - if( pTableCrsr && GetNode().StartOfSectionNode() == + if( pTableCursor && GetNode().StartOfSectionNode() == GetNode( false ).StartOfSectionNode() ) { if ( End() != GetPoint() ) Exchange(); - bAdjustTableCrsr = true; + bAdjustTableCursor = true; } bool bRet = false; Point aPt; if( pPt ) aPt = *pPt; - SwContentFrm* pFrm = GetContentNode()->getLayoutFrm( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, GetPoint() ); + SwContentFrame* pFrame = GetContentNode()->getLayoutFrame( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, GetPoint() ); - if( pFrm ) + if( pFrame ) { - SwCrsrSaveState aSave( *this ); + SwCursorSaveState aSave( *this ); if( !pPt ) { SwRect aTmpRect; - pFrm->GetCharRect( aTmpRect, *GetPoint() ); + pFrame->GetCharRect( aTmpRect, *GetPoint() ); aPt = aTmpRect.Pos(); - nUpDownX = pFrm->IsVertical() ? - aPt.getY() - pFrm->Frm().Top() : - aPt.getX() - pFrm->Frm().Left(); + nUpDownX = pFrame->IsVertical() ? + aPt.getY() - pFrame->Frame().Top() : + aPt.getX() - pFrame->Frame().Left(); } // It is allowed to move footnotes in other footnotes but not sections - const bool bChkRange = !pFrm->IsInFootnote() || HasMark(); + const bool bChkRange = !pFrame->IsInFootnote() || HasMark(); const SwPosition aOldPos( *GetPoint() ); const bool bInReadOnly = IsReadOnlyAvailable(); - if ( bAdjustTableCrsr && !bUp ) + if ( bAdjustTableCursor && !bUp ) { // Special case: We have a table cursor but the start box has more // than one paragraph. If we want to go down, we have to set the // point to the last frame in the table box. This is only necessary // if we do not already have a table selection const SwStartNode* pTableNd = GetNode().FindTableBoxStartNode(); - OSL_ENSURE( pTableNd, "pTableCrsr without SwTableNode?" ); + OSL_ENSURE( pTableNd, "pTableCursor without SwTableNode?" ); if ( pTableNd ) // safety first { const SwNode* pEndNd = pTableNd->EndOfSectionNode(); GetPoint()->nNode = *pEndNd; - pTableCrsr->Move( fnMoveBackward, fnGoNode ); - pFrm = GetContentNode()->getLayoutFrm( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, GetPoint() ); + pTableCursor->Move( fnMoveBackward, fnGoNode ); + pFrame = GetContentNode()->getLayoutFrame( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, GetPoint() ); } } while( nCnt && - (bUp ? pFrm->UnitUp( this, nUpDownX, bInReadOnly ) - : pFrm->UnitDown( this, nUpDownX, bInReadOnly ) ) && + (bUp ? pFrame->UnitUp( this, nUpDownX, bInReadOnly ) + : pFrame->UnitDown( this, nUpDownX, bInReadOnly ) ) && CheckNodesRange( aOldPos.nNode, GetPoint()->nNode, bChkRange )) { - pFrm = GetContentNode()->getLayoutFrm( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, GetPoint() ); + pFrame = GetContentNode()->getLayoutFrame( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, GetPoint() ); --nCnt; } @@ -1846,27 +1846,27 @@ bool SwCursor::UpDown( bool bUp, sal_uInt16 nCnt, if( !nCnt && !IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE | nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ) ) { - if( !pTableCrsr ) + if( !pTableCursor ) { // try to position the cursor at half of the char-rect's height - pFrm = GetContentNode()->getLayoutFrm( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, GetPoint() ); - SwCrsrMoveState eTmpState( MV_UPDOWN ); + pFrame = GetContentNode()->getLayoutFrame( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, GetPoint() ); + SwCursorMoveState eTmpState( MV_UPDOWN ); eTmpState.m_bSetInReadOnly = bInReadOnly; SwRect aTmpRect; - pFrm->GetCharRect( aTmpRect, *GetPoint(), &eTmpState ); - if ( pFrm->IsVertical() ) + pFrame->GetCharRect( aTmpRect, *GetPoint(), &eTmpState ); + if ( pFrame->IsVertical() ) { aPt.setX(aTmpRect.Center().getX()); - pFrm->Calc(pFrm->getRootFrm()->GetCurrShell()->GetOut()); - aPt.setY(pFrm->Frm().Top() + nUpDownX); + pFrame->Calc(pFrame->getRootFrame()->GetCurrShell()->GetOut()); + aPt.setY(pFrame->Frame().Top() + nUpDownX); } else { aPt.setY(aTmpRect.Center().getY()); - pFrm->Calc(pFrm->getRootFrm()->GetCurrShell()->GetOut()); - aPt.setX(pFrm->Frm().Left() + nUpDownX); + pFrame->Calc(pFrame->getRootFrame()->GetCurrShell()->GetOut()); + aPt.setX(pFrame->Frame().Left() + nUpDownX); } - pFrm->GetCrsrOfst( GetPoint(), aPt, &eTmpState ); + pFrame->GetCursorOfst( GetPoint(), aPt, &eTmpState ); } bRet = !IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE | nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ); } @@ -1881,15 +1881,15 @@ bool SwCursor::UpDown( bool bUp, sal_uInt16 nCnt, bool SwCursor::LeftRightMargin( bool bLeft, bool bAPI ) { Point aPt; - SwContentFrm * pFrm = GetContentNode()->getLayoutFrm( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, GetPoint() ); + SwContentFrame * pFrame = GetContentNode()->getLayoutFrame( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, GetPoint() ); // calculate cursor bidi level - if ( pFrm ) - SetCrsrBidiLevel( pFrm->IsRightToLeft() ? 1 : 0 ); + if ( pFrame ) + SetCursorBidiLevel( pFrame->IsRightToLeft() ? 1 : 0 ); - SwCrsrSaveState aSave( *this ); - return pFrm - && (bLeft ? pFrm->LeftMargin( this ) : pFrm->RightMargin( this, bAPI ) ) + SwCursorSaveState aSave( *this ); + return pFrame + && (bLeft ? pFrame->LeftMargin( this ) : pFrame->RightMargin( this, bAPI ) ) && !IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE | nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ); } @@ -1897,14 +1897,14 @@ bool SwCursor::IsAtLeftRightMargin( bool bLeft, bool bAPI ) const { bool bRet = false; Point aPt; - SwContentFrm * pFrm = GetContentNode()->getLayoutFrm( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, GetPoint() ); - if( pFrm ) + SwContentFrame * pFrame = GetContentNode()->getLayoutFrame( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, GetPoint() ); + if( pFrame ) { SwPaM aPam( *GetPoint() ); if( !bLeft && aPam.GetPoint()->nContent.GetIndex() ) --aPam.GetPoint()->nContent; - bRet = (bLeft ? pFrm->LeftMargin( &aPam ) - : pFrm->RightMargin( &aPam, bAPI )) + bRet = (bLeft ? pFrame->LeftMargin( &aPam ) + : pFrame->RightMargin( &aPam, bAPI )) && *aPam.GetPoint() == *GetPoint(); } return bRet; @@ -1912,7 +1912,7 @@ bool SwCursor::IsAtLeftRightMargin( bool bLeft, bool bAPI ) const bool SwCursor::SttEndDoc( bool bStt ) { - SwCrsrSaveState aSave( *this ); + SwCursorSaveState aSave( *this ); // Never jump over section boundaries during selection! // Can the cursor still moved on? SwMoveFn fnMove = bStt ? fnMoveBackward : fnMoveForward; @@ -1933,7 +1933,7 @@ bool SwCursor::GoPrevNextCell( bool bNext, sal_uInt16 nCnt ) // If there is another EndNode in front of the cell's StartNode then there // exists a previous cell - SwCrsrSaveState aSave( *this ); + SwCursorSaveState aSave( *this ); SwNodeIndex& rPtIdx = GetPoint()->nNode; while( nCnt-- ) @@ -2001,7 +2001,7 @@ bool SwCursor::GotoTable( const OUString& rName ) if( pTmpTable ) { // a table in a normal nodes array - SwCrsrSaveState aSave( *this ); + SwCursorSaveState aSave( *this ); GetPoint()->nNode = *pTmpTable->GetTabSortBoxes()[ 0 ]-> GetSttNd()->FindTableNode(); Move( fnMoveForward, fnGoContent ); @@ -2023,7 +2023,7 @@ bool SwCursor::GotoTableBox( const OUString& rName ) ( !pTableBox->GetFrameFormat()->GetProtect().IsContentProtected() || IsReadOnlyAvailable() ) ) { - SwCrsrSaveState aSave( *this ); + SwCursorSaveState aSave( *this ); GetPoint()->nNode = *pTableBox->GetSttNd(); Move( fnMoveForward, fnGoContent ); bRet = !IsSelOvr(); @@ -2064,7 +2064,7 @@ bool SwCursor::MovePara(SwWhichPara fnWhichPara, SwPosPara fnPosPara ) // else we must use the SaveStructure, because the next/prev is not // a same node type. - SwCrsrSaveState aSave( *this ); + SwCursorSaveState aSave( *this ); return (*fnWhichPara)( *this, fnPosPara ) && !IsInProtectTable( true ) && !IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE | @@ -2074,7 +2074,7 @@ bool SwCursor::MovePara(SwWhichPara fnWhichPara, SwPosPara fnPosPara ) bool SwCursor::MoveSection( SwWhichSection fnWhichSect, SwPosSection fnPosSect) { - SwCrsrSaveState aSave( *this ); + SwCursorSaveState aSave( *this ); return (*fnWhichSect)( *this, fnPosSect ) && !IsInProtectTable( true ) && !IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE | @@ -2088,7 +2088,7 @@ void SwCursor::RestoreSavePos() sal_uLong uNodeCount = GetPoint()->nNode.GetNodes().Count(); OSL_ENSURE(!m_pSavePos || m_pSavePos->nNode < uNodeCount, "SwCursor::RestoreSavePos: invalid node: " - "probably something was deleted; consider using SwUnoCrsr instead"); + "probably something was deleted; consider using SwUnoCursor instead"); if (m_pSavePos && m_pSavePos->nNode < uNodeCount) { GetPoint()->nNode = m_pSavePos->nNode; @@ -2149,7 +2149,7 @@ lcl_SeekEntry(const SwSelBoxes& rTmp, SwStartNode const*const pSrch, return false; } -SwCursor* SwTableCursor::MakeBoxSels( SwCursor* pAktCrsr ) +SwCursor* SwTableCursor::MakeBoxSels( SwCursor* pAktCursor ) { if (m_bChanged) { @@ -2170,9 +2170,9 @@ SwCursor* SwTableCursor::MakeBoxSels( SwCursor* pAktCrsr ) SwSelBoxes aTmp(m_SelectedBoxes); // compare old and new ones - SwNodes& rNds = pAktCrsr->GetDoc()->GetNodes(); + SwNodes& rNds = pAktCursor->GetDoc()->GetNodes(); const SwStartNode* pSttNd; - SwPaM* pCur = pAktCrsr; + SwPaM* pCur = pAktCursor; do { size_t nPos; bool bDel = false; @@ -2212,12 +2212,12 @@ SwCursor* SwTableCursor::MakeBoxSels( SwCursor* pAktCrsr ) { SwPaM* pDel = pCur->GetPrev(); - if( pDel == pAktCrsr ) - pAktCrsr->DeleteMark(); + if( pDel == pAktCursor ) + pAktCursor->DeleteMark(); else delete pDel; } - } while ( pAktCrsr != pCur ); + } while ( pAktCursor != pCur ); for (size_t nPos = 0; nPos < aTmp.size(); ++nPos) { @@ -2230,9 +2230,9 @@ SwCursor* SwTableCursor::MakeBoxSels( SwCursor* pAktCrsr ) if( !pNd->IsContentNode() ) pNd = rNds.GoNextSection( &aIdx, true, false ); - SwPaM *const pNew = (!pAktCrsr->IsMultiSelection() && !pAktCrsr->HasMark()) - ? pAktCrsr - : pAktCrsr->Create( pAktCrsr ); + SwPaM *const pNew = (!pAktCursor->IsMultiSelection() && !pAktCursor->HasMark()) + ? pAktCursor + : pAktCursor->Create( pAktCursor ); pNew->GetPoint()->nNode = *pNd; pNew->GetPoint()->nContent.Assign( static_cast<SwContentNode*>(pNd), 0 ); pNew->SetMark(); @@ -2245,7 +2245,7 @@ SwCursor* SwTableCursor::MakeBoxSels( SwCursor* pAktCrsr ) pPos->nContent.Assign(static_cast<SwContentNode*>(pNd), pNd ? static_cast<SwContentNode*>(pNd)->Len() : 0); } } - return pAktCrsr; + return pAktCursor; } void SwTableCursor::InsertBox( const SwTableBox& rTableBox ) @@ -2317,9 +2317,9 @@ void SwTableCursor::ActualizeSelection( const SwSelBoxes &rNew ) } } -bool SwTableCursor::IsCrsrMovedUpdate() +bool SwTableCursor::IsCursorMovedUpdate() { - if( !IsCrsrMoved() ) + if( !IsCursorMoved() ) return false; m_nTableMkNd = GetMark()->nNode.GetIndex(); @@ -2330,7 +2330,7 @@ bool SwTableCursor::IsCrsrMovedUpdate() } /// park table cursor on the boxes' start node -void SwTableCursor::ParkCrsr() +void SwTableCursor::ParkCursor() { // de-register index from text node SwNode* pNd = &GetPoint()->nNode.GetNode(); diff --git a/sw/source/core/crsr/trvlcol.cxx b/sw/source/core/crsr/trvlcol.cxx index 2bd322f77794..fcfeb3053947 100644 --- a/sw/source/core/crsr/trvlcol.cxx +++ b/sw/source/core/crsr/trvlcol.cxx @@ -25,41 +25,41 @@ #include <viscrs.hxx> #include <callnk.hxx> -SwLayoutFrm* GetCurrColumn( const SwLayoutFrm* pLayFrm ) +SwLayoutFrame* GetCurrColumn( const SwLayoutFrame* pLayFrame ) { - while( pLayFrm && !pLayFrm->IsColumnFrm() ) - pLayFrm = pLayFrm->GetUpper(); - return const_cast<SwLayoutFrm*>(pLayFrm); + while( pLayFrame && !pLayFrame->IsColumnFrame() ) + pLayFrame = pLayFrame->GetUpper(); + return const_cast<SwLayoutFrame*>(pLayFrame); } -SwLayoutFrm* GetNextColumn( const SwLayoutFrm* pLayFrm ) +SwLayoutFrame* GetNextColumn( const SwLayoutFrame* pLayFrame ) { - SwLayoutFrm* pActCol = GetCurrColumn( pLayFrm ); - return pActCol ? static_cast<SwLayoutFrm*>(pActCol->GetNext()) : nullptr; + SwLayoutFrame* pActCol = GetCurrColumn( pLayFrame ); + return pActCol ? static_cast<SwLayoutFrame*>(pActCol->GetNext()) : nullptr; } -SwLayoutFrm* GetPrevColumn( const SwLayoutFrm* pLayFrm ) +SwLayoutFrame* GetPrevColumn( const SwLayoutFrame* pLayFrame ) { - SwLayoutFrm* pActCol = GetCurrColumn( pLayFrm ); - return pActCol ? static_cast<SwLayoutFrm*>(pActCol->GetPrev()) : nullptr; + SwLayoutFrame* pActCol = GetCurrColumn( pLayFrame ); + return pActCol ? static_cast<SwLayoutFrame*>(pActCol->GetPrev()) : nullptr; } -SwContentFrm* GetColumnStt( const SwLayoutFrm* pColFrm ) +SwContentFrame* GetColumnStt( const SwLayoutFrame* pColFrame ) { - return pColFrm ? const_cast<SwContentFrm*>(pColFrm->ContainsContent()) : nullptr; + return pColFrame ? const_cast<SwContentFrame*>(pColFrame->ContainsContent()) : nullptr; } -SwContentFrm* GetColumnEnd( const SwLayoutFrm* pColFrm ) +SwContentFrame* GetColumnEnd( const SwLayoutFrame* pColFrame ) { - SwContentFrm *pRet = GetColumnStt( pColFrm ); + SwContentFrame *pRet = GetColumnStt( pColFrame ); if( !pRet ) return nullptr; - SwContentFrm *pNxt = pRet->GetNextContentFrm(); - while( pNxt && pColFrm->IsAnLower( pNxt ) ) + SwContentFrame *pNxt = pRet->GetNextContentFrame(); + while( pNxt && pColFrame->IsAnLower( pNxt ) ) { pRet = pNxt; - pNxt = pNxt->GetNextContentFrm(); + pNxt = pNxt->GetNextContentFrame(); } return pRet; } @@ -70,36 +70,36 @@ SwWhichColumn fnColumnNext = &GetNextColumn; SwPosColumn fnColumnStart = &GetColumnStt; SwPosColumn fnColumnEnd = &GetColumnEnd; -bool SwCrsrShell::MoveColumn( SwWhichColumn fnWhichCol, SwPosColumn fnPosCol ) +bool SwCursorShell::MoveColumn( SwWhichColumn fnWhichCol, SwPosColumn fnPosCol ) { bool bRet = false; - if( !m_pTableCrsr ) + if( !m_pTableCursor ) { - SwLayoutFrm* pLayFrm = GetCurrFrm()->GetUpper(); - if( pLayFrm && nullptr != ( pLayFrm = (*fnWhichCol)( pLayFrm )) ) + SwLayoutFrame* pLayFrame = GetCurrFrame()->GetUpper(); + if( pLayFrame && nullptr != ( pLayFrame = (*fnWhichCol)( pLayFrame )) ) { - SwContentFrm* pCnt = (*fnPosCol)( pLayFrm ); + SwContentFrame* pCnt = (*fnPosCol)( pLayFrame ); if( pCnt ) { SET_CURR_SHELL( this ); - SwCallLink aLk( *this ); // watch Crsr-Moves; call Link if needed - SwCrsrSaveState aSaveState( *m_pCurCrsr ); + SwCallLink aLk( *this ); // watch Cursor-Moves; call Link if needed + SwCursorSaveState aSaveState( *m_pCurrentCursor ); pCnt->Calc(GetOut()); - Point aPt( pCnt->Frm().Pos() + pCnt->Prt().Pos() ); + Point aPt( pCnt->Frame().Pos() + pCnt->Prt().Pos() ); if( fnPosCol == GetColumnEnd ) { aPt.setX(aPt.getX() + pCnt->Prt().Width()); aPt.setY(aPt.getY() + pCnt->Prt().Height()); } - pCnt->GetCrsrOfst( m_pCurCrsr->GetPoint(), aPt ); + pCnt->GetCursorOfst( m_pCurrentCursor->GetPoint(), aPt ); - if( !m_pCurCrsr->IsInProtectTable( true ) && - !m_pCurCrsr->IsSelOvr() ) + if( !m_pCurrentCursor->IsInProtectTable( true ) && + !m_pCurrentCursor->IsSelOvr() ) { - UpdateCrsr(); + UpdateCursor(); bRet = true; } } diff --git a/sw/source/core/crsr/trvlfnfl.cxx b/sw/source/core/crsr/trvlfnfl.cxx index 2bd5e3772fa4..d1d78b85939b 100644 --- a/sw/source/core/crsr/trvlfnfl.cxx +++ b/sw/source/core/crsr/trvlfnfl.cxx @@ -35,14 +35,14 @@ #include <viscrs.hxx> #include <callnk.hxx> -bool SwCrsrShell::CallCrsrFN( FNCrsr fnCrsr ) +bool SwCursorShell::CallCursorFN( FNCursor fnCursor ) { - SwCallLink aLk( *this ); // watch Crsr-Moves - SwCursor* pCrsr = getShellCrsr( true ); - bool bRet = (pCrsr->*fnCrsr)(); + SwCallLink aLk( *this ); // watch Cursor-Moves + SwCursor* pCursor = getShellCursor( true ); + bool bRet = (pCursor->*fnCursor)(); if( bRet ) - UpdateCrsr( SwCrsrShell::SCROLLWIN | SwCrsrShell::CHKRANGE | - SwCrsrShell::READONLY ); + UpdateCursor( SwCursorShell::SCROLLWIN | SwCursorShell::CHKRANGE | + SwCursorShell::READONLY ); return bRet; } @@ -58,7 +58,7 @@ bool SwCursor::GotoFootnoteText() : nullptr); if (pFootnote) { - SwCrsrSaveState aSaveState( *this ); + SwCursorSaveState aSaveState( *this ); GetPoint()->nNode = *static_cast<SwTextFootnote*>(pFootnote)->GetStartNode(); SwContentNode* pCNd = GetDoc()->GetNodes().GoNextSection( @@ -74,47 +74,47 @@ bool SwCursor::GotoFootnoteText() return bRet; } -bool SwCrsrShell::GotoFootnoteText() +bool SwCursorShell::GotoFootnoteText() { - bool bRet = CallCrsrFN( &SwCursor::GotoFootnoteText ); + bool bRet = CallCursorFN( &SwCursor::GotoFootnoteText ); if( !bRet ) { - SwTextNode* pTextNd = _GetCrsr() ? - _GetCrsr()->GetPoint()->nNode.GetNode().GetTextNode() : nullptr; + SwTextNode* pTextNd = _GetCursor() ? + _GetCursor()->GetPoint()->nNode.GetNode().GetTextNode() : nullptr; if( pTextNd ) { - const SwFrm *pFrm = pTextNd->getLayoutFrm( GetLayout(), &_GetCrsr()->GetSttPos(), - _GetCrsr()->Start() ); - const SwFootnoteBossFrm* pFootnoteBoss; - bool bSkip = pFrm && pFrm->IsInFootnote(); - while( pFrm && nullptr != ( pFootnoteBoss = pFrm->FindFootnoteBossFrm() ) ) + const SwFrame *pFrame = pTextNd->getLayoutFrame( GetLayout(), &_GetCursor()->GetSttPos(), + _GetCursor()->Start() ); + const SwFootnoteBossFrame* pFootnoteBoss; + bool bSkip = pFrame && pFrame->IsInFootnote(); + while( pFrame && nullptr != ( pFootnoteBoss = pFrame->FindFootnoteBossFrame() ) ) { - if( nullptr != ( pFrm = pFootnoteBoss->FindFootnoteCont() ) ) + if( nullptr != ( pFrame = pFootnoteBoss->FindFootnoteCont() ) ) { if( bSkip ) bSkip = false; else { - const SwContentFrm* pCnt = static_cast<const SwLayoutFrm*> - (pFrm)->ContainsContent(); + const SwContentFrame* pCnt = static_cast<const SwLayoutFrame*> + (pFrame)->ContainsContent(); if( pCnt ) { const SwContentNode* pNode = pCnt->GetNode(); - _GetCrsr()->GetPoint()->nNode = *pNode; - _GetCrsr()->GetPoint()->nContent.Assign( + _GetCursor()->GetPoint()->nNode = *pNode; + _GetCursor()->GetPoint()->nContent.Assign( const_cast<SwContentNode*>(pNode), - static_cast<const SwTextFrm*>(pCnt)->GetOfst() ); - UpdateCrsr( SwCrsrShell::SCROLLWIN | - SwCrsrShell::CHKRANGE | SwCrsrShell::READONLY ); + static_cast<const SwTextFrame*>(pCnt)->GetOfst() ); + UpdateCursor( SwCursorShell::SCROLLWIN | + SwCursorShell::CHKRANGE | SwCursorShell::READONLY ); bRet = true; break; } } } - if( pFootnoteBoss->GetNext() && !pFootnoteBoss->IsPageFrm() ) - pFrm = pFootnoteBoss->GetNext(); + if( pFootnoteBoss->GetNext() && !pFootnoteBoss->IsPageFrame() ) + pFrame = pFootnoteBoss->GetNext(); else - pFrm = pFootnoteBoss->GetUpper(); + pFrame = pFootnoteBoss->GetUpper(); } } } @@ -134,7 +134,7 @@ bool SwCursor::GotoFootnoteAnchor() if( nullptr != ( pTextFootnote = rFootnoteArr[ n ])->GetStartNode() && pSttNd == &pTextFootnote->GetStartNode()->GetNode() ) { - SwCrsrSaveState aSaveState( *this ); + SwCursorSaveState aSaveState( *this ); SwTextNode& rTNd = (SwTextNode&)pTextFootnote->GetTextNode(); GetPoint()->nNode = rTNd; @@ -147,17 +147,17 @@ bool SwCursor::GotoFootnoteAnchor() return false; } -bool SwCrsrShell::GotoFootnoteAnchor() +bool SwCursorShell::GotoFootnoteAnchor() { // jump from footnote to anchor - SwCallLink aLk( *this ); // watch Crsr-Moves - bool bRet = m_pCurCrsr->GotoFootnoteAnchor(); + SwCallLink aLk( *this ); // watch Cursor-Moves + bool bRet = m_pCurrentCursor->GotoFootnoteAnchor(); if( bRet ) { // special treatment for table header row - m_pCurCrsr->GetPtPos() = Point(); - UpdateCrsr( SwCrsrShell::SCROLLWIN | SwCrsrShell::CHKRANGE | - SwCrsrShell::READONLY ); + m_pCurrentCursor->GetPtPos() = Point(); + UpdateCursor( SwCursorShell::SCROLLWIN | SwCursorShell::CHKRANGE | + SwCursorShell::READONLY ); } return bRet; } @@ -223,7 +223,7 @@ bool SwCursor::GotoNextFootnoteAnchor() bool bRet = nullptr != pTextFootnote; if( bRet ) { - SwCrsrSaveState aSaveState( *this ); + SwCursorSaveState aSaveState( *this ); SwTextNode& rTNd = (SwTextNode&)pTextFootnote->GetTextNode(); GetPoint()->nNode = rTNd; @@ -280,7 +280,7 @@ bool SwCursor::GotoPrevFootnoteAnchor() bool bRet = nullptr != pTextFootnote; if( bRet ) { - SwCrsrSaveState aSaveState( *this ); + SwCursorSaveState aSaveState( *this ); SwTextNode& rTNd = (SwTextNode&)pTextFootnote->GetTextNode(); GetPoint()->nNode = rTNd; @@ -290,49 +290,49 @@ bool SwCursor::GotoPrevFootnoteAnchor() return bRet; } -bool SwCrsrShell::GotoNextFootnoteAnchor() +bool SwCursorShell::GotoNextFootnoteAnchor() { - return CallCrsrFN( &SwCursor::GotoNextFootnoteAnchor ); + return CallCursorFN( &SwCursor::GotoNextFootnoteAnchor ); } -bool SwCrsrShell::GotoPrevFootnoteAnchor() +bool SwCursorShell::GotoPrevFootnoteAnchor() { - return CallCrsrFN( &SwCursor::GotoPrevFootnoteAnchor ); + return CallCursorFN( &SwCursor::GotoPrevFootnoteAnchor ); } /// jump from border to anchor -bool SwCrsrShell::GotoFlyAnchor() +bool SwCursorShell::GotoFlyAnchor() { SET_CURR_SHELL( this ); - const SwFrm* pFrm = GetCurrFrm(); + const SwFrame* pFrame = GetCurrFrame(); do { - pFrm = pFrm->GetUpper(); - } while( pFrm && !pFrm->IsFlyFrm() ); + pFrame = pFrame->GetUpper(); + } while( pFrame && !pFrame->IsFlyFrame() ); - if( !pFrm ) // no FlyFrame + if( !pFrame ) // no FlyFrame return false; - SwCallLink aLk( *this ); // watch Crsr-Moves - SwCrsrSaveState aSaveState( *m_pCurCrsr ); + SwCallLink aLk( *this ); // watch Cursor-Moves + SwCursorSaveState aSaveState( *m_pCurrentCursor ); // jump in BodyFrame closest to FlyFrame SwRect aTmpRect( m_aCharRect ); - if( !pFrm->Frm().IsInside( aTmpRect )) - aTmpRect = pFrm->Frm(); + if( !pFrame->Frame().IsInside( aTmpRect )) + aTmpRect = pFrame->Frame(); Point aPt( aTmpRect.Left(), aTmpRect.Top() + ( aTmpRect.Bottom() - aTmpRect.Top() ) / 2 ); - aPt.setX(aPt.getX() > (pFrm->Frm().Left() + (pFrm->Frm().SSize().Width() / 2 )) - ? pFrm->Frm().Right() - : pFrm->Frm().Left()); + aPt.setX(aPt.getX() > (pFrame->Frame().Left() + (pFrame->Frame().SSize().Width() / 2 )) + ? pFrame->Frame().Right() + : pFrame->Frame().Left()); - const SwPageFrm* pPageFrm = pFrm->FindPageFrm(); - const SwContentFrm* pFndFrm = pPageFrm->GetContentPos( aPt, false, true ); - pFndFrm->GetCrsrOfst( m_pCurCrsr->GetPoint(), aPt ); + const SwPageFrame* pPageFrame = pFrame->FindPageFrame(); + const SwContentFrame* pFndFrame = pPageFrame->GetContentPos( aPt, false, true ); + pFndFrame->GetCursorOfst( m_pCurrentCursor->GetPoint(), aPt ); - bool bRet = !m_pCurCrsr->IsInProtectTable() && !m_pCurCrsr->IsSelOvr(); + bool bRet = !m_pCurrentCursor->IsInProtectTable() && !m_pCurrentCursor->IsSelOvr(); if( bRet ) - UpdateCrsr( SwCrsrShell::SCROLLWIN | SwCrsrShell::CHKRANGE | - SwCrsrShell::READONLY ); + UpdateCursor( SwCursorShell::SCROLLWIN | SwCursorShell::CHKRANGE | + SwCursorShell::READONLY ); return bRet; } diff --git a/sw/source/core/crsr/trvlreg.cxx b/sw/source/core/crsr/trvlreg.cxx index 6e332c5da6e8..2aef93f8a8ae 100644 --- a/sw/source/core/crsr/trvlreg.cxx +++ b/sw/source/core/crsr/trvlreg.cxx @@ -28,10 +28,10 @@ #include <section.hxx> #include <trvlreg.hxx> -bool GotoPrevRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion, +bool GotoPrevRegion( SwPaM& rCurrentCursor, SwPosRegion fnPosRegion, bool bInReadOnly ) { - SwNodeIndex aIdx( rCurCrsr.GetPoint()->nNode ); + SwNodeIndex aIdx( rCurrentCursor.GetPoint()->nNode ); SwSectionNode* pNd = aIdx.GetNode().FindSectionNode(); if( pNd ) aIdx.Assign( *pNd, - 1 ); @@ -60,7 +60,7 @@ bool GotoPrevRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion, --aIdx; continue; } - rCurCrsr.GetPoint()->nContent.Assign( pCNd, 0 ); + rCurrentCursor.GetPoint()->nContent.Assign( pCNd, 0 ); } else { @@ -72,19 +72,19 @@ bool GotoPrevRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion, aIdx.Assign( *pNd, - 1 ); continue; } - rCurCrsr.GetPoint()->nContent.Assign( pCNd, pCNd->Len() ); + rCurrentCursor.GetPoint()->nContent.Assign( pCNd, pCNd->Len() ); } - rCurCrsr.GetPoint()->nNode = aIdx; + rCurrentCursor.GetPoint()->nNode = aIdx; return true; } } while( pNd ); return false; } -bool GotoNextRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion, +bool GotoNextRegion( SwPaM& rCurrentCursor, SwPosRegion fnPosRegion, bool bInReadOnly ) { - SwNodeIndex aIdx( rCurCrsr.GetPoint()->nNode ); + SwNodeIndex aIdx( rCurrentCursor.GetPoint()->nNode ); SwSectionNode* pNd = aIdx.GetNode().FindSectionNode(); if( pNd ) aIdx.Assign( *pNd->EndOfSectionNode(), - 1 ); @@ -114,7 +114,7 @@ bool GotoNextRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion, aIdx.Assign( *pNd->EndOfSectionNode(), +1 ); continue; } - rCurCrsr.GetPoint()->nContent.Assign( pCNd, 0 ); + rCurrentCursor.GetPoint()->nContent.Assign( pCNd, 0 ); } else { @@ -126,23 +126,23 @@ bool GotoNextRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion, ++aIdx; continue; } - rCurCrsr.GetPoint()->nContent.Assign( pCNd, pCNd->Len() ); + rCurrentCursor.GetPoint()->nContent.Assign( pCNd, pCNd->Len() ); } - rCurCrsr.GetPoint()->nNode = aIdx; + rCurrentCursor.GetPoint()->nNode = aIdx; return true; } } while( pNd ); return false; } -bool GotoCurrRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion, +bool GotoCurrRegion( SwPaM& rCurrentCursor, SwPosRegion fnPosRegion, bool bInReadOnly ) { - SwSectionNode* pNd = rCurCrsr.GetNode().FindSectionNode(); + SwSectionNode* pNd = rCurrentCursor.GetNode().FindSectionNode(); if( !pNd ) return false; - SwPosition* pPos = rCurCrsr.GetPoint(); + SwPosition* pPos = rCurrentCursor.GetPoint(); bool bMoveBackward = fnPosRegion == fnMoveBackward; SwContentNode* pCNd; @@ -165,15 +165,15 @@ bool GotoCurrRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion, return nullptr != pCNd; } -bool GotoCurrRegionAndSkip( SwPaM& rCurCrsr, SwPosRegion fnPosRegion, +bool GotoCurrRegionAndSkip( SwPaM& rCurrentCursor, SwPosRegion fnPosRegion, bool bInReadOnly ) { - SwNode& rCurrNd = rCurCrsr.GetNode(); + SwNode& rCurrNd = rCurrentCursor.GetNode(); SwSectionNode* pNd = rCurrNd.FindSectionNode(); if( !pNd ) return false; - SwPosition* pPos = rCurCrsr.GetPoint(); + SwPosition* pPos = rCurrentCursor.GetPoint(); const sal_Int32 nCurrCnt = pPos->nContent.GetIndex(); bool bMoveBackward = fnPosRegion == fnMoveBackward; @@ -212,7 +212,7 @@ bool GotoCurrRegionAndSkip( SwPaM& rCurCrsr, SwPosRegion fnPosRegion, bool SwCursor::MoveRegion( SwWhichRegion fnWhichRegion, SwPosRegion fnPosRegion ) { - SwCrsrSaveState aSaveState( *this ); + SwCursorSaveState aSaveState( *this ); return !dynamic_cast<SwTableCursor*>(this) && (*fnWhichRegion)( *this, fnPosRegion, IsReadOnlyAvailable() ) && !IsSelOvr() && @@ -220,12 +220,12 @@ bool SwCursor::MoveRegion( SwWhichRegion fnWhichRegion, SwPosRegion fnPosRegion GetPoint()->nContent.GetIndex() != m_pSavePos->nContent); } -bool SwCrsrShell::MoveRegion( SwWhichRegion fnWhichRegion, SwPosRegion fnPosRegion ) +bool SwCursorShell::MoveRegion( SwWhichRegion fnWhichRegion, SwPosRegion fnPosRegion ) { - SwCallLink aLk( *this ); // watch Crsr-Moves;call Link if needed - bool bRet = !m_pTableCrsr && m_pCurCrsr->MoveRegion( fnWhichRegion, fnPosRegion ); + SwCallLink aLk( *this ); // watch Cursor-Moves;call Link if needed + bool bRet = !m_pTableCursor && m_pCurrentCursor->MoveRegion( fnWhichRegion, fnPosRegion ); if( bRet ) - UpdateCrsr(); + UpdateCursor(); return bRet; } @@ -244,7 +244,7 @@ bool SwCursor::GotoRegion( const OUString& rName ) pIdx->GetNode().GetNodes().IsDocNodes() ) { // area in normal nodes array - SwCrsrSaveState aSaveState( *this ); + SwCursorSaveState aSaveState( *this ); GetPoint()->nNode = *pIdx; Move( fnMoveForward, fnGoContent ); @@ -254,13 +254,13 @@ bool SwCursor::GotoRegion( const OUString& rName ) return bRet; } -bool SwCrsrShell::GotoRegion( const OUString& rName ) +bool SwCursorShell::GotoRegion( const OUString& rName ) { - SwCallLink aLk( *this ); // watch Crsr-Moves;call Link if needed - bool bRet = !m_pTableCrsr && m_pCurCrsr->GotoRegion( rName ); + SwCallLink aLk( *this ); // watch Cursor-Moves;call Link if needed + bool bRet = !m_pTableCursor && m_pCurrentCursor->GotoRegion( rName ); if( bRet ) - UpdateCrsr( SwCrsrShell::SCROLLWIN | SwCrsrShell::CHKRANGE | - SwCrsrShell::READONLY ); + UpdateCursor( SwCursorShell::SCROLLWIN | SwCursorShell::CHKRANGE | + SwCursorShell::READONLY ); return bRet; } diff --git a/sw/source/core/crsr/trvltbl.cxx b/sw/source/core/crsr/trvltbl.cxx index 8e3dbe6b7d1b..1aa1e581bf68 100644 --- a/sw/source/core/crsr/trvltbl.cxx +++ b/sw/source/core/crsr/trvltbl.cxx @@ -41,32 +41,32 @@ #include <IDocumentLayoutAccess.hxx> /// set cursor into next/previous cell -bool SwCrsrShell::GoNextCell( bool bAppendLine ) +bool SwCursorShell::GoNextCell( bool bAppendLine ) { bool bRet = false; const SwTableNode* pTableNd = nullptr; - if( IsTableMode() || nullptr != ( pTableNd = IsCrsrInTable() )) + if( IsTableMode() || nullptr != ( pTableNd = IsCursorInTable() )) { - SwCursor* pCrsr = m_pTableCrsr ? m_pTableCrsr : m_pCurCrsr; - SwCallLink aLk( *this ); // watch Crsr-Moves + SwCursor* pCursor = m_pTableCursor ? m_pTableCursor : m_pCurrentCursor; + SwCallLink aLk( *this ); // watch Cursor-Moves bRet = true; // Check if we have to move the cursor to a covered cell before // proceeding: - const SwNode* pTableBoxStartNode = pCrsr->GetNode().FindTableBoxStartNode(); + const SwNode* pTableBoxStartNode = pCursor->GetNode().FindTableBoxStartNode(); const SwTableBox* pTableBox = nullptr; - if ( pCrsr->GetCrsrRowSpanOffset() ) + if ( pCursor->GetCursorRowSpanOffset() ) { pTableBox = pTableBoxStartNode->GetTableBox(); if ( pTableBox->getRowSpan() > 1 ) { if ( !pTableNd ) - pTableNd = IsCrsrInTable(); + pTableNd = IsCursorInTable(); assert (pTableNd); pTableBox = & pTableBox->FindEndOfRowSpan( pTableNd->GetTable(), - (sal_uInt16)(pTableBox->getRowSpan() + pCrsr->GetCrsrRowSpanOffset() ) ); + (sal_uInt16)(pTableBox->getRowSpan() + pCursor->GetCursorRowSpanOffset() ) ); pTableBoxStartNode = pTableBox->GetSttNd(); } } @@ -77,14 +77,14 @@ bool SwCrsrShell::GoNextCell( bool bAppendLine ) // there is another cell if( !aCellStt.GetNode().IsStartNode() ) { - if( pCrsr->HasMark() || !bAppendLine ) + if( pCursor->HasMark() || !bAppendLine ) bRet = false; else if (pTableNd) { // if there is no list anymore then create new one if ( !pTableBox ) pTableBox = pTableNd->GetTable().GetTableBox( - pCrsr->GetPoint()->nNode.GetNode(). + pCursor->GetPoint()->nNode.GetNode(). StartOfSectionIndex() ); OSL_ENSURE( pTableBox, "Box is not in this table" ); @@ -96,48 +96,48 @@ bool SwCrsrShell::GoNextCell( bool bAppendLine ) static_cast<SwEditShell*>(this)->EndAllAction(); } } - if( bRet && ( bRet = pCrsr->GoNextCell() ) ) - UpdateCrsr(); + if( bRet && ( bRet = pCursor->GoNextCell() ) ) + UpdateCursor(); } return bRet; } -bool SwCrsrShell::GoPrevCell() +bool SwCursorShell::GoPrevCell() { bool bRet = false; - if( IsTableMode() || IsCrsrInTable() ) + if( IsTableMode() || IsCursorInTable() ) { - SwCursor* pCrsr = m_pTableCrsr ? m_pTableCrsr : m_pCurCrsr; - SwCallLink aLk( *this ); // watch Crsr-Moves - bRet = pCrsr->GoPrevCell(); + SwCursor* pCursor = m_pTableCursor ? m_pTableCursor : m_pCurrentCursor; + SwCallLink aLk( *this ); // watch Cursor-Moves + bRet = pCursor->GoPrevCell(); if( bRet ) - UpdateCrsr(); // update current cursor + UpdateCursor(); // update current cursor } return bRet; } -static const SwFrm* lcl_FindMostUpperCellFrm( const SwFrm* pFrm ) +static const SwFrame* lcl_FindMostUpperCellFrame( const SwFrame* pFrame ) { - while ( pFrm && - ( !pFrm->IsCellFrm() || - !pFrm->GetUpper()->GetUpper()->IsTabFrm() || - pFrm->GetUpper()->GetUpper()->GetUpper()->IsInTab() ) ) + while ( pFrame && + ( !pFrame->IsCellFrame() || + !pFrame->GetUpper()->GetUpper()->IsTabFrame() || + pFrame->GetUpper()->GetUpper()->GetUpper()->IsInTab() ) ) { - pFrm = pFrm->GetUpper(); + pFrame = pFrame->GetUpper(); } - return pFrm; + return pFrame; } -bool SwCrsrShell::_SelTableRowOrCol( bool bRow, bool bRowSimple ) +bool SwCursorShell::_SelTableRowOrCol( bool bRow, bool bRowSimple ) { // check if the current cursor's SPoint/Mark are in a table - SwFrm *pFrm = GetCurrFrm(); - if( !pFrm->IsInTab() ) + SwFrame *pFrame = GetCurrFrame(); + if( !pFrame->IsInTab() ) return false; - const SwTabFrm* pTabFrm = pFrm->FindTabFrm(); - const SwTabFrm* pMasterTabFrm = pTabFrm->IsFollow() ? pTabFrm->FindMaster( true ) : pTabFrm; - const SwTable* pTable = pTabFrm->GetTable(); + const SwTabFrame* pTabFrame = pFrame->FindTabFrame(); + const SwTabFrame* pMasterTabFrame = pTabFrame->IsFollow() ? pTabFrame->FindMaster( true ) : pTabFrame; + const SwTable* pTable = pTabFrame->GetTable(); SET_CURR_SHELL( this ); @@ -165,9 +165,9 @@ bool SwCrsrShell::_SelTableRowOrCol( bool bRow, bool bRowSimple ) // #i32329# Enhanced table selection else if ( pTable->IsNewModel() ) { - const SwShellCrsr *pCrsr = _GetCrsr(); + const SwShellCursor *pCursor = _GetCursor(); SwTable::SearchType eSearchType = bRow ? SwTable::SEARCH_ROW : SwTable::SEARCH_COL; - pTable->CreateSelection( *pCrsr, aBoxes, eSearchType, bCheckProtected ); + pTable->CreateSelection( *pCursor, aBoxes, eSearchType, bCheckProtected ); if( aBoxes.empty() ) return false; @@ -176,21 +176,21 @@ bool SwCrsrShell::_SelTableRowOrCol( bool bRow, bool bRowSimple ) } else { - const SwShellCrsr *pCrsr = _GetCrsr(); - const SwFrm* pStartFrm = pFrm; - const SwContentNode *pCNd = pCrsr->GetContentNode( false ); - const SwFrm* pEndFrm = pCNd ? pCNd->getLayoutFrm( GetLayout(), &pCrsr->GetMkPos() ) : nullptr; + const SwShellCursor *pCursor = _GetCursor(); + const SwFrame* pStartFrame = pFrame; + const SwContentNode *pCNd = pCursor->GetContentNode( false ); + const SwFrame* pEndFrame = pCNd ? pCNd->getLayoutFrame( GetLayout(), &pCursor->GetMkPos() ) : nullptr; if ( bRow ) { - pStartFrm = lcl_FindMostUpperCellFrm( pStartFrm ); - pEndFrm = lcl_FindMostUpperCellFrm( pEndFrm ); + pStartFrame = lcl_FindMostUpperCellFrame( pStartFrame ); + pEndFrame = lcl_FindMostUpperCellFrame( pEndFrame ); } - if ( !pStartFrm || !pEndFrm ) + if ( !pStartFrame || !pEndFrame ) return false; - const bool bVert = pFrm->ImplFindTabFrm()->IsVertical(); + const bool bVert = pFrame->ImplFindTabFrame()->IsVertical(); // If we select upwards it is sufficient to set pStt and pEnd // to the first resp. last box of the selection obtained from @@ -198,10 +198,10 @@ bool SwCrsrShell::_SelTableRowOrCol( bool bRow, bool bRowSimple ) // located at the corners of the selection. This does not work // for column selections in vertical tables: const bool bSelectUp = ( bVert && !bRow ) || - *pCrsr->GetPoint() <= *pCrsr->GetMark(); - SwCellFrms aCells; - GetTableSel( static_cast<const SwCellFrm*>(pStartFrm), - static_cast<const SwCellFrm*>(pEndFrm), + *pCursor->GetPoint() <= *pCursor->GetMark(); + SwCellFrames aCells; + GetTableSel( static_cast<const SwCellFrame*>(pStartFrame), + static_cast<const SwCellFrame*>(pEndFrame), aBoxes, bSelectUp ? nullptr : &aCells, eType ); if( aBoxes.empty() || ( !bSelectUp && 4 != aCells.size() ) ) @@ -222,81 +222,81 @@ bool SwCrsrShell::_SelTableRowOrCol( bool bRow, bool bRowSimple ) } // if no table cursor exists, create one - if( !m_pTableCrsr ) + if( !m_pTableCursor ) { - m_pTableCrsr = new SwShellTableCrsr( *this, *m_pCurCrsr->GetPoint() ); - m_pCurCrsr->DeleteMark(); - m_pCurCrsr->SwSelPaintRects::Hide(); + m_pTableCursor = new SwShellTableCursor( *this, *m_pCurrentCursor->GetPoint() ); + m_pCurrentCursor->DeleteMark(); + m_pCurrentCursor->SwSelPaintRects::Hide(); } - m_pTableCrsr->DeleteMark(); + m_pTableCursor->DeleteMark(); // set start and end of a column - m_pTableCrsr->GetPoint()->nNode = *pEnd->GetSttNd(); - m_pTableCrsr->Move( fnMoveForward, fnGoContent ); - m_pTableCrsr->SetMark(); - m_pTableCrsr->GetPoint()->nNode = *pStt->GetSttNd()->EndOfSectionNode(); - m_pTableCrsr->Move( fnMoveBackward, fnGoContent ); + m_pTableCursor->GetPoint()->nNode = *pEnd->GetSttNd(); + m_pTableCursor->Move( fnMoveForward, fnGoContent ); + m_pTableCursor->SetMark(); + m_pTableCursor->GetPoint()->nNode = *pStt->GetSttNd()->EndOfSectionNode(); + m_pTableCursor->Move( fnMoveBackward, fnGoContent ); // set PtPos 'close' to the reference table, otherwise we might get problems - // with the repeated headlines check in UpdateCrsr(): + // with the repeated headlines check in UpdateCursor(): if ( !bRow ) - m_pTableCrsr->GetPtPos() = pMasterTabFrm->IsVertical() - ? pMasterTabFrm->Frm().TopRight() - : pMasterTabFrm->Frm().TopLeft(); + m_pTableCursor->GetPtPos() = pMasterTabFrame->IsVertical() + ? pMasterTabFrame->Frame().TopRight() + : pMasterTabFrame->Frame().TopLeft(); - UpdateCrsr(); + UpdateCursor(); return true; } -bool SwCrsrShell::SelTable() +bool SwCursorShell::SelTable() { // check if the current cursor's SPoint/Mark are in a table - SwFrm *pFrm = GetCurrFrm(); - if( !pFrm->IsInTab() ) + SwFrame *pFrame = GetCurrFrame(); + if( !pFrame->IsInTab() ) return false; - const SwTabFrm *pTableFrm = pFrm->ImplFindTabFrm(); - const SwTabFrm* pMasterTabFrm = pTableFrm->IsFollow() ? pTableFrm->FindMaster( true ) : pTableFrm; - const SwTableNode* pTableNd = pTableFrm->GetTable()->GetTableNode(); + const SwTabFrame *pTableFrame = pFrame->ImplFindTabFrame(); + const SwTabFrame* pMasterTabFrame = pTableFrame->IsFollow() ? pTableFrame->FindMaster( true ) : pTableFrame; + const SwTableNode* pTableNd = pTableFrame->GetTable()->GetTableNode(); SET_CURR_SHELL( this ); - if( !m_pTableCrsr ) + if( !m_pTableCursor ) { - m_pTableCrsr = new SwShellTableCrsr( *this, *m_pCurCrsr->GetPoint() ); - m_pCurCrsr->DeleteMark(); - m_pCurCrsr->SwSelPaintRects::Hide(); + m_pTableCursor = new SwShellTableCursor( *this, *m_pCurrentCursor->GetPoint() ); + m_pCurrentCursor->DeleteMark(); + m_pCurrentCursor->SwSelPaintRects::Hide(); } - m_pTableCrsr->DeleteMark(); - m_pTableCrsr->GetPoint()->nNode = *pTableNd; - m_pTableCrsr->Move( fnMoveForward, fnGoContent ); - m_pTableCrsr->SetMark(); + m_pTableCursor->DeleteMark(); + m_pTableCursor->GetPoint()->nNode = *pTableNd; + m_pTableCursor->Move( fnMoveForward, fnGoContent ); + m_pTableCursor->SetMark(); // set MkPos 'close' to the master table, otherwise we might get problems - // with the repeated headlines check in UpdateCrsr(): - m_pTableCrsr->GetMkPos() = pMasterTabFrm->IsVertical() ? pMasterTabFrm->Frm().TopRight() : pMasterTabFrm->Frm().TopLeft(); - m_pTableCrsr->GetPoint()->nNode = *pTableNd->EndOfSectionNode(); - m_pTableCrsr->Move( fnMoveBackward, fnGoContent ); - UpdateCrsr(); + // with the repeated headlines check in UpdateCursor(): + m_pTableCursor->GetMkPos() = pMasterTabFrame->IsVertical() ? pMasterTabFrame->Frame().TopRight() : pMasterTabFrame->Frame().TopLeft(); + m_pTableCursor->GetPoint()->nNode = *pTableNd->EndOfSectionNode(); + m_pTableCursor->Move( fnMoveBackward, fnGoContent ); + UpdateCursor(); return true; } -bool SwCrsrShell::SelTableBox() +bool SwCursorShell::SelTableBox() { // if we're in a table, create a table cursor, and select the cell // that the current cursor's point resides in // search for start node of our table box. If not found, exit really const SwStartNode* pStartNode = - m_pCurCrsr->GetPoint()->nNode.GetNode().FindTableBoxStartNode(); + m_pCurrentCursor->GetPoint()->nNode.GetNode().FindTableBoxStartNode(); #if OSL_DEBUG_LEVEL > 0 // the old code checks whether we're in a table by asking the // frame. This should yield the same result as searching for the // table box start node, right? - SwFrm *pFrm = GetCurrFrm(); - OSL_ENSURE( !pFrm->IsInTab() == !(pStartNode != nullptr), + SwFrame *pFrame = GetCurrFrame(); + OSL_ENSURE( !pFrame->IsInTab() == !(pStartNode != nullptr), "Schroedinger's table: We're in a box, and also we aren't." ); #endif if( pStartNode == nullptr ) @@ -305,30 +305,30 @@ bool SwCrsrShell::SelTableBox() SET_CURR_SHELL( this ); // create a table cursor, if there isn't one already - if( !m_pTableCrsr ) + if( !m_pTableCursor ) { - m_pTableCrsr = new SwShellTableCrsr( *this, *m_pCurCrsr->GetPoint() ); - m_pCurCrsr->DeleteMark(); - m_pCurCrsr->SwSelPaintRects::Hide(); + m_pTableCursor = new SwShellTableCursor( *this, *m_pCurrentCursor->GetPoint() ); + m_pCurrentCursor->DeleteMark(); + m_pCurrentCursor->SwSelPaintRects::Hide(); } - // select the complete box with our shiny new m_pTableCrsr + // select the complete box with our shiny new m_pTableCursor // 1. delete mark, and move point to first content node in box - m_pTableCrsr->DeleteMark(); - *(m_pTableCrsr->GetPoint()) = SwPosition( *pStartNode ); - m_pTableCrsr->Move( fnMoveForward, fnGoNode ); + m_pTableCursor->DeleteMark(); + *(m_pTableCursor->GetPoint()) = SwPosition( *pStartNode ); + m_pTableCursor->Move( fnMoveForward, fnGoNode ); // 2. set mark, and move point to last content node in box - m_pTableCrsr->SetMark(); - *(m_pTableCrsr->GetPoint()) = SwPosition( *(pStartNode->EndOfSectionNode()) ); - m_pTableCrsr->Move( fnMoveBackward, fnGoNode ); + m_pTableCursor->SetMark(); + *(m_pTableCursor->GetPoint()) = SwPosition( *(pStartNode->EndOfSectionNode()) ); + m_pTableCursor->Move( fnMoveBackward, fnGoNode ); // 3. exchange - m_pTableCrsr->Exchange(); + m_pTableCursor->Exchange(); - // with some luck, UpdateCrsr() will now update everything that + // with some luck, UpdateCursor() will now update everything that // needs updating - UpdateCrsr(); + UpdateCursor(); return true; } @@ -369,10 +369,10 @@ static bool lcl_FindNextCell( SwNodeIndex& rIdx, bool bInReadOnly ) if ( !pCNd ) return false; - SwContentFrm* pFrm = pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ); + SwContentFrame* pFrame = pCNd->getLayoutFrame( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ); - if ( nullptr == pFrm || pCNd->FindTableNode() != pTableNd || - (!bInReadOnly && pFrm->IsProtected() ) ) + if ( nullptr == pFrame || pCNd->FindTableNode() != pTableNd || + (!bInReadOnly && pFrame->IsProtected() ) ) { // we are not located inside a 'valid' cell. We have to continue searching... @@ -401,10 +401,10 @@ static bool lcl_FindNextCell( SwNodeIndex& rIdx, bool bInReadOnly ) return false; // check if we have found a suitable table cell: - pFrm = pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ); + pFrame = pCNd->getLayoutFrame( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ); - if ( nullptr != pFrm && pCNd->FindTableNode() == pTableNd && - (bInReadOnly || !pFrm->IsProtected() ) ) + if ( nullptr != pFrame && pCNd->FindTableNode() == pTableNd && + (bInReadOnly || !pFrame->IsProtected() ) ) { // finally, we have found a suitable table cell => set index and return rIdx = *pCNd; @@ -441,10 +441,10 @@ static bool lcl_FindPrevCell( SwNodeIndex& rIdx, bool bInReadOnly ) if ( !pCNd ) return false; - SwContentFrm* pFrm = pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ); + SwContentFrame* pFrame = pCNd->getLayoutFrame( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ); - if( nullptr == pFrm || pCNd->FindTableNode() != pTableNd || - (!bInReadOnly && pFrm->IsProtected() )) + if( nullptr == pFrame || pCNd->FindTableNode() != pTableNd || + (!bInReadOnly && pFrame->IsProtected() )) { // skip before current section aTmp.Assign( *pCNd->StartOfSectionNode(), -1 ); @@ -462,10 +462,10 @@ static bool lcl_FindPrevCell( SwNodeIndex& rIdx, bool bInReadOnly ) if ( !pCNd ) return false; - pFrm = pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ); + pFrame = pCNd->getLayoutFrame( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ); - if( nullptr != pFrm && pCNd->FindTableNode() == pTableNd && - (bInReadOnly || !pFrm->IsProtected() ) ) + if( nullptr != pFrame && pCNd->FindTableNode() == pTableNd && + (bInReadOnly || !pFrame->IsProtected() ) ) { rIdx = *pCNd; return true; // ok, not protected @@ -477,10 +477,10 @@ static bool lcl_FindPrevCell( SwNodeIndex& rIdx, bool bInReadOnly ) return true; } -bool GotoPrevTable( SwPaM& rCurCrsr, SwPosTable fnPosTable, +bool GotoPrevTable( SwPaM& rCurrentCursor, SwPosTable fnPosTable, bool bInReadOnly ) { - SwNodeIndex aIdx( rCurCrsr.GetPoint()->nNode ); + SwNodeIndex aIdx( rCurrentCursor.GetPoint()->nNode ); SwTableNode* pTableNd = aIdx.GetNode().FindTableNode(); if( pTableNd ) @@ -528,8 +528,8 @@ bool GotoPrevTable( SwPaM& rCurCrsr, SwPosTable fnPosTable, SwTextNode* pTextNode = aIdx.GetNode().GetTextNode(); if ( pTextNode ) { - rCurCrsr.GetPoint()->nNode = *pTextNode; - rCurCrsr.GetPoint()->nContent.Assign( pTextNode, fnPosTable == fnMoveBackward ? + rCurrentCursor.GetPoint()->nNode = *pTextNode; + rCurrentCursor.GetPoint()->nContent.Assign( pTextNode, fnPosTable == fnMoveBackward ? pTextNode->Len() : 0 ); } @@ -540,16 +540,16 @@ bool GotoPrevTable( SwPaM& rCurCrsr, SwPosTable fnPosTable, return false; } -bool GotoNextTable( SwPaM& rCurCrsr, SwPosTable fnPosTable, +bool GotoNextTable( SwPaM& rCurrentCursor, SwPosTable fnPosTable, bool bInReadOnly ) { - SwNodeIndex aIdx( rCurCrsr.GetPoint()->nNode ); + SwNodeIndex aIdx( rCurrentCursor.GetPoint()->nNode ); SwTableNode* pTableNd = aIdx.GetNode().FindTableNode(); if( pTableNd ) aIdx.Assign( *pTableNd->EndOfSectionNode(), 1 ); - sal_uLong nLastNd = rCurCrsr.GetDoc()->GetNodes().Count() - 1; + sal_uLong nLastNd = rCurrentCursor.GetDoc()->GetNodes().Count() - 1; do { while( aIdx.GetIndex() < nLastNd && nullptr == ( pTableNd = aIdx.GetNode().GetTableNode()) ) @@ -580,8 +580,8 @@ bool GotoNextTable( SwPaM& rCurCrsr, SwPosTable fnPosTable, SwTextNode* pTextNode = aIdx.GetNode().GetTextNode(); if ( pTextNode ) { - rCurCrsr.GetPoint()->nNode = *pTextNode; - rCurCrsr.GetPoint()->nContent.Assign( pTextNode, fnPosTable == fnMoveBackward ? + rCurrentCursor.GetPoint()->nNode = *pTextNode; + rCurrentCursor.GetPoint()->nContent.Assign( pTextNode, fnPosTable == fnMoveBackward ? pTextNode->Len() : 0 ); } @@ -592,10 +592,10 @@ bool GotoNextTable( SwPaM& rCurCrsr, SwPosTable fnPosTable, return false; } -bool GotoCurrTable( SwPaM& rCurCrsr, SwPosTable fnPosTable, +bool GotoCurrTable( SwPaM& rCurrentCursor, SwPosTable fnPosTable, bool bInReadOnly ) { - SwTableNode* pTableNd = rCurCrsr.GetPoint()->nNode.GetNode().FindTableNode(); + SwTableNode* pTableNd = rCurrentCursor.GetPoint()->nNode.GetNode().FindTableNode(); if( !pTableNd ) return false; @@ -617,8 +617,8 @@ bool GotoCurrTable( SwPaM& rCurCrsr, SwPosTable fnPosTable, if ( pTextNode ) { - rCurCrsr.GetPoint()->nNode = *pTextNode; - rCurCrsr.GetPoint()->nContent.Assign( pTextNode, fnPosTable == fnMoveBackward ? + rCurrentCursor.GetPoint()->nNode = *pTextNode; + rCurrentCursor.GetPoint()->nContent.Assign( pTextNode, fnPosTable == fnMoveBackward ? pTextNode->Len() : 0 ); } @@ -629,11 +629,11 @@ bool GotoCurrTable( SwPaM& rCurCrsr, SwPosTable fnPosTable, bool SwCursor::MoveTable( SwWhichTable fnWhichTable, SwPosTable fnPosTable ) { bool bRet = false; - SwTableCursor* m_pTableCrsr = dynamic_cast<SwTableCursor*>(this); + SwTableCursor* m_pTableCursor = dynamic_cast<SwTableCursor*>(this); - if( m_pTableCrsr || !HasMark() ) + if( m_pTableCursor || !HasMark() ) { - SwCrsrSaveState aSaveState( *this ); + SwCursorSaveState aSaveState( *this ); bRet = (*fnWhichTable)( *this, fnPosTable, IsReadOnlyAvailable() ) && !IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION | nsSwCursorSelOverFlags::SELOVER_TOGGLE ); @@ -641,62 +641,62 @@ bool SwCursor::MoveTable( SwWhichTable fnWhichTable, SwPosTable fnPosTable ) return bRet; } -bool SwCrsrShell::MoveTable( SwWhichTable fnWhichTable, SwPosTable fnPosTable ) +bool SwCursorShell::MoveTable( SwWhichTable fnWhichTable, SwPosTable fnPosTable ) { - SwCallLink aLk( *this ); // watch Crsr-Moves; call Link if needed + SwCallLink aLk( *this ); // watch Cursor-Moves; call Link if needed - SwShellCrsr* pCrsr = m_pTableCrsr ? m_pTableCrsr : m_pCurCrsr; + SwShellCursor* pCursor = m_pTableCursor ? m_pTableCursor : m_pCurrentCursor; bool bCheckPos; bool bRet; sal_uLong nPtNd = 0; sal_Int32 nPtCnt = 0; - if ( !m_pTableCrsr && m_pCurCrsr->HasMark() ) + if ( !m_pTableCursor && m_pCurrentCursor->HasMark() ) { // switch to table mode - m_pTableCrsr = new SwShellTableCrsr( *this, *m_pCurCrsr->GetPoint() ); - m_pCurCrsr->DeleteMark(); - m_pCurCrsr->SwSelPaintRects::Hide(); - m_pTableCrsr->SetMark(); - pCrsr = m_pTableCrsr; + m_pTableCursor = new SwShellTableCursor( *this, *m_pCurrentCursor->GetPoint() ); + m_pCurrentCursor->DeleteMark(); + m_pCurrentCursor->SwSelPaintRects::Hide(); + m_pTableCursor->SetMark(); + pCursor = m_pTableCursor; bCheckPos = false; } else { bCheckPos = true; - nPtNd = pCrsr->GetPoint()->nNode.GetIndex(); - nPtCnt = pCrsr->GetPoint()->nContent.GetIndex(); + nPtNd = pCursor->GetPoint()->nNode.GetIndex(); + nPtCnt = pCursor->GetPoint()->nContent.GetIndex(); } - bRet = pCrsr->MoveTable( fnWhichTable, fnPosTable ); + bRet = pCursor->MoveTable( fnWhichTable, fnPosTable ); if( bRet ) { // #i45028# - set "top" position for repeated headline rows - pCrsr->GetPtPos() = Point(); + pCursor->GetPtPos() = Point(); - UpdateCrsr(SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE|SwCrsrShell::READONLY); + UpdateCursor(SwCursorShell::SCROLLWIN|SwCursorShell::CHKRANGE|SwCursorShell::READONLY); if( bCheckPos && - pCrsr->GetPoint()->nNode.GetIndex() == nPtNd && - pCrsr->GetPoint()->nContent.GetIndex() == nPtCnt ) + pCursor->GetPoint()->nNode.GetIndex() == nPtNd && + pCursor->GetPoint()->nContent.GetIndex() == nPtCnt ) bRet = false; } return bRet; } -bool SwCrsrShell::IsTableComplexForChart() +bool SwCursorShell::IsTableComplexForChart() { bool bRet = false; // Here we may trigger table formatting so we better do that inside an action StartAction(); - const SwTableNode* pTNd = m_pCurCrsr->GetPoint()->nNode.GetNode().FindTableNode(); + const SwTableNode* pTNd = m_pCurrentCursor->GetPoint()->nNode.GetNode().FindTableNode(); if( pTNd ) { // in a table; check if table or section is balanced OUString sSel; - if( m_pTableCrsr ) + if( m_pTableCursor ) sSel = GetBoxNms(); bRet = pTNd->GetTable().IsTableComplexForChart( sSel ); } @@ -705,69 +705,69 @@ bool SwCrsrShell::IsTableComplexForChart() return bRet; } -OUString SwCrsrShell::GetBoxNms() const +OUString SwCursorShell::GetBoxNms() const { OUString sNm; const SwPosition* pPos; - SwFrm* pFrm; + SwFrame* pFrame; if( IsTableMode() ) { - SwContentNode *pCNd = m_pTableCrsr->Start()->nNode.GetNode().GetContentNode(); - pFrm = pCNd ? pCNd->getLayoutFrm( GetLayout() ) : nullptr; - if( !pFrm ) + SwContentNode *pCNd = m_pTableCursor->Start()->nNode.GetNode().GetContentNode(); + pFrame = pCNd ? pCNd->getLayoutFrame( GetLayout() ) : nullptr; + if( !pFrame ) return sNm; do { - pFrm = pFrm->GetUpper(); - } while ( pFrm && !pFrm->IsCellFrm() ); + pFrame = pFrame->GetUpper(); + } while ( pFrame && !pFrame->IsCellFrame() ); - OSL_ENSURE( pFrm, "no frame for this box" ); + OSL_ENSURE( pFrame, "no frame for this box" ); - if( !pFrm ) + if( !pFrame ) return sNm; - sNm = static_cast<SwCellFrm*>(pFrm)->GetTabBox()->GetName(); + sNm = static_cast<SwCellFrame*>(pFrame)->GetTabBox()->GetName(); sNm += ":"; - pPos = m_pTableCrsr->End(); + pPos = m_pTableCursor->End(); } else { - const SwTableNode* pTableNd = IsCrsrInTable(); + const SwTableNode* pTableNd = IsCursorInTable(); if( !pTableNd ) return sNm; - pPos = GetCrsr()->GetPoint(); + pPos = GetCursor()->GetPoint(); } SwContentNode* pCNd = pPos->nNode.GetNode().GetContentNode(); - pFrm = pCNd ? pCNd->getLayoutFrm( GetLayout() ) : nullptr; + pFrame = pCNd ? pCNd->getLayoutFrame( GetLayout() ) : nullptr; - if( pFrm ) + if( pFrame ) { do { - pFrm = pFrm->GetUpper(); - } while ( pFrm && !pFrm->IsCellFrm() ); + pFrame = pFrame->GetUpper(); + } while ( pFrame && !pFrame->IsCellFrame() ); - if( pFrm ) - sNm += static_cast<SwCellFrm*>(pFrm)->GetTabBox()->GetName(); + if( pFrame ) + sNm += static_cast<SwCellFrame*>(pFrame)->GetTabBox()->GetName(); } return sNm; } -bool SwCrsrShell::GotoTable( const OUString& rName ) +bool SwCursorShell::GotoTable( const OUString& rName ) { - SwCallLink aLk( *this ); // watch Crsr-Moves - bool bRet = !m_pTableCrsr && m_pCurCrsr->GotoTable( rName ); + SwCallLink aLk( *this ); // watch Cursor-Moves + bool bRet = !m_pTableCursor && m_pCurrentCursor->GotoTable( rName ); if( bRet ) { - m_pCurCrsr->GetPtPos() = Point(); - UpdateCrsr( SwCrsrShell::SCROLLWIN | SwCrsrShell::CHKRANGE | - SwCrsrShell::READONLY ); + m_pCurrentCursor->GetPtPos() = Point(); + UpdateCursor( SwCursorShell::SCROLLWIN | SwCursorShell::CHKRANGE | + SwCursorShell::READONLY ); } return bRet; } -bool SwCrsrShell::CheckTableBoxContent( const SwPosition* pPos ) +bool SwCursorShell::CheckTableBoxContent( const SwPosition* pPos ) { if( !m_pBoxIdx || !m_pBoxPtr || IsSelTableCells() || !IsAutoUpdateCells() ) return false; @@ -801,8 +801,8 @@ bool SwCrsrShell::CheckTableBoxContent( const SwPosition* pPos ) // cursor not anymore in this section? if( pChkBox && !pPos && - ( m_pCurCrsr->HasMark() || m_pCurCrsr->GetNext() != m_pCurCrsr || - pSttNd->GetIndex() + 1 == m_pCurCrsr->GetPoint()->nNode.GetIndex() )) + ( m_pCurrentCursor->HasMark() || m_pCurrentCursor->GetNext() != m_pCurrentCursor || + pSttNd->GetIndex() + 1 == m_pCurrentCursor->GetPoint()->nNode.GetIndex() )) pChkBox = nullptr; // Did the content of a box change at all? This is important if e.g. Undo @@ -830,13 +830,13 @@ bool SwCrsrShell::CheckTableBoxContent( const SwPosition* pPos ) return nullptr != pChkBox; } -void SwCrsrShell::SaveTableBoxContent( const SwPosition* pPos ) +void SwCursorShell::SaveTableBoxContent( const SwPosition* pPos ) { if( IsSelTableCells() || !IsAutoUpdateCells() ) return ; if( !pPos ) - pPos = m_pCurCrsr->GetPoint(); + pPos = m_pCurrentCursor->GetPoint(); SwStartNode* pSttNd = pPos->nNode.GetNode().FindSttNodeByType( SwTableBoxStartNode ); @@ -869,20 +869,20 @@ void SwCrsrShell::SaveTableBoxContent( const SwPosition* pPos ) } } -void SwCrsrShell::ClearTableBoxContent() +void SwCursorShell::ClearTableBoxContent() { delete m_pBoxIdx, m_pBoxIdx = nullptr; m_pBoxPtr = nullptr; } -bool SwCrsrShell::EndAllTableBoxEdit() +bool SwCursorShell::EndAllTableBoxEdit() { bool bRet = false; for(SwViewShell& rSh : GetRingContainer()) { - if( dynamic_cast<const SwCrsrShell *>(&rSh) != nullptr ) - bRet |= static_cast<SwCrsrShell*>(&rSh)->CheckTableBoxContent( - static_cast<SwCrsrShell*>(&rSh)->m_pCurCrsr->GetPoint() ); + if( dynamic_cast<const SwCursorShell *>(&rSh) != nullptr ) + bRet |= static_cast<SwCursorShell*>(&rSh)->CheckTableBoxContent( + static_cast<SwCursorShell*>(&rSh)->m_pCurrentCursor->GetPoint() ); } return bRet; diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx index 1c6135a26f3d..044083b0431e 100644 --- a/sw/source/core/crsr/viscrs.cxx +++ b/sw/source/core/crsr/viscrs.cxx @@ -59,7 +59,7 @@ #include <paintfrm.hxx> // Here static members are defined. They will get changed on alteration of the -// MapMode. This is done so that on ShowCrsr the same size does not have to be +// MapMode. This is done so that on ShowCursor the same size does not have to be // expensively determined again and again. long SwSelPaintRects::s_nPixPtX = 0; @@ -67,94 +67,94 @@ long SwSelPaintRects::s_nPixPtY = 0; MapMode* SwSelPaintRects::s_pMapMode = nullptr; // Starting from here: classes / methods for the non-text-cursor -SwVisCrsr::SwVisCrsr( const SwCrsrShell * pCShell ) - : m_pCrsrShell( pCShell ) +SwVisibleCursor::SwVisibleCursor( const SwCursorShell * pCShell ) + : m_pCursorShell( pCShell ) , m_nPageLastTime(0) { - pCShell->GetWin()->SetCursor( &m_aTextCrsr ); - m_bIsVisible = m_aTextCrsr.IsVisible(); - m_bIsDragCrsr = false; - m_aTextCrsr.SetWidth( 0 ); + pCShell->GetWin()->SetCursor( &m_aTextCursor ); + m_bIsVisible = m_aTextCursor.IsVisible(); + m_bIsDragCursor = false; + m_aTextCursor.SetWidth( 0 ); } -SwVisCrsr::~SwVisCrsr() +SwVisibleCursor::~SwVisibleCursor() { - if( m_bIsVisible && m_aTextCrsr.IsVisible() ) - m_aTextCrsr.Hide(); + if( m_bIsVisible && m_aTextCursor.IsVisible() ) + m_aTextCursor.Hide(); - m_pCrsrShell->GetWin()->SetCursor( nullptr ); + m_pCursorShell->GetWin()->SetCursor( nullptr ); } -void SwVisCrsr::Show() +void SwVisibleCursor::Show() { if( !m_bIsVisible ) { m_bIsVisible = true; // display at all? - if( m_pCrsrShell->VisArea().IsOver( m_pCrsrShell->m_aCharRect ) || m_pCrsrShell->isTiledRendering() ) + if( m_pCursorShell->VisArea().IsOver( m_pCursorShell->m_aCharRect ) || m_pCursorShell->isTiledRendering() ) _SetPosAndShow(); } } -void SwVisCrsr::Hide() +void SwVisibleCursor::Hide() { if( m_bIsVisible ) { m_bIsVisible = false; - if( m_aTextCrsr.IsVisible() ) // Shouldn't the flags be in effect? - m_aTextCrsr.Hide(); + if( m_aTextCursor.IsVisible() ) // Shouldn't the flags be in effect? + m_aTextCursor.Hide(); } } -void SwVisCrsr::_SetPosAndShow() +void SwVisibleCursor::_SetPosAndShow() { SwRect aRect; - long nTmpY = m_pCrsrShell->m_aCrsrHeight.getY(); + long nTmpY = m_pCursorShell->m_aCursorHeight.getY(); if( 0 > nTmpY ) { nTmpY = -nTmpY; - m_aTextCrsr.SetOrientation( 900 ); - aRect = SwRect( m_pCrsrShell->m_aCharRect.Pos(), - Size( m_pCrsrShell->m_aCharRect.Height(), nTmpY ) ); - aRect.Pos().setX(aRect.Pos().getX() + m_pCrsrShell->m_aCrsrHeight.getX()); - if( m_pCrsrShell->IsOverwriteCrsr() ) + m_aTextCursor.SetOrientation( 900 ); + aRect = SwRect( m_pCursorShell->m_aCharRect.Pos(), + Size( m_pCursorShell->m_aCharRect.Height(), nTmpY ) ); + aRect.Pos().setX(aRect.Pos().getX() + m_pCursorShell->m_aCursorHeight.getX()); + if( m_pCursorShell->IsOverwriteCursor() ) aRect.Pos().setY(aRect.Pos().getY() + aRect.Width()); } else { - m_aTextCrsr.SetOrientation(); - aRect = SwRect( m_pCrsrShell->m_aCharRect.Pos(), - Size( m_pCrsrShell->m_aCharRect.Width(), nTmpY ) ); - aRect.Pos().setY(aRect.Pos().getY() + m_pCrsrShell->m_aCrsrHeight.getX()); + m_aTextCursor.SetOrientation(); + aRect = SwRect( m_pCursorShell->m_aCharRect.Pos(), + Size( m_pCursorShell->m_aCharRect.Width(), nTmpY ) ); + aRect.Pos().setY(aRect.Pos().getY() + m_pCursorShell->m_aCursorHeight.getX()); } // check if cursor should show the current cursor bidi level - m_aTextCrsr.SetDirection(); - const SwCursor* pTmpCrsr = m_pCrsrShell->_GetCrsr(); + m_aTextCursor.SetDirection(); + const SwCursor* pTmpCursor = m_pCursorShell->_GetCursor(); - if ( pTmpCrsr && !m_pCrsrShell->IsOverwriteCrsr() ) + if ( pTmpCursor && !m_pCursorShell->IsOverwriteCursor() ) { - SwNode& rNode = pTmpCrsr->GetPoint()->nNode.GetNode(); + SwNode& rNode = pTmpCursor->GetPoint()->nNode.GetNode(); if( rNode.IsTextNode() ) { const SwTextNode& rTNd = *rNode.GetTextNode(); - const SwFrm* pFrm = rTNd.getLayoutFrm( m_pCrsrShell->GetLayout(), nullptr, nullptr, false ); - if ( pFrm ) + const SwFrame* pFrame = rTNd.getLayoutFrame( m_pCursorShell->GetLayout(), nullptr, nullptr, false ); + if ( pFrame ) { - const SwScriptInfo* pSI = static_cast<const SwTextFrm*>(pFrm)->GetScriptInfo(); + const SwScriptInfo* pSI = static_cast<const SwTextFrame*>(pFrame)->GetScriptInfo(); // cursor level has to be shown if ( pSI && pSI->CountDirChg() > 1 ) { - m_aTextCrsr.SetDirection( - ( pTmpCrsr->GetCrsrBidiLevel() % 2 ) ? + m_aTextCursor.SetDirection( + ( pTmpCursor->GetCursorBidiLevel() % 2 ) ? CursorDirection::RTL : CursorDirection::LTR ); } - if ( pFrm->IsRightToLeft() ) + if ( pFrame->IsRightToLeft() ) { - const OutputDevice *pOut = m_pCrsrShell->GetOut(); + const OutputDevice *pOut = m_pCursorShell->GetOut(); if ( pOut ) { long nSize = pOut->GetSettings().GetStyleSettings().GetCursorSize(); @@ -169,56 +169,56 @@ void SwVisCrsr::_SetPosAndShow() if( aRect.Height() ) { - ::SwCalcPixStatics( m_pCrsrShell->GetOut() ); - ::SwAlignRect( aRect, static_cast<SwViewShell const *>(m_pCrsrShell), m_pCrsrShell->GetOut() ); + ::SwCalcPixStatics( m_pCursorShell->GetOut() ); + ::SwAlignRect( aRect, static_cast<SwViewShell const *>(m_pCursorShell), m_pCursorShell->GetOut() ); } - if( !m_pCrsrShell->IsOverwriteCrsr() || m_bIsDragCrsr || - m_pCrsrShell->IsSelection() ) + if( !m_pCursorShell->IsOverwriteCursor() || m_bIsDragCursor || + m_pCursorShell->IsSelection() ) aRect.Width( 0 ); - m_aTextCrsr.SetSize( aRect.SSize() ); + m_aTextCursor.SetSize( aRect.SSize() ); - m_aTextCrsr.SetPos( aRect.Pos() ); + m_aTextCursor.SetPos( aRect.Pos() ); if (comphelper::LibreOfficeKit::isActive()) { // notify about page number change (if that happened) sal_uInt16 nPage, nVirtPage; - const_cast<SwCrsrShell*>(m_pCrsrShell)->GetPageNum(nPage, nVirtPage); + const_cast<SwCursorShell*>(m_pCursorShell)->GetPageNum(nPage, nVirtPage); if (nPage != m_nPageLastTime) { m_nPageLastTime = nPage; OString aPayload = OString::number(nPage - 1); - m_pCrsrShell->libreOfficeKitCallback(LOK_CALLBACK_SET_PART, aPayload.getStr()); + m_pCursorShell->libreOfficeKitCallback(LOK_CALLBACK_SET_PART, aPayload.getStr()); } // notify about the cursor position & size Rectangle aSVRect(aRect.Pos().getX(), aRect.Pos().getY(), aRect.Pos().getX() + aRect.SSize().Width(), aRect.Pos().getY() + aRect.SSize().Height()); OString sRect = aSVRect.toString(); if (comphelper::LibreOfficeKit::isViewCallback()) - m_pCrsrShell->GetSfxViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR, sRect.getStr()); + m_pCursorShell->GetSfxViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR, sRect.getStr()); else - m_pCrsrShell->libreOfficeKitCallback(LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR, sRect.getStr()); + m_pCursorShell->libreOfficeKitCallback(LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR, sRect.getStr()); } - if ( !m_pCrsrShell->IsCrsrReadonly() || m_pCrsrShell->GetViewOptions()->IsSelectionInReadonly() ) + if ( !m_pCursorShell->IsCursorReadonly() || m_pCursorShell->GetViewOptions()->IsSelectionInReadonly() ) { - if ( m_pCrsrShell->GetDrawView() ) - const_cast<SwDrawView*>(static_cast<const SwDrawView*>(m_pCrsrShell->GetDrawView()))->SetAnimationEnabled( - !m_pCrsrShell->IsSelection() ); + if ( m_pCursorShell->GetDrawView() ) + const_cast<SwDrawView*>(static_cast<const SwDrawView*>(m_pCursorShell->GetDrawView()))->SetAnimationEnabled( + !m_pCursorShell->IsSelection() ); - sal_uInt16 nStyle = m_bIsDragCrsr ? CURSOR_SHADOW : 0; - if( nStyle != m_aTextCrsr.GetStyle() ) + sal_uInt16 nStyle = m_bIsDragCursor ? CURSOR_SHADOW : 0; + if( nStyle != m_aTextCursor.GetStyle() ) { - m_aTextCrsr.SetStyle( nStyle ); - m_aTextCrsr.SetWindow( m_bIsDragCrsr ? m_pCrsrShell->GetWin() : nullptr ); + m_aTextCursor.SetStyle( nStyle ); + m_aTextCursor.SetWindow( m_bIsDragCursor ? m_pCursorShell->GetWin() : nullptr ); } - m_aTextCrsr.Show(); + m_aTextCursor.Show(); } } -SwSelPaintRects::SwSelPaintRects( const SwCrsrShell& rCSh ) +SwSelPaintRects::SwSelPaintRects( const SwCursorShell& rCSh ) : SwRects() , m_pCursorShell( &rCSh ) #if HAVE_FEATURE_DESKTOP @@ -284,15 +284,15 @@ void SwSelPaintRects::Hide() static SwRect lcl_getLayoutRect(const Point& rPoint, const SwPosition& rPosition) { const SwContentNode* pNode = rPosition.nNode.GetNode().GetContentNode(); - const SwContentFrm* pFrm = pNode->getLayoutFrm(pNode->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &rPoint, &rPosition); + const SwContentFrame* pFrame = pNode->getLayoutFrame(pNode->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &rPoint, &rPosition); SwRect aRect; - pFrm->GetCharRect(aRect, rPosition); + pFrame->GetCharRect(aRect, rPosition); return aRect; } -void SwShellCrsr::FillStartEnd(SwRect& rStart, SwRect& rEnd) const +void SwShellCursor::FillStartEnd(SwRect& rStart, SwRect& rEnd) const { - const SwShellCrsr* pCursor = GetShell()->getShellCrsr(false); + const SwShellCursor* pCursor = GetShell()->getShellCursor(false); rStart = lcl_getLayoutRect(pCursor->GetSttPos(), *pCursor->Start()); rEnd = lcl_getLayoutRect(pCursor->GetEndPos(), *pCursor->End()); } @@ -419,19 +419,19 @@ void SwSelPaintRects::HighlightInputField() if (m_bShowTextInputFieldOverlay) { - SwTextInputField* pCurTextInputFieldAtCrsr = - dynamic_cast<SwTextInputField*>(SwCrsrShell::GetTextFieldAtPos( GetShell()->GetCrsr()->Start(), false )); - if ( pCurTextInputFieldAtCrsr != nullptr ) + SwTextInputField* pCurTextInputFieldAtCursor = + dynamic_cast<SwTextInputField*>(SwCursorShell::GetTextFieldAtPos( GetShell()->GetCursor()->Start(), false )); + if ( pCurTextInputFieldAtCursor != nullptr ) { - SwTextNode* pTextNode = pCurTextInputFieldAtCrsr->GetpTextNode(); - std::unique_ptr<SwShellCrsr> pCrsrForInputTextField( - new SwShellCrsr( *GetShell(), SwPosition( *pTextNode, pCurTextInputFieldAtCrsr->GetStart() ) ) ); - pCrsrForInputTextField->SetMark(); - pCrsrForInputTextField->GetMark()->nNode = *pTextNode; - pCrsrForInputTextField->GetMark()->nContent.Assign( pTextNode, *(pCurTextInputFieldAtCrsr->End()) ); - - pCrsrForInputTextField->FillRects(); - SwRects* pRects = static_cast<SwRects*>(pCrsrForInputTextField.get()); + SwTextNode* pTextNode = pCurTextInputFieldAtCursor->GetpTextNode(); + std::unique_ptr<SwShellCursor> pCursorForInputTextField( + new SwShellCursor( *GetShell(), SwPosition( *pTextNode, pCurTextInputFieldAtCursor->GetStart() ) ) ); + pCursorForInputTextField->SetMark(); + pCursorForInputTextField->GetMark()->nNode = *pTextNode; + pCursorForInputTextField->GetMark()->nContent.Assign( pTextNode, *(pCurTextInputFieldAtCursor->End()) ); + + pCursorForInputTextField->FillRects(); + SwRects* pRects = static_cast<SwRects*>(pCursorForInputTextField.get()); for (size_t a(0); a < pRects->size(); ++a) { const SwRect aNextRect((*pRects)[a]); @@ -536,16 +536,16 @@ void SwSelPaintRects::Get1PixelInLogic( const SwViewShell& rSh, *pY = s_nPixPtY; } -SwShellCrsr::SwShellCrsr( - const SwCrsrShell& rCShell, +SwShellCursor::SwShellCursor( + const SwCursorShell& rCShell, const SwPosition &rPos ) : SwCursor(rPos,nullptr,false) , SwSelPaintRects(rCShell) , m_pInitialPoint(SwPaM::GetPoint()) {} -SwShellCrsr::SwShellCrsr( - const SwCrsrShell& rCShell, +SwShellCursor::SwShellCursor( + const SwCursorShell& rCShell, const SwPosition &rPos, const Point& rPtPos, SwPaM* pRing ) @@ -556,23 +556,23 @@ SwShellCrsr::SwShellCrsr( , m_pInitialPoint(SwPaM::GetPoint()) {} -SwShellCrsr::SwShellCrsr( SwShellCrsr& rICrsr ) - : SwCursor(rICrsr, &rICrsr) - , SwSelPaintRects(*rICrsr.GetShell()) - , m_MarkPt(rICrsr.GetMkPos()) - , m_PointPt(rICrsr.GetPtPos()) +SwShellCursor::SwShellCursor( SwShellCursor& rICursor ) + : SwCursor(rICursor, &rICursor) + , SwSelPaintRects(*rICursor.GetShell()) + , m_MarkPt(rICursor.GetMkPos()) + , m_PointPt(rICursor.GetPtPos()) , m_pInitialPoint(SwPaM::GetPoint()) {} -SwShellCrsr::~SwShellCrsr() +SwShellCursor::~SwShellCursor() {} -bool SwShellCrsr::IsReadOnlyAvailable() const +bool SwShellCursor::IsReadOnlyAvailable() const { return GetShell()->IsReadOnlyAvailable(); } -void SwShellCrsr::SetMark() +void SwShellCursor::SetMark() { if (SwPaM::GetPoint() == m_pInitialPoint) m_MarkPt = m_PointPt; @@ -581,26 +581,26 @@ void SwShellCrsr::SetMark() SwPaM::SetMark(); } -void SwShellCrsr::FillRects() +void SwShellCursor::FillRects() { // calculate the new rectangles if( HasMark() && GetPoint()->nNode.GetNode().IsContentNode() && - GetPoint()->nNode.GetNode().GetContentNode()->getLayoutFrm( GetShell()->GetLayout() ) && + GetPoint()->nNode.GetNode().GetContentNode()->getLayoutFrame( GetShell()->GetLayout() ) && (GetMark()->nNode == GetPoint()->nNode || (GetMark()->nNode.GetNode().IsContentNode() && - GetMark()->nNode.GetNode().GetContentNode()->getLayoutFrm( GetShell()->GetLayout() ) ) )) - GetShell()->GetLayout()->CalcFrmRects( *this ); + GetMark()->nNode.GetNode().GetContentNode()->getLayoutFrame( GetShell()->GetLayout() ) ) )) + GetShell()->GetLayout()->CalcFrameRects( *this ); } -void SwShellCrsr::Show() +void SwShellCursor::Show() { std::vector<OString> aSelectionRectangles; for(SwPaM& rPaM : GetRingContainer()) { - SwShellCrsr* pShCrsr = dynamic_cast<SwShellCrsr*>(&rPaM); - if(pShCrsr) - pShCrsr->SwSelPaintRects::Show(&aSelectionRectangles); + SwShellCursor* pShCursor = dynamic_cast<SwShellCursor*>(&rPaM); + if(pShCursor) + pShCursor->SwSelPaintRects::Show(&aSelectionRectangles); } if (comphelper::LibreOfficeKit::isActive()) @@ -623,34 +623,34 @@ void SwShellCrsr::Show() // This rectangle gets painted anew, therefore the SSelection in this // area is invalid. -void SwShellCrsr::Invalidate( const SwRect& rRect ) +void SwShellCursor::Invalidate( const SwRect& rRect ) { for(SwPaM& rPaM : GetRingContainer()) { - SwShellCrsr* pShCrsr = dynamic_cast<SwShellCrsr*>(&rPaM); - // skip any non SwShellCrsr objects in the ring + SwShellCursor* pShCursor = dynamic_cast<SwShellCursor*>(&rPaM); + // skip any non SwShellCursor objects in the ring // see also: SwAutoFormat::DeleteSel() - if(pShCrsr) - pShCrsr->SwSelPaintRects::Invalidate(rRect); + if(pShCursor) + pShCursor->SwSelPaintRects::Invalidate(rRect); } } -void SwShellCrsr::Hide() +void SwShellCursor::Hide() { for(SwPaM& rPaM : GetRingContainer()) { - SwShellCrsr* pShCrsr = dynamic_cast<SwShellCrsr*>(&rPaM); - if(pShCrsr) - pShCrsr->SwSelPaintRects::Hide(); + SwShellCursor* pShCursor = dynamic_cast<SwShellCursor*>(&rPaM); + if(pShCursor) + pShCursor->SwSelPaintRects::Hide(); } } -SwCursor* SwShellCrsr::Create( SwPaM* pRing ) const +SwCursor* SwShellCursor::Create( SwPaM* pRing ) const { - return new SwShellCrsr( *GetShell(), *GetPoint(), GetPtPos(), pRing ); + return new SwShellCursor( *GetShell(), *GetPoint(), GetPtPos(), pRing ); } -short SwShellCrsr::MaxReplaceArived() +short SwShellCursor::MaxReplaceArived() { short nRet = RET_YES; vcl::Window* pDlg = SwView::GetSearchDialog(); @@ -659,7 +659,7 @@ short SwShellCrsr::MaxReplaceArived() // Terminate old actions. The table-frames get constructed and // a SSelection can be created. std::vector<sal_uInt16> vActionCounts; - for(SwViewShell& rShell : const_cast< SwCrsrShell* >( GetShell() )->GetRingContainer()) + for(SwViewShell& rShell : const_cast< SwCursorShell* >( GetShell() )->GetRingContainer()) { sal_uInt16 nActCnt = 0; while(rShell.ActionPend()) @@ -672,7 +672,7 @@ short SwShellCrsr::MaxReplaceArived() nRet = ScopedVclPtrInstance<MessageDialog>::Create(pDlg, "AskSearchDialog", "modules/swriter/ui/asksearchdialog.ui")->Execute(); auto pActionCount = vActionCounts.begin(); - for(SwViewShell& rShell : const_cast< SwCrsrShell* >( GetShell() )->GetRingContainer()) + for(SwViewShell& rShell : const_cast< SwCursorShell* >( GetShell() )->GetRingContainer()) { while(*pActionCount) { @@ -689,19 +689,19 @@ short SwShellCrsr::MaxReplaceArived() return nRet; } -void SwShellCrsr::SaveTableBoxContent( const SwPosition* pPos ) +void SwShellCursor::SaveTableBoxContent( const SwPosition* pPos ) { - const_cast<SwCrsrShell*>(GetShell())->SaveTableBoxContent( pPos ); + const_cast<SwCursorShell*>(GetShell())->SaveTableBoxContent( pPos ); } -bool SwShellCrsr::UpDown( bool bUp, sal_uInt16 nCnt ) +bool SwShellCursor::UpDown( bool bUp, sal_uInt16 nCnt ) { return SwCursor::UpDown( bUp, nCnt, &GetPtPos(), GetShell()->GetUpDownX() ); } // if <true> than the cursor can be set to the position. -bool SwShellCrsr::IsAtValidPos( bool bPoint ) const +bool SwShellCursor::IsAtValidPos( bool bPoint ) const { if( GetShell() && ( GetShell()->IsAllProtect() || GetShell()->GetViewOptions()->IsReadonly() || @@ -712,16 +712,16 @@ bool SwShellCrsr::IsAtValidPos( bool bPoint ) const return SwCursor::IsAtValidPos( bPoint ); } -SwShellTableCrsr::SwShellTableCrsr( const SwCrsrShell& rCrsrSh, +SwShellTableCursor::SwShellTableCursor( const SwCursorShell& rCursorSh, const SwPosition& rPos ) - : SwCursor(rPos,nullptr,false), SwShellCrsr(rCrsrSh, rPos), SwTableCursor(rPos) + : SwCursor(rPos,nullptr,false), SwShellCursor(rCursorSh, rPos), SwTableCursor(rPos) { } -SwShellTableCrsr::SwShellTableCrsr( const SwCrsrShell& rCrsrSh, +SwShellTableCursor::SwShellTableCursor( const SwCursorShell& rCursorSh, const SwPosition& rMkPos, const Point& rMkPt, const SwPosition& rPtPos, const Point& rPtPt ) - : SwCursor(rPtPos,nullptr,false), SwShellCrsr(rCrsrSh, rPtPos), SwTableCursor(rPtPos) + : SwCursor(rPtPos,nullptr,false), SwShellCursor(rCursorSh, rPtPos), SwTableCursor(rPtPos) { SetMark(); *GetMark() = rMkPos; @@ -729,26 +729,26 @@ SwShellTableCrsr::SwShellTableCrsr( const SwCrsrShell& rCrsrSh, GetPtPos() = rPtPt; } -SwShellTableCrsr::~SwShellTableCrsr() {} +SwShellTableCursor::~SwShellTableCursor() {} -void SwShellTableCrsr::SetMark() { SwShellCrsr::SetMark(); } +void SwShellTableCursor::SetMark() { SwShellCursor::SetMark(); } -SwCursor* SwShellTableCrsr::Create( SwPaM* pRing ) const +SwCursor* SwShellTableCursor::Create( SwPaM* pRing ) const { - return SwShellCrsr::Create( pRing ); + return SwShellCursor::Create( pRing ); } -short SwShellTableCrsr::MaxReplaceArived() +short SwShellTableCursor::MaxReplaceArived() { - return SwShellCrsr::MaxReplaceArived(); + return SwShellCursor::MaxReplaceArived(); } -void SwShellTableCrsr::SaveTableBoxContent( const SwPosition* pPos ) +void SwShellTableCursor::SaveTableBoxContent( const SwPosition* pPos ) { - SwShellCrsr::SaveTableBoxContent( pPos ); + SwShellCursor::SaveTableBoxContent( pPos ); } -void SwShellTableCrsr::FillRects() +void SwShellTableCursor::FillRects() { // Calculate the new rectangles. If the cursor is still "parked" do nothing if (m_SelectedBoxes.empty() || m_bParked || !GetPoint()->nNode.GetIndex()) @@ -757,9 +757,9 @@ void SwShellTableCrsr::FillRects() bool bStart = true; SwRegionRects aReg( GetShell()->VisArea() ); if (GetShell()->isTiledRendering()) - aReg = GetShell()->getIDocumentLayoutAccess().GetCurrentLayout()->Frm(); + aReg = GetShell()->getIDocumentLayoutAccess().GetCurrentLayout()->Frame(); SwNodes& rNds = GetDoc()->GetNodes(); - SwFrm* pEndFrm = nullptr; + SwFrame* pEndFrame = nullptr; for (size_t n = 0; n < m_SelectedBoxes.size(); ++n) { const SwStartNode* pSttNd = m_SelectedBoxes[n]->GetSttNd(); @@ -782,42 +782,42 @@ void SwShellTableCrsr::FillRects() if( !pCNd ) continue; - SwFrm* pFrm = pCNd->getLayoutFrm( GetShell()->GetLayout(), &GetSttPos() ); - while( pFrm && !pFrm->IsCellFrm() ) - pFrm = pFrm->GetUpper(); + SwFrame* pFrame = pCNd->getLayoutFrame( GetShell()->GetLayout(), &GetSttPos() ); + while( pFrame && !pFrame->IsCellFrame() ) + pFrame = pFrame->GetUpper(); - OSL_ENSURE( pFrm, "Node not in a table" ); + OSL_ENSURE( pFrame, "Node not in a table" ); - while ( pFrm ) + while ( pFrame ) { - if( aReg.GetOrigin().IsOver( pFrm->Frm() ) ) + if( aReg.GetOrigin().IsOver( pFrame->Frame() ) ) { - aReg -= pFrm->Frm(); + aReg -= pFrame->Frame(); if (bStart) { bStart = false; - m_aStart = SwRect(pFrm->Frm().Left(), pFrm->Frm().Top(), 1, pFrm->Frm().Height()); + m_aStart = SwRect(pFrame->Frame().Left(), pFrame->Frame().Top(), 1, pFrame->Frame().Height()); } } - pEndFrm = pFrm; - pFrm = pFrm->GetNextCellLeaf( MAKEPAGE_NONE ); + pEndFrame = pFrame; + pFrame = pFrame->GetNextCellLeaf( MAKEPAGE_NONE ); } } - if (pEndFrm) - m_aEnd = SwRect(pEndFrm->Frm().Right(), pEndFrm->Frm().Top(), 1, pEndFrm->Frm().Height()); + if (pEndFrame) + m_aEnd = SwRect(pEndFrame->Frame().Right(), pEndFrame->Frame().Top(), 1, pEndFrame->Frame().Height()); aReg.Invert(); insert( begin(), aReg.begin(), aReg.end() ); } -void SwShellTableCrsr::FillStartEnd(SwRect& rStart, SwRect& rEnd) const +void SwShellTableCursor::FillStartEnd(SwRect& rStart, SwRect& rEnd) const { rStart = m_aStart; rEnd = m_aEnd; } // Check if the SPoint is within the Table-SSelection. -bool SwShellTableCrsr::IsInside( const Point& rPt ) const +bool SwShellTableCursor::IsInside( const Point& rPt ) const { // Calculate the new rectangles. If the cursor is still "parked" do nothing if (m_SelectedBoxes.empty() || m_bParked || !GetPoint()->nNode.GetIndex()) @@ -831,19 +831,19 @@ bool SwShellTableCrsr::IsInside( const Point& rPt ) const if( !pCNd ) continue; - SwFrm* pFrm = pCNd->getLayoutFrm( GetShell()->GetLayout(), &GetPtPos() ); - while( pFrm && !pFrm->IsCellFrm() ) - pFrm = pFrm->GetUpper(); - OSL_ENSURE( pFrm, "Node not in a table" ); - if( pFrm && pFrm->Frm().IsInside( rPt ) ) + SwFrame* pFrame = pCNd->getLayoutFrame( GetShell()->GetLayout(), &GetPtPos() ); + while( pFrame && !pFrame->IsCellFrame() ) + pFrame = pFrame->GetUpper(); + OSL_ENSURE( pFrame, "Node not in a table" ); + if( pFrame && pFrame->Frame().IsInside( rPt ) ) return true; } return false; } -bool SwShellTableCrsr::IsAtValidPos( bool bPoint ) const +bool SwShellTableCursor::IsAtValidPos( bool bPoint ) const { - return SwShellCrsr::IsAtValidPos( bPoint ); + return SwShellCursor::IsAtValidPos( bPoint ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/doc/CntntIdxStore.cxx b/sw/source/core/doc/CntntIdxStore.cxx index 41b599f8396c..9b0b2947c768 100644 --- a/sw/source/core/doc/CntntIdxStore.cxx +++ b/sw/source/core/doc/CntntIdxStore.cxx @@ -126,28 +126,28 @@ namespace std::vector<MarkEntry> m_aBkmkEntries; std::vector<MarkEntry> m_aRedlineEntries; std::vector<MarkEntry> m_aFlyEntries; - std::vector<PaMEntry> m_aUnoCrsrEntries; - std::vector<PaMEntry> m_aShellCrsrEntries; + std::vector<PaMEntry> m_aUnoCursorEntries; + std::vector<PaMEntry> m_aShellCursorEntries; typedef std::function<void (SwPosition& rPos, sal_Int32 nContent)> updater_t; virtual void Clear() override { m_aBkmkEntries.clear(); m_aRedlineEntries.clear(); m_aFlyEntries.clear(); - m_aUnoCrsrEntries.clear(); - m_aShellCrsrEntries.clear(); + m_aUnoCursorEntries.clear(); + m_aShellCursorEntries.clear(); } virtual bool Empty() override { - return m_aBkmkEntries.empty() && m_aRedlineEntries.empty() && m_aFlyEntries.empty() && m_aUnoCrsrEntries.empty() && m_aShellCrsrEntries.empty(); + return m_aBkmkEntries.empty() && m_aRedlineEntries.empty() && m_aFlyEntries.empty() && m_aUnoCursorEntries.empty() && m_aShellCursorEntries.empty(); } virtual void Save(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nContent, bool bSaveFlySplit=false) override { SaveBkmks(pDoc, nNode, nContent); SaveRedlines(pDoc, nNode, nContent); SaveFlys(pDoc, nNode, nContent, bSaveFlySplit); - SaveUnoCrsrs(pDoc, nNode, nContent); - SaveShellCrsrs(pDoc, nNode, nContent); + SaveUnoCursors(pDoc, nNode, nContent); + SaveShellCursors(pDoc, nNode, nContent); } virtual void Restore(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nOffset=0, bool bAuto = false) override { @@ -156,8 +156,8 @@ namespace RestoreBkmks(pDoc, aUpdater); RestoreRedlines(pDoc, aUpdater); RestoreFlys(pDoc, aUpdater, bAuto); - RestoreUnoCrsrs(aUpdater); - RestoreShellCrsrs(aUpdater); + RestoreUnoCursors(aUpdater); + RestoreShellCursors(aUpdater); } virtual void Restore(SwNode& rNd, sal_Int32 nLen, sal_Int32 nCorrLen) override { @@ -167,8 +167,8 @@ namespace RestoreBkmks(pDoc, aUpdater); RestoreRedlines(pDoc, aUpdater); RestoreFlys(pDoc, aUpdater, false); - RestoreUnoCrsrs(aUpdater); - RestoreShellCrsrs(aUpdater); + RestoreUnoCursors(aUpdater); + RestoreShellCursors(aUpdater); } virtual ~ContentIdxStoreImpl(){}; private: @@ -178,10 +178,10 @@ namespace inline void RestoreRedlines(SwDoc* pDoc, updater_t& rUpdater); inline void SaveFlys(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nContent, bool bSaveFlySplit); inline void RestoreFlys(SwDoc* pDoc, updater_t& rUpdater, bool bAuto); - inline void SaveUnoCrsrs(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nContent); - inline void RestoreUnoCrsrs(updater_t& rUpdater); - inline void SaveShellCrsrs(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nContent); - inline void RestoreShellCrsrs(updater_t& rUpdater); + inline void SaveUnoCursors(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nContent); + inline void RestoreUnoCursors(updater_t& rUpdater); + inline void SaveShellCursors(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nContent); + inline void RestoreShellCursors(updater_t& rUpdater); static inline const SwPosition& GetRightMarkPos(::sw::mark::IMark* pMark, bool bOther) { return bOther ? pMark->GetOtherMarkPos() : pMark->GetMarkPos(); }; static inline void SetRightMarkPos(MarkBase* pMark, bool bOther, const SwPosition* const pPos) @@ -307,10 +307,10 @@ void ContentIdxStoreImpl::SaveFlys(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nCont SwContentNode *pNode = pDoc->GetNodes()[nNode]->GetContentNode(); if( !pNode ) return; - SwFrm* pFrm = pNode->getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ); - if( pFrm ) + SwFrame* pFrame = pNode->getLayoutFrame( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ); + if( pFrame ) { - if( !pFrm->GetDrawObjs() ) + if( !pFrame->GetDrawObjs() ) return; // if we have a layout and no DrawObjs, we can skip this } MarkEntry aSave = { 0, false, 0 }; @@ -376,64 +376,64 @@ void ContentIdxStoreImpl::RestoreFlys(SwDoc* pDoc, updater_t& rUpdater, bool bAu } } -void ContentIdxStoreImpl::SaveUnoCrsrs(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nContent) +void ContentIdxStoreImpl::SaveUnoCursors(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nContent) { - pDoc->cleanupUnoCrsrTable(); - for (const auto& pWeakUnoCrsr : pDoc->mvUnoCrsrTable) + pDoc->cleanupUnoCursorTable(); + for (const auto& pWeakUnoCursor : pDoc->mvUnoCursorTable) { - auto pUnoCrsr(pWeakUnoCrsr.lock()); - if(!pUnoCrsr) + auto pUnoCursor(pWeakUnoCursor.lock()); + if(!pUnoCursor) continue; - for(SwPaM& rPaM : pUnoCrsr.get()->GetRingContainer()) + for(SwPaM& rPaM : pUnoCursor.get()->GetRingContainer()) { - lcl_ChkPaMBoth( m_aUnoCrsrEntries, nNode, nContent, rPaM); + lcl_ChkPaMBoth( m_aUnoCursorEntries, nNode, nContent, rPaM); } - const SwUnoTableCrsr* pUnoTableCrsr = dynamic_cast<const SwUnoTableCrsr*>(pUnoCrsr.get()); - if( pUnoTableCrsr ) + const SwUnoTableCursor* pUnoTableCursor = dynamic_cast<const SwUnoTableCursor*>(pUnoCursor.get()); + if( pUnoTableCursor ) { - for(SwPaM& rPaM : (&(const_cast<SwUnoTableCrsr*>(pUnoTableCrsr))->GetSelRing())->GetRingContainer()) + for(SwPaM& rPaM : (&(const_cast<SwUnoTableCursor*>(pUnoTableCursor))->GetSelRing())->GetRingContainer()) { - lcl_ChkPaMBoth( m_aUnoCrsrEntries, nNode, nContent, rPaM); + lcl_ChkPaMBoth( m_aUnoCursorEntries, nNode, nContent, rPaM); } } } } -void ContentIdxStoreImpl::RestoreUnoCrsrs(updater_t& rUpdater) +void ContentIdxStoreImpl::RestoreUnoCursors(updater_t& rUpdater) { - for (const PaMEntry& aEntry : m_aUnoCrsrEntries) + for (const PaMEntry& aEntry : m_aUnoCursorEntries) { rUpdater(aEntry.m_pPaM->GetBound(!aEntry.m_isMark), aEntry.m_nContent); } } -void ContentIdxStoreImpl::SaveShellCrsrs(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nContent) +void ContentIdxStoreImpl::SaveShellCursors(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nContent) { - SwCrsrShell* pShell = pDoc->GetEditShell(); + SwCursorShell* pShell = pDoc->GetEditShell(); if( !pShell ) return; for(SwViewShell& rCurShell : pShell->GetRingContainer()) { - if( dynamic_cast<const SwCrsrShell *>(&rCurShell) != nullptr ) + if( dynamic_cast<const SwCursorShell *>(&rCurShell) != nullptr ) { - SwPaM *_pStkCrsr = static_cast<SwCrsrShell*>(&rCurShell)->GetStkCrsr(); - if( _pStkCrsr ) + SwPaM *_pStackCursor = static_cast<SwCursorShell*>(&rCurShell)->GetStackCursor(); + if( _pStackCursor ) do { - lcl_ChkPaMBoth( m_aShellCrsrEntries, nNode, nContent, *_pStkCrsr); - } while ( (_pStkCrsr != nullptr ) && - ((_pStkCrsr = _pStkCrsr->GetNext()) != static_cast<SwCrsrShell*>(&rCurShell)->GetStkCrsr()) ); + lcl_ChkPaMBoth( m_aShellCursorEntries, nNode, nContent, *_pStackCursor); + } while ( (_pStackCursor != nullptr ) && + ((_pStackCursor = _pStackCursor->GetNext()) != static_cast<SwCursorShell*>(&rCurShell)->GetStackCursor()) ); - for(SwPaM& rPaM : (static_cast<SwCrsrShell*>(&rCurShell)->_GetCrsr())->GetRingContainer()) + for(SwPaM& rPaM : (static_cast<SwCursorShell*>(&rCurShell)->_GetCursor())->GetRingContainer()) { - lcl_ChkPaMBoth( m_aShellCrsrEntries, nNode, nContent, rPaM); + lcl_ChkPaMBoth( m_aShellCursorEntries, nNode, nContent, rPaM); } } } } -void ContentIdxStoreImpl::RestoreShellCrsrs(updater_t& rUpdater) +void ContentIdxStoreImpl::RestoreShellCursors(updater_t& rUpdater) { - for (const PaMEntry& aEntry : m_aShellCrsrEntries) + for (const PaMEntry& aEntry : m_aShellCursorEntries) { rUpdater(aEntry.m_pPaM->GetBound(aEntry.m_isMark), aEntry.m_nContent); } diff --git a/sw/source/core/doc/DocumentChartDataProviderManager.cxx b/sw/source/core/doc/DocumentChartDataProviderManager.cxx index fb40e5d42f55..69f7c6fc9fb6 100644 --- a/sw/source/core/doc/DocumentChartDataProviderManager.cxx +++ b/sw/source/core/doc/DocumentChartDataProviderManager.cxx @@ -67,7 +67,7 @@ void DocumentChartDataProviderManager::CreateChartInternalDataProviders( const S ++aIdx; if( nullptr != ( pONd = aIdx.GetNode().GetOLENode() ) && aName == pONd->GetChartTableName() /* OLE node is chart? */ && - nullptr != (pONd->getLayoutFrm( m_rDoc.getIDocumentLayoutAccess().GetCurrentLayout() )) /* chart frame is not hidden */ ) + nullptr != (pONd->getLayoutFrame( m_rDoc.getIDocumentLayoutAccess().GetCurrentLayout() )) /* chart frame is not hidden */ ) { uno::Reference < embed::XEmbeddedObject > xIP = pONd->GetOLEObj().GetOleRef(); if ( svt::EmbeddedObjectRef::TryRunningState( xIP ) ) diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index f7897d7539aa..d1d025459dc5 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -843,7 +843,7 @@ namespace } else { - pSrch->DelFrms(nullptr); + pSrch->DelFrames(nullptr); rFootnoteArr.erase( rFootnoteArr.begin() + nPos ); if( bSaveFootnote ) rSaveArr.insert( pSrch ); @@ -871,7 +871,7 @@ namespace } else { - pSrch->DelFrms(nullptr); + pSrch->DelFrames(nullptr); rFootnoteArr.erase( rFootnoteArr.begin() + nPos ); if( bSaveFootnote ) rSaveArr.insert( pSrch ); @@ -1295,7 +1295,7 @@ namespace //local functions originally from docfmt.cxx sal_Int32 nMkPos, nPtPos = rSt.GetIndex(); const OUString& rStr = pTextNd->GetText(); - // Special case: if the Crsr is located within a URL attribute, we take over it's area + // Special case: if the Cursor is located within a URL attribute, we take over it's area SwTextAttr const*const pURLAttr( pTextNd->GetTextAttrAt(rSt.GetIndex(), RES_TXTATR_INETFMT)); if (pURLAttr && !pURLAttr->GetINetFormat().GetValue().isEmpty()) @@ -1721,7 +1721,7 @@ void DocumentContentOperationsManager::DeleteSection( SwNode *pNode ) _DelBookmarks(aSttIdx, aEndIdx); { - // move all Crsr/StkCrsr/UnoCrsr out of the to-be-deleted area + // move all Cursor/StackCursor/UnoCursor out of the to-be-deleted area SwNodeIndex aMvStt( aSttIdx, 1 ); SwDoc::CorrAbs( aMvStt, aEndIdx, SwPosition( aSttIdx ), true ); } @@ -2217,8 +2217,8 @@ bool DocumentContentOperationsManager::MoveNodeRange( SwNodeRange& rRange, SwNod pSaveInsPos = new SwNodeIndex( rRange.aStart, -1 ); // move the Nodes - bool bNoDelFrms = bool(SwMoveFlags::NO_DELFRMS & eMvFlags); - if( m_rDoc.GetNodes()._MoveNodes( rRange, m_rDoc.GetNodes(), rPos, !bNoDelFrms ) ) + bool bNoDelFrames = bool(SwMoveFlags::NO_DELFRMS & eMvFlags); + if( m_rDoc.GetNodes()._MoveNodes( rRange, m_rDoc.GetNodes(), rPos, !bNoDelFrames ) ) { ++aIdx; // again back to old position if( pSaveInsPos ) @@ -2774,11 +2774,11 @@ SwDrawFrameFormat* DocumentContentOperationsManager::InsertDrawObj( if( m_rDoc.getIDocumentLayoutAccess().GetCurrentViewShell() ) { // create layout representation - pFormat->MakeFrms(); + pFormat->MakeFrames(); // #i42319# - follow-up of #i35635# // move object to visible layer // #i79391# - if ( pContact->GetAnchorFrm() ) + if ( pContact->GetAnchorFrame() ) { pContact->MoveObjToVisibleLayer( &rDrawObj ); } @@ -3127,7 +3127,7 @@ void DocumentContentOperationsManager::CopyWithFlyInFly( const sal_Int32 nEndContentIndex, const SwNodeIndex& rInsPos, const std::pair<const SwPaM&, const SwPosition&>* pCopiedPaM /*and real insert pos*/, - const bool bMakeNewFrms, + const bool bMakeNewFrames, const bool bDelRedlines, const bool bCopyFlyAtFly ) const { @@ -3140,7 +3140,7 @@ void DocumentContentOperationsManager::CopyWithFlyInFly( SwNodeIndex aSavePos( rInsPos, -1 ); bool bEndIsEqualEndPos = rInsPos == rRg.aEnd; - m_rDoc.GetNodes()._CopyNodes( rRg, rInsPos, bMakeNewFrms, true ); + m_rDoc.GetNodes()._CopyNodes( rRg, rInsPos, bMakeNewFrames, true ); ++aSavePos; if( bEndIsEqualEndPos ) const_cast<SwNodeIndex&>(rRg.aEnd) = aSavePos; @@ -4103,7 +4103,7 @@ static void lcl_PopNumruleState( SfxItemState aNumRuleState, const SwNumRuleItem } bool DocumentContentOperationsManager::CopyImpl( SwPaM& rPam, SwPosition& rPos, - const bool bMakeNewFrms, const bool bCopyAll, + const bool bMakeNewFrames, const bool bCopyAll, SwPaM *const pCpyRange ) const { SwDoc* pDoc = rPos.nNode.GetNode().GetDoc(); @@ -4127,7 +4127,7 @@ bool DocumentContentOperationsManager::CopyImpl( SwPaM& rPam, SwPosition& rPos, SwUndoCpyDoc* pUndo = nullptr; // lcl_DeleteRedlines may delete the start or end node of the cursor when // removing the redlines so use cursor that is corrected by PaMCorrAbs - std::shared_ptr<SwUnoCrsr> const pCopyPam(pDoc->CreateUnoCrsr(rPos)); + std::shared_ptr<SwUnoCursor> const pCopyPam(pDoc->CreateUnoCursor(rPos)); SwTableNumFormatMerge aTNFM( m_rDoc, *pDoc ); @@ -4417,13 +4417,13 @@ bool DocumentContentOperationsManager::CopyImpl( SwPaM& rPam, SwPosition& rPos, if( aInsPos == pEnd->nNode ) { SwNodeIndex aSaveIdx( aInsPos, -1 ); - CopyWithFlyInFly( aRg, 0, aInsPos, &tmp, bMakeNewFrms, false ); + CopyWithFlyInFly( aRg, 0, aInsPos, &tmp, bMakeNewFrames, false ); ++aSaveIdx; pEnd->nNode = aSaveIdx; pEnd->nContent.Assign( aSaveIdx.GetNode().GetTextNode(), 0 ); } else - CopyWithFlyInFly( aRg, pEnd->nContent.GetIndex(), aInsPos, &tmp, bMakeNewFrms, false ); + CopyWithFlyInFly( aRg, pEnd->nContent.GetIndex(), aInsPos, &tmp, bMakeNewFrames, false ); bCopyBookmarks = false; diff --git a/sw/source/core/doc/DocumentDeviceManager.cxx b/sw/source/core/doc/DocumentDeviceManager.cxx index 1b47d299138f..f67d2b68608c 100644 --- a/sw/source/core/doc/DocumentDeviceManager.cxx +++ b/sw/source/core/doc/DocumentDeviceManager.cxx @@ -309,7 +309,7 @@ void DocumentDeviceManager::PrtDataChanged() // #i41075# OSL_ENSURE( m_rDoc.getIDocumentSettingAccess().get(DocumentSettingId::USE_VIRTUAL_DEVICE) || nullptr != getPrinter( false ), "PrtDataChanged will be called recursively!" ); - SwRootFrm* pTmpRoot = m_rDoc.getIDocumentLayoutAccess().GetCurrentLayout(); + SwRootFrame* pTmpRoot = m_rDoc.getIDocumentLayoutAccess().GetCurrentLayout(); std::unique_ptr<SwWait> pWait; bool bEndAction = false; @@ -339,7 +339,7 @@ void DocumentDeviceManager::PrtDataChanged() pFntCache->Flush(); - for(SwRootFrm* aLayout : m_rDoc.GetAllLayouts()) + for(SwRootFrame* aLayout : m_rDoc.GetAllLayouts()) aLayout->InvalidateAllContent(INV_SIZE); for(SwViewShell& rShell : pSh->GetRingContainer()) diff --git a/sw/source/core/doc/DocumentDrawModelManager.cxx b/sw/source/core/doc/DocumentDrawModelManager.cxx index b919180e3363..ecebc1302262 100644 --- a/sw/source/core/doc/DocumentDrawModelManager.cxx +++ b/sw/source/core/doc/DocumentDrawModelManager.cxx @@ -165,7 +165,7 @@ void DocumentDrawModelManager::InitDrawModel() { for(SwViewShell& rViewSh : pSh->GetRingContainer()) { - SwRootFrm* pRoot = rViewSh.GetLayout(); + SwRootFrame* pRoot = rViewSh.GetLayout(); if( pRoot && !pRoot->GetDrawPage() ) { // Disable "multiple layout" for the moment: @@ -174,7 +174,7 @@ void DocumentDrawModelManager::InitDrawModel() // mpDrawModel->InsertPage( pDrawPage ); SdrPage* pDrawPage = pMasterPage; pRoot->SetDrawPage( pDrawPage ); - pDrawPage->SetSize( pRoot->Frm().SSize() ); + pDrawPage->SetSize( pRoot->Frame().SSize() ); } } } @@ -344,12 +344,12 @@ SdrLayerID DocumentDrawModelManager::GetInvisibleLayerIdByVisibleOne( const SdrL bool DocumentDrawModelManager::Search(const SwPaM& rPaM, const SvxSearchItem& rSearchItem) { - SwPosFlyFrms aFrames = m_rDoc.GetAllFlyFormats(&rPaM, /*bDrawAlso=*/true); + SwPosFlyFrames aFrames = m_rDoc.GetAllFlyFormats(&rPaM, /*bDrawAlso=*/true); - for (const SwPosFlyFrmPtr& pPosFlyFrm : aFrames) + for (const SwPosFlyFramePtr& pPosFlyFrame : aFrames) { // Filter for at-paragraph anchored draw frames. - const SwFrameFormat& rFrameFormat = pPosFlyFrm->GetFormat(); + const SwFrameFormat& rFrameFormat = pPosFlyFrame->GetFormat(); const SwFormatAnchor& rAnchor = rFrameFormat.GetAnchor(); if (rAnchor.GetAnchorId() != FLY_AT_PARA || rFrameFormat.Which() != RES_DRAWFRMFMT) continue; diff --git a/sw/source/core/doc/DocumentFieldsManager.cxx b/sw/source/core/doc/DocumentFieldsManager.cxx index 003364b8902d..7180489ce1f3 100644 --- a/sw/source/core/doc/DocumentFieldsManager.cxx +++ b/sw/source/core/doc/DocumentFieldsManager.cxx @@ -704,24 +704,24 @@ void DocumentFieldsManager::UpdateTableFields( SfxPoolItem* pHt ) // get the values of all SetExpression fields that are valid // until the table - SwFrm* pFrm = nullptr; + SwFrame* pFrame = nullptr; if( pTableNd->GetIndex() < m_rDoc.GetNodes().GetEndOfExtras().GetIndex() ) { // is in the special section, that's expensive! Point aPt; // return the first frame of the layout - Tab.Headline!! - pFrm = rTextNd.getLayoutFrm( m_rDoc.getIDocumentLayoutAccess().GetCurrentLayout(), &aPt ); - if( pFrm ) + pFrame = rTextNd.getLayoutFrame( m_rDoc.getIDocumentLayoutAccess().GetCurrentLayout(), &aPt ); + if( pFrame ) { SwPosition aPos( *pTableNd ); - if( GetBodyTextNode( m_rDoc, aPos, *pFrm ) ) + if( GetBodyTextNode( m_rDoc, aPos, *pFrame ) ) FieldsToCalc( *pCalc, _SetGetExpField( aPos.nNode, pFormatField->GetTextField(), &aPos.nContent )); else - pFrm = nullptr; + pFrame = nullptr; } } - if( !pFrm ) + if( !pFrame ) { // create index to determine the TextNode SwNodeIndex aIdx( rTextNd ); @@ -769,7 +769,7 @@ void DocumentFieldsManager::UpdateTableFields( SfxPoolItem* pHt ) // get the values of all SetExpression fields that are valid // until the table - SwFrm* pFrm = nullptr; + SwFrame* pFrame = nullptr; if( pTableNd->GetIndex() < m_rDoc.GetNodes().GetEndOfExtras().GetIndex() ) { // is in the special section, that's expensive! @@ -779,16 +779,16 @@ void DocumentFieldsManager::UpdateTableFields( SfxPoolItem* pHt ) if( !pCNd ) pCNd = m_rDoc.GetNodes().GoNext( &aCNdIdx ); - if( pCNd && nullptr != (pFrm = pCNd->getLayoutFrm( m_rDoc.getIDocumentLayoutAccess().GetCurrentLayout(), &aPt )) ) + if( pCNd && nullptr != (pFrame = pCNd->getLayoutFrame( m_rDoc.getIDocumentLayoutAccess().GetCurrentLayout(), &aPt )) ) { SwPosition aPos( *pCNd ); - if( GetBodyTextNode( m_rDoc, aPos, *pFrm ) ) + if( GetBodyTextNode( m_rDoc, aPos, *pFrame ) ) FieldsToCalc( *pCalc, _SetGetExpField( aPos.nNode )); else - pFrm = nullptr; + pFrame = nullptr; } } - if( !pFrm ) + if( !pFrame ) { // create index to determine the TextNode SwNodeIndex aIdx( *pTableNd ); diff --git a/sw/source/core/doc/DocumentLayoutManager.cxx b/sw/source/core/doc/DocumentLayoutManager.cxx index a20c75f41d9a..72978cebac7e 100644 --- a/sw/source/core/doc/DocumentLayoutManager.cxx +++ b/sw/source/core/doc/DocumentLayoutManager.cxx @@ -68,14 +68,14 @@ void DocumentLayoutManager::SetCurrentViewShell( SwViewShell* pNew ) } // It must be able to communicate to a SwViewShell. This is going to be removed later. -const SwRootFrm *DocumentLayoutManager::GetCurrentLayout() const +const SwRootFrame *DocumentLayoutManager::GetCurrentLayout() const { if(GetCurrentViewShell()) return GetCurrentViewShell()->GetLayout(); return nullptr; } -SwRootFrm *DocumentLayoutManager::GetCurrentLayout() +SwRootFrame *DocumentLayoutManager::GetCurrentLayout() { if(GetCurrentViewShell()) return GetCurrentViewShell()->GetLayout(); @@ -239,7 +239,7 @@ void DocumentLayoutManager::DelLayoutFormat( SwFrameFormat *pFormat ) } // Destroy Frames - pFormat->DelFrms(); + pFormat->DelFrames(); // Only FlyFrames are undoable at first const sal_uInt16 nWh = pFormat->Which(); @@ -334,7 +334,7 @@ SwFrameFormat *DocumentLayoutManager::CopyLayoutFormat( const SwFrameFormat& rSource, const SwFormatAnchor& rNewAnchor, bool bSetTextFlyAtt, - bool bMakeFrms ) + bool bMakeFrames ) { const bool bFly = RES_FLYFRMFMT == rSource.Which(); const bool bDraw = RES_DRAWFRMFMT == rSource.Which(); @@ -467,8 +467,8 @@ SwFrameFormat *DocumentLayoutManager::CopyLayoutFormat( if( pDest->GetAnchor() == rNewAnchor ) { - // Do *not* connect to layout, if a <MakeFrms> will not be called. - if ( bMakeFrms ) + // Do *not* connect to layout, if a <MakeFrames> will not be called. + if ( bMakeFrames ) { pContact->ConnectToLayout( &rNewAnchor ); } @@ -490,8 +490,8 @@ SwFrameFormat *DocumentLayoutManager::CopyLayoutFormat( aFormat, pPos->nContent.GetIndex(), 0 ); } - if( bMakeFrms ) - pDest->MakeFrms(); + if( bMakeFrames ) + pDest->MakeFrames(); // If the draw format has a TextBox, then copy its fly format as well. if (SwFrameFormat* pSourceTextBox = SwTextBoxHelper::findTextBox(&rSource)) @@ -505,7 +505,7 @@ SwFrameFormat *DocumentLayoutManager::CopyLayoutFormat( // presumably these anchors are supported though not sure assert(FLY_AT_CHAR == boxAnchor.GetAnchorId() || FLY_AT_PARA == boxAnchor.GetAnchorId()); SwFrameFormat* pDestTextBox = CopyLayoutFormat(*pSourceTextBox, - boxAnchor, bSetTextFlyAtt, bMakeFrms); + boxAnchor, bSetTextFlyAtt, bMakeFrames); SwAttrSet aSet(pDest->GetAttrSet()); SwFormatContent aContent(pDestTextBox->GetContent().GetContentIdx()->GetNode().GetStartNode()); aSet.Put(aContent); @@ -521,7 +521,7 @@ SwFrameFormat *DocumentLayoutManager::CopyLayoutFormat( //by the SwLayouter void DocumentLayoutManager::ClearSwLayouterEntries() { - SwLayouter::ClearMovedFwdFrms( m_rDoc ); + SwLayouter::ClearMovedFwdFrames( m_rDoc ); SwLayouter::ClearObjsTmpConsiderWrapInfluence( m_rDoc ); // #i65250# SwLayouter::ClearMoveBwdLayoutInfo( m_rDoc ); diff --git a/sw/source/core/doc/DocumentLinksAdministrationManager.cxx b/sw/source/core/doc/DocumentLinksAdministrationManager.cxx index 3e4552badd7b..a249f2c82bbf 100644 --- a/sw/source/core/doc/DocumentLinksAdministrationManager.cxx +++ b/sw/source/core/doc/DocumentLinksAdministrationManager.cxx @@ -231,8 +231,8 @@ void DocumentLinksAdministrationManager::UpdateLinks( bool bUI ) if( bUpdate && (bUI || !bAskUpdate) ) { SfxMedium* pMedium = m_rDoc.GetDocShell()->GetMedium(); - SfxFrame* pFrm = pMedium ? pMedium->GetLoadTargetFrame() : nullptr; - vcl::Window* pDlgParent = pFrm ? &pFrm->GetWindow() : nullptr; + SfxFrame* pFrame = pMedium ? pMedium->GetLoadTargetFrame() : nullptr; + vcl::Window* pDlgParent = pFrame ? &pFrame->GetWindow() : nullptr; GetLinkManager().UpdateAllLinks( bAskUpdate, true, false, pDlgParent ); } diff --git a/sw/source/core/doc/DocumentSettingManager.cxx b/sw/source/core/doc/DocumentSettingManager.cxx index 4944eac525e7..5a32cc431fcc 100644 --- a/sw/source/core/doc/DocumentSettingManager.cxx +++ b/sw/source/core/doc/DocumentSettingManager.cxx @@ -430,11 +430,11 @@ void sw::DocumentSettingManager::setForbiddenCharacters(/*[in]*/ sal_uInt16 nLan pDrawModel->ReformatAllTextObjects(); } - SwRootFrm* pTmpRoot = m_rDoc.getIDocumentLayoutAccess().GetCurrentLayout(); + SwRootFrame* pTmpRoot = m_rDoc.getIDocumentLayoutAccess().GetCurrentLayout(); if( pTmpRoot && !m_rDoc.IsInReading() ) { pTmpRoot->StartAllAction(); - for(SwRootFrm* aLayout : m_rDoc.GetAllLayouts()) + for(SwRootFrame* aLayout : m_rDoc.GetAllLayouts()) aLayout->InvalidateAllContent(INV_SIZE); pTmpRoot->EndAllAction(); } @@ -500,7 +500,7 @@ void sw::DocumentSettingManager::setCharacterCompressionType( /*[in]*/SwCharComp pDrawModel->ReformatAllTextObjects(); } - SwRootFrm* pTmpRoot = m_rDoc.getIDocumentLayoutAccess().GetCurrentLayout(); + SwRootFrame* pTmpRoot = m_rDoc.getIDocumentLayoutAccess().GetCurrentLayout(); if( pTmpRoot && !m_rDoc.IsInReading() ) { pTmpRoot->StartAllAction(); diff --git a/sw/source/core/doc/DocumentStylePoolManager.cxx b/sw/source/core/doc/DocumentStylePoolManager.cxx index 005750fbb74a..40e2e69fe231 100644 --- a/sw/source/core/doc/DocumentStylePoolManager.cxx +++ b/sw/source/core/doc/DocumentStylePoolManager.cxx @@ -106,7 +106,7 @@ namespace const SvxLRSpaceItem& rLR = rPgDscFormat.GetLRSpace(); const long nLeft = rLR.GetLeft(); const long nRight = rLR.GetRight(); - const long nWidth = rPgDscFormat.GetFrmSize().GetWidth(); + const long nWidth = rPgDscFormat.GetFrameSize().GetWidth(); return nWidth - nLeft - nRight; } @@ -266,14 +266,14 @@ namespace static void lcl_PutStdPageSizeIntoItemSet( SwDoc* pDoc, SfxItemSet& rSet ) { SwPageDesc* pStdPgDsc = pDoc->getIDocumentStylePoolAccess().GetPageDescFromPool( RES_POOLPAGE_STANDARD ); - SwFormatFrmSize aFrmSz( pStdPgDsc->GetMaster().GetFrmSize() ); + SwFormatFrameSize aFrameSz( pStdPgDsc->GetMaster().GetFrameSize() ); if( pStdPgDsc->GetLandscape() ) { - SwTwips nTmp = aFrmSz.GetHeight(); - aFrmSz.SetHeight( aFrmSz.GetWidth() ); - aFrmSz.SetWidth( nTmp ); + SwTwips nTmp = aFrameSz.GetHeight(); + aFrameSz.SetHeight( aFrameSz.GetWidth() ); + aFrameSz.SetWidth( nTmp ); } - rSet.Put( aFrmSz ); + rSet.Put( aFrameSz ); } } @@ -1328,7 +1328,7 @@ SwFormat* DocumentStylePoolManager::GetFormatFromPool( sal_uInt16 nId ) aSet.Put( SwFormatVertOrient( 0, text::VertOrientation::TOP, text::RelOrientation::FRAME )); aSet.Put( SwFormatSurround( SURROUND_PARALLEL )); // Set the default width to 3.5 cm, use the minimum value for the height - aSet.Put( SwFormatFrmSize( ATT_MIN_SIZE, + aSet.Put( SwFormatFrameSize( ATT_MIN_SIZE, GetMetricVal( CM_1 ) * 3 + GetMetricVal( CM_05 ), MM50 )); } @@ -1477,7 +1477,7 @@ SwPageDesc* DocumentStylePoolManager::GetPageDescFromPool( sal_uInt16 nId, bool { Size aPSize( SvxPaperInfo::GetPaperSize( PAPER_ENV_C65 ) ); LandscapeSwap( aPSize ); - aSet.Put( SwFormatFrmSize( ATT_FIX_SIZE, aPSize.Width(), aPSize.Height() )); + aSet.Put( SwFormatFrameSize( ATT_FIX_SIZE, aPSize.Width(), aPSize.Height() )); aLR.SetLeft( 0 ); aLR.SetRight( 0 ); aUL.SetUpper( 0 ); aUL.SetLower( 0 ); aSet.Put( aLR ); @@ -1519,14 +1519,14 @@ SwPageDesc* DocumentStylePoolManager::GetPageDescFromPool( sal_uInt16 nId, bool case RES_POOLPAGE_LANDSCAPE: // "Landscape" { SwPageDesc* pStdPgDsc = GetPageDescFromPool( RES_POOLPAGE_STANDARD ); - SwFormatFrmSize aFrmSz( pStdPgDsc->GetMaster().GetFrmSize() ); + SwFormatFrameSize aFrameSz( pStdPgDsc->GetMaster().GetFrameSize() ); if ( !pStdPgDsc->GetLandscape() ) { - const SwTwips nTmp = aFrmSz.GetHeight(); - aFrmSz.SetHeight( aFrmSz.GetWidth() ); - aFrmSz.SetWidth( nTmp ); + const SwTwips nTmp = aFrameSz.GetHeight(); + aFrameSz.SetHeight( aFrameSz.GetWidth() ); + aFrameSz.SetWidth( nTmp ); } - aSet.Put( aFrmSz ); + aSet.Put( aFrameSz ); aSet.Put( aLR ); aSet.Put( aUL ); pNewPgDsc->SetUseOn( nsUseOnPage::PD_ALL ); diff --git a/sw/source/core/doc/DocumentTimerManager.cxx b/sw/source/core/doc/DocumentTimerManager.cxx index 51a0f3d6657c..18e649a0e359 100644 --- a/sw/source/core/doc/DocumentTimerManager.cxx +++ b/sw/source/core/doc/DocumentTimerManager.cxx @@ -86,7 +86,7 @@ IMPL_LINK_TYPED( DocumentTimerManager, DoIdleJobs, Idle*, pIdle, void ) pModLogFile = new ::rtl::Logfile( "First DoIdleJobs" ); #endif - SwRootFrm* pTmpRoot = m_rDoc.getIDocumentLayoutAccess().GetCurrentLayout(); + SwRootFrame* pTmpRoot = m_rDoc.getIDocumentLayoutAccess().GetCurrentLayout(); if( pTmpRoot && !SfxProgress::GetActiveProgress( m_rDoc.GetDocShell() ) ) { @@ -110,8 +110,8 @@ IMPL_LINK_TYPED( DocumentTimerManager, DoIdleJobs, Idle*, pIdle, void ) if (bIsOnlineSpell && bIsAutoGrammar) StartGrammarChecking( m_rDoc ); } - std::set<SwRootFrm*> aAllLayouts = m_rDoc.GetAllLayouts(); - std::set<SwRootFrm*>::iterator pLayIter = aAllLayouts.begin(); + std::set<SwRootFrame*> aAllLayouts = m_rDoc.GetAllLayouts(); + std::set<SwRootFrame*>::iterator pLayIter = aAllLayouts.begin(); for ( ;pLayIter != aAllLayouts.end();++pLayIter ) { if ((*pLayIter)->IsIdleFormat()) diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index 27b2f4b39b37..644588e39f30 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -527,18 +527,18 @@ sal_uInt16 _PostItField::GetPageNo( //but the PostIt's first occurrence in the selected area. rVirtPgNo = 0; const sal_Int32 nPos = GetContent(); - SwIterator<SwTextFrm,SwTextNode> aIter( GetTextField()->GetTextNode() ); - for( SwTextFrm* pFrm = aIter.First(); pFrm; pFrm = aIter.Next() ) + SwIterator<SwTextFrame,SwTextNode> aIter( GetTextField()->GetTextNode() ); + for( SwTextFrame* pFrame = aIter.First(); pFrame; pFrame = aIter.Next() ) { - if( pFrm->GetOfst() > nPos || - (pFrm->HasFollow() && pFrm->GetFollow()->GetOfst() <= nPos) ) + if( pFrame->GetOfst() > nPos || + (pFrame->HasFollow() && pFrame->GetFollow()->GetOfst() <= nPos) ) continue; - sal_uInt16 nPgNo = pFrm->GetPhyPageNum(); + sal_uInt16 nPgNo = pFrame->GetPhyPageNum(); if( rRangeEnum.hasValue( nPgNo, &rPossiblePages )) { - rLineNo = (sal_uInt16)(pFrm->GetLineCount( nPos ) + - pFrm->GetAllLines() - pFrm->GetThisLines()); - rVirtPgNo = pFrm->GetVirtPageNum(); + rLineNo = (sal_uInt16)(pFrame->GetLineCount( nPos ) + + pFrame->GetAllLines() - pFrame->GetThisLines()); + rVirtPgNo = pFrame->GetVirtPageNum(); return nPgNo; } } @@ -634,11 +634,11 @@ static void lcl_FormatPostIt( /// provide the paper tray to use according to the page style in use, /// but do that only if the respective item is NOT just the default item -static sal_Int32 lcl_GetPaperBin( const SwPageFrm *pStartFrm ) +static sal_Int32 lcl_GetPaperBin( const SwPageFrame *pStartFrame ) { sal_Int32 nRes = -1; - const SwFrameFormat &rFormat = pStartFrm->GetPageDesc()->GetMaster(); + const SwFrameFormat &rFormat = pStartFrame->GetPageDesc()->GetMaster(); const SfxPoolItem *pItem = nullptr; SfxItemState eState = rFormat.GetItemState( RES_PAPER_BIN, false, &pItem ); const SvxPaperBinItem *pPaperBinItem = dynamic_cast< const SvxPaperBinItem * >(pItem); @@ -649,7 +649,7 @@ static sal_Int32 lcl_GetPaperBin( const SwPageFrm *pStartFrm ) } void SwDoc::CalculatePagesForPrinting( - const SwRootFrm& rLayout, + const SwRootFrame& rLayout, /* out */ SwRenderData &rData, const SwPrintUIOptions &rOptions, bool bIsPDFExport, @@ -670,13 +670,13 @@ void SwDoc::CalculatePagesForPrinting( rValidPages.clear(); sal_Int32 nPageNum = 1; - const SwPageFrm *pStPage = dynamic_cast<const SwPageFrm*>( rLayout.Lower() ); + const SwPageFrame *pStPage = dynamic_cast<const SwPageFrame*>( rLayout.Lower() ); while (pStPage && nPageNum <= nDocPageCount) { const bool bPrintThisPage = ( (bPrintRightPages && pStPage->OnRightPage()) || (bPrintLeftPages && !pStPage->OnRightPage()) ) && - ( bPrintEmptyPages || pStPage->Frm().Height() ); + ( bPrintEmptyPages || pStPage->Frame().Height() ); if (bPrintThisPage) { @@ -685,7 +685,7 @@ void SwDoc::CalculatePagesForPrinting( } ++nPageNum; - pStPage = static_cast<const SwPageFrm*>(pStPage->GetNext()); + pStPage = static_cast<const SwPageFrame*>(pStPage->GetNext()); } // now that we have identified the valid pages for printing according @@ -813,15 +813,15 @@ void SwDoc::UpdatePagesForPrintingWithPostItData( // now we just need to add the post-it pages to be printed to the // end of the vector of pages to print sal_Int32 nPageNum = 0; - const SwPageFrm * pPageFrm = static_cast<SwPageFrm*>(rData.m_pPostItShell->GetLayout()->Lower()); - while( pPageFrm && nPageNum < nPostItDocPageCount ) + const SwPageFrame * pPageFrame = static_cast<SwPageFrame*>(rData.m_pPostItShell->GetLayout()->Lower()); + while( pPageFrame && nPageNum < nPostItDocPageCount ) { - OSL_ENSURE( pPageFrm, "Empty page frame. How are we going to print this?" ); + OSL_ENSURE( pPageFrame, "Empty page frame. How are we going to print this?" ); ++nPageNum; // negative page number indicates page is from the post-it doc rData.GetPagesToPrint().push_back( -nPageNum ); - OSL_ENSURE( pPageFrm, "pPageFrm is NULL!" ); - pPageFrm = static_cast<const SwPageFrm*>(pPageFrm->GetNext()); + OSL_ENSURE( pPageFrame, "pPageFrame is NULL!" ); + pPageFrame = static_cast<const SwPageFrame*>(pPageFrame->GetNext()); } OSL_ENSURE( nPageNum == nPostItDocPageCount, "unexpected number of pages" ); } @@ -865,7 +865,7 @@ void SwDoc::UpdatePagesForPrintingWithPostItData( } void SwDoc::CalculatePagePairsForProspectPrinting( - const SwRootFrm& rLayout, + const SwRootFrame& rLayout, /* out */ SwRenderData &rData, const SwPrintUIOptions &rOptions, sal_Int32 nDocPageCount ) @@ -873,7 +873,7 @@ void SwDoc::CalculatePagePairsForProspectPrinting( std::map< sal_Int32, sal_Int32 > &rPrinterPaperTrays = rData.GetPrinterPaperTrays(); std::set< sal_Int32 > &rValidPagesSet = rData.GetValidPagesSet(); std::vector< std::pair< sal_Int32, sal_Int32 > > &rPagePairs = rData.GetPagePairsForProspectPrinting(); - std::map< sal_Int32, const SwPageFrm * > validStartFrms; + std::map< sal_Int32, const SwPageFrame * > validStartFrames; rPagePairs.clear(); rValidPagesSet.clear(); @@ -896,23 +896,23 @@ void SwDoc::CalculatePagePairsForProspectPrinting( if ( aRange.size() <= 0) return; - const SwPageFrm *pStPage = dynamic_cast<const SwPageFrm*>( rLayout.Lower() ); + const SwPageFrame *pStPage = dynamic_cast<const SwPageFrame*>( rLayout.Lower() ); for ( sal_Int32 i = 1; pStPage && i < nDocPageCount; ++i ) - pStPage = static_cast<const SwPageFrm*>(pStPage->GetNext()); + pStPage = static_cast<const SwPageFrame*>(pStPage->GetNext()); if ( !pStPage ) // Then it was that return; // currently for prospect printing all pages are valid to be printed // thus we add them all to the respective map and set for later use sal_Int32 nPageNum = 0; - const SwPageFrm *pPageFrm = dynamic_cast<const SwPageFrm*>( rLayout.Lower() ); - while( pPageFrm && nPageNum < nDocPageCount ) + const SwPageFrame *pPageFrame = dynamic_cast<const SwPageFrame*>( rLayout.Lower() ); + while( pPageFrame && nPageNum < nDocPageCount ) { - OSL_ENSURE( pPageFrm, "Empty page frame. How are we going to print this?" ); + OSL_ENSURE( pPageFrame, "Empty page frame. How are we going to print this?" ); ++nPageNum; rValidPagesSet.insert( nPageNum ); - validStartFrms[ nPageNum ] = pPageFrm; - pPageFrm = static_cast<const SwPageFrm*>(pPageFrm->GetNext()); + validStartFrames[ nPageNum ] = pPageFrame; + pPageFrame = static_cast<const SwPageFrame*>(pPageFrame->GetNext()); rPrinterPaperTrays[ nPageNum ] = lcl_GetPaperBin( pStPage ); } @@ -936,12 +936,12 @@ void SwDoc::CalculatePagePairsForProspectPrinting( // now fill the vector for calculating the page pairs with the start frames // from the above obtained vector - std::vector< const SwPageFrm * > aVec; + std::vector< const SwPageFrame * > aVec; for ( std::vector< sal_Int32 >::size_type i = 0; i < aPagesToPrint.size(); ++i) { const sal_Int32 nPage = aPagesToPrint[i]; - const SwPageFrm *pFrm = validStartFrms[ nPage ]; - aVec.push_back( pFrm ); + const SwPageFrame *pFrame = validStartFrames[ nPage ]; + aVec.push_back( pFrame ); } // just one page is special ... @@ -957,8 +957,8 @@ void SwDoc::CalculatePagePairsForProspectPrinting( } // make sure that all pages are in correct order - std::vector< const SwPageFrm * >::size_type nSPg = 0; - std::vector< const SwPageFrm * >::size_type nEPg = aVec.size(); + std::vector< const SwPageFrame * >::size_type nSPg = 0; + std::vector< const SwPageFrame * >::size_type nEPg = aVec.size(); sal_Int32 nStep = 1; if ( 0 == (nEPg & 1 )) // there are no uneven ones! --nEPg; @@ -978,12 +978,12 @@ void SwDoc::CalculatePagePairsForProspectPrinting( nPrintCount < nCntPage; ++nPrintCount ) { pStPage = aVec[ nSPg ]; - const SwPageFrm* pNxtPage = nEPg < aVec.size() ? aVec[ nEPg ] : nullptr; + const SwPageFrame* pNxtPage = nEPg < aVec.size() ? aVec[ nEPg ] : nullptr; short nRtlOfs = bPrintProspectRTL ? 1 : 0; if ( 0 == (( nSPg + nRtlOfs) & 1 ) ) // switch for odd number in LTR, even number in RTL { - const SwPageFrm* pTmp = pStPage; + const SwPageFrame* pTmp = pStPage; pStPage = pNxtPage; pNxtPage = pTmp; } @@ -1140,8 +1140,8 @@ static bool lcl_CheckSmartTagsAgain( const SwNodePtr& rpNd, void* ) */ void SwDoc::SpellItAgainSam( bool bInvalid, bool bOnlyWrong, bool bSmartTags ) { - std::set<SwRootFrm*> aAllLayouts = GetAllLayouts(); - OSL_ENSURE( getIDocumentLayoutAccess().GetCurrentLayout(), "SpellAgain: Where's my RootFrm?" ); + std::set<SwRootFrame*> aAllLayouts = GetAllLayouts(); + OSL_ENSURE( getIDocumentLayoutAccess().GetCurrentLayout(), "SpellAgain: Where's my RootFrame?" ); if( bInvalid ) { for ( auto aLayout : aAllLayouts ) @@ -1160,10 +1160,10 @@ void SwDoc::SpellItAgainSam( bool bInvalid, bool bOnlyWrong, bool bSmartTags ) void SwDoc::InvalidateAutoCompleteFlag() { - SwRootFrm* pTmpRoot = getIDocumentLayoutAccess().GetCurrentLayout(); + SwRootFrame* pTmpRoot = getIDocumentLayoutAccess().GetCurrentLayout(); if( pTmpRoot ) { - std::set<SwRootFrm*> aAllLayouts = GetAllLayouts(); + std::set<SwRootFrame*> aAllLayouts = GetAllLayouts(); for( auto aLayout : aAllLayouts ) aLayout->AllInvalidateAutoCompleteWords(); for( sal_uLong nNd = 1, nCnt = GetNodes().Count(); nNd < nCnt; ++nNd ) @@ -1544,7 +1544,7 @@ bool SwDoc::ConvertFieldsToText() if (pFieldAtEnd && pFieldAtEnd->Which() == RES_TXTATR_INPUTFIELD) { SwPosition &rEndPos = *aInsertPam.GetPoint(); - rEndPos.nContent = SwCrsrShell::EndOfInputFieldAtPos( *aInsertPam.End() ); + rEndPos.nContent = SwCursorShell::EndOfInputFieldAtPos( *aInsertPam.End() ); } else { @@ -1680,15 +1680,15 @@ bool SwDoc::ContainsHiddenChars() const return false; } -std::shared_ptr<SwUnoCrsr> SwDoc::CreateUnoCrsr( const SwPosition& rPos, bool bTableCrsr ) +std::shared_ptr<SwUnoCursor> SwDoc::CreateUnoCursor( const SwPosition& rPos, bool bTableCursor ) { - std::shared_ptr<SwUnoCrsr> pNew; - if( bTableCrsr ) - pNew = std::make_shared<SwUnoTableCrsr>(rPos); + std::shared_ptr<SwUnoCursor> pNew; + if( bTableCursor ) + pNew = std::make_shared<SwUnoTableCursor>(rPos); else - pNew = std::make_shared<SwUnoCrsr>(rPos); + pNew = std::make_shared<SwUnoCursor>(rPos); - mvUnoCrsrTable.push_back( pNew ); + mvUnoCursorTable.push_back( pNew ); return pNew; } diff --git a/sw/source/core/doc/docchart.cxx b/sw/source/core/doc/docchart.cxx index e61ef478006d..e0797bd849cc 100644 --- a/sw/source/core/doc/docchart.cxx +++ b/sw/source/core/doc/docchart.cxx @@ -118,7 +118,7 @@ void SwDoc::_UpdateCharts( const SwTable& rTable, SwViewShell const & rVSh ) con SwOLENode *pONd; if( nullptr != ( pONd = aIdx.GetNode().GetOLENode() ) && aName == pONd->GetChartTableName() && - pONd->getLayoutFrm( rVSh.GetLayout() ) ) + pONd->getLayoutFrame( rVSh.GetLayout() ) ) { SwChartDataProvider *pPCD = getIDocumentChartDataProviderAccess().GetChartDataProvider(); if (pPCD) diff --git a/sw/source/core/doc/doccorr.cxx b/sw/source/core/doc/doccorr.cxx index 278d7f2a4a6d..b78d308edd46 100644 --- a/sw/source/core/doc/doccorr.cxx +++ b/sw/source/core/doc/doccorr.cxx @@ -35,9 +35,9 @@ namespace { - /// find the relevant section in which the SwUnoCrsr may wander. + /// find the relevant section in which the SwUnoCursor may wander. /// returns NULL if no restrictions apply - static const SwStartNode* lcl_FindUnoCrsrSection( const SwNode& rNode ) + static const SwStartNode* lcl_FindUnoCursorSection( const SwNode& rNode ) { const SwStartNode* pStartNode = rNode.StartOfSectionNode(); while( ( pStartNode != nullptr ) && @@ -95,35 +95,35 @@ void PaMCorrAbs( const SwPaM& rRange, SwPosition const aEnd( *rRange.End() ); SwPosition const aNewPos( rNewPos ); SwDoc *const pDoc = aStart.nNode.GetNode().GetDoc(); - SwCrsrShell *const pShell = pDoc->GetEditShell(); + SwCursorShell *const pShell = pDoc->GetEditShell(); if( pShell ) { for(const SwViewShell& rShell : pShell->GetRingContainer()) { - if(dynamic_cast<const SwCrsrShell *>(&rShell) == nullptr) + if(dynamic_cast<const SwCursorShell *>(&rShell) == nullptr) continue; - const SwCrsrShell* pCrsrShell = static_cast<const SwCrsrShell*>(&rShell); - SwPaM *_pStkCrsr = pCrsrShell->GetStkCrsr(); - if( _pStkCrsr ) + const SwCursorShell* pCursorShell = static_cast<const SwCursorShell*>(&rShell); + SwPaM *_pStackCursor = pCursorShell->GetStackCursor(); + if( _pStackCursor ) do { - lcl_PaMCorrAbs( *_pStkCrsr, aStart, aEnd, aNewPos ); - } while ( (_pStkCrsr != nullptr ) && - ((_pStkCrsr = static_cast<SwPaM *>(_pStkCrsr->GetNext())) != pCrsrShell->GetStkCrsr()) ); + lcl_PaMCorrAbs( *_pStackCursor, aStart, aEnd, aNewPos ); + } while ( (_pStackCursor != nullptr ) && + ((_pStackCursor = static_cast<SwPaM *>(_pStackCursor->GetNext())) != pCursorShell->GetStackCursor()) ); - for(SwPaM& rPaM : const_cast<SwShellCrsr*>(pCrsrShell->_GetCrsr())->GetRingContainer()) + for(SwPaM& rPaM : const_cast<SwShellCursor*>(pCursorShell->_GetCursor())->GetRingContainer()) { lcl_PaMCorrAbs( rPaM, aStart, aEnd, aNewPos ); } - if( pCrsrShell->IsTableMode() ) - lcl_PaMCorrAbs( const_cast<SwPaM &>(*pCrsrShell->GetTableCrs()), aStart, aEnd, aNewPos ); + if( pCursorShell->IsTableMode() ) + lcl_PaMCorrAbs( const_cast<SwPaM &>(*pCursorShell->GetTableCrs()), aStart, aEnd, aNewPos ); } } - for(const auto& pWeakUnoCrsr : pDoc->mvUnoCrsrTable) + for(const auto& pWeakUnoCursor : pDoc->mvUnoCursorTable) { - auto pUnoCursor(pWeakUnoCrsr.lock()); + auto pUnoCursor(pWeakUnoCursor.lock()); if(!pUnoCursor) continue; @@ -133,8 +133,8 @@ void PaMCorrAbs( const SwPaM& rRange, // section bool const bLeaveSection = pUnoCursor->IsRemainInSection() && - ( lcl_FindUnoCrsrSection( aNewPos.nNode.GetNode() ) != - lcl_FindUnoCrsrSection( + ( lcl_FindUnoCursorSection( aNewPos.nNode.GetNode() ) != + lcl_FindUnoCursorSection( pUnoCursor->GetPoint()->nNode.GetNode() ) ); for(SwPaM& rPaM : pUnoCursor->GetRingContainer()) @@ -142,11 +142,11 @@ void PaMCorrAbs( const SwPaM& rRange, bChange |= lcl_PaMCorrAbs( rPaM, aStart, aEnd, aNewPos ); } - SwUnoTableCrsr *const pUnoTableCrsr = - dynamic_cast<SwUnoTableCrsr *>(pUnoCursor.get()); - if( pUnoTableCrsr ) + SwUnoTableCursor *const pUnoTableCursor = + dynamic_cast<SwUnoTableCursor *>(pUnoCursor.get()); + if( pUnoTableCursor ) { - for(SwPaM& rPaM : (&pUnoTableCrsr->GetSelRing())->GetRingContainer()) + for(SwPaM& rPaM : (&pUnoTableCursor->GetSelRing())->GetRingContainer()) { bChange |= lcl_PaMCorrAbs( rPaM, aStart, aEnd, aNewPos ); @@ -167,7 +167,7 @@ void PaMCorrAbs( const SwPaM& rRange, void SwDoc::CorrAbs(const SwNodeIndex& rOldNode, const SwPosition& rNewPos, const sal_Int32 nOffset, - bool bMoveCrsr) + bool bMoveCursor) { SwContentNode *const pContentNode( rOldNode.GetNode().GetContentNode() ); SwPaM const aPam(rOldNode, 0, @@ -200,7 +200,7 @@ void SwDoc::CorrAbs(const SwNodeIndex& rOldNode, // To-Do - need to add here 'SwExtraRedlineTable' also ? } - if(bMoveCrsr) + if(bMoveCursor) { ::PaMCorrAbs(aPam, aNewPos); } @@ -209,7 +209,7 @@ void SwDoc::CorrAbs(const SwNodeIndex& rOldNode, void SwDoc::CorrAbs( const SwPaM& rRange, const SwPosition& rNewPos, - bool bMoveCrsr ) + bool bMoveCursor ) { SwPosition aStart(*rRange.Start()); SwPosition aEnd(*rRange.End()); @@ -217,7 +217,7 @@ void SwDoc::CorrAbs( _DelBookmarks( aStart.nNode, aEnd.nNode, nullptr, &aStart.nContent, &aEnd.nContent ); - if(bMoveCrsr) + if(bMoveCursor) ::PaMCorrAbs(rRange, rNewPos); } @@ -225,11 +225,11 @@ void SwDoc::CorrAbs( const SwNodeIndex& rStartNode, const SwNodeIndex& rEndNode, const SwPosition& rNewPos, - bool bMoveCrsr ) + bool bMoveCursor ) { _DelBookmarks( rStartNode, rEndNode ); - if(bMoveCrsr) + if(bMoveCursor) { SwContentNode *const pContentNode( rEndNode.GetNode().GetContentNode() ); SwPaM const aPam(rStartNode, 0, @@ -248,47 +248,47 @@ void PaMCorrRel( const SwNodeIndex &rOldNode, const sal_Int32 nCntIdx = rNewPos.nContent.GetIndex() + nOffset; - SwCrsrShell const* pShell = pDoc->GetEditShell(); + SwCursorShell const* pShell = pDoc->GetEditShell(); if( pShell ) { for(const SwViewShell& rShell : pShell->GetRingContainer()) { - if(dynamic_cast<const SwCrsrShell *>(&rShell) == nullptr) + if(dynamic_cast<const SwCursorShell *>(&rShell) == nullptr) continue; - SwCrsrShell* pCrsrShell = const_cast<SwCrsrShell*>(static_cast<const SwCrsrShell*>(&rShell)); - SwPaM *_pStkCrsr = pCrsrShell->GetStkCrsr(); - if( _pStkCrsr ) + SwCursorShell* pCursorShell = const_cast<SwCursorShell*>(static_cast<const SwCursorShell*>(&rShell)); + SwPaM *_pStackCursor = pCursorShell->GetStackCursor(); + if( _pStackCursor ) do { - lcl_PaMCorrRel1( _pStkCrsr, pOldNode, aNewPos, nCntIdx ); - } while ( (_pStkCrsr != nullptr ) && - ((_pStkCrsr = static_cast<SwPaM *>(_pStkCrsr->GetNext())) != pCrsrShell->GetStkCrsr()) ); + lcl_PaMCorrRel1( _pStackCursor, pOldNode, aNewPos, nCntIdx ); + } while ( (_pStackCursor != nullptr ) && + ((_pStackCursor = static_cast<SwPaM *>(_pStackCursor->GetNext())) != pCursorShell->GetStackCursor()) ); - SwPaM* pStartPaM = pCrsrShell->_GetCrsr(); + SwPaM* pStartPaM = pCursorShell->_GetCursor(); for(SwPaM& rPaM : pStartPaM->GetRingContainer()) { lcl_PaMCorrRel1( &rPaM, pOldNode, aNewPos, nCntIdx); } - if( pCrsrShell->IsTableMode() ) - lcl_PaMCorrRel1( pCrsrShell->GetTableCrs(), pOldNode, aNewPos, nCntIdx ); + if( pCursorShell->IsTableMode() ) + lcl_PaMCorrRel1( pCursorShell->GetTableCrs(), pOldNode, aNewPos, nCntIdx ); } } - for(const auto& pWeakUnoCrsr : pDoc->mvUnoCrsrTable) + for(const auto& pWeakUnoCursor : pDoc->mvUnoCursorTable) { - auto pUnoCrsr(pWeakUnoCrsr.lock()); - if(!pUnoCrsr) + auto pUnoCursor(pWeakUnoCursor.lock()); + if(!pUnoCursor) continue; - for(SwPaM& rPaM : pUnoCrsr->GetRingContainer()) + for(SwPaM& rPaM : pUnoCursor->GetRingContainer()) { lcl_PaMCorrRel1( &rPaM, pOldNode, aNewPos, nCntIdx ); } - SwUnoTableCrsr* pUnoTableCrsr = - dynamic_cast<SwUnoTableCrsr*>(pUnoCrsr.get()); - if( pUnoTableCrsr ) + SwUnoTableCursor* pUnoTableCursor = + dynamic_cast<SwUnoTableCursor*>(pUnoCursor.get()); + if( pUnoTableCursor ) { - for(SwPaM& rPaM : (&pUnoTableCrsr->GetSelRing())->GetRingContainer()) + for(SwPaM& rPaM : (&pUnoTableCursor->GetSelRing())->GetRingContainer()) { lcl_PaMCorrRel1( &rPaM, pOldNode, aNewPos, nCntIdx ); } @@ -299,7 +299,7 @@ void PaMCorrRel( const SwNodeIndex &rOldNode, void SwDoc::CorrRel(const SwNodeIndex& rOldNode, const SwPosition& rNewPos, const sal_Int32 nOffset, - bool bMoveCrsr) + bool bMoveCursor) { getIDocumentMarkAccess()->correctMarksRelative(rOldNode, rNewPos, nOffset); @@ -315,7 +315,7 @@ void SwDoc::CorrRel(const SwNodeIndex& rOldNode, // To-Do - need to add here 'SwExtraRedlineTable' also ? } - if(bMoveCrsr) + if(bMoveCursor) ::PaMCorrRel(rOldNode, rNewPos, nOffset); } diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx index 60547a4371fc..98e34c39b242 100644 --- a/sw/source/core/doc/docdesc.cxx +++ b/sw/source/core/doc/docdesc.cxx @@ -72,9 +72,9 @@ static void lcl_DefaultPageFormat( sal_uInt16 nPoolFormatId, // The default page size is obtained from the application //locale - SwFormatFrmSize aFrmSize( ATT_FIX_SIZE ); + SwFormatFrameSize aFrameSize( ATT_FIX_SIZE ); const Size aPhysSize = SvxPaperInfo::GetDefaultPaperSize(); - aFrmSize.SetSize( aPhysSize ); + aFrameSize.SetSize( aPhysSize ); // Prepare for default margins. // Margins have a default minimum size. @@ -110,19 +110,19 @@ static void lcl_DefaultPageFormat( sal_uInt16 nPoolFormatId, aLR.SetRight( nMinRight ); aLR.SetLeft( nMinLeft ); - rFormat1.SetFormatAttr( aFrmSize ); + rFormat1.SetFormatAttr( aFrameSize ); rFormat1.SetFormatAttr( aLR ); rFormat1.SetFormatAttr( aUL ); - rFormat2.SetFormatAttr( aFrmSize ); + rFormat2.SetFormatAttr( aFrameSize ); rFormat2.SetFormatAttr( aLR ); rFormat2.SetFormatAttr( aUL ); - rFormat3.SetFormatAttr( aFrmSize ); + rFormat3.SetFormatAttr( aFrameSize ); rFormat3.SetFormatAttr( aLR ); rFormat3.SetFormatAttr( aUL ); - rFormat4.SetFormatAttr( aFrmSize ); + rFormat4.SetFormatAttr( aFrameSize ); rFormat4.SetFormatAttr( aLR ); rFormat4.SetFormatAttr( aUL ); } @@ -380,7 +380,7 @@ void SwDoc::ChgPageDesc( size_t i, const SwPageDesc &rChged ) OSL_ENSURE(i < m_PageDescs.size(), "PageDescs is out of range."); SwPageDesc& rDesc = *m_PageDescs[i]; - SwRootFrm* pTmpRoot = getIDocumentLayoutAccess().GetCurrentLayout(); + SwRootFrame* pTmpRoot = getIDocumentLayoutAccess().GetCurrentLayout(); if (GetIDocumentUndoRedo().DoesUndo()) { @@ -884,8 +884,8 @@ void SwDoc::CheckDefaultPageFormat() SwFrameFormat& rMaster = rDesc.GetMaster(); SwFrameFormat& rLeft = rDesc.GetLeft(); - const SwFormatFrmSize& rMasterSize = rMaster.GetFrmSize(); - const SwFormatFrmSize& rLeftSize = rLeft.GetFrmSize(); + const SwFormatFrameSize& rMasterSize = rMaster.GetFrameSize(); + const SwFormatFrameSize& rLeftSize = rLeft.GetFrameSize(); const bool bSetSize = LONG_MAX == rMasterSize.GetWidth() || LONG_MAX == rMasterSize.GetHeight() || diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx index fe5219cdc1e9..ff1f0bae3740 100644 --- a/sw/source/core/doc/docdraw.cxx +++ b/sw/source/core/doc/docdraw.cxx @@ -87,21 +87,21 @@ static void lcl_AdjustPositioningAttr( SwDrawFrameFormat* _pFrameFormat, SwTwips nHoriRelPos = 0; SwTwips nVertRelPos = 0; { - const SwFrm* pAnchorFrm = pContact->GetAnchoredObj( &_rSdrObj )->GetAnchorFrm(); - OSL_ENSURE( !pAnchorFrm || - !pAnchorFrm->IsTextFrm() || - !static_cast<const SwTextFrm*>(pAnchorFrm)->IsFollow(), + const SwFrame* pAnchorFrame = pContact->GetAnchoredObj( &_rSdrObj )->GetAnchorFrame(); + OSL_ENSURE( !pAnchorFrame || + !pAnchorFrame->IsTextFrame() || + !static_cast<const SwTextFrame*>(pAnchorFrame)->IsFollow(), "<lcl_AdjustPositioningAttr(..)> - anchor frame is a follow." ); bool bVert = false; bool bR2L = false; // #i45952# - use anchor position of anchor frame, if it exist. Point aAnchorPos; - if ( pAnchorFrm ) + if ( pAnchorFrame ) { // #i45952# - aAnchorPos = pAnchorFrm->GetFrmAnchorPos( ::HasWrap( &_rSdrObj ) ); - bVert = pAnchorFrm->IsVertical(); - bR2L = pAnchorFrm->IsRightToLeft(); + aAnchorPos = pAnchorFrame->GetFrameAnchorPos( ::HasWrap( &_rSdrObj ) ); + bVert = pAnchorFrame->IsVertical(); + bR2L = pAnchorFrame->IsRightToLeft(); } else { @@ -399,7 +399,7 @@ bool SwDoc::DeleteSelection( SwDrawView& rDrawView ) if( dynamic_cast<const SwVirtFlyDrawObj*>( pObj) != nullptr ) { SwFlyFrameFormat* pFrameFormat = - static_cast<SwVirtFlyDrawObj*>(pObj)->GetFlyFrm()->GetFormat(); + static_cast<SwVirtFlyDrawObj*>(pObj)->GetFlyFrame()->GetFormat(); if( pFrameFormat ) { getIDocumentLayoutAccess().DelLayoutFormat( pFrameFormat ); @@ -490,7 +490,7 @@ _ZSortFly::_ZSortFly( const SwFrameFormat* pFrameFormat, const SwFormatAnchor* p if( pFormat->getIDocumentLayoutAccess().GetCurrentViewShell() ) { // See if there is an SdrObject for it - SwFlyFrm* pFly = SwIterator<SwFlyFrm,SwFormat>( *pFrameFormat ).First(); + SwFlyFrame* pFly = SwIterator<SwFlyFrame,SwFormat>( *pFrameFormat ).First(); if( pFly ) nOrdNum = pFly->GetVirtDrawObj()->GetOrdNum(); } diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx index b5628f10af60..c0b5d3656fee 100644 --- a/sw/source/core/doc/docedt.cxx +++ b/sw/source/core/doc/docedt.cxx @@ -80,8 +80,8 @@ void _RestFlyInRange( _SaveFlyArr & rArr, const SwNodeIndex& rSttIdx, // SetFormatAttr should call Modify() and add it to the node pFormat->SetFormatAttr( aAnchor ); SwContentNode* pCNd = aPos.nNode.GetNode().GetContentNode(); - if( pCNd && pCNd->getLayoutFrm( pFormat->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, nullptr, false ) ) - pFormat->MakeFrms(); + if( pCNd && pCNd->getLayoutFrame( pFormat->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, nullptr, false ) ) + pFormat->MakeFrames(); } sw::CheckAnchoredFlyConsistency(*rSttIdx.GetNode().GetDoc()); } @@ -102,7 +102,7 @@ void _SaveFlyInRange( const SwNodeRange& rRg, _SaveFlyArr& rArr ) _SaveFly aSave( pAPos->nNode.GetIndex() - rRg.aStart.GetIndex(), pFormat, false ); rArr.push_back( aSave ); - pFormat->DelFrms(); + pFormat->DelFrames(); // set a dummy anchor position to maintain anchoring invariants SwFormatAnchor aAnchor( pFormat->GetAnchor() ); aAnchor.SetAnchor(nullptr); @@ -168,7 +168,7 @@ void _SaveFlyInRange( const SwPaM& rPam, const SwNodeIndex& rInsPos, _SaveFly aSave( pAPos->nNode.GetIndex() - rSttNdIdx.GetIndex(), pFormat, bInsPos ); rArr.push_back( aSave ); - pFormat->DelFrms(); + pFormat->DelFrames(); // set a dummy anchor position to maintain anchoring invariants SwFormatAnchor aAnchor( pFormat->GetAnchor() ); aAnchor.SetAnchor(nullptr); @@ -403,7 +403,7 @@ bool sw_JoinText( SwPaM& rPam, bool bJoinPrev ) if( !pContentStore->Empty() ) pContentStore->Restore( pDoc, aIdx.GetIndex() ); - // If the passed PaM is not in the Crsr ring, + // If the passed PaM is not in the Cursor ring, // treat it separately (e.g. when it's being called from AutoFormat) if( pOldTextNd == rPam.GetBound().nContent.GetIdxReg() ) rPam.GetBound() = aAlphaPos; @@ -513,7 +513,7 @@ uno::Any SwDoc::Spell( SwPaM& rPaM, uno::Any aRet; if( nCurrNd <= nEndNd ) { - SwContentFrm* pCntFrm; + SwContentFrame* pContentFrame; bool bGoOn = true; while( bGoOn ) { @@ -521,18 +521,18 @@ uno::Any SwDoc::Spell( SwPaM& rPaM, switch( pNd->GetNodeType() ) { case ND_TEXTNODE: - if( nullptr != ( pCntFrm = pNd->GetTextNode()->getLayoutFrm( getIDocumentLayoutAccess().GetCurrentLayout() )) ) + if( nullptr != ( pContentFrame = pNd->GetTextNode()->getLayoutFrame( getIDocumentLayoutAccess().GetCurrentLayout() )) ) { // skip protected and hidden Cells and Flys - if( pCntFrm->IsProtected() ) + if( pContentFrame->IsProtected() ) { nCurrNd = pNd->EndOfSectionIndex(); } - else if( !static_cast<SwTextFrm*>(pCntFrm)->IsHiddenNow() ) + else if( !static_cast<SwTextFrame*>(pContentFrame)->IsHiddenNow() ) { if( pPageCnt && *pPageCnt && pPageSt ) { - sal_uInt16 nPageNr = pCntFrm->GetPhyPageNum(); + sal_uInt16 nPageNr = pContentFrame->GetPhyPageNum(); if( !*pPageSt ) { *pPageSt = nPageNr; @@ -557,12 +557,12 @@ uno::Any SwDoc::Spell( SwPaM& rPaM, { SwIndex aStartIndex( dynamic_cast< SwTextNode* >( pNd ), nBeginGrammarCheck ); SwPosition aStart( *pNd, aStartIndex ); - SwCursor aCrsr(aStart, nullptr, false); - SwPosition aOrigPos = *aCrsr.GetPoint(); - aCrsr.GoSentence( SwCursor::START_SENT ); - if( aOrigPos != *aCrsr.GetPoint() ) + SwCursor aCursor(aStart, nullptr, false); + SwPosition aOrigPos = *aCursor.GetPoint(); + aCursor.GoSentence( SwCursor::START_SENT ); + if( aOrigPos != *aCursor.GetPoint() ) { - nBeginGrammarCheck = aCrsr.GetPoint()->nContent.GetIndex(); + nBeginGrammarCheck = aCursor.GetPoint()->nContent.GetIndex(); } } nEndGrammarCheck = (pSpellArgs->pEndNode == pNd) @@ -689,9 +689,9 @@ public: inline sal_uInt16 *GetPageSt() { return pPageSt; } }; -SwHyphArgs::SwHyphArgs( const SwPaM *pPam, const Point &rCrsrPos, +SwHyphArgs::SwHyphArgs( const SwPaM *pPam, const Point &rCursorPos, sal_uInt16* pPageCount, sal_uInt16* pPageStart ) - : SwInterHyphInfo( rCrsrPos ), pNode(nullptr), + : SwInterHyphInfo( rCursorPos ), pNode(nullptr), pPageCnt( pPageCount ), pPageSt( pPageStart ) { // The following constraints have to be met: @@ -746,14 +746,14 @@ static bool lcl_HyphenateNode( const SwNodePtr& rpNd, void* pArgs ) SwHyphArgs *pHyphArgs = static_cast<SwHyphArgs*>(pArgs); if( pNode ) { - SwContentFrm* pCntFrm = pNode->getLayoutFrm( pNode->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ); - if( pCntFrm && !static_cast<SwTextFrm*>(pCntFrm)->IsHiddenNow() ) + SwContentFrame* pContentFrame = pNode->getLayoutFrame( pNode->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ); + if( pContentFrame && !static_cast<SwTextFrame*>(pContentFrame)->IsHiddenNow() ) { sal_uInt16 *pPageSt = pHyphArgs->GetPageSt(); sal_uInt16 *pPageCnt = pHyphArgs->GetPageCnt(); if( pPageCnt && *pPageCnt && pPageSt ) { - sal_uInt16 nPageNr = pCntFrm->GetPhyPageNum(); + sal_uInt16 nPageNr = pContentFrame->GetPhyPageNum(); if( !*pPageSt ) { *pPageSt = nPageNr; @@ -777,7 +777,7 @@ static bool lcl_HyphenateNode( const SwNodePtr& rpNd, void* pArgs ) } uno::Reference< XHyphenatedWord > SwDoc::Hyphenate( - SwPaM *pPam, const Point &rCrsrPos, + SwPaM *pPam, const Point &rCursorPos, sal_uInt16* pPageCnt, sal_uInt16* pPageSt ) { OSL_ENSURE(this == pPam->GetDoc(), "SwDoc::Hyphenate: strangers in the night"); @@ -785,7 +785,7 @@ uno::Reference< XHyphenatedWord > SwDoc::Hyphenate( if( *pPam->GetPoint() > *pPam->GetMark() ) pPam->Exchange(); - SwHyphArgs aHyphArg( pPam, rCrsrPos, pPageCnt, pPageSt ); + SwHyphArgs aHyphArg( pPam, rCursorPos, pPageCnt, pPageSt ); SwNodeIndex aTmpIdx( pPam->GetMark()->nNode, 1 ); GetNodes().ForEach( pPam->GetPoint()->nNode, aTmpIdx, lcl_HyphenateNode, &aHyphArg ); diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx index 21acbc441d70..e0c6b2bc86df 100644 --- a/sw/source/core/doc/docfld.cxx +++ b/sw/source/core/doc/docfld.cxx @@ -198,14 +198,14 @@ void _SetGetExpField::GetPosOfContent( SwPosition& rPos ) const } } -void _SetGetExpField::SetBodyPos( const SwContentFrm& rFrm ) +void _SetGetExpField::SetBodyPos( const SwContentFrame& rFrame ) { - if( !rFrm.IsInDocBody() ) + if( !rFrame.IsInDocBody() ) { - SwNodeIndex aIdx( *rFrm.GetNode() ); + SwNodeIndex aIdx( *rFrame.GetNode() ); SwDoc& rDoc = *aIdx.GetNodes().GetDoc(); SwPosition aPos( aIdx ); - bool const bResult = ::GetBodyTextNode( rDoc, aPos, rFrm ); + bool const bResult = ::GetBodyTextNode( rDoc, aPos, rFrame ); OSL_ENSURE(bResult, "Where is the field?"); (void) bResult; // unused in non-debug nNode = aPos.nNode.GetIndex(); @@ -1006,12 +1006,12 @@ void SwDocUpdateField::GetBodyNode( const SwTextField& rTField, sal_uInt16 nFiel // always the first! (in tab headline, header-/footer) Point aPt; - const SwContentFrm* pFrm = rTextNd.getLayoutFrm( rDoc.getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ); + const SwContentFrame* pFrame = rTextNd.getLayoutFrame( rDoc.getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ); _SetGetExpField* pNew = nullptr; bool bIsInBody = false; - if( !pFrm || pFrm->IsInDocBody() ) + if( !pFrame || pFrame->IsInDocBody() ) { // create index to determine the TextNode SwNodeIndex aIdx( rTextNd ); @@ -1021,14 +1021,14 @@ void SwDocUpdateField::GetBodyNode( const SwTextField& rTField, sal_uInt16 nFiel // in frames whose anchor is in redline. However, we do want to update // fields in hidden sections. So: In order to be updated, a field 1) // must have a frame, or 2) it must be in the document body. - if( (pFrm != nullptr) || bIsInBody ) + if( (pFrame != nullptr) || bIsInBody ) pNew = new _SetGetExpField( aIdx, &rTField ); } else { // create index to determine the TextNode SwPosition aPos( rDoc.GetNodes().GetEndOfPostIts() ); - bool const bResult = GetBodyTextNode( rDoc, aPos, *pFrm ); + bool const bResult = GetBodyTextNode( rDoc, aPos, *pFrame ); OSL_ENSURE(bResult, "where is the Field"); (void) bResult; // unused in non-debug pNew = new _SetGetExpField( aPos.nNode, &rTField, &aPos.nContent ); @@ -1071,11 +1071,11 @@ void SwDocUpdateField::GetBodyNode( const SwSectionNode& rSectNd ) // always the first! (in tab headline, header-/footer) Point aPt; - const SwContentFrm* pFrm = pCNd->getLayoutFrm( rDoc.getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ); - if( !pFrm ) + const SwContentFrame* pFrame = pCNd->getLayoutFrame( rDoc.getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ); + if( !pFrame ) break; - bool const bResult = GetBodyTextNode( rDoc, aPos, *pFrm ); + bool const bResult = GetBodyTextNode( rDoc, aPos, *pFrame ); OSL_ENSURE(bResult, "where is the Field"); (void) bResult; // unused in non-debug pNew = new _SetGetExpField( rSectNd, &aPos ); diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx index 3553acf022d8..c2ae5a0baf03 100644 --- a/sw/source/core/doc/docfly.cxx +++ b/sw/source/core/doc/docfly.cxx @@ -181,9 +181,9 @@ static Point lcl_FindAnchorLayPos( SwDoc& rDoc, const SwFormatAnchor& rAnch, case FLY_AS_CHAR: if( pFlyFormat && rAnch.GetContentAnchor() ) { - const SwFrm* pOld = static_cast<const SwFlyFrameFormat*>(pFlyFormat)->GetFrm( &aRet ); + const SwFrame* pOld = static_cast<const SwFlyFrameFormat*>(pFlyFormat)->GetFrame( &aRet ); if( pOld ) - aRet = pOld->Frm().Pos(); + aRet = pOld->Frame().Pos(); } break; @@ -193,9 +193,9 @@ static Point lcl_FindAnchorLayPos( SwDoc& rDoc, const SwFormatAnchor& rAnch, { const SwPosition *pPos = rAnch.GetContentAnchor(); const SwContentNode* pNd = pPos->nNode.GetNode().GetContentNode(); - const SwFrm* pOld = pNd ? pNd->getLayoutFrm( rDoc.getIDocumentLayoutAccess().GetCurrentLayout(), &aRet, nullptr, false ) : nullptr; + const SwFrame* pOld = pNd ? pNd->getLayoutFrame( rDoc.getIDocumentLayoutAccess().GetCurrentLayout(), &aRet, nullptr, false ) : nullptr; if( pOld ) - aRet = pOld->Frm().Pos(); + aRet = pOld->Frame().Pos(); } break; @@ -204,21 +204,21 @@ static Point lcl_FindAnchorLayPos( SwDoc& rDoc, const SwFormatAnchor& rAnch, { const SwFlyFrameFormat* pFormat = static_cast<SwFlyFrameFormat*>(rAnch.GetContentAnchor()-> nNode.GetNode().GetFlyFormat()); - const SwFrm* pOld = pFormat ? pFormat->GetFrm( &aRet ) : nullptr; + const SwFrame* pOld = pFormat ? pFormat->GetFrame( &aRet ) : nullptr; if( pOld ) - aRet = pOld->Frm().Pos(); + aRet = pOld->Frame().Pos(); } break; case FLY_AT_PAGE: { sal_uInt16 nPgNum = rAnch.GetPageNum(); - const SwPageFrm *pPage = static_cast<SwPageFrm*>(rDoc.getIDocumentLayoutAccess().GetCurrentLayout()->Lower()); + const SwPageFrame *pPage = static_cast<SwPageFrame*>(rDoc.getIDocumentLayoutAccess().GetCurrentLayout()->Lower()); for( sal_uInt16 i = 1; (i <= nPgNum) && pPage; ++i, - pPage =static_cast<const SwPageFrm*>(pPage->GetNext()) ) + pPage =static_cast<const SwPageFrame*>(pPage->GetNext()) ) if( i == nPgNum ) { - aRet = pPage->Frm().Pos(); + aRet = pPage->Frame().Pos(); break; } } @@ -233,7 +233,7 @@ static Point lcl_FindAnchorLayPos( SwDoc& rDoc, const SwFormatAnchor& rAnch, #define IGNOREANCHOR 1 #define DONTMAKEFRMS 2 -sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrameFormat& rFormat, SfxItemSet& rSet, bool bNewFrms ) +sal_Int8 SwDoc::SetFlyFrameAnchor( SwFrameFormat& rFormat, SfxItemSet& rSet, bool bNewFrames ) { // Changing anchors is almost always allowed. // Exception: Paragraph and character bound frames must not become @@ -261,7 +261,7 @@ sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrameFormat& rFormat, SfxItemSet& rSet, bool // Destroy the old Frames. // The Views are hidden implicitly, so hiding them another time would be // kind of a show! - rFormat.DelFrms(); + rFormat.DelFrames(); if ( FLY_AS_CHAR == nOld ) { @@ -300,7 +300,7 @@ sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrameFormat& rFormat, SfxItemSet& rSet, bool { const SwPosition *pPos = aNewAnch.GetContentAnchor(); SwTextNode *pNd = pPos->nNode.GetNode().GetTextNode(); - OSL_ENSURE( pNd, "Crsr does not point to TextNode." ); + OSL_ENSURE( pNd, "Cursor does not point to TextNode." ); SwFormatFlyCnt aFormat( static_cast<SwFlyFrameFormat*>(&rFormat) ); pNd->InsertItem( aFormat, pPos->nContent.GetIndex(), 0 ); @@ -380,15 +380,15 @@ sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrameFormat& rFormat, SfxItemSet& rSet, bool break; } - if( bNewFrms ) - rFormat.MakeFrms(); + if( bNewFrames ) + rFormat.MakeFrames(); return MAKEFRMS; } static bool -lcl_SetFlyFrmAttr(SwDoc & rDoc, - sal_Int8 (SwDoc::*pSetFlyFrmAnchor)(SwFrameFormat &, SfxItemSet &, bool), +lcl_SetFlyFrameAttr(SwDoc & rDoc, + sal_Int8 (SwDoc::*pSetFlyFrameAnchor)(SwFrameFormat &, SfxItemSet &, bool), SwFrameFormat & rFlyFormat, SfxItemSet & rSet) { // #i32968# Inserting columns in the frame causes MakeFrameFormat to put two @@ -398,9 +398,9 @@ lcl_SetFlyFrmAttr(SwDoc & rDoc, // Is the anchor attribute included? // If so, we pass it to a special method, which returns true // if the Fly needs to be created anew, because we e.g change the FlyType. - sal_Int8 const nMakeFrms = + sal_Int8 const nMakeFrames = (SfxItemState::SET == rSet.GetItemState( RES_ANCHOR, false )) - ? (rDoc.*pSetFlyFrmAnchor)( rFlyFormat, rSet, false ) + ? (rDoc.*pSetFlyFrameAnchor)( rFlyFormat, rSet, false ) : DONTMAKEFRMS; const SfxPoolItem* pItem; @@ -421,7 +421,7 @@ lcl_SetFlyFrmAttr(SwDoc & rDoc, rSet.ClearItem( nWhich ); break; case RES_ANCHOR: - if( DONTMAKEFRMS != nMakeFrms ) + if( DONTMAKEFRMS != nMakeFrames ) break; default: @@ -440,10 +440,10 @@ lcl_SetFlyFrmAttr(SwDoc & rDoc, if( aTmpSet.Count() ) rFlyFormat.SetFormatAttr( aTmpSet ); - if( MAKEFRMS == nMakeFrms ) - rFlyFormat.MakeFrms(); + if( MAKEFRMS == nMakeFrames ) + rFlyFormat.MakeFrames(); - return aTmpSet.Count() || MAKEFRMS == nMakeFrms; + return aTmpSet.Count() || MAKEFRMS == nMakeFrames; } void SwDoc::CheckForUniqueItemForLineFillNameOrIndex(SfxItemSet& rSet) @@ -504,7 +504,7 @@ void SwDoc::CheckForUniqueItemForLineFillNameOrIndex(SfxItemSet& rSet) } } -bool SwDoc::SetFlyFrmAttr( SwFrameFormat& rFlyFormat, SfxItemSet& rSet ) +bool SwDoc::SetFlyFrameAttr( SwFrameFormat& rFlyFormat, SfxItemSet& rSet ) { if( !rSet.Count() ) return false; @@ -517,7 +517,7 @@ bool SwDoc::SetFlyFrmAttr( SwFrameFormat& rFlyFormat, SfxItemSet& rSet ) pSaveUndo.reset( new SwUndoFormatAttrHelper( rFlyFormat ) ); } - bool const bRet = lcl_SetFlyFrmAttr(*this, &SwDoc::SetFlyFrmAnchor, rFlyFormat, rSet); + bool const bRet = lcl_SetFlyFrameAttr(*this, &SwDoc::SetFlyFrameAnchor, rFlyFormat, rSet); if ( pSaveUndo.get() ) { @@ -529,13 +529,13 @@ bool SwDoc::SetFlyFrmAttr( SwFrameFormat& rFlyFormat, SfxItemSet& rSet ) getIDocumentState().SetModified(); - SwTextBoxHelper::syncFlyFrmAttr(rFlyFormat, rSet); + SwTextBoxHelper::syncFlyFrameAttr(rFlyFormat, rSet); return bRet; } // #i73249# -void SwDoc::SetFlyFrmTitle( SwFlyFrameFormat& rFlyFrameFormat, +void SwDoc::SetFlyFrameTitle( SwFlyFrameFormat& rFlyFrameFormat, const OUString& sNewTitle ) { if ( rFlyFrameFormat.GetObjTitle() == sNewTitle ) @@ -558,7 +558,7 @@ void SwDoc::SetFlyFrmTitle( SwFlyFrameFormat& rFlyFrameFormat, getIDocumentState().SetModified(); } -void SwDoc::SetFlyFrmDescription( SwFlyFrameFormat& rFlyFrameFormat, +void SwDoc::SetFlyFrameDescription( SwFlyFrameFormat& rFlyFrameFormat, const OUString& sNewDescription ) { if ( rFlyFrameFormat.GetObjDescription() == sNewDescription ) @@ -584,9 +584,9 @@ void SwDoc::SetFlyFrmDescription( SwFlyFrameFormat& rFlyFrameFormat, bool SwDoc::SetFrameFormatToFly( SwFrameFormat& rFormat, SwFrameFormat& rNewFormat, SfxItemSet* pSet, bool bKeepOrient ) { - bool bChgAnchor = false, bFrmSz = false; + bool bChgAnchor = false, bFrameSz = false; - const SwFormatFrmSize aFrmSz( rFormat.GetFrmSize() ); + const SwFormatFrameSize aFrameSz( rFormat.GetFrameSize() ); const SwFormatVertOrient aVert( rFormat.GetVertOrient() ); const SwFormatHoriOrient aHori( rFormat.GetHoriOrient() ); @@ -617,7 +617,7 @@ bool SwDoc::SetFrameFormatToFly( SwFrameFormat& rFormat, SwFrameFormat& rNewForm if( SfxItemState::SET == rNewFormat.GetAttrSet().GetItemState( RES_FRM_SIZE, false )) { rFormat.ResetFormatAttr( RES_FRM_SIZE ); - bFrmSz = true; + bFrameSz = true; } const SfxItemSet* pAsk = pSet; @@ -627,15 +627,15 @@ bool SwDoc::SetFrameFormatToFly( SwFrameFormat& rFormat, SwFrameFormat& rNewForm rFormat.GetAnchor().GetAnchorId() ) { if( pSet ) - bChgAnchor = MAKEFRMS == SetFlyFrmAnchor( rFormat, *pSet, false ); + bChgAnchor = MAKEFRMS == SetFlyFrameAnchor( rFormat, *pSet, false ); else { // Needs to have the FlyFormat range, because we set attributes in it, - // in SetFlyFrmAnchor. + // in SetFlyFrameAnchor. SfxItemSet aFlySet( *rNewFormat.GetAttrSet().GetPool(), rNewFormat.GetAttrSet().GetRanges() ); aFlySet.Put( *pItem ); - bChgAnchor = MAKEFRMS == SetFlyFrmAnchor( rFormat, aFlySet, false); + bChgAnchor = MAKEFRMS == SetFlyFrameAnchor( rFormat, aFlySet, false); } } } @@ -656,11 +656,11 @@ bool SwDoc::SetFrameFormatToFly( SwFrameFormat& rFormat, SwFrameFormat& rNewForm rFormat.ResetFormatAttr( RES_BACKGROUND, RES_COL ); rFormat.ResetFormatAttr( RES_URL, RES_EDIT_IN_READONLY ); - if( !bFrmSz ) - rFormat.SetFormatAttr( aFrmSz ); + if( !bFrameSz ) + rFormat.SetFormatAttr( aFrameSz ); if( bChgAnchor ) - rFormat.MakeFrms(); + rFormat.MakeFrames(); if( pUndo ) pUndo->DeRegisterFromFormat( rFormat ); @@ -718,8 +718,8 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList, } // #i26791# - const SwFrm* pOldAnchorFrm = pContact->GetAnchorFrm( pObj ); - const SwFrm* pNewAnchorFrm = pOldAnchorFrm; + const SwFrame* pOldAnchorFrame = pContact->GetAnchorFrame( pObj ); + const SwFrame* pNewAnchorFrame = pOldAnchorFrame; // #i54336# // Instead of only keeping the index position for an as-character @@ -746,24 +746,24 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList, case FLY_AT_PARA: case FLY_AT_CHAR: { - const Point aNewPoint = ( pOldAnchorFrm->IsVertical() || - pOldAnchorFrm->IsRightToLeft() ) + const Point aNewPoint = ( pOldAnchorFrame->IsVertical() || + pOldAnchorFrame->IsRightToLeft() ) ? aObjRect.TopRight() : aPt; // allow drawing objects in header/footer - pNewAnchorFrm = ::FindAnchor( pOldAnchorFrm, aNewPoint ); - if ( pNewAnchorFrm->IsTextFrm() && static_cast<const SwTextFrm*>(pNewAnchorFrm)->IsFollow() ) + pNewAnchorFrame = ::FindAnchor( pOldAnchorFrame, aNewPoint ); + if ( pNewAnchorFrame->IsTextFrame() && static_cast<const SwTextFrame*>(pNewAnchorFrame)->IsFollow() ) { - pNewAnchorFrm = static_cast<const SwTextFrm*>(pNewAnchorFrm)->FindMaster(); + pNewAnchorFrame = static_cast<const SwTextFrame*>(pNewAnchorFrame)->FindMaster(); } - if ( pNewAnchorFrm->IsProtected() ) + if ( pNewAnchorFrame->IsProtected() ) { - pNewAnchorFrm = nullptr; + pNewAnchorFrame = nullptr; } else { - SwPosition aPos( *static_cast<const SwContentFrm*>(pNewAnchorFrm)->GetNode() ); + SwPosition aPos( *static_cast<const SwContentFrame*>(pNewAnchorFrame)->GetNode() ); aNewAnch.SetType( _eAnchorType ); aNewAnch.SetAnchor( &aPos ); } @@ -772,24 +772,24 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList, case FLY_AT_FLY: // LAYER_IMPL { - // Search the closest SwFlyFrm starting from the upper left corner. - SwFrm *pTextFrm; + // Search the closest SwFlyFrame starting from the upper left corner. + SwFrame *pTextFrame; { - SwCrsrMoveState aState( MV_SETONLYTEXT ); + SwCursorMoveState aState( MV_SETONLYTEXT ); SwPosition aPos( GetNodes() ); Point aPoint( aPt ); aPoint.setX(aPoint.getX() - 1); - getIDocumentLayoutAccess().GetCurrentLayout()->GetCrsrOfst( &aPos, aPoint, &aState ); + getIDocumentLayoutAccess().GetCurrentLayout()->GetCursorOfst( &aPos, aPoint, &aState ); // consider that drawing objects can be in - // header/footer. Thus, <GetFrm()> by left-top-corner - pTextFrm = aPos.nNode.GetNode(). - GetContentNode()->getLayoutFrm( getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ); + // header/footer. Thus, <GetFrame()> by left-top-corner + pTextFrame = aPos.nNode.GetNode(). + GetContentNode()->getLayoutFrame( getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ); } - const SwFrm *pTmp = ::FindAnchor( pTextFrm, aPt ); - pNewAnchorFrm = pTmp->FindFlyFrm(); - if( pNewAnchorFrm && !pNewAnchorFrm->IsProtected() ) + const SwFrame *pTmp = ::FindAnchor( pTextFrame, aPt ); + pNewAnchorFrame = pTmp->FindFlyFrame(); + if( pNewAnchorFrame && !pNewAnchorFrame->IsProtected() ) { - const SwFrameFormat *pTmpFormat = static_cast<const SwFlyFrm*>(pNewAnchorFrm)->GetFormat(); + const SwFrameFormat *pTmpFormat = static_cast<const SwFlyFrame*>(pNewAnchorFrame)->GetFormat(); const SwFormatContent& rContent = pTmpFormat->GetContent(); SwPosition aPos( *rContent.GetContentIdx() ); aNewAnch.SetAnchor( &aPos ); @@ -801,32 +801,32 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList, } case FLY_AT_PAGE: { - pNewAnchorFrm = getIDocumentLayoutAccess().GetCurrentLayout()->Lower(); - while ( pNewAnchorFrm && !pNewAnchorFrm->Frm().IsInside( aPt ) ) - pNewAnchorFrm = pNewAnchorFrm->GetNext(); - if ( !pNewAnchorFrm ) + pNewAnchorFrame = getIDocumentLayoutAccess().GetCurrentLayout()->Lower(); + while ( pNewAnchorFrame && !pNewAnchorFrame->Frame().IsInside( aPt ) ) + pNewAnchorFrame = pNewAnchorFrame->GetNext(); + if ( !pNewAnchorFrame ) continue; - aNewAnch.SetPageNum( static_cast<const SwPageFrm*>(pNewAnchorFrm)->GetPhyPageNum()); + aNewAnch.SetPageNum( static_cast<const SwPageFrame*>(pNewAnchorFrame)->GetPhyPageNum()); } break; case FLY_AS_CHAR: if( _bSameOnly ) // Change of position/size { - if( !pOldAnchorFrm ) + if( !pOldAnchorFrame ) { pContact->ConnectToLayout(); - pOldAnchorFrm = pContact->GetAnchorFrm(); + pOldAnchorFrame = pContact->GetAnchorFrame(); } - const_cast<SwTextFrm*>(static_cast<const SwTextFrm*>(pOldAnchorFrm))->Prepare(); + const_cast<SwTextFrame*>(static_cast<const SwTextFrame*>(pOldAnchorFrame))->Prepare(); } else // Change of anchors { // allow drawing objects in header/footer - pNewAnchorFrm = ::FindAnchor( pOldAnchorFrm, aPt ); - if( pNewAnchorFrm->IsProtected() ) + pNewAnchorFrame = ::FindAnchor( pOldAnchorFrame, aPt ); + if( pNewAnchorFrame->IsProtected() ) { - pNewAnchorFrm = nullptr; + pNewAnchorFrame = nullptr; break; } @@ -834,19 +834,19 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList, Point aPoint( aPt ); aPoint.setX(aPoint.getX() - 1); // Do not load in the DrawObj! aNewAnch.SetType( FLY_AS_CHAR ); - SwPosition aPos( *static_cast<const SwContentFrm*>(pNewAnchorFrm)->GetNode() ); - if ( pNewAnchorFrm->Frm().IsInside( aPoint ) ) + SwPosition aPos( *static_cast<const SwContentFrame*>(pNewAnchorFrame)->GetNode() ); + if ( pNewAnchorFrame->Frame().IsInside( aPoint ) ) { // We need to find a TextNode, because only there we can anchor a // content-bound DrawObject. - SwCrsrMoveState aState( MV_SETONLYTEXT ); - getIDocumentLayoutAccess().GetCurrentLayout()->GetCrsrOfst( &aPos, aPoint, &aState ); + SwCursorMoveState aState( MV_SETONLYTEXT ); + getIDocumentLayoutAccess().GetCurrentLayout()->GetCursorOfst( &aPos, aPoint, &aState ); } else { SwContentNode &rCNd = (SwContentNode&) - *static_cast<const SwContentFrm*>(pNewAnchorFrm)->GetNode(); - if ( pNewAnchorFrm->Frm().Bottom() < aPt.Y() ) + *static_cast<const SwContentFrame*>(pNewAnchorFrame)->GetNode(); + if ( pNewAnchorFrame->Frame().Bottom() < aPt.Y() ) rCNd.MakeStartIndex( &aPos.nContent ); else rCNd.MakeEndIndex( &aPos.nContent ); @@ -868,8 +868,8 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList, } if ( (FLY_AS_CHAR != _eAnchorType) && - pNewAnchorFrm && - ( !_bSameOnly || pNewAnchorFrm != pOldAnchorFrm ) ) + pNewAnchorFrame && + ( !_bSameOnly || pNewAnchorFrame != pOldAnchorFrame ) ) { // #i26791# - Direct object positioning no longer needed. Apply // of attributes (method call <SetAttr(..)>) takes care of the @@ -884,13 +884,13 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList, { SwRect aNewObjRect( aObjRect ); static_cast<SwAnchoredDrawObject*>(pContact->GetAnchoredObj( nullptr )) - ->AdjustPositioningAttr( pNewAnchorFrm, + ->AdjustPositioningAttr( pNewAnchorFrame, &aNewObjRect ); } else { static_cast<SwAnchoredDrawObject*>(pContact->GetAnchoredObj( pObj )) - ->AdjustPositioningAttr( pNewAnchorFrm ); + ->AdjustPositioningAttr( pNewAnchorFrame ); } } } @@ -902,7 +902,7 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList, // #i54336# if (xOldAsCharAnchorPos) { - if ( pNewAnchorFrm) + if ( pNewAnchorFrame) { // We need to handle InContents in a special way: // The TextAttribut needs to be destroyed which, unfortunately, also @@ -970,9 +970,9 @@ SwChainRet SwDoc::Chainable( const SwFrameFormat &rSource, const SwFrameFormat & return SwChainRet::NOT_EMPTY; } - for( auto pSpzFrmFm : *GetSpzFrameFormats() ) + for( auto pSpzFrameFm : *GetSpzFrameFormats() ) { - const SwFormatAnchor& rAnchor = pSpzFrmFm->GetAnchor(); + const SwFormatAnchor& rAnchor = pSpzFrameFm->GetAnchor(); sal_uLong nTstSttNd; // #i20622# - to-frame anchored objects are allowed. if ( ((rAnchor.GetAnchorId() == FLY_AT_PARA) || @@ -1053,12 +1053,12 @@ SwChainRet SwDoc::Chain( SwFrameFormat &rSource, const SwFrameFormat &rDest ) aChain.SetNext( &rDestFormat ); aSet.Put( aChain ); - SwFormatFrmSize aSize( rSource.GetFrmSize() ); + SwFormatFrameSize aSize( rSource.GetFrameSize() ); if ( aSize.GetHeightSizeType() != ATT_FIX_SIZE ) { - SwFlyFrm *pFly = SwIterator<SwFlyFrm,SwFormat>( rSource ).First(); + SwFlyFrame *pFly = SwIterator<SwFlyFrame,SwFormat>( rSource ).First(); if ( pFly ) - aSize.SetHeight( pFly->Frm().Height() ); + aSize.SetHeight( pFly->Frame().Height() ); aSize.SetHeightSizeType( ATT_FIX_SIZE ); aSet.Put( aSize ); } diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index 55c4d81e4eaf..5c0f91413d0b 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -259,7 +259,7 @@ void SwDoc::ResetAttrs( const SwPaM &rRg, SwIndex& rSt = pPam->GetPoint()->nContent; sal_Int32 nMkPos, nPtPos = rSt.GetIndex(); - // Special case: if the Crsr is located within a URL attribute, we take over it's area + // Special case: if the Cursor is located within a URL attribute, we take over it's area SwTextAttr const*const pURLAttr( pTextNd->GetTextAttrAt(rSt.GetIndex(), RES_TXTATR_INETFMT)); if (pURLAttr && !pURLAttr->GetINetFormat().GetValue().isEmpty()) @@ -1401,7 +1401,7 @@ void SwDoc::CopyPageDesc( const SwPageDesc& rSrcDesc, SwPageDesc& rDstDesc, bool bCopyPoolIds ) { bool bNotifyLayout = false; - SwRootFrm* pTmpRoot = getIDocumentLayoutAccess().GetCurrentLayout(); + SwRootFrame* pTmpRoot = getIDocumentLayoutAccess().GetCurrentLayout(); rDstDesc.SetLandscape( rSrcDesc.GetLandscape() ); rDstDesc.SetNumType( rSrcDesc.GetNumType() ); diff --git a/sw/source/core/doc/docftn.cxx b/sw/source/core/doc/docftn.cxx index 8cca4cd8b0ba..5bec265ffe26 100644 --- a/sw/source/core/doc/docftn.cxx +++ b/sw/source/core/doc/docftn.cxx @@ -251,7 +251,7 @@ SwFootnoteInfo::SwFootnoteInfo(SwTextFormatColl *pFormat) : void SwDoc::SetFootnoteInfo(const SwFootnoteInfo& rInfo) { - SwRootFrm* pTmpRoot = getIDocumentLayoutAccess().GetCurrentLayout(); + SwRootFrame* pTmpRoot = getIDocumentLayoutAccess().GetCurrentLayout(); if( !(GetFootnoteInfo() == rInfo) ) { const SwFootnoteInfo &rOld = GetFootnoteInfo(); @@ -277,7 +277,7 @@ void SwDoc::SetFootnoteInfo(const SwFootnoteInfo& rInfo) if (pTmpRoot) { - std::set<SwRootFrm*> aAllLayouts = GetAllLayouts(); + std::set<SwRootFrame*> aAllLayouts = GetAllLayouts(); if ( bFootnotePos ) for( auto aLayout : aAllLayouts ) aLayout->AllRemoveFootnotes(); @@ -323,7 +323,7 @@ void SwDoc::SetFootnoteInfo(const SwFootnoteInfo& rInfo) void SwDoc::SetEndNoteInfo(const SwEndNoteInfo& rInfo) { - SwRootFrm* pTmpRoot = getIDocumentLayoutAccess().GetCurrentLayout(); + SwRootFrame* pTmpRoot = getIDocumentLayoutAccess().GetCurrentLayout(); if( !(GetEndNoteInfo() == rInfo) ) { if(GetIDocumentUndoRedo().DoesUndo()) @@ -393,7 +393,7 @@ bool SwDoc::SetCurFootnote( const SwPaM& rPam, const OUString& rNumStr, sal_uInt16 nNumber, bool bIsEndNote ) { SwFootnoteIdxs& rFootnoteArr = GetFootnoteIdxs(); - SwRootFrm* pTmpRoot = getIDocumentLayoutAccess().GetCurrentLayout(); + SwRootFrame* pTmpRoot = getIDocumentLayoutAccess().GetCurrentLayout(); const SwPosition* pStt = rPam.Start(), *pEnd = rPam.End(); const sal_uLong nSttNd = pStt->nNode.GetIndex(); diff --git a/sw/source/core/doc/docglos.cxx b/sw/source/core/doc/docglos.cxx index 5d9f9be892e5..6f26c6c4431d 100644 --- a/sw/source/core/doc/docglos.cxx +++ b/sw/source/core/doc/docglos.cxx @@ -127,7 +127,7 @@ void SwDoc::ReplaceDocumentProperties(const SwDoc& rSource, bool mailMerge) /// inserts an AutoText block bool SwDoc::InsertGlossary( SwTextBlocks& rBlock, const OUString& rEntry, - SwPaM& rPaM, SwCrsrShell* pShell ) + SwPaM& rPaM, SwCursorShell* pShell ) { bool bRet = false; const sal_uInt16 nIdx = rBlock.GetIndex( rEntry ); @@ -168,10 +168,10 @@ bool SwDoc::InsertGlossary( SwTextBlocks& rBlock, const OUString& rEntry, pContentNd, (pContentNd) ? pContentNd->Len() : 0 ); GetIDocumentUndoRedo().StartUndo( UNDO_INSGLOSSARY, nullptr ); - SwPaM *_pStartCrsr = &rPaM, *__pStartCrsr = _pStartCrsr; + SwPaM *_pStartCursor = &rPaM, *__pStartCursor = _pStartCursor; do { - SwPosition& rInsPos = *_pStartCrsr->GetPoint(); + SwPosition& rInsPos = *_pStartCursor->GetPoint(); SwStartNode* pBoxSttNd = const_cast<SwStartNode*>(rInsPos.nNode.GetNode(). FindTableBoxStartNode()); @@ -192,8 +192,8 @@ bool SwDoc::InsertGlossary( SwTextBlocks& rBlock, const OUString& rEntry, aACD.RestoreDontExpandItems( rInsPos ); if( pShell ) pShell->SaveTableBoxContent( &rInsPos ); - } while( (_pStartCrsr = static_cast<SwPaM *>(_pStartCrsr->GetNext())) != - __pStartCrsr ); + } while( (_pStartCursor = static_cast<SwPaM *>(_pStartCursor->GetNext())) != + __pStartCursor ); GetIDocumentUndoRedo().EndUndo( UNDO_INSGLOSSARY, nullptr ); getIDocumentFieldsAccess().UnlockExpFields(); diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx index 9bee9bf6d4c1..e05b5b6339da 100644 --- a/sw/source/core/doc/doclay.cxx +++ b/sw/source/core/doc/doclay.cxx @@ -104,7 +104,7 @@ using namespace ::com::sun::star; -#define DEF_FLY_WIDTH 2268 // Default width for FlyFrms (2268 == 4cm) +#define DEF_FLY_WIDTH 2268 // Default width for FlyFrames (2268 == 4cm) static bool lcl_IsItemSet(const SwContentNode & rNode, sal_uInt16 which) { @@ -261,7 +261,7 @@ SwFlyFrameFormat* SwDoc::_MakeFlySection( const SwPosition& rAnchPos, if( SfxItemState::SET != pFormat->GetAttrSet().GetItemState( RES_FRM_SIZE )) { - SwFormatFrmSize aFormatSize( ATT_VAR_SIZE, 0, DEF_FLY_WIDTH ); + SwFormatFrameSize aFormatSize( ATT_VAR_SIZE, 0, DEF_FLY_WIDTH ); const SwNoTextNode* pNoTextNode = rNode.GetNoTextNode(); if( pNoTextNode ) { @@ -281,7 +281,7 @@ SwFlyFrameFormat* SwDoc::_MakeFlySection( const SwPosition& rAnchPos, // Set up frames if( getIDocumentLayoutAccess().GetCurrentViewShell() ) - pFormat->MakeFrms(); // ??? + pFormat->MakeFrames(); // ??? if (GetIDocumentUndoRedo().DoesUndo()) { @@ -506,10 +506,10 @@ static bool lcl_TstFlyRange( const SwPaM* pPam, const SwPosition* pFlyPos, return bOk; } -SwPosFlyFrms SwDoc::GetAllFlyFormats( const SwPaM* pCmpRange, bool bDrawAlso, +SwPosFlyFrames SwDoc::GetAllFlyFormats( const SwPaM* pCmpRange, bool bDrawAlso, bool bAsCharAlso ) const { - SwPosFlyFrms aRetval; + SwPosFlyFrames aRetval; // collect all anchored somehow to paragraphs for( auto pFly : *GetSpzFrameFormats() ) @@ -529,7 +529,7 @@ SwPosFlyFrms SwDoc::GetAllFlyFormats( const SwPaM* pCmpRange, bool bDrawAlso, if( pCmpRange && !lcl_TstFlyRange( pCmpRange, pAPos, rAnchor.GetAnchorId() )) continue; // not a valid FlyFrame - aRetval.insert(SwPosFlyFrmPtr(new SwPosFlyFrm(pAPos->nNode, pFly, aRetval.size()))); + aRetval.insert(SwPosFlyFramePtr(new SwPosFlyFrame(pAPos->nNode, pFly, aRetval.size()))); } } } @@ -541,7 +541,7 @@ SwPosFlyFrms SwDoc::GetAllFlyFormats( const SwPaM* pCmpRange, bool bDrawAlso, return aRetval; } - const SwPageFrm *pPage = static_cast<const SwPageFrm*>(getIDocumentLayoutAccess().GetCurrentLayout()->GetLower()); + const SwPageFrame *pPage = static_cast<const SwPageFrame*>(getIDocumentLayoutAccess().GetCurrentLayout()->GetLower()); while( pPage ) { if( pPage->GetSortedObjs() ) @@ -551,7 +551,7 @@ SwPosFlyFrms SwDoc::GetAllFlyFormats( const SwPaM* pCmpRange, bool bDrawAlso, { SwAnchoredObject* pAnchoredObj = rObjs[i]; SwFrameFormat *pFly; - if ( dynamic_cast<const SwFlyFrm*>( pAnchoredObj) != nullptr ) + if ( dynamic_cast<const SwFlyFrame*>( pAnchoredObj) != nullptr ) pFly = &(pAnchoredObj->GetFrameFormat()); else if ( bDrawAlso ) pFly = &(pAnchoredObj->GetFrameFormat()); @@ -563,28 +563,28 @@ SwPosFlyFrms SwDoc::GetAllFlyFormats( const SwPaM* pCmpRange, bool bDrawAlso, (FLY_AT_FLY != rAnchor.GetAnchorId()) && (FLY_AT_CHAR != rAnchor.GetAnchorId())) { - const SwContentFrm * pContentFrm = pPage->FindFirstBodyContent(); - if ( !pContentFrm ) + const SwContentFrame * pContentFrame = pPage->FindFirstBodyContent(); + if ( !pContentFrame ) { // Oops! An empty page. // In order not to lose the whole frame (RTF) we // look for the last Content before the page. - const SwPageFrm *pPrv = static_cast<const SwPageFrm*>(pPage->GetPrev()); - while ( !pContentFrm && pPrv ) + const SwPageFrame *pPrv = static_cast<const SwPageFrame*>(pPage->GetPrev()); + while ( !pContentFrame && pPrv ) { - pContentFrm = pPrv->FindFirstBodyContent(); - pPrv = static_cast<const SwPageFrm*>(pPrv->GetPrev()); + pContentFrame = pPrv->FindFirstBodyContent(); + pPrv = static_cast<const SwPageFrame*>(pPrv->GetPrev()); } } - if ( pContentFrm ) + if ( pContentFrame ) { - SwNodeIndex aIdx( *pContentFrm->GetNode() ); - aRetval.insert(SwPosFlyFrmPtr(new SwPosFlyFrm(aIdx, pFly, aRetval.size()))); + SwNodeIndex aIdx( *pContentFrame->GetNode() ); + aRetval.insert(SwPosFlyFramePtr(new SwPosFlyFrame(aIdx, pFly, aRetval.size()))); } } } } - pPage = static_cast<const SwPageFrm*>(pPage->GetNext()); + pPage = static_cast<const SwPageFrame*>(pPage->GetNext()); } return aRetval; @@ -717,8 +717,8 @@ lcl_InsertLabel(SwDoc & rDoc, SwTextFormatColls *const pTextFormatCollTable, SwFrameFormat *pOldFormat = rDoc.GetNodes()[nNdIdx]->GetFlyFormat(); OSL_ENSURE( pOldFormat, "Couldn't find the Fly's Format." ); // #i115719# - // <title> and <description> attributes are lost when calling <DelFrms()>. - // Thus, keep them and restore them after the calling <MakeFrms()> + // <title> and <description> attributes are lost when calling <DelFrames()>. + // Thus, keep them and restore them after the calling <MakeFrames()> const bool bIsSwFlyFrameFormatInstance( dynamic_cast<SwFlyFrameFormat*>(pOldFormat) != nullptr ); const OUString sTitle( bIsSwFlyFrameFormatInstance ? static_cast<SwFlyFrameFormat*>(pOldFormat)->GetObjTitle() @@ -726,7 +726,7 @@ lcl_InsertLabel(SwDoc & rDoc, SwTextFormatColls *const pTextFormatCollTable, const OUString sDescription( bIsSwFlyFrameFormatInstance ? static_cast<SwFlyFrameFormat*>(pOldFormat)->GetObjDescription() : OUString() ); - pOldFormat->DelFrms(); + pOldFormat->DelFrames(); pNewFormat = rDoc.MakeFlyFrameFormat( rDoc.GetUniqueFrameName(), rDoc.getIDocumentStylePoolAccess().GetFrameFormatFromPool(RES_POOLFRM_FRAME) ); @@ -777,9 +777,9 @@ lcl_InsertLabel(SwDoc & rDoc, SwTextFormatColls *const pTextFormatCollTable, pNewSet->Put( pOldFormat->GetAnchor() ); // The new one should be changeable in its height. - SwFormatFrmSize aFrmSize( pOldFormat->GetFrmSize() ); - aFrmSize.SetHeightSizeType( ATT_MIN_SIZE ); - pNewSet->Put( aFrmSize ); + SwFormatFrameSize aFrameSize( pOldFormat->GetFrameSize() ); + aFrameSize.SetHeightSizeType( ATT_MIN_SIZE ); + pNewSet->Put( aFrameSize ); SwStartNode* pSttNd = rDoc.GetNodes().MakeTextSection( SwNodeIndex( rDoc.GetNodes().GetEndOfAutotext() ), @@ -824,10 +824,10 @@ lcl_InsertLabel(SwDoc & rDoc, SwTextFormatColls *const pTextFormatCollTable, pNewSet->Put( SwFormatVertOrient( 0, eVert ) ); pNewSet->Put( SwFormatHoriOrient( 0, text::HoriOrientation::CENTER ) ); - aFrmSize = pOldFormat->GetFrmSize(); - aFrmSize.SetWidthPercent(0); - aFrmSize.SetHeightPercent(SwFormatFrmSize::SYNCED); - pNewSet->Put( aFrmSize ); + aFrameSize = pOldFormat->GetFrameSize(); + aFrameSize.SetWidthPercent(0); + aFrameSize.SetHeightPercent(SwFormatFrameSize::SYNCED); + pNewSet->Put( aFrameSize ); // Hard-set the attributes, because they could come from the Template // and then size calculations could not be correct anymore. @@ -856,7 +856,7 @@ lcl_InsertLabel(SwDoc & rDoc, SwTextFormatColls *const pTextFormatCollTable, // Have only the FlyFrames created. // We leave this to established methods (especially for InCntFlys). - pNewFormat->MakeFrms(); + pNewFormat->MakeFrames(); // #i115719# if ( bIsSwFlyFrameFormatInstance ) { @@ -1032,7 +1032,7 @@ lcl_InsertDrawLabel( SwDoc & rDoc, SwTextFormatColls *const pTextFormatCollTable // Removing the frames of the drawing object changes its layer. const SdrLayerID nLayerId = rSdrObj.GetLayer(); - pOldFormat->DelFrms(); + pOldFormat->DelFrames(); // InContents need to be treated in a special way: // The TextAttribute needs to be destroyed. @@ -1072,8 +1072,8 @@ lcl_InsertDrawLabel( SwDoc & rDoc, SwTextFormatColls *const pTextFormatCollTable // The new one should be variable in its height! Size aSz( rSdrObj.GetCurrentBoundRect().GetSize() ); - SwFormatFrmSize aFrmSize( ATT_MIN_SIZE, aSz.Width(), aSz.Height() ); - pNewSet->Put( aFrmSize ); + SwFormatFrameSize aFrameSize( ATT_MIN_SIZE, aSz.Width(), aSz.Height() ); + pNewSet->Put( aFrameSize ); // Apply the margin to the new Frame. // Don't set a border, use the one from the Template. @@ -1160,7 +1160,7 @@ lcl_InsertDrawLabel( SwDoc & rDoc, SwTextFormatColls *const pTextFormatCollTable // Have only the FlyFrames created. // We leave this to established methods (especially for InCntFlys). - pNewFormat->MakeFrms(); + pNewFormat->MakeFrames(); OSL_ENSURE( pNew, "No Label inserted" ); @@ -1400,10 +1400,10 @@ void SwDoc::SetAllUniqueFlyNames() { sal_Int32 n, nFlyNum = 0, nGrfNum = 0, nOLENum = 0; - ResId nFrmId( STR_FRAME_DEFNAME, *pSwResMgr ), + ResId nFrameId( STR_FRAME_DEFNAME, *pSwResMgr ), nGrfId( STR_GRAPHIC_DEFNAME, *pSwResMgr ), nOLEId( STR_OBJECT_DEFNAME, *pSwResMgr ); - const OUString sFlyNm( nFrmId ); + const OUString sFlyNm( nFrameId ); const OUString sGrfNm( nGrfId ); const OUString sOLENm( nOLEId ); @@ -1584,7 +1584,7 @@ short SwDoc::GetTextDirection( const SwPosition& rPos, const SwFrameFormat* pFlyFormat = pNd->GetFlyFormat(); while( pFlyFormat ) { - pItem = &pFlyFormat->GetFrmDir(); + pItem = &pFlyFormat->GetFrameDir(); if( FRMDIR_ENVIRONMENT == pItem->GetValue() ) { pItem = nullptr; @@ -1606,7 +1606,7 @@ short SwDoc::GetTextDirection( const SwPosition& rPos, { const SwPageDesc* pPgDsc = pNd->FindPageDesc( false ); if( pPgDsc ) - pItem = &pPgDsc->GetMaster().GetFrmDir(); + pItem = &pPgDsc->GetMaster().GetFrameDir(); } } if( !pItem ) @@ -1623,9 +1623,9 @@ bool SwDoc::IsInVerticalText( const SwPosition& rPos, const Point* pPt ) const return FRMDIR_VERT_TOP_RIGHT == nDir || FRMDIR_VERT_TOP_LEFT == nDir; } -std::set<SwRootFrm*> SwDoc::GetAllLayouts() +std::set<SwRootFrame*> SwDoc::GetAllLayouts() { - std::set<SwRootFrm*> aAllLayouts; + std::set<SwRootFrame*> aAllLayouts; SwViewShell *pStart = getIDocumentLayoutAccess().GetCurrentViewShell(); if(pStart) { diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index 076ca699fc99..9f44b12502ac 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -317,7 +317,7 @@ SwDoc::SwDoc() getIDocumentStylePoolAccess().GetPageDescFromPool( RES_POOLPAGE_STANDARD ); // Set to "Empty Page" - mpEmptyPageFormat->SetFormatAttr( SwFormatFrmSize( ATT_FIX_SIZE ) ); + mpEmptyPageFormat->SetFormatAttr( SwFormatFrameSize( ATT_FIX_SIZE ) ); // Set BodyFormat for columns mpColumnContFormat->SetFormatAttr( SwFormatFillOrder( ATT_LEFT_TO_RIGHT ) ); @@ -424,7 +424,7 @@ SwDoc::~SwDoc() getIDocumentRedlineAccess().GetExtraRedlineTable().DeleteAndDestroyAll(); const sw::DocDisposingHint aHint; - for(const auto& pWeakCursor : mvUnoCrsrTable) + for(const auto& pWeakCursor : mvUnoCursorTable) { auto pCursor(pWeakCursor.lock()); if(pCursor) @@ -479,7 +479,7 @@ SwDoc::~SwDoc() } delete mpDefTOXBases; - // Any of the FrmFormats can still have indices registered. + // Any of the FrameFormats can still have indices registered. // These need to be destroyed now at the latest. for( SwFrameFormat* pFormat : *mpFrameFormatTable ) lcl_DelFormatIndices( pFormat ); diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx index 5b44797f25bd..e60d415fc226 100644 --- a/sw/source/core/doc/docnum.cxx +++ b/sw/source/core/doc/docnum.cxx @@ -1111,10 +1111,10 @@ void SwDoc::StopNumRuleAnimations( OutputDevice* pOut ) aTextNodeIter != aTextNodeList.end(); ++aTextNodeIter ) { SwTextNode* pTNd = *aTextNodeIter; - SwIterator<SwTextFrm,SwTextNode> aIter(*pTNd); - for(SwTextFrm* pFrm = aIter.First(); pFrm; pFrm = aIter.Next() ) - if( pFrm->HasAnimation() ) - pFrm->StopAnimation( pOut ); + SwIterator<SwTextFrame,SwTextNode> aIter(*pTNd); + for(SwTextFrame* pFrame = aIter.First(); pFrame; pFrame = aIter.Next() ) + if( pFrame->HasAnimation() ) + pFrame->StopAnimation( pOut ); } } } diff --git a/sw/source/core/doc/docruby.cxx b/sw/source/core/doc/docruby.cxx index 0d0c18b83db8..0bb6e4ad18b7 100644 --- a/sw/source/core/doc/docruby.cxx +++ b/sw/source/core/doc/docruby.cxx @@ -48,14 +48,14 @@ using namespace ::com::sun::star::i18n; sal_uInt16 SwDoc::FillRubyList( const SwPaM& rPam, SwRubyList& rList, sal_uInt16 nMode ) { - const SwPaM *_pStartCrsr = rPam.GetNext(), - *__pStartCrsr = _pStartCrsr; - bool bCheckEmpty = &rPam != _pStartCrsr; + const SwPaM *_pStartCursor = rPam.GetNext(), + *__pStartCursor = _pStartCursor; + bool bCheckEmpty = &rPam != _pStartCursor; do { - const SwPosition* pStt = _pStartCrsr->Start(), - * pEnd = pStt == _pStartCrsr->GetPoint() - ? _pStartCrsr->GetMark() - : _pStartCrsr->GetPoint(); + const SwPosition* pStt = _pStartCursor->Start(), + * pEnd = pStt == _pStartCursor->GetPoint() + ? _pStartCursor->GetMark() + : _pStartCursor->GetPoint(); if( !bCheckEmpty || ( pStt != pEnd && *pStt != *pEnd )) { SwPaM aPam( *pStt ); @@ -85,7 +85,7 @@ sal_uInt16 SwDoc::FillRubyList( const SwPaM& rPam, SwRubyList& rList, } while( 30 > rList.size() && *aPam.GetPoint() < *pEnd ); } } while( 30 > rList.size() && - (_pStartCrsr = _pStartCrsr->GetNext()) != __pStartCrsr ); + (_pStartCursor = _pStartCursor->GetNext()) != __pStartCursor ); return rList.size(); } @@ -99,14 +99,14 @@ sal_uInt16 SwDoc::SetRubyList( const SwPaM& rPam, const SwRubyList& rList, sal_uInt16 nListEntry = 0; - const SwPaM *_pStartCrsr = rPam.GetNext(), - *__pStartCrsr = _pStartCrsr; - bool bCheckEmpty = &rPam != _pStartCrsr; + const SwPaM *_pStartCursor = rPam.GetNext(), + *__pStartCursor = _pStartCursor; + bool bCheckEmpty = &rPam != _pStartCursor; do { - const SwPosition* pStt = _pStartCrsr->Start(), - * pEnd = pStt == _pStartCrsr->GetPoint() - ? _pStartCrsr->GetMark() - : _pStartCrsr->GetPoint(); + const SwPosition* pStt = _pStartCursor->Start(), + * pEnd = pStt == _pStartCursor->GetPoint() + ? _pStartCursor->GetMark() + : _pStartCursor->GetPoint(); if( !bCheckEmpty || ( pStt != pEnd && *pStt != *pEnd )) { @@ -172,7 +172,7 @@ sal_uInt16 SwDoc::SetRubyList( const SwPaM& rPam, const SwRubyList& rList, } while( nListEntry < rList.size() && *aPam.GetPoint() < *pEnd ); } } while( 30 > rList.size() && - (_pStartCrsr = _pStartCrsr->GetNext()) != __pStartCrsr ); + (_pStartCursor = _pStartCursor->GetNext()) != __pStartCursor ); GetIDocumentUndoRedo().EndUndo( UNDO_SETRUBYATTR, nullptr ); diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx index 4619226d5c61..520500047ef9 100644 --- a/sw/source/core/doc/docsort.cxx +++ b/sw/source/core/doc/docsort.cxx @@ -532,12 +532,12 @@ bool SwDoc::SortTable(const SwSelBoxes& rBoxes, const SwSortOptions& rOpt) // Delete HTML layout pTableNd->GetTable().SetHTMLTableLayout( nullptr ); - // #i37739# A simple 'MakeFrms' after the node sorting + // #i37739# A simple 'MakeFrames' after the node sorting // does not work if the table is inside a frame and has no prev/next. SwNode2Layout aNode2Layout( *pTableNd ); // Delete the Table's Frames - pTableNd->DelFrms(); + pTableNd->DelFrames(); // ? TL_CHART2: ? SwUndoSort* pUndoSort = nullptr; @@ -581,10 +581,10 @@ bool SwDoc::SortTable(const SwSelBoxes& rBoxes, const SwSortOptions& rOpt) } // Restore table frames: - // #i37739# A simple 'MakeFrms' after the node sorting + // #i37739# A simple 'MakeFrames' after the node sorting // does not work if the table is inside a frame and has no prev/next. const sal_uLong nIdx = pTableNd->GetIndex(); - aNode2Layout.RestoreUpperFrms( GetNodes(), nIdx, nIdx + 1 ); + aNode2Layout.RestoreUpperFrames( GetNodes(), nIdx, nIdx + 1 ); // TL_CHART2: need to inform chart of probably changed cell names UpdateCharts( pTableNd->GetTable().GetFrameFormat()->GetName() ); diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index 3508b079f9ce..1ddc0cad9558 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -242,11 +242,11 @@ const SwTOXMark& SwDoc::GotoTOXMark( const SwTOXMark& rCurTOXMark, continue; Point aPt; - const SwContentFrm* pCFrm = pTOXSrc->getLayoutFrm( getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ); - if (!pCFrm) + const SwContentFrame* pCFrame = pTOXSrc->getLayoutFrame( getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ); + if (!pCFrame) continue; - if ( bInReadOnly || !pCFrm->IsProtected() ) + if ( bInReadOnly || !pCFrame->IsProtected() ) { CompareNodeContent aAbsNew( pTOXSrc->GetIndex(), pMark->GetStart() ); switch( eDir ) @@ -692,12 +692,12 @@ static const SwTextNode* lcl_FindChapterNode( const SwNode& rNd, sal_uInt8 nLvl // then find the "Anchor" (Body) position Point aPt; SwNode2Layout aNode2Layout( *pNd, pNd->GetIndex() ); - const SwFrm* pFrm = aNode2Layout.GetFrm( &aPt, nullptr, false ); + const SwFrame* pFrame = aNode2Layout.GetFrame( &aPt, nullptr, false ); - if( pFrm ) + if( pFrame ) { SwPosition aPos( *pNd ); - pNd = GetBodyTextNode( *pNd->GetDoc(), aPos, *pFrm ); + pNd = GetBodyTextNode( *pNd->GetDoc(), aPos, *pFrame ); OSL_ENSURE( pNd, "Where's the paragraph?" ); } } @@ -842,7 +842,7 @@ void SwTOXBaseSection::Update(const SfxItemSet* pAttr, : nullptr; SwNode2Layout aN2L( *pSectNd ); - const_cast<SwSectionNode*>(pSectNd)->DelFrms(); + const_cast<SwSectionNode*>(pSectNd)->DelFrames(); // remove old content an insert one empty textnode (to hold the layout!) SwTextNode* pFirstEmptyNd; @@ -1021,11 +1021,11 @@ void SwTOXBaseSection::Update(const SfxItemSet* pAttr, if(nIdx + 2 < pSectNd->EndOfSectionIndex()) pDoc->GetNodes().Delete( aInsPos ); - aN2L.RestoreUpperFrms( pDoc->GetNodes(), nIdx, nIdx + 1 ); - std::set<SwRootFrm*> aAllLayouts = pDoc->GetAllLayouts(); - for ( std::set<SwRootFrm*>::iterator pLayoutIter = aAllLayouts.begin(); pLayoutIter != aAllLayouts.end(); ++pLayoutIter) + aN2L.RestoreUpperFrames( pDoc->GetNodes(), nIdx, nIdx + 1 ); + std::set<SwRootFrame*> aAllLayouts = pDoc->GetAllLayouts(); + for ( std::set<SwRootFrame*>::iterator pLayoutIter = aAllLayouts.begin(); pLayoutIter != aAllLayouts.end(); ++pLayoutIter) { - SwFrm::CheckPageDescs( static_cast<SwPageFrm*>((*pLayoutIter)->Lower()) ); + SwFrame::CheckPageDescs( static_cast<SwPageFrame*>((*pLayoutIter)->Lower()) ); } SetProtect( SwTOXBase::IsProtected() ); @@ -1149,7 +1149,7 @@ void SwTOXBaseSection::UpdateMarks( const SwTOXInternational& rIntl, // If selected use marks from the same chapter only if( pTOXSrc->GetNodes().IsDocNodes() && pTOXSrc->GetText().getLength() && pTOXSrc->HasWriterListeners() && - pTOXSrc->getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ) && + pTOXSrc->getLayoutFrame( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ) && (!IsFromChapter() || ::lcl_FindChapterNode( *pTOXSrc ) == pOwnChapterNode ) && !pTOXSrc->HasHiddenParaField() && !SwScriptInfo::IsInHiddenRange( *pTOXSrc, pTextMark->GetStart() ) ) @@ -1207,7 +1207,7 @@ void SwTOXBaseSection::UpdateOutline( const SwTextNode* pOwnChapterNode ) SwTextNode* pTextNd = pOutlineNode->GetTextNode(); if( pTextNd && pTextNd->Len() && pTextNd->HasWriterListeners() && sal_uInt16( pTextNd->GetAttrOutlineLevel()) <= GetLevel() && - pTextNd->getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ) && + pTextNd->getLayoutFrame( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ) && !pTextNd->HasHiddenParaField() && !pTextNd->HasHiddenCharAttribute( true ) && ( !IsFromChapter() || @@ -1247,7 +1247,7 @@ void SwTOXBaseSection::UpdateTemplate( const SwTextNode* pOwnChapterNode ) ::SetProgressState( 0, pDoc->GetDocShell() ); if (pTextNd->GetText().getLength() && - pTextNd->getLayoutFrm(pDoc->getIDocumentLayoutAccess().GetCurrentLayout()) && + pTextNd->getLayoutFrame(pDoc->getIDocumentLayoutAccess().GetCurrentLayout()) && pTextNd->GetNodes().IsDocNodes() && ( !IsFromChapter() || pOwnChapterNode == ::lcl_FindChapterNode( *pTextNd ) ) ) @@ -1278,7 +1278,7 @@ void SwTOXBaseSection::UpdateSequence( const SwTextNode* pOwnChapterNode ) ::SetProgressState( 0, pDoc->GetDocShell() ); if (rTextNode.GetText().getLength() && - rTextNode.getLayoutFrm(pDoc->getIDocumentLayoutAccess().GetCurrentLayout()) && + rTextNode.getLayoutFrame(pDoc->getIDocumentLayoutAccess().GetCurrentLayout()) && rTextNode.GetNodes().IsDocNodes() && ( !IsFromChapter() || ::lcl_FindChapterNode( rTextNode ) == pOwnChapterNode ) ) @@ -1321,15 +1321,15 @@ void SwTOXBaseSection::UpdateAuthorities( const SwTOXInternational& rIntl ) ::SetProgressState( 0, pDoc->GetDocShell() ); if (rTextNode.GetText().getLength() && - rTextNode.getLayoutFrm(pDoc->getIDocumentLayoutAccess().GetCurrentLayout()) && + rTextNode.getLayoutFrame(pDoc->getIDocumentLayoutAccess().GetCurrentLayout()) && rTextNode.GetNodes().IsDocNodes() ) { //#106485# the body node has to be used! - SwContentFrm *pFrm = rTextNode.getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ); + SwContentFrame *pFrame = rTextNode.getLayoutFrame( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ); SwPosition aFieldPos(rTextNode); const SwTextNode* pTextNode = nullptr; - if(pFrm && !pFrm->IsInDocBody()) - pTextNode = GetBodyTextNode( *pDoc, aFieldPos, *pFrm ); + if(pFrame && !pFrame->IsInDocBody()) + pTextNode = GetBodyTextNode( *pDoc, aFieldPos, *pFrame ); if(!pTextNode) pTextNode = &rTextNode; SwTOXAuthority* pNew = new SwTOXAuthority( *pTextNode, *pFormatField, rIntl ); @@ -1473,7 +1473,7 @@ void SwTOXBaseSection::UpdateContent( SwTOXElement eMyType, } } - if( pCNd->getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ) && ( !IsFromChapter() || + if( pCNd->getLayoutFrame( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ) && ( !IsFromChapter() || ::lcl_FindChapterNode( *pCNd ) == pOwnChapterNode )) { SwTOXPara * pNew = new SwTOXPara( *pCNd, eMyType, @@ -1511,7 +1511,7 @@ void SwTOXBaseSection::UpdateTable( const SwTextNode* pOwnChapterNode ) while( nullptr != ( pCNd = rNds.GoNext( &aContentIdx ) ) && aContentIdx.GetIndex() < pTableNd->EndOfSectionIndex() ) { - if( pCNd->getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ) && (!IsFromChapter() || + if( pCNd->getLayoutFrame( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ) && (!IsFromChapter() || ::lcl_FindChapterNode( *pCNd ) == pOwnChapterNode )) { SwTOXTable * pNew = new SwTOXTable( *pCNd ); @@ -1543,7 +1543,7 @@ void SwTOXBaseSection::UpdatePageNum() return ; // Insert the current PageNumber into the TOC - SwPageFrm* pAktPage = nullptr; + SwPageFrame* pAktPage = nullptr; sal_uInt16 nPage = 0; SwDoc* pDoc = GetFormat()->GetDoc(); @@ -1589,20 +1589,20 @@ void SwTOXBaseSection::UpdatePageNum() SwTOXSource& rTOXSource = pSortBase->aTOXSources[j]; if( rTOXSource.pNd ) { - SwContentFrm* pFrm = rTOXSource.pNd->getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ); - OSL_ENSURE( pFrm || pDoc->IsUpdateTOX(), "TOX, no Frame found"); - if( !pFrm ) + SwContentFrame* pFrame = rTOXSource.pNd->getLayoutFrame( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ); + OSL_ENSURE( pFrame || pDoc->IsUpdateTOX(), "TOX, no Frame found"); + if( !pFrame ) continue; - if( pFrm->IsTextFrm() && static_cast<SwTextFrm*>(pFrm)->HasFollow() ) + if( pFrame->IsTextFrame() && static_cast<SwTextFrame*>(pFrame)->HasFollow() ) { // find the right one - SwTextFrm* pNext; - while( nullptr != ( pNext = static_cast<SwTextFrm*>(pFrm->GetFollow()) ) + SwTextFrame* pNext; + while( nullptr != ( pNext = static_cast<SwTextFrame*>(pFrame->GetFollow()) ) && rTOXSource.nPos >= pNext->GetOfst() ) - pFrm = pNext; + pFrame = pNext; } - SwPageFrm* pTmpPage = pFrm->FindPageFrm(); + SwPageFrame* pTmpPage = pFrame->FindPageFrame(); if( pTmpPage != pAktPage ) { nPage = pTmpPage->GetVirtPageNum(); diff --git a/sw/source/core/doc/ftnidx.cxx b/sw/source/core/doc/ftnidx.cxx index 2b54c13a72c7..4731017be4f8 100644 --- a/sw/source/core/doc/ftnidx.cxx +++ b/sw/source/core/doc/ftnidx.cxx @@ -170,8 +170,8 @@ void SwFootnoteIdxs::UpdateAllFootnote() SwUpdFootnoteEndNtAtEnd aNumArr; - SwRootFrm* pTmpRoot = pDoc->getIDocumentLayoutAccess().GetCurrentLayout(); - std::set<SwRootFrm*> aAllLayouts = pDoc->GetAllLayouts(); + SwRootFrame* pTmpRoot = pDoc->getIDocumentLayoutAccess().GetCurrentLayout(); + std::set<SwRootFrame*> aAllLayouts = pDoc->GetAllLayouts(); // For normal Footnotes per-chapter and per-document numbering are treated separately. // For Endnotes we only have document-wise numbering. if( FTNNUM_CHAPTER == rFootnoteInfo.eNum ) diff --git a/sw/source/core/doc/htmltbl.cxx b/sw/source/core/doc/htmltbl.cxx index ecff26464812..e18e74d60744 100644 --- a/sw/source/core/doc/htmltbl.cxx +++ b/sw/source/core/doc/htmltbl.cxx @@ -319,12 +319,12 @@ void SwHTMLTableLayout::SetBoxWidth( SwTableBox *pBox, sal_uInt16 nCol, SwFrameFormat *pFrameFormat = pBox->GetFrameFormat(); // calculate the box's width - SwTwips nFrmWidth = 0; + SwTwips nFrameWidth = 0; while( nColSpan-- ) - nFrmWidth += GetColumn( nCol++ )->GetRelColWidth(); + nFrameWidth += GetColumn( nCol++ )->GetRelColWidth(); // and reset - pFrameFormat->SetFormatAttr( SwFormatFrmSize( ATT_VAR_SIZE, nFrmWidth, 0 )); + pFrameFormat->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, nFrameWidth, 0 )); } void SwHTMLTableLayout::GetAvail( sal_uInt16 nCol, sal_uInt16 nColSpan, @@ -354,12 +354,12 @@ sal_uInt16 SwHTMLTableLayout::GetBrowseWidthByVisArea( const SwDoc& rDoc ) sal_uInt16 SwHTMLTableLayout::GetBrowseWidth( const SwDoc& rDoc ) { // If we have a layout, we can get the width from there. - const SwRootFrm *pRootFrm = rDoc.getIDocumentLayoutAccess().GetCurrentLayout(); - if( pRootFrm ) + const SwRootFrame *pRootFrame = rDoc.getIDocumentLayoutAccess().GetCurrentLayout(); + if( pRootFrame ) { - const SwFrm *pPageFrm = pRootFrm->GetLower(); - if( pPageFrm ) - return (sal_uInt16)pPageFrm->Prt().Width(); + const SwFrame *pPageFrame = pRootFrame->GetLower(); + if( pPageFrame ) + return (sal_uInt16)pPageFrame->Prt().Width(); } // #i91658# @@ -369,21 +369,21 @@ sal_uInt16 SwHTMLTableLayout::GetBrowseWidth( const SwDoc& rDoc ) return GetBrowseWidthByVisArea( rDoc ); } -sal_uInt16 SwHTMLTableLayout::GetBrowseWidthByTabFrm( - const SwTabFrm& rTabFrm ) const +sal_uInt16 SwHTMLTableLayout::GetBrowseWidthByTabFrame( + const SwTabFrame& rTabFrame ) const { SwTwips nWidth = 0; - const SwFrm *pUpper = rTabFrm.GetUpper(); - if( MayBeInFlyFrame() && pUpper->IsFlyFrm() && - static_cast<const SwFlyFrm *>(pUpper)->GetAnchorFrm() ) + const SwFrame *pUpper = rTabFrame.GetUpper(); + if( MayBeInFlyFrame() && pUpper->IsFlyFrame() && + static_cast<const SwFlyFrame *>(pUpper)->GetAnchorFrame() ) { // If the table is located within a self-created frame, the anchor's // width is relevant not the frame's width. // For paragraph-bound frames we don't respect paragraph indents. - const SwFrm *pAnchor = static_cast<const SwFlyFrm *>(pUpper)->GetAnchorFrm(); - if( pAnchor->IsTextFrm() ) - nWidth = pAnchor->Frm().Width(); + const SwFrame *pAnchor = static_cast<const SwFlyFrame *>(pUpper)->GetAnchorFrame(); + if( pAnchor->IsTextFrame() ) + nWidth = pAnchor->Frame().Width(); else nWidth = pAnchor->Prt().Width(); } @@ -395,7 +395,7 @@ sal_uInt16 SwHTMLTableLayout::GetBrowseWidthByTabFrm( SwTwips nUpperDummy = 0; long nRightOffset = 0, nLeftOffset = 0; - rTabFrm.CalcFlyOffsets( nUpperDummy, nLeftOffset, nRightOffset ); + rTabFrame.CalcFlyOffsets( nUpperDummy, nLeftOffset, nRightOffset ); nWidth -= (nLeftOffset + nRightOffset); return nWidth < USHRT_MAX ? static_cast<sal_uInt16>(nWidth) : USHRT_MAX; @@ -404,10 +404,10 @@ sal_uInt16 SwHTMLTableLayout::GetBrowseWidthByTabFrm( sal_uInt16 SwHTMLTableLayout::GetBrowseWidthByTable( const SwDoc& rDoc ) const { sal_uInt16 nBrowseWidth = 0; - SwTabFrm* pFrm = SwIterator<SwTabFrm,SwFormat>( *m_pSwTable->GetFrameFormat() ).First(); - if( pFrm ) + SwTabFrame* pFrame = SwIterator<SwTabFrame,SwFormat>( *m_pSwTable->GetFrameFormat() ).First(); + if( pFrame ) { - nBrowseWidth = GetBrowseWidthByTabFrm( *pFrm ); + nBrowseWidth = GetBrowseWidthByTabFrame( *pFrame ); } else { @@ -1573,12 +1573,12 @@ static void lcl_ResizeBox( const SwTableBox* pBox, sal_uInt16* pWidth ) sal_uInt16 nWidth = 0; for( const SwTableLine *pLine : pBox->GetTabLines() ) lcl_ResizeLine( pLine, &nWidth ); - pBox->GetFrameFormat()->SetFormatAttr( SwFormatFrmSize( ATT_VAR_SIZE, nWidth, 0 )); + pBox->GetFrameFormat()->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, nWidth, 0 )); *pWidth = *pWidth + nWidth; } else { - *pWidth = *pWidth + (sal_uInt16)pBox->GetFrameFormat()->GetFrmSize().GetSize().Width(); + *pWidth = *pWidth + (sal_uInt16)pBox->GetFrameFormat()->GetFrameSize().GetSize().Width(); } } @@ -1667,12 +1667,12 @@ void SwHTMLTableLayout::SetWidths( bool bCallPass2, sal_uInt16 nAbsAvail, // Also, we need to preserve a percent setting if it exists. SwFrameFormat *pFrameFormat = m_pSwTable->GetFrameFormat(); const_cast<SwTable *>(m_pSwTable)->LockModify(); - SwFormatFrmSize aFrmSize( pFrameFormat->GetFrmSize() ); - aFrmSize.SetWidth( m_nRelTabWidth ); + SwFormatFrameSize aFrameSize( pFrameFormat->GetFrameSize() ); + aFrameSize.SetWidth( m_nRelTabWidth ); bool bRel = m_bUseRelWidth && text::HoriOrientation::FULL!=pFrameFormat->GetHoriOrient().GetHoriOrient(); - aFrmSize.SetWidthPercent( (sal_uInt8)(bRel ? m_nWidthOption : 0) ); - pFrameFormat->SetFormatAttr( aFrmSize ); + aFrameSize.SetWidthPercent( (sal_uInt8)(bRel ? m_nWidthOption : 0) ); + pFrameFormat->SetFormatAttr( aFrameSize ); const_cast<SwTable *>(m_pSwTable)->UnlockModify(); // If the table is located in a frame, we also need to adapt the @@ -1682,23 +1682,23 @@ void SwHTMLTableLayout::SetWidths( bool bCallPass2, sal_uInt16 nAbsAvail, SwFrameFormat *pFlyFrameFormat = FindFlyFrameFormat(); if( pFlyFrameFormat ) { - SwFormatFrmSize aFlyFrmSize( ATT_VAR_SIZE, m_nRelTabWidth, MINLAY ); + SwFormatFrameSize aFlyFrameSize( ATT_VAR_SIZE, m_nRelTabWidth, MINLAY ); if( m_bUseRelWidth ) { // For percentage settings we set the width to the minimum. - aFlyFrmSize.SetWidth( m_nMin > USHRT_MAX ? USHRT_MAX + aFlyFrameSize.SetWidth( m_nMin > USHRT_MAX ? USHRT_MAX : m_nMin ); - aFlyFrmSize.SetWidthPercent( (sal_uInt8)m_nWidthOption ); + aFlyFrameSize.SetWidthPercent( (sal_uInt8)m_nWidthOption ); } - pFlyFrameFormat->SetFormatAttr( aFlyFrmSize ); + pFlyFrameFormat->SetFormatAttr( aFlyFrameSize ); } } #ifdef DBG_UTIL { // check if the tables have correct widths - SwTwips nSize = m_pSwTable->GetFrameFormat()->GetFrmSize().GetWidth(); + SwTwips nSize = m_pSwTable->GetFrameFormat()->GetFrameSize().GetWidth(); const SwTableLines& rLines = m_pSwTable->GetTabLines(); for (size_t n = 0; n < rLines.size(); ++n) { @@ -1713,12 +1713,12 @@ void SwHTMLTableLayout::SetWidths( bool bCallPass2, sal_uInt16 nAbsAvail, if( m_pLeftFillerBox ) { m_pLeftFillerBox->GetFrameFormat()->SetFormatAttr( - SwFormatFrmSize( ATT_VAR_SIZE, m_nRelLeftFill, 0 )); + SwFormatFrameSize( ATT_VAR_SIZE, m_nRelLeftFill, 0 )); } if( m_pRightFillerBox ) { m_pRightFillerBox->GetFrameFormat()->SetFormatAttr( - SwFormatFrmSize( ATT_VAR_SIZE, m_nRelRightFill, 0 )); + SwFormatFrameSize( ATT_VAR_SIZE, m_nRelRightFill, 0 )); } } } @@ -1730,7 +1730,7 @@ void SwHTMLTableLayout::_Resize( sal_uInt16 nAbsAvail, bool bRecalc ) if( bRecalc ) AutoLayoutPass1(); - SwRootFrm *pRoot = GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell()->GetLayout(); + SwRootFrame *pRoot = GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell()->GetLayout(); if ( pRoot && pRoot->IsCallbackActionEnabled() ) pRoot->StartAllAction(); diff --git a/sw/source/core/doc/lineinfo.cxx b/sw/source/core/doc/lineinfo.cxx index 1e736cf00187..3413a4a6ab0d 100644 --- a/sw/source/core/doc/lineinfo.cxx +++ b/sw/source/core/doc/lineinfo.cxx @@ -30,7 +30,7 @@ void SwDoc::SetLineNumberInfo( const SwLineNumberInfo &rNew ) { - SwRootFrm* pTmpRoot = getIDocumentLayoutAccess().GetCurrentLayout(); + SwRootFrame* pTmpRoot = getIDocumentLayoutAccess().GetCurrentLayout(); if ( pTmpRoot && (rNew.IsCountBlankLines() != mpLineNumberInfo->IsCountBlankLines() || rNew.IsRestartEachPage() != mpLineNumberInfo->IsRestartEachPage()) ) @@ -136,7 +136,7 @@ void SwLineNumberInfo::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew { CheckRegistration( pOld, pNew ); SwDoc *pDoc = static_cast<SwCharFormat*>(GetRegisteredIn())->GetDoc(); - SwRootFrm* pRoot = pDoc->getIDocumentLayoutAccess().GetCurrentLayout(); + SwRootFrame* pRoot = pDoc->getIDocumentLayoutAccess().GetCurrentLayout(); if( pRoot ) { pRoot->StartAllAction(); diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index 9bb0bdebf891..4267bca0362f 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -94,7 +94,7 @@ inline bool GetRealURL( const SwGrfNode& rNd, OUString& rText ) } static void lcl_PaintReplacement( const SwRect &rRect, const OUString &rText, - const SwViewShell &rSh, const SwNoTextFrm *pFrm, + const SwViewShell &rSh, const SwNoTextFrame *pFrame, bool bDefect ) { static vcl::Font *pFont = nullptr; @@ -110,7 +110,7 @@ static void lcl_PaintReplacement( const SwRect &rRect, const OUString &rText, Color aCol( COL_RED ); FontUnderline eUnderline = UNDERLINE_NONE; - const SwFormatURL &rURL = pFrm->FindFlyFrm()->GetFormat()->GetURL(); + const SwFormatURL &rURL = pFrame->FindFlyFrame()->GetFormat()->GetURL(); if( !rURL.GetURL().isEmpty() || rURL.GetMap() ) { bool bVisited = false; @@ -143,31 +143,31 @@ static void lcl_PaintReplacement( const SwRect &rRect, const OUString &rText, Graphic::DrawEx( rSh.GetOut(), rText, *pFont, rBmp, rRect.Pos(), rRect.SSize() ); } -SwNoTextFrm::SwNoTextFrm(SwNoTextNode * const pNode, SwFrm* pSib ) - : SwContentFrm( pNode, pSib ) +SwNoTextFrame::SwNoTextFrame(SwNoTextNode * const pNode, SwFrame* pSib ) + : SwContentFrame( pNode, pSib ) { InitCtor(); } /// Initialization: Currently add the Frame to the Cache -void SwNoTextFrm::InitCtor() +void SwNoTextFrame::InitCtor() { - mnFrmType = FRM_NOTXT; + mnFrameType = FRM_NOTXT; } -SwContentFrm *SwNoTextNode::MakeFrm( SwFrm* pSib ) +SwContentFrame *SwNoTextNode::MakeFrame( SwFrame* pSib ) { - return new SwNoTextFrm(this, pSib); + return new SwNoTextFrame(this, pSib); } -void SwNoTextFrm::DestroyImpl() +void SwNoTextFrame::DestroyImpl() { StopAnimation(); - SwContentFrm::DestroyImpl(); + SwContentFrame::DestroyImpl(); } -SwNoTextFrm::~SwNoTextFrm() +SwNoTextFrame::~SwNoTextFrame() { } @@ -176,7 +176,7 @@ void SetOutDev( SwViewShell *pSh, OutputDevice *pOut ) pSh->mpOut = pOut; } -static void lcl_ClearArea( const SwFrm &rFrm, +static void lcl_ClearArea( const SwFrame &rFrame, vcl::RenderContext &rOut, const SwRect& rPtArea, const SwRect &rGrfArea ) { @@ -190,7 +190,7 @@ static void lcl_ClearArea( const SwFrm &rFrm, //UUUU drawinglayer::attribute::SdrAllFillAttributesHelperPtr aFillAttributes; - if ( rFrm.GetBackgroundBrush( aFillAttributes, pItem, pCol, aOrigRect, false ) ) + if ( rFrame.GetBackgroundBrush( aFillAttributes, pItem, pCol, aOrigRect, false ) ) { SwRegionRects const region(rPtArea); const bool bDone(::DrawFillAttributes(aFillAttributes, aOrigRect, region, rOut)); @@ -206,7 +206,7 @@ static void lcl_ClearArea( const SwFrm &rFrm, else { rOut.Push( PushFlags::FILLCOLOR|PushFlags::LINECOLOR ); - rOut.SetFillColor( rFrm.getRootFrm()->GetCurrShell()->Imp()->GetRetoucheColor()); + rOut.SetFillColor( rFrame.getRootFrame()->GetCurrShell()->Imp()->GetRetoucheColor()); rOut.SetLineColor(); for( const auto &rRegion : aRegion ) rOut.DrawRect( rRegion.SVRect() ); @@ -215,12 +215,12 @@ static void lcl_ClearArea( const SwFrm &rFrm, } } -void SwNoTextFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, SwPrintData const*const) const +void SwNoTextFrame::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, SwPrintData const*const) const { - if ( Frm().IsEmpty() ) + if ( Frame().IsEmpty() ) return; - const SwViewShell* pSh = getRootFrm()->GetCurrShell(); + const SwViewShell* pSh = getRootFrame()->GetCurrShell(); if( !pSh->GetViewOptions()->IsGraphic() ) { StopAnimation(); @@ -232,8 +232,8 @@ void SwNoTextFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, if ( aText.isEmpty() && pNd->IsGrfNode() ) GetRealURL( *static_cast<const SwGrfNode*>(pNd), aText ); if( aText.isEmpty() ) - aText = FindFlyFrm()->GetFormat()->GetName(); - lcl_PaintReplacement( Frm(), aText, *pSh, this, false ); + aText = FindFlyFrame()->GetFormat()->GetName(); + lcl_PaintReplacement( Frame(), aText, *pSh, this, false ); } return; } @@ -255,11 +255,11 @@ void SwNoTextFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, pGrfNd->SetFrameInPaint( true ); // #i13147# - add 2nd parameter with value <true> to - // method call <FindFlyFrm().GetContour(..)> to indicate that it is called + // method call <FindFlyFrame().GetContour(..)> to indicate that it is called // for paint in order to avoid load of the intrinsic graphic. if ( ( !rRenderContext.GetConnectMetaFile() || !pSh->GetWin() ) && - FindFlyFrm()->GetContour( aPoly, true ) + FindFlyFrame()->GetContour( aPoly, true ) ) { rRenderContext.SetClipRegion(vcl::Region(aPoly)); @@ -269,24 +269,24 @@ void SwNoTextFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, SwRect aOrigPaint( rRect ); if ( HasAnimation() && pSh->GetWin() ) { - aOrigPaint = Frm(); aOrigPaint += Prt().Pos(); + aOrigPaint = Frame(); aOrigPaint += Prt().Pos(); } - SwRect aGrfArea( Frm() ); + SwRect aGrfArea( Frame() ); SwRect aPaintArea( aGrfArea ); // In case the picture fly frm was clipped, render it with the origin // size instead of scaling it if ( rNoTNd.getIDocumentSettingAccess()->get( DocumentSettingId::CLIPPED_PICTURES ) ) { - const SwFlyFreeFrm *pFly = dynamic_cast< const SwFlyFreeFrm* >( FindFlyFrm() ); + const SwFlyFreeFrame *pFly = dynamic_cast< const SwFlyFreeFrame* >( FindFlyFrame() ); if( pFly ) - aGrfArea = SwRect( Frm().Pos( ), pFly->GetUnclippedFrm( ).SSize( ) ); + aGrfArea = SwRect( Frame().Pos( ), pFly->GetUnclippedFrame( ).SSize( ) ); } aPaintArea._Intersection( aOrigPaint ); - SwRect aNormal( Frm().Pos() + Prt().Pos(), Prt().SSize() ); + SwRect aNormal( Frame().Pos() + Prt().Pos(), Prt().SSize() ); aNormal.Justify(); // Normalized rectangle for the comparisons if( aPaintArea.IsOver( aNormal ) ) @@ -336,7 +336,7 @@ static void lcl_CalcRect( Point& rPt, Size& rDim, sal_uInt16 nMirror ) } /** Calculate the Bitmap's position and the size within the passed rectangle */ -void SwNoTextFrm::GetGrfArea( SwRect &rRect, SwRect* pOrigRect, +void SwNoTextFrame::GetGrfArea( SwRect &rRect, SwRect* pOrigRect, bool ) const { // Currently only used for scaling, cropping and mirroring the contour of graphics! @@ -351,7 +351,7 @@ void SwNoTextFrm::GetGrfArea( SwRect &rRect, SwRect* pOrigRect, if( rAttrSet.GetMirrorGrf().IsGrfToggle() ) { - if( !(FindPageFrm()->GetVirtPageNum() % 2) ) + if( !(FindPageFrame()->GetVirtPageNum() % 2) ) { switch ( nMirror ) { @@ -414,7 +414,7 @@ void SwNoTextFrm::GetGrfArea( SwRect &rRect, SwRect* pOrigRect, Size aVisSz( Prt().SSize() ); Size aGrfSz( aVisSz ); - Point aVisPt( Frm().Pos() + Prt().Pos() ); + Point aVisPt( Frame().Pos() + Prt().Pos() ); Point aGrfPt( aVisPt ); // Set the "visible" rectangle first @@ -454,19 +454,19 @@ void SwNoTextFrm::GetGrfArea( SwRect &rRect, SwRect* pOrigRect, } /** By returning the surrounding Fly's size which equals the graphic's size */ -const Size& SwNoTextFrm::GetSize() const +const Size& SwNoTextFrame::GetSize() const { // Return the Frame's size - const SwFrm *pFly = FindFlyFrm(); + const SwFrame *pFly = FindFlyFrame(); if( !pFly ) pFly = this; return pFly->Prt().SSize(); } -void SwNoTextFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) +void SwNoTextFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/) { SwContentNotify aNotify( this ); - SwBorderAttrAccess aAccess( SwFrm::GetCache(), this ); + SwBorderAttrAccess aAccess( SwFrame::GetCache(), this ); const SwBorderAttrs &rAttrs = *aAccess.Get(); while ( !mbValidPos || !mbValidSize || !mbValidPrtArea ) @@ -474,19 +474,19 @@ void SwNoTextFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) MakePos(); if ( !mbValidSize ) - Frm().Width( GetUpper()->Prt().Width() ); + Frame().Width( GetUpper()->Prt().Width() ); MakePrtArea( rAttrs ); if ( !mbValidSize ) { mbValidSize = true; - Format(getRootFrm()->GetCurrShell()->GetOut()); + Format(getRootFrame()->GetCurrShell()->GetOut()); } } } /** Calculate the Bitmap's site, if needed */ -void SwNoTextFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttrs * ) +void SwNoTextFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttrs * ) { const Size aNewSize( GetSize() ); @@ -500,16 +500,16 @@ void SwNoTextFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorder Shrink( std::min(Prt().Height(), -nChgHght) ); } -bool SwNoTextFrm::GetCharRect( SwRect &rRect, const SwPosition& rPos, - SwCrsrMoveState *pCMS ) const +bool SwNoTextFrame::GetCharRect( SwRect &rRect, const SwPosition& rPos, + SwCursorMoveState *pCMS ) const { if ( &rPos.nNode.GetNode() != static_cast<SwNode const *>(GetNode()) ) return false; - Calc(getRootFrm()->GetCurrShell()->GetOut()); - SwRect aFrameRect( Frm() ); + Calc(getRootFrame()->GetCurrShell()->GetOut()); + SwRect aFrameRect( Frame() ); rRect = aFrameRect; - rRect.Pos( Frm().Pos() + Prt().Pos() ); + rRect.Pos( Frame().Pos() + Prt().Pos() ); rRect.SSize( Prt().SSize() ); rRect.Justify(); @@ -536,8 +536,8 @@ bool SwNoTextFrm::GetCharRect( SwRect &rRect, const SwPosition& rPos, return true; } -bool SwNoTextFrm::GetCrsrOfst(SwPosition* pPos, Point& , - SwCrsrMoveState*, bool ) const +bool SwNoTextFrame::GetCursorOfst(SwPosition* pPos, Point& , + SwCursorMoveState*, bool ) const { SwContentNode* pCNd = const_cast<SwContentNode*>(GetNode()); pPos->nNode = *pCNd; @@ -546,26 +546,26 @@ bool SwNoTextFrm::GetCrsrOfst(SwPosition* pPos, Point& , } #define CLEARCACHE {\ - SwFlyFrm* pFly = FindFlyFrm();\ + SwFlyFrame* pFly = FindFlyFrame();\ if( pFly && pFly->GetFormat()->GetSurround().IsContour() )\ {\ ClrContourCache( pFly->GetVirtDrawObj() );\ - pFly->NotifyBackground( FindPageFrm(), Prt(), PREP_FLY_ATTR_CHG );\ + pFly->NotifyBackground( FindPageFrame(), Prt(), PREP_FLY_ATTR_CHG );\ }\ } -void SwNoTextFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) +void SwNoTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) { sal_uInt16 nWhich = pNew ? pNew->Which() : pOld ? pOld->Which() : 0; // #i73788# - // no <SwContentFrm::Modify(..)> for RES_LINKED_GRAPHIC_STREAM_ARRIVED + // no <SwContentFrame::Modify(..)> for RES_LINKED_GRAPHIC_STREAM_ARRIVED if ( RES_GRAPHIC_PIECE_ARRIVED != nWhich && RES_GRAPHIC_ARRIVED != nWhich && RES_GRF_REREAD_AND_INCACHE != nWhich && RES_LINKED_GRAPHIC_STREAM_ARRIVED != nWhich ) { - SwContentFrm::Modify( pOld, pNew ); + SwContentFrame::Modify( pOld, pNew ); } bool bComplete = true; @@ -594,9 +594,9 @@ void SwNoTextFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) if( rShell.GetWin() ) { if( rShell.IsPreview() ) - ::RepaintPagePreview( &rShell, Frm().SVRect() ); + ::RepaintPagePreview( &rShell, Frame().SVRect() ); else - rShell.GetWin()->Invalidate( Frm().SVRect() ); + rShell.GetWin()->Invalidate( Frame().SVRect() ); } } } @@ -639,7 +639,7 @@ void SwNoTextFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) CLEARCACHE - SwRect aRect( Frm() ); + SwRect aRect( Frame() ); SwViewShell *pVSh = pNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell(); if( !pVSh ) @@ -831,9 +831,9 @@ void paintGraphicUsingPrimitivesHelper(vcl::RenderContext & rOutputDevice, @todo use aligned rectangle for drawing graphic. @todo pixel-align coordinations for drawing graphic. */ -void SwNoTextFrm::PaintPicture( vcl::RenderContext* pOut, const SwRect &rGrfArea ) const +void SwNoTextFrame::PaintPicture( vcl::RenderContext* pOut, const SwRect &rGrfArea ) const { - SwViewShell* pShell = getRootFrm()->GetCurrShell(); + SwViewShell* pShell = getRootFrame()->GetCurrShell(); SwNoTextNode& rNoTNd = const_cast<SwNoTextNode&>(*static_cast<const SwNoTextNode*>(GetNode())); SwGrfNode* pGrfNd = rNoTNd.GetGrfNode(); @@ -923,10 +923,10 @@ void SwNoTextFrm::PaintPicture( vcl::RenderContext* pOut, const SwRect &rGrfArea pShell->GetWin(); if( bAnimate && - FindFlyFrm() != ::GetFlyFromMarked( nullptr, pShell )) + FindFlyFrame() != ::GetFlyFromMarked( nullptr, pShell )) { OutputDevice* pVout; - if( pOut == pShell->GetOut() && SwRootFrm::FlushVout() ) + if( pOut == pShell->GetOut() && SwRootFrame::FlushVout() ) pVout = pOut, pOut = pShell->GetOut(); else if( pShell->GetWin() && OUTDEV_VIRDEV == pOut->GetOutDevType() ) @@ -1041,13 +1041,13 @@ void SwNoTextFrm::PaintPicture( vcl::RenderContext* pOut, const SwRect &rGrfArea ::svt::EmbeddedObjectRef::DrawPaintReplacement( Rectangle( aPosition, aSize ), pOLENd->GetOLEObj().GetCurrentPersistName(), pOut ); sal_Int64 nMiscStatus = pOLENd->GetOLEObj().GetOleRef()->getStatus( pOLENd->GetAspect() ); - if ( !bPrn && dynamic_cast< const SwCrsrShell *>( pShell ) != nullptr && ( + if ( !bPrn && dynamic_cast< const SwCursorShell *>( pShell ) != nullptr && ( (nMiscStatus & embed::EmbedMisc::MS_EMBED_ACTIVATEWHENVISIBLE) || pOLENd->GetOLEObj().GetObject().IsGLChart())) { - const SwFlyFrm *pFly = FindFlyFrm(); + const SwFlyFrame *pFly = FindFlyFrame(); assert( pFly != nullptr ); - static_cast<SwFEShell*>(pShell)->ConnectObj( pOLENd->GetOLEObj().GetObject(), pFly->Prt(), pFly->Frm()); + static_cast<SwFEShell*>(pShell)->ConnectObj( pOLENd->GetOLEObj().GetObject(), pFly->Prt(), pFly->Frame()); } } @@ -1059,9 +1059,9 @@ void SwNoTextFrm::PaintPicture( vcl::RenderContext* pOut, const SwRect &rGrfArea } } -bool SwNoTextFrm::IsTransparent() const +bool SwNoTextFrame::IsTransparent() const { - const SwViewShell* pSh = getRootFrm()->GetCurrShell(); + const SwViewShell* pSh = getRootFrame()->GetCurrShell(); if ( !pSh || !pSh->GetViewOptions()->IsGraphic() ) return true; @@ -1073,7 +1073,7 @@ bool SwNoTextFrm::IsTransparent() const return true; } -void SwNoTextFrm::StopAnimation( OutputDevice* pOut ) const +void SwNoTextFrame::StopAnimation( OutputDevice* pOut ) const { // Stop animated graphics const SwGrfNode* pGrfNd = dynamic_cast< const SwGrfNode* >(GetNode()->GetGrfNode()); @@ -1084,7 +1084,7 @@ void SwNoTextFrm::StopAnimation( OutputDevice* pOut ) const } } -bool SwNoTextFrm::HasAnimation() const +bool SwNoTextFrame::HasAnimation() const { const SwGrfNode* pGrfNd = GetNode()->GetGrfNode(); return pGrfNd && pGrfNd->IsAnimated(); diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx index b89e84921be3..9ba7ebd883a2 100644 --- a/sw/source/core/doc/tblafmt.cxx +++ b/sw/source/core/doc/tblafmt.cxx @@ -866,7 +866,7 @@ void SwTableAutoFormat::RestoreTableProperties(SwTable &table) const pFormat->SetFormatAttr(rSet); SwEditShell *pShell = pDoc->GetEditShell(); - pDoc->SetRowSplit(*pShell->getShellCrsr(false), SwFormatRowSplit(m_bRowSplit)); + pDoc->SetRowSplit(*pShell->getShellCursor(false), SwFormatRowSplit(m_bRowSplit)); table.SetRowsToRepeat(m_aRepeatHeading); } @@ -883,7 +883,7 @@ void SwTableAutoFormat::StoreTableProperties(const SwTable &table) SwEditShell *pShell = pDoc->GetEditShell(); SwFormatRowSplit *pRowSplit = nullptr; - SwDoc::GetRowSplit(*pShell->getShellCrsr(false), pRowSplit); + SwDoc::GetRowSplit(*pShell->getShellCursor(false), pRowSplit); m_bRowSplit = pRowSplit && pRowSplit->GetValue(); delete pRowSplit; pRowSplit = nullptr; diff --git a/sw/source/core/doc/tblcpy.cxx b/sw/source/core/doc/tblcpy.cxx index 120b1a2b442c..f25cd8a6865e 100644 --- a/sw/source/core/doc/tblcpy.cxx +++ b/sw/source/core/doc/tblcpy.cxx @@ -325,7 +325,7 @@ namespace } else aInfo.mbSelected = false; - rnBorder += pBox->GetFrameFormat()->GetFrmSize().GetWidth(); + rnBorder += pBox->GetFrameFormat()->GetFrameSize().GetWidth(); const sal_uInt16 nLeftCol = rnCol; while( rpCol != maCols.end() && *rpCol < rnBorder ) { @@ -701,7 +701,7 @@ bool SwTable::InsNewTable( const SwTable& rCpyTable, const SwSelBoxes& rSelBoxes aFndBox.SetTableLines( *this ); if( bClear ) aFndBox.ClearLineBehind(); - aFndBox.DelFrms( *this ); + aFndBox.DelFrames( *this ); // copy boxes aTarget.copyBoxes( rCpyTable, *this, pUndo ); @@ -709,7 +709,7 @@ bool SwTable::InsNewTable( const SwTable& rCpyTable, const SwSelBoxes& rSelBoxes // adjust row span attributes accordingly // make frames - aFndBox.MakeFrms( *this ); + aFndBox.MakeFrames( *this ); return true; } @@ -736,7 +736,7 @@ bool SwTable::InsTable( const SwTable& rCpyTable, const SwNodeIndex& rSttBox, // First delete the Table's Frames _FndBox aFndBox( nullptr, nullptr ); - aFndBox.DelFrms( pTableNd->GetTable() ); + aFndBox.DelFrames( pTableNd->GetTable() ); SwDoc* pCpyDoc = rCpyTable.GetFrameFormat()->GetDoc(); @@ -794,7 +794,7 @@ bool SwTable::InsTable( const SwTable& rCpyTable, const SwNodeIndex& rSttBox, } } - aFndBox.MakeFrms( pTableNd->GetTable() ); // Create the Frames anew + aFndBox.MakeFrames( pTableNd->GetTable() ); // Create the Frames anew return true; } @@ -994,7 +994,7 @@ bool SwTable::InsTable( const SwTable& rCpyTable, const SwSelBoxes& rSelBoxes, // Delete the Frames aFndBox.SetTableLines( *this ); //Not dispose accessible table - aFndBox.DelFrms( *this ); + aFndBox.DelFrames( *this ); if( 1 == rCpyTable.GetTabSortBoxes().size() ) { @@ -1020,7 +1020,7 @@ bool SwTable::InsTable( const SwTable& rCpyTable, const SwSelBoxes& rSelBoxes, } } - aFndBox.MakeFrms( *this ); + aFndBox.MakeFrames( *this ); return true; } diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx index e1c0cccf6238..4a7cb666d23a 100644 --- a/sw/source/core/doc/tblrwcl.cxx +++ b/sw/source/core/doc/tblrwcl.cxx @@ -78,7 +78,7 @@ using namespace ::com::sun::star; // In order to set the Frame Formats for the Boxes, it's enough to look // up the current one in the array. If it's already there return the new one. -struct _CpyTabFrm +struct _CpyTabFrame { union { SwTableBoxFormat *pFrameFormat; // for CopyCol @@ -86,15 +86,15 @@ struct _CpyTabFrm } Value; SwTableBoxFormat *pNewFrameFormat; - explicit _CpyTabFrm( SwTableBoxFormat* pAktFrameFormat ) : pNewFrameFormat( nullptr ) + explicit _CpyTabFrame( SwTableBoxFormat* pAktFrameFormat ) : pNewFrameFormat( nullptr ) { Value.pFrameFormat = pAktFrameFormat; } - _CpyTabFrm& operator=( const _CpyTabFrm& ); + _CpyTabFrame& operator=( const _CpyTabFrame& ); - bool operator==( const _CpyTabFrm& rCpyTabFrm ) const - { return (sal_uLong)Value.nSize == (sal_uLong)rCpyTabFrm.Value.nSize; } - bool operator<( const _CpyTabFrm& rCpyTabFrm ) const - { return (sal_uLong)Value.nSize < (sal_uLong)rCpyTabFrm.Value.nSize; } + bool operator==( const _CpyTabFrame& rCpyTabFrame ) const + { return (sal_uLong)Value.nSize == (sal_uLong)rCpyTabFrame.Value.nSize; } + bool operator<( const _CpyTabFrame& rCpyTabFrame ) const + { return (sal_uLong)Value.nSize < (sal_uLong)rCpyTabFrame.Value.nSize; } }; struct CR_SetBoxWidth @@ -165,7 +165,7 @@ typedef bool (*FN_lcl_SetBoxWidth)(SwTableLine*, CR_SetBoxWidth&, SwTwips, bool #define CHECKBOXWIDTH \ { \ - SwTwips nSize = GetFrameFormat()->GetFrmSize().GetWidth(); \ + SwTwips nSize = GetFrameFormat()->GetFrameSize().GetWidth(); \ for (size_t nTmp = 0; nTmp < m_aLines.size(); ++nTmp) \ ::_CheckBoxWidth( *m_aLines[ nTmp ], nSize ); \ } @@ -175,12 +175,12 @@ typedef bool (*FN_lcl_SetBoxWidth)(SwTableLine*, CR_SetBoxWidth&, SwTwips, bool for ( size_t i = 0; i < GetTabLines().size(); ++i ) \ { \ SwFrameFormat* pFormat = GetTabLines()[i]->GetFrameFormat(); \ - SwIterator<SwRowFrm,SwFormat> aIter( *pFormat ); \ - for (SwRowFrm* pFrm=aIter.First(); pFrm; pFrm=aIter.Next())\ + SwIterator<SwRowFrame,SwFormat> aIter( *pFormat ); \ + for (SwRowFrame* pFrame=aIter.First(); pFrame; pFrame=aIter.Next())\ { \ - if ( pFrm->GetTabLine() == GetTabLines()[i] ) \ + if ( pFrame->GetTabLine() == GetTabLines()[i] ) \ { \ - OSL_ENSURE( pFrm->GetUpper()->IsTabFrm(), \ + OSL_ENSURE( pFrame->GetUpper()->IsTabFrame(), \ "Table layout does not match table structure" ); \ } \ } \ @@ -239,21 +239,21 @@ static bool lcl_InsDelSelLine( SwTableLine* pLine, CR_SetLineHeight& rParam, typedef bool (*FN_lcl_SetLineHeight)(SwTableLine*, CR_SetLineHeight&, SwTwips, bool ); -_CpyTabFrm& _CpyTabFrm::operator=( const _CpyTabFrm& rCpyTabFrm ) +_CpyTabFrame& _CpyTabFrame::operator=( const _CpyTabFrame& rCpyTabFrame ) { - pNewFrameFormat = rCpyTabFrm.pNewFrameFormat; - Value = rCpyTabFrm.Value; + pNewFrameFormat = rCpyTabFrame.pNewFrameFormat; + Value = rCpyTabFrame.Value; return *this; } -typedef o3tl::sorted_vector<_CpyTabFrm> _CpyTabFrms; +typedef o3tl::sorted_vector<_CpyTabFrame> _CpyTabFrames; struct _CpyPara { std::shared_ptr< std::vector< std::vector< sal_uLong > > > pWidths; SwDoc* pDoc; SwTableNode* pTableNd; - _CpyTabFrms& rTabFrmArr; + _CpyTabFrames& rTabFrameArr; SwTableLine* pInsLine; SwTableBox* pInsBox; sal_uLong nOldSize, nNewSize; // in order to correct the size attributes @@ -263,9 +263,9 @@ struct _CpyPara sal_uInt8 nDelBorderFlag; bool bCpyContent; - _CpyPara( SwTableNode* pNd, sal_uInt16 nCopies, _CpyTabFrms& rFrmArr, + _CpyPara( SwTableNode* pNd, sal_uInt16 nCopies, _CpyTabFrames& rFrameArr, bool bCopyContent = true ) - : pDoc( pNd->GetDoc() ), pTableNd( pNd ), rTabFrmArr(rFrmArr), + : pDoc( pNd->GetDoc() ), pTableNd( pNd ), rTabFrameArr(rFrameArr), pInsLine(nullptr), pInsBox(nullptr), nOldSize(0), nNewSize(0), nMinLeft(ULONG_MAX), nMaxRight(0), nCpyCnt(nCopies), nInsPos(0), @@ -274,7 +274,7 @@ struct _CpyPara {} _CpyPara( const _CpyPara& rPara, SwTableLine* pLine ) : pWidths( rPara.pWidths ), pDoc(rPara.pDoc), pTableNd(rPara.pTableNd), - rTabFrmArr(rPara.rTabFrmArr), pInsLine(pLine), pInsBox(rPara.pInsBox), + rTabFrameArr(rPara.rTabFrameArr), pInsLine(pLine), pInsBox(rPara.pInsBox), nOldSize(0), nNewSize(rPara.nNewSize), nMinLeft( rPara.nMinLeft ), nMaxRight( rPara.nMaxRight ), nCpyCnt(rPara.nCpyCnt), nInsPos(0), nLnIdx( rPara.nLnIdx), nBoxIdx( rPara.nBoxIdx ), @@ -282,7 +282,7 @@ struct _CpyPara {} _CpyPara( const _CpyPara& rPara, SwTableBox* pBox ) : pWidths( rPara.pWidths ), pDoc(rPara.pDoc), pTableNd(rPara.pTableNd), - rTabFrmArr(rPara.rTabFrmArr), pInsLine(rPara.pInsLine), pInsBox(pBox), + rTabFrameArr(rPara.rTabFrameArr), pInsLine(rPara.pInsLine), pInsBox(pBox), nOldSize(rPara.nOldSize), nNewSize(rPara.nNewSize), nMinLeft( rPara.nMinLeft ), nMaxRight( rPara.nMaxRight ), nCpyCnt(rPara.nCpyCnt), nInsPos(0), nLnIdx(rPara.nLnIdx), nBoxIdx(rPara.nBoxIdx), @@ -296,21 +296,21 @@ static void lcl_CopyCol( _FndBox & rFndBox, _CpyPara *const pCpyPara) { // Look up the Frame Format in the Frame Format Array SwTableBox* pBox = rFndBox.GetBox(); - _CpyTabFrm aFindFrm( static_cast<SwTableBoxFormat*>(pBox->GetFrameFormat()) ); + _CpyTabFrame aFindFrame( static_cast<SwTableBoxFormat*>(pBox->GetFrameFormat()) ); sal_uInt16 nFndPos; if( pCpyPara->nCpyCnt ) { - _CpyTabFrms::const_iterator itFind = pCpyPara->rTabFrmArr.lower_bound( aFindFrm ); - nFndPos = itFind - pCpyPara->rTabFrmArr.begin(); - if( itFind == pCpyPara->rTabFrmArr.end() || !(*itFind == aFindFrm) ) + _CpyTabFrames::const_iterator itFind = pCpyPara->rTabFrameArr.lower_bound( aFindFrame ); + nFndPos = itFind - pCpyPara->rTabFrameArr.begin(); + if( itFind == pCpyPara->rTabFrameArr.end() || !(*itFind == aFindFrame) ) { // For nested copying, also save the new Format as an old one. SwTableBoxFormat* pNewFormat = static_cast<SwTableBoxFormat*>(pBox->ClaimFrameFormat()); // Find the selected Boxes in the Line: _FndLine const* pCmpLine = nullptr; - SwFormatFrmSize aFrmSz( pNewFormat->GetFrmSize() ); + SwFormatFrameSize aFrameSz( pNewFormat->GetFrameSize() ); bool bDiffCount = false; if( pBox->GetTabLines().size() ) @@ -328,49 +328,49 @@ static void lcl_CopyCol( _FndBox & rFndBox, _CpyPara *const pCpyPara) for( auto n = rFndBoxes.size(); n; ) { nSz += rFndBoxes[--n]->GetBox()-> - GetFrameFormat()->GetFrmSize().GetWidth(); + GetFrameFormat()->GetFrameSize().GetWidth(); } - aFrmSz.SetWidth( aFrmSz.GetWidth() - + aFrameSz.SetWidth( aFrameSz.GetWidth() - nSz / ( pCpyPara->nCpyCnt + 1 ) ); - pNewFormat->SetFormatAttr( aFrmSz ); - aFrmSz.SetWidth( nSz / ( pCpyPara->nCpyCnt + 1 ) ); + pNewFormat->SetFormatAttr( aFrameSz ); + aFrameSz.SetWidth( nSz / ( pCpyPara->nCpyCnt + 1 ) ); // Create a new Format for the new Box, specifying its size. - aFindFrm.pNewFrameFormat = reinterpret_cast<SwTableBoxFormat*>(pNewFormat->GetDoc()-> + aFindFrame.pNewFrameFormat = reinterpret_cast<SwTableBoxFormat*>(pNewFormat->GetDoc()-> MakeTableLineFormat()); - *aFindFrm.pNewFrameFormat = *pNewFormat; - aFindFrm.pNewFrameFormat->SetFormatAttr( aFrmSz ); + *aFindFrame.pNewFrameFormat = *pNewFormat; + aFindFrame.pNewFrameFormat->SetFormatAttr( aFrameSz ); } else { - aFrmSz.SetWidth( aFrmSz.GetWidth() / ( pCpyPara->nCpyCnt + 1 ) ); - pNewFormat->SetFormatAttr( aFrmSz ); + aFrameSz.SetWidth( aFrameSz.GetWidth() / ( pCpyPara->nCpyCnt + 1 ) ); + pNewFormat->SetFormatAttr( aFrameSz ); - aFindFrm.pNewFrameFormat = pNewFormat; - pCpyPara->rTabFrmArr.insert( aFindFrm ); - aFindFrm.Value.pFrameFormat = pNewFormat; - pCpyPara->rTabFrmArr.insert( aFindFrm ); + aFindFrame.pNewFrameFormat = pNewFormat; + pCpyPara->rTabFrameArr.insert( aFindFrame ); + aFindFrame.Value.pFrameFormat = pNewFormat; + pCpyPara->rTabFrameArr.insert( aFindFrame ); } } else { - aFindFrm = pCpyPara->rTabFrmArr[ nFndPos ]; - pBox->ChgFrameFormat( aFindFrm.pNewFrameFormat ); + aFindFrame = pCpyPara->rTabFrameArr[ nFndPos ]; + pBox->ChgFrameFormat( aFindFrame.pNewFrameFormat ); } } else { - _CpyTabFrms::const_iterator itFind = pCpyPara->rTabFrmArr.find( aFindFrm ); + _CpyTabFrames::const_iterator itFind = pCpyPara->rTabFrameArr.find( aFindFrame ); if( pCpyPara->nDelBorderFlag && - itFind != pCpyPara->rTabFrmArr.end() ) - aFindFrm = *itFind; + itFind != pCpyPara->rTabFrameArr.end() ) + aFindFrame = *itFind; else - aFindFrm.pNewFrameFormat = static_cast<SwTableBoxFormat*>(pBox->GetFrameFormat()); + aFindFrame.pNewFrameFormat = static_cast<SwTableBoxFormat*>(pBox->GetFrameFormat()); } if (!rFndBox.GetLines().empty()) { - pBox = new SwTableBox( aFindFrm.pNewFrameFormat, + pBox = new SwTableBox( aFindFrame.pNewFrameFormat, rFndBox.GetLines().size(), pCpyPara->pInsLine ); pCpyPara->pInsLine->GetTabBoxes().insert( pCpyPara->pInsLine->GetTabBoxes().begin() + pCpyPara->nInsPos++, pBox ); _CpyPara aPara( *pCpyPara, pBox ); @@ -384,7 +384,7 @@ static void lcl_CopyCol( _FndBox & rFndBox, _CpyPara *const pCpyPara) else { ::_InsTableBox( pCpyPara->pDoc, pCpyPara->pTableNd, pCpyPara->pInsLine, - aFindFrm.pNewFrameFormat, pBox, pCpyPara->nInsPos++ ); + aFindFrame.pNewFrameFormat, pBox, pCpyPara->nInsPos++ ); const FndBoxes_t& rFndBxs = rFndBox.GetUpper()->GetBoxes(); if( 8 > pCpyPara->nDelBorderFlag @@ -396,7 +396,7 @@ static void lcl_CopyCol( _FndBox & rFndBox, _CpyPara *const pCpyPara) ? rBoxItem.GetTop() : rBoxItem.GetRight() ) { - aFindFrm.Value.pFrameFormat = static_cast<SwTableBoxFormat*>(pBox->GetFrameFormat()); + aFindFrame.Value.pFrameFormat = static_cast<SwTableBoxFormat*>(pBox->GetFrameFormat()); SvxBoxItem aNew( rBoxItem ); if( 8 > pCpyPara->nDelBorderFlag ) @@ -412,14 +412,14 @@ static void lcl_CopyCol( _FndBox & rFndBox, _CpyPara *const pCpyPara) pCpyPara->nInsPos - 1 ]; } - aFindFrm.pNewFrameFormat = static_cast<SwTableBoxFormat*>(pBox->GetFrameFormat()); + aFindFrame.pNewFrameFormat = static_cast<SwTableBoxFormat*>(pBox->GetFrameFormat()); // Else we copy before that and the first Line keeps the TopLine // and we remove it at the original pBox->ClaimFrameFormat()->SetFormatAttr( aNew ); if( !pCpyPara->nCpyCnt ) - pCpyPara->rTabFrmArr.insert( aFindFrm ); + pCpyPara->rTabFrameArr.insert( aFindFrame ); } } } @@ -487,12 +487,12 @@ static void lcl_InsCol( _FndLine* pFndLn, _CpyPara& rCpyPara, sal_uInt16 nCpyCnt } } -SwRowFrm* GetRowFrm( SwTableLine& rLine ) +SwRowFrame* GetRowFrame( SwTableLine& rLine ) { - SwIterator<SwRowFrm,SwFormat> aIter( *rLine.GetFrameFormat() ); - for( SwRowFrm* pFrm = aIter.First(); pFrm; pFrm = aIter.Next() ) - if( pFrm->GetTabLine() == &rLine ) - return pFrm; + SwIterator<SwRowFrame,SwFormat> aIter( *rLine.GetFrameFormat() ); + for( SwRowFrame* pFrame = aIter.First(); pFrame; pFrame = aIter.Next() ) + if( pFrame->GetTabLine() == &rLine ) + return pFrame; return nullptr; } @@ -521,13 +521,13 @@ bool SwTable::InsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt, // Find Lines for the layout update aFndBox.SetTableLines( *this ); - aFndBox.DelFrms( *this ); + aFndBox.DelFrames( *this ); // TL_CHART2: nothing to be done since chart2 currently does not want to // get notified about new rows/cols. - _CpyTabFrms aTabFrmArr; - _CpyPara aCpyPara( pTableNd, nCnt, aTabFrmArr ); + _CpyTabFrames aTabFrameArr; + _CpyPara aCpyPara( pTableNd, nCnt, aTabFrameArr ); for (auto & rpLine : aFndBox.GetLines()) { @@ -538,7 +538,7 @@ bool SwTable::InsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt, GCLines(); // Update Layout - aFndBox.MakeFrms( *this ); + aFndBox.MakeFrames( *this ); CHECKBOXWIDTH; CHECKTABLELAYOUT; @@ -591,19 +591,19 @@ bool SwTable::_InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, // Find Lines for the layout update const bool bLayout = !IsNewModel() && - nullptr != SwIterator<SwTabFrm,SwFormat>( *GetFrameFormat() ).First(); + nullptr != SwIterator<SwTabFrame,SwFormat>( *GetFrameFormat() ).First(); if ( bLayout ) { aFndBox.SetTableLines( *this ); if( pFndBox != &aFndBox ) - aFndBox.DelFrms( *this ); + aFndBox.DelFrames( *this ); // TL_CHART2: nothing to be done since chart2 currently does not want to // get notified about new rows/cols. } - _CpyTabFrms aTabFrmArr; - _CpyPara aCpyPara( pTableNd, 0, aTabFrmArr ); + _CpyTabFrames aTabFrameArr; + _CpyPara aCpyPara( pTableNd, 0, aTabFrameArr ); SwTableLine* pLine = pFndBox->GetLines()[ bBehind ? pFndBox->GetLines().size()-1 : 0 ]->GetLine(); @@ -639,9 +639,9 @@ bool SwTable::_InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, if ( bLayout ) { if( pFndBox != &aFndBox ) - aFndBox.MakeFrms( *this ); + aFndBox.MakeFrames( *this ); else - aFndBox.MakeNewFrms( *this, nCnt, bBehind ); + aFndBox.MakeNewFrames( *this, nCnt, bBehind ); } CHECKBOXWIDTH; @@ -677,7 +677,7 @@ static void lcl_LastBoxSetWidth( SwTableBoxes &rBoxes, const long nOffset, // Adapt the Box const SwFrameFormat *pBoxFormat = rBox.GetFrameFormat(); - SwFormatFrmSize aNew( pBoxFormat->GetFrmSize() ); + SwFormatFrameSize aNew( pBoxFormat->GetFrameSize() ); aNew.SetWidth( aNew.GetWidth() + nOffset ); SwFrameFormat *pFormat = rShareFormats.GetFormat( *pBoxFormat, aNew ); if( pFormat ) @@ -700,7 +700,7 @@ void _DeleteBox( SwTable& rTable, SwTableBox* pBox, SwUndo* pUndo, { do { SwTwips nBoxSz = bCalcNewSize ? - pBox->GetFrameFormat()->GetFrmSize().GetWidth() : 0; + pBox->GetFrameFormat()->GetFrameSize().GetWidth() : 0; SwTableLine* pLine = pBox->GetUpper(); SwTableBoxes& rTableBoxes = pLine->GetTabBoxes(); sal_uInt16 nDelPos = rTableBoxes.GetPos( pBox ); @@ -792,7 +792,7 @@ void _DeleteBox( SwTable& rTable, SwTableBox* pBox, SwUndo* pUndo, pBox = rTableBoxes[nDelPos]; if( bCalcNewSize ) { - SwFormatFrmSize aNew( pBox->GetFrameFormat()->GetFrmSize() ); + SwFormatFrameSize aNew( pBox->GetFrameFormat()->GetFrameSize() ); aNew.SetWidth( aNew.GetWidth() + nBoxSz ); if( pShareFormats ) pShareFormats->SetSize( *pBox, aNew ); @@ -867,7 +867,7 @@ lcl_FndNxtPrvDelBox( const SwTableLines& rTableLns, break; } pFndBox = pBox; - nFndBoxWidth = pFndBox->GetFrameFormat()->GetFrmSize().GetWidth(); + nFndBoxWidth = pFndBox->GetFrameFormat()->GetFrameSize().GetWidth(); nFndWidth -= nFndBoxWidth; } @@ -933,8 +933,8 @@ lcl_SaveUpperLowerBorder( SwTable& rTable, const SwTableBox& rBox, // search in the top/bottom Line of the respective counterparts. SwTwips nBoxStt = 0; for( sal_uInt16 n = 0; n < nDelPos; ++n ) - nBoxStt += rTableBoxes[ n ]->GetFrameFormat()->GetFrmSize().GetWidth(); - SwTwips nBoxWidth = rBox.GetFrameFormat()->GetFrmSize().GetWidth(); + nBoxStt += rTableBoxes[ n ]->GetFrameFormat()->GetFrameSize().GetWidth(); + SwTwips nBoxWidth = rBox.GetFrameFormat()->GetFrameSize().GetWidth(); SwTableBox *pPrvBox = nullptr, *pNxtBox = nullptr; if( nLnPos ) // Predecessor? @@ -980,7 +980,7 @@ bool SwTable::DeleteSel( , const SwSelBoxes& rBoxes, const SwSelBoxes* pMerged, SwUndo* pUndo, - const bool bDelMakeFrms, const bool bCorrBorder ) + const bool bDelMakeFrames, const bool bCorrBorder ) { OSL_ENSURE( pDoc, "No doc?" ); SwTableNode* pTableNd = nullptr; @@ -995,13 +995,13 @@ bool SwTable::DeleteSel( // Find Lines for the Layout update _FndBox aFndBox( nullptr, nullptr ); - if ( bDelMakeFrms ) + if ( bDelMakeFrames ) { if( pMerged && !pMerged->empty() ) aFndBox.SetTableLines( *pMerged, *this ); else if( !rBoxes.empty() ) aFndBox.SetTableLines( rBoxes, *this ); - aFndBox.DelFrms( *this ); + aFndBox.DelFrames( *this ); } SwShareBoxFormats aShareFormats; @@ -1038,8 +1038,8 @@ bool SwTable::DeleteSel( // then clean up the structure of all Lines GCLines(); - if( bDelMakeFrms && aFndBox.AreLinesToRestore( *this ) ) - aFndBox.MakeFrms( *this ); + if( bDelMakeFrames && aFndBox.AreLinesToRestore( *this ) ) + aFndBox.MakeFrames( *this ); // TL_CHART2: now inform chart that sth has changed pDoc->UpdateCharts( GetFrameFormat()->GetName() ); @@ -1074,17 +1074,17 @@ bool SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCn for (size_t n = 0; n < rBoxes.size(); ++n) { SwTableBox* pSelBox = rBoxes[n]; - const SwRowFrm* pRow = GetRowFrm( *pSelBox->GetUpper() ); + const SwRowFrame* pRow = GetRowFrame( *pSelBox->GetUpper() ); OSL_ENSURE( pRow, "Where is the SwTableLine's Frame?" ); SWRECTFN( pRow ) - pRowHeights[ n ] = (pRow->Frm().*fnRect->fnGetHeight)(); + pRowHeights[ n ] = (pRow->Frame().*fnRect->fnGetHeight)(); } } // Find Lines for the Layout update _FndBox aFndBox( nullptr, nullptr ); aFndBox.SetTableLines( rBoxes, *this ); - aFndBox.DelFrms( *this ); + aFndBox.DelFrames( *this ); for (size_t n = 0; n < rBoxes.size(); ++n) { @@ -1096,7 +1096,7 @@ bool SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCn SwTableBoxFormat* pFrameFormat = static_cast<SwTableBoxFormat*>(pSelBox->GetFrameFormat()); // Respect the Line's height, reset if needed - SwFormatFrmSize aFSz( pInsLine->GetFrameFormat()->GetFrmSize() ); + SwFormatFrameSize aFSz( pInsLine->GetFrameFormat()->GetFrameSize() ); if ( bSameHeight && ATT_VAR_SIZE == aFSz.GetHeightSizeType() ) aFSz.SetHeightSizeType( ATT_MIN_SIZE ); @@ -1186,7 +1186,7 @@ bool SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCn GCLines(); - aFndBox.MakeFrms( *this ); + aFndBox.MakeFrames( *this ); CHECKBOXWIDTH CHECKTABLELAYOUT @@ -1212,9 +1212,9 @@ bool SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt ) // Find Lines for the Layout update _FndBox aFndBox( nullptr, nullptr ); aFndBox.SetTableLines( aSelBoxes, *this ); - aFndBox.DelFrms( *this ); + aFndBox.DelFrames( *this ); - _CpyTabFrms aFrmArr; + _CpyTabFrames aFrameArr; std::vector<SwTableBoxFormat*> aLastBoxArr; for (size_t n = 0; n < aSelBoxes.size(); ++n) { @@ -1222,7 +1222,7 @@ bool SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt ) OSL_ENSURE( pSelBox, "Box is not in the table" ); // We don't want to split small table cells into very very small cells - if( pSelBox->GetFrameFormat()->GetFrmSize().GetWidth()/( nCnt + 1 ) < 10 ) + if( pSelBox->GetFrameFormat()->GetFrameSize().GetWidth()/( nCnt + 1 ) < 10 ) continue; // Then split the nCnt Box up into nCnt Boxes @@ -1231,63 +1231,63 @@ bool SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt ) // Find the Frame Format in the Frame Format Array SwTableBoxFormat* pLastBoxFormat; - _CpyTabFrm aFindFrm( static_cast<SwTableBoxFormat*>(pSelBox->GetFrameFormat()) ); - _CpyTabFrms::const_iterator itFind = aFrmArr.lower_bound( aFindFrm ); - const size_t nFndPos = itFind - aFrmArr.begin(); - if( itFind == aFrmArr.end() || !(*itFind == aFindFrm) ) + _CpyTabFrame aFindFrame( static_cast<SwTableBoxFormat*>(pSelBox->GetFrameFormat()) ); + _CpyTabFrames::const_iterator itFind = aFrameArr.lower_bound( aFindFrame ); + const size_t nFndPos = itFind - aFrameArr.begin(); + if( itFind == aFrameArr.end() || !(*itFind == aFindFrame) ) { // Change the FrameFormat - aFindFrm.pNewFrameFormat = static_cast<SwTableBoxFormat*>(pSelBox->ClaimFrameFormat()); - SwTwips nBoxSz = aFindFrm.pNewFrameFormat->GetFrmSize().GetWidth(); + aFindFrame.pNewFrameFormat = static_cast<SwTableBoxFormat*>(pSelBox->ClaimFrameFormat()); + SwTwips nBoxSz = aFindFrame.pNewFrameFormat->GetFrameSize().GetWidth(); SwTwips nNewBoxSz = nBoxSz / ( nCnt + 1 ); - aFindFrm.pNewFrameFormat->SetFormatAttr( SwFormatFrmSize( ATT_VAR_SIZE, + aFindFrame.pNewFrameFormat->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, nNewBoxSz, 0 ) ); - aFrmArr.insert( aFindFrm ); + aFrameArr.insert( aFindFrame ); - pLastBoxFormat = aFindFrm.pNewFrameFormat; + pLastBoxFormat = aFindFrame.pNewFrameFormat; if( nBoxSz != ( nNewBoxSz * (nCnt + 1))) { // We have a remainder, so we need to define an own Format // for the last Box. - pLastBoxFormat = new SwTableBoxFormat( *aFindFrm.pNewFrameFormat ); - pLastBoxFormat->SetFormatAttr( SwFormatFrmSize( ATT_VAR_SIZE, + pLastBoxFormat = new SwTableBoxFormat( *aFindFrame.pNewFrameFormat ); + pLastBoxFormat->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, nBoxSz - ( nNewBoxSz * nCnt ), 0 ) ); } aLastBoxArr.insert( aLastBoxArr.begin() + nFndPos, pLastBoxFormat ); } else { - aFindFrm = aFrmArr[ nFndPos ]; - pSelBox->ChgFrameFormat( aFindFrm.pNewFrameFormat ); + aFindFrame = aFrameArr[ nFndPos ]; + pSelBox->ChgFrameFormat( aFindFrame.pNewFrameFormat ); pLastBoxFormat = aLastBoxArr[ nFndPos ]; } // Insert the Boxes at the Position for( sal_uInt16 i = 1; i < nCnt; ++i ) - ::_InsTableBox( pDoc, pTableNd, pInsLine, aFindFrm.pNewFrameFormat, + ::_InsTableBox( pDoc, pTableNd, pInsLine, aFindFrame.pNewFrameFormat, pSelBox, nBoxPos + i ); // insert after ::_InsTableBox( pDoc, pTableNd, pInsLine, pLastBoxFormat, pSelBox, nBoxPos + nCnt ); // insert after // Special treatment for the Border: - const SvxBoxItem& aSelBoxItem = aFindFrm.pNewFrameFormat->GetBox(); + const SvxBoxItem& aSelBoxItem = aFindFrame.pNewFrameFormat->GetBox(); if( aSelBoxItem.GetRight() ) { pInsLine->GetTabBoxes()[ nBoxPos + nCnt ]->ClaimFrameFormat(); SvxBoxItem aTmp( aSelBoxItem ); aTmp.SetLine( nullptr, SvxBoxItemLine::RIGHT ); - aFindFrm.pNewFrameFormat->SetFormatAttr( aTmp ); + aFindFrame.pNewFrameFormat->SetFormatAttr( aTmp ); // Remove the Format from the "cache" - for( auto i = aFrmArr.size(); i; ) + for( auto i = aFrameArr.size(); i; ) { - const _CpyTabFrm& rCTF = aFrmArr[ --i ]; - if( rCTF.pNewFrameFormat == aFindFrm.pNewFrameFormat || - rCTF.Value.pFrameFormat == aFindFrm.pNewFrameFormat ) + const _CpyTabFrame& rCTF = aFrameArr[ --i ]; + if( rCTF.pNewFrameFormat == aFindFrame.pNewFrameFormat || + rCTF.Value.pFrameFormat == aFindFrame.pNewFrameFormat ) { - aFrmArr.erase( aFrmArr.begin() + i ); + aFrameArr.erase( aFrameArr.begin() + i ); aLastBoxArr.erase( aLastBoxArr.begin() + i ); } } @@ -1295,7 +1295,7 @@ bool SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt ) } // Update Layout - aFndBox.MakeFrms( *this ); + aFndBox.MakeFrames( *this ); CHECKBOXWIDTH CHECKTABLELAYOUT @@ -1355,9 +1355,9 @@ static void lcl_CalcWidth( SwTableBox* pBox ) long nWidth = 0; for( auto pTabBox : pLine->GetTabBoxes() ) - nWidth += pTabBox->GetFrameFormat()->GetFrmSize().GetWidth(); + nWidth += pTabBox->GetFrameFormat()->GetFrameSize().GetWidth(); - pFormat->SetFormatAttr( SwFormatFrmSize( ATT_VAR_SIZE, nWidth, 0 )); + pFormat->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, nWidth, 0 )); // Boxes with Lines can only have Size/Fillorder pFormat->ResetFormatAttr( RES_LR_SPACE, RES_FRMATR_END - 1 ); @@ -1582,7 +1582,7 @@ bool SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes, // Find Lines for the Layout update aFndBox.SetTableLines( *this ); - aFndBox.DelFrms( *this ); + aFndBox.DelFrames( *this ); _FndBox* pFndBox = &aFndBox; while( 1 == pFndBox->GetLines().size() && @@ -1668,7 +1668,7 @@ bool SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes, it != GetTabLines()[0]->GetTabBoxes().end(); ++it) lcl_BoxSetHeadCondColl(*it); - aFndBox.MakeFrms( *this ); + aFndBox.MakeFrames( *this ); CHECKBOXWIDTH CHECKTABLELAYOUT @@ -1715,7 +1715,7 @@ static sal_uInt16 lcl_GetBoxOffset( const _FndBox& rBox ) { if (pBox==pCmp) break; - nRet = nRet + (sal_uInt16) pCmp->GetFrameFormat()->GetFrmSize().GetWidth(); + nRet = nRet + (sal_uInt16) pCmp->GetFrameFormat()->GetFrameSize().GetWidth(); } pBox = pBox->GetUpper()->GetUpper(); } while( pBox ); @@ -1728,7 +1728,7 @@ static sal_uInt16 lcl_GetLineWidth( const _FndLine& rLine ) for( auto n = rLine.GetBoxes().size(); n; ) { nRet = nRet + static_cast<sal_uInt16>(rLine.GetBoxes()[--n]->GetBox() - ->GetFrameFormat()->GetFrmSize().GetWidth()); + ->GetFrameFormat()->GetFrameSize().GetWidth()); } return nRet; } @@ -1763,7 +1763,7 @@ static void lcl_CalcNewWidths(const FndLines_t& rFndLines, _CpyPara& rPara) { SwTableBox* pBox = pLine->GetTabBoxes()[nBox++]; if( pBox != pSel ) - nPos += pBox->GetFrameFormat()->GetFrmSize().GetWidth(); + nPos += pBox->GetFrameFormat()->GetFrameSize().GetWidth(); else break; } @@ -1778,7 +1778,7 @@ static void lcl_CalcNewWidths(const FndLines_t& rFndLines, _CpyPara& rPara) for( nBox = 0; nBox < nBoxCount; ) { nPos += pFndLine->GetBoxes()[nBox] - ->GetBox()->GetFrameFormat()->GetFrmSize().GetWidth(); + ->GetBox()->GetFrameFormat()->GetFrameSize().GetWidth(); rWidth[ ++nBox ] = nPos; } // nPos: The right border of the last selected box @@ -1836,7 +1836,7 @@ static void lcl_CopyBoxToDoc(_FndBox const& rFndBox, _CpyPara *const pCpyPara) else { nRealSize = pCpyPara->nNewSize; - nRealSize *= rFndBox.GetBox()->GetFrameFormat()->GetFrmSize().GetWidth(); + nRealSize *= rFndBox.GetBox()->GetFrameFormat()->GetFrameSize().GetWidth(); if (pCpyPara->nOldSize == 0) throw o3tl::divide_by_zero(); nRealSize /= pCpyPara->nOldSize; @@ -1854,29 +1854,29 @@ static void lcl_CopyBoxToDoc(_FndBox const& rFndBox, _CpyPara *const pCpyPara) do { // Find the Frame Format in the list of all Frame Formats - _CpyTabFrm aFindFrm(static_cast<SwTableBoxFormat*>(rFndBox.GetBox()->GetFrameFormat())); - - SwFormatFrmSize aFrmSz; - _CpyTabFrms::const_iterator itFind = pCpyPara->rTabFrmArr.lower_bound( aFindFrm ); - const _CpyTabFrms::size_type nFndPos = itFind - pCpyPara->rTabFrmArr.begin(); - if( itFind == pCpyPara->rTabFrmArr.end() || !(*itFind == aFindFrm) || - ( aFrmSz = ( aFindFrm = pCpyPara->rTabFrmArr[ nFndPos ]).pNewFrameFormat-> - GetFrmSize()).GetWidth() != (SwTwips)nSize ) + _CpyTabFrame aFindFrame(static_cast<SwTableBoxFormat*>(rFndBox.GetBox()->GetFrameFormat())); + + SwFormatFrameSize aFrameSz; + _CpyTabFrames::const_iterator itFind = pCpyPara->rTabFrameArr.lower_bound( aFindFrame ); + const _CpyTabFrames::size_type nFndPos = itFind - pCpyPara->rTabFrameArr.begin(); + if( itFind == pCpyPara->rTabFrameArr.end() || !(*itFind == aFindFrame) || + ( aFrameSz = ( aFindFrame = pCpyPara->rTabFrameArr[ nFndPos ]).pNewFrameFormat-> + GetFrameSize()).GetWidth() != (SwTwips)nSize ) { // It doesn't exist yet, so copy it - aFindFrm.pNewFrameFormat = pCpyPara->pDoc->MakeTableBoxFormat(); - aFindFrm.pNewFrameFormat->CopyAttrs( *rFndBox.GetBox()->GetFrameFormat() ); + aFindFrame.pNewFrameFormat = pCpyPara->pDoc->MakeTableBoxFormat(); + aFindFrame.pNewFrameFormat->CopyAttrs( *rFndBox.GetBox()->GetFrameFormat() ); if( !pCpyPara->bCpyContent ) - aFindFrm.pNewFrameFormat->ResetFormatAttr( RES_BOXATR_FORMULA, RES_BOXATR_VALUE ); - aFrmSz.SetWidth( nSize ); - aFindFrm.pNewFrameFormat->SetFormatAttr( aFrmSz ); - pCpyPara->rTabFrmArr.insert( aFindFrm ); + aFindFrame.pNewFrameFormat->ResetFormatAttr( RES_BOXATR_FORMULA, RES_BOXATR_VALUE ); + aFrameSz.SetWidth( nSize ); + aFindFrame.pNewFrameFormat->SetFormatAttr( aFrameSz ); + pCpyPara->rTabFrameArr.insert( aFindFrame ); } SwTableBox* pBox; if (!rFndBox.GetLines().empty()) { - pBox = new SwTableBox( aFindFrm.pNewFrameFormat, + pBox = new SwTableBox( aFindFrame.pNewFrameFormat, rFndBox.GetLines().size(), pCpyPara->pInsLine ); pCpyPara->pInsLine->GetTabBoxes().insert( pCpyPara->pInsLine->GetTabBoxes().begin() + pCpyPara->nInsPos++, pBox ); _CpyPara aPara( *pCpyPara, pBox ); @@ -1890,7 +1890,7 @@ static void lcl_CopyBoxToDoc(_FndBox const& rFndBox, _CpyPara *const pCpyPara) { // Create an empty Box pCpyPara->pDoc->GetNodes().InsBoxen( pCpyPara->pTableNd, pCpyPara->pInsLine, - aFindFrm.pNewFrameFormat, + aFindFrame.pNewFrameFormat, pCpyPara->pDoc->GetDfltTextFormatColl(), nullptr, pCpyPara->nInsPos ); pBox = pCpyPara->pInsLine->GetTabBoxes()[ pCpyPara->nInsPos ]; @@ -1952,19 +1952,19 @@ static void lcl_CopyLineToDoc(const _FndLine& rFndLine, _CpyPara *const pCpyPara) { // Find the Frame Format in the list of all Frame Formats - _CpyTabFrm aFindFrm( static_cast<SwTableBoxFormat*>(rFndLine.GetLine()->GetFrameFormat()) ); - _CpyTabFrms::const_iterator itFind = pCpyPara->rTabFrmArr.find( aFindFrm ); - if( itFind == pCpyPara->rTabFrmArr.end() ) + _CpyTabFrame aFindFrame( static_cast<SwTableBoxFormat*>(rFndLine.GetLine()->GetFrameFormat()) ); + _CpyTabFrames::const_iterator itFind = pCpyPara->rTabFrameArr.find( aFindFrame ); + if( itFind == pCpyPara->rTabFrameArr.end() ) { // It doesn't exist yet, so copy it - aFindFrm.pNewFrameFormat = reinterpret_cast<SwTableBoxFormat*>(pCpyPara->pDoc->MakeTableLineFormat()); - aFindFrm.pNewFrameFormat->CopyAttrs( *rFndLine.GetLine()->GetFrameFormat() ); - pCpyPara->rTabFrmArr.insert( aFindFrm ); + aFindFrame.pNewFrameFormat = reinterpret_cast<SwTableBoxFormat*>(pCpyPara->pDoc->MakeTableLineFormat()); + aFindFrame.pNewFrameFormat->CopyAttrs( *rFndLine.GetLine()->GetFrameFormat() ); + pCpyPara->rTabFrameArr.insert( aFindFrame ); } else - aFindFrm = *itFind; + aFindFrame = *itFind; - SwTableLine* pNewLine = new SwTableLine( reinterpret_cast<SwTableLineFormat*>(aFindFrm.pNewFrameFormat), + SwTableLine* pNewLine = new SwTableLine( reinterpret_cast<SwTableLineFormat*>(aFindFrame.pNewFrameFormat), rFndLine.GetBoxes().size(), pCpyPara->pInsBox ); if( pCpyPara->pInsBox ) { @@ -1994,13 +1994,13 @@ lcl_CopyLineToDoc(const _FndLine& rFndLine, _CpyPara *const pCpyPara) pFormat = rFndLine.GetLine()->GetUpper()->GetFrameFormat(); else pFormat = pCpyPara->pTableNd->GetTable().GetFrameFormat(); - aPara.nOldSize = pFormat->GetFrmSize().GetWidth(); + aPara.nOldSize = pFormat->GetFrameSize().GetWidth(); } else // Calculate it for (auto &rpBox : rFndLine.GetBoxes()) { - aPara.nOldSize += rpBox->GetBox()->GetFrameFormat()->GetFrmSize().GetWidth(); + aPara.nOldSize += rpBox->GetBox()->GetFrameFormat()->GetFrameSize().GetWidth(); } const FndBoxes_t& rBoxes = rFndLine.GetBoxes(); @@ -2035,9 +2035,9 @@ bool SwTable::CopyHeadlineIntoTable( SwTableNode& rTableNd ) GetFrameFormat()->GetDoc()->getIDocumentFieldsAccess().UpdateTableFields( &aMsgHint ); } - _CpyTabFrms aCpyFormat; + _CpyTabFrames aCpyFormat; _CpyPara aPara( &rTableNd, 1, aCpyFormat, true ); - aPara.nNewSize = aPara.nOldSize = rTableNd.GetTable().GetFrameFormat()->GetFrmSize().GetWidth(); + aPara.nNewSize = aPara.nOldSize = rTableNd.GetTable().GetFrameFormat()->GetFrameSize().GetWidth(); // Copy if( IsNewModel() ) lcl_CalcNewWidths( aFndBox.GetLines(), aPara ); @@ -2115,7 +2115,7 @@ bool SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos, pNewTable->SetTableChgMode( GetTableChgMode() ); // Destroy the already created Frames - pTableNd->DelFrms(); + pTableNd->DelFrames(); { // Conver the Table formulas to their relative representation @@ -2130,9 +2130,9 @@ bool SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos, if( bCpyName ) pNewTable->GetFrameFormat()->SetName( GetFrameFormat()->GetName() ); - _CpyTabFrms aCpyFormat; + _CpyTabFrames aCpyFormat; _CpyPara aPara( pTableNd, 1, aCpyFormat, bCpyNds ); - aPara.nNewSize = aPara.nOldSize = GetFrameFormat()->GetFrmSize().GetWidth(); + aPara.nNewSize = aPara.nOldSize = GetFrameFormat()->GetFrameSize().GetWidth(); if( IsNewModel() ) lcl_CalcNewWidths( aFndBox.GetLines(), aPara ); @@ -2204,7 +2204,7 @@ bool SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos, // Clean up pNewTable->GCLines(); - pTableNd->MakeFrms( &aIdx ); // re-generate the Frames + pTableNd->MakeFrames( &aIdx ); // re-generate the Frames CHECKTABLELAYOUT @@ -2366,7 +2366,7 @@ static SwTwips lcl_GetDistance( SwTableBox* pBox, bool bLeft ) while( nStt < nPos ) nRet += pLine->GetTabBoxes()[ nStt++ ]->GetFrameFormat() - ->GetFrmSize().GetWidth(); + ->GetFrameSize().GetWidth(); pBox = pLine->GetUpper(); } return nRet; @@ -2379,7 +2379,7 @@ static bool lcl_SetSelBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam, for( auto pBox : rBoxes ) { SwFrameFormat* pFormat = pBox->GetFrameFormat(); - const SwFormatFrmSize& rSz = pFormat->GetFrmSize(); + const SwFormatFrameSize& rSz = pFormat->GetFrameSize(); SwTwips nWidth = rSz.GetWidth(); bool bGreaterBox = false; @@ -2430,7 +2430,7 @@ static bool lcl_SetSelBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam, - rParam.nSide ) < COLFUZZY )) { // This column contains the Cursor - so decrease/increase - SwFormatFrmSize aNew( rSz ); + SwFormatFrameSize aNew( rSz ); if( !nLowerDiff ) { @@ -2477,7 +2477,7 @@ static bool lcl_SetOtherBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam, for( auto pBox : rBoxes ) { SwFrameFormat* pFormat = pBox->GetFrameFormat(); - const SwFormatFrmSize& rSz = pFormat->GetFrmSize(); + const SwFormatFrameSize& rSz = pFormat->GetFrameSize(); SwTwips nWidth = rSz.GetWidth(); if( bCheck ) @@ -2527,7 +2527,7 @@ static bool lcl_SetOtherBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam, : nDist >= rParam.nSide - COLFUZZY) ) ) { - SwFormatFrmSize aNew( rSz ); + SwFormatFrameSize aNew( rSz ); if( !nLowerDiff ) { @@ -2569,7 +2569,7 @@ static bool lcl_InsSelBox( SwTableLine* pLine, CR_SetBoxWidth& rParam, { SwTableBox* pBox = rBoxes[ n ]; SwTableBoxFormat* pFormat = static_cast<SwTableBoxFormat*>(pBox->GetFrameFormat()); - const SwFormatFrmSize& rSz = pFormat->GetFrmSize(); + const SwFormatFrameSize& rSz = pFormat->GetFrameSize(); SwTwips nWidth = rSz.GetWidth(); int nCmp {0}; @@ -2636,7 +2636,7 @@ static bool lcl_InsSelBox( SwTableLine* pLine, CR_SetBoxWidth& rParam, if( !rParam.bSplittBox ) { // the current Box on - SwFormatFrmSize aNew( rSz ); + SwFormatFrameSize aNew( rSz ); aNew.SetWidth( nWidth + rParam.nDiff ); rParam.aShareFormats.SetSize( *pBox, aNew ); } @@ -2652,7 +2652,7 @@ static bool lcl_InsSelBox( SwTableLine* pLine, CR_SetBoxWidth& rParam, pLine, pFormat, pBox, n ); SwTableBox* pNewBox = rBoxes[ n ]; - SwFormatFrmSize aNew( rSz ); + SwFormatFrameSize aNew( rSz ); aNew.SetWidth( rParam.nDiff ); rParam.aShareFormats.SetSize( *pNewBox, aNew ); @@ -2660,7 +2660,7 @@ static bool lcl_InsSelBox( SwTableLine* pLine, CR_SetBoxWidth& rParam, if( rParam.bSplittBox ) { // the current Box on - SwFormatFrmSize aNewSize( rSz ); + SwFormatFrameSize aNewSize( rSz ); aNewSize.SetWidth( nWidth - rParam.nDiff ); rParam.aShareFormats.SetSize( *pBox, aNewSize ); } @@ -2710,7 +2710,7 @@ static bool lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam, SwTwips nTmpDist = nDist; for( auto pBox : rBoxes ) { - SwTwips nWidth = pBox->GetFrameFormat()->GetFrmSize().GetWidth(); + SwTwips nWidth = pBox->GetFrameFormat()->GetFrameSize().GetWidth(); if( (nTmpDist + nWidth / 2 ) > rParam.nSide ) { rParam.nRemainWidth = rParam.bLeft @@ -2726,7 +2726,7 @@ static bool lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam, { SwTableBox* pBox = rBoxes[ n ]; SwFrameFormat* pFormat = pBox->GetFrameFormat(); - const SwFormatFrmSize& rSz = pFormat->GetFrmSize(); + const SwFormatFrameSize& rSz = pFormat->GetFrameSize(); SwTwips nWidth = rSz.GetWidth(); if( bCheck ) @@ -2740,7 +2740,7 @@ static bool lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam, (TBLFIX_CHGABS != rParam.nMode || (n < rBoxes.size() && (nDist + nWidth + rBoxes[ n+1 ]-> - GetFrameFormat()->GetFrmSize().GetWidth() / 2) + GetFrameFormat()->GetFrameSize().GetWidth() / 2) > rParam.nSide) )) : (nDist + nWidth / 2 ) > rParam.nSide ) @@ -2773,7 +2773,7 @@ static bool lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam, pTmpBox = pTmpBox->GetUpper()->GetUpper(); nBoxPos = pTmpBox->GetUpper()->GetTabBoxes().GetPos( pTmpBox ); } - nTmpWidth = pTmpBox->GetFrameFormat()->GetFrmSize().GetWidth(); + nTmpWidth = pTmpBox->GetFrameFormat()->GetFrameSize().GetWidth(); } if( nTmpWidth < nDiff || nTmpWidth - nDiff < MINLAY ) @@ -2800,7 +2800,7 @@ static bool lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam, (TBLFIX_CHGABS != rParam.nMode || (n < rBoxes.size() && (nDist + nWidth + rBoxes[ n+1 ]-> - GetFrameFormat()->GetFrmSize().GetWidth() / 2) + GetFrameFormat()->GetFrameSize().GetWidth() / 2) > rParam.nSide) )) : (nDist + nWidth / 2 ) > rParam.nSide )) { @@ -2817,7 +2817,7 @@ static bool lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam, nLowerDiff = rParam.nDiff; } - SwFormatFrmSize aNew( rSz ); + SwFormatFrameSize aNew( rSz ); rParam.nLowerDiff += nLowerDiff; if( rParam.bBigger ) @@ -2888,7 +2888,7 @@ static void lcl_DelSelBox_CorrLowers( SwTableLine& rLine, CR_SetBoxWidth& rParam SwTwips nBoxWidth = 0; for( auto n = rBoxes.size(); n; ) - nBoxWidth += rBoxes[ --n ]->GetFrameFormat()->GetFrmSize().GetWidth(); + nBoxWidth += rBoxes[ --n ]->GetFrameFormat()->GetFrameSize().GetWidth(); if( COLFUZZY < std::abs( nWidth - nBoxWidth )) { @@ -2896,7 +2896,7 @@ static void lcl_DelSelBox_CorrLowers( SwTableLine& rLine, CR_SetBoxWidth& rParam for( auto n = rBoxes.size(); n; ) { SwTableBox* pBox = rBoxes[ --n ]; - SwFormatFrmSize aNew( pBox->GetFrameFormat()->GetFrmSize() ); + SwFormatFrameSize aNew( pBox->GetFrameFormat()->GetFrameSize() ); long nDiff = aNew.GetWidth(); nDiff *= nWidth; nDiff /= nBoxWidth; @@ -2916,7 +2916,7 @@ static void lcl_DelSelBox_CorrLowers( SwTableLine& rLine, CR_SetBoxWidth& rParam } static void lcl_ChgBoxSize( SwTableBox& rBox, CR_SetBoxWidth& rParam, - const SwFormatFrmSize& rOldSz, + const SwFormatFrameSize& rOldSz, sal_uInt16& rDelWidth, SwTwips nDist ) { long nDiff = 0; @@ -2963,7 +2963,7 @@ static void lcl_ChgBoxSize( SwTableBox& rBox, CR_SetBoxWidth& rParam, if( bSetSize ) { - SwFormatFrmSize aNew( rOldSz ); + SwFormatFrameSize aNew( rOldSz ); aNew.SetWidth( aNew.GetWidth() + nDiff ); rParam.aShareFormats.SetSize( rBox, aNew ); @@ -3046,7 +3046,7 @@ static bool lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam, pBox = rBoxes[ n++ ]; SwFrameFormat* pFormat = pBox->GetFrameFormat(); - const SwFormatFrmSize& rSz = pFormat->GetFrmSize(); + const SwFormatFrameSize& rSz = pFormat->GetFrameSize(); long nWidth = rSz.GetWidth(); bool bDelBox = false, bChgLowers = false; @@ -3209,7 +3209,7 @@ static bool lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam, else { // Or else we need to adapt the Box's size - SwFormatFrmSize aNew( rSz ); + SwFormatFrameSize aNew( rSz ); bool bCorrRel = false; if( TBLVAR_CHGABS != rParam.nMode ) @@ -3297,7 +3297,7 @@ static void lcl_AjustLines( SwTableLine* pLine, CR_SetBoxWidth& rParam ) SwTableBoxes& rBoxes = pLine->GetTabBoxes(); for( auto pBox : rBoxes ) { - SwFormatFrmSize aSz( pBox->GetFrameFormat()->GetFrmSize() ); + SwFormatFrameSize aSz( pBox->GetFrameFormat()->GetFrameSize() ); SwTwips nWidth = aSz.GetWidth(); nWidth *= rParam.nDiff; nWidth /= rParam.nMaxSize; @@ -3319,7 +3319,7 @@ void _CheckBoxWidth( const SwTableLine& rLine, SwTwips nSize ) for (SwTableBoxes::const_iterator i(rBoxes.begin()); i != rBoxes.end(); ++i) { const SwTableBox* pBox = *i; - const SwTwips nBoxW = pBox->GetFrameFormat()->GetFrmSize().GetWidth(); + const SwTwips nBoxW = pBox->GetFrameFormat()->GetFrameSize().GetWidth(); nAktSize += nBoxW; for( auto pLn : pBox->GetTabLines() ) @@ -3373,7 +3373,7 @@ static _FndBox* lcl_SaveInsDelData( CR_SetBoxWidth& rParam, SwUndo** ppUndo, } // Find Lines for the Layout update - pFndBox->DelFrms( rTable ); + pFndBox->DelFrames( rTable ); // TL_CHART2: this function get called from SetColWidth exclusively, // thus it is currently speculated that nothing needs to be done here. @@ -3387,7 +3387,7 @@ bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType, { SetHTMLTableLayout( nullptr ); // Delete HTML Layout - const SwFormatFrmSize& rSz = GetFrameFormat()->GetFrmSize(); + const SwFormatFrameSize& rSz = GetFrameFormat()->GetFrameSize(); const SvxLRSpaceItem& rLR = GetFrameFormat()->GetLRSpace(); std::unique_ptr<_FndBox> xFndBox; // for insertion/deletion @@ -3416,7 +3416,7 @@ bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType, { fnSelBox = lcl_DelSelBox; fnOtherBox = lcl_DelOtherBox; - aParam.nBoxWidth = (sal_uInt16)rAktBox.GetFrameFormat()->GetFrmSize().GetWidth(); + aParam.nBoxWidth = (sal_uInt16)rAktBox.GetFrameFormat()->GetFrameSize().GetWidth(); if( bLeft ) nDistStt = rSz.GetWidth(); } @@ -3512,9 +3512,9 @@ bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType, else if( ppUndo ) *ppUndo = new SwUndoAttrTable( *aParam.pTableNd, true ); - long nFrmWidth = LONG_MAX; + long nFrameWidth = LONG_MAX; LockModify(); - SwFormatFrmSize aSz( rSz ); + SwFormatFrameSize aSz( rSz ); SvxLRSpaceItem aLR( rLR ); if( bBigger ) { @@ -3559,15 +3559,15 @@ bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType, if( GetFrameFormat()->getIDocumentSettingAccess().get(DocumentSettingId::BROWSE_MODE) && !rSz.GetWidthPercent() ) { - SwTabFrm* pTabFrm = SwIterator<SwTabFrm,SwFormat>( *GetFrameFormat() ).First(); - if( pTabFrm && - pTabFrm->Prt().Width() != rSz.GetWidth() ) + SwTabFrame* pTabFrame = SwIterator<SwTabFrame,SwFormat>( *GetFrameFormat() ).First(); + if( pTabFrame && + pTabFrame->Prt().Width() != rSz.GetWidth() ) { - nFrmWidth = pTabFrm->Prt().Width(); + nFrameWidth = pTabFrame->Prt().Width(); if( bBigger ) - nFrmWidth += nAbsDiff; + nFrameWidth += nAbsDiff; else - nFrmWidth -= nAbsDiff; + nFrameWidth -= nAbsDiff; } } } @@ -3596,10 +3596,10 @@ bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType, // If the Table happens to contain relative values (USHORT_MAX), // we need to convert them to absolute ones now. // Bug 61494 - if( LONG_MAX != nFrmWidth ) + if( LONG_MAX != nFrameWidth ) { - SwFormatFrmSize aAbsSz( aSz ); - aAbsSz.SetWidth( nFrmWidth ); + SwFormatFrameSize aAbsSz( aSz ); + aAbsSz.SetWidth( nFrameWidth ); GetFrameFormat()->SetFormatAttr( aAbsSz ); } } @@ -3644,7 +3644,7 @@ bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType, bRet = false; } - if( !bRet && rAktBox.GetFrameFormat()->GetFrmSize().GetWidth() + if( !bRet && rAktBox.GetFrameFormat()->GetFrameSize().GetWidth() - nRelDiff > COLFUZZY + ( 567 / 2 /*leave room for at least 0.5 cm*/) ) { @@ -3775,7 +3775,7 @@ bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType, aParam.nMaxSize = aParam.nSide; else aParam.nMaxSize = pLine->GetUpper()->GetFrameFormat()-> - GetFrmSize().GetWidth() - aParam.nSide; + GetFrameSize().GetWidth() - aParam.nSide; } // First, see if there is enough room at all @@ -3791,7 +3791,7 @@ bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType, } if( !bRet && !aParam.bBigger && rAktBox.GetFrameFormat()-> - GetFrmSize().GetWidth() - nRelDiff > COLFUZZY + + GetFrameSize().GetWidth() - nRelDiff > COLFUZZY + ( 567 / 2 /*leave room for at least 0.5 cm*/) ) { // Consume the room from the current Cell @@ -3846,7 +3846,7 @@ bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType, // Update Layout if( !bBigger || xFndBox->AreLinesToRestore( *this ) ) - xFndBox->MakeFrms( *this ); + xFndBox->MakeFrames( *this ); // TL_CHART2: it is currently unclear if sth has to be done here. // The function name hints that nothing needs to be done, on the other @@ -3902,7 +3902,7 @@ static _FndBox* lcl_SaveInsDelData( CR_SetLineHeight& rParam, SwUndo** ppUndo, } // Find Lines for the Layout update - pFndBox->DelFrms( rTable ); + pFndBox->DelFrames( rTable ); // TL_CHART2: it is currently unclear if sth has to be done here. @@ -3912,12 +3912,12 @@ static _FndBox* lcl_SaveInsDelData( CR_SetLineHeight& rParam, SwUndo** ppUndo, void SetLineHeight( SwTableLine& rLine, SwTwips nOldHeight, SwTwips nNewHeight, bool bMinSize ) { - SwLayoutFrm* pLineFrm = GetRowFrm( rLine ); - OSL_ENSURE( pLineFrm, "Where is the Frame from the SwTableLine?" ); + SwLayoutFrame* pLineFrame = GetRowFrame( rLine ); + OSL_ENSURE( pLineFrame, "Where is the Frame from the SwTableLine?" ); SwFrameFormat* pFormat = rLine.ClaimFrameFormat(); - SwTwips nMyNewH, nMyOldH = pLineFrm->Frm().Height(); + SwTwips nMyNewH, nMyOldH = pLineFrame->Frame().Height(); if( !nOldHeight ) // the BaseLine and absolute nMyNewH = nMyOldH + nNewHeight; else @@ -3929,12 +3929,12 @@ void SetLineHeight( SwTableLine& rLine, SwTwips nOldHeight, SwTwips nNewHeight, nMyNewH = aTmp; } - SwFrmSize eSize = ATT_MIN_SIZE; + SwFrameSize eSize = ATT_MIN_SIZE; if( !bMinSize && - ( nMyOldH - nMyNewH ) > ( CalcRowRstHeight( pLineFrm ) + ROWFUZZY )) + ( nMyOldH - nMyNewH ) > ( CalcRowRstHeight( pLineFrame ) + ROWFUZZY )) eSize = ATT_FIX_SIZE; - pFormat->SetFormatAttr( SwFormatFrmSize( eSize, 0, nMyNewH ) ); + pFormat->SetFormatAttr( SwFormatFrameSize( eSize, 0, nMyNewH ) ); // First adapt all internal ones for( auto pBox : rLine.GetTabBoxes() ) @@ -3957,9 +3957,9 @@ static bool lcl_SetSelLineHeight( SwTableLine* pLine, CR_SetLineHeight& rParam, else if( !rParam.bBigger ) { // Calculate the new relative size by means of the old one - SwLayoutFrm* pLineFrm = GetRowFrm( *pLine ); - OSL_ENSURE( pLineFrm, "Where is the Frame from the SwTableLine?" ); - SwTwips nRstHeight = CalcRowRstHeight( pLineFrm ); + SwLayoutFrame* pLineFrame = GetRowFrame( *pLine ); + OSL_ENSURE( pLineFrame, "Where is the Frame from the SwTableLine?" ); + SwTwips nRstHeight = CalcRowRstHeight( pLineFrame ); if( (nRstHeight + ROWFUZZY) < nDist ) bRet = false; } @@ -3975,15 +3975,15 @@ static bool lcl_SetOtherLineHeight( SwTableLine* pLine, CR_SetLineHeight& rParam if( rParam.bBigger ) { // Calculate the new relative size by means of the old one - SwLayoutFrm* pLineFrm = GetRowFrm( *pLine ); - OSL_ENSURE( pLineFrm, "Where is the Frame from the SwTableLine?" ); + SwLayoutFrame* pLineFrame = GetRowFrame( *pLine ); + OSL_ENSURE( pLineFrame, "Where is the Frame from the SwTableLine?" ); if( TBLFIX_CHGPROP == rParam.nMode ) { - nDist *= pLineFrm->Frm().Height(); + nDist *= pLineFrame->Frame().Height(); nDist /= rParam.nMaxHeight; } - bRet = nDist <= CalcRowRstHeight( pLineFrm ); + bRet = nDist <= CalcRowRstHeight( pLineFrame ); } } else @@ -3992,21 +3992,21 @@ static bool lcl_SetOtherLineHeight( SwTableLine* pLine, CR_SetLineHeight& rParam // pLine is the following/preceding, thus adjust it if( TBLFIX_CHGPROP == rParam.nMode ) { - SwLayoutFrm* pLineFrm = GetRowFrm( *pLine ); - OSL_ENSURE( pLineFrm, "Where is the Frame from the SwTableLine??" ); + SwLayoutFrame* pLineFrame = GetRowFrame( *pLine ); + OSL_ENSURE( pLineFrame, "Where is the Frame from the SwTableLine??" ); // Calculate the new relative size by means of the old one // If the selected Box get bigger, adjust via the max space else // via the max height. if( true /*!rParam.bBigger*/ ) { - nDist *= pLineFrm->Frm().Height(); + nDist *= pLineFrame->Frame().Height(); nDist /= rParam.nMaxHeight; } else { // Calculate the new relative size by means of the old one - nDist *= CalcRowRstHeight( pLineFrm ); + nDist *= CalcRowRstHeight( pLineFrame ); nDist /= rParam.nMaxSpace; } } @@ -4055,7 +4055,7 @@ static bool lcl_InsDelSelLine( SwTableLine* pLine, CR_SetLineHeight& rParam, pLines->insert( pLines->begin() + nPos, pNewLine ); SwFrameFormat* pNewFormat = pNewLine->ClaimFrameFormat(); - pNewFormat->SetFormatAttr( SwFormatFrmSize( ATT_MIN_SIZE, 0, nDist ) ); + pNewFormat->SetFormatAttr( SwFormatFrameSize( ATT_MIN_SIZE, 0, nDist ) ); // And once again calculate the Box count SwTableBoxes& rNewBoxes = pNewLine->GetTabBoxes(); @@ -4066,7 +4066,7 @@ static bool lcl_InsDelSelLine( SwTableLine* pLine, CR_SetLineHeight& rParam, if( !pOld->GetSttNd() ) { // Not a normal content Box, so fall back to the 1st next Box - nWidth = pOld->GetFrameFormat()->GetFrmSize().GetWidth(); + nWidth = pOld->GetFrameFormat()->GetFrameSize().GetWidth(); while( !pOld->GetSttNd() ) pOld = pOld->GetTabLines()[ 0 ]->GetTabBoxes()[ 0 ]; } @@ -4087,7 +4087,7 @@ static bool lcl_InsDelSelLine( SwTableLine* pLine, CR_SetLineHeight& rParam, if( nWidth ) rParam.aShareFormats.SetAttr( *rNewBoxes[ n ], - SwFormatFrmSize( ATT_FIX_SIZE, nWidth, 0 ) ); + SwFormatFrameSize( ATT_FIX_SIZE, nWidth, 0 ) ); } } } @@ -4166,7 +4166,7 @@ bool SwTable::SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType, { if( bInsDel && !bBigger ) // By how much does it get higher? { - nAbsDiff = GetRowFrm( *pBaseLine )->Frm().Height(); + nAbsDiff = GetRowFrame( *pBaseLine )->Frame().Height(); } if( TBLVAR_CHGABS == m_eTableChgMode ) @@ -4225,10 +4225,10 @@ bool SwTable::SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType, { for( auto n = nStt; n < nEnd; ++n ) { - SwLayoutFrm* pLineFrm = GetRowFrm( *(*pLines)[ n ] ); - OSL_ENSURE( pLineFrm, "Where is the Frame from the SwTableLine??" ); - aParam.nMaxSpace += CalcRowRstHeight( pLineFrm ); - aParam.nMaxHeight += pLineFrm->Frm().Height(); + SwLayoutFrame* pLineFrame = GetRowFrame( *(*pLines)[ n ] ); + OSL_ENSURE( pLineFrame, "Where is the Frame from the SwTableLine??" ); + aParam.nMaxSpace += CalcRowRstHeight( pLineFrame ); + aParam.nMaxHeight += pLineFrame->Frame().Height(); } if( bBigger && aParam.nMaxSpace < nAbsDiff ) bRet = false; @@ -4334,7 +4334,7 @@ bool SwTable::SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType, // Update Layout if( bBigger || xFndBox->AreLinesToRestore( *this ) ) - xFndBox->MakeFrms( *this ); + xFndBox->MakeFrames( *this ); // TL_CHART2: it is currently unclear if sth has to be done here. @@ -4358,7 +4358,7 @@ SwFrameFormat* SwShareBoxFormat::GetFormat( long nWidth ) const { SwFrameFormat *pRet = nullptr, *pTmp; for( auto n = aNewFormats.size(); n; ) - if( ( pTmp = aNewFormats[ --n ])->GetFrmSize().GetWidth() + if( ( pTmp = aNewFormats[ --n ])->GetFrameSize().GetWidth() == nWidth ) { pRet = pTmp; @@ -4372,11 +4372,11 @@ SwFrameFormat* SwShareBoxFormat::GetFormat( const SfxPoolItem& rItem ) const const SfxPoolItem* pItem; sal_uInt16 nWhich = rItem.Which(); SwFrameFormat *pRet = nullptr, *pTmp; - const SfxPoolItem& rFrmSz = pOldFormat->GetFormatAttr( RES_FRM_SIZE, false ); + const SfxPoolItem& rFrameSz = pOldFormat->GetFormatAttr( RES_FRM_SIZE, false ); for( auto n = aNewFormats.size(); n; ) if( SfxItemState::SET == ( pTmp = aNewFormats[ --n ])-> GetItemState( nWhich, false, &pItem ) && *pItem == rItem && - pTmp->GetFormatAttr( RES_FRM_SIZE, false ) == rFrmSz ) + pTmp->GetFormatAttr( RES_FRM_SIZE, false ) == rFrameSz ) { pRet = pTmp; break; @@ -4462,7 +4462,7 @@ void SwShareBoxFormats::ChangeFrameFormat( SwTableBox* pBox, SwTableLine* pLn, } } -void SwShareBoxFormats::SetSize( SwTableBox& rBox, const SwFormatFrmSize& rSz ) +void SwShareBoxFormats::SetSize( SwTableBox& rBox, const SwFormatFrameSize& rSz ) { SwFrameFormat *pBoxFormat = rBox.GetFrameFormat(), *pRet = GetFormat( *pBoxFormat, rSz.GetWidth() ); diff --git a/sw/source/core/doc/textboxhelper.cxx b/sw/source/core/doc/textboxhelper.cxx index 4c89861a2c41..33c3ad0b4c16 100644 --- a/sw/source/core/doc/textboxhelper.cxx +++ b/sw/source/core/doc/textboxhelper.cxx @@ -152,13 +152,13 @@ std::set<const SwFrameFormat*> SwTextBoxHelper::findTextBoxes(const SwNode& rNod { const SwDoc* pDoc = rNode.GetDoc(); const SwContentNode* pContentNode = nullptr; - const SwContentFrm* pContentFrm = nullptr; + const SwContentFrame* pContentFrame = nullptr; bool bHaveViewShell = pDoc->getIDocumentLayoutAccess().GetCurrentViewShell(); - if (bHaveViewShell && (pContentNode = rNode.GetContentNode()) && (pContentFrm = pContentNode->getLayoutFrm(pDoc->getIDocumentLayoutAccess().GetCurrentLayout()))) + if (bHaveViewShell && (pContentNode = rNode.GetContentNode()) && (pContentFrame = pContentNode->getLayoutFrame(pDoc->getIDocumentLayoutAccess().GetCurrentLayout()))) { // We can use the layout information to iterate over only the frames which are anchored to us. std::set<const SwFrameFormat*> aRet; - const SwSortedObjs* pSortedObjs = pContentFrm->GetDrawObjs(); + const SwSortedObjs* pSortedObjs = pContentFrame->GetDrawObjs(); if (pSortedObjs) { for (size_t i = 0; i < pSortedObjs->size(); ++i) @@ -620,7 +620,7 @@ void SwTextBoxHelper::restoreLinks(std::set<_ZSortFly>& rOld, std::vector<SwFram } } -void SwTextBoxHelper::syncFlyFrmAttr(SwFrameFormat& rShape, SfxItemSet& rSet) +void SwTextBoxHelper::syncFlyFrameAttr(SwFrameFormat& rShape, SfxItemSet& rSet) { if (SwFrameFormat* pFormat = findTextBox(&rShape)) { @@ -644,7 +644,7 @@ void SwTextBoxHelper::syncFlyFrmAttr(SwFrameFormat& rShape, SfxItemSet& rSet) aTextBoxSet.Put(aOrient); // restore height (shrinked for extending beyond the page bottom - tdf#91260) - SwFormatFrmSize aSize(pFormat->GetFrmSize()); + SwFormatFrameSize aSize(pFormat->GetFrameSize()); if (!aRect.IsEmpty()) { aSize.SetHeight(aRect.getHeight()); @@ -672,7 +672,7 @@ void SwTextBoxHelper::syncFlyFrmAttr(SwFrameFormat& rShape, SfxItemSet& rSet) // textbox). SwFormatVertOrient aVertOrient(rShape.GetVertOrient()); SwFormatHoriOrient aHoriOrient(rShape.GetHoriOrient()); - SwFormatFrmSize aSize(pFormat->GetFrmSize()); + SwFormatFrameSize aSize(pFormat->GetFrameSize()); Rectangle aRect = getTextRectangle(&rShape, /*bAbsolute=*/false); if (!aRect.IsEmpty()) @@ -690,7 +690,7 @@ void SwTextBoxHelper::syncFlyFrmAttr(SwFrameFormat& rShape, SfxItemSet& rSet) } break; default: - SAL_WARN("sw.core", "SwTextBoxHelper::syncFlyFrmAttr: unhandled which-id: " << nWhich); + SAL_WARN("sw.core", "SwTextBoxHelper::syncFlyFrameAttr: unhandled which-id: " << nWhich); break; } @@ -700,7 +700,7 @@ void SwTextBoxHelper::syncFlyFrmAttr(SwFrameFormat& rShape, SfxItemSet& rSet) while (0 != (nWhich = aIter.NextItem()->Which())); if (aTextBoxSet.Count()) - pFormat->GetDoc()->SetFlyFrmAttr(*pFormat, aTextBoxSet); + pFormat->GetDoc()->SetFlyFrameAttr(*pFormat, aTextBoxSet); } } diff --git a/sw/source/core/docnode/ndcopy.cxx b/sw/source/core/docnode/ndcopy.cxx index 673852c3db89..61c64da53c9d 100644 --- a/sw/source/core/docnode/ndcopy.cxx +++ b/sw/source/core/docnode/ndcopy.cxx @@ -309,7 +309,7 @@ SwTableNode* SwTableNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const // Delete all frames from the copied area, they will be created // during the generation of the table frame - pTableNd->DelFrms(); + pTableNd->DelFrames(); _MapTableFrameFormats aMapArr; _CopyTable aPara( pDoc, aMapArr, GetIndex(), *pTableNd, &GetTable() ); diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx index 4c9d515246cf..e9d44141fbf5 100644 --- a/sw/source/core/docnode/ndsect.cxx +++ b/sw/source/core/docnode/ndsect.cxx @@ -130,7 +130,7 @@ static bool lcl_IsInSameTableBox( SwNodes& _rNds, return true; } -static void lcl_CheckEmptyLayFrm( SwNodes& rNds, SwSectionData& rSectionData, +static void lcl_CheckEmptyLayFrame( SwNodes& rNds, SwSectionData& rSectionData, const SwNode& rStt, const SwNode& rEnd ) { SwNodeIndex aIdx( rStt ); @@ -174,7 +174,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData, pEnd->nNode.GetNode().GetContentNode()->Len() == pEnd->nContent.GetIndex() ) { - ::lcl_CheckEmptyLayFrm( GetNodes(), + ::lcl_CheckEmptyLayFrame( GetNodes(), rNewData, pStt->nNode.GetNode(), pEnd->nNode.GetNode() ); @@ -667,7 +667,7 @@ void SwDoc::UpdateSection( size_t const nPos, SwSectionData & rNewData, pIdx->GetNode().GetSectionNode(); if (pSectNd) { - ::lcl_CheckEmptyLayFrm( GetNodes(), rNewData, + ::lcl_CheckEmptyLayFrame( GetNodes(), rNewData, *pSectNd, *pSectNd->EndOfSectionNode() ); } } @@ -762,8 +762,8 @@ void sw_DeleteFootnote( SwSectionNode *pNd, sal_uLong nStt, sal_uLong nEnd ) _SwTextFootnote_GetIndex( (pSrch = rFootnoteArr[ nPos ]) ) <= nEnd ) { // If the Nodes are not deleted, they need to deregister at the Pages - // (delete Frms) or else they will remain there (Undo does not delete them!) - pSrch->DelFrms(nullptr); + // (delete Frames) or else they will remain there (Undo does not delete them!) + pSrch->DelFrames(nullptr); ++nPos; } @@ -771,8 +771,8 @@ void sw_DeleteFootnote( SwSectionNode *pNd, sal_uLong nStt, sal_uLong nEnd ) _SwTextFootnote_GetIndex( (pSrch = rFootnoteArr[ nPos ]) ) >= nStt ) { // If the Nodes are not deleted, they need to deregister at the Pages - // (delete Frms) or else they will remain there (Undo does not delete them!) - pSrch->DelFrms(nullptr); + // (delete Frames) or else they will remain there (Undo does not delete them!) + pSrch->DelFrames(nullptr); } } } @@ -788,7 +788,7 @@ SwSectionNode* SwNodes::InsertTextSection(SwNodeIndex const& rNdIdx, SwSectionData const& rSectionData, SwTOXBase const*const pTOXBase, SwNodeIndex const*const pEnde, - bool const bInsAtStart, bool const bCreateFrms) + bool const bInsAtStart, bool const bCreateFrames) { SwNodeIndex aInsPos( rNdIdx ); if( !pEnde ) // No Area, thus create a new Section before/after it @@ -882,7 +882,7 @@ SwSectionNode* SwNodes::InsertTextSection(SwNodeIndex const& rNdIdx, pTNd->SetAttr( rSet ); } // Do not forget to create the Frame! - pCpyTNd->MakeFrms( *pTNd ); + pCpyTNd->MakeFrames( *pTNd ); } else new SwTextNode( aInsPos, GetDoc()->GetDfltTextFormatColl() ); @@ -894,13 +894,13 @@ SwSectionNode* SwNodes::InsertTextSection(SwNodeIndex const& rNdIdx, // We could optimize this, by not removing already contained Frames and recreating them, // but by simply rewiring them - bool bInsFrm = bCreateFrms && !pSectNd->GetSection().IsHidden() && + bool bInsFrame = bCreateFrames && !pSectNd->GetSection().IsHidden() && GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell(); SwNode2Layout *pNode2Layout = nullptr; - if( bInsFrm ) + if( bInsFrame ) { SwNodeIndex aTmp( *pSectNd ); - if( !pSectNd->GetNodes().FindPrvNxtFrmNode( aTmp, pSectNd->EndOfSectionNode() ) ) + if( !pSectNd->GetNodes().FindPrvNxtFrameNode( aTmp, pSectNd->EndOfSectionNode() ) ) // Collect all Uppers pNode2Layout = new SwNode2Layout( *pSectNd ); } @@ -926,34 +926,34 @@ SwSectionNode* SwNodes::InsertTextSection(SwNodeIndex const& rNdIdx, { static_cast<SwSectionNode*>(pNd)->GetSection().GetFormat()-> SetDerivedFrom( pSectFormat ); - static_cast<SwSectionNode*>(pNd)->DelFrms(); + static_cast<SwSectionNode*>(pNd)->DelFrames(); n = pNd->EndOfSectionIndex(); } else { if( pNd->IsTableNode() ) - static_cast<SwTableNode*>(pNd)->DelFrms(); + static_cast<SwTableNode*>(pNd)->DelFrames(); if( ULONG_MAX == nSkipIdx ) nSkipIdx = pNd->EndOfSectionIndex(); } } else if( pNd->IsContentNode() ) - static_cast<SwContentNode*>(pNd)->DelFrms(); + static_cast<SwContentNode*>(pNd)->DelFrames(); } sw_DeleteFootnote( pSectNd, nStart, nEnde ); - if( bInsFrm ) + if( bInsFrame ) { if( pNode2Layout ) { sal_uLong nIdx = pSectNd->GetIndex(); - pNode2Layout->RestoreUpperFrms( pSectNd->GetNodes(), nIdx, nIdx + 1 ); + pNode2Layout->RestoreUpperFrames( pSectNd->GetNodes(), nIdx, nIdx + 1 ); delete pNode2Layout; } else - pSectNd->MakeFrms( &aInsPos ); + pSectNd->MakeFrames( &aInsPos ); } return pSectNd; @@ -1004,7 +1004,7 @@ SwSectionNode::~SwSectionNode() { // mba: test if iteration works as clients will be removed in callback // use hint which allows to specify, if the content shall be saved or not - m_pSection->GetFormat()->CallSwClientNotify( SwSectionFrmMoveAndDeleteHint( true ) ); + m_pSection->GetFormat()->CallSwClientNotify( SwSectionFrameMoveAndDeleteHint( true ) ); SwSectionFormat* pFormat = m_pSection->GetFormat(); if( pFormat ) { @@ -1016,15 +1016,15 @@ SwSectionNode::~SwSectionNode() } } -SwFrm *SwSectionNode::MakeFrm( SwFrm *pSib ) +SwFrame *SwSectionNode::MakeFrame( SwFrame *pSib ) { m_pSection->m_Data.SetHiddenFlag(false); - return new SwSectionFrm( *m_pSection, pSib ); + return new SwSectionFrame( *m_pSection, pSib ); } // Creates all Document Views for the precedeing Node. // The created ContentFrames are attached to the corresponding Layout -void SwSectionNode::MakeFrms(const SwNodeIndex & rIdx ) +void SwSectionNode::MakeFrames(const SwNodeIndex & rIdx ) { // Take my succsessive or preceding ContentFrame SwNodes& rNds = GetNodes(); @@ -1042,16 +1042,16 @@ void SwSectionNode::MakeFrms(const SwNodeIndex & rIdx ) return; } pCNd = aIdx.GetNode().GetContentNode(); - pCNd->MakeFrms( static_cast<SwContentNode&>(rIdx.GetNode()) ); + pCNd->MakeFrames( static_cast<SwContentNode&>(rIdx.GetNode()) ); } else { SwNode2Layout aNode2Layout( *this, rIdx.GetIndex() ); - SwFrm *pFrm; - while( nullptr != (pFrm = aNode2Layout.NextFrm()) ) + SwFrame *pFrame; + while( nullptr != (pFrame = aNode2Layout.NextFrame()) ) { - OSL_ENSURE( pFrm->IsSctFrm(), "Depend of Section not a Section." ); - SwFrm *pNew = rIdx.GetNode().GetContentNode()->MakeFrm( pFrm ); + OSL_ENSURE( pFrame->IsSctFrame(), "Depend of Section not a Section." ); + SwFrame *pNew = rIdx.GetNode().GetContentNode()->MakeFrame( pFrame ); SwSectionNode* pS = rIdx.GetNode().FindSectionNode(); @@ -1073,14 +1073,14 @@ void SwSectionNode::MakeFrms(const SwNodeIndex & rIdx ) bool bInitNewSect = false; if( pS ) { - SwSectionFrm *pSct = new SwSectionFrm( pS->GetSection(), pFrm ); + SwSectionFrame *pSct = new SwSectionFrame( pS->GetSection(), pFrame ); // prepare <Init()> of new section frame. bInitNewSect = true; - SwLayoutFrm* pUp = pSct; + SwLayoutFrame* pUp = pSct; while( pUp->Lower() ) // for columned sections { - OSL_ENSURE( pUp->Lower()->IsLayoutFrm(),"Who's in there?" ); - pUp = static_cast<SwLayoutFrm*>(pUp->Lower()); + OSL_ENSURE( pUp->Lower()->IsLayoutFrame(),"Who's in there?" ); + pUp = static_cast<SwLayoutFrame*>(pUp->Lower()); } pNew->Paste( pUp ); // #i27138# @@ -1088,15 +1088,15 @@ void SwSectionNode::MakeFrms(const SwNodeIndex & rIdx ) // CONTENT_FLOWS_FROM/_TO relation. // Relation CONTENT_FLOWS_FROM for next paragraph will change // and relation CONTENT_FLOWS_TO for previous paragraph will change. - if ( pNew->IsTextFrm() ) + if ( pNew->IsTextFrame() ) { - SwViewShell* pViewShell( pNew->getRootFrm()->GetCurrShell() ); + SwViewShell* pViewShell( pNew->getRootFrame()->GetCurrShell() ); if ( pViewShell && pViewShell->GetLayout() && pViewShell->GetLayout()->IsAnyShellAccessible() ) { pViewShell->InvalidateAccessibleParaFlowRelation( - dynamic_cast<SwTextFrm*>(pNew->FindNextCnt( true )), - dynamic_cast<SwTextFrm*>(pNew->FindPrevCnt( true )) ); + dynamic_cast<SwTextFrame*>(pNew->FindNextCnt( true )), + dynamic_cast<SwTextFrame*>(pNew->FindPrevCnt( true )) ); } } pNew = pSct; @@ -1105,36 +1105,36 @@ void SwSectionNode::MakeFrms(const SwNodeIndex & rIdx ) // If a Node got Frames attached before or after if ( rIdx < GetIndex() ) // the new one precedes me - pNew->Paste( pFrm->GetUpper(), pFrm ); + pNew->Paste( pFrame->GetUpper(), pFrame ); else // the new one succeeds me - pNew->Paste( pFrm->GetUpper(), pFrm->GetNext() ); + pNew->Paste( pFrame->GetUpper(), pFrame->GetNext() ); // #i27138# // notify accessibility paragraphs objects about changed // CONTENT_FLOWS_FROM/_TO relation. // Relation CONTENT_FLOWS_FROM for next paragraph will change // and relation CONTENT_FLOWS_TO for previous paragraph will change. - if ( pNew->IsTextFrm() ) + if ( pNew->IsTextFrame() ) { - SwViewShell* pViewShell( pNew->getRootFrm()->GetCurrShell() ); + SwViewShell* pViewShell( pNew->getRootFrame()->GetCurrShell() ); if ( pViewShell && pViewShell->GetLayout() && pViewShell->GetLayout()->IsAnyShellAccessible() ) { pViewShell->InvalidateAccessibleParaFlowRelation( - dynamic_cast<SwTextFrm*>(pNew->FindNextCnt( true )), - dynamic_cast<SwTextFrm*>(pNew->FindPrevCnt( true )) ); + dynamic_cast<SwTextFrame*>(pNew->FindNextCnt( true )), + dynamic_cast<SwTextFrame*>(pNew->FindPrevCnt( true )) ); } } if ( bInitNewSect ) - static_cast<SwSectionFrm*>(pNew)->Init(); + static_cast<SwSectionFrame*>(pNew)->Init(); } } } } -// Create a new SectionFrm for every occurrence in the Layout and insert before -// the corresponding ContentFrm -void SwSectionNode::MakeFrms( SwNodeIndex* pIdxBehind, SwNodeIndex* pEndIdx ) +// Create a new SectionFrame for every occurrence in the Layout and insert before +// the corresponding ContentFrame +void SwSectionNode::MakeFrames( SwNodeIndex* pIdxBehind, SwNodeIndex* pEndIdx ) { OSL_ENSURE( pIdxBehind, "no Index" ); SwNodes& rNds = GetNodes(); @@ -1148,13 +1148,13 @@ void SwSectionNode::MakeFrms( SwNodeIndex* pIdxBehind, SwNodeIndex* pEndIdx ) { SwNodeIndex *pEnd = pEndIdx ? pEndIdx : new SwNodeIndex( *EndOfSectionNode(), 1 ); - ::MakeFrms( pDoc, *pIdxBehind, *pEnd ); + ::MakeFrames( pDoc, *pIdxBehind, *pEnd ); if( !pEndIdx ) delete pEnd; } } -void SwSectionNode::DelFrms() +void SwSectionNode::DelFrames() { sal_uLong nStt = GetIndex()+1, nEnd = EndOfSectionIndex(); if( nStt >= nEnd ) @@ -1163,7 +1163,7 @@ void SwSectionNode::DelFrms() } SwNodes& rNds = GetNodes(); - m_pSection->GetFormat()->DelFrms(); + m_pSection->GetFormat()->DelFrames(); // Update our Flag m_pSection->m_Data.SetHiddenFlag(true); @@ -1246,7 +1246,7 @@ SwSectionNode* SwSectionNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) c // Delete all Frames from the copied Area. They are created when creating // the SectionFrames. - pSectNd->DelFrms(); + pSectNd->DelFrames(); // Copy the Links/Server if( pNewSect->IsLinkType() ) // Add the Link diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index 076d43ef009e..e5d68c8752f3 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -184,7 +184,7 @@ static SwTableBoxFormat *lcl_CreateDfltBoxFormat( SwDoc &rDoc, std::vector<SwTab { SwTableBoxFormat* pBoxFormat = rDoc.MakeTableBoxFormat(); if( USHRT_MAX != nCols ) - pBoxFormat->SetFormatAttr( SwFormatFrmSize( ATT_VAR_SIZE, + pBoxFormat->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, USHRT_MAX / nCols, 0 )); ::lcl_SetDfltBoxAttr( *pBoxFormat, nId ); rBoxFormatArr[ nId ] = pBoxFormat; @@ -203,7 +203,7 @@ static SwTableBoxFormat *lcl_CreateAFormatBoxFormat( SwDoc &rDoc, std::vector<Sw SwTableAutoFormat::UPDATE_BOX, rDoc.GetNumberFormatter( ) ); if( USHRT_MAX != nCols ) - pBoxFormat->SetFormatAttr( SwFormatFrmSize( ATT_VAR_SIZE, + pBoxFormat->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, USHRT_MAX / nCols, 0 )); rBoxFormatArr[ nId ] = pBoxFormat; } @@ -421,9 +421,9 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTableOpts, sal_uInt16 nLastPos = pColArr->back(); if( text::HoriOrientation::NONE == eAdjust ) { - sal_uInt16 nFrmWidth = nLastPos; + sal_uInt16 nFrameWidth = nLastPos; nLastPos = (*pColArr)[ pColArr->size()-2 ]; - pTableFormat->SetFormatAttr( SvxLRSpaceItem( nSttPos, nFrmWidth - nLastPos, 0, 0, RES_LR_SPACE ) ); + pTableFormat->SetFormatAttr( SvxLRSpaceItem( nSttPos, nFrameWidth - nLastPos, 0, 0, RES_LR_SPACE ) ); } nWidth = nLastPos - nSttPos; } @@ -432,7 +432,7 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTableOpts, nWidth /= nCols; nWidth *= nCols; // to avoid rounding problems } - pTableFormat->SetFormatAttr( SwFormatFrmSize( ATT_VAR_SIZE, nWidth )); + pTableFormat->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, nWidth )); if( !(rInsTableOpts.mnInsMode & tabopts::SPLIT_LAYOUT) ) pTableFormat->SetFormatAttr( SwFormatLayoutSplit( false )); @@ -469,7 +469,7 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTableOpts, if( !bDfltBorders && !pTAFormat ) { pBoxFormat = MakeTableBoxFormat(); - pBoxFormat->SetFormatAttr( SwFormatFrmSize( ATT_VAR_SIZE, USHRT_MAX / nCols, 0 )); + pBoxFormat->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, USHRT_MAX / nCols, 0 )); } else { @@ -521,7 +521,7 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTableOpts, if( pColArr ) { nWidth = (*pColArr)[ i + 1 ] - (*pColArr)[ i ]; - if( pBoxF->GetFrmSize().GetWidth() != nWidth ) + if( pBoxF->GetFrameSize().GetWidth() != nWidth ) { if( pBoxF->HasWriterListeners() ) // Create new Format { @@ -529,7 +529,7 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTableOpts, *pNewFormat = *pBoxF; pBoxF = pNewFormat; } - pBoxF->SetFormatAttr( SwFormatFrmSize( ATT_VAR_SIZE, nWidth )); + pBoxF->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, nWidth )); } } @@ -538,9 +538,9 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTableOpts, aNdIdx += 3; // StartNode, TextNode, EndNode == 3 Nodes } } - // Insert Frms + // Insert Frames GetNodes().GoNext( &aNdIdx ); // Go to the next ContentNode - pTableNd->MakeFrms( &aNdIdx ); + pTableNd->MakeFrames( &aNdIdx ); // To-Do - add 'SwExtraRedlineTable' also ? if( getIDocumentRedlineAccess().IsRedlineOn() || (!getIDocumentRedlineAccess().IsIgnoreRedline() && !getIDocumentRedlineAccess().GetRedlineTable().empty() )) @@ -700,7 +700,7 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTableOpts, // All Lines have a left-to-right Fill Order pLineFormat->SetFormatAttr( SwFormatFillOrder( ATT_LEFT_TO_RIGHT )); // The Table's SSize is USHRT_MAX - pTableFormat->SetFormatAttr( SwFormatFrmSize( ATT_VAR_SIZE, USHRT_MAX )); + pTableFormat->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, USHRT_MAX )); if( !(rInsTableOpts.mnInsMode & tabopts::SPLIT_LAYOUT) ) pTableFormat->SetFormatAttr( SwFormatLayoutSplit( false )); @@ -737,7 +737,7 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTableOpts, // The Box's Formats already have the right size, we must only set // the right Border/AutoFormat. bUseBoxFormat = true; - pTableFormat->SetFormatAttr( pBoxFormat->GetFrmSize() ); + pTableFormat->SetFormatAttr( pBoxFormat->GetFrameSize() ); delete pBoxFormat; eAdjust = text::HoriOrientation::NONE; } @@ -833,7 +833,7 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTableOpts, if( !bUseBoxFormat ) { if( bChgSz ) - pBoxF->SetFormatAttr( pBox->GetFrameFormat()->GetFrmSize() ); + pBoxF->SetFormatAttr( pBox->GetFrameFormat()->GetFrameSize() ); pBox->ChgFrameFormat( pBoxF ); } } @@ -858,7 +858,7 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTableOpts, } sal_uLong nIdx = pTableNd->GetIndex(); - aNode2Layout.RestoreUpperFrms( GetNodes(), nIdx, nIdx + 1 ); + aNode2Layout.RestoreUpperFrames( GetNodes(), nIdx, nIdx + 1 ); { SwPaM& rTmp = (SwPaM&)rRange; // Point always at the Start @@ -881,7 +881,7 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTableOpts, static void lcl_RemoveBreaks(SwContentNode & rNode, SwTableFormat *const pTableFormat) { // delete old layout frames, new ones need to be created... - rNode.DelFrms(); + rNode.DelFrames(); if (!rNode.IsTextNode()) { @@ -964,7 +964,7 @@ lcl_SetTableBoxWidths(SwTable & rTable, size_t const nMaxBoxes, { SwTableBoxFormat *pNewFormat = rDoc.MakeTableBoxFormat(); pNewFormat->SetFormatAttr( - SwFormatFrmSize(ATT_VAR_SIZE, (*pPositions)[n] - nLastPos)); + SwFormatFrameSize(ATT_VAR_SIZE, (*pPositions)[n] - nLastPos)); for (size_t nTmpLine = 0; nTmpLine < rLns.size(); ++nTmpLine) { // Have to do an Add here, because the BoxFormat @@ -978,12 +978,12 @@ lcl_SetTableBoxWidths(SwTable & rTable, size_t const nMaxBoxes, // propagate size upwards from format, so the table gets the right size SAL_WARN_IF(rBoxFormat.HasWriterListeners(), "sw.core", "who is still registered in the format?"); - rBoxFormat.SetFormatAttr( SwFormatFrmSize( ATT_VAR_SIZE, nLastPos )); + rBoxFormat.SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, nLastPos )); } else { size_t nWidth = nMaxBoxes ? USHRT_MAX / nMaxBoxes : USHRT_MAX; - rBoxFormat.SetFormatAttr(SwFormatFrmSize(ATT_VAR_SIZE, nWidth)); + rBoxFormat.SetFormatAttr(SwFormatFrameSize(ATT_VAR_SIZE, nWidth)); } } @@ -1020,7 +1020,7 @@ SwTableNode* SwNodes::TextToTable( const SwNodeRange& rRange, sal_Unicode cCh, cCh = 0x09; // Get the separator's position from the first Node, in order for the Boxes to be set accordingly - SwTextFrmInfo aFInfo( static_cast<SwTextFrm*>(pTextNd->getLayoutFrm( pTextNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() )) ); + SwTextFrameInfo aFInfo( static_cast<SwTextFrame*>(pTextNd->getLayoutFrame( pTextNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() )) ); if( aFInfo.IsOneLine() ) // only makes sense in this case { OUString const& rText(pTextNd->GetText()); @@ -1034,9 +1034,9 @@ SwTableNode* SwNodes::TextToTable( const SwNodeRange& rRange, sal_Unicode cCh, } aPosArr.push_back( - static_cast<sal_uInt16>(aFInfo.GetFrm()->IsVertical() ? - aFInfo.GetFrm()->Prt().Bottom() : - aFInfo.GetFrm()->Prt().Right()) ); + static_cast<sal_uInt16>(aFInfo.GetFrame()->IsVertical() ? + aFInfo.GetFrame()->Prt().Bottom() : + aFInfo.GetFrame()->Prt().Right()) ); } } @@ -1219,7 +1219,7 @@ const SwTable* SwDoc::TextToTable( const std::vector< std::vector<SwNodeRange> > // All Lines have a left-to-right Fill Order pLineFormat->SetFormatAttr( SwFormatFillOrder( ATT_LEFT_TO_RIGHT )); // The Table's SSize is USHRT_MAX - pTableFormat->SetFormatAttr( SwFormatFrmSize( ATT_VAR_SIZE, USHRT_MAX )); + pTableFormat->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, USHRT_MAX )); /* If the first node in the selection is a context node and if it has an item FRAMEDIR set (no default) propagate the item to the @@ -1246,12 +1246,12 @@ const SwTable* SwDoc::TextToTable( const std::vector< std::vector<SwNodeRange> > { // The Box's Formats already have the right size, we must only set // the right Border/AutoFormat. - pTableFormat->SetFormatAttr( pBoxFormat->GetFrmSize() ); + pTableFormat->SetFormatAttr( pBoxFormat->GetFrameSize() ); delete pBoxFormat; } sal_uLong nIdx = pTableNd->GetIndex(); - aNode2Layout.RestoreUpperFrms( GetNodes(), nIdx, nIdx + 1 ); + aNode2Layout.RestoreUpperFrames( GetNodes(), nIdx, nIdx + 1 ); getIDocumentState().SetModified(); getIDocumentFieldsAccess().SetFieldsDirty( true, nullptr, 0 ); @@ -1335,14 +1335,14 @@ lcl_SetTableBoxWidths2(SwTable & rTable, size_t const nMaxBoxes, // default width for box at the end of an incomplete line SwTableBoxFormat *const pNewFormat = rDoc.MakeTableBoxFormat(); size_t nWidth = nMaxBoxes ? USHRT_MAX / nMaxBoxes : USHRT_MAX; - pNewFormat->SetFormatAttr( SwFormatFrmSize(ATT_VAR_SIZE, + pNewFormat->SetFormatAttr( SwFormatFrameSize(ATT_VAR_SIZE, nWidth * (nMissing + 1)) ); pNewFormat->Add(rBoxes.back()); } } size_t nWidth = nMaxBoxes ? USHRT_MAX / nMaxBoxes : USHRT_MAX; // default width for all boxes not at the end of an incomplete line - rBoxFormat.SetFormatAttr(SwFormatFrmSize(ATT_VAR_SIZE, nWidth)); + rBoxFormat.SetFormatAttr(SwFormatFrameSize(ATT_VAR_SIZE, nWidth)); } SwTableNode* SwNodes::TextToTable( const SwNodes::TableRanges_t & rTableNodes, @@ -1586,14 +1586,14 @@ bool SwNodes::TableToText( const SwNodeRange& rRange, sal_Unicode cCh, // If the Table was alone in a Section, create the Frames via the Table's Upper SwNode2Layout* pNode2Layout = nullptr; - SwNodeIndex aFrmIdx( rRange.aStart ); - SwNode* pFrmNd = FindPrvNxtFrmNode( aFrmIdx, &rRange.aEnd.GetNode() ); - if( !pFrmNd ) + SwNodeIndex aFrameIdx( rRange.aStart ); + SwNode* pFrameNd = FindPrvNxtFrameNode( aFrameIdx, &rRange.aEnd.GetNode() ); + if( !pFrameNd ) // Collect all Uppers pNode2Layout = new SwNode2Layout( *pTableNd ); // Delete the Frames - pTableNd->DelFrms(); + pTableNd->DelFrames(); // "Delete" the Table and merge all Lines/Boxes _DelTabPara aDelPara( *this, cCh, pUndo ); @@ -1630,9 +1630,9 @@ bool SwNodes::TableToText( const SwNodeRange& rRange, sal_Unicode cCh, SectionUp( &aDelRg ); // Delete this Section and by that the Table // #i28006# sal_uLong nStt = aDelRg.aStart.GetIndex(), nEnd = aDelRg.aEnd.GetIndex(); - if( !pFrmNd ) + if( !pFrameNd ) { - pNode2Layout->RestoreUpperFrms( *this, + pNode2Layout->RestoreUpperFrames( *this, aDelRg.aStart.GetIndex(), aDelRg.aEnd.GetIndex() ); delete pNode2Layout; } @@ -1644,20 +1644,20 @@ bool SwNodes::TableToText( const SwNodeRange& rRange, sal_Unicode cCh, { if( nullptr != ( pCNd = aDelRg.aStart.GetNode().GetContentNode())) { - if( pFrmNd->IsContentNode() ) - static_cast<SwContentNode*>(pFrmNd)->MakeFrms( *pCNd ); - else if( pFrmNd->IsTableNode() ) - static_cast<SwTableNode*>(pFrmNd)->MakeFrms( aDelRg.aStart ); - else if( pFrmNd->IsSectionNode() ) - static_cast<SwSectionNode*>(pFrmNd)->MakeFrms( aDelRg.aStart ); - pFrmNd = pCNd; + if( pFrameNd->IsContentNode() ) + static_cast<SwContentNode*>(pFrameNd)->MakeFrames( *pCNd ); + else if( pFrameNd->IsTableNode() ) + static_cast<SwTableNode*>(pFrameNd)->MakeFrames( aDelRg.aStart ); + else if( pFrameNd->IsSectionNode() ) + static_cast<SwSectionNode*>(pFrameNd)->MakeFrames( aDelRg.aStart ); + pFrameNd = pCNd; } else if( nullptr != ( pSNd = aDelRg.aStart.GetNode().GetSectionNode())) { if( !pSNd->GetSection().IsHidden() && !pSNd->IsContentHidden() ) { - pSNd->MakeFrms( &aFrmIdx, &aDelRg.aEnd ); - pFrmNd = pSNd; + pSNd->MakeFrames( &aFrameIdx, &aDelRg.aEnd ); + pFrameNd = pSNd; break; } aDelRg.aStart = *pSNd->EndOfSectionNode(); @@ -1680,7 +1680,7 @@ bool SwNodes::TableToText( const SwNodeRange& rRange, sal_Unicode cCh, nStt <= pAPos->nNode.GetIndex() && pAPos->nNode.GetIndex() < nEnd ) { - pFormat->MakeFrms(); + pFormat->MakeFrames(); } } @@ -1829,7 +1829,7 @@ bool SwDoc::DeleteRow( const SwCursor& rCursor ) if( ::HasProtectedCells( aBoxes )) return false; - // Remove the Crsr from the to-be-deleted Section. + // Remove the Cursor from the to-be-deleted Section. // The Cursor is placed after the table, except for // - when there's another Line, we place it in that one // - when a Line precedes it, we place it in that one @@ -1938,7 +1938,7 @@ bool SwDoc::DeleteCol( const SwCursor& rCursor ) if( pESh ) { const SwNode* pNd = rCursor.GetNode().FindTableBoxStartNode(); - pESh->ParkCrsr( SwNodeIndex( *pNd ) ); + pESh->ParkCursor( SwNodeIndex( *pNd ) ); } // Thus delete the Columns @@ -2101,7 +2101,7 @@ bool SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn ) pNextNd->SetAttr( *pItem ); } - pTableNd->DelFrms(); + pTableNd->DelFrames(); getIDocumentContentOperations().DeleteSection( pTableNd ); } @@ -2352,25 +2352,25 @@ SwTableNode::~SwTableNode() SwPtrMsgPoolItem aMsgHint( RES_REMOVE_UNO_OBJECT, pTableFormat ); pTableFormat->ModifyNotification( &aMsgHint, &aMsgHint ); - DelFrms(); + DelFrames(); delete m_pTable; } -SwTabFrm *SwTableNode::MakeFrm( SwFrm* pSib ) +SwTabFrame *SwTableNode::MakeFrame( SwFrame* pSib ) { - return new SwTabFrm( *m_pTable, pSib ); + return new SwTabFrame( *m_pTable, pSib ); } /** * Creates all Views from the Document for the preceding Node. The resulting ContentFrames * are added to the corresponding Layout. */ -void SwTableNode::MakeFrms(const SwNodeIndex & rIdx ) +void SwTableNode::MakeFrames(const SwNodeIndex & rIdx ) { if( !GetTable().GetFrameFormat()->HasWriterListeners()) // Do we actually have Frame? return; - SwFrm *pFrm; + SwFrame *pFrame; SwContentNode * pNode = rIdx.GetNode().GetContentNode(); OSL_ENSURE( pNode, "No ContentNode or CopyNode and new Node is identical"); @@ -2379,106 +2379,106 @@ void SwTableNode::MakeFrms(const SwNodeIndex & rIdx ) SwNode2Layout aNode2Layout( *this, rIdx.GetIndex() ); - while( nullptr != (pFrm = aNode2Layout.NextFrm()) ) + while( nullptr != (pFrame = aNode2Layout.NextFrame()) ) { - SwFrm *pNew = pNode->MakeFrm( pFrm ); + SwFrame *pNew = pNode->MakeFrame( pFrame ); // Will the Node receive Frames before or after? if ( bBefore ) // The new one precedes me - pNew->Paste( pFrm->GetUpper(), pFrm ); + pNew->Paste( pFrame->GetUpper(), pFrame ); else // The new one succeeds me - pNew->Paste( pFrm->GetUpper(), pFrm->GetNext() ); + pNew->Paste( pFrame->GetUpper(), pFrame->GetNext() ); } } /** - * Create a TableFrm for every Shell and insert before the corresponding ContentFrm. + * Create a TableFrame for every Shell and insert before the corresponding ContentFrame. */ -void SwTableNode::MakeFrms( SwNodeIndex* pIdxBehind ) +void SwTableNode::MakeFrames( SwNodeIndex* pIdxBehind ) { OSL_ENSURE( pIdxBehind, "No Index" ); *pIdxBehind = *this; - SwNode *pNd = GetNodes().FindPrvNxtFrmNode( *pIdxBehind, EndOfSectionNode() ); + SwNode *pNd = GetNodes().FindPrvNxtFrameNode( *pIdxBehind, EndOfSectionNode() ); if( !pNd ) return ; - SwFrm *pFrm( nullptr ); - SwLayoutFrm *pUpper( nullptr ); + SwFrame *pFrame( nullptr ); + SwLayoutFrame *pUpper( nullptr ); SwNode2Layout aNode2Layout( *pNd, GetIndex() ); - while( nullptr != (pUpper = aNode2Layout.UpperFrm( pFrm, *this )) ) + while( nullptr != (pUpper = aNode2Layout.UpperFrame( pFrame, *this )) ) { - SwTabFrm* pNew = MakeFrm( pUpper ); - pNew->Paste( pUpper, pFrm ); + SwTabFrame* pNew = MakeFrame( pUpper ); + pNew->Paste( pUpper, pFrame ); // #i27138# // notify accessibility paragraphs objects about changed // CONTENT_FLOWS_FROM/_TO relation. // Relation CONTENT_FLOWS_FROM for next paragraph will change // and relation CONTENT_FLOWS_TO for previous paragraph will change. { - SwViewShell* pViewShell( pNew->getRootFrm()->GetCurrShell() ); + SwViewShell* pViewShell( pNew->getRootFrame()->GetCurrShell() ); if ( pViewShell && pViewShell->GetLayout() && pViewShell->GetLayout()->IsAnyShellAccessible() ) { pViewShell->InvalidateAccessibleParaFlowRelation( - dynamic_cast<SwTextFrm*>(pNew->FindNextCnt( true )), - dynamic_cast<SwTextFrm*>(pNew->FindPrevCnt( true )) ); + dynamic_cast<SwTextFrame*>(pNew->FindNextCnt( true )), + dynamic_cast<SwTextFrame*>(pNew->FindPrevCnt( true )) ); } } pNew->RegistFlys(); } } -void SwTableNode::DelFrms() +void SwTableNode::DelFrames() { - /* For a start, cut out and delete the TabFrms (which will also delete the Columns and Rows) - The TabFrms are attached to the FrameFormat of the SwTable. + /* For a start, cut out and delete the TabFrames (which will also delete the Columns and Rows) + The TabFrames are attached to the FrameFormat of the SwTable. We need to delete them in a more cumbersome way, for the Master to also delete the Follows. */ - SwIterator<SwTabFrm,SwFormat> aIter( *(m_pTable->GetFrameFormat()) ); - SwTabFrm *pFrm = aIter.First(); - while ( pFrm ) + SwIterator<SwTabFrame,SwFormat> aIter( *(m_pTable->GetFrameFormat()) ); + SwTabFrame *pFrame = aIter.First(); + while ( pFrame ) { bool bAgain = false; { - if ( !pFrm->IsFollow() ) + if ( !pFrame->IsFollow() ) { - while ( pFrm->HasFollow() ) - pFrm->JoinAndDelFollows(); + while ( pFrame->HasFollow() ) + pFrame->JoinAndDelFollows(); // #i27138# // notify accessibility paragraphs objects about changed // CONTENT_FLOWS_FROM/_TO relation. // Relation CONTENT_FLOWS_FROM for current next paragraph will change // and relation CONTENT_FLOWS_TO for current previous paragraph will change. { - SwViewShell* pViewShell( pFrm->getRootFrm()->GetCurrShell() ); + SwViewShell* pViewShell( pFrame->getRootFrame()->GetCurrShell() ); if ( pViewShell && pViewShell->GetLayout() && pViewShell->GetLayout()->IsAnyShellAccessible() ) { pViewShell->InvalidateAccessibleParaFlowRelation( - dynamic_cast<SwTextFrm*>(pFrm->FindNextCnt( true )), - dynamic_cast<SwTextFrm*>(pFrm->FindPrevCnt( true )) ); + dynamic_cast<SwTextFrame*>(pFrame->FindNextCnt( true )), + dynamic_cast<SwTextFrame*>(pFrame->FindPrevCnt( true )) ); } } - pFrm->Cut(); - SwFrm::DestroyFrm(pFrm); + pFrame->Cut(); + SwFrame::DestroyFrame(pFrame); bAgain = true; } } - pFrm = bAgain ? aIter.First() : aIter.Next(); + pFrame = bAgain ? aIter.First() : aIter.Next(); } } void SwTableNode::SetNewTable( SwTable* pNewTable, bool bNewFrames ) { - DelFrms(); + DelFrames(); delete m_pTable; m_pTable = pNewTable; if( bNewFrames ) { SwNodeIndex aIdx( *EndOfSectionNode()); GetNodes().GoNext( &aIdx ); - MakeFrms( &aIdx ); + MakeFrames( &aIdx ); } } @@ -2493,38 +2493,38 @@ void SwTableNode::RemoveRedlines() } } -void SwDoc::GetTabCols( SwTabCols &rFill, const SwCursor* pCrsr, - const SwCellFrm* pBoxFrm ) +void SwDoc::GetTabCols( SwTabCols &rFill, const SwCursor* pCursor, + const SwCellFrame* pBoxFrame ) { const SwTableBox* pBox = nullptr; - SwTabFrm *pTab = nullptr; + SwTabFrame *pTab = nullptr; - if( pBoxFrm ) + if( pBoxFrame ) { - pTab = const_cast<SwFrm*>(static_cast<SwFrm const *>(pBoxFrm))->ImplFindTabFrm(); - pBox = pBoxFrm->GetTabBox(); + pTab = const_cast<SwFrame*>(static_cast<SwFrame const *>(pBoxFrame))->ImplFindTabFrame(); + pBox = pBoxFrame->GetTabBox(); } - else if( pCrsr ) + else if( pCursor ) { - const SwContentNode* pCNd = pCrsr->GetContentNode(); + const SwContentNode* pCNd = pCursor->GetContentNode(); if( !pCNd ) return ; Point aPt; - const SwShellCrsr *pShCrsr = dynamic_cast<const SwShellCrsr*>(pCrsr); - if( pShCrsr ) - aPt = pShCrsr->GetPtPos(); + const SwShellCursor *pShCursor = dynamic_cast<const SwShellCursor*>(pCursor); + if( pShCursor ) + aPt = pShCursor->GetPtPos(); - const SwFrm* pTmpFrm = pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ); + const SwFrame* pTmpFrame = pCNd->getLayoutFrame( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ); do { - pTmpFrm = pTmpFrm->GetUpper(); - } while ( !pTmpFrm->IsCellFrm() ); + pTmpFrame = pTmpFrame->GetUpper(); + } while ( !pTmpFrame->IsCellFrame() ); - pBoxFrm = static_cast<const SwCellFrm*>(pTmpFrm); - pTab = const_cast<SwFrm*>(static_cast<SwFrm const *>(pBoxFrm))->ImplFindTabFrm(); - pBox = pBoxFrm->GetTabBox(); + pBoxFrame = static_cast<const SwCellFrame*>(pTmpFrame); + pTab = const_cast<SwFrame*>(static_cast<SwFrame const *>(pBoxFrame))->ImplFindTabFrame(); + pBox = pBoxFrame->GetTabBox(); } - else if( !pCrsr && !pBoxFrm ) + else if( !pCursor && !pBoxFrame ) { OSL_ENSURE( false, "One of them needs to be specified!" ); return ; @@ -2532,11 +2532,11 @@ void SwDoc::GetTabCols( SwTabCols &rFill, const SwCursor* pCrsr, // Set fixed points, LeftMin in Document coordinates, all others relative SWRECTFN( pTab ) - const SwPageFrm* pPage = pTab->FindPageFrm(); - const sal_uLong nLeftMin = (pTab->Frm().*fnRect->fnGetLeft)() - - (pPage->Frm().*fnRect->fnGetLeft)(); - const sal_uLong nRightMax = (pTab->Frm().*fnRect->fnGetRight)() - - (pPage->Frm().*fnRect->fnGetLeft)(); + const SwPageFrame* pPage = pTab->FindPageFrame(); + const sal_uLong nLeftMin = (pTab->Frame().*fnRect->fnGetLeft)() - + (pPage->Frame().*fnRect->fnGetLeft)(); + const sal_uLong nRightMax = (pTab->Frame().*fnRect->fnGetRight)() - + (pPage->Frame().*fnRect->fnGetLeft)(); rFill.SetLeftMin ( nLeftMin ); rFill.SetLeft ( (pTab->Prt().*fnRect->fnGetLeft)() ); @@ -2560,11 +2560,11 @@ bool FuzzyCompare::operator() ( long s1, long s2 ) const return ( s1 < s2 && std::abs( s1 - s2 ) > ROWFUZZY ); } -static bool lcl_IsFrmInColumn( const SwCellFrm& rFrm, SwSelBoxes& rBoxes ) +static bool lcl_IsFrameInColumn( const SwCellFrame& rFrame, SwSelBoxes& rBoxes ) { for (size_t i = 0; i < rBoxes.size(); ++i) { - if ( rFrm.GetTabBox() == rBoxes[ i ] ) + if ( rFrame.GetTabBox() == rBoxes[ i ] ) return true; } @@ -2572,26 +2572,26 @@ static bool lcl_IsFrmInColumn( const SwCellFrm& rFrm, SwSelBoxes& rBoxes ) } void SwDoc::GetTabRows( SwTabCols &rFill, const SwCursor* , - const SwCellFrm* pBoxFrm ) + const SwCellFrame* pBoxFrame ) { - OSL_ENSURE( pBoxFrm, "GetTabRows called without pBoxFrm" ); + OSL_ENSURE( pBoxFrame, "GetTabRows called without pBoxFrame" ); // Make code robust: - if ( !pBoxFrm ) + if ( !pBoxFrame ) return; // #i39552# Collection of the boxes of the current // column has to be done at the beginning of this function, because // the table may be formatted in ::GetTableSel. - SwDeletionChecker aDelCheck( pBoxFrm ); + SwDeletionChecker aDelCheck( pBoxFrame ); SwSelBoxes aBoxes; - const SwContentFrm* pContent = ::GetCellContent( *pBoxFrm ); - if ( pContent && pContent->IsTextFrm() ) + const SwContentFrame* pContent = ::GetCellContent( *pBoxFrame ); + if ( pContent && pContent->IsTextFrame() ) { - const SwPosition aPos( *static_cast<const SwTextFrm*>(pContent)->GetTextNode() ); - const SwCursor aTmpCrsr( aPos, nullptr, false ); - ::GetTableSel( aTmpCrsr, aBoxes, nsSwTableSearchType::TBLSEARCH_COL ); + const SwPosition aPos( *static_cast<const SwTextFrame*>(pContent)->GetTextNode() ); + const SwCursor aTmpCursor( aPos, nullptr, false ); + ::GetTableSel( aTmpCursor, aBoxes, nsSwTableSearchType::TBLSEARCH_COL ); } // Make code robust: @@ -2602,19 +2602,19 @@ void SwDoc::GetTabRows( SwTabCols &rFill, const SwCursor* , } // Make code robust: - const SwTabFrm* pTab = pBoxFrm->FindTabFrm(); + const SwTabFrame* pTab = pBoxFrame->FindTabFrame(); OSL_ENSURE( pTab, "GetTabRows called without a table" ); if ( !pTab ) return; - const SwFrm* pFrm = pTab->GetNextLayoutLeaf(); + const SwFrame* pFrame = pTab->GetNextLayoutLeaf(); // Set fixed points, LeftMin in Document coordinates, all others relative SWRECTFN( pTab ) - const SwPageFrm* pPage = pTab->FindPageFrm(); + const SwPageFrame* pPage = pTab->FindPageFrame(); const long nLeftMin = ( bVert ? - pTab->GetPrtLeft() - pPage->Frm().Left() : - pTab->GetPrtTop() - pPage->Frm().Top() ); + pTab->GetPrtLeft() - pPage->Frame().Left() : + pTab->GetPrtTop() - pPage->Frame().Top() ); const long nLeft = bVert ? LONG_MAX : 0; const long nRight = (pTab->Prt().*fnRect->fnGetHeight)(); const long nRightMax = bVert ? nRight : LONG_MAX; @@ -2633,13 +2633,13 @@ void SwDoc::GetTabRows( SwTabCols &rFill, const SwCursor* , HiddenMap aHidden; HiddenMap::iterator aHiddenIter; - while ( pFrm && pTab->IsAnLower( pFrm ) ) + while ( pFrame && pTab->IsAnLower( pFrame ) ) { - if ( pFrm->IsCellFrm() && pFrm->FindTabFrm() == pTab ) + if ( pFrame->IsCellFrame() && pFrame->FindTabFrame() == pTab ) { // upper and lower borders of current cell frame: - long nUpperBorder = (pFrm->Frm().*fnRect->fnGetTop)(); - long nLowerBorder = (pFrm->Frm().*fnRect->fnGetBottom)(); + long nUpperBorder = (pFrame->Frame().*fnRect->fnGetTop)(); + long nLowerBorder = (pFrame->Frame().*fnRect->fnGetBottom)(); // get boundaries for nUpperBorder: aIter = aBoundaries.find( nUpperBorder ); @@ -2669,18 +2669,18 @@ void SwDoc::GetTabRows( SwTabCols &rFill, const SwCursor* , { aHiddenIter = aHidden.find( nTmpVal ); if ( aHiddenIter == aHidden.end() ) - aHidden[ nTmpVal ] = !lcl_IsFrmInColumn( *static_cast<const SwCellFrm*>(pFrm), aBoxes ); + aHidden[ nTmpVal ] = !lcl_IsFrameInColumn( *static_cast<const SwCellFrame*>(pFrame), aBoxes ); else { if ( aHidden[ nTmpVal ] && - lcl_IsFrmInColumn( *static_cast<const SwCellFrm*>(pFrm), aBoxes ) ) + lcl_IsFrameInColumn( *static_cast<const SwCellFrame*>(pFrame), aBoxes ) ) aHidden[ nTmpVal ] = false; } nTmpVal = nLowerBorder; } } - pFrm = pFrm->GetNextLayoutLeaf(); + pFrame = pFrame->GetNextLayoutLeaf(); } // transfer calculated values from BoundaryMap and HiddenMap into rFill: @@ -2708,37 +2708,37 @@ void SwDoc::GetTabRows( SwTabCols &rFill, const SwCursor* , } void SwDoc::SetTabCols( const SwTabCols &rNew, bool bCurRowOnly, - const SwCursor* pCrsr, const SwCellFrm* pBoxFrm ) + const SwCursor* pCursor, const SwCellFrame* pBoxFrame ) { const SwTableBox* pBox = nullptr; - SwTabFrm *pTab = nullptr; + SwTabFrame *pTab = nullptr; - if( pBoxFrm ) + if( pBoxFrame ) { - pTab = const_cast<SwFrm*>(static_cast<SwFrm const *>(pBoxFrm))->ImplFindTabFrm(); - pBox = pBoxFrm->GetTabBox(); + pTab = const_cast<SwFrame*>(static_cast<SwFrame const *>(pBoxFrame))->ImplFindTabFrame(); + pBox = pBoxFrame->GetTabBox(); } - else if( pCrsr ) + else if( pCursor ) { - const SwContentNode* pCNd = pCrsr->GetContentNode(); + const SwContentNode* pCNd = pCursor->GetContentNode(); if( !pCNd ) return ; Point aPt; - const SwShellCrsr *pShCrsr = dynamic_cast<const SwShellCrsr*>(pCrsr); - if( pShCrsr ) - aPt = pShCrsr->GetPtPos(); + const SwShellCursor *pShCursor = dynamic_cast<const SwShellCursor*>(pCursor); + if( pShCursor ) + aPt = pShCursor->GetPtPos(); - const SwFrm* pTmpFrm = pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ); + const SwFrame* pTmpFrame = pCNd->getLayoutFrame( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ); do { - pTmpFrm = pTmpFrm->GetUpper(); - } while ( !pTmpFrm->IsCellFrm() ); + pTmpFrame = pTmpFrame->GetUpper(); + } while ( !pTmpFrame->IsCellFrame() ); - pBoxFrm = static_cast<const SwCellFrm*>(pTmpFrm); - pTab = const_cast<SwFrm*>(static_cast<SwFrm const *>(pBoxFrm))->ImplFindTabFrm(); - pBox = pBoxFrm->GetTabBox(); + pBoxFrame = static_cast<const SwCellFrame*>(pTmpFrame); + pTab = const_cast<SwFrame*>(static_cast<SwFrame const *>(pBoxFrame))->ImplFindTabFrame(); + pBox = pBoxFrame->GetTabBox(); } - else if( !pCrsr && !pBoxFrm ) + else if( !pCursor && !pBoxFrame ) { OSL_ENSURE( false, "One of them needs to be specified!" ); return ; @@ -2747,7 +2747,7 @@ void SwDoc::SetTabCols( const SwTabCols &rNew, bool bCurRowOnly, // If the Table is still using relative values (USHRT_MAX) // we need to switch to absolute ones. SwTable& rTab = *pTab->GetTable(); - const SwFormatFrmSize& rTableFrmSz = rTab.GetFrameFormat()->GetFrmSize(); + const SwFormatFrameSize& rTableFrameSz = rTab.GetFrameFormat()->GetFrameSize(); SWRECTFN( pTab ) // #i17174# - With fix for #i9040# the shadow size is taken // from the table width. Thus, add its left and right size to current table @@ -2758,20 +2758,20 @@ void SwDoc::SetTabCols( const SwTabCols &rNew, bool bCurRowOnly, nPrtWidth += aShadow.CalcShadowSpace( SvxShadowItemSide::LEFT ) + aShadow.CalcShadowSpace( SvxShadowItemSide::RIGHT ); } - if( nPrtWidth != rTableFrmSz.GetWidth() ) + if( nPrtWidth != rTableFrameSz.GetWidth() ) { - SwFormatFrmSize aSz( rTableFrmSz ); + SwFormatFrameSize aSz( rTableFrameSz ); aSz.SetWidth( nPrtWidth ); rTab.GetFrameFormat()->SetFormatAttr( aSz ); } SwTabCols aOld( rNew.Count() ); - const SwPageFrm* pPage = pTab->FindPageFrm(); - const sal_uLong nLeftMin = (pTab->Frm().*fnRect->fnGetLeft)() - - (pPage->Frm().*fnRect->fnGetLeft)(); - const sal_uLong nRightMax = (pTab->Frm().*fnRect->fnGetRight)() - - (pPage->Frm().*fnRect->fnGetLeft)(); + const SwPageFrame* pPage = pTab->FindPageFrame(); + const sal_uLong nLeftMin = (pTab->Frame().*fnRect->fnGetLeft)() - + (pPage->Frame().*fnRect->fnGetLeft)(); + const sal_uLong nRightMax = (pTab->Frame().*fnRect->fnGetRight)() - + (pPage->Frame().*fnRect->fnGetLeft)(); // Set fixed points, LeftMin in Document coordinates, all others relative aOld.SetLeftMin ( nLeftMin ); @@ -2784,13 +2784,13 @@ void SwDoc::SetTabCols( const SwTabCols &rNew, bool bCurRowOnly, } void SwDoc::SetTabRows( const SwTabCols &rNew, bool bCurColOnly, const SwCursor*, - const SwCellFrm* pBoxFrm ) + const SwCellFrame* pBoxFrame ) { - SwTabFrm *pTab; + SwTabFrame *pTab; - OSL_ENSURE( pBoxFrm, "SetTabRows called without pBoxFrm" ); + OSL_ENSURE( pBoxFrame, "SetTabRows called without pBoxFrame" ); - pTab = const_cast<SwFrm*>(static_cast<SwFrm const *>(pBoxFrm))->ImplFindTabFrm(); + pTab = const_cast<SwFrame*>(static_cast<SwFrame const *>(pBoxFrame))->ImplFindTabFrame(); // If the Table is still using relative values (USHRT_MAX) // we need to switch to absolute ones. @@ -2798,26 +2798,26 @@ void SwDoc::SetTabRows( const SwTabCols &rNew, bool bCurColOnly, const SwCursor* SwTabCols aOld( rNew.Count() ); // Set fixed points, LeftMin in Document coordinates, all others relative - const SwPageFrm* pPage = pTab->FindPageFrm(); + const SwPageFrame* pPage = pTab->FindPageFrame(); aOld.SetRight( (pTab->Prt().*fnRect->fnGetHeight)() ); long nLeftMin; if ( bVert ) { - nLeftMin = pTab->GetPrtLeft() - pPage->Frm().Left(); + nLeftMin = pTab->GetPrtLeft() - pPage->Frame().Left(); aOld.SetLeft ( LONG_MAX ); aOld.SetRightMax( aOld.GetRight() ); } else { - nLeftMin = pTab->GetPrtTop() - pPage->Frm().Top(); + nLeftMin = pTab->GetPrtTop() - pPage->Frame().Top(); aOld.SetLeft ( 0 ); aOld.SetRightMax( LONG_MAX ); } aOld.SetLeftMin ( nLeftMin ); - GetTabRows( aOld, nullptr, pBoxFrm ); + GetTabRows( aOld, nullptr, pBoxFrame ); GetIDocumentUndoRedo().StartUndo( UNDO_TABLE_ATTR, nullptr ); @@ -2842,50 +2842,50 @@ void SwDoc::SetTabRows( const SwTabCols &rNew, bool bCurColOnly, const SwCursor* const long nDiff = nNewRowHeight - nOldRowHeight; if ( std::abs( nDiff ) >= ROWFUZZY ) { - // For the old table model pTextFrm and pLine will be set for every box. - // For the new table model pTextFrm will be set if the box is not covered, + // For the old table model pTextFrame and pLine will be set for every box. + // For the new table model pTextFrame will be set if the box is not covered, // but the pLine will be set if the box is not an overlapping box // In the new table model the row height can be adjusted, // when both variables are set. - const SwTextFrm* pTextFrm = nullptr; + const SwTextFrame* pTextFrame = nullptr; const SwTableLine* pLine = nullptr; - // Iterate over all SwCellFrms with Bottom = nOldPos - const SwFrm* pFrm = pTab->GetNextLayoutLeaf(); - while ( pFrm && pTab->IsAnLower( pFrm ) ) + // Iterate over all SwCellFrames with Bottom = nOldPos + const SwFrame* pFrame = pTab->GetNextLayoutLeaf(); + while ( pFrame && pTab->IsAnLower( pFrame ) ) { - if ( pFrm->IsCellFrm() && pFrm->FindTabFrm() == pTab ) + if ( pFrame->IsCellFrame() && pFrame->FindTabFrame() == pTab ) { - const long nLowerBorder = (pFrm->Frm().*fnRect->fnGetBottom)(); + const long nLowerBorder = (pFrame->Frame().*fnRect->fnGetBottom)(); const sal_uLong nTabTop = (pTab->*fnRect->fnGetPrtTop)(); if ( std::abs( (*fnRect->fnYInc)( nTabTop, nOldRowEnd ) - nLowerBorder ) <= ROWFUZZY ) { - if ( !bCurColOnly || pFrm == pBoxFrm ) + if ( !bCurColOnly || pFrame == pBoxFrame ) { - const SwFrm* pContent = ::GetCellContent( static_cast<const SwCellFrm&>(*pFrm) ); + const SwFrame* pContent = ::GetCellContent( static_cast<const SwCellFrame&>(*pFrame) ); - if ( pContent && pContent->IsTextFrm() ) + if ( pContent && pContent->IsTextFrame() ) { - const SwTableBox* pBox = static_cast<const SwCellFrm*>(pFrm)->GetTabBox(); + const SwTableBox* pBox = static_cast<const SwCellFrame*>(pFrame)->GetTabBox(); const long nRowSpan = pBox->getRowSpan(); if( nRowSpan > 0 ) // Not overlapped - pTextFrm = static_cast<const SwTextFrm*>(pContent); + pTextFrame = static_cast<const SwTextFrame*>(pContent); if( nRowSpan < 2 ) // Not overlapping for row height pLine = pBox->GetUpper(); - if( pLine && pTextFrm ) // always for old table model + if( pLine && pTextFrame ) // always for old table model { // The new row height must not to be calculated from a overlapping box - SwFormatFrmSize aNew( pLine->GetFrameFormat()->GetFrmSize() ); - const long nNewSize = (pFrm->Frm().*fnRect->fnGetHeight)() + nDiff; + SwFormatFrameSize aNew( pLine->GetFrameFormat()->GetFrameSize() ); + const long nNewSize = (pFrame->Frame().*fnRect->fnGetHeight)() + nDiff; if( nNewSize != aNew.GetHeight() ) { aNew.SetHeight( nNewSize ); if ( ATT_VAR_SIZE == aNew.GetHeightSizeType() ) aNew.SetHeightSizeType( ATT_MIN_SIZE ); // This position must not be in an overlapped box - const SwPosition aPos( *static_cast<const SwTextFrm*>(pContent)->GetTextNode() ); - const SwCursor aTmpCrsr( aPos, nullptr, false ); - SetRowHeight( aTmpCrsr, aNew ); + const SwPosition aPos( *static_cast<const SwTextFrame*>(pContent)->GetTextNode() ); + const SwCursor aTmpCursor( aPos, nullptr, false ); + SetRowHeight( aTmpCursor, aNew ); // For the new table model we're done, for the old one // there might be another (sub)row to adjust... if( pTable->IsNewModel() ) @@ -2897,7 +2897,7 @@ void SwDoc::SetTabRows( const SwTabCols &rNew, bool bCurColOnly, const SwCursor* } } } - pFrm = pFrm->GetNextLayoutLeaf(); + pFrame = pFrame->GetNextLayoutLeaf(); } } } @@ -2951,7 +2951,7 @@ void SwCollectTableLineBoxes::AddBox( const SwTableBox& rBox ) aPosArr.push_back(nWidth); SwTableBox* p = const_cast<SwTableBox*>(&rBox); m_Boxes.push_back(p); - nWidth = nWidth + (sal_uInt16)rBox.GetFrameFormat()->GetFrmSize().GetWidth(); + nWidth = nWidth + (sal_uInt16)rBox.GetFrameFormat()->GetFrameSize().GetWidth(); } const SwTableBox* SwCollectTableLineBoxes::GetBoxOfPos( const SwTableBox& rBox ) @@ -2974,7 +2974,7 @@ const SwTableBox* SwCollectTableLineBoxes::GetBoxOfPos( const SwTableBox& rBox ) if( n >= aPosArr.size() ) --n; - nWidth = nWidth + (sal_uInt16)rBox.GetFrameFormat()->GetFrmSize().GetWidth(); + nWidth = nWidth + (sal_uInt16)rBox.GetFrameFormat()->GetFrameSize().GetWidth(); pRet = m_Boxes[ n ]; } return pRet; @@ -3175,7 +3175,7 @@ bool SwDoc::SplitTable( const SwPosition& rPos, sal_uInt16 eHdlnMode, // Find Lines for the Layout update _FndBox aFndBox( nullptr, nullptr ); aFndBox.SetTableLines( rTable ); - aFndBox.DelFrms( rTable ); + aFndBox.DelFrames( rTable ); SwTableNode* pNew = GetNodes().SplitTable( rPos.nNode, false, bCalcNewSize ); @@ -3250,10 +3250,10 @@ bool SwDoc::SplitTable( const SwPosition& rPos, sal_uInt16 eHdlnMode, break; } - // And insert Frms + // And insert Frames SwNodeIndex aNdIdx( *pNew->EndOfSectionNode() ); GetNodes().GoNext( &aNdIdx ); // To the next ContentNode - pNew->MakeFrms( &aNdIdx ); + pNew->MakeFrames( &aNdIdx ); // Insert a paragraph between the Table GetNodes().MakeTextNode( SwNodeIndex( *pNew ), @@ -3261,7 +3261,7 @@ bool SwDoc::SplitTable( const SwPosition& rPos, sal_uInt16 eHdlnMode, } // Update Layout - aFndBox.MakeFrms( rTable ); + aFndBox.MakeFrames( rTable ); // TL_CHART2: need to inform chart of probably changed cell names UpdateCharts( rTable.GetFrameFormat()->GetName() ); @@ -3281,7 +3281,7 @@ static bool lcl_ChgTableSize( SwTable& rTable ) // set back to 0. // So lock the Format. SwFrameFormat* pFormat = rTable.GetFrameFormat(); - SwFormatFrmSize aTableMaxSz( pFormat->GetFrmSize() ); + SwFormatFrameSize aTableMaxSz( pFormat->GetFrameSize() ); if( USHRT_MAX == aTableMaxSz.GetWidth() ) return false; @@ -3297,7 +3297,7 @@ static bool lcl_ChgTableSize( SwTable& rTable ) SwTwips nMaxLnWidth = 0; SwTableBoxes& rBoxes = pLn->GetTabBoxes(); for( auto pBox : rBoxes ) - nMaxLnWidth += pBox->GetFrameFormat()->GetFrmSize().GetWidth(); + nMaxLnWidth += pBox->GetFrameFormat()->GetFrameSize().GetWidth(); if( nMaxLnWidth > aTableMaxSz.GetWidth() ) aTableMaxSz.SetWidth( nMaxLnWidth ); @@ -3461,7 +3461,7 @@ SwTableNode* SwNodes::SplitTable( const SwNodeIndex& rPos, bool bAfter, } { - // Copy the Table FrmFormat + // Copy the Table FrameFormat SwFrameFormat* pOldTableFormat = rTable.GetFrameFormat(); SwFrameFormat* pNewTableFormat = pOldTableFormat->GetDoc()->MakeTableFrameFormat( pOldTableFormat->GetDoc()->GetUniqueTableName(), @@ -3562,7 +3562,7 @@ bool SwNodes::MergeTable( const SwNodeIndex& rPos, bool bWithPrev, if( !pDelTableNd || !pTableNd ) return false; - pDelTableNd->DelFrms(); + pDelTableNd->DelFrames(); SwTable& rDelTable = pDelTableNd->GetTable(); SwTable& rTable = pTableNd->GetTable(); @@ -3570,7 +3570,7 @@ bool SwNodes::MergeTable( const SwNodeIndex& rPos, bool bWithPrev, // Find Lines for the Layout update _FndBox aFndBox( nullptr, nullptr ); aFndBox.SetTableLines( rTable ); - aFndBox.DelFrms( rTable ); + aFndBox.DelFrames( rTable ); // TL_CHART2: // tell the charts about the table to be deleted and have them use their own data @@ -3578,8 +3578,8 @@ bool SwNodes::MergeTable( const SwNodeIndex& rPos, bool bWithPrev, // Sync the TableFormat's Width { - const SwFormatFrmSize& rTableSz = rTable.GetFrameFormat()->GetFrmSize(); - const SwFormatFrmSize& rDelTableSz = rDelTable.GetFrameFormat()->GetFrmSize(); + const SwFormatFrameSize& rTableSz = rTable.GetFrameFormat()->GetFrameSize(); + const SwFormatFrameSize& rDelTableSz = rDelTable.GetFrameFormat()->GetFrameSize(); if( rTableSz != rDelTableSz ) { // The needs correction @@ -3649,7 +3649,7 @@ bool SwNodes::MergeTable( const SwNodeIndex& rPos, bool bWithPrev, } // Update Layout - aFndBox.MakeFrms( rTable ); + aFndBox.MakeFrames( rTable ); return true; } diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx index 61c6a95fc386..99be14a5312e 100644 --- a/sw/source/core/docnode/ndtbl1.cxx +++ b/sw/source/core/docnode/ndtbl1.cxx @@ -94,38 +94,38 @@ void SwTableFormatCmp::Delete( std::vector<SwTableFormatCmp*> &rArr ) delete pCmp; } -static void lcl_GetStartEndCell( const SwCursor& rCrsr, - SwLayoutFrm *&prStart, SwLayoutFrm *&prEnd ) +static void lcl_GetStartEndCell( const SwCursor& rCursor, + SwLayoutFrame *&prStart, SwLayoutFrame *&prEnd ) { - OSL_ENSURE( rCrsr.GetContentNode() && rCrsr.GetContentNode( false ), + OSL_ENSURE( rCursor.GetContentNode() && rCursor.GetContentNode( false ), "Tab selection not at ContentNode" ); Point aPtPos, aMkPos; - const SwShellCrsr* pShCrsr = dynamic_cast<const SwShellCrsr*>(&rCrsr); - if( pShCrsr ) + const SwShellCursor* pShCursor = dynamic_cast<const SwShellCursor*>(&rCursor); + if( pShCursor ) { - aPtPos = pShCrsr->GetPtPos(); - aMkPos = pShCrsr->GetMkPos(); + aPtPos = pShCursor->GetPtPos(); + aMkPos = pShCursor->GetMkPos(); } // Robust: - SwContentNode* pPointNd = rCrsr.GetContentNode(); - SwContentNode* pMarkNd = rCrsr.GetContentNode(false); + SwContentNode* pPointNd = rCursor.GetContentNode(); + SwContentNode* pMarkNd = rCursor.GetContentNode(false); - SwFrm* pPointFrm = pPointNd ? pPointNd->getLayoutFrm( pPointNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPtPos ) : nullptr; - SwFrm* pMarkFrm = pMarkNd ? pMarkNd->getLayoutFrm( pMarkNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aMkPos ) : nullptr; + SwFrame* pPointFrame = pPointNd ? pPointNd->getLayoutFrame( pPointNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPtPos ) : nullptr; + SwFrame* pMarkFrame = pMarkNd ? pMarkNd->getLayoutFrame( pMarkNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aMkPos ) : nullptr; - prStart = pPointFrm ? pPointFrm->GetUpper() : nullptr; - prEnd = pMarkFrm ? pMarkFrm->GetUpper() : nullptr; + prStart = pPointFrame ? pPointFrame->GetUpper() : nullptr; + prEnd = pMarkFrame ? pMarkFrame->GetUpper() : nullptr; } static bool lcl_GetBoxSel( const SwCursor& rCursor, SwSelBoxes& rBoxes, - bool bAllCrsr = false ) + bool bAllCursor = false ) { - const SwTableCursor* pTableCrsr = + const SwTableCursor* pTableCursor = dynamic_cast<const SwTableCursor*>(&rCursor); - if( pTableCrsr ) - ::GetTableSelCrs( *pTableCrsr, rBoxes ); + if( pTableCursor ) + ::GetTableSelCrs( *pTableCursor, rBoxes ); else { const SwPaM *pCurPam = &rCursor, *pSttPam = pCurPam; @@ -137,7 +137,7 @@ static bool lcl_GetBoxSel( const SwCursor& rCursor, SwSelBoxes& rBoxes, GetTableBox( pNd->GetIndex() )); rBoxes.insert( pBox ); } - } while( bAllCrsr && + } while( bAllCursor && pSttPam != ( pCurPam = pCurPam->GetNext()) ); } return !rBoxes.empty(); @@ -268,9 +268,9 @@ static void lcl_ProcessRowAttr( std::vector<SwTableFormatCmp*>& rFormatCmp, SwTa } } -static void lcl_ProcessBoxSize( std::vector<SwTableFormatCmp*> &rFormatCmp, SwTableBox *pBox, const SwFormatFrmSize &rNew ); +static void lcl_ProcessBoxSize( std::vector<SwTableFormatCmp*> &rFormatCmp, SwTableBox *pBox, const SwFormatFrameSize &rNew ); -static void lcl_ProcessRowSize( std::vector<SwTableFormatCmp*> &rFormatCmp, SwTableLine *pLine, const SwFormatFrmSize &rNew ) +static void lcl_ProcessRowSize( std::vector<SwTableFormatCmp*> &rFormatCmp, SwTableLine *pLine, const SwFormatFrameSize &rNew ) { lcl_ProcessRowAttr( rFormatCmp, pLine, rNew ); SwTableBoxes &rBoxes = pLine->GetTabBoxes(); @@ -278,12 +278,12 @@ static void lcl_ProcessRowSize( std::vector<SwTableFormatCmp*> &rFormatCmp, SwTa ::lcl_ProcessBoxSize( rFormatCmp, pBox, rNew ); } -static void lcl_ProcessBoxSize( std::vector<SwTableFormatCmp*> &rFormatCmp, SwTableBox *pBox, const SwFormatFrmSize &rNew ) +static void lcl_ProcessBoxSize( std::vector<SwTableFormatCmp*> &rFormatCmp, SwTableBox *pBox, const SwFormatFrameSize &rNew ) { SwTableLines &rLines = pBox->GetTabLines(); if ( !rLines.empty() ) { - SwFormatFrmSize aSz( rNew ); + SwFormatFrameSize aSz( rNew ); aSz.SetHeight( rNew.GetHeight() ? rNew.GetHeight() / rLines.size() : 0 ); for ( auto pLine : rLines ) ::lcl_ProcessRowSize( rFormatCmp, pLine, aSz ); @@ -363,7 +363,7 @@ void SwDoc::GetRowSplit( const SwCursor& rCursor, SwFormatRowSplit *& rpSz ) * Of course we can only touch every Line once. */ -void SwDoc::SetRowHeight( const SwCursor& rCursor, const SwFormatFrmSize &rNew ) +void SwDoc::SetRowHeight( const SwCursor& rCursor, const SwFormatFrameSize &rNew ) { SwTableNode* pTableNd = rCursor.GetPoint()->nNode.GetNode().FindTableNode(); if( pTableNd ) @@ -389,7 +389,7 @@ void SwDoc::SetRowHeight( const SwCursor& rCursor, const SwFormatFrmSize &rNew ) } } -void SwDoc::GetRowHeight( const SwCursor& rCursor, SwFormatFrmSize *& rpSz ) +void SwDoc::GetRowHeight( const SwCursor& rCursor, SwFormatFrameSize *& rpSz ) { rpSz = nullptr; @@ -401,13 +401,13 @@ void SwDoc::GetRowHeight( const SwCursor& rCursor, SwFormatFrmSize *& rpSz ) if( !aRowArr.empty() ) { - rpSz = &(SwFormatFrmSize&)aRowArr[0]->GetFrameFormat()->GetFrmSize(); + rpSz = &(SwFormatFrameSize&)aRowArr[0]->GetFrameFormat()->GetFrameSize(); if (rpSz) { for ( auto pLn : aRowArr ) { - if ( *rpSz != pLn->GetFrameFormat()->GetFrmSize() ) + if ( *rpSz != pLn->GetFrameFormat()->GetFrameSize() ) { rpSz = nullptr; break; @@ -415,7 +415,7 @@ void SwDoc::GetRowHeight( const SwCursor& rCursor, SwFormatFrmSize *& rpSz ) } } if ( rpSz ) - rpSz = new SwFormatFrmSize( *rpSz ); + rpSz = new SwFormatFrameSize( *rpSz ); } } } @@ -437,15 +437,15 @@ bool SwDoc::BalanceRowHeight( const SwCursor& rCursor, bool bTstOnly ) for ( auto pLn : aRowArr ) { - SwIterator<SwFrm,SwFormat> aIter( *pLn->GetFrameFormat() ); - SwFrm* pFrm = aIter.First(); - while ( pFrm ) + SwIterator<SwFrame,SwFormat> aIter( *pLn->GetFrameFormat() ); + SwFrame* pFrame = aIter.First(); + while ( pFrame ) { - nHeight = std::max( nHeight, pFrm->Frm().Height() ); - pFrm = aIter.Next(); + nHeight = std::max( nHeight, pFrame->Frame().Height() ); + pFrame = aIter.Next(); } } - SwFormatFrmSize aNew( ATT_MIN_SIZE, 0, nHeight ); + SwFormatFrameSize aNew( ATT_MIN_SIZE, 0, nHeight ); if (GetIDocumentUndoRedo().DoesUndo()) { @@ -519,28 +519,28 @@ bool SwDoc::GetRowBackground( const SwCursor& rCursor, SvxBrushItem &rToFill ) return bRet; } -inline void InsertCell( std::vector<SwCellFrm*>& rCellArr, SwCellFrm* pCellFrm ) +inline void InsertCell( std::vector<SwCellFrame*>& rCellArr, SwCellFrame* pCellFrame ) { - if( rCellArr.end() == std::find( rCellArr.begin(), rCellArr.end(), pCellFrm ) ) - rCellArr.push_back( pCellFrm ); + if( rCellArr.end() == std::find( rCellArr.begin(), rCellArr.end(), pCellFrame ) ) + rCellArr.push_back( pCellFrame ); } -static void lcl_CollectCells( std::vector<SwCellFrm*> &rArr, const SwRect &rUnion, - SwTabFrm *pTab ) +static void lcl_CollectCells( std::vector<SwCellFrame*> &rArr, const SwRect &rUnion, + SwTabFrame *pTab ) { - SwLayoutFrm *pCell = pTab->FirstCell(); + SwLayoutFrame *pCell = pTab->FirstCell(); do { // If the Cell contains a CellFrame, we need to use it // in order to get to the Cell - while ( !pCell->IsCellFrm() ) + while ( !pCell->IsCellFrame() ) pCell = pCell->GetUpper(); OSL_ENSURE( pCell, "Frame is not a Cell" ); - if ( rUnion.IsOver( pCell->Frm() ) ) - ::InsertCell( rArr, static_cast<SwCellFrm*>(pCell) ); + if ( rUnion.IsOver( pCell->Frame() ) ) + ::InsertCell( rArr, static_cast<SwCellFrame*>(pCell) ); // Make sure the Cell is left (Areas) - SwLayoutFrm *pTmp = pCell; + SwLayoutFrame *pTmp = pCell; do { pTmp = pTmp->GetNextLayoutLeaf(); } while ( pCell->IsAnLower( pTmp ) ); @@ -555,7 +555,7 @@ void SwDoc::SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet ) if( !pTableNd ) return ; - SwLayoutFrm *pStart, *pEnd; + SwLayoutFrame *pStart, *pEnd; ::lcl_GetStartEndCell( rCursor, pStart, pEnd ); SwSelUnions aUnions; @@ -620,11 +620,11 @@ void SwDoc::SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet ) for ( SwSelUnions::size_type i = 0; i < aUnions.size(); ++i ) { SwSelUnion *pUnion = &aUnions[i]; - SwTabFrm *pTab = pUnion->GetTable(); + SwTabFrame *pTab = pUnion->GetTable(); const SwRect &rUnion = pUnion->GetUnion(); const bool bLast = (i == aUnions.size() - 1); - std::vector<SwCellFrm*> aCellArr; + std::vector<SwCellFrame*> aCellArr; aCellArr.reserve( 255 ); ::lcl_CollectCells( aCellArr, pUnion->GetUnion(), pTab ); @@ -643,17 +643,17 @@ void SwDoc::SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet ) bool bTopOver, bLeftOver, bRightOver, bBottomOver; if ( bVert ) { - bTopOver = pCell->Frm().Right() >= rUnion.Right(); - bLeftOver = pCell->Frm().Top() <= rUnion.Top(); - bRightOver = pCell->Frm().Bottom() >= rUnion.Bottom(); - bBottomOver = pCell->Frm().Left() <= rUnion.Left(); + bTopOver = pCell->Frame().Right() >= rUnion.Right(); + bLeftOver = pCell->Frame().Top() <= rUnion.Top(); + bRightOver = pCell->Frame().Bottom() >= rUnion.Bottom(); + bBottomOver = pCell->Frame().Left() <= rUnion.Left(); } else { - bTopOver = pCell->Frm().Top() <= rUnion.Top(); - bLeftOver = pCell->Frm().Left() <= rUnion.Left(); - bRightOver = pCell->Frm().Right() >= rUnion.Right(); - bBottomOver = pCell->Frm().Bottom() >= rUnion.Bottom(); + bTopOver = pCell->Frame().Top() <= rUnion.Top(); + bLeftOver = pCell->Frame().Left() <= rUnion.Left(); + bRightOver = pCell->Frame().Right() >= rUnion.Right(); + bBottomOver = pCell->Frame().Bottom() >= rUnion.Bottom(); } if ( bRTL ) @@ -800,11 +800,11 @@ void SwDoc::SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet ) SwHTMLTableLayout *pTableLayout = rTable.GetHTMLTableLayout(); if( pTableLayout ) { - SwContentFrm* pFrm = rCursor.GetContentNode()->getLayoutFrm( rCursor.GetContentNode()->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ); - SwTabFrm* pTabFrm = pFrm->ImplFindTabFrm(); + SwContentFrame* pFrame = rCursor.GetContentNode()->getLayoutFrame( rCursor.GetContentNode()->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ); + SwTabFrame* pTabFrame = pFrame->ImplFindTabFrame(); pTableLayout->BordersChanged( - pTableLayout->GetBrowseWidthByTabFrm( *pTabFrm ), true ); + pTableLayout->GetBrowseWidthByTabFrame( *pTabFrame ), true ); } SwTableFormatCmp::Delete( aFormatCmp ); ::ClearFEShellTabCols(); @@ -839,7 +839,7 @@ void SwDoc::SetTabLineStyle( const SwCursor& rCursor, if( !pTableNd ) return ; - SwLayoutFrm *pStart, *pEnd; + SwLayoutFrame *pStart, *pEnd; ::lcl_GetStartEndCell( rCursor, pStart, pEnd ); SwSelUnions aUnions; @@ -856,8 +856,8 @@ void SwDoc::SetTabLineStyle( const SwCursor& rCursor, for( auto &rU : aUnions ) { SwSelUnion *pUnion = &rU; - SwTabFrm *pTab = pUnion->GetTable(); - std::vector<SwCellFrm*> aCellArr; + SwTabFrame *pTab = pUnion->GetTable(); + std::vector<SwCellFrame*> aCellArr; aCellArr.reserve( 255 ); ::lcl_CollectCells( aCellArr, pUnion->GetUnion(), pTab ); @@ -895,11 +895,11 @@ void SwDoc::SetTabLineStyle( const SwCursor& rCursor, SwHTMLTableLayout *pTableLayout = rTable.GetHTMLTableLayout(); if( pTableLayout ) { - SwContentFrm* pFrm = rCursor.GetContentNode()->getLayoutFrm( rCursor.GetContentNode()->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ); - SwTabFrm* pTabFrm = pFrm->ImplFindTabFrm(); + SwContentFrame* pFrame = rCursor.GetContentNode()->getLayoutFrame( rCursor.GetContentNode()->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ); + SwTabFrame* pTabFrame = pFrame->ImplFindTabFrame(); pTableLayout->BordersChanged( - pTableLayout->GetBrowseWidthByTabFrm( *pTabFrm ), true ); + pTableLayout->GetBrowseWidthByTabFrame( *pTabFrame ), true ); } ::ClearFEShellTabCols(); getIDocumentState().SetModified(); @@ -913,7 +913,7 @@ void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet ) if( !pTableNd ) return ; - SwLayoutFrm *pStart, *pEnd; + SwLayoutFrame *pStart, *pEnd; ::lcl_GetStartEndCell( rCursor, pStart, pEnd ); SwSelUnions aUnions; @@ -938,14 +938,14 @@ void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet ) for ( SwSelUnions::size_type i = 0; i < aUnions.size(); ++i ) { SwSelUnion *pUnion = &aUnions[i]; - const SwTabFrm *pTab = pUnion->GetTable(); + const SwTabFrame *pTab = pUnion->GetTable(); const SwRect &rUnion = pUnion->GetUnion(); const bool bFirst = i == 0; const bool bLast = (i == aUnions.size() - 1); - std::vector<SwCellFrm*> aCellArr; + std::vector<SwCellFrame*> aCellArr; aCellArr.reserve(255); - ::lcl_CollectCells( aCellArr, rUnion, const_cast<SwTabFrm*>(pTab) ); + ::lcl_CollectCells( aCellArr, rUnion, const_cast<SwTabFrame*>(pTab) ); for ( auto pCell : aCellArr ) { @@ -954,17 +954,17 @@ void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet ) bool bTopOver, bLeftOver, bRightOver, bBottomOver; if ( bVert ) { - bTopOver = pCell->Frm().Right() >= rUnion.Right(); - bLeftOver = pCell->Frm().Top() <= rUnion.Top(); - bRightOver = pCell->Frm().Bottom() >= rUnion.Bottom(); - bBottomOver = pCell->Frm().Left() <= rUnion.Left(); + bTopOver = pCell->Frame().Right() >= rUnion.Right(); + bLeftOver = pCell->Frame().Top() <= rUnion.Top(); + bRightOver = pCell->Frame().Bottom() >= rUnion.Bottom(); + bBottomOver = pCell->Frame().Left() <= rUnion.Left(); } else { - bTopOver = pCell->Frm().Top() <= rUnion.Top(); - bLeftOver = pCell->Frm().Left() <= rUnion.Left(); - bRightOver = pCell->Frm().Right() >= rUnion.Right(); - bBottomOver = pCell->Frm().Bottom() >= rUnion.Bottom(); + bTopOver = pCell->Frame().Top() <= rUnion.Top(); + bLeftOver = pCell->Frame().Left() <= rUnion.Left(); + bRightOver = pCell->Frame().Right() >= rUnion.Right(); + bBottomOver = pCell->Frame().Bottom() >= rUnion.Bottom(); } if ( bRTL ) @@ -1162,11 +1162,11 @@ void SwDoc::SetBoxAttr( const SwCursor& rCursor, const SfxPoolItem &rNew ) SwHTMLTableLayout *pTableLayout = rTable.GetHTMLTableLayout(); if( pTableLayout ) { - SwContentFrm* pFrm = rCursor.GetContentNode()->getLayoutFrm( rCursor.GetContentNode()->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ); - SwTabFrm* pTabFrm = pFrm->ImplFindTabFrm(); + SwContentFrame* pFrame = rCursor.GetContentNode()->getLayoutFrame( rCursor.GetContentNode()->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ); + SwTabFrame* pTabFrame = pFrame->ImplFindTabFrame(); pTableLayout->Resize( - pTableLayout->GetBrowseWidthByTabFrm( *pTabFrm ), true ); + pTableLayout->GetBrowseWidthByTabFrame( *pTabFrame ), true ); } SwTableFormatCmp::Delete( aFormatCmp ); getIDocumentState().SetModified(); @@ -1204,7 +1204,7 @@ bool SwDoc::GetBoxAttr( const SwCursor& rCursor, SfxPoolItem& rToFill ) case RES_FRAMEDIR: { const SvxFrameDirectionItem& rDir = - aBoxes[i]->GetFrameFormat()->GetFrmDir(); + aBoxes[i]->GetFrameFormat()->GetFrameDir(); if( !bOneFound ) { static_cast<SvxFrameDirectionItem&>(rToFill) = rDir; @@ -1254,26 +1254,26 @@ sal_uInt16 SwDoc::GetBoxAlign( const SwCursor& rCursor ) return nAlign; } -static sal_uInt16 lcl_CalcCellFit( const SwLayoutFrm *pCell ) +static sal_uInt16 lcl_CalcCellFit( const SwLayoutFrame *pCell ) { SwTwips nRet = 0; - const SwFrm *pFrm = pCell->Lower(); // The whole Line + const SwFrame *pFrame = pCell->Lower(); // The whole Line SWRECTFN( pCell ) - while ( pFrm ) + while ( pFrame ) { - const SwTwips nAdd = (pFrm->Frm().*fnRect->fnGetWidth)() - - (pFrm->Prt().*fnRect->fnGetWidth)(); + const SwTwips nAdd = (pFrame->Frame().*fnRect->fnGetWidth)() - + (pFrame->Prt().*fnRect->fnGetWidth)(); - // pFrm does not necessarily have to be a SwTextFrm! - const SwTwips nCalcFitToContent = pFrm->IsTextFrm() ? - const_cast<SwTextFrm*>(static_cast<const SwTextFrm*>(pFrm))->CalcFitToContent() : - (pFrm->Prt().*fnRect->fnGetWidth)(); + // pFrame does not necessarily have to be a SwTextFrame! + const SwTwips nCalcFitToContent = pFrame->IsTextFrame() ? + const_cast<SwTextFrame*>(static_cast<const SwTextFrame*>(pFrame))->CalcFitToContent() : + (pFrame->Prt().*fnRect->fnGetWidth)(); nRet = std::max( nRet, nCalcFitToContent + nAdd ); - pFrm = pFrm->GetNext(); + pFrame = pFrame->GetNext(); } // Surrounding border as well as left and Right Border also need to be respected - nRet += (pCell->Frm().*fnRect->fnGetWidth)() - + nRet += (pCell->Frame().*fnRect->fnGetWidth)() - (pCell->Prt().*fnRect->fnGetWidth)(); // To compensate for the accuracy of calculation later on in SwTable::SetTabCols @@ -1296,12 +1296,12 @@ static sal_uInt16 lcl_CalcCellFit( const SwLayoutFrm *pCell ) * the desired one. It's overwritten if it's smaller. */ static void lcl_CalcSubColValues( std::vector<sal_uInt16> &rToFill, const SwTabCols &rCols, - const SwLayoutFrm *pCell, const SwLayoutFrm *pTab, + const SwLayoutFrame *pCell, const SwLayoutFrame *pTab, bool bWishValues ) { const sal_uInt16 nWish = bWishValues ? ::lcl_CalcCellFit( pCell ) : - MINLAY + sal_uInt16(pCell->Frm().Width() - pCell->Prt().Width()); + MINLAY + sal_uInt16(pCell->Frame().Width() - pCell->Prt().Width()); SWRECTFN( pTab ) @@ -1313,14 +1313,14 @@ static void lcl_CalcSubColValues( std::vector<sal_uInt16> &rToFill, const SwTabC nColRight += rCols.GetLeftMin(); // Adapt values to the proportions of the Table (Follows) - if ( rCols.GetLeftMin() != (pTab->Frm().*fnRect->fnGetLeft)() ) + if ( rCols.GetLeftMin() != (pTab->Frame().*fnRect->fnGetLeft)() ) { - const long nDiff = (pTab->Frm().*fnRect->fnGetLeft)() - rCols.GetLeftMin(); + const long nDiff = (pTab->Frame().*fnRect->fnGetLeft)() - rCols.GetLeftMin(); nColLeft += nDiff; nColRight += nDiff; } - const long nCellLeft = (pCell->Frm().*fnRect->fnGetLeft)(); - const long nCellRight = (pCell->Frm().*fnRect->fnGetRight)(); + const long nCellLeft = (pCell->Frame().*fnRect->fnGetLeft)(); + const long nCellRight = (pCell->Frame().*fnRect->fnGetRight)(); // Calculate overlapping value long nWidth = 0; @@ -1330,9 +1330,9 @@ static void lcl_CalcSubColValues( std::vector<sal_uInt16> &rToFill, const SwTabC nWidth = nCellRight - nColLeft; else if ( nColLeft >= nCellLeft && nColRight <= nCellRight ) nWidth = nColRight - nColLeft; - if ( nWidth && pCell->Frm().Width() ) + if ( nWidth && pCell->Frame().Width() ) { - long nTmp = nWidth * nWish / pCell->Frm().Width(); + long nTmp = nWidth * nWish / pCell->Frame().Width(); if ( sal_uInt16(nTmp) > rToFill[i] ) rToFill[i] = sal_uInt16(nTmp); } @@ -1357,7 +1357,7 @@ static void lcl_CalcSubColValues( std::vector<sal_uInt16> &rToFill, const SwTabC * Selection. */ static void lcl_CalcColValues( std::vector<sal_uInt16> &rToFill, const SwTabCols &rCols, - const SwLayoutFrm *pStart, const SwLayoutFrm *pEnd, + const SwLayoutFrame *pStart, const SwLayoutFrame *pEnd, bool bWishValues ) { SwSelUnions aUnions; @@ -1367,21 +1367,21 @@ static void lcl_CalcColValues( std::vector<sal_uInt16> &rToFill, const SwTabCols for ( auto &rU : aUnions ) { SwSelUnion *pSelUnion = &rU; - const SwTabFrm *pTab = pSelUnion->GetTable(); + const SwTabFrame *pTab = pSelUnion->GetTable(); const SwRect &rUnion = pSelUnion->GetUnion(); SWRECTFN( pTab ) bool bRTL = pTab->IsRightToLeft(); - const SwLayoutFrm *pCell = pTab->FirstCell(); + const SwLayoutFrame *pCell = pTab->FirstCell(); if (!pCell) continue; do { - if ( pCell->IsCellFrm() && pCell->FindTabFrm() == pTab && ::IsFrmInTableSel( rUnion, pCell ) ) + if ( pCell->IsCellFrame() && pCell->FindTabFrame() == pTab && ::IsFrameInTableSel( rUnion, pCell ) ) { - const long nCLeft = (pCell->Frm().*fnRect->fnGetLeft)(); - const long nCRight = (pCell->Frm().*fnRect->fnGetRight)(); + const long nCLeft = (pCell->Frame().*fnRect->fnGetLeft)(); + const long nCRight = (pCell->Frame().*fnRect->fnGetRight)(); bool bNotInCols = true; @@ -1404,9 +1404,9 @@ static void lcl_CalcColValues( std::vector<sal_uInt16> &rToFill, const SwTabCols // Adapt values to the proportions of the Table (Follows) long nLeftA = nColLeft; long nRightA = nColRight; - if ( rCols.GetLeftMin() != sal_uInt16((pTab->Frm().*fnRect->fnGetLeft)()) ) + if ( rCols.GetLeftMin() != sal_uInt16((pTab->Frame().*fnRect->fnGetLeft)()) ) { - const long nDiff = (pTab->Frm().*fnRect->fnGetLeft)() - rCols.GetLeftMin(); + const long nDiff = (pTab->Frame().*fnRect->fnGetLeft)() - rCols.GetLeftMin(); nLeftA += nDiff; nRightA += nDiff; } @@ -1422,7 +1422,7 @@ static void lcl_CalcColValues( std::vector<sal_uInt16> &rToFill, const SwTabCols nFit = nWish; } else - { const sal_uInt16 nMin = MINLAY + sal_uInt16(pCell->Frm().Width() - + { const sal_uInt16 nMin = MINLAY + sal_uInt16(pCell->Frame().Width() - pCell->Prt().Width()); if ( !nFit || nMin < nFit ) nFit = nMin; @@ -1436,32 +1436,32 @@ static void lcl_CalcColValues( std::vector<sal_uInt16> &rToFill, const SwTabCols } do { pCell = pCell->GetNextLayoutLeaf(); - } while( pCell && pCell->Frm().Width() == 0 ); + } while( pCell && pCell->Frame().Width() == 0 ); } while ( pCell && pTab->IsAnLower( pCell ) ); } } void SwDoc::AdjustCellWidth( const SwCursor& rCursor, bool bBalance ) { - // Check whether the current Crsr has it's Point/Mark in a Table + // Check whether the current Cursor has it's Point/Mark in a Table SwContentNode* pCntNd = rCursor.GetPoint()->nNode.GetNode().GetContentNode(); SwTableNode* pTableNd = pCntNd ? pCntNd->FindTableNode() : nullptr; if( !pTableNd ) return ; - SwLayoutFrm *pStart, *pEnd; + SwLayoutFrame *pStart, *pEnd; ::lcl_GetStartEndCell( rCursor, pStart, pEnd ); // Collect TabCols; we reset the Table with them - SwFrm* pBoxFrm = pStart; - while( pBoxFrm && !pBoxFrm->IsCellFrm() ) - pBoxFrm = pBoxFrm->GetUpper(); + SwFrame* pBoxFrame = pStart; + while( pBoxFrame && !pBoxFrame->IsCellFrame() ) + pBoxFrame = pBoxFrame->GetUpper(); - if ( !pBoxFrm ) + if ( !pBoxFrame ) return; // Robust SwTabCols aTabCols; - GetTabCols( aTabCols, nullptr, static_cast<SwCellFrm*>(pBoxFrm) ); + GetTabCols( aTabCols, nullptr, static_cast<SwCellFrame*>(pBoxFrame) ); if ( ! aTabCols.Count() ) return; @@ -1472,10 +1472,10 @@ void SwDoc::AdjustCellWidth( const SwCursor& rCursor, bool bBalance ) ::lcl_CalcColValues( aWish, aTabCols, pStart, pEnd, true ); // It's more robust if we calculate the minimum values for the whole Table - const SwTabFrm *pTab = pStart->ImplFindTabFrm(); - pStart = const_cast<SwLayoutFrm*>(static_cast<SwLayoutFrm const *>(pTab->FirstCell())); - pEnd = const_cast<SwLayoutFrm*>(pTab->FindLastContent()->GetUpper()); - while( !pEnd->IsCellFrm() ) + const SwTabFrame *pTab = pStart->ImplFindTabFrame(); + pStart = const_cast<SwLayoutFrame*>(static_cast<SwLayoutFrame const *>(pTab->FirstCell())); + pEnd = const_cast<SwLayoutFrame*>(pTab->FindLastContent()->GetUpper()); + while( !pEnd->IsCellFrame() ) pEnd = pEnd->GetUpper(); ::lcl_CalcColValues( aMins, aTabCols, pStart, pEnd, false ); @@ -1560,7 +1560,7 @@ void SwDoc::AdjustCellWidth( const SwCursor& rCursor, bool bBalance ) const sal_Int16 nOriHori = pFormat->GetHoriOrient().GetHoriOrient(); // We can leave the "real" work to the SwTable now - SetTabCols( aTabCols, false, nullptr, static_cast<SwCellFrm*>(pBoxFrm) ); + SetTabCols( aTabCols, false, nullptr, static_cast<SwCellFrame*>(pBoxFrame) ); // Alignment might have been changed in SetTabCols; restore old value const SwFormatHoriOrient &rHori = pFormat->GetHoriOrient(); diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx index 9c0612cfdbdd..6b348575c743 100644 --- a/sw/source/core/docnode/node.cxx +++ b/sw/source/core/docnode/node.cxx @@ -380,19 +380,19 @@ bool SwNode::IsInVisibleArea( SwViewShell const * pSh ) const if( pSh ) { - const SwFrm* pFrm; - if( pNd && nullptr != ( pFrm = pNd->getLayoutFrm( pSh->GetLayout(), nullptr, nullptr, false ) ) ) + const SwFrame* pFrame; + if( pNd && nullptr != ( pFrame = pNd->getLayoutFrame( pSh->GetLayout(), nullptr, nullptr, false ) ) ) { - if ( pFrm->IsInTab() ) - pFrm = pFrm->FindTabFrm(); + if ( pFrame->IsInTab() ) + pFrame = pFrame->FindTabFrame(); - if( !pFrm->IsValid() ) + if( !pFrame->IsValid() ) do - { pFrm = pFrm->FindPrev(); - } while ( pFrm && !pFrm->IsValid() ); + { pFrame = pFrame->FindPrev(); + } while ( pFrame && !pFrame->IsValid() ); - if( !pFrm || pSh->VisArea().IsOver( pFrm->Frm() ) ) + if( !pFrame || pSh->VisArea().IsOver( pFrame->Frame() ) ) bRet = true; } } @@ -419,9 +419,9 @@ bool SwNode::IsProtect() const if( nullptr != ( pSttNd = FindTableBoxStartNode() ) ) { - SwContentFrm* pCFrm; - if( IsContentNode() && nullptr != (pCFrm = static_cast<const SwContentNode*>(this)->getLayoutFrm( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ) )) - return pCFrm->IsProtected(); + SwContentFrame* pCFrame; + if( IsContentNode() && nullptr != (pCFrame = static_cast<const SwContentNode*>(this)->getLayoutFrame( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ) )) + return pCFrame->IsProtected(); const SwTableBox* pBox = pSttNd->FindTableNode()->GetTable(). GetTableBox( pSttNd->GetIndex() ); @@ -483,10 +483,10 @@ const SwPageDesc* SwNode::FindPageDesc( bool bCalcLay, // Are we going through the layout? if( !pPgDesc ) { - const SwFrm* pFrm; - const SwPageFrm* pPage; - if( pNode && nullptr != ( pFrm = pNode->getLayoutFrm( pNode->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, nullptr, bCalcLay ) ) && - nullptr != ( pPage = pFrm->FindPageFrm() ) ) + const SwFrame* pFrame; + const SwPageFrame* pPage; + if( pNode && nullptr != ( pFrame = pNode->getLayoutFrame( pNode->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, nullptr, bCalcLay ) ) && + nullptr != ( pPage = pFrame->FindPageFrame() ) ) { pPgDesc = pPage->GetPageDesc(); if ( pPgDescNdIdx ) @@ -707,9 +707,9 @@ SwFrameFormat* SwNode::GetFlyFormat() const { if( IsContentNode() ) { - SwContentFrm* pFrm = SwIterator<SwContentFrm,SwContentNode>( *static_cast<const SwContentNode*>(this) ).First(); - if( pFrm ) - pRet = pFrm->FindFlyFrm()->GetFormat(); + SwContentFrame* pFrame = SwIterator<SwContentFrame,SwContentNode>( *static_cast<const SwContentNode*>(this) ).First(); + if( pFrame ) + pRet = pFrame->FindFlyFrame()->GetFormat(); } if( !pRet ) { @@ -779,11 +779,11 @@ const SwTextNode* SwNode::FindOutlineNodeOfLevel( sal_uInt8 nLvl ) const const SwContentNode* pCNd = GetContentNode(); Point aPt( 0, 0 ); - const SwFrm* pFrm = pRet->getLayoutFrm( pRet->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ), - * pMyFrm = pCNd ? pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ) : nullptr; - const SwPageFrm* pPgFrm = pFrm ? pFrm->FindPageFrm() : nullptr; - if( pPgFrm && pMyFrm && - pPgFrm->Frm().Top() > pMyFrm->Frm().Top() ) + const SwFrame* pFrame = pRet->getLayoutFrame( pRet->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ), + * pMyFrame = pCNd ? pCNd->getLayoutFrame( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ) : nullptr; + const SwPageFrame* pPgFrame = pFrame ? pFrame->FindPageFrame() : nullptr; + if( pPgFrame && pMyFrame && + pPgFrame->Frame().Top() > pMyFrame->Frame().Top() ) { // The one asking precedes the Page, thus its invalid pRet = nullptr; @@ -991,7 +991,7 @@ SwEndNode::SwEndNode( SwNodes& rNds, sal_uLong nPos, SwStartNode& rSttNd ) SwContentNode::SwContentNode( const SwNodeIndex &rWhere, const sal_uInt8 nNdType, SwFormatColl *pColl ) - : SwModify( pColl ), // CrsrsShell, FrameFormat, + : SwModify( pColl ), // CursorsShell, FrameFormat, SwNode( rWhere, nNdType ), m_pCondColl( nullptr ), mbSetModifyAtAttr( false ) @@ -1000,9 +1000,9 @@ SwContentNode::SwContentNode( const SwNodeIndex &rWhere, const sal_uInt8 nNdType SwContentNode::~SwContentNode() { - // The base class SwClient of SwFrm excludes itself from the dependency list! + // The base class SwClient of SwFrame excludes itself from the dependency list! // Thus, we need to delete all Frames in the dependency list. - DelFrms(false); + DelFrames(false); delete m_pCondColl; @@ -1106,32 +1106,32 @@ bool SwContentNode::InvalidateNumRule() return nullptr != pRule; } -SwContentFrm *SwContentNode::getLayoutFrm( const SwRootFrm* _pRoot, - const Point* pPoint, const SwPosition *pPos, const bool bCalcFrm ) const +SwContentFrame *SwContentNode::getLayoutFrame( const SwRootFrame* _pRoot, + const Point* pPoint, const SwPosition *pPos, const bool bCalcFrame ) const { - return static_cast<SwContentFrm*>( ::GetFrmOfModify( _pRoot, *const_cast<SwModify*>(static_cast<SwModify const *>(this)), FRM_CNTNT, - pPoint, pPos, bCalcFrm )); + return static_cast<SwContentFrame*>( ::GetFrameOfModify( _pRoot, *const_cast<SwModify*>(static_cast<SwModify const *>(this)), FRM_CNTNT, + pPoint, pPos, bCalcFrame )); } SwRect SwContentNode::FindLayoutRect( const bool bPrtArea, const Point* pPoint, - const bool bCalcFrm ) const + const bool bCalcFrame ) const { SwRect aRet; - SwContentFrm* pFrm = static_cast<SwContentFrm*>( ::GetFrmOfModify( nullptr, *const_cast<SwModify*>(static_cast<SwModify const *>(this)), - FRM_CNTNT, pPoint, nullptr, bCalcFrm ) ); - if( pFrm ) - aRet = bPrtArea ? pFrm->Prt() : pFrm->Frm(); + SwContentFrame* pFrame = static_cast<SwContentFrame*>( ::GetFrameOfModify( nullptr, *const_cast<SwModify*>(static_cast<SwModify const *>(this)), + FRM_CNTNT, pPoint, nullptr, bCalcFrame ) ); + if( pFrame ) + aRet = bPrtArea ? pFrame->Prt() : pFrame->Frame(); return aRet; } -SwRect SwContentNode::FindPageFrmRect( const bool bPrtArea, const Point* pPoint, - const bool bCalcFrm ) const +SwRect SwContentNode::FindPageFrameRect( const bool bPrtArea, const Point* pPoint, + const bool bCalcFrame ) const { SwRect aRet; - SwFrm* pFrm = ::GetFrmOfModify( nullptr, *const_cast<SwModify*>(static_cast<SwModify const *>(this)), - FRM_CNTNT, pPoint, nullptr, bCalcFrm ); - if( pFrm && nullptr != ( pFrm = pFrm->FindPageFrm() )) - aRet = bPrtArea ? pFrm->Prt() : pFrm->Frm(); + SwFrame* pFrame = ::GetFrameOfModify( nullptr, *const_cast<SwModify*>(static_cast<SwModify const *>(this)), + FRM_CNTNT, pPoint, nullptr, bCalcFrame ); + if( pFrame && nullptr != ( pFrame = pFrame->FindPageFrame() )) + aRet = bPrtArea ? pFrame->Prt() : pFrame->Frame(); return aRet; } @@ -1167,7 +1167,7 @@ SwFormatColl *SwContentNode::ChgFormatColl( SwFormatColl *pNewColl ) } if ( IsInCache() ) { - SwFrm::GetCache().Delete( this ); + SwFrame::GetCache().Delete( this ); SetInCache( false ); } return pOldColl; @@ -1271,7 +1271,7 @@ bool SwContentNode::GoPrevious(SwIndex * pIdx, sal_uInt16 nMode ) const * Creates all Views for the Doc for this Node. * The created ContentFrames are attached to the corresponding Layout. */ -void SwContentNode::MakeFrms( SwContentNode& rNode ) +void SwContentNode::MakeFrames( SwContentNode& rNode ) { OSL_ENSURE( &rNode != this, "No ContentNode or CopyNode and new Node identical." ); @@ -1279,31 +1279,31 @@ void SwContentNode::MakeFrms( SwContentNode& rNode ) if( !HasWriterListeners() || &rNode == this ) // Do we actually have Frames? return; - SwFrm *pFrm; - SwLayoutFrm *pUpper; + SwFrame *pFrame; + SwLayoutFrame *pUpper; // Create Frames for Nodes which come after the Table? OSL_ENSURE( FindTableNode() == rNode.FindTableNode(), "Table confusion" ); SwNode2Layout aNode2Layout( *this, rNode.GetIndex() ); - while( nullptr != (pUpper = aNode2Layout.UpperFrm( pFrm, rNode )) ) + while( nullptr != (pUpper = aNode2Layout.UpperFrame( pFrame, rNode )) ) { - SwFrm *pNew = rNode.MakeFrm( pUpper ); - pNew->Paste( pUpper, pFrm ); + SwFrame *pNew = rNode.MakeFrame( pUpper ); + pNew->Paste( pUpper, pFrame ); // #i27138# // notify accessibility paragraphs objects about changed // CONTENT_FLOWS_FROM/_TO relation. // Relation CONTENT_FLOWS_FROM for next paragraph will change // and relation CONTENT_FLOWS_TO for previous paragraph will change. - if ( pNew->IsTextFrm() ) + if ( pNew->IsTextFrame() ) { - SwViewShell* pViewShell( pNew->getRootFrm()->GetCurrShell() ); + SwViewShell* pViewShell( pNew->getRootFrame()->GetCurrShell() ); if ( pViewShell && pViewShell->GetLayout() && pViewShell->GetLayout()->IsAnyShellAccessible() ) { pViewShell->InvalidateAccessibleParaFlowRelation( - dynamic_cast<SwTextFrm*>(pNew->FindNextCnt( true )), - dynamic_cast<SwTextFrm*>(pNew->FindPrevCnt( true )) ); + dynamic_cast<SwTextFrame*>(pNew->FindNextCnt( true )), + dynamic_cast<SwTextFrame*>(pNew->FindPrevCnt( true )) ); } } } @@ -1315,37 +1315,37 @@ void SwContentNode::MakeFrms( SwContentNode& rNode ) * * An input param to identify if the acc table should be disposed. */ -void SwContentNode::DelFrms( bool bIsDisposeAccTable ) +void SwContentNode::DelFrames( bool bIsDisposeAccTable ) { if( !HasWriterListeners() ) return; - SwIterator<SwContentFrm,SwContentNode> aIter( *this ); - for( SwContentFrm* pFrm = aIter.First(); pFrm; pFrm = aIter.Next() ) + SwIterator<SwContentFrame,SwContentNode> aIter( *this ); + for( SwContentFrame* pFrame = aIter.First(); pFrame; pFrame = aIter.Next() ) { // #i27138# // notify accessibility paragraphs objects about changed // CONTENT_FLOWS_FROM/_TO relation. // Relation CONTENT_FLOWS_FROM for current next paragraph will change // and relation CONTENT_FLOWS_TO for current previous paragraph will change. - if ( pFrm->IsTextFrm() ) + if ( pFrame->IsTextFrame() ) { - SwViewShell* pViewShell( pFrm->getRootFrm()->GetCurrShell() ); + SwViewShell* pViewShell( pFrame->getRootFrame()->GetCurrShell() ); if ( pViewShell && pViewShell->GetLayout() && pViewShell->GetLayout()->IsAnyShellAccessible() ) { pViewShell->InvalidateAccessibleParaFlowRelation( - dynamic_cast<SwTextFrm*>(pFrm->FindNextCnt( true )), - dynamic_cast<SwTextFrm*>(pFrm->FindPrevCnt( true )) ); + dynamic_cast<SwTextFrame*>(pFrame->FindNextCnt( true )), + dynamic_cast<SwTextFrame*>(pFrame->FindPrevCnt( true )) ); } } - if( pFrm->IsFollow() ) + if( pFrame->IsFollow() ) { - SwContentFrm* pMaster = pFrm->FindMaster(); - pMaster->SetFollow( pFrm->GetFollow() ); + SwContentFrame* pMaster = pFrame->FindMaster(); + pMaster->SetFollow( pFrame->GetFollow() ); } - pFrm->SetFollow( nullptr );//So it doesn't get funny ideas. + pFrame->SetFollow( nullptr );//So it doesn't get funny ideas. //Otherwise it could be possible that a follow //gets destroyed before its master. Following //the now invalid pointer will then lead to an @@ -1353,30 +1353,30 @@ void SwContentNode::DelFrms( bool bIsDisposeAccTable ) //crushed here because we'll destroy all of it //anyway. - if( pFrm->GetUpper() && pFrm->IsInFootnote() && !pFrm->GetIndNext() && - !pFrm->GetIndPrev() ) + if( pFrame->GetUpper() && pFrame->IsInFootnote() && !pFrame->GetIndNext() && + !pFrame->GetIndPrev() ) { - SwFootnoteFrm *pFootnote = pFrm->FindFootnoteFrm(); - OSL_ENSURE( pFootnote, "You promised a FootnoteFrm?" ); - SwContentFrm* pCFrm; + SwFootnoteFrame *pFootnote = pFrame->FindFootnoteFrame(); + OSL_ENSURE( pFootnote, "You promised a FootnoteFrame?" ); + SwContentFrame* pCFrame; if( !pFootnote->GetFollow() && !pFootnote->GetMaster() && - nullptr != ( pCFrm = pFootnote->GetRefFromAttr()) && pCFrm->IsFollow() ) + nullptr != ( pCFrame = pFootnote->GetRefFromAttr()) && pCFrame->IsFollow() ) { - OSL_ENSURE( pCFrm->IsTextFrm(), "NoTextFrm has Footnote?" ); - static_cast<SwTextFrm*>(pCFrm->FindMaster())->Prepare( PREP_FTN_GONE ); + OSL_ENSURE( pCFrame->IsTextFrame(), "NoTextFrame has Footnote?" ); + static_cast<SwTextFrame*>(pCFrame->FindMaster())->Prepare( PREP_FTN_GONE ); } } //Set acc table dispose state - pFrm->SetAccTableDispose( bIsDisposeAccTable ); - pFrm->Cut(); + pFrame->SetAccTableDispose( bIsDisposeAccTable ); + pFrame->Cut(); //Set acc table dispose state to default value - pFrm->SetAccTableDispose( true ); - SwFrm::DestroyFrm(pFrm); + pFrame->SetAccTableDispose( true ); + SwFrame::DestroyFrame(pFrame); } if( bIsDisposeAccTable && IsTextNode() ) { - GetTextNode()->DelFrms_TextNodePart(); + GetTextNode()->DelFrames_TextNodePart(); } } @@ -1411,7 +1411,7 @@ bool SwContentNode::GetInfo( SfxPoolItem& rInfo ) const case RES_CONTENT_VISIBLE: { static_cast<SwPtrMsgPoolItem&>(rInfo).pObject = - SwIterator<SwFrm,SwContentNode>(*this).First(); + SwIterator<SwFrame,SwContentNode>(*this).First(); } return false; } @@ -1429,7 +1429,7 @@ bool SwContentNode::SetAttr(const SfxPoolItem& rAttr ) if ( IsInCache() ) { - SwFrm::GetCache().Delete( this ); + SwFrame::GetCache().Delete( this ); SetInCache( false ); } @@ -1460,7 +1460,7 @@ bool SwContentNode::SetAttr( const SfxItemSet& rSet ) { if ( IsInCache() ) { - SwFrm::GetCache().Delete( this ); + SwFrame::GetCache().Delete( this ); SetInCache( false ); } @@ -1539,7 +1539,7 @@ bool SwContentNode::ResetAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 ) if ( IsInCache() ) { - SwFrm::GetCache().Delete( this ); + SwFrame::GetCache().Delete( this ); SetInCache( false ); } @@ -1588,7 +1588,7 @@ bool SwContentNode::ResetAttr( const std::vector<sal_uInt16>& rWhichArr ) if ( IsInCache() ) { - SwFrm::GetCache().Delete( this ); + SwFrame::GetCache().Delete( this ); SetInCache( false ); } @@ -1628,7 +1628,7 @@ sal_uInt16 SwContentNode::ResetAllAttr() if ( IsInCache() ) { - SwFrm::GetCache().Delete( this ); + SwFrame::GetCache().Delete( this ); SetInCache( false ); } @@ -1803,7 +1803,7 @@ void SwContentNode::SetCondFormatColl( SwFormatColl* pColl ) } if( IsInCache() ) { - SwFrm::GetCache().Delete( this ); + SwFrame::GetCache().Delete( this ); SetInCache( false ); } } @@ -1949,20 +1949,20 @@ short SwContentNode::GetTextDirection( const SwPosition& rPos, aPt = *pPt; // #i72024# - No format of the frame, because this can cause recursive layout actions - SwFrm* pFrm = getLayoutFrm( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, &rPos, false ); + SwFrame* pFrame = getLayoutFrame( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, &rPos, false ); - if ( pFrm ) + if ( pFrame ) { - if ( pFrm->IsVertical() ) + if ( pFrame->IsVertical() ) { - if ( pFrm->IsRightToLeft() ) + if ( pFrame->IsRightToLeft() ) nRet = FRMDIR_VERT_TOP_LEFT; else nRet = FRMDIR_VERT_TOP_RIGHT; } else { - if ( pFrm->IsRightToLeft() ) + if ( pFrame->IsRightToLeft() ) nRet = FRMDIR_HORI_RIGHT_TOP; else nRet = FRMDIR_HORI_LEFT_TOP; diff --git a/sw/source/core/docnode/node2lay.cxx b/sw/source/core/docnode/node2lay.cxx index b000d243748c..d73858662279 100644 --- a/sw/source/core/docnode/node2lay.cxx +++ b/sw/source/core/docnode/node2lay.cxx @@ -36,27 +36,27 @@ */ class SwNode2LayImpl { - SwIterator<SwFrm,SwModify>* pIter; + SwIterator<SwFrame,SwModify>* pIter; SwModify* pMod; - std::vector<SwFrm*>* pUpperFrms; // To collect the Upper + std::vector<SwFrame*>* pUpperFrames; // To collect the Upper sal_uLong nIndex; // The Index of the to-be-inserted Nodes bool bMaster : 1; // true => only Master, false => only Frames without Follow bool bInit : 1; // Did we already call First() at SwClient? public: SwNode2LayImpl( const SwNode& rNode, sal_uLong nIdx, bool bSearch ); - ~SwNode2LayImpl() { delete pIter; delete pUpperFrms; } - SwFrm* NextFrm(); // Returns the next "useful" Frame - SwLayoutFrm* UpperFrm( SwFrm* &rpFrm, const SwNode &rNode ); - void SaveUpperFrms(); // Saves (and locks if needed) the pUpper + ~SwNode2LayImpl() { delete pIter; delete pUpperFrames; } + SwFrame* NextFrame(); // Returns the next "useful" Frame + SwLayoutFrame* UpperFrame( SwFrame* &rpFrame, const SwNode &rNode ); + void SaveUpperFrames(); // Saves (and locks if needed) the pUpper // Inserts a Frame under every pUpper of the array - void RestoreUpperFrms( SwNodes& rNds, sal_uLong nStt, sal_uLong nEnd ); + void RestoreUpperFrames( SwNodes& rNds, sal_uLong nStt, sal_uLong nEnd ); - SwFrm* GetFrm( const Point* pDocPos = nullptr, + SwFrame* GetFrame( const Point* pDocPos = nullptr, const SwPosition *pPos = nullptr, - const bool bCalcFrm = true ) const; + const bool bCalcFrame = true ) const; }; -SwNode* GoNextWithFrm(const SwNodes& rNodes, SwNodeIndex *pIdx) +SwNode* GoNextWithFrame(const SwNodes& rNodes, SwNodeIndex *pIdx) { if( pIdx->GetIndex() >= rNodes.Count() - 1 ) return nullptr; @@ -68,9 +68,9 @@ SwNode* GoNextWithFrm(const SwNodes& rNodes, SwNodeIndex *pIdx) pNd = &aTmp.GetNode(); bool bFound = false; if ( pNd->IsContentNode() ) - bFound = SwIterator<SwFrm,SwContentNode>(*static_cast<SwContentNode*>(pNd)).First(); + bFound = SwIterator<SwFrame,SwContentNode>(*static_cast<SwContentNode*>(pNd)).First(); else if ( pNd->IsTableNode() ) - bFound = SwIterator<SwFrm,SwFormat>(*static_cast<SwTableNode*>(pNd)->GetTable().GetFrameFormat()).First() ; + bFound = SwIterator<SwFrame,SwFormat>(*static_cast<SwTableNode*>(pNd)->GetTable().GetFrameFormat()).First() ; else if( pNd->IsEndNode() && !pNd->StartOfSectionNode()->IsSectionNode() ) { pNd = nullptr; @@ -88,7 +88,7 @@ SwNode* GoNextWithFrm(const SwNodes& rNodes, SwNodeIndex *pIdx) return pNd; } -SwNode* GoPreviousWithFrm(SwNodeIndex *pIdx) +SwNode* GoPreviousWithFrame(SwNodeIndex *pIdx) { if( !pIdx->GetIndex() ) return nullptr; @@ -100,9 +100,9 @@ SwNode* GoPreviousWithFrm(SwNodeIndex *pIdx) pNd = &aTmp.GetNode(); bool bFound = false; if ( pNd->IsContentNode() ) - bFound = SwIterator<SwFrm,SwContentNode>(*static_cast<SwContentNode*>(pNd)).First(); + bFound = SwIterator<SwFrame,SwContentNode>(*static_cast<SwContentNode*>(pNd)).First(); else if ( pNd->IsTableNode() ) - bFound = SwIterator<SwFrm,SwFormat>(*static_cast<SwTableNode*>(pNd)->GetTable().GetFrameFormat()).First(); + bFound = SwIterator<SwFrame,SwFormat>(*static_cast<SwTableNode*>(pNd)->GetTable().GetFrameFormat()).First(); else if( pNd->IsStartNode() && !pNd->IsSectionNode() ) { pNd = nullptr; @@ -130,7 +130,7 @@ SwNode* GoPreviousWithFrm(SwNodeIndex *pIdx) * We insert before or after it. */ SwNode2LayImpl::SwNode2LayImpl( const SwNode& rNode, sal_uLong nIdx, bool bSearch ) - : pUpperFrms( nullptr ), nIndex( nIdx ), bInit( false ) + : pUpperFrames( nullptr ), nIndex( nIdx ), bInit( false ) { const SwNode* pNd; if( bSearch || rNode.IsSectionNode() ) @@ -140,7 +140,7 @@ SwNode2LayImpl::SwNode2LayImpl( const SwNode& rNode, sal_uLong nIdx, bool bSearc if( !bSearch && rNode.GetIndex() < nIndex ) { SwNodeIndex aTmp( *rNode.EndOfSectionNode(), +1 ); - pNd = GoPreviousWithFrm( &aTmp ); + pNd = GoPreviousWithFrame( &aTmp ); if( !bSearch && pNd && rNode.GetIndex() > pNd->GetIndex() ) pNd = nullptr; // Do not go over the limits bMaster = false; @@ -148,7 +148,7 @@ SwNode2LayImpl::SwNode2LayImpl( const SwNode& rNode, sal_uLong nIdx, bool bSearc else { SwNodeIndex aTmp( rNode, -1 ); - pNd = GoNextWithFrm( rNode.GetNodes(), &aTmp ); + pNd = GoNextWithFrame( rNode.GetNodes(), &aTmp ); bMaster = true; if( !bSearch && pNd && rNode.EndOfSectionIndex() < pNd->GetIndex() ) pNd = nullptr; // Do not go over the limits @@ -168,7 +168,7 @@ SwNode2LayImpl::SwNode2LayImpl( const SwNode& rNode, sal_uLong nIdx, bool bSearc OSL_ENSURE( pNd->IsTableNode(), "For Tablenodes only" ); pMod = pNd->GetTableNode()->GetTable().GetFrameFormat(); } - pIter = new SwIterator<SwFrm,SwModify>( *pMod ); + pIter = new SwIterator<SwFrame,SwModify>( *pMod ); } else { @@ -187,13 +187,13 @@ SwNode2LayImpl::SwNode2LayImpl( const SwNode& rNode, sal_uLong nIdx, bool bSearc * When inserting after it, we find and return the last Follow starting * from the Master. * - * If the Frame is located in a SectionFrm, we check to see whether the + * If the Frame is located in a SectionFrame, we check to see whether the * SectionFrame is the suitable return value (instead of the Frame itself). * This is the case if the to-be-inserted Node is outside of the Section. */ -SwFrm* SwNode2LayImpl::NextFrm() +SwFrame* SwNode2LayImpl::NextFrame() { - SwFrm* pRet; + SwFrame* pRet; if( !pIter ) return nullptr; if( !bInit ) @@ -205,7 +205,7 @@ SwFrm* SwNode2LayImpl::NextFrm() pRet = pIter->Next(); while( pRet ) { - SwFlowFrm* pFlow = SwFlowFrm::CastFlowFrm( pRet ); + SwFlowFrame* pFlow = SwFlowFrame::CastFlowFrame( pRet ); OSL_ENSURE( pFlow, "Content or Table expected?!" ); // Follows are pretty volatile, thus we ignore them. // Even if we insert after the Frame, we start from the Master @@ -216,16 +216,16 @@ SwFrm* SwNode2LayImpl::NextFrm() { while( pFlow->HasFollow() ) pFlow = pFlow->GetFollow(); - pRet = &(pFlow->GetFrm()); + pRet = &(pFlow->GetFrame()); } if( pRet->IsInSct() ) { - SwSectionFrm* pSct = pRet->FindSctFrm(); + SwSectionFrame* pSct = pRet->FindSctFrame(); // ATTENTION: If we are in a Footnote, from a Layout point of view // it could be located in a Section with columns, although it // should be outside of it when looking at the Nodes. // Thus, when dealing with Footnotes, we need to check whether the - // SectionFrm is also located within the Footnote and not outside of it. + // SectionFrame is also located within the Footnote and not outside of it. if( !pRet->IsInFootnote() || pSct->IsInFootnote() ) { OSL_ENSURE( pSct && pSct->GetSection(), "Where's my section?" ); @@ -233,7 +233,7 @@ SwFrm* SwNode2LayImpl::NextFrm() OSL_ENSURE( pNd, "Lost SectionNode" ); // If the result Frame is located within a Section Frame // whose Section does not contain the Node, we return with - // the SectionFrm, else we return with the Content/TabFrm + // the SectionFrame, else we return with the Content/TabFrame if( bMaster ) { if( pNd->GetIndex() >= nIndex ) @@ -250,24 +250,24 @@ SwFrm* SwNode2LayImpl::NextFrm() return nullptr; } -void SwNode2LayImpl::SaveUpperFrms() +void SwNode2LayImpl::SaveUpperFrames() { - pUpperFrms = new std::vector<SwFrm*>; - SwFrm* pFrm; - while( nullptr != (pFrm = NextFrm()) ) + pUpperFrames = new std::vector<SwFrame*>; + SwFrame* pFrame; + while( nullptr != (pFrame = NextFrame()) ) { - SwFrm* pPrv = pFrm->GetPrev(); - pFrm = pFrm->GetUpper(); - if( pFrm ) + SwFrame* pPrv = pFrame->GetPrev(); + pFrame = pFrame->GetUpper(); + if( pFrame ) { - if( pFrm->IsFootnoteFrm() ) - static_cast<SwFootnoteFrm*>(pFrm)->ColLock(); - else if( pFrm->IsInSct() ) - pFrm->FindSctFrm()->ColLock(); - if( pPrv && pPrv->IsSctFrm() ) - static_cast<SwSectionFrm*>(pPrv)->LockJoin(); - pUpperFrms->push_back( pPrv ); - pUpperFrms->push_back( pFrm ); + if( pFrame->IsFootnoteFrame() ) + static_cast<SwFootnoteFrame*>(pFrame)->ColLock(); + else if( pFrame->IsInSct() ) + pFrame->FindSctFrame()->ColLock(); + if( pPrv && pPrv->IsSctFrame() ) + static_cast<SwSectionFrame*>(pPrv)->LockJoin(); + pUpperFrames->push_back( pPrv ); + pUpperFrames->push_back( pFrame ); } } delete pIter; @@ -275,149 +275,149 @@ void SwNode2LayImpl::SaveUpperFrms() pMod = nullptr; } -SwLayoutFrm* SwNode2LayImpl::UpperFrm( SwFrm* &rpFrm, const SwNode &rNode ) +SwLayoutFrame* SwNode2LayImpl::UpperFrame( SwFrame* &rpFrame, const SwNode &rNode ) { - rpFrm = NextFrm(); - if( !rpFrm ) + rpFrame = NextFrame(); + if( !rpFrame ) return nullptr; - SwLayoutFrm* pUpper = rpFrm->GetUpper(); - if( rpFrm->IsSctFrm() ) + SwLayoutFrame* pUpper = rpFrame->GetUpper(); + if( rpFrame->IsSctFrame() ) { const SwNode* pNode = rNode.StartOfSectionNode(); if( pNode->IsSectionNode() ) { - SwFrm* pFrm = bMaster ? rpFrm->FindPrev() : rpFrm->FindNext(); - if( pFrm && pFrm->IsSctFrm() ) + SwFrame* pFrame = bMaster ? rpFrame->FindPrev() : rpFrame->FindNext(); + if( pFrame && pFrame->IsSctFrame() ) { - // pFrm could be a "dummy"-section - if( static_cast<SwSectionFrm*>(pFrm)->GetSection() && + // pFrame could be a "dummy"-section + if( static_cast<SwSectionFrame*>(pFrame)->GetSection() && (&static_cast<const SwSectionNode*>(pNode)->GetSection() == - static_cast<SwSectionFrm*>(pFrm)->GetSection()) ) + static_cast<SwSectionFrame*>(pFrame)->GetSection()) ) { // #i22922# - consider columned sections // 'Go down' the section frame as long as the layout frame // is found, which would contain content. - while ( pFrm->IsLayoutFrm() && - static_cast<SwLayoutFrm*>(pFrm)->Lower() && - !static_cast<SwLayoutFrm*>(pFrm)->Lower()->IsFlowFrm() && - static_cast<SwLayoutFrm*>(pFrm)->Lower()->IsLayoutFrm() ) + while ( pFrame->IsLayoutFrame() && + static_cast<SwLayoutFrame*>(pFrame)->Lower() && + !static_cast<SwLayoutFrame*>(pFrame)->Lower()->IsFlowFrame() && + static_cast<SwLayoutFrame*>(pFrame)->Lower()->IsLayoutFrame() ) { - pFrm = static_cast<SwLayoutFrm*>(pFrm)->Lower(); + pFrame = static_cast<SwLayoutFrame*>(pFrame)->Lower(); } - OSL_ENSURE( pFrm->IsLayoutFrm(), - "<SwNode2LayImpl::UpperFrm(..)> - expected upper frame isn't a layout frame." ); - rpFrm = bMaster ? nullptr - : static_cast<SwLayoutFrm*>(pFrm)->Lower(); - OSL_ENSURE( !rpFrm || rpFrm->IsFlowFrm(), - "<SwNode2LayImpl::UpperFrm(..)> - expected sibling isn't a flow frame." ); - return static_cast<SwLayoutFrm*>(pFrm); + OSL_ENSURE( pFrame->IsLayoutFrame(), + "<SwNode2LayImpl::UpperFrame(..)> - expected upper frame isn't a layout frame." ); + rpFrame = bMaster ? nullptr + : static_cast<SwLayoutFrame*>(pFrame)->Lower(); + OSL_ENSURE( !rpFrame || rpFrame->IsFlowFrame(), + "<SwNode2LayImpl::UpperFrame(..)> - expected sibling isn't a flow frame." ); + return static_cast<SwLayoutFrame*>(pFrame); } - pUpper = new SwSectionFrm(const_cast<SwSectionNode*>(static_cast<const SwSectionNode*>(pNode))->GetSection(), rpFrm); - pUpper->Paste( rpFrm->GetUpper(), - bMaster ? rpFrm : rpFrm->GetNext() ); - static_cast<SwSectionFrm*>(pUpper)->Init(); - rpFrm = nullptr; + pUpper = new SwSectionFrame(const_cast<SwSectionNode*>(static_cast<const SwSectionNode*>(pNode))->GetSection(), rpFrame); + pUpper->Paste( rpFrame->GetUpper(), + bMaster ? rpFrame : rpFrame->GetNext() ); + static_cast<SwSectionFrame*>(pUpper)->Init(); + rpFrame = nullptr; // 'Go down' the section frame as long as the layout frame // is found, which would contain content. while ( pUpper->Lower() && - !pUpper->Lower()->IsFlowFrm() && - pUpper->Lower()->IsLayoutFrm() ) + !pUpper->Lower()->IsFlowFrame() && + pUpper->Lower()->IsLayoutFrame() ) { - pUpper = static_cast<SwLayoutFrm*>(pUpper->Lower()); + pUpper = static_cast<SwLayoutFrame*>(pUpper->Lower()); } return pUpper; } } } if( !bMaster ) - rpFrm = rpFrm->GetNext(); + rpFrame = rpFrame->GetNext(); return pUpper; } -void SwNode2LayImpl::RestoreUpperFrms( SwNodes& rNds, sal_uLong nStt, sal_uLong nEnd ) +void SwNode2LayImpl::RestoreUpperFrames( SwNodes& rNds, sal_uLong nStt, sal_uLong nEnd ) { - OSL_ENSURE( pUpperFrms, "RestoreUpper without SaveUpper?" ); + OSL_ENSURE( pUpperFrames, "RestoreUpper without SaveUpper?" ); SwNode* pNd; SwDoc *pDoc = rNds.GetDoc(); bool bFirst = true; for( ; nStt < nEnd; ++nStt ) { - SwFrm* pNew = nullptr; - SwFrm* pNxt; - SwLayoutFrm* pUp; + SwFrame* pNew = nullptr; + SwFrame* pNxt; + SwLayoutFrame* pUp; if( (pNd = rNds[nStt])->IsContentNode() ) - for( std::vector<SwFrm*>::size_type n = 0; n < pUpperFrms->size(); ) + for( std::vector<SwFrame*>::size_type n = 0; n < pUpperFrames->size(); ) { - pNxt = (*pUpperFrms)[n++]; - if( bFirst && pNxt && pNxt->IsSctFrm() ) - static_cast<SwSectionFrm*>(pNxt)->UnlockJoin(); - pUp = static_cast<SwLayoutFrm*>((*pUpperFrms)[n++]); + pNxt = (*pUpperFrames)[n++]; + if( bFirst && pNxt && pNxt->IsSctFrame() ) + static_cast<SwSectionFrame*>(pNxt)->UnlockJoin(); + pUp = static_cast<SwLayoutFrame*>((*pUpperFrames)[n++]); if( pNxt ) pNxt = pNxt->GetNext(); else pNxt = pUp->Lower(); - pNew = static_cast<SwContentNode*>(pNd)->MakeFrm( pUp ); + pNew = static_cast<SwContentNode*>(pNd)->MakeFrame( pUp ); pNew->Paste( pUp, pNxt ); - (*pUpperFrms)[n-2] = pNew; + (*pUpperFrames)[n-2] = pNew; } else if( pNd->IsTableNode() ) - for( std::vector<SwFrm*>::size_type x = 0; x < pUpperFrms->size(); ) + for( std::vector<SwFrame*>::size_type x = 0; x < pUpperFrames->size(); ) { - pNxt = (*pUpperFrms)[x++]; - if( bFirst && pNxt && pNxt->IsSctFrm() ) - static_cast<SwSectionFrm*>(pNxt)->UnlockJoin(); - pUp = static_cast<SwLayoutFrm*>((*pUpperFrms)[x++]); + pNxt = (*pUpperFrames)[x++]; + if( bFirst && pNxt && pNxt->IsSctFrame() ) + static_cast<SwSectionFrame*>(pNxt)->UnlockJoin(); + pUp = static_cast<SwLayoutFrame*>((*pUpperFrames)[x++]); if( pNxt ) pNxt = pNxt->GetNext(); else pNxt = pUp->Lower(); - pNew = static_cast<SwTableNode*>(pNd)->MakeFrm( pUp ); - OSL_ENSURE( pNew->IsTabFrm(), "Table expected" ); + pNew = static_cast<SwTableNode*>(pNd)->MakeFrame( pUp ); + OSL_ENSURE( pNew->IsTabFrame(), "Table expected" ); pNew->Paste( pUp, pNxt ); - static_cast<SwTabFrm*>(pNew)->RegistFlys(); - (*pUpperFrms)[x-2] = pNew; + static_cast<SwTabFrame*>(pNew)->RegistFlys(); + (*pUpperFrames)[x-2] = pNew; } else if( pNd->IsSectionNode() ) { nStt = pNd->EndOfSectionIndex(); - for( std::vector<SwFrm*>::size_type x = 0; x < pUpperFrms->size(); ) + for( std::vector<SwFrame*>::size_type x = 0; x < pUpperFrames->size(); ) { - pNxt = (*pUpperFrms)[x++]; - if( bFirst && pNxt && pNxt->IsSctFrm() ) - static_cast<SwSectionFrm*>(pNxt)->UnlockJoin(); - pUp = static_cast<SwLayoutFrm*>((*pUpperFrms)[x++]); - OSL_ENSURE( pUp->GetUpper() || pUp->IsFlyFrm(), "Lost Upper" ); + pNxt = (*pUpperFrames)[x++]; + if( bFirst && pNxt && pNxt->IsSctFrame() ) + static_cast<SwSectionFrame*>(pNxt)->UnlockJoin(); + pUp = static_cast<SwLayoutFrame*>((*pUpperFrames)[x++]); + OSL_ENSURE( pUp->GetUpper() || pUp->IsFlyFrame(), "Lost Upper" ); ::_InsertCnt( pUp, pDoc, pNd->GetIndex(), false, nStt+1, pNxt ); pNxt = pUp->GetLastLower(); - (*pUpperFrms)[x-2] = pNxt; + (*pUpperFrames)[x-2] = pNxt; } } bFirst = false; } - for( std::vector<SwFrm*>::size_type x = 0; x < pUpperFrms->size(); ++x ) + for( std::vector<SwFrame*>::size_type x = 0; x < pUpperFrames->size(); ++x ) { - SwFrm* pTmp = (*pUpperFrms)[++x]; - if( pTmp->IsFootnoteFrm() ) - static_cast<SwFootnoteFrm*>(pTmp)->ColUnlock(); + SwFrame* pTmp = (*pUpperFrames)[++x]; + if( pTmp->IsFootnoteFrame() ) + static_cast<SwFootnoteFrame*>(pTmp)->ColUnlock(); else if ( pTmp->IsInSct() ) { - SwSectionFrm* pSctFrm = pTmp->FindSctFrm(); - pSctFrm->ColUnlock(); + SwSectionFrame* pSctFrame = pTmp->FindSctFrame(); + pSctFrame->ColUnlock(); // #i18103# - invalidate size of section in order to // assure, that the section is formatted, unless it was 'Collocked' // from its 'collection' until its 'restoration'. - pSctFrm->_InvalidateSize(); + pSctFrame->_InvalidateSize(); } } } -SwFrm* SwNode2LayImpl::GetFrm( const Point* pDocPos, +SwFrame* SwNode2LayImpl::GetFrame( const Point* pDocPos, const SwPosition *pPos, - const bool bCalcFrm ) const + const bool bCalcFrame ) const { // test if change of member pIter -> pMod broke anything - return pMod ? ::GetFrmOfModify( nullptr, *pMod, USHRT_MAX, pDocPos, pPos, bCalcFrm ) : nullptr; + return pMod ? ::GetFrameOfModify( nullptr, *pMod, USHRT_MAX, pDocPos, pPos, bCalcFrame ) : nullptr; } SwNode2Layout::SwNode2Layout( const SwNode& rNd, sal_uLong nIdx ) @@ -428,34 +428,34 @@ SwNode2Layout::SwNode2Layout( const SwNode& rNd, sal_uLong nIdx ) SwNode2Layout::SwNode2Layout( const SwNode& rNd ) : pImpl( new SwNode2LayImpl( rNd, rNd.GetIndex(), true ) ) { - pImpl->SaveUpperFrms(); + pImpl->SaveUpperFrames(); } -void SwNode2Layout::RestoreUpperFrms( SwNodes& rNds, sal_uLong nStt, sal_uLong nEnd ) +void SwNode2Layout::RestoreUpperFrames( SwNodes& rNds, sal_uLong nStt, sal_uLong nEnd ) { - OSL_ENSURE( pImpl, "RestoreUpperFrms without SaveUpperFrms" ); - pImpl->RestoreUpperFrms( rNds, nStt, nEnd ); + OSL_ENSURE( pImpl, "RestoreUpperFrames without SaveUpperFrames" ); + pImpl->RestoreUpperFrames( rNds, nStt, nEnd ); } -SwFrm* SwNode2Layout::NextFrm() +SwFrame* SwNode2Layout::NextFrame() { - return pImpl->NextFrm(); + return pImpl->NextFrame(); } -SwLayoutFrm* SwNode2Layout::UpperFrm( SwFrm* &rpFrm, const SwNode &rNode ) +SwLayoutFrame* SwNode2Layout::UpperFrame( SwFrame* &rpFrame, const SwNode &rNode ) { - return pImpl->UpperFrm( rpFrm, rNode ); + return pImpl->UpperFrame( rpFrame, rNode ); } SwNode2Layout::~SwNode2Layout() { } -SwFrm* SwNode2Layout::GetFrm( const Point* pDocPos, +SwFrame* SwNode2Layout::GetFrame( const Point* pDocPos, const SwPosition *pPos, - const bool bCalcFrm ) const + const bool bCalcFrame ) const { - return pImpl->GetFrm( pDocPos, pPos, bCalcFrm ); + return pImpl->GetFrame( pDocPos, pPos, bCalcFrame ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx index 376aaea9ed1a..8fe1bc0c1d27 100644 --- a/sw/source/core/docnode/nodes.cxx +++ b/sw/source/core/docnode/nodes.cxx @@ -115,7 +115,7 @@ SwNodes::~SwNodes() } void SwNodes::ChgNode( SwNodeIndex& rDelPos, sal_uLong nSz, - SwNodeIndex& rInsPos, bool bNewFrms ) + SwNodeIndex& rInsPos, bool bNewFrames ) { // no need for frames in the UndoArea SwNodes& rNds = rInsPos.GetNodes(); @@ -348,40 +348,40 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, sal_uLong nSz, if( rNds.GetDoc() != GetDoc() ) rNds.GetDoc()->getIDocumentFieldsAccess().SetFieldsDirty( true, nullptr, 0 ); - if( bNewFrms ) - bNewFrms = &GetDoc()->GetNodes() == &rNds && + if( bNewFrames ) + bNewFrames = &GetDoc()->GetNodes() == &rNds && GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell(); - if( bNewFrms ) + if( bNewFrames ) { // get the frames: SwNodeIndex aIdx( *pPrevInsNd, 1 ); - SwNodeIndex aFrmNdIdx( aIdx ); - SwNode* pFrmNd = rNds.FindPrvNxtFrmNode( aFrmNdIdx, + SwNodeIndex aFrameNdIdx( aIdx ); + SwNode* pFrameNd = rNds.FindPrvNxtFrameNode( aFrameNdIdx, rNds[ rInsPos.GetIndex() - 1 ] ); - if( !pFrmNd && aFrmNdIdx > rNds.GetEndOfExtras().GetIndex() ) + if( !pFrameNd && aFrameNdIdx > rNds.GetEndOfExtras().GetIndex() ) { OSL_ENSURE( false, "here, something wrong happened" ); - aFrmNdIdx = rNds.GetEndOfContent(); - pFrmNd = SwNodes::GoPrevSection( &aFrmNdIdx, true, false ); - if( pFrmNd && !static_cast<SwContentNode*>(pFrmNd)->HasWriterListeners() ) - pFrmNd = nullptr; - OSL_ENSURE( pFrmNd, "ChgNode() - no FrameNode found" ); + aFrameNdIdx = rNds.GetEndOfContent(); + pFrameNd = SwNodes::GoPrevSection( &aFrameNdIdx, true, false ); + if( pFrameNd && !static_cast<SwContentNode*>(pFrameNd)->HasWriterListeners() ) + pFrameNd = nullptr; + OSL_ENSURE( pFrameNd, "ChgNode() - no FrameNode found" ); } - if( pFrmNd ) + if( pFrameNd ) while( aIdx != rInsPos ) { SwContentNode* pCNd = aIdx.GetNode().GetContentNode(); if( pCNd ) { - if( pFrmNd->IsTableNode() ) - static_cast<SwTableNode*>(pFrmNd)->MakeFrms( aIdx ); - else if( pFrmNd->IsSectionNode() ) - static_cast<SwSectionNode*>(pFrmNd)->MakeFrms( aIdx ); + if( pFrameNd->IsTableNode() ) + static_cast<SwTableNode*>(pFrameNd)->MakeFrames( aIdx ); + else if( pFrameNd->IsSectionNode() ) + static_cast<SwSectionNode*>(pFrameNd)->MakeFrames( aIdx ); else - static_cast<SwContentNode*>(pFrmNd)->MakeFrms( *pCNd ); - pFrmNd = pCNd; + static_cast<SwContentNode*>(pFrameNd)->MakeFrames( *pCNd ); + pFrameNd = pCNd; } ++aIdx; } @@ -401,11 +401,11 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, sal_uLong nSz, * @param aRange range to move (excluding end node) * @param rNodes * @param aIndex - * @param bNewFrms + * @param bNewFrames * @return */ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, - const SwNodeIndex& aIndex, bool bNewFrms ) + const SwNodeIndex& aIndex, bool bNewFrames ) { SwNode * pAktNode; if( aIndex == 0 || @@ -457,9 +457,9 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, SwNodeRange aOrigInsPos( aIdx, -1, aIdx ); // original insertion position - // call DelFrms/MakeFrms for the upmost SectionNode + // call DelFrames/MakeFrames for the upmost SectionNode int nSectNdCnt = 0; - bool bSaveNewFrms = bNewFrms; + bool bSaveNewFrames = bNewFrames; // continue until everything has been moved while( aRg.aStart < aRg.aEnd ) @@ -472,7 +472,7 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, // delete and copy. CAUTION: all indices after // "aRg.aEnd+1" will be moved as well! SwNodeIndex aSwIndex( aRg.aEnd, 1 ); - ChgNode( aSwIndex, nInsPos, aIdx, bNewFrms ); + ChgNode( aSwIndex, nInsPos, aIdx, bNewFrames ); aIdx -= nInsPos; nInsPos = 0; } @@ -493,9 +493,9 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, StartOfSectionNode()->GetIndex() < nNd && nNd < rNodes.GetEndOfRedlines().GetIndex() ); - if( bNewFrms ) + if( bNewFrames ) // delete all frames - pTableNd->DelFrms(); + pTableNd->DelFrames(); if( &rNodes == this ) // move into self? { // move all Start/End/ContentNodes @@ -591,10 +591,10 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, pTableFormat->ModifyNotification( &aMsgHint, &aMsgHint ); } } - if( bNewFrms ) + if( bNewFrames ) { SwNodeIndex aTmp( aIdx ); - pTableNd->MakeFrms( &aTmp ); + pTableNd->MakeFrames( &aTmp ); } aIdx -= nInsPos; nInsPos = 0; @@ -646,8 +646,8 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, --aRg.aStart; SwSectionNode* pSctNd = pSttNd->GetSectionNode(); - if( bNewFrms && pSctNd ) - pSctNd->DelFrms(); + if( bNewFrames && pSctNd ) + pSctNd->DelFrames(); RemoveNode( aRg.aEnd.GetIndex(), 1, false ); // EndNode loeschen sal_uLong nSttPos = pSttNd->GetIndex(); @@ -674,7 +674,7 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, { pSctNd->NodesArrChgd(); ++nSectNdCnt; - bNewFrms = false; + bNewFrames = false; } } } @@ -690,7 +690,7 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, // delete and copy. CAUTION: all indices after // "aRg.aEnd+1" will be moved as well! SwNodeIndex aSwIndex( aRg.aEnd, 1 ); - ChgNode( aSwIndex, nInsPos, aIdx, bNewFrms ); + ChgNode( aSwIndex, nInsPos, aIdx, bNewFrames ); aIdx -= nInsPos; nInsPos = 0; } @@ -749,7 +749,7 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, // copy array. CAUTION: all indices after // "aRg.aEnd+1" will be moved as well! SwNodeIndex aSwIndex( aRg.aEnd, 1 ); - ChgNode( aSwIndex, nInsPos, aIdx, bNewFrms ); + ChgNode( aSwIndex, nInsPos, aIdx, bNewFrames ); aIdx -= nInsPos+1; nInsPos = 0; } @@ -761,7 +761,7 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, "wrong StartNode" ); SwNodeIndex aSwIndex( aRg.aEnd, 1 ); - ChgNode( aSwIndex, nInsPos, aIdx, bNewFrms ); + ChgNode( aSwIndex, nInsPos, aIdx, bNewFrames ); aIdx -= nInsPos+1; // before inserted StartNode nInsPos = 0; @@ -773,8 +773,8 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, if( pSectNd && !--nSectNdCnt ) { SwNodeIndex aTmp( *pSectNd ); - pSectNd->MakeFrms( &aTmp ); - bNewFrms = bSaveNewFrms; + pSectNd->MakeFrames( &aTmp ); + bNewFrames = bSaveNewFrames; } aSttNdStack.erase( aSttNdStack.begin() + nLevel ); // remove from stack nLevel--; @@ -795,8 +795,8 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, case ND_TEXTNODE: //Add special function to text node. { - if( bNewFrms && pAktNode->GetContentNode() ) - static_cast<SwContentNode*>(pAktNode)->DelFrms(); + if( bNewFrames && pAktNode->GetContentNode() ) + static_cast<SwContentNode*>(pAktNode)->DelFrames(); pAktNode->m_pStartOfSection = aSttNdStack[ nLevel ]; nInsPos++; --aRg.aEnd; @@ -805,8 +805,8 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, case ND_GRFNODE: case ND_OLENODE: { - if( bNewFrms && pAktNode->GetContentNode() ) - static_cast<SwContentNode*>(pAktNode)->DelFrms(); + if( bNewFrames && pAktNode->GetContentNode() ) + static_cast<SwContentNode*>(pAktNode)->DelFrames(); pAktNode->m_pStartOfSection = aSttNdStack[ nLevel ]; nInsPos++; @@ -832,7 +832,7 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, // delete and copy. CAUTION: all indices after // "aRg.aEnd+1" will be moved as well! SwNodeIndex aSwIndex( aRg.aEnd, 1 ); - ChgNode( aSwIndex, nInsPos, aIdx, bNewFrms ); + ChgNode( aSwIndex, nInsPos, aIdx, bNewFrames ); aIdx -= nInsPos; nInsPos = 0; } @@ -857,7 +857,7 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, { // rest should be ok SwNodeIndex aSwIndex( aRg.aEnd, 1 ); - ChgNode( aSwIndex, nInsPos, aIdx, bNewFrms ); + ChgNode( aSwIndex, nInsPos, aIdx, bNewFrames ); } ++aRg.aEnd; // again, exclusive end @@ -1116,7 +1116,7 @@ void SwNodes::Delete(const SwNodeIndex &rIndex, sal_uLong nNodes) { SwTableNode* pTableNd = pAktNode->m_pStartOfSection->GetTableNode(); if( pTableNd ) - pTableNd->DelFrms(); + pTableNd->DelFrames(); SwNode *pNd, *pChkNd = pAktNode->m_pStartOfSection; sal_uInt16 nIdxPos; @@ -1137,7 +1137,7 @@ void SwNodes::Delete(const SwNodeIndex &rIndex, sal_uLong nNodes) } else if( pNd->IsEndNode() && pNd->m_pStartOfSection->IsTableNode() ) - static_cast<SwTableNode*>(pNd->m_pStartOfSection)->DelFrms(); + static_cast<SwTableNode*>(pNd->m_pStartOfSection)->DelFrames(); --aRg.aEnd; nCnt++; @@ -1396,7 +1396,7 @@ void SwNodes::DelNodes( const SwNodeIndex & rStart, sal_uLong nCnt ) if( pNd->IsContentNode() ) { static_cast<SwContentNode*>(pNd)->InvalidateNumRule(); - static_cast<SwContentNode*>(pNd)->DelFrms(); + static_cast<SwContentNode*>(pNd)->DelFrames(); } } RemoveNode( nSttIdx, nCnt, true ); @@ -1678,7 +1678,7 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes ) ///@see SwNodes::_MoveNodes (TODO: seems to be C&P programming here) void SwNodes::_CopyNodes( const SwNodeRange& rRange, - const SwNodeIndex& rIndex, bool bNewFrms, bool bTableInsDummyNode ) const + const SwNodeIndex& rIndex, bool bNewFrames, bool bTableInsDummyNode ) const { SwDoc* pDoc = rIndex.GetNode().GetDoc(); @@ -1767,7 +1767,7 @@ void SwNodes::_CopyNodes( const SwNodeRange& rRange, SwStartNode* pSttNd = aRg.aStart.GetNode().GetStartNode(); _CopyNodes( SwNodeRange( *pSttNd, + 1, *pSttNd->EndOfSectionNode() ), - aInsPos, bNewFrms ); + aInsPos, bNewFrames ); // insert a DummyNode for the box-EndNode? if( bTableInsDummyNode ) @@ -1792,10 +1792,10 @@ void SwNodes::_CopyNodes( const SwNodeRange& rRange, aRg.aStart = pAktNode->EndOfSectionIndex(); - if( bNewFrms && pTableNd ) + if( bNewFrames && pTableNd ) { nStt = aInsPos; - pTableNd->MakeFrms( &nStt ); + pTableNd->MakeFrames( &nStt ); } } break; @@ -1819,9 +1819,9 @@ void SwNodes::_CopyNodes( const SwNodeRange& rRange, nNodeCnt = 1; aRg.aStart = pAktNode->EndOfSectionIndex(); - if( bNewFrms && pSectNd && + if( bNewFrames && pSectNd && !pSectNd->GetSection().IsHidden() ) - pSectNd->MakeFrms( &nStt ); + pSectNd->MakeFrames( &nStt ); } break; @@ -1857,8 +1857,8 @@ void SwNodes::_CopyNodes( const SwNodeRange& rRange, SwContentNode* pNew = static_cast<SwContentNode*>(pAktNode)->MakeCopy( pDoc, aInsPos ); // frames are always created as default, so delete if needed - if( !bNewFrms ) - pNew->DelFrms(); + if( !bNewFrames ) + pNew->DelFrames(); } break; @@ -2041,21 +2041,21 @@ SwContentNode* SwNodes::GoPrevSection( SwNodeIndex * pIdx, /** find the next/previous ContentNode or a table node with frames * * If no pEnd is given, search is started with FrameIndex; otherwise - * search is started with the one before rFrmIdx and after pEnd. + * search is started with the one before rFrameIdx and after pEnd. * - * @param rFrmIdx node with frames to search in + * @param rFrameIdx node with frames to search in * @param pEnd ??? * @return result node; 0 (!!!) if not found */ -SwNode* SwNodes::FindPrvNxtFrmNode( SwNodeIndex& rFrmIdx, +SwNode* SwNodes::FindPrvNxtFrameNode( SwNodeIndex& rFrameIdx, const SwNode* pEnd ) const { - SwNode* pFrmNd = nullptr; + SwNode* pFrameNd = nullptr; // no layout -> skip if( GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell() ) { - SwNode* pSttNd = &rFrmIdx.GetNode(); + SwNode* pSttNd = &rFrameIdx.GetNode(); // move of a hidden section? SwSectionNode* pSectNd = pSttNd->IsSectionNode() @@ -2068,7 +2068,7 @@ SwNode* SwNodes::FindPrvNxtFrmNode( SwNodeIndex& rFrmIdx, SwTableNode* pTableNd = pSttNd->IsTableNode() ? pSttNd->StartOfSectionNode()->FindTableNode() : pSttNd->FindTableNode(); - SwNodeIndex aIdx( rFrmIdx ); + SwNodeIndex aIdx( rFrameIdx ); SwNode* pNd; if( pEnd ) { @@ -2078,40 +2078,40 @@ SwNode* SwNodes::FindPrvNxtFrmNode( SwNodeIndex& rFrmIdx, else pNd = pSttNd; - if( ( pFrmNd = pNd )->IsContentNode() ) - rFrmIdx = aIdx; + if( ( pFrameNd = pNd )->IsContentNode() ) + rFrameIdx = aIdx; // search forward or backward for a content node - else if( nullptr != ( pFrmNd = GoPrevSection( &aIdx, true, false )) && - ::CheckNodesRange( aIdx, rFrmIdx, true ) && + else if( nullptr != ( pFrameNd = GoPrevSection( &aIdx, true, false )) && + ::CheckNodesRange( aIdx, rFrameIdx, true ) && // Never out of the table at the start - pFrmNd->FindTableNode() == pTableNd && + pFrameNd->FindTableNode() == pTableNd && // Bug 37652: Never out of the table at the end - (!pFrmNd->FindTableNode() || pFrmNd->FindTableBoxStartNode() + (!pFrameNd->FindTableNode() || pFrameNd->FindTableBoxStartNode() == pSttNd->FindTableBoxStartNode() ) && (!pSectNd || pSttNd->IsSectionNode() || - pSectNd->GetIndex() < pFrmNd->GetIndex()) + pSectNd->GetIndex() < pFrameNd->GetIndex()) ) { - rFrmIdx = aIdx; + rFrameIdx = aIdx; } else { if( pEnd ) aIdx = pEnd->GetIndex() + 1; else - aIdx = rFrmIdx; + aIdx = rFrameIdx; // NEVER leave the section when doing this! - if( ( pEnd && ( pFrmNd = &aIdx.GetNode())->IsContentNode() ) || - ( nullptr != ( pFrmNd = GoNextSection( &aIdx, true, false )) && - ::CheckNodesRange( aIdx, rFrmIdx, true ) && - ( pFrmNd->FindTableNode() == pTableNd && + if( ( pEnd && ( pFrameNd = &aIdx.GetNode())->IsContentNode() ) || + ( nullptr != ( pFrameNd = GoNextSection( &aIdx, true, false )) && + ::CheckNodesRange( aIdx, rFrameIdx, true ) && + ( pFrameNd->FindTableNode() == pTableNd && // NEVER go out of the table cell at the end - (!pFrmNd->FindTableNode() || pFrmNd->FindTableBoxStartNode() + (!pFrameNd->FindTableNode() || pFrameNd->FindTableBoxStartNode() == pSttNd->FindTableBoxStartNode() ) ) && (!pSectNd || pSttNd->IsSectionNode() || - pSectNd->EndOfSectionIndex() > pFrmNd->GetIndex()) + pSectNd->EndOfSectionIndex() > pFrameNd->GetIndex()) )) { // Undo when merging a table with one before, if there is also one after it. @@ -2119,33 +2119,33 @@ SwNode* SwNodes::FindPrvNxtFrmNode( SwNodeIndex& rFrmIdx, // SttNode is a section or a table! SwTableNode* pTableNode; if (pSttNd->IsTableNode() && - nullptr != (pTableNode = pFrmNd->FindTableNode()) && + nullptr != (pTableNode = pFrameNd->FindTableNode()) && // TABLE IN TABLE: pTableNode != pSttNd->StartOfSectionNode()->FindTableNode()) { - pFrmNd = pTableNode; - rFrmIdx = *pFrmNd; + pFrameNd = pTableNode; + rFrameIdx = *pFrameNd; } else - rFrmIdx = aIdx; + rFrameIdx = aIdx; } else if( pNd->IsEndNode() && pNd->StartOfSectionNode()->IsTableNode() ) { - pFrmNd = pNd->StartOfSectionNode(); - rFrmIdx = *pFrmNd; + pFrameNd = pNd->StartOfSectionNode(); + rFrameIdx = *pFrameNd; } else { if( pEnd ) aIdx = pEnd->GetIndex() + 1; else - aIdx = rFrmIdx.GetIndex() + 1; + aIdx = rFrameIdx.GetIndex() + 1; - if( (pFrmNd = &aIdx.GetNode())->IsTableNode() ) - rFrmIdx = aIdx; + if( (pFrameNd = &aIdx.GetNode())->IsTableNode() ) + rFrameIdx = aIdx; else { - pFrmNd = nullptr; + pFrameNd = nullptr; // is there some sectionnodes before a tablenode? while( aIdx.GetNode().IsSectionNode() ) @@ -2159,15 +2159,15 @@ SwNode* SwNodes::FindPrvNxtFrmNode( SwNodeIndex& rFrmIdx, } if( aIdx.GetNode().IsTableNode() ) { - rFrmIdx = aIdx; - pFrmNd = &aIdx.GetNode(); + rFrameIdx = aIdx; + pFrameNd = &aIdx.GetNode(); } } } } } } - return pFrmNd; + return pFrameNd; } void SwNodes::ForEach( sal_uLong nStart, sal_uLong nEnd, diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx index e7214fee20b8..613721391863 100644 --- a/sw/source/core/docnode/section.cxx +++ b/sw/source/core/docnode/section.cxx @@ -317,12 +317,12 @@ void SwSection::ImplSetHiddenFlag(bool const bTmpHidden, bool const bCondition) pFormat->ModifyNotification( &aMsgItem, &aMsgItem ); // Delete all Frames - pFormat->DelFrms(); + pFormat->DelFrames(); } } else if (m_Data.IsHiddenFlag()) // show Nodes again { - // Show all Frames (Child Sections are accounted for by MakeFrms) + // Show all Frames (Child Sections are accounted for by MakeFrames) // Only if the Parent Section is not restricting us! SwSection* pParentSect = pFormat->GetParentSection(); if( !pParentSect || !pParentSect->IsHiddenFlag() ) @@ -331,7 +331,7 @@ void SwSection::ImplSetHiddenFlag(bool const bTmpHidden, bool const bCondition) SwMsgPoolItem aMsgItem( RES_SECTION_NOT_HIDDEN ); pFormat->ModifyNotification( &aMsgItem, &aMsgItem ); - pFormat->MakeFrms(); + pFormat->MakeFrames(); } } } @@ -628,8 +628,8 @@ const SwTOXBase* SwSection::GetTOXBase() const return pRet; } -SwSectionFormat::SwSectionFormat( SwFrameFormat* pDrvdFrm, SwDoc *pDoc ) - : SwFrameFormat( pDoc->GetAttrPool(), OUString(), pDrvdFrm ) +SwSectionFormat::SwSectionFormat( SwFrameFormat* pDrvdFrame, SwDoc *pDoc ) + : SwFrameFormat( pDoc->GetAttrPool(), OUString(), pDrvdFrame ) { LockModify(); SetFormatAttr( *GetDfltAttr( RES_COL ) ); @@ -663,7 +663,7 @@ SwSectionFormat::~SwSectionFormat() } // mba: test iteration; objects are removed while iterating // use hint which allows to specify, if the content shall be saved or not - CallSwClientNotify( SwSectionFrmMoveAndDeleteHint( true ) ); + CallSwClientNotify( SwSectionFrameMoveAndDeleteHint( true ) ); // Raise the Section up SwNodeRange aRg( *pSectNd, 0, *pSectNd->EndOfSectionNode() ); @@ -680,25 +680,25 @@ SwSection * SwSectionFormat::GetSection() const return SwIterator<SwSection,SwSectionFormat>( *this ).First(); } -// Do not destroy all Frms in aDepend (Frms are recognized with a dynamic_cast). -void SwSectionFormat::DelFrms() +// Do not destroy all Frames in aDepend (Frames are recognized with a dynamic_cast). +void SwSectionFormat::DelFrames() { SwSectionNode* pSectNd; const SwNodeIndex* pIdx = GetContent(false).GetContentIdx(); if( pIdx && &GetDoc()->GetNodes() == &pIdx->GetNodes() && nullptr != (pSectNd = pIdx->GetNode().GetSectionNode() )) { - // First delete the <SwSectionFrm> of the <SwSectionFormat> instance + // First delete the <SwSectionFrame> of the <SwSectionFormat> instance // mba: test iteration as objects are removed in iteration // use hint which allows to specify, if the content shall be saved or not - CallSwClientNotify( SwSectionFrmMoveAndDeleteHint( false ) ); + CallSwClientNotify( SwSectionFrameMoveAndDeleteHint( false ) ); // Then delete frames of the nested <SwSectionFormat> instances SwIterator<SwSectionFormat,SwSectionFormat> aIter( *this ); SwSectionFormat *pLast = aIter.First(); while ( pLast ) { - pLast->DelFrms(); + pLast->DelFrames(); pLast = aIter.Next(); } @@ -722,7 +722,7 @@ void SwSectionFormat::DelFrms() } // Create the Views -void SwSectionFormat::MakeFrms() +void SwSectionFormat::MakeFrames() { SwSectionNode* pSectNd; const SwNodeIndex* pIdx = GetContent(false).GetContentIdx(); @@ -731,7 +731,7 @@ void SwSectionFormat::MakeFrms() nullptr != (pSectNd = pIdx->GetNode().GetSectionNode() )) { SwNodeIndex aIdx( *pIdx ); - pSectNd->MakeFrms( &aIdx ); + pSectNd->MakeFrames( &aIdx ); } } @@ -856,19 +856,19 @@ bool SwSectionFormat::GetInfo( SfxPoolItem& rInfo ) const case RES_CONTENT_VISIBLE: { - SwFrm* pFrm = SwIterator<SwFrm,SwFormat>(*this).First(); + SwFrame* pFrame = SwIterator<SwFrame,SwFormat>(*this).First(); // if the current section has no own frame search for the children - if(!pFrm) + if(!pFrame) { SwIterator<SwSectionFormat,SwSectionFormat> aFormatIter(*this); SwSectionFormat* pChild = aFormatIter.First(); - while(pChild && !pFrm) + while(pChild && !pFrame) { - pFrm = SwIterator<SwFrm,SwFormat>(*pChild).First(); + pFrame = SwIterator<SwFrame,SwFormat>(*pChild).First(); pChild = aFormatIter.Next(); } } - static_cast<SwPtrMsgPoolItem&>(rInfo).pObject = pFrm; + static_cast<SwPtrMsgPoolItem&>(rInfo).pObject = pFrame; } return false; } @@ -1355,17 +1355,17 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd ) if( pCpyRg ) { SwNodeIndex& rInsPos = pPam->GetPoint()->nNode; - bool bCreateFrm = rInsPos.GetIndex() <= + bool bCreateFrame = rInsPos.GetIndex() <= pDoc->GetNodes().GetEndOfExtras().GetIndex() || rInsPos.GetNode().FindTableNode(); SwTableNumFormatMerge aTNFM( *pSrcDoc, *pDoc ); - pSrcDoc->GetDocumentContentOperationsManager().CopyWithFlyInFly( *pCpyRg, 0, rInsPos, nullptr, bCreateFrm ); + pSrcDoc->GetDocumentContentOperationsManager().CopyWithFlyInFly( *pCpyRg, 0, rInsPos, nullptr, bCreateFrame ); ++aSave; - if( !bCreateFrm ) - ::MakeFrms( pDoc, aSave, rInsPos ); + if( !bCreateFrame ) + ::MakeFrames( pDoc, aSave, rInsPos ); // Delete last Node, only if it was copied successfully // (the Section contains more than one Node) @@ -1406,10 +1406,10 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd ) if( pESh ) { pESh->Push(); - SwPaM* pCrsr = pESh->GetCrsr(); - *pCrsr->GetPoint() = *pPam->GetPoint(); + SwPaM* pCursor = pESh->GetCursor(); + *pCursor->GetPoint() = *pPam->GetPoint(); delete pPam; - pPam = pCrsr; + pPam = pCursor; } SvMemoryStream aStrm( const_cast<sal_Int8 *>(aSeq.getConstArray()), aSeq.getLength(), diff --git a/sw/source/core/docnode/swbaslnk.cxx b/sw/source/core/docnode/swbaslnk.cxx index 852db82278b9..8620fce6a465 100644 --- a/sw/source/core/docnode/swbaslnk.cxx +++ b/sw/source/core/docnode/swbaslnk.cxx @@ -68,11 +68,11 @@ static void lcl_CallModify( SwGrfNode& rGrfNd, SfxPoolItem& rItem ) { SwIterator<SwClient,SwGrfNode> aIter(rGrfNd); for(SwClient* pLast = aIter.First(); pLast; pLast = aIter.Next()) - if(dynamic_cast<const SwContentFrm*>( pLast) == nullptr) + if(dynamic_cast<const SwContentFrame*>( pLast) == nullptr) pLast->ModifyNotification(&rItem, &rItem); } { - SwIterator<SwContentFrm,SwGrfNode> aIter(rGrfNd); + SwIterator<SwContentFrame,SwGrfNode> aIter(rGrfNd); for(SwClient* pLast = aIter.First(); pLast; pLast = aIter.Next()) pLast->ModifyNotification(&rItem, &rItem); } @@ -322,10 +322,10 @@ static bool SetGrfFlySize( const Size& rGrfSz, SwGrfNode* pGrfNd, const Size& rO rBox.CalcLineSpace(SvxBoxItemLine::RIGHT); aCalcSz.Height()+= rBox.CalcLineSpace(SvxBoxItemLine::TOP) + rBox.CalcLineSpace(SvxBoxItemLine::BOTTOM); - const SwFormatFrmSize& rOldAttr = pFormat->GetFrmSize(); + const SwFormatFrameSize& rOldAttr = pFormat->GetFrameSize(); if( rOldAttr.GetSize() != aCalcSz ) { - SwFormatFrmSize aAttr( rOldAttr ); + SwFormatFrameSize aAttr( rOldAttr ); aAttr.SetSize( aCalcSz ); pFormat->SetFormatAttr( aAttr ); bRet = true; diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx index c94781b33110..3ded66f433e5 100644 --- a/sw/source/core/draw/dcontact.cxx +++ b/sw/source/core/draw/dcontact.cxx @@ -73,7 +73,7 @@ using namespace ::com::sun::star; -void setContextWritingMode( SdrObject* pObj, SwFrm* pAnchor ) +void setContextWritingMode( SdrObject* pObj, SwFrame* pAnchor ) { if( pObj && pAnchor ) { @@ -199,12 +199,12 @@ void SwContact::MoveObjToVisibleLayer( SdrObject* _pDrawObj ) "<SwContact::MoveObjToInvisibleLayer(..)> - missing anchored object" ); if ( pAnchoredObj ) { - ::setContextWritingMode( _pDrawObj, pAnchoredObj->GetAnchorFrmContainingAnchPos() ); + ::setContextWritingMode( _pDrawObj, pAnchoredObj->GetAnchorFrameContainingAnchPos() ); // Note: as-character anchored objects aren't registered at a page frame and // a notification of its background isn't needed. - if ( pAnchoredObj->GetPageFrm() ) + if ( pAnchoredObj->GetPageFrame() ) { - ::Notify_Background( _pDrawObj, pAnchoredObj->GetPageFrm(), + ::Notify_Background( _pDrawObj, pAnchoredObj->GetPageFrame(), pAnchoredObj->GetObjRect(), PREP_FLY_ARRIVE, true ); } @@ -229,9 +229,9 @@ void SwContact::MoveObjToInvisibleLayer( SdrObject* _pDrawObj ) "<SwContact::MoveObjToInvisibleLayer(..)> - missing anchored object" ); // Note: as-character anchored objects aren't registered at a page frame and // a notification of its background isn't needed. - if ( pAnchoredObj && pAnchoredObj->GetPageFrm() ) + if ( pAnchoredObj && pAnchoredObj->GetPageFrame() ) { - ::Notify_Background( _pDrawObj, pAnchoredObj->GetPageFrm(), + ::Notify_Background( _pDrawObj, pAnchoredObj->GetPageFrame(), pAnchoredObj->GetObjRect(), PREP_FLY_LEAVE, true ); } } @@ -417,7 +417,7 @@ const SwAnchoredObject* SwFlyDrawContact::GetAnchoredObj( const SdrObject* _pSdr if ( _pSdrObj && dynamic_cast<const SwVirtFlyDrawObj*>( _pSdrObj) != nullptr ) { - pRetAnchoredObj = static_cast<const SwVirtFlyDrawObj*>(_pSdrObj)->GetFlyFrm(); + pRetAnchoredObj = static_cast<const SwVirtFlyDrawObj*>(_pSdrObj)->GetFlyFrame(); } return pRetAnchoredObj; @@ -436,7 +436,7 @@ SwAnchoredObject* SwFlyDrawContact::GetAnchoredObj( SdrObject* _pSdrObj ) if ( _pSdrObj && dynamic_cast<const SwVirtFlyDrawObj*>( _pSdrObj) != nullptr ) { - pRetAnchoredObj = static_cast<SwVirtFlyDrawObj*>(_pSdrObj)->GetFlyFrm(); + pRetAnchoredObj = static_cast<SwVirtFlyDrawObj*>(_pSdrObj)->GetFlyFrame(); } return pRetAnchoredObj; @@ -479,22 +479,22 @@ void SwFlyDrawContact::MoveObjToVisibleLayer( SdrObject* _pDrawObj ) return; } - SwFlyFrm* pFlyFrm = static_cast<SwVirtFlyDrawObj*>(_pDrawObj)->GetFlyFrm(); + SwFlyFrame* pFlyFrame = static_cast<SwVirtFlyDrawObj*>(_pDrawObj)->GetFlyFrame(); // #i44464# - consider, that Writer fly frame content // already exists - (e.g. WW8 document is inserted into a existing document). - if ( !pFlyFrm->Lower() ) + if ( !pFlyFrame->Lower() ) { - pFlyFrm->InsertColumns(); - pFlyFrm->Chain( pFlyFrm->AnchorFrm() ); - pFlyFrm->InsertCnt(); + pFlyFrame->InsertColumns(); + pFlyFrame->Chain( pFlyFrame->AnchorFrame() ); + pFlyFrame->InsertCnt(); } - if ( pFlyFrm->GetDrawObjs() ) + if ( pFlyFrame->GetDrawObjs() ) { - for ( size_t i = 0; i < pFlyFrm->GetDrawObjs()->size(); ++i) + for ( size_t i = 0; i < pFlyFrame->GetDrawObjs()->size(); ++i) { // #i28701# - consider type of objects in sorted object list. - SdrObject* pObj = (*pFlyFrm->GetDrawObjs())[i]->DrawObj(); + SdrObject* pObj = (*pFlyFrame->GetDrawObjs())[i]->DrawObj(); SwContact* pContact = static_cast<SwContact*>(pObj->GetUserCall()); pContact->MoveObjToVisibleLayer( pObj ); } @@ -520,16 +520,16 @@ void SwFlyDrawContact::MoveObjToInvisibleLayer( SdrObject* _pDrawObj ) return; } - SwFlyFrm* pFlyFrm = static_cast<SwVirtFlyDrawObj*>(_pDrawObj)->GetFlyFrm(); + SwFlyFrame* pFlyFrame = static_cast<SwVirtFlyDrawObj*>(_pDrawObj)->GetFlyFrame(); - pFlyFrm->Unchain(); - pFlyFrm->DeleteCnt(); - if ( pFlyFrm->GetDrawObjs() ) + pFlyFrame->Unchain(); + pFlyFrame->DeleteCnt(); + if ( pFlyFrame->GetDrawObjs() ) { - for ( size_t i = 0; i < pFlyFrm->GetDrawObjs()->size(); ++i) + for ( size_t i = 0; i < pFlyFrame->GetDrawObjs()->size(); ++i) { // #i28701# - consider type of objects in sorted object list. - SdrObject* pObj = (*pFlyFrm->GetDrawObjs())[i]->DrawObj(); + SdrObject* pObj = (*pFlyFrame->GetDrawObjs())[i]->DrawObj(); SwContact* pContact = static_cast<SwContact*>(pObj->GetUserCall()); pContact->MoveObjToInvisibleLayer( pObj ); } @@ -543,7 +543,7 @@ void SwFlyDrawContact::MoveObjToInvisibleLayer( SdrObject* _pDrawObj ) void SwFlyDrawContact::GetAnchoredObjs( std::list<SwAnchoredObject*>& _roAnchoredObjs ) const { const SwFrameFormat* pFormat = GetFormat(); - SwFlyFrm::GetAnchoredObjects( _roAnchoredObjs, *pFormat ); + SwFlyFrame::GetAnchoredObjects( _roAnchoredObjs, *pFormat ); } // SwDrawContact @@ -763,45 +763,45 @@ void SwDrawContact::SetMaster( SdrObject* _pNewMaster ) } } -const SwFrm* SwDrawContact::GetAnchorFrm( const SdrObject* _pDrawObj ) const +const SwFrame* SwDrawContact::GetAnchorFrame( const SdrObject* _pDrawObj ) const { - const SwFrm* pAnchorFrm = nullptr; + const SwFrame* pAnchorFrame = nullptr; if ( !_pDrawObj || _pDrawObj == GetMaster() || ( !_pDrawObj->GetUserCall() && GetUserCall( _pDrawObj ) == static_cast<const SwContact* const>(this) ) ) { - pAnchorFrm = maAnchoredDrawObj.GetAnchorFrm(); + pAnchorFrame = maAnchoredDrawObj.GetAnchorFrame(); } else if ( dynamic_cast<const SwDrawVirtObj*>( _pDrawObj) != nullptr ) { - pAnchorFrm = static_cast<const SwDrawVirtObj*>(_pDrawObj)->GetAnchorFrm(); + pAnchorFrame = static_cast<const SwDrawVirtObj*>(_pDrawObj)->GetAnchorFrame(); } else { - OSL_FAIL( "<SwDrawContact::GetAnchorFrm(..)> - unknown drawing object." ); + OSL_FAIL( "<SwDrawContact::GetAnchorFrame(..)> - unknown drawing object." ); } - return pAnchorFrm; + return pAnchorFrame; } -SwFrm* SwDrawContact::GetAnchorFrm( SdrObject* _pDrawObj ) +SwFrame* SwDrawContact::GetAnchorFrame( SdrObject* _pDrawObj ) { - SwFrm* pAnchorFrm = nullptr; + SwFrame* pAnchorFrame = nullptr; if ( !_pDrawObj || _pDrawObj == GetMaster() || ( !_pDrawObj->GetUserCall() && GetUserCall( _pDrawObj ) == this ) ) { - pAnchorFrm = maAnchoredDrawObj.AnchorFrm(); + pAnchorFrame = maAnchoredDrawObj.AnchorFrame(); } else { OSL_ENSURE( dynamic_cast<const SwDrawVirtObj*>( _pDrawObj) != nullptr, - "<SwDrawContact::GetAnchorFrm(..)> - unknown drawing object." ); - pAnchorFrm = static_cast<SwDrawVirtObj*>(_pDrawObj)->AnchorFrm(); + "<SwDrawContact::GetAnchorFrame(..)> - unknown drawing object." ); + pAnchorFrame = static_cast<SwDrawVirtObj*>(_pDrawObj)->AnchorFrame(); } - return pAnchorFrm; + return pAnchorFrame; } /// create a new 'virtual' drawing object. @@ -877,71 +877,71 @@ void SwDrawContact::RemoveAllVirtObjs() maDrawVirtObjs.clear(); } -SwDrawContact::VirtObjAnchoredAtFrmPred::VirtObjAnchoredAtFrmPred( - const SwFrm& _rAnchorFrm ) - : mpAnchorFrm( &_rAnchorFrm ) +SwDrawContact::VirtObjAnchoredAtFramePred::VirtObjAnchoredAtFramePred( + const SwFrame& _rAnchorFrame ) + : mpAnchorFrame( &_rAnchorFrame ) { - if ( mpAnchorFrm->IsContentFrm() ) + if ( mpAnchorFrame->IsContentFrame() ) { - const SwContentFrm* pTmpFrm = - static_cast<const SwContentFrm*>( mpAnchorFrm ); - while ( pTmpFrm->IsFollow() ) + const SwContentFrame* pTmpFrame = + static_cast<const SwContentFrame*>( mpAnchorFrame ); + while ( pTmpFrame->IsFollow() ) { - pTmpFrm = pTmpFrm->FindMaster(); + pTmpFrame = pTmpFrame->FindMaster(); } - mpAnchorFrm = pTmpFrm; + mpAnchorFrame = pTmpFrame; } } // #i26791# - compare with master frame -bool SwDrawContact::VirtObjAnchoredAtFrmPred::operator() ( const SwDrawVirtObj* _pDrawVirtObj ) +bool SwDrawContact::VirtObjAnchoredAtFramePred::operator() ( const SwDrawVirtObj* _pDrawVirtObj ) { - const SwFrm* pObjAnchorFrm = _pDrawVirtObj->GetAnchorFrm(); - if ( pObjAnchorFrm && pObjAnchorFrm->IsContentFrm() ) + const SwFrame* pObjAnchorFrame = _pDrawVirtObj->GetAnchorFrame(); + if ( pObjAnchorFrame && pObjAnchorFrame->IsContentFrame() ) { - const SwContentFrm* pTmpFrm = - static_cast<const SwContentFrm*>( pObjAnchorFrm ); - while ( pTmpFrm->IsFollow() ) + const SwContentFrame* pTmpFrame = + static_cast<const SwContentFrame*>( pObjAnchorFrame ); + while ( pTmpFrame->IsFollow() ) { - pTmpFrm = pTmpFrm->FindMaster(); + pTmpFrame = pTmpFrame->FindMaster(); } - pObjAnchorFrm = pTmpFrm; + pObjAnchorFrame = pTmpFrame; } - return ( pObjAnchorFrm == mpAnchorFrm ); + return ( pObjAnchorFrame == mpAnchorFrame ); } /// get drawing object ('master' or 'virtual') by frame. -SdrObject* SwDrawContact::GetDrawObjectByAnchorFrm( const SwFrm& _rAnchorFrm ) +SdrObject* SwDrawContact::GetDrawObjectByAnchorFrame( const SwFrame& _rAnchorFrame ) { SdrObject* pRetDrawObj = nullptr; // #i26791# - compare master frames instead of direct frames - const SwFrm* pProposedAnchorFrm = &_rAnchorFrm; - if ( pProposedAnchorFrm->IsContentFrm() ) + const SwFrame* pProposedAnchorFrame = &_rAnchorFrame; + if ( pProposedAnchorFrame->IsContentFrame() ) { - const SwContentFrm* pTmpFrm = - static_cast<const SwContentFrm*>( pProposedAnchorFrm ); - while ( pTmpFrm->IsFollow() ) + const SwContentFrame* pTmpFrame = + static_cast<const SwContentFrame*>( pProposedAnchorFrame ); + while ( pTmpFrame->IsFollow() ) { - pTmpFrm = pTmpFrm->FindMaster(); + pTmpFrame = pTmpFrame->FindMaster(); } - pProposedAnchorFrm = pTmpFrm; + pProposedAnchorFrame = pTmpFrame; } - const SwFrm* pMasterObjAnchorFrm = GetAnchorFrm(); - if ( pMasterObjAnchorFrm && pMasterObjAnchorFrm->IsContentFrm() ) + const SwFrame* pMasterObjAnchorFrame = GetAnchorFrame(); + if ( pMasterObjAnchorFrame && pMasterObjAnchorFrame->IsContentFrame() ) { - const SwContentFrm* pTmpFrm = - static_cast<const SwContentFrm*>( pMasterObjAnchorFrm ); - while ( pTmpFrm->IsFollow() ) + const SwContentFrame* pTmpFrame = + static_cast<const SwContentFrame*>( pMasterObjAnchorFrame ); + while ( pTmpFrame->IsFollow() ) { - pTmpFrm = pTmpFrm->FindMaster(); + pTmpFrame = pTmpFrame->FindMaster(); } - pMasterObjAnchorFrm = pTmpFrm; + pMasterObjAnchorFrame = pTmpFrame; } - if ( pMasterObjAnchorFrm && pMasterObjAnchorFrm == pProposedAnchorFrm ) + if ( pMasterObjAnchorFrame && pMasterObjAnchorFrame == pProposedAnchorFrame ) { pRetDrawObj = GetMaster(); } @@ -949,7 +949,7 @@ SdrObject* SwDrawContact::GetDrawObjectByAnchorFrm( const SwFrm& _rAnchorFrm ) { std::list<SwDrawVirtObj*>::const_iterator aFoundVirtObjIter = std::find_if( maDrawVirtObjs.begin(), maDrawVirtObjs.end(), - VirtObjAnchoredAtFrmPred( *pProposedAnchorFrm ) ); + VirtObjAnchoredAtFramePred( *pProposedAnchorFrame ) ); if ( aFoundVirtObjIter != maDrawVirtObjs.end() ) { @@ -967,10 +967,10 @@ void SwDrawContact::NotifyBackgrdOfAllVirtObjs( const Rectangle* pOldBoundRect ) ++aDrawVirtObjIter ) { SwDrawVirtObj* pDrawVirtObj = (*aDrawVirtObjIter); - if ( pDrawVirtObj->GetAnchorFrm() ) + if ( pDrawVirtObj->GetAnchorFrame() ) { // #i34640# - determine correct page frame - SwPageFrm* pPage = pDrawVirtObj->AnchoredObj().FindPageFrmOfAnchor(); + SwPageFrame* pPage = pDrawVirtObj->AnchoredObj().FindPageFrameOfAnchor(); if( pOldBoundRect && pPage ) { SwRect aOldRect( *pOldBoundRect ); @@ -983,7 +983,7 @@ void SwDrawContact::NotifyBackgrdOfAllVirtObjs( const Rectangle* pOldBoundRect ) SwRect aRect( pDrawVirtObj->GetAnchoredObj().GetObjRectWithSpaces() ); if (aRect.HasArea() && pPage) { - SwPageFrm* pPg = const_cast<SwPageFrm*>(static_cast<const SwPageFrm*>(::FindPage( aRect, pPage ))); + SwPageFrame* pPg = const_cast<SwPageFrame*>(static_cast<const SwPageFrame*>(::FindPage( aRect, pPage ))); if ( pPg ) ::Notify_Background( pDrawVirtObj, pPg, aRect, PREP_FLY_ARRIVE, true ); @@ -1001,27 +1001,27 @@ static void lcl_NotifyBackgroundOfObj( SwDrawContact& _rDrawContact, // #i34640# SwAnchoredObject* pAnchoredObj = const_cast<SwAnchoredObject*>(_rDrawContact.GetAnchoredObj( &_rObj )); - if ( pAnchoredObj && pAnchoredObj->GetAnchorFrm() ) + if ( pAnchoredObj && pAnchoredObj->GetAnchorFrame() ) { // #i34640# - determine correct page frame - SwPageFrm* pPageFrm = pAnchoredObj->FindPageFrmOfAnchor(); - if( _pOldObjRect && pPageFrm ) + SwPageFrame* pPageFrame = pAnchoredObj->FindPageFrameOfAnchor(); + if( _pOldObjRect && pPageFrame ) { SwRect aOldRect( *_pOldObjRect ); if( aOldRect.HasArea() ) { // #i34640# - determine correct page frame - SwPageFrm* pOldPageFrm = const_cast<SwPageFrm*>(static_cast<const SwPageFrm*>(::FindPage( aOldRect, pPageFrm ))); - ::Notify_Background( &_rObj, pOldPageFrm, aOldRect, + SwPageFrame* pOldPageFrame = const_cast<SwPageFrame*>(static_cast<const SwPageFrame*>(::FindPage( aOldRect, pPageFrame ))); + ::Notify_Background( &_rObj, pOldPageFrame, aOldRect, PREP_FLY_LEAVE, true); } } // #i34640# - include spacing for wrapping SwRect aNewRect( pAnchoredObj->GetObjRectWithSpaces() ); - if( aNewRect.HasArea() && pPageFrm ) + if( aNewRect.HasArea() && pPageFrame ) { - pPageFrm = const_cast<SwPageFrm*>(static_cast<const SwPageFrm*>(::FindPage( aNewRect, pPageFrm ))); - ::Notify_Background( &_rObj, pPageFrm, aNewRect, + pPageFrame = const_cast<SwPageFrame*>(static_cast<const SwPageFrame*>(::FindPage( aNewRect, pPageFrame ))); + ::Notify_Background( &_rObj, pPageFrame, aNewRect, PREP_FLY_ARRIVE, true ); } ClrContourCache( &_rObj ); @@ -1051,7 +1051,7 @@ void SwDrawContact::Changed( const SdrObject& rObj, //Put on Action, but not if presently anywhere an action runs. bool bHasActions(true); - SwRootFrm *pTmpRoot = pDoc->getIDocumentLayoutAccess().GetCurrentLayout(); + SwRootFrame *pTmpRoot = pDoc->getIDocumentLayoutAccess().GetCurrentLayout(); if ( pTmpRoot && pTmpRoot->IsCallbackActionEnabled() ) { SwViewShell* const pSh = pDoc->getIDocumentLayoutAccess().GetCurrentViewShell(); @@ -1155,9 +1155,9 @@ void lcl_textBoxSizeNotify(SwFrameFormat* pFormat) { // Just notify the textbox that the size has changed, the actual object size is not interesting. SfxItemSet aResizeSet(pFormat->GetDoc()->GetAttrPool(), RES_FRM_SIZE, RES_FRM_SIZE, 0); - SwFormatFrmSize aSize; + SwFormatFrameSize aSize; aResizeSet.Put(aSize); - SwTextBoxHelper::syncFlyFrmAttr(*pFormat, aResizeSet); + SwTextBoxHelper::syncFlyFrameAttr(*pFormat, aResizeSet); } } @@ -1371,7 +1371,7 @@ void SwDrawContact::_Changed( const SdrObject& rObj, if ( nYPosDiff || ( !bAnchoredAsChar && nXPosDiff != 0 ) ) { - GetFormat()->GetDoc()->SetFlyFrmAttr( *(GetFormat()), aSet ); + GetFormat()->GetDoc()->SetFlyFrameAttr( *(GetFormat()), aSet ); // keep new object rectangle, to avoid multiple // changes of the attributes by multiple event from // the drawing layer - e.g. group objects and its members @@ -1387,10 +1387,10 @@ void SwDrawContact::_Changed( const SdrObject& rObj, // of as-character anchored object if ( bAnchoredAsChar ) { - SwFrm* pAnchorFrm = const_cast<SwAnchoredDrawObject*>(pAnchoredDrawObj)->AnchorFrm(); - if(pAnchorFrm) + SwFrame* pAnchorFrame = const_cast<SwAnchoredDrawObject*>(pAnchoredDrawObj)->AnchorFrame(); + if(pAnchorFrame) { - pAnchorFrm->Prepare( PREP_FLY_ATTR_CHG, GetFormat() ); + pAnchorFrame->Prepare( PREP_FLY_ATTR_CHG, GetFormat() ); } } @@ -1455,7 +1455,7 @@ void SwDrawContact::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) // for notification const Rectangle* pOldRect = nullptr; Rectangle aOldRect; - if ( GetAnchorFrm() ) + if ( GetAnchorFrame() ) { // --> #i36181# - include spacing in object // rectangle for notification. @@ -1485,7 +1485,7 @@ void SwDrawContact::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) DisconnectFromLayout(); } // --> #i62875# - no further notification, if not connected to Writer layout - else if ( maAnchoredDrawObj.GetAnchorFrm() && + else if ( maAnchoredDrawObj.GetAnchorFrame() && maAnchoredDrawObj.GetDrawObj()->GetUserCall() ) { // --> #i28701# - on change of wrapping style, hell|heaven layer, @@ -1590,7 +1590,7 @@ void SwDrawContact::DisconnectFromLayout( bool _bMoveMasterToInvisibleLayer ) // --> #i36181# - notify background of drawing object if ( _bMoveMasterToInvisibleLayer && !(GetFormat()->GetDoc()->IsInDtor()) && - GetAnchorFrm() && !GetAnchorFrm()->IsInDtor() ) + GetAnchorFrame() && !GetAnchorFrame()->IsInDtor() ) { const Rectangle aOldRect( maAnchoredDrawObj.GetObjRectWithSpaces().SVRect() ); lcl_NotifyBackgroundOfObj( *this, *GetMaster(), &aOldRect ); @@ -1608,9 +1608,9 @@ void SwDrawContact::DisconnectFromLayout( bool _bMoveMasterToInvisibleLayer ) pDrawVirtObj->RemoveFromDrawingPage(); } - if ( maAnchoredDrawObj.GetAnchorFrm() ) + if ( maAnchoredDrawObj.GetAnchorFrame() ) { - maAnchoredDrawObj.AnchorFrm()->RemoveDrawObj( maAnchoredDrawObj ); + maAnchoredDrawObj.AnchorFrame()->RemoveDrawObj( maAnchoredDrawObj ); } if ( _bMoveMasterToInvisibleLayer && GetMaster() && GetMaster()->IsInserted() ) @@ -1674,15 +1674,15 @@ void SwDrawContact::DisconnectObjFromLayout( SdrObject* _pDrawObj ) // replace found 'virtual' drawing object by 'master' drawing // object and disconnect the 'virtual' one SwDrawVirtObj* pDrawVirtObj = (*aFoundVirtObjIter); - SwFrm* pNewAnchorFrmOfMaster = pDrawVirtObj->AnchorFrm(); + SwFrame* pNewAnchorFrameOfMaster = pDrawVirtObj->AnchorFrame(); // disconnect 'virtual' drawing object pDrawVirtObj->RemoveFromWriterLayout(); pDrawVirtObj->RemoveFromDrawingPage(); // disconnect 'master' drawing object from current frame - GetAnchorFrm()->RemoveDrawObj( maAnchoredDrawObj ); + GetAnchorFrame()->RemoveDrawObj( maAnchoredDrawObj ); // re-connect 'master' drawing object to frame of found 'virtual' // drawing object. - pNewAnchorFrmOfMaster->AppendDrawObj( maAnchoredDrawObj ); + pNewAnchorFrameOfMaster->AppendDrawObj( maAnchoredDrawObj ); } else { @@ -1693,11 +1693,11 @@ void SwDrawContact::DisconnectObjFromLayout( SdrObject* _pDrawObj ) } } -static SwTextFrm* lcl_GetFlyInContentAnchor( SwTextFrm* _pProposedAnchorFrm, +static SwTextFrame* lcl_GetFlyInContentAnchor( SwTextFrame* _pProposedAnchorFrame, const sal_Int32 _nTextOfs ) { - SwTextFrm* pAct = _pProposedAnchorFrm; - SwTextFrm* pTmp; + SwTextFrame* pAct = _pProposedAnchorFrame; + SwTextFrame* pTmp; do { pTmp = pAct; @@ -1747,12 +1747,12 @@ void SwDrawContact::ConnectToLayout( const SwFormatAnchor* pAnch ) SwViewShell *pShell = pDrawFrameFormat->getIDocumentLayoutAccess().GetCurrentViewShell(); if( !pShell ) break; - SwRootFrm* pRoot = pShell->GetLayout(); - SwPageFrm *pPage = static_cast<SwPageFrm*>(pRoot->Lower()); + SwRootFrame* pRoot = pShell->GetLayout(); + SwPageFrame *pPage = static_cast<SwPageFrame*>(pRoot->Lower()); for ( sal_uInt16 i = 1; i < nPgNum && pPage; ++i ) { - pPage = static_cast<SwPageFrm*>(pPage->GetNext()); + pPage = static_cast<SwPageFrame*>(pPage->GetNext()); } if ( pPage ) @@ -1778,7 +1778,7 @@ void SwDrawContact::ConnectToLayout( const SwFormatAnchor* pAnch ) // but not control objects: // anchor at first found frame the 'master' object and // at the following frames 'virtual' drawing objects. - // Note: method is similar to <SwFlyFrameFormat::MakeFrms(..)> + // Note: method is similar to <SwFlyFrameFormat::MakeFrames(..)> SwModify *pModify = nullptr; if( pAnch->GetContentAnchor() ) { @@ -1786,7 +1786,7 @@ void SwDrawContact::ConnectToLayout( const SwFormatAnchor* pAnch ) { SwNodeIndex aIdx( pAnch->GetContentAnchor()->nNode ); SwContentNode* pCNd = pDrawFrameFormat->GetDoc()->GetNodes().GoNext( &aIdx ); - if ( SwIterator<SwFrm,SwContentNode>( *pCNd ).First() ) + if ( SwIterator<SwFrame,SwContentNode>( *pCNd ).First() ) pModify = pCNd; else { @@ -1819,42 +1819,42 @@ void SwDrawContact::ConnectToLayout( const SwFormatAnchor* pAnch ) break; } - SwIterator<SwFrm,SwModify> aIter( *pModify ); - SwFrm* pAnchorFrmOfMaster = nullptr; - for( SwFrm *pFrm = aIter.First(); pFrm; pFrm = aIter.Next() ) + SwIterator<SwFrame,SwModify> aIter( *pModify ); + SwFrame* pAnchorFrameOfMaster = nullptr; + for( SwFrame *pFrame = aIter.First(); pFrame; pFrame = aIter.Next() ) { // append drawing object, if // (1) proposed anchor frame isn't a follow and // (2) drawing object isn't a control object to be anchored // in header/footer. - const bool bAdd = ( !pFrm->IsContentFrm() || - !static_cast<SwContentFrm*>(pFrm)->IsFollow() ) && + const bool bAdd = ( !pFrame->IsContentFrame() || + !static_cast<SwContentFrame*>(pFrame)->IsFollow() ) && ( !::CheckControlLayer( GetMaster() ) || - !pFrm->FindFooterOrHeader() ); + !pFrame->FindFooterOrHeader() ); if( bAdd ) { - if ( FLY_AT_FLY == pAnch->GetAnchorId() && !pFrm->IsFlyFrm() ) + if ( FLY_AT_FLY == pAnch->GetAnchorId() && !pFrame->IsFlyFrame() ) { - pFrm = pFrm->FindFlyFrm(); - OSL_ENSURE( pFrm, + pFrame = pFrame->FindFlyFrame(); + OSL_ENSURE( pFrame, "<SwDrawContact::ConnectToLayout(..)> - missing fly frame -> crash." ); } // find correct follow for as character anchored objects if ((pAnch->GetAnchorId() == FLY_AS_CHAR) && - pFrm->IsTextFrm() ) + pFrame->IsTextFrame() ) { - pFrm = lcl_GetFlyInContentAnchor( - static_cast<SwTextFrm*>(pFrm), + pFrame = lcl_GetFlyInContentAnchor( + static_cast<SwTextFrame*>(pFrame), pAnch->GetContentAnchor()->nContent.GetIndex() ); } - if ( !pAnchorFrmOfMaster ) + if ( !pAnchorFrameOfMaster ) { // append 'master' drawing object - pAnchorFrmOfMaster = pFrm; - pFrm->AppendDrawObj( maAnchoredDrawObj ); + pAnchorFrameOfMaster = pFrame; + pFrame->AppendDrawObj( maAnchoredDrawObj ); } else { @@ -1864,14 +1864,14 @@ void SwDrawContact::ConnectToLayout( const SwFormatAnchor* pAnch ) { ClrContourCache( pDrawVirtObj ); } - pFrm->AppendDrawObj( pDrawVirtObj->AnchoredObj() ); + pFrame->AppendDrawObj( pDrawVirtObj->AnchoredObj() ); pDrawVirtObj->ActionChanged(); } if ( pAnch->GetAnchorId() == FLY_AS_CHAR ) { - pFrm->InvalidatePrt(); + pFrame->InvalidatePrt(); } } } @@ -1881,9 +1881,9 @@ void SwDrawContact::ConnectToLayout( const SwFormatAnchor* pAnch ) OSL_FAIL( "Unknown Anchor." ); break; } - if ( GetAnchorFrm() ) + if ( GetAnchorFrame() ) { - ::setContextWritingMode( maAnchoredDrawObj.DrawObj(), GetAnchorFrm() ); + ::setContextWritingMode( maAnchoredDrawObj.DrawObj(), GetAnchorFrame() ); // #i26791# - invalidate objects instead of direct positioning _InvalidateObjs(); } @@ -1900,14 +1900,14 @@ void SwDrawContact::InsertMasterIntoDrawPage() GetMaster()->SetUserCall( this ); } -SwPageFrm* SwDrawContact::FindPage( const SwRect &rRect ) +SwPageFrame* SwDrawContact::FindPage( const SwRect &rRect ) { - // --> #i28701# - use method <GetPageFrm()> - SwPageFrm* pPg = GetPageFrm(); - if ( !pPg && GetAnchorFrm() ) - pPg = GetAnchorFrm()->FindPageFrm(); + // --> #i28701# - use method <GetPageFrame()> + SwPageFrame* pPg = GetPageFrame(); + if ( !pPg && GetAnchorFrame() ) + pPg = GetAnchorFrame()->FindPageFrame(); if ( pPg ) - pPg = const_cast<SwPageFrm*>(static_cast<const SwPageFrm*>(::FindPage( rRect, pPg ))); + pPg = const_cast<SwPageFrame*>(static_cast<const SwPageFrame*>(::FindPage( rRect, pPg ))); return pPg; } @@ -1920,26 +1920,26 @@ void SwDrawContact::ChkPage() } // --> #i28701# - SwPageFrm* pPg = ( maAnchoredDrawObj.GetAnchorFrm() && - maAnchoredDrawObj.GetAnchorFrm()->IsPageFrm() ) - ? GetPageFrm() + SwPageFrame* pPg = ( maAnchoredDrawObj.GetAnchorFrame() && + maAnchoredDrawObj.GetAnchorFrame()->IsPageFrame() ) + ? GetPageFrame() : FindPage( GetMaster()->GetCurrentBoundRect() ); - if ( GetPageFrm() != pPg ) + if ( GetPageFrame() != pPg ) { // if drawing object is anchor in header/footer a change of the page // is a dramatic change. Thus, completely re-connect to the layout - if ( maAnchoredDrawObj.GetAnchorFrm() && - maAnchoredDrawObj.GetAnchorFrm()->FindFooterOrHeader() ) + if ( maAnchoredDrawObj.GetAnchorFrame() && + maAnchoredDrawObj.GetAnchorFrame()->FindFooterOrHeader() ) { ConnectToLayout(); } else { - // --> #i28701# - use methods <GetPageFrm()> and <SetPageFrm> - if ( GetPageFrm() ) - GetPageFrm()->RemoveDrawObjFromPage( maAnchoredDrawObj ); + // --> #i28701# - use methods <GetPageFrame()> and <SetPageFrame> + if ( GetPageFrame() ) + GetPageFrame()->RemoveDrawObjFromPage( maAnchoredDrawObj ); pPg->AppendDrawObjToPage( maAnchoredDrawObj ); - SetPageFrm( pPg ); + SetPageFrame( pPg ); } } } @@ -2185,25 +2185,25 @@ SwDrawVirtObj* SwDrawVirtObj::Clone() const return pObj; } -const SwFrm* SwDrawVirtObj::GetAnchorFrm() const +const SwFrame* SwDrawVirtObj::GetAnchorFrame() const { // #i26791# - use new member <maAnchoredDrawObj> - return maAnchoredDrawObj.GetAnchorFrm(); + return maAnchoredDrawObj.GetAnchorFrame(); } -SwFrm* SwDrawVirtObj::AnchorFrm() +SwFrame* SwDrawVirtObj::AnchorFrame() { // #i26791# - use new member <maAnchoredDrawObj> - return maAnchoredDrawObj.AnchorFrm(); + return maAnchoredDrawObj.AnchorFrame(); } void SwDrawVirtObj::RemoveFromWriterLayout() { // remove contact object from frame for 'virtual' drawing object // #i26791# - use new member <maAnchoredDrawObj> - if ( maAnchoredDrawObj.GetAnchorFrm() ) + if ( maAnchoredDrawObj.GetAnchorFrame() ) { - maAnchoredDrawObj.AnchorFrm()->RemoveDrawObj( maAnchoredDrawObj ); + maAnchoredDrawObj.AnchorFrame()->RemoveDrawObj( maAnchoredDrawObj ); } } @@ -2248,7 +2248,7 @@ void SwDrawVirtObj::RemoveFromDrawingPage() /// Is 'virtual' drawing object connected to writer layout and to drawing layer? bool SwDrawVirtObj::IsConnected() const { - bool bRetVal = GetAnchorFrm() && + bool bRetVal = GetAnchorFrame() && ( GetPage() && GetUserCall() ); return bRetVal; diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx index d03ca0121f32..90262203ad3a 100644 --- a/sw/source/core/draw/dflyobj.cxx +++ b/sw/source/core/draw/dflyobj.cxx @@ -324,11 +324,11 @@ basegfx::B2DRange SwVirtFlyDrawObj::getOuterBound() const if(dynamic_cast<const SwFlyDrawObj*>( &rReferencedObject) != nullptr) { - const SwFlyFrm* pFlyFrame = GetFlyFrm(); + const SwFlyFrame* pFlyFrame = GetFlyFrame(); if(pFlyFrame) { - const Rectangle aOuterRectangle(pFlyFrame->Frm().Pos(), pFlyFrame->Frm().SSize()); + const Rectangle aOuterRectangle(pFlyFrame->Frame().Pos(), pFlyFrame->Frame().SSize()); if(!aOuterRectangle.IsEmpty()) { @@ -348,11 +348,11 @@ basegfx::B2DRange SwVirtFlyDrawObj::getInnerBound() const if(dynamic_cast<const SwFlyDrawObj*>( &rReferencedObject) != nullptr) { - const SwFlyFrm* pFlyFrame = GetFlyFrm(); + const SwFlyFrame* pFlyFrame = GetFlyFrame(); if(pFlyFrame) { - const Rectangle aInnerRectangle(pFlyFrame->Frm().Pos() + pFlyFrame->Prt().Pos(), pFlyFrame->Prt().SSize()); + const Rectangle aInnerRectangle(pFlyFrame->Frame().Pos() + pFlyFrame->Prt().Pos(), pFlyFrame->Prt().SSize()); if(!aInnerRectangle.IsEmpty()) { @@ -372,11 +372,11 @@ sdr::contact::ViewContact* SwVirtFlyDrawObj::CreateObjectSpecificViewContact() return new sdr::contact::VCOfSwVirtFlyDrawObj(*this); } -SwVirtFlyDrawObj::SwVirtFlyDrawObj(SdrObject& rNew, SwFlyFrm* pFly) : +SwVirtFlyDrawObj::SwVirtFlyDrawObj(SdrObject& rNew, SwFlyFrame* pFly) : SdrVirtObj( rNew ), - m_pFlyFrm( pFly ) + m_pFlyFrame( pFly ) { - const SvxProtectItem &rP = m_pFlyFrm->GetFormat()->GetProtect(); + const SvxProtectItem &rP = m_pFlyFrame->GetFormat()->GetProtect(); bMovProt = rP.IsPosProtected(); bSizProt = rP.IsSizeProtected(); } @@ -389,11 +389,11 @@ SwVirtFlyDrawObj::~SwVirtFlyDrawObj() const SwFrameFormat *SwVirtFlyDrawObj::GetFormat() const { - return GetFlyFrm()->GetFormat(); + return GetFlyFrame()->GetFormat(); } SwFrameFormat *SwVirtFlyDrawObj::GetFormat() { - return GetFlyFrm()->GetFormat(); + return GetFlyFrame()->GetFormat(); } // --> OD #i102707# @@ -444,7 +444,7 @@ namespace void SwVirtFlyDrawObj::wrap_DoPaintObject( drawinglayer::geometry::ViewInformation2D const& rViewInformation) const { - SwViewShell* pShell = m_pFlyFrm->getRootFrm()->GetCurrShell(); + SwViewShell* pShell = m_pFlyFrame->getRootFrame()->GetCurrShell(); // Only paint when we have a current shell and a DrawingLayer paint is in progress. // This avoids evtl. problems with renderers which do processing stuff, @@ -455,7 +455,7 @@ void SwVirtFlyDrawObj::wrap_DoPaintObject( { bool bDrawObject(true); - if ( !SwFlyFrm::IsPaint( const_cast<SwVirtFlyDrawObj*>(this), pShell ) ) + if ( !SwFlyFrame::IsPaint( const_cast<SwVirtFlyDrawObj*>(this), pShell ) ) { bDrawObject = false; } @@ -466,7 +466,7 @@ void SwVirtFlyDrawObj::wrap_DoPaintObject( // which is slow, wastes memory, and can cause other trouble. (void) rViewInformation; // suppress "unused parameter" warning assert(comphelper::LibreOfficeKit::isActive() || !rViewInformation.getViewport().isEmpty()); - if ( !m_pFlyFrm->IsFlyInCntFrm() ) + if ( !m_pFlyFrame->IsFlyInContentFrame() ) { // it is also necessary to restore the VCL MapMode from ViewInformation since e.g. // the VCL PixelRenderer resets it at the used OutputDevice. Unfortunately, this @@ -477,7 +477,7 @@ void SwVirtFlyDrawObj::wrap_DoPaintObject( RestoreMapMode aRestoreMapModeIfNeeded( pShell ); // paint the FlyFrame (use standard VCL-Paint) - m_pFlyFrm->Paint( *pShell->GetOut(), GetFlyFrm()->Frm() ); + m_pFlyFrame->Paint( *pShell->GetOut(), GetFlyFrame()->Frame() ); } } } @@ -499,8 +499,8 @@ void SwVirtFlyDrawObj::TakeObjInfo( SdrObjTransformInfoRec& rInfo ) const void SwVirtFlyDrawObj::SetRect() const { - if ( GetFlyFrm()->Frm().HasArea() ) - const_cast<SwVirtFlyDrawObj*>(this)->aOutRect = GetFlyFrm()->Frm().SVRect(); + if ( GetFlyFrame()->Frame().HasArea() ) + const_cast<SwVirtFlyDrawObj*>(this)->aOutRect = GetFlyFrame()->Frame().SVRect(); else const_cast<SwVirtFlyDrawObj*>(this)->aOutRect = Rectangle(); } @@ -570,7 +570,7 @@ void SwVirtFlyDrawObj::NbcSetLogicRect(const Rectangle& ) ::basegfx::B2DPolyPolygon SwVirtFlyDrawObj::TakeXorPoly() const { - const Rectangle aSourceRectangle(GetFlyFrm()->Frm().SVRect()); + const Rectangle aSourceRectangle(GetFlyFrame()->Frame().SVRect()); const ::basegfx::B2DRange aSourceRange(aSourceRectangle.Left(), aSourceRectangle.Top(), aSourceRectangle.Right(), aSourceRectangle.Bottom()); ::basegfx::B2DPolyPolygon aRetval; @@ -584,13 +584,13 @@ void SwVirtFlyDrawObj::NbcSetLogicRect(const Rectangle& ) void SwVirtFlyDrawObj::NbcMove(const Size& rSiz) { MoveRect( aOutRect, rSiz ); - const Point aOldPos( GetFlyFrm()->Frm().Pos() ); + const Point aOldPos( GetFlyFrame()->Frame().Pos() ); const Point aNewPos( aOutRect.TopLeft() ); const SwRect aFlyRect( aOutRect ); //If the Fly has a automatic align (right or top), //so preserve the automatic. - SwFrameFormat *pFormat = GetFlyFrm()->GetFormat(); + SwFrameFormat *pFormat = GetFlyFrame()->GetFormat(); const sal_Int16 eHori = pFormat->GetHoriOrient().GetHoriOrient(); const sal_Int16 eVert = pFormat->GetVertOrient().GetVertOrient(); const sal_Int16 eRelHori = pFormat->GetHoriOrient().GetRelationOrient(); @@ -598,8 +598,8 @@ void SwVirtFlyDrawObj::NbcMove(const Size& rSiz) //On paragraph bound Flys starting from the new position a new //anchor must be set. Anchor and the new RelPos is calculated and //placed by the Fly itself. - if( GetFlyFrm()->IsFlyAtCntFrm() ) - static_cast<SwFlyAtCntFrm*>(GetFlyFrm())->SetAbsPos( aNewPos ); + if( GetFlyFrame()->IsFlyAtContentFrame() ) + static_cast<SwFlyAtContentFrame*>(GetFlyFrame())->SetAbsPos( aNewPos ); else { const SwFrameFormat *pTmpFormat = GetFormat(); @@ -607,20 +607,20 @@ void SwVirtFlyDrawObj::NbcMove(const Size& rSiz) const SwFormatHoriOrient &rHori = pTmpFormat->GetHoriOrient(); long lXDiff = aNewPos.X() - aOldPos.X(); if( rHori.IsPosToggle() && text::HoriOrientation::NONE == eHori && - !GetFlyFrm()->FindPageFrm()->OnRightPage() ) + !GetFlyFrame()->FindPageFrame()->OnRightPage() ) lXDiff = -lXDiff; - if( GetFlyFrm()->GetAnchorFrm()->IsRightToLeft() && + if( GetFlyFrame()->GetAnchorFrame()->IsRightToLeft() && text::HoriOrientation::NONE == eHori ) lXDiff = -lXDiff; long lYDiff = aNewPos.Y() - aOldPos.Y(); - if( GetFlyFrm()->GetAnchorFrm()->IsVertical() ) + if( GetFlyFrame()->GetAnchorFrame()->IsVertical() ) { //lXDiff -= rVert.GetPos(); //lYDiff += rHori.GetPos(); - if ( GetFlyFrm()->GetAnchorFrm()->IsVertLR() ) + if ( GetFlyFrame()->GetAnchorFrame()->IsVertLR() ) { lXDiff += rVert.GetPos(); lXDiff = -lXDiff; @@ -637,13 +637,13 @@ void SwVirtFlyDrawObj::NbcMove(const Size& rSiz) lYDiff += rVert.GetPos(); } - if( GetFlyFrm()->GetAnchorFrm()->IsRightToLeft() && + if( GetFlyFrame()->GetAnchorFrame()->IsRightToLeft() && text::HoriOrientation::NONE != eHori ) - lXDiff = GetFlyFrm()->GetAnchorFrm()->Frm().Width() - + lXDiff = GetFlyFrame()->GetAnchorFrame()->Frame().Width() - aFlyRect.Width() - lXDiff; const Point aTmp( lXDiff, lYDiff ); - GetFlyFrm()->ChgRelPos( aTmp ); + GetFlyFrame()->ChgRelPos( aTmp ); } SwAttrSet aSet( pFormat->GetDoc()->GetAttrPool(), @@ -652,15 +652,15 @@ void SwVirtFlyDrawObj::NbcMove(const Size& rSiz) SwFormatVertOrient aVert( pFormat->GetVertOrient() ); bool bPut = false; - if( !GetFlyFrm()->IsFlyLayFrm() && + if( !GetFlyFrame()->IsFlyLayFrame() && ::GetHtmlMode(pFormat->GetDoc()->GetDocShell()) ) { //In HTML-Mode only automatic aligns are allowed. //Only we can try a snap to left/right respectively left-/right border - const SwFrm* pAnch = GetFlyFrm()->GetAnchorFrm(); + const SwFrame* pAnch = GetFlyFrame()->GetAnchorFrame(); bool bNextLine = false; - if( !GetFlyFrm()->IsAutoPos() || text::RelOrientation::PAGE_FRAME != aHori.GetRelationOrient() ) + if( !GetFlyFrame()->IsAutoPos() || text::RelOrientation::PAGE_FRAME != aHori.GetRelationOrient() ) { if( text::RelOrientation::CHAR == eRelHori ) { @@ -671,21 +671,21 @@ void SwVirtFlyDrawObj::NbcMove(const Size& rSiz) { bNextLine = true; //Horizontal Align: - const bool bLeftFrm = - aFlyRect.Left() < pAnch->Frm().Left() + pAnch->Prt().Left(), + const bool bLeftFrame = + aFlyRect.Left() < pAnch->Frame().Left() + pAnch->Prt().Left(), bLeftPrt = aFlyRect.Left() + aFlyRect.Width() < - pAnch->Frm().Left() + pAnch->Prt().Width()/2; - if ( bLeftFrm || bLeftPrt ) + pAnch->Frame().Left() + pAnch->Prt().Width()/2; + if ( bLeftFrame || bLeftPrt ) { aHori.SetHoriOrient( text::HoriOrientation::LEFT ); - aHori.SetRelationOrient( bLeftFrm ? text::RelOrientation::FRAME : text::RelOrientation::PRINT_AREA ); + aHori.SetRelationOrient( bLeftFrame ? text::RelOrientation::FRAME : text::RelOrientation::PRINT_AREA ); } else { - const bool bRightFrm = aFlyRect.Left() > - pAnch->Frm().Left() + pAnch->Prt().Width(); + const bool bRightFrame = aFlyRect.Left() > + pAnch->Frame().Left() + pAnch->Prt().Width(); aHori.SetHoriOrient( text::HoriOrientation::RIGHT ); - aHori.SetRelationOrient( bRightFrm ? text::RelOrientation::FRAME : text::RelOrientation::PRINT_AREA ); + aHori.SetRelationOrient( bRightFrame ? text::RelOrientation::FRAME : text::RelOrientation::PRINT_AREA ); } } aSet.Put( aHori ); @@ -694,7 +694,7 @@ void SwVirtFlyDrawObj::NbcMove(const Size& rSiz) //only on manual align will be switched over. bool bRelChar = text::RelOrientation::CHAR == eRelVert; aVert.SetVertOrient( eVert != text::VertOrientation::NONE ? eVert : - GetFlyFrm()->IsFlyInCntFrm() ? text::VertOrientation::CHAR_CENTER : + GetFlyFrame()->IsFlyInContentFrame() ? text::VertOrientation::CHAR_CENTER : bRelChar && bNextLine ? text::VertOrientation::CHAR_TOP : text::VertOrientation::TOP ); if( bRelChar ) aVert.SetRelationOrient( text::RelOrientation::CHAR ); @@ -730,7 +730,7 @@ void SwVirtFlyDrawObj::NbcMove(const Size& rSiz) void SwVirtFlyDrawObj::NbcCrop(const Point& rRef, const Fraction& xFact, const Fraction& yFact) { // Get Wrt Shell - SwWrtShell *pSh = dynamic_cast<SwWrtShell*>( GetFlyFrm()->getRootFrm()->GetCurrShell() ); + SwWrtShell *pSh = dynamic_cast<SwWrtShell*>( GetFlyFrame()->getRootFrame()->GetCurrShell() ); if (!pSh || dynamic_cast<const SwWrtShell*>( pSh) == nullptr) return; @@ -799,7 +799,7 @@ void SwVirtFlyDrawObj::NbcCrop(const Point& rRef, const Fraction& xFact, const F // Set new frame size SwFrameFormat *pFormat = GetFormat(); - SwFormatFrmSize aSz( pFormat->GetFrmSize() ); + SwFormatFrameSize aSz( pFormat->GetFrameSize() ); aSz.SetWidth(aNewRect.GetWidth()); aSz.SetHeight(aNewRect.GetHeight()); pFormat->GetDoc()->SetAttr( aSz, *pFormat ); @@ -814,14 +814,14 @@ void SwVirtFlyDrawObj::NbcResize(const Point& rRef, { ResizeRect( aOutRect, rRef, xFact, yFact ); - const SwFrm* pTmpFrm = GetFlyFrm()->GetAnchorFrm(); - if( !pTmpFrm ) - pTmpFrm = GetFlyFrm(); - const bool bVertX = pTmpFrm->IsVertical(); + const SwFrame* pTmpFrame = GetFlyFrame()->GetAnchorFrame(); + if( !pTmpFrame ) + pTmpFrame = GetFlyFrame(); + const bool bVertX = pTmpFrame->IsVertical(); - const bool bRTL = pTmpFrm->IsRightToLeft(); + const bool bRTL = pTmpFrame->IsRightToLeft(); - const bool bVertL2RX = pTmpFrm->IsVertLR(); + const bool bVertL2RX = pTmpFrame->IsVertLR(); const Point aNewPos( ( bVertX && !bVertL2RX ) || bRTL ? aOutRect.Right() + 1 : aOutRect.Left(), @@ -829,12 +829,12 @@ void SwVirtFlyDrawObj::NbcResize(const Point& rRef, Size aSz( aOutRect.Right() - aOutRect.Left() + 1, aOutRect.Bottom()- aOutRect.Top() + 1 ); - if( aSz != GetFlyFrm()->Frm().SSize() ) + if( aSz != GetFlyFrame()->Frame().SSize() ) { //The width of the columns should not be too narrow - if ( GetFlyFrm()->Lower() && GetFlyFrm()->Lower()->IsColumnFrm() ) + if ( GetFlyFrame()->Lower() && GetFlyFrame()->Lower()->IsColumnFrame() ) { - SwBorderAttrAccess aAccess( SwFrm::GetCache(), GetFlyFrm() ); + SwBorderAttrAccess aAccess( SwFrame::GetCache(), GetFlyFrame() ); const SwBorderAttrs &rAttrs = *aAccess.Get(); long nMin = rAttrs.CalcLeftLine()+rAttrs.CalcRightLine(); const SwFormatCol& rCol = rAttrs.GetAttrSet().GetCol(); @@ -850,17 +850,17 @@ void SwVirtFlyDrawObj::NbcResize(const Point& rRef, } SwFrameFormat *pFormat = GetFormat(); - const SwFormatFrmSize aOldFrmSz( pFormat->GetFrmSize() ); - GetFlyFrm()->ChgSize( aSz ); - SwFormatFrmSize aFrmSz( pFormat->GetFrmSize() ); - if ( aFrmSz.GetWidthPercent() || aFrmSz.GetHeightPercent() ) + const SwFormatFrameSize aOldFrameSz( pFormat->GetFrameSize() ); + GetFlyFrame()->ChgSize( aSz ); + SwFormatFrameSize aFrameSz( pFormat->GetFrameSize() ); + if ( aFrameSz.GetWidthPercent() || aFrameSz.GetHeightPercent() ) { long nRelWidth, nRelHeight; - const SwFrm *pRel = GetFlyFrm()->IsFlyLayFrm() ? - GetFlyFrm()->GetAnchorFrm() : - GetFlyFrm()->GetAnchorFrm()->GetUpper(); - const SwViewShell *pSh = GetFlyFrm()->getRootFrm()->GetCurrShell(); - if ( pSh && pRel->IsBodyFrm() && + const SwFrame *pRel = GetFlyFrame()->IsFlyLayFrame() ? + GetFlyFrame()->GetAnchorFrame() : + GetFlyFrame()->GetAnchorFrame()->GetUpper(); + const SwViewShell *pSh = GetFlyFrame()->getRootFrame()->GetCurrShell(); + if ( pSh && pRel->IsBodyFrame() && pSh->GetViewOptions()->getBrowseMode() && pSh->VisArea().HasArea() ) { @@ -874,20 +874,20 @@ void SwVirtFlyDrawObj::NbcResize(const Point& rRef, nRelWidth = pRel->Prt().Width(); nRelHeight = pRel->Prt().Height(); } - if ( aFrmSz.GetWidthPercent() && aFrmSz.GetWidthPercent() != SwFormatFrmSize::SYNCED && - aOldFrmSz.GetWidth() != aFrmSz.GetWidth() ) - aFrmSz.SetWidthPercent( sal_uInt8(aSz.Width() * 100.0 / nRelWidth + 0.5) ); - if ( aFrmSz.GetHeightPercent() && aFrmSz.GetHeightPercent() != SwFormatFrmSize::SYNCED && - aOldFrmSz.GetHeight() != aFrmSz.GetHeight() ) - aFrmSz.SetHeightPercent( sal_uInt8(aSz.Height() * 100.0 / nRelHeight + 0.5) ); - pFormat->GetDoc()->SetAttr( aFrmSz, *pFormat ); + if ( aFrameSz.GetWidthPercent() && aFrameSz.GetWidthPercent() != SwFormatFrameSize::SYNCED && + aOldFrameSz.GetWidth() != aFrameSz.GetWidth() ) + aFrameSz.SetWidthPercent( sal_uInt8(aSz.Width() * 100.0 / nRelWidth + 0.5) ); + if ( aFrameSz.GetHeightPercent() && aFrameSz.GetHeightPercent() != SwFormatFrameSize::SYNCED && + aOldFrameSz.GetHeight() != aFrameSz.GetHeight() ) + aFrameSz.SetHeightPercent( sal_uInt8(aSz.Height() * 100.0 / nRelHeight + 0.5) ); + pFormat->GetDoc()->SetAttr( aFrameSz, *pFormat ); } } //Position can also be changed! const Point aOldPos( ( bVertX && !bVertL2RX ) || bRTL ? - GetFlyFrm()->Frm().TopRight() : - GetFlyFrm()->Frm().Pos() ); + GetFlyFrame()->Frame().TopRight() : + GetFlyFrame()->Frame().Pos() ); if ( aNewPos != aOldPos ) { //May have been altered by the ChgSize! @@ -961,23 +961,23 @@ Pointer SwVirtFlyDrawObj::GetMacroPointer( bool SwVirtFlyDrawObj::HasMacro() const { - const SwFormatURL &rURL = m_pFlyFrm->GetFormat()->GetURL(); + const SwFormatURL &rURL = m_pFlyFrame->GetFormat()->GetURL(); return rURL.GetMap() || !rURL.GetURL().isEmpty(); } SdrObject* SwVirtFlyDrawObj::CheckMacroHit( const SdrObjMacroHitRec& rRec ) const { - const SwFormatURL &rURL = m_pFlyFrm->GetFormat()->GetURL(); + const SwFormatURL &rURL = m_pFlyFrame->GetFormat()->GetURL(); if( rURL.GetMap() || !rURL.GetURL().isEmpty() ) { SwRect aRect; - if ( m_pFlyFrm->Lower() && m_pFlyFrm->Lower()->IsNoTextFrm() ) + if ( m_pFlyFrame->Lower() && m_pFlyFrame->Lower()->IsNoTextFrame() ) { - aRect = m_pFlyFrm->Prt(); - aRect += m_pFlyFrm->Frm().Pos(); + aRect = m_pFlyFrame->Prt(); + aRect += m_pFlyFrame->Frame().Pos(); } else - aRect = m_pFlyFrm->Frm(); + aRect = m_pFlyFrame->Frame(); if( aRect.IsInside( rRec.aPos ) ) { @@ -989,7 +989,7 @@ SdrObject* SwVirtFlyDrawObj::CheckMacroHit( const SdrObjMacroHitRec& rRec ) cons if( aRect.IsInside( rRec.aPos ) ) { if( !rURL.GetMap() || - m_pFlyFrm->GetFormat()->GetIMapObject( rRec.aPos, m_pFlyFrm )) + m_pFlyFrame->GetFormat()->GetIMapObject( rRec.aPos, m_pFlyFrame )) return const_cast<SdrObject*>(static_cast<SdrObject const *>(this)); return nullptr; diff --git a/sw/source/core/draw/dpage.cxx b/sw/source/core/draw/dpage.cxx index 31d69f70ae07..f8ad9f6253cf 100644 --- a/sw/source/core/draw/dpage.cxx +++ b/sw/source/core/draw/dpage.cxx @@ -116,12 +116,12 @@ SdrObject* SwDPage::ReplaceObject( SdrObject* pNewObj, size_t nObjNum ) return FmFormPage::ReplaceObject( pNewObj, nObjNum ); } -void InsertGridFrame( SdrPageGridFrameList *pLst, const SwFrm *pPg ) +void InsertGridFrame( SdrPageGridFrameList *pLst, const SwFrame *pPg ) { SwRect aPrt( pPg->Prt() ); - aPrt += pPg->Frm().Pos(); + aPrt += pPg->Frame().Pos(); const Rectangle aUser( aPrt.SVRect() ); - const Rectangle aPaper( pPg->Frm().SVRect() ); + const Rectangle aPaper( pPg->Frame().SVRect() ); pLst->Insert( SdrPageGridFrame( aPaper, aUser ) ); } @@ -148,9 +148,9 @@ const SdrPageGridFrameList* SwDPage::GetGridFrameList( { //The drawing demands all pages which overlap with the rest. const SwRect aRect( *pRect ); - const SwFrm *pPg = pSh->GetLayout()->Lower(); + const SwFrame *pPg = pSh->GetLayout()->Lower(); do - { if ( pPg->Frm().IsOver( aRect ) ) + { if ( pPg->Frame().IsOver( aRect ) ) ::InsertGridFrame( const_cast<SwDPage*>(this)->pGridLst, pPg ); pPg = pPg->GetNext(); } while ( pPg ); @@ -158,12 +158,12 @@ const SdrPageGridFrameList* SwDPage::GetGridFrameList( else { //The drawing demands all visible pages - const SwFrm *pPg = pSh->Imp()->GetFirstVisPage(pSh->GetOut()); + const SwFrame *pPg = pSh->Imp()->GetFirstVisPage(pSh->GetOut()); if ( pPg ) do { ::InsertGridFrame( const_cast<SwDPage*>(this)->pGridLst, pPg ); pPg = pPg->GetNext(); - } while ( pPg && pPg->Frm().IsOver( pSh->VisArea() ) ); + } while ( pPg && pPg->Frame().IsOver( pSh->VisArea() ) ); } } return pGridLst; @@ -187,7 +187,7 @@ bool SwDPage::RequestHelp( vcl::Window* pWindow, SdrView* pView, if( pView->PickObj( aPos, 0, pObj, pPV, SdrSearchOptions::PICKMACRO ) && dynamic_cast<const SwVirtFlyDrawObj*>( pObj) != nullptr ) { - SwFlyFrm *pFly = static_cast<SwVirtFlyDrawObj*>(pObj)->GetFlyFrm(); + SwFlyFrame *pFly = static_cast<SwVirtFlyDrawObj*>(pObj)->GetFlyFrame(); const SwFormatURL &rURL = pFly->GetFormat()->GetURL(); OUString sText; if( rURL.GetMap() ) @@ -212,7 +212,7 @@ bool SwDPage::RequestHelp( vcl::Window* pWindow, SdrView* pView, { // then append the relative pixel position!! Point aPt( aPos ); - aPt -= pFly->Frm().Pos(); + aPt -= pFly->Frame().Pos(); // without MapMode-Offset !!!!! // without MapMode-Offset, without Offset, w ... !!!!! aPt = pWindow->LogicToPixel( diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx index cdfc35a61873..ad6f7df0764e 100644 --- a/sw/source/core/draw/dview.cxx +++ b/sw/source/core/draw/dview.cxx @@ -74,20 +74,20 @@ bool SwSdrHdl::IsFocusHdl() const return SdrHdl::IsFocusHdl(); } -static const SwFrm *lcl_FindAnchor( const SdrObject *pObj, bool bAll ) +static const SwFrame *lcl_FindAnchor( const SdrObject *pObj, bool bAll ) { const SwVirtFlyDrawObj *pVirt = dynamic_cast< const SwVirtFlyDrawObj *>( pObj ) != nullptr ? static_cast<const SwVirtFlyDrawObj*>(pObj) : nullptr; if ( pVirt ) { - if ( bAll || !pVirt->GetFlyFrm()->IsFlyInCntFrm() ) - return pVirt->GetFlyFrm()->GetAnchorFrm(); + if ( bAll || !pVirt->GetFlyFrame()->IsFlyInContentFrame() ) + return pVirt->GetFlyFrame()->GetAnchorFrame(); } else { const SwDrawContact *pCont = static_cast<const SwDrawContact*>(GetUserCall(pObj)); if ( pCont ) - return pCont->GetAnchorFrm( pObj ); + return pCont->GetAnchorFrame( pObj ); } return nullptr; } @@ -145,9 +145,9 @@ SdrObject* impLocalHitCorrection(SdrObject* pRetval, const Point& rPnt, sal_uInt if(pSwVirtFlyDrawObj) { - if(pSwVirtFlyDrawObj->GetFlyFrm()->Lower() && pSwVirtFlyDrawObj->GetFlyFrm()->Lower()->IsNoTextFrm()) + if(pSwVirtFlyDrawObj->GetFlyFrame()->Lower() && pSwVirtFlyDrawObj->GetFlyFrame()->Lower()->IsNoTextFrame()) { - // the old method used IsNoTextFrm (should be for SW's own OLE and + // the old method used IsNoTextFrame (should be for SW's own OLE and // graphic's) to accept hit only based on outer bounds; nothing to do } else @@ -220,7 +220,7 @@ void SwDrawView::AddCustomHdl() if (FLY_AS_CHAR == rAnchor.GetAnchorId()) return; - const SwFrm* pAnch; + const SwFrame* pAnch; if(nullptr == (pAnch = CalcAnchor())) return; @@ -247,14 +247,14 @@ SdrObject* SwDrawView::GetMaxToTopObj( SdrObject* pObj ) const { if ( GetUserCall(pObj) ) { - const SwFrm *pAnch = ::lcl_FindAnchor( pObj, false ); + const SwFrame *pAnch = ::lcl_FindAnchor( pObj, false ); if ( pAnch ) { //The topmost Obj within the anchor must not be overtaken. - const SwFlyFrm *pFly = pAnch->FindFlyFrm(); + const SwFlyFrame *pFly = pAnch->FindFlyFrame(); if ( pFly ) { - const SwPageFrm *pPage = pFly->FindPageFrm(); + const SwPageFrame *pPage = pFly->FindPageFrame(); if ( pPage->GetSortedObjs() ) { size_t nOrdNum = 0; @@ -264,7 +264,7 @@ SdrObject* SwDrawView::GetMaxToTopObj( SdrObject* pObj ) const if ( pO->GetOrdNumDirect() > nOrdNum ) { - const SwFrm *pTmpAnch = ::lcl_FindAnchor( pO, false ); + const SwFrame *pTmpAnch = ::lcl_FindAnchor( pO, false ); if ( pFly->IsAnLower( pTmpAnch ) ) { nOrdNum = pO->GetOrdNumDirect(); @@ -291,11 +291,11 @@ SdrObject* SwDrawView::GetMaxToBtmObj(SdrObject* pObj) const { if ( GetUserCall(pObj) ) { - const SwFrm *pAnch = ::lcl_FindAnchor( pObj, false ); + const SwFrame *pAnch = ::lcl_FindAnchor( pObj, false ); if ( pAnch ) { //The Fly of the anchor must not be "flying under". - const SwFlyFrm *pFly = pAnch->FindFlyFrm(); + const SwFlyFrame *pFly = pAnch->FindFlyFrame(); if ( pFly ) { SdrObject *pRet = const_cast<SdrObject*>(static_cast<SdrObject const *>(pFly->GetVirtDrawObj())); @@ -307,7 +307,7 @@ SdrObject* SwDrawView::GetMaxToBtmObj(SdrObject* pObj) const } /// determine maximal order number for a 'child' object of given 'parent' object -sal_uInt32 SwDrawView::_GetMaxChildOrdNum( const SwFlyFrm& _rParentObj, +sal_uInt32 SwDrawView::_GetMaxChildOrdNum( const SwFlyFrame& _rParentObj, const SdrObject* _pExclChildObj ) { sal_uInt32 nMaxChildOrdNum = _rParentObj.GetDrawObj()->GetOrdNum(); @@ -366,11 +366,11 @@ void SwDrawView::_MoveRepeatedObjs( const SwAnchoredObject& _rMovedAnchoredObj, nNewPos ); pDrawPage->RecalcObjOrdNums(); // adjustments for accessibility API - if ( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) != nullptr ) + if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr ) { - const SwFlyFrm *pTmpFlyFrm = static_cast<SwFlyFrm*>(pAnchoredObj); - rImp.DisposeAccessibleFrm( pTmpFlyFrm ); - rImp.AddAccessibleFrm( pTmpFlyFrm ); + const SwFlyFrame *pTmpFlyFrame = static_cast<SwFlyFrame*>(pAnchoredObj); + rImp.DisposeAccessibleFrame( pTmpFlyFrame ); + rImp.AddAccessibleFrame( pTmpFlyFrame ); } else { @@ -402,11 +402,11 @@ void SwDrawView::_MoveRepeatedObjs( const SwAnchoredObject& _rMovedAnchoredObj, nTmpNewPos ); pDrawPage->RecalcObjOrdNums(); // adjustments for accessibility API - if ( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) != nullptr ) + if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr ) { - const SwFlyFrm *pTmpFlyFrm = static_cast<SwFlyFrm*>(pAnchoredObj); - rImp.DisposeAccessibleFrm( pTmpFlyFrm ); - rImp.AddAccessibleFrm( pTmpFlyFrm ); + const SwFlyFrame *pTmpFlyFrame = static_cast<SwFlyFrame*>(pAnchoredObj); + rImp.DisposeAccessibleFrame( pTmpFlyFrame ); + rImp.AddAccessibleFrame( pTmpFlyFrame ); } else { @@ -438,8 +438,8 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, sal_uLong nOldPos, SwAnchoredObject* pMovedAnchoredObj = ::GetUserCall( pObj )->GetAnchoredObj( pObj ); - const SwFlyFrm* pParentAnchoredObj = - pMovedAnchoredObj->GetAnchorFrm()->FindFlyFrm(); + const SwFlyFrame* pParentAnchoredObj = + pMovedAnchoredObj->GetAnchorFrame()->FindFlyFrame(); const bool bMovedForward = nOldPos < nNewPos; @@ -507,11 +507,11 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, sal_uLong nOldPos, // On move forward, assure that object is moved before its own children. // Only Writer fly frames can have children. - if ( dynamic_cast< const SwFlyFrm *>( pMovedAnchoredObj ) != nullptr && + if ( dynamic_cast< const SwFlyFrame *>( pMovedAnchoredObj ) != nullptr && bMovedForward && nNewPos < nObjCount - 1 ) { sal_uInt32 nMaxChildOrdNum = - _GetMaxChildOrdNum( *(static_cast<const SwFlyFrm*>(pMovedAnchoredObj)) ); + _GetMaxChildOrdNum( *(static_cast<const SwFlyFrame*>(pMovedAnchoredObj)) ); if ( nNewPos < nMaxChildOrdNum ) { // determine position before the object before its top 'child' object @@ -545,9 +545,9 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, sal_uLong nOldPos, // If object is anchored inside a invisible part of the document // (e.g. page header, whose page style isn't applied, or hidden // section), no anchor frame exists. - const SwFrm* pTmpAnchorFrm = lcl_FindAnchor( pTmpObj, true ); - const SwFlyFrm* pTmpParentObj = pTmpAnchorFrm - ? pTmpAnchorFrm->FindFlyFrm() : nullptr; + const SwFrame* pTmpAnchorFrame = lcl_FindAnchor( pTmpObj, true ); + const SwFlyFrame* pTmpParentObj = pTmpAnchorFrame + ? pTmpAnchorFrame->FindFlyFrame() : nullptr; if ( pTmpParentObj && &(pTmpParentObj->GetFrameFormat()) != pParentFrameFormat ) { @@ -578,13 +578,13 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, sal_uLong nOldPos, std::vector< SdrObject* > aMovedChildObjs; // move 'children' accordingly - if ( dynamic_cast< const SwFlyFrm *>( pMovedAnchoredObj ) != nullptr ) + if ( dynamic_cast< const SwFlyFrame *>( pMovedAnchoredObj ) != nullptr ) { - const SwFlyFrm* pFlyFrm = static_cast<SwFlyFrm*>(pMovedAnchoredObj); + const SwFlyFrame* pFlyFrame = static_cast<SwFlyFrame*>(pMovedAnchoredObj); // adjustments for accessibility API - rImp.DisposeAccessibleFrm( pFlyFrm ); - rImp.AddAccessibleFrm( pFlyFrm ); + rImp.DisposeAccessibleFrame( pFlyFrame ); + rImp.AddAccessibleFrame( pFlyFrame ); const sal_uInt32 nChildNewPos = bMovedForward ? nNewPos : nNewPos+1; size_t i = bMovedForward ? nOldPos : nObjCount-1; @@ -598,12 +598,12 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, sal_uLong nOldPos, // If object is anchored inside a invisible part of the document // (e.g. page header, whose page style isn't applied, or hidden // section), no anchor frame exists. - const SwFrm* pTmpAnchorFrm = lcl_FindAnchor( pTmpObj, true ); - const SwFlyFrm* pTmpParentObj = pTmpAnchorFrm - ? pTmpAnchorFrm->FindFlyFrm() : nullptr; + const SwFrame* pTmpAnchorFrame = lcl_FindAnchor( pTmpObj, true ); + const SwFlyFrame* pTmpParentObj = pTmpAnchorFrame + ? pTmpAnchorFrame->FindFlyFrame() : nullptr; if ( pTmpParentObj && - ( ( pTmpParentObj == pFlyFrm ) || - ( pFlyFrm->IsUpperOf( *pTmpParentObj ) ) ) ) + ( ( pTmpParentObj == pFlyFrame ) || + ( pFlyFrame->IsUpperOf( *pTmpParentObj ) ) ) ) { // move child object., pDrawPage->SetObjectOrdNum( i, nChildNewPos ); @@ -613,10 +613,10 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, sal_uLong nOldPos, // adjustments for accessibility API if ( dynamic_cast< const SwVirtFlyDrawObj *>( pTmpObj ) != nullptr ) { - const SwFlyFrm *pTmpFlyFrm = - static_cast<SwVirtFlyDrawObj*>(pTmpObj)->GetFlyFrm(); - rImp.DisposeAccessibleFrm( pTmpFlyFrm ); - rImp.AddAccessibleFrm( pTmpFlyFrm ); + const SwFlyFrame *pTmpFlyFrame = + static_cast<SwVirtFlyDrawObj*>(pTmpObj)->GetFlyFrame(); + rImp.DisposeAccessibleFrame( pTmpFlyFrame ); + rImp.AddAccessibleFrame( pTmpFlyFrame ); } else { @@ -664,7 +664,7 @@ bool SwDrawView::TakeDragLimit( SdrDragMode eMode, return bRet; } -const SwFrm* SwDrawView::CalcAnchor() +const SwFrame* SwDrawView::CalcAnchor() { const SdrMarkList &rMrkList = GetMarkedObjectList(); if ( rMrkList.GetMarkCount() != 1 ) @@ -674,26 +674,26 @@ const SwFrm* SwDrawView::CalcAnchor() //Search for paragraph bound objects, otherwise only the //current anchor. Search only if we currently drag. - const SwFrm* pAnch; + const SwFrame* pAnch; Rectangle aMyRect; const bool bFly = dynamic_cast< const SwVirtFlyDrawObj *>( pObj ) != nullptr; if ( bFly ) { - pAnch = static_cast<SwVirtFlyDrawObj*>(pObj)->GetFlyFrm()->GetAnchorFrm(); - aMyRect = static_cast<SwVirtFlyDrawObj*>(pObj)->GetFlyFrm()->Frm().SVRect(); + pAnch = static_cast<SwVirtFlyDrawObj*>(pObj)->GetFlyFrame()->GetAnchorFrame(); + aMyRect = static_cast<SwVirtFlyDrawObj*>(pObj)->GetFlyFrame()->Frame().SVRect(); } else { SwDrawContact *pC = static_cast<SwDrawContact*>(GetUserCall(pObj)); // determine correct anchor position for 'virtual' drawing objects. // #i26791# - pAnch = pC->GetAnchorFrm( pObj ); + pAnch = pC->GetAnchorFrame( pObj ); if( !pAnch ) { pC->ConnectToLayout(); // determine correct anchor position for 'virtual' drawing objects. // #i26791# - pAnch = pC->GetAnchorFrm( pObj ); + pAnch = pC->GetAnchorFrame( pObj ); } aMyRect = pObj->GetSnapRect(); } @@ -717,27 +717,27 @@ const SwFrm* SwDrawView::CalcAnchor() if ( aPt != aMyPt ) { - if ( pAnch && pAnch->IsContentFrm() ) + if ( pAnch && pAnch->IsContentFrame() ) { // allow drawing objects in header/footer, // but exclude control objects. bool bBodyOnly = CheckControlLayer( pObj ); - pAnch = ::FindAnchor( static_cast<const SwContentFrm*>(pAnch), aPt, bBodyOnly ); + pAnch = ::FindAnchor( static_cast<const SwContentFrame*>(pAnch), aPt, bBodyOnly ); } else if ( !bFly ) { const SwRect aRect( aPt.getX(), aPt.getY(), 1, 1 ); SwDrawContact* pContact = static_cast<SwDrawContact*>(GetUserCall(pObj)); - if ( pContact->GetAnchorFrm( pObj ) && - pContact->GetAnchorFrm( pObj )->IsPageFrm() ) - pAnch = pContact->GetPageFrm(); + if ( pContact->GetAnchorFrame( pObj ) && + pContact->GetAnchorFrame( pObj )->IsPageFrame() ) + pAnch = pContact->GetPageFrame(); else pAnch = pContact->FindPage( aRect ); } } if( pAnch && !pAnch->IsProtected() ) - aAnchorPoint = pAnch->GetFrmAnchorPos( ::HasWrap( pObj ) ); + aAnchorPoint = pAnch->GetFrameAnchorPos( ::HasWrap( pObj ) ); else pAnch = nullptr; return pAnch; @@ -818,16 +818,16 @@ void SwDrawView::CheckPossibilities() for ( size_t i = 0; !bProtect && i < rMrkList.GetMarkCount(); ++i ) { const SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj(); - const SwFrm *pFrm = nullptr; + const SwFrame *pFrame = nullptr; if ( dynamic_cast< const SwVirtFlyDrawObj *>( pObj ) != nullptr ) { - const SwFlyFrm *pFly = static_cast<const SwVirtFlyDrawObj*>(pObj)->GetFlyFrm(); + const SwFlyFrame *pFly = static_cast<const SwVirtFlyDrawObj*>(pObj)->GetFlyFrame(); if ( pFly ) { - pFrm = pFly->GetAnchorFrm(); - if ( pFly->Lower() && pFly->Lower()->IsNoTextFrm() ) + pFrame = pFly->GetAnchorFrame(); + if ( pFly->Lower() && pFly->Lower()->IsNoTextFrame() ) { - SwOLENode *pNd = const_cast<SwContentFrm*>(static_cast<const SwContentFrm*>(pFly->Lower()))->GetNode()->GetOLENode(); + SwOLENode *pNd = const_cast<SwContentFrame*>(static_cast<const SwContentFrame*>(pFly->Lower()))->GetNode()->GetOLENode(); if ( pNd ) { uno::Reference < embed::XEmbeddedObject > xObj = pNd->GetOLEObj().GetOleRef(); @@ -855,10 +855,10 @@ void SwDrawView::CheckPossibilities() { SwDrawContact *pC = static_cast<SwDrawContact*>(GetUserCall(pObj)); if ( pC ) - pFrm = pC->GetAnchorFrm( pObj ); + pFrame = pC->GetAnchorFrame( pObj ); } - if ( pFrm ) - bProtect = pFrm->IsProtected(); //Frames, areas etc. + if ( pFrame ) + bProtect = pFrame->IsProtected(); //Frames, areas etc. { SwFrameFormat* pFrameFormat( ::FindFrameFormat( const_cast<SdrObject*>(pObj) ) ); if ( !pFrameFormat ) @@ -922,7 +922,7 @@ void SwDrawView::ReplaceMarkedDrawVirtObjs( SdrMarkView& _rMarkView ) void SwDrawView::DeleteMarked() { SwDoc* pDoc = Imp().GetShell()->GetDoc(); - SwRootFrm *pTmpRoot = pDoc->getIDocumentLayoutAccess().GetCurrentLayout(); + SwRootFrame *pTmpRoot = pDoc->getIDocumentLayoutAccess().GetCurrentLayout(); if ( pTmpRoot ) pTmpRoot->StartAllAction(); pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, nullptr); diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx index 1c1de66998cd..e84ddf3d3174 100644 --- a/sw/source/core/edit/acorrect.cxx +++ b/sw/source/core/edit/acorrect.cxx @@ -37,40 +37,40 @@ using namespace ::com::sun::star; -class _PaMIntoCrsrShellRing +class _PaMIntoCursorShellRing { - SwCrsrShell& rSh; - SwPaM &rDelPam, &rCrsr; + SwCursorShell& rSh; + SwPaM &rDelPam, &rCursor; SwPaM* pPrevDelPam; - SwPaM* pPrevCrsr; + SwPaM* pPrevCursor; static void RemoveFromRing( SwPaM& rPam, SwPaM* pPrev ); public: - _PaMIntoCrsrShellRing( SwCrsrShell& rSh, SwPaM& rCrsr, SwPaM& rPam ); - ~_PaMIntoCrsrShellRing(); + _PaMIntoCursorShellRing( SwCursorShell& rSh, SwPaM& rCursor, SwPaM& rPam ); + ~_PaMIntoCursorShellRing(); }; -_PaMIntoCrsrShellRing::_PaMIntoCrsrShellRing( SwCrsrShell& rCSh, - SwPaM& rShCrsr, SwPaM& rPam ) - : rSh( rCSh ), rDelPam( rPam ), rCrsr( rShCrsr ) +_PaMIntoCursorShellRing::_PaMIntoCursorShellRing( SwCursorShell& rCSh, + SwPaM& rShCursor, SwPaM& rPam ) + : rSh( rCSh ), rDelPam( rPam ), rCursor( rShCursor ) { - SwPaM* pShCrsr = rSh._GetCrsr(); + SwPaM* pShCursor = rSh._GetCursor(); pPrevDelPam = rDelPam.GetPrev(); - pPrevCrsr = rCrsr.GetPrev(); + pPrevCursor = rCursor.GetPrev(); - rDelPam.GetRingContainer().merge( pShCrsr->GetRingContainer() ); - rCrsr.GetRingContainer().merge( pShCrsr->GetRingContainer() ); + rDelPam.GetRingContainer().merge( pShCursor->GetRingContainer() ); + rCursor.GetRingContainer().merge( pShCursor->GetRingContainer() ); } -_PaMIntoCrsrShellRing::~_PaMIntoCrsrShellRing() +_PaMIntoCursorShellRing::~_PaMIntoCursorShellRing() { // and take out the Pam again: RemoveFromRing( rDelPam, pPrevDelPam ); - RemoveFromRing( rCrsr, pPrevCrsr ); + RemoveFromRing( rCursor, pPrevCursor ); } -void _PaMIntoCrsrShellRing::RemoveFromRing( SwPaM& rPam, SwPaM* pPrev ) +void _PaMIntoCursorShellRing::RemoveFromRing( SwPaM& rPam, SwPaM* pPrev ) { SwPaM* p; SwPaM* pNext = &rPam; @@ -83,7 +83,7 @@ void _PaMIntoCrsrShellRing::RemoveFromRing( SwPaM& rPam, SwPaM* pPrev ) SwAutoCorrDoc::SwAutoCorrDoc( SwEditShell& rEditShell, SwPaM& rPam, sal_Unicode cIns ) - : rEditSh( rEditShell ), rCrsr( rPam ), pIdx( nullptr ) + : rEditSh( rEditShell ), rCursor( rPam ), pIdx( nullptr ) , m_nEndUndoCounter(0) , bUndoIdInitialized( cIns == 0 ) { @@ -105,7 +105,7 @@ void SwAutoCorrDoc::DeleteSel( SwPaM& rDelPam ) { // so that also the DelPam be moved, include it in the // Shell-Cursr-Ring !! - _PaMIntoCrsrShellRing aTmp( rEditSh, rCrsr, rDelPam ); + _PaMIntoCursorShellRing aTmp( rEditSh, rCursor, rDelPam ); pDoc->getIDocumentContentOperations().DeleteAndJoin( rDelPam ); } else @@ -116,7 +116,7 @@ void SwAutoCorrDoc::DeleteSel( SwPaM& rDelPam ) bool SwAutoCorrDoc::Delete( sal_Int32 nStt, sal_Int32 nEnd ) { - const SwNodeIndex& rNd = rCrsr.GetPoint()->nNode; + const SwNodeIndex& rNd = rCursor.GetPoint()->nNode; SwPaM aSel( rNd, nStt, rNd, nEnd ); DeleteSel( aSel ); @@ -127,7 +127,7 @@ bool SwAutoCorrDoc::Delete( sal_Int32 nStt, sal_Int32 nEnd ) bool SwAutoCorrDoc::Insert( sal_Int32 nPos, const OUString& rText ) { - SwPaM aPam( rCrsr.GetPoint()->nNode.GetNode(), nPos ); + SwPaM aPam( rCursor.GetPoint()->nNode.GetNode(), nPos ); rEditSh.GetDoc()->getIDocumentContentOperations().InsertString( aPam, rText ); if( !bUndoIdInitialized ) { @@ -148,10 +148,10 @@ bool SwAutoCorrDoc::Replace( sal_Int32 nPos, const OUString& rText ) bool SwAutoCorrDoc::ReplaceRange( sal_Int32 nPos, sal_Int32 nSourceLength, const OUString& rText ) { - SwPaM* pPam = &rCrsr; + SwPaM* pPam = &rCursor; if( pPam->GetPoint()->nContent.GetIndex() != nPos ) { - pPam = new SwPaM( *rCrsr.GetPoint() ); + pPam = new SwPaM( *rCursor.GetPoint() ); pPam->GetPoint()->nContent = nPos; } @@ -187,7 +187,7 @@ bool SwAutoCorrDoc::ReplaceRange( sal_Int32 nPos, sal_Int32 nSourceLength, const } else { - _PaMIntoCrsrShellRing aTmp( rEditSh, rCrsr, *pPam ); + _PaMIntoCursorShellRing aTmp( rEditSh, rCursor, *pPam ); pPam->SetMark(); pPam->GetPoint()->nContent = std::min<sal_Int32>( @@ -223,7 +223,7 @@ bool SwAutoCorrDoc::ReplaceRange( sal_Int32 nPos, sal_Int32 nSourceLength, const } } - if( pPam != &rCrsr ) + if( pPam != &rCursor ) delete pPam; return true; @@ -232,7 +232,7 @@ bool SwAutoCorrDoc::ReplaceRange( sal_Int32 nPos, sal_Int32 nSourceLength, const bool SwAutoCorrDoc::SetAttr( sal_Int32 nStt, sal_Int32 nEnd, sal_uInt16 nSlotId, SfxPoolItem& rItem ) { - const SwNodeIndex& rNd = rCrsr.GetPoint()->nNode; + const SwNodeIndex& rNd = rCursor.GetPoint()->nNode; SwPaM aPam( rNd, nStt, rNd, nEnd ); SfxItemPool& rPool = rEditSh.GetDoc()->GetAttrPool(); @@ -254,7 +254,7 @@ bool SwAutoCorrDoc::SetAttr( sal_Int32 nStt, sal_Int32 nEnd, sal_uInt16 nSlotId, bool SwAutoCorrDoc::SetINetAttr( sal_Int32 nStt, sal_Int32 nEnd, const OUString& rURL ) { - const SwNodeIndex& rNd = rCrsr.GetPoint()->nNode; + const SwNodeIndex& rNd = rCursor.GetPoint()->nNode; SwPaM aPam( rNd, nStt, rNd, nEnd ); SfxItemSet aSet( rEditSh.GetDoc()->GetAttrPool(), @@ -277,7 +277,7 @@ OUString const* SwAutoCorrDoc::GetPrevPara(bool const bAtNormalPos) OUString const* pStr(nullptr); if( bAtNormalPos || !pIdx ) - pIdx = new SwNodeIndex( rCrsr.GetPoint()->nNode, -1 ); + pIdx = new SwNodeIndex( rCursor.GetPoint()->nNode, -1 ); else --(*pIdx); @@ -305,7 +305,7 @@ bool SwAutoCorrDoc::ChgAutoCorrWord( sal_Int32& rSttPos, sal_Int32 nEndPos, // Found a beginning of a paragraph or a Blank, // search for the word Kuerzel (Shortcut) in the Auto - SwTextNode* pTextNd = rCrsr.GetNode().GetTextNode(); + SwTextNode* pTextNd = rCursor.GetNode().GetTextNode(); OSL_ENSURE( pTextNd, "where is the TextNode?" ); bool bRet = false; @@ -329,7 +329,7 @@ bool SwAutoCorrDoc::ChgAutoCorrWord( sal_Int32& rSttPos, sal_Int32 nEndPos, // replace also last colon of keywords surrounded by colons (for example, ":name:") bool replaceLastChar = pFnd->GetShort()[0] == ':' && pFnd->GetShort().endsWith(":"); - const SwNodeIndex& rNd = rCrsr.GetPoint()->nNode; + const SwNodeIndex& rNd = rCursor.GetPoint()->nNode; SwPaM aPam( rNd, rSttPos, rNd, nEndPos + (replaceLastChar ? 1 : 0) ); if( pFnd->IsTextOnly() ) @@ -355,7 +355,7 @@ bool SwAutoCorrDoc::ChgAutoCorrWord( sal_Int32& rSttPos, sal_Int32 nEndPos, if( pPara ) { OSL_ENSURE( !pIdx, "who has not deleted his Index?" ); - pIdx = new SwNodeIndex( rCrsr.GetPoint()->nNode, -1 ); + pIdx = new SwNodeIndex( rCursor.GetPoint()->nNode, -1 ); } SwDoc* pAutoDoc = aTBlks.GetDoc(); @@ -410,7 +410,7 @@ void SwAutoCorrDoc::SaveCpltSttWord( sal_uLong nFlag, sal_Int32 nPos, const OUString& rExceptWord, sal_Unicode cChar ) { - sal_uLong nNode = pIdx ? pIdx->GetIndex() : rCrsr.GetPoint()->nNode.GetIndex(); + sal_uLong nNode = pIdx ? pIdx->GetIndex() : rCursor.GetPoint()->nNode.GetIndex(); LanguageType eLang = GetLanguage(nPos, false); rEditSh.GetDoc()->SetAutoCorrExceptWord( new SwAutoCorrExceptWord( nFlag, nNode, nPos, rExceptWord, cChar, eLang )); @@ -422,7 +422,7 @@ LanguageType SwAutoCorrDoc::GetLanguage( sal_Int32 nPos, bool bPrevPara ) const SwTextNode* pNd = (( bPrevPara && pIdx ) ? *pIdx - : rCrsr.GetPoint()->nNode ).GetNode().GetTextNode(); + : rCursor.GetPoint()->nNode ).GetNode().GetTextNode(); if( pNd ) eRet = pNd->GetLang( nPos ); diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx index 9577162a976a..3db4de004081 100644 --- a/sw/source/core/edit/autofmt.cxx +++ b/sw/source/core/edit/autofmt.cxx @@ -98,7 +98,7 @@ class SwAutoFormat SwEditShell* m_pEditShell; SwDoc* m_pDoc; SwTextNode* m_pCurTextNd; // the current TextNode - SwTextFrm* m_pCurTextFrm; // frame of the current TextNode + SwTextFrame* m_pCurTextFrame; // frame of the current TextNode sal_uLong m_nEndNdIdx; // for the percentage-display mutable std::unique_ptr<CharClass> m_pCharClass; // Character classification mutable LanguageType m_eCharClassLang; @@ -179,7 +179,7 @@ class SwAutoFormat OUString* pPrefix = nullptr, OUString* pPostfix = nullptr, OUString* pNumTypes = nullptr ) const; /// get the FORMATTED TextFrame - SwTextFrm* GetFrm( const SwTextNode& rTextNd ) const; + SwTextFrame* GetFrame( const SwTextNode& rTextNd ) const; void BuildIndent(); void BuildText(); @@ -238,21 +238,21 @@ const sal_Unicode* StrChr( const sal_Unicode* pSrc, sal_Unicode c ) return *pSrc ? pSrc : nullptr; } -SwTextFrm* SwAutoFormat::GetFrm( const SwTextNode& rTextNd ) const +SwTextFrame* SwAutoFormat::GetFrame( const SwTextNode& rTextNd ) const { // get the Frame - const SwContentFrm *pFrm = rTextNd.getLayoutFrm( m_pEditShell->GetLayout() ); - OSL_ENSURE( pFrm, "For Autoformat a Layout is needed" ); - if( m_aFlags.bAFormatByInput && !pFrm->IsValid() ) + const SwContentFrame *pFrame = rTextNd.getLayoutFrame( m_pEditShell->GetLayout() ); + OSL_ENSURE( pFrame, "For Autoformat a Layout is needed" ); + if( m_aFlags.bAFormatByInput && !pFrame->IsValid() ) { - SwRect aTmpFrm( pFrm->Frm() ); - SwRect aTmpPrt( pFrm->Prt() ); - pFrm->Calc(pFrm->getRootFrm()->GetCurrShell()->GetOut()); - if( pFrm->Frm() != aTmpFrm || pFrm->Prt() != aTmpPrt || - ( pFrm->IsTextFrm() && !const_cast<SwTextFrm*>(static_cast<const SwTextFrm*>(pFrm))->Paint().IsEmpty() ) ) - pFrm->SetCompletePaint(); + SwRect aTmpFrame( pFrame->Frame() ); + SwRect aTmpPrt( pFrame->Prt() ); + pFrame->Calc(pFrame->getRootFrame()->GetCurrShell()->GetOut()); + if( pFrame->Frame() != aTmpFrame || pFrame->Prt() != aTmpPrt || + ( pFrame->IsTextFrame() && !const_cast<SwTextFrame*>(static_cast<const SwTextFrame*>(pFrame))->Paint().IsEmpty() ) ) + pFrame->SetCompletePaint(); } - return const_cast<SwTextFrm*>(static_cast<const SwTextFrm*>(pFrm))->GetFormatted(); + return const_cast<SwTextFrame*>(static_cast<const SwTextFrame*>(pFrame))->GetFormatted(); } void SwAutoFormat::_SetRedlineText( sal_uInt16 nActionId ) @@ -334,7 +334,7 @@ OUString SwAutoFormat::GoNextPara() m_pDoc->GetDocShell() ); m_pCurTextNd = static_cast<SwTextNode*>(pNewNd); - m_pCurTextFrm = GetFrm( *m_pCurTextNd ); + m_pCurTextFrame = GetFrame( *m_pCurTextNd ); return m_pCurTextNd->GetText(); } @@ -367,7 +367,7 @@ const SwTextNode* SwAutoFormat::GetNextNode() const bool SwAutoFormat::IsOneLine( const SwTextNode& rNd ) const { - SwTextFrmInfo aFInfo( GetFrm( rNd ) ); + SwTextFrameInfo aFInfo( GetFrame( rNd ) ); return aFInfo.IsOneLine(); } @@ -376,7 +376,7 @@ bool SwAutoFormat::IsFastFullLine( const SwTextNode& rNd ) const bool bRet = m_aFlags.bRightMargin; if( bRet ) { - SwTextFrmInfo aFInfo( GetFrm( rNd ) ); + SwTextFrameInfo aFInfo( GetFrame( rNd ) ); bRet = aFInfo.IsFilled( m_aFlags.nRightMargin ); } return bRet; @@ -396,7 +396,7 @@ bool SwAutoFormat::IsEnumericChar( const SwTextNode& rNd ) const if (StrChr(pBulletChar, rText[nBlnks])) return true; // Should there be a symbol font at the position? - SwTextFrmInfo aFInfo( GetFrm( rNd ) ); + SwTextFrameInfo aFInfo( GetFrame( rNd ) ); if( aFInfo.IsBullet( nBlnks )) return true; } @@ -467,8 +467,8 @@ sal_uInt16 SwAutoFormat::CalcLevel( const SwTextNode& rNd, sal_uInt16 *pDigitLvl sal_Int32 SwAutoFormat::GetBigIndent( sal_Int32& rAktSpacePos ) const { - SwTextFrmInfo aFInfo( GetFrm( *m_pCurTextNd ) ); - const SwTextFrm* pNxtFrm = nullptr; + SwTextFrameInfo aFInfo( GetFrame( *m_pCurTextNd ) ); + const SwTextFrame* pNxtFrame = nullptr; if( !m_bMoreLines ) { @@ -476,10 +476,10 @@ sal_Int32 SwAutoFormat::GetBigIndent( sal_Int32& rAktSpacePos ) const if( !CanJoin( pNxtNd ) || !IsOneLine( *pNxtNd ) ) return 0; - pNxtFrm = GetFrm( *pNxtNd ); + pNxtFrame = GetFrame( *pNxtNd ); } - return aFInfo.GetBigIndent( rAktSpacePos, pNxtFrm ); + return aFInfo.GetBigIndent( rAktSpacePos, pNxtFrame ); } bool SwAutoFormat::IsNoAlphaLine( const SwTextNode& rNd ) const @@ -599,7 +599,7 @@ bool SwAutoFormat::DoTable() ( '+' != ( cChar = rTmp[nEndPlus - 1]) && '|' != cChar )) return false; - SwTextFrmInfo aInfo( m_pCurTextFrm ); + SwTextFrameInfo aInfo( m_pCurTextFrame ); sal_Int32 n = nSttPlus; std::vector<sal_uInt16> aPosArr; @@ -643,7 +643,7 @@ bool SwAutoFormat::DoTable() { eHori = text::HoriOrientation::NONE; // then - as last - we need to add the current frame width into the array - aPosArr.push_back( static_cast<sal_uInt16>(m_pCurTextFrm->Frm().Width()) ); + aPosArr.push_back( static_cast<sal_uInt16>(m_pCurTextFrame->Frame().Width()) ); } else eHori = text::HoriOrientation::LEFT; @@ -1084,11 +1084,11 @@ void SwAutoFormat::DeleteSel( SwPaM& rDelPam ) if( m_aFlags.bWithRedlining ) { // Add to Shell-Cursor-Ring so that DelPam will be moved as well! - SwPaM* pShCrsr = m_pEditShell->_GetCrsr(); - SwPaM aTmp( *m_pCurTextNd, 0, pShCrsr ); + SwPaM* pShCursor = m_pEditShell->_GetCursor(); + SwPaM aTmp( *m_pCurTextNd, 0, pShCursor ); SwPaM* pPrev = rDelPam.GetPrev(); - rDelPam.GetRingContainer().merge( pShCrsr->GetRingContainer() ); + rDelPam.GetRingContainer().merge( pShCursor->GetRingContainer() ); m_pEditShell->DeleteSel( rDelPam ); @@ -1190,7 +1190,7 @@ void SwAutoFormat::DelMoreLinesBlanks( bool bWithLineBreaks ) m_aDelPam.GetPoint()->nNode = m_aNdIdx; m_aDelPam.GetPoint()->nContent.Assign( m_pCurTextNd, 0 ); - SwTextFrmInfo aFInfo( m_pCurTextFrm ); + SwTextFrameInfo aFInfo( m_pCurTextFrame ); aFInfo.GetSpaces( m_aDelPam, !m_aFlags.bAFormatByInput || bWithLineBreaks ); do { @@ -1353,7 +1353,7 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel ) bool bBreak = true; // first, determine current indentation and frame width - SwTwips nFrmWidth = m_pCurTextFrm->Prt().Width();; + SwTwips nFrameWidth = m_pCurTextFrame->Prt().Width();; SwTwips nLeftTextPos; { sal_Int32 nPos(0); @@ -1363,7 +1363,7 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel ) ++nPos; } - SwTextFrmInfo aInfo( m_pCurTextFrm ); + SwTextFrameInfo aInfo( m_pCurTextFrame ); nLeftTextPos = aInfo.GetCharPos(nPos); nLeftTextPos -= m_pCurTextNd->GetSwAttrSet().GetLRSpace().GetLeft(); } @@ -1452,8 +1452,8 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel ) aRule.Set( n, aFormat ); if( n == nLvl && - nFrmWidth < ( nSpaceSteps * MAXLEVEL ) ) - nSpaceSteps = static_cast<sal_uInt16>(( nFrmWidth - nLeftTextPos ) / + nFrameWidth < ( nSpaceSteps * MAXLEVEL ) ) + nSpaceSteps = static_cast<sal_uInt16>(( nFrameWidth - nLeftTextPos ) / ( MAXLEVEL - nLvl )); } } @@ -1540,7 +1540,7 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel ) } // Does it fit completely into the frame? - bool bDefStep = nFrmWidth < (nSpaceSteps * MAXLEVEL); + bool bDefStep = nFrameWidth < (nSpaceSteps * MAXLEVEL); for( ; n < MAXLEVEL; ++n ) { SwNumFormat aFormat( aRule.Get( n ) ); @@ -1721,11 +1721,11 @@ void SwAutoFormat::BuildNegIndent( SwTwips nSpaces ) if( !bBreak ) { SetRedlineText( STR_AUTOFMTREDL_DEL_MORELINES ); - SwTextFrmInfo aFInfo( m_pCurTextFrm ); + SwTextFrameInfo aFInfo( m_pCurTextFrame ); const SwTextNode* pNxtNd = GetNextNode(); while( CanJoin( pNxtNd ) && - 20 < std::abs( (long)(nSpaces - aFInfo.SetFrm( - GetFrm( *pNxtNd ) ).GetLineStart() )) + 20 < std::abs( (long)(nSpaces - aFInfo.SetFrame( + GetFrame( *pNxtNd ) ).GetLineStart() )) ) { bBreak = !IsFastFullLine( *pNxtNd ) || @@ -1807,7 +1807,7 @@ void SwAutoFormat::AutoCorrect( sal_Int32 nPos ) SwAutoCorrDoc aACorrDoc( *m_pEditShell, m_aDelPam ); - SwTextFrmInfo aFInfo( nullptr ); + SwTextFrameInfo aFInfo( nullptr ); sal_Int32 nSttPos, nLastBlank = nPos; bool bFirst = m_aFlags.bCapitalStartSentence, bFirstSent = bFirst; @@ -1827,8 +1827,8 @@ void SwAutoFormat::AutoCorrect( sal_Int32 nPos ) { // beachte: Sonderfall Symbolfonts !!! - if( !aFInfo.GetFrm() ) - aFInfo.SetFrm( GetFrm( *m_pCurTextNd ) ); + if( !aFInfo.GetFrame() ) + aFInfo.SetFrame( GetFrame( *m_pCurTextNd ) ); if( !aFInfo.IsBullet( nPos )) { SetRedlineText( STR_AUTOFMTREDL_TYPO ); @@ -1853,7 +1853,7 @@ void SwAutoFormat::AutoCorrect( sal_Int32 nPos ) m_pCurTextNd = m_aNdIdx.GetNode().GetTextNode(); pText = &m_pCurTextNd->GetText(); m_aDelPam.SetMark(); - aFInfo.SetFrm( nullptr ); + aFInfo.SetFrame( nullptr ); } nPos += sReplace.getLength() - 1; @@ -1878,8 +1878,8 @@ void SwAutoFormat::AutoCorrect( sal_Int32 nPos ) if( ( cChar == '\"' && bReplaceQuote ) || ( cChar == '\'' && bReplaceSglQuote ) ) { // consider Symbolfonts! - if( !aFInfo.GetFrm() ) - aFInfo.SetFrm( GetFrm( *m_pCurTextNd ) ); + if( !aFInfo.GetFrame() ) + aFInfo.SetFrame( GetFrame( *m_pCurTextNd ) ); if( !aFInfo.IsBullet( nPos )) { SetRedlineText( STR_AUTOFMTREDL_TYPO ); @@ -1905,7 +1905,7 @@ void SwAutoFormat::AutoCorrect( sal_Int32 nPos ) pText = &m_pCurTextNd->GetText(); m_aDelPam.SetMark(); m_aDelPam.DeleteMark(); - aFInfo.SetFrm( nullptr ); + aFInfo.SetFrame( nullptr ); } nPos += sReplace.getLength() - 1; @@ -1925,8 +1925,8 @@ void SwAutoFormat::AutoCorrect( sal_Int32 nPos ) if( m_aFlags.bChgWeightUnderl ) { // consider Symbolfonts! - if( !aFInfo.GetFrm() ) - aFInfo.SetFrm( GetFrm( *m_pCurTextNd ) ); + if( !aFInfo.GetFrame() ) + aFInfo.SetFrame( GetFrame( *m_pCurTextNd ) ); if( !aFInfo.IsBullet( nPos )) { SetRedlineText( '*' == cChar @@ -1946,7 +1946,7 @@ void SwAutoFormat::AutoCorrect( sal_Int32 nPos ) pText = &m_pCurTextNd->GetText(); m_aDelPam.SetMark(); m_aDelPam.DeleteMark(); - aFInfo.SetFrm( nullptr ); + aFInfo.SetFrame( nullptr ); } //#125102# in case of the mode REDLINE_SHOW_DELETE the ** are still contained in pText if(0 == (m_pDoc->getIDocumentRedlineAccess().GetRedlineMode() & nsRedlineMode_t::REDLINE_SHOW_DELETE)) @@ -2078,7 +2078,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFormatFlags& rFlags, m_aEndNdIdx( pEdShell->GetDoc()->GetNodes().GetEndOfContent() ), m_pEditShell( pEdShell ), m_pDoc( pEdShell->GetDoc() ), - m_pCurTextNd( nullptr ), m_pCurTextFrm( nullptr ), + m_pCurTextNd( nullptr ), m_pCurTextFrame( nullptr ), m_nRedlAutoFormatSeqId( 0 ) { OSL_ENSURE( (pSttNd && pEndNd) || (!pSttNd && !pEndNd), @@ -2143,7 +2143,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFormatFlags& rFlags, sal_uInt16 nDigitLvl = 0; // set defaults - SwTextFrmInfo aFInfo( nullptr ); + SwTextFrameInfo aFInfo( nullptr ); // This is the automat for autoformatting m_eStat = READ_NEXT_PARA; @@ -2182,9 +2182,9 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFormatFlags& rFlags, // recognize a table definition +---+---+ if( m_aFlags.bAFormatByInput && m_aFlags.bCreateTable && DoTable() ) { - //JP 30.09.96: DoTable() builds on PopCrsr and MoveCrsr after AutoFormat! + //JP 30.09.96: DoTable() builds on PopCursor and MoveCursor after AutoFormat! pEdShell->Pop( false ); - *pEdShell->GetCrsr() = m_aDelPam; + *pEdShell->GetCursor() = m_aDelPam; pEdShell->Push(); m_eStat = IS_END; @@ -2217,7 +2217,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFormatFlags& rFlags, break; } - aFInfo.SetFrm( m_pCurTextFrm ); + aFInfo.SetFrame( m_pCurTextFrame ); // so far: if there were templates assigned, keep these and go to next node sal_uInt16 nPoolId = m_pCurTextNd->GetTextColl()->GetPoolFormatId(); @@ -2529,11 +2529,11 @@ void SwEditShell::AutoFormat( const SvxSwAutoFormatFlags* pAFlags ) pWait.reset(new SwWait( *GetDoc()->GetDocShell(), true )); } - SwPaM* pCrsr = GetCrsr(); + SwPaM* pCursor = GetCursor(); // There are more than one or a selection is open - if( pCrsr->GetNext() != pCrsr || pCrsr->HasMark() ) + if( pCursor->GetNext() != pCursor || pCursor->HasMark() ) { - for(SwPaM& rPaM : GetCrsr()->GetRingContainer()) + for(SwPaM& rPaM : GetCursor()->GetRingContainer()) { if( rPaM.HasMark() ) { @@ -2554,15 +2554,15 @@ void SwEditShell::AutoFormat( const SvxSwAutoFormatFlags* pAFlags ) void SwEditShell::AutoFormatBySplitNode() { SET_CURR_SHELL( this ); - SwPaM* pCrsr = GetCrsr(); - if( !pCrsr->IsMultiSelection() && pCrsr->Move( fnMoveBackward, fnGoNode ) ) + SwPaM* pCursor = GetCursor(); + if( !pCursor->IsMultiSelection() && pCursor->Move( fnMoveBackward, fnGoNode ) ) { StartAllAction(); StartUndo( UNDO_AUTOFORMAT ); bool bRange = false; - pCrsr->SetMark(); - SwIndex* pContent = &pCrsr->GetMark()->nContent; + pCursor->SetMark(); + SwIndex* pContent = &pCursor->GetMark()->nContent; if( pContent->GetIndex() ) { *pContent = 0; @@ -2571,12 +2571,12 @@ void SwEditShell::AutoFormatBySplitNode() else { // then go one node backwards - SwNodeIndex m_aNdIdx( pCrsr->GetMark()->nNode, -1 ); + SwNodeIndex m_aNdIdx( pCursor->GetMark()->nNode, -1 ); SwTextNode* pTextNd = m_aNdIdx.GetNode().GetTextNode(); if (pTextNd && !pTextNd->GetText().isEmpty()) { pContent->Assign( pTextNd, 0 ); - pCrsr->GetMark()->nNode = m_aNdIdx; + pCursor->GetMark()->nNode = m_aNdIdx; bRange = true; } } @@ -2587,15 +2587,15 @@ void SwEditShell::AutoFormatBySplitNode() SvxSwAutoFormatFlags aAFFlags = *GetAutoFormatFlags(); // use default values so far - SwAutoFormat aFormat( this, aAFFlags, &pCrsr->GetMark()->nNode, - &pCrsr->GetPoint()->nNode ); + SwAutoFormat aFormat( this, aAFFlags, &pCursor->GetMark()->nNode, + &pCursor->GetPoint()->nNode ); - //JP 30.09.96: DoTable() builds on PopCrsr and MoveCrsr! + //JP 30.09.96: DoTable() builds on PopCursor and MoveCursor! Pop( false ); - pCrsr = GetCrsr(); + pCursor = GetCursor(); } - pCrsr->DeleteMark(); - pCrsr->Move( fnMoveForward, fnGoNode ); + pCursor->DeleteMark(); + pCursor->Move( fnMoveForward, fnGoNode ); EndUndo( UNDO_AUTOFORMAT ); EndAllAction(); diff --git a/sw/source/core/edit/edatmisc.cxx b/sw/source/core/edit/edatmisc.cxx index 59a22b133605..83f796369c01 100644 --- a/sw/source/core/edit/edatmisc.cxx +++ b/sw/source/core/edit/edatmisc.cxx @@ -32,17 +32,17 @@ void SwEditShell::ResetAttr( const std::set<sal_uInt16> &attrs, SwPaM* pPaM ) { SET_CURR_SHELL( this ); - SwPaM* pCrsr = pPaM ? pPaM : GetCrsr( ); + SwPaM* pCursor = pPaM ? pPaM : GetCursor( ); StartAllAction(); - bool bUndoGroup = pCrsr->GetNext() != pCrsr; + bool bUndoGroup = pCursor->GetNext() != pCursor; if( bUndoGroup ) { GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_RESETATTR, nullptr); } - for(SwPaM& rCurCrsr : pCrsr->GetRingContainer()) - GetDoc()->ResetAttrs(rCurCrsr, true, attrs); + for(SwPaM& rCurrentCursor : pCursor->GetRingContainer()) + GetDoc()->ResetAttrs(rCurrentCursor, true, attrs); if( bUndoGroup ) { @@ -54,7 +54,7 @@ void SwEditShell::ResetAttr( const std::set<sal_uInt16> &attrs, SwPaM* pPaM ) void SwEditShell::GCAttr() { - for(SwPaM& rPaM : GetCrsr()->GetRingContainer()) + for(SwPaM& rPaM : GetCursor()->GetRingContainer()) { if ( !rPaM.HasMark() ) { @@ -99,13 +99,13 @@ void SwEditShell::SetAttrItem( const SfxPoolItem& rHint, SetAttrMode nFlags ) { SET_CURR_SHELL( this ); StartAllAction(); - SwPaM* pCrsr = GetCrsr(); - if( pCrsr->GetNext() != pCrsr ) // Ring of Cursors + SwPaM* pCursor = GetCursor(); + if( pCursor->GetNext() != pCursor ) // Ring of Cursors { bool bIsTableMode = IsTableMode(); GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_INSATTR, nullptr); - for(SwPaM& rPaM : GetCrsr()->GetRingContainer()) + for(SwPaM& rPaM : GetCursor()->GetRingContainer()) { if( rPaM.HasMark() && ( bIsTableMode || *rPaM.GetPoint() != *rPaM.GetMark() )) @@ -120,7 +120,7 @@ void SwEditShell::SetAttrItem( const SfxPoolItem& rHint, SetAttrMode nFlags ) { if( !HasSelection() ) UpdateAttr(); - GetDoc()->getIDocumentContentOperations().InsertPoolItem( *pCrsr, rHint, nFlags ); + GetDoc()->getIDocumentContentOperations().InsertPoolItem( *pCursor, rHint, nFlags ); } EndAllAction(); } @@ -129,19 +129,19 @@ void SwEditShell::SetAttrSet( const SfxItemSet& rSet, SetAttrMode nFlags, SwPaM* { SET_CURR_SHELL( this ); - SwPaM* pCrsr = pPaM ? pPaM : GetCrsr(); + SwPaM* pCursor = pPaM ? pPaM : GetCursor(); StartAllAction(); - if( pCrsr->GetNext() != pCrsr ) // Ring of Cursors + if( pCursor->GetNext() != pCursor ) // Ring of Cursors { bool bIsTableMode = IsTableMode(); GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_INSATTR, nullptr); - for(SwPaM& rTmpCrsr : pCrsr->GetRingContainer()) + for(SwPaM& rTmpCursor : pCursor->GetRingContainer()) { - if( rTmpCrsr.HasMark() && ( bIsTableMode || - *rTmpCrsr.GetPoint() != *rTmpCrsr.GetMark() )) + if( rTmpCursor.HasMark() && ( bIsTableMode || + *rTmpCursor.GetPoint() != *rTmpCursor.GetMark() )) { - GetDoc()->getIDocumentContentOperations().InsertItemSet(rTmpCrsr, rSet, nFlags ); + GetDoc()->getIDocumentContentOperations().InsertItemSet(rTmpCursor, rSet, nFlags ); } } @@ -151,7 +151,7 @@ void SwEditShell::SetAttrSet( const SfxItemSet& rSet, SetAttrMode nFlags, SwPaM* { if( !HasSelection() ) UpdateAttr(); - GetDoc()->getIDocumentContentOperations().InsertItemSet( *pCrsr, rSet, nFlags ); + GetDoc()->getIDocumentContentOperations().InsertItemSet( *pCursor, rSet, nFlags ); } EndAllAction(); } diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx index 88de80c275a4..c4843969d31d 100644 --- a/sw/source/core/edit/edattr.cxx +++ b/sw/source/core/edit/edattr.cxx @@ -63,7 +63,7 @@ bool SwEditShell::GetPaMAttr( SwPaM* pPaM, SfxItemSet& rSet, const bool bMergeIndentValuesOfNumRule ) const { // ??? pPaM can be different from the Cursor ??? - if( GetCrsrCnt() > getMaxLookup() ) + if( GetCursorCnt() > getMaxLookup() ) { rSet.InvalidateAllItems(); return false; @@ -172,12 +172,12 @@ bool SwEditShell::GetPaMAttr( SwPaM* pPaM, SfxItemSet& rSet, bool SwEditShell::GetCurAttr( SfxItemSet& rSet, const bool bMergeIndentValuesOfNumRule ) const { - return GetPaMAttr( GetCrsr(), rSet, bMergeIndentValuesOfNumRule ); + return GetPaMAttr( GetCursor(), rSet, bMergeIndentValuesOfNumRule ); } bool SwEditShell::GetCurParAttr( SfxItemSet& rSet) const { - return GetPaMParAttr( GetCrsr(), rSet ); + return GetPaMParAttr( GetCursor(), rSet ); } bool SwEditShell::GetPaMParAttr( SwPaM* pPaM, SfxItemSet& rSet ) const @@ -234,7 +234,7 @@ bool SwEditShell::GetPaMParAttr( SwPaM* pPaM, SfxItemSet& rSet ) const SwTextFormatColl* SwEditShell::GetCurTextFormatColl( ) const { - return GetPaMTextFormatColl( GetCrsr() ); + return GetPaMTextFormatColl( GetCursor() ); } SwTextFormatColl* SwEditShell::GetPaMTextFormatColl( SwPaM* pPaM ) const @@ -284,7 +284,7 @@ SwTextFormatColl* SwEditShell::GetPaMTextFormatColl( SwPaM* pPaM ) const std::vector<std::pair< const SfxPoolItem*, std::unique_ptr<SwPaM> >> SwEditShell::GetItemWithPaM( sal_uInt16 nWhich ) { std::vector<std::pair< const SfxPoolItem*, std::unique_ptr<SwPaM> >> vItem; - for(SwPaM& rCurrentPaM : GetCrsr()->GetRingContainer()) + for(SwPaM& rCurrentPaM : GetCursor()->GetRingContainer()) { // for all the point and mark (selections) // get the start and the end node of the current selection @@ -384,13 +384,13 @@ std::vector<std::pair< const SfxPoolItem*, std::unique_ptr<SwPaM> >> SwEditShell bool SwEditShell::GetCurFootnote( SwFormatFootnote* pFillFootnote ) { // The cursor must be positioned on the current footnotes anchor: - SwPaM* pCrsr = GetCrsr(); - SwTextNode* pTextNd = pCrsr->GetNode().GetTextNode(); + SwPaM* pCursor = GetCursor(); + SwTextNode* pTextNd = pCursor->GetNode().GetTextNode(); if( !pTextNd ) return false; SwTextAttr *const pFootnote = pTextNd->GetTextAttrForCharAt( - pCrsr->GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN); + pCursor->GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN); if( pFootnote && pFillFootnote ) { // Transfer data from the attribute @@ -406,10 +406,10 @@ bool SwEditShell::SetCurFootnote( const SwFormatFootnote& rFillFootnote ) bool bChgd = false; StartAllAction(); - for(SwPaM& rCrsr : GetCrsr()->GetRingContainer()) + for(SwPaM& rCursor : GetCursor()->GetRingContainer()) { bChgd |= - mpDoc->SetCurFootnote( rCrsr, rFillFootnote.GetNumStr(), rFillFootnote.GetNumber(), rFillFootnote.IsEndNote() ); + mpDoc->SetCurFootnote( rCursor, rFillFootnote.GetNumStr(), rFillFootnote.GetNumber(), rFillFootnote.IsEndNote() ); } @@ -480,7 +480,7 @@ bool SwEditShell::IsMoveLeftMargin( bool bRight, bool bModulus ) const if( !nDefDist ) return false; - for(SwPaM& rPaM : GetCrsr()->GetRingContainer()) + for(SwPaM& rPaM : GetCursor()->GetRingContainer()) { sal_uLong nSttNd = rPaM.GetMark()->nNode.GetIndex(), nEndNd = rPaM.GetPoint()->nNode.GetIndex(); @@ -499,13 +499,13 @@ bool SwEditShell::IsMoveLeftMargin( bool bRight, bool bModulus ) const long nNext = rLS.GetTextLeft() + nDefDist; if( bModulus ) nNext = ( nNext / nDefDist ) * nDefDist; - SwFrm* pFrm = pCNd->getLayoutFrm( GetLayout() ); - if ( pFrm ) + SwFrame* pFrame = pCNd->getLayoutFrame( GetLayout() ); + if ( pFrame ) { - const sal_uInt16 nFrmWidth = static_cast<sal_uInt16>( pFrm->IsVertical() ? - pFrm->Frm().Height() : - pFrm->Frm().Width() ); - bRet = nFrmWidth > ( nNext + MM50 ); + const sal_uInt16 nFrameWidth = static_cast<sal_uInt16>( pFrame->IsVertical() ? + pFrame->Frame().Height() : + pFrame->Frame().Width() ); + bRet = nFrameWidth > ( nNext + MM50 ); } else bRet = false; @@ -524,17 +524,17 @@ void SwEditShell::MoveLeftMargin( bool bRight, bool bModulus ) StartAllAction(); StartUndo( UNDO_START ); - SwPaM* pCrsr = GetCrsr(); - if( pCrsr->GetNext() != pCrsr ) // Multiple selection ? + SwPaM* pCursor = GetCursor(); + if( pCursor->GetNext() != pCursor ) // Multiple selection ? { - SwPamRanges aRangeArr( *pCrsr ); - SwPaM aPam( *pCrsr->GetPoint() ); + SwPamRanges aRangeArr( *pCursor ); + SwPaM aPam( *pCursor->GetPoint() ); for( size_t n = 0; n < aRangeArr.Count(); ++n ) GetDoc()->MoveLeftMargin( aRangeArr.SetPam( n, aPam ), bRight, bModulus ); } else - GetDoc()->MoveLeftMargin( *pCrsr, bRight, bModulus ); + GetDoc()->MoveLeftMargin( *pCursor, bRight, bModulus ); EndUndo( UNDO_END ); EndAllAction(); @@ -639,7 +639,7 @@ SvtScriptType SwEditShell::GetScriptType() const SvtScriptType nRet = SvtScriptType::NONE; { - for(SwPaM& rPaM : GetCrsr()->GetRingContainer()) + for(SwPaM& rPaM : GetCursor()->GetRingContainer()) { const SwPosition *pStt = rPaM.Start(), *pEnd = pStt == rPaM.GetMark() @@ -749,8 +749,8 @@ SvtScriptType SwEditShell::GetScriptType() const sal_uInt16 SwEditShell::GetCurLang() const { - const SwPaM* pCrsr = GetCrsr(); - const SwPosition& rPos = *pCrsr->GetPoint(); + const SwPaM* pCursor = GetCursor(); + const SwPosition& rPos = *pCursor->GetPoint(); const SwTextNode* pTNd = rPos.nNode.GetNode().GetTextNode(); sal_uInt16 nLang; if( pTNd ) @@ -758,7 +758,7 @@ sal_uInt16 SwEditShell::GetCurLang() const //JP 24.9.2001: if exist no selection, then get the language before // the current character! sal_Int32 nPos = rPos.nContent.GetIndex(); - if( nPos && !pCrsr->HasMark() ) + if( nPos && !pCursor->HasMark() ) --nPos; nLang = pTNd->GetLang( nPos ); } @@ -769,17 +769,17 @@ sal_uInt16 SwEditShell::GetCurLang() const sal_uInt16 SwEditShell::GetScalingOfSelectedText() const { - const SwPaM* pCrsr = GetCrsr(); - const SwPosition* pStt = pCrsr->Start(); + const SwPaM* pCursor = GetCursor(); + const SwPosition* pStt = pCursor->Start(); const SwTextNode* pTNd = pStt->nNode.GetNode().GetTextNode(); OSL_ENSURE( pTNd, "no textnode available" ); sal_uInt16 nScaleWidth; if( pTNd ) { - const SwPosition* pEnd = pStt == pCrsr->GetPoint() - ? pCrsr->GetMark() - : pCrsr->GetPoint(); + const SwPosition* pEnd = pStt == pCursor->GetPoint() + ? pCursor->GetMark() + : pCursor->GetPoint(); const sal_Int32 nStt = pStt->nContent.GetIndex(); const sal_Int32 nEnd = pStt->nNode == pEnd->nNode ? pEnd->nContent.GetIndex() diff --git a/sw/source/core/edit/eddel.cxx b/sw/source/core/edit/eddel.cxx index b41d1b410989..08e06d841665 100644 --- a/sw/source/core/edit/eddel.cxx +++ b/sw/source/core/edit/eddel.cxx @@ -94,7 +94,7 @@ void SwEditShell::DeleteSel( SwPaM& rPam, bool* pUndo ) SwPaM * pPam = &rPam; if (bSelectAll) { - assert(dynamic_cast<SwShellCrsr*>(&rPam)); // must be corrected pam + assert(dynamic_cast<SwShellCursor*>(&rPam)); // must be corrected pam pNewPam.reset(new SwPaM(*rPam.GetMark(), *rPam.GetPoint())); // Selection starts at the first para of the first cell, but we // want to delete the table node before the first cell as well. @@ -115,11 +115,11 @@ long SwEditShell::Delete() { SET_CURR_SHELL( this ); long nRet = 0; - if ( !HasReadonlySel() || CrsrInsideInputField() ) + if ( !HasReadonlySel() || CursorInsideInputField() ) { StartAllAction(); - bool bUndo = GetCrsr()->GetNext() != GetCrsr(); + bool bUndo = GetCursor()->GetNext() != GetCursor(); if( bUndo ) // more than one selection? { SwRewriter aRewriter; @@ -128,7 +128,7 @@ long SwEditShell::Delete() GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_DELETE, &aRewriter); } - for(SwPaM& rPaM : GetCrsr()->GetRingContainer()) + for(SwPaM& rPaM : GetCursor()->GetRingContainer()) { DeleteSel( rPaM, &bUndo ); } @@ -159,7 +159,7 @@ bool SwEditShell::Copy( SwEditShell* pDestShell ) SwPosition * pPos = nullptr; std::shared_ptr<SwPosition> pInsertPos; sal_uInt16 nMove = 0; - for(SwPaM& rPaM : GetCrsr()->GetRingContainer()) + for(SwPaM& rPaM : GetCursor()->GetRingContainer()) { if( !pPos ) { @@ -171,17 +171,17 @@ bool SwEditShell::Copy( SwEditShell* pDestShell ) continue; } else - pPos = pDestShell->GetCrsr()->GetPoint(); + pPos = pDestShell->GetCursor()->GetPoint(); } if( IsBlockMode() ) { // In block mode different insert positions will be calculated // by simulated cursor movements from the given first insert position if( nMove ) { - SwCursor aCrsr( *pPos, nullptr, false); - if( aCrsr.UpDown( false, nMove, nullptr, 0 ) ) + SwCursor aCursor( *pPos, nullptr, false); + if( aCursor.UpDown( false, nMove, nullptr, 0 ) ) { - pInsertPos.reset( new SwPosition( *aCrsr.GetPoint() ) ); + pInsertPos.reset( new SwPosition( *aCursor.GetPoint() ) ); aInsertList.push_back( pInsertPos ); } } @@ -207,7 +207,7 @@ bool SwEditShell::Copy( SwEditShell* pDestShell ) std::list< std::shared_ptr<SwPosition> >::iterator pNextInsert = aInsertList.begin(); pDestShell->GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr ); - for(SwPaM& rPaM : GetCrsr()->GetRingContainer()) + for(SwPaM& rPaM : GetCursor()->GetRingContainer()) { if( !pPos ) { @@ -219,7 +219,7 @@ bool SwEditShell::Copy( SwEditShell* pDestShell ) continue; } else - pPos = pDestShell->GetCrsr()->GetPoint(); + pPos = pDestShell->GetCursor()->GetPoint(); } if( !bFirstMove ) { @@ -257,22 +257,22 @@ bool SwEditShell::Copy( SwEditShell* pDestShell ) // Maybe nothing has been moved? if( !bFirstMove ) { - SwPaM* pCrsr = pDestShell->GetCrsr(); - pCrsr->SetMark(); - pCrsr->GetPoint()->nNode = aSttNdIdx.GetIndex()+1; - pCrsr->GetPoint()->nContent.Assign( pCrsr->GetContentNode(),nSttCntIdx); - pCrsr->Exchange(); + SwPaM* pCursor = pDestShell->GetCursor(); + pCursor->SetMark(); + pCursor->GetPoint()->nNode = aSttNdIdx.GetIndex()+1; + pCursor->GetPoint()->nContent.Assign( pCursor->GetContentNode(),nSttCntIdx); + pCursor->Exchange(); } else { // If the cursor moved during move process, move also its GetMark - pDestShell->GetCrsr()->SetMark(); - pDestShell->GetCrsr()->DeleteMark(); + pDestShell->GetCursor()->SetMark(); + pDestShell->GetCursor()->DeleteMark(); } #if OSL_DEBUG_LEVEL > 0 // check if the indices are registered in the correct nodes { - for(SwPaM& rCmp : pDestShell->GetCrsr()->GetRingContainer()) + for(SwPaM& rCmp : pDestShell->GetCursor()->GetRingContainer()) { OSL_ENSURE( rCmp.GetPoint()->nContent.GetIdxReg() == rCmp.GetContentNode(), "Point in wrong Node" ); @@ -288,7 +288,7 @@ bool SwEditShell::Copy( SwEditShell* pDestShell ) pDestShell->GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr ); pDestShell->EndAllAction(); - pDestShell->SaveTableBoxContent( pDestShell->GetCrsr()->GetPoint() ); + pDestShell->SaveTableBoxContent( pDestShell->GetCursor()->GetPoint() ); return bRet; } @@ -310,7 +310,7 @@ bool SwEditShell::Replace( const OUString& rNewStr, bool bRegExpRplc ) StartAllAction(); GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, nullptr); - for(SwPaM& rPaM : GetCrsr()->GetRingContainer()) + for(SwPaM& rPaM : GetCursor()->GetRingContainer()) { if( rPaM.HasMark() && *rPaM.GetMark() != *rPaM.GetPoint() ) { @@ -333,13 +333,13 @@ bool SwEditShell::DelFullPara() bool bRet = false; if( !IsTableMode() ) { - SwPaM* pCrsr = GetCrsr(); + SwPaM* pCursor = GetCursor(); // no multi selection - if( !pCrsr->IsMultiSelection() && !HasReadonlySel() ) + if( !pCursor->IsMultiSelection() && !HasReadonlySel() ) { SET_CURR_SHELL( this ); StartAllAction(); - bRet = GetDoc()->getIDocumentContentOperations().DelFullPara( *pCrsr ); + bRet = GetDoc()->getIDocumentContentOperations().DelFullPara( *pCursor ); EndAllAction(); } } diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx index db47d26fc823..85b29f6ea83f 100644 --- a/sw/source/core/edit/edfcol.cxx +++ b/sw/source/core/edit/edfcol.cxx @@ -58,7 +58,7 @@ void SwEditShell::SetTextFormatColl(SwTextFormatColl *pFormat, aRewriter.AddRule(UndoArg1, pLocal->GetName()); GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_SETFMTCOLL, &aRewriter); - for(SwPaM& rPaM : GetCrsr()->GetRingContainer()) + for(SwPaM& rPaM : GetCursor()->GetRingContainer()) { if ( !rPaM.HasReadonlySel( GetViewOptions()->IsFormView() ) ) @@ -102,8 +102,8 @@ void SwEditShell::FillByEx(SwTextFormatColl* pColl, bool bReset) pColl->ResetAllFormatAttr(); } - SwPaM * pCrsr = GetCrsr(); - SwContentNode * pCnt = pCrsr->GetContentNode(); + SwPaM * pCursor = GetCursor(); + SwContentNode * pCnt = pCursor->GetContentNode(); const SfxItemSet* pSet = pCnt->GetpSwAttrSet(); if( pSet ) { diff --git a/sw/source/core/edit/edfld.cxx b/sw/source/core/edit/edfld.cxx index a4a67ccf7bf2..7bb4aa7acdfd 100644 --- a/sw/source/core/edit/edfld.cxx +++ b/sw/source/core/edit/edfld.cxx @@ -171,7 +171,7 @@ void SwEditShell::FieldToText( SwFieldType* pType ) StartAllAction(); StartUndo( UNDO_DELETE ); Push(); - SwPaM* pPaM = GetCrsr(); + SwPaM* pPaM = GetCursor(); // TODO: this is really hackish SwFieldHint aHint( pPaM ); SwIterator<SwClient,SwFieldType> aIter(*pType); @@ -197,7 +197,7 @@ void SwEditShell::Insert2(SwField& rField, const bool bForceExpandHints) ? SetAttrMode::FORCEHINTEXPAND : SetAttrMode::DEFAULT; - for(SwPaM& rPaM : GetCrsr()->GetRingContainer()) // for each PaM + for(SwPaM& rPaM : GetCursor()->GetRingContainer()) // for each PaM { const bool bSuccess(GetDoc()->getIDocumentContentOperations().InsertPoolItem(rPaM, aField, nInsertFlags)); OSL_ENSURE( bSuccess, "Doc->Insert(Field) failed"); @@ -258,13 +258,13 @@ void SwEditShell::UpdateFields( SwField &rField ) if( RES_GETREFFLD == nFieldWhich ) pMsgHint = &aRefMkHt; - SwPaM* pCrsr = GetCrsr(); + SwPaM* pCursor = GetCursor(); SwTextField *pTextField; SwFormatField *pFormatField; - if ( !pCrsr->IsMultiSelection() && !pCrsr->HasMark()) + if ( !pCursor->IsMultiSelection() && !pCursor->HasMark()) { - pTextField = GetTextFieldAtPos( pCrsr->Start(), true ); + pTextField = GetTextFieldAtPos( pCursor->Start(), true ); if (!pTextField) // #i30221# pTextField = lcl_FindInputField( GetDoc(), rField); @@ -282,7 +282,7 @@ void SwEditShell::UpdateFields( SwField &rField ) SwMsgPoolItem aFieldHint( RES_TXTATR_FIELD ); // Search-Hint SwMsgPoolItem aAnnotationFieldHint( RES_TXTATR_ANNOTATION ); SwMsgPoolItem aInputFieldHint( RES_TXTATR_INPUTFIELD ); - for(SwPaM& rPaM : GetCrsr()->GetRingContainer()) // for each PaM + for(SwPaM& rPaM : GetCursor()->GetRingContainer()) // for each PaM { if( rPaM.HasMark() && bOkay ) // ... with selection { diff --git a/sw/source/core/edit/edfmt.cxx b/sw/source/core/edit/edfmt.cxx index 81e9ba762ee3..d65fe3b3eb32 100644 --- a/sw/source/core/edit/edfmt.cxx +++ b/sw/source/core/edit/edfmt.cxx @@ -59,7 +59,7 @@ void SwEditShell::FillByEx(SwCharFormat* pCharFormat, bool bReset) pCharFormat->ResetAllFormatAttr(); } - SwPaM* pPam = GetCrsr(); + SwPaM* pPam = GetCursor(); const SwContentNode* pCNd = pPam->GetContentNode(); if( pCNd->IsTextNode() ) { diff --git a/sw/source/core/edit/edglbldc.cxx b/sw/source/core/edit/edglbldc.cxx index 9017f73e0213..694e71506811 100644 --- a/sw/source/core/edit/edglbldc.cxx +++ b/sw/source/core/edit/edglbldc.cxx @@ -142,11 +142,11 @@ bool SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos, SET_CURR_SHELL( this ); StartAllAction(); - SwPaM* pCrsr = GetCrsr(); - if( pCrsr->GetNext() != pCrsr || IsTableMode() ) + SwPaM* pCursor = GetCursor(); + if( pCursor->GetNext() != pCursor || IsTableMode() ) ClearMark(); - SwPosition& rPos = *pCrsr->GetPoint(); + SwPosition& rPos = *pCursor->GetPoint(); rPos.nNode = rInsPos.GetDocPos(); bool bEndUndo = false; @@ -160,7 +160,7 @@ bool SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos, pMyDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr ); --rPos.nNode; pMyDoc->getIDocumentContentOperations().AppendTextNode( rPos ); - pCrsr->SetMark(); + pCursor->SetMark(); } InsertSection( rNew ); @@ -183,11 +183,11 @@ bool SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos, SET_CURR_SHELL( this ); StartAllAction(); - SwPaM* pCrsr = GetCrsr(); - if( pCrsr->GetNext() != pCrsr || IsTableMode() ) + SwPaM* pCursor = GetCursor(); + if( pCursor->GetNext() != pCursor || IsTableMode() ) ClearMark(); - SwPosition& rPos = *pCrsr->GetPoint(); + SwPosition& rPos = *pCursor->GetPoint(); rPos.nNode = rInsPos.GetDocPos(); bool bEndUndo = false; @@ -223,11 +223,11 @@ bool SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos ) SET_CURR_SHELL( this ); StartAllAction(); - SwPaM* pCrsr = GetCrsr(); - if( pCrsr->GetNext() != pCrsr || IsTableMode() ) + SwPaM* pCursor = GetCursor(); + if( pCursor->GetNext() != pCursor || IsTableMode() ) ClearMark(); - SwPosition& rPos = *pCrsr->GetPoint(); + SwPosition& rPos = *pCursor->GetPoint(); rPos.nNode = rInsPos.GetDocPos() - 1; rPos.nContent.Assign( nullptr, 0 ); @@ -247,11 +247,11 @@ bool SwEditShell::DeleteGlobalDocContent( const SwGlblDocContents& rArr , StartAllAction(); StartUndo( UNDO_START ); - SwPaM* pCrsr = GetCrsr(); - if( pCrsr->GetNext() != pCrsr || IsTableMode() ) + SwPaM* pCursor = GetCursor(); + if( pCursor->GetNext() != pCursor || IsTableMode() ) ClearMark(); - SwPosition& rPos = *pCrsr->GetPoint(); + SwPosition& rPos = *pCursor->GetPoint(); SwDoc* pMyDoc = GetDoc(); const SwGlblDocContent& rDelPos = *rArr[ nDelPos ]; @@ -271,13 +271,13 @@ bool SwEditShell::DeleteGlobalDocContent( const SwGlblDocContents& rArr , case GLBLDOC_UNKNOWN: { rPos.nNode = nDelIdx; - pCrsr->SetMark(); + pCursor->SetMark(); if( ++nDelPos < rArr.size() ) rPos.nNode = rArr[ nDelPos ]->GetDocPos(); else rPos.nNode = pMyDoc->GetNodes().GetEndOfContent(); --rPos.nNode; - if( !pMyDoc->getIDocumentContentOperations().DelFullPara( *pCrsr ) ) + if( !pMyDoc->getIDocumentContentOperations().DelFullPara( *pCursor ) ) Delete(); } break; @@ -315,8 +315,8 @@ bool SwEditShell::MoveGlobalDocContent( const SwGlblDocContents& rArr , SET_CURR_SHELL( this ); StartAllAction(); - SwPaM* pCrsr = GetCrsr(); - if( pCrsr->GetNext() != pCrsr || IsTableMode() ) + SwPaM* pCursor = GetCursor(); + if( pCursor->GetNext() != pCursor || IsTableMode() ) ClearMark(); SwDoc* pMyDoc = GetDoc(); @@ -345,23 +345,23 @@ bool SwEditShell::GotoGlobalDocContent( const SwGlblDocContent& rPos ) return false; SET_CURR_SHELL( this ); - SttCrsrMove(); + SttCursorMove(); - SwPaM* pCrsr = GetCrsr(); - if( pCrsr->GetNext() != pCrsr || IsTableMode() ) + SwPaM* pCursor = GetCursor(); + if( pCursor->GetNext() != pCursor || IsTableMode() ) ClearMark(); - SwPosition& rCrsrPos = *pCrsr->GetPoint(); - rCrsrPos.nNode = rPos.GetDocPos(); + SwPosition& rCursorPos = *pCursor->GetPoint(); + rCursorPos.nNode = rPos.GetDocPos(); SwDoc* pMyDoc = GetDoc(); - SwContentNode * pCNd = rCrsrPos.nNode.GetNode().GetContentNode(); + SwContentNode * pCNd = rCursorPos.nNode.GetNode().GetContentNode(); if( !pCNd ) - pCNd = pMyDoc->GetNodes().GoNext( &rCrsrPos.nNode ); + pCNd = pMyDoc->GetNodes().GoNext( &rCursorPos.nNode ); - rCrsrPos.nContent.Assign( pCNd, 0 ); + rCursorPos.nContent.Assign( pCNd, 0 ); - EndCrsrMove(); + EndCursorMove(); return true; } diff --git a/sw/source/core/edit/edglss.cxx b/sw/source/core/edit/edglss.cxx index c5a2b4284903..1e3ccacc2bf9 100644 --- a/sw/source/core/edit/edglss.cxx +++ b/sw/source/core/edit/edglss.cxx @@ -39,7 +39,7 @@ void SwEditShell::InsertGlossary( SwTextBlocks& rGlossary, const OUString& rStr ) { StartAllAction(); - GetDoc()->InsertGlossary( rGlossary, rStr, *GetCrsr(), this ); + GetDoc()->InsertGlossary( rGlossary, rStr, *GetCursor(), this ); EndAllAction(); } @@ -96,7 +96,7 @@ sal_uInt16 SwEditShell::SaveGlossaryDoc( SwTextBlocks& rBlock, { KillPams(); - SwPaM* pCrsr = GetCrsr(); + SwPaM* pCursor = GetCursor(); SwNodeIndex aStt( pMyDoc->GetNodes().GetEndOfExtras(), 1 ); SwContentNode* pContentNd = pMyDoc->GetNodes().GoNext( &aStt ); @@ -104,16 +104,16 @@ sal_uInt16 SwEditShell::SaveGlossaryDoc( SwTextBlocks& rBlock, if( !pNd ) pNd = pContentNd; - pCrsr->GetPoint()->nNode = *pNd; + pCursor->GetPoint()->nNode = *pNd; if( pNd == pContentNd ) - pCrsr->GetPoint()->nContent.Assign( pContentNd, 0 ); - pCrsr->SetMark(); + pCursor->GetPoint()->nContent.Assign( pContentNd, 0 ); + pCursor->SetMark(); // then until the end of the Node array - pCrsr->GetPoint()->nNode = pMyDoc->GetNodes().GetEndOfContent().GetIndex()-1; - pContentNd = pCrsr->GetContentNode(); + pCursor->GetPoint()->nNode = pMyDoc->GetNodes().GetEndOfContent().GetIndex()-1; + pContentNd = pCursor->GetContentNode(); if( pContentNd ) - pCrsr->GetPoint()->nContent.Assign( pContentNd, pContentNd->Len() ); + pCursor->GetPoint()->nContent.Assign( pContentNd, pContentNd->Len() ); OUString sBuf; if( GetSelectedText( sBuf, GETSELTXT_PARABRK_TO_ONLYCR ) && !sBuf.isEmpty() ) @@ -205,12 +205,12 @@ bool SwEditShell::_CopySelToDoc( SwDoc* pInsDoc, SwNodeIndex* pSttNd ) } else { - bool bColSel = _GetCrsr()->IsColumnSelection(); + bool bColSel = _GetCursor()->IsColumnSelection(); if( bColSel && pInsDoc->IsClipBoard() ) pInsDoc->SetColumnSelection( true ); bool bSelectAll = StartsWithTable() && ExtendedSelectedAll(/*bFootnotes =*/ false); { - for(SwPaM& rPaM : GetCrsr()->GetRingContainer()) + for(SwPaM& rPaM : GetCursor()->GetRingContainer()) { if( !rPaM.HasMark() ) { @@ -263,7 +263,7 @@ bool SwEditShell::_CopySelToDoc( SwDoc* pInsDoc, SwNodeIndex* pSttNd ) */ bool SwEditShell::GetSelectedText( OUString &rBuf, int nHndlParaBrk ) { - GetCrsr(); // creates all cursors if needed + GetCursor(); // creates all cursors if needed if( IsSelOnePara() ) { rBuf = GetSelText(); diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx index ce7921cfc5ea..3336422bb73b 100644 --- a/sw/source/core/edit/editsh.cxx +++ b/sw/source/core/edit/editsh.cxx @@ -65,17 +65,17 @@ using namespace com::sun::star; -void SwEditShell::Insert( sal_Unicode c, bool bOnlyCurrCrsr ) +void SwEditShell::Insert( sal_Unicode c, bool bOnlyCurrCursor ) { StartAllAction(); - for(SwPaM& rPaM : GetCrsr()->GetRingContainer()) + for(SwPaM& rPaM : GetCursor()->GetRingContainer()) { const bool bSuccess = GetDoc()->getIDocumentContentOperations().InsertString(rPaM, OUString(c)); OSL_ENSURE( bSuccess, "Doc->Insert() failed." ); (void) bSuccess; SaveTableBoxContent( rPaM.GetPoint() ); - if( bOnlyCurrCrsr ) + if( bOnlyCurrCursor ) break; } @@ -92,40 +92,40 @@ void SwEditShell::Insert2(const OUString &rStr, const bool bForceExpandHints ) ? (SwInsertFlags::FORCEHINTEXPAND | SwInsertFlags::EMPTYEXPAND) : SwInsertFlags::EMPTYEXPAND; - for(SwPaM& rCurrentCrsr : getShellCrsr( true )->GetRingContainer()) + for(SwPaM& rCurrentCursor : getShellCursor( true )->GetRingContainer()) { //OPT: GetSystemCharSet const bool bSuccess = - GetDoc()->getIDocumentContentOperations().InsertString(rCurrentCrsr, rStr, nInsertFlags); + GetDoc()->getIDocumentContentOperations().InsertString(rCurrentCursor, rStr, nInsertFlags); OSL_ENSURE( bSuccess, "Doc->Insert() failed." ); if (bSuccess) { - GetDoc()->UpdateRsid( rCurrentCrsr, rStr.getLength() ); + GetDoc()->UpdateRsid( rCurrentCursor, rStr.getLength() ); // Set paragraph rsid if beginning of paragraph SwTextNode *const pTextNode = - rCurrentCrsr.GetPoint()->nNode.GetNode().GetTextNode(); + rCurrentCursor.GetPoint()->nNode.GetNode().GetTextNode(); if( pTextNode && pTextNode->Len() == 1) GetDoc()->UpdateParRsid( pTextNode ); } - SaveTableBoxContent( rCurrentCrsr.GetPoint() ); + SaveTableBoxContent( rCurrentCursor.GetPoint() ); } } // calculate cursor bidi level - SwCursor* pTmpCrsr = _GetCrsr(); - const bool bDoNotSetBidiLevel = ! pTmpCrsr || - ( dynamic_cast<SwUnoCrsr*>(pTmpCrsr) != nullptr ); + SwCursor* pTmpCursor = _GetCursor(); + const bool bDoNotSetBidiLevel = ! pTmpCursor || + ( dynamic_cast<SwUnoCursor*>(pTmpCursor) != nullptr ); if ( ! bDoNotSetBidiLevel ) { - SwNode& rNode = pTmpCrsr->GetPoint()->nNode.GetNode(); + SwNode& rNode = pTmpCursor->GetPoint()->nNode.GetNode(); if ( rNode.IsTextNode() ) { - SwIndex& rIdx = pTmpCrsr->GetPoint()->nContent; + SwIndex& rIdx = pTmpCursor->GetPoint()->nContent; sal_Int32 nPrevPos = rIdx.GetIndex(); if ( nPrevPos ) --nPrevPos; @@ -137,12 +137,12 @@ void SwEditShell::Insert2(const OUString &rStr, const bool bForceExpandHints ) { // seems to be an empty paragraph. Point aPt; - SwContentFrm* pFrm = - static_cast<SwTextNode&>(rNode).getLayoutFrm( GetLayout(), &aPt, pTmpCrsr->GetPoint(), + SwContentFrame* pFrame = + static_cast<SwTextNode&>(rNode).getLayoutFrame( GetLayout(), &aPt, pTmpCursor->GetPoint(), false ); SwScriptInfo aScriptInfo; - aScriptInfo.InitScriptInfo( static_cast<SwTextNode&>(rNode), pFrm->IsRightToLeft() ); + aScriptInfo.InitScriptInfo( static_cast<SwTextNode&>(rNode), pFrame->IsRightToLeft() ); nLevel = aScriptInfo.DirType( nPrevPos ); } else @@ -152,7 +152,7 @@ void SwEditShell::Insert2(const OUString &rStr, const bool bForceExpandHints ) nLevel = pSI->DirType( nPrevPos ); } - pTmpCrsr->SetCrsrBidiLevel( nLevel ); + pTmpCursor->SetCursorBidiLevel( nLevel ); } } @@ -164,7 +164,7 @@ void SwEditShell::Insert2(const OUString &rStr, const bool bForceExpandHints ) void SwEditShell::Overwrite(const OUString &rStr) { StartAllAction(); - for(SwPaM& rPaM : GetCrsr()->GetRingContainer()) + for(SwPaM& rPaM : GetCursor()->GetRingContainer()) { if( !GetDoc()->getIDocumentContentOperations().Overwrite(rPaM, rStr ) ) { @@ -180,7 +180,7 @@ long SwEditShell::SplitNode( bool bAutoFormat, bool bCheckTableStart ) StartAllAction(); GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, nullptr); - for(SwPaM& rPaM : GetCrsr()->GetRingContainer()) + for(SwPaM& rPaM : GetCursor()->GetRingContainer()) { // Here, a table cell becomes a normal text cell. GetDoc()->ClearBoxNumAttrs( rPaM.GetPoint()->nNode ); @@ -204,7 +204,7 @@ bool SwEditShell::AppendTextNode() StartAllAction(); GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, nullptr); - for(SwPaM& rPaM : GetCrsr()->GetRingContainer()) + for(SwPaM& rPaM : GetCursor()->GetRingContainer()) { GetDoc()->ClearBoxNumAttrs( rPaM.GetPoint()->nNode ); bRet = GetDoc()->getIDocumentContentOperations().AppendTextNode( *rPaM.GetPoint()) || bRet; @@ -222,15 +222,15 @@ bool SwEditShell::AppendTextNode() SwGrfNode * SwEditShell::_GetGrfNode() const { SwGrfNode *pGrfNode = nullptr; - SwPaM* pCrsr = GetCrsr(); - if( !pCrsr->HasMark() || - pCrsr->GetPoint()->nNode == pCrsr->GetMark()->nNode ) - pGrfNode = pCrsr->GetPoint()->nNode.GetNode().GetGrfNode(); + SwPaM* pCursor = GetCursor(); + if( !pCursor->HasMark() || + pCursor->GetPoint()->nNode == pCursor->GetMark()->nNode ) + pGrfNode = pCursor->GetPoint()->nNode.GetNode().GetGrfNode(); return pGrfNode; } -// returns a Graphic pointer if CurCrsr->GetPoint() points to a SwGrfNode and +// returns a Graphic pointer if CurrentCursor->GetPoint() points to a SwGrfNode and // GetMark is not set or points to the same Graphic const Graphic* SwEditShell::GetGraphic( bool bWait ) const { @@ -265,15 +265,15 @@ sal_uInt16 SwEditShell::GetGraphicType() const return static_cast<sal_uInt16>(pGrfNode ? pGrfNode->GetGrfObj().GetType() : GRAPHIC_NONE); } -// returns the size of a graphic in <rSz> if CurCrsr->GetPoint() points to a SwGrfNode and +// returns the size of a graphic in <rSz> if CurrentCursor->GetPoint() points to a SwGrfNode and // GetMark is not set or points to the same graphic bool SwEditShell::GetGrfSize(Size& rSz) const { SwNoTextNode* pNoTextNd; - SwPaM* pCurrentCrsr = GetCrsr(); - if( ( !pCurrentCrsr->HasMark() - || pCurrentCrsr->GetPoint()->nNode == pCurrentCrsr->GetMark()->nNode ) - && nullptr != ( pNoTextNd = pCurrentCrsr->GetNode().GetNoTextNode() ) ) + SwPaM* pCurrentCursor = GetCursor(); + if( ( !pCurrentCursor->HasMark() + || pCurrentCursor->GetPoint()->nNode == pCurrentCursor->GetMark()->nNode ) + && nullptr != ( pNoTextNd = pCurrentCursor->GetNode().GetNoTextNode() ) ) { rSz = pNoTextNd->GetTwipSize(); return true; @@ -287,7 +287,7 @@ void SwEditShell::ReRead( const OUString& rGrfName, const OUString& rFltName, const Graphic* pGraphic, const GraphicObject* pGrfObj ) { StartAllAction(); - mpDoc->getIDocumentContentOperations().ReRead( *GetCrsr(), rGrfName, rFltName, pGraphic, pGrfObj ); + mpDoc->getIDocumentContentOperations().ReRead( *GetCursor(), rGrfName, rFltName, pGraphic, pGrfObj ); EndAllAction(); } @@ -309,16 +309,16 @@ void SwEditShell::GetGrfNms( OUString* pGrfName, OUString* pFltName, const tools::PolyPolygon *SwEditShell::GetGraphicPolygon() const { - SwNoTextNode *pNd = GetCrsr()->GetNode().GetNoTextNode(); + SwNoTextNode *pNd = GetCursor()->GetNode().GetNoTextNode(); return pNd->HasContour(); } void SwEditShell::SetGraphicPolygon( const tools::PolyPolygon *pPoly ) { - SwNoTextNode *pNd = GetCrsr()->GetNode().GetNoTextNode(); + SwNoTextNode *pNd = GetCursor()->GetNode().GetNoTextNode(); StartAllAction(); pNd->SetContour( pPoly ); - SwFlyFrm *pFly = static_cast<SwFlyFrm*>(pNd->getLayoutFrm(GetLayout())->GetUpper()); + SwFlyFrame *pFly = static_cast<SwFlyFrame*>(pNd->getLayoutFrame(GetLayout())->GetUpper()); const SwFormatSurround &rSur = pFly->GetFormat()->GetSurround(); pFly->GetFormat()->NotifyClients( &rSur, &rSur ); GetDoc()->getIDocumentState().SetModified(); @@ -327,13 +327,13 @@ void SwEditShell::SetGraphicPolygon( const tools::PolyPolygon *pPoly ) void SwEditShell::ClearAutomaticContour() { - SwNoTextNode *pNd = GetCrsr()->GetNode().GetNoTextNode(); + SwNoTextNode *pNd = GetCursor()->GetNode().GetNoTextNode(); OSL_ENSURE( pNd, "is no NoTextNode!" ); if( pNd->HasAutomaticContour() ) { StartAllAction(); pNd->SetContour( nullptr ); - SwFlyFrm *pFly = static_cast<SwFlyFrm*>(pNd->getLayoutFrm(GetLayout())->GetUpper()); + SwFlyFrame *pFly = static_cast<SwFlyFrame*>(pNd->getLayoutFrame(GetLayout())->GetUpper()); const SwFormatSurround &rSur = pFly->GetFormat()->GetSurround(); pFly->GetFormat()->NotifyClients( &rSur, &rSur ); GetDoc()->getIDocumentState().SetModified(); @@ -343,19 +343,19 @@ void SwEditShell::ClearAutomaticContour() /** Get OLE object at pointer. * - * Returns a pointer to a SvInPlaceObjectRef if CurCrsr->GetPoint() points to a SwOLENode and + * Returns a pointer to a SvInPlaceObjectRef if CurrentCursor->GetPoint() points to a SwOLENode and * GetMark is not set or points to the same object reference. Gets this pointer from the Doc * if the object should be searched by name. */ svt::EmbeddedObjectRef& SwEditShell::GetOLEObject() const { OSL_ENSURE( CNT_OLE == GetCntType(), "GetOLEObj: no OLENode." ); - OSL_ENSURE( !GetCrsr()->HasMark() || - (GetCrsr()->HasMark() && - GetCrsr()->GetPoint()->nNode == GetCrsr()->GetMark()->nNode), + OSL_ENSURE( !GetCursor()->HasMark() || + (GetCursor()->HasMark() && + GetCursor()->GetPoint()->nNode == GetCursor()->GetMark()->nNode), "GetOLEObj: no OLENode." ); - SwOLENode *pOLENode = GetCrsr()->GetNode().GetOLENode(); + SwOLENode *pOLENode = GetCursor()->GetNode().GetOLENode(); OSL_ENSURE( pOLENode, "GetOLEObj: no OLENode." ); SwOLEObj& rOObj = pOLENode->GetOLEObj(); return rOObj.GetObject(); @@ -371,7 +371,7 @@ bool SwEditShell::HasOLEObj( const OUString &rName ) const SwNode& rNd = aIdx.GetNode(); if( rNd.IsOLENode() && rName == static_cast<SwOLENode&>(rNd).GetChartTableName() && - static_cast<SwOLENode&>(rNd).getLayoutFrm( GetLayout() ) ) + static_cast<SwOLENode&>(rNd).getLayoutFrame( GetLayout() ) ) return true; aIdx.Assign( *pStNd->EndOfSectionNode(), + 1 ); @@ -381,7 +381,7 @@ bool SwEditShell::HasOLEObj( const OUString &rName ) const void SwEditShell::SetChartName( const OUString &rName ) { - SwOLENode *pONd = GetCrsr()->GetNode().GetOLENode(); + SwOLENode *pONd = GetCursor()->GetNode().GetOLENode(); OSL_ENSURE( pONd, "ChartNode not found" ); pONd->SetChartTableName( rName ); } @@ -400,7 +400,7 @@ void SwEditShell::SetTableName( SwFrameFormat& rTableFormat, const OUString &rNe /// request current word OUString SwEditShell::GetCurWord() { - const SwPaM& rPaM = *GetCrsr(); + const SwPaM& rPaM = *GetCursor(); const SwTextNode* pNd = rPaM.GetNode().GetTextNode(); OUString aString = pNd ? pNd->GetCurWord(rPaM.GetPoint()->nContent.GetIndex()) : @@ -444,15 +444,15 @@ OUString SwEditShell::GetDropText( const sal_Int32 nChars ) const */ OUString aText; - SwPaM* pCrsr = GetCrsr(); + SwPaM* pCursor = GetCursor(); if ( IsMultiSelection() ) { // if a multi selection exists, search for the first line // -> it is the cursor with the lowest index - sal_uLong nIndex = pCrsr->GetMark()->nNode.GetIndex(); + sal_uLong nIndex = pCursor->GetMark()->nNode.GetIndex(); bool bPrev = true; - SwPaM* pLast = pCrsr; - SwPaM* pTemp = pCrsr; + SwPaM* pLast = pCursor; + SwPaM* pTemp = pCursor; while ( bPrev ) { SwPaM* pPrev2 = dynamic_cast< SwPaM* >( pTemp->GetPrev() ); @@ -464,13 +464,13 @@ OUString SwEditShell::GetDropText( const sal_Int32 nChars ) const if ( nTemp < nIndex ) { nIndex = nTemp; - pCrsr = pPrev2; + pCursor = pPrev2; } } } } - SwTextNode* pTextNd = pCrsr->GetNode( !pCrsr->HasMark() ).GetTextNode(); + SwTextNode* pTextNd = pCursor->GetNode( !pCursor->HasMark() ).GetTextNode(); if( pTextNd ) { sal_Int32 nDropLen = pTextNd->GetDropLen( nChars ); @@ -483,13 +483,13 @@ OUString SwEditShell::GetDropText( const sal_Int32 nChars ) const void SwEditShell::ReplaceDropText( const OUString &rStr, SwPaM* pPaM ) { - SwPaM* pCrsr = pPaM ? pPaM : GetCrsr(); - if( pCrsr->GetPoint()->nNode == pCrsr->GetMark()->nNode && - pCrsr->GetNode().GetTextNode()->IsTextNode() ) + SwPaM* pCursor = pPaM ? pPaM : GetCursor(); + if( pCursor->GetPoint()->nNode == pCursor->GetMark()->nNode && + pCursor->GetNode().GetTextNode()->IsTextNode() ) { StartAllAction(); - const SwNodeIndex& rNd = pCrsr->GetPoint()->nNode; + const SwNodeIndex& rNd = pCursor->GetPoint()->nNode; SwPaM aPam( rNd, rStr.getLength(), rNd, 0 ); if( !GetDoc()->getIDocumentContentOperations().Overwrite( aPam, rStr ) ) { @@ -506,7 +506,7 @@ OUString SwEditShell::Calculate() SwCalc aCalc( *GetDoc() ); const CharClass& rCC = GetAppCharClass(); - for(SwPaM& rCurrentPaM : GetCrsr()->GetNext()->GetRingContainer()) + for(SwPaM& rCurrentPaM : GetCursor()->GetNext()->GetRingContainer()) { SwTextNode* pTextNd = rCurrentPaM.GetNode().GetTextNode(); if(pTextNd) @@ -571,7 +571,7 @@ sfx2::LinkManager& SwEditShell::GetLinkManager() void *SwEditShell::GetIMapInventor() const { // The node on which the cursor points should be sufficient as a unique identifier - return static_cast<void*>(&(GetCrsr()->GetNode())); + return static_cast<void*>(&(GetCursor()->GetNode())); } // #i73788# @@ -580,10 +580,10 @@ Graphic SwEditShell::GetIMapGraphic() const // returns always a graphic if the cursor is in a Fly SET_CURR_SHELL( const_cast<SwViewShell*>(static_cast<SwViewShell const *>(this)) ); Graphic aRet; - SwPaM* pCrsr = GetCrsr(); - if ( !pCrsr->HasMark() ) + SwPaM* pCursor = GetCursor(); + if ( !pCursor->HasMark() ) { - SwNode& rNd =pCrsr->GetNode(); + SwNode& rNd =pCursor->GetNode(); if( rNd.IsGrfNode() ) { SwGrfNode & rGrfNode(static_cast<SwGrfNode&>(rNd)); @@ -595,9 +595,9 @@ Graphic SwEditShell::GetIMapGraphic() const } else { - SwFlyFrm* pFlyFrm = rNd.GetContentNode()->getLayoutFrm( GetLayout() )->FindFlyFrm(); - if(pFlyFrm) - aRet = pFlyFrm->GetFormat()->MakeGraphic(); + SwFlyFrame* pFlyFrame = rNd.GetContentNode()->getLayoutFrame( GetLayout() )->FindFlyFrame(); + if(pFlyFrame) + aRet = pFlyFrame->GetFormat()->MakeGraphic(); } } return aRet; @@ -614,12 +614,12 @@ bool SwEditShell::InsertURL( const SwFormatINetFormat& rFormat, const OUString& if( !rStr.isEmpty() ) { - SwPaM* pCrsr = GetCrsr(); - if( pCrsr->HasMark() && *pCrsr->GetPoint() != *pCrsr->GetMark() ) + SwPaM* pCursor = GetCursor(); + if( pCursor->HasMark() && *pCursor->GetPoint() != *pCursor->GetMark() ) { // Selection existent, multi selection? bool bDelText = true; - if( !pCrsr->IsMultiSelection() ) + if( !pCursor->IsMultiSelection() ) { // einfach Selection -> Text ueberpruefen const OUString sText(comphelper::string::stripEnd(GetSelText(), ' ')); @@ -632,7 +632,7 @@ bool SwEditShell::InsertURL( const SwFormatINetFormat& rFormat, const OUString& if( bDelText ) Delete(); } - else if( pCrsr->IsMultiSelection() && rFormat.GetValue() == rStr ) + else if( pCursor->IsMultiSelection() && rFormat.GetValue() == rStr ) bInsText = false; if( bInsText ) @@ -646,7 +646,7 @@ bool SwEditShell::InsertURL( const SwFormatINetFormat& rFormat, const OUString& bInsText = false; SetAttrItem( rFormat ); - if (bInsText && !IsCrsrPtAtEnd()) + if (bInsText && !IsCursorPtAtEnd()) SwapPam(); if(!bKeepSelection) ClearMark(); @@ -693,7 +693,7 @@ bool SwEditShell::DelINetAttrWithText() { bool bRet = SelectTextAttr( RES_TXTATR_INETFMT, false ); if( bRet ) - DeleteSel( *GetCrsr() ); + DeleteSel( *GetCursor() ); return bRet; } @@ -701,7 +701,7 @@ bool SwEditShell::DelINetAttrWithText() bool SwEditShell::DontExpandFormat() { bool bRet = false; - if( !IsTableMode() && GetDoc()->DontExpandFormat( *GetCrsr()->GetPoint() )) + if( !IsTableMode() && GetDoc()->DontExpandFormat( *GetCursor()->GetPoint() )) { bRet = true; CallChgLnk(); @@ -727,19 +727,19 @@ void SwEditShell::SetNumberingRestart() StartAllAction(); Push(); // iterate over all text contents - body, frames, header, footer, footnote text - SwPaM* pCrsr = GetCrsr(); + SwPaM* pCursor = GetCursor(); for(int i = 0; i < 2; i++) { if(!i) - MakeFindRange(DOCPOS_START, DOCPOS_END, pCrsr); // body content + MakeFindRange(DOCPOS_START, DOCPOS_END, pCursor); // body content else - MakeFindRange(DOCPOS_OTHERSTART, DOCPOS_OTHEREND, pCrsr); // extra content - SwPosition* pSttPos = pCrsr->Start(), *pEndPos = pCrsr->End(); + MakeFindRange(DOCPOS_OTHERSTART, DOCPOS_OTHEREND, pCursor); // extra content + SwPosition* pSttPos = pCursor->Start(), *pEndPos = pCursor->End(); sal_uLong nCurrNd = pSttPos->nNode.GetIndex(); sal_uLong nEndNd = pEndPos->nNode.GetIndex(); if( nCurrNd <= nEndNd ) { - SwContentFrm* pCntFrm; + SwContentFrame* pContentFrame; bool bGoOn = true; // iterate over all paragraphs while( bGoOn ) @@ -748,10 +748,10 @@ void SwEditShell::SetNumberingRestart() switch( pNd->GetNodeType() ) { case ND_TEXTNODE: - if( nullptr != ( pCntFrm = static_cast<SwTextNode*>(pNd)->getLayoutFrm( GetLayout() )) ) + if( nullptr != ( pContentFrame = static_cast<SwTextNode*>(pNd)->getLayoutFrame( GetLayout() )) ) { // skip hidden frames - ignore protection! - if( !static_cast<SwTextFrm*>(pCntFrm)->IsHiddenNow() ) + if( !static_cast<SwTextFrame*>(pContentFrame)->IsHiddenNow() ) { // if the node is numbered and the starting value of the numbering equals the // start value of the numbering rule then set this value as hard starting value @@ -813,11 +813,11 @@ sal_uInt16 SwEditShell::GetLineCount( bool bActPos ) { sal_uInt16 nRet = 0; CalcLayout(); - SwPaM* pPam = GetCrsr(); + SwPaM* pPam = GetCursor(); SwNodeIndex& rPtIdx = pPam->GetPoint()->nNode; SwNodeIndex aStart( rPtIdx ); SwContentNode* pCNd; - SwContentFrm *pCntFrm = nullptr; + SwContentFrame *pContentFrame = nullptr; sal_uLong nTmpPos; if( !bActPos ) @@ -828,21 +828,21 @@ sal_uInt16 SwEditShell::GetLineCount( bool bActPos ) else { if( nullptr != ( pCNd = pPam->GetContentNode() ) && - nullptr != ( pCntFrm = pCNd->getLayoutFrm( GetLayout() ) ) ) + nullptr != ( pContentFrame = pCNd->getLayoutFrame( GetLayout() ) ) ) { const SwStartNode *pTmp; - if( pCntFrm->IsInFly() ) // Fly + if( pContentFrame->IsInFly() ) // Fly pTmp = pCNd->FindFlyStartNode(); - else if( pCntFrm->IsInFootnote() ) // Footnote + else if( pContentFrame->IsInFootnote() ) // Footnote pTmp = pCNd->FindFootnoteStartNode(); else { // Footer/Header const sal_uInt16 nTyp = FRM_HEADER | FRM_FOOTER; - SwFrm* pFrm = pCntFrm; - while( pFrm && !(pFrm->GetType() & nTyp) ) - pFrm = pFrm->GetUpper(); - OSL_ENSURE( pFrm, "Wo bin ich?" ); - if( pFrm && ( pFrm->GetType() & FRM_FOOTER ) ) + SwFrame* pFrame = pContentFrame; + while( pFrame && !(pFrame->GetType() & nTyp) ) + pFrame = pFrame->GetUpper(); + OSL_ENSURE( pFrame, "Wo bin ich?" ); + if( pFrame && ( pFrame->GetType() & FRM_FOOTER ) ) pTmp = pCNd->FindFooterStartNode(); else pTmp = pCNd->FindHeaderStartNode(); @@ -850,17 +850,17 @@ sal_uInt16 SwEditShell::GetLineCount( bool bActPos ) OSL_ENSURE( pTmp, "Missing StartNode" ); aStart = *pTmp; } - OSL_ENSURE( pCNd && pCntFrm, "Missing Layout-Information" ); + OSL_ENSURE( pCNd && pContentFrame, "Missing Layout-Information" ); } while( nullptr != ( pCNd = GetDoc()->GetNodes().GoNextSection( &aStart, true, false )) && ( !bActPos || aStart <= rPtIdx ) ) { - if( nullptr != ( pCntFrm = pCNd->getLayoutFrm( GetLayout() ) ) && pCntFrm->IsTextFrm() ) + if( nullptr != ( pContentFrame = pCNd->getLayoutFrame( GetLayout() ) ) && pContentFrame->IsTextFrame() ) { const sal_Int32 nActPos = bActPos && aStart == rPtIdx ? pPam->GetPoint()->nContent.GetIndex() : COMPLETE_STRING; - nRet = nRet + static_cast<SwTextFrm*>(pCntFrm)->GetLineCount( nActPos ); + nRet = nRet + static_cast<SwTextFrame*>(pContentFrame)->GetLineCount( nActPos ); } } return nRet; @@ -919,7 +919,7 @@ void SwEditShell::SetLineNumberInfo(const SwLineNumberInfo& rInfo) StartAllAction(); SET_CURR_SHELL( this ); GetDoc()->SetLineNumberInfo(rInfo); - AddPaintRect( GetLayout()->Frm() ); + AddPaintRect( GetLayout()->Frame() ); EndAllAction(); } @@ -936,9 +936,9 @@ void SwEditShell::SetLinkUpdMode( sal_uInt16 nMode ) // Interface for TextInputData - (for text input of japanese/chinese characters) SwExtTextInput* SwEditShell::CreateExtTextInput(LanguageType eInputLanguage) { - SwExtTextInput* pRet = GetDoc()->CreateExtTextInput( *GetCrsr() ); + SwExtTextInput* pRet = GetDoc()->CreateExtTextInput( *GetCursor() ); pRet->SetLanguage(eInputLanguage); - pRet->SetOverwriteCursor( SwCrsrShell::IsOverwriteCrsr() ); + pRet->SetOverwriteCursor( SwCursorShell::IsOverwriteCursor() ); return pRet; } @@ -946,7 +946,7 @@ OUString SwEditShell::DeleteExtTextInput( SwExtTextInput* pDel, bool bInsText ) { if( !pDel ) { - const SwPosition& rPos = *GetCrsr()->GetPoint(); + const SwPosition& rPos = *GetCursor()->GetPoint(); pDel = GetDoc()->GetExtTextInput( rPos.nNode.GetNode(), rPos.nContent.GetIndex() ); if( !pDel ) @@ -966,14 +966,14 @@ OUString SwEditShell::DeleteExtTextInput( SwExtTextInput* pDel, bool bInsText ) SET_CURR_SHELL( this ); StartAllAction(); pDel->SetInsText( bInsText ); - SetOverwriteCrsr( pDel->IsOverwriteCursor() ); + SetOverwriteCursor( pDel->IsOverwriteCursor() ); const SwPosition aPos( *pDel->GetPoint() ); GetDoc()->DeleteExtTextInput( pDel ); // In this case, the "replace" function did not set the cursor // to the original position. Therefore we have to do this manually. - if ( ! bInsText && IsOverwriteCrsr() ) - *GetCrsr()->GetPoint() = aPos; + if ( ! bInsText && IsOverwriteCursor() ) + *GetCursor()->GetPoint() = aPos; EndAllAction(); } @@ -982,7 +982,7 @@ OUString SwEditShell::DeleteExtTextInput( SwExtTextInput* pDel, bool bInsText ) void SwEditShell::SetExtTextInputData( const CommandExtTextInputData& rData ) { - const SwPosition& rPos = *GetCrsr()->GetPoint(); + const SwPosition& rPos = *GetCursor()->GetPoint(); SwExtTextInput* pInput = GetDoc()->GetExtTextInput( rPos.nNode.GetNode() ); if( pInput ) { @@ -993,22 +993,22 @@ void SwEditShell::SetExtTextInputData( const CommandExtTextInputData& rData ) pInput->SetInputData( rData ); // position cursor const SwPosition& rStt = *pInput->Start(); - const sal_Int32 nNewCrsrPos = rStt.nContent.GetIndex() + rData.GetCursorPos(); + const sal_Int32 nNewCursorPos = rStt.nContent.GetIndex() + rData.GetCursorPos(); // ugly but works - ShowCrsr(); - const sal_Int32 nDiff = nNewCrsrPos - rPos.nContent.GetIndex(); + ShowCursor(); + const sal_Int32 nDiff = nNewCursorPos - rPos.nContent.GetIndex(); if( 0 > nDiff ) Left( (sal_Int32)-nDiff, CRSR_SKIP_CHARS ); else if( 0 < nDiff ) Right( (sal_Int32)nDiff, CRSR_SKIP_CHARS ); - SetOverwriteCrsr( rData.IsCursorOverwrite() ); + SetOverwriteCursor( rData.IsCursorOverwrite() ); EndAllAction(); if( !rData.IsCursorVisible() ) // must be called after the EndAction - HideCrsr(); + HideCursor(); } } @@ -1018,11 +1018,11 @@ void SwEditShell::TransliterateText( sal_uInt32 nType ) StartAllAction(); SET_CURR_SHELL( this ); - SwPaM* pCrsr = GetCrsr(); - if( pCrsr->GetNext() != pCrsr ) + SwPaM* pCursor = GetCursor(); + if( pCursor->GetNext() != pCursor ) { GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, nullptr); - for(SwPaM& rPaM : GetCrsr()->GetRingContainer()) + for(SwPaM& rPaM : GetCursor()->GetRingContainer()) { if( rPaM.HasMark() ) GetDoc()->getIDocumentContentOperations().TransliterateText( rPaM, aTrans ); @@ -1030,14 +1030,14 @@ void SwEditShell::TransliterateText( sal_uInt32 nType ) GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, nullptr); } else - GetDoc()->getIDocumentContentOperations().TransliterateText( *pCrsr, aTrans ); + GetDoc()->getIDocumentContentOperations().TransliterateText( *pCursor, aTrans ); EndAllAction(); } void SwEditShell::CountWords( SwDocStat& rStat ) const { - for(SwPaM& rPaM : GetCrsr()->GetRingContainer()) + for(SwPaM& rPaM : GetCursor()->GetRingContainer()) { if( rPaM.HasMark() ) SwDoc::CountWords( rPaM, rStat ); @@ -1047,7 +1047,7 @@ void SwEditShell::CountWords( SwDocStat& rStat ) const void SwEditShell::ApplyViewOptions( const SwViewOption &rOpt ) { - SwCrsrShell::StartAction(); + SwCursorShell::StartAction(); SwViewShell::ApplyViewOptions( rOpt ); SwEditShell::EndAction(); } diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx index 49d32024b346..a92705eef782 100644 --- a/sw/source/core/edit/edlingu.cxx +++ b/sw/source/core/edit/edlingu.cxx @@ -71,7 +71,7 @@ class SwLinguIter SwPosition *pEnd; SwPosition *pCurr; SwPosition *pCurrX; - sal_uInt16 nCrsrCnt; + sal_uInt16 nCursorCnt; public: SwLinguIter(); @@ -89,7 +89,7 @@ public: inline const SwPosition *GetCurrX() const { return pCurrX; } inline void SetCurrX( SwPosition* pNew ){ delete pCurrX; pCurrX = pNew; } - inline sal_uInt16& GetCrsrCnt(){ return nCrsrCnt; } + inline sal_uInt16& GetCursorCnt(){ return nCursorCnt; } // for the UI: void _Start( SwEditShell *pSh, SwDocPositions eStart, @@ -155,16 +155,16 @@ public: class SwHyphIter : public SwLinguIter { - // With that we save a GetFrm() in Hyphenate //TODO: does it actually matter? + // With that we save a GetFrame() in Hyphenate //TODO: does it actually matter? const SwTextNode *m_pLastNode; - SwTextFrm *m_pLastFrm; - friend SwTextFrm * sw::SwHyphIterCacheLastTxtFrm(SwTextNode *, std::function<SwTextFrm * ()>); + SwTextFrame *m_pLastFrame; + friend SwTextFrame * sw::SwHyphIterCacheLastTextFrame(SwTextNode *, std::function<SwTextFrame * ()>); bool bOldIdle; static void DelSoftHyph( SwPaM &rPam ); public: - SwHyphIter() : m_pLastNode(nullptr), m_pLastFrm(nullptr), bOldIdle(false) {} + SwHyphIter() : m_pLastNode(nullptr), m_pLastFrame(nullptr), bOldIdle(false) {} void Start( SwEditShell *pSh, SwDocPositions eStart, SwDocPositions eEnd ); void End(); @@ -188,7 +188,7 @@ SwLinguIter::SwLinguIter() , pEnd(nullptr) , pCurr(nullptr) , pCurrX(nullptr) - , nCrsrCnt(0) + , nCursorCnt(0) { // TODO missing: ensurance of re-entrance, OSL_ENSURE( etc. } @@ -208,38 +208,38 @@ void SwLinguIter::_Start( SwEditShell *pShell, SwDocPositions eStart, OSL_ENSURE( !pEnd, "SwLinguIter::_Start without End?"); - SwPaM *pCrsr = pSh->GetCrsr(); + SwPaM *pCursor = pSh->GetCursor(); - if( pShell->HasSelection() || pCrsr != pCrsr->GetNext() ) + if( pShell->HasSelection() || pCursor != pCursor->GetNext() ) { bSetCurr = nullptr != GetCurr(); - nCrsrCnt = pSh->GetCrsrCnt(); + nCursorCnt = pSh->GetCursorCnt(); if( pSh->IsTableMode() ) - pSh->TableCrsrToCursor(); + pSh->TableCursorToCursor(); pSh->Push(); sal_uInt16 n; - for( n = 0; n < nCrsrCnt; ++n ) + for( n = 0; n < nCursorCnt; ++n ) { pSh->Push(); - pSh->DestroyCrsr(); + pSh->DestroyCursor(); } pSh->Pop( false ); } else { bSetCurr = false; - nCrsrCnt = 1; + nCursorCnt = 1; pSh->Push(); pSh->SetLinguRange( eStart, eEnd ); } - pCrsr = pSh->GetCrsr(); - if ( *pCrsr->GetPoint() > *pCrsr->GetMark() ) - pCrsr->Exchange(); + pCursor = pSh->GetCursor(); + if ( *pCursor->GetPoint() > *pCursor->GetMark() ) + pCursor->Exchange(); - pStart = new SwPosition( *pCrsr->GetPoint() ); - pEnd = new SwPosition( *pCrsr->GetMark() ); + pStart = new SwPosition( *pCursor->GetPoint() ); + pEnd = new SwPosition( *pCursor->GetMark() ); if( bSetCurr ) { SwPosition* pNew = new SwPosition( *GetStart() ); @@ -248,7 +248,7 @@ void SwLinguIter::_Start( SwEditShell *pShell, SwDocPositions eStart, SetCurrX( pNew ); } - pCrsr->SetMark(); + pCursor->SetMark(); } void SwLinguIter::_End(bool bRestoreSelection) @@ -259,7 +259,7 @@ void SwLinguIter::_End(bool bRestoreSelection) OSL_ENSURE( pEnd, "SwLinguIter::_End without end?"); if(bRestoreSelection) { - while( nCrsrCnt-- ) + while( nCursorCnt-- ) pSh->Pop( false ); pSh->KillPams(); @@ -303,40 +303,40 @@ uno::Any SwSpellIter::Continue( sal_uInt16* pPageCnt, sal_uInt16* pPageSt ) uno::Reference< uno::XInterface > xSpellRet; bool bGoOn = true; do { - SwPaM *pCrsr = pMySh->GetCrsr(); - if ( !pCrsr->HasMark() ) - pCrsr->SetMark(); + SwPaM *pCursor = pMySh->GetCursor(); + if ( !pCursor->HasMark() ) + pCursor->SetMark(); uno::Reference< beans::XPropertySet > xProp( GetLinguPropertySet() ); - *pMySh->GetCrsr()->GetPoint() = *GetCurr(); - *pMySh->GetCrsr()->GetMark() = *GetEnd(); - pMySh->GetDoc()->Spell(*pMySh->GetCrsr(), + *pMySh->GetCursor()->GetPoint() = *GetCurr(); + *pMySh->GetCursor()->GetMark() = *GetEnd(); + pMySh->GetDoc()->Spell(*pMySh->GetCursor(), xSpeller, pPageCnt, pPageSt, false ) >>= xSpellRet; - bGoOn = GetCrsrCnt() > 1; + bGoOn = GetCursorCnt() > 1; if( xSpellRet.is() ) { bGoOn = false; - SwPosition* pNewPoint = new SwPosition( *pCrsr->GetPoint() ); - SwPosition* pNewMark = new SwPosition( *pCrsr->GetMark() ); + SwPosition* pNewPoint = new SwPosition( *pCursor->GetPoint() ); + SwPosition* pNewMark = new SwPosition( *pCursor->GetMark() ); SetCurr( pNewPoint ); SetCurrX( pNewMark ); } if( bGoOn ) { pMySh->Pop( false ); - pCrsr = pMySh->GetCrsr(); - if ( *pCrsr->GetPoint() > *pCrsr->GetMark() ) - pCrsr->Exchange(); - SwPosition* pNew = new SwPosition( *pCrsr->GetPoint() ); + pCursor = pMySh->GetCursor(); + if ( *pCursor->GetPoint() > *pCursor->GetMark() ) + pCursor->Exchange(); + SwPosition* pNew = new SwPosition( *pCursor->GetPoint() ); SetStart( pNew ); - pNew = new SwPosition( *pCrsr->GetMark() ); + pNew = new SwPosition( *pCursor->GetMark() ); SetEnd( pNew ); pNew = new SwPosition( *GetStart() ); SetCurr( pNew ); pNew = new SwPosition( *pNew ); SetCurrX( pNew ); - pCrsr->SetMark(); - --GetCrsrCnt(); + pCursor->SetMark(); + --GetCursorCnt(); } }while ( bGoOn ); aSpellRet <<= xSpellRet; @@ -367,24 +367,24 @@ uno::Any SwConvIter::Continue( sal_uInt16* pPageCnt, sal_uInt16* pPageSt ) OUString aConvText; bool bGoOn = true; do { - SwPaM *pCrsr = pMySh->GetCrsr(); - if ( !pCrsr->HasMark() ) - pCrsr->SetMark(); + SwPaM *pCursor = pMySh->GetCursor(); + if ( !pCursor->HasMark() ) + pCursor->SetMark(); - *pMySh->GetCrsr()->GetPoint() = *GetCurr(); - *pMySh->GetCrsr()->GetMark() = *GetEnd(); + *pMySh->GetCursor()->GetPoint() = *GetCurr(); + *pMySh->GetCursor()->GetMark() = *GetEnd(); // call function to find next text portion to be converted uno::Reference< linguistic2::XSpellChecker1 > xEmpty; - pMySh->GetDoc()->Spell( *pMySh->GetCrsr(), + pMySh->GetDoc()->Spell( *pMySh->GetCursor(), xEmpty, pPageCnt, pPageSt, false, &rArgs ) >>= aConvText; - bGoOn = GetCrsrCnt() > 1; + bGoOn = GetCursorCnt() > 1; if( !aConvText.isEmpty() ) { bGoOn = false; - SwPosition* pNewPoint = new SwPosition( *pCrsr->GetPoint() ); - SwPosition* pNewMark = new SwPosition( *pCrsr->GetMark() ); + SwPosition* pNewPoint = new SwPosition( *pCursor->GetPoint() ); + SwPosition* pNewMark = new SwPosition( *pCursor->GetMark() ); SetCurr( pNewPoint ); SetCurrX( pNewMark ); @@ -392,19 +392,19 @@ uno::Any SwConvIter::Continue( sal_uInt16* pPageCnt, sal_uInt16* pPageSt ) if( bGoOn ) { pMySh->Pop( false ); - pCrsr = pMySh->GetCrsr(); - if ( *pCrsr->GetPoint() > *pCrsr->GetMark() ) - pCrsr->Exchange(); - SwPosition* pNew = new SwPosition( *pCrsr->GetPoint() ); + pCursor = pMySh->GetCursor(); + if ( *pCursor->GetPoint() > *pCursor->GetMark() ) + pCursor->Exchange(); + SwPosition* pNew = new SwPosition( *pCursor->GetPoint() ); SetStart( pNew ); - pNew = new SwPosition( *pCrsr->GetMark() ); + pNew = new SwPosition( *pCursor->GetMark() ); SetEnd( pNew ); pNew = new SwPosition( *GetStart() ); SetCurr( pNew ); pNew = new SwPosition( *pNew ); SetCurrX( pNew ); - pCrsr->SetMark(); - --GetCrsrCnt(); + pCursor->SetMark(); + --GetCursorCnt(); } }while ( bGoOn ); return makeAny( aConvText ); @@ -464,25 +464,25 @@ uno::Any SwHyphIter::Continue( sal_uInt16* pPageCnt, sal_uInt16* pPageSt ) uno::Reference< XHyphenatedWord > xHyphWord; bool bGoOn = false; do { - SwPaM *pCrsr; + SwPaM *pCursor; do { OSL_ENSURE( GetEnd(), "SwHyphIter::Continue without Start?" ); - pCrsr = pMySh->GetCrsr(); - if ( !pCrsr->HasMark() ) - pCrsr->SetMark(); - if ( *pCrsr->GetPoint() < *pCrsr->GetMark() ) + pCursor = pMySh->GetCursor(); + if ( !pCursor->HasMark() ) + pCursor->SetMark(); + if ( *pCursor->GetPoint() < *pCursor->GetMark() ) { - pCrsr->Exchange(); - pCrsr->SetMark(); + pCursor->Exchange(); + pCursor->SetMark(); } - if ( *pCrsr->End() <= *GetEnd() ) + if ( *pCursor->End() <= *GetEnd() ) { - *pCrsr->GetMark() = *GetEnd(); + *pCursor->GetMark() = *GetEnd(); // Do we need to break the word at the current cursor position? - const Point aCrsrPos( pMySh->GetCharRect().Pos() ); - xHyphWord = pMySh->GetDoc()->Hyphenate( pCrsr, aCrsrPos, + const Point aCursorPos( pMySh->GetCharRect().Pos() ); + xHyphWord = pMySh->GetDoc()->Hyphenate( pCursor, aCursorPos, pPageCnt, pPageSt ); } @@ -491,18 +491,18 @@ uno::Any SwHyphIter::Continue( sal_uInt16* pPageCnt, sal_uInt16* pPageSt ) SwEditShell::InsertSoftHyph( xHyphWord->getHyphenationPos() + 1); } } while( bAuto && xHyphWord.is() ); //end of do-while - bGoOn = !xHyphWord.is() && GetCrsrCnt() > 1; + bGoOn = !xHyphWord.is() && GetCursorCnt() > 1; if( bGoOn ) { pMySh->Pop( false ); - pCrsr = pMySh->GetCrsr(); - if ( *pCrsr->GetPoint() > *pCrsr->GetMark() ) - pCrsr->Exchange(); - SwPosition* pNew = new SwPosition(*pCrsr->End()); + pCursor = pMySh->GetCursor(); + if ( *pCursor->GetPoint() > *pCursor->GetMark() ) + pCursor->Exchange(); + SwPosition* pNew = new SwPosition(*pCursor->End()); SetEnd( pNew ); - pCrsr->SetMark(); - --GetCrsrCnt(); + pCursor->SetMark(); + --GetCursorCnt(); } } while ( bGoOn ); aHyphRet <<= xHyphWord; @@ -513,14 +513,14 @@ uno::Any SwHyphIter::Continue( sal_uInt16* pPageCnt, sal_uInt16* pPageSt ) void SwHyphIter::Ignore() { SwEditShell *pMySh = GetSh(); - SwPaM *pCrsr = pMySh->GetCrsr(); + SwPaM *pCursor = pMySh->GetCursor(); // delete old SoftHyphen - DelSoftHyph( *pCrsr ); + DelSoftHyph( *pCursor ); // and continue - pCrsr->Start()->nContent = pCrsr->End()->nContent; - pCrsr->SetMark(); + pCursor->Start()->nContent = pCursor->End()->nContent; + pCursor->SetMark(); } void SwHyphIter::DelSoftHyph( SwPaM &rPam ) @@ -539,9 +539,9 @@ void SwHyphIter::InsertSoftHyph( const sal_Int32 nHyphPos ) if( !pMySh ) return; - SwPaM *pCrsr = pMySh->GetCrsr(); - SwPosition* pSttPos = pCrsr->Start(); - SwPosition* pEndPos = pCrsr->End(); + SwPaM *pCursor = pMySh->GetCursor(); + SwPosition* pSttPos = pCursor->Start(); + SwPosition* pEndPos = pCursor->End(); const sal_Int32 nLastHyphLen = GetEnd()->nContent.GetIndex() - pSttPos->nContent.GetIndex(); @@ -558,30 +558,30 @@ void SwHyphIter::InsertSoftHyph( const sal_Int32 nHyphPos ) pMySh->StartAction(); { SwDoc *pDoc = pMySh->GetDoc(); - DelSoftHyph( *pCrsr ); + DelSoftHyph( *pCursor ); pSttPos->nContent += nHyphPos; SwPaM aRg( *pSttPos ); pDoc->getIDocumentContentOperations().InsertString( aRg, OUString(CHAR_SOFTHYPHEN) ); } // revoke selection - pCrsr->DeleteMark(); + pCursor->DeleteMark(); pMySh->EndAction(); - pCrsr->SetMark(); + pCursor->SetMark(); } namespace sw { -SwTextFrm * -SwHyphIterCacheLastTxtFrm(SwTextNode *const pNode, - std::function<SwTextFrm * ()> const create) +SwTextFrame * +SwHyphIterCacheLastTextFrame(SwTextNode *const pNode, + std::function<SwTextFrame * ()> const create) { assert(g_pHyphIter); - if (pNode != g_pHyphIter->m_pLastNode || !g_pHyphIter->m_pLastFrm) + if (pNode != g_pHyphIter->m_pLastNode || !g_pHyphIter->m_pLastFrame) { g_pHyphIter->m_pLastNode = pNode; - g_pHyphIter->m_pLastFrm = create(); + g_pHyphIter->m_pLastFrame = create(); } - return g_pHyphIter->m_pLastFrm; + return g_pHyphIter->m_pLastFrame; } } @@ -616,10 +616,10 @@ bool SwEditShell::HasHyphIter() void SwEditShell::SetLinguRange( SwDocPositions eStart, SwDocPositions eEnd ) { - SwPaM *pCrsr = GetCrsr(); - MakeFindRange( static_cast<sal_uInt16>(eStart), static_cast<sal_uInt16>(eEnd), pCrsr ); - if( *pCrsr->GetPoint() > *pCrsr->GetMark() ) - pCrsr->Exchange(); + SwPaM *pCursor = GetCursor(); + MakeFindRange( static_cast<sal_uInt16>(eStart), static_cast<sal_uInt16>(eEnd), pCursor ); + if( *pCursor->GetPoint() > *pCursor->GetMark() ) + pCursor->Exchange(); } void SwEditShell::SpellStart( @@ -645,10 +645,10 @@ void SwEditShell::SpellStart( if (pLinguIter) { - SwCursor* pSwCrsr = GetSwCrsr(); + SwCursor* pSwCursor = GetSwCursor(); - SwPosition *pTmp = new SwPosition( *pSwCrsr->GetPoint() ); - pSwCrsr->FillFindPos( eCurr, *pTmp ); + SwPosition *pTmp = new SwPosition( *pSwCursor->GetPoint() ); + pSwCursor->FillFindPos( eCurr, *pTmp ); pLinguIter->SetCurr( pTmp ); pTmp = new SwPosition( *pTmp ); @@ -736,8 +736,8 @@ uno::Any SwEditShell::SpellContinue( * - add nLastHyphLen onto SelectionStart * - iterate over all selected areas * - pDoc->Hyphenate() iterates over all Nodes of a selection - * - pTextNode->Hyphenate() calls SwTextFrm::Hyphenate of the EditShell - * - SwTextFrm:Hyphenate() iterates over all rows of the Pam + * - pTextNode->Hyphenate() calls SwTextFrame::Hyphenate of the EditShell + * - SwTextFrame:Hyphenate() iterates over all rows of the Pam * - LineIter::Hyphenate() sets the Hyphenator and the Pam based on * the to be separated word. * - Returns true if there is a hyphenation and false if the Pam is processed. @@ -842,13 +842,13 @@ uno::Reference< XSpellAlternatives > if( IsTableMode() ) return nullptr; - SwPaM* pCrsr = GetCrsr(); - SwPosition aPos( *pCrsr->GetPoint() ); + SwPaM* pCursor = GetCursor(); + SwPosition aPos( *pCursor->GetPoint() ); Point aPt( *pPt ); - SwCrsrMoveState eTmpState( MV_SETONLYTEXT ); + SwCursorMoveState eTmpState( MV_SETONLYTEXT ); SwTextNode *pNode; SwWrongList *pWrong; - if( GetLayout()->GetCrsrOfst( &aPos, aPt, &eTmpState ) && + if( GetLayout()->GetCursorOfst( &aPos, aPt, &eTmpState ) && nullptr != (pNode = aPos.nNode.GetNode().GetTextNode()) && nullptr != (pWrong = pNode->GetWrong()) && !pNode->IsInProtectSect() ) @@ -892,9 +892,9 @@ uno::Reference< XSpellAlternatives > // save the start and end positions of the line and the starting point Push(); LeftMargin(); - const sal_Int32 nLineStart = GetCrsr()->GetPoint()->nContent.GetIndex(); + const sal_Int32 nLineStart = GetCursor()->GetPoint()->nContent.GetIndex(); RightMargin(); - const sal_Int32 nLineEnd = GetCrsr()->GetPoint()->nContent.GetIndex(); + const sal_Int32 nLineEnd = GetCursor()->GetPoint()->nContent.GetIndex(); Pop(false); // make sure the selection build later from the data below does @@ -911,9 +911,9 @@ uno::Reference< XSpellAlternatives > ++nRight; aPos.nContent = nBegin + nLeft; - pCrsr = GetCrsr(); - *pCrsr->GetPoint() = aPos; - pCrsr->SetMark(); + pCursor = GetCursor(); + *pCursor->GetPoint() = aPos; + pCursor->SetMark(); ExtendSelection( true, nLen - nLeft - nRight ); // don't determine the rectangle in the current line const sal_Int32 nWordStart = (nBegin + nLeft) < nLineStart ? nLineStart : nBegin + nLeft; @@ -921,19 +921,19 @@ uno::Reference< XSpellAlternatives > const sal_Int32 nWordEnd = (nBegin + nLen - nLeft - nRight) > nLineEnd ? nLineEnd : (nBegin + nLen - nLeft - nRight); Push(); - pCrsr->DeleteMark(); - SwIndex& rContent = GetCrsr()->GetPoint()->nContent; + pCursor->DeleteMark(); + SwIndex& rContent = GetCursor()->GetPoint()->nContent; rContent = nWordStart; SwRect aStartRect; - SwCrsrMoveState aState; + SwCursorMoveState aState; aState.m_bRealWidth = true; - SwContentNode* pContentNode = pCrsr->GetContentNode(); - SwContentFrm *pContentFrame = pContentNode->getLayoutFrm( GetLayout(), pPt, pCrsr->GetPoint(), false); + SwContentNode* pContentNode = pCursor->GetContentNode(); + SwContentFrame *pContentFrame = pContentNode->getLayoutFrame( GetLayout(), pPt, pCursor->GetPoint(), false); - pContentFrame->GetCharRect( aStartRect, *pCrsr->GetPoint(), &aState ); + pContentFrame->GetCharRect( aStartRect, *pCursor->GetPoint(), &aState ); rContent = nWordEnd - 1; SwRect aEndRect; - pContentFrame->GetCharRect( aEndRect, *pCrsr->GetPoint(),&aState ); + pContentFrame->GetCharRect( aEndRect, *pCursor->GetPoint(),&aState ); rSelectRect = aStartRect.Union( aEndRect ); Pop(false); } @@ -954,13 +954,13 @@ bool SwEditShell::GetGrammarCorrection( if( IsTableMode() ) return bRes; - SwPaM* pCrsr = GetCrsr(); - SwPosition aPos( *pCrsr->GetPoint() ); + SwPaM* pCursor = GetCursor(); + SwPosition aPos( *pCursor->GetPoint() ); Point aPt( *pPt ); - SwCrsrMoveState eTmpState( MV_SETONLYTEXT ); + SwCursorMoveState eTmpState( MV_SETONLYTEXT ); SwTextNode *pNode; SwGrammarMarkUp *pWrong; - if( GetLayout()->GetCrsrOfst( &aPos, aPt, &eTmpState ) && + if( GetLayout()->GetCursorOfst( &aPos, aPt, &eTmpState ) && nullptr != (pNode = aPos.nNode.GetNode().GetTextNode()) && nullptr != (pWrong = pNode->GetGrammarCheck()) && !pNode->IsInProtectSect() ) @@ -1016,9 +1016,9 @@ bool SwEditShell::GetGrammarCorrection( // save the start and end positions of the line and the starting point Push(); LeftMargin(); - const sal_Int32 nLineStart = GetCrsr()->GetPoint()->nContent.GetIndex(); + const sal_Int32 nLineStart = GetCursor()->GetPoint()->nContent.GetIndex(); RightMargin(); - const sal_Int32 nLineEnd = GetCrsr()->GetPoint()->nContent.GetIndex(); + const sal_Int32 nLineEnd = GetCursor()->GetPoint()->nContent.GetIndex(); Pop(false); // make sure the selection build later from the data below does @@ -1035,9 +1035,9 @@ bool SwEditShell::GetGrammarCorrection( ++nRight; aPos.nContent = nBegin + nLeft; - pCrsr = GetCrsr(); - *pCrsr->GetPoint() = aPos; - pCrsr->SetMark(); + pCursor = GetCursor(); + *pCursor->GetPoint() = aPos; + pCursor->SetMark(); ExtendSelection( true, nLen - nLeft - nRight ); // don't determine the rectangle in the current line const sal_Int32 nWordStart = (nBegin + nLeft) < nLineStart ? nLineStart : nBegin + nLeft; @@ -1045,19 +1045,19 @@ bool SwEditShell::GetGrammarCorrection( const sal_Int32 nWordEnd = (nBegin + nLen - nLeft - nRight) > nLineEnd ? nLineEnd : (nBegin + nLen - nLeft - nRight); Push(); - pCrsr->DeleteMark(); - SwIndex& rContent = GetCrsr()->GetPoint()->nContent; + pCursor->DeleteMark(); + SwIndex& rContent = GetCursor()->GetPoint()->nContent; rContent = nWordStart; SwRect aStartRect; - SwCrsrMoveState aState; + SwCursorMoveState aState; aState.m_bRealWidth = true; - SwContentNode* pContentNode = pCrsr->GetContentNode(); - SwContentFrm *pContentFrame = pContentNode->getLayoutFrm( GetLayout(), pPt, pCrsr->GetPoint(), false); + SwContentNode* pContentNode = pCursor->GetContentNode(); + SwContentFrame *pContentFrame = pContentNode->getLayoutFrame( GetLayout(), pPt, pCursor->GetPoint(), false); - pContentFrame->GetCharRect( aStartRect, *pCrsr->GetPoint(), &aState ); + pContentFrame->GetCharRect( aStartRect, *pCursor->GetPoint(), &aState ); rContent = nWordEnd - 1; SwRect aEndRect; - pContentFrame->GetCharRect( aEndRect, *pCrsr->GetPoint(),&aState ); + pContentFrame->GetCharRect( aEndRect, *pCursor->GetPoint(),&aState ); rSelectRect = aStartRect.Union( aEndRect ); Pop(false); } @@ -1134,7 +1134,7 @@ void SwEditShell::ApplyChangedSentence(const svx::SpellPortions& rNewPortions, b mpDoc->GetIDocumentUndoRedo().StartUndo( UNDO_UI_TEXT_CORRECTION, nullptr ); StartAction(); - SwPaM *pCrsr = GetCrsr(); + SwPaM *pCursor = GetCursor(); // save cursor position (which should be at the end of the current sentence) // for later restoration Push(); @@ -1171,10 +1171,10 @@ void SwEditShell::ApplyChangedSentence(const svx::SpellPortions& rNewPortions, b break; } } - if ( !pCrsr->HasMark() ) - pCrsr->SetMark(); - pCrsr->GetPoint()->nContent = aCurrentOldPosition->nLeft; - pCrsr->GetMark()->nContent = aCurrentOldPosition->nRight; + if ( !pCursor->HasMark() ) + pCursor->SetMark(); + pCursor->GetPoint()->nContent = aCurrentOldPosition->nLeft; + pCursor->GetMark()->nContent = aCurrentOldPosition->nRight; sal_uInt16 nScriptType = SvtLanguageOptions::GetI18NScriptTypeOfLanguage( aCurrentNewPortion->eLanguage ); sal_uInt16 nLangWhichId = RES_CHRATR_LANGUAGE; switch(nScriptType) @@ -1185,11 +1185,11 @@ void SwEditShell::ApplyChangedSentence(const svx::SpellPortions& rNewPortions, b if(aCurrentNewPortion->sText != aCurrentOldPortion->sText) { // change text ... - mpDoc->getIDocumentContentOperations().DeleteAndJoin(*pCrsr); + mpDoc->getIDocumentContentOperations().DeleteAndJoin(*pCursor); // ... and apply language if necessary if(aCurrentNewPortion->eLanguage != aCurrentOldPortion->eLanguage) SetAttrItem( SvxLanguageItem(aCurrentNewPortion->eLanguage, nLangWhichId) ); - mpDoc->getIDocumentContentOperations().InsertString(*pCrsr, aCurrentNewPortion->sText); + mpDoc->getIDocumentContentOperations().InsertString(*pCursor, aCurrentNewPortion->sText); } else if(aCurrentNewPortion->eLanguage != aCurrentOldPortion->eLanguage) { @@ -1199,7 +1199,7 @@ void SwEditShell::ApplyChangedSentence(const svx::SpellPortions& rNewPortions, b else if( aCurrentNewPortion->bIgnoreThisError ) { // add the 'ignore' markup to the TextNode's grammar ignore markup list - IgnoreGrammarErrorAt( *pCrsr ); + IgnoreGrammarErrorAt( *pCursor ); OSL_FAIL("TODO: add ignore mark to text node"); } if(aCurrentNewPortion == rNewPortions.begin()) @@ -1215,11 +1215,11 @@ void SwEditShell::ApplyChangedSentence(const svx::SpellPortions& rNewPortions, b SpellContentPositions::const_iterator aCurrentEndPosition = rLastPositions.end(); --aCurrentEndPosition; SpellContentPositions::const_iterator aCurrentStartPosition = rLastPositions.begin(); - pCrsr->GetPoint()->nContent = aCurrentStartPosition->nLeft; - pCrsr->GetMark()->nContent = aCurrentEndPosition->nRight; + pCursor->GetPoint()->nContent = aCurrentStartPosition->nLeft; + pCursor->GetMark()->nContent = aCurrentEndPosition->nRight; // delete the sentence completely - mpDoc->getIDocumentContentOperations().DeleteAndJoin(*pCrsr); + mpDoc->getIDocumentContentOperations().DeleteAndJoin(*pCursor); svx::SpellPortions::const_iterator aCurrentNewPortion = rNewPortions.begin(); while(aCurrentNewPortion != rNewPortions.end()) { @@ -1238,10 +1238,10 @@ void SwEditShell::ApplyChangedSentence(const svx::SpellPortions& rNewPortions, b if(rLang.GetLanguage() != aCurrentNewPortion->eLanguage) SetAttrItem( SvxLanguageItem(aCurrentNewPortion->eLanguage, nLangWhichId) ); // insert the new string - mpDoc->getIDocumentContentOperations().InsertString(*pCrsr, aCurrentNewPortion->sText); + mpDoc->getIDocumentContentOperations().InsertString(*pCursor, aCurrentNewPortion->sText); // set the cursor to the end of the inserted string - *pCrsr->Start() = *pCrsr->End(); + *pCursor->Start() = *pCursor->End(); ++aCurrentNewPortion; } } @@ -1252,14 +1252,14 @@ void SwEditShell::ApplyChangedSentence(const svx::SpellPortions& rNewPortions, b Pop( false ); // collapse cursor to the end of the modified sentence - *pCrsr->Start() = *pCrsr->End(); + *pCursor->Start() = *pCursor->End(); if (bRecheck) { // in grammar check the current sentence has to be checked again GoStartSentence(); } // set continuation position for spell/grammar checking to the end of this sentence - g_pSpellIter->SetCurr( new SwPosition(*pCrsr->Start()) ); + g_pSpellIter->SetCurr( new SwPosition(*pCursor->Start()) ); mpDoc->GetIDocumentUndoRedo().EndUndo( UNDO_UI_TEXT_CORRECTION, nullptr ); EndAction(); @@ -1275,9 +1275,9 @@ static SpellContentPositions lcl_CollectDeletedRedlines(SwEditShell* pSh) const bool bShowChg = IDocumentRedlineAccess::IsShowChanges( pDoc->getIDocumentRedlineAccess().GetRedlineMode() ); if ( bShowChg ) { - SwPaM *pCrsr = pSh->GetCrsr(); - const SwPosition* pStartPos = pCrsr->Start(); - const SwTextNode* pTextNode = pCrsr->GetNode().GetTextNode(); + SwPaM *pCursor = pSh->GetCursor(); + const SwPosition* pStartPos = pCursor->Start(); + const SwTextNode* pTextNode = pCursor->GetNode().GetTextNode(); sal_uInt16 nAct = pDoc->getIDocumentRedlineAccess().GetRedlinePos( *pTextNode, USHRT_MAX ); const sal_Int32 nStartIndex = pStartPos->nContent.GetIndex(); @@ -1312,8 +1312,8 @@ static void lcl_CutRedlines( SpellContentPositions& aDeletedRedlines, SwEditShel { if(!aDeletedRedlines.empty()) { - SwPaM *pCrsr = pSh->GetCrsr(); - const SwPosition* pEndPos = pCrsr->End(); + SwPaM *pCursor = pSh->GetCursor(); + const SwPosition* pEndPos = pCursor->End(); const sal_Int32 nEnd = pEndPos->nContent.GetIndex(); while(!aDeletedRedlines.empty() && aDeletedRedlines.back().nLeft > nEnd) @@ -1360,12 +1360,12 @@ bool SwSpellIter::SpellSentence(svx::SpellPortions& rPortions, bool bIsGrammarCh bool bGoOn = true; bool bGrammarErrorFound = false; do { - SwPaM *pCrsr = pMySh->GetCrsr(); - if ( !pCrsr->HasMark() ) - pCrsr->SetMark(); + SwPaM *pCursor = pMySh->GetCursor(); + if ( !pCursor->HasMark() ) + pCursor->SetMark(); - *pCrsr->GetPoint() = *GetCurr(); - *pCrsr->GetMark() = *GetEnd(); + *pCursor->GetPoint() = *GetCurr(); + *pCursor->GetMark() = *GetEnd(); if( bBackToStartOfSentence ) { @@ -1373,17 +1373,17 @@ bool SwSpellIter::SpellSentence(svx::SpellPortions& rPortions, bool bIsGrammarCh bBackToStartOfSentence = false; } uno::Any aSpellRet = - pMySh->GetDoc()->Spell(*pCrsr, + pMySh->GetDoc()->Spell(*pCursor, xSpeller, nullptr, nullptr, bIsGrammarCheck ); aSpellRet >>= xSpellRet; aSpellRet >>= aGrammarResult; - bGoOn = GetCrsrCnt() > 1; + bGoOn = GetCursorCnt() > 1; bGrammarErrorFound = aGrammarResult.aErrors.getLength() > 0; if( xSpellRet.is() || bGrammarErrorFound ) { bGoOn = false; - SwPosition* pNewPoint = new SwPosition( *pCrsr->GetPoint() ); - SwPosition* pNewMark = new SwPosition( *pCrsr->GetMark() ); + SwPosition* pNewPoint = new SwPosition( *pCursor->GetPoint() ); + SwPosition* pNewMark = new SwPosition( *pCursor->GetMark() ); SetCurr( pNewPoint ); SetCurrX( pNewMark ); @@ -1391,19 +1391,19 @@ bool SwSpellIter::SpellSentence(svx::SpellPortions& rPortions, bool bIsGrammarCh if( bGoOn ) { pMySh->Pop( false ); - pCrsr = pMySh->GetCrsr(); - if ( *pCrsr->GetPoint() > *pCrsr->GetMark() ) - pCrsr->Exchange(); - SwPosition* pNew = new SwPosition( *pCrsr->GetPoint() ); + pCursor = pMySh->GetCursor(); + if ( *pCursor->GetPoint() > *pCursor->GetMark() ) + pCursor->Exchange(); + SwPosition* pNew = new SwPosition( *pCursor->GetPoint() ); SetStart( pNew ); - pNew = new SwPosition( *pCrsr->GetMark() ); + pNew = new SwPosition( *pCursor->GetMark() ); SetEnd( pNew ); pNew = new SwPosition( *GetStart() ); SetCurr( pNew ); pNew = new SwPosition( *pNew ); SetCurrX( pNew ); - pCrsr->SetMark(); - --GetCrsrCnt(); + pCursor->SetMark(); + --GetCursorCnt(); } } while ( bGoOn ); @@ -1411,13 +1411,13 @@ bool SwSpellIter::SpellSentence(svx::SpellPortions& rPortions, bool bIsGrammarCh { // an error has been found // To fill the spell portions the beginning of the sentence has to be found - SwPaM *pCrsr = pMySh->GetCrsr(); + SwPaM *pCursor = pMySh->GetCursor(); // set the mark to the right if necessary - if ( *pCrsr->GetPoint() > *pCrsr->GetMark() ) - pCrsr->Exchange(); + if ( *pCursor->GetPoint() > *pCursor->GetMark() ) + pCursor->Exchange(); // the cursor has to be collapsed on the left to go to the start of the sentence - if sentence ends inside of the error - pCrsr->DeleteMark(); - pCrsr->SetMark(); + pCursor->DeleteMark(); + pCursor->SetMark(); bool bStartSent = pMySh->GoStartSentence(); SpellContentPositions aDeletedRedlines = lcl_CollectDeletedRedlines(pMySh); if(bStartSent) @@ -1426,33 +1426,33 @@ bool SwSpellIter::SpellSentence(svx::SpellPortions& rPortions, bool bIsGrammarCh AddPortion(nullptr, nullptr, aDeletedRedlines); } // Set the cursor to the error already found - *pCrsr->GetPoint() = *GetCurrX(); - *pCrsr->GetMark() = *GetCurr(); + *pCursor->GetPoint() = *GetCurrX(); + *pCursor->GetMark() = *GetCurr(); AddPortion(xSpellRet, &aGrammarResult, aDeletedRedlines); // save the end position of the error to continue from here - SwPosition aSaveStartPos = *pCrsr->End(); + SwPosition aSaveStartPos = *pCursor->End(); // determine the end of the current sentence - if ( *pCrsr->GetPoint() < *pCrsr->GetMark() ) - pCrsr->Exchange(); + if ( *pCursor->GetPoint() < *pCursor->GetMark() ) + pCursor->Exchange(); // again collapse to start marking after the end of the error - pCrsr->DeleteMark(); - pCrsr->SetMark(); + pCursor->DeleteMark(); + pCursor->SetMark(); pMySh->GoEndSentence(); if( bGrammarErrorFound ) { - const ModelToViewHelper aConversionMap(static_cast<SwTextNode&>(pCrsr->GetNode())); + const ModelToViewHelper aConversionMap(static_cast<SwTextNode&>(pCursor->GetNode())); OUString aExpandText = aConversionMap.getViewText(); sal_Int32 nSentenceEnd = aConversionMap.ConvertToViewPosition( aGrammarResult.nBehindEndOfSentencePosition ); // remove trailing space if( aExpandText[nSentenceEnd - 1] == ' ' ) --nSentenceEnd; - if( pCrsr->End()->nContent.GetIndex() < nSentenceEnd ) + if( pCursor->End()->nContent.GetIndex() < nSentenceEnd ) { - pCrsr->End()->nContent.Assign( - pCrsr->End()->nNode.GetNode().GetContentNode(), nSentenceEnd); + pCursor->End()->nContent.Assign( + pCursor->End()->nNode.GetNode().GetContentNode(), nSentenceEnd); } } @@ -1460,10 +1460,10 @@ bool SwSpellIter::SpellSentence(svx::SpellPortions& rPortions, bool bIsGrammarCh // save the 'global' end of the spellchecking const SwPosition aSaveEndPos = *GetEnd(); // set the sentence end as 'local' end - SetEnd( new SwPosition( *pCrsr->End() )); + SetEnd( new SwPosition( *pCursor->End() )); - *pCrsr->GetPoint() = aSaveStartPos; - *pCrsr->GetMark() = *GetEnd(); + *pCursor->GetPoint() = aSaveStartPos; + *pCursor->GetMark() = *GetEnd(); // now the rest of the sentence has to be searched for errors // for each error the non-error text between the current and the last error has // to be added to the portions - if necessary broken into same-language-portions @@ -1473,33 +1473,33 @@ bool SwSpellIter::SpellSentence(svx::SpellPortions& rPortions, bool bIsGrammarCh { xSpellRet = nullptr; // don't search for grammar errors here anymore! - pMySh->GetDoc()->Spell(*pCrsr, + pMySh->GetDoc()->Spell(*pCursor, xSpeller, nullptr, nullptr, false ) >>= xSpellRet; - if ( *pCrsr->GetPoint() > *pCrsr->GetMark() ) - pCrsr->Exchange(); - SetCurr( new SwPosition( *pCrsr->GetPoint() )); - SetCurrX( new SwPosition( *pCrsr->GetMark() )); + if ( *pCursor->GetPoint() > *pCursor->GetMark() ) + pCursor->Exchange(); + SetCurr( new SwPosition( *pCursor->GetPoint() )); + SetCurrX( new SwPosition( *pCursor->GetMark() )); // if an error has been found go back to the text preceding the error if(xSpellRet.is()) { - *pCrsr->GetPoint() = aSaveStartPos; - *pCrsr->GetMark() = *GetCurr(); + *pCursor->GetPoint() = aSaveStartPos; + *pCursor->GetMark() = *GetCurr(); } // add the portion AddPortion(nullptr, nullptr, aDeletedRedlines); if(xSpellRet.is()) { - *pCrsr->GetPoint() = *GetCurr(); - *pCrsr->GetMark() = *GetCurrX(); + *pCursor->GetPoint() = *GetCurr(); + *pCursor->GetMark() = *GetCurrX(); AddPortion(xSpellRet, nullptr, aDeletedRedlines); // move the cursor to the end of the error string - *pCrsr->GetPoint() = *GetCurrX(); + *pCursor->GetPoint() = *GetCurrX(); // and save the end of the error as new start position aSaveStartPos = *GetCurrX(); // and the end of the sentence - *pCrsr->GetMark() = *GetEnd(); + *pCursor->GetMark() = *GetEnd(); } // if the end of the sentence has already been reached then break here if(*GetCurrX() >= *GetEnd()) @@ -1512,18 +1512,18 @@ bool SwSpellIter::SpellSentence(svx::SpellPortions& rPortions, bool bIsGrammarCh // go to the end of sentence as the grammar check returned it // at this time the Point is behind the grammar error // and the mark points to the sentence end as - if ( *pCrsr->GetPoint() < *pCrsr->GetMark() ) - pCrsr->Exchange(); + if ( *pCursor->GetPoint() < *pCursor->GetMark() ) + pCursor->Exchange(); } // the part between the last error and the end of the sentence has to be added - *pMySh->GetCrsr()->GetPoint() = *GetEnd(); + *pMySh->GetCursor()->GetPoint() = *GetEnd(); if(*GetCurrX() < *GetEnd()) { AddPortion(nullptr, nullptr, aDeletedRedlines); } // set the shell cursor to the end of the sentence to prevent a visible selection - *pCrsr->GetMark() = *GetEnd(); + *pCursor->GetMark() = *GetEnd(); if( !bIsGrammarCheck ) { // set the current position to the end of the sentence @@ -1537,8 +1537,8 @@ bool SwSpellIter::SpellSentence(svx::SpellPortions& rPortions, bool bIsGrammarCh else { // if no error could be found the selection has to be corrected - at least if it's not in the body - *pMySh->GetCrsr()->GetPoint() = *GetEnd(); - pMySh->GetCrsr()->DeleteMark(); + *pMySh->GetCursor()->GetPoint() = *GetEnd(); + pMySh->GetCursor()->DeleteMark(); } return bRet; @@ -1605,9 +1605,9 @@ void SwSpellIter::CreatePortion(uno::Reference< XSpellAlternatives > xAlt, aPortion.bIsHidden = bIsHidden; aPortion.xAlternatives = xAlt; SpellContentPosition aPosition; - SwPaM *pCrsr = GetSh()->GetCrsr(); - aPosition.nLeft = pCrsr->Start()->nContent.GetIndex(); - aPosition.nRight = pCrsr->End()->nContent.GetIndex(); + SwPaM *pCursor = GetSh()->GetCursor(); + aPosition.nLeft = pCursor->Start()->nContent.GetIndex(); + aPosition.nRight = pCursor->End()->nContent.GetIndex(); aLastPortions.push_back(aPortion); aLastPositions.push_back(aPosition); } @@ -1628,16 +1628,16 @@ void SwSpellIter::AddPortion(uno::Reference< XSpellAlternatives > xAlt, } else { - SwPaM *pCrsr = GetSh()->GetCrsr(); - if ( *pCrsr->GetPoint() > *pCrsr->GetMark() ) - pCrsr->Exchange(); + SwPaM *pCursor = GetSh()->GetCursor(); + if ( *pCursor->GetPoint() > *pCursor->GetMark() ) + pCursor->Exchange(); // save the start and end positions - SwPosition aStart(*pCrsr->GetPoint()); - SwPosition aEnd(*pCrsr->GetMark()); + SwPosition aStart(*pCursor->GetPoint()); + SwPosition aEnd(*pCursor->GetMark()); // iterate over the text to find changes in language // set the mark equal to the point - *pCrsr->GetMark() = aStart; - SwTextNode* pTextNode = pCrsr->GetNode().GetTextNode(); + *pCursor->GetMark() = aStart; + SwTextNode* pTextNode = pCursor->GetNode().GetTextNode(); LanguageType eStartLanguage = lcl_GetLanguage(*GetSh()); SpellContentPosition aNextRedline = lcl_FindNextDeletedRedline( rDeletedRedlines, aStart.nContent.GetIndex() ); @@ -1646,14 +1646,14 @@ void SwSpellIter::AddPortion(uno::Reference< XSpellAlternatives > xAlt, // select until the end of the current redline const sal_Int32 nEnd = aEnd.nContent.GetIndex() < aNextRedline.nRight ? aEnd.nContent.GetIndex() : aNextRedline.nRight; - pCrsr->GetPoint()->nContent.Assign( pTextNode, nEnd ); + pCursor->GetPoint()->nContent.Assign( pTextNode, nEnd ); CreatePortion(xAlt, pGrammarResult, false, true); - aStart = *pCrsr->End(); + aStart = *pCursor->End(); // search for next redline aNextRedline = lcl_FindNextDeletedRedline( rDeletedRedlines, aStart.nContent.GetIndex() ); } - while(*pCrsr->GetPoint() < aEnd) + while(*pCursor->GetPoint() < aEnd) { // #125786 in table cell with fixed row height the cursor might not move forward if(!GetSh()->Right(1, CRSR_SKIP_CELLS)) @@ -1662,11 +1662,11 @@ void SwSpellIter::AddPortion(uno::Reference< XSpellAlternatives > xAlt, bool bField = false; // read the character at the current position to check if it's a field sal_Unicode const cChar = - pTextNode->GetText()[pCrsr->GetMark()->nContent.GetIndex()]; + pTextNode->GetText()[pCursor->GetMark()->nContent.GetIndex()]; if( CH_TXTATR_BREAKWORD == cChar || CH_TXTATR_INWORD == cChar) { const SwTextAttr* pTextAttr = pTextNode->GetTextAttrForCharAt( - pCrsr->GetMark()->nContent.GetIndex() ); + pCursor->GetMark()->nContent.GetIndex() ); const sal_uInt16 nWhich = pTextAttr ? pTextAttr->Which() : static_cast<sal_uInt16>(RES_TXTATR_END); @@ -1682,12 +1682,12 @@ void SwSpellIter::AddPortion(uno::Reference< XSpellAlternatives > xAlt, } else if (cChar == CH_TXT_ATR_FORMELEMENT) { - SwPosition aPos(*pCrsr->GetMark()); + SwPosition aPos(*pCursor->GetMark()); bField = pMySh->GetDoc()->getIDocumentMarkAccess()->getDropDownFor(aPos); } LanguageType eCurLanguage = lcl_GetLanguage(*GetSh()); - bool bRedline = aNextRedline.nLeft == pCrsr->GetPoint()->nContent.GetIndex(); + bool bRedline = aNextRedline.nLeft == pCursor->GetPoint()->nContent.GetIndex(); // create a portion if the next character // - is a field, // - is at the beginning of a deleted redline @@ -1699,41 +1699,41 @@ void SwSpellIter::AddPortion(uno::Reference< XSpellAlternatives > xAlt, // with a different language // in the case of redlining it's different if(eCurLanguage != eStartLanguage || bField) - *pCrsr->GetPoint() = *pCrsr->GetMark(); + *pCursor->GetPoint() = *pCursor->GetMark(); // set to the last start - *pCrsr->GetMark() = aStart; + *pCursor->GetMark() = aStart; // create portion should only be called if a selection exists // there's no selection if there's a field at the beginning - if(*pCrsr->Start() != *pCrsr->End()) + if(*pCursor->Start() != *pCursor->End()) CreatePortion(xAlt, pGrammarResult, false, false); - aStart = *pCrsr->End(); + aStart = *pCursor->End(); // now export the field - if there is any if(bField) { - *pCrsr->GetMark() = *pCrsr->GetPoint(); + *pCursor->GetMark() = *pCursor->GetPoint(); GetSh()->Right(1, CRSR_SKIP_CELLS); CreatePortion(xAlt, pGrammarResult, true, false); - aStart = *pCrsr->End(); + aStart = *pCursor->End(); } } // if a redline start then create a portion for it if(bRedline) { - *pCrsr->GetMark() = *pCrsr->GetPoint(); + *pCursor->GetMark() = *pCursor->GetPoint(); // select until the end of the current redline const sal_Int32 nEnd = aEnd.nContent.GetIndex() < aNextRedline.nRight ? aEnd.nContent.GetIndex() : aNextRedline.nRight; - pCrsr->GetPoint()->nContent.Assign( pTextNode, nEnd ); + pCursor->GetPoint()->nContent.Assign( pTextNode, nEnd ); CreatePortion(xAlt, pGrammarResult, false, true); - aStart = *pCrsr->End(); + aStart = *pCursor->End(); // search for next redline aNextRedline = lcl_FindNextDeletedRedline( rDeletedRedlines, aStart.nContent.GetIndex() ); } - *pCrsr->GetMark() = *pCrsr->GetPoint(); + *pCursor->GetMark() = *pCursor->GetPoint(); } - pCrsr->SetMark(); - *pCrsr->GetMark() = aStart; + pCursor->SetMark(); + *pCursor->GetMark() = aStart; CreatePortion(xAlt, pGrammarResult, false, false); } } @@ -1759,7 +1759,7 @@ void SwEditShell::IgnoreGrammarErrorAt( SwPaM& rErrorPosition ) pWrong = pNode->GetWrong(); if( pWrong ) pWrong->RemoveEntry( nStart, nEnd ); - SwTextFrm::repaintTextFrames( *pNode ); + SwTextFrame::repaintTextFrames( *pNode ); } ++aIdx; nStart = 0; diff --git a/sw/source/core/edit/ednumber.cxx b/sw/source/core/edit/ednumber.cxx index 2e862cd530fe..7a585db7bd58 100644 --- a/sw/source/core/edit/ednumber.cxx +++ b/sw/source/core/edit/ednumber.cxx @@ -130,18 +130,18 @@ bool SwEditShell::NoNum() bool bRet = true; StartAllAction(); - SwPaM* pCrsr = GetCrsr(); - if( pCrsr->GetNext() != pCrsr ) // Multiple selection? + SwPaM* pCursor = GetCursor(); + if( pCursor->GetNext() != pCursor ) // Multiple selection? { GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr ); - SwPamRanges aRangeArr( *pCrsr ); - SwPaM aPam( *pCrsr->GetPoint() ); + SwPamRanges aRangeArr( *pCursor ); + SwPaM aPam( *pCursor->GetPoint() ); for( size_t n = 0; n < aRangeArr.Count(); ++n ) bRet = bRet && GetDoc()->NoNum( aRangeArr.SetPam( n, aPam )); GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr ); } else - bRet = GetDoc()->NoNum( *pCrsr ); + bRet = GetDoc()->NoNum( *pCursor ); EndAllAction(); return bRet; @@ -151,10 +151,10 @@ bool SwEditShell::SelectionHasNumber() const { bool bResult = HasNumber(); const SwTextNode * pTextNd = - GetCrsr()->GetPoint()->nNode.GetNode().GetTextNode(); + GetCursor()->GetPoint()->nNode.GetNode().GetTextNode(); if (!bResult && pTextNd && pTextNd->Len()==0 && !pTextNd->GetNumRule()) { - SwPamRanges aRangeArr( *GetCrsr() ); - SwPaM aPam( *GetCrsr()->GetPoint() ); + SwPamRanges aRangeArr( *GetCursor() ); + SwPaM aPam( *GetCursor()->GetPoint() ); for( size_t n = 0; n < aRangeArr.Count(); ++n ) { aRangeArr.SetPam( n, aPam ); @@ -197,10 +197,10 @@ bool SwEditShell::SelectionHasBullet() const { bool bResult = HasBullet(); const SwTextNode * pTextNd = - GetCrsr()->GetPoint()->nNode.GetNode().GetTextNode(); + GetCursor()->GetPoint()->nNode.GetNode().GetTextNode(); if (!bResult && pTextNd && pTextNd->Len()==0 && !pTextNd->GetNumRule()) { - SwPamRanges aRangeArr( *GetCrsr() ); - SwPaM aPam( *GetCrsr()->GetPoint() ); + SwPamRanges aRangeArr( *GetCursor() ); + SwPaM aPam( *GetCursor()->GetPoint() ); for( size_t n = 0; n < aRangeArr.Count(); ++n ) { aRangeArr.SetPam( n, aPam ); @@ -236,7 +236,7 @@ bool SwEditShell::HasNumber() const bool bResult = false; const SwTextNode * pTextNd = - GetCrsr()->GetPoint()->nNode.GetNode().GetTextNode(); + GetCursor()->GetPoint()->nNode.GetNode().GetTextNode(); if (pTextNd) { @@ -259,7 +259,7 @@ bool SwEditShell::HasBullet() const bool bResult = false; const SwTextNode * pTextNd = - GetCrsr()->GetPoint()->nNode.GetNode().GetTextNode(); + GetCursor()->GetPoint()->nNode.GetNode().GetTextNode(); if (pTextNd) { @@ -275,12 +275,12 @@ void SwEditShell::DelNumRules() { StartAllAction(); - SwPaM* pCrsr = GetCrsr(); - if( pCrsr->IsMultiSelection() ) + SwPaM* pCursor = GetCursor(); + if( pCursor->IsMultiSelection() ) { GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr ); - SwPamRanges aRangeArr( *pCrsr ); - SwPaM aPam( *pCrsr->GetPoint() ); + SwPamRanges aRangeArr( *pCursor ); + SwPaM aPam( *pCursor->GetPoint() ); for( size_t n = 0; n < aRangeArr.Count(); ++n ) { GetDoc()->DelNumRules( aRangeArr.SetPam( n, aPam ) ); @@ -288,7 +288,7 @@ void SwEditShell::DelNumRules() GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr ); } else - GetDoc()->DelNumRules( *pCrsr ); + GetDoc()->DelNumRules( *pCursor ); // Call AttrChangeNotify on the UI-side. Should actually be redundant but there was a bug once. CallChgLnk(); @@ -306,14 +306,14 @@ bool SwEditShell::NumUpDown( bool bDown ) StartAllAction(); bool bRet = true; - SwPaM* pCrsr = GetCrsr(); - if( !pCrsr->IsMultiSelection() ) - bRet = GetDoc()->NumUpDown( *pCrsr, bDown ); + SwPaM* pCursor = GetCursor(); + if( !pCursor->IsMultiSelection() ) + bRet = GetDoc()->NumUpDown( *pCursor, bDown ); else { GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr ); - SwPamRanges aRangeArr( *pCrsr ); - SwPaM aPam( *pCrsr->GetPoint() ); + SwPamRanges aRangeArr( *pCursor ); + SwPaM aPam( *pCursor->GetPoint() ); for( size_t n = 0; n < aRangeArr.Count(); ++n ) bRet = bRet && GetDoc()->NumUpDown( aRangeArr.SetPam( n, aPam ), bDown ); GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr ); @@ -330,9 +330,9 @@ bool SwEditShell::NumUpDown( bool bDown ) return bRet; } -bool SwEditShell::IsFirstOfNumRuleAtCrsrPos() const +bool SwEditShell::IsFirstOfNumRuleAtCursorPos() const { - return SwDoc::IsFirstOfNumRuleAtPos( *GetCrsr()->GetPoint() ); + return SwDoc::IsFirstOfNumRuleAtPos( *GetCursor()->GetPoint() ); } // -> #i23725#, #i90078# @@ -340,7 +340,7 @@ void SwEditShell::ChangeIndentOfAllListLevels( const short nDiff ) { StartAllAction(); - const SwNumRule *pCurNumRule = GetNumRuleAtCurrCrsrPos(); + const SwNumRule *pCurNumRule = GetNumRuleAtCurrCursorPos(); if ( pCurNumRule != nullptr ) { SwNumRule aRule(*pCurNumRule); @@ -367,7 +367,7 @@ void SwEditShell::SetIndent(short nIndent, const SwPosition & rPos) if (pCurNumRule) { SwNumRule aRule(*pCurNumRule); - if ( !IsMultiSelection() && IsFirstOfNumRuleAtCrsrPos() ) + if ( !IsMultiSelection() && IsFirstOfNumRuleAtCursorPos() ) { aRule.SetIndentOfFirstListLevelAndChangeOthers( nIndent ); } @@ -393,15 +393,15 @@ bool SwEditShell::MoveParagraph( long nOffset ) { StartAllAction(); - SwPaM *pCrsr = GetCrsr(); - if( !pCrsr->HasMark() ) + SwPaM *pCursor = GetCursor(); + if( !pCursor->HasMark() ) { // Ensures that Bound1 and Bound2 are in the same Node - pCrsr->SetMark(); - pCrsr->DeleteMark(); + pCursor->SetMark(); + pCursor->DeleteMark(); } - bool bRet = GetDoc()->MoveParagraph( *pCrsr, nOffset ); + bool bRet = GetDoc()->MoveParagraph( *pCursor, nOffset ); GetDoc()->getIDocumentState().SetModified(); EndAllAction(); @@ -412,8 +412,8 @@ int SwEditShell::GetCurrentParaOutlineLevel( ) const { int nLevel = 0; - SwPaM* pCrsr = GetCrsr(); - const SwTextNode* pTextNd = pCrsr->GetNode().GetTextNode(); + SwPaM* pCursor = GetCursor(); + const SwTextNode* pTextNd = pCursor->GetNode().GetTextNode(); if( pTextNd ) nLevel = pTextNd->GetAttrOutlineLevel(); return nLevel; @@ -421,12 +421,12 @@ int SwEditShell::GetCurrentParaOutlineLevel( ) const void SwEditShell::GetCurrentOutlineLevels( sal_uInt8& rUpper, sal_uInt8& rLower ) { - SwPaM* pCrsr = GetCrsr(); - SwPaM aCrsr( *pCrsr->Start() ); - aCrsr.SetMark(); - if( pCrsr->HasMark() ) - *aCrsr.GetPoint() = *pCrsr->End(); - SwDoc::GotoNextNum( *aCrsr.GetPoint(), false, &rUpper, &rLower ); + SwPaM* pCursor = GetCursor(); + SwPaM aCursor( *pCursor->Start() ); + aCursor.SetMark(); + if( pCursor->HasMark() ) + *aCursor.GetPoint() = *pCursor->End(); + SwDoc::GotoNextNum( *aCursor.GetPoint(), false, &rUpper, &rLower ); } bool SwEditShell::MoveNumParas( bool bUpperLower, bool bUpperLeft ) @@ -434,16 +434,16 @@ bool SwEditShell::MoveNumParas( bool bUpperLower, bool bUpperLeft ) StartAllAction(); // On all selections? - SwPaM* pCrsr = GetCrsr(); - SwPaM aCrsr( *pCrsr->Start() ); - aCrsr.SetMark(); + SwPaM* pCursor = GetCursor(); + SwPaM aCursor( *pCursor->Start() ); + aCursor.SetMark(); - if( pCrsr->HasMark() ) - *aCrsr.GetPoint() = *pCrsr->End(); + if( pCursor->HasMark() ) + *aCursor.GetPoint() = *pCursor->End(); bool bRet = false; sal_uInt8 nUpperLevel, nLowerLevel; - if( SwDoc::GotoNextNum( *aCrsr.GetPoint(), false, + if( SwDoc::GotoNextNum( *aCursor.GetPoint(), false, &nUpperLevel, &nLowerLevel )) { if( bUpperLower ) @@ -454,10 +454,10 @@ bool SwEditShell::MoveNumParas( bool bUpperLower, bool bUpperLeft ) if( bUpperLeft ) // move up { - SwPosition aPos( *aCrsr.GetMark() ); + SwPosition aPos( *aCursor.GetMark() ); if( SwDoc::GotoPrevNum( aPos, false ) ) nOffset = aPos.nNode.GetIndex() - - aCrsr.GetMark()->nNode.GetIndex(); + aCursor.GetMark()->nNode.GetIndex(); else { sal_uLong nStt = aPos.nNode.GetIndex(), nIdx = nStt - 1; @@ -471,11 +471,11 @@ bool SwEditShell::MoveNumParas( bool bUpperLower, bool bUpperLeft ) } else // move down { - const SwNumRule* pOrig = aCrsr.GetNode(false).GetTextNode()->GetNumRule(); - if( aCrsr.GetNode().IsTextNode() && - pOrig == aCrsr.GetNode().GetTextNode()->GetNumRule() ) + const SwNumRule* pOrig = aCursor.GetNode(false).GetTextNode()->GetNumRule(); + if( aCursor.GetNode().IsTextNode() && + pOrig == aCursor.GetNode().GetTextNode()->GetNumRule() ) { - sal_uLong nStt = aCrsr.GetPoint()->nNode.GetIndex(), nIdx = nStt+1; + sal_uLong nStt = aCursor.GetPoint()->nNode.GetIndex(), nIdx = nStt+1; while (nIdx < GetDoc()->GetNodes().Count()-1) { @@ -506,14 +506,14 @@ bool SwEditShell::MoveNumParas( bool bUpperLower, bool bUpperLeft ) if( nOffset ) { - aCrsr.Move( fnMoveBackward, fnGoNode ); - bRet = GetDoc()->MoveParagraph( aCrsr, nOffset ); + aCursor.Move( fnMoveBackward, fnGoNode ); + bRet = GetDoc()->MoveParagraph( aCursor, nOffset ); } } else if( (bUpperLeft ? nUpperLevel : nLowerLevel+1) < MAXLEVEL ) { - aCrsr.Move( fnMoveBackward, fnGoNode ); - bRet = GetDoc()->NumUpDown( aCrsr, !bUpperLeft ); + aCursor.Move( fnMoveBackward, fnGoNode ); + bRet = GetDoc()->NumUpDown( aCursor, !bUpperLeft ); } } @@ -527,14 +527,14 @@ bool SwEditShell::OutlineUpDown( short nOffset ) StartAllAction(); bool bRet = true; - SwPaM* pCrsr = GetCrsr(); - if( !pCrsr->IsMultiSelection() ) - bRet = GetDoc()->OutlineUpDown( *pCrsr, nOffset ); + SwPaM* pCursor = GetCursor(); + if( !pCursor->IsMultiSelection() ) + bRet = GetDoc()->OutlineUpDown( *pCursor, nOffset ); else { GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr ); - SwPamRanges aRangeArr( *pCrsr ); - SwPaM aPam( *pCrsr->GetPoint() ); + SwPamRanges aRangeArr( *pCursor ); + SwPaM aPam( *pCursor->GetPoint() ); for( size_t n = 0; n < aRangeArr.Count(); ++n ) bRet = bRet && GetDoc()->OutlineUpDown( aRangeArr.SetPam( n, aPam ), nOffset ); @@ -548,7 +548,7 @@ bool SwEditShell::OutlineUpDown( short nOffset ) bool SwEditShell::MoveOutlinePara( short nOffset ) { StartAllAction(); - bool bRet = GetDoc()->MoveOutlinePara( *GetCrsr(), nOffset ); + bool bRet = GetDoc()->MoveOutlinePara( *GetCursor(), nOffset ); EndAllAction(); return bRet; } @@ -557,7 +557,7 @@ bool SwEditShell::MoveOutlinePara( short nOffset ) bool SwEditShell::IsProtectedOutlinePara() const { bool bRet = false; - const SwNode& rNd = GetCrsr()->Start()->nNode.GetNode(); + const SwNode& rNd = GetCursor()->Start()->nNode.GetNode(); if( rNd.IsTextNode() ) { const SwOutlineNodes& rOutlNd = GetDoc()->GetNodes().GetOutLineNds(); @@ -638,7 +638,7 @@ bool SwEditShell::NumOrNoNum( && ( !bChkStart || IsSttPara() ) ) { StartAllAction(); - bRet = GetDoc()->NumOrNoNum( GetCrsr()->GetPoint()->nNode, !bNumOn ); + bRet = GetDoc()->NumOrNoNum( GetCursor()->GetPoint()->nNode, !bNumOn ); EndAllAction(); } return bRet; @@ -653,7 +653,7 @@ bool SwEditShell::IsNoNum( bool bChkStart ) const && !HasSelection() && ( !bChkStart || IsSttPara() ) ) { - const SwTextNode* pTextNd = GetCrsr()->GetNode().GetTextNode(); + const SwTextNode* pTextNd = GetCursor()->GetNode().GetTextNode(); if ( pTextNd != nullptr ) { bResult = !pTextNd->IsCountedInList(); @@ -668,8 +668,8 @@ sal_uInt8 SwEditShell::GetNumLevel() const // return current level where the point of the cursor is sal_uInt8 nLevel = MAXLEVEL; - SwPaM* pCrsr = GetCrsr(); - const SwTextNode* pTextNd = pCrsr->GetNode().GetTextNode(); + SwPaM* pCursor = GetCursor(); + const SwTextNode* pTextNd = pCursor->GetNode().GetTextNode(); OSL_ENSURE( pTextNd, "GetNumLevel() without text node" ); if ( pTextNd == nullptr ) @@ -688,9 +688,9 @@ sal_uInt8 SwEditShell::GetNumLevel() const return nLevel; } -const SwNumRule* SwEditShell::GetNumRuleAtCurrCrsrPos() const +const SwNumRule* SwEditShell::GetNumRuleAtCurrCursorPos() const { - return SwDoc::GetNumRuleAtPos( *GetCrsr()->GetPoint() ); + return SwDoc::GetNumRuleAtPos( *GetCursor()->GetPoint() ); } const SwNumRule* SwEditShell::GetNumRuleAtCurrentSelection() const @@ -698,11 +698,11 @@ const SwNumRule* SwEditShell::GetNumRuleAtCurrentSelection() const const SwNumRule* pNumRuleAtCurrentSelection = nullptr; bool bDifferentNumRuleFound = false; - for(const SwPaM& rCurrentCrsr : GetCrsr()->GetRingContainer()) + for(const SwPaM& rCurrentCursor : GetCursor()->GetRingContainer()) { - const SwNodeIndex aEndNode = rCurrentCrsr.End()->nNode; + const SwNodeIndex aEndNode = rCurrentCursor.End()->nNode; - for ( SwNodeIndex aNode = rCurrentCrsr.Start()->nNode; aNode <= aEndNode; ++aNode ) + for ( SwNodeIndex aNode = rCurrentCursor.Start()->nNode; aNode <= aEndNode; ++aNode ) { const SwNumRule* pNumRule = SwDoc::GetNumRuleAtPos( SwPosition( aNode ) ); if ( pNumRule == nullptr ) @@ -739,11 +739,11 @@ void SwEditShell::SetCurNumRule( const SwNumRule& rRule, GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr ); - SwPaM* pCrsr = GetCrsr(); + SwPaM* pCursor = GetCursor(); if( IsMultiSelection() ) { - SwPamRanges aRangeArr( *pCrsr ); - SwPaM aPam( *pCrsr->GetPoint() ); + SwPamRanges aRangeArr( *pCursor ); + SwPaM aPam( *pCursor->GetPoint() ); OUString sContinuedListId(rContinuedListId); for( size_t n = 0; n < aRangeArr.Count(); ++n ) { @@ -765,10 +765,10 @@ void SwEditShell::SetCurNumRule( const SwNumRule& rRule, } else { - GetDoc()->SetNumRule( *pCrsr, rRule, + GetDoc()->SetNumRule( *pCursor, rRule, bCreateNewList, rContinuedListId, true, bResetIndentAttrs ); - GetDoc()->SetCounted( *pCrsr, true ); + GetDoc()->SetCounted( *pCursor, true ); } GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr ); @@ -790,7 +790,7 @@ void SwEditShell::ChgNumRuleFormats( const SwNumRule& rRule ) bool SwEditShell::ReplaceNumRule( const OUString& rOldRule, const OUString& rNewRule ) { StartAllAction(); - bool bRet = GetDoc()->ReplaceNumRule( *GetCrsr()->GetPoint(), rOldRule, rNewRule ); + bool bRet = GetDoc()->ReplaceNumRule( *GetCursor()->GetPoint(), rOldRule, rNewRule ); EndAllAction(); return bRet; } @@ -798,26 +798,26 @@ bool SwEditShell::ReplaceNumRule( const OUString& rOldRule, const OUString& rNew void SwEditShell::SetNumRuleStart( bool bFlag, SwPaM* pPaM ) { StartAllAction(); - SwPaM* pCrsr = pPaM ? pPaM : GetCrsr(); - if( pCrsr->IsMultiSelection() ) // multiple selection ? + SwPaM* pCursor = pPaM ? pPaM : GetCursor(); + if( pCursor->IsMultiSelection() ) // multiple selection ? { GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr ); - SwPamRanges aRangeArr( *pCrsr ); - SwPaM aPam( *pCrsr->GetPoint() ); + SwPamRanges aRangeArr( *pCursor ); + SwPaM aPam( *pCursor->GetPoint() ); for( size_t n = 0; n < aRangeArr.Count(); ++n ) GetDoc()->SetNumRuleStart( *aRangeArr.SetPam( n, aPam ).GetPoint(), bFlag ); GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr ); } else - GetDoc()->SetNumRuleStart( *pCrsr->GetPoint(), bFlag ); + GetDoc()->SetNumRuleStart( *pCursor->GetPoint(), bFlag ); EndAllAction(); } bool SwEditShell::IsNumRuleStart( SwPaM* pPaM ) const { - SwPaM* pCrsr = pPaM ? pPaM : GetCrsr( ); - const SwTextNode* pTextNd = pCrsr->GetNode().GetTextNode(); + SwPaM* pCursor = pPaM ? pPaM : GetCursor( ); + const SwTextNode* pTextNd = pCursor->GetNode().GetTextNode(); return pTextNd && pTextNd->IsListRestart(); } @@ -825,26 +825,26 @@ void SwEditShell::SetNodeNumStart( sal_uInt16 nStt, SwPaM* pPaM ) { StartAllAction(); - SwPaM* pCrsr = pPaM ? pPaM : GetCrsr(); - if( pCrsr->IsMultiSelection() ) // multiple selection ? + SwPaM* pCursor = pPaM ? pPaM : GetCursor(); + if( pCursor->IsMultiSelection() ) // multiple selection ? { GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr ); - SwPamRanges aRangeArr( *pCrsr ); - SwPaM aPam( *pCrsr->GetPoint() ); + SwPamRanges aRangeArr( *pCursor ); + SwPaM aPam( *pCursor->GetPoint() ); for( size_t n = 0; n < aRangeArr.Count(); ++n ) GetDoc()->SetNodeNumStart( *aRangeArr.SetPam( n, aPam ).GetPoint(), nStt ); GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr ); } else - GetDoc()->SetNodeNumStart( *pCrsr->GetPoint(), nStt ); + GetDoc()->SetNodeNumStart( *pCursor->GetPoint(), nStt ); EndAllAction(); } sal_uInt16 SwEditShell::GetNodeNumStart( SwPaM* pPaM ) const { - SwPaM* pCrsr = pPaM ? pPaM : GetCrsr(); - const SwTextNode* pTextNd = pCrsr->GetNode().GetTextNode(); + SwPaM* pCursor = pPaM ? pPaM : GetCursor(); + const SwTextNode* pTextNd = pCursor->GetNode().GetTextNode(); // correction: check, if list restart value is set at text node and // use new method <SwTextNode::GetAttrListRestartValue()>. // return USHRT_MAX, if no list restart value is found. @@ -861,7 +861,7 @@ const SwNumRule * SwEditShell::SearchNumRule( const bool bForward, int nNonEmptyAllowed, OUString& sListId ) { - return GetDoc()->SearchNumRule( *(bForward ? GetCrsr()->End() : GetCrsr()->Start()), + return GetDoc()->SearchNumRule( *(bForward ? GetCursor()->End() : GetCursor()->Start()), bForward, bNum, bOutline, nNonEmptyAllowed, sListId ); } diff --git a/sw/source/core/edit/edredln.cxx b/sw/source/core/edit/edredln.cxx index 769d872cbafc..79290dcad908 100644 --- a/sw/source/core/edit/edredln.cxx +++ b/sw/source/core/edit/edredln.cxx @@ -92,7 +92,7 @@ bool SwEditShell::AcceptRedlinesInSelection() { SET_CURR_SHELL( this ); StartAllAction(); - bool bRet = GetDoc()->getIDocumentRedlineAccess().AcceptRedline( *GetCrsr(), true ); + bool bRet = GetDoc()->getIDocumentRedlineAccess().AcceptRedline( *GetCursor(), true ); EndAllAction(); return bRet; } @@ -101,7 +101,7 @@ bool SwEditShell::RejectRedlinesInSelection() { SET_CURR_SHELL( this ); StartAllAction(); - bool bRet = GetDoc()->getIDocumentRedlineAccess().RejectRedline( *GetCrsr(), true ); + bool bRet = GetDoc()->getIDocumentRedlineAccess().RejectRedline( *GetCursor(), true ); EndAllAction(); return bRet; } @@ -110,7 +110,7 @@ bool SwEditShell::RejectRedlinesInSelection() bool SwEditShell::SetRedlineComment( const OUString& rS ) { bool bRet = false; - for(SwPaM& rPaM : GetCrsr()->GetRingContainer()) + for(SwPaM& rPaM : GetCursor()->GetRingContainer()) { bRet = bRet || GetDoc()->getIDocumentRedlineAccess().SetRedlineComment( rPaM, rS ); } @@ -120,7 +120,7 @@ bool SwEditShell::SetRedlineComment( const OUString& rS ) const SwRangeRedline* SwEditShell::GetCurrRedline() const { - return GetDoc()->getIDocumentRedlineAccess().GetRedline( *GetCrsr()->GetPoint(), nullptr ); + return GetDoc()->getIDocumentRedlineAccess().GetRedline( *GetCursor()->GetPoint(), nullptr ); } void SwEditShell::UpdateRedlineAttr() diff --git a/sw/source/core/edit/edsect.cxx b/sw/source/core/edit/edsect.cxx index 52b3cfa02511..f26d5484fd34 100644 --- a/sw/source/core/edit/edsect.cxx +++ b/sw/source/core/edit/edsect.cxx @@ -41,7 +41,7 @@ SwEditShell::InsertSection( StartAllAction(); GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_INSSECTION, nullptr ); - for(SwPaM& rPaM : GetCrsr()->GetRingContainer()) + for(SwPaM& rPaM : GetCursor()->GetRingContainer()) { SwSection const*const pNew = GetDoc()->InsertSwSection( rPaM, rNewData, nullptr, pAttr ); @@ -59,11 +59,11 @@ bool SwEditShell::IsInsRegionAvailable() const { if( IsTableMode() ) return false; - SwPaM* pCrsr = GetCrsr(); - if( pCrsr->GetNext() != pCrsr ) + SwPaM* pCursor = GetCursor(); + if( pCursor->GetNext() != pCursor ) return false; - if( pCrsr->HasMark() ) - return 0 != SwDoc::IsInsRegionAvailable( *pCrsr ); + if( pCursor->HasMark() ) + return 0 != SwDoc::IsInsRegionAvailable( *pCursor ); return true; } @@ -73,7 +73,7 @@ const SwSection* SwEditShell::GetCurrSection() const if( IsTableMode() ) return nullptr; - return SwDoc::GetCurrSection( *GetCrsr()->GetPoint() ); + return SwDoc::GetCurrSection( *GetCursor()->GetPoint() ); } /** Deliver the responsible area of the columns. @@ -82,28 +82,28 @@ const SwSection* SwEditShell::GetCurrSection() const */ SwSection* SwEditShell::GetAnySection( bool bOutOfTab, const Point* pPt ) { - SwFrm *pFrm; + SwFrame *pFrame; if ( pPt ) { - SwPosition aPos( *GetCrsr()->GetPoint() ); + SwPosition aPos( *GetCursor()->GetPoint() ); Point aPt( *pPt ); - GetLayout()->GetCrsrOfst( &aPos, aPt ); + GetLayout()->GetCursorOfst( &aPos, aPt ); SwContentNode *pNd = aPos.nNode.GetNode().GetContentNode(); - pFrm = pNd->getLayoutFrm( GetLayout(), pPt ); + pFrame = pNd->getLayoutFrame( GetLayout(), pPt ); } else - pFrm = GetCurrFrm( false ); + pFrame = GetCurrFrame( false ); - if( bOutOfTab && pFrm ) - pFrm = pFrm->FindTabFrm(); - if( pFrm && pFrm->IsInSct() ) + if( bOutOfTab && pFrame ) + pFrame = pFrame->FindTabFrame(); + if( pFrame && pFrame->IsInSct() ) { - SwSectionFrm* pSect = pFrm->FindSctFrm(); + SwSectionFrame* pSect = pFrame->FindSctFrame(); OSL_ENSURE( pSect, "GetAnySection: Where's my Sect?" ); if( pSect->IsInFootnote() && pSect->GetUpper()->IsInSct() ) { - pSect = pSect->GetUpper()->FindSctFrm(); - OSL_ENSURE( pSect, "GetAnySection: Where's my SectFrm?" ); + pSect = pSect->GetUpper()->FindSctFrame(); + OSL_ENSURE( pSect, "GetAnySection: Where's my SectFrame?" ); } return pSect->GetSection(); } @@ -181,7 +181,7 @@ void SwEditShell::SetSectionAttr( const SfxItemSet& rSet, { // for all section in the selection - for(SwPaM& rPaM : GetCrsr()->GetRingContainer()) + for(SwPaM& rPaM : GetCursor()->GetRingContainer()) { const SwPosition* pStt = rPaM.Start(), * pEnd = rPaM.End(); @@ -251,7 +251,7 @@ void SwEditShell::_SetSectionAttr( SwSectionFormat& rSectFormat, sal_uInt16 SwEditShell::GetFullSelectedSectionCount() const { sal_uInt16 nRet = 0; - for(SwPaM& rPaM : GetCrsr()->GetRingContainer()) + for(SwPaM& rPaM : GetCursor()->GetRingContainer()) { const SwPosition* pStt = rPaM.Start(), @@ -391,7 +391,7 @@ static const SwNode* lcl_SpecialInsertNode(const SwPosition* pCurrentPos) */ bool SwEditShell::CanSpecialInsert() const { - return nullptr != lcl_SpecialInsertNode( GetCrsr()->GetPoint() ); + return nullptr != lcl_SpecialInsertNode( GetCursor()->GetPoint() ); } /** check whether a node can be special-inserted (alt-Enter), and do so. Return @@ -402,7 +402,7 @@ bool SwEditShell::DoSpecialInsert() bool bRet = false; // get current node - SwPosition* pCursorPos = GetCrsr()->GetPoint(); + SwPosition* pCursorPos = GetCursor()->GetPoint(); const SwNode* pInsertNode = lcl_SpecialInsertNode( pCursorPos ); if( pInsertNode != nullptr ) { diff --git a/sw/source/core/edit/edtab.cxx b/sw/source/core/edit/edtab.cxx index ce789117b54b..6ff9ca6c8811 100644 --- a/sw/source/core/edit/edtab.cxx +++ b/sw/source/core/edit/edtab.cxx @@ -96,7 +96,7 @@ const SwTable& SwEditShell::InsertTable( const SwInsertTableOptions& rInsTableOp const SwTableAutoFormat* pTAFormat ) { StartAllAction(); - SwPosition* pPos = GetCrsr()->GetPoint(); + SwPosition* pPos = GetCursor()->GetPoint(); bool bEndUndo = 0 != pPos->nContent.GetIndex(); if( bEndUndo ) @@ -126,7 +126,7 @@ bool SwEditShell::TextToTable( const SwInsertTableOptions& rInsTableOpts, SwWait aWait( *GetDoc()->GetDocShell(), true ); bool bRet = false; StartAllAction(); - for(SwPaM& rPaM : GetCrsr()->GetRingContainer()) + for(SwPaM& rPaM : GetCursor()->GetRingContainer()) { if( rPaM.HasMark() ) bRet |= nullptr != GetDoc()->TextToTable( rInsTableOpts, rPaM, cCh, @@ -140,15 +140,15 @@ bool SwEditShell::TableToText( sal_Unicode cCh ) { SwWait aWait( *GetDoc()->GetDocShell(), true ); bool bRet = false; - SwPaM* pCrsr = GetCrsr(); + SwPaM* pCursor = GetCursor(); const SwTableNode* pTableNd = - GetDoc()->IsIdxInTable( pCrsr->GetPoint()->nNode ); + GetDoc()->IsIdxInTable( pCursor->GetPoint()->nNode ); if( IsTableMode() ) { ClearMark(); - pCrsr = GetCrsr(); + pCursor = GetCursor(); } - else if( !pTableNd || pCrsr->GetNext() != pCrsr ) + else if( !pTableNd || pCursor->GetNext() != pCursor ) return bRet; // TL_CHART2: @@ -159,25 +159,25 @@ bool SwEditShell::TableToText( sal_Unicode cCh ) // move current Cursor out of the listing area SwNodeIndex aTabIdx( *pTableNd ); - pCrsr->DeleteMark(); - pCrsr->GetPoint()->nNode = *pTableNd->EndOfSectionNode(); - pCrsr->GetPoint()->nContent.Assign( nullptr, 0 ); + pCursor->DeleteMark(); + pCursor->GetPoint()->nNode = *pTableNd->EndOfSectionNode(); + pCursor->GetPoint()->nContent.Assign( nullptr, 0 ); // move sPoint and Mark out of the area! - pCrsr->SetMark(); - pCrsr->DeleteMark(); + pCursor->SetMark(); + pCursor->DeleteMark(); //Modified for bug #i119954# Application crashed if undo/redo covert nest table to text StartUndo(); bRet = ConvertTableToText( pTableNd, cCh ); EndUndo(); //End for bug #i119954# - pCrsr->GetPoint()->nNode = aTabIdx; + pCursor->GetPoint()->nNode = aTabIdx; - SwContentNode* pCNd = pCrsr->GetContentNode(); + SwContentNode* pCNd = pCursor->GetContentNode(); if( !pCNd ) - pCrsr->Move( fnMoveForward, fnGoContent ); + pCursor->Move( fnMoveForward, fnGoContent ); else - pCrsr->GetPoint()->nContent.Assign( pCNd, 0 ); + pCursor->GetPoint()->nContent.Assign( pCNd, 0 ); EndAllAction(); return bRet; @@ -186,7 +186,7 @@ bool SwEditShell::TableToText( sal_Unicode cCh ) bool SwEditShell::IsTextToTableAvailable() const { bool bOnlyText = false; - for(SwPaM& rPaM : GetCrsr()->GetRingContainer()) + for(SwPaM& rPaM : GetCursor()->GetRingContainer()) { if( rPaM.HasMark() && *rPaM.GetPoint() != *rPaM.GetMark() ) { @@ -217,7 +217,7 @@ void SwEditShell::InsertDDETable( const SwInsertTableOptions& rInsTableOpts, sal_uInt16 nRows, sal_uInt16 nCols, sal_Int16 eAdj ) { - SwPosition* pPos = GetCrsr()->GetPoint(); + SwPosition* pPos = GetCursor()->GetPoint(); StartAllAction(); @@ -247,7 +247,7 @@ void SwEditShell::InsertDDETable( const SwInsertTableOptions& rInsTableOpts, /** update fields of a listing */ void SwEditShell::UpdateTable() { - const SwTableNode* pTableNd = IsCrsrInTable(); + const SwTableNode* pTableNd = IsCursorInTable(); // Keine Arme keine Kekse if( pTableNd ) @@ -269,7 +269,7 @@ void SwEditShell::UpdateTable() TableChgMode SwEditShell::GetTableChgMode() const { TableChgMode eMode; - const SwTableNode* pTableNd = IsCrsrInTable(); + const SwTableNode* pTableNd = IsCursorInTable(); if( pTableNd ) eMode = pTableNd->GetTable().GetTableChgMode(); else @@ -279,7 +279,7 @@ TableChgMode SwEditShell::GetTableChgMode() const void SwEditShell::SetTableChgMode( TableChgMode eMode ) { - const SwTableNode* pTableNd = IsCrsrInTable(); + const SwTableNode* pTableNd = IsCursorInTable(); if( pTableNd ) { @@ -300,13 +300,13 @@ bool SwEditShell::GetTableBoxFormulaAttrs( SfxItemSet& rSet ) const else { do { - SwFrm *pFrm = GetCurrFrm(); + SwFrame *pFrame = GetCurrFrame(); do { - pFrm = pFrm->GetUpper(); - } while ( pFrm && !pFrm->IsCellFrm() ); - if ( pFrm ) + pFrame = pFrame->GetUpper(); + } while ( pFrame && !pFrame->IsCellFrame() ); + if ( pFrame ) { - SwTableBox *pBox = const_cast<SwTableBox*>(static_cast<const SwTableBox*>(static_cast<SwCellFrm*>(pFrm)->GetTabBox())); + SwTableBox *pBox = const_cast<SwTableBox*>(static_cast<const SwTableBox*>(static_cast<SwCellFrame*>(pFrame)->GetTabBox())); aBoxes.insert( pBox ); } } while( false ); @@ -342,13 +342,13 @@ void SwEditShell::SetTableBoxFormulaAttrs( const SfxItemSet& rSet ) else { do { - SwFrm *pFrm = GetCurrFrm(); + SwFrame *pFrame = GetCurrFrame(); do { - pFrm = pFrm->GetUpper(); - } while ( pFrm && !pFrm->IsCellFrm() ); - if ( pFrm ) + pFrame = pFrame->GetUpper(); + } while ( pFrame && !pFrame->IsCellFrame() ); + if ( pFrame ) { - SwTableBox *pBox = const_cast<SwTableBox*>(static_cast<const SwTableBox*>(static_cast<SwCellFrm*>(pFrm)->GetTabBox())); + SwTableBox *pBox = const_cast<SwTableBox*>(static_cast<const SwTableBox*>(static_cast<SwCellFrame*>(pFrame)->GetTabBox())); aBoxes.insert( pBox ); } } while( false ); @@ -375,12 +375,12 @@ bool SwEditShell::IsTableBoxTextFormat() const const SwTableBox *pBox = nullptr; { - SwFrm *pFrm = GetCurrFrm(); + SwFrame *pFrame = GetCurrFrame(); do { - pFrm = pFrm->GetUpper(); - } while ( pFrm && !pFrm->IsCellFrm() ); - if ( pFrm ) - pBox = static_cast<const SwTableBox*>(static_cast<SwCellFrm*>(pFrm)->GetTabBox()); + pFrame = pFrame->GetUpper(); + } while ( pFrame && !pFrame->IsCellFrame() ); + if ( pFrame ) + pBox = static_cast<const SwTableBox*>(static_cast<SwCellFrame*>(pFrame)->GetTabBox()); } if( !pBox ) @@ -415,12 +415,12 @@ OUString SwEditShell::GetTableBoxText() const { const SwTableBox *pBox = nullptr; { - SwFrm *pFrm = GetCurrFrm(); + SwFrame *pFrame = GetCurrFrame(); do { - pFrm = pFrm->GetUpper(); - } while ( pFrm && !pFrm->IsCellFrm() ); - if ( pFrm ) - pBox = static_cast<const SwTableBox*>(static_cast<SwCellFrm*>(pFrm)->GetTabBox()); + pFrame = pFrame->GetUpper(); + } while ( pFrame && !pFrame->IsCellFrame() ); + if ( pFrame ) + pBox = static_cast<const SwTableBox*>(static_cast<SwCellFrame*>(pFrame)->GetTabBox()); } sal_uLong nNd; @@ -433,13 +433,13 @@ OUString SwEditShell::GetTableBoxText() const bool SwEditShell::SplitTable( sal_uInt16 eMode ) { bool bRet = false; - SwPaM *pCrsr = GetCrsr(); - if( pCrsr->GetNode().FindTableNode() ) + SwPaM *pCursor = GetCursor(); + if( pCursor->GetNode().FindTableNode() ) { StartAllAction(); GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, nullptr); - bRet = GetDoc()->SplitTable( *pCrsr->GetPoint(), eMode, true ); + bRet = GetDoc()->SplitTable( *pCursor->GetPoint(), eMode, true ); GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, nullptr); ClearFEShellTabCols(); @@ -451,13 +451,13 @@ bool SwEditShell::SplitTable( sal_uInt16 eMode ) bool SwEditShell::MergeTable( bool bWithPrev, sal_uInt16 nMode ) { bool bRet = false; - SwPaM *pCrsr = GetCrsr(); - if( pCrsr->GetNode().FindTableNode() ) + SwPaM *pCursor = GetCursor(); + if( pCursor->GetNode().FindTableNode() ) { StartAllAction(); GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, nullptr); - bRet = GetDoc()->MergeTable( *pCrsr->GetPoint(), bWithPrev, nMode ); + bRet = GetDoc()->MergeTable( *pCursor->GetPoint(), bWithPrev, nMode ); GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, nullptr); ClearFEShellTabCols(); @@ -469,8 +469,8 @@ bool SwEditShell::MergeTable( bool bWithPrev, sal_uInt16 nMode ) bool SwEditShell::CanMergeTable( bool bWithPrev, bool* pChkNxtPrv ) const { bool bRet = false; - const SwPaM *pCrsr = GetCrsr(); - const SwTableNode* pTableNd = pCrsr->GetNode().FindTableNode(); + const SwPaM *pCursor = GetCursor(); + const SwTableNode* pTableNd = pCursor->GetNode().FindTableNode(); if( pTableNd && dynamic_cast< const SwDDETable* >(&pTableNd->GetTable()) == nullptr) { bool bNew = pTableNd->GetTable().IsNewModel(); @@ -515,7 +515,7 @@ bool SwEditShell::CanMergeTable( bool bWithPrev, bool* pChkNxtPrv ) const /** create InsertDB as table Undo */ void SwEditShell::AppendUndoForInsertFromDB( bool bIsTable ) { - GetDoc()->AppendUndoForInsertFromDB( *GetCrsr(), bIsTable ); + GetDoc()->AppendUndoForInsertFromDB( *GetCursor(), bIsTable ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/edit/edtox.cxx b/sw/source/core/edit/edtox.cxx index 630a3ac3ab93..3935c67853cd 100644 --- a/sw/source/core/edit/edtox.cxx +++ b/sw/source/core/edit/edtox.cxx @@ -60,7 +60,7 @@ void SwEditShell::Insert(const SwTOXMark& rMark) { bool bInsAtPos = rMark.IsAlternativeText(); StartAllAction(); - for(SwPaM& rPaM : GetCrsr()->GetRingContainer()) + for(SwPaM& rPaM : GetCursor()->GetRingContainer()) { const SwPosition *pStt = rPaM.Start(), *pEnd = rPaM.End(); @@ -92,7 +92,7 @@ void SwEditShell::DeleteTOXMark( SwTOXMark* pMark ) /// Collect all listing markers sal_uInt16 SwEditShell::GetCurTOXMarks(SwTOXMarks& rMarks) const { - return SwDoc::GetCurTOXMark( *GetCrsr()->Start(), rMarks ); + return SwDoc::GetCurTOXMark( *GetCursor()->Start(), rMarks ); } bool SwEditShell::IsTOXBaseReadonly(const SwTOXBase& rTOXBase) @@ -136,7 +136,7 @@ void SwEditShell::InsertTableOf( const SwTOXBase& rTOX, const SfxItemSet* pSet ) // Insert listing const SwTOXBaseSection* pTOX = mpDoc->InsertTableOf( - *GetCrsr()->GetPoint(), rTOX, pSet, true ); + *GetCursor()->GetPoint(), rTOX, pSet, true ); OSL_ENSURE(pTOX, "No current TOx"); // start formatting @@ -145,7 +145,7 @@ void SwEditShell::InsertTableOf( const SwTOXBase& rTOX, const SfxItemSet* pSet ) // insert page numbering const_cast<SwTOXBaseSection*>(pTOX)->UpdatePageNum(); - pTOX->SetPosAtStartEnd( *GetCrsr()->GetPoint() ); + pTOX->SetPosAtStartEnd( *GetCursor()->GetPoint() ); // Fix for empty listing InvalidateWindows( maVisArea ); @@ -180,7 +180,7 @@ bool SwEditShell::UpdateTableOf( const SwTOXBase& rTOX, const SfxItemSet* pSet ) // correct Cursor if( bInIndex ) - pTOX->SetPosAtStartEnd( *GetCrsr()->GetPoint() ); + pTOX->SetPosAtStartEnd( *GetCursor()->GetPoint() ); // start formatting CalcLayout(); @@ -199,7 +199,7 @@ bool SwEditShell::UpdateTableOf( const SwTOXBase& rTOX, const SfxItemSet* pSet ) /// Get current listing before or at the Cursor const SwTOXBase* SwEditShell::GetCurTOX() const { - return SwDoc::GetCurTOX( *GetCrsr()->GetPoint() ); + return SwDoc::GetCurTOX( *GetCursor()->GetPoint() ); } bool SwEditShell::DeleteTOX( const SwTOXBase& rTOXBase, bool bDelNodes ) diff --git a/sw/source/core/edit/edundo.cxx b/sw/source/core/edit/edundo.cxx index 1a6f18be7f7d..ed40e7c450b2 100644 --- a/sw/source/core/edit/edundo.cxx +++ b/sw/source/core/edit/edundo.cxx @@ -68,17 +68,17 @@ void SwEditShell::HandleUndoRedoContext(::sw::UndoRedoContext & rContext) else { Point aPt; - SwFlyFrm *const pFly = - static_cast<SwFlyFrameFormat*>(pSelFormat)->GetFrm(& aPt); + SwFlyFrame *const pFly = + static_cast<SwFlyFrameFormat*>(pSelFormat)->GetFrame(& aPt); if (pFly) { // fdo#36681: Invalidate the content and layout to refresh // the picture anchoring properly - SwPageFrm* pPageFrm = pFly->FindPageFrmOfAnchor(); - pPageFrm->InvalidateFlyLayout(); - pPageFrm->InvalidateContent(); + SwPageFrame* pPageFrame = pFly->FindPageFrameOfAnchor(); + pPageFrame->InvalidateFlyLayout(); + pPageFrame->InvalidateContent(); - static_cast<SwFEShell*>(this)->SelectFlyFrm(*pFly, true); + static_cast<SwFEShell*>(this)->SelectFlyFrame(*pFly, true); } } } @@ -86,11 +86,11 @@ void SwEditShell::HandleUndoRedoContext(::sw::UndoRedoContext & rContext) { lcl_SelectSdrMarkList( this, pMarkList ); } - else if (GetCrsr()->GetNext() != GetCrsr()) + else if (GetCursor()->GetNext() != GetCursor()) { // current cursor is the last one: // go around the ring, to the first cursor - GoNextCrsr(); + GoNextCursor(); } } @@ -114,7 +114,7 @@ bool SwEditShell::Undo(sal_uInt16 const nCount) // the same position for autoformat or autocorrection SwUndoId nLastUndoId(UNDO_EMPTY); GetLastUndoInfo(nullptr, & nLastUndoId); - const bool bRestoreCrsr = nCount == 1 + const bool bRestoreCursor = nCount == 1 && ( UNDO_AUTOFORMAT == nLastUndoId || UNDO_AUTOCORRECT == nLastUndoId || UNDO_SETDEFTATTR == nLastUndoId ); @@ -136,11 +136,11 @@ bool SwEditShell::Undo(sal_uInt16 const nCount) "SwEditShell::Undo(): exception caught: " << e.Message); } - if (bRestoreCrsr) + if (bRestoreCursor) { // fdo#39003 Pop does not touch the rest of the cursor ring KillPams(); // so call this first to get rid of unwanted cursors } - Pop( !bRestoreCrsr ); + Pop( !bRestoreCursor ); GetDoc()->getIDocumentRedlineAccess().SetRedlineMode( eOld ); GetDoc()->getIDocumentRedlineAccess().CompressRedlines(); @@ -173,7 +173,7 @@ bool SwEditShell::Redo(sal_uInt16 const nCount) SwUndoId nFirstRedoId(UNDO_EMPTY); GetDoc()->GetIDocumentUndoRedo().GetFirstRedoInfo(nullptr, & nFirstRedoId); - const bool bRestoreCrsr = nCount == 1 && UNDO_SETDEFTATTR == nFirstRedoId; + const bool bRestoreCursor = nCount == 1 && UNDO_SETDEFTATTR == nFirstRedoId; Push(); // Destroy stored TableBoxPtr. A dection is only permitted for the new "Box"! @@ -192,7 +192,7 @@ bool SwEditShell::Redo(sal_uInt16 const nCount) "SwEditShell::Redo(): exception caught: " << e.Message); } - Pop( !bRestoreCrsr ); + Pop( !bRestoreCursor ); GetDoc()->getIDocumentRedlineAccess().SetRedlineMode( eOld ); GetDoc()->getIDocumentRedlineAccess().CompressRedlines(); @@ -214,7 +214,7 @@ bool SwEditShell::Repeat(sal_uInt16 const nCount) StartAllAction(); try { - ::sw::RepeatContext context(*GetDoc(), *GetCrsr()); + ::sw::RepeatContext context(*GetDoc(), *GetCursor()); bRet = GetDoc()->GetIDocumentUndoRedo().Repeat( context, nCount ) || bRet; } catch (const css::uno::Exception & e) { diff --git a/sw/source/core/edit/edws.cxx b/sw/source/core/edit/edws.cxx index 7c8bf15d00ae..e2376eaf02bf 100644 --- a/sw/source/core/edit/edws.cxx +++ b/sw/source/core/edit/edws.cxx @@ -33,12 +33,12 @@ // masqueraded copy constructor SwEditShell::SwEditShell( SwEditShell& rEdSH, vcl::Window *pWindow ) - : SwCrsrShell( rEdSH, pWindow ) + : SwCursorShell( rEdSH, pWindow ) { } SwEditShell::SwEditShell( SwDoc& rDoc, vcl::Window *pWindow, const SwViewOption *pOptions ) - : SwCrsrShell( rDoc, pWindow, pOptions ) + : SwCursorShell( rDoc, pWindow, pOptions ) { GetDoc()->GetIDocumentUndoRedo().DoUndo(true); } @@ -114,7 +114,7 @@ sal_uInt16 SwEditShell::GetCntType() const if( IsTableMode() ) nRet = CNT_TXT; else - switch( GetCrsr()->GetNode().GetNodeType() ) + switch( GetCursor()->GetNode().GetNodeType() ) { case ND_TEXTNODE: nRet = CNT_TXT; break; case ND_GRFNODE: nRet = CNT_GRF; break; @@ -161,17 +161,17 @@ SwActContext::~SwActContext() SwMvContext::SwMvContext(SwEditShell *pShell) : m_rShell(*pShell) { - m_rShell.SttCrsrMove(); + m_rShell.SttCursorMove(); } SwMvContext::~SwMvContext() { - m_rShell.EndCrsrMove(); + m_rShell.EndCursorMove(); } SwFrameFormat *SwEditShell::GetTableFormat() // fastest test on a table { - const SwTableNode* pTableNd = IsCrsrInTable(); + const SwTableNode* pTableNd = IsCursorInTable(); return pTableNd ? static_cast<SwFrameFormat*>(pTableNd->GetTable().GetFrameFormat()) : nullptr; } @@ -241,17 +241,17 @@ void SwEditShell::AutoCorrect( SvxAutoCorrect& rACorr, bool bInsert, StartAllAction(); - SwPaM* pCrsr = getShellCrsr( true ); - SwTextNode* pTNd = pCrsr->GetNode().GetTextNode(); + SwPaM* pCursor = getShellCursor( true ); + SwTextNode* pTNd = pCursor->GetNode().GetTextNode(); - SwAutoCorrDoc aSwAutoCorrDoc( *this, *pCrsr, cChar ); + SwAutoCorrDoc aSwAutoCorrDoc( *this, *pCursor, cChar ); // FIXME: this _must_ be called with reference to the actual node text! OUString const& rNodeText(pTNd->GetText()); rACorr.DoAutoCorrect( aSwAutoCorrDoc, - rNodeText, pCrsr->GetPoint()->nContent.GetIndex(), + rNodeText, pCursor->GetPoint()->nContent.GetIndex(), cChar, bInsert, GetWin() ); if( cChar ) - SaveTableBoxContent( pCrsr->GetPoint() ); + SaveTableBoxContent( pCursor->GetPoint() ); EndAllAction(); } @@ -265,12 +265,12 @@ bool SwEditShell::GetPrevAutoCorrWord( SvxAutoCorrect& rACorr, OUString& rWord ) SET_CURR_SHELL( this ); bool bRet; - SwPaM* pCrsr = getShellCrsr( true ); - const sal_Int32 nPos = pCrsr->GetPoint()->nContent.GetIndex(); - SwTextNode* pTNd = pCrsr->GetNode().GetTextNode(); + SwPaM* pCursor = getShellCursor( true ); + const sal_Int32 nPos = pCursor->GetPoint()->nContent.GetIndex(); + SwTextNode* pTNd = pCursor->GetNode().GetTextNode(); if( pTNd && nPos ) { - SwAutoCorrDoc aSwAutoCorrDoc( *this, *pCrsr, 0 ); + SwAutoCorrDoc aSwAutoCorrDoc( *this, *pCursor, 0 ); bRet = rACorr.GetPrevAutoCorrWord( aSwAutoCorrDoc, pTNd->GetText(), nPos, rWord ); } diff --git a/sw/source/core/fields/authfld.cxx b/sw/source/core/fields/authfld.cxx index 6ce9a3fa4ac5..e92383cfc5cf 100644 --- a/sw/source/core/fields/authfld.cxx +++ b/sw/source/core/fields/authfld.cxx @@ -260,16 +260,16 @@ sal_uInt16 SwAuthorityFieldType::GetSequencePos(sal_IntPtr nHandle) const SwTextNode& rFieldTextNode = pTextField->GetTextNode(); SwPosition aFieldPos(rFieldTextNode); SwDoc& rDoc = *const_cast<SwDoc*>(rFieldTextNode.GetDoc()); - SwContentFrm *pFrm = rFieldTextNode.getLayoutFrm( rDoc.getIDocumentLayoutAccess().GetCurrentLayout() ); + SwContentFrame *pFrame = rFieldTextNode.getLayoutFrame( rDoc.getIDocumentLayoutAccess().GetCurrentLayout() ); const SwTextNode* pTextNode = nullptr; - if(pFrm && !pFrm->IsInDocBody()) - pTextNode = GetBodyTextNode( rDoc, aFieldPos, *pFrm ); + if(pFrame && !pFrame->IsInDocBody()) + pTextNode = GetBodyTextNode( rDoc, aFieldPos, *pFrame ); //if no text node could be found or the field is in the document //body the directly available text node will be used if(!pTextNode) pTextNode = &rFieldTextNode; if (!pTextNode->GetText().isEmpty() && - pTextNode->getLayoutFrm( rDoc.getIDocumentLayoutAccess().GetCurrentLayout() ) && + pTextNode->getLayoutFrame( rDoc.getIDocumentLayoutAccess().GetCurrentLayout() ) && pTextNode->GetNodes().IsDocNodes() ) { SwTOXAuthority* pNew = new SwTOXAuthority( *pTextNode, diff --git a/sw/source/core/fields/cellfml.cxx b/sw/source/core/fields/cellfml.cxx index 5ef6d3ff8bb3..7b5ff1a1232b 100644 --- a/sw/source/core/fields/cellfml.cxx +++ b/sw/source/core/fields/cellfml.cxx @@ -54,7 +54,7 @@ enum } -static const SwFrm* lcl_GetBoxFrm( const SwTableBox& rBox ); +static const SwFrame* lcl_GetBoxFrame( const SwTableBox& rBox ); static sal_Int32 lcl_GetLongBoxNum( OUString& rStr ); static const SwTableBox* lcl_RelToBox( const SwTable& rTable, const SwTableBox* pRefBox, @@ -91,13 +91,13 @@ double SwTableBox::GetValue( SwTableCalcPara& rCalcPara ) const // Does it create a recursion? SwTableBox* pBox = const_cast<SwTableBox*>(this); - if( rCalcPara.pBoxStk->find( pBox ) != rCalcPara.pBoxStk->end() ) + if( rCalcPara.pBoxStack->find( pBox ) != rCalcPara.pBoxStack->end() ) return nRet; // already on the stack: error // re-start with this box rCalcPara.SetLastTableBox( this ); - rCalcPara.pBoxStk->insert( pBox ); // add + rCalcPara.pBoxStack->insert( pBox ); // add do { // Middle-Check-Loop, so that we can jump from here. Used so that the box pointer // will be removed from stack at the end. SwDoc* pDoc = GetFrameFormat()->GetDoc(); @@ -237,7 +237,7 @@ double SwTableBox::GetValue( SwTableCalcPara& rCalcPara ) const if( !rCalcPara.IsStackOverflow() ) { - rCalcPara.pBoxStk->erase( pBox ); // remove from stack + rCalcPara.pBoxStack->erase( pBox ); // remove from stack rCalcPara.DecStackCnt(); } @@ -254,12 +254,12 @@ SwTableCalcPara::SwTableCalcPara( SwCalc& rCalculator, const SwTable& rTable ) : pLastTableBox( nullptr ), nStackCnt( 0 ), nMaxSize( cMAXSTACKSIZE ), rCalc( rCalculator ), pTable( &rTable ) { - pBoxStk = new SwTableSortBoxes; + pBoxStack = new SwTableSortBoxes; } SwTableCalcPara::~SwTableCalcPara() { - delete pBoxStk; + delete pBoxStack; } bool SwTableCalcPara::CalcWithStackOverflow() @@ -276,7 +276,7 @@ bool SwTableCalcPara::CalcWithStackOverflow() rCalc.SetCalcError( CALC_NOERR ); aStackOverflows.insert( aStackOverflows.begin() + nCnt++, pBox ); - pBoxStk->erase( pBox ); + pBoxStack->erase( pBox ); pBox->GetValue( *this ); } while( IsStackOverflow() ); @@ -285,7 +285,7 @@ bool SwTableCalcPara::CalcWithStackOverflow() // if recursion was detected nStackCnt = 0; rCalc.SetCalcError( CALC_NOERR ); - pBoxStk->clear(); + pBoxStack->clear(); while( !rCalc.IsCalcError() && nCnt ) { @@ -722,13 +722,13 @@ const SwTable* SwTableFormula::FindTable( SwDoc& rDoc, const OUString& rNm ) return pRet; } -static const SwFrm* lcl_GetBoxFrm( const SwTableBox& rBox ) +static const SwFrame* lcl_GetBoxFrame( const SwTableBox& rBox ) { SwNodeIndex aIdx( *rBox.GetSttNd() ); SwContentNode* pCNd = aIdx.GetNodes().GoNext( &aIdx ); OSL_ENSURE( pCNd, "Box has no TextNode" ); Point aPt; // get the first frame of the layout - table headline - return pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ); + return pCNd->getLayoutFrame( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ); } static sal_Int32 lcl_GetLongBoxNum( OUString& rStr ) @@ -921,16 +921,16 @@ void SwTableFormula::GetBoxes( const SwTableBox& rSttBox, SwSelBoxes& rBoxes ) { // get all selected boxes via layout - const SwLayoutFrm *pStt, *pEnd; - const SwFrm* pFrm = lcl_GetBoxFrm( rSttBox ); - pStt = pFrm ? pFrm->GetUpper() : nullptr; - pEnd = ( nullptr != (pFrm = lcl_GetBoxFrm( rEndBox ))) ? pFrm->GetUpper() : nullptr; + const SwLayoutFrame *pStt, *pEnd; + const SwFrame* pFrame = lcl_GetBoxFrame( rSttBox ); + pStt = pFrame ? pFrame->GetUpper() : nullptr; + pEnd = ( nullptr != (pFrame = lcl_GetBoxFrame( rEndBox ))) ? pFrame->GetUpper() : nullptr; if( !pStt || !pEnd ) return ; // no valid selection GetTableSel( pStt, pEnd, rBoxes, nullptr ); - const SwTable* pTable = pStt->FindTabFrm()->GetTable(); + const SwTable* pTable = pStt->FindTabFrame()->GetTable(); // filter headline boxes if( pTable->GetRowsToRepeat() > 0 ) @@ -951,8 +951,8 @@ void SwTableFormula::GetBoxes( const SwTableBox& rSttBox, if( pTable->IsHeadline( *pLine ) ) break; // headline in this area! - const SwTabFrm *pStartTable = pStt->FindTabFrm(); - const SwTabFrm *pEndTable = pEnd->FindTabFrm(); + const SwTabFrame *pStartTable = pStt->FindTabFrame(); + const SwTabFrame *pEndTable = pEnd->FindTabFrame(); if (pStartTable == pEndTable) // no split table break; diff --git a/sw/source/core/fields/chpfld.cxx b/sw/source/core/fields/chpfld.cxx index cfbf5d45dfd2..090509db2313 100644 --- a/sw/source/core/fields/chpfld.cxx +++ b/sw/source/core/fields/chpfld.cxx @@ -98,18 +98,18 @@ SwField* SwChapterField::Copy() const } // #i53420# -void SwChapterField::ChangeExpansion(const SwFrm* pFrm, +void SwChapterField::ChangeExpansion(const SwFrame* pFrame, const SwContentNode* pContentNode, bool bSrchNum ) { - OSL_ENSURE( pFrm, "In which frame am I?" ); + OSL_ENSURE( pFrame, "In which frame am I?" ); SwDoc* pDoc = const_cast<SwDoc*>(pContentNode->GetDoc()); const SwTextNode* pTextNode = dynamic_cast<const SwTextNode*>(pContentNode); - if ( !pTextNode || !pFrm->IsInDocBody() ) + if ( !pTextNode || !pFrame->IsInDocBody() ) { SwPosition aDummyPos( pDoc->GetNodes().GetEndOfContent() ); - pTextNode = GetBodyTextNode( *pDoc, aDummyPos, *pFrm ); + pTextNode = GetBodyTextNode( *pDoc, aDummyPos, *pFrame ); } if ( pTextNode ) diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx index 45c0caa71c9d..cd54815d2ea0 100644 --- a/sw/source/core/fields/docufld.cxx +++ b/sw/source/core/fields/docufld.cxx @@ -159,7 +159,7 @@ void SwPageNumberFieldType::ChangeExpansion( SwDoc* pDoc, const SwContentNode* pNd = dynamic_cast<const SwContentNode*>( pDesc->GetDefinedIn() ); if( pNd ) { - if ( SwIterator<SwFrm,SwContentNode>(*pNd).First() ) + if ( SwIterator<SwFrame,SwContentNode>(*pNd).First() ) bVirtuell = true; } else if( dynamic_cast< const SwFormat* >(pDesc->GetDefinedIn()) != nullptr) @@ -792,11 +792,11 @@ void SwDocStatField::SetSubType(sal_uInt16 nSub) nSubType = nSub; } -void SwDocStatField::ChangeExpansion( const SwFrm* pFrm ) +void SwDocStatField::ChangeExpansion( const SwFrame* pFrame ) { if( DS_PAGE == nSubType && SVX_NUM_PAGEDESC == GetFormat() ) static_cast<SwDocStatFieldType*>(GetTyp())->SetNumFormat( - pFrm->FindPageFrm()->GetPageDesc()->GetNumType().GetNumberingType() ); + pFrame->FindPageFrame()->GetPageDesc()->GetNumType().GetNumberingType() ); } bool SwDocStatField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const @@ -2104,15 +2104,15 @@ bool SwRefPageGetFieldType::MakeSetList( _SetGetExpFields& rTmpLst ) // Always the first! (in Tab-Headline, header/footer ) Point aPt; - const SwContentFrm* pFrm = rTextNd.getLayoutFrm( rTextNd.GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ); + const SwContentFrame* pFrame = rTextNd.getLayoutFrame( rTextNd.GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ); _SetGetExpField* pNew; - if( !pFrm || - pFrm->IsInDocBody() || + if( !pFrame || + pFrame->IsInDocBody() || // #i31868# - // Check if pFrm is not yet connected to the layout. - !pFrm->FindPageFrm() ) + // Check if pFrame is not yet connected to the layout. + !pFrame->FindPageFrame() ) { // create index for determination of the TextNode SwNodeIndex aIdx( rTextNd ); @@ -2122,7 +2122,7 @@ bool SwRefPageGetFieldType::MakeSetList( _SetGetExpFields& rTmpLst ) { // create index for determination of the TextNode SwPosition aPos( pDoc->GetNodes().GetEndOfPostIts() ); - bool const bResult = GetBodyTextNode( *pDoc, aPos, *pFrm ); + bool const bResult = GetBodyTextNode( *pDoc, aPos, *pFrame ); OSL_ENSURE(bResult, "where is the Field?"); (void) bResult; // unused in non-debug pNew = new _SetGetExpField( aPos.nNode, pTField, @@ -2163,18 +2163,18 @@ void SwRefPageGetFieldType::UpdateField( SwTextField* pTextField, { // determine the correct offset Point aPt; - const SwContentFrm* pFrm = pTextNode->getLayoutFrm( pTextNode->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ); - const SwContentFrm* pRefFrm = pRefTextField->GetTextNode().getLayoutFrm( pRefTextField->GetTextNode().GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ); - const SwPageFrm* pPgFrm = nullptr; - const short nDiff = ( pFrm && pRefFrm ) - ? (pPgFrm = pFrm->FindPageFrm())->GetPhyPageNum() - - pRefFrm->FindPageFrm()->GetPhyPageNum() + 1 + const SwContentFrame* pFrame = pTextNode->getLayoutFrame( pTextNode->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ); + const SwContentFrame* pRefFrame = pRefTextField->GetTextNode().getLayoutFrame( pRefTextField->GetTextNode().GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ); + const SwPageFrame* pPgFrame = nullptr; + const short nDiff = ( pFrame && pRefFrame ) + ? (pPgFrame = pFrame->FindPageFrame())->GetPhyPageNum() - + pRefFrame->FindPageFrame()->GetPhyPageNum() + 1 : 1; sal_uInt32 nTmpFormat = SVX_NUM_PAGEDESC == pGetField->GetFormat() - ? ( !pPgFrm + ? ( !pPgFrame ? (sal_uInt32)SVX_NUM_ARABIC - : pPgFrm->GetPageDesc()->GetNumType().GetNumberingType() ) + : pPgFrame->GetPageDesc()->GetNumType().GetNumberingType() ) : pGetField->GetFormat(); const short nPageNum = std::max<short>(0, pSetField->GetOffset() + nDiff); pGetField->SetText( FormatNumber( nPageNum, nTmpFormat ) ); @@ -2206,7 +2206,7 @@ SwField* SwRefPageGetField::Copy() const return pCpy; } -void SwRefPageGetField::ChangeExpansion( const SwFrm* pFrm, +void SwRefPageGetField::ChangeExpansion( const SwFrame* pFrame, const SwTextField* pField ) { // only fields in Footer, Header, FootNote, Flys @@ -2218,7 +2218,7 @@ void SwRefPageGetField::ChangeExpansion( const SwFrm* pFrm, sText.clear(); - OSL_ENSURE( !pFrm->IsInDocBody(), "Flag incorrect, frame is in DocBody" ); + OSL_ENSURE( !pFrame->IsInDocBody(), "Flag incorrect, frame is in DocBody" ); // collect all SetPageRefFields _SetGetExpFields aTmpLst; @@ -2227,7 +2227,7 @@ void SwRefPageGetField::ChangeExpansion( const SwFrm* pFrm, // create index for determination of the TextNode SwPosition aPos( SwNodeIndex( pDoc->GetNodes() ) ); - SwTextNode* pTextNode = const_cast<SwTextNode*>(GetBodyTextNode( *pDoc, aPos, *pFrm )); + SwTextNode* pTextNode = const_cast<SwTextNode*>(GetBodyTextNode( *pDoc, aPos, *pFrame )); // If no layout exists, ChangeExpansion is called for header and // footer lines via layout formatting without existing TextNode. @@ -2246,17 +2246,17 @@ void SwRefPageGetField::ChangeExpansion( const SwFrm* pFrm, const SwRefPageSetField* pSetField = static_cast<const SwRefPageSetField*>(pRefTextField->GetFormatField().GetField()); Point aPt; - const SwContentFrm* pRefFrm = pRefTextField->GetTextNode().getLayoutFrm( pFrm->getRootFrm(), &aPt, nullptr, false ); - if( pSetField->IsOn() && pRefFrm ) + const SwContentFrame* pRefFrame = pRefTextField->GetTextNode().getLayoutFrame( pFrame->getRootFrame(), &aPt, nullptr, false ); + if( pSetField->IsOn() && pRefFrame ) { // determine the correct offset - const SwPageFrm* pPgFrm = pFrm->FindPageFrm(); - const short nDiff = pPgFrm->GetPhyPageNum() - - pRefFrm->FindPageFrm()->GetPhyPageNum() + 1; + const SwPageFrame* pPgFrame = pFrame->FindPageFrame(); + const short nDiff = pPgFrame->GetPhyPageNum() - + pRefFrame->FindPageFrame()->GetPhyPageNum() + 1; SwRefPageGetField* pGetField = const_cast<SwRefPageGetField*>(static_cast<const SwRefPageGetField*>(pField->GetFormatField().GetField())); sal_uInt32 nTmpFormat = SVX_NUM_PAGEDESC == pGetField->GetFormat() - ? pPgFrm->GetPageDesc()->GetNumType().GetNumberingType() + ? pPgFrame->GetPageDesc()->GetNumType().GetNumberingType() : pGetField->GetFormat(); const short nPageNum = std::max<short>(0, pSetField->GetOffset() + nDiff); pGetField->SetText( FormatNumber( nPageNum, nTmpFormat ) ); diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx index 042106994284..973ad932586b 100644 --- a/sw/source/core/fields/expfld.cxx +++ b/sw/source/core/fields/expfld.cxx @@ -132,10 +132,10 @@ OUString ReplacePoint( const OUString& rTmpName, bool bWithCommandType ) } SwTextNode* GetFirstTextNode( const SwDoc& rDoc, SwPosition& rPos, - const SwContentFrm *pCFrm, Point &rPt ) + const SwContentFrame *pCFrame, Point &rPt ) { SwTextNode* pTextNode = nullptr; - if ( !pCFrm ) + if ( !pCFrame ) { const SwNodes& rNodes = rDoc.GetNodes(); rPos.nNode = *rNodes.GetEndOfContent().StartOfSectionNode(); @@ -146,32 +146,32 @@ SwTextNode* GetFirstTextNode( const SwDoc& rDoc, SwPosition& rPos, OSL_ENSURE( pTextNode, "Where is the 1. TextNode?" ); rPos.nContent.Assign( pTextNode, 0 ); } - else if ( !pCFrm->IsValid() ) + else if ( !pCFrame->IsValid() ) { - pTextNode = const_cast<SwTextNode*>(static_cast<const SwTextNode*>(pCFrm->GetNode())); + pTextNode = const_cast<SwTextNode*>(static_cast<const SwTextNode*>(pCFrame->GetNode())); rPos.nNode = *pTextNode; rPos.nContent.Assign( pTextNode, 0 ); } else { - pCFrm->GetCrsrOfst( &rPos, rPt ); + pCFrame->GetCursorOfst( &rPos, rPt ); pTextNode = rPos.nNode.GetNode().GetTextNode(); } return pTextNode; } const SwTextNode* GetBodyTextNode( const SwDoc& rDoc, SwPosition& rPos, - const SwFrm& rFrm ) + const SwFrame& rFrame ) { - const SwLayoutFrm* pLayout = rFrm.GetUpper(); + const SwLayoutFrame* pLayout = rFrame.GetUpper(); const SwTextNode* pTextNode = nullptr; while( pLayout ) { - if( pLayout->IsFlyFrm() ) + if( pLayout->IsFlyFrame() ) { // get the FlyFormat - const SwFrameFormat* pFlyFormat = static_cast<const SwFlyFrm*>(pLayout)->GetFormat(); + const SwFrameFormat* pFlyFormat = static_cast<const SwFlyFrame*>(pLayout)->GetFormat(); OSL_ENSURE( pFlyFormat, "Could not find FlyFormat, where is the field?" ); const SwFormatAnchor &rAnchor = pFlyFormat->GetAnchor(); @@ -179,7 +179,7 @@ const SwTextNode* GetBodyTextNode( const SwDoc& rDoc, SwPosition& rPos, if( FLY_AT_FLY == rAnchor.GetAnchorId() ) { // the fly needs to be attached somewhere, so ask it - pLayout = static_cast<const SwLayoutFrm*>(static_cast<const SwFlyFrm*>(pLayout)->GetAnchorFrm()); + pLayout = static_cast<const SwLayoutFrame*>(static_cast<const SwFlyFrame*>(pLayout)->GetAnchorFrame()); continue; } else if ((FLY_AT_PARA == rAnchor.GetAnchorId()) || @@ -196,57 +196,57 @@ const SwTextNode* GetBodyTextNode( const SwDoc& rDoc, SwPosition& rPos, } // do not break yet, might be as well in Header/Footer/Footnote/Fly - pLayout = static_cast<const SwFlyFrm*>(pLayout)->GetAnchorFrm() - ? static_cast<const SwFlyFrm*>(pLayout)->GetAnchorFrm()->GetUpper() : nullptr; + pLayout = static_cast<const SwFlyFrame*>(pLayout)->GetAnchorFrame() + ? static_cast<const SwFlyFrame*>(pLayout)->GetAnchorFrame()->GetUpper() : nullptr; continue; } else { - pLayout->FindPageFrm()->GetContentPosition( - pLayout->Frm().Pos(), rPos ); + pLayout->FindPageFrame()->GetContentPosition( + pLayout->Frame().Pos(), rPos ); pTextNode = rPos.nNode.GetNode().GetTextNode(); } } - else if( pLayout->IsFootnoteFrm() ) + else if( pLayout->IsFootnoteFrame() ) { // get the anchor's node - const SwTextFootnote* pFootnote = static_cast<const SwFootnoteFrm*>(pLayout)->GetAttr(); + const SwTextFootnote* pFootnote = static_cast<const SwFootnoteFrame*>(pLayout)->GetAttr(); pTextNode = &pFootnote->GetTextNode(); rPos.nNode = *pTextNode; rPos.nContent = pFootnote->GetStart(); } - else if( pLayout->IsHeaderFrm() || pLayout->IsFooterFrm() ) + else if( pLayout->IsHeaderFrame() || pLayout->IsFooterFrame() ) { - const SwContentFrm* pCntFrm; - const SwPageFrm* pPgFrm = pLayout->FindPageFrm(); - if( pLayout->IsHeaderFrm() ) + const SwContentFrame* pContentFrame; + const SwPageFrame* pPgFrame = pLayout->FindPageFrame(); + if( pLayout->IsHeaderFrame() ) { - const SwTabFrm *pTab; - if( nullptr != ( pCntFrm = pPgFrm->FindFirstBodyContent()) && - nullptr != (pTab = pCntFrm->FindTabFrm()) && pTab->IsFollow() && + const SwTabFrame *pTab; + if( nullptr != ( pContentFrame = pPgFrame->FindFirstBodyContent()) && + nullptr != (pTab = pContentFrame->FindTabFrame()) && pTab->IsFollow() && pTab->GetTable()->GetRowsToRepeat() > 0 && - pTab->IsInHeadline( *pCntFrm ) ) + pTab->IsInHeadline( *pContentFrame ) ) { // take the next line - const SwLayoutFrm* pRow = pTab->GetFirstNonHeadlineRow(); - pCntFrm = pRow->ContainsContent(); + const SwLayoutFrame* pRow = pTab->GetFirstNonHeadlineRow(); + pContentFrame = pRow->ContainsContent(); } } else - pCntFrm = pPgFrm->FindLastBodyContent(); + pContentFrame = pPgFrame->FindLastBodyContent(); - if( pCntFrm ) + if( pContentFrame ) { - pTextNode = pCntFrm->GetNode()->GetTextNode(); + pTextNode = pContentFrame->GetNode()->GetTextNode(); rPos.nNode = *pTextNode; const_cast<SwTextNode*>(pTextNode)->MakeEndIndex( &rPos.nContent ); } else { - Point aPt( pLayout->Frm().Pos() ); + Point aPt( pLayout->Frame().Pos() ); aPt.Y()++; // get out of the header - pCntFrm = pPgFrm->GetContentPos( aPt, false, true ); - pTextNode = GetFirstTextNode( rDoc, rPos, pCntFrm, aPt ); + pContentFrame = pPgFrame->GetContentPos( aPt, false, true ); + pTextNode = GetFirstTextNode( rDoc, rPos, pContentFrame, aPt ); } } else @@ -319,12 +319,12 @@ SwField* SwGetExpField::Copy() const return pTmp; } -void SwGetExpField::ChangeExpansion( const SwFrm& rFrm, const SwTextField& rField ) +void SwGetExpField::ChangeExpansion( const SwFrame& rFrame, const SwTextField& rField ) { if( bIsInBodyText ) // only fields in Footer, Header, FootNote, Flys return; - OSL_ENSURE( !rFrm.IsInDocBody(), "Flag incorrect, frame is in DocBody" ); + OSL_ENSURE( !rFrame.IsInDocBody(), "Flag incorrect, frame is in DocBody" ); // determine document (or is there an easier way?) const SwTextNode* pTextNode = &rField.GetTextNode(); @@ -332,7 +332,7 @@ void SwGetExpField::ChangeExpansion( const SwFrm& rFrm, const SwTextField& rFiel // create index for determination of the TextNode SwPosition aPos( SwNodeIndex( rDoc.GetNodes() ) ); - pTextNode = GetBodyTextNode( rDoc, aPos, rFrm ); + pTextNode = GetBodyTextNode( rDoc, aPos, rFrame ); // If no layout exists, ChangeExpansion is called for header and // footer lines via layout formatting without existing TextNode. diff --git a/sw/source/core/fields/fldlst.cxx b/sw/source/core/fields/fldlst.cxx index 449c7c63e5b7..e20d7453b05d 100644 --- a/sw/source/core/fields/fldlst.cxx +++ b/sw/source/core/fields/fldlst.cxx @@ -97,14 +97,14 @@ SwField* SwInputFieldList::GetField(size_t nId) } /// save cursor -void SwInputFieldList::PushCrsr() +void SwInputFieldList::PushCursor() { pSh->Push(); pSh->ClearMark(); } /// get cursor -void SwInputFieldList::PopCrsr() +void SwInputFieldList::PopCursor() { pSh->Pop(false); } @@ -113,7 +113,7 @@ void SwInputFieldList::PopCrsr() void SwInputFieldList::GotoFieldPos(size_t nId) { pSh->StartAllAction(); - (*pSrtLst)[ nId ]->GetPosOfContent( *pSh->GetCrsr()->GetPoint() ); + (*pSrtLst)[ nId ]->GetPosOfContent( *pSh->GetCursor()->GetPoint() ); pSh->EndAllAction(); } diff --git a/sw/source/core/fields/postithelper.cxx b/sw/source/core/fields/postithelper.cxx index f08447899223..ed4aa4c50893 100644 --- a/sw/source/core/fields/postithelper.cxx +++ b/sw/source/core/fields/postithelper.cxx @@ -48,19 +48,19 @@ SwPostItHelper::SwLayoutStatus SwPostItHelper::getLayoutInfos( if ( pTextNode == nullptr ) return aRet; - SwIterator<SwTextFrm,SwContentNode> aIter( *pTextNode ); - for( SwTextFrm* pTextFrm = aIter.First(); pTextFrm != nullptr; pTextFrm = aIter.Next() ) + SwIterator<SwTextFrame,SwContentNode> aIter( *pTextNode ); + for( SwTextFrame* pTextFrame = aIter.First(); pTextFrame != nullptr; pTextFrame = aIter.Next() ) { - if( !pTextFrm->IsFollow() ) + if( !pTextFrame->IsFollow() ) { - pTextFrm = pTextFrm->GetFrmAtPos( rAnchorPos ); - SwPageFrm *pPage = pTextFrm ? pTextFrm->FindPageFrm() : nullptr; + pTextFrame = pTextFrame->GetFrameAtPos( rAnchorPos ); + SwPageFrame *pPage = pTextFrame ? pTextFrame->FindPageFrame() : nullptr; if ( pPage != nullptr && !pPage->IsInvalid() && !pPage->IsInvalidFly() ) { aRet = VISIBLE; - o_rInfo.mpAnchorFrm = pTextFrm; - pTextFrm->GetCharRect( o_rInfo.mPosition, rAnchorPos ); + o_rInfo.mpAnchorFrame = pTextFrame; + pTextFrame->GetCharRect( o_rInfo.mPosition, rAnchorPos ); if ( pAnnotationStartPos != nullptr ) { o_rInfo.mnStartNodeIdx = pAnnotationStartPos->nNode.GetIndex(); @@ -71,7 +71,7 @@ SwPostItHelper::SwLayoutStatus SwPostItHelper::getLayoutInfos( o_rInfo.mnStartNodeIdx = 0; o_rInfo.mnStartContent = -1; } - o_rInfo.mPageFrame = pPage->Frm(); + o_rInfo.mPageFrame = pPage->Frame(); o_rInfo.mPagePrtArea = pPage->Prt(); o_rInfo.mPagePrtArea.Pos() += o_rInfo.mPageFrame.Pos(); o_rInfo.mnPageNumber = pPage->GetPhyPageNum(); @@ -100,13 +100,13 @@ SwPostItHelper::SwLayoutStatus SwPostItHelper::getLayoutInfos( : aRet; } -long SwPostItHelper::getLayoutHeight( const SwRootFrm* pRoot ) +long SwPostItHelper::getLayoutHeight( const SwRootFrame* pRoot ) { - long nRet = pRoot ? pRoot->Frm().Height() : 0; + long nRet = pRoot ? pRoot->Frame().Height() : 0; return nRet; } -void SwPostItHelper::setSidebarChanged( SwRootFrm* pRoot, bool bBrowseMode ) +void SwPostItHelper::setSidebarChanged( SwRootFrame* pRoot, bool bBrowseMode ) { if( pRoot ) { @@ -116,14 +116,14 @@ void SwPostItHelper::setSidebarChanged( SwRootFrm* pRoot, bool bBrowseMode ) } } -unsigned long SwPostItHelper::getPageInfo( SwRect& rPageFrm, const SwRootFrm* pRoot, const Point& rPoint ) +unsigned long SwPostItHelper::getPageInfo( SwRect& rPageFrame, const SwRootFrame* pRoot, const Point& rPoint ) { unsigned long nRet = 0; - const SwFrm* pPage = pRoot->GetPageAtPos( rPoint, nullptr, true ); + const SwFrame* pPage = pRoot->GetPageAtPos( rPoint, nullptr, true ); if( pPage ) { nRet = pPage->GetPhyPageNum(); - rPageFrm = pPage->Frm(); + rPageFrame = pPage->Frame(); } return nRet; } diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx index 60268b75b437..a36e3aac1206 100644 --- a/sw/source/core/fields/reffld.cxx +++ b/sw/source/core/fields/reffld.cxx @@ -70,24 +70,24 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::text; using namespace ::com::sun::star::lang; -static void lcl_GetLayTree( const SwFrm* pFrm, std::vector<const SwFrm*>& rArr ) +static void lcl_GetLayTree( const SwFrame* pFrame, std::vector<const SwFrame*>& rArr ) { - while( pFrm ) + while( pFrame ) { - if( pFrm->IsBodyFrm() ) // unspectacular - pFrm = pFrm->GetUpper(); + if( pFrame->IsBodyFrame() ) // unspectacular + pFrame = pFrame->GetUpper(); else { - rArr.push_back( pFrm ); + rArr.push_back( pFrame ); // this is the last page - if( pFrm->IsPageFrm() ) + if( pFrame->IsPageFrame() ) break; - if( pFrm->IsFlyFrm() ) - pFrm = static_cast<const SwFlyFrm*>(pFrm)->GetAnchorFrm(); + if( pFrame->IsFlyFrame() ) + pFrame = static_cast<const SwFlyFrame*>(pFrame)->GetAnchorFrame(); else - pFrm = pFrm->GetUpper(); + pFrame = pFrame->GetUpper(); } } } @@ -95,20 +95,20 @@ static void lcl_GetLayTree( const SwFrm* pFrm, std::vector<const SwFrm*>& rArr ) bool IsFrameBehind( const SwTextNode& rMyNd, sal_Int32 nMySttPos, const SwTextNode& rBehindNd, sal_Int32 nSttPos ) { - const SwTextFrm *pMyFrm = static_cast<SwTextFrm*>(rMyNd.getLayoutFrm( rMyNd.GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, nullptr, false) ), - *pFrm = static_cast<SwTextFrm*>(rBehindNd.getLayoutFrm( rBehindNd.GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, nullptr, false) ); + const SwTextFrame *pMyFrame = static_cast<SwTextFrame*>(rMyNd.getLayoutFrame( rMyNd.GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, nullptr, false) ), + *pFrame = static_cast<SwTextFrame*>(rBehindNd.getLayoutFrame( rBehindNd.GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, nullptr, false) ); - while( pFrm && !pFrm->IsInside( nSttPos ) ) - pFrm = pFrm->GetFollow(); - while( pMyFrm && !pMyFrm->IsInside( nMySttPos ) ) - pMyFrm = pMyFrm->GetFollow(); + while( pFrame && !pFrame->IsInside( nSttPos ) ) + pFrame = pFrame->GetFollow(); + while( pMyFrame && !pMyFrame->IsInside( nMySttPos ) ) + pMyFrame = pMyFrame->GetFollow(); - if( !pFrm || !pMyFrm || pFrm == pMyFrm ) + if( !pFrame || !pMyFrame || pFrame == pMyFrame ) return false; - std::vector<const SwFrm*> aRefArr, aArr; - ::lcl_GetLayTree( pFrm, aRefArr ); - ::lcl_GetLayTree( pMyFrm, aArr ); + std::vector<const SwFrame*> aRefArr, aArr; + ::lcl_GetLayTree( pFrame, aRefArr ); + ::lcl_GetLayTree( pMyFrame, aArr ); size_t nRefCnt = aRefArr.size() - 1, nCnt = aArr.size() - 1; bool bVert = false; @@ -117,9 +117,9 @@ bool IsFrameBehind( const SwTextNode& rMyNd, sal_Int32 nMySttPos, // Loop as long as a frame does not equal? while( nRefCnt && nCnt && aRefArr[ nRefCnt ] == aArr[ nCnt ] ) { - const SwFrm* pTmpFrm = aArr[ nCnt ]; - bVert = pTmpFrm->IsVertical(); - bR2L = pTmpFrm->IsRightToLeft(); + const SwFrame* pTmpFrame = aArr[ nCnt ]; + bVert = pTmpFrame->IsVertical(); + bR2L = pTmpFrame->IsRightToLeft(); --nCnt, --nRefCnt; } @@ -132,65 +132,65 @@ bool IsFrameBehind( const SwTextNode& rMyNd, sal_Int32 nMySttPos, --nRefCnt; } - const SwFrm* pRefFrm = aRefArr[ nRefCnt ]; - const SwFrm* pFieldFrm = aArr[ nCnt ]; + const SwFrame* pRefFrame = aRefArr[ nRefCnt ]; + const SwFrame* pFieldFrame = aArr[ nCnt ]; // different frames, check their Y-/X-position bool bRefIsLower = false; - if( ( FRM_COLUMN | FRM_CELL ) & pFieldFrm->GetType() || - ( FRM_COLUMN | FRM_CELL ) & pRefFrm->GetType() ) + if( ( FRM_COLUMN | FRM_CELL ) & pFieldFrame->GetType() || + ( FRM_COLUMN | FRM_CELL ) & pRefFrame->GetType() ) { - if( pFieldFrm->GetType() == pRefFrm->GetType() ) + if( pFieldFrame->GetType() == pRefFrame->GetType() ) { // here, the X-pos is more important if( bVert ) { if( bR2L ) - bRefIsLower = pRefFrm->Frm().Top() < pFieldFrm->Frm().Top() || - ( pRefFrm->Frm().Top() == pFieldFrm->Frm().Top() && - pRefFrm->Frm().Left() < pFieldFrm->Frm().Left() ); + bRefIsLower = pRefFrame->Frame().Top() < pFieldFrame->Frame().Top() || + ( pRefFrame->Frame().Top() == pFieldFrame->Frame().Top() && + pRefFrame->Frame().Left() < pFieldFrame->Frame().Left() ); else - bRefIsLower = pRefFrm->Frm().Top() < pFieldFrm->Frm().Top() || - ( pRefFrm->Frm().Top() == pFieldFrm->Frm().Top() && - pRefFrm->Frm().Left() > pFieldFrm->Frm().Left() ); + bRefIsLower = pRefFrame->Frame().Top() < pFieldFrame->Frame().Top() || + ( pRefFrame->Frame().Top() == pFieldFrame->Frame().Top() && + pRefFrame->Frame().Left() > pFieldFrame->Frame().Left() ); } else if( bR2L ) - bRefIsLower = pRefFrm->Frm().Left() > pFieldFrm->Frm().Left() || - ( pRefFrm->Frm().Left() == pFieldFrm->Frm().Left() && - pRefFrm->Frm().Top() < pFieldFrm->Frm().Top() ); + bRefIsLower = pRefFrame->Frame().Left() > pFieldFrame->Frame().Left() || + ( pRefFrame->Frame().Left() == pFieldFrame->Frame().Left() && + pRefFrame->Frame().Top() < pFieldFrame->Frame().Top() ); else - bRefIsLower = pRefFrm->Frm().Left() < pFieldFrm->Frm().Left() || - ( pRefFrm->Frm().Left() == pFieldFrm->Frm().Left() && - pRefFrm->Frm().Top() < pFieldFrm->Frm().Top() ); - pRefFrm = nullptr; + bRefIsLower = pRefFrame->Frame().Left() < pFieldFrame->Frame().Left() || + ( pRefFrame->Frame().Left() == pFieldFrame->Frame().Left() && + pRefFrame->Frame().Top() < pFieldFrame->Frame().Top() ); + pRefFrame = nullptr; } - else if( ( FRM_COLUMN | FRM_CELL ) & pFieldFrm->GetType() ) - pFieldFrm = aArr[ nCnt - 1 ]; + else if( ( FRM_COLUMN | FRM_CELL ) & pFieldFrame->GetType() ) + pFieldFrame = aArr[ nCnt - 1 ]; else - pRefFrm = aRefArr[ nRefCnt - 1 ]; + pRefFrame = aRefArr[ nRefCnt - 1 ]; } - if( pRefFrm ) // misuse as flag + if( pRefFrame ) // misuse as flag { if( bVert ) { if( bR2L ) - bRefIsLower = pRefFrm->Frm().Left() < pFieldFrm->Frm().Left() || - ( pRefFrm->Frm().Left() == pFieldFrm->Frm().Left() && - pRefFrm->Frm().Top() < pFieldFrm->Frm().Top() ); + bRefIsLower = pRefFrame->Frame().Left() < pFieldFrame->Frame().Left() || + ( pRefFrame->Frame().Left() == pFieldFrame->Frame().Left() && + pRefFrame->Frame().Top() < pFieldFrame->Frame().Top() ); else - bRefIsLower = pRefFrm->Frm().Left() > pFieldFrm->Frm().Left() || - ( pRefFrm->Frm().Left() == pFieldFrm->Frm().Left() && - pRefFrm->Frm().Top() < pFieldFrm->Frm().Top() ); + bRefIsLower = pRefFrame->Frame().Left() > pFieldFrame->Frame().Left() || + ( pRefFrame->Frame().Left() == pFieldFrame->Frame().Left() && + pRefFrame->Frame().Top() < pFieldFrame->Frame().Top() ); } else if( bR2L ) - bRefIsLower = pRefFrm->Frm().Top() < pFieldFrm->Frm().Top() || - ( pRefFrm->Frm().Top() == pFieldFrm->Frm().Top() && - pRefFrm->Frm().Left() > pFieldFrm->Frm().Left() ); + bRefIsLower = pRefFrame->Frame().Top() < pFieldFrame->Frame().Top() || + ( pRefFrame->Frame().Top() == pFieldFrame->Frame().Top() && + pRefFrame->Frame().Left() > pFieldFrame->Frame().Left() ); else - bRefIsLower = pRefFrm->Frm().Top() < pFieldFrm->Frm().Top() || - ( pRefFrm->Frm().Top() == pFieldFrm->Frm().Top() && - pRefFrm->Frm().Left() < pFieldFrm->Frm().Left() ); + bRefIsLower = pRefFrame->Frame().Top() < pFieldFrame->Frame().Top() || + ( pRefFrame->Frame().Top() == pFieldFrame->Frame().Top() && + pRefFrame->Frame().Left() < pFieldFrame->Frame().Left() ); } return bRefIsLower; } @@ -420,17 +420,17 @@ void SwGetRefField::UpdateField( const SwTextField* pFieldTextAttr ) case REF_PAGE: case REF_PAGE_PGDESC: { - const SwTextFrm* pFrm = static_cast<SwTextFrm*>(pTextNd->getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, nullptr, false)), - *pSave = pFrm; - while( pFrm && !pFrm->IsInside( nNumStart ) ) - pFrm = pFrm->GetFollow(); + const SwTextFrame* pFrame = static_cast<SwTextFrame*>(pTextNd->getLayoutFrame( pDoc->getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, nullptr, false)), + *pSave = pFrame; + while( pFrame && !pFrame->IsInside( nNumStart ) ) + pFrame = pFrame->GetFollow(); - if( pFrm || nullptr != ( pFrm = pSave )) + if( pFrame || nullptr != ( pFrame = pSave )) { - sal_uInt16 nPageNo = pFrm->GetVirtPageNum(); - const SwPageFrm *pPage; + sal_uInt16 nPageNo = pFrame->GetVirtPageNum(); + const SwPageFrame *pPage; if( REF_PAGE_PGDESC == GetFormat() && - nullptr != ( pPage = pFrm->FindPageFrm() ) && + nullptr != ( pPage = pFrame->FindPageFrame() ) && pPage->GetPageDesc() ) sText = pPage->GetPageDesc()->GetNumType().GetNumStr( nPageNo ); else @@ -442,13 +442,13 @@ void SwGetRefField::UpdateField( const SwTextField* pFieldTextAttr ) case REF_CHAPTER: { // a bit tricky: search any frame - const SwFrm* pFrm = pTextNd->getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ); - if( pFrm ) + const SwFrame* pFrame = pTextNd->getLayoutFrame( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ); + if( pFrame ) { SwChapterFieldType aFieldTyp; SwChapterField aField( &aFieldTyp, 0 ); aField.SetLevel( MAXLEVEL - 1 ); - aField.ChangeExpansion( pFrm, pTextNd, true ); + aField.ChangeExpansion( pFrame, pTextNd, true ); sText = aField.GetNumber(); } } diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx index f82afebe55b8..55ece42fad2f 100644 --- a/sw/source/core/frmedt/fecopy.cxx +++ b/sw/source/core/frmedt/fecopy.cxx @@ -123,10 +123,10 @@ bool SwFEShell::Copy( SwDoc* pClpDoc, const OUString* pNewClpText ) bool bRet; // do we want to copy a FlyFrame? - if( IsFrmSelected() ) + if( IsFrameSelected() ) { // get the FlyFormat - SwFlyFrm* pFly = GetSelectedFlyFrm(); + SwFlyFrame* pFly = GetSelectedFlyFrame(); SwFrameFormat* pFlyFormat = pFly->GetFormat(); SwFormatAnchor aAnchor( pFlyFormat->GetAnchor() ); @@ -226,30 +226,30 @@ bool SwFEShell::Copy( SwDoc* pClpDoc, const OUString* pNewClpText ) return bRet; } -static const Point &lcl_FindBasePos( const SwFrm *pFrm, const Point &rPt ) +static const Point &lcl_FindBasePos( const SwFrame *pFrame, const Point &rPt ) { - const SwFrm *pF = pFrm; - while ( pF && !pF->Frm().IsInside( rPt ) ) + const SwFrame *pF = pFrame; + while ( pF && !pF->Frame().IsInside( rPt ) ) { - if ( pF->IsContentFrm() ) - pF = static_cast<const SwContentFrm*>(pF)->GetFollow(); + if ( pF->IsContentFrame() ) + pF = static_cast<const SwContentFrame*>(pF)->GetFollow(); else pF = nullptr; } if ( pF ) - return pF->Frm().Pos(); + return pF->Frame().Pos(); else - return pFrm->Frm().Pos(); + return pFrame->Frame().Pos(); } -static bool lcl_SetAnchor( const SwPosition& rPos, const SwNode& rNd, SwFlyFrm* pFly, +static bool lcl_SetAnchor( const SwPosition& rPos, const SwNode& rNd, SwFlyFrame* pFly, const Point& rInsPt, SwFEShell& rDestShell, SwFormatAnchor& rAnchor, Point& rNewPos, bool bCheckFlyRecur ) { bool bRet = true; rAnchor.SetAnchor( &rPos ); - SwContentFrm* pTmpFrm = rNd.GetContentNode()->getLayoutFrm( rDestShell.GetLayout(), &rInsPt, nullptr, false ); - SwFlyFrm *pTmpFly = pTmpFrm->FindFlyFrm(); + SwContentFrame* pTmpFrame = rNd.GetContentNode()->getLayoutFrame( rDestShell.GetLayout(), &rInsPt, nullptr, false ); + SwFlyFrame *pTmpFly = pTmpFrame->FindFlyFrame(); if( pTmpFly && bCheckFlyRecur && pFly->IsUpperOf( *pTmpFly ) ) { bRet = false; @@ -261,18 +261,18 @@ static bool lcl_SetAnchor( const SwPosition& rPos, const SwNode& rNd, SwFlyFrm* const SwNodeIndex& rIdx = *pTmpFly->GetFormat()->GetContent().GetContentIdx(); SwPosition aPos( rIdx ); rAnchor.SetAnchor( &aPos ); - rNewPos = pTmpFly->Frm().Pos(); + rNewPos = pTmpFly->Frame().Pos(); } else { rAnchor.SetType( FLY_AT_PAGE ); rAnchor.SetPageNum( rDestShell.GetPageNumber( rInsPt ) ); - const SwFrm *pPg = pTmpFrm->FindPageFrm(); - rNewPos = pPg->Frm().Pos(); + const SwFrame *pPg = pTmpFrame->FindPageFrame(); + rNewPos = pPg->Frame().Pos(); } } else - rNewPos = ::lcl_FindBasePos( pTmpFrm, rInsPt ); + rNewPos = ::lcl_FindBasePos( pTmpFrame, rInsPt ); return bRet; } @@ -337,11 +337,11 @@ bool SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt, { // same shell? Then request the position // from the passed DocumentPosition - SwPosition aPos( *GetCrsr()->GetPoint() ); + SwPosition aPos( *GetCursor()->GetPoint() ); Point aPt( rInsPt ); aPt -= rSttPt - pObj->GetSnapRect().TopLeft(); - SwCrsrMoveState aState( MV_SETONLYTEXT ); - GetLayout()->GetCrsrOfst( &aPos, aPt, &aState ); + SwCursorMoveState aState( MV_SETONLYTEXT ); + GetLayout()->GetCursorOfst( &aPos, aPt, &aState ); const SwNode *pNd; if( (pNd = &aPos.nNode.GetNode())->IsNoTextNode() ) bRet = false; @@ -351,12 +351,12 @@ bool SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt, } else { - SwPaM *pCrsr = pDestShell->GetCrsr(); - if( pCrsr->GetNode().IsNoTextNode() ) + SwPaM *pCursor = pDestShell->GetCursor(); + if( pCursor->GetNode().IsNoTextNode() ) bRet = false; else - bRet = ::lcl_SetAnchor( *pCrsr->GetPoint(), - pCrsr->GetNode(), nullptr, rInsPt, + bRet = ::lcl_SetAnchor( *pCursor->GetPoint(), + pCursor->GetNode(), nullptr, rInsPt, *pDestShell, aAnchor, aNewAnch, false ); } @@ -364,10 +364,10 @@ bool SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt, else if ( FLY_AT_PAGE == aAnchor.GetAnchorId() ) { aAnchor.SetPageNum( pDestShell->GetPageNumber( rInsPt ) ); - const SwRootFrm* pTmpRoot = pDestShell->GetLayout(); - const SwFrm* pPg = pTmpRoot->GetPageAtPos( rInsPt, nullptr, true ); + const SwRootFrame* pTmpRoot = pDestShell->GetLayout(); + const SwFrame* pPg = pTmpRoot->GetPageAtPos( rInsPt, nullptr, true ); if ( pPg ) - aNewAnch = pPg->Frm().Pos(); + aNewAnch = pPg->Frame().Pos(); } if( bRet ) @@ -379,7 +379,7 @@ bool SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt, aSet.Put( aAnchor ); SdrObject* pNew = pDestDoc->CloneSdrObj( *pObj, bIsMove && GetDoc() == pDestDoc ); - pFormat = pDestDoc->getIDocumentContentOperations().InsertDrawObj( *pDestShell->GetCrsr(), *pNew, aSet ); + pFormat = pDestDoc->getIDocumentContentOperations().InsertDrawObj( *pDestShell->GetCursor(), *pNew, aSet ); } else pFormat = pDestDoc->getIDocumentLayoutAccess().CopyLayoutFormat( *pFormat, aAnchor, true, true ); @@ -465,9 +465,9 @@ bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt, // (individual boxes in the area are retrieved via the layout) SwFieldType* pTableFieldTyp = pDestShell->GetDoc()->getIDocumentFieldsAccess().GetSysFieldType( RES_TABLEFLD ); - if( IsFrmSelected() ) + if( IsFrameSelected() ) { - SwFlyFrm* pFly = GetSelectedFlyFrm(); + SwFlyFrame* pFly = GetSelectedFlyFrame(); SwFrameFormat* pFlyFormat = pFly->GetFormat(); SwFormatAnchor aAnchor( pFlyFormat->GetAnchor() ); bRet = true; @@ -482,11 +482,11 @@ bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt, { // same shell? Then request the position // from the passed DocumentPosition - SwPosition aPos( *GetCrsr()->GetPoint() ); + SwPosition aPos( *GetCursor()->GetPoint() ); Point aPt( rInsPt ); - aPt -= rSttPt - pFly->Frm().Pos(); - SwCrsrMoveState aState( MV_SETONLYTEXT ); - GetLayout()->GetCrsrOfst( &aPos, aPt, &aState ); + aPt -= rSttPt - pFly->Frame().Pos(); + SwCursorMoveState aState( MV_SETONLYTEXT ); + GetLayout()->GetCursorOfst( &aPos, aPt, &aState ); const SwNode *pNd; if( (pNd = &aPos.nNode.GetNode())->IsNoTextNode() ) bRet = false; @@ -506,11 +506,11 @@ bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt, } else { - const SwPaM *pCrsr = pDestShell->GetCrsr(); - if( pCrsr->GetNode().IsNoTextNode() ) + const SwPaM *pCursor = pDestShell->GetCursor(); + if( pCursor->GetNode().IsNoTextNode() ) bRet = false; else - bRet = ::lcl_SetAnchor( *pCrsr->GetPoint(), pCrsr->GetNode(), + bRet = ::lcl_SetAnchor( *pCursor->GetPoint(), pCursor->GetNode(), pFly, rInsPt, *pDestShell, aAnchor, aNewAnch, GetDoc() == pDestShell->GetDoc()); } @@ -518,10 +518,10 @@ bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt, else if ( FLY_AT_PAGE == aAnchor.GetAnchorId() ) { aAnchor.SetPageNum( pDestShell->GetPageNumber( rInsPt ) ); - const SwRootFrm* pTmpRoot = pDestShell->GetLayout(); - const SwFrm* pPg = pTmpRoot->GetPageAtPos( rInsPt, nullptr, true ); + const SwRootFrame* pTmpRoot = pDestShell->GetLayout(); + const SwFrame* pPg = pTmpRoot->GetPageAtPos( rInsPt, nullptr, true ); if ( pPg ) - aNewAnch = pPg->Frm().Pos(); + aNewAnch = pPg->Frame().Pos(); } else { OSL_ENSURE( false, "what anchor is it?" ); @@ -536,12 +536,12 @@ bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt, { Point aPos( rInsPt ); aPos -= aNewAnch; - aPos -= rSttPt - pFly->Frm().Pos(); + aPos -= rSttPt - pFly->Frame().Pos(); pFlyFormat->SetFormatAttr( SwFormatHoriOrient( aPos.getX(),text::HoriOrientation::NONE, text::RelOrientation::FRAME ) ); pFlyFormat->SetFormatAttr( SwFormatVertOrient( aPos.getY(),text::VertOrientation::NONE, text::RelOrientation::FRAME ) ); } - const Point aPt( pDestShell->GetCrsrDocPos() ); + const Point aPt( pDestShell->GetCursorDocPos() ); if( bIsMove ) GetDoc()->getIDocumentLayoutAccess().DelLayoutFormat( pOldFormat ); @@ -549,12 +549,12 @@ bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt, // only select if it can be shifted/copied in the same shell if( bSelectInsert ) { - SwFlyFrm* pFlyFrm = static_cast<SwFlyFrameFormat*>(pFlyFormat)->GetFrm( &aPt ); - if( pFlyFrm ) + SwFlyFrame* pFlyFrame = static_cast<SwFlyFrameFormat*>(pFlyFormat)->GetFrame( &aPt ); + if( pFlyFrame ) { - //JP 12.05.98: should this be in SelectFlyFrm??? + //JP 12.05.98: should this be in SelectFlyFrame??? pDestShell->Imp()->GetDrawView()->UnmarkAll(); - pDestShell->SelectFlyFrm( *pFlyFrm, true ); + pDestShell->SelectFlyFrame( *pFlyFrame, true ); } } @@ -580,24 +580,24 @@ bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt, SwPosition* pDstPos = nullptr; if( this == pDestShell ) { - // same shell? Then create new Crsr at the + // same shell? Then create new Cursor at the // DocumentPosition passed - pDstPos = new SwPosition( *GetCrsr()->GetPoint() ); + pDstPos = new SwPosition( *GetCursor()->GetPoint() ); Point aPt( rInsPt ); - GetLayout()->GetCrsrOfst( pDstPos, aPt ); + GetLayout()->GetCursorOfst( pDstPos, aPt ); if( !pDstPos->nNode.GetNode().IsNoTextNode() ) bRet = true; } - else if( !pDestShell->GetCrsr()->GetNode().IsNoTextNode() ) + else if( !pDestShell->GetCursor()->GetNode().IsNoTextNode() ) { - pDstPos = new SwPosition( *pDestShell->GetCrsr()->GetPoint() ); + pDstPos = new SwPosition( *pDestShell->GetCursor()->GetPoint() ); bRet = true; } if( bRet ) { if( GetDoc() == pDestShell->GetDoc() ) - ParkTableCrsr(); + ParkTableCursor(); bRet = pDestShell->GetDoc()->InsCopyOfTable( *pDstPos, aBoxes,nullptr, bIsMove && this == pDestShell && @@ -606,16 +606,16 @@ bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt, this != pDestShell ); if( this != pDestShell ) - *pDestShell->GetCrsr()->GetPoint() = *pDstPos; + *pDestShell->GetCursor()->GetPoint() = *pDstPos; - // create all parked Crsr? + // create all parked Cursor? if( GetDoc() == pDestShell->GetDoc() ) - GetCrsr(); + GetCursor(); // JP 16.04.99: Bug 64908 - Set InsPos, to assure the parked // Cursor is positioned at the insert position if( this == pDestShell ) - GetCrsrDocPos() = rInsPt; + GetCursorDocPos() = rInsPt; } delete pDstPos; } @@ -627,12 +627,12 @@ bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt, { // same shell? then request the position // at the passed document position - SwPosition aPos( *GetCrsr()->GetPoint() ); + SwPosition aPos( *GetCursor()->GetPoint() ); Point aPt( rInsPt ); - GetLayout()->GetCrsrOfst( &aPos, aPt ); + GetLayout()->GetCursorOfst( &aPos, aPt ); bRet = !aPos.nNode.GetNode().IsNoTextNode(); } - else if( pDestShell->GetCrsr()->GetNode().IsNoTextNode() ) + else if( pDestShell->GetCursor()->GetNode().IsNoTextNode() ) bRet = false; if( bRet ) @@ -722,18 +722,18 @@ bool SwFEShell::Paste( SwDoc* pClpDoc, bool bIncludingPageFrames ) - aCpyPam.GetMark()->nNode.GetIndex(); sal_uInt32 nCount = nSelCount; SwNodeIndex aClpIdx( aIdx ); - SwPaM* pStartCursor = GetCrsr(); - SwPaM* pCurrCrsr = pStartCursor; + SwPaM* pStartCursor = GetCursor(); + SwPaM* pCurrCursor = pStartCursor; sal_uInt32 nCursorCount = pStartCursor->GetRingContainer().size(); // If the target selection is a multi-selection, often the last and first // cursor of the ring points to identical document positions. Then // we should avoid double insertion of text portions... - while( nCursorCount > 1 && *pCurrCrsr->GetPoint() == - *(pCurrCrsr->GetPrev()->GetPoint()) ) + while( nCursorCount > 1 && *pCurrCursor->GetPoint() == + *(pCurrCursor->GetPrev()->GetPoint()) ) { --nCursorCount; - pCurrCrsr = pCurrCrsr->GetNext(); - pStartCursor = pCurrCrsr; + pCurrCursor = pCurrCursor->GetNext(); + pStartCursor = pCurrCursor; } SwPosition aStartPos( *pStartCursor->GetPoint() ); SwPosition aInsertPos( aStartPos ); // first insertion position @@ -749,23 +749,23 @@ bool SwFEShell::Paste( SwDoc* pClpDoc, bool bIncludingPageFrames ) PositionPtr( new SwPosition( aInsertPos ) ) ); ++aIdx; aInsertion.first->SetMark(); - if( pStartCursor == pCurrCrsr->GetNext() ) + if( pStartCursor == pCurrCursor->GetNext() ) { // Now we have to look for insertion positions... if( !nMove ) // Annotate the last given insert position aStartPos = aInsertPos; - SwCursor aCrsr( aStartPos, nullptr, false); + SwCursor aCursor( aStartPos, nullptr, false); // Check if we find another insert position by moving // down the last given position - if( aCrsr.UpDown( false, ++nMove, nullptr, 0 ) ) - aInsertPos = *aCrsr.GetPoint(); + if( aCursor.UpDown( false, ++nMove, nullptr, 0 ) ) + aInsertPos = *aCursor.GetPoint(); else // if there is no paragraph we have to create it bCompletePara = nCount > 0; nCursorCount = 0; } else // as long as we find more insert positions in the cursor ring { // we'll take them - pCurrCrsr = pCurrCrsr->GetNext(); - aInsertPos = *pCurrCrsr->GetPoint(); + pCurrCursor = pCurrCursor->GetNext(); + aInsertPos = *pCurrCursor->GetPoint(); --nCursorCount; } // If there are no more paragraphs e.g. at the end of a document, @@ -819,7 +819,7 @@ bool SwFEShell::Paste( SwDoc* pClpDoc, bool bIncludingPageFrames ) { bool bDelTable = true; - for(SwPaM& rPaM : GetCrsr()->GetRingContainer()) + for(SwPaM& rPaM : GetCursor()->GetRingContainer()) { if( pSrcNd && @@ -832,7 +832,7 @@ bool SwFEShell::Paste( SwDoc* pClpDoc, bool bIncludingPageFrames ) { SwPosition aDestPos( *rPaM.GetPoint() ); - bool bParkTableCrsr = false; + bool bParkTableCursor = false; const SwStartNode* pSttNd = rPaM.GetNode().FindTableBoxStartNode(); // TABLE IN TABLE: copy table in table @@ -841,8 +841,8 @@ bool SwFEShell::Paste( SwDoc* pClpDoc, bool bIncludingPageFrames ) if( IsTableMode() ) // table selection? { GetTableSel( *this, aBoxes ); - ParkTableCrsr(); - bParkTableCrsr = true; + ParkTableCursor(); + bParkTableCursor = true; } else if( !PamHasSelection(rPaM) && rPaM.GetNext() == &rPaM && ( !pSrcNd->GetTable().IsTableComplex() || @@ -856,7 +856,7 @@ bool SwFEShell::Paste( SwDoc* pClpDoc, bool bIncludingPageFrames ) } SwNodeIndex aNdIdx( *pDestNd->EndOfSectionNode()); - if( !bParkTableCrsr ) + if( !bParkTableCursor ) { // exit first the complete table // ???? what about only table in a frame ????? @@ -869,8 +869,8 @@ bool SwFEShell::Paste( SwDoc* pClpDoc, bool bIncludingPageFrames ) bRet = GetDoc()->InsCopyOfTable( aDestPos, aBoxes, &pSrcNd->GetTable() ); - if( bParkTableCrsr ) - GetCrsr(); + if( bParkTableCursor ) + GetCursor(); else { // return to the box @@ -986,11 +986,11 @@ bool SwFEShell::Paste( SwDoc* pClpDoc, bool bIncludingPageFrames ) { if( RES_FLYFRMFMT == pNew->Which() ) { - const Point aPt( GetCrsrDocPos() ); - SwFlyFrm* pFlyFrm = static_cast<SwFlyFrameFormat*>(pNew)-> - GetFrm( &aPt ); - if( pFlyFrm ) - SelectFlyFrm( *pFlyFrm, true ); + const Point aPt( GetCursorDocPos() ); + SwFlyFrame* pFlyFrame = static_cast<SwFlyFrameFormat*>(pNew)-> + GetFrame( &aPt ); + if( pFlyFrame ) + SelectFlyFrame( *pFlyFrame, true ); // always pick the first FlyFrame only; the others // were copied to the clipboard via Fly in Fly break; @@ -1133,7 +1133,7 @@ bool SwFEShell::PastePages( SwFEShell& rToFill, sal_uInt16 nStartPage, sal_uInt1 return false; } MovePage( fnPageCurr, fnPageStart ); - SwPaM aCpyPam( *GetCrsr()->GetPoint() ); + SwPaM aCpyPam( *GetCursor()->GetPoint() ); OUString sStartingPageDesc = GetPageDesc( GetCurPageDesc()).GetName(); SwPageDesc* pDesc = rToFill.FindPageDescByName( sStartingPageDesc, true ); if( pDesc ) @@ -1162,7 +1162,7 @@ bool SwFEShell::PastePages( SwFEShell& rToFill, sal_uInt16 nStartPage, sal_uInt1 MovePage( fnPageCurr, fnPageEnd ); aCpyPam.SetMark(); - *aCpyPam.GetMark() = *GetCrsr()->GetPoint(); + *aCpyPam.GetMark() = *GetCursor()->GetPoint(); SET_CURR_SHELL( this ); @@ -1266,7 +1266,7 @@ bool SwFEShell::GetDrawObjGraphic( SotClipboardFormatId nFormat, Graphic& rGrf ) // Not the original size, but the current one. // Otherwise it could happen that for vector graphics // many MB's of memory are allocated. - const Size aSz( GetSelectedFlyFrm()->Prt().SSize() ); + const Size aSz( GetSelectedFlyFrame()->Prt().SSize() ); ScopedVclPtrInstance< VirtualDevice > pVirtDev(*GetWin()); MapMode aTmp( MAP_TWIP ); @@ -1373,14 +1373,14 @@ void SwFEShell::Paste( SvStream& rStrm, SwPasteSdr nAction, const Point* pPt ) case SwPasteSdr::Replace: { const SwFrameFormat* pFormat(nullptr); - const SwFrm* pAnchor(nullptr); + const SwFrame* pAnchor(nullptr); if( dynamic_cast<const SwVirtFlyDrawObj*>( pOldObj) != nullptr ) { pFormat = FindFrameFormat( pOldObj ); Point aNullPt; - SwFlyFrm* pFlyFrm = static_cast<const SwFlyFrameFormat*>(pFormat)->GetFrm( &aNullPt ); - pAnchor = pFlyFrm ? pFlyFrm->GetAnchorFrm() : nullptr; + SwFlyFrame* pFlyFrame = static_cast<const SwFlyFrameFormat*>(pFormat)->GetFrame( &aNullPt ); + pAnchor = pFlyFrame ? pFlyFrame->GetAnchorFrame() : nullptr; if (!pAnchor || pAnchor->FindFooterOrHeader()) { @@ -1414,14 +1414,14 @@ void SwFEShell::Paste( SvStream& rStrm, SwPasteSdr nAction, const Point* pPt ) if( dynamic_cast<const SwVirtFlyDrawObj*>( pOldObj) != nullptr ) { // store attributes, then set SdrObject - SfxItemSet aFrmSet( mpDoc->GetAttrPool(), + SfxItemSet aFrameSet( mpDoc->GetAttrPool(), RES_SURROUND, RES_ANCHOR ); - aFrmSet.Set( pFormat->GetAttrSet() ); + aFrameSet.Set( pFormat->GetAttrSet() ); Point aNullPt; - if( pAnchor->IsTextFrm() && static_cast<const SwTextFrm*>(pAnchor)->IsFollow() ) + if( pAnchor->IsTextFrame() && static_cast<const SwTextFrame*>(pAnchor)->IsFollow() ) { - const SwTextFrm* pTmp = static_cast<const SwTextFrm*>(pAnchor); + const SwTextFrame* pTmp = static_cast<const SwTextFrame*>(pAnchor); do { pTmp = pTmp->FindMaster(); OSL_ENSURE( pTmp, "Where's my Master?" ); @@ -1433,7 +1433,7 @@ void SwFEShell::Paste( SvStream& rStrm, SwPasteSdr nAction, const Point* pPt ) else aNullPt = aOldObjRect.TopLeft(); - Point aNewAnchor = pAnchor->GetFrmAnchorPos( ::HasWrap( pOldObj ) ); + Point aNewAnchor = pAnchor->GetFrameAnchorPos( ::HasWrap( pOldObj ) ); // OD 2004-04-05 #i26791# - direct positioning of Writer // fly frame object for <SwDoc::Insert(..)> pNewObj->NbcSetRelativePos( aNullPt - aNewAnchor ); @@ -1443,7 +1443,7 @@ void SwFEShell::Paste( SvStream& rStrm, SwPasteSdr nAction, const Point* pPt ) DelSelectedObj(); - GetDoc()->getIDocumentContentOperations().InsertDrawObj( *GetCrsr(), *pNewObj, aFrmSet ); + GetDoc()->getIDocumentContentOperations().InsertDrawObj( *GetCursor(), *pNewObj, aFrameSet ); } else { diff --git a/sw/source/core/frmedt/fedesc.cxx b/sw/source/core/frmedt/fedesc.cxx index 95cee40fa3e7..072c0b2f0ea8 100644 --- a/sw/source/core/frmedt/fedesc.cxx +++ b/sw/source/core/frmedt/fedesc.cxx @@ -52,11 +52,11 @@ void SwFEShell::ChgCurPageDesc( const SwPageDesc& rDesc ) StartAllAction(); - SwPageFrm *pPage = GetCurrFrm()->FindPageFrm(); - const SwFrm *pFlow = nullptr; + SwPageFrame *pPage = GetCurrFrame()->FindPageFrame(); + const SwFrame *pFlow = nullptr; ::boost::optional<sal_uInt16> oPageNumOffset; - OSL_ENSURE( !GetCrsr()->HasMark(), "ChgCurPageDesc only without selection!"); + OSL_ENSURE( !GetCursor()->HasMark(), "ChgCurPageDesc only without selection!"); SET_CURR_SHELL( this ); while ( pPage ) @@ -65,7 +65,7 @@ void SwFEShell::ChgCurPageDesc( const SwPageDesc& rDesc ) if ( pFlow ) { if ( pFlow->IsInTab() ) - pFlow = pFlow->FindTabFrm(); + pFlow = pFlow->FindTabFrame(); const SwFormatPageDesc& rPgDesc = pFlow->GetAttrSet()->GetPageDesc(); if( rPgDesc.GetPageDesc() ) { @@ -74,15 +74,15 @@ void SwFEShell::ChgCurPageDesc( const SwPageDesc& rDesc ) break; } } - pPage = static_cast<SwPageFrm*>( pPage->GetPrev() ); + pPage = static_cast<SwPageFrame*>( pPage->GetPrev() ); } if ( !pPage ) { - pPage = static_cast<SwPageFrm*>(GetLayout()->Lower()); + pPage = static_cast<SwPageFrame*>(GetLayout()->Lower()); pFlow = pPage->FindFirstBodyContent(); if ( !pFlow ) { - pPage = static_cast<SwPageFrm*>(pPage->GetNext()); + pPage = static_cast<SwPageFrame*>(pPage->GetNext()); pFlow = pPage->FindFirstBodyContent(); OSL_ENSURE( pFlow, "Dokuemnt ohne Inhalt?!?" ); } @@ -93,10 +93,10 @@ void SwFEShell::ChgCurPageDesc( const SwPageDesc& rDesc ) aNew.SetNumOffset( oPageNumOffset ); if ( pFlow->IsInTab() ) - GetDoc()->SetAttr( aNew, *const_cast<SwFormat*>(static_cast<SwFormat const *>(pFlow->FindTabFrm()->GetFormat())) ); + GetDoc()->SetAttr( aNew, *const_cast<SwFormat*>(static_cast<SwFormat const *>(pFlow->FindTabFrame()->GetFormat())) ); else { - SwPaM aPaM( *static_cast<const SwContentFrm*>(pFlow)->GetNode() ); + SwPaM aPaM( *static_cast<const SwContentFrame*>(pFlow)->GetNode() ); GetDoc()->getIDocumentContentOperations().InsertPoolItem( aPaM, aNew ); } EndAllActionAndCall(); @@ -143,12 +143,12 @@ size_t SwFEShell::GetMousePageDesc( const Point &rPt ) const { if( GetLayout() ) { - const SwPageFrm* pPage = - static_cast<const SwPageFrm*>( GetLayout()->Lower() ); + const SwPageFrame* pPage = + static_cast<const SwPageFrame*>( GetLayout()->Lower() ); if( pPage ) { - while( pPage->GetNext() && rPt.Y() > pPage->Frm().Bottom() ) - pPage = static_cast<const SwPageFrm*>( pPage->GetNext() ); + while( pPage->GetNext() && rPt.Y() > pPage->Frame().Bottom() ) + pPage = static_cast<const SwPageFrame*>( pPage->GetNext() ); SwDoc *pMyDoc = GetDoc(); size_t nPos; if (pMyDoc->ContainsPageDesc( pPage->GetPageDesc(), &nPos ) ) @@ -158,12 +158,12 @@ size_t SwFEShell::GetMousePageDesc( const Point &rPt ) const return 0; } -size_t SwFEShell::GetCurPageDesc( const bool bCalcFrm ) const +size_t SwFEShell::GetCurPageDesc( const bool bCalcFrame ) const { - const SwFrm *pFrm = GetCurrFrm( bCalcFrm ); - if ( pFrm ) + const SwFrame *pFrame = GetCurrFrame( bCalcFrame ); + if ( pFrame ) { - const SwPageFrm *pPage = pFrm->FindPageFrm(); + const SwPageFrame *pPage = pFrame->FindPageFrame(); if ( pPage ) { size_t nPos; @@ -179,45 +179,45 @@ size_t SwFEShell::GetCurPageDesc( const bool bCalcFrm ) const const SwPageDesc* SwFEShell::GetSelectedPageDescs() const { const SwContentNode* pCNd; - const SwFrm* pMkFrm, *pPtFrm; + const SwFrame* pMkFrame, *pPtFrame; const SwPageDesc* pFnd, *pRetDesc = reinterpret_cast<SwPageDesc*>(sal_IntPtr(-1)); const Point aNulPt; - for(SwPaM& rPaM : GetCrsr()->GetRingContainer()) + for(SwPaM& rPaM : GetCursor()->GetRingContainer()) { if( nullptr != (pCNd = rPaM.GetContentNode() ) && - nullptr != ( pPtFrm = pCNd->getLayoutFrm( GetLayout(), &aNulPt, nullptr, false )) ) - pPtFrm = pPtFrm->FindPageFrm(); + nullptr != ( pPtFrame = pCNd->getLayoutFrame( GetLayout(), &aNulPt, nullptr, false )) ) + pPtFrame = pPtFrame->FindPageFrame(); else - pPtFrm = nullptr; + pPtFrame = nullptr; if( rPaM.HasMark() && nullptr != (pCNd = rPaM.GetContentNode( false ) ) && - nullptr != ( pMkFrm = pCNd->getLayoutFrm( GetLayout(), &aNulPt, nullptr, false )) ) - pMkFrm = pMkFrm->FindPageFrm(); + nullptr != ( pMkFrame = pCNd->getLayoutFrame( GetLayout(), &aNulPt, nullptr, false )) ) + pMkFrame = pMkFrame->FindPageFrame(); else - pMkFrm = pPtFrm; + pMkFrame = pPtFrame; - if( !pMkFrm || !pPtFrm ) + if( !pMkFrame || !pPtFrame ) pFnd = nullptr; - else if( pMkFrm == pPtFrm ) - pFnd = static_cast<const SwPageFrm*>(pMkFrm)->GetPageDesc(); + else if( pMkFrame == pPtFrame ) + pFnd = static_cast<const SwPageFrame*>(pMkFrame)->GetPageDesc(); else { - // swap pointer if PtFrm before MkFrm - if( static_cast<const SwPageFrm*>(pMkFrm)->GetPhyPageNum() > - static_cast<const SwPageFrm*>(pPtFrm)->GetPhyPageNum() ) + // swap pointer if PtFrame before MkFrame + if( static_cast<const SwPageFrame*>(pMkFrame)->GetPhyPageNum() > + static_cast<const SwPageFrame*>(pPtFrame)->GetPhyPageNum() ) { - const SwFrm* pTmp = pMkFrm; pMkFrm = pPtFrm; pPtFrm = pTmp; + const SwFrame* pTmp = pMkFrame; pMkFrame = pPtFrame; pPtFrame = pTmp; } - // now check from MkFrm to PtFrm for equal PageDescs - pFnd = static_cast<const SwPageFrm*>(pMkFrm)->GetPageDesc(); - while( pFnd && pMkFrm != pPtFrm ) + // now check from MkFrame to PtFrame for equal PageDescs + pFnd = static_cast<const SwPageFrame*>(pMkFrame)->GetPageDesc(); + while( pFnd && pMkFrame != pPtFrame ) { - pMkFrm = pMkFrm->GetNext(); - if( !pMkFrm || pFnd != static_cast<const SwPageFrm*>(pMkFrm)->GetPageDesc() ) + pMkFrame = pMkFrame->GetNext(); + if( !pMkFrame || pFnd != static_cast<const SwPageFrame*>(pMkFrame)->GetPageDesc() ) pFnd = nullptr; } } diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index 6daaa57bc1b7..e41ae588bd58 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -89,8 +89,8 @@ static bool lcl_SetNewFlyPos( const SwNode& rNode, SwFormatAnchor& rAnchor, else { const SwContentNode *pCntNd = rNode.GetContentNode(); - const SwContentFrm* pCFrm = pCntNd ? pCntNd->getLayoutFrm( pCntNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &rPt, nullptr, false ) : nullptr; - const SwPageFrm *pPg = pCFrm ? pCFrm->FindPageFrm() : nullptr; + const SwContentFrame* pCFrame = pCntNd ? pCntNd->getLayoutFrame( pCntNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &rPt, nullptr, false ) : nullptr; + const SwPageFrame *pPg = pCFrame ? pCFrame->FindPageFrame() : nullptr; rAnchor.SetPageNum( pPg ? pPg->GetPhyPageNum() : 1 ); rAnchor.SetType( FLY_AT_PAGE ); @@ -101,13 +101,13 @@ static bool lcl_SetNewFlyPos( const SwNode& rNode, SwFormatAnchor& rAnchor, static bool lcl_FindAnchorPos( SwDoc& rDoc, const Point& rPt, - const SwFrm& rFrm, + const SwFrame& rFrame, SfxItemSet& rSet ) { bool bRet = true; SwFormatAnchor aNewAnch( static_cast<const SwFormatAnchor&>(rSet.Get( RES_ANCHOR )) ); RndStdIds nNew = aNewAnch.GetAnchorId(); - const SwFrm *pNewAnch; + const SwFrame *pNewAnch; //determine new anchor Point aTmpPnt( rPt ); @@ -118,36 +118,36 @@ static bool lcl_FindAnchorPos( case FLY_AT_CHAR: // LAYER_IMPL { // starting from the upper-left corner of the Fly, - // search nearest ContentFrm - const SwFrm* pFrm = rFrm.IsFlyFrm() ? static_cast<const SwFlyFrm&>(rFrm).GetAnchorFrm() - : &rFrm; - pNewAnch = ::FindAnchor( pFrm, aTmpPnt ); + // search nearest ContentFrame + const SwFrame* pFrame = rFrame.IsFlyFrame() ? static_cast<const SwFlyFrame&>(rFrame).GetAnchorFrame() + : &rFrame; + pNewAnch = ::FindAnchor( pFrame, aTmpPnt ); if( pNewAnch->IsProtected() ) { bRet = false; break; } - SwPosition aPos( *static_cast<const SwContentFrm*>(pNewAnch)->GetNode() ); + SwPosition aPos( *static_cast<const SwContentFrame*>(pNewAnch)->GetNode() ); if ((FLY_AT_CHAR == nNew) || (FLY_AS_CHAR == nNew)) { // textnode should be found, as only in those // a content bound frame can be anchored - SwCrsrMoveState aState( MV_SETONLYTEXT ); + SwCursorMoveState aState( MV_SETONLYTEXT ); aTmpPnt.setX(aTmpPnt.getX() - 1); // do not land in the fly! - if( !pNewAnch->GetCrsrOfst( &aPos, aTmpPnt, &aState ) ) + if( !pNewAnch->GetCursorOfst( &aPos, aTmpPnt, &aState ) ) { - SwContentNode* pCNd = const_cast<SwContentFrm*>(static_cast<const SwContentFrm*>(pNewAnch))->GetNode(); - if( pNewAnch->Frm().Bottom() < aTmpPnt.Y() ) + SwContentNode* pCNd = const_cast<SwContentFrame*>(static_cast<const SwContentFrame*>(pNewAnch))->GetNode(); + if( pNewAnch->Frame().Bottom() < aTmpPnt.Y() ) pCNd->MakeStartIndex( &aPos.nContent ); else pCNd->MakeEndIndex( &aPos.nContent ); } else { - if ( SwCrsrShell::PosInsideInputField( aPos ) ) + if ( SwCursorShell::PosInsideInputField( aPos ) ) { - aPos.nContent = SwCrsrShell::StartOfInputFieldAtPos( aPos ); + aPos.nContent = SwCursorShell::StartOfInputFieldAtPos( aPos ); } } } @@ -158,18 +158,18 @@ static bool lcl_FindAnchorPos( case FLY_AT_FLY: // LAYER_IMPL { // starting from the upper-left corner of the Fly - // search nearest SwFlyFrm - SwCrsrMoveState aState( MV_SETONLYTEXT ); + // search nearest SwFlyFrame + SwCursorMoveState aState( MV_SETONLYTEXT ); SwPosition aPos( rDoc.GetNodes() ); aTmpPnt.setX(aTmpPnt.getX() - 1); // do not land in the fly! - rDoc.getIDocumentLayoutAccess().GetCurrentLayout()->GetCrsrOfst( &aPos, aTmpPnt, &aState ); + rDoc.getIDocumentLayoutAccess().GetCurrentLayout()->GetCursorOfst( &aPos, aTmpPnt, &aState ); pNewAnch = ::FindAnchor( - aPos.nNode.GetNode().GetContentNode()->getLayoutFrm( rFrm.getRootFrm(), nullptr, nullptr, false ), - aTmpPnt )->FindFlyFrm(); + aPos.nNode.GetNode().GetContentNode()->getLayoutFrame( rFrame.getRootFrame(), nullptr, nullptr, false ), + aTmpPnt )->FindFlyFrame(); - if( pNewAnch && &rFrm != pNewAnch && !pNewAnch->IsProtected() ) + if( pNewAnch && &rFrame != pNewAnch && !pNewAnch->IsProtected() ) { - aPos.nNode = *static_cast<const SwFlyFrm*>(pNewAnch)->GetFormat()->GetContent(). + aPos.nNode = *static_cast<const SwFlyFrame*>(pNewAnch)->GetFormat()->GetContent(). GetContentIdx(); aNewAnch.SetAnchor( &aPos ); break; @@ -180,7 +180,7 @@ static bool lcl_FindAnchorPos( // no break case FLY_AT_PAGE: - pNewAnch = rFrm.FindPageFrm(); + pNewAnch = rFrame.FindPageFrame(); aNewAnch.SetPageNum( pNewAnch->GetPhyPageNum() ); break; @@ -195,7 +195,7 @@ static bool lcl_FindAnchorPos( //! also used in unoframe.cxx bool sw_ChkAndSetNewAnchor( - const SwFlyFrm& rFly, + const SwFlyFrame& rFly, SfxItemSet& rSet ) { const SwFrameFormat& rFormat = *rFly.GetFormat(); @@ -216,10 +216,10 @@ bool sw_ChkAndSetNewAnchor( "forbidden anchor change in Head/Foot." ); #endif - return ::lcl_FindAnchorPos( *pDoc, rFly.Frm().Pos(), rFly, rSet ); + return ::lcl_FindAnchorPos( *pDoc, rFly.Frame().Pos(), rFly, rSet ); } -void SwFEShell::SelectFlyFrm( SwFlyFrm& rFrm, bool bNew ) +void SwFEShell::SelectFlyFrame( SwFlyFrame& rFrame, bool bNew ) { SET_CURR_SHELL( this ); @@ -233,29 +233,29 @@ void SwFEShell::SelectFlyFrm( SwFlyFrm& rFrm, bool bNew ) SwViewShellImp *pImpl = Imp(); if( GetWin() && (bNew || !pImpl->GetDrawView()->AreObjectsMarked()) ) { - OSL_ENSURE( rFrm.IsFlyFrm(), "SelectFlyFrm will einen Fly" ); + OSL_ENSURE( rFrame.IsFlyFrame(), "SelectFlyFrame will einen Fly" ); // nothing to be done if the Fly already was selected - if (GetSelectedFlyFrm() == &rFrm) + if (GetSelectedFlyFrame() == &rFrame) return; // assure the anchor is drawn - if( rFrm.IsFlyInCntFrm() && rFrm.GetAnchorFrm() ) - rFrm.GetAnchorFrm()->SetCompletePaint(); + if( rFrame.IsFlyInContentFrame() && rFrame.GetAnchorFrame() ) + rFrame.GetAnchorFrame()->SetCompletePaint(); if( pImpl->GetDrawView()->AreObjectsMarked() ) pImpl->GetDrawView()->UnmarkAll(); - pImpl->GetDrawView()->MarkObj( rFrm.GetVirtDrawObj(), + pImpl->GetDrawView()->MarkObj( rFrame.GetVirtDrawObj(), pImpl->GetPageView() ); KillPams(); ClearMark(); - SelFlyGrabCrsr(); + SelFlyGrabCursor(); } } // Get selected fly -SwFlyFrm* SwFEShell::GetSelectedFlyFrm() const +SwFlyFrame* SwFEShell::GetSelectedFlyFrame() const { if ( Imp()->HasDrawView() ) { @@ -268,25 +268,25 @@ SwFlyFrm* SwFEShell::GetSelectedFlyFrm() const SwVirtFlyDrawObj *pFlyObj = dynamic_cast<SwVirtFlyDrawObj*>(pO); - return pFlyObj ? pFlyObj->GetFlyFrm() : nullptr; + return pFlyObj ? pFlyObj->GetFlyFrame() : nullptr; } return nullptr; } // Get current fly in which the cursor is positioned -SwFlyFrm* SwFEShell::GetCurrFlyFrm(const bool bCalcFrm) const +SwFlyFrame* SwFEShell::GetCurrFlyFrame(const bool bCalcFrame) const { - SwContentFrm *pContent = GetCurrFrm(bCalcFrm); - return pContent ? pContent->FindFlyFrm() : nullptr; + SwContentFrame *pContent = GetCurrFrame(bCalcFrame); + return pContent ? pContent->FindFlyFrame() : nullptr; } // Get selected fly, but if none Get current fly in which the cursor is positioned -SwFlyFrm* SwFEShell::GetSelectedOrCurrFlyFrm(const bool bCalcFrm) const +SwFlyFrame* SwFEShell::GetSelectedOrCurrFlyFrame(const bool bCalcFrame) const { - SwFlyFrm *pFly = GetSelectedFlyFrm(); + SwFlyFrame *pFly = GetSelectedFlyFrame(); if (pFly) return pFly; - return GetCurrFlyFrm(bCalcFrm); + return GetCurrFlyFrame(bCalcFrame); } // Returns non-null pointer, if the current Fly could be anchored to another one (so it is inside) @@ -300,7 +300,7 @@ const SwFrameFormat* SwFEShell::IsFlyInFly() const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList(); if ( !rMrkList.GetMarkCount() ) { - SwFlyFrm *pFly = GetCurrFlyFrm(false); + SwFlyFrame *pFly = GetCurrFlyFrame(false); if (!pFly) return nullptr; return pFly->GetFormat(); @@ -314,37 +314,37 @@ const SwFrameFormat* SwFEShell::IsFlyInFly() SwFrameFormat *pFormat = FindFrameFormat( pObj ); if( pFormat && FLY_AT_FLY == pFormat->GetAnchor().GetAnchorId() ) { - const SwFrm* pFly; + const SwFrame* pFly; if (SwVirtFlyDrawObj* pFlyObj = dynamic_cast<SwVirtFlyDrawObj *>(pObj)) { - pFly = pFlyObj->GetFlyFrm()->GetAnchorFrm(); + pFly = pFlyObj->GetFlyFrame()->GetAnchorFrame(); } else { - pFly = static_cast<SwDrawContact*>(GetUserCall(pObj))->GetAnchorFrm(pObj); + pFly = static_cast<SwDrawContact*>(GetUserCall(pObj))->GetAnchorFrame(pObj); } OSL_ENSURE( pFly, "IsFlyInFly: Where's my anchor?" ); - OSL_ENSURE( pFly->IsFlyFrm(), "IsFlyInFly: Funny anchor!" ); - return static_cast<const SwFlyFrm*>(pFly)->GetFormat(); + OSL_ENSURE( pFly->IsFlyFrame(), "IsFlyInFly: Funny anchor!" ); + return static_cast<const SwFlyFrame*>(pFly)->GetFormat(); } Point aTmpPos = pObj->GetCurrentBoundRect().TopLeft(); - SwFrm *pTextFrm; + SwFrame *pTextFrame; { - SwCrsrMoveState aState( MV_SETONLYTEXT ); + SwCursorMoveState aState( MV_SETONLYTEXT ); SwNodeIndex aSwNodeIndex( GetDoc()->GetNodes() ); SwPosition aPos( aSwNodeIndex ); Point aPoint( aTmpPos ); aPoint.setX(aPoint.getX() - 1); //do not land in the fly!! - GetLayout()->GetCrsrOfst( &aPos, aPoint, &aState ); + GetLayout()->GetCursorOfst( &aPos, aPoint, &aState ); // determine text frame by left-top-corner of object SwContentNode *pNd = aPos.nNode.GetNode().GetContentNode(); - pTextFrm = pNd ? pNd->getLayoutFrm(GetLayout(), &aTmpPos, nullptr, false) : nullptr; + pTextFrame = pNd ? pNd->getLayoutFrame(GetLayout(), &aTmpPos, nullptr, false) : nullptr; } - const SwFrm *pTmp = pTextFrm ? ::FindAnchor(pTextFrm, aTmpPos) : nullptr; - const SwFlyFrm *pFly = pTmp ? pTmp->FindFlyFrm() : nullptr; + const SwFrame *pTmp = pTextFrame ? ::FindAnchor(pTextFrame, aTmpPos) : nullptr; + const SwFlyFrame *pFly = pTmp ? pTmp->FindFlyFrame() : nullptr; if( pFly ) return pFly->GetFormat(); return nullptr; @@ -355,7 +355,7 @@ void SwFEShell::SetFlyPos( const Point& rAbsPos ) SET_CURR_SHELL( this ); // Determine reference point in document coordinates - SwFlyFrm *pFly = GetCurrFlyFrm(false); + SwFlyFrame *pFly = GetCurrFlyFrame(false); if (!pFly) return; @@ -363,14 +363,14 @@ void SwFEShell::SetFlyPos( const Point& rAbsPos ) // Set an anchor starting from the absolute position for paragraph bound Flys // Anchor and new RelPos will be calculated and set by the Fly - if ( pFly->IsFlyAtCntFrm() ) - static_cast<SwFlyAtCntFrm*>(pFly)->SetAbsPos( rAbsPos ); + if ( pFly->IsFlyAtContentFrame() ) + static_cast<SwFlyAtContentFrame*>(pFly)->SetAbsPos( rAbsPos ); else { - const SwFrm *pAnch = pFly->GetAnchorFrm(); - Point aOrient( pAnch->Frm().Pos() ); + const SwFrame *pAnch = pFly->GetAnchorFrame(); + Point aOrient( pAnch->Frame().Pos() ); - if ( pFly->IsFlyInCntFrm() ) + if ( pFly->IsFlyInContentFrame() ) aOrient.setX(rAbsPos.getX()); // calculate RelPos. @@ -406,19 +406,19 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, bool bMoveIt ) bool bFlyFrame = dynamic_cast<SwVirtFlyDrawObj *>(pObj) != nullptr; - SwFlyFrm* pFly = nullptr; - const SwFrm* pFooterOrHeader = nullptr; + SwFlyFrame* pFly = nullptr; + const SwFrame* pFooterOrHeader = nullptr; if( bFlyFrame ) { // Calculate reference point in document coordinates - SwContentFrm *pContent = GetCurrFrm( false ); + SwContentFrame *pContent = GetCurrFrame( false ); if( !pContent ) return aRet; - pFly = pContent->FindFlyFrm(); + pFly = pContent->FindFlyFrame(); if ( !pFly ) return aRet; - const SwFrm* pOldAnch = pFly->GetAnchorFrm(); + const SwFrame* pOldAnch = pFly->GetAnchorFrame(); if( !pOldAnch ) return aRet; if ( FLY_AT_PAGE != nAnchorId ) @@ -431,57 +431,57 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, bool bMoveIt ) // Necessary for moving 'anchor symbol' at the user interface inside header/footer. else if ( !::CheckControlLayer( pObj ) ) { - SwContentFrm *pContent = GetCurrFrm( false ); + SwContentFrame *pContent = GetCurrFrame( false ); if( !pContent ) return aRet; pFooterOrHeader = pContent->FindFooterOrHeader(); } - // Search nearest SwFlyFrm starting from the upper-left corner + // Search nearest SwFlyFrame starting from the upper-left corner // of the fly - SwContentFrm *pTextFrm = nullptr; + SwContentFrame *pTextFrame = nullptr; { - SwCrsrMoveState aState( MV_SETONLYTEXT ); + SwCursorMoveState aState( MV_SETONLYTEXT ); SwPosition aPos( GetDoc()->GetNodes().GetEndOfExtras() ); Point aTmpPnt( rAbsPos ); - GetLayout()->GetCrsrOfst( &aPos, aTmpPnt, &aState ); + GetLayout()->GetCursorOfst( &aPos, aTmpPnt, &aState ); if (aPos.nNode != GetDoc()->GetNodes().GetEndOfExtras().GetIndex() && (nAnchorId != FLY_AT_CHAR || !PosInsideInputField(aPos))) { SwContentNode* pCNode = aPos.nNode.GetNode().GetContentNode(); assert(pCNode); - pTextFrm = pCNode->getLayoutFrm(GetLayout(), nullptr, &aPos, false); + pTextFrame = pCNode->getLayoutFrame(GetLayout(), nullptr, &aPos, false); } } - const SwFrm *pNewAnch = nullptr; - if( pTextFrm != nullptr ) + const SwFrame *pNewAnch = nullptr; + if( pTextFrame != nullptr ) { if ( FLY_AT_PAGE == nAnchorId ) { - pNewAnch = pTextFrm->FindPageFrm(); + pNewAnch = pTextFrame->FindPageFrame(); } else { - pNewAnch = ::FindAnchor( pTextFrm, rAbsPos ); + pNewAnch = ::FindAnchor( pTextFrame, rAbsPos ); if( FLY_AT_FLY == nAnchorId ) // LAYER_IMPL { - pNewAnch = pNewAnch->FindFlyFrm(); + pNewAnch = pNewAnch->FindFlyFrame(); } } } if( pNewAnch && !pNewAnch->IsProtected() ) { - const SwFlyFrm* pCheck = bFlyFrame ? pNewAnch->FindFlyFrm() : nullptr; + const SwFlyFrame* pCheck = bFlyFrame ? pNewAnch->FindFlyFrame() : nullptr; // If we land inside the frame, make sure // that the frame does not land inside its own content while( pCheck ) { if( pCheck == pFly ) break; - const SwFrm *pTmp = pCheck->GetAnchorFrm(); - pCheck = pTmp ? pTmp->FindFlyFrm() : nullptr; + const SwFrame *pTmp = pCheck->GetAnchorFrame(); + pCheck = pTmp ? pTmp->FindFlyFrame() : nullptr; } // Do not switch from header/footer to another area, @@ -489,7 +489,7 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, bool bMoveIt ) if( !pCheck && pFooterOrHeader == pNewAnch->FindFooterOrHeader() ) { - aRet = pNewAnch->GetFrmAnchorPos( ::HasWrap( pObj ) ); + aRet = pNewAnch->GetFrameAnchorPos( ::HasWrap( pObj ) ); if ( bMoveIt || (nAnchorId == FLY_AT_CHAR) ) { @@ -499,21 +499,21 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, bool bMoveIt ) case FLY_AT_PARA: { SwPosition pos = *aAnch.GetContentAnchor(); - pos.nNode = *pTextFrm->GetNode(); + pos.nNode = *pTextFrame->GetNode(); pos.nContent.Assign(nullptr,0); aAnch.SetAnchor( &pos ); break; } case FLY_AT_PAGE: { - aAnch.SetPageNum( static_cast<const SwPageFrm*>(pNewAnch)-> + aAnch.SetPageNum( static_cast<const SwPageFrame*>(pNewAnch)-> GetPhyPageNum() ); break; } case FLY_AT_FLY: { - SwPosition aPos( *static_cast<const SwFlyFrm*>(pNewAnch)->GetFormat()-> + SwPosition aPos( *static_cast<const SwFlyFrame*>(pNewAnch)->GetFormat()-> GetContent().GetContentIdx() ); aAnch.SetAnchor( &aPos ); break; @@ -523,15 +523,15 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, bool bMoveIt ) { SwPosition pos = *aAnch.GetContentAnchor(); Point aTmpPnt( rAbsPos ); - if( pTextFrm->GetCrsrOfst( &pos, aTmpPnt ) ) + if( pTextFrame->GetCursorOfst( &pos, aTmpPnt ) ) { SwRect aTmpRect; - pTextFrm->GetCharRect( aTmpRect, pos ); + pTextFrame->GetCharRect( aTmpRect, pos ); aRet = aTmpRect.Pos(); } else { - pos.nNode = *pTextFrm->GetNode(); + pos.nNode = *pTextFrame->GetNode(); pos.nContent.Assign(nullptr,0); } aAnch.SetAnchor( &pos ); @@ -588,14 +588,14 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, bool bMoveIt ) return aRet; } -const SwFrameFormat *SwFEShell::NewFlyFrm( const SfxItemSet& rSet, bool bAnchValid, +const SwFrameFormat *SwFEShell::NewFlyFrame( const SfxItemSet& rSet, bool bAnchValid, SwFrameFormat *pParent ) { SET_CURR_SHELL( this ); StartAllAction(); - SwPaM* pCrsr = GetCrsr(); - const Point aPt( GetCrsrDocPos() ); + SwPaM* pCursor = GetCursor(); + const Point aPt( GetCursorDocPos() ); SwSelBoxes aBoxes; bool bMoveContent = true; @@ -604,24 +604,24 @@ const SwFrameFormat *SwFEShell::NewFlyFrm( const SfxItemSet& rSet, bool bAnchVal GetTableSel( *this, aBoxes ); if( !aBoxes.empty() ) { - // Crsr should be removed from the removal area. + // Cursor should be removed from the removal area. // Always put it after/on the table; via the // document position they will be set to the old // position - ParkCrsr( SwNodeIndex( *aBoxes[0]->GetSttNd() )); + ParkCursor( SwNodeIndex( *aBoxes[0]->GetSttNd() )); - // #i127787# pCurCrsr will be deleted in ParkCrsr, - // we better get the current pCurCrsr instead of working with the + // #i127787# pCurrentCursor will be deleted in ParkCursor, + // we better get the current pCurrentCursor instead of working with the // deleted one: - pCrsr = GetCrsr(); + pCursor = GetCursor(); } else bMoveContent = false; } - else if( !pCrsr->HasMark() && !pCrsr->IsMultiSelection() ) + else if( !pCursor->HasMark() && !pCursor->IsMultiSelection() ) bMoveContent = false; - const SwPosition& rPos = *pCrsr->Start(); + const SwPosition& rPos = *pCursor->Start(); SwFormatAnchor& rAnch = const_cast<SwFormatAnchor&>(static_cast<const SwFormatAnchor&>(rSet.Get( RES_ANCHOR ))); RndStdIds eRndId = rAnch.GetAnchorId(); @@ -689,7 +689,7 @@ const SwFrameFormat *SwFEShell::NewFlyFrm( const SfxItemSet& rSet, bool bAnchVal } } - pRet = GetDoc()->MakeFlyAndMove( *pCrsr, rSet, &aBoxes, pParent ); + pRet = GetDoc()->MakeFlyAndMove( *pCursor, rSet, &aBoxes, pParent ); KillPams(); @@ -700,13 +700,13 @@ const SwFrameFormat *SwFEShell::NewFlyFrm( const SfxItemSet& rSet, bool bAnchVal // calculate new position // JP 24.03.97: also go via page links // chaos::anchor should not lie in the shifted area - pRet->DelFrms(); + pRet->DelFrames(); - const SwFrm* pAnch = ::FindAnchor( GetLayout(), aPt ); - SwPosition aPos( *static_cast<const SwContentFrm*>(pAnch)->GetNode() ); + const SwFrame* pAnch = ::FindAnchor( GetLayout(), aPt ); + SwPosition aPos( *static_cast<const SwContentFrame*>(pAnch)->GetNode() ); if ( FLY_AS_CHAR == eRndId ) { - aPos.nContent.Assign( const_cast<SwContentFrm*>(static_cast<const SwContentFrm*>(pAnch))->GetNode(), 0 ); + aPos.nContent.Assign( const_cast<SwContentFrame*>(static_cast<const SwContentFrame*>(pAnch))->GetNode(), 0 ); } pOldAnchor->SetAnchor( &aPos ); @@ -732,7 +732,7 @@ const SwFrameFormat *SwFEShell::NewFlyFrm( const SfxItemSet& rSet, bool bAnchVal if( bVOriChgd ) const_cast<SfxItemSet&>(rSet).Put( aOldV ); - GetDoc()->SetFlyFrmAttr( *pRet, (SfxItemSet&)rSet ); + GetDoc()->SetFlyFrameAttr( *pRet, (SfxItemSet&)rSet ); GetDoc()->GetIDocumentUndoRedo().DoUndo(bDoesUndo); } delete pOldAnchor; @@ -747,9 +747,9 @@ const SwFrameFormat *SwFEShell::NewFlyFrm( const SfxItemSet& rSet, bool bAnchVal if( pRet ) { - SwFlyFrm* pFrm = pRet->GetFrm( &aPt ); - if( pFrm ) - SelectFlyFrm( *pFrm, true ); + SwFlyFrame* pFrame = pRet->GetFrame( &aPt ); + if( pFrame ) + SelectFlyFrame( *pFrame, true ); else { GetLayout()->SetAssertFlyPages(); @@ -770,8 +770,8 @@ void SwFEShell::Insert( const OUString& rGrfName, const OUString& rFltName, SwFlyFrameFormat* pFormat = nullptr; SET_CURR_SHELL( this ); StartAllAction(); - SwShellCrsr *pStartCursor = dynamic_cast<SwShellCrsr*>(this->GetSwCrsr()); - SwShellCrsr *pCursor = pStartCursor; + SwShellCursor *pStartCursor = dynamic_cast<SwShellCursor*>(this->GetSwCursor()); + SwShellCursor *pCursor = pStartCursor; do { if (!pCursor) @@ -799,7 +799,7 @@ void SwFEShell::Insert( const OUString& rGrfName, const OUString& rFltName, if( !pAnchor->GetContentAnchor() ) { lcl_SetNewFlyPos( pCursor->GetNode(), - *pAnchor, GetCrsrDocPos() ); + *pAnchor, GetCursorDocPos() ); } break; case FLY_AT_PAGE: @@ -820,25 +820,25 @@ void SwFEShell::Insert( const OUString& rGrfName, const OUString& rFltName, pGrfAttrSet, pFrameFormat ); OSL_ENSURE( pFormat, "Doc->getIDocumentContentOperations().Insert(notxt) failed." ); - pCursor = dynamic_cast<SwShellCrsr*>(pCursor->GetNext()); + pCursor = dynamic_cast<SwShellCursor*>(pCursor->GetNext()); } while( pCursor != pStartCursor ); EndAllAction(); if( pFormat ) { - const Point aPt( GetCrsrDocPos() ); - SwFlyFrm* pFrm = pFormat->GetFrm( &aPt ); + const Point aPt( GetCursorDocPos() ); + SwFlyFrame* pFrame = pFormat->GetFrame( &aPt ); - if( pFrm ) + if( pFrame ) { // fdo#36681: Invalidate the content and layout to refresh // the picture anchoring properly - SwPageFrm* pPageFrm = pFrm->FindPageFrmOfAnchor(); - pPageFrm->InvalidateFlyLayout(); - pPageFrm->InvalidateContent(); + SwPageFrame* pPageFrame = pFrame->FindPageFrameOfAnchor(); + pPageFrame->InvalidateFlyLayout(); + pPageFrame->InvalidateContent(); - SelectFlyFrm( *pFrm, true ); + SelectFlyFrame( *pFrame, true ); } else GetLayout()->SetAssertFlyPages(); @@ -853,7 +853,7 @@ SwFlyFrameFormat* SwFEShell::InsertObject( const svt::EmbeddedObjectRef& xObj, SwFlyFrameFormat* pFormat = nullptr; SET_CURR_SHELL( this ); StartAllAction(); - for(SwPaM& rPaM : GetCrsr()->GetRingContainer()) + for(SwPaM& rPaM : GetCursor()->GetRingContainer()) { pFormat = GetDoc()->getIDocumentContentOperations().Insert(rPaM, xObj, pFlyAttrSet, pGrfAttrSet, pFrameFormat ); @@ -864,11 +864,11 @@ SwFlyFrameFormat* SwFEShell::InsertObject( const svt::EmbeddedObjectRef& xObj, if( pFormat ) { - const Point aPt( GetCrsrDocPos() ); - SwFlyFrm* pFrm = pFormat->GetFrm( &aPt ); + const Point aPt( GetCursorDocPos() ); + SwFlyFrame* pFrame = pFormat->GetFrame( &aPt ); - if( pFrm ) - SelectFlyFrm( *pFrm, true ); + if( pFrame ) + SelectFlyFrame( *pFrame, true ); else GetLayout()->SetAssertFlyPages(); } @@ -890,14 +890,14 @@ void SwFEShell::InsertDrawObj( SdrObject& rDrawObj, // find anchor position SwPaM aPam( mpDoc->GetNodes() ); { - SwCrsrMoveState aState( MV_SETONLYTEXT ); + SwCursorMoveState aState( MV_SETONLYTEXT ); Point aTmpPt( rInsertPosition ); - GetLayout()->GetCrsrOfst( aPam.GetPoint(), aTmpPt, &aState ); - const SwFrm* pFrm = aPam.GetContentNode()->getLayoutFrm( GetLayout(), nullptr, nullptr, false ); - const Point aRelPos( rInsertPosition.X() - pFrm->Frm().Left(), - rInsertPosition.Y() - pFrm->Frm().Top() ); + GetLayout()->GetCursorOfst( aPam.GetPoint(), aTmpPt, &aState ); + const SwFrame* pFrame = aPam.GetContentNode()->getLayoutFrame( GetLayout(), nullptr, nullptr, false ); + const Point aRelPos( rInsertPosition.X() - pFrame->Frame().Left(), + rInsertPosition.Y() - pFrame->Frame().Top() ); rDrawObj.SetRelativePos( aRelPos ); - ::lcl_FindAnchorPos( *GetDoc(), rInsertPosition, *pFrm, rFlyAttrSet ); + ::lcl_FindAnchorPos( *GetDoc(), rInsertPosition, *pFrame, rFlyAttrSet ); } // insert drawing object into the document creating a new <SwDrawFrameFormat> instance SwDrawFrameFormat* pFormat = GetDoc()->getIDocumentContentOperations().InsertDrawObj( aPam, rDrawObj, rFlyAttrSet ); @@ -942,8 +942,8 @@ void SwFEShell::SetPageObjsNewPage( std::vector<SwFrameFormat*>& rFillArr, int n StartUndo(); long nNewPage; - SwRootFrm* pTmpRootFrm = GetLayout(); - sal_uInt16 nMaxPage = pTmpRootFrm->GetPageNum(); + SwRootFrame* pTmpRootFrame = GetLayout(); + sal_uInt16 nMaxPage = pTmpRootFrame->GetPageNum(); bool bTmpAssert = false; for( auto pFormat : rFillArr ) { @@ -967,7 +967,7 @@ void SwFEShell::SetPageObjsNewPage( std::vector<SwFrameFormat*>& rFillArr, int n static_cast<SwDrawContact*>(pCon)->DisconnectFromLayout(); } else - pFormat->DelFrms(); + pFormat->DelFrames(); bTmpAssert = true; } aNewAnchor.SetPageNum( sal_uInt16(nNewPage) ); @@ -976,21 +976,21 @@ void SwFEShell::SetPageObjsNewPage( std::vector<SwFrameFormat*>& rFillArr, int n } if( bTmpAssert ) - pTmpRootFrm->SetAssertFlyPages(); + pTmpRootFrame->SetAssertFlyPages(); EndUndo(); EndAllAction(); } // All attributes in the "baskets" will be filled with the attributes of the -// current FlyFrms. Attributes which cannot be filled due to being at the +// current FlyFrames. Attributes which cannot be filled due to being at the // wrong place or which are ambiguous (multiple selections) will be removed. -bool SwFEShell::GetFlyFrmAttr( SfxItemSet &rSet ) const +bool SwFEShell::GetFlyFrameAttr( SfxItemSet &rSet ) const { - SwFlyFrm *pFly = GetSelectedOrCurrFlyFrm(); + SwFlyFrame *pFly = GetSelectedOrCurrFlyFrame(); if (!pFly) { - OSL_ENSURE( false, "GetFlyFrmAttr, no Fly selected." ); + OSL_ENSURE( false, "GetFlyFrameAttr, no Fly selected." ); return false; } @@ -1028,30 +1028,30 @@ bool SwFEShell::GetFlyFrmAttr( SfxItemSet &rSet ) const } // Attributes of the current fly will change. -bool SwFEShell::SetFlyFrmAttr( SfxItemSet& rSet ) +bool SwFEShell::SetFlyFrameAttr( SfxItemSet& rSet ) { SET_CURR_SHELL( this ); bool bRet = false; if( rSet.Count() ) { - SwFlyFrm *pFly = GetSelectedOrCurrFlyFrm(); - OSL_ENSURE( pFly, "SetFlyFrmAttr, no Fly selected." ); + SwFlyFrame *pFly = GetSelectedOrCurrFlyFrame(); + OSL_ENSURE( pFly, "SetFlyFrameAttr, no Fly selected." ); if( pFly ) { StartAllAction(); - const Point aPt( pFly->Frm().Pos() ); + const Point aPt( pFly->Frame().Pos() ); if( SfxItemState::SET == rSet.GetItemState( RES_ANCHOR, false )) sw_ChkAndSetNewAnchor( *pFly, rSet ); SwFlyFrameFormat* pFlyFormat = pFly->GetFormat(); - if( GetDoc()->SetFlyFrmAttr( *pFlyFormat, rSet )) + if( GetDoc()->SetFlyFrameAttr( *pFlyFormat, rSet )) { bRet = true; - SwFlyFrm* pFrm = pFlyFormat->GetFrm( &aPt ); - if( pFrm ) - SelectFlyFrm( *pFrm, true ); + SwFlyFrame* pFrame = pFlyFormat->GetFrame( &aPt ); + if( pFrame ) + SelectFlyFrame( *pFrame, true ); else GetLayout()->SetAssertFlyPages(); } @@ -1065,7 +1065,7 @@ bool SwFEShell::SetFlyFrmAttr( SfxItemSet& rSet ) SfxItemSet SwFEShell::makeItemSetFromFormatAnchor(SfxItemPool& rPool, const SwFormatAnchor &rAnchor) { // The set also includes VERT/HORI_ORIENT, because the align - // shall be changed in FEShell::SetFlyFrmAttr/SetFlyFrmAnchor, + // shall be changed in FEShell::SetFlyFrameAttr/SetFlyFrameAnchor, // possibly as a result of the anchor change. SfxItemSet aSet(rPool, RES_VERT_ORIENT, RES_ANCHOR); aSet.Put(rAnchor); @@ -1100,7 +1100,7 @@ bool SwFEShell::SetDrawingAttr( SfxItemSet& rSet ) } } - if( GetDoc()->SetFlyFrmAttr( *pFormat, rSet )) + if( GetDoc()->SetFlyFrameAttr( *pFormat, rSet )) { bRet = true; Point aTmp; @@ -1112,7 +1112,7 @@ bool SwFEShell::SetDrawingAttr( SfxItemSet& rSet ) } // Reset requested attributes or the ones contained in the set. -bool SwFEShell::ResetFlyFrmAttr( sal_uInt16 nWhich, const SfxItemSet* pSet ) +bool SwFEShell::ResetFlyFrameAttr( sal_uInt16 nWhich, const SfxItemSet* pSet ) { bool bRet = false; @@ -1120,8 +1120,8 @@ bool SwFEShell::ResetFlyFrmAttr( sal_uInt16 nWhich, const SfxItemSet* pSet ) { SET_CURR_SHELL( this ); - SwFlyFrm *pFly = GetSelectedOrCurrFlyFrm(); - OSL_ENSURE( pFly, "SetFlyFrmAttr, no Fly selected." ); + SwFlyFrame *pFly = GetSelectedOrCurrFlyFrame(); + OSL_ENSURE( pFly, "SetFlyFrameAttr, no Fly selected." ); if( pFly ) { StartAllAction(); @@ -1154,7 +1154,7 @@ bool SwFEShell::ResetFlyFrmAttr( sal_uInt16 nWhich, const SfxItemSet* pSet ) SwFrameFormat* SwFEShell::GetSelectedFrameFormat() const { SwFrameFormat* pRet = nullptr; - SwLayoutFrm *pFly = GetSelectedFlyFrm(); + SwLayoutFrame *pFly = GetSelectedFlyFrame(); if( pFly && ( pRet = static_cast<SwFrameFormat*>(pFly->GetFormat()->DerivedFrom()) ) == GetDoc()->GetDfltFrameFormat() ) pRet = nullptr; @@ -1163,16 +1163,16 @@ SwFrameFormat* SwFEShell::GetSelectedFrameFormat() const void SwFEShell::SetFrameFormat( SwFrameFormat *pNewFormat, bool bKeepOrient, Point* pDocPos ) { - SwFlyFrm *pFly = nullptr; + SwFlyFrame *pFly = nullptr; if(pDocPos) { const SwFrameFormat* pFormat = GetFormatFromObj( *pDocPos ); if (const SwFlyFrameFormat* pFlyFormat = dynamic_cast<const SwFlyFrameFormat*>(pFormat)) - pFly = pFlyFormat->GetFrm(); + pFly = pFlyFormat->GetFrame(); } else - pFly = GetSelectedFlyFrm(); + pFly = GetSelectedFlyFrame(); OSL_ENSURE( pFly, "SetFrameFormat: no frame" ); if( pFly ) { @@ -1180,7 +1180,7 @@ void SwFEShell::SetFrameFormat( SwFrameFormat *pNewFormat, bool bKeepOrient, Poi SET_CURR_SHELL( this ); SwFlyFrameFormat* pFlyFormat = pFly->GetFormat(); - const Point aPt( pFly->Frm().Pos() ); + const Point aPt( pFly->Frame().Pos() ); SfxItemSet* pSet = nullptr; const SfxPoolItem* pItem; @@ -1194,9 +1194,9 @@ void SwFEShell::SetFrameFormat( SwFrameFormat *pNewFormat, bool bKeepOrient, Poi if( GetDoc()->SetFrameFormatToFly( *pFlyFormat, *pNewFormat, pSet, bKeepOrient )) { - SwFlyFrm* pFrm = pFlyFormat->GetFrm( &aPt ); - if( pFrm ) - SelectFlyFrm( *pFrm, true ); + SwFlyFrame* pFrame = pFlyFormat->GetFrame( &aPt ); + if( pFrame ) + SelectFlyFrame( *pFrame, true ); else GetLayout()->SetAssertFlyPages(); } @@ -1208,7 +1208,7 @@ void SwFEShell::SetFrameFormat( SwFrameFormat *pNewFormat, bool bKeepOrient, Poi const SwFrameFormat* SwFEShell::GetFlyFrameFormat() const { - const SwFlyFrm* pFly = GetSelectedOrCurrFlyFrm(); + const SwFlyFrame* pFly = GetSelectedOrCurrFlyFrame(); if (pFly) return pFly->GetFormat(); return nullptr; @@ -1216,7 +1216,7 @@ const SwFrameFormat* SwFEShell::GetFlyFrameFormat() const SwFrameFormat* SwFEShell::GetFlyFrameFormat() { - SwFlyFrm* pFly = GetSelectedOrCurrFlyFrm(); + SwFlyFrame* pFly = GetSelectedOrCurrFlyFrame(); if (pFly) return pFly->GetFormat(); return nullptr; @@ -1224,14 +1224,14 @@ SwFrameFormat* SwFEShell::GetFlyFrameFormat() SwRect SwFEShell::GetFlyRect() const { - SwFlyFrm *pFly = GetCurrFlyFrm(false); + SwFlyFrame *pFly = GetCurrFlyFrame(false); if (!pFly) { SwRect aRect; return aRect; } else - return pFly->Frm(); + return pFly->Frame(); } SwRect SwFEShell::GetObjRect() const @@ -1258,7 +1258,7 @@ Size SwFEShell::RequestObjectResize( const SwRect &rRect, const uno::Reference < { Size aResult; - SwFlyFrm *pFly = FindFlyFrm( xObj ); + SwFlyFrame *pFly = FindFlyFrame( xObj ); if ( !pFly ) { aResult = rRect.SSize(); @@ -1275,7 +1275,7 @@ Size SwFEShell::RequestObjectResize( const SwRect &rRect, const uno::Reference < // MA we do not allow to clip the Fly, as the OLE server can // request various wishes. Clipping is done via the formatting. // Correct display is done by scaling. - // Scaling is done by SwNoTextFrm::Format by calling + // Scaling is done by SwNoTextFrame::Format by calling // SwWrtShell::CalcAndSetScale() if ( rRect.SSize() != pFly->Prt().SSize() && !bSizeProt ) { @@ -1283,17 +1283,17 @@ Size SwFEShell::RequestObjectResize( const SwRect &rRect, const uno::Reference < //JP 28.02.2001: Task 74707 - ask for fly in fly with automatic size - const SwFrm* pAnchor; + const SwFrame* pAnchor; const SwTextNode* pTNd; const SwpHints* pHts; - const SwFormatFrmSize& rFrmSz = pFly->GetFormat()->GetFrmSize(); + const SwFormatFrameSize& rFrameSz = pFly->GetFormat()->GetFrameSize(); if (m_bCheckForOLEInCaption && - 0 != rFrmSz.GetWidthPercent() && - nullptr != (pAnchor = pFly->GetAnchorFrm()) && - pAnchor->IsTextFrm() && + 0 != rFrameSz.GetWidthPercent() && + nullptr != (pAnchor = pFly->GetAnchorFrame()) && + pAnchor->IsTextFrame() && !pAnchor->GetNext() && !pAnchor->GetPrev() && - pAnchor->GetUpper()->IsFlyFrm() && - nullptr != ( pTNd = static_cast<const SwTextFrm*>(pAnchor)->GetNode()->GetTextNode()) && + pAnchor->GetUpper()->IsFlyFrame() && + nullptr != ( pTNd = static_cast<const SwTextFrame*>(pAnchor)->GetNode()->GetTextNode()) && nullptr != ( pHts = pTNd->GetpSwpHints() )) { // search for a sequence field: @@ -1305,24 +1305,24 @@ Size SwFEShell::RequestObjectResize( const SwRect &rRect, const uno::Reference < && TYP_SEQFLD == static_cast<const SwFormatField*>(pItem)->GetField()->GetTypeId() ) { // sequence field found - SwFlyFrm* pChgFly = const_cast<SwFlyFrm*>(static_cast<const SwFlyFrm*>(pAnchor->GetUpper())); + SwFlyFrame* pChgFly = const_cast<SwFlyFrame*>(static_cast<const SwFlyFrame*>(pAnchor->GetUpper())); // calculate the changed size: // width must change, height can change - Size aNewSz( aSz.Width() + pChgFly->Frm().Width() - + Size aNewSz( aSz.Width() + pChgFly->Frame().Width() - pFly->Prt().Width(), aSz.Height() ); SwFrameFormat *pFormat = pChgFly->GetFormat(); - SwFormatFrmSize aFrmSz( pFormat->GetFrmSize() ); - aFrmSz.SetWidth( aNewSz.Width() ); - if( ATT_MIN_SIZE != aFrmSz.GetHeightSizeType() ) + SwFormatFrameSize aFrameSz( pFormat->GetFrameSize() ); + aFrameSz.SetWidth( aNewSz.Width() ); + if( ATT_MIN_SIZE != aFrameSz.GetHeightSizeType() ) { - aNewSz.Height() += pChgFly->Frm().Height() - + aNewSz.Height() += pChgFly->Frame().Height() - pFly->Prt().Height(); - if( std::abs( aNewSz.Height() - pChgFly->Frm().Height()) > 1 ) - aFrmSz.SetHeight( aNewSz.Height() ); + if( std::abs( aNewSz.Height() - pChgFly->Frame().Height()) > 1 ) + aFrameSz.SetHeight( aNewSz.Height() ); } // via Doc for the Undo! - pFormat->GetDoc()->SetAttr( aFrmSz, *pFormat ); + pFormat->GetDoc()->SetAttr( aFrameSz, *pFormat ); break; } } @@ -1331,14 +1331,14 @@ Size SwFEShell::RequestObjectResize( const SwRect &rRect, const uno::Reference < // set the new Size at the fly themself if ( pFly->Prt().Height() > 0 && pFly->Prt().Width() > 0 ) { - aSz.Width() += pFly->Frm().Width() - pFly->Prt().Width(); - aSz.Height()+= pFly->Frm().Height()- pFly->Prt().Height(); + aSz.Width() += pFly->Frame().Width() - pFly->Prt().Width(); + aSz.Height()+= pFly->Frame().Height()- pFly->Prt().Height(); } aResult = pFly->ChgSize( aSz ); // if the object changes, the contour is outside the object - OSL_ENSURE( pFly->Lower()->IsNoTextFrm(), "Request without NoText" ); - SwNoTextNode *pNd = static_cast<SwContentFrm*>(pFly->Lower())->GetNode()->GetNoTextNode(); + OSL_ENSURE( pFly->Lower()->IsNoTextFrame(), "Request without NoText" ); + SwNoTextNode *pNd = static_cast<SwContentFrame*>(pFly->Lower())->GetNode()->GetNoTextNode(); OSL_ENSURE( pNd, "Request without Node" ); pNd->SetContour( nullptr ); ClrContourCache(); @@ -1347,7 +1347,7 @@ Size SwFEShell::RequestObjectResize( const SwRect &rRect, const uno::Reference < // if only the size is to be adjusted, a position is transported with // allocated values Point aPt( pFly->Prt().Pos() ); - aPt += pFly->Frm().Pos(); + aPt += pFly->Frame().Pos(); if ( rRect.Top() != LONG_MIN && rRect.Pos() != aPt && !bPosProt ) { aPt = rRect.Pos(); @@ -1357,15 +1357,15 @@ Size SwFEShell::RequestObjectResize( const SwRect &rRect, const uno::Reference < // in case of paragraph-bound Flys, starting from the new position, // a new anchor is to be set. The anchor and the new RelPos are // calculated by the Fly and set - if( pFly->IsFlyAtCntFrm() ) - static_cast<SwFlyAtCntFrm*>(pFly)->SetAbsPos( aPt ); + if( pFly->IsFlyAtContentFrame() ) + static_cast<SwFlyAtContentFrame*>(pFly)->SetAbsPos( aPt ); else { const SwFrameFormat *pFormat = pFly->GetFormat(); const SwFormatVertOrient &rVert = pFormat->GetVertOrient(); const SwFormatHoriOrient &rHori = pFormat->GetHoriOrient(); - const long lXDiff = aPt.getX() - pFly->Frm().Left(); - const long lYDiff = aPt.getY() - pFly->Frm().Top(); + const long lXDiff = aPt.getX() - pFly->Frame().Left(); + const long lYDiff = aPt.getY() - pFly->Frame().Top(); const Point aTmp( rHori.GetPos() + lXDiff, rVert.GetPos() + lYDiff ); pFly->ChgRelPos( aTmp ); @@ -1375,7 +1375,7 @@ Size SwFEShell::RequestObjectResize( const SwRect &rRect, const uno::Reference < SwFlyFrameFormat *pFlyFrameFormat = pFly->GetFormat(); OSL_ENSURE( pFlyFrameFormat, "fly frame format missing!" ); if ( pFlyFrameFormat ) - pFlyFrameFormat->SetLastFlyFrmPrtRectPos( pFly->Prt().Pos() ); //stores the value of last Prt rect + pFlyFrameFormat->SetLastFlyFramePrtRectPos( pFly->Prt().Pos() ); //stores the value of last Prt rect EndAllAction(); @@ -1389,8 +1389,8 @@ SwFrameFormat* SwFEShell::WizardGetFly() SwFrameFormats& rSpzArr = *mpDoc->GetSpzFrameFormats(); if( !rSpzArr.empty() ) { - SwNodeIndex& rCrsrNd = GetCrsr()->GetPoint()->nNode; - if( rCrsrNd.GetIndex() > mpDoc->GetNodes().GetEndOfExtras().GetIndex() ) + SwNodeIndex& rCursorNd = GetCursor()->GetPoint()->nNode; + if( rCursorNd.GetIndex() > mpDoc->GetNodes().GetEndOfExtras().GetIndex() ) // Cursor is in the body area! return nullptr; @@ -1400,8 +1400,8 @@ SwFrameFormat* SwFEShell::WizardGetFly() SwStartNode* pSttNd; if( pIdx && nullptr != ( pSttNd = pIdx->GetNode().GetStartNode() ) && - pSttNd->GetIndex() < rCrsrNd.GetIndex() && - rCrsrNd.GetIndex() < pSttNd->EndOfSectionIndex() ) + pSttNd->GetIndex() < rCursorNd.GetIndex() && + rCursorNd.GetIndex() < pSttNd->EndOfSectionIndex() ) { // found: return immediately return pFormat; @@ -1413,7 +1413,7 @@ SwFrameFormat* SwFEShell::WizardGetFly() void SwFEShell::SetFlyName( const OUString& rName ) { - SwLayoutFrm *pFly = GetSelectedFlyFrm(); + SwLayoutFrame *pFly = GetSelectedFlyFrame(); if( pFly ) GetDoc()->SetFlyName( *static_cast<SwFlyFrameFormat*>(pFly->GetFormat()), rName ); else { @@ -1423,7 +1423,7 @@ void SwFEShell::SetFlyName( const OUString& rName ) OUString SwFEShell::GetFlyName() const { - SwLayoutFrm *pFly = GetSelectedFlyFrm(); + SwLayoutFrame *pFly = GetSelectedFlyFrame(); if( pFly ) return pFly->GetFormat()->GetName(); @@ -1434,10 +1434,10 @@ OUString SwFEShell::GetFlyName() const const uno::Reference < embed::XEmbeddedObject > SwFEShell::GetOleRef() const { uno::Reference < embed::XEmbeddedObject > xObj; - SwFlyFrm * pFly = GetSelectedFlyFrm(); - if (pFly && pFly->Lower() && pFly->Lower()->IsNoTextFrm()) + SwFlyFrame * pFly = GetSelectedFlyFrame(); + if (pFly && pFly->Lower() && pFly->Lower()->IsNoTextFrame()) { - SwOLENode *pNd = static_cast<SwNoTextFrm*>(pFly->Lower())->GetNode()->GetOLENode(); + SwOLENode *pNd = static_cast<SwNoTextFrame*>(pFly->Lower())->GetNode()->GetOLENode(); if (pNd) xObj = pNd->GetOLEObj().GetOleRef(); } @@ -1471,7 +1471,7 @@ const SwFrameFormat* SwFEShell::IsURLGrfAtPos( const Point& rPt, OUString* pURL, } if (pFlyObj) { - SwFlyFrm *pFly = pFlyObj->GetFlyFrm(); + SwFlyFrame *pFly = pFlyObj->GetFlyFrame(); const SwFormatURL &rURL = pFly->GetFormat()->GetURL(); if( !rURL.GetURL().isEmpty() || rURL.GetMap() ) { @@ -1506,7 +1506,7 @@ const SwFrameFormat* SwFEShell::IsURLGrfAtPos( const Point& rPt, OUString* pURL, { // append the relative pixel position !! Point aPt( rPt ); - aPt -= pFly->Frm().Pos(); + aPt -= pFly->Frame().Pos(); // without MapMode-Offset, without Offset, o ... !!!!! aPt = GetOut()->LogicToPixel( aPt, MapMode( MAP_TWIP ) ); @@ -1543,10 +1543,10 @@ const Graphic *SwFEShell::GetGrfAtPos( const Point &rPt, } if (pFlyObj) { - SwFlyFrm *pFly = pFlyObj->GetFlyFrm(); - if ( pFly->Lower() && pFly->Lower()->IsNoTextFrm() ) + SwFlyFrame *pFly = pFlyObj->GetFlyFrame(); + if ( pFly->Lower() && pFly->Lower()->IsNoTextFrame() ) { - SwGrfNode *pNd = static_cast<SwContentFrm*>(pFly->Lower())->GetNode()->GetGrfNode(); + SwGrfNode *pNd = static_cast<SwContentFrame*>(pFly->Lower())->GetNode()->GetGrfNode(); if ( pNd ) { if ( pNd->IsGrfLink() ) @@ -1604,12 +1604,12 @@ const SwFrameFormat* SwFEShell::GetFormatFromAnyObj( const Point& rPt ) const const SwFrameFormat* pRet = GetFormatFromObj( rPt ); if( !pRet || RES_FLYFRMFMT == pRet->Which() ) { - SwPosition aPos( *GetCrsr()->GetPoint() ); + SwPosition aPos( *GetCursor()->GetPoint() ); Point aPt( rPt ); - GetLayout()->GetCrsrOfst( &aPos, aPt ); + GetLayout()->GetCursorOfst( &aPos, aPt ); SwContentNode *pNd = aPos.nNode.GetNode().GetContentNode(); - SwFrm* pFrm = pNd->getLayoutFrm( GetLayout(), &rPt, nullptr, false )->FindFlyFrm(); - pRet = pFrm ? static_cast<SwLayoutFrm*>(pFrm)->GetFormat() : nullptr; + SwFrame* pFrame = pNd->getLayoutFrame( GetLayout(), &rPt, nullptr, false )->FindFlyFrame(); + pRet = pFrame ? static_cast<SwLayoutFrame*>(pFrame)->GetFormat() : nullptr; } return pRet; } @@ -1653,10 +1653,10 @@ ObjCntType SwFEShell::GetObjCntType( const SdrObject& rObj ) const } else if (const SwVirtFlyDrawObj *pFlyObj = dynamic_cast<const SwVirtFlyDrawObj*>(pInvestigatedObj)) { - const SwFlyFrm *pFly = pFlyObj->GetFlyFrm(); - if ( pFly->Lower() && pFly->Lower()->IsNoTextFrm() ) + const SwFlyFrame *pFly = pFlyObj->GetFlyFrame(); + if ( pFly->Lower() && pFly->Lower()->IsNoTextFrame() ) { - if ( static_cast<const SwContentFrm*>(pFly->Lower())->GetNode()->GetGrfNode() ) + if ( static_cast<const SwContentFrame*>(pFly->Lower())->GetNode()->GetGrfNode() ) eType = OBJCNT_GRF; else eType = OBJCNT_OLE; @@ -1757,9 +1757,9 @@ bool SwFEShell::ReplaceSdrObj( const OUString& rGrfName, const OUString& rFltNam SwFrameFormat *pFormat = FindFrameFormat( pObj ); // store attributes, then set the graphic - SfxItemSet aFrmSet( mpDoc->GetAttrPool(), + SfxItemSet aFrameSet( mpDoc->GetAttrPool(), pFormat->GetAttrSet().GetRanges() ); - aFrmSet.Set( pFormat->GetAttrSet() ); + aFrameSet.Set( pFormat->GetAttrSet() ); // set size and position? if( dynamic_cast<const SwVirtFlyDrawObj*>( pObj) == nullptr ) @@ -1770,15 +1770,15 @@ bool SwFEShell::ReplaceSdrObj( const OUString& rGrfName, const OUString& rFltNam const long nWidth = rBound.Right() - rBound.Left(); const long nHeight= rBound.Bottom() - rBound.Top(); - aFrmSet.Put( SwFormatFrmSize( ATT_MIN_SIZE, + aFrameSet.Put( SwFormatFrameSize( ATT_MIN_SIZE, std::max( nWidth, long(MINFLY) ), std::max( nHeight, long(MINFLY) ))); - if( SfxItemState::SET != aFrmSet.GetItemState( RES_HORI_ORIENT )) - aFrmSet.Put( SwFormatHoriOrient( aRelPos.getX(), text::HoriOrientation::NONE, text::RelOrientation::FRAME )); + if( SfxItemState::SET != aFrameSet.GetItemState( RES_HORI_ORIENT )) + aFrameSet.Put( SwFormatHoriOrient( aRelPos.getX(), text::HoriOrientation::NONE, text::RelOrientation::FRAME )); - if( SfxItemState::SET != aFrmSet.GetItemState( RES_VERT_ORIENT )) - aFrmSet.Put( SwFormatVertOrient( aRelPos.getY(), text::VertOrientation::NONE, text::RelOrientation::FRAME )); + if( SfxItemState::SET != aFrameSet.GetItemState( RES_VERT_ORIENT )) + aFrameSet.Put( SwFormatVertOrient( aRelPos.getY(), text::VertOrientation::NONE, text::RelOrientation::FRAME )); } @@ -1790,7 +1790,7 @@ bool SwFEShell::ReplaceSdrObj( const OUString& rGrfName, const OUString& rFltNam // delete "Sdr-Object", insert the graphic instead DelSelectedObj(); - GetDoc()->getIDocumentContentOperations().Insert( *GetCrsr(), rGrfName, rFltName, pGrf, &aFrmSet, nullptr, nullptr ); + GetDoc()->getIDocumentContentOperations().Insert( *GetCursor(), rGrfName, rFltName, pGrf, &aFrameSet, nullptr, nullptr ); EndUndo(); EndAllAction(); @@ -1803,12 +1803,12 @@ static sal_uInt16 SwFormatGetPageNum(const SwFlyFrameFormat * pFormat) { OSL_ENSURE(pFormat != nullptr, "invalid argument"); - SwFlyFrm * pFrm = pFormat->GetFrm(); + SwFlyFrame * pFrame = pFormat->GetFrame(); sal_uInt16 aResult; - if (pFrm != nullptr) - aResult = pFrm->GetPhyPageNum(); + if (pFrame != nullptr) + aResult = pFrame->GetPhyPageNum(); else aResult = pFormat->GetAnchor().GetPageNum(); @@ -1948,7 +1948,7 @@ void SwFEShell::SetObjTitle( const OUString& rTitle ) SwFrameFormat* pFormat = FindFrameFormat( pObj ); if ( pFormat->Which() == RES_FLYFRMFMT ) { - GetDoc()->SetFlyFrmTitle( dynamic_cast<SwFlyFrameFormat&>(*pFormat), + GetDoc()->SetFlyFrameTitle( dynamic_cast<SwFlyFrameFormat&>(*pFormat), rTitle ); } else @@ -1990,7 +1990,7 @@ void SwFEShell::SetObjDescription( const OUString& rDescription ) SwFrameFormat* pFormat = FindFrameFormat( pObj ); if ( pFormat->Which() == RES_FLYFRMFMT ) { - GetDoc()->SetFlyFrmDescription(dynamic_cast<SwFlyFrameFormat&>(*pFormat), + GetDoc()->SetFlyFrameDescription(dynamic_cast<SwFlyFrameFormat&>(*pFormat), rDescription); } else @@ -2001,7 +2001,7 @@ void SwFEShell::SetObjDescription( const OUString& rDescription ) } } -void SwFEShell::AlignFormulaToBaseline( const uno::Reference < embed::XEmbeddedObject >& xObj, SwFlyFrm * pFly ) +void SwFEShell::AlignFormulaToBaseline( const uno::Reference < embed::XEmbeddedObject >& xObj, SwFlyFrame * pFly ) { #if OSL_DEBUG_LEVEL > 0 SvGlobalName aCLSID( xObj->getClassID() ); @@ -2013,7 +2013,7 @@ void SwFEShell::AlignFormulaToBaseline( const uno::Reference < embed::XEmbeddedO #endif if (!pFly) - pFly = FindFlyFrm( xObj ); + pFly = FindFlyFrame( xObj ); OSL_ENSURE( pFly , "No fly frame!" ); SwFrameFormat * pFrameFormat = pFly ? pFly->GetFormat() : nullptr; @@ -2048,7 +2048,7 @@ void SwFEShell::AlignFormulaToBaseline( const uno::Reference < embed::XEmbeddedO const SwFlyFrameFormat *pFlyFrameFormat = pFly->GetFormat(); OSL_ENSURE( pFlyFrameFormat, "fly frame format missing!" ); if ( pFlyFrameFormat ) - nBaseline += pFlyFrameFormat->GetLastFlyFrmPrtRectPos().Y(); + nBaseline += pFlyFrameFormat->GetLastFlyFramePrtRectPos().Y(); const SwFormatVertOrient &rVert = pFrameFormat->GetVertOrient(); SwFormatVertOrient aVert( rVert ); diff --git a/sw/source/core/frmedt/feflyole.cxx b/sw/source/core/frmedt/feflyole.cxx index bfa252acd5e3..451bb1fa252b 100644 --- a/sw/source/core/frmedt/feflyole.cxx +++ b/sw/source/core/frmedt/feflyole.cxx @@ -41,12 +41,12 @@ using namespace com::sun::star; -SwFlyFrm *SwFEShell::FindFlyFrm( const uno::Reference < embed::XEmbeddedObject >& xObj ) const +SwFlyFrame *SwFEShell::FindFlyFrame( const uno::Reference < embed::XEmbeddedObject >& xObj ) const { - SwFlyFrm *pFly = GetSelectedFlyFrm(); - if ( pFly && pFly->Lower() && pFly->Lower()->IsNoTextFrm() ) + SwFlyFrame *pFly = GetSelectedFlyFrame(); + if ( pFly && pFly->Lower() && pFly->Lower()->IsNoTextFrame() ) { - SwOLENode *pNd = static_cast<SwNoTextFrm*>(pFly->Lower())->GetNode()->GetOLENode(); + SwOLENode *pNd = static_cast<SwNoTextFrame*>(pFly->Lower())->GetNode()->GetOLENode(); if ( !pNd || pNd->GetOLEObj().GetOleRef() != xObj ) pFly = nullptr; } @@ -68,15 +68,15 @@ SwFlyFrm *SwFEShell::FindFlyFrm( const uno::Reference < embed::XEmbeddedObject > static_cast<SwOLENode*>(pNd)->GetOLEObj().GetOleRef() == xObj ) { bExist = true; - SwFrm *pFrm = static_cast<SwOLENode*>(pNd)->getLayoutFrm( GetLayout() ); - if ( pFrm ) - pFly = pFrm->FindFlyFrm(); + SwFrame *pFrame = static_cast<SwOLENode*>(pNd)->getLayoutFrame( GetLayout() ); + if ( pFrame ) + pFly = pFrame->FindFlyFrame(); break; } nSttIdx = pStNd->EndOfSectionIndex() + 1; } - OSL_ENSURE( bExist, "OLE-Object unknown and FlyFrm not found." ); + OSL_ENSURE( bExist, "OLE-Object unknown and FlyFrame not found." ); (void)bExist; } return pFly; diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index 69d6b438f0d0..4526f4e850ff 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -90,7 +90,7 @@ using namespace com::sun::star; -SwFlyFrm *GetFlyFromMarked( const SdrMarkList *pLst, SwViewShell *pSh ) +SwFlyFrame *GetFlyFromMarked( const SdrMarkList *pLst, SwViewShell *pSh ) { if ( !pLst ) pLst = pSh->HasDrawView() ? &pSh->Imp()->GetDrawView()->GetMarkedObjectList():nullptr; @@ -99,14 +99,14 @@ SwFlyFrm *GetFlyFromMarked( const SdrMarkList *pLst, SwViewShell *pSh ) { SdrObject *pO = pLst->GetMark( 0 )->GetMarkedSdrObj(); if ( pO && dynamic_cast<const SwVirtFlyDrawObj*>( pO) != nullptr ) - return static_cast<SwVirtFlyDrawObj*>(pO)->GetFlyFrm(); + return static_cast<SwVirtFlyDrawObj*>(pO)->GetFlyFrame(); } return nullptr; } -static void lcl_GrabCursor( SwFEShell* pSh, SwFlyFrm* pOldSelFly) +static void lcl_GrabCursor( SwFEShell* pSh, SwFlyFrame* pOldSelFly) { - const SwFrameFormat *pFlyFormat = pSh->SelFlyGrabCrsr(); + const SwFrameFormat *pFlyFormat = pSh->SelFlyGrabCursor(); if( pFlyFormat && !pSh->ActionPend() && (!pOldSelFly || pOldSelFly->GetFormat() != pFlyFormat) ) { @@ -125,7 +125,7 @@ extern bool g_bNoInterrupt; // in swmodule.cxx // --> assure consistent cursor pSh->KillPams(); pSh->ClearMark(); - pSh->SetCrsr( pSh->Imp()->GetDrawView()->GetAllMarkedRect().TopLeft(), true); + pSh->SetCursor( pSh->Imp()->GetDrawView()->GetAllMarkedRect().TopLeft(), true); } } @@ -142,7 +142,7 @@ bool SwFEShell::SelectObj( const Point& rPt, sal_uInt8 nFlag, SdrObject *pObj ) const bool bHadSelection = rMrkList.GetMarkCount(); const bool bAddSelect = 0 != (SW_ADD_SELECT & nFlag); const bool bEnterGroup = 0 != (SW_ENTER_GROUP & nFlag); - SwFlyFrm* pOldSelFly = nullptr; + SwFlyFrame* pOldSelFly = nullptr; const Point aOldPos( pDView->GetAllMarkedRect().TopLeft() ); if( bHadSelection ) @@ -166,18 +166,18 @@ bool SwFEShell::SelectObj( const Point& rPt, sal_uInt8 nFlag, SdrObject *pObj ) // Similar if a fly with protected content is deselected. // For simplicity we put the cursor next to the upper-left // corner. - Point aPt( pOldSelFly->Frm().Pos() ); + Point aPt( pOldSelFly->Frame().Pos() ); aPt.setX(aPt.getX() - 1); bool bUnLockView = !IsViewLocked(); LockView( true ); - SetCrsr( aPt, true ); + SetCursor( aPt, true ); if( bUnLockView ) LockView( false ); } if ( nType & CNT_GRF && - static_cast<SwNoTextFrm*>(pOldSelFly->Lower())->HasAnimation() ) + static_cast<SwNoTextFrame*>(pOldSelFly->Lower())->HasAnimation() ) { - GetWin()->Invalidate( pOldSelFly->Frm().SVRect() ); + GetWin()->Invalidate( pOldSelFly->Frame().SVRect() ); } // Cancel crop mode @@ -249,14 +249,14 @@ bool SwFEShell::SelectObj( const Point& rPt, sal_uInt8 nFlag, SdrObject *pObj ) ::lcl_GrabCursor(this, pOldSelFly); if ( GetCntType() & CNT_GRF ) { - const SwFlyFrm *pTmp = GetFlyFromMarked( &rMrkList, this ); + const SwFlyFrame *pTmp = GetFlyFromMarked( &rMrkList, this ); OSL_ENSURE( pTmp, "Graphic without Fly" ); - if ( static_cast<const SwNoTextFrm*>(pTmp->Lower())->HasAnimation() ) - static_cast<const SwNoTextFrm*>(pTmp->Lower())->StopAnimation( GetOut() ); + if ( static_cast<const SwNoTextFrame*>(pTmp->Lower())->HasAnimation() ) + static_cast<const SwNoTextFrame*>(pTmp->Lower())->StopAnimation( GetOut() ); } } else if ( !pOldSelFly && bHadSelection ) - SetCrsr( aOldPos, true); + SetCursor( aOldPos, true); if( bRet || !bHadSelection ) CallChgLnk(); @@ -297,20 +297,20 @@ bool SwFEShell::MoveAnchor( SwMove nDir ) nullptr == (pMrkList = &Imp()->GetDrawView()->GetMarkedObjectList()) || 1 != pMrkList->GetMarkCount()) return false; - SwFrm* pOld; - SwFlyFrm* pFly = nullptr; + SwFrame* pOld; + SwFlyFrame* pFly = nullptr; SdrObject *pObj = pMrkList->GetMark( 0 )->GetMarkedSdrObj(); if( dynamic_cast<const SwVirtFlyDrawObj*>( pObj) != nullptr ) { - pFly = static_cast<SwVirtFlyDrawObj*>(pObj)->GetFlyFrm(); - pOld = pFly->AnchorFrm(); + pFly = static_cast<SwVirtFlyDrawObj*>(pObj)->GetFlyFrame(); + pOld = pFly->AnchorFrame(); } else - pOld = static_cast<SwDrawContact*>(GetUserCall(pObj))->GetAnchorFrm( pObj ); + pOld = static_cast<SwDrawContact*>(GetUserCall(pObj))->GetAnchorFrame( pObj ); bool bRet = false; if( pOld ) { - SwFrm* pNew = pOld; + SwFrame* pNew = pOld; // #i28701# SwAnchoredObject* pAnchoredObj = ::GetUserCall( pObj )->GetAnchoredObj( pObj ); SwFrameFormat& rFormat = pAnchoredObj->GetFrameFormat(); @@ -320,7 +320,7 @@ bool SwFEShell::MoveAnchor( SwMove nDir ) return false; if( pOld->IsVertical() ) { - if( pOld->IsTextFrm() ) + if( pOld->IsTextFrame() ) { switch( nDir ) { case SwMove::UP: nDir = SwMove::LEFT; break; @@ -340,25 +340,25 @@ bool SwFEShell::MoveAnchor( SwMove nDir ) switch ( nAnchorId ) { case FLY_AT_PAGE: { - OSL_ENSURE( pOld->IsPageFrm(), "Wrong anchor, page expected." ); + OSL_ENSURE( pOld->IsPageFrame(), "Wrong anchor, page expected." ); if( SwMove::UP == nDir ) pNew = pOld->GetPrev(); else if( SwMove::DOWN == nDir ) pNew = pOld->GetNext(); if( pNew && pNew != pOld ) { - aAnch.SetPageNum( static_cast<SwPageFrm*>(pNew)->GetPhyPageNum() ); + aAnch.SetPageNum( static_cast<SwPageFrame*>(pNew)->GetPhyPageNum() ); bRet = true; } break; } case FLY_AT_CHAR: { - OSL_ENSURE( pOld->IsContentFrm(), "Wrong anchor, page expected." ); + OSL_ENSURE( pOld->IsContentFrame(), "Wrong anchor, page expected." ); if( SwMove::LEFT == nDir || SwMove::RIGHT == nDir ) { SwPosition pos = *aAnch.GetContentAnchor(); - SwTextNode* pTextNd = static_cast<SwTextFrm*>(pOld)->GetTextNode(); + SwTextNode* pTextNd = static_cast<SwTextFrame*>(pOld)->GetTextNode(); const sal_Int32 nAct = pos.nContent.GetIndex(); if( SwMove::LEFT == nDir ) { @@ -373,7 +373,7 @@ bool SwFEShell::MoveAnchor( SwMove nDir ) else { const sal_Int32 nMax = - static_cast<SwTextFrm*>(pOld)->GetTextNode()->GetText().getLength(); + static_cast<SwTextFrame*>(pOld)->GetTextNode()->GetText().getLength(); if( nAct < nMax ) { bRet = true; @@ -388,20 +388,20 @@ bool SwFEShell::MoveAnchor( SwMove nDir ) } // no break! case FLY_AT_PARA: { - OSL_ENSURE( pOld->IsContentFrm(), "Wrong anchor, page expected." ); + OSL_ENSURE( pOld->IsContentFrame(), "Wrong anchor, page expected." ); if( SwMove::UP == nDir ) pNew = pOld->FindPrev(); else if( SwMove::DOWN == nDir ) pNew = pOld->FindNext(); - if( pNew && pNew != pOld && pNew->IsContentFrm() ) + if( pNew && pNew != pOld && pNew->IsContentFrame() ) { SwPosition pos = *aAnch.GetContentAnchor(); - SwTextNode* pTextNd = static_cast<SwTextFrm*>(pNew)->GetTextNode(); + SwTextNode* pTextNd = static_cast<SwTextFrame*>(pNew)->GetTextNode(); pos.nNode = *pTextNd; sal_Int32 nTmp = 0; if( bRet ) { - nTmp = static_cast<SwTextFrm*>(pNew)->GetTextNode()->GetText().getLength(); + nTmp = static_cast<SwTextFrame*>(pNew)->GetTextNode()->GetText().getLength(); if( nTmp ) --nTmp; } @@ -415,40 +415,40 @@ bool SwFEShell::MoveAnchor( SwMove nDir ) } case FLY_AT_FLY: { - OSL_ENSURE( pOld->IsFlyFrm(), "Wrong anchor, fly frame expected."); - SwPageFrm* pPage = pOld->FindPageFrm(); + OSL_ENSURE( pOld->IsFlyFrame(), "Wrong anchor, fly frame expected."); + SwPageFrame* pPage = pOld->FindPageFrame(); OSL_ENSURE( pPage, "Where's my page?" ); - SwFlyFrm* pNewFly = nullptr; + SwFlyFrame* pNewFly = nullptr; if( pPage->GetSortedObjs() ) { bool bOld = false; - Point aCenter( pOld->Frm().Left() + pOld->Frm().Width()/2, - pOld->Frm().Top() + pOld->Frm().Height()/2 ); + Point aCenter( pOld->Frame().Left() + pOld->Frame().Width()/2, + pOld->Frame().Top() + pOld->Frame().Height()/2 ); Point aBest; for( size_t i = 0; i<pPage->GetSortedObjs()->size(); ++i ) { SwAnchoredObject* pAnchObj = (*pPage->GetSortedObjs())[i]; - if( dynamic_cast<const SwFlyFrm*>( pAnchObj) != nullptr ) + if( dynamic_cast<const SwFlyFrame*>( pAnchObj) != nullptr ) { - SwFlyFrm* pTmp = static_cast<SwFlyFrm*>(pAnchObj); + SwFlyFrame* pTmp = static_cast<SwFlyFrame*>(pAnchObj); if( pTmp == pOld ) bOld = true; else { - const SwFlyFrm* pCheck = pFly ? pTmp : nullptr; + const SwFlyFrame* pCheck = pFly ? pTmp : nullptr; while( pCheck ) { if( pCheck == pFly ) break; - const SwFrm *pNxt = pCheck->GetAnchorFrm(); - pCheck = pNxt ? pNxt->FindFlyFrm() : nullptr; + const SwFrame *pNxt = pCheck->GetAnchorFrame(); + pCheck = pNxt ? pNxt->FindFlyFrame() : nullptr; } if( pCheck || pTmp->IsProtected() ) continue; - Point aNew( pTmp->Frm().Left() + - pTmp->Frm().Width()/2, - pTmp->Frm().Top() + - pTmp->Frm().Height()/2 ); + Point aNew( pTmp->Frame().Left() + + pTmp->Frame().Width()/2, + pTmp->Frame().Top() + + pTmp->Frame().Height()/2 ); bool bAccept = false; switch( nDir ) { case SwMove::RIGHT: @@ -540,33 +540,33 @@ const SdrMarkList* SwFEShell::_GetMarkList() const return pMarkList; } -FrmTypeFlags SwFEShell::GetSelFrmType() const +FrameTypeFlags SwFEShell::GetSelFrameType() const { - FrmTypeFlags eType; + FrameTypeFlags eType; // get marked frame list, and check if anything is selected const SdrMarkList* pMarkList = _GetMarkList(); if( pMarkList == nullptr || pMarkList->GetMarkCount() == 0 ) - eType = FrmTypeFlags::NONE; + eType = FrameTypeFlags::NONE; else { // obtain marked item as fly frame; if no fly frame, it must // be a draw object - const SwFlyFrm* pFly = ::GetFlyFromMarked(pMarkList, const_cast<SwViewShell*>(static_cast<SwViewShell const *>(this))); + const SwFlyFrame* pFly = ::GetFlyFromMarked(pMarkList, const_cast<SwViewShell*>(static_cast<SwViewShell const *>(this))); if ( pFly != nullptr ) { - if( pFly->IsFlyLayFrm() ) - eType = FrmTypeFlags::FLY_FREE; - else if( pFly->IsFlyAtCntFrm() ) - eType = FrmTypeFlags::FLY_ATCNT; + if( pFly->IsFlyLayFrame() ) + eType = FrameTypeFlags::FLY_FREE; + else if( pFly->IsFlyAtContentFrame() ) + eType = FrameTypeFlags::FLY_ATCNT; else { - OSL_ENSURE( pFly->IsFlyInCntFrm(), "New frametype?" ); - eType = FrmTypeFlags::FLY_INCNT; + OSL_ENSURE( pFly->IsFlyInContentFrame(), "New frametype?" ); + eType = FrameTypeFlags::FLY_INCNT; } } else - eType = FrmTypeFlags::DRAWOBJ; + eType = FrameTypeFlags::DRAWOBJ; } return eType; @@ -577,7 +577,7 @@ bool SwFEShell::IsSelContainsControl() const { bool bRet = false; - // basically, copy the mechanism from GetSelFrmType(), but call + // basically, copy the mechanism from GetSelFrameType(), but call // CheckControl... if you get a drawing object const SdrMarkList* pMarkList = _GetMarkList(); if( pMarkList != nullptr && pMarkList->GetMarkCount() == 1 ) @@ -714,8 +714,8 @@ long SwFEShell::EndDrag( const Point *, bool ) for(SwViewShell& rSh : GetRingContainer()) { rSh.EndAction(); - if( dynamic_cast<const SwCrsrShell *>(&rSh) != nullptr ) - static_cast<SwCrsrShell*>(&rSh)->CallChgLnk(); + if( dynamic_cast<const SwCursorShell *>(&rSh) != nullptr ) + static_cast<SwCursorShell*>(&rSh)->CallChgLnk(); } GetDoc()->getIDocumentState().SetModified(); @@ -734,32 +734,32 @@ void SwFEShell::BreakDrag() SetChainMarker(); } -// If a fly is selected, pulls the crsr in the first ContentFrm -const SwFrameFormat* SwFEShell::SelFlyGrabCrsr() +// If a fly is selected, pulls the crsr in the first ContentFrame +const SwFrameFormat* SwFEShell::SelFlyGrabCursor() { if ( Imp()->HasDrawView() ) { const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList(); - SwFlyFrm *pFly = ::GetFlyFromMarked( &rMrkList, this ); + SwFlyFrame *pFly = ::GetFlyFromMarked( &rMrkList, this ); if( pFly ) { - SwContentFrm *pCFrm = pFly->ContainsContent(); - if ( pCFrm ) + SwContentFrame *pCFrame = pFly->ContainsContent(); + if ( pCFrame ) { - SwContentNode *pCNode = pCFrm->GetNode(); + SwContentNode *pCNode = pCFrame->GetNode(); // --> assure, that the cursor is consistent. KillPams(); ClearMark(); - SwPaM *pCrsr = GetCrsr(); + SwPaM *pCursor = GetCursor(); - pCrsr->GetPoint()->nNode = *pCNode; - pCrsr->GetPoint()->nContent.Assign( pCNode, 0 ); + pCursor->GetPoint()->nNode = *pCNode; + pCursor->GetPoint()->nContent.Assign( pCNode, 0 ); SwRect& rChrRect = (SwRect&)GetCharRect(); rChrRect = pFly->Prt(); - rChrRect.Pos() += pFly->Frm().Pos(); - GetCrsrDocPos() = rChrRect.Pos(); + rChrRect.Pos() += pFly->Frame().Pos(); + GetCursorDocPos() = rChrRect.Pos(); } return pFly->GetFormat(); } @@ -777,34 +777,34 @@ static void lcl_NotifyNeighbours( const SdrMarkList *pLst ) // 4. Also Drawing objects can displace frames for( size_t j = 0; j < pLst->GetMarkCount(); ++j ) { - SwPageFrm *pPage; + SwPageFrame *pPage; bool bCheckNeighbours = false; sal_Int16 aHori = text::HoriOrientation::NONE; SwRect aRect; SdrObject *pO = pLst->GetMark( j )->GetMarkedSdrObj(); if ( dynamic_cast<const SwVirtFlyDrawObj*>( pO) != nullptr ) { - SwFlyFrm *pFly = static_cast<SwVirtFlyDrawObj*>(pO)->GetFlyFrm(); + SwFlyFrame *pFly = static_cast<SwVirtFlyDrawObj*>(pO)->GetFlyFrame(); const SwFormatHoriOrient &rHori = pFly->GetFormat()->GetHoriOrient(); aHori = rHori.GetHoriOrient(); if( text::HoriOrientation::NONE != aHori && text::HoriOrientation::CENTER != aHori && - pFly->IsFlyAtCntFrm() ) + pFly->IsFlyAtContentFrame() ) { bCheckNeighbours = true; pFly->InvalidatePos(); - pFly->Frm().Pos().Y() += 1; + pFly->Frame().Pos().Y() += 1; } - pPage = pFly->FindPageFrm(); - aRect = pFly->Frm(); + pPage = pFly->FindPageFrame(); + aRect = pFly->Frame(); } else { - SwFrm* pAnch = static_cast<SwDrawContact*>( GetUserCall(pO) )->GetAnchorFrm( pO ); + SwFrame* pAnch = static_cast<SwDrawContact*>( GetUserCall(pO) )->GetAnchorFrame( pO ); if( !pAnch ) continue; - pPage = pAnch->FindPageFrm(); + pPage = pAnch->FindPageFrame(); // #i68520# - naming changed aRect = GetBoundRectOfAnchoredObj( pO ); } @@ -813,33 +813,33 @@ static void lcl_NotifyNeighbours( const SdrMarkList *pLst ) for ( size_t i = 0; i < nCount; ++i ) { SwAnchoredObject* pAnchoredObj = (*pPage->GetSortedObjs())[i]; - if ( dynamic_cast<const SwFlyFrm*>( pAnchoredObj) == nullptr ) + if ( dynamic_cast<const SwFlyFrame*>( pAnchoredObj) == nullptr ) continue; - SwFlyFrm* pAct = static_cast<SwFlyFrm*>(pAnchoredObj); + SwFlyFrame* pAct = static_cast<SwFlyFrame*>(pAnchoredObj); SwRect aTmpCalcPnt( pAct->Prt() ); - aTmpCalcPnt += pAct->Frm().Pos(); + aTmpCalcPnt += pAct->Frame().Pos(); if ( aRect.IsOver( aTmpCalcPnt ) ) { - SwContentFrm *pCnt = pAct->ContainsContent(); + SwContentFrame *pCnt = pAct->ContainsContent(); while ( pCnt ) { aTmpCalcPnt = pCnt->Prt(); - aTmpCalcPnt += pCnt->Frm().Pos(); + aTmpCalcPnt += pCnt->Frame().Pos(); if ( aRect.IsOver( aTmpCalcPnt ) ) - static_cast<SwFrm*>(pCnt)->Prepare( PREP_FLY_ATTR_CHG ); - pCnt = pCnt->GetNextContentFrm(); + static_cast<SwFrame*>(pCnt)->Prepare( PREP_FLY_ATTR_CHG ); + pCnt = pCnt->GetNextContentFrame(); } } - if ( bCheckNeighbours && pAct->IsFlyAtCntFrm() ) + if ( bCheckNeighbours && pAct->IsFlyAtContentFrame() ) { const SwFormatHoriOrient &rH = pAct->GetFormat()->GetHoriOrient(); if ( rH.GetHoriOrient() == aHori && - pAct->Frm().Top() <= aRect.Bottom() && - pAct->Frm().Bottom() >= aRect.Top() ) + pAct->Frame().Top() <= aRect.Bottom() && + pAct->Frame().Bottom() >= aRect.Top() ) { pAct->InvalidatePos(); - pAct->Frm().Pos().Y() += 1; + pAct->Frame().Pos().Y() += 1; } } } @@ -852,8 +852,8 @@ void SwFEShell::SelectionToTop( bool bTop ) const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList(); OSL_ENSURE( rMrkList.GetMarkCount(), "No object selected." ); - SwFlyFrm *pFly = ::GetFlyFromMarked( &rMrkList, this ); - if ( pFly && pFly->IsFlyInCntFrm() ) + SwFlyFrame *pFly = ::GetFlyFromMarked( &rMrkList, this ); + if ( pFly && pFly->IsFlyInContentFrame() ) return; StartAllAction(); @@ -872,8 +872,8 @@ void SwFEShell::SelectionToBottom( bool bBottom ) const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList(); OSL_ENSURE( rMrkList.GetMarkCount(), "No object selected." ); - SwFlyFrm *pFly = ::GetFlyFromMarked( &rMrkList, this ); - if ( pFly && pFly->IsFlyInCntFrm() ) + SwFlyFrame *pFly = ::GetFlyFromMarked( &rMrkList, this ); + if ( pFly && pFly->IsFlyInContentFrame() ) return; StartAllAction(); @@ -943,7 +943,7 @@ void SwFEShell::ChangeOpaque( SdrLayerID nLayerId ) InvalidateWindows( SwRect( pObj->GetCurrentBoundRect() ) ); if ( dynamic_cast<const SwVirtFlyDrawObj*>( pObj) != nullptr ) { - SwFormat *pFormat = static_cast<SwVirtFlyDrawObj*>(pObj)->GetFlyFrm()->GetFormat(); + SwFormat *pFormat = static_cast<SwVirtFlyDrawObj*>(pObj)->GetFlyFrame()->GetFormat(); SvxOpaqueItem aOpa( pFormat->GetOpaque() ); aOpa.SetValue( nLayerId == rIDDMA.GetHellId() ); pFormat->SetFormatAttr( aOpa ); @@ -966,13 +966,13 @@ void SwFEShell::SelectionToHell() size_t SwFEShell::IsObjSelected() const { - if ( IsFrmSelected() || !Imp()->HasDrawView() ) + if ( IsFrameSelected() || !Imp()->HasDrawView() ) return 0; return Imp()->GetDrawView()->GetMarkedObjectList().GetMarkCount(); } -bool SwFEShell::IsFrmSelected() const +bool SwFEShell::IsFrameSelected() const { if ( !Imp()->HasDrawView() ) return false; @@ -983,7 +983,7 @@ bool SwFEShell::IsFrmSelected() const bool SwFEShell::IsObjSelected( const SdrObject& rObj ) const { - if ( IsFrmSelected() || !Imp()->HasDrawView() ) + if ( IsFrameSelected() || !Imp()->HasDrawView() ) return false; else return Imp()->GetDrawView() @@ -1144,24 +1144,24 @@ bool SwFEShell::ShouldObjectBeSelected(const Point& rPt) } if ( bObjInBackground ) { - const SwPageFrm* pPageFrm = GetLayout()->GetPageAtPos( rPt ); - if( pPageFrm ) + const SwPageFrame* pPageFrame = GetLayout()->GetPageAtPos( rPt ); + if( pPageFrame ) { - const SwContentFrm* pContentFrm( pPageFrm->ContainsContent() ); - while ( pContentFrm ) + const SwContentFrame* pContentFrame( pPageFrame->ContainsContent() ); + while ( pContentFrame ) { - if ( pContentFrm->UnionFrm().IsInside( rPt ) ) + if ( pContentFrame->UnionFrame().IsInside( rPt ) ) { - const SwTextFrm* pTextFrm = - dynamic_cast<const SwTextFrm*>(pContentFrm); - if ( pTextFrm ) + const SwTextFrame* pTextFrame = + dynamic_cast<const SwTextFrame*>(pContentFrame); + if ( pTextFrame ) { - SwPosition aPos( *(pTextFrm->GetTextNode()) ); + SwPosition aPos( *(pTextFrame->GetTextNode()) ); Point aTmpPt( rPt ); - if (pTextFrm->GetKeyCrsrOfst(&aPos, aTmpPt)) + if (pTextFrame->GetKeyCursorOfst(&aPos, aTmpPt)) { SwRect aCursorCharRect; - if (pTextFrm->GetCharRect(aCursorCharRect, + if (pTextFrame->GetCharRect(aCursorCharRect, aPos)) { if ( aCursorCharRect.IsOver( SwRect( pObj->GetLastBoundRect() ) ) ) @@ -1178,7 +1178,7 @@ bool SwFEShell::ShouldObjectBeSelected(const Point& rPt) break; } - pContentFrm = pContentFrm->GetNextContentFrm(); + pContentFrame = pContentFrame->GetNextContentFrame(); } } } @@ -1276,7 +1276,7 @@ const SdrObject* SwFEShell::GetBestObject( bool bNext, GotoObjFlags eType, bool if( !bNoFly && bNoDraw ) { - SwFlyFrm *pFly = GetCurrFrm( false )->FindFlyFrm(); + SwFlyFrame *pFly = GetCurrFrame( false )->FindFlyFrame(); if( pFly ) pBest = pFly->GetVirtDrawObj(); } @@ -1295,7 +1295,7 @@ const SdrObject* SwFEShell::GetBestObject( bool bNext, GotoObjFlags eType, bool { const SdrObject* pStartObj = rMrkList.GetMark(0)->GetMarkedSdrObj(); if( dynamic_cast<const SwVirtFlyDrawObj*>( pStartObj) != nullptr ) - aPos = static_cast<const SwVirtFlyDrawObj*>(pStartObj)->GetFlyFrm()->Frm().Pos(); + aPos = static_cast<const SwVirtFlyDrawObj*>(pStartObj)->GetFlyFrame()->Frame().Pos(); else aPos = pStartObj->GetSnapRect().TopLeft(); @@ -1328,41 +1328,41 @@ const SdrObject* SwFEShell::GetBestObject( bool bNext, GotoObjFlags eType, bool while ( aObjIter.IsMore() ) { SdrObject* pObj = aObjIter.Next(); - bool bFlyFrm = dynamic_cast<const SwVirtFlyDrawObj*>( pObj) != nullptr; - if( ( bNoFly && bFlyFrm ) || - ( bNoDraw && !bFlyFrm ) || + bool bFlyFrame = dynamic_cast<const SwVirtFlyDrawObj*>( pObj) != nullptr; + if( ( bNoFly && bFlyFrame ) || + ( bNoDraw && !bFlyFrame ) || ( eType == GotoObjFlags::DrawSimple && lcl_IsControlGroup( pObj ) ) || ( eType == GotoObjFlags::DrawControl && !lcl_IsControlGroup( pObj ) ) || ( pFilter && !pFilter->includeObject( *pObj ) ) ) continue; - if( bFlyFrm ) + if( bFlyFrame ) { SwVirtFlyDrawObj *pO = static_cast<SwVirtFlyDrawObj*>(pObj); - SwFlyFrm *pFly = pO->GetFlyFrm(); + SwFlyFrame *pFly = pO->GetFlyFrame(); if( GotoObjFlags::FlyAny != ( GotoObjFlags::FlyAny & eType ) ) { switch ( eType ) { - case GotoObjFlags::FlyFrm: - if ( pFly->Lower() && pFly->Lower()->IsNoTextFrm() ) + case GotoObjFlags::FlyFrame: + if ( pFly->Lower() && pFly->Lower()->IsNoTextFrame() ) continue; break; case GotoObjFlags::FlyGrf: if ( pFly->Lower() && - (pFly->Lower()->IsLayoutFrm() || - !static_cast<SwContentFrm*>(pFly->Lower())->GetNode()->GetGrfNode())) + (pFly->Lower()->IsLayoutFrame() || + !static_cast<SwContentFrame*>(pFly->Lower())->GetNode()->GetGrfNode())) continue; break; case GotoObjFlags::FlyOLE: if ( pFly->Lower() && - (pFly->Lower()->IsLayoutFrm() || - !static_cast<SwContentFrm*>(pFly->Lower())->GetNode()->GetOLENode())) + (pFly->Lower()->IsLayoutFrame() || + !static_cast<SwContentFrame*>(pFly->Lower())->GetNode()->GetOLENode())) continue; break; default: break; } } - aCurPos = pFly->Frm().Pos(); + aCurPos = pFly->Frame().Pos(); } else aCurPos = pObj->GetCurrentBoundRect().TopLeft(); @@ -1378,13 +1378,13 @@ const SdrObject* SwFEShell::GetBestObject( bool bNext, GotoObjFlags eType, bool while ( aTmpIter.IsMore() ) { SdrObject* pTmpObj = aTmpIter.Next(); - bFlyFrm = dynamic_cast<const SwVirtFlyDrawObj*>( pTmpObj) != nullptr; - if( ( bNoFly && bFlyFrm ) || ( bNoDraw && !bFlyFrm ) ) + bFlyFrame = dynamic_cast<const SwVirtFlyDrawObj*>( pTmpObj) != nullptr; + if( ( bNoFly && bFlyFrame ) || ( bNoDraw && !bFlyFrame ) ) continue; - if( bFlyFrm ) + if( bFlyFrame ) { SwVirtFlyDrawObj *pO = static_cast<SwVirtFlyDrawObj*>(pTmpObj); - aCurPos = pO->GetFlyFrm()->Frm().Pos(); + aCurPos = pO->GetFlyFrame()->Frame().Pos(); } else aCurPos = pTmpObj->GetCurrentBoundRect().TopLeft(); @@ -1442,14 +1442,14 @@ bool SwFEShell::GotoObj( bool bNext, GotoObjFlags eType ) if ( !pBest ) return false; - bool bFlyFrm = dynamic_cast<const SwVirtFlyDrawObj*>( pBest) != nullptr; - if( bFlyFrm ) + bool bFlyFrame = dynamic_cast<const SwVirtFlyDrawObj*>( pBest) != nullptr; + if( bFlyFrame ) { const SwVirtFlyDrawObj *pO = static_cast<const SwVirtFlyDrawObj*>(pBest); - const SwRect& rFrm = pO->GetFlyFrm()->Frm(); - SelectObj( rFrm.Pos(), 0, const_cast<SdrObject*>(pBest) ); + const SwRect& rFrame = pO->GetFlyFrame()->Frame(); + SelectObj( rFrame.Pos(), 0, const_cast<SdrObject*>(pBest) ); if( !ActionPend() ) - MakeVisible( rFrm ); + MakeVisible( rFrame ); } else { @@ -1584,19 +1584,19 @@ bool SwFEShell::ImpEndCreate() // default for controls character bound, otherwise paragraph bound. SwFormatAnchor aAnch; - const SwFrm *pAnch = nullptr; + const SwFrame *pAnch = nullptr; bool bCharBound = false; if( dynamic_cast<const SdrUnoObj*>( &rSdrObj) != nullptr ) { SwPosition aPos( GetDoc()->GetNodes() ); - SwCrsrMoveState aState( MV_SETONLYTEXT ); + SwCursorMoveState aState( MV_SETONLYTEXT ); Point aPoint( aPt.getX(), aPt.getY() + rBound.GetHeight()/2 ); - GetLayout()->GetCrsrOfst( &aPos, aPoint, &aState ); + GetLayout()->GetCursorOfst( &aPos, aPoint, &aState ); // characterbinding not allowed in readonly-content if( !aPos.nNode.GetNode().IsProtect() ) { - pAnch = aPos.nNode.GetNode().GetContentNode()->getLayoutFrm( GetLayout(), &aPoint, &aPos ); + pAnch = aPos.nNode.GetNode().GetContentNode()->getLayoutFrame( GetLayout(), &aPoint, &aPos ); SwRect aTmp; pAnch->GetCharRect( aTmp, aPos ); @@ -1632,11 +1632,11 @@ bool SwFEShell::ImpEndCreate() //bool bBodyOnly = OBJ_NONE != nIdent; bool bBodyOnly = 0xFFFF == nIdent; bool bAtPage = false; - const SwFrm* pPage = nullptr; - SwCrsrMoveState aState( MV_SETONLYTEXT ); + const SwFrame* pPage = nullptr; + SwCursorMoveState aState( MV_SETONLYTEXT ); Point aPoint( aPt ); SwPosition aPos( GetDoc()->GetNodes() ); - GetLayout()->GetCrsrOfst( &aPos, aPoint, &aState ); + GetLayout()->GetCursorOfst( &aPos, aPoint, &aState ); // do not set in ReadnOnly-content if (aPos.nNode.GetNode().IsProtect()) @@ -1647,7 +1647,7 @@ bool SwFEShell::ImpEndCreate() } SwContentNode* pCNode = aPos.nNode.GetNode().GetContentNode(); - pAnch = pCNode ? pCNode->getLayoutFrm( GetLayout(), &aPoint, nullptr, false ) : nullptr; + pAnch = pCNode ? pCNode->getLayoutFrame( GetLayout(), &aPoint, nullptr, false ) : nullptr; if (!pAnch) { // Hidden content. Anchor to the page instead @@ -1656,33 +1656,33 @@ bool SwFEShell::ImpEndCreate() if( !bAtPage ) { - const SwFlyFrm *pTmp = pAnch->FindFlyFrm(); + const SwFlyFrame *pTmp = pAnch->FindFlyFrame(); if( pTmp ) { - const SwFrm* pTmpFrm = pAnch; + const SwFrame* pTmpFrame = pAnch; SwRect aBound( rBound ); while( pTmp ) { - if( pTmp->Frm().IsInside( aBound ) ) + if( pTmp->Frame().IsInside( aBound ) ) { if( !bBodyOnly || !pTmp->FindFooterOrHeader() ) - pPage = pTmpFrm; + pPage = pTmpFrame; break; } - pTmp = pTmp->GetAnchorFrm() - ? pTmp->GetAnchorFrm()->FindFlyFrm() + pTmp = pTmp->GetAnchorFrame() + ? pTmp->GetAnchorFrame()->FindFlyFrame() : nullptr; - pTmpFrm = pTmp; + pTmpFrame = pTmp; } } if( !pPage ) - pPage = pAnch->FindPageFrm(); + pPage = pAnch->FindPageFrame(); // Always via FindAnchor, to assure the frame will be bound // to the previous. With GetCrsOfst we can also reach the next. THIS IS WRONG. pAnch = ::FindAnchor( pPage, aPt, bBodyOnly ); - aPos.nNode = *static_cast<const SwContentFrm*>(pAnch)->GetNode(); + aPos.nNode = *static_cast<const SwContentFrame*>(pAnch)->GetNode(); // do not set in ReadnOnly-content if( aPos.nNode.GetNode().IsProtect() ) @@ -1698,7 +1698,7 @@ bool SwFEShell::ImpEndCreate() if( bAtPage ) { - pPage = pAnch ? pAnch->FindPageFrm() : GetLayout()->GetPageAtPos(aPoint); + pPage = pAnch ? pAnch->FindPageFrame() : GetLayout()->GetPageAtPos(aPoint); aAnch.SetType( FLY_AT_PAGE ); aAnch.SetPageNum( pPage->GetPhyPageNum() ); @@ -1712,27 +1712,27 @@ bool SwFEShell::ImpEndCreate() // OD 2004-03-30 #i26791# - determine relative object position SwTwips nXOffset; - SwTwips nYOffset = rBound.Top() - pAnch->Frm().Top(); + SwTwips nYOffset = rBound.Top() - pAnch->Frame().Top(); { if( pAnch->IsVertical() ) { nXOffset = nYOffset; - nYOffset = pAnch->Frm().Left()+pAnch->Frm().Width()-rBound.Right(); + nYOffset = pAnch->Frame().Left()+pAnch->Frame().Width()-rBound.Right(); } else if( pAnch->IsRightToLeft() ) - nXOffset = pAnch->Frm().Left()+pAnch->Frm().Width()-rBound.Right(); + nXOffset = pAnch->Frame().Left()+pAnch->Frame().Width()-rBound.Right(); else - nXOffset = rBound.Left() - pAnch->Frm().Left(); - if( pAnch->IsTextFrm() && static_cast<const SwTextFrm*>(pAnch)->IsFollow() ) + nXOffset = rBound.Left() - pAnch->Frame().Left(); + if( pAnch->IsTextFrame() && static_cast<const SwTextFrame*>(pAnch)->IsFollow() ) { - const SwTextFrm* pTmp = static_cast<const SwTextFrm*>(pAnch); + const SwTextFrame* pTmp = static_cast<const SwTextFrame*>(pAnch); do { pTmp = pTmp->FindMaster(); OSL_ENSURE( pTmp, "Where's my Master?" ); // OD 2004-03-30 #i26791# - correction: add frame area height // of master frames. nYOffset += pTmp->IsVertical() ? - pTmp->Frm().Width() : pTmp->Frm().Height(); + pTmp->Frame().Width() : pTmp->Frame().Height(); } while ( pTmp->IsFollow() ); } } @@ -1742,7 +1742,7 @@ bool SwFEShell::ImpEndCreate() // For OBJ_NONE a fly is inserted. const long nWidth = rBound.Right() - rBound.Left(); const long nHeight= rBound.Bottom() - rBound.Top(); - aSet.Put( SwFormatFrmSize( ATT_MIN_SIZE, std::max( nWidth, long(MINFLY) ), + aSet.Put( SwFormatFrameSize( ATT_MIN_SIZE, std::max( nWidth, long(MINFLY) ), std::max( nHeight, long(MINFLY) ))); SwFormatHoriOrient aHori( nXOffset, text::HoriOrientation::NONE, text::RelOrientation::FRAME ); @@ -1770,35 +1770,35 @@ bool SwFEShell::ImpEndCreate() SdrObject::Free( pRemovedObject ); GetDoc()->GetIDocumentUndoRedo().DoDrawUndo(true); - SwFlyFrm* pFlyFrm; - if( NewFlyFrm( aSet, true ) && + SwFlyFrame* pFlyFrame; + if( NewFlyFrame( aSet, true ) && ::GetHtmlMode( GetDoc()->GetDocShell() ) && - nullptr != ( pFlyFrm = GetSelectedFlyFrm() )) + nullptr != ( pFlyFrame = GetSelectedFlyFrame() )) { SfxItemSet aHtmlSet( GetDoc()->GetAttrPool(), RES_VERT_ORIENT, RES_HORI_ORIENT ); // horizontal orientation: - const bool bLeftFrm = aFlyRect.Left() < - pAnch->Frm().Left() + pAnch->Prt().Left(), + const bool bLeftFrame = aFlyRect.Left() < + pAnch->Frame().Left() + pAnch->Prt().Left(), bLeftPrt = aFlyRect.Left() + aFlyRect.Width() < - pAnch->Frm().Left() + pAnch->Prt().Width()/2; - if( bLeftFrm || bLeftPrt ) + pAnch->Frame().Left() + pAnch->Prt().Width()/2; + if( bLeftFrame || bLeftPrt ) { aHori.SetHoriOrient( text::HoriOrientation::LEFT ); - aHori.SetRelationOrient( bLeftFrm ? text::RelOrientation::FRAME : text::RelOrientation::PRINT_AREA ); + aHori.SetRelationOrient( bLeftFrame ? text::RelOrientation::FRAME : text::RelOrientation::PRINT_AREA ); } else { - const bool bRightFrm = aFlyRect.Left() > - pAnch->Frm().Left() + pAnch->Prt().Width(); + const bool bRightFrame = aFlyRect.Left() > + pAnch->Frame().Left() + pAnch->Prt().Width(); aHori.SetHoriOrient( text::HoriOrientation::RIGHT ); - aHori.SetRelationOrient( bRightFrm ? text::RelOrientation::FRAME : text::RelOrientation::PRINT_AREA ); + aHori.SetRelationOrient( bRightFrame ? text::RelOrientation::FRAME : text::RelOrientation::PRINT_AREA ); } aHtmlSet.Put( aHori ); aVert.SetVertOrient( text::VertOrientation::TOP ); aVert.SetRelationOrient( text::RelOrientation::PRINT_AREA ); aHtmlSet.Put( aVert ); - GetDoc()->SetAttr( aHtmlSet, *pFlyFrm->GetFormat() ); + GetDoc()->SetAttr( aHtmlSet, *pFlyFrame->GetFormat() ); } } else @@ -1815,9 +1815,9 @@ bool SwFEShell::ImpEndCreate() SwFormatHoriOrient aHori( nXOffset, text::HoriOrientation::NONE, text::RelOrientation::FRAME ); aSet.Put( aHori ); // OD 2004-03-30 #i26791# - set vertical position - if( pAnch->IsTextFrm() && static_cast<const SwTextFrm*>(pAnch)->IsFollow() ) + if( pAnch->IsTextFrame() && static_cast<const SwTextFrame*>(pAnch)->IsFollow() ) { - const SwTextFrm* pTmp = static_cast<const SwTextFrm*>(pAnch); + const SwTextFrame* pTmp = static_cast<const SwTextFrame*>(pAnch); do { pTmp = pTmp->FindMaster(); assert(pTmp && "Where's my Master?"); @@ -1848,9 +1848,9 @@ bool SwFEShell::ImpEndCreate() aVertical.SetVertOrient( text::VertOrientation::LINE_CENTER ); pFormat->SetFormatAttr( aVertical ); } - if( pAnch->IsTextFrm() && static_cast<const SwTextFrm*>(pAnch)->IsFollow() ) + if( pAnch->IsTextFrame() && static_cast<const SwTextFrame*>(pAnch)->IsFollow() ) { - const SwTextFrm* pTmp = static_cast<const SwTextFrm*>(pAnch); + const SwTextFrame* pTmp = static_cast<const SwTextFrame*>(pAnch); do { pTmp = pTmp->FindMaster(); OSL_ENSURE( pTmp, "Where's my Master?" ); @@ -1865,7 +1865,7 @@ bool SwFEShell::ImpEndCreate() // mark object at frame the object is inserted at. { - SdrObject* pMarkObj = pContact->GetDrawObjectByAnchorFrm( *pAnch ); + SdrObject* pMarkObj = pContact->GetDrawObjectByAnchorFrame( *pAnch ); if ( pMarkObj ) { Imp()->GetDrawView()->MarkObj( pMarkObj, Imp()->GetPageView() ); @@ -1949,7 +1949,7 @@ bool SwFEShell::EndMark() // frames are not selected this way, except when // it is only one frame SdrMarkList &rMrkList = (SdrMarkList&)pDView->GetMarkedObjectList(); - SwFlyFrm* pOldSelFly = ::GetFlyFromMarked( &rMrkList, this ); + SwFlyFrame* pOldSelFly = ::GetFlyFromMarked( &rMrkList, this ); if ( rMrkList.GetMarkCount() > 1 ) for ( size_t i = 0; i < rMrkList.GetMarkCount(); ++i ) @@ -2083,10 +2083,10 @@ Point SwFEShell::GetAnchorObjDiff() const Point aRet( aRect.TopLeft() ); - if ( IsFrmSelected() ) + if ( IsFrameSelected() ) { - SwFlyFrm *pFly = GetSelectedFlyFrm(); - aRet -= pFly->GetAnchorFrm()->Frm().Pos(); + SwFlyFrame *pFly = GetSelectedFlyFrame(); + aRet -= pFly->GetAnchorFrame()->Frame().Pos(); } else { @@ -2158,7 +2158,7 @@ bool SwFEShell::IsGroupAllowed() const { bIsGroupAllowed = true; const SdrObject* pUpGroup = nullptr; - const SwFrm* pHeaderFooterFrm = nullptr; + const SwFrame* pHeaderFooterFrame = nullptr; const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList(); for ( size_t i = 0; bIsGroupAllowed && i < rMrkList.GetMarkCount(); ++i ) { @@ -2175,14 +2175,14 @@ bool SwFEShell::IsGroupAllowed() const // same header/footer or not in header/footer. if ( bIsGroupAllowed ) { - const SwFrm* pAnchorFrm = nullptr; + const SwFrame* pAnchorFrame = nullptr; if ( dynamic_cast<const SwVirtFlyDrawObj*>( pObj) != nullptr ) { - const SwFlyFrm* pFlyFrm = - static_cast<const SwVirtFlyDrawObj*>(pObj)->GetFlyFrm(); - if ( pFlyFrm ) + const SwFlyFrame* pFlyFrame = + static_cast<const SwVirtFlyDrawObj*>(pObj)->GetFlyFrame(); + if ( pFlyFrame ) { - pAnchorFrm = pFlyFrm->GetAnchorFrm(); + pAnchorFrame = pFlyFrame->GetAnchorFrame(); } } else @@ -2190,19 +2190,19 @@ bool SwFEShell::IsGroupAllowed() const SwDrawContact* pDrawContact = static_cast<SwDrawContact*>(GetUserCall( pObj )); if ( pDrawContact ) { - pAnchorFrm = pDrawContact->GetAnchorFrm( pObj ); + pAnchorFrame = pDrawContact->GetAnchorFrame( pObj ); } } - if ( pAnchorFrm ) + if ( pAnchorFrame ) { if ( i ) { bIsGroupAllowed = - ( pAnchorFrm->FindFooterOrHeader() == pHeaderFooterFrm ); + ( pAnchorFrame->FindFooterOrHeader() == pHeaderFooterFrame ); } else { - pHeaderFooterFrm = pAnchorFrm->FindFooterOrHeader(); + pHeaderFooterFrame = pAnchorFrame->FindFooterOrHeader(); } } } @@ -2272,7 +2272,7 @@ void SwFEShell::MirrorSelection( bool bHorizontal ) // jump to named frame (Graphic/OLE) -bool SwFEShell::GotoFly( const OUString& rName, FlyCntType eType, bool bSelFrm ) +bool SwFEShell::GotoFly( const OUString& rName, FlyCntType eType, bool bSelFrame ) { bool bRet = false; static sal_uInt8 const aChkArr[ 4 ] = { @@ -2287,31 +2287,31 @@ bool SwFEShell::GotoFly( const OUString& rName, FlyCntType eType, bool bSelFrm ) { SET_CURR_SHELL( this ); - SwFlyFrm* pFrm = SwIterator<SwFlyFrm,SwFormat>( *pFlyFormat ).First(); - if( pFrm ) + SwFlyFrame* pFrame = SwIterator<SwFlyFrame,SwFormat>( *pFlyFormat ).First(); + if( pFrame ) { - if( bSelFrm ) + if( bSelFrame ) { - SelectObj( pFrm->Frm().Pos(), 0, pFrm->GetVirtDrawObj() ); + SelectObj( pFrame->Frame().Pos(), 0, pFrame->GetVirtDrawObj() ); if( !ActionPend() ) - MakeVisible( pFrm->Frm() ); + MakeVisible( pFrame->Frame() ); } else { - SwContentFrm *pCFrm = pFrm->ContainsContent(); - if ( pCFrm ) + SwContentFrame *pCFrame = pFrame->ContainsContent(); + if ( pCFrame ) { - SwContentNode *pCNode = pCFrm->GetNode(); + SwContentNode *pCNode = pCFrame->GetNode(); ClearMark(); - SwPaM* pCrsr = GetCrsr(); + SwPaM* pCursor = GetCursor(); - pCrsr->GetPoint()->nNode = *pCNode; - pCrsr->GetPoint()->nContent.Assign( pCNode, 0 ); + pCursor->GetPoint()->nNode = *pCNode; + pCursor->GetPoint()->nContent.Assign( pCNode, 0 ); SwRect& rChrRect = (SwRect&)GetCharRect(); - rChrRect = pFrm->Prt(); - rChrRect.Pos() += pFrm->Frm().Pos(); - GetCrsrDocPos() = rChrRect.Pos(); + rChrRect = pFrame->Prt(); + rChrRect.Pos() += pFrame->Frame().Pos(); + GetCursorDocPos() = rChrRect.Pos(); } } bRet = true; @@ -2336,11 +2336,11 @@ void SwFEShell::MakeSelVisible() if ( Imp()->HasDrawView() && Imp()->GetDrawView()->GetMarkedObjectList().GetMarkCount() ) { - GetCurrFrm(); // just to trigger formatting in case the selected object is not formatted. + GetCurrFrame(); // just to trigger formatting in case the selected object is not formatted. MakeVisible( Imp()->GetDrawView()->GetAllMarkedRect() ); } else - SwCrsrShell::MakeSelVisible(); + SwCursorShell::MakeSelVisible(); } // how is the selected object protected? @@ -2361,13 +2361,13 @@ FlyProtectFlags SwFEShell::IsSelObjProtected( FlyProtectFlags eType ) const if( dynamic_cast<const SwVirtFlyDrawObj*>( pObj) != nullptr ) { - SwFlyFrm *pFly = static_cast<SwVirtFlyDrawObj*>(pObj)->GetFlyFrm(); + SwFlyFrame *pFly = static_cast<SwVirtFlyDrawObj*>(pObj)->GetFlyFrame(); if ( (FlyProtectFlags::Content & eType) && pFly->GetFormat()->GetProtect().IsContentProtected() ) nChk |= FlyProtectFlags::Content; - if ( pFly->Lower() && pFly->Lower()->IsNoTextFrm() ) + if ( pFly->Lower() && pFly->Lower()->IsNoTextFrame() ) { - SwOLENode *pNd = static_cast<SwContentFrm*>(pFly->Lower())->GetNode()->GetOLENode(); + SwOLENode *pNd = static_cast<SwContentFrame*>(pFly->Lower())->GetNode()->GetOLENode(); uno::Reference < embed::XEmbeddedObject > xObj( pNd ? pNd->GetOLEObj().GetOleRef() : nullptr ); if ( xObj.is() ) { @@ -2392,13 +2392,13 @@ FlyProtectFlags SwFEShell::IsSelObjProtected( FlyProtectFlags eType ) const if( nChk == eType ) return eType; } - const SwFrm* pAnch; + const SwFrame* pAnch; if( dynamic_cast<const SwVirtFlyDrawObj*>( pObj) != nullptr ) - pAnch = static_cast<SwVirtFlyDrawObj*>( pObj )->GetFlyFrm()->GetAnchorFrm(); + pAnch = static_cast<SwVirtFlyDrawObj*>( pObj )->GetFlyFrame()->GetAnchorFrame(); else { SwDrawContact* pTmp = static_cast<SwDrawContact*>(GetUserCall(pObj)); - pAnch = pTmp ? pTmp->GetAnchorFrm( pObj ) : nullptr; + pAnch = pTmp ? pTmp->GetAnchorFrame( pObj ) : nullptr; } if( pAnch && pAnch->IsProtected() ) return eType; @@ -2489,11 +2489,11 @@ void SwFEShell::CheckUnboundObjects() { const Rectangle &rBound = pObj->GetSnapRect(); const Point aPt( rBound.TopLeft() ); - const SwFrm *pPage = GetLayout()->Lower(); - const SwFrm *pLast = pPage; - while ( pPage && !pPage->Frm().IsInside( aPt ) ) + const SwFrame *pPage = GetLayout()->Lower(); + const SwFrame *pLast = pPage; + while ( pPage && !pPage->Frame().IsInside( aPt ) ) { - if ( aPt.Y() > pPage->Frm().Bottom() ) + if ( aPt.Y() > pPage->Frame().Bottom() ) pLast = pPage; pPage = pPage->GetNext(); } @@ -2509,8 +2509,8 @@ void SwFEShell::CheckUnboundObjects() SwFormatAnchor aAnch; { - const SwFrm *pAnch = ::FindAnchor( pPage, aPt, true ); - SwPosition aPos( *static_cast<const SwContentFrm*>(pAnch)->GetNode() ); + const SwFrame *pAnch = ::FindAnchor( pPage, aPt, true ); + SwPosition aPos( *static_cast<const SwContentFrame*>(pAnch)->GetNode() ); aAnch.SetType( FLY_AT_PARA ); aAnch.SetAnchor( &aPos ); const_cast<SwRect&>(GetCharRect()).Pos() = aPt; @@ -2572,8 +2572,8 @@ SwChainRet SwFEShell::Chainable( SwRect &rRect, const SwFrameFormat &rSource, if( pDView->PickObj( rPt, pDView->getHitTolLog(), pObj, pPView, SdrSearchOptions::PICKMARKABLE ) && dynamic_cast<const SwVirtFlyDrawObj*>( pObj) != nullptr ) { - SwFlyFrm *pFly = static_cast<SwVirtFlyDrawObj*>(pObj)->GetFlyFrm(); - rRect = pFly->Frm(); + SwFlyFrame *pFly = static_cast<SwVirtFlyDrawObj*>(pObj)->GetFlyFrame(); + rRect = pFly->Frame(); // Target and source should not be equal and the list // should not be cyclic @@ -2604,7 +2604,7 @@ SwChainRet SwFEShell::Chain( SwFrameFormat &rSource, const Point &rPt ) pDView->SetHitTolerancePixel( 0 ); pDView->PickObj( rPt, pDView->getHitTolLog(), pObj, pPView, SdrSearchOptions::PICKMARKABLE ); pDView->SetHitTolerancePixel( nOld ); - SwFlyFrm *pFly = static_cast<SwVirtFlyDrawObj*>(pObj)->GetFlyFrm(); + SwFlyFrame *pFly = static_cast<SwVirtFlyDrawObj*>(pObj)->GetFlyFrame(); SwFlyFrameFormat *pFormat = pFly->GetFormat(); GetDoc()->Chain(rSource, *pFormat); @@ -2631,17 +2631,17 @@ void SwFEShell::SetChainMarker() { bool bDelFrom = true, bDelTo = true; - if ( IsFrmSelected() ) + if ( IsFrameSelected() ) { - SwFlyFrm *pFly = GetSelectedFlyFrm(); + SwFlyFrame *pFly = GetSelectedFlyFrame(); if ( pFly->GetPrevLink() ) { bDelFrom = false; - const SwFrm *pPre = pFly->GetPrevLink(); + const SwFrame *pPre = pFly->GetPrevLink(); - Point aStart( pPre->Frm().Right(), pPre->Frm().Bottom()); - Point aEnd(pFly->Frm().Pos()); + Point aStart( pPre->Frame().Right(), pPre->Frame().Bottom()); + Point aEnd(pFly->Frame().Pos()); if (!m_pChainFrom) { @@ -2652,10 +2652,10 @@ void SwFEShell::SetChainMarker() if ( pFly->GetNextLink() ) { bDelTo = false; - const SwFlyFrm *pNxt = pFly->GetNextLink(); + const SwFlyFrame *pNxt = pFly->GetNextLink(); - Point aStart( pFly->Frm().Right(), pFly->Frm().Bottom()); - Point aEnd(pNxt->Frm().Pos()); + Point aStart( pFly->Frame().Right(), pFly->Frame().Bottom()); + Point aEnd(pNxt->Frame().Pos()); if (!m_pChainTo) { @@ -2678,27 +2678,27 @@ void SwFEShell::SetChainMarker() long SwFEShell::GetSectionWidth( SwFormat const & rFormat ) const { - SwFrm *pFrm = GetCurrFrm(); - // Is the cursor at this moment in a SectionFrm? - if( pFrm && pFrm->IsInSct() ) + SwFrame *pFrame = GetCurrFrame(); + // Is the cursor at this moment in a SectionFrame? + if( pFrame && pFrame->IsInSct() ) { - SwSectionFrm* pSect = pFrm->FindSctFrm(); + SwSectionFrame* pSect = pFrame->FindSctFrame(); do { // Is it the right one? if( pSect->KnowsFormat( rFormat ) ) - return pSect->Frm().Width(); + return pSect->Frame().Width(); // for nested areas - pSect = pSect->GetUpper()->FindSctFrm(); + pSect = pSect->GetUpper()->FindSctFrame(); } while( pSect ); } - SwIterator<SwSectionFrm,SwFormat> aIter( rFormat ); - for ( SwSectionFrm* pSct = aIter.First(); pSct; pSct = aIter.Next() ) + SwIterator<SwSectionFrame,SwFormat> aIter( rFormat ); + for ( SwSectionFrame* pSct = aIter.First(); pSct; pSct = aIter.Next() ) { if( !pSct->IsFollow() ) { - return pSct->Frm().Width(); + return pSct->Frame().Width(); } } return 0; @@ -2916,16 +2916,16 @@ const Color SwFEShell::GetShapeBackgrd() const if ( dynamic_cast<const SwVirtFlyDrawObj*>( pSdrObj) == nullptr ) { // determine page frame of the frame the shape is anchored. - const SwFrm* pAnchorFrm = - static_cast<SwDrawContact*>(GetUserCall(pSdrObj))->GetAnchorFrm( pSdrObj ); - OSL_ENSURE( pAnchorFrm, "inconsistent modell - no anchor at shape!"); - if ( pAnchorFrm ) + const SwFrame* pAnchorFrame = + static_cast<SwDrawContact*>(GetUserCall(pSdrObj))->GetAnchorFrame( pSdrObj ); + OSL_ENSURE( pAnchorFrame, "inconsistent modell - no anchor at shape!"); + if ( pAnchorFrame ) { - const SwPageFrm* pPageFrm = pAnchorFrm->FindPageFrm(); - OSL_ENSURE( pPageFrm, "inconsistent modell - no page!"); - if ( pPageFrm ) + const SwPageFrame* pPageFrame = pAnchorFrame->FindPageFrame(); + OSL_ENSURE( pPageFrame, "inconsistent modell - no page!"); + if ( pPageFrame ) { - aRetColor = pPageFrm->GetDrawBackgrdColor(); + aRetColor = pPageFrame->GetDrawBackgrdColor(); } } } @@ -2964,16 +2964,16 @@ bool SwFEShell::IsShapeDefaultHoriTextDirR2L() const if ( dynamic_cast<const SwVirtFlyDrawObj*>( pSdrObj) == nullptr ) { // determine page frame of the frame the shape is anchored. - const SwFrm* pAnchorFrm = - static_cast<SwDrawContact*>(GetUserCall(pSdrObj))->GetAnchorFrm( pSdrObj ); - OSL_ENSURE( pAnchorFrm, "inconsistent modell - no anchor at shape!"); - if ( pAnchorFrm ) + const SwFrame* pAnchorFrame = + static_cast<SwDrawContact*>(GetUserCall(pSdrObj))->GetAnchorFrame( pSdrObj ); + OSL_ENSURE( pAnchorFrame, "inconsistent modell - no anchor at shape!"); + if ( pAnchorFrame ) { - const SwPageFrm* pPageFrm = pAnchorFrm->FindPageFrm(); - OSL_ENSURE( pPageFrm, "inconsistent modell - no page!"); - if ( pPageFrm ) + const SwPageFrame* pPageFrame = pAnchorFrame->FindPageFrame(); + OSL_ENSURE( pPageFrame, "inconsistent modell - no page!"); + if ( pPageFrame ) { - bRet = pPageFrm->IsRightToLeft(); + bRet = pPageFrame->IsRightToLeft(); } } } @@ -2986,14 +2986,14 @@ bool SwFEShell::IsShapeDefaultHoriTextDirR2L() const Point SwFEShell::GetRelativePagePosition(const Point& rDocPos) { Point aRet(-1, -1); - const SwFrm *pPage = GetLayout()->Lower(); - while ( pPage && !pPage->Frm().IsInside( rDocPos ) ) + const SwFrame *pPage = GetLayout()->Lower(); + while ( pPage && !pPage->Frame().IsInside( rDocPos ) ) { pPage = pPage->GetNext(); } if(pPage) { - aRet = rDocPos - pPage->Frm().TopLeft(); + aRet = rDocPos - pPage->Frame().TopLeft(); } return aRet; } diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx index d529b64dc3f5..a03f227e55a6 100644 --- a/sw/source/core/frmedt/fetab.cxx +++ b/sw/source/core/frmedt/fetab.cxx @@ -73,43 +73,43 @@ inline bool IsSame( long nA, long nB ) { return std::abs(nA-nB) <= COLFUZZY; } // table column cache SwTabCols *pLastCols = nullptr; const SwTable *g_pColumnCacheLastTable = nullptr; -const SwTabFrm *g_pColumnCacheLastTabFrm = nullptr; -const SwFrm *g_pColumnCacheLastCellFrm = nullptr; +const SwTabFrame *g_pColumnCacheLastTabFrame = nullptr; +const SwFrame *g_pColumnCacheLastCellFrame = nullptr; // table row cache SwTabCols *pLastRows = nullptr; const SwTable *g_pRowCacheLastTable = nullptr; -const SwTabFrm *g_pRowCacheLastTabFrm = nullptr; -const SwFrm *g_pRowCacheLastCellFrm = nullptr; +const SwTabFrame *g_pRowCacheLastTabFrame = nullptr; +const SwFrame *g_pRowCacheLastCellFrame = nullptr; class TableWait { const ::std::unique_ptr<SwWait> m_pWait; // this seems really fishy: do some locking, if an arbitrary number of lines is exceeded static const size_t our_kLineLimit = 20; - static bool ShouldWait(size_t nCnt, SwFrm *pFrm, size_t nCnt2) - { return our_kLineLimit < nCnt || our_kLineLimit < nCnt2 || (pFrm && our_kLineLimit < pFrm->ImplFindTabFrm()->GetTable()->GetTabLines().size()); } + static bool ShouldWait(size_t nCnt, SwFrame *pFrame, size_t nCnt2) + { return our_kLineLimit < nCnt || our_kLineLimit < nCnt2 || (pFrame && our_kLineLimit < pFrame->ImplFindTabFrame()->GetTable()->GetTabLines().size()); } public: - TableWait(size_t nCnt, SwFrm *pFrm, SwDocShell &rDocShell, size_t nCnt2 = 0) - : m_pWait( ShouldWait(nCnt, pFrm, nCnt2) ? ::std::unique_ptr<SwWait>(new SwWait( rDocShell, true )) : nullptr ) + TableWait(size_t nCnt, SwFrame *pFrame, SwDocShell &rDocShell, size_t nCnt2 = 0) + : m_pWait( ShouldWait(nCnt, pFrame, nCnt2) ? ::std::unique_ptr<SwWait>(new SwWait( rDocShell, true )) : nullptr ) { } }; void SwFEShell::ParkCursorInTab() { - SwCursor * pSwCrsr = GetSwCrsr(); + SwCursor * pSwCursor = GetSwCursor(); - OSL_ENSURE(pSwCrsr, "no SwCursor"); + OSL_ENSURE(pSwCursor, "no SwCursor"); - SwPosition aStartPos = *pSwCrsr->GetPoint(), aEndPos = aStartPos; + SwPosition aStartPos = *pSwCursor->GetPoint(), aEndPos = aStartPos; /* Search least and greatest position in current cursor ring. */ - for(SwPaM& rTmpCrsr : pSwCrsr->GetRingContainer()) + for(SwPaM& rTmpCursor : pSwCursor->GetRingContainer()) { - SwCursor* pTmpCrsr = static_cast<SwCursor *>(&rTmpCrsr); - const SwPosition * pPt = pTmpCrsr->GetPoint(), - * pMk = pTmpCrsr->GetMark(); + SwCursor* pTmpCursor = static_cast<SwCursor *>(&rTmpCursor); + const SwPosition * pPt = pTmpCursor->GetPoint(), + * pMk = pTmpCursor->GetMark(); if (*pPt < aStartPos) aStartPos = *pPt; @@ -132,8 +132,8 @@ void SwFEShell::ParkCursorInTab() /* Set cursor to end of selection to ensure IsLastCellInRow works properly. */ { - SwCursor aTmpCrsr( aEndPos, nullptr, false ); - *pSwCrsr = aTmpCrsr; + SwCursor aTmpCursor( aEndPos, nullptr, false ); + *pSwCursor = aTmpCursor; } /* Move the cursor out of the columns to delete and stay in the @@ -146,15 +146,15 @@ void SwFEShell::ParkCursorInTab() it to the next cell. */ { - SwCursor aTmpCrsr( aStartPos, nullptr, false ); - *pSwCrsr = aTmpCrsr; + SwCursor aTmpCursor( aStartPos, nullptr, false ); + *pSwCursor = aTmpCursor; } - if (! pSwCrsr->GoPrevCell()) + if (! pSwCursor->GoPrevCell()) { - SwCursor aTmpCrsr( aEndPos, nullptr, false ); - *pSwCrsr = aTmpCrsr; - pSwCrsr->GoNextCell(); + SwCursor aTmpCursor( aEndPos, nullptr, false ); + *pSwCursor = aTmpCursor; + pSwCursor->GoNextCell(); } } else @@ -164,15 +164,15 @@ void SwFEShell::ParkCursorInTab() to the previous cell. */ { - SwCursor aTmpCrsr( aEndPos, nullptr, false ); - *pSwCrsr = aTmpCrsr; + SwCursor aTmpCursor( aEndPos, nullptr, false ); + *pSwCursor = aTmpCursor; } - if (! pSwCrsr->GoNextCell()) + if (! pSwCursor->GoNextCell()) { - SwCursor aTmpCrsr( aStartPos, nullptr, false ); - *pSwCrsr = aTmpCrsr; - pSwCrsr->GoPrevCell(); + SwCursor aTmpCursor( aStartPos, nullptr, false ); + *pSwCursor = aTmpCursor; + pSwCursor->GoPrevCell(); } } } @@ -180,11 +180,11 @@ void SwFEShell::ParkCursorInTab() bool SwFEShell::InsertRow( sal_uInt16 nCnt, bool bBehind ) { // check if Point/Mark of current cursor are in a table - SwFrm *pFrm = GetCurrFrm(); - if( !pFrm || !pFrm->IsInTab() ) + SwFrame *pFrame = GetCurrFrame(); + if( !pFrame || !pFrame->IsInTab() ) return false; - if( dynamic_cast< const SwDDETable* >(pFrm->ImplFindTabFrm()->GetTable()) != nullptr ) + if( dynamic_cast< const SwDDETable* >(pFrame->ImplFindTabFrame()->GetTable()) != nullptr ) { ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK ); @@ -200,7 +200,7 @@ bool SwFEShell::InsertRow( sal_uInt16 nCnt, bool bBehind ) if (bSelectAll) { // Set the end of the selection to the last paragraph of the last cell of the table. - SwPaM* pPaM = getShellCrsr(false); + SwPaM* pPaM = getShellCursor(false); SwNode* pNode = pPaM->Start()->nNode.GetNode().FindTableNode()->EndOfSectionNode(); // pNode is the end node of the table, we want the last node before the end node of the last cell. pPaM->End()->nNode = pNode->GetIndex() - 2; @@ -208,7 +208,7 @@ bool SwFEShell::InsertRow( sal_uInt16 nCnt, bool bBehind ) } GetTableSel( *this, aBoxes, nsSwTableSearchType::TBLSEARCH_ROW ); - TableWait aWait( nCnt, pFrm, *GetDoc()->GetDocShell(), aBoxes.size() ); + TableWait aWait( nCnt, pFrame, *GetDoc()->GetDocShell(), aBoxes.size() ); bool bRet = false; if ( aBoxes.size() ) @@ -221,11 +221,11 @@ bool SwFEShell::InsertRow( sal_uInt16 nCnt, bool bBehind ) bool SwFEShell::InsertCol( sal_uInt16 nCnt, bool bBehind ) { // check if Point/Mark of current cursor are in a table - SwFrm *pFrm = GetCurrFrm(); - if( !pFrm || !pFrm->IsInTab() ) + SwFrame *pFrame = GetCurrFrame(); + if( !pFrame || !pFrame->IsInTab() ) return false; - if( dynamic_cast< const SwDDETable* >(pFrm->ImplFindTabFrm()->GetTable()) != nullptr ) + if( dynamic_cast< const SwDDETable* >(pFrame->ImplFindTabFrame()->GetTable()) != nullptr ) { ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK ); @@ -246,7 +246,7 @@ bool SwFEShell::InsertCol( sal_uInt16 nCnt, bool bBehind ) SwSelBoxes aBoxes; GetTableSel( *this, aBoxes, nsSwTableSearchType::TBLSEARCH_COL ); - TableWait aWait( nCnt, pFrm, *GetDoc()->GetDocShell(), aBoxes.size() ); + TableWait aWait( nCnt, pFrame, *GetDoc()->GetDocShell(), aBoxes.size() ); bool bRet = false; if( !aBoxes.empty() ) @@ -276,11 +276,11 @@ bool SwFEShell::IsLastCellInRow() const bool SwFEShell::DeleteCol() { // check if Point/Mark of current cursor are in a table - SwFrm *pFrm = GetCurrFrm(); - if( !pFrm || !pFrm->IsInTab() ) + SwFrame *pFrame = GetCurrFrame(); + if( !pFrame || !pFrame->IsInTab() ) return false; - if( dynamic_cast< const SwDDETable* >(pFrm->ImplFindTabFrm()->GetTable()) != nullptr ) + if( dynamic_cast< const SwDDETable* >(pFrame->ImplFindTabFrame()->GetTable()) != nullptr ) { ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK ); @@ -296,13 +296,13 @@ bool SwFEShell::DeleteCol() GetTableSel( *this, aBoxes, nsSwTableSearchType::TBLSEARCH_COL ); if ( !aBoxes.empty() ) { - TableWait aWait( aBoxes.size(), pFrm, *GetDoc()->GetDocShell() ); + TableWait aWait( aBoxes.size(), pFrame, *GetDoc()->GetDocShell() ); // remove crsr from the deletion area. // Put them behind/on the table; via the // document position they will be put to the old position - while( !pFrm->IsCellFrm() ) - pFrm = pFrm->GetUpper(); + while( !pFrame->IsCellFrame() ) + pFrame = pFrame->GetUpper(); ParkCursorInTab(); @@ -327,11 +327,11 @@ bool SwFEShell::DeleteTable() bool SwFEShell::DeleteRow(bool bCompleteTable) { // check if Point/Mark of current cursor are in a table - SwFrm *pFrm = GetCurrFrm(); - if( !pFrm || !pFrm->IsInTab() ) + SwFrame *pFrame = GetCurrFrame(); + if( !pFrame || !pFrame->IsInTab() ) return false; - if( dynamic_cast< const SwDDETable* >(pFrm->ImplFindTabFrm()->GetTable()) != nullptr ) + if( dynamic_cast< const SwDDETable* >(pFrame->ImplFindTabFrame()->GetTable()) != nullptr ) { ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK ); @@ -348,7 +348,7 @@ bool SwFEShell::DeleteRow(bool bCompleteTable) if( !aBoxes.empty() ) { - TableWait aWait( aBoxes.size(), pFrm, *GetDoc()->GetDocShell() ); + TableWait aWait( aBoxes.size(), pFrame, *GetDoc()->GetDocShell() ); // Delete cursors from the deletion area. // Then the cursor is: @@ -356,7 +356,7 @@ bool SwFEShell::DeleteRow(bool bCompleteTable) // 2. the preceding row, if there is another row before this // 3. otherwise below the table { - SwTableNode* pTableNd = static_cast<SwContentFrm*>(pFrm)->GetNode()->FindTableNode(); + SwTableNode* pTableNd = static_cast<SwContentFrame*>(pFrame)->GetNode()->FindTableNode(); // search all boxes / lines _FndBox aFndBox( nullptr, nullptr ); @@ -422,7 +422,7 @@ bool SwFEShell::DeleteRow(bool bCompleteTable) if( pCNd ) { - SwPaM* pPam = GetCrsr(); + SwPaM* pPam = GetCursor(); pPam->GetPoint()->nNode = aIdx; pPam->GetPoint()->nContent.Assign( pCNd, 0 ); pPam->SetMark(); // both want something @@ -448,8 +448,8 @@ sal_uInt16 SwFEShell::MergeTab() sal_uInt16 nRet = TBLMERGE_NOSELECTION; if( IsTableMode() ) { - SwShellTableCrsr* pTableCrsr = GetTableCrsr(); - const SwTableNode* pTableNd = pTableCrsr->GetNode().FindTableNode(); + SwShellTableCursor* pTableCursor = GetTableCursor(); + const SwTableNode* pTableNd = pTableCursor->GetNode().FindTableNode(); if( dynamic_cast< const SwDDETable* >(&pTableNd->GetTable()) != nullptr ) { ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, @@ -460,11 +460,11 @@ sal_uInt16 SwFEShell::MergeTab() SET_CURR_SHELL( this ); StartAllAction(); - TableWait aWait(pTableCrsr->GetSelectedBoxesCount(), nullptr, + TableWait aWait(pTableCursor->GetSelectedBoxesCount(), nullptr, *GetDoc()->GetDocShell(), pTableNd->GetTable().GetTabLines().size() ); - nRet = GetDoc()->MergeTable( *pTableCrsr ); + nRet = GetDoc()->MergeTable( *pTableCursor ); KillPams(); @@ -477,11 +477,11 @@ sal_uInt16 SwFEShell::MergeTab() bool SwFEShell::SplitTab( bool bVert, sal_uInt16 nCnt, bool bSameHeight ) { // check if Point/Mark of current cursor are in a table - SwFrm *pFrm = GetCurrFrm(); - if( !pFrm || !pFrm->IsInTab() ) + SwFrame *pFrame = GetCurrFrame(); + if( !pFrame || !pFrame->IsInTab() ) return false; - if( dynamic_cast< const SwDDETable* >(pFrm->ImplFindTabFrm()->GetTable()) != nullptr ) + if( dynamic_cast< const SwDDETable* >(pFrame->ImplFindTabFrame()->GetTable()) != nullptr ) { ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK ); @@ -503,7 +503,7 @@ bool SwFEShell::SplitTab( bool bVert, sal_uInt16 nCnt, bool bSameHeight ) GetTableSel( *this, aBoxes ); if( !aBoxes.empty() ) { - TableWait aWait( nCnt, pFrm, *GetDoc()->GetDocShell(), aBoxes.size() ); + TableWait aWait( nCnt, pFrame, *GetDoc()->GetDocShell(), aBoxes.size() ); // now delete the columns bRet = GetDoc()->SplitTable( aBoxes, bVert, nCnt, bSameHeight ); @@ -517,9 +517,9 @@ bool SwFEShell::SplitTab( bool bVert, sal_uInt16 nCnt, bool bSameHeight ) return bRet; } -void SwFEShell::_GetTabCols( SwTabCols &rToFill, const SwFrm *pBox ) const +void SwFEShell::_GetTabCols( SwTabCols &rToFill, const SwFrame *pBox ) const { - const SwTabFrm *pTab = pBox->FindTabFrm(); + const SwTabFrame *pTab = pBox->FindTabFrame(); if ( pLastCols ) { bool bDel = true; @@ -528,23 +528,23 @@ void SwFEShell::_GetTabCols( SwTabCols &rToFill, const SwFrm *pBox ) const bDel = false; SWRECTFN( pTab ) - const SwPageFrm* pPage = pTab->FindPageFrm(); - const sal_uLong nLeftMin = (pTab->Frm().*fnRect->fnGetLeft)() - - (pPage->Frm().*fnRect->fnGetLeft)(); - const sal_uLong nRightMax = (pTab->Frm().*fnRect->fnGetRight)() - - (pPage->Frm().*fnRect->fnGetLeft)(); + const SwPageFrame* pPage = pTab->FindPageFrame(); + const sal_uLong nLeftMin = (pTab->Frame().*fnRect->fnGetLeft)() - + (pPage->Frame().*fnRect->fnGetLeft)(); + const sal_uLong nRightMax = (pTab->Frame().*fnRect->fnGetRight)() - + (pPage->Frame().*fnRect->fnGetLeft)(); - if (g_pColumnCacheLastTabFrm != pTab) + if (g_pColumnCacheLastTabFrame != pTab) { - // if TabFrm was changed, we only shift a little bit + // if TabFrame was changed, we only shift a little bit // as the width is the same - SWRECTFNX( g_pColumnCacheLastTabFrm ) - if ((g_pColumnCacheLastTabFrm->Frm().*fnRectX->fnGetWidth)() == - (pTab->Frm().*fnRect->fnGetWidth)() ) + SWRECTFNX( g_pColumnCacheLastTabFrame ) + if ((g_pColumnCacheLastTabFrame->Frame().*fnRectX->fnGetWidth)() == + (pTab->Frame().*fnRect->fnGetWidth)() ) { pLastCols->SetLeftMin( nLeftMin ); - g_pColumnCacheLastTabFrm = pTab; + g_pColumnCacheLastTabFrame = pTab; } else bDel = true; @@ -556,11 +556,11 @@ void SwFEShell::_GetTabCols( SwTabCols &rToFill, const SwFrm *pBox ) const pLastCols->GetRight () == (sal_uInt16)(pTab->Prt().*fnRect->fnGetRight)()&& pLastCols->GetRightMax() == (sal_uInt16)nRightMax - pLastCols->GetLeftMin() ) { - if (g_pColumnCacheLastCellFrm != pBox) + if (g_pColumnCacheLastCellFrame != pBox) { pTab->GetTable()->GetTabCols( *pLastCols, - static_cast<const SwCellFrm*>(pBox)->GetTabBox(), true); - g_pColumnCacheLastCellFrm = pBox; + static_cast<const SwCellFrame*>(pBox)->GetTabBox(), true); + g_pColumnCacheLastCellFrame = pBox; } rToFill = *pLastCols; } @@ -572,12 +572,12 @@ void SwFEShell::_GetTabCols( SwTabCols &rToFill, const SwFrm *pBox ) const } if ( !pLastCols ) { - SwDoc::GetTabCols( rToFill, nullptr, static_cast<const SwCellFrm*>(pBox) ); + SwDoc::GetTabCols( rToFill, nullptr, static_cast<const SwCellFrame*>(pBox) ); pLastCols = new SwTabCols( rToFill ); g_pColumnCacheLastTable = pTab->GetTable(); - g_pColumnCacheLastTabFrm = pTab; - g_pColumnCacheLastCellFrm= pBox; + g_pColumnCacheLastTabFrame = pTab; + g_pColumnCacheLastCellFrame= pBox; } #if OSL_DEBUG_LEVEL > 1 @@ -590,9 +590,9 @@ void SwFEShell::_GetTabCols( SwTabCols &rToFill, const SwFrm *pBox ) const #endif } -void SwFEShell::_GetTabRows( SwTabCols &rToFill, const SwFrm *pBox ) const +void SwFEShell::_GetTabRows( SwTabCols &rToFill, const SwFrame *pBox ) const { - const SwTabFrm *pTab = pBox->FindTabFrm(); + const SwTabFrame *pTab = pBox->FindTabFrame(); if ( pLastRows ) { bool bDel = true; @@ -600,15 +600,15 @@ void SwFEShell::_GetTabRows( SwTabCols &rToFill, const SwFrm *pBox ) const { bDel = false; SWRECTFN( pTab ) - const SwPageFrm* pPage = pTab->FindPageFrm(); + const SwPageFrame* pPage = pTab->FindPageFrame(); const long nLeftMin = ( bVert ? - pTab->GetPrtLeft() - pPage->Frm().Left() : - pTab->GetPrtTop() - pPage->Frm().Top() ); + pTab->GetPrtLeft() - pPage->Frame().Left() : + pTab->GetPrtTop() - pPage->Frame().Top() ); const long nLeft = bVert ? LONG_MAX : 0; const long nRight = (pTab->Prt().*fnRect->fnGetHeight)(); const long nRightMax = bVert ? nRight : LONG_MAX; - if (g_pRowCacheLastTabFrm != pTab || g_pRowCacheLastCellFrm != pBox) + if (g_pRowCacheLastTabFrame != pTab || g_pRowCacheLastCellFrame != pBox) bDel = true; if ( !bDel && @@ -627,18 +627,18 @@ void SwFEShell::_GetTabRows( SwTabCols &rToFill, const SwFrm *pBox ) const } if ( !pLastRows ) { - SwDoc::GetTabRows( rToFill, nullptr, static_cast<const SwCellFrm*>(pBox) ); + SwDoc::GetTabRows( rToFill, nullptr, static_cast<const SwCellFrame*>(pBox) ); pLastRows = new SwTabCols( rToFill ); g_pRowCacheLastTable = pTab->GetTable(); - g_pRowCacheLastTabFrm = pTab; - g_pRowCacheLastCellFrm = pBox; + g_pRowCacheLastTabFrame = pTab; + g_pRowCacheLastCellFrame = pBox; } } void SwFEShell::SetTabCols( const SwTabCols &rNew, bool bCurRowOnly ) { - SwFrm *pBox = GetCurrFrm(); + SwFrame *pBox = GetCurrFrame(); if( !pBox || !pBox->IsInTab() ) return; @@ -647,39 +647,39 @@ void SwFEShell::SetTabCols( const SwTabCols &rNew, bool bCurRowOnly ) do { pBox = pBox->GetUpper(); - } while ( !pBox->IsCellFrm() ); + } while ( !pBox->IsCellFrame() ); - GetDoc()->SetTabCols( rNew, bCurRowOnly, nullptr, static_cast<SwCellFrm*>(pBox) ); + GetDoc()->SetTabCols( rNew, bCurRowOnly, nullptr, static_cast<SwCellFrame*>(pBox) ); EndAllActionAndCall(); } void SwFEShell::GetTabCols( SwTabCols &rToFill ) const { - const SwFrm *pFrm = GetCurrFrm(); - if( !pFrm || !pFrm->IsInTab() ) + const SwFrame *pFrame = GetCurrFrame(); + if( !pFrame || !pFrame->IsInTab() ) return; do - { pFrm = pFrm->GetUpper(); - } while ( !pFrm->IsCellFrm() ); + { pFrame = pFrame->GetUpper(); + } while ( !pFrame->IsCellFrame() ); - _GetTabCols( rToFill, pFrm ); + _GetTabCols( rToFill, pFrame ); } void SwFEShell::GetTabRows( SwTabCols &rToFill ) const { - const SwFrm *pFrm = GetCurrFrm(); - if( !pFrm || !pFrm->IsInTab() ) + const SwFrame *pFrame = GetCurrFrame(); + if( !pFrame || !pFrame->IsInTab() ) return; do - { pFrm = pFrm->GetUpper(); - } while ( !pFrm->IsCellFrm() ); + { pFrame = pFrame->GetUpper(); + } while ( !pFrame->IsCellFrame() ); - _GetTabRows( rToFill, pFrm ); + _GetTabRows( rToFill, pFrame ); } void SwFEShell::SetTabRows( const SwTabCols &rNew, bool bCurColOnly ) { - SwFrm *pBox = GetCurrFrm(); + SwFrame *pBox = GetCurrFrame(); if( !pBox || !pBox->IsInTab() ) return; @@ -688,27 +688,27 @@ void SwFEShell::SetTabRows( const SwTabCols &rNew, bool bCurColOnly ) do { pBox = pBox->GetUpper(); - } while ( !pBox->IsCellFrm() ); + } while ( !pBox->IsCellFrame() ); - GetDoc()->SetTabRows( rNew, bCurColOnly, nullptr, static_cast<SwCellFrm*>(pBox) ); + GetDoc()->SetTabRows( rNew, bCurColOnly, nullptr, static_cast<SwCellFrame*>(pBox) ); EndAllActionAndCall(); } void SwFEShell::GetMouseTabRows( SwTabCols &rToFill, const Point &rPt ) const { - const SwFrm *pBox = GetBox( rPt ); + const SwFrame *pBox = GetBox( rPt ); if ( pBox ) _GetTabRows( rToFill, pBox ); } void SwFEShell::SetMouseTabRows( const SwTabCols &rNew, bool bCurColOnly, const Point &rPt ) { - const SwFrm *pBox = GetBox( rPt ); + const SwFrame *pBox = GetBox( rPt ); if( pBox ) { SET_CURR_SHELL( this ); StartAllAction(); - GetDoc()->SetTabRows( rNew, bCurColOnly, nullptr, static_cast<const SwCellFrm*>(pBox) ); + GetDoc()->SetTabRows( rNew, bCurColOnly, nullptr, static_cast<const SwCellFrame*>(pBox) ); EndAllActionAndCall(); } } @@ -717,26 +717,26 @@ void SwFEShell::SetRowSplit( const SwFormatRowSplit& rNew ) { SET_CURR_SHELL( this ); StartAllAction(); - GetDoc()->SetRowSplit( *getShellCrsr( false ), rNew ); + GetDoc()->SetRowSplit( *getShellCursor( false ), rNew ); EndAllActionAndCall(); } void SwFEShell::GetRowSplit( SwFormatRowSplit*& rpSz ) const { - SwDoc::GetRowSplit( *getShellCrsr( false ), rpSz ); + SwDoc::GetRowSplit( *getShellCursor( false ), rpSz ); } -void SwFEShell::SetRowHeight( const SwFormatFrmSize &rNew ) +void SwFEShell::SetRowHeight( const SwFormatFrameSize &rNew ) { SET_CURR_SHELL( this ); StartAllAction(); - GetDoc()->SetRowHeight( *getShellCrsr( false ), rNew ); + GetDoc()->SetRowHeight( *getShellCursor( false ), rNew ); EndAllActionAndCall(); } -void SwFEShell::GetRowHeight( SwFormatFrmSize *& rpSz ) const +void SwFEShell::GetRowHeight( SwFormatFrameSize *& rpSz ) const { - SwDoc::GetRowHeight( *getShellCrsr( false ), rpSz ); + SwDoc::GetRowHeight( *getShellCursor( false ), rpSz ); } bool SwFEShell::BalanceRowHeight( bool bTstOnly ) @@ -744,7 +744,7 @@ bool SwFEShell::BalanceRowHeight( bool bTstOnly ) SET_CURR_SHELL( this ); if( !bTstOnly ) StartAllAction(); - bool bRet = GetDoc()->BalanceRowHeight( *getShellCrsr( false ), bTstOnly ); + bool bRet = GetDoc()->BalanceRowHeight( *getShellCursor( false ), bTstOnly ); if( !bTstOnly ) EndAllActionAndCall(); return bRet; @@ -754,20 +754,20 @@ void SwFEShell::SetRowBackground( const SvxBrushItem &rNew ) { SET_CURR_SHELL( this ); StartAllAction(); - GetDoc()->SetRowBackground( *getShellCrsr( false ), rNew ); + GetDoc()->SetRowBackground( *getShellCursor( false ), rNew ); EndAllActionAndCall(); } bool SwFEShell::GetRowBackground( SvxBrushItem &rToFill ) const { - return SwDoc::GetRowBackground( *getShellCrsr( false ), rToFill ); + return SwDoc::GetRowBackground( *getShellCursor( false ), rToFill ); } void SwFEShell::SetTabBorders( const SfxItemSet& rSet ) { SET_CURR_SHELL( this ); StartAllAction(); - GetDoc()->SetTabBorders( *getShellCrsr( false ), rSet ); + GetDoc()->SetTabBorders( *getShellCursor( false ), rSet ); EndAllActionAndCall(); } @@ -776,73 +776,73 @@ void SwFEShell::SetTabLineStyle( const Color* pColor, bool bSetLine, { SET_CURR_SHELL( this ); StartAllAction(); - GetDoc()->SetTabLineStyle( *getShellCrsr( false ), + GetDoc()->SetTabLineStyle( *getShellCursor( false ), pColor, bSetLine, pBorderLine ); EndAllActionAndCall(); } void SwFEShell::GetTabBorders( SfxItemSet& rSet ) const { - SwDoc::GetTabBorders( *getShellCrsr( false ), rSet ); + SwDoc::GetTabBorders( *getShellCursor( false ), rSet ); } void SwFEShell::SetBoxBackground( const SvxBrushItem &rNew ) { SET_CURR_SHELL( this ); StartAllAction(); - GetDoc()->SetBoxAttr( *getShellCrsr( false ), rNew ); + GetDoc()->SetBoxAttr( *getShellCursor( false ), rNew ); EndAllActionAndCall(); } bool SwFEShell::GetBoxBackground( SvxBrushItem &rToFill ) const { - return SwDoc::GetBoxAttr( *getShellCrsr( false ), rToFill ); + return SwDoc::GetBoxAttr( *getShellCursor( false ), rToFill ); } void SwFEShell::SetBoxDirection( const SvxFrameDirectionItem& rNew ) { SET_CURR_SHELL( this ); StartAllAction(); - GetDoc()->SetBoxAttr( *getShellCrsr( false ), rNew ); + GetDoc()->SetBoxAttr( *getShellCursor( false ), rNew ); EndAllActionAndCall(); } bool SwFEShell::GetBoxDirection( SvxFrameDirectionItem& rToFill ) const { - return SwDoc::GetBoxAttr( *getShellCrsr( false ), rToFill ); + return SwDoc::GetBoxAttr( *getShellCursor( false ), rToFill ); } void SwFEShell::SetBoxAlign( sal_uInt16 nAlign ) { SET_CURR_SHELL( this ); StartAllAction(); - GetDoc()->SetBoxAlign( *getShellCrsr( false ), nAlign ); + GetDoc()->SetBoxAlign( *getShellCursor( false ), nAlign ); EndAllActionAndCall(); } sal_uInt16 SwFEShell::GetBoxAlign() const { - return SwDoc::GetBoxAlign( *getShellCrsr( false ) ); + return SwDoc::GetBoxAlign( *getShellCursor( false ) ); } void SwFEShell::SetTabBackground( const SvxBrushItem &rNew ) { - SwFrm *pFrm = GetCurrFrm(); - if( !pFrm || !pFrm->IsInTab() ) + SwFrame *pFrame = GetCurrFrame(); + if( !pFrame || !pFrame->IsInTab() ) return; SET_CURR_SHELL( this ); StartAllAction(); - GetDoc()->SetAttr( rNew, *pFrm->ImplFindTabFrm()->GetFormat() ); + GetDoc()->SetAttr( rNew, *pFrame->ImplFindTabFrame()->GetFormat() ); EndAllAction(); // no call, nothing changes! GetDoc()->getIDocumentState().SetModified(); } void SwFEShell::GetTabBackground( SvxBrushItem &rToFill ) const { - SwFrm *pFrm = GetCurrFrm(); - if( pFrm && pFrm->IsInTab() ) - rToFill = pFrm->ImplFindTabFrm()->GetFormat()->makeBackgroundBrushItem(); + SwFrame *pFrame = GetCurrFrame(); + if( pFrame && pFrame->IsInTab() ) + rToFill = pFrame->ImplFindTabFrame()->GetFormat()->makeBackgroundBrushItem(); } bool SwFEShell::HasWholeTabSelection() const @@ -854,7 +854,7 @@ bool SwFEShell::HasWholeTabSelection() const ::GetTableSelCrs( *this, aBoxes ); if( !aBoxes.empty() ) { - const SwTableNode *pTableNd = IsCrsrInTable(); + const SwTableNode *pTableNd = IsCursorInTable(); return pTableNd && aBoxes[0]->GetSttIdx() - 1 == pTableNd->EndOfSectionNode()->StartOfSectionIndex() && aBoxes.back()->GetSttNd()->EndOfSectionIndex() + 1 == pTableNd->EndOfSectionIndex(); @@ -865,12 +865,12 @@ bool SwFEShell::HasWholeTabSelection() const bool SwFEShell::HasBoxSelection() const { - if(!IsCrsrInTable()) + if(!IsCursorInTable()) return false; // whole table selected? if( IsTableMode() ) return true; - SwPaM* pPam = GetCrsr(); + SwPaM* pPam = GetCursor(); // empty boxes are also selected as the absence of selection bool bChg = false; if( pPam->GetPoint() == pPam->End()) @@ -912,9 +912,9 @@ void SwFEShell::ProtectCells() SET_CURR_SHELL( this ); StartAllAction(); - GetDoc()->SetBoxAttr( *getShellCrsr( false ), aProt ); + GetDoc()->SetBoxAttr( *getShellCursor( false ), aProt ); - if( !IsCrsrReadonly() ) + if( !IsCursorReadonly() ) { if( IsTableMode() ) ClearMark(); @@ -934,13 +934,13 @@ void SwFEShell::UnProtectCells() ::GetTableSelCrs( *this, aBoxes ); else { - SwFrm *pFrm = GetCurrFrm(); + SwFrame *pFrame = GetCurrFrame(); do { - pFrm = pFrm->GetUpper(); - } while ( pFrm && !pFrm->IsCellFrm() ); - if( pFrm ) + pFrame = pFrame->GetUpper(); + } while ( pFrame && !pFrame->IsCellFrame() ); + if( pFrame ) { - SwTableBox *pBox = const_cast<SwTableBox*>(static_cast<const SwTableBox*>(static_cast<SwCellFrm*>(pFrm)->GetTabBox())); + SwTableBox *pBox = const_cast<SwTableBox*>(static_cast<const SwTableBox*>(static_cast<SwCellFrame*>(pFrame)->GetTabBox())); aBoxes.insert( pBox ); } } @@ -955,21 +955,21 @@ void SwFEShell::UnProtectTables() { SET_CURR_SHELL( this ); StartAllAction(); - GetDoc()->UnProtectTables( *GetCrsr() ); + GetDoc()->UnProtectTables( *GetCursor() ); EndAllActionAndCall(); } bool SwFEShell::HasTableAnyProtection( const OUString* pTableName, bool* pFullTableProtection ) { - return GetDoc()->HasTableAnyProtection( GetCrsr()->GetPoint(), pTableName, + return GetDoc()->HasTableAnyProtection( GetCursor()->GetPoint(), pTableName, pFullTableProtection ); } bool SwFEShell::CanUnProtectCells() const { bool bUnProtectAvailable = false; - const SwTableNode *pTableNd = IsCrsrInTable(); + const SwTableNode *pTableNd = IsCursorInTable(); if( pTableNd && !pTableNd->IsProtect() ) { SwSelBoxes aBoxes; @@ -977,13 +977,13 @@ bool SwFEShell::CanUnProtectCells() const ::GetTableSelCrs( *this, aBoxes ); else { - SwFrm *pFrm = GetCurrFrm(); + SwFrame *pFrame = GetCurrFrame(); do { - pFrm = pFrm->GetUpper(); - } while ( pFrm && !pFrm->IsCellFrm() ); - if( pFrm ) + pFrame = pFrame->GetUpper(); + } while ( pFrame && !pFrame->IsCellFrame() ); + if( pFrame ) { - SwTableBox *pBox = const_cast<SwTableBox*>(static_cast<const SwTableBox*>(static_cast<SwCellFrm*>(pFrm)->GetTabBox())); + SwTableBox *pBox = const_cast<SwTableBox*>(static_cast<const SwTableBox*>(static_cast<SwCellFrame*>(pFrame)->GetTabBox())); aBoxes.insert( pBox ); } } @@ -995,8 +995,8 @@ bool SwFEShell::CanUnProtectCells() const sal_uInt16 SwFEShell::GetRowsToRepeat() const { - const SwFrm *pFrm = GetCurrFrm(); - const SwTabFrm *pTab = pFrm ? pFrm->FindTabFrm() : nullptr; + const SwFrame *pFrame = GetCurrFrame(); + const SwTabFrame *pTab = pFrame ? pFrame->FindTabFrame() : nullptr; if( pTab ) return pTab->GetTable()->GetRowsToRepeat(); return 0; @@ -1004,8 +1004,8 @@ sal_uInt16 SwFEShell::GetRowsToRepeat() const void SwFEShell::SetRowsToRepeat( sal_uInt16 nSet ) { - SwFrm *pFrm = GetCurrFrm(); - SwTabFrm *pTab = pFrm ? pFrm->FindTabFrm() : nullptr; + SwFrame *pFrame = GetCurrFrame(); + SwTabFrame *pTab = pFrame ? pFrame->FindTabFrame() : nullptr; if( pTab && pTab->GetTable()->GetRowsToRepeat() != nSet ) { SwWait aWait( *GetDoc()->GetDocShell(), true ); @@ -1022,26 +1022,26 @@ static sal_uInt16 lcl_GetRowNumber( const SwPosition& rPos ) sal_uInt16 nRet = USHRT_MAX; Point aTmpPt; const SwContentNode *pNd; - const SwContentFrm *pFrm; + const SwContentFrame *pFrame; if( nullptr != ( pNd = rPos.nNode.GetNode().GetContentNode() )) - pFrm = pNd->getLayoutFrm( pNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aTmpPt, &rPos, false ); + pFrame = pNd->getLayoutFrame( pNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aTmpPt, &rPos, false ); else - pFrm = nullptr; + pFrame = nullptr; - if ( pFrm && pFrm->IsInTab() ) + if ( pFrame && pFrame->IsInTab() ) { - const SwFrm* pRow = pFrm->GetUpper(); - while ( !pRow->GetUpper()->IsTabFrm() ) + const SwFrame* pRow = pFrame->GetUpper(); + while ( !pRow->GetUpper()->IsTabFrame() ) pRow = pRow->GetUpper(); - const SwTabFrm* pTabFrm = static_cast<const SwTabFrm*>(pRow->GetUpper()); - const SwTableLine* pTabLine = static_cast<const SwRowFrm*>(pRow)->GetTabLine(); + const SwTabFrame* pTabFrame = static_cast<const SwTabFrame*>(pRow->GetUpper()); + const SwTableLine* pTabLine = static_cast<const SwRowFrame*>(pRow)->GetTabLine(); sal_uInt16 nI = 0; - while ( nI < pTabFrm->GetTable()->GetTabLines().size() ) + while ( nI < pTabFrame->GetTable()->GetTabLines().size() ) { - if ( pTabFrm->GetTable()->GetTabLines()[ nI ] == pTabLine ) + if ( pTabFrame->GetTable()->GetTabLines()[ nI ] == pTabLine ) { nRet = nI; break; @@ -1056,7 +1056,7 @@ static sal_uInt16 lcl_GetRowNumber( const SwPosition& rPos ) sal_uInt16 SwFEShell::GetRowSelectionFromTop() const { sal_uInt16 nRet = 0; - const SwPaM* pPaM = IsTableMode() ? GetTableCrsr() : _GetCrsr(); + const SwPaM* pPaM = IsTableMode() ? GetTableCursor() : _GetCursor(); const sal_uInt16 nPtLine = lcl_GetRowNumber( *pPaM->GetPoint() ); if ( !IsTableMode() ) @@ -1091,18 +1091,18 @@ bool SwFEShell::CheckHeadline( bool bRepeat ) const bool bRet = false; if ( !IsTableMode() ) { - SwFrm *pFrm = GetCurrFrm(); // DONE MULTIIHEADER - SwTabFrm* pTab = (pFrm && pFrm->IsInTab()) ? pFrm->FindTabFrm() : nullptr; + SwFrame *pFrame = GetCurrFrame(); // DONE MULTIIHEADER + SwTabFrame* pTab = (pFrame && pFrame->IsInTab()) ? pFrame->FindTabFrame() : nullptr; if (pTab) { if ( bRepeat ) { - bRet = pTab->IsFollow() && pTab->IsInHeadline( *pFrm ); + bRet = pTab->IsFollow() && pTab->IsInHeadline( *pFrame ); } else { - bRet = static_cast<SwLayoutFrm*>(pTab->Lower())->IsAnLower( pFrm ) || - pTab->IsInHeadline( *pFrm ); + bRet = static_cast<SwLayoutFrame*>(pTab->Lower())->IsAnLower( pFrame ) || + pTab->IsInHeadline( *pFrame ); } } } @@ -1119,7 +1119,7 @@ void SwFEShell::AdjustCellWidth( bool bBalance ) TableWait aWait(::std::numeric_limits<size_t>::max(), nullptr, *GetDoc()->GetDocShell()); - GetDoc()->AdjustCellWidth( *getShellCrsr( false ), bBalance ); + GetDoc()->AdjustCellWidth( *getShellCursor( false ), bBalance ); EndAllActionAndCall(); } @@ -1127,8 +1127,8 @@ bool SwFEShell::IsAdjustCellWidthAllowed( bool bBalance ) const { // at least one row with content should be contained in the selection - SwFrm *pFrm = GetCurrFrm(); - if( !pFrm || !pFrm->IsInTab() ) + SwFrame *pFrame = GetCurrFrame(); + if( !pFrame || !pFrame->IsInTab() ) return false; SwSelBoxes aBoxes; @@ -1141,14 +1141,14 @@ bool SwFEShell::IsAdjustCellWidthAllowed( bool bBalance ) const { do { - pFrm = pFrm->GetUpper(); + pFrame = pFrame->GetUpper(); } - while (pFrm && !pFrm->IsCellFrm()); + while (pFrame && !pFrame->IsCellFrame()); - if (!pFrm) + if (!pFrame) return false; - SwTableBox *pBox = const_cast<SwTableBox*>(static_cast<const SwTableBox*>(static_cast<SwCellFrm*>(pFrm)->GetTabBox())); + SwTableBox *pBox = const_cast<SwTableBox*>(static_cast<const SwTableBox*>(static_cast<SwCellFrame*>(pFrame)->GetTabBox())); aBoxes.insert( pBox ); } @@ -1180,7 +1180,7 @@ bool SwFEShell::SetTableStyle(const SwTableAutoFormat& rStyle) // make sure SwDoc has the style GetDoc()->GetTableStyles().AddAutoFormat(rStyle); - SwTableNode *pTableNode = const_cast<SwTableNode*>(IsCrsrInTable()); + SwTableNode *pTableNode = const_cast<SwTableNode*>(IsCursorInTable()); if (!pTableNode) return false; @@ -1193,7 +1193,7 @@ bool SwFEShell::UpdateTableStyleFormatting(SwTableNode *pTableNode, bool bResetD { if (!pTableNode) { - pTableNode = const_cast<SwTableNode*>(IsCrsrInTable()); + pTableNode = const_cast<SwTableNode*>(IsCursorInTable()); if (!pTableNode || pTableNode->GetTable().IsTableComplex()) return false; } @@ -1206,7 +1206,7 @@ bool SwFEShell::UpdateTableStyleFormatting(SwTableNode *pTableNode, bool bResetD SwSelBoxes aBoxes; if ( !IsTableMode() ) // if cursors are not current - GetCrsr(); + GetCursor(); // whole table or only current selection if( IsTableMode() ) @@ -1238,14 +1238,14 @@ bool SwFEShell::UpdateTableStyleFormatting(SwTableNode *pTableNode, bool bResetD bool SwFEShell::GetTableAutoFormat( SwTableAutoFormat& rGet ) { - const SwTableNode *pTableNd = IsCrsrInTable(); + const SwTableNode *pTableNd = IsCursorInTable(); if( !pTableNd || pTableNd->GetTable().IsTableComplex() ) return false; SwSelBoxes aBoxes; if ( !IsTableMode() ) // if cursor are not current - GetCrsr(); + GetCursor(); // whole table or only current selection if( IsTableMode() ) @@ -1266,11 +1266,11 @@ bool SwFEShell::GetTableAutoFormat( SwTableAutoFormat& rGet ) bool SwFEShell::DeleteTableSel() { // check if SPoint/Mark of current cursor are in a table - SwFrm *pFrm = GetCurrFrm(); - if( !pFrm || !pFrm->IsInTab() ) + SwFrame *pFrame = GetCurrFrame(); + if( !pFrame || !pFrame->IsInTab() ) return false; - if( dynamic_cast< const SwDDETable* >(pFrm->ImplFindTabFrm()->GetTable()) != nullptr ) + if( dynamic_cast< const SwDDETable* >(pFrame->ImplFindTabFrame()->GetTable()) != nullptr ) { ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK ); @@ -1286,14 +1286,14 @@ bool SwFEShell::DeleteTableSel() GetTableSelCrs( *this, aBoxes ); if( !aBoxes.empty() ) { - TableWait aWait( aBoxes.size(), pFrm, *GetDoc()->GetDocShell() ); + TableWait aWait( aBoxes.size(), pFrame, *GetDoc()->GetDocShell() ); // cursor should be removed from deletion area. // Put them behind/on the table; via the document // position they'll be set to the old position - while( !pFrm->IsCellFrm() ) - pFrm = pFrm->GetUpper(); - ParkCrsr( SwNodeIndex( *static_cast<SwCellFrm*>(pFrm)->GetTabBox()->GetSttNd() )); + while( !pFrame->IsCellFrame() ) + pFrame = pFrame->GetUpper(); + ParkCursor( SwNodeIndex( *static_cast<SwCellFrame*>(pFrame)->GetTabBox()->GetSttNd() )); bRet = GetDoc()->DeleteRowCol( aBoxes ); @@ -1311,27 +1311,27 @@ size_t SwFEShell::GetCurTabColNum() const //!!!GetCurMouseTabColNum() mitpflegen!!!! size_t nRet = 0; - SwFrm *pFrm = GetCurrFrm(); - OSL_ENSURE( pFrm, "Crsr parked?" ); + SwFrame *pFrame = GetCurrFrame(); + OSL_ENSURE( pFrame, "Cursor parked?" ); // check if SPoint/Mark of current cursor are in a table - if( pFrm && pFrm->IsInTab() ) + if( pFrame && pFrame->IsInTab() ) { do { // JP 26.09.95: why compare with ContentFrame // and not with CellFrame ???? - pFrm = pFrm->GetUpper(); - } while ( !pFrm->IsCellFrm() ); - SWRECTFN( pFrm ) + pFrame = pFrame->GetUpper(); + } while ( !pFrame->IsCellFrame() ); + SWRECTFN( pFrame ) - const SwPageFrm* pPage = pFrm->FindPageFrm(); + const SwPageFrame* pPage = pFrame->FindPageFrame(); // get TabCols, as only via these we get to the position SwTabCols aTabCols; GetTabCols( aTabCols ); - if( pFrm->FindTabFrm()->IsRightToLeft() ) + if( pFrame->FindTabFrame()->IsRightToLeft() ) { - long nX = (pFrm->Frm().*fnRect->fnGetRight)() - (pPage->Frm().*fnRect->fnGetLeft)(); + long nX = (pFrame->Frame().*fnRect->fnGetRight)() - (pPage->Frame().*fnRect->fnGetLeft)(); const long nRight = aTabCols.GetLeftMin() + aTabCols.GetRight();; @@ -1348,8 +1348,8 @@ size_t SwFEShell::GetCurTabColNum() const } else { - const long nX = (pFrm->Frm().*fnRect->fnGetLeft)() - - (pPage->Frm().*fnRect->fnGetLeft)(); + const long nX = (pFrame->Frame().*fnRect->fnGetLeft)() - + (pPage->Frame().*fnRect->fnGetLeft)(); const long nLeft = aTabCols.GetLeftMin(); @@ -1367,31 +1367,31 @@ size_t SwFEShell::GetCurTabColNum() const return nRet; } -static const SwFrm *lcl_FindFrmInTab( const SwLayoutFrm *pLay, const Point &rPt, SwTwips nFuzzy ) +static const SwFrame *lcl_FindFrameInTab( const SwLayoutFrame *pLay, const Point &rPt, SwTwips nFuzzy ) { - const SwFrm *pFrm = pLay->Lower(); + const SwFrame *pFrame = pLay->Lower(); - while( pFrm && pLay->IsAnLower( pFrm ) ) + while( pFrame && pLay->IsAnLower( pFrame ) ) { - if ( pFrm->Frm().IsNear( rPt, nFuzzy ) ) + if ( pFrame->Frame().IsNear( rPt, nFuzzy ) ) { - if ( pFrm->IsLayoutFrm() ) + if ( pFrame->IsLayoutFrame() ) { - const SwFrm *pTmp = ::lcl_FindFrmInTab( static_cast<const SwLayoutFrm*>(pFrm), rPt, nFuzzy ); + const SwFrame *pTmp = ::lcl_FindFrameInTab( static_cast<const SwLayoutFrame*>(pFrame), rPt, nFuzzy ); if ( pTmp ) return pTmp; } - return pFrm; + return pFrame; } - pFrm = pFrm->FindNext(); + pFrame = pFrame->FindNext(); } return nullptr; } -static const SwCellFrm *lcl_FindFrm( const SwLayoutFrm *pLay, const Point &rPt, +static const SwCellFrame *lcl_FindFrame( const SwLayoutFrame *pLay, const Point &rPt, SwTwips nFuzzy, bool* pbRow, bool* pbCol ) { // bMouseMoveRowCols : @@ -1403,39 +1403,39 @@ static const SwCellFrm *lcl_FindFrm( const SwLayoutFrm *pLay, const Point &rPt, bool bCloseToRow = false; bool bCloseToCol = false; - const SwFrm *pFrm = pLay->ContainsContent(); - const SwFrm* pRet = nullptr; + const SwFrame *pFrame = pLay->ContainsContent(); + const SwFrame* pRet = nullptr; - if ( pFrm ) + if ( pFrame ) { do { - if ( pFrm->IsInTab() ) - pFrm = const_cast<SwFrm*>(pFrm)->ImplFindTabFrm(); + if ( pFrame->IsInTab() ) + pFrame = const_cast<SwFrame*>(pFrame)->ImplFindTabFrame(); - if (!pFrm) + if (!pFrame) break; - if ( pFrm->IsTabFrm() ) + if ( pFrame->IsTabFrame() ) { Point aPt( rPt ); - bool bSearchForFrmInTab = true; + bool bSearchForFrameInTab = true; SwTwips nTmpFuzzy = nFuzzy; if ( !bMouseMoveRowCols ) { // We ignore nested tables for the enhanced table selection: - while ( pFrm->GetUpper()->IsInTab() ) - pFrm = pFrm->GetUpper()->FindTabFrm(); + while ( pFrame->GetUpper()->IsInTab() ) + pFrame = pFrame->GetUpper()->FindTabFrame(); // We first check if the given point is 'close' to the left or top // border of the table frame: - OSL_ENSURE( pFrm, "Nested table frame without outer table" ); - SWRECTFN( pFrm ) - const bool bRTL = pFrm->IsRightToLeft(); + OSL_ENSURE( pFrame, "Nested table frame without outer table" ); + SWRECTFN( pFrame ) + const bool bRTL = pFrame->IsRightToLeft(); - SwRect aTabRect = pFrm->Prt(); - aTabRect.Pos() += pFrm->Frm().Pos(); + SwRect aTabRect = pFrame->Prt(); + aTabRect.Pos() += pFrame->Frame().Pos(); const SwTwips nLeft = bRTL ? (aTabRect.*fnRect->fnGetRight)() : @@ -1453,11 +1453,11 @@ static const SwCellFrm *lcl_FindFrm( const SwLayoutFrm *pLay, const Point &rPt, if ( bCloseToCol && 2 * nYDiff > nFuzzy ) { - const SwFrm* pPrev = pFrm->GetPrev(); + const SwFrame* pPrev = pFrame->GetPrev(); if ( pPrev ) { SwRect aPrevRect = pPrev->Prt(); - aPrevRect.Pos() += pPrev->Frm().Pos(); + aPrevRect.Pos() += pPrev->Frame().Pos(); if( aPrevRect.IsInside( rPt ) ) { @@ -1477,29 +1477,29 @@ static const SwCellFrm *lcl_FindFrm( const SwLayoutFrm *pLay, const Point &rPt, rPointY = nTop; if ( !bCloseToRow && !bCloseToCol ) - bSearchForFrmInTab = false; + bSearchForFrameInTab = false; - // Since the point has been adjusted, we call lcl_FindFrmInTab() + // Since the point has been adjusted, we call lcl_FindFrameInTab() // with a fuzzy value of 1: nTmpFuzzy = 1; } - const SwFrm* pTmp = bSearchForFrmInTab ? - ::lcl_FindFrmInTab( static_cast<const SwLayoutFrm*>(pFrm), aPt, nTmpFuzzy ) : + const SwFrame* pTmp = bSearchForFrameInTab ? + ::lcl_FindFrameInTab( static_cast<const SwLayoutFrame*>(pFrame), aPt, nTmpFuzzy ) : nullptr; if ( pTmp ) { - pFrm = pTmp; + pFrame = pTmp; break; } } - pFrm = pFrm->FindNextCnt(); + pFrame = pFrame->FindNextCnt(); - } while ( pFrm && pLay->IsAnLower( pFrm ) ); + } while ( pFrame && pLay->IsAnLower( pFrame ) ); } - if ( pFrm && pFrm->IsInTab() && pLay->IsAnLower( pFrm ) ) + if ( pFrame && pFrame->IsInTab() && pLay->IsAnLower( pFrame ) ) { do { @@ -1508,20 +1508,20 @@ static const SwCellFrm *lcl_FindFrm( const SwLayoutFrm *pLay, const Point &rPt, if ( bMouseMoveRowCols ) { // find the next cell frame - while ( pFrm && !pFrm->IsCellFrm() ) - pFrm = pFrm->GetUpper(); + while ( pFrame && !pFrame->IsCellFrame() ) + pFrame = pFrame->GetUpper(); } else { // find the most upper cell frame: - while ( pFrm && - ( !pFrm->IsCellFrm() || - !pFrm->GetUpper()->GetUpper()->IsTabFrm() || - pFrm->GetUpper()->GetUpper()->GetUpper()->IsInTab() ) ) - pFrm = pFrm->GetUpper(); + while ( pFrame && + ( !pFrame->IsCellFrame() || + !pFrame->GetUpper()->GetUpper()->IsTabFrame() || + pFrame->GetUpper()->GetUpper()->GetUpper()->IsInTab() ) ) + pFrame = pFrame->GetUpper(); } - if ( pFrm ) // Note: this condition should be the same like the while condition!!! + if ( pFrame ) // Note: this condition should be the same like the while condition!!! { // #i32329# Enhanced table selection // used for hotspot selection of tab/cols/rows @@ -1534,18 +1534,18 @@ static const SwCellFrm *lcl_FindFrm( const SwLayoutFrm *pLay, const Point &rPt, { *pbRow = bCloseToRow; *pbCol = bCloseToCol; - pRet = pFrm; + pRet = pFrame; break; } } else { // used for mouse move of columns/rows - const SwTabFrm* pTabFrm = pFrm->FindTabFrm(); - SwRect aTabRect = pTabFrm->Prt(); - aTabRect.Pos() += pTabFrm->Frm().Pos(); + const SwTabFrame* pTabFrame = pFrame->FindTabFrame(); + SwRect aTabRect = pTabFrame->Prt(); + aTabRect.Pos() += pTabFrame->Frame().Pos(); - SWRECTFN( pTabFrm ) + SWRECTFN( pTabFrame ) const SwTwips nTabTop = (aTabRect.*fnRect->fnGetTop)(); const SwTwips nMouseTop = bVert ? rPt.X() : rPt.Y(); @@ -1553,31 +1553,31 @@ static const SwCellFrm *lcl_FindFrm( const SwLayoutFrm *pLay, const Point &rPt, // Do not allow to drag upper table border: if ( !::IsSame( nTabTop, nMouseTop ) ) { - if ( ::IsSame( pFrm->Frm().Left(), rPt.X() ) || - ::IsSame( pFrm->Frm().Right(),rPt.X() ) ) + if ( ::IsSame( pFrame->Frame().Left(), rPt.X() ) || + ::IsSame( pFrame->Frame().Right(),rPt.X() ) ) { if ( pbRow ) *pbRow = false; - pRet = pFrm; + pRet = pFrame; break; } - if ( ::IsSame( pFrm->Frm().Top(), rPt.Y() ) || - ::IsSame( pFrm->Frm().Bottom(),rPt.Y() ) ) + if ( ::IsSame( pFrame->Frame().Top(), rPt.Y() ) || + ::IsSame( pFrame->Frame().Bottom(),rPt.Y() ) ) { if ( pbRow ) *pbRow = true; - pRet = pFrm; + pRet = pFrame; break; } } } - pFrm = pFrm->GetUpper(); + pFrame = pFrame->GetUpper(); } - } while ( pFrm ); + } while ( pFrame ); } // robust: - OSL_ENSURE( !pRet || pRet->IsCellFrm(), "lcl_FindFrm() is supposed to find a cell frame!" ); - return pRet && pRet->IsCellFrm() ? static_cast<const SwCellFrm*>(pRet) : nullptr; + OSL_ENSURE( !pRet || pRet->IsCellFrame(), "lcl_FindFrame() is supposed to find a cell frame!" ); + return pRet && pRet->IsCellFrame() ? static_cast<const SwCellFrame*>(pRet) : nullptr; } // pbCol = 0 => Used for moving table rows/cols with mouse @@ -1585,9 +1585,9 @@ static const SwCellFrm *lcl_FindFrm( const SwLayoutFrm *pLay, const Point &rPt, #define ENHANCED_TABLE_SELECTION_FUZZY 10 -const SwFrm* SwFEShell::GetBox( const Point &rPt, bool* pbRow, bool* pbCol ) const +const SwFrame* SwFEShell::GetBox( const Point &rPt, bool* pbRow, bool* pbCol ) const { - const SwPageFrm *pPage = static_cast<SwPageFrm*>(GetLayout()->Lower()); + const SwPageFrame *pPage = static_cast<SwPageFrame*>(GetLayout()->Lower()); vcl::Window* pOutWin = GetWin(); SwTwips nFuzzy = COLFUZZY; if( pOutWin ) @@ -1599,13 +1599,13 @@ const SwFrm* SwFEShell::GetBox( const Point &rPt, bool* pbRow, bool* pbCol ) con nFuzzy = aTmp.Width(); } - while ( pPage && !pPage->Frm().IsNear( rPt, nFuzzy ) ) - pPage = static_cast<const SwPageFrm*>(pPage->GetNext()); + while ( pPage && !pPage->Frame().IsNear( rPt, nFuzzy ) ) + pPage = static_cast<const SwPageFrame*>(pPage->GetNext()); - const SwCellFrm *pFrm = nullptr; + const SwCellFrame *pFrame = nullptr; if ( pPage ) { - // We cannot search the box by GetCrsrOfst or GetContentPos. + // We cannot search the box by GetCursorOfst or GetContentPos. // This would lead to a performance collapse for documents // with a lot of paragraphs/tables on one page //(BrowseMode!) @@ -1613,24 +1613,24 @@ const SwFrm* SwFEShell::GetBox( const Point &rPt, bool* pbRow, bool* pbCol ) con // check flys first if ( pPage->GetSortedObjs() ) { - for ( size_t i = 0; !pFrm && i < pPage->GetSortedObjs()->size(); ++i ) + for ( size_t i = 0; !pFrame && i < pPage->GetSortedObjs()->size(); ++i ) { SwAnchoredObject* pObj = (*pPage->GetSortedObjs())[i]; - if ( dynamic_cast<const SwFlyFrm*>( pObj) != nullptr ) + if ( dynamic_cast<const SwFlyFrame*>( pObj) != nullptr ) { - pFrm = lcl_FindFrm( static_cast<SwFlyFrm*>(pObj), + pFrame = lcl_FindFrame( static_cast<SwFlyFrame*>(pObj), rPt, nFuzzy, pbRow, pbCol ); } } } - const SwLayoutFrm *pLay = static_cast<const SwLayoutFrm*>(pPage->Lower()); - while ( pLay && !pFrm ) + const SwLayoutFrame *pLay = static_cast<const SwLayoutFrame*>(pPage->Lower()); + while ( pLay && !pFrame ) { - pFrm = lcl_FindFrm( pLay, rPt, nFuzzy, pbRow, pbCol ); - pLay = static_cast<const SwLayoutFrm*>(pLay->GetNext()); + pFrame = lcl_FindFrame( pLay, rPt, nFuzzy, pbRow, pbCol ); + pLay = static_cast<const SwLayoutFrame*>(pLay->GetNext()); } } - return pFrm; + return pFrame; } /* Helper function*/ @@ -1664,10 +1664,10 @@ static double lcl_DistancePoint2Segment( const Point& rA, const Point& rB, const } /* Helper function*/ -static Point lcl_ProjectOntoClosestTableFrm( const SwTabFrm& rTab, const Point& rPoint, bool bRowDrag ) +static Point lcl_ProjectOntoClosestTableFrame( const SwTabFrame& rTab, const Point& rPoint, bool bRowDrag ) { Point aRet( rPoint ); - const SwTabFrm* pCurrentTab = &rTab; + const SwTabFrame* pCurrentTab = &rTab; const bool bVert = pCurrentTab->IsVertical(); const bool bRTL = pCurrentTab->IsRightToLeft(); @@ -1704,7 +1704,7 @@ static Point lcl_ProjectOntoClosestTableFrm( const SwTabFrm& rTab, const Point& while ( pCurrentTab ) { SwRect aTabRect( pCurrentTab->Prt() ); - aTabRect += pCurrentTab->Frm().Pos(); + aTabRect += pCurrentTab->Frame().Pos(); if ( bLeft ) { @@ -1774,57 +1774,57 @@ bool SwFEShell::SelTableRowCol( const Point& rPt, const Point* pEnd, bool bRowDr // pEnd is set during dragging. for ( sal_uInt16 i = 0; i < ( pEnd ? 2 : 1 ); ++i ) { - const SwCellFrm* pFrm = - static_cast<const SwCellFrm*>(GetBox( paPt[i], &pbRow[i], &pbCol[i] ) ); + const SwCellFrame* pFrame = + static_cast<const SwCellFrame*>(GetBox( paPt[i], &pbRow[i], &pbCol[i] ) ); - if( pFrm ) + if( pFrame ) { - while( pFrm && pFrm->Lower() && pFrm->Lower()->IsRowFrm() ) - pFrm = static_cast<const SwCellFrm*>( static_cast<const SwLayoutFrm*>( pFrm->Lower() )->Lower() ); - if( pFrm && pFrm->GetTabBox()->GetSttNd() && - pFrm->GetTabBox()->GetSttNd()->IsInProtectSect() ) - pFrm = nullptr; + while( pFrame && pFrame->Lower() && pFrame->Lower()->IsRowFrame() ) + pFrame = static_cast<const SwCellFrame*>( static_cast<const SwLayoutFrame*>( pFrame->Lower() )->Lower() ); + if( pFrame && pFrame->GetTabBox()->GetSttNd() && + pFrame->GetTabBox()->GetSttNd()->IsInProtectSect() ) + pFrame = nullptr; } - if ( pFrm ) + if ( pFrame ) { - const SwContentFrm* pContent = ::GetCellContent( *pFrm ); + const SwContentFrame* pContent = ::GetCellContent( *pFrame ); - if ( pContent && pContent->IsTextFrm() ) + if ( pContent && pContent->IsTextFrame() ) { ppPos[i] = new SwPosition( *pContent->GetNode() ); ppPos[i]->nContent.Assign( const_cast<SwContentNode*>(pContent->GetNode()), 0 ); // paPt[i] will not be used any longer, now we use it to store // a position inside the content frame - paPt[i] = pContent->Frm().Center(); + paPt[i] = pContent->Frame().Center(); } } // no calculation of end frame if start frame has not been found. - if ( 1 == i || !ppPos[0] || !pEnd || !pFrm ) + if ( 1 == i || !ppPos[0] || !pEnd || !pFrame ) break; // find 'closest' table frame to pEnd: - const SwTabFrm* pCurrentTab = pFrm->FindTabFrm(); + const SwTabFrame* pCurrentTab = pFrame->FindTabFrame(); if ( pCurrentTab->IsFollow() ) pCurrentTab = pCurrentTab->FindMaster( true ); - const Point aProjection = lcl_ProjectOntoClosestTableFrm( *pCurrentTab, *pEnd, bRowDrag ); + const Point aProjection = lcl_ProjectOntoClosestTableFrame( *pCurrentTab, *pEnd, bRowDrag ); paPt[1] = aProjection; } if ( ppPos[0] ) { - SwShellCrsr* pCrsr = _GetCrsr(); - SwCrsrSaveState aSaveState( *pCrsr ); - SwPosition aOldPos( *pCrsr->GetPoint() ); + SwShellCursor* pCursor = _GetCursor(); + SwCursorSaveState aSaveState( *pCursor ); + SwPosition aOldPos( *pCursor->GetPoint() ); - pCrsr->DeleteMark(); - *pCrsr->GetPoint() = *ppPos[0]; - pCrsr->GetPtPos() = paPt[0]; + pCursor->DeleteMark(); + *pCursor->GetPoint() = *ppPos[0]; + pCursor->GetPtPos() = paPt[0]; - if ( !pCrsr->IsInProtectTable() ) + if ( !pCursor->IsInProtectTable() ) { bool bNewSelection = true; @@ -1833,20 +1833,20 @@ bool SwFEShell::SelTableRowCol( const Point& rPt, const Point* pEnd, bool bRowDr if ( ppPos[1]->nNode.GetNode().StartOfSectionNode() != aOldPos.nNode.GetNode().StartOfSectionNode() ) { - pCrsr->SetMark(); - SwCrsrSaveState aSaveState2( *pCrsr ); - *pCrsr->GetPoint() = *ppPos[1]; - pCrsr->GetPtPos() = paPt[1]; + pCursor->SetMark(); + SwCursorSaveState aSaveState2( *pCursor ); + *pCursor->GetPoint() = *ppPos[1]; + pCursor->GetPtPos() = paPt[1]; - if ( pCrsr->IsInProtectTable( false, false ) ) + if ( pCursor->IsInProtectTable( false, false ) ) { - pCrsr->RestoreSavePos(); + pCursor->RestoreSavePos(); bNewSelection = false; } } else { - pCrsr->RestoreSavePos(); + pCursor->RestoreSavePos(); bNewSelection = false; } } @@ -1856,14 +1856,14 @@ bool SwFEShell::SelTableRowCol( const Point& rPt, const Point* pEnd, bool bRowDr // #i35543# SelTableRowCol should remove any existing // table cursor: if ( IsTableMode() ) - TableCrsrToCursor(); + TableCursorToCursor(); if ( pbRow[0] && pbCol[0] ) - bRet = SwCrsrShell::SelTable(); + bRet = SwCursorShell::SelTable(); else if ( pbRow[0] ) - bRet = SwCrsrShell::_SelTableRowOrCol( true, true ); + bRet = SwCursorShell::_SelTableRowOrCol( true, true ); else if ( pbCol[0] ) - bRet = SwCrsrShell::_SelTableRowOrCol( false, true ); + bRet = SwCursorShell::_SelTableRowOrCol( false, true ); } else bRet = true; @@ -1884,37 +1884,37 @@ SwTab SwFEShell::WhichMouseTabCol( const Point &rPt ) const bool bSelect = false; // First try: Do we get the row/col move cursor? - const SwCellFrm* pFrm = static_cast<const SwCellFrm*>(GetBox( rPt, &bRow )); + const SwCellFrame* pFrame = static_cast<const SwCellFrame*>(GetBox( rPt, &bRow )); - if ( !pFrm ) + if ( !pFrame ) { // Second try: Do we get the row/col/tab selection cursor? - pFrm = static_cast<const SwCellFrm*>(GetBox( rPt, &bRow, &bCol )); + pFrame = static_cast<const SwCellFrame*>(GetBox( rPt, &bRow, &bCol )); bSelect = true; } - if( pFrm ) + if( pFrame ) { - while( pFrm && pFrm->Lower() && pFrm->Lower()->IsRowFrm() ) - pFrm = static_cast<const SwCellFrm*>(static_cast<const SwLayoutFrm*>(pFrm->Lower())->Lower()); - if( pFrm && pFrm->GetTabBox()->GetSttNd() && - pFrm->GetTabBox()->GetSttNd()->IsInProtectSect() ) - pFrm = nullptr; + while( pFrame && pFrame->Lower() && pFrame->Lower()->IsRowFrame() ) + pFrame = static_cast<const SwCellFrame*>(static_cast<const SwLayoutFrame*>(pFrame->Lower())->Lower()); + if( pFrame && pFrame->GetTabBox()->GetSttNd() && + pFrame->GetTabBox()->GetSttNd()->IsInProtectSect() ) + pFrame = nullptr; } - if( pFrm ) + if( pFrame ) { if ( !bSelect ) { - if ( pFrm->IsVertical() ) + if ( pFrame->IsVertical() ) nRet = bRow ? SwTab::COL_VERT : SwTab::ROW_VERT; else nRet = bRow ? SwTab::ROW_HORI : SwTab::COL_HORI; } else { - const SwTabFrm* pTabFrm = pFrm->FindTabFrm(); - if ( pTabFrm->IsVertical() ) + const SwTabFrame* pTabFrame = pFrame->FindTabFrame(); + if ( pTabFrame->IsVertical() ) { if ( bRow && bCol ) { @@ -1933,13 +1933,13 @@ SwTab SwFEShell::WhichMouseTabCol( const Point &rPt ) const { if ( bRow && bCol ) { - nRet = pTabFrm->IsRightToLeft() ? + nRet = pTabFrame->IsRightToLeft() ? SwTab::SEL_HORI_RTL : SwTab::SEL_HORI; } else if ( bRow ) { - nRet = pTabFrm->IsRightToLeft() ? + nRet = pTabFrame->IsRightToLeft() ? SwTab::ROWSEL_HORI_RTL : SwTab::ROWSEL_HORI; } @@ -2016,7 +2016,7 @@ bool SwFEShell::IsVerticalModeAtNdAndPos( const SwTextNode& _rTextNode, void SwFEShell::GetMouseTabCols( SwTabCols &rToFill, const Point &rPt ) const { - const SwFrm *pBox = GetBox( rPt ); + const SwFrame *pBox = GetBox( rPt ); if ( pBox ) _GetTabCols( rToFill, pBox ); } @@ -2024,12 +2024,12 @@ void SwFEShell::GetMouseTabCols( SwTabCols &rToFill, const Point &rPt ) const void SwFEShell::SetMouseTabCols( const SwTabCols &rNew, bool bCurRowOnly, const Point &rPt ) { - const SwFrm *pBox = GetBox( rPt ); + const SwFrame *pBox = GetBox( rPt ); if( pBox ) { SET_CURR_SHELL( this ); StartAllAction(); - GetDoc()->SetTabCols( rNew, bCurRowOnly, nullptr, static_cast<const SwCellFrm*>(pBox) ); + GetDoc()->SetTabCols( rNew, bCurRowOnly, nullptr, static_cast<const SwCellFrame*>(pBox) ); EndAllActionAndCall(); } } @@ -2045,11 +2045,11 @@ size_t SwFEShell::GetCurMouseTabColNum( const Point &rPt ) const //!!!GetCurTabColNum() mitpflegen!!!! size_t nRet = 0; - const SwFrm *pFrm = GetBox( rPt ); - OSL_ENSURE( pFrm, "Table not found" ); - if( pFrm ) + const SwFrame *pFrame = GetBox( rPt ); + OSL_ENSURE( pFrame, "Table not found" ); + if( pFrame ) { - const long nX = pFrm->Frm().Left(); + const long nX = pFrame->Frame().Left(); // get TabCols, only via these we get the position SwTabCols aTabCols; @@ -2078,19 +2078,19 @@ void ClearFEShellTabCols() void SwFEShell::GetTableAttr( SfxItemSet &rSet ) const { - SwFrm *pFrm = GetCurrFrm(); - if( pFrm && pFrm->IsInTab() ) - rSet.Put( pFrm->ImplFindTabFrm()->GetFormat()->GetAttrSet() ); + SwFrame *pFrame = GetCurrFrame(); + if( pFrame && pFrame->IsInTab() ) + rSet.Put( pFrame->ImplFindTabFrame()->GetFormat()->GetAttrSet() ); } void SwFEShell::SetTableAttr( const SfxItemSet &rNew ) { - SwFrm *pFrm = GetCurrFrm(); - if( pFrm && pFrm->IsInTab() ) + SwFrame *pFrame = GetCurrFrame(); + if( pFrame && pFrame->IsInTab() ) { SET_CURR_SHELL( this ); StartAllAction(); - SwTabFrm *pTab = pFrm->FindTabFrm(); + SwTabFrame *pTab = pFrame->FindTabFrame(); pTab->GetTable()->SetHTMLTableLayout( nullptr ); GetDoc()->SetAttr( rNew, *pTab->GetFormat() ); GetDoc()->getIDocumentState().SetModified(); @@ -2103,11 +2103,11 @@ void SwFEShell::SetTableAttr( const SfxItemSet &rNew ) * @param bUp true: move up, false: move down * @returns true if successful */ -static bool lcl_GoTableRow( SwCrsrShell* pShell, bool bUp ) +static bool lcl_GoTableRow( SwCursorShell* pShell, bool bUp ) { OSL_ENSURE( pShell != nullptr, "need shell" ); - SwPaM* pPam = pShell->GetCrsr(); + SwPaM* pPam = pShell->GetCursor(); const SwStartNode* pTableBox = pPam->GetNode().FindTableBoxStartNode(); OSL_ENSURE( pTableBox != nullptr, "I'm living in a box... NOT!" ); @@ -2127,12 +2127,12 @@ static bool lcl_GoTableRow( SwCrsrShell* pShell, bool bUp ) // aender eine Zellenbreite/-Hoehe/Spaltenbreite/Zeilenhoehe bool SwFEShell::SetColRowWidthHeight( sal_uInt16 eType, sal_uInt16 nDiff ) { - SwFrm *pFrm = GetCurrFrm(); - if( !pFrm || !pFrm->IsInTab() ) + SwFrame *pFrame = GetCurrFrame(); + if( !pFrame || !pFrame->IsInTab() ) return false; if( nsTableChgWidthHeightType::WH_FLAG_INSDEL & eType && - dynamic_cast< const SwDDETable* >(pFrm->ImplFindTabFrm()->GetTable()) != nullptr ) + dynamic_cast< const SwDDETable* >(pFrame->ImplFindTabFrame()->GetTable()) != nullptr ) { ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK ); @@ -2143,22 +2143,22 @@ bool SwFEShell::SetColRowWidthHeight( sal_uInt16 eType, sal_uInt16 nDiff ) StartAllAction(); do { - pFrm = pFrm->GetUpper(); - } while( !pFrm->IsCellFrm() ); + pFrame = pFrame->GetUpper(); + } while( !pFrame->IsCellFrame() ); - SwTabFrm *pTab = pFrm->ImplFindTabFrm(); + SwTabFrame *pTab = pFrame->ImplFindTabFrame(); // if the table is in relative values (USHRT_MAX) // then it should be recalculated to absolute values now - const SwFormatFrmSize& rTableFrmSz = pTab->GetFormat()->GetFrmSize(); + const SwFormatFrameSize& rTableFrameSz = pTab->GetFormat()->GetFrameSize(); SWRECTFN( pTab ) long nPrtWidth = (pTab->Prt().*fnRect->fnGetWidth)(); if( TBLVAR_CHGABS == pTab->GetTable()->GetTableChgMode() && ( eType & nsTableChgWidthHeightType::WH_COL_LEFT || eType & nsTableChgWidthHeightType::WH_COL_RIGHT ) && text::HoriOrientation::NONE == pTab->GetFormat()->GetHoriOrient().GetHoriOrient() && - nPrtWidth != rTableFrmSz.GetWidth() ) + nPrtWidth != rTableFrameSz.GetWidth() ) { - SwFormatFrmSize aSz( rTableFrmSz ); + SwFormatFrameSize aSz( rTableFrameSz ); aSz.SetWidth( pTab->Prt().Width() ); pTab->GetFormat()->SetFormatAttr( aSz ); } @@ -2166,7 +2166,7 @@ bool SwFEShell::SetColRowWidthHeight( sal_uInt16 eType, sal_uInt16 nDiff ) if( (eType & (nsTableChgWidthHeightType::WH_FLAG_BIGGER | nsTableChgWidthHeightType::WH_FLAG_INSDEL)) == (nsTableChgWidthHeightType::WH_FLAG_BIGGER | nsTableChgWidthHeightType::WH_FLAG_INSDEL) ) { - nDiff = sal_uInt16((pFrm->Frm().*fnRect->fnGetWidth)()); + nDiff = sal_uInt16((pFrame->Frame().*fnRect->fnGetWidth)()); // we must move the cursor outside the current cell before // deleting the cells. @@ -2192,12 +2192,12 @@ bool SwFEShell::SetColRowWidthHeight( sal_uInt16 eType, sal_uInt16 nDiff ) } SwTwips nLogDiff = nDiff; - nLogDiff *= pTab->GetFormat()->GetFrmSize().GetWidth(); + nLogDiff *= pTab->GetFormat()->GetFrameSize().GetWidth(); nLogDiff /= nPrtWidth; /** The cells are destroyed in here */ bool bRet = GetDoc()->SetColRowWidthHeight( - *const_cast<SwTableBox*>(static_cast<SwCellFrm*>(pFrm)->GetTabBox()), + *const_cast<SwTableBox*>(static_cast<SwCellFrame*>(pFrame)->GetTabBox()), eType, nDiff, nLogDiff ); delete pLastCols, pLastCols = nullptr; @@ -2233,7 +2233,7 @@ bool SwFEShell::SetColRowWidthHeight( sal_uInt16 eType, sal_uInt16 nDiff ) } static bool lcl_IsFormulaSelBoxes( const SwTable& rTable, const SwTableBoxFormula& rFormula, - SwCellFrms& rCells ) + SwCellFrames& rCells ) { SwTableBoxFormula aTmp( rFormula ); SwSelBoxes aBoxes; @@ -2241,7 +2241,7 @@ static bool lcl_IsFormulaSelBoxes( const SwTable& rTable, const SwTableBoxFormul for (size_t nSelBoxes = aBoxes.size(); nSelBoxes; ) { SwTableBox* pBox = aBoxes[ --nSelBoxes ]; - SwCellFrms::iterator iC; + SwCellFrames::iterator iC; for( iC = rCells.begin(); iC != rCells.end(); ++iC ) if( (*iC)->GetTabBox() == pBox ) break; // found @@ -2256,20 +2256,20 @@ static bool lcl_IsFormulaSelBoxes( const SwTable& rTable, const SwTableBoxFormul // ask formula for auto-sum bool SwFEShell::GetAutoSum( OUString& rFormula ) const { - SwFrm *pFrm = GetCurrFrm(); - SwTabFrm *pTab = pFrm ? pFrm->ImplFindTabFrm() : nullptr; + SwFrame *pFrame = GetCurrFrame(); + SwTabFrame *pTab = pFrame ? pFrame->ImplFindTabFrame() : nullptr; if( !pTab ) return false; - SwCellFrms aCells; + SwCellFrames aCells; OUString sFields; if( ::GetAutoSumSel( *this, aCells )) { sal_uInt16 nW = 0; for( size_t n = aCells.size(); n; ) { - SwCellFrm* pCFrm = aCells[ --n ]; - sal_uInt16 nBoxW = pCFrm->GetTabBox()->IsFormulaOrValueBox(); + SwCellFrame* pCFrame = aCells[ --n ]; + sal_uInt16 nBoxW = pCFrame->GetTabBox()->IsFormulaOrValueBox(); if( !nBoxW ) break; @@ -2280,7 +2280,7 @@ bool SwFEShell::GetAutoSum( OUString& rFormula ) const // formula only if box is contained if( RES_BOXATR_FORMULA == nBoxW && - !::lcl_IsFormulaSelBoxes( *pTab->GetTable(), pCFrm-> + !::lcl_IsFormulaSelBoxes( *pTab->GetTable(), pCFrame-> GetTabBox()->GetFrameFormat()->GetTableBoxFormula(), aCells)) { nW = RES_BOXATR_VALUE; @@ -2298,7 +2298,7 @@ bool SwFEShell::GetAutoSum( OUString& rFormula ) const { // search for values, Value/Formula/Text found -> include if( RES_BOXATR_FORMULA == nBoxW && - ::lcl_IsFormulaSelBoxes( *pTab->GetTable(), pCFrm-> + ::lcl_IsFormulaSelBoxes( *pTab->GetTable(), pCFrame-> GetTabBox()->GetFrameFormat()->GetTableBoxFormula(), aCells )) break; else if( USHRT_MAX != nBoxW ) @@ -2312,7 +2312,7 @@ bool SwFEShell::GetAutoSum( OUString& rFormula ) const // all boxes contained in the selection if( RES_BOXATR_FORMULA == nBoxW ) { - if( !::lcl_IsFormulaSelBoxes( *pTab->GetTable(), pCFrm-> + if( !::lcl_IsFormulaSelBoxes( *pTab->GetTable(), pCFrame-> GetTabBox()->GetFrameFormat()->GetTableBoxFormula(), aCells )) { // redo only for values! @@ -2339,7 +2339,7 @@ bool SwFEShell::GetAutoSum( OUString& rFormula ) const // possibly allow texts?? break; - sFields = "<" + pCFrm->GetTabBox()->GetName() + ">" + sFields; + sFields = "<" + pCFrame->GetTabBox()->GetName() + ">" + sFields; } } @@ -2354,25 +2354,25 @@ bool SwFEShell::GetAutoSum( OUString& rFormula ) const bool SwFEShell::IsTableRightToLeft() const { - SwFrm *pFrm = GetCurrFrm(); - if( !pFrm || !pFrm->IsInTab() ) + SwFrame *pFrame = GetCurrFrame(); + if( !pFrame || !pFrame->IsInTab() ) return false; - return pFrm->ImplFindTabFrm()->IsRightToLeft(); + return pFrame->ImplFindTabFrame()->IsRightToLeft(); } bool SwFEShell::IsMouseTableRightToLeft(const Point &rPt) const { - SwFrm *pFrm = const_cast<SwFrm *>(GetBox( rPt )); - const SwTabFrm* pTabFrm = pFrm ? pFrm->ImplFindTabFrm() : nullptr; - OSL_ENSURE( pTabFrm, "Table not found" ); - return pTabFrm && pTabFrm->IsRightToLeft(); + SwFrame *pFrame = const_cast<SwFrame *>(GetBox( rPt )); + const SwTabFrame* pTabFrame = pFrame ? pFrame->ImplFindTabFrame() : nullptr; + OSL_ENSURE( pTabFrame, "Table not found" ); + return pTabFrame && pTabFrame->IsRightToLeft(); } bool SwFEShell::IsTableVertical() const { - SwFrm *pFrm = GetCurrFrm(); - SwTabFrm *pTab = (pFrm && pFrm->IsInTab()) ? pFrm->ImplFindTabFrm() : nullptr; + SwFrame *pFrame = GetCurrFrame(); + SwTabFrame *pTab = (pFrame && pFrame->IsInTab()) ? pFrame->ImplFindTabFrame() : nullptr; if (!pTab) return false; return pTab->IsVertical(); diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx index 5c39c10f4d68..7c5043fa0040 100644 --- a/sw/source/core/frmedt/fews.cxx +++ b/sw/source/core/frmedt/fews.cxx @@ -57,7 +57,7 @@ void SwFEShell::EndAllActionAndCall() { for(SwViewShell& rCurrentShell : GetRingContainer()) { - if( dynamic_cast<const SwCrsrShell*>( &rCurrentShell) != nullptr ) + if( dynamic_cast<const SwCursorShell*>( &rCurrentShell) != nullptr ) { static_cast<SwFEShell*>(&rCurrentShell)->EndAction(); static_cast<SwFEShell*>(&rCurrentShell)->CallChgLnk(); @@ -77,125 +77,125 @@ Point SwFEShell::GetContentPos( const Point& rPoint, bool bNext ) const const SwRect& SwFEShell::GetAnyCurRect( CurRectType eType, const Point* pPt, const uno::Reference < embed::XEmbeddedObject >& xObj ) const { - const SwFrm *pFrm = Imp()->HasDrawView() + const SwFrame *pFrame = Imp()->HasDrawView() ? ::GetFlyFromMarked( &Imp()->GetDrawView()->GetMarkedObjectList(), const_cast<SwViewShell*>(static_cast<SwViewShell const *>(this))) : nullptr; - if( !pFrm ) + if( !pFrame ) { if( pPt ) { - SwPosition aPos( *GetCrsr()->GetPoint() ); + SwPosition aPos( *GetCursor()->GetPoint() ); Point aPt( *pPt ); - GetLayout()->GetCrsrOfst( &aPos, aPt ); + GetLayout()->GetCursorOfst( &aPos, aPt ); SwContentNode *pNd = aPos.nNode.GetNode().GetContentNode(); - pFrm = pNd->getLayoutFrm( GetLayout(), pPt ); + pFrame = pNd->getLayoutFrame( GetLayout(), pPt ); } else { const bool bOldCallbackActionEnabled = GetLayout()->IsCallbackActionEnabled(); if( bOldCallbackActionEnabled ) GetLayout()->SetCallbackActionEnabled( false ); - pFrm = GetCurrFrm(); + pFrame = GetCurrFrame(); if( bOldCallbackActionEnabled ) GetLayout()->SetCallbackActionEnabled( true ); } } - if( !pFrm ) - return GetLayout()->Frm(); + if( !pFrame ) + return GetLayout()->Frame(); - bool bFrm = true; + bool bFrame = true; switch ( eType ) { - case RECT_PAGE_PRT: bFrm = false; /* no break */ - case RECT_PAGE : pFrm = pFrm->FindPageFrm(); + case RECT_PAGE_PRT: bFrame = false; /* no break */ + case RECT_PAGE : pFrame = pFrame->FindPageFrame(); break; - case RECT_PAGE_CALC: pFrm->Calc(Imp()->GetShell()->GetOut()); - pFrm = pFrm->FindPageFrm(); - pFrm->Calc(Imp()->GetShell()->GetOut()); + case RECT_PAGE_CALC: pFrame->Calc(Imp()->GetShell()->GetOut()); + pFrame = pFrame->FindPageFrame(); + pFrame->Calc(Imp()->GetShell()->GetOut()); break; - case RECT_FLY_PRT_EMBEDDED: bFrm = false; /* no break */ - case RECT_FLY_EMBEDDED: pFrm = xObj.is() ? FindFlyFrm( xObj ) - : pFrm->IsFlyFrm() - ? pFrm - : pFrm->FindFlyFrm(); + case RECT_FLY_PRT_EMBEDDED: bFrame = false; /* no break */ + case RECT_FLY_EMBEDDED: pFrame = xObj.is() ? FindFlyFrame( xObj ) + : pFrame->IsFlyFrame() + ? pFrame + : pFrame->FindFlyFrame(); break; case RECT_OUTTABSECTION_PRT: - case RECT_OUTTABSECTION : if( pFrm->IsInTab() ) - pFrm = pFrm->FindTabFrm(); + case RECT_OUTTABSECTION : if( pFrame->IsInTab() ) + pFrame = pFrame->FindTabFrame(); else { OSL_FAIL( "Missing Table" ); } /* no break */ case RECT_SECTION_PRT: - case RECT_SECTION: if( pFrm->IsInSct() ) - pFrm = pFrm->FindSctFrm(); + case RECT_SECTION: if( pFrame->IsInSct() ) + pFrame = pFrame->FindSctFrame(); else { OSL_FAIL( "Missing section" ); } if( RECT_OUTTABSECTION_PRT == eType || RECT_SECTION_PRT == eType ) - bFrm = false; + bFrame = false; break; - case RECT_HEADERFOOTER_PRT: bFrm = false; /* no break */ - case RECT_HEADERFOOTER: if( nullptr == (pFrm = pFrm->FindFooterOrHeader()) ) - return GetLayout()->Frm(); + case RECT_HEADERFOOTER_PRT: bFrame = false; /* no break */ + case RECT_HEADERFOOTER: if( nullptr == (pFrame = pFrame->FindFooterOrHeader()) ) + return GetLayout()->Frame(); break; case RECT_PAGES_AREA: return GetLayout()->GetPagesArea(); default: break; } - return bFrm ? pFrm->Frm() : pFrm->Prt(); + return bFrame ? pFrame->Frame() : pFrame->Prt(); } sal_uInt16 SwFEShell::GetPageNumber( const Point &rPoint ) const { - const SwFrm *pPage = GetLayout()->Lower(); - while ( pPage && !pPage->Frm().IsInside( rPoint ) ) + const SwFrame *pPage = GetLayout()->Lower(); + while ( pPage && !pPage->Frame().IsInside( rPoint ) ) pPage = pPage->GetNext(); if ( pPage ) - return static_cast<const SwPageFrm*>(pPage)->GetPhyPageNum(); + return static_cast<const SwPageFrame*>(pPage)->GetPhyPageNum(); else return 0; } -bool SwFEShell::GetPageNumber( long nYPos, bool bAtCrsrPos, sal_uInt16& rPhyNum, sal_uInt16& rVirtNum, OUString &rDisplay) const +bool SwFEShell::GetPageNumber( long nYPos, bool bAtCursorPos, sal_uInt16& rPhyNum, sal_uInt16& rVirtNum, OUString &rDisplay) const { - const SwFrm *pPage; + const SwFrame *pPage; - if ( bAtCrsrPos ) // get page of Crsr + if ( bAtCursorPos ) // get page of Cursor { - pPage = GetCurrFrm( false ); + pPage = GetCurrFrame( false ); if ( pPage ) - pPage = pPage->FindPageFrm(); + pPage = pPage->FindPageFrame(); } else if ( nYPos > -1 ) // determine page via the position { pPage = GetLayout()->Lower(); - while( pPage && (pPage->Frm().Bottom() < nYPos || - nYPos < pPage->Frm().Top() ) ) + while( pPage && (pPage->Frame().Bottom() < nYPos || + nYPos < pPage->Frame().Top() ) ) pPage = pPage->GetNext(); } else // first visible page { pPage = Imp()->GetFirstVisPage(GetOut()); - if ( pPage && static_cast<const SwPageFrm*>(pPage)->IsEmptyPage() ) + if ( pPage && static_cast<const SwPageFrame*>(pPage)->IsEmptyPage() ) pPage = pPage->GetNext(); } if( pPage ) { - rPhyNum = static_cast<const SwPageFrm*>(pPage)->GetPhyPageNum(); - rVirtNum = static_cast<const SwPageFrm*>(pPage)->GetVirtPageNum(); - const SvxNumberType& rNum = static_cast<const SwPageFrm*>(pPage)->GetPageDesc()->GetNumType(); + rPhyNum = static_cast<const SwPageFrame*>(pPage)->GetPhyPageNum(); + rVirtNum = static_cast<const SwPageFrame*>(pPage)->GetVirtPageNum(); + const SvxNumberType& rNum = static_cast<const SwPageFrame*>(pPage)->GetPageDesc()->GetNumType(); rDisplay = rNum.GetNumStr( rVirtNum ); } @@ -204,73 +204,73 @@ bool SwFEShell::GetPageNumber( long nYPos, bool bAtCrsrPos, sal_uInt16& rPhyNum, bool SwFEShell::IsDirectlyInSection() const { - SwFrm* pFrm = GetCurrFrm( false ); - return pFrm && pFrm->GetUpper() && pFrm->GetUpper()->IsSctFrm(); + SwFrame* pFrame = GetCurrFrame( false ); + return pFrame && pFrame->GetUpper() && pFrame->GetUpper()->IsSctFrame(); } -FrmTypeFlags SwFEShell::GetFrmType( const Point *pPt, bool bStopAtFly ) const +FrameTypeFlags SwFEShell::GetFrameType( const Point *pPt, bool bStopAtFly ) const { - FrmTypeFlags nReturn = FrmTypeFlags::NONE; - const SwFrm *pFrm; + FrameTypeFlags nReturn = FrameTypeFlags::NONE; + const SwFrame *pFrame; if ( pPt ) { - SwPosition aPos( *GetCrsr()->GetPoint() ); + SwPosition aPos( *GetCursor()->GetPoint() ); Point aPt( *pPt ); - GetLayout()->GetCrsrOfst( &aPos, aPt ); + GetLayout()->GetCursorOfst( &aPos, aPt ); SwContentNode *pNd = aPos.nNode.GetNode().GetContentNode(); - pFrm = pNd->getLayoutFrm( GetLayout(), pPt ); + pFrame = pNd->getLayoutFrame( GetLayout(), pPt ); } else - pFrm = GetCurrFrm( false ); - while ( pFrm ) + pFrame = GetCurrFrame( false ); + while ( pFrame ) { - switch ( pFrm->GetType() ) + switch ( pFrame->GetType() ) { - case FRM_COLUMN: if( pFrm->GetUpper()->IsSctFrm() ) + case FRM_COLUMN: if( pFrame->GetUpper()->IsSctFrame() ) { // Check, if isn't not only a single column // from a section with footnotes at the end. - if( pFrm->GetNext() || pFrm->GetPrev() ) + if( pFrame->GetNext() || pFrame->GetPrev() ) // Sectioncolumns - nReturn |= ( nReturn & FrmTypeFlags::TABLE ) ? - FrmTypeFlags::COLSECTOUTTAB : FrmTypeFlags::COLSECT; + nReturn |= ( nReturn & FrameTypeFlags::TABLE ) ? + FrameTypeFlags::COLSECTOUTTAB : FrameTypeFlags::COLSECT; } else // only pages and frame columns - nReturn |= FrmTypeFlags::COLUMN; + nReturn |= FrameTypeFlags::COLUMN; break; - case FRM_PAGE: nReturn |= FrmTypeFlags::PAGE; - if( static_cast<const SwPageFrm*>(pFrm)->IsFootnotePage() ) - nReturn |= FrmTypeFlags::FTNPAGE; + case FRM_PAGE: nReturn |= FrameTypeFlags::PAGE; + if( static_cast<const SwPageFrame*>(pFrame)->IsFootnotePage() ) + nReturn |= FrameTypeFlags::FTNPAGE; break; - case FRM_HEADER: nReturn |= FrmTypeFlags::HEADER; break; - case FRM_FOOTER: nReturn |= FrmTypeFlags::FOOTER; break; - case FRM_BODY: if( pFrm->GetUpper()->IsPageFrm() ) // not for ColumnFrms - nReturn |= FrmTypeFlags::BODY; + case FRM_HEADER: nReturn |= FrameTypeFlags::HEADER; break; + case FRM_FOOTER: nReturn |= FrameTypeFlags::FOOTER; break; + case FRM_BODY: if( pFrame->GetUpper()->IsPageFrame() ) // not for ColumnFrames + nReturn |= FrameTypeFlags::BODY; break; - case FRM_FTN: nReturn |= FrmTypeFlags::FOOTNOTE; break; - case FRM_FLY: if( static_cast<const SwFlyFrm*>(pFrm)->IsFlyLayFrm() ) - nReturn |= FrmTypeFlags::FLY_FREE; - else if ( static_cast<const SwFlyFrm*>(pFrm)->IsFlyAtCntFrm() ) - nReturn |= FrmTypeFlags::FLY_ATCNT; + case FRM_FTN: nReturn |= FrameTypeFlags::FOOTNOTE; break; + case FRM_FLY: if( static_cast<const SwFlyFrame*>(pFrame)->IsFlyLayFrame() ) + nReturn |= FrameTypeFlags::FLY_FREE; + else if ( static_cast<const SwFlyFrame*>(pFrame)->IsFlyAtContentFrame() ) + nReturn |= FrameTypeFlags::FLY_ATCNT; else { - OSL_ENSURE( static_cast<const SwFlyFrm*>(pFrm)->IsFlyInCntFrm(), + OSL_ENSURE( static_cast<const SwFlyFrame*>(pFrame)->IsFlyInContentFrame(), "New frametype?" ); - nReturn |= FrmTypeFlags::FLY_INCNT; + nReturn |= FrameTypeFlags::FLY_INCNT; } - nReturn |= FrmTypeFlags::FLY_ANY; + nReturn |= FrameTypeFlags::FLY_ANY; if( bStopAtFly ) return nReturn; break; case FRM_TAB: case FRM_ROW: - case FRM_CELL: nReturn |= FrmTypeFlags::TABLE; break; + case FRM_CELL: nReturn |= FrameTypeFlags::TABLE; break; default: /* do nothing */ break; } - if ( pFrm->IsFlyFrm() ) - pFrm = static_cast<const SwFlyFrm*>(pFrm)->GetAnchorFrm(); + if ( pFrame->IsFlyFrame() ) + pFrame = static_cast<const SwFlyFrame*>(pFrame)->GetAnchorFrame(); else - pFrm = pFrm->GetUpper(); + pFrame = pFrame->GetUpper(); } return nReturn; } @@ -278,7 +278,7 @@ FrmTypeFlags SwFEShell::GetFrmType( const Point *pPt, bool bStopAtFly ) const void SwFEShell::ShGetFcs( bool bUpdate ) { ::SetShell( this ); - SwCrsrShell::ShGetFcs( bUpdate ); + SwCursorShell::ShGetFcs( bUpdate ); if ( HasDrawView() ) { @@ -290,7 +290,7 @@ void SwFEShell::ShGetFcs( bool bUpdate ) void SwFEShell::ShLooseFcs() { - SwCrsrShell::ShLooseFcs(); + SwCursorShell::ShLooseFcs(); if ( HasDrawView() && Imp()->GetDrawView()->AreObjectsMarked() ) { @@ -301,35 +301,35 @@ void SwFEShell::ShLooseFcs() sal_uInt16 SwFEShell::GetPhyPageNum() { - SwFrm *pFrm = GetCurrFrm(); - if ( pFrm ) - return pFrm->GetPhyPageNum(); + SwFrame *pFrame = GetCurrFrame(); + if ( pFrame ) + return pFrame->GetPhyPageNum(); return 0; } -sal_uInt16 SwFEShell::GetVirtPageNum( const bool bCalcFrm ) +sal_uInt16 SwFEShell::GetVirtPageNum( const bool bCalcFrame ) { - SwFrm *pFrm = GetCurrFrm( bCalcFrm ); - if ( pFrm ) - return pFrm->GetVirtPageNum(); + SwFrame *pFrame = GetCurrFrame( bCalcFrame ); + if ( pFrame ) + return pFrame->GetVirtPageNum(); return 0; } -static void lcl_SetAPageOffset( sal_uInt16 nOffset, SwPageFrm* pPage, SwFEShell* pThis ) +static void lcl_SetAPageOffset( sal_uInt16 nOffset, SwPageFrame* pPage, SwFEShell* pThis ) { pThis->StartAllAction(); OSL_ENSURE( pPage->FindFirstBodyContent(), - "SwFEShell _SetAPageOffset() without ContentFrm" ); + "SwFEShell _SetAPageOffset() without ContentFrame" ); SwFormatPageDesc aDesc( pPage->GetPageDesc() ); aDesc.SetNumOffset( nOffset ); - SwFrm *pFrm = pThis->GetCurrFrm( false ); - if ( pFrm->IsInTab() ) - pThis->GetDoc()->SetAttr( aDesc, *pFrm->FindTabFrm()->GetFormat() ); + SwFrame *pFrame = pThis->GetCurrFrame( false ); + if ( pFrame->IsInTab() ) + pThis->GetDoc()->SetAttr( aDesc, *pFrame->FindTabFrame()->GetFormat() ); else { - pThis->GetDoc()->getIDocumentContentOperations().InsertPoolItem( *pThis->GetCrsr(), aDesc ); + pThis->GetDoc()->getIDocumentContentOperations().InsertPoolItem( *pThis->GetCursor(), aDesc ); } pThis->EndAllAction(); @@ -338,48 +338,48 @@ static void lcl_SetAPageOffset( sal_uInt16 nOffset, SwPageFrm* pPage, SwFEShell* void SwFEShell::SetNewPageOffset( sal_uInt16 nOffset ) { GetLayout()->SetVirtPageNum( true ); - const SwPageFrm *pPage = GetCurrFrm( false )->FindPageFrm(); - lcl_SetAPageOffset( nOffset, const_cast<SwPageFrm*>(pPage), this ); + const SwPageFrame *pPage = GetCurrFrame( false )->FindPageFrame(); + lcl_SetAPageOffset( nOffset, const_cast<SwPageFrame*>(pPage), this ); } void SwFEShell::SetPageOffset( sal_uInt16 nOffset ) { - const SwPageFrm *pPage = GetCurrFrm( false )->FindPageFrm(); - const SwRootFrm* pDocLayout = GetLayout(); + const SwPageFrame *pPage = GetCurrFrame( false )->FindPageFrame(); + const SwRootFrame* pDocLayout = GetLayout(); while ( pPage ) { - const SwFrm *pFlow = pPage->FindFirstBodyContent(); + const SwFrame *pFlow = pPage->FindFirstBodyContent(); if ( pFlow ) { if ( pFlow->IsInTab() ) - pFlow = pFlow->FindTabFrm(); + pFlow = pFlow->FindTabFrame(); const SwFormatPageDesc& rPgDesc = pFlow->GetAttrSet()->GetPageDesc(); if ( rPgDesc.GetNumOffset() ) { pDocLayout->SetVirtPageNum( true ); - lcl_SetAPageOffset( nOffset, const_cast<SwPageFrm*>(pPage), this ); + lcl_SetAPageOffset( nOffset, const_cast<SwPageFrame*>(pPage), this ); break; } } - pPage = static_cast<const SwPageFrm*>(pPage->GetPrev()); + pPage = static_cast<const SwPageFrame*>(pPage->GetPrev()); } } sal_uInt16 SwFEShell::GetPageOffset() const { - const SwPageFrm *pPage = GetCurrFrm()->FindPageFrm(); + const SwPageFrame *pPage = GetCurrFrame()->FindPageFrame(); while ( pPage ) { - const SwFrm *pFlow = pPage->FindFirstBodyContent(); + const SwFrame *pFlow = pPage->FindFirstBodyContent(); if ( pFlow ) { if ( pFlow->IsInTab() ) - pFlow = pFlow->FindTabFrm(); + pFlow = pFlow->FindTabFrame(); ::boost::optional<sal_uInt16> oNumOffset = pFlow->GetAttrSet()->GetPageDesc().GetNumOffset(); if ( oNumOffset ) return oNumOffset.get(); } - pPage = static_cast<const SwPageFrm*>(pPage->GetPrev()); + pPage = static_cast<const SwPageFrame*>(pPage->GetPrev()); } return 0; } @@ -391,7 +391,7 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const OUString &rText, con const bool bCpyBrd ) { // get node index of cursor position, SwDoc can do everything else itself - SwContentFrm *pCnt = LTYPE_DRAW==eType ? nullptr : GetCurrFrm( false ); + SwContentFrame *pCnt = LTYPE_DRAW==eType ? nullptr : GetCurrFrame( false ); if( LTYPE_DRAW==eType || pCnt ) { StartAllAction(); @@ -409,7 +409,7 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const OUString &rText, con if (bInnerCntIsFly) { // pass down index to the startnode for flys - nIdx = pCnt->FindFlyFrm()-> + nIdx = pCnt->FindFlyFrame()-> GetFormat()->GetContent().GetContentIdx()->GetIndex(); } break; @@ -417,7 +417,7 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const OUString &rText, con if( pCnt->IsInTab() ) { // pass down index to the TableNode for tables - const SwTable& rTable = *pCnt->FindTabFrm()->GetTable(); + const SwTable& rTable = *pCnt->FindTabFrame()->GetTable(); nIdx = rTable.GetTabSortBoxes()[ 0 ] ->GetSttNd()->FindTableNode()->GetIndex(); } @@ -458,7 +458,7 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const OUString &rText, con } break; default: - OSL_ENSURE( false, "Crsr neither in table nor in fly." ); + OSL_ENSURE( false, "Cursor neither in table nor in fly." ); } if( nIdx ) @@ -487,9 +487,9 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const OUString &rText, con SfxItemSet aSet(makeItemSetFromFormatAnchor(GetDoc()->GetAttrPool(), aAnc)); - SwFlyFrm *pFly = GetSelectedOrCurrFlyFrm(); + SwFlyFrame *pFly = GetSelectedOrCurrFlyFrame(); SwFlyFrameFormat* pInnerFlyFormat = pFly->GetFormat(); - GetDoc()->SetFlyFrmAttr(*pInnerFlyFormat, aSet); + GetDoc()->SetFlyFrameAttr(*pInnerFlyFormat, aSet); //put a hard-break after the graphic to keep it separated //from the caption text if the outer frame is resized @@ -500,9 +500,9 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const OUString &rText, con if (pFlyFormat) { - const Point aPt(GetCrsrDocPos()); - if (SwFlyFrm* pFrm = pFlyFormat->GetFrm(&aPt)) - SelectFlyFrm(*pFrm, true); + const Point aPt(GetCursorDocPos()); + if (SwFlyFrame* pFrame = pFlyFormat->GetFrame(&aPt)) + SelectFlyFrame(*pFrame, true); } EndUndo(); EndAllActionAndCall(); @@ -520,19 +520,19 @@ bool SwFEShell::Sort(const SwSortOptions& rOpt) if(IsTableMode()) { // Sort table - // check if Point/Mark of current Crsr are in one table - SwFrm *pFrm = GetCurrFrm( false ); - OSL_ENSURE( pFrm->FindTabFrm(), "Crsr not in table." ); + // check if Point/Mark of current Cursor are in one table + SwFrame *pFrame = GetCurrFrame( false ); + OSL_ENSURE( pFrame->FindTabFrame(), "Cursor not in table." ); // search boxes via the layout SwSelBoxes aBoxes; GetTableSel(*this, aBoxes); - // The Crsr should be removed from the deletion area. + // The Cursor should be removed from the deletion area. // Always put them behind/on the table; via the // document position they will always be set to the old position - while( !pFrm->IsCellFrm() ) - pFrm = pFrm->GetUpper(); + while( !pFrame->IsCellFrame() ) + pFrame = pFrame->GetUpper(); { /* ParkCursor->ParkCursorTab */ ParkCursorInTab(); @@ -544,7 +544,7 @@ bool SwFEShell::Sort(const SwSortOptions& rOpt) else { // Sort text nothing else - for(SwPaM& rPaM : GetCrsr()->GetRingContainer()) + for(SwPaM& rPaM : GetCursor()->GetRingContainer()) { SwPaM* pPam = &rPaM; @@ -578,41 +578,41 @@ bool SwFEShell::Sort(const SwSortOptions& rOpt) return bRet; } -sal_uInt16 SwFEShell::_GetCurColNum( const SwFrm *pFrm, +sal_uInt16 SwFEShell::_GetCurColNum( const SwFrame *pFrame, SwGetCurColNumPara* pPara ) const { sal_uInt16 nRet = 0; - while ( pFrm ) + while ( pFrame ) { - pFrm = pFrm->GetUpper(); - if( pFrm && pFrm->IsColumnFrm() ) + pFrame = pFrame->GetUpper(); + if( pFrame && pFrame->IsColumnFrame() ) { - const SwFrm *pCurFrm = pFrm; + const SwFrame *pCurFrame = pFrame; do { ++nRet; - pFrm = pFrm->GetPrev(); - } while ( pFrm ); + pFrame = pFrame->GetPrev(); + } while ( pFrame ); if( pPara ) { // now search the format, determining the columness - pFrm = pCurFrm->GetUpper(); - while( pFrm ) + pFrame = pCurFrame->GetUpper(); + while( pFrame ) { - if( ( FRM_PAGE | FRM_FLY | FRM_SECTION ) & pFrm->GetType() ) + if( ( FRM_PAGE | FRM_FLY | FRM_SECTION ) & pFrame->GetType() ) { - pPara->pFrameFormat = static_cast<const SwLayoutFrm*>(pFrm)->GetFormat(); - pPara->pPrtRect = &pFrm->Prt(); - pPara->pFrmRect = &pFrm->Frm(); + pPara->pFrameFormat = static_cast<const SwLayoutFrame*>(pFrame)->GetFormat(); + pPara->pPrtRect = &pFrame->Prt(); + pPara->pFrameRect = &pFrame->Frame(); break; } - pFrm = pFrm->GetUpper(); + pFrame = pFrame->GetUpper(); } - if( !pFrm ) + if( !pFrame ) { pPara->pFrameFormat = nullptr; pPara->pPrtRect = nullptr; - pPara->pFrmRect = nullptr; + pPara->pFrameRect = nullptr; } } break; @@ -623,22 +623,22 @@ sal_uInt16 SwFEShell::_GetCurColNum( const SwFrm *pFrm, sal_uInt16 SwFEShell::GetCurColNum( SwGetCurColNumPara* pPara ) const { - OSL_ENSURE( GetCurrFrm(), "Crsr parked?" ); - return _GetCurColNum( GetCurrFrm(), pPara ); + OSL_ENSURE( GetCurrFrame(), "Cursor parked?" ); + return _GetCurColNum( GetCurrFrame(), pPara ); } sal_uInt16 SwFEShell::GetCurOutColNum( SwGetCurColNumPara* pPara ) const { sal_uInt16 nRet = 0; - SwFrm* pFrm = GetCurrFrm(); - OSL_ENSURE( pFrm, "Crsr parked?" ); - if( pFrm ) + SwFrame* pFrame = GetCurrFrame(); + OSL_ENSURE( pFrame, "Cursor parked?" ); + if( pFrame ) { - pFrm = pFrm->IsInTab() ? static_cast<SwFrm*>(pFrm->FindTabFrm()) - : static_cast<SwFrm*>(pFrm->FindSctFrm()); - OSL_ENSURE( pFrm, "No Tab, no Sect" ); - if( pFrm ) - nRet = _GetCurColNum( pFrm, pPara ); + pFrame = pFrame->IsInTab() ? static_cast<SwFrame*>(pFrame->FindTabFrame()) + : static_cast<SwFrame*>(pFrame->FindSctFrame()); + OSL_ENSURE( pFrame, "No Tab, no Sect" ); + if( pFrame ) + nRet = _GetCurColNum( pFrame, pPara ); } return nRet; } @@ -674,20 +674,20 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, bool _bMirror, Point* _opRef, Size* _opPercent, - const SwFormatFrmSize* pFormatFrmSize) const + const SwFormatFrameSize* pFormatFrameSize) const { - const SwFrm* pFrm; - const SwFlyFrm* pFly; + const SwFrame* pFrame; + const SwFlyFrame* pFly; if( _opRef ) { - pFrm = GetCurrFrm(); - if( nullptr != ( pFly = pFrm->FindFlyFrm() ) ) - pFrm = pFly->GetAnchorFrm(); + pFrame = GetCurrFrame(); + if( nullptr != ( pFly = pFrame->FindFlyFrame() ) ) + pFrame = pFly->GetAnchorFrame(); } else { - pFly = GetSelectedFlyFrm(); - pFrm = pFly ? pFly->GetAnchorFrm() : GetCurrFrm(); + pFly = GetSelectedFlyFrame(); + pFrame = pFly ? pFly->GetAnchorFrame() : GetCurrFrame(); } bool bWrapThrough = false; @@ -698,7 +698,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, bWrapThrough = rSurround.GetSurround() == SURROUND_THROUGHT; } - const SwPageFrm* pPage = pFrm->FindPageFrm(); + const SwPageFrame* pPage = pFrame->FindPageFrame(); _bMirror = _bMirror && !pPage->OnRightPage(); Point aPos; @@ -708,26 +708,26 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, if ((FLY_AT_PAGE == _nAnchorId) || (FLY_AT_FLY == _nAnchorId)) // LAYER_IMPL { - const SwFrm* pTmp = pFrm; + const SwFrame* pTmp = pFrame; // #i22305# if ((FLY_AT_PAGE == _nAnchorId) || ((FLY_AT_FLY == _nAnchorId) && !_bFollowTextFlow)) { - pFrm = pPage; + pFrame = pPage; } else { - pFrm = pFrm->FindFlyFrm(); + pFrame = pFrame->FindFlyFrame(); } - if ( !pFrm ) - pFrm = pTmp; - _orRect = pFrm->Frm(); - SWRECTFN( pFrm ) - bRTL = pFrm->IsRightToLeft(); + if ( !pFrame ) + pFrame = pTmp; + _orRect = pFrame->Frame(); + SWRECTFN( pFrame ) + bRTL = pFrame->IsRightToLeft(); if ( bRTL ) - aPos = pFrm->Frm().TopRight(); + aPos = pFrame->Frame().TopRight(); else - aPos = (pFrm->Frm().*fnRect->fnGetPos)(); + aPos = (pFrame->Frame().*fnRect->fnGetPos)(); if( bVert || bVertL2R ) { @@ -737,10 +737,10 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, switch ( _eHoriRelOrient ) { case text::RelOrientation::PAGE_RIGHT: - case text::RelOrientation::FRAME_RIGHT: aPos.Y() += pFrm->Prt().Height(); + case text::RelOrientation::FRAME_RIGHT: aPos.Y() += pFrame->Prt().Height(); // no break! case text::RelOrientation::PRINT_AREA: - case text::RelOrientation::PAGE_PRINT_AREA: aPos.Y() += pFrm->Prt().Top(); break; + case text::RelOrientation::PAGE_PRINT_AREA: aPos.Y() += pFrame->Prt().Top(); break; default: break; } } @@ -749,11 +749,11 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, switch ( _eHoriRelOrient ) { case text::RelOrientation::PRINT_AREA: - case text::RelOrientation::PAGE_PRINT_AREA: aPos.X() += pFrm->Prt().Width(); + case text::RelOrientation::PAGE_PRINT_AREA: aPos.X() += pFrame->Prt().Width(); // no break case text::RelOrientation::PAGE_RIGHT: - case text::RelOrientation::FRAME_RIGHT: aPos.X() += pFrm->Prt().Left(); break; - default: aPos.X() += pFrm->Frm().Width(); + case text::RelOrientation::FRAME_RIGHT: aPos.X() += pFrame->Prt().Left(); break; + default: aPos.X() += pFrame->Frame().Width(); } } else if ( bRTL ) @@ -761,11 +761,11 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, switch ( _eHoriRelOrient ) { case text::RelOrientation::PRINT_AREA: - case text::RelOrientation::PAGE_PRINT_AREA: aPos.X() += pFrm->Prt().Width(); + case text::RelOrientation::PAGE_PRINT_AREA: aPos.X() += pFrame->Prt().Width(); // no break! case text::RelOrientation::PAGE_LEFT: - case text::RelOrientation::FRAME_LEFT: aPos.X() += pFrm->Prt().Left() - - pFrm->Frm().Width(); break; + case text::RelOrientation::FRAME_LEFT: aPos.X() += pFrame->Prt().Left() - + pFrame->Frame().Width(); break; default: break; } } @@ -774,10 +774,10 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, switch ( _eHoriRelOrient ) { case text::RelOrientation::PAGE_RIGHT: - case text::RelOrientation::FRAME_RIGHT: aPos.X() += pFrm->Prt().Width(); + case text::RelOrientation::FRAME_RIGHT: aPos.X() += pFrame->Prt().Width(); // no break! case text::RelOrientation::PRINT_AREA: - case text::RelOrientation::PAGE_PRINT_AREA: aPos.X() += pFrm->Prt().Left(); break; + case text::RelOrientation::PAGE_PRINT_AREA: aPos.X() += pFrame->Prt().Left(); break; default:break; } } @@ -789,7 +789,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, case text::RelOrientation::PRINT_AREA: case text::RelOrientation::PAGE_PRINT_AREA: { - aPos.X() -= pFrm->GetRightMargin(); + aPos.X() -= pFrame->GetRightMargin(); } break; } @@ -801,7 +801,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, case text::RelOrientation::PRINT_AREA: case text::RelOrientation::PAGE_PRINT_AREA: { - aPos.X() += pFrm->GetLeftMargin(); + aPos.X() += pFrame->GetLeftMargin(); } break; } @@ -813,47 +813,47 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, case text::RelOrientation::PRINT_AREA: case text::RelOrientation::PAGE_PRINT_AREA: { - if ( pFrm->IsPageFrm() ) + if ( pFrame->IsPageFrame() ) { aPos.Y() = - static_cast<const SwPageFrm*>(pFrm)->PrtWithoutHeaderAndFooter().Top(); + static_cast<const SwPageFrame*>(pFrame)->PrtWithoutHeaderAndFooter().Top(); } else { - aPos.Y() += pFrm->Prt().Top(); + aPos.Y() += pFrame->Prt().Top(); } } break; } } if ( _opPercent ) - *_opPercent = pFrm->Prt().SSize(); + *_opPercent = pFrame->Prt().SSize(); } else { - const SwFrm* pUpper = ( pFrm->IsPageFrm() || pFrm->IsFlyFrm() ) ? - pFrm : pFrm->GetUpper(); + const SwFrame* pUpper = ( pFrame->IsPageFrame() || pFrame->IsFlyFrame() ) ? + pFrame : pFrame->GetUpper(); SWRECTFN( pUpper ); if ( _opPercent ) { // If the size is relative from page, then full size should be counted from the page frame. - if (pFormatFrmSize && pFormatFrmSize->GetWidthPercentRelation() == text::RelOrientation::PAGE_FRAME) - _opPercent->setWidth(pPage->Frm().Width()); + if (pFormatFrameSize && pFormatFrameSize->GetWidthPercentRelation() == text::RelOrientation::PAGE_FRAME) + _opPercent->setWidth(pPage->Frame().Width()); else _opPercent->setWidth(pUpper->Prt().Width()); - if (pFormatFrmSize && pFormatFrmSize->GetHeightPercentRelation() == text::RelOrientation::PAGE_FRAME) + if (pFormatFrameSize && pFormatFrameSize->GetHeightPercentRelation() == text::RelOrientation::PAGE_FRAME) // If the size is relative from page, then full size should be counted from the page frame. - _opPercent->setHeight(pPage->Frm().Height()); + _opPercent->setHeight(pPage->Frame().Height()); else _opPercent->setHeight(pUpper->Prt().Height()); } - bRTL = pFrm->IsRightToLeft(); + bRTL = pFrame->IsRightToLeft(); if ( bRTL ) - aPos = pFrm->Frm().TopRight(); + aPos = pFrame->Frame().TopRight(); else - aPos = (pFrm->Frm().*fnRect->fnGetPos)(); + aPos = (pFrame->Frame().*fnRect->fnGetPos)(); // #i17567# - allow negative positions // for fly frames anchor to paragraph/to character. if ((_nAnchorId == FLY_AT_PARA) || (_nAnchorId == FLY_AT_CHAR)) @@ -866,16 +866,16 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, // new class <SwEnvironmentOfAnchoredObject> objectpositioning::SwEnvironmentOfAnchoredObject aEnvOfObj( _bFollowTextFlow ); - const SwLayoutFrm& rHoriEnvironLayFrm = - aEnvOfObj.GetHoriEnvironmentLayoutFrm( *pFrm ); - const SwLayoutFrm& rVertEnvironLayFrm = - aEnvOfObj.GetVertEnvironmentLayoutFrm( *pFrm ); - SwRect aHoriEnvironRect( rHoriEnvironLayFrm.Frm() ); + const SwLayoutFrame& rHoriEnvironLayFrame = + aEnvOfObj.GetHoriEnvironmentLayoutFrame( *pFrame ); + const SwLayoutFrame& rVertEnvironLayFrame = + aEnvOfObj.GetVertEnvironmentLayoutFrame( *pFrame ); + SwRect aHoriEnvironRect( rHoriEnvironLayFrame.Frame() ); SwRect aVertEnvironRect; if ( _bFollowTextFlow ) { - aVertEnvironRect = rVertEnvironLayFrm.Prt(); - aVertEnvironRect.Pos() += rVertEnvironLayFrm.Frm().Pos(); + aVertEnvironRect = rVertEnvironLayFrame.Prt(); + aVertEnvironRect.Pos() += rVertEnvironLayFrame.Frame().Pos(); // #i18732# - adjust vertical 'virtual' anchor position // (<aPos.Y()> respectively <aPos.X()>), if object is vertical aligned // to page areas. @@ -897,9 +897,9 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, } else { - OSL_ENSURE( rVertEnvironLayFrm.IsPageFrm(), + OSL_ENSURE( rVertEnvironLayFrame.IsPageFrame(), "<SwFEShell::CalcBoundRect(..)> - not following text flow, but vertical environment *not* page!" ); - aVertEnvironRect = rVertEnvironLayFrm.Frm(); + aVertEnvironRect = rVertEnvironLayFrame.Frame(); // #i18732# - adjustment vertical 'virtual' anchor position // (<aPos.Y()> respectively <aPos.X()>), if object is vertical aligned // to page areas. @@ -910,7 +910,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, aPos.X() = aVertEnvironRect.Right(); if ( _eVertRelOrient == text::RelOrientation::PAGE_PRINT_AREA ) { - aPos.setX(aPos.getX() - rVertEnvironLayFrm.GetRightMargin()); + aPos.setX(aPos.getX() - rVertEnvironLayFrame.GetRightMargin()); } } else if ( bVertL2R ) @@ -918,7 +918,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, aPos.X() = aVertEnvironRect.Left(); if ( _eVertRelOrient == text::RelOrientation::PAGE_PRINT_AREA ) { - aPos.setX(aPos.getX() + rVertEnvironLayFrm.GetLeftMargin()); + aPos.setX(aPos.getX() + rVertEnvironLayFrame.GetLeftMargin()); } } else @@ -926,12 +926,12 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, aPos.Y() = aVertEnvironRect.Top(); if ( _eVertRelOrient == text::RelOrientation::PAGE_PRINT_AREA ) { - aPos.setY(aPos.getY() + rVertEnvironLayFrm.GetTopMargin()); + aPos.setY(aPos.getY() + rVertEnvironLayFrame.GetTopMargin()); // add height of page header - const SwFrm* pTmpFrm = rVertEnvironLayFrm.Lower(); - if ( pTmpFrm->IsHeaderFrm() ) + const SwFrame* pTmpFrame = rVertEnvironLayFrame.Lower(); + if ( pTmpFrame->IsHeaderFrame() ) { - aPos.setY(aPos.getY() + pTmpFrm->Frm().Height()); + aPos.setY(aPos.getY() + pTmpFrame->Frame().Height()); } } } @@ -941,11 +941,11 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, // #i22341# - adjust vertical 'virtual' anchor position // (<aPos.Y()> respectively <aPos.X()>), if object is anchored to // character and vertical aligned at character or top of line - // <pFrm>, which is the anchor frame or the proposed anchor frame, + // <pFrame>, which is the anchor frame or the proposed anchor frame, // doesn't have to be a text frame (e.g. edit a to-page anchored // fly frame). Thus, assure this. - const SwTextFrm* pTextFrm( dynamic_cast<const SwTextFrm*>(pFrm) ); - if ( pTextFrm && + const SwTextFrame* pTextFrame( dynamic_cast<const SwTextFrame*>(pFrame) ); + if ( pTextFrame && (_nAnchorId == FLY_AT_CHAR) && ( _eVertRelOrient == text::RelOrientation::CHAR || _eVertRelOrient == text::RelOrientation::TEXT_LINE ) ) @@ -956,13 +956,13 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, SwRect aChRect; if ( _pToCharContentPos ) { - pTextFrm->GetAutoPos( aChRect, *_pToCharContentPos ); + pTextFrame->GetAutoPos( aChRect, *_pToCharContentPos ); } else { // No content position provided. Thus, use a default one. - SwPosition aDefaultContentPos( *(pTextFrm->GetTextNode()) ); - pTextFrm->GetAutoPos( aChRect, aDefaultContentPos ); + SwPosition aDefaultContentPos( *(pTextFrame->GetTextNode()) ); + pTextFrame->GetAutoPos( aChRect, aDefaultContentPos ); } nTop = (aChRect.*fnRect->fnGetBottom)(); } @@ -970,13 +970,13 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, { if ( _pToCharContentPos ) { - pTextFrm->GetTopOfLine( nTop, *_pToCharContentPos ); + pTextFrame->GetTopOfLine( nTop, *_pToCharContentPos ); } else { // No content position provided. Thus, use a default one. - SwPosition aDefaultContentPos( *(pTextFrm->GetTextNode()) ); - pTextFrm->GetTopOfLine( nTop, aDefaultContentPos ); + SwPosition aDefaultContentPos( *(pTextFrame->GetTextNode()) ); + pTextFrame->GetTopOfLine( nTop, aDefaultContentPos ); } } if ( bVert || bVertL2R ) @@ -992,7 +992,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, // #i26945# - adjust horizontal 'virtual' anchor // position (<aPos.X()> respectively <aPos.Y()>), if object is // anchored to character and horizontal aligned at character. - if ( pTextFrm && + if ( pTextFrame && (_nAnchorId == FLY_AT_CHAR) && _eHoriRelOrient == text::RelOrientation::CHAR ) { @@ -1000,13 +1000,13 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, SwRect aChRect; if ( _pToCharContentPos ) { - pTextFrm->GetAutoPos( aChRect, *_pToCharContentPos ); + pTextFrame->GetAutoPos( aChRect, *_pToCharContentPos ); } else { // No content position provided. Thus, use a default one. - SwPosition aDefaultContentPos( *(pTextFrm->GetTextNode()) ); - pTextFrm->GetAutoPos( aChRect, aDefaultContentPos ); + SwPosition aDefaultContentPos( *(pTextFrame->GetTextNode()) ); + pTextFrame->GetAutoPos( aChRect, aDefaultContentPos ); } nLeft = (aChRect.*fnRect->fnGetLeft)(); if ( bVert || bVertL2R ) @@ -1035,17 +1035,17 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, } else { - if( _opRef && pFly && pFly->IsFlyInCntFrm() ) - *_opRef = static_cast<const SwFlyInCntFrm*>( pFly )->GetRefPoint(); + if( _opRef && pFly && pFly->IsFlyInContentFrame() ) + *_opRef = static_cast<const SwFlyInContentFrame*>( pFly )->GetRefPoint(); - _orRect = pUpper->Frm(); - if( !pUpper->IsBodyFrm() ) + _orRect = pUpper->Frame(); + if( !pUpper->IsBodyFrame() ) { _orRect += pUpper->Prt().Pos(); _orRect.SSize( pUpper->Prt().SSize() ); - if ( pUpper->IsCellFrm() )//MA_FLY_HEIGHT + if ( pUpper->IsCellFrame() )//MA_FLY_HEIGHT { - const SwFrm* pTab = pUpper->FindTabFrm(); + const SwFrame* pTab = pUpper->FindTabFrame(); long nBottom = (pTab->GetUpper()->*fnRect->fnGetPrtBottom)(); (_orRect.*fnRect->fnSetBottom)( nBottom ); } @@ -1059,8 +1059,8 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, } } - const SwTwips nBaseOfstForFly = ( pFrm->IsTextFrm() && pFly ) ? - static_cast<const SwTextFrm*>(pFrm)->GetBaseOfstForFly( !bWrapThrough ) : + const SwTwips nBaseOfstForFly = ( pFrame->IsTextFrame() && pFly ) ? + static_cast<const SwTextFrame*>(pFrame)->GetBaseOfstForFly( !bWrapThrough ) : 0; if( bVert || bVertL2R ) { @@ -1072,30 +1072,30 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, { case text::RelOrientation::FRAME_RIGHT: { - aPos.setY(aPos.getY() + pFrm->Prt().Height()); - aPos += (pFrm->Prt().*fnRect->fnGetPos)(); + aPos.setY(aPos.getY() + pFrame->Prt().Height()); + aPos += (pFrame->Prt().*fnRect->fnGetPos)(); break; } case text::RelOrientation::PRINT_AREA: { - aPos += (pFrm->Prt().*fnRect->fnGetPos)(); + aPos += (pFrame->Prt().*fnRect->fnGetPos)(); aPos.setY(aPos.getY() + nBaseOfstForFly); break; } case text::RelOrientation::PAGE_RIGHT: { - aPos.setY(pPage->Frm().Top() + pPage->Prt().Bottom()); + aPos.setY(pPage->Frame().Top() + pPage->Prt().Bottom()); break; } case text::RelOrientation::PAGE_PRINT_AREA: { - aPos.setY(pPage->Frm().Top() + pPage->Prt().Top()); + aPos.setY(pPage->Frame().Top() + pPage->Prt().Top()); break; } case text::RelOrientation::PAGE_LEFT: case text::RelOrientation::PAGE_FRAME: { - aPos.setY(pPage->Frm().Top()); + aPos.setY(pPage->Frame().Top()); break; } case text::RelOrientation::FRAME: @@ -1110,13 +1110,13 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, { switch ( _eHoriRelOrient ) { - case text::RelOrientation::FRAME_RIGHT: aPos.setX(aPos.getX() + pFrm->Prt().Left()); break; + case text::RelOrientation::FRAME_RIGHT: aPos.setX(aPos.getX() + pFrame->Prt().Left()); break; case text::RelOrientation::FRAME: - case text::RelOrientation::FRAME_LEFT: aPos.setX(aPos.getX() + pFrm->Frm().Width()); break; - case text::RelOrientation::PRINT_AREA: aPos.setX(aPos.getX() + pFrm->Prt().Right()); break; + case text::RelOrientation::FRAME_LEFT: aPos.setX(aPos.getX() + pFrame->Frame().Width()); break; + case text::RelOrientation::PRINT_AREA: aPos.setX(aPos.getX() + pFrame->Prt().Right()); break; case text::RelOrientation::PAGE_LEFT: - case text::RelOrientation::PAGE_FRAME: aPos.setX(pPage->Frm().Right()); break; - case text::RelOrientation::PAGE_PRINT_AREA: aPos.setX(pPage->Frm().Left() + case text::RelOrientation::PAGE_FRAME: aPos.setX(pPage->Frame().Right()); break; + case text::RelOrientation::PAGE_PRINT_AREA: aPos.setX(pPage->Frame().Left() + pPage->Prt().Left()); break; default: break; } @@ -1126,28 +1126,28 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, switch ( _eHoriRelOrient ) { case text::RelOrientation::FRAME_LEFT: - aPos.setX(pFrm->Frm().Left() + - pFrm->Prt().Left()); + aPos.setX(pFrame->Frame().Left() + + pFrame->Prt().Left()); break; case text::RelOrientation::PRINT_AREA: - aPos.setX(pFrm->Frm().Left() + pFrm->Prt().Left() + - pFrm->Prt().Width()); + aPos.setX(pFrame->Frame().Left() + pFrame->Prt().Left() + + pFrame->Prt().Width()); aPos.setX(aPos.getX() + nBaseOfstForFly); break; case text::RelOrientation::PAGE_LEFT: - aPos.setX(pPage->Frm().Left() + pPage->Prt().Left()); + aPos.setX(pPage->Frame().Left() + pPage->Prt().Left()); break; case text::RelOrientation::PAGE_PRINT_AREA: - aPos.setX(pPage->Frm().Left() + pPage->Prt().Left() + + aPos.setX(pPage->Frame().Left() + pPage->Prt().Left() + pPage->Prt().Width()); break; case text::RelOrientation::PAGE_RIGHT: case text::RelOrientation::PAGE_FRAME: - aPos.setX(pPage->Frm().Right()); + aPos.setX(pPage->Frame().Right()); break; case text::RelOrientation::FRAME: @@ -1161,22 +1161,22 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, switch ( _eHoriRelOrient ) { case text::RelOrientation::FRAME_RIGHT: - aPos.X() += pFrm->Prt().Width(); - aPos += pFrm->Prt().Pos(); + aPos.X() += pFrame->Prt().Width(); + aPos += pFrame->Prt().Pos(); break; case text::RelOrientation::PRINT_AREA: - aPos += pFrm->Prt().Pos(); + aPos += pFrame->Prt().Pos(); aPos.setX(aPos.getX() + nBaseOfstForFly); break; case text::RelOrientation::PAGE_RIGHT: - aPos.setX(pPage->Frm().Left() + pPage->Prt().Right()); + aPos.setX(pPage->Frame().Left() + pPage->Prt().Right()); break; case text::RelOrientation::PAGE_PRINT_AREA: - aPos.setX(pPage->Frm().Left() + pPage->Prt().Left()); + aPos.setX(pPage->Frame().Left() + pPage->Prt().Left()); break; case text::RelOrientation::PAGE_LEFT: case text::RelOrientation::PAGE_FRAME: - aPos.setX(pPage->Frm().Left()); + aPos.setX(pPage->Frame().Left()); break; case text::RelOrientation::FRAME: aPos.setX(aPos.getX() + nBaseOfstForFly); @@ -1204,7 +1204,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, Size SwFEShell::GetGraphicDefaultSize() const { Size aRet; - SwFlyFrm *pFly = GetSelectedFlyFrm(); + SwFlyFrame *pFly = GetSelectedFlyFrame(); if ( pFly ) { // #i32951# - due to issue #i28701# no format of a @@ -1213,17 +1213,17 @@ Size SwFEShell::GetGraphicDefaultSize() const // line) that the anchor frame isn't formatted and its printing area // size is (0,0). If this is the case the printing area of the upper // of the anchor frame is taken. - const SwFrm* pAnchorFrm = pFly->GetAnchorFrm(); - aRet = pAnchorFrm->Prt().SSize(); + const SwFrame* pAnchorFrame = pFly->GetAnchorFrame(); + aRet = pAnchorFrame->Prt().SSize(); if ( aRet.Width() == 0 && aRet.Height() == 0 && - pAnchorFrm->GetUpper() ) + pAnchorFrame->GetUpper() ) { - aRet = pAnchorFrm->GetUpper()->Prt().SSize(); + aRet = pAnchorFrame->GetUpper()->Prt().SSize(); } SwRect aBound; CalcBoundRect( aBound, pFly->GetFormat()->GetAnchor().GetAnchorId()); - if ( pFly->GetAnchorFrm()->IsVertical() ) + if ( pFly->GetAnchorFrame()->IsVertical() ) aRet.Width() = aBound.Width(); else aRet.Height() = aBound.Height(); @@ -1231,7 +1231,7 @@ Size SwFEShell::GetGraphicDefaultSize() const return aRet; } -bool SwFEShell::IsFrmVertical(const bool bEnvironment, bool& bRTL, bool& bVertL2R) const +bool SwFEShell::IsFrameVertical(const bool bEnvironment, bool& bRTL, bool& bVertL2R) const { bool bVert = false; bRTL = false; @@ -1246,25 +1246,25 @@ bool SwFEShell::IsFrmVertical(const bool bEnvironment, bool& bRTL, bool& bVertL2 SdrObject* pObj = rMrkList.GetMark( 0 )->GetMarkedSdrObj(); if ( !pObj ) { - OSL_FAIL( "<SwFEShell::IsFrmVertical(..)> - missing SdrObject instance in marked object list -> This is a serious situation" ); + OSL_FAIL( "<SwFEShell::IsFrameVertical(..)> - missing SdrObject instance in marked object list -> This is a serious situation" ); return bVert; } // #i26791# SwContact* pContact = static_cast<SwContact*>(GetUserCall( pObj )); if ( !pContact ) { - OSL_FAIL( "<SwFEShell::IsFrmVertical(..)> - missing SwContact instance at marked object -> This is a serious situation" ); + OSL_FAIL( "<SwFEShell::IsFrameVertical(..)> - missing SwContact instance at marked object -> This is a serious situation" ); return bVert; } - const SwFrm* pRef = pContact->GetAnchoredObj( pObj )->GetAnchorFrm(); + const SwFrame* pRef = pContact->GetAnchoredObj( pObj )->GetAnchorFrame(); if ( !pRef ) { - OSL_FAIL( "<SwFEShell::IsFrmVertical(..)> - missing anchor frame at marked object -> This is a serious situation" ); + OSL_FAIL( "<SwFEShell::IsFrameVertical(..)> - missing anchor frame at marked object -> This is a serious situation" ); return bVert; } if ( dynamic_cast<const SwVirtFlyDrawObj*>( pObj) != nullptr && !bEnvironment ) - pRef = static_cast<const SwVirtFlyDrawObj*>(pObj)->GetFlyFrm(); + pRef = static_cast<const SwVirtFlyDrawObj*>(pObj)->GetFlyFrame(); bVert = pRef->IsVertical(); bRTL = pRef->IsRightToLeft(); @@ -1288,7 +1288,7 @@ void SwFEShell::ToggleHeaderFooterEdit() ClearMark(); } - SwCrsrShell::ToggleHeaderFooterEdit(); + SwCursorShell::ToggleHeaderFooterEdit(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx index 098be6bf7132..40cf9bb9e488 100644 --- a/sw/source/core/frmedt/tblsel.cxx +++ b/sw/source/core/frmedt/tblsel.cxx @@ -88,80 +88,80 @@ struct _CmpLPt typedef o3tl::sorted_vector<_CmpLPt> _MergePos; -struct _Sort_CellFrm +struct _Sort_CellFrame { - const SwCellFrm* pFrm; + const SwCellFrame* pFrame; - explicit _Sort_CellFrm( const SwCellFrm& rCFrm ) - : pFrm( &rCFrm ) {} + explicit _Sort_CellFrame( const SwCellFrame& rCFrame ) + : pFrame( &rCFrame ) {} }; -static const SwLayoutFrm *lcl_FindCellFrm( const SwLayoutFrm *pLay ) +static const SwLayoutFrame *lcl_FindCellFrame( const SwLayoutFrame *pLay ) { - while ( pLay && !pLay->IsCellFrm() ) + while ( pLay && !pLay->IsCellFrame() ) pLay = pLay->GetUpper(); return pLay; } -static const SwLayoutFrm *lcl_FindNextCellFrm( const SwLayoutFrm *pLay ) +static const SwLayoutFrame *lcl_FindNextCellFrame( const SwLayoutFrame *pLay ) { // ensure we leave the cell (sections) - const SwLayoutFrm *pTmp = pLay; + const SwLayoutFrame *pTmp = pLay; do { pTmp = pTmp->GetNextLayoutLeaf(); } while( pLay->IsAnLower( pTmp ) ); - while( pTmp && !pTmp->IsCellFrm() ) + while( pTmp && !pTmp->IsCellFrame() ) pTmp = pTmp->GetUpper(); return pTmp; } -void GetTableSelCrs( const SwCrsrShell &rShell, SwSelBoxes& rBoxes ) +void GetTableSelCrs( const SwCursorShell &rShell, SwSelBoxes& rBoxes ) { rBoxes.clear(); - if( rShell.IsTableMode() && const_cast<SwCrsrShell&>(rShell).UpdateTableSelBoxes()) + if( rShell.IsTableMode() && const_cast<SwCursorShell&>(rShell).UpdateTableSelBoxes()) { - rBoxes.insert(rShell.GetTableCrsr()->GetSelectedBoxes()); + rBoxes.insert(rShell.GetTableCursor()->GetSelectedBoxes()); } } -void GetTableSelCrs( const SwTableCursor& rTableCrsr, SwSelBoxes& rBoxes ) +void GetTableSelCrs( const SwTableCursor& rTableCursor, SwSelBoxes& rBoxes ) { rBoxes.clear(); - if (rTableCrsr.IsChgd() || !rTableCrsr.GetSelectedBoxesCount()) + if (rTableCursor.IsChgd() || !rTableCursor.GetSelectedBoxesCount()) { - SwTableCursor* pTCrsr = const_cast<SwTableCursor*>(&rTableCrsr); - pTCrsr->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout()->MakeTableCrsrs( *pTCrsr ); + SwTableCursor* pTCursor = const_cast<SwTableCursor*>(&rTableCursor); + pTCursor->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout()->MakeTableCursors( *pTCursor ); } - if (rTableCrsr.GetSelectedBoxesCount()) + if (rTableCursor.GetSelectedBoxesCount()) { - rBoxes.insert(rTableCrsr.GetSelectedBoxes()); + rBoxes.insert(rTableCursor.GetSelectedBoxes()); } } -void GetTableSel( const SwCrsrShell& rShell, SwSelBoxes& rBoxes, +void GetTableSel( const SwCursorShell& rShell, SwSelBoxes& rBoxes, const SwTableSearchType eSearchType ) { // get start and end cell if ( !rShell.IsTableMode() ) - rShell.GetCrsr(); + rShell.GetCursor(); - GetTableSel( *rShell.getShellCrsr(false), rBoxes, eSearchType ); + GetTableSel( *rShell.getShellCursor(false), rBoxes, eSearchType ); } -void GetTableSel( const SwCursor& rCrsr, SwSelBoxes& rBoxes, +void GetTableSel( const SwCursor& rCursor, SwSelBoxes& rBoxes, const SwTableSearchType eSearchType ) { // get start and end cell - OSL_ENSURE( rCrsr.GetContentNode() && rCrsr.GetContentNode( false ), + OSL_ENSURE( rCursor.GetContentNode() && rCursor.GetContentNode( false ), "Tabselection not on Cnt." ); // Row-selection: // Check for complex tables. If Yes, search selected boxes via // the layout. Otherwise via the table structure (for macros !!) - const SwContentNode* pContentNd = rCrsr.GetNode().GetContentNode(); + const SwContentNode* pContentNd = rCursor.GetNode().GetContentNode(); const SwTableNode* pTableNd = pContentNd ? pContentNd->FindTableNode() : nullptr; if( pTableNd && pTableNd->GetTable().IsNewModel() ) { @@ -173,7 +173,7 @@ void GetTableSel( const SwCursor& rCrsr, SwSelBoxes& rBoxes, default: eSearch = SwTable::SEARCH_NONE; break; } const bool bChkP = 0 != ( nsSwTableSearchType::TBLSEARCH_PROTECT & eSearchType ); - pTableNd->GetTable().CreateSelection( rCrsr, rBoxes, eSearch, bChkP ); + pTableNd->GetTable().CreateSelection( rCursor, rBoxes, eSearch, bChkP ); return; } if( nsSwTableSearchType::TBLSEARCH_ROW == ((~nsSwTableSearchType::TBLSEARCH_PROTECT ) & eSearchType ) && @@ -182,7 +182,7 @@ void GetTableSel( const SwCursor& rCrsr, SwSelBoxes& rBoxes, const SwTable& rTable = pTableNd->GetTable(); const SwTableLines& rLines = rTable.GetTabLines(); - const SwNode& rMarkNode = rCrsr.GetNode( false ); + const SwNode& rMarkNode = rCursor.GetNode( false ); const sal_uLong nMarkSectionStart = rMarkNode.StartOfSectionIndex(); const SwTableBox* pMarkBox = rTable.GetTableBox( nMarkSectionStart ); @@ -191,7 +191,7 @@ void GetTableSel( const SwCursor& rCrsr, SwSelBoxes& rBoxes, const SwTableLine* pLine = pMarkBox ? pMarkBox->GetUpper() : nullptr; sal_uInt16 nSttPos = rLines.GetPos( pLine ); OSL_ENSURE( USHRT_MAX != nSttPos, "Where is my row in the table?" ); - pLine = rTable.GetTableBox( rCrsr.GetNode().StartOfSectionIndex() )->GetUpper(); + pLine = rTable.GetTableBox( rCursor.GetNode().StartOfSectionIndex() )->GetUpper(); sal_uInt16 nEndPos = rLines.GetPos( pLine ); OSL_ENSURE( USHRT_MAX != nEndPos, "Where is my row in the table?" ); // pb: #i20193# if tableintable then nSttPos == nEndPos == USHRT_MAX @@ -220,28 +220,28 @@ void GetTableSel( const SwCursor& rCrsr, SwSelBoxes& rBoxes, else { Point aPtPos, aMkPos; - const SwShellCrsr* pShCrsr = dynamic_cast<const SwShellCrsr*>(&rCrsr); - if( pShCrsr ) + const SwShellCursor* pShCursor = dynamic_cast<const SwShellCursor*>(&rCursor); + if( pShCursor ) { - aPtPos = pShCrsr->GetPtPos(); - aMkPos = pShCrsr->GetMkPos(); + aPtPos = pShCursor->GetPtPos(); + aMkPos = pShCursor->GetMkPos(); } - const SwContentNode *pCntNd = rCrsr.GetContentNode(); - const SwLayoutFrm *pStart = pCntNd ? - pCntNd->getLayoutFrm( pCntNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPtPos )->GetUpper() : nullptr; - pCntNd = rCrsr.GetContentNode(false); - const SwLayoutFrm *pEnd = pCntNd ? - pCntNd->getLayoutFrm( pCntNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aMkPos )->GetUpper() : nullptr; + const SwContentNode *pCntNd = rCursor.GetContentNode(); + const SwLayoutFrame *pStart = pCntNd ? + pCntNd->getLayoutFrame( pCntNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPtPos )->GetUpper() : nullptr; + pCntNd = rCursor.GetContentNode(false); + const SwLayoutFrame *pEnd = pCntNd ? + pCntNd->getLayoutFrame( pCntNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aMkPos )->GetUpper() : nullptr; if( pStart && pEnd ) GetTableSel( pStart, pEnd, rBoxes, nullptr, eSearchType ); } } -void GetTableSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd, - SwSelBoxes& rBoxes, SwCellFrms* pCells, +void GetTableSel( const SwLayoutFrame* pStart, const SwLayoutFrame* pEnd, + SwSelBoxes& rBoxes, SwCellFrames* pCells, const SwTableSearchType eSearchType ) { - const SwTabFrm* pStartTab = pStart->FindTabFrm(); + const SwTabFrame* pStartTab = pStart->FindTabFrame(); if ( !pStartTab ) { OSL_FAIL( "GetTableSel without start table" ); @@ -264,16 +264,16 @@ void GetTableSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd, Point aCurrentTopRight( 0, LONG_MAX ); Point aCurrentBottomLeft( LONG_MAX, 0 ); Point aCurrentBottomRight( 0, 0 ); - const SwCellFrm* pCurrentTopLeftFrm = nullptr; - const SwCellFrm* pCurrentTopRightFrm = nullptr; - const SwCellFrm* pCurrentBottomLeftFrm = nullptr; - const SwCellFrm* pCurrentBottomRightFrm = nullptr; + const SwCellFrame* pCurrentTopLeftFrame = nullptr; + const SwCellFrame* pCurrentTopRightFrame = nullptr; + const SwCellFrame* pCurrentBottomLeftFrame = nullptr; + const SwCellFrame* pCurrentBottomRightFrame = nullptr; // Now find boxes for each entry and emit for (size_t i = 0; i < aUnions.size() && bTableIsValid; ++i) { SwSelUnion *pUnion = &aUnions[i]; - const SwTabFrm *pTable = pUnion->GetTable(); + const SwTabFrame *pTable = pUnion->GetTable(); if( !pTable->IsValid() && nLoopMax ) { bTableIsValid = false; @@ -281,9 +281,9 @@ void GetTableSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd, } // Skip any repeated headlines in the follow: - const SwLayoutFrm* pRow = pTable->IsFollow() ? + const SwLayoutFrame* pRow = pTable->IsFollow() ? pTable->GetFirstNonHeadlineRow() : - static_cast<const SwLayoutFrm*>(pTable->Lower()); + static_cast<const SwLayoutFrame*>(pTable->Lower()); while( pRow && bTableIsValid ) { @@ -293,9 +293,9 @@ void GetTableSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd, break; } - if ( pRow->Frm().IsOver( pUnion->GetUnion() ) ) + if ( pRow->Frame().IsOver( pUnion->GetUnion() ) ) { - const SwLayoutFrm *pCell = pRow->FirstCell(); + const SwLayoutFrame *pCell = pRow->FirstCell(); while( bTableIsValid && pCell && pRow->IsAnLower( pCell ) ) { @@ -305,11 +305,11 @@ void GetTableSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd, break; } - OSL_ENSURE( pCell->IsCellFrm(), "Frame ohne Celle" ); - if( ::IsFrmInTableSel( pUnion->GetUnion(), pCell ) ) + OSL_ENSURE( pCell->IsCellFrame(), "Frame ohne Celle" ); + if( ::IsFrameInTableSel( pUnion->GetUnion(), pCell ) ) { SwTableBox* pBox = const_cast<SwTableBox*>( - static_cast<const SwCellFrm*>(pCell)->GetTabBox()); + static_cast<const SwCellFrame*>(pCell)->GetTabBox()); // check for cell protection?? if( !bChkProtected || !pBox->GetFrameFormat()->GetProtect().IsContentProtected() ) @@ -317,17 +317,17 @@ void GetTableSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd, if ( pCells ) { - const Point aTopLeft( pCell->Frm().TopLeft() ); - const Point aTopRight( pCell->Frm().TopRight() ); - const Point aBottomLeft( pCell->Frm().BottomLeft() ); - const Point aBottomRight( pCell->Frm().BottomRight() ); + const Point aTopLeft( pCell->Frame().TopLeft() ); + const Point aTopRight( pCell->Frame().TopRight() ); + const Point aBottomLeft( pCell->Frame().BottomLeft() ); + const Point aBottomRight( pCell->Frame().BottomRight() ); if ( aTopLeft.getY() < aCurrentTopLeft.getY() || ( aTopLeft.getY() == aCurrentTopLeft.getY() && aTopLeft.getX() < aCurrentTopLeft.getX() ) ) { aCurrentTopLeft = aTopLeft; - pCurrentTopLeftFrm = static_cast<const SwCellFrm*>( pCell ); + pCurrentTopLeftFrame = static_cast<const SwCellFrame*>( pCell ); } if ( aTopRight.getY() < aCurrentTopRight.getY() || @@ -335,7 +335,7 @@ void GetTableSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd, aTopRight.getX() > aCurrentTopRight.getX() ) ) { aCurrentTopRight = aTopRight; - pCurrentTopRightFrm = static_cast<const SwCellFrm*>( pCell ); + pCurrentTopRightFrame = static_cast<const SwCellFrame*>( pCell ); } if ( aBottomLeft.getY() > aCurrentBottomLeft.getY() || @@ -343,7 +343,7 @@ void GetTableSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd, aBottomLeft.getX() < aCurrentBottomLeft.getX() ) ) { aCurrentBottomLeft = aBottomLeft; - pCurrentBottomLeftFrm = static_cast<const SwCellFrm*>( pCell ); + pCurrentBottomLeftFrame = static_cast<const SwCellFrame*>( pCell ); } if ( aBottomRight.getY() > aCurrentBottomRight.getY() || @@ -351,32 +351,32 @@ void GetTableSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd, aBottomRight.getX() > aCurrentBottomRight.getX() ) ) { aCurrentBottomRight = aBottomRight; - pCurrentBottomRightFrm = static_cast<const SwCellFrm*>( pCell ); + pCurrentBottomRightFrame = static_cast<const SwCellFrame*>( pCell ); } } } if ( pCell->GetNext() ) { - pCell = static_cast<const SwLayoutFrm*>(pCell->GetNext()); - if ( pCell->Lower() && pCell->Lower()->IsRowFrm() ) + pCell = static_cast<const SwLayoutFrame*>(pCell->GetNext()); + if ( pCell->Lower() && pCell->Lower()->IsRowFrame() ) pCell = pCell->FirstCell(); } else - pCell = ::lcl_FindNextCellFrm( pCell ); + pCell = ::lcl_FindNextCellFrame( pCell ); } } - pRow = static_cast<const SwLayoutFrm*>(pRow->GetNext()); + pRow = static_cast<const SwLayoutFrame*>(pRow->GetNext()); } } if ( pCells ) { pCells->clear(); - pCells->push_back( const_cast< SwCellFrm* >(pCurrentTopLeftFrm) ); - pCells->push_back( const_cast< SwCellFrm* >(pCurrentTopRightFrm) ); - pCells->push_back( const_cast< SwCellFrm* >(pCurrentBottomLeftFrm) ); - pCells->push_back( const_cast< SwCellFrm* >(pCurrentBottomRightFrm) ); + pCells->push_back( const_cast< SwCellFrame* >(pCurrentTopLeftFrame) ); + pCells->push_back( const_cast< SwCellFrame* >(pCurrentTopRightFrame) ); + pCells->push_back( const_cast< SwCellFrame* >(pCurrentBottomLeftFrame) ); + pCells->push_back( const_cast< SwCellFrame* >(pCurrentBottomRightFrame) ); } if( bTableIsValid ) @@ -385,13 +385,13 @@ void GetTableSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd, SwDeletionChecker aDelCheck( pStart ); // otherwise quickly "calculate" the table layout and start over - SwTabFrm *pTable = aUnions.front().GetTable(); + SwTabFrame *pTable = aUnions.front().GetTable(); while( pTable ) { if( pTable->IsValid() ) pTable->InvalidatePos(); pTable->SetONECalcLowers(); - pTable->Calc(pTable->getRootFrm()->GetCurrShell()->GetOut()); + pTable->Calc(pTable->getRootFrame()->GetCurrShell()->GetOut()); pTable->SetCompletePaint(); if( nullptr == (pTable = pTable->GetFollow()) ) break; @@ -430,10 +430,10 @@ bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd ) // #i22135# - Also the content of the table could be // invisible - e.g. in a hidden section // Robust: check, if content was found (e.g. empty table cells) - if ( !pCNd || pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ) == nullptr ) + if ( !pCNd || pCNd->getLayoutFrame( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ) == nullptr ) return false; - const SwLayoutFrm *pStart = pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aNullPos )->GetUpper(); + const SwLayoutFrame *pStart = pCNd->getLayoutFrame( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aNullPos )->GetUpper(); OSL_ENSURE( pStart, "without frame nothing works" ); aIdx = rEndNd; @@ -442,12 +442,12 @@ bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd ) pCNd = aIdx.GetNodes().GoNextSection( &aIdx, false, false ); // #i22135# - Robust: check, if content was found and if it's visible - if ( !pCNd || pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ) == nullptr ) + if ( !pCNd || pCNd->getLayoutFrame( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ) == nullptr ) { return false; } - const SwLayoutFrm *pEnd = pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aNullPos )->GetUpper(); + const SwLayoutFrame *pEnd = pCNd->getLayoutFrame( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aNullPos )->GetUpper(); OSL_ENSURE( pEnd, "without frame nothing works" ); bool bValidChartSel; @@ -472,7 +472,7 @@ bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd ) break; SwSelUnion *pUnion = &rSelUnion; - const SwTabFrm *pTable = pUnion->GetTable(); + const SwTabFrame *pTable = pUnion->GetTable(); SWRECTFN( pTable ) bool bRTL = pTable->IsRightToLeft(); @@ -483,12 +483,12 @@ bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd ) break; } - std::deque< _Sort_CellFrm > aCellFrms; + std::deque< _Sort_CellFrame > aCellFrames; // Skip any repeated headlines in the follow: - const SwLayoutFrm* pRow = pTable->IsFollow() ? + const SwLayoutFrame* pRow = pTable->IsFollow() ? pTable->GetFirstNonHeadlineRow() : - static_cast<const SwLayoutFrm*>(pTable->Lower()); + static_cast<const SwLayoutFrame*>(pTable->Lower()); while( pRow && bTableIsValid && bValidChartSel ) { @@ -498,9 +498,9 @@ bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd ) break; } - if( pRow->Frm().IsOver( pUnion->GetUnion() ) ) + if( pRow->Frame().IsOver( pUnion->GetUnion() ) ) { - const SwLayoutFrm *pCell = pRow->FirstCell(); + const SwLayoutFrame *pCell = pRow->FirstCell(); while( bValidChartSel && bTableIsValid && pCell && pRow->IsAnLower( pCell ) ) @@ -511,40 +511,40 @@ bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd ) break; } - OSL_ENSURE( pCell->IsCellFrm(), "Frame ohne Celle" ); + OSL_ENSURE( pCell->IsCellFrame(), "Frame ohne Celle" ); const SwRect& rUnion = pUnion->GetUnion(), - & rFrmRect = pCell->Frm(); + & rFrameRect = pCell->Frame(); const long nUnionRight = rUnion.Right(); const long nUnionBottom = rUnion.Bottom(); - const long nFrmRight = rFrmRect.Right(); - const long nFrmBottom = rFrmRect.Bottom(); + const long nFrameRight = rFrameRect.Right(); + const long nFrameBottom = rFrameRect.Bottom(); - // ignore if FrmRect is outside the union + // ignore if FrameRect is outside the union const long nXFuzzy = bVert ? 0 : 20; const long nYFuzzy = bVert ? 20 : 0; - if( !( rUnion.Top() + nYFuzzy > nFrmBottom || - nUnionBottom < rFrmRect.Top() + nYFuzzy || - rUnion.Left() + nXFuzzy > nFrmRight || - nUnionRight < rFrmRect.Left() + nXFuzzy )) + if( !( rUnion.Top() + nYFuzzy > nFrameBottom || + nUnionBottom < rFrameRect.Top() + nYFuzzy || + rUnion.Left() + nXFuzzy > nFrameRight || + nUnionRight < rFrameRect.Left() + nXFuzzy )) { - // ok, rUnion is _not_ completely outside of rFrmRect + // ok, rUnion is _not_ completely outside of rFrameRect // if not completely inside the union, then // for Chart it is an invalid selection - if( rUnion.Left() <= rFrmRect.Left() + nXFuzzy && - rFrmRect.Left() <= nUnionRight && - rUnion.Left() <= nFrmRight && - nFrmRight <= nUnionRight + nXFuzzy && - rUnion.Top() <= rFrmRect.Top() + nYFuzzy && - rFrmRect.Top() <= nUnionBottom && - rUnion.Top() <= nFrmBottom && - nFrmBottom <= nUnionBottom+ nYFuzzy ) - - aCellFrms.push_back( - _Sort_CellFrm( *static_cast<const SwCellFrm*>(pCell)) ); + if( rUnion.Left() <= rFrameRect.Left() + nXFuzzy && + rFrameRect.Left() <= nUnionRight && + rUnion.Left() <= nFrameRight && + nFrameRight <= nUnionRight + nXFuzzy && + rUnion.Top() <= rFrameRect.Top() + nYFuzzy && + rFrameRect.Top() <= nUnionBottom && + rUnion.Top() <= nFrameBottom && + nFrameBottom <= nUnionBottom+ nYFuzzy ) + + aCellFrames.push_back( + _Sort_CellFrame( *static_cast<const SwCellFrame*>(pCell)) ); else { bValidChartSel = false; @@ -553,15 +553,15 @@ bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd ) } if ( pCell->GetNext() ) { - pCell = static_cast<const SwLayoutFrm*>(pCell->GetNext()); - if ( pCell->Lower() && pCell->Lower()->IsRowFrm() ) + pCell = static_cast<const SwLayoutFrame*>(pCell->GetNext()); + if ( pCell->Lower() && pCell->Lower()->IsRowFrame() ) pCell = pCell->FirstCell(); } else - pCell = ::lcl_FindNextCellFrm( pCell ); + pCell = ::lcl_FindNextCellFrame( pCell ); } } - pRow = static_cast<const SwLayoutFrm*>(pRow->GetNext()); + pRow = static_cast<const SwLayoutFrame*>(pRow->GetNext()); } if( !bValidChartSel ) @@ -575,10 +575,10 @@ bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd ) long nXPos = 0; long nHeight = 0; - for( n = 0 ; n < aCellFrms.size(); ++n ) + for( n = 0 ; n < aCellFrames.size(); ++n ) { - const _Sort_CellFrm& rCF = aCellFrms[ n ]; - if( (rCF.pFrm->Frm().*fnRect->fnGetTop)() != nYPos ) + const _Sort_CellFrame& rCF = aCellFrames[ n ]; + if( (rCF.pFrame->Frame().*fnRect->fnGetTop)() != nYPos ) { // new row if( n ) @@ -592,20 +592,20 @@ bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd ) } } nCellCnt = 1; - nYPos = (rCF.pFrm->Frm().*fnRect->fnGetTop)(); - nHeight = (rCF.pFrm->Frm().*fnRect->fnGetHeight)(); + nYPos = (rCF.pFrame->Frame().*fnRect->fnGetTop)(); + nHeight = (rCF.pFrame->Frame().*fnRect->fnGetHeight)(); nXPos = bRTL ? - (rCF.pFrm->Frm().*fnRect->fnGetLeft)() : - (rCF.pFrm->Frm().*fnRect->fnGetRight)(); + (rCF.pFrame->Frame().*fnRect->fnGetLeft)() : + (rCF.pFrame->Frame().*fnRect->fnGetRight)(); } else if( nXPos == ( bRTL ? - (rCF.pFrm->Frm().*fnRect->fnGetRight)() : - (rCF.pFrm->Frm().*fnRect->fnGetLeft)() ) && - nHeight == (rCF.pFrm->Frm().*fnRect->fnGetHeight)() ) + (rCF.pFrame->Frame().*fnRect->fnGetRight)() : + (rCF.pFrame->Frame().*fnRect->fnGetLeft)() ) && + nHeight == (rCF.pFrame->Frame().*fnRect->fnGetHeight)() ) { nXPos += ( bRTL ? (-1) : 1 ) * - (rCF.pFrm->Frm().*fnRect->fnGetWidth)(); + (rCF.pFrame->Frame().*fnRect->fnGetWidth)(); ++nCellCnt; } else @@ -627,13 +627,13 @@ bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd ) break; // otherwise quickly "calculate" table layout and start over - SwTabFrm *pTable = aUnions.front().GetTable(); + SwTabFrame *pTable = aUnions.front().GetTable(); for( i = 0; i < aUnions.size(); ++i ) { if( pTable->IsValid() ) pTable->InvalidatePos(); pTable->SetONECalcLowers(); - pTable->Calc(pTable->getRootFrm()->GetCurrShell()->GetOut()); + pTable->Calc(pTable->getRootFrame()->GetCurrShell()->GetOut()); pTable->SetCompletePaint(); if( nullptr == (pTable = pTable->GetFollow()) ) break; @@ -646,42 +646,42 @@ bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd ) return bValidChartSel; } -bool IsFrmInTableSel( const SwRect& rUnion, const SwFrm* pCell ) +bool IsFrameInTableSel( const SwRect& rUnion, const SwFrame* pCell ) { - OSL_ENSURE( pCell->IsCellFrm(), "Frame without Gazelle" ); + OSL_ENSURE( pCell->IsCellFrame(), "Frame without Gazelle" ); - if( pCell->FindTabFrm()->IsVertical() ) - return rUnion.Right() >= pCell->Frm().Right() && - rUnion.Left() <= pCell->Frm().Left() && - (( rUnion.Top() <= pCell->Frm().Top()+20 && - rUnion.Bottom() > pCell->Frm().Top() ) || - ( rUnion.Top() >= pCell->Frm().Top() && - rUnion.Bottom() < pCell->Frm().Bottom() )); + if( pCell->FindTabFrame()->IsVertical() ) + return rUnion.Right() >= pCell->Frame().Right() && + rUnion.Left() <= pCell->Frame().Left() && + (( rUnion.Top() <= pCell->Frame().Top()+20 && + rUnion.Bottom() > pCell->Frame().Top() ) || + ( rUnion.Top() >= pCell->Frame().Top() && + rUnion.Bottom() < pCell->Frame().Bottom() )); return - rUnion.Top() <= pCell->Frm().Top() && - rUnion.Bottom() >= pCell->Frm().Bottom() && + rUnion.Top() <= pCell->Frame().Top() && + rUnion.Bottom() >= pCell->Frame().Bottom() && - (( rUnion.Left() <= pCell->Frm().Left()+20 && - rUnion.Right() > pCell->Frm().Left() ) || + (( rUnion.Left() <= pCell->Frame().Left()+20 && + rUnion.Right() > pCell->Frame().Left() ) || - ( rUnion.Left() >= pCell->Frm().Left() && - rUnion.Right() < pCell->Frm().Right() )); + ( rUnion.Left() >= pCell->Frame().Left() && + rUnion.Right() < pCell->Frame().Right() )); } -bool GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes ) +bool GetAutoSumSel( const SwCursorShell& rShell, SwCellFrames& rBoxes ) { - SwShellCrsr* pCrsr = rShell.m_pCurCrsr; + SwShellCursor* pCursor = rShell.m_pCurrentCursor; if ( rShell.IsTableMode() ) - pCrsr = rShell.m_pTableCrsr; + pCursor = rShell.m_pTableCursor; - const SwLayoutFrm *pStart = pCrsr->GetContentNode()->getLayoutFrm( rShell.GetLayout(), - &pCrsr->GetPtPos() )->GetUpper(), - *pEnd = pCrsr->GetContentNode(false)->getLayoutFrm( rShell.GetLayout(), - &pCrsr->GetMkPos() )->GetUpper(); + const SwLayoutFrame *pStart = pCursor->GetContentNode()->getLayoutFrame( rShell.GetLayout(), + &pCursor->GetPtPos() )->GetUpper(), + *pEnd = pCursor->GetContentNode(false)->getLayoutFrame( rShell.GetLayout(), + &pCursor->GetMkPos() )->GetUpper(); - const SwLayoutFrm* pSttCell = pStart; - while( pSttCell && !pSttCell->IsCellFrm() ) + const SwLayoutFrame* pSttCell = pStart; + while( pSttCell && !pSttCell->IsCellFrame() ) pSttCell = pSttCell->GetUpper(); // First, compute tables and rectangles @@ -697,19 +697,19 @@ bool GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes ) for( i = 0; i < aUnions.size(); ++i ) { SwSelUnion *pUnion = &aUnions[i]; - const SwTabFrm *pTable = pUnion->GetTable(); + const SwTabFrame *pTable = pUnion->GetTable(); // Skip any repeated headlines in the follow: - const SwLayoutFrm* pRow = pTable->IsFollow() ? + const SwLayoutFrame* pRow = pTable->IsFollow() ? pTable->GetFirstNonHeadlineRow() : - static_cast<const SwLayoutFrm*>(pTable->Lower()); + static_cast<const SwLayoutFrame*>(pTable->Lower()); while( pRow ) { - if( pRow->Frm().IsOver( pUnion->GetUnion() ) ) + if( pRow->Frame().IsOver( pUnion->GetUnion() ) ) { - const SwCellFrm* pUpperCell = nullptr; - const SwLayoutFrm *pCell = pRow->FirstCell(); + const SwCellFrame* pUpperCell = nullptr; + const SwLayoutFrame *pCell = pRow->FirstCell(); while( pCell && pRow->IsAnLower( pCell ) ) { @@ -728,29 +728,29 @@ bool GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes ) break; } - OSL_ENSURE( pCell->IsCellFrm(), "Frame without cell" ); - if( ::IsFrmInTableSel( pUnion->GetUnion(), pCell ) ) - pUpperCell = static_cast<const SwCellFrm*>(pCell); + OSL_ENSURE( pCell->IsCellFrame(), "Frame without cell" ); + if( ::IsFrameInTableSel( pUnion->GetUnion(), pCell ) ) + pUpperCell = static_cast<const SwCellFrame*>(pCell); if( pCell->GetNext() ) { - pCell = static_cast<const SwLayoutFrm*>(pCell->GetNext()); - if ( pCell->Lower() && pCell->Lower()->IsRowFrm() ) + pCell = static_cast<const SwLayoutFrame*>(pCell->GetNext()); + if ( pCell->Lower() && pCell->Lower()->IsRowFrame() ) pCell = pCell->FirstCell(); } else - pCell = ::lcl_FindNextCellFrm( pCell ); + pCell = ::lcl_FindNextCellFrame( pCell ); } if( pUpperCell ) - rBoxes.push_back( const_cast< SwCellFrm* >(pUpperCell) ); + rBoxes.push_back( const_cast< SwCellFrame* >(pUpperCell) ); } if( bFound ) { i = aUnions.size(); break; } - pRow = static_cast<const SwLayoutFrm*>(pRow->GetNext()); + pRow = static_cast<const SwLayoutFrame*>(pRow->GetNext()); } } @@ -766,18 +766,18 @@ bool GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes ) for( i = 0; i < aUnions.size(); ++i ) { SwSelUnion *pUnion = &aUnions[i]; - const SwTabFrm *pTable = pUnion->GetTable(); + const SwTabFrame *pTable = pUnion->GetTable(); // Skip any repeated headlines in the follow: - const SwLayoutFrm* pRow = pTable->IsFollow() ? + const SwLayoutFrame* pRow = pTable->IsFollow() ? pTable->GetFirstNonHeadlineRow() : - static_cast<const SwLayoutFrm*>(pTable->Lower()); + static_cast<const SwLayoutFrame*>(pTable->Lower()); while( pRow ) { - if( pRow->Frm().IsOver( pUnion->GetUnion() ) ) + if( pRow->Frame().IsOver( pUnion->GetUnion() ) ) { - const SwLayoutFrm *pCell = pRow->FirstCell(); + const SwLayoutFrame *pCell = pRow->FirstCell(); while( pCell && pRow->IsAnLower( pCell ) ) { @@ -796,20 +796,20 @@ bool GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes ) break; } - OSL_ENSURE( pCell->IsCellFrm(), "Frame without cell" ); - if( ::IsFrmInTableSel( pUnion->GetUnion(), pCell ) ) + OSL_ENSURE( pCell->IsCellFrame(), "Frame without cell" ); + if( ::IsFrameInTableSel( pUnion->GetUnion(), pCell ) ) { - SwCellFrm* pC = const_cast<SwCellFrm*>(static_cast<const SwCellFrm*>(pCell)); + SwCellFrame* pC = const_cast<SwCellFrame*>(static_cast<const SwCellFrame*>(pCell)); rBoxes.push_back( pC ); } if( pCell->GetNext() ) { - pCell = static_cast<const SwLayoutFrm*>(pCell->GetNext()); - if ( pCell->Lower() && pCell->Lower()->IsRowFrm() ) + pCell = static_cast<const SwLayoutFrame*>(pCell->GetNext()); + if ( pCell->Lower() && pCell->Lower()->IsRowFrame() ) pCell = pCell->FirstCell(); } else - pCell = ::lcl_FindNextCellFrm( pCell ); + pCell = ::lcl_FindNextCellFrame( pCell ); } } if( !bTstRow ) @@ -818,7 +818,7 @@ bool GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes ) break; } - pRow = static_cast<const SwLayoutFrm*>(pRow->GetNext()); + pRow = static_cast<const SwLayoutFrame*>(pRow->GetNext()); } } } @@ -913,10 +913,10 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, Point aPt( 0, 0 ); const SwContentNode* pCntNd = rPam.GetContentNode(); - const SwLayoutFrm *pStart = pCntNd->getLayoutFrm( pCntNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), + const SwLayoutFrame *pStart = pCntNd->getLayoutFrame( pCntNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt )->GetUpper(); pCntNd = rPam.GetContentNode(false); - const SwLayoutFrm *pEnd = pCntNd->getLayoutFrm( pCntNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), + const SwLayoutFrame *pEnd = pCntNd->getLayoutFrame( pCntNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt )->GetUpper(); // First, compute tables and rectangles @@ -938,45 +938,45 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, for ( auto & rSelUnion : aUnions ) { - const SwTabFrm *pTabFrm = rSelUnion.GetTable(); + const SwTabFrame *pTabFrame = rSelUnion.GetTable(); SwRect &rUnion = rSelUnion.GetUnion(); // Skip any repeated headlines in the follow: - const SwLayoutFrm* pRow = pTabFrm->IsFollow() ? - pTabFrm->GetFirstNonHeadlineRow() : - static_cast<const SwLayoutFrm*>(pTabFrm->Lower()); + const SwLayoutFrame* pRow = pTabFrame->IsFollow() ? + pTabFrame->GetFirstNonHeadlineRow() : + static_cast<const SwLayoutFrame*>(pTabFrame->Lower()); while ( pRow ) { - if ( pRow->Frm().IsOver( rUnion ) ) + if ( pRow->Frame().IsOver( rUnion ) ) { - const SwLayoutFrm *pCell = pRow->FirstCell(); + const SwLayoutFrame *pCell = pRow->FirstCell(); while ( pCell && pRow->IsAnLower( pCell ) ) { - OSL_ENSURE( pCell->IsCellFrm(), "Frame without cell" ); + OSL_ENSURE( pCell->IsCellFrame(), "Frame without cell" ); // overlap in full width? - if( rUnion.Top() <= pCell->Frm().Top() && - rUnion.Bottom() >= pCell->Frm().Bottom() ) + if( rUnion.Top() <= pCell->Frame().Top() && + rUnion.Bottom() >= pCell->Frame().Bottom() ) { - SwTableBox* pBox = const_cast<SwTableBox*>(static_cast<const SwCellFrm*>(pCell)->GetTabBox()); + SwTableBox* pBox = const_cast<SwTableBox*>(static_cast<const SwCellFrame*>(pCell)->GetTabBox()); // only overlap to the right? - if( ( rUnion.Left() - COLFUZZY ) <= pCell->Frm().Left() && - ( rUnion.Right() - COLFUZZY ) > pCell->Frm().Left() ) + if( ( rUnion.Left() - COLFUZZY ) <= pCell->Frame().Left() && + ( rUnion.Right() - COLFUZZY ) > pCell->Frame().Left() ) { - if( ( rUnion.Right() + COLFUZZY ) < pCell->Frm().Right() ) + if( ( rUnion.Right() + COLFUZZY ) < pCell->Frame().Right() ) { sal_uInt16 nInsPos = pBox->GetUpper()-> GetTabBoxes().GetPos( pBox )+1; lcl_InsTableBox( pTableNd, pDoc, pBox, nInsPos ); pBox->ClaimFrameFormat(); - SwFormatFrmSize aNew( - pBox->GetFrameFormat()->GetFrmSize() ); - nWidth = rUnion.Right() - pCell->Frm().Left(); + SwFormatFrameSize aNew( + pBox->GetFrameFormat()->GetFrameSize() ); + nWidth = rUnion.Right() - pCell->Frame().Left(); nWidth = nWidth * aNew.GetWidth() / - pCell->Frm().Width(); + pCell->Frame().Width(); long nTmpWidth = aNew.GetWidth() - nWidth; aNew.SetWidth( nWidth ); pBox->GetFrameFormat()->SetFormatAttr( aNew ); @@ -984,7 +984,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, pLastBox = pBox; rBoxes.insert( pBox ); aPosArr.insert( - _CmpLPt( (pCell->Frm().*fnRect->fnGetPos)(), + _CmpLPt( (pCell->Frame().*fnRect->fnGetPos)(), pBox, bVert ) ); pBox = pBox->GetUpper()->GetTabBoxes()[ nInsPos ]; @@ -1001,26 +1001,26 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, pLastBox = pBox; rBoxes.insert( pBox ); aPosArr.insert( - _CmpLPt( (pCell->Frm().*fnRect->fnGetPos)(), + _CmpLPt( (pCell->Frame().*fnRect->fnGetPos)(), pBox, bVert ) ); } } // overlapping on left- or right-side - else if( ( rUnion.Left() - COLFUZZY ) >= pCell->Frm().Left() && - ( rUnion.Right() + COLFUZZY ) < pCell->Frm().Right() ) + else if( ( rUnion.Left() - COLFUZZY ) >= pCell->Frame().Left() && + ( rUnion.Right() + COLFUZZY ) < pCell->Frame().Right() ) { sal_uInt16 nInsPos = pBox->GetUpper()->GetTabBoxes().GetPos( pBox )+1; lcl_InsTableBox( pTableNd, pDoc, pBox, nInsPos, 2 ); pBox->ClaimFrameFormat(); - SwFormatFrmSize aNew( - pBox->GetFrameFormat()->GetFrmSize() ); - long nLeft = rUnion.Left() - pCell->Frm().Left(); + SwFormatFrameSize aNew( + pBox->GetFrameFormat()->GetFrameSize() ); + long nLeft = rUnion.Left() - pCell->Frame().Left(); nLeft = nLeft * aNew.GetWidth() / - pCell->Frm().Width(); - long nRight = pCell->Frm().Right() - rUnion.Right(); + pCell->Frame().Width(); + long nRight = pCell->Frame().Right() - rUnion.Right(); nRight = nRight * aNew.GetWidth() / - pCell->Frm().Width(); + pCell->Frame().Width(); nWidth = aNew.GetWidth() - nLeft - nRight; aNew.SetWidth( nLeft ); @@ -1049,7 +1049,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, pLastBox = pBox; rBoxes.insert( pBox ); aPosArr.insert( - _CmpLPt( (pCell->Frm().*fnRect->fnGetPos)(), + _CmpLPt( (pCell->Frame().*fnRect->fnGetPos)(), pBox, bVert ) ); pBox = pBox->GetUpper()->GetTabBoxes()[ nInsPos+1 ]; @@ -1061,23 +1061,23 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, pUndo->AddNewBox( pBox->GetSttIdx() ); } // is right side of box part of the selected area? - else if( ( pCell->Frm().Right() - COLFUZZY ) < rUnion.Right() && - ( pCell->Frm().Right() - COLFUZZY ) > rUnion.Left() && - ( pCell->Frm().Left() + COLFUZZY ) < rUnion.Left() ) + else if( ( pCell->Frame().Right() - COLFUZZY ) < rUnion.Right() && + ( pCell->Frame().Right() - COLFUZZY ) > rUnion.Left() && + ( pCell->Frame().Left() + COLFUZZY ) < rUnion.Left() ) { // then we should insert a new box and adjust the widths sal_uInt16 nInsPos = pBox->GetUpper()->GetTabBoxes().GetPos( pBox )+1; lcl_InsTableBox( pTableNd, pDoc, pBox, nInsPos ); - SwFormatFrmSize aNew(pBox->GetFrameFormat()->GetFrmSize() ); - long nLeft = rUnion.Left() - pCell->Frm().Left(), - nRight = pCell->Frm().Right() - rUnion.Left(); + SwFormatFrameSize aNew(pBox->GetFrameFormat()->GetFrameSize() ); + long nLeft = rUnion.Left() - pCell->Frame().Left(), + nRight = pCell->Frame().Right() - rUnion.Left(); nLeft = nLeft * aNew.GetWidth() / - pCell->Frm().Width(); + pCell->Frame().Width(); nRight = nRight * aNew.GetWidth() / - pCell->Frm().Width(); + pCell->Frame().Width(); aNew.SetWidth( nLeft ); pBox->ClaimFrameFormat()->SetFormatAttr( aNew ); @@ -1091,7 +1091,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, pLastBox = pBox; rBoxes.insert( pBox ); aPosArr.insert( _CmpLPt( Point( rUnion.Left(), - pCell->Frm().Top()), pBox, bVert )); + pCell->Frame().Top()), pBox, bVert )); if( pUndo ) pUndo->AddNewBox( pBox->GetSttIdx() ); @@ -1099,16 +1099,16 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, } if ( pCell->GetNext() ) { - pCell = static_cast<const SwLayoutFrm*>(pCell->GetNext()); + pCell = static_cast<const SwLayoutFrame*>(pCell->GetNext()); // --> Check if table cell is not empty - if ( pCell->Lower() && pCell->Lower()->IsRowFrm() ) + if ( pCell->Lower() && pCell->Lower()->IsRowFrame() ) pCell = pCell->FirstCell(); } else - pCell = ::lcl_FindNextCellFrm( pCell ); + pCell = ::lcl_FindNextCellFrame( pCell ); } } - pRow = static_cast<const SwLayoutFrm*>(pRow->GetNext()); + pRow = static_cast<const SwLayoutFrame*>(pRow->GetNext()); } } @@ -1133,7 +1133,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, SwPaM aPam( pDoc->GetNodes() ); #if defined( DEL_ONLY_EMPTY_LINES ) - nWidth = pFirstBox->GetFrameFormat()->GetFrmSize().GetWidth(); + nWidth = pFirstBox->GetFrameFormat()->GetFrameSize().GetWidth(); bool bEmptyLine = sal_True; sal_uInt16 n, nSttPos = 0; @@ -1145,7 +1145,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, if( bEmptyLine && !IsEmptyBox( *rPt.pSelBox, aPam )) bEmptyLine = sal_False; if( bCalcWidth ) - nWidth += rPt.pSelBox->GetFrameFormat()->GetFrmSize().GetWidth(); + nWidth += rPt.pSelBox->GetFrameFormat()->GetFrameSize().GetWidth(); } else { @@ -1178,7 +1178,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, } #elif defined( DEL_EMPTY_BOXES_AT_START_AND_END ) - nWidth = pFirstBox->GetFrameFormat()->GetFrmSize().GetWidth(); + nWidth = pFirstBox->GetFrameFormat()->GetFrameSize().GetWidth(); sal_uInt16 n, nSttPos = 0, nSEndPos = 0, nESttPos = 0; for( n = 0; n < aPosArr.Count(); ++n ) @@ -1196,7 +1196,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, nESttPos = n+1; if( bCalcWidth ) - nWidth += rPt.pSelBox->GetFrameFormat()->GetFrmSize().GetWidth(); + nWidth += rPt.pSelBox->GetFrameFormat()->GetFrameSize().GetWidth(); } else { @@ -1280,7 +1280,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, if( bCalcWidth ) { if( nY == ( bVert ? rPt.X() : rPt.Y() ) ) // same Y level? - nWidth += rPt.pSelBox->GetFrameFormat()->GetFrmSize().GetWidth(); + nWidth += rPt.pSelBox->GetFrameFormat()->GetFrameSize().GetWidth(); else bCalcWidth = false; // one line ready } @@ -1383,7 +1383,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, } // set width of the box - (*ppMergeBox)->GetFrameFormat()->SetFormatAttr( SwFormatFrmSize( ATT_VAR_SIZE, nWidth, 0 )); + (*ppMergeBox)->GetFrameFormat()->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, nWidth, 0 )); if( pUndo ) pUndo->AddNewBox( (*ppMergeBox)->GetSttIdx() ); } @@ -1431,10 +1431,10 @@ sal_uInt16 CheckMergeSel( const SwPaM& rPam ) Point aPt; const SwContentNode* pCntNd = rPam.GetContentNode(); - const SwLayoutFrm *pStart = pCntNd->getLayoutFrm( pCntNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), + const SwLayoutFrame *pStart = pCntNd->getLayoutFrame( pCntNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt )->GetUpper(); pCntNd = rPam.GetContentNode(false); - const SwLayoutFrm *pEnd = pCntNd->getLayoutFrm( pCntNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), + const SwLayoutFrame *pEnd = pCntNd->getLayoutFrame( pCntNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt )->GetUpper(); GetTableSel( pStart, pEnd, aBoxes, nullptr ); return CheckMergeSel( aBoxes ); @@ -1487,46 +1487,46 @@ sal_uInt16 CheckMergeSel( const SwSelBoxes& rBoxes ) return eRet; } -static SwTwips lcl_CalcWish( const SwLayoutFrm *pCell, long nWish, +static SwTwips lcl_CalcWish( const SwLayoutFrame *pCell, long nWish, const long nAct ) { - const SwLayoutFrm *pTmp = pCell; + const SwLayoutFrame *pTmp = pCell; if ( !nWish ) nWish = 1; const bool bRTL = pCell->IsRightToLeft(); SwTwips nRet = bRTL ? - nAct - pCell->Frm().Width() : + nAct - pCell->Frame().Width() : 0; while ( pTmp ) { while ( pTmp->GetPrev() ) { - pTmp = static_cast<const SwLayoutFrm*>(pTmp->GetPrev()); - sal_Int64 nTmp = pTmp->GetFormat()->GetFrmSize().GetWidth(); + pTmp = static_cast<const SwLayoutFrame*>(pTmp->GetPrev()); + sal_Int64 nTmp = pTmp->GetFormat()->GetFrameSize().GetWidth(); // multiply in 64-bit to avoid overflow here! nRet += ( bRTL ? ( -1 ) : 1 ) * nTmp * nAct / nWish; } pTmp = pTmp->GetUpper()->GetUpper(); - if ( pTmp && !pTmp->IsCellFrm() ) + if ( pTmp && !pTmp->IsCellFrame() ) pTmp = nullptr; } return nRet; } -static void lcl_FindStartEndRow( const SwLayoutFrm *&rpStart, - const SwLayoutFrm *&rpEnd, +static void lcl_FindStartEndRow( const SwLayoutFrame *&rpStart, + const SwLayoutFrame *&rpEnd, const int bChkProtected ) { // Put Start at beginning of a row. // Put End at the end of its row. - rpStart = static_cast<const SwLayoutFrm*>(rpStart->GetUpper()->Lower()); + rpStart = static_cast<const SwLayoutFrame*>(rpStart->GetUpper()->Lower()); while ( rpEnd->GetNext() ) - rpEnd = static_cast<const SwLayoutFrm*>(rpEnd->GetNext()); + rpEnd = static_cast<const SwLayoutFrame*>(rpEnd->GetNext()); - std::deque<const SwLayoutFrm *> aSttArr, aEndArr; - const SwLayoutFrm *pTmp; + std::deque<const SwLayoutFrame *> aSttArr, aEndArr; + const SwLayoutFrame *pTmp; for( pTmp = rpStart; (FRM_CELL|FRM_ROW) & pTmp->GetType(); pTmp = pTmp->GetUpper() ) { @@ -1538,7 +1538,7 @@ static void lcl_FindStartEndRow( const SwLayoutFrm *&rpStart, aEndArr.push_front( pTmp ); } - for( std::deque<const SwLayoutFrm *>::size_type n = 0; n < aEndArr.size() && n < aSttArr.size(); ++n ) + for( std::deque<const SwLayoutFrame *>::size_type n = 0; n < aEndArr.size() && n < aSttArr.size(); ++n ) if( aSttArr[ n ] != aEndArr[ n ] ) { // first unequal line or box - all odds are @@ -1556,18 +1556,18 @@ static void lcl_FindStartEndRow( const SwLayoutFrm *&rpStart, rpEnd = aEndArr[ n+1 ]; if( n ) { - const SwCellFrm* pCellFrm = static_cast<const SwCellFrm*>(aSttArr[ n-1 ]); - const SwTableLines& rLns = pCellFrm-> + const SwCellFrame* pCellFrame = static_cast<const SwCellFrame*>(aSttArr[ n-1 ]); + const SwTableLines& rLns = pCellFrame-> GetTabBox()->GetTabLines(); - if( rLns[ 0 ] == static_cast<const SwRowFrm*>(aSttArr[ n ])->GetTabLine() && + if( rLns[ 0 ] == static_cast<const SwRowFrame*>(aSttArr[ n ])->GetTabLine() && rLns[ rLns.size() - 1 ] == - static_cast<const SwRowFrm*>(aEndArr[ n ])->GetTabLine() ) + static_cast<const SwRowFrame*>(aEndArr[ n ])->GetTabLine() ) { - rpStart = rpEnd = pCellFrm; + rpStart = rpEnd = pCellFrame; while ( rpStart->GetPrev() ) - rpStart = static_cast<const SwLayoutFrm*>(rpStart->GetPrev()); + rpStart = static_cast<const SwLayoutFrame*>(rpStart->GetPrev()); while ( rpEnd->GetNext() ) - rpEnd = static_cast<const SwLayoutFrm*>(rpEnd->GetNext()); + rpEnd = static_cast<const SwLayoutFrame*>(rpEnd->GetNext()); } } } @@ -1579,34 +1579,34 @@ static void lcl_FindStartEndRow( const SwLayoutFrm *&rpStart, // Beginning and end should not be in protected cells while ( rpStart->GetFormat()->GetProtect().IsContentProtected() ) - rpStart = static_cast<const SwLayoutFrm*>(rpStart->GetNext()); + rpStart = static_cast<const SwLayoutFrame*>(rpStart->GetNext()); while ( rpEnd->GetFormat()->GetProtect().IsContentProtected() ) - rpEnd = static_cast<const SwLayoutFrm*>(rpEnd->GetPrev()); + rpEnd = static_cast<const SwLayoutFrame*>(rpEnd->GetPrev()); } -static void lcl_FindStartEndCol( const SwLayoutFrm *&rpStart, - const SwLayoutFrm *&rpEnd, +static void lcl_FindStartEndCol( const SwLayoutFrame *&rpStart, + const SwLayoutFrame *&rpEnd, const int bChkProtected ) { // Beginning and end vertical till the border of the table; // Consider the whole table, including master and follows. - // In order to start we need the mother-tableFrm + // In order to start we need the mother-tableFrame if( !rpStart ) return; - const SwTabFrm *pOrg = rpStart->FindTabFrm(); - const SwTabFrm *pTab = pOrg; + const SwTabFrame *pOrg = rpStart->FindTabFrame(); + const SwTabFrame *pTab = pOrg; SWRECTFN( pTab ) bool bRTL = pTab->IsRightToLeft(); - const long nTmpWish = pOrg->GetFormat()->GetFrmSize().GetWidth(); + const long nTmpWish = pOrg->GetFormat()->GetFrameSize().GetWidth(); const long nWish = ( nTmpWish > 0 ) ? nTmpWish : 1; while ( pTab->IsFollow() ) { - const SwFrm *pTmp = pTab->FindPrev(); - OSL_ENSURE( pTmp->IsTabFrm(), "Predecessor of Follow is not Master." ); - pTab = static_cast<const SwTabFrm*>(pTmp); + const SwFrame *pTmp = pTab->FindPrev(); + OSL_ENSURE( pTmp->IsTabFrame(), "Predecessor of Follow is not Master." ); + pTab = static_cast<const SwTabFrame*>(pTmp); } SwTwips nSX = 0; @@ -1614,24 +1614,24 @@ static void lcl_FindStartEndCol( const SwLayoutFrm *&rpStart, if ( pTab->GetTable()->IsNewModel() ) { - nSX = (rpStart->Frm().*fnRect->fnGetLeft )(); - nSX2 = (rpStart->Frm().*fnRect->fnGetRight)(); + nSX = (rpStart->Frame().*fnRect->fnGetLeft )(); + nSX2 = (rpStart->Frame().*fnRect->fnGetRight)(); } else { const SwTwips nPrtWidth = (pTab->Prt().*fnRect->fnGetWidth)(); nSX = ::lcl_CalcWish( rpStart, nWish, nPrtWidth ) + (pTab->*fnRect->fnGetPrtLeft)(); - nSX2 = nSX + (rpStart->GetFormat()->GetFrmSize().GetWidth() * nPrtWidth / nWish); + nSX2 = nSX + (rpStart->GetFormat()->GetFrameSize().GetWidth() * nPrtWidth / nWish); } - const SwLayoutFrm *pTmp = pTab->FirstCell(); + const SwLayoutFrame *pTmp = pTab->FirstCell(); while ( pTmp && - (!pTmp->IsCellFrm() || - ( ( ! bRTL && (pTmp->Frm().*fnRect->fnGetLeft)() < nSX && - (pTmp->Frm().*fnRect->fnGetRight)()< nSX2 ) || - ( bRTL && (pTmp->Frm().*fnRect->fnGetLeft)() > nSX && - (pTmp->Frm().*fnRect->fnGetRight)()> nSX2 ) ) ) ) + (!pTmp->IsCellFrame() || + ( ( ! bRTL && (pTmp->Frame().*fnRect->fnGetLeft)() < nSX && + (pTmp->Frame().*fnRect->fnGetRight)()< nSX2 ) || + ( bRTL && (pTmp->Frame().*fnRect->fnGetLeft)() > nSX && + (pTmp->Frame().*fnRect->fnGetRight)()> nSX2 ) ) ) ) pTmp = pTmp->GetNextLayoutLeaf(); if ( pTmp ) @@ -1639,7 +1639,7 @@ static void lcl_FindStartEndCol( const SwLayoutFrm *&rpStart, pTab = pOrg; - const SwTabFrm* pLastValidTab = pTab; + const SwTabFrame* pLastValidTab = pTab; while ( pTab->GetFollow() ) { @@ -1650,7 +1650,7 @@ static void lcl_FindStartEndCol( const SwLayoutFrm *&rpStart, if ( pTab->HasFollowFlowLine() ) { pTab = pTab->GetFollow(); - const SwFrm* pTmpRow = pTab->GetFirstNonHeadlineRow(); + const SwFrame* pTmpRow = pTab->GetFirstNonHeadlineRow(); if ( pTmpRow && pTmpRow->GetNext() ) pLastValidTab = pTab; } @@ -1663,7 +1663,7 @@ static void lcl_FindStartEndCol( const SwLayoutFrm *&rpStart, if ( pTab->GetTable()->IsNewModel() ) { - nEX = (rpEnd->Frm().*fnRect->fnGetLeft )(); + nEX = (rpEnd->Frame().*fnRect->fnGetLeft )(); } else { @@ -1671,19 +1671,19 @@ static void lcl_FindStartEndCol( const SwLayoutFrm *&rpStart, nEX = ::lcl_CalcWish( rpEnd, nWish, nPrtWidth ) + (pTab->*fnRect->fnGetPrtLeft)(); } - const SwContentFrm* pLastContent = pTab->FindLastContent(); + const SwContentFrame* pLastContent = pTab->FindLastContent(); rpEnd = pLastContent ? pLastContent->GetUpper() : nullptr; // --> Made code robust. If pTab does not have a lower, // we would crash here. if ( !pLastContent ) return; - while( !rpEnd->IsCellFrm() ) + while( !rpEnd->IsCellFrame() ) rpEnd = rpEnd->GetUpper(); - while ( ( bRTL && (rpEnd->Frm().*fnRect->fnGetLeft)() < nEX ) || - ( ! bRTL && (rpEnd->Frm().*fnRect->fnGetLeft)() > nEX ) ) + while ( ( bRTL && (rpEnd->Frame().*fnRect->fnGetLeft)() < nEX ) || + ( ! bRTL && (rpEnd->Frame().*fnRect->fnGetLeft)() > nEX ) ) { - const SwLayoutFrm* pTmpLeaf = rpEnd->GetPrevLayoutLeaf(); + const SwLayoutFrame* pTmpLeaf = rpEnd->GetPrevLayoutLeaf(); if( !pTmpLeaf || !pTab->IsAnLower( pTmpLeaf ) ) break; rpEnd = pTmpLeaf; @@ -1696,21 +1696,21 @@ static void lcl_FindStartEndCol( const SwLayoutFrm *&rpStart, // If necessary we should search backwards again while ( rpStart->GetFormat()->GetProtect().IsContentProtected() ) { - const SwLayoutFrm *pTmpLeaf = rpStart; + const SwLayoutFrame *pTmpLeaf = rpStart; pTmpLeaf = pTmpLeaf->GetNextLayoutLeaf(); - while ( pTmpLeaf && (pTmpLeaf->Frm().*fnRect->fnGetLeft)() > nEX ) // first skip line + while ( pTmpLeaf && (pTmpLeaf->Frame().*fnRect->fnGetLeft)() > nEX ) // first skip line pTmpLeaf = pTmpLeaf->GetNextLayoutLeaf(); - while ( pTmpLeaf && (pTmpLeaf->Frm().*fnRect->fnGetLeft)() < nSX && - (pTmpLeaf->Frm().*fnRect->fnGetRight)()< nSX2 ) + while ( pTmpLeaf && (pTmpLeaf->Frame().*fnRect->fnGetLeft)() < nSX && + (pTmpLeaf->Frame().*fnRect->fnGetRight)()< nSX2 ) pTmpLeaf = pTmpLeaf->GetNextLayoutLeaf(); - const SwTabFrm *pTmpTab = rpStart->FindTabFrm(); + const SwTabFrame *pTmpTab = rpStart->FindTabFrame(); if ( !pTmpTab->IsAnLower( pTmpLeaf ) ) { pTmpTab = pTmpTab->GetFollow(); rpStart = pTmpTab->FirstCell(); while ( rpStart && - (rpStart->Frm().*fnRect->fnGetLeft)() < nSX && - (rpStart->Frm().*fnRect->fnGetRight)()< nSX2 ) + (rpStart->Frame().*fnRect->fnGetLeft)() < nSX && + (rpStart->Frame().*fnRect->fnGetRight)()< nSX2 ) rpStart = rpStart->GetNextLayoutLeaf(); } else @@ -1718,21 +1718,21 @@ static void lcl_FindStartEndCol( const SwLayoutFrm *&rpStart, } while ( rpEnd->GetFormat()->GetProtect().IsContentProtected() ) { - const SwLayoutFrm *pTmpLeaf = rpEnd; + const SwLayoutFrame *pTmpLeaf = rpEnd; pTmpLeaf = pTmpLeaf->GetPrevLayoutLeaf(); - while ( pTmpLeaf && (pTmpLeaf->Frm().*fnRect->fnGetLeft)() < nEX )//erstmal die Zeile ueberspr. + while ( pTmpLeaf && (pTmpLeaf->Frame().*fnRect->fnGetLeft)() < nEX )//erstmal die Zeile ueberspr. pTmpLeaf = pTmpLeaf->GetPrevLayoutLeaf(); - while ( pTmpLeaf && (pTmpLeaf->Frm().*fnRect->fnGetLeft)() > nEX ) + while ( pTmpLeaf && (pTmpLeaf->Frame().*fnRect->fnGetLeft)() > nEX ) pTmpLeaf = pTmpLeaf->GetPrevLayoutLeaf(); - const SwTabFrm *pTmpTab = rpEnd->FindTabFrm(); + const SwTabFrame *pTmpTab = rpEnd->FindTabFrame(); if ( !pTmpLeaf || !pTmpTab->IsAnLower( pTmpLeaf ) ) { - pTmpTab = static_cast<const SwTabFrm*>(pTmpTab->FindPrev()); - OSL_ENSURE( pTmpTab->IsTabFrm(), "Predecessor of Follow not Master."); + pTmpTab = static_cast<const SwTabFrame*>(pTmpTab->FindPrev()); + OSL_ENSURE( pTmpTab->IsTabFrame(), "Predecessor of Follow not Master."); rpEnd = pTmpTab->FindLastContent()->GetUpper(); - while( !rpEnd->IsCellFrm() ) + while( !rpEnd->IsCellFrame() ) rpEnd = rpEnd->GetUpper(); - while ( (rpEnd->Frm().*fnRect->fnGetLeft)() > nEX ) + while ( (rpEnd->Frame().*fnRect->fnGetLeft)() > nEX ) rpEnd = rpEnd->GetPrevLayoutLeaf(); } else @@ -1740,22 +1740,22 @@ static void lcl_FindStartEndCol( const SwLayoutFrm *&rpStart, } } -void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrm *pStart, - const SwLayoutFrm *pEnd, const SwTableSearchType eSearchType ) +void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrame *pStart, + const SwLayoutFrame *pEnd, const SwTableSearchType eSearchType ) { - while ( pStart && !pStart->IsCellFrm() ) + while ( pStart && !pStart->IsCellFrame() ) pStart = pStart->GetUpper(); - while ( pEnd && !pEnd->IsCellFrm() ) + while ( pEnd && !pEnd->IsCellFrame() ) pEnd = pEnd->GetUpper(); if ( !pStart || !pEnd ) { - OSL_FAIL( "MakeSelUnions with pStart or pEnd not in CellFrm" ); + OSL_FAIL( "MakeSelUnions with pStart or pEnd not in CellFrame" ); return; } - const SwTabFrm *pTable = pStart->FindTabFrm(); - const SwTabFrm *pEndTable = pEnd->FindTabFrm(); + const SwTabFrame *pTable = pStart->FindTabFrame(); + const SwTabFrame *pEndTable = pEnd->FindTabFrame(); if( !pTable || !pEndTable ) return; bool bExchange = false; @@ -1771,12 +1771,12 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrm *pStart, else { SWRECTFN( pTable ) - long nSttTop = (pStart->Frm().*fnRect->fnGetTop)(); - long nEndTop = (pEnd->Frm().*fnRect->fnGetTop)(); + long nSttTop = (pStart->Frame().*fnRect->fnGetTop)(); + long nEndTop = (pEnd->Frame().*fnRect->fnGetTop)(); if( nSttTop == nEndTop ) { - if( (pStart->Frm().*fnRect->fnGetLeft)() > - (pEnd->Frm().*fnRect->fnGetLeft)() ) + if( (pStart->Frame().*fnRect->fnGetLeft)() > + (pEnd->Frame().*fnRect->fnGetLeft)() ) bExchange = true; } else if( bVert == ( nSttTop < nEndTop ) ) @@ -1784,7 +1784,7 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrm *pStart, } if ( bExchange ) { - const SwLayoutFrm *pTmp = pStart; + const SwLayoutFrame *pTmp = pStart; pStart = pEnd; pEnd = pTmp; // do no resort pTable and pEndTable, set new below @@ -1801,12 +1801,12 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrm *pStart, if ( !pEnd || !pStart ) return; // Made code robust. // retrieve again, as they have been moved - pTable = pStart->FindTabFrm(); - pEndTable = pEnd->FindTabFrm(); + pTable = pStart->FindTabFrame(); + pEndTable = pEnd->FindTabFrame(); - const long nStSz = pStart->GetFormat()->GetFrmSize().GetWidth(); - const long nEdSz = pEnd->GetFormat()->GetFrmSize().GetWidth(); - const long nWish = std::max( 1L, pTable->GetFormat()->GetFrmSize().GetWidth() ); + const long nStSz = pStart->GetFormat()->GetFrameSize().GetWidth(); + const long nEdSz = pEnd->GetFormat()->GetFrameSize().GetWidth(); + const long nWish = std::max( 1L, pTable->GetFormat()->GetFrameSize().GetWidth() ); while ( pTable ) { SWRECTFN( pTable ) @@ -1823,13 +1823,13 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrm *pStart, long nSt2; long nEd2; if( pTable->IsAnLower( pStart ) ) - nSt2 = (pStart->Frm().*fnRect->fnGetTop)(); + nSt2 = (pStart->Frame().*fnRect->fnGetTop)(); else - nSt2 = (pTable->Frm().*fnRect->fnGetTop)(); + nSt2 = (pTable->Frame().*fnRect->fnGetTop)(); if( pTable->IsAnLower( pEnd ) ) - nEd2 = (pEnd->Frm().*fnRect->fnGetBottom)(); + nEd2 = (pEnd->Frame().*fnRect->fnGetBottom)(); else - nEd2 = (pTable->Frm().*fnRect->fnGetBottom)(); + nEd2 = (pTable->Frame().*fnRect->fnGetBottom)(); Point aSt, aEd; if( nSt1 > nEd1 ) { @@ -1864,58 +1864,58 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrm *pStart, // erroneous results could occur during split/merge. // To prevent these we will determine the first and last row // within the union and use their values for a new union - const SwLayoutFrm* pRow = pTable->IsFollow() ? + const SwLayoutFrame* pRow = pTable->IsFollow() ? pTable->GetFirstNonHeadlineRow() : - static_cast<const SwLayoutFrm*>(pTable->Lower()); + static_cast<const SwLayoutFrame*>(pTable->Lower()); - while ( pRow && !pRow->Frm().IsOver( aUnion ) ) - pRow = static_cast<const SwLayoutFrm*>(pRow->GetNext()); + while ( pRow && !pRow->Frame().IsOver( aUnion ) ) + pRow = static_cast<const SwLayoutFrame*>(pRow->GetNext()); // #i31976# // A follow flow row may contain emtpy cells. These are not // considered by FirstCell(). Therefore we have to find // the first cell manually: - const SwFrm* pTmpCell = nullptr; + const SwFrame* pTmpCell = nullptr; if ( pTable->IsFollow() && pRow && pRow->IsInFollowFlowRow() ) { - const SwFrm* pTmpRow = pRow; - while ( pTmpRow && pTmpRow->IsRowFrm() ) + const SwFrame* pTmpRow = pRow; + while ( pTmpRow && pTmpRow->IsRowFrame() ) { - pTmpCell = static_cast<const SwRowFrm*>(pTmpRow)->Lower(); - pTmpRow = static_cast<const SwCellFrm*>(pTmpCell)->Lower(); + pTmpCell = static_cast<const SwRowFrame*>(pTmpRow)->Lower(); + pTmpRow = static_cast<const SwCellFrame*>(pTmpCell)->Lower(); } - OSL_ENSURE( !pTmpCell || pTmpCell->IsCellFrm(), "Lower of rowframe != cellframe?!" ); + OSL_ENSURE( !pTmpCell || pTmpCell->IsCellFrame(), "Lower of rowframe != cellframe?!" ); } - const SwLayoutFrm* pFirst = pTmpCell ? - static_cast<const SwLayoutFrm*>(pTmpCell) : + const SwLayoutFrame* pFirst = pTmpCell ? + static_cast<const SwLayoutFrame*>(pTmpCell) : pRow ? pRow->FirstCell() : nullptr; - while ( pFirst && !::IsFrmInTableSel( aUnion, pFirst ) ) + while ( pFirst && !::IsFrameInTableSel( aUnion, pFirst ) ) { if ( pFirst->GetNext() ) { - pFirst = static_cast<const SwLayoutFrm*>(pFirst->GetNext()); - if ( pFirst->Lower() && pFirst->Lower()->IsRowFrm() ) + pFirst = static_cast<const SwLayoutFrame*>(pFirst->GetNext()); + if ( pFirst->Lower() && pFirst->Lower()->IsRowFrame() ) pFirst = pFirst->FirstCell(); } else - pFirst = ::lcl_FindNextCellFrm( pFirst ); + pFirst = ::lcl_FindNextCellFrame( pFirst ); } - const SwLayoutFrm* pLast = nullptr; - const SwFrm* pLastContent = pTable->FindLastContent(); + const SwLayoutFrame* pLast = nullptr; + const SwFrame* pLastContent = pTable->FindLastContent(); if ( pLastContent ) - pLast = ::lcl_FindCellFrm( pLastContent->GetUpper() ); + pLast = ::lcl_FindCellFrame( pLastContent->GetUpper() ); - while ( pLast && !::IsFrmInTableSel( aUnion, pLast ) ) - pLast = ::lcl_FindCellFrm( pLast->GetPrevLayoutLeaf() ); + while ( pLast && !::IsFrameInTableSel( aUnion, pLast ) ) + pLast = ::lcl_FindCellFrame( pLast->GetPrevLayoutLeaf() ); if ( pFirst && pLast ) //Robust { - aUnion = pFirst->Frm(); - aUnion.Union( pLast->Frm() ); + aUnion = pFirst->Frame(); + aUnion.Union( pLast->Frame() ); } else aUnion.Width( 0 ); @@ -1923,7 +1923,7 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrm *pStart, if( (aUnion.*fnRect->fnGetWidth)() ) { - rUnions.push_back(SwSelUnion(aUnion, const_cast<SwTabFrm*>(pTable))); + rUnions.push_back(SwSelUnion(aUnion, const_cast<SwTabFrame*>(pTable))); } pTable = pTable->GetFollow(); @@ -1932,16 +1932,16 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrm *pStart, } } -bool CheckSplitCells( const SwCrsrShell& rShell, sal_uInt16 nDiv, +bool CheckSplitCells( const SwCursorShell& rShell, sal_uInt16 nDiv, const SwTableSearchType eSearchType ) { if( !rShell.IsTableMode() ) - rShell.GetCrsr(); + rShell.GetCursor(); - return CheckSplitCells( *rShell.getShellCrsr(false), nDiv, eSearchType ); + return CheckSplitCells( *rShell.getShellCursor(false), nDiv, eSearchType ); } -bool CheckSplitCells( const SwCursor& rCrsr, sal_uInt16 nDiv, +bool CheckSplitCells( const SwCursor& rCursor, sal_uInt16 nDiv, const SwTableSearchType eSearchType ) { if( 1 >= nDiv ) @@ -1951,18 +1951,18 @@ bool CheckSplitCells( const SwCursor& rCrsr, sal_uInt16 nDiv, // Get start and end cell Point aPtPos, aMkPos; - const SwShellCrsr* pShCrsr = dynamic_cast<const SwShellCrsr*>(&rCrsr); - if( pShCrsr ) + const SwShellCursor* pShCursor = dynamic_cast<const SwShellCursor*>(&rCursor); + if( pShCursor ) { - aPtPos = pShCrsr->GetPtPos(); - aMkPos = pShCrsr->GetMkPos(); + aPtPos = pShCursor->GetPtPos(); + aMkPos = pShCursor->GetMkPos(); } - const SwContentNode* pCntNd = rCrsr.GetContentNode(); - const SwLayoutFrm *pStart = pCntNd->getLayoutFrm( pCntNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), + const SwContentNode* pCntNd = rCursor.GetContentNode(); + const SwLayoutFrame *pStart = pCntNd->getLayoutFrame( pCntNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPtPos )->GetUpper(); - pCntNd = rCrsr.GetContentNode(false); - const SwLayoutFrm *pEnd = pCntNd->getLayoutFrm( pCntNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), + pCntNd = rCursor.GetContentNode(false); + const SwLayoutFrame *pEnd = pCntNd->getLayoutFrame( pCntNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aMkPos )->GetUpper(); SWRECTFN( pStart->GetUpper() ) @@ -1975,39 +1975,39 @@ bool CheckSplitCells( const SwCursor& rCrsr, sal_uInt16 nDiv, // now search boxes for each entry and emit for ( auto rSelUnion : aUnions ) { - const SwTabFrm *pTable = rSelUnion.GetTable(); + const SwTabFrame *pTable = rSelUnion.GetTable(); // Skip any repeated headlines in the follow: - const SwLayoutFrm* pRow = pTable->IsFollow() ? + const SwLayoutFrame* pRow = pTable->IsFollow() ? pTable->GetFirstNonHeadlineRow() : - static_cast<const SwLayoutFrm*>(pTable->Lower()); + static_cast<const SwLayoutFrame*>(pTable->Lower()); while ( pRow ) { - if ( pRow->Frm().IsOver( rSelUnion.GetUnion() ) ) + if ( pRow->Frame().IsOver( rSelUnion.GetUnion() ) ) { - const SwLayoutFrm *pCell = pRow->FirstCell(); + const SwLayoutFrame *pCell = pRow->FirstCell(); while ( pCell && pRow->IsAnLower( pCell ) ) { - OSL_ENSURE( pCell->IsCellFrm(), "Frame without cell" ); - if( ::IsFrmInTableSel( rSelUnion.GetUnion(), pCell ) ) + OSL_ENSURE( pCell->IsCellFrame(), "Frame without cell" ); + if( ::IsFrameInTableSel( rSelUnion.GetUnion(), pCell ) ) { - if( (pCell->Frm().*fnRect->fnGetWidth)() < nMinValue ) + if( (pCell->Frame().*fnRect->fnGetWidth)() < nMinValue ) return false; } if ( pCell->GetNext() ) { - pCell = static_cast<const SwLayoutFrm*>(pCell->GetNext()); - if ( pCell->Lower() && pCell->Lower()->IsRowFrm() ) + pCell = static_cast<const SwLayoutFrame*>(pCell->GetNext()); + if ( pCell->Lower() && pCell->Lower()->IsRowFrame() ) pCell = pCell->FirstCell(); } else - pCell = ::lcl_FindNextCellFrm( pCell ); + pCell = ::lcl_FindNextCellFrame( pCell ); } } - pRow = static_cast<const SwLayoutFrm*>(pRow->GetNext()); + pRow = static_cast<const SwLayoutFrame*>(pRow->GetNext()); } } return true; @@ -2017,18 +2017,18 @@ bool CheckSplitCells( const SwCursor& rCrsr, sal_uInt16 nDiv, // into a new structure, retaining the table structure // new: SS for targeted erasing/restoring of the layout -static void lcl_InsertRow( SwTableLine &rLine, SwLayoutFrm *pUpper, SwFrm *pSibling ) +static void lcl_InsertRow( SwTableLine &rLine, SwLayoutFrame *pUpper, SwFrame *pSibling ) { - SwRowFrm *pRow = new SwRowFrm( rLine, pUpper ); - if ( pUpper->IsTabFrm() && static_cast<SwTabFrm*>(pUpper)->IsFollow() ) + SwRowFrame *pRow = new SwRowFrame( rLine, pUpper ); + if ( pUpper->IsTabFrame() && static_cast<SwTabFrame*>(pUpper)->IsFollow() ) { - SwTabFrm* pTabFrm = static_cast<SwTabFrm*>(pUpper); - pTabFrm->FindMaster()->InvalidatePos(); //can absorb the line + SwTabFrame* pTabFrame = static_cast<SwTabFrame*>(pUpper); + pTabFrame->FindMaster()->InvalidatePos(); //can absorb the line - if ( pSibling && pTabFrm->IsInHeadline( *pSibling ) ) + if ( pSibling && pTabFrame->IsInHeadline( *pSibling ) ) { // Skip any repeated headlines in the follow: - pSibling = pTabFrm->GetFirstNonHeadlineRow(); + pSibling = pTabFrame->GetFirstNonHeadlineRow(); } } pRow->Paste( pUpper, pSibling ); @@ -2133,20 +2133,20 @@ void _FndBox::SetTableLines( const SwTable &rTable ) pLineBehind = rTable.GetTabLines()[nPos]; } -inline void UnsetFollow( SwFlowFrm *pTab ) +inline void UnsetFollow( SwFlowFrame *pTab ) { pTab->m_pPrecede = nullptr; } //When bAccTableDispose is FALSE,the acc table should not be disposed. -//void _FndBox::DelFrms( SwTable &rTable ) -void _FndBox::DelFrms( SwTable &rTable, bool bAccTableDispose ) +//void _FndBox::DelFrames( SwTable &rTable ) +void _FndBox::DelFrames( SwTable &rTable, bool bAccTableDispose ) { // All lines between pLineBefore and pLineBehind should be cut // from the layout and erased. // If this creates empty Follows we should destroy these. // If a master is destroyed, the follow should become master. - // Always a TabFrm should remain. + // Always a TabFrame should remain. sal_uInt16 nStPos = 0; sal_uInt16 nEndPos= rTable.GetTabLines().size() - 1; @@ -2173,42 +2173,42 @@ void _FndBox::DelFrms( SwTable &rTable, bool bAccTableDispose ) for ( sal_uInt16 i = nStPos; i <= nEndPos; ++i) { SwFrameFormat *pFormat = rTable.GetTabLines()[i]->GetFrameFormat(); - SwIterator<SwRowFrm,SwFormat> aIter( *pFormat ); - for ( SwRowFrm* pFrm = aIter.First(); pFrm; pFrm = aIter.Next() ) + SwIterator<SwRowFrame,SwFormat> aIter( *pFormat ); + for ( SwRowFrame* pFrame = aIter.First(); pFrame; pFrame = aIter.Next() ) { - if ( pFrm->GetTabLine() == rTable.GetTabLines()[i] ) + if ( pFrame->GetTabLine() == rTable.GetTabLines()[i] ) { bool bDel = true; - SwTabFrm *pUp = !pFrm->GetPrev() && !pFrm->GetNext() ? - static_cast<SwTabFrm*>(pFrm->GetUpper()) : nullptr; + SwTabFrame *pUp = !pFrame->GetPrev() && !pFrame->GetNext() ? + static_cast<SwTabFrame*>(pFrame->GetUpper()) : nullptr; if ( !pUp ) { const sal_uInt16 nRepeat = - static_cast<SwTabFrm*>(pFrm->GetUpper())->GetTable()->GetRowsToRepeat(); + static_cast<SwTabFrame*>(pFrame->GetUpper())->GetTable()->GetRowsToRepeat(); if ( nRepeat > 0 && - static_cast<SwTabFrm*>(pFrm->GetUpper())->IsFollow() ) + static_cast<SwTabFrame*>(pFrame->GetUpper())->IsFollow() ) { - if ( !pFrm->GetNext() ) + if ( !pFrame->GetNext() ) { - SwRowFrm* pFirstNonHeadline = - static_cast<SwTabFrm*>(pFrm->GetUpper())->GetFirstNonHeadlineRow(); - if ( pFirstNonHeadline == pFrm ) + SwRowFrame* pFirstNonHeadline = + static_cast<SwTabFrame*>(pFrame->GetUpper())->GetFirstNonHeadlineRow(); + if ( pFirstNonHeadline == pFrame ) { - pUp = static_cast<SwTabFrm*>(pFrm->GetUpper()); + pUp = static_cast<SwTabFrame*>(pFrame->GetUpper()); } } } } if ( pUp ) { - SwTabFrm *pFollow = pUp->GetFollow(); - SwTabFrm *pPrev = pUp->IsFollow() ? pUp : nullptr; + SwTabFrame *pFollow = pUp->GetFollow(); + SwTabFrame *pPrev = pUp->IsFollow() ? pUp : nullptr; if ( pPrev ) { - SwFrm *pTmp = pPrev->FindPrev(); - OSL_ENSURE( pTmp->IsTabFrm(), + SwFrame *pTmp = pPrev->FindPrev(); + OSL_ENSURE( pTmp->IsTabFrame(), "Predecessor of Follow is no Master."); - pPrev = static_cast<SwTabFrm*>(pTmp); + pPrev = static_cast<SwTabFrame*>(pTmp); } if ( pPrev ) { @@ -2222,90 +2222,90 @@ void _FndBox::DelFrms( SwTable &rTable, bool bAccTableDispose ) else if ( pFollow ) ::UnsetFollow( pFollow ); - // A TableFrm should always remain! + // A TableFrame should always remain! if ( pPrev || pFollow ) { // OD 26.08.2003 #i18103# - if table is in a section, // lock the section, to avoid its delete. { - SwSectionFrm* pSctFrm = pUp->FindSctFrm(); + SwSectionFrame* pSctFrame = pUp->FindSctFrame(); bool bOldSectLock = false; - if ( pSctFrm ) + if ( pSctFrame ) { - bOldSectLock = pSctFrm->IsColLocked(); - pSctFrm->ColLock(); + bOldSectLock = pSctFrame->IsColLocked(); + pSctFrame->ColLock(); } pUp->Cut(); - if ( pSctFrm && !bOldSectLock ) + if ( pSctFrame && !bOldSectLock ) { - pSctFrm->ColUnlock(); + pSctFrame->ColUnlock(); } } - SwFrm::DestroyFrm(pUp); + SwFrame::DestroyFrame(pUp); bDel = false; // Row goes to /dev/null. } } if ( bDel ) { - SwFrm* pTabFrm = pFrm->GetUpper(); - if ( pTabFrm->IsTabFrm() && - !pFrm->GetNext() && - static_cast<SwTabFrm*>(pTabFrm)->GetFollow() ) + SwFrame* pTabFrame = pFrame->GetUpper(); + if ( pTabFrame->IsTabFrame() && + !pFrame->GetNext() && + static_cast<SwTabFrame*>(pTabFrame)->GetFollow() ) { // We do not delete the follow flow line, // this will be done automatically in the // next turn. - static_cast<SwTabFrm*>(pTabFrm)->SetFollowFlowLine( false ); + static_cast<SwTabFrame*>(pTabFrame)->SetFollowFlowLine( false ); } //Set acc table dispose state - pFrm->SetAccTableDispose( bAccTableDispose ); - pFrm->Cut(); + pFrame->SetAccTableDispose( bAccTableDispose ); + pFrame->Cut(); //Set acc table dispose state to default value. - pFrm->SetAccTableDispose( true ); - SwFrm::DestroyFrm(pFrm); + pFrame->SetAccTableDispose( true ); + SwFrame::DestroyFrame(pFrame); } } } } } -static bool lcl_IsLineOfTableFrm( const SwTabFrm& rTable, const SwFrm& rChk ) +static bool lcl_IsLineOfTableFrame( const SwTabFrame& rTable, const SwFrame& rChk ) { - const SwTabFrm* pTableFrm = rChk.FindTabFrm(); - if( pTableFrm->IsFollow() ) - pTableFrm = pTableFrm->FindMaster( true ); - return &rTable == pTableFrm; + const SwTabFrame* pTableFrame = rChk.FindTabFrame(); + if( pTableFrame->IsFollow() ) + pTableFrame = pTableFrame->FindMaster( true ); + return &rTable == pTableFrame; } -static void lcl_UpdateRepeatedHeadlines( SwTabFrm& rTabFrm, bool bCalcLowers ) +static void lcl_UpdateRepeatedHeadlines( SwTabFrame& rTabFrame, bool bCalcLowers ) { - OSL_ENSURE( rTabFrm.IsFollow(), "lcl_UpdateRepeatedHeadlines called for non-follow tab" ); + OSL_ENSURE( rTabFrame.IsFollow(), "lcl_UpdateRepeatedHeadlines called for non-follow tab" ); // Delete remaining headlines: - SwRowFrm* pLower = nullptr; - while ( nullptr != ( pLower = static_cast<SwRowFrm*>(rTabFrm.Lower()) ) && pLower->IsRepeatedHeadline() ) + SwRowFrame* pLower = nullptr; + while ( nullptr != ( pLower = static_cast<SwRowFrame*>(rTabFrame.Lower()) ) && pLower->IsRepeatedHeadline() ) { pLower->Cut(); - SwFrm::DestroyFrm(pLower); + SwFrame::DestroyFrame(pLower); } // Insert fresh set of headlines: - pLower = static_cast<SwRowFrm*>(rTabFrm.Lower()); - SwTable& rTable = *rTabFrm.GetTable(); + pLower = static_cast<SwRowFrame*>(rTabFrame.Lower()); + SwTable& rTable = *rTabFrame.GetTable(); const sal_uInt16 nRepeat = rTable.GetRowsToRepeat(); for ( sal_uInt16 nIdx = 0; nIdx < nRepeat; ++nIdx ) { - SwRowFrm* pHeadline = new SwRowFrm( *rTable.GetTabLines()[ nIdx ], &rTabFrm ); + SwRowFrame* pHeadline = new SwRowFrame( *rTable.GetTabLines()[ nIdx ], &rTabFrame ); pHeadline->SetRepeatedHeadline( true ); - pHeadline->Paste( &rTabFrm, pLower ); + pHeadline->Paste( &rTabFrame, pLower ); pHeadline->RegistFlys(); } if ( bCalcLowers ) - rTabFrm.SetCalcLowers(); + rTabFrame.SetCalcLowers(); } -void _FndBox::MakeFrms( SwTable &rTable ) +void _FndBox::MakeFrames( SwTable &rTable ) { // All lines between pLineBefore and pLineBehind should be re-generated in layout. // And this for all instances of a table (for example in header/footer). @@ -2327,24 +2327,24 @@ void _FndBox::MakeFrms( SwTable &rTable ) --nEndPos; } // now big insert operation for all tables. - SwIterator<SwTabFrm,SwFormat> aTabIter( *rTable.GetFrameFormat() ); - for ( SwTabFrm *pTable = aTabIter.First(); pTable; pTable = aTabIter.Next() ) + SwIterator<SwTabFrame,SwFormat> aTabIter( *rTable.GetFrameFormat() ); + for ( SwTabFrame *pTable = aTabIter.First(); pTable; pTable = aTabIter.Next() ) { if ( !pTable->IsFollow() ) { - SwRowFrm *pSibling = nullptr; - SwFrm *pUpperFrm = nullptr; + SwRowFrame *pSibling = nullptr; + SwFrame *pUpperFrame = nullptr; int i; for ( i = rTable.GetTabLines().size()-1; i >= 0 && !pSibling; --i ) { SwTableLine *pLine = pLineBehind ? pLineBehind : rTable.GetTabLines()[static_cast<sal_uInt16>(i)]; - SwIterator<SwRowFrm,SwFormat> aIter( *pLine->GetFrameFormat() ); + SwIterator<SwRowFrame,SwFormat> aIter( *pLine->GetFrameFormat() ); pSibling = aIter.First(); while ( pSibling && ( pSibling->GetTabLine() != pLine || - !lcl_IsLineOfTableFrm( *pTable, *pSibling ) || + !lcl_IsLineOfTableFrame( *pTable, *pSibling ) || pSibling->IsRepeatedHeadline() || // #i53647# If !pLineBehind, // IsInSplitTableRow() should be checked. @@ -2356,19 +2356,19 @@ void _FndBox::MakeFrms( SwTable &rTable ) } if ( pSibling ) { - pUpperFrm = pSibling->GetUpper(); + pUpperFrame = pSibling->GetUpper(); if ( !pLineBehind ) pSibling = nullptr; } else // ???? or is this the last Follow of the table ???? - pUpperFrm = pTable; + pUpperFrame = pTable; for ( sal_uInt16 j = nStPos; j <= nEndPos; ++j ) ::lcl_InsertRow( *rTable.GetTabLines()[j], - static_cast<SwLayoutFrm*>(pUpperFrm), pSibling ); - if ( pUpperFrm->IsTabFrm() ) - static_cast<SwTabFrm*>(pUpperFrm)->SetCalcLowers(); + static_cast<SwLayoutFrame*>(pUpperFrame), pSibling ); + if ( pUpperFrame->IsTabFrame() ) + static_cast<SwTabFrame*>(pUpperFrame)->SetCalcLowers(); } else if ( rTable.GetRowsToRepeat() > 0 ) { @@ -2378,10 +2378,10 @@ void _FndBox::MakeFrms( SwTable &rTable ) } } -void _FndBox::MakeNewFrms( SwTable &rTable, const sal_uInt16 nNumber, +void _FndBox::MakeNewFrames( SwTable &rTable, const sal_uInt16 nNumber, const bool bBehind ) { - // Create Frms for newly inserted lines + // Create Frames for newly inserted lines // bBehind == true: before pLineBehind // == false: after pLineBefore const sal_uInt16 nBfPos = pLineBefore ? @@ -2398,26 +2398,26 @@ void _FndBox::MakeNewFrms( SwTable &rTable, const sal_uInt16 nNumber, ((nBhPos != USHRT_MAX ? nBhPos : rTable.GetTabLines().size()) - (nBfPos != USHRT_MAX ? nBfPos + 1 : 0)) / (nNumber + 1); - // search the Master-TabFrm - SwIterator<SwTabFrm,SwFormat> aTabIter( *rTable.GetFrameFormat() ); - SwTabFrm *pTable; + // search the Master-TabFrame + SwIterator<SwTabFrame,SwFormat> aTabIter( *rTable.GetFrameFormat() ); + SwTabFrame *pTable; for ( pTable = aTabIter.First(); pTable; pTable = aTabIter.Next() ) { if( !pTable->IsFollow() ) { - SwRowFrm* pSibling = nullptr; - SwLayoutFrm *pUpperFrm = nullptr; + SwRowFrame* pSibling = nullptr; + SwLayoutFrame *pUpperFrame = nullptr; if ( bBehind ) { if ( pLineBehind ) { - SwIterator<SwRowFrm,SwFormat> aIter( *pLineBehind->GetFrameFormat() ); + SwIterator<SwRowFrame,SwFormat> aIter( *pLineBehind->GetFrameFormat() ); pSibling = aIter.First(); while ( pSibling && ( // only consider row frames associated with pLineBehind: pSibling->GetTabLine() != pLineBehind || // only consider row frames that are in pTables Master-Follow chain: - !lcl_IsLineOfTableFrm( *pTable, *pSibling ) || + !lcl_IsLineOfTableFrame( *pTable, *pSibling ) || // only consider row frames that are not repeated headlines: pSibling->IsRepeatedHeadline() || // only consider row frames that are not follow flow rows @@ -2427,12 +2427,12 @@ void _FndBox::MakeNewFrms( SwTable &rTable, const sal_uInt16 nNumber, } } if ( pSibling ) - pUpperFrm = pSibling->GetUpper(); + pUpperFrame = pSibling->GetUpper(); else { while( pTable->GetFollow() ) pTable = pTable->GetFollow(); - pUpperFrm = pTable; + pUpperFrame = pTable; } const sal_uInt16 nMax = nBhPos != USHRT_MAX ? nBhPos : rTable.GetTabLines().size(); @@ -2440,9 +2440,9 @@ void _FndBox::MakeNewFrms( SwTable &rTable, const sal_uInt16 nNumber, sal_uInt16 i = nBfPos != USHRT_MAX ? nBfPos + 1 + nCnt : nCnt; for ( ; i < nMax; ++i ) - ::lcl_InsertRow( *rTable.GetTabLines()[i], pUpperFrm, pSibling ); - if ( pUpperFrm->IsTabFrm() ) - static_cast<SwTabFrm*>(pUpperFrm)->SetCalcLowers(); + ::lcl_InsertRow( *rTable.GetTabLines()[i], pUpperFrame, pSibling ); + if ( pUpperFrame->IsTabFrame() ) + static_cast<SwTabFrame*>(pUpperFrame)->SetCalcLowers(); } else // insert before { @@ -2454,14 +2454,14 @@ void _FndBox::MakeNewFrms( SwTable &rTable, const sal_uInt16 nNumber, { SwTableLine* pLine = pLineBefore ? pLineBefore : rTable.GetTabLines()[i]; - SwIterator<SwRowFrm,SwFormat> aIter( *pLine->GetFrameFormat() ); + SwIterator<SwRowFrame,SwFormat> aIter( *pLine->GetFrameFormat() ); pSibling = aIter.First(); while ( pSibling && ( // only consider row frames associated with pLineBefore: pSibling->GetTabLine() != pLine || // only consider row frames that are in pTables Master-Follow chain: - !lcl_IsLineOfTableFrm( *pTable, *pSibling ) || + !lcl_IsLineOfTableFrame( *pTable, *pSibling ) || // only consider row frames that are not repeated headlines: pSibling->IsRepeatedHeadline() || // 1. case: pLineBefore == 0: @@ -2477,9 +2477,9 @@ void _FndBox::MakeNewFrms( SwTable &rTable, const sal_uInt16 nNumber, } } - pUpperFrm = pSibling->GetUpper(); + pUpperFrame = pSibling->GetUpper(); if ( pLineBefore ) - pSibling = static_cast<SwRowFrm*>( pSibling->GetNext() ); + pSibling = static_cast<SwRowFrame*>( pSibling->GetNext() ); sal_uInt16 nMax = nBhPos != USHRT_MAX ? nBhPos - nCnt : @@ -2488,9 +2488,9 @@ void _FndBox::MakeNewFrms( SwTable &rTable, const sal_uInt16 nNumber, i = nBfPos != USHRT_MAX ? nBfPos + 1 : 0; for ( ; i < nMax; ++i ) ::lcl_InsertRow( *rTable.GetTabLines()[i], - pUpperFrm, pSibling ); - if ( pUpperFrm->IsTabFrm() ) - static_cast<SwTabFrm*>(pUpperFrm)->SetCalcLowers(); + pUpperFrame, pSibling ); + if ( pUpperFrame->IsTabFrame() ) + static_cast<SwTabFrame*>(pUpperFrame)->SetCalcLowers(); } } } @@ -2511,8 +2511,8 @@ void _FndBox::MakeNewFrms( SwTable &rTable, const sal_uInt16 nNumber, lcl_UpdateRepeatedHeadlines( *pTable, true ); } - OSL_ENSURE( static_cast<SwRowFrm*>(pTable->Lower())->GetTabLine() == - rTable.GetTabLines()[0], "MakeNewFrms: Table corruption!" ); + OSL_ENSURE( static_cast<SwRowFrame*>(pTable->Lower())->GetTabLine() == + rTable.GetTabLines()[0], "MakeNewFrames: Table corruption!" ); } } } @@ -2520,7 +2520,7 @@ void _FndBox::MakeNewFrms( SwTable &rTable, const sal_uInt16 nNumber, bool _FndBox::AreLinesToRestore( const SwTable &rTable ) const { - // Should we call MakeFrms here? + // Should we call MakeFrames here? if ( !pLineBefore && !pLineBehind && rTable.GetTabLines().size() ) return true; @@ -2552,8 +2552,8 @@ bool _FndBox::AreLinesToRestore( const SwTable &rTable ) const if ( rTable.GetRowsToRepeat() > 0 ) { // oops: should the repeated headline have been deleted?? - SwIterator<SwTabFrm,SwFormat> aIter( *rTable.GetFrameFormat() ); - for( SwTabFrm* pTable = aIter.First(); pTable; pTable = aIter.Next() ) + SwIterator<SwTabFrame,SwFormat> aIter( *rTable.GetFrameFormat() ); + for( SwTabFrame* pTable = aIter.First(); pTable; pTable = aIter.Next() ) { if( pTable->IsFollow() ) { @@ -2576,7 +2576,7 @@ bool _FndBox::AreLinesToRestore( const SwTable &rTable ) const return false; // The structure of the deleted lines is more complex due to split lines. - // A call of MakeFrms() is necessary. + // A call of MakeFrames() is necessary. return true; } diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx index a86822b10ed1..d50ac70fe465 100644 --- a/sw/source/core/graphic/ndgrf.cxx +++ b/sw/source/core/graphic/ndgrf.cxx @@ -206,7 +206,7 @@ bool SwGrfNode::ReRead( if( refLink.Is() ) { - if( getLayoutFrm( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ) ) + if( getLayoutFrame( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ) ) { SwMsgPoolItem aMsgHint( RES_GRF_REREAD_AND_INCACHE ); ModifyNotification( &aMsgHint, &aMsgHint ); @@ -316,9 +316,9 @@ SwGrfNode::~SwGrfNode() // To do this stuff correctly, a reference counting on shared streams // inside one document has to be implemented. } - //#39289# delete frames already here since the Frms' dtor needs the graphic for its StopAnimation + //#39289# delete frames already here since the Frames' dtor needs the graphic for its StopAnimation if( HasWriterListeners() ) - DelFrms(); + DelFrames(); } /// allow reaction on change of content of GraphicObject @@ -811,12 +811,12 @@ void SwGrfNode::ScaleImageMap() Fraction aScaleX( 1, 1 ); Fraction aScaleY( 1, 1 ); - const SwFormatFrmSize& rFrmSize = pFormat->GetFrmSize(); + const SwFormatFrameSize& rFrameSize = pFormat->GetFrameSize(); const SvxBoxItem& rBox = pFormat->GetBox(); - if( !rFrmSize.GetWidthPercent() ) + if( !rFrameSize.GetWidthPercent() ) { - SwTwips nWidth = rFrmSize.GetWidth(); + SwTwips nWidth = rFrameSize.GetWidth(); nWidth -= rBox.CalcLineSpace(SvxBoxItemLine::LEFT) + rBox.CalcLineSpace(SvxBoxItemLine::RIGHT); @@ -829,9 +829,9 @@ void SwGrfNode::ScaleImageMap() bScale = true; } } - if( !rFrmSize.GetHeightPercent() ) + if( !rFrameSize.GetHeightPercent() ) { - SwTwips nHeight = rFrmSize.GetHeight(); + SwTwips nHeight = rFrameSize.GetHeight(); nHeight -= rBox.CalcLineSpace(SvxBoxItemLine::TOP) + rBox.CalcLineSpace(SvxBoxItemLine::BOTTOM); @@ -990,7 +990,7 @@ IMPL_LINK_TYPED( SwGrfNode, SwapGraphic, const GraphicObject*, pGrfObj, SvStream /// returns the Graphic-Attr-Structure filled with our graphic attributes GraphicAttr& SwGrfNode::GetGraphicAttr( GraphicAttr& rGA, - const SwFrm* pFrm ) const + const SwFrame* pFrame ) const { const SwAttrSet& rSet = GetSwAttrSet(); @@ -998,7 +998,7 @@ GraphicAttr& SwGrfNode::GetGraphicAttr( GraphicAttr& rGA, const SwMirrorGrf & rMirror = rSet.GetMirrorGrf(); BmpMirrorFlags nMirror = BmpMirrorFlags::NONE; - if( rMirror.IsGrfToggle() && pFrm && !pFrm->FindPageFrm()->OnRightPage() ) + if( rMirror.IsGrfToggle() && pFrame && !pFrame->FindPageFrame()->OnRightPage() ) { switch( rMirror.GetValue() ) { @@ -1071,8 +1071,8 @@ bool SwGrfNode::IsSelected() const const SwNode* pN = this; for(const SwViewShell& rCurrentShell : pESh->GetRingContainer()) { - if( dynamic_cast<const SwEditShell*>( &rCurrentShell) != nullptr && pN == &static_cast<const SwCrsrShell*>(&rCurrentShell) - ->GetCrsr()->GetPoint()->nNode.GetNode() ) + if( dynamic_cast<const SwEditShell*>( &rCurrentShell) != nullptr && pN == &static_cast<const SwCursorShell*>(&rCurrentShell) + ->GetCursor()->GetPoint()->nNode.GetNode() ) { bRet = true; break; diff --git a/sw/source/core/inc/DocumentContentOperationsManager.hxx b/sw/source/core/inc/DocumentContentOperationsManager.hxx index d12e8daad94f..5d8fca4f2f80 100644 --- a/sw/source/core/inc/DocumentContentOperationsManager.hxx +++ b/sw/source/core/inc/DocumentContentOperationsManager.hxx @@ -104,7 +104,7 @@ public: const sal_Int32 nEndContentIndex, const SwNodeIndex& rInsPos, const std::pair<const SwPaM&, const SwPosition&> * pCopiedPaM = nullptr, - bool bMakeNewFrms = true, + bool bMakeNewFrames = true, bool bDelRedlines = true, bool bCopyFlyAtFly = false ) const; void CopyFlyInFlyImpl( const SwNodeRange& rRg, @@ -163,7 +163,7 @@ private: SwFrameFormat* = nullptr ); /* Copy a range within the same or to another document. Position may not lie within range! */ - bool CopyImpl( SwPaM&, SwPosition&, const bool MakeNewFrms /*= true */, + bool CopyImpl( SwPaM&, SwPosition&, const bool MakeNewFrames /*= true */, const bool bCopyAll, SwPaM *const pCpyRng /*= 0*/ ) const; }; diff --git a/sw/source/core/inc/DocumentLayoutManager.hxx b/sw/source/core/inc/DocumentLayoutManager.hxx index 026e3c0dc9ed..c3f900fce214 100644 --- a/sw/source/core/inc/DocumentLayoutManager.hxx +++ b/sw/source/core/inc/DocumentLayoutManager.hxx @@ -41,8 +41,8 @@ public: virtual SwViewShell *GetCurrentViewShell() override; //< It must be able to communicate to a SwViewShell.This is going to be removed later. virtual void SetCurrentViewShell( SwViewShell* pNew ) override; - virtual const SwRootFrm *GetCurrentLayout() const override; - virtual SwRootFrm *GetCurrentLayout() override; + virtual const SwRootFrame *GetCurrentLayout() const override; + virtual SwRootFrame *GetCurrentLayout() override; virtual bool HasLayout() const override; virtual const SwLayouter* GetLayouter() const override; @@ -51,7 +51,7 @@ public: virtual SwFrameFormat* MakeLayoutFormat( RndStdIds eRequest, const SfxItemSet* pSet ) override; virtual void DelLayoutFormat( SwFrameFormat *pFormat ) override; - virtual SwFrameFormat* CopyLayoutFormat( const SwFrameFormat& rSrc, const SwFormatAnchor& rNewAnchor, bool bSetTextFlyAtt, bool bMakeFrms ) override; + virtual SwFrameFormat* CopyLayoutFormat( const SwFrameFormat& rSrc, const SwFormatAnchor& rNewAnchor, bool bSetTextFlyAtt, bool bMakeFrames ) override; //Non Interface methods void ClearSwLayouterEntries(); diff --git a/sw/source/core/inc/DocumentSettingManager.hxx b/sw/source/core/inc/DocumentSettingManager.hxx index db0af2fcf38f..4e08d01008a4 100644 --- a/sw/source/core/inc/DocumentSettingManager.hxx +++ b/sw/source/core/inc/DocumentSettingManager.hxx @@ -80,7 +80,7 @@ class DocumentSettingManager : // mbIgnoreTabsAndBlanksForLineCalculation def = false, hidden // mbClipAsCharacterAnchoredWriterFlyFrame def = false, hidden // - Introduced in order to re-activate clipping of as-character anchored - // Writer fly frames in method <SwFlyInCntFrm::MakeAll()> for documents, + // Writer fly frames in method <SwFlyInContentFrame::MakeAll()> for documents, // which are created with version prior SO8/OOo 2.0 // // SO8pp4 diff --git a/sw/source/core/inc/SwPortionHandler.hxx b/sw/source/core/inc/SwPortionHandler.hxx index 14c9c3662eff..6dede18820ec 100644 --- a/sw/source/core/inc/SwPortionHandler.hxx +++ b/sw/source/core/inc/SwPortionHandler.hxx @@ -37,7 +37,7 @@ class SwFont; * held by the corresponding SwTextNode. * * The SwPortionHandler can be used with the - * SwTextFrm::VisitPortions(...) method. + * SwTextFrame::VisitPortions(...) method. */ class SwPortionHandler { diff --git a/sw/source/core/inc/UndoInsert.hxx b/sw/source/core/inc/UndoInsert.hxx index f9e7a3c90eb5..8192d325e901 100644 --- a/sw/source/core/inc/UndoInsert.hxx +++ b/sw/source/core/inc/UndoInsert.hxx @@ -154,12 +154,12 @@ class SwUndoInsertLabel : public SwUndo { union { struct { - // for NoTextFrms + // for NoTextFrames SwUndoInsLayFormat* pUndoFly; SwUndoFormatAttr* pUndoAttr; } OBJECT; struct { - // for tables or TextFrms + // for tables or TextFrames SwUndoDelete* pUndoInsNd; sal_uLong nNode; } NODE; diff --git a/sw/source/core/inc/acorrect.hxx b/sw/source/core/inc/acorrect.hxx index 79755d3eb510..b04df8c49917 100644 --- a/sw/source/core/inc/acorrect.hxx +++ b/sw/source/core/inc/acorrect.hxx @@ -46,7 +46,7 @@ public: class SwAutoCorrDoc : public SvxAutoCorrDoc { SwEditShell& rEditSh; - SwPaM& rCrsr; + SwPaM& rCursor; SwNodeIndex* pIdx; int m_nEndUndoCounter; bool bUndoIdInitialized; diff --git a/sw/source/core/inc/anchoredobjectposition.hxx b/sw/source/core/inc/anchoredobjectposition.hxx index 21f55e28e886..5547e3cfe051 100644 --- a/sw/source/core/inc/anchoredobjectposition.hxx +++ b/sw/source/core/inc/anchoredobjectposition.hxx @@ -24,8 +24,8 @@ #include <frame.hxx> class SdrObject; -class SwFrm; -class SwFlyFrm; +class SwFrame; +class SwFlyFrame; class SwContact; class SwFrameFormat; class SwRect; @@ -49,7 +49,7 @@ namespace objectpositioning // #i26791# - anchored object the object belongs to; SwAnchoredObject* mpAnchoredObj; // frame the object is anchored at - SwFrm* mpAnchorFrm; + SwFrame* mpAnchorFrame; // contact object SwContact* mpContact; // frame format @@ -62,7 +62,7 @@ namespace objectpositioning /** determine information about object - member <mbIsObjFly>, <mpAnchoredObj>, <mpAnchorFrm>, <mpContact> + member <mbIsObjFly>, <mpAnchoredObj>, <mpAnchorFrame>, <mpContact> and <mpFrameFormat> are set */ void _GetInfoAboutObj(); @@ -72,11 +72,11 @@ namespace objectpositioning SwTwips _ImplAdjustVertRelPos( const SwTwips nTopOfAnch, const bool bVert, const bool bVertL2R, - const SwFrm& rPageAlignLayFrm, + const SwFrame& rPageAlignLayFrame, const SwTwips nProposedRelPosY, const bool bFollowTextFlow, const bool bCheckBottom = true ) const; - SwTwips _ImplAdjustHoriRelPos( const SwFrm& _rPageAlignLayFrm, + SwTwips _ImplAdjustHoriRelPos( const SwFrame& _rPageAlignLayFrame, const SwTwips _nProposedRelPosX ) const; protected: @@ -96,9 +96,9 @@ namespace objectpositioning { return *mpAnchoredObj; } - inline SwFrm& GetAnchorFrm() const + inline SwFrame& GetAnchorFrame() const { - return *mpAnchorFrm; + return *mpAnchorFrame; } inline SwContact& GetContact() const { @@ -116,7 +116,7 @@ namespace objectpositioning // virtual methods providing data for to character anchored objects. virtual bool IsAnchoredToChar() const; - virtual const SwFrm* ToCharOrientFrm() const; + virtual const SwFrame* ToCharOrientFrame() const; virtual const SwRect* ToCharRect() const; // #i22341# virtual SwTwips ToCharTopOfLine() const; @@ -126,25 +126,25 @@ namespace objectpositioning #i11860# */ - static SwTwips _GetTopForObjPos( const SwFrm& _rFrm, + static SwTwips _GetTopForObjPos( const SwFrame& _rFrame, const SwRectFn& _fnRect, const bool _bVert ); - void _GetVertAlignmentValues( const SwFrm& _rVertOrientFrm, - const SwFrm& _rPageAlignLayFrm, + void _GetVertAlignmentValues( const SwFrame& _rVertOrientFrame, + const SwFrame& _rPageAlignLayFrame, const sal_Int16 _eRelOrient, SwTwips& _orAlignAreaHeight, SwTwips& _orAlignAreaOffset ) const; - // #i26791# - add output parameter <_roVertOffsetToFrmAnchorPos> - SwTwips _GetVertRelPos( const SwFrm& _rVertOrientFrm, - const SwFrm& _rPageAlignLayFrm, + // #i26791# - add output parameter <_roVertOffsetToFrameAnchorPos> + SwTwips _GetVertRelPos( const SwFrame& _rVertOrientFrame, + const SwFrame& _rPageAlignLayFrame, const sal_Int16 _eVertOrient, const sal_Int16 _eRelOrient, const SwTwips _nVertPos, const SvxLRSpaceItem& _rLRSpacing, const SvxULSpaceItem& _rULSpacing, - SwTwips& _roVertOffsetToFrmAnchorPos ) const; + SwTwips& _roVertOffsetToFrameAnchorPos ) const; /** adjust calculated vertical in order to keep object inside 'page' alignment layout frame. @@ -168,7 +168,7 @@ namespace objectpositioning input parameter - boolean, indicating, if object is in mongolian layout (vertical left-to-right layout). - @param rPageAlignLayFrm + @param rPageAlignLayFrame input parameter - layout frame, which determines the 'page area' the object has to be vertical positioned in. @@ -188,14 +188,14 @@ namespace objectpositioning inline SwTwips _AdjustVertRelPos( const SwTwips nTopOfAnch, const bool bVert, const bool bVertL2R, - const SwFrm& rPageAlignLayFrm, + const SwFrame& rPageAlignLayFrame, const SwTwips nProposedRelPosY, const bool bFollowTextFlow, const bool bCheckBottom = true ) const { return !mbDoNotCaptureAnchoredObj ? _ImplAdjustVertRelPos( nTopOfAnch, bVert, bVertL2R, - rPageAlignLayFrm, + rPageAlignLayFrame, nProposedRelPosY, bFollowTextFlow, bCheckBottom ) @@ -205,9 +205,9 @@ namespace objectpositioning /** calculate relative horizontal position #i26791# - add output parameter - <_roHoriOffsetToFrmAnchorPos> + <_roHoriOffsetToFrameAnchorPos> - @param _rHoriOrientFrm + @param _rHoriOrientFrame input parameter - frame the horizontal position of the object is oriented at. @@ -232,20 +232,20 @@ namespace objectpositioning @param _nRelPosY input parameter - relative vertical position - @param _roHoriOffsetToFrmAnchorPos + @param _roHoriOffsetToFrameAnchorPos output parameter - 'horizontal' offset to frame anchor position according to the alignment @return relative horizontal position in SwTwips */ - SwTwips _CalcRelPosX( const SwFrm& _rHoriOrientFrm, + SwTwips _CalcRelPosX( const SwFrame& _rHoriOrientFrame, const SwEnvironmentOfAnchoredObject& _rEnvOfObj, const SwFormatHoriOrient& _rHoriOrient, const SvxLRSpaceItem& _rLRSpacing, const SvxULSpaceItem& _rULSpacing, const bool _bObjWrapThrough, const SwTwips _nRelPosY, - SwTwips& _roHoriOffsetToFrmAnchorPos + SwTwips& _roHoriOffsetToFrameAnchorPos ) const; /** adjust calculated horizontal in order to keep object inside @@ -255,7 +255,7 @@ namespace objectpositioning to private method <_ImplAdjustHoriRelPos>, which is only called, if <mbDoNotCaptureAnchoredObj> not set. - @param _rPageAlignLayFrm + @param _rPageAlignLayFrame input parameter - layout frame, which determines the 'page area' the object has to be horizontal positioned in. @@ -265,11 +265,11 @@ namespace objectpositioning @return adjusted relative horizontal position in SwTwips. */ - inline SwTwips _AdjustHoriRelPos( const SwFrm& _rPageAlignLayFrm, + inline SwTwips _AdjustHoriRelPos( const SwFrame& _rPageAlignLayFrame, const SwTwips _nProposedRelPosX ) const { return !mbDoNotCaptureAnchoredObj - ? _ImplAdjustHoriRelPos( _rPageAlignLayFrm, _nProposedRelPosX ) + ? _ImplAdjustHoriRelPos( _rPageAlignLayFrame, _nProposedRelPosX ) : _nProposedRelPosX; } @@ -294,11 +294,11 @@ namespace objectpositioning /** determine alignment values for horizontal position of object - @param _rHoriOrientFrm + @param _rHoriOrientFrame input parameter - frame the horizontal position of the object is oriented at. - @param _rPageAlignLayFrm + @param _rPageAlignLayFrame input parameter - layout frame, which determines the 'page area' the object has to be horizontal positioned in. @@ -313,7 +313,7 @@ namespace objectpositioning @param _bObjWrapThrough input parameter - boolean indicating, if object has wrap mode 'wrap through'. - important note: value is only relevant, if _rHoriOrientFrm is + important note: value is only relevant, if _rHoriOrientFrame is a text frame. @param _orAlignAreaWidth @@ -329,8 +329,8 @@ namespace objectpositioning output parameter - boolean indicating, that object is aligned to 'page area'. */ - void _GetHoriAlignmentValues( const SwFrm& _rHoriOrientFrm, - const SwFrm& _rPageAlignLayFrm, + void _GetHoriAlignmentValues( const SwFrame& _rHoriOrientFrame, + const SwFrame& _rPageAlignLayFrame, const sal_Int16 _eRelOrient, const bool _bObjWrapThrough, SwTwips& _orAlignAreaWidth, @@ -340,7 +340,7 @@ namespace objectpositioning /** adjust calculated horizontal position in order to draw object aside other objects with same positioning - @param _rHoriOrientFrm + @param _rHoriOrientFrame input parameter - frame the horizontal position of the object is oriented at. @@ -368,7 +368,7 @@ namespace objectpositioning @return adjusted relative horizontal position in SwTwips */ - SwTwips _AdjustHoriRelPosForDrawAside( const SwFrm& _rHoriOrientFrm, + SwTwips _AdjustHoriRelPosForDrawAside( const SwFrame& _rHoriOrientFrame, const SwTwips _nProposedRelPosX, const SwTwips _nRelPosY, const sal_Int16 _eHoriOrient, @@ -406,9 +406,9 @@ namespace objectpositioning @return boolean indicating, if object has to be drawn aside given fly frame. */ - bool _DrawAsideFly( const SwFlyFrm* _pFly, + bool _DrawAsideFly( const SwFlyFrame* _pFly, const SwRect& _rObjRect, - const SwFrm* _pObjContext, + const SwFrame* _pObjContext, const sal_uLong _nObjIndex, const bool _bEvenPage, const sal_Int16 _eHoriOrient, diff --git a/sw/source/core/inc/ascharanchoredobjectposition.hxx b/sw/source/core/inc/ascharanchoredobjectposition.hxx index b346908ab86d..1a2fb9e70bef 100644 --- a/sw/source/core/inc/ascharanchoredobjectposition.hxx +++ b/sw/source/core/inc/ascharanchoredobjectposition.hxx @@ -25,7 +25,7 @@ #include <swtypes.hxx> #include <swrect.hxx> -class SwTextFrm; +class SwTextFrame; class SwFormatVertOrient; namespace objectpositioning @@ -69,8 +69,8 @@ namespace objectpositioning // 0 - no line alignment, 1 - at top, 2 - at center, 3 - at bottom sal_uInt8 mnLineAlignment; - // method to cast <SwAnchoredObjectPosition::GetAnchorFrm()> - const SwTextFrm& GetAnchorTextFrm() const; + // method to cast <SwAnchoredObjectPosition::GetAnchorFrame()> + const SwTextFrame& GetAnchorTextFrame() const; /** determine the relative position to base line for object position diff --git a/sw/source/core/inc/blink.hxx b/sw/source/core/inc/blink.hxx index 6324679224e1..d9beba2cb693 100644 --- a/sw/source/core/inc/blink.hxx +++ b/sw/source/core/inc/blink.hxx @@ -21,8 +21,8 @@ #define INCLUDED_SW_SOURCE_CORE_INC_BLINK_HXX class SwLinePortion; -class SwRootFrm; -class SwTextFrm; +class SwRootFrame; +class SwTextFrame; #include <vcl/timer.hxx> #include <tools/gen.hxx> @@ -35,27 +35,27 @@ class SwBlinkPortion { Point aPos; const SwLinePortion *pPor; - const SwRootFrm *pFrm; + const SwRootFrame *pFrame; sal_uInt16 nDir; public: SwBlinkPortion(const SwLinePortion* pPortion, sal_uInt16 nDirection) : pPor(pPortion) - , pFrm(nullptr) + , pFrame(nullptr) , nDir(nDirection) { } SwBlinkPortion(const SwBlinkPortion* pBlink, const SwLinePortion* pPort) : aPos(pBlink->aPos) , pPor(pPort) - , pFrm(pBlink->pFrm) + , pFrame(pBlink->pFrame) , nDir(pBlink->nDir) { } void SetPos( const Point& aNew ){ aPos = aNew; } const Point& GetPos() const{ return aPos; } - void SetRootFrm( const SwRootFrm* pNew ){ pFrm = pNew; } - const SwRootFrm* GetRootFrm() const{ return pFrm; } + void SetRootFrame( const SwRootFrame* pNew ){ pFrame = pNew; } + const SwRootFrame* GetRootFrame() const{ return pFrame; } const SwLinePortion *GetPortion() const{ return pPor; } sal_uInt16 GetDirection() const { return nDir; } bool operator<( const SwBlinkPortion& rBlinkPortion ) const @@ -80,10 +80,10 @@ public: DECL_LINK_TYPED( Blinker, Timer *, void ); void Insert( const Point& rPoint, const SwLinePortion* pPor, - const SwTextFrm *pTextFrm, sal_uInt16 nDir ); + const SwTextFrame *pTextFrame, sal_uInt16 nDir ); void Replace( const SwLinePortion* pOld, const SwLinePortion* pNew ); void Delete( const SwLinePortion* pPor ); - void FrmDelete( const SwRootFrm* pRoot ); + void FrameDelete( const SwRootFrame* pRoot ); bool IsVisible() const { return bVisible ; } }; diff --git a/sw/source/core/inc/bodyfrm.hxx b/sw/source/core/inc/bodyfrm.hxx index 6d887e43d15d..1fa48fd66e12 100644 --- a/sw/source/core/inc/bodyfrm.hxx +++ b/sw/source/core/inc/bodyfrm.hxx @@ -24,17 +24,17 @@ class SwBorderAttrs; -class SwBodyFrm: public SwLayoutFrm +class SwBodyFrame: public SwLayoutFrame { protected: virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = nullptr ) override; public: - SwBodyFrm( SwFrameFormat*, SwFrm* ); + SwBodyFrame( SwFrameFormat*, SwFrame* ); - virtual void PaintSubsidiaryLines( const SwPageFrm*, const SwRect& ) const override; + virtual void PaintSubsidiaryLines( const SwPageFrame*, const SwRect& ) const override; - DECL_FIXEDMEMPOOL_NEWDEL(SwBodyFrm) + DECL_FIXEDMEMPOOL_NEWDEL(SwBodyFrame) }; #endif diff --git a/sw/source/core/inc/cellfrm.hxx b/sw/source/core/inc/cellfrm.hxx index a6d4dc975525..d33ea5582c8e 100644 --- a/sw/source/core/inc/cellfrm.hxx +++ b/sw/source/core/inc/cellfrm.hxx @@ -24,25 +24,25 @@ #include "layfrm.hxx" class SwTableBox; -struct SwCrsrMoveState; +struct SwCursorMoveState; class SwBorderAttrs; -/// SwCellFrm is one table cell in the document layout. -class SwCellFrm: public SwLayoutFrm +/// SwCellFrame is one table cell in the document layout. +class SwCellFrame: public SwLayoutFrame { const SwTableBox* m_pTabBox; virtual void DestroyImpl() override; - virtual ~SwCellFrm(); + virtual ~SwCellFrame(); protected: virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = nullptr ) override; virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ) override; public: - SwCellFrm( const SwTableBox &, SwFrm*, bool bInsertContent = true ); + SwCellFrame( const SwTableBox &, SwFrame*, bool bInsertContent = true ); - virtual bool GetCrsrOfst( SwPosition *, Point&, SwCrsrMoveState* = nullptr, bool bTestBackground = false ) const override; + virtual bool GetCursorOfst( SwPosition *, Point&, SwCursorMoveState* = nullptr, bool bTestBackground = false ) const override; virtual void Paint( vcl::RenderContext& rRenderContext, SwRect const&, SwPrintData const*const pPrintData = nullptr ) const override; virtual void CheckDirection( bool bVert ) override; @@ -53,14 +53,14 @@ public: const SwTableBox *GetTabBox() const { return m_pTabBox; } // used for breaking table rows: - SwCellFrm* GetFollowCell() const; - SwCellFrm* GetPreviousCell() const; + SwCellFrame* GetFollowCell() const; + SwCellFrame* GetPreviousCell() const; // used for rowspan stuff: - const SwCellFrm& FindStartEndOfRowSpanCell( bool bStart, bool bCurrentTab ) const; + const SwCellFrame& FindStartEndOfRowSpanCell( bool bStart, bool bCurrentTab ) const; long GetLayoutRowSpan() const; - DECL_FIXEDMEMPOOL_NEWDEL(SwCellFrm) + DECL_FIXEDMEMPOOL_NEWDEL(SwCellFrame) }; #endif diff --git a/sw/source/core/inc/cntfrm.hxx b/sw/source/core/inc/cntfrm.hxx index e534b4d05f93..3f9af9402362 100644 --- a/sw/source/core/inc/cntfrm.hxx +++ b/sw/source/core/inc/cntfrm.hxx @@ -25,23 +25,23 @@ #include "cshtyp.hxx" #include "node.hxx" -class SwLayoutFrm; +class SwLayoutFrame; class SwContentNode; class SwBorderAttrs; class SwAttrSetChg; -class SwTextFrm; +class SwTextFrame; // implemented in cntfrm.cxx, used in cntfrm.cxx and crsrsh.cxx -extern bool GetFrmInPage( const SwContentFrm*, SwWhichPage, SwPosPage, SwPaM* ); +extern bool GetFrameInPage( const SwContentFrame*, SwWhichPage, SwPosPage, SwPaM* ); -class SwContentFrm: public SwFrm, public SwFlowFrm +class SwContentFrame: public SwFrame, public SwFlowFrame { - friend void MakeNxt( SwFrm *pFrm, SwFrm *pNxt ); // calls MakePrtArea + friend void MakeNxt( SwFrame *pFrame, SwFrame *pNxt ); // calls MakePrtArea // parameter <bObjsInNewUpper> indicates that objects exist in remaining // area of new upper bool _WouldFit( SwTwips nSpace, - SwLayoutFrm *pNewUpper, + SwLayoutFrame *pNewUpper, bool bTstMove, const bool bObjsInNewUpper ); @@ -50,34 +50,34 @@ class SwContentFrm: public SwFrm, public SwFlowFrm void _UpdateAttr( const SfxPoolItem*, const SfxPoolItem*, sal_uInt8 &, SwAttrSetChg *pa = nullptr, SwAttrSetChg *pb = nullptr ); - virtual bool ShouldBwdMoved( SwLayoutFrm *pNewUpper, bool, bool& ) override; + virtual bool ShouldBwdMoved( SwLayoutFrame *pNewUpper, bool, bool& ) override; - const SwContentFrm* ImplGetNextContentFrm( bool bFwd ) const; + const SwContentFrame* ImplGetNextContentFrame( bool bFwd ) const; protected: bool MakePrtArea( const SwBorderAttrs & ); virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ) override; - virtual SwTwips ShrinkFrm( SwTwips, bool bTst = false, bool bInfo = false ) override; - virtual SwTwips GrowFrm ( SwTwips, bool bTst = false, bool bInfo = false ) override; + virtual SwTwips ShrinkFrame( SwTwips, bool bTst = false, bool bInfo = false ) override; + virtual SwTwips GrowFrame ( SwTwips, bool bTst = false, bool bInfo = false ) override; - SwContentFrm( SwContentNode * const, SwFrm* ); + SwContentFrame( SwContentNode * const, SwFrame* ); virtual void DestroyImpl() override; - virtual ~SwContentFrm(); + virtual ~SwContentFrame(); public: virtual void Cut() override; - virtual void Paste( SwFrm* pParent, SwFrm* pSibling = nullptr ) override; + virtual void Paste( SwFrame* pParent, SwFrame* pSibling = nullptr ) override; inline const SwContentNode *GetNode() const; inline SwContentNode *GetNode(); - inline const SwContentFrm *GetFollow() const; - inline SwContentFrm *GetFollow(); - inline const SwContentFrm *GetPrecede() const; - SwTextFrm* FindMaster() const; + inline const SwContentFrame *GetFollow() const; + inline SwContentFrame *GetFollow(); + inline const SwContentFrame *GetPrecede() const; + SwTextFrame* FindMaster() const; // layout dependent cursor travelling virtual bool LeftMargin( SwPaM * ) const; @@ -92,51 +92,51 @@ public: // bTst indicates that we are currently doing a test formatting virtual bool WouldFit( SwTwips &nMaxHeight, bool &bSplit, bool bTst ); - bool MoveFootnoteCntFwd( bool, SwFootnoteBossFrm* ); // called by MoveFwd if content + bool MoveFootnoteCntFwd( bool, SwFootnoteBossFrame* ); // called by MoveFwd if content - inline SwContentFrm* GetNextContentFrm() const; - inline SwContentFrm* GetPrevContentFrm() const; - static bool CalcLowers( SwLayoutFrm* pLay, const SwLayoutFrm* pDontLeave, long nBottom, bool bSkipRowSpanCells ); + inline SwContentFrame* GetNextContentFrame() const; + inline SwContentFrame* GetPrevContentFrame() const; + static bool CalcLowers( SwLayoutFrame* pLay, const SwLayoutFrame* pDontLeave, long nBottom, bool bSkipRowSpanCells ); void RegisterToNode( SwContentNode& ); }; -inline SwContentFrm* SwContentFrm::GetNextContentFrm() const +inline SwContentFrame* SwContentFrame::GetNextContentFrame() const { - if ( GetNext() && GetNext()->IsContentFrm() ) - return const_cast<SwContentFrm*>(static_cast<const SwContentFrm*>(GetNext())); + if ( GetNext() && GetNext()->IsContentFrame() ) + return const_cast<SwContentFrame*>(static_cast<const SwContentFrame*>(GetNext())); else - return const_cast<SwContentFrm*>(ImplGetNextContentFrm( true )); + return const_cast<SwContentFrame*>(ImplGetNextContentFrame( true )); } -inline SwContentFrm* SwContentFrm::GetPrevContentFrm() const +inline SwContentFrame* SwContentFrame::GetPrevContentFrame() const { - if ( GetPrev() && GetPrev()->IsContentFrm() ) - return const_cast<SwContentFrm*>(static_cast<const SwContentFrm*>(GetPrev())); + if ( GetPrev() && GetPrev()->IsContentFrame() ) + return const_cast<SwContentFrame*>(static_cast<const SwContentFrame*>(GetPrev())); else - return const_cast<SwContentFrm*>(ImplGetNextContentFrm( false )); + return const_cast<SwContentFrame*>(ImplGetNextContentFrame( false )); } -inline SwContentNode *SwContentFrm::GetNode() +inline SwContentNode *SwContentFrame::GetNode() { return static_cast< SwContentNode* >( GetDep() ); } -inline const SwContentNode *SwContentFrm::GetNode() const +inline const SwContentNode *SwContentFrame::GetNode() const { return static_cast< const SwContentNode* >( GetDep() ); } -inline const SwContentFrm *SwContentFrm::GetFollow() const +inline const SwContentFrame *SwContentFrame::GetFollow() const { - return static_cast<const SwContentFrm*>(SwFlowFrm::GetFollow()); + return static_cast<const SwContentFrame*>(SwFlowFrame::GetFollow()); } -inline SwContentFrm *SwContentFrm::GetFollow() +inline SwContentFrame *SwContentFrame::GetFollow() { - return static_cast<SwContentFrm*>(SwFlowFrm::GetFollow()); + return static_cast<SwContentFrame*>(SwFlowFrame::GetFollow()); } -inline const SwContentFrm *SwContentFrm::GetPrecede() const +inline const SwContentFrame *SwContentFrame::GetPrecede() const { - return static_cast<const SwContentFrm*>(SwFlowFrm::GetPrecede()); + return static_cast<const SwContentFrame*>(SwFlowFrame::GetPrecede()); } #endif diff --git a/sw/source/core/inc/colfrm.hxx b/sw/source/core/inc/colfrm.hxx index 66e4e387be59..e54e6b9b757a 100644 --- a/sw/source/core/inc/colfrm.hxx +++ b/sw/source/core/inc/colfrm.hxx @@ -23,19 +23,19 @@ #include <tools/mempool.hxx> #include "ftnboss.hxx" -class SwColumnFrm: public SwFootnoteBossFrm +class SwColumnFrame: public SwFootnoteBossFrame { private: virtual void DestroyImpl() override; - virtual ~SwColumnFrm(); + virtual ~SwColumnFrame(); public: - SwColumnFrm( SwFrameFormat*, SwFrm* ); + SwColumnFrame( SwFrameFormat*, SwFrame* ); virtual void PaintBreak() const override; - virtual void PaintSubsidiaryLines( const SwPageFrm*, const SwRect& ) const override; + virtual void PaintSubsidiaryLines( const SwPageFrame*, const SwRect& ) const override; - DECL_FIXEDMEMPOOL_NEWDEL(SwColumnFrm) + DECL_FIXEDMEMPOOL_NEWDEL(SwColumnFrame) }; #endif // INCLUDED_SW_SOURCE_CORE_INC_COLFRM_HXX diff --git a/sw/source/core/inc/dbg_lay.hxx b/sw/source/core/inc/dbg_lay.hxx index 0febbf8f9a07..04bf1e6f3ee9 100644 --- a/sw/source/core/inc/dbg_lay.hxx +++ b/sw/source/core/inc/dbg_lay.hxx @@ -58,7 +58,7 @@ #include "swtypes.hxx" class SwImplProtocol; -class SwFrm; +class SwFrame; class SwImplEnterLeave; class SwProtocol @@ -71,7 +71,7 @@ public: static sal_uLong Record() { return nRecord; } static void SetRecord( sal_uLong nNew ) { nRecord = nNew; } static bool Record( sal_uLong nFunc ) { return 0 != (( nFunc | PROT_INIT ) & nRecord); } - static void Record( const SwFrm* pFrm, sal_uLong nFunction, sal_uLong nAction, void* pParam ); + static void Record( const SwFrame* pFrame, sal_uLong nFunction, sal_uLong nAction, void* pParam ); static void Init(); static void Stop(); }; @@ -79,14 +79,14 @@ public: class SwEnterLeave { SwImplEnterLeave* pImpl; - void Ctor( const SwFrm* pFrm, sal_uLong nFunc, sal_uLong nAct, void* pPar ); + void Ctor( const SwFrame* pFrame, sal_uLong nFunc, sal_uLong nAct, void* pPar ); void Dtor(); public: - SwEnterLeave( const SwFrm* pFrm, sal_uLong nFunc, sal_uLong nAct, void* pPar ) + SwEnterLeave( const SwFrame* pFrame, sal_uLong nFunc, sal_uLong nAct, void* pPar ) { if( SwProtocol::Record( nFunc ) ) - Ctor( pFrm, nFunc, nAct, pPar ); + Ctor( pFrame, nFunc, nAct, pPar ); else pImpl = nullptr; } @@ -97,18 +97,18 @@ public: } }; -#define PROTOCOL( pFrm, nFunc, nAct, pPar ) { if( SwProtocol::Record( nFunc ) )\ - SwProtocol::Record( pFrm, nFunc, nAct, pPar ); } +#define PROTOCOL( pFrame, nFunc, nAct, pPar ) { if( SwProtocol::Record( nFunc ) )\ + SwProtocol::Record( pFrame, nFunc, nAct, pPar ); } #define PROTOCOL_INIT SwProtocol::Init(); #define PROTOCOL_STOP SwProtocol::Stop(); -#define PROTOCOL_ENTER( pFrm, nFunc, nAct, pPar ) SwEnterLeave aEnter( pFrm, nFunc, nAct, pPar ); +#define PROTOCOL_ENTER( pFrame, nFunc, nAct, pPar ) SwEnterLeave aEnter( pFrame, nFunc, nAct, pPar ); #else -#define PROTOCOL( pFrm, nFunc, nAct, pPar ) +#define PROTOCOL( pFrame, nFunc, nAct, pPar ) #define PROTOCOL_INIT #define PROTOCOL_STOP -#define PROTOCOL_ENTER( pFrm, nFunc, nAct, pPar ) +#define PROTOCOL_ENTER( pFrame, nFunc, nAct, pPar ) #endif diff --git a/sw/source/core/inc/dflyobj.hxx b/sw/source/core/inc/dflyobj.hxx index 40eba1957acb..4a8274db6a28 100644 --- a/sw/source/core/inc/dflyobj.hxx +++ b/sw/source/core/inc/dflyobj.hxx @@ -23,7 +23,7 @@ #include <drawinglayer/geometry/viewinformation2d.hxx> #include <svx/svdovirt.hxx> -class SwFlyFrm; +class SwFlyFrame; class SwFrameFormat; class SdrObjMacroHitRec; @@ -60,7 +60,7 @@ public: class SwVirtFlyDrawObj : public SdrVirtObj { private: - SwFlyFrm *m_pFlyFrm; + SwFlyFrame *m_pFlyFrame; protected: // AW: Need own sdr::contact::ViewContact since AnchorPos from parent is @@ -78,7 +78,7 @@ public: basegfx::B2DRange getInnerBound() const; - SwVirtFlyDrawObj(SdrObject& rNew, SwFlyFrm* pFly); + SwVirtFlyDrawObj(SdrObject& rNew, SwFlyFrame* pFly); virtual ~SwVirtFlyDrawObj(); // override method of base class SdrVirtObj @@ -110,8 +110,8 @@ public: SwFrameFormat *GetFormat(); // methods to get pointers for the Fly - SwFlyFrm* GetFlyFrm() { return m_pFlyFrm; } - const SwFlyFrm* GetFlyFrm() const { return m_pFlyFrm; } + SwFlyFrame* GetFlyFrame() { return m_pFlyFrame; } + const SwFlyFrame* GetFlyFrame() const { return m_pFlyFrame; } void SetRect() const; diff --git a/sw/source/core/inc/docfld.hxx b/sw/source/core/inc/docfld.hxx index bec2ad9ddbd0..47531e223514 100644 --- a/sw/source/core/inc/docfld.hxx +++ b/sw/source/core/inc/docfld.hxx @@ -28,7 +28,7 @@ class SwTextField; class SwIndex; class SwNodeIndex; -class SwContentFrm; +class SwContentFrame; class SwSectionNode; class SwSection; class SwTextTOXMark; @@ -100,7 +100,7 @@ public: const SwNode* GetNodeFromContent() const; sal_Int32 GetCntPosFromContent() const; - void SetBodyPos( const SwContentFrm& rFrm ); + void SetBodyPos( const SwContentFrame& rFrame ); }; class _SetGetExpFields : public o3tl::sorted_vector<_SetGetExpField*, o3tl::less_ptr_to<_SetGetExpField> > diff --git a/sw/source/core/inc/drawfont.hxx b/sw/source/core/inc/drawfont.hxx index a8852e164cbc..d5cc3daafda2 100644 --- a/sw/source/core/inc/drawfont.hxx +++ b/sw/source/core/inc/drawfont.hxx @@ -25,7 +25,7 @@ #include <vcl/vclptr.hxx> #include <vcl/outdev.hxx> -class SwTextFrm; +class SwTextFrame; class SwViewShell; class SwScriptInfo; class Point; @@ -42,7 +42,7 @@ class SwUnderlineFont; // encapsulates information for drawing text class SW_DLLPUBLIC SwDrawTextInfo { - const SwTextFrm* m_pFrm; + const SwTextFrame* m_pFrame; VclPtr<OutputDevice> m_pOut; SwViewShell const * m_pSh; const SwScriptInfo* m_pScriptInfo; @@ -79,8 +79,8 @@ class SW_DLLPUBLIC SwDrawTextInfo bool m_bSpaceStop : 1; bool m_bSnapToGrid : 1; // Does paragraph snap to grid? // Paint text as if text has LTR direction, used for line numbering - bool m_bIgnoreFrmRTL : 1; - // GetCrsrOfst should not return the next position if screen position is + bool m_bIgnoreFrameRTL : 1; + // GetCursorOfst should not return the next position if screen position is // inside second half of bound rect, used for Accessibility bool m_bPosMatchesBounds :1; @@ -114,7 +114,7 @@ public: vcl::TextLayoutCache const*const pCachedVclData = nullptr) : m_pCachedVclData(pCachedVclData) { - m_pFrm = nullptr; + m_pFrame = nullptr; m_pSh = pSh; m_pOut = &rOut; m_pScriptInfo = pSI; @@ -131,7 +131,7 @@ public: m_bGreyWave = false; m_bSpaceStop = false; m_bSnapToGrid = false; - m_bIgnoreFrmRTL = false; + m_bIgnoreFrameRTL = false; m_bPosMatchesBounds = false; // These values are initialized but have to be set explicitly via their @@ -162,14 +162,14 @@ public: #endif } - const SwTextFrm* GetFrm() const + const SwTextFrame* GetFrame() const { - return m_pFrm; + return m_pFrame; } - void SetFrm( const SwTextFrm* pNewFrm ) + void SetFrame( const SwTextFrame* pNewFrame ) { - m_pFrm = pNewFrm; + m_pFrame = pNewFrame; } SwViewShell const *GetShell() const @@ -379,9 +379,9 @@ public: return m_bSnapToGrid; } - bool IsIgnoreFrmRTL() const + bool IsIgnoreFrameRTL() const { - return m_bIgnoreFrmRTL; + return m_bIgnoreFrameRTL; } bool IsPosMatchesBounds() const @@ -590,9 +590,9 @@ public: m_bSnapToGrid = bNew; } - void SetIgnoreFrmRTL( bool bNew ) + void SetIgnoreFrameRTL( bool bNew ) { - m_bIgnoreFrmRTL = bNew; + m_bIgnoreFrameRTL = bNew; } void SetPosMatchesBounds( bool bNew ) diff --git a/sw/source/core/inc/dview.hxx b/sw/source/core/inc/dview.hxx index dad1fe298a39..9bf76c1ede5e 100644 --- a/sw/source/core/inc/dview.hxx +++ b/sw/source/core/inc/dview.hxx @@ -23,8 +23,8 @@ class OutputDevice; class SwViewShellImp; -class SwFrm; -class SwFlyFrm; +class SwFrame; +class SwFlyFrame; class SwAnchoredObject; class SdrUndoManager; @@ -33,7 +33,7 @@ class SwDrawView : public FmFormView Point aAnchorPoint; // anchor position SwViewShellImp &rImp; // a view is always part of a shell - const SwFrm *CalcAnchor(); + const SwFrame *CalcAnchor(); /** determine maximal order number for a 'child' object of given 'parent' object @@ -50,7 +50,7 @@ class SwDrawView : public FmFormView optional input parameter - 'child' object, which will not be considered on the calculation of the maximal order number */ - static sal_uInt32 _GetMaxChildOrdNum( const SwFlyFrm& _rParentObj, + static sal_uInt32 _GetMaxChildOrdNum( const SwFlyFrame& _rParentObj, const SdrObject* _pExclChildObj = nullptr ); /** method to move 'repeated' objects of the given moved object to the diff --git a/sw/source/core/inc/environmentofanchoredobject.hxx b/sw/source/core/inc/environmentofanchoredobject.hxx index 462dfbd87ab9..13415589191e 100644 --- a/sw/source/core/inc/environmentofanchoredobject.hxx +++ b/sw/source/core/inc/environmentofanchoredobject.hxx @@ -20,8 +20,8 @@ #ifndef INCLUDED_SW_SOURCE_CORE_INC_ENVIRONMENTOFANCHOREDOBJECT_HXX #define INCLUDED_SW_SOURCE_CORE_INC_ENVIRONMENTOFANCHOREDOBJECT_HXX -class SwFrm; -class SwLayoutFrm; +class SwFrame; +class SwLayoutFrame; namespace objectpositioning { @@ -56,7 +56,7 @@ namespace objectpositioning - no exception any more. Thus remove parameter <_bForPageAlignment> - @param _rHoriOrientFrm + @param _rHoriOrientFrame input parameter - frame, at which the horizontal position is oriented at (typically it's the anchor frame). starting point for the search of the layout frame. @@ -64,7 +64,7 @@ namespace objectpositioning @return reference to the layout frame, which determines the the horizontal environment the object has to be positioned in. */ - const SwLayoutFrm& GetHoriEnvironmentLayoutFrm( const SwFrm& _rHoriOrientFrm ) const; + const SwLayoutFrame& GetHoriEnvironmentLayoutFrame( const SwFrame& _rHoriOrientFrame ) const; /** determine environment layout frame for possible vertical object positions respectively for alignments to 'page areas' @@ -81,7 +81,7 @@ namespace objectpositioning - no exception any more. Thus remove parameter <_bForPageAlignment> - @param _rVertOrientFrm + @param _rVertOrientFrame input parameter - frame, at which the vertical position is oriented at (typically it's the anchor frame). starting point for the search of the layout frame. @@ -89,7 +89,7 @@ namespace objectpositioning @return reference to the layout frame, which determines the the vertical environment the object has to be positioned in. */ - const SwLayoutFrm& GetVertEnvironmentLayoutFrm( const SwFrm& _rVertOrientFrm ) const; + const SwLayoutFrame& GetVertEnvironmentLayoutFrame( const SwFrame& _rVertOrientFrame ) const; }; } diff --git a/sw/source/core/inc/fefly.hxx b/sw/source/core/inc/fefly.hxx index 6ab335a436d7..b030b47f16af 100644 --- a/sw/source/core/inc/fefly.hxx +++ b/sw/source/core/inc/fefly.hxx @@ -20,7 +20,7 @@ #ifndef INCLUDED_SW_SOURCE_CORE_INC_FEFLY_HXX #define INCLUDED_SW_SOURCE_CORE_INC_FEFLY_HXX -bool sw_ChkAndSetNewAnchor( const SwFlyFrm& rFly, SfxItemSet& rSet ); +bool sw_ChkAndSetNewAnchor( const SwFlyFrame& rFly, SfxItemSet& rSet ); #endif diff --git a/sw/source/core/inc/flowfrm.hxx b/sw/source/core/inc/flowfrm.hxx index d94bd5e9fda5..86771b5bc56f 100644 --- a/sw/source/core/inc/flowfrm.hxx +++ b/sw/source/core/inc/flowfrm.hxx @@ -22,66 +22,66 @@ #include "frmtool.hxx" -class SwPageFrm; +class SwPageFrame; class SwRect; class SwBorderAttrs; class SwDoc; class SwNodeIndex; // #i44049# -class SwObjectFormatterTextFrm; +class SwObjectFormatterTextFrame; /** Base class that provides the general functionalities for frames that are allowed at page breaks (flow) and shall continue on the next page (can be - split), e.g. paragraphs (ContentFrm) or tables (TabFrm). + split), e.g. paragraphs (ContentFrame) or tables (TabFrame). - Some parts of these functionalities are implemented in FlowFrm while the - specific ones are done in the corresponding Frm classes. The FlowFrm has to - be seen as a base class. As such it is no Frm by itself and thus no direct - instances of FlowFrm can exist. + Some parts of these functionalities are implemented in FlowFrame while the + specific ones are done in the corresponding Frame classes. The FlowFrame has to + be seen as a base class. As such it is no Frame by itself and thus no direct + instances of FlowFrame can exist. - Actually it is not even a real Frm. The obvious implementation would be a - FlowFrm that is virtually inherited from SwFrm and that works with its own - member data. Further classes would need to inherit from FlowFrm and (via + Actually it is not even a real Frame. The obvious implementation would be a + FlowFrame that is virtually inherited from SwFrame and that works with its own + member data. Further classes would need to inherit from FlowFrame and (via multiple base classes since the class tree splits exactly at the branch - from SwFrm to SwContentFrm and SwLayoutFrm) also virtually from SwFrm as + from SwFrame to SwContentFrame and SwLayoutFrame) also virtually from SwFrame as well. Unfortunately, this leads - besides problems with compilers and debugging programs - to high additional costs, that we IMHO are not able to afford nowadays. - Hence, we use another technique: A FlowFrm keeps a reference to a SwFrm + Hence, we use another technique: A FlowFrame keeps a reference to a SwFrame - which it is actually itself - and they are friends. As a result, the - FlowFrm can work with the reference to the SwFrm instead of working with + FlowFrame can work with the reference to the SwFrame instead of working with its own this-pointer. */ -class SwFlowFrm +class SwFlowFrame { // PrepareMake is allowed to lock/unlock (robustness) - friend inline void PrepareLock ( SwFlowFrm * ); - friend inline void PrepareUnlock( SwFlowFrm * ); - friend inline void TableSplitRecalcLock( SwFlowFrm * ); - friend inline void TableSplitRecalcUnlock( SwFlowFrm * ); + friend inline void PrepareLock ( SwFlowFrame * ); + friend inline void PrepareUnlock( SwFlowFrame * ); + friend inline void TableSplitRecalcLock( SwFlowFrame * ); + friend inline void TableSplitRecalcUnlock( SwFlowFrame * ); // #i44049# - friend class SwObjectFormatterTextFrm; - friend class FlowFrmJoinLockGuard; + friend class SwObjectFormatterTextFrame; + friend class FlowFrameJoinLockGuard; // TableSel is allowed to reset the follow-bit - friend inline void UnsetFollow( SwFlowFrm *pFlow ); + friend inline void UnsetFollow( SwFlowFrame *pFlow ); - friend void MakeFrms( SwDoc *, const SwNodeIndex &, const SwNodeIndex & ); + friend void MakeFrames( SwDoc *, const SwNodeIndex &, const SwNodeIndex & ); friend class SwNode2LayImpl; - SwFrm& m_rThis; + SwFrame& m_rThis; // helper methods for MoveSubTree() - static SwLayoutFrm *CutTree( SwFrm* ); - static bool PasteTree( SwFrm *, SwLayoutFrm *, SwFrm *, SwFrm* ); + static SwLayoutFrame *CutTree( SwFrame* ); + static bool PasteTree( SwFrame *, SwLayoutFrame *, SwFrame *, SwFrame* ); /** indicates that a backward move was done over multiple pages Needed for the interaction of _GetPrevxxx and MoveBwd so that multiple pages can be skipped at the same time. In addition, it is evaluated by - the MoveBwd() method in TabFrm. + the MoveBwd() method in TabFrame. */ static bool m_bMoveBwdJump; @@ -90,18 +90,18 @@ class SwFlowFrm #i11860# - @param _pProposedPrevFrm + @param _pProposedPrevFrame optional input parameter - pointer to frame, which should be used instead of the direct previous frame. */ - const SwFrm* _GetPrevFrmForUpperSpaceCalc( const SwFrm* _pProposedPrevFrm = nullptr ) const; + const SwFrame* _GetPrevFrameForUpperSpaceCalc( const SwFrame* _pProposedPrevFrame = nullptr ) const; /** method to detemine the upper space amount, which is considered for the previous frame #i11860# */ - SwTwips _GetUpperSpaceAmountConsideredForPrevFrm() const; + SwTwips _GetUpperSpaceAmountConsideredForPrevFrame() const; /** method to detemine the upper space amount, which is considered for the page grid @@ -112,8 +112,8 @@ class SwFlowFrm const SwTwips _nUpperSpaceWithoutGrid ) const; protected: - SwFlowFrm *m_pFollow; - SwFlowFrm *m_pPrecede; + SwFlowFrame *m_pFollow; + SwFlowFrame *m_pPrecede; bool m_bLockJoin :1; // if true than joins (and thus deletes) are prohibited! bool m_bUndersized:1; // I am smaller than needed @@ -122,17 +122,17 @@ protected: // checks if forward flow makes sense to prevent infinite moves inline bool IsFwdMoveAllowed(); // #i44049# - method <CalcContent(..)> has to check this property. - friend void CalcContent( SwLayoutFrm *pLay, bool bNoColl, bool bNoCalcFollow ); + friend void CalcContent( SwLayoutFrame *pLay, bool bNoColl, bool bNoCalcFollow ); bool IsKeepFwdMoveAllowed(); // like above, forward flow for Keep. /** method to determine overlapping of an object that requests floating 0: no overlapping - 1: objects that are anchored at the FlowFrm overlap + 1: objects that are anchored at the FlowFrame overlap 2: objects that are anchored somewhere else overlap 3: both types of objects overlap */ - sal_uInt8 BwdMoveNecessary( const SwPageFrm *pPage, const SwRect &rRect ); + sal_uInt8 BwdMoveNecessary( const SwPageFrame *pPage, const SwRect &rRect ); void LockJoin() { m_bLockJoin = true; } void UnlockJoin() { m_bLockJoin = false; } @@ -140,14 +140,14 @@ protected: bool CheckMoveFwd( bool& rbMakePage, bool bKeep, bool bMovedBwd ); bool MoveFwd( bool bMakePage, bool bPageBreak, bool bMoveAlways = false ); bool MoveBwd( bool &rbReformat ); - virtual bool ShouldBwdMoved( SwLayoutFrm *pNewUpper, bool bHead, bool &rReformat )=0; + virtual bool ShouldBwdMoved( SwLayoutFrame *pNewUpper, bool bHead, bool &rReformat )=0; public: - SwFlowFrm( SwFrm &rFrm ); - virtual ~SwFlowFrm(); + SwFlowFrame( SwFrame &rFrame ); + virtual ~SwFlowFrame(); - const SwFrm& GetFrm() const { return m_rThis; } - SwFrm& GetFrm() { return m_rThis; } + const SwFrame& GetFrame() const { return m_rThis; } + SwFrame& GetFrame() { return m_rThis; } static bool IsMoveBwdJump() { return m_bMoveBwdJump; } static void SetMoveBwdJump( bool bNew ){ m_bMoveBwdJump = bNew; } @@ -158,17 +158,17 @@ public: bool IsPrevObjMove() const; /** hook tree onto new parent with minimal operations and notifications */ - void MoveSubTree( SwLayoutFrm* pParent, SwFrm* pSibling = nullptr ); + void MoveSubTree( SwLayoutFrame* pParent, SwFrame* pSibling = nullptr ); bool HasFollow() const { return m_pFollow != nullptr; } bool IsFollow() const { return nullptr != m_pPrecede; } - bool IsAnFollow( const SwFlowFrm *pFlow ) const; - const SwFlowFrm *GetFollow() const { return m_pFollow; } - SwFlowFrm *GetFollow() { return m_pFollow; } - void SetFollow(SwFlowFrm *const pFollow); + bool IsAnFollow( const SwFlowFrame *pFlow ) const; + const SwFlowFrame *GetFollow() const { return m_pFollow; } + SwFlowFrame *GetFollow() { return m_pFollow; } + void SetFollow(SwFlowFrame *const pFollow); - const SwFlowFrm *GetPrecede() const { return m_pPrecede; } - SwFlowFrm *GetPrecede() { return m_pPrecede; } + const SwFlowFrame *GetPrecede() const { return m_pPrecede; } + SwFlowFrame *GetPrecede() { return m_pPrecede; } bool IsJoinLocked() const { return m_bLockJoin; } bool IsAnyJoinLocked() const { return m_bLockJoin || HasLockedFollow(); } @@ -191,7 +191,7 @@ public: optional input parameter - consider the page grid while calculating? */ SwTwips CalcUpperSpace( const SwBorderAttrs *pAttrs = nullptr, - const SwFrm* pPr = nullptr, + const SwFrame* pPr = nullptr, const bool _bConsiderGrid = true ) const; /** method to determine the upper space amount, which is considered for @@ -200,7 +200,7 @@ public: #i11860# */ - SwTwips GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() const; + SwTwips GetUpperSpaceAmountConsideredForPrevFrameAndPageGrid() const; /** calculation of lower space */ SwTwips CalcLowerSpace( const SwBorderAttrs* _pAttrs = nullptr ) const; @@ -225,31 +225,31 @@ public: void SetFlyLock( bool bNew ){ m_bFlyLock = bNew; } bool IsFlyLock() const { return m_bFlyLock; } - // Casting of a Frm into a FlowFrm (if it is one, otherwise 0) + // Casting of a Frame into a FlowFrame (if it is one, otherwise 0) // These methods need to be customized in subclasses! - static SwFlowFrm *CastFlowFrm( SwFrm *pFrm ); - static const SwFlowFrm *CastFlowFrm( const SwFrm *pFrm ); + static SwFlowFrame *CastFlowFrame( SwFrame *pFrame ); + static const SwFlowFrame *CastFlowFrame( const SwFrame *pFrame ); }; -inline bool SwFlowFrm::IsFwdMoveAllowed() +inline bool SwFlowFrame::IsFwdMoveAllowed() { return m_rThis.GetIndPrev() != nullptr; } -//use this to protect a SwLayoutFrm for a given scope from getting merged with +//use this to protect a SwLayoutFrame for a given scope from getting merged with //its neighbour and thus deleted -class FlowFrmJoinLockGuard +class FlowFrameJoinLockGuard { private: - SwFlowFrm *m_pFlow; + SwFlowFrame *m_pFlow; bool m_bOldJoinLocked; public: //JoinLock pParent for the lifetime of the Cut/Paste call, etc. to avoid - //SwSectionFrm::MergeNext removing the pParent we're trying to reparent + //SwSectionFrame::MergeNext removing the pParent we're trying to reparent //into - FlowFrmJoinLockGuard(SwLayoutFrm* pFrm) + FlowFrameJoinLockGuard(SwLayoutFrame* pFrame) { - m_pFlow = SwFlowFrm::CastFlowFrm(pFrm); + m_pFlow = SwFlowFrame::CastFlowFrame(pFrame); if (m_pFlow) { m_bOldJoinLocked = m_pFlow->IsJoinLocked(); @@ -261,7 +261,7 @@ public: } } - ~FlowFrmJoinLockGuard() + ~FlowFrameJoinLockGuard() { if (m_pFlow && !m_bOldJoinLocked) m_pFlow->UnlockJoin(); diff --git a/sw/source/core/inc/flyfrm.hxx b/sw/source/core/inc/flyfrm.hxx index dbe0e03812b3..22c766066d69 100644 --- a/sw/source/core/inc/flyfrm.hxx +++ b/sw/source/core/inc/flyfrm.hxx @@ -24,9 +24,9 @@ #include <list> #include "frmfmt.hxx" -class SwPageFrm; -class SwFormatFrmSize; -struct SwCrsrMoveState; +class SwPageFrame; +class SwFormatFrameSize; +struct SwCursorMoveState; class SwBorderAttrs; class SwVirtFlyDrawObj; class SwFrameFormats; @@ -44,7 +44,7 @@ class SwFormat; implemented in layout/flycnt.cxx */ -const SwContentFrm *FindAnchor( const SwFrm *pOldAnch, const Point &rNew, +const SwContentFrame *FindAnchor( const SwFrame *pOldAnch, const Point &rNew, const bool bBody = false ); /** calculate rectangle in that the object can be moved or rather be resized */ @@ -52,13 +52,13 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove = true ); /** general base class for all free-flowing frames - #i26791# - inherit also from <SwAnchoredFlyFrm> + #i26791# - inherit also from <SwAnchoredFlyFrame> */ -class SwFlyFrm : public SwLayoutFrm, public SwAnchoredObject +class SwFlyFrame : public SwLayoutFrame, public SwAnchoredObject { // is allowed to lock, implemented in frmtool.cxx - friend void AppendObjs ( const SwFrameFormats *, sal_uLong, SwFrm *, SwPageFrm *, SwDoc* ); - friend void Notify( SwFlyFrm *, SwPageFrm *pOld, const SwRect &rOld, + friend void AppendObjs ( const SwFrameFormats *, sal_uLong, SwFrame *, SwPageFrame *, SwDoc* ); + friend void Notify( SwFlyFrame *, SwPageFrame *pOld, const SwRect &rOld, const SwRect* pOldPrt ); void InitDrawObj( bool bNotify ); // these to methods are called in the @@ -67,14 +67,14 @@ class SwFlyFrm : public SwLayoutFrm, public SwAnchoredObject void _UpdateAttr( const SfxPoolItem*, const SfxPoolItem*, sal_uInt8 &, SwAttrSetChg *pa = nullptr, SwAttrSetChg *pb = nullptr ); - using SwLayoutFrm::CalcRel; + using SwLayoutFrame::CalcRel; sal_uInt32 _GetOrdNumForNewRef( const SwFlyDrawContact* ); SwVirtFlyDrawObj* CreateNewRef( SwFlyDrawContact* ); protected: // Predecessor/Successor for chaining with text flow - SwFlyFrm *m_pPrevLink, *m_pNextLink; + SwFlyFrame *m_pPrevLink, *m_pNextLink; private: // It must be possible to block Content-bound flys so that they will be not @@ -116,9 +116,9 @@ protected: // is moved to an invisible layer. bool m_bLockDeleteContent :1; - friend class SwNoTextFrm; // is allowed to call NotifyBackground + friend class SwNoTextFrame; // is allowed to call NotifyBackground - Point m_aContentPos; // content area's position relatively to Frm + Point m_aContentPos; // content area's position relatively to Frame bool m_bValidContentPos; virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = nullptr ) override; @@ -128,13 +128,13 @@ protected: void Lock() { m_bLocked = true; } void Unlock() { m_bLocked = false; } - Size CalcRel( const SwFormatFrmSize &rSz ) const; + Size CalcRel( const SwFormatFrameSize &rSz ) const; SwTwips CalcAutoWidth() const; - SwFlyFrm( SwFlyFrameFormat*, SwFrm*, SwFrm *pAnchor ); + SwFlyFrame( SwFlyFrameFormat*, SwFrame*, SwFrame *pAnchor ); virtual void DestroyImpl() override; - virtual ~SwFlyFrm(); + virtual ~SwFlyFrame(); /** method to assure that anchored object is registered at the correct page frame @@ -159,28 +159,28 @@ public: virtual void Paint( vcl::RenderContext& rRenderContext, SwRect const&, SwPrintData const*const pPrintData = nullptr ) const override; virtual Size ChgSize( const Size& aNewSize ) override; - virtual bool GetCrsrOfst( SwPosition *, Point&, - SwCrsrMoveState* = nullptr, bool bTestBackground = false ) const override; + virtual bool GetCursorOfst( SwPosition *, Point&, + SwCursorMoveState* = nullptr, bool bTestBackground = false ) const override; virtual void CheckDirection( bool bVert ) override; virtual void Cut() override; #ifdef DBG_UTIL - virtual void Paste( SwFrm* pParent, SwFrm* pSibling = nullptr ) override; + virtual void Paste( SwFrame* pParent, SwFrame* pSibling = nullptr ) override; #endif SwTwips _Shrink( SwTwips, bool bTst ); SwTwips _Grow ( SwTwips, bool bTst ); - void _Invalidate( SwPageFrm *pPage = nullptr ); + void _Invalidate( SwPageFrame *pPage = nullptr ); - bool FrmSizeChg( const SwFormatFrmSize & ); + bool FrameSizeChg( const SwFormatFrameSize & ); - SwFlyFrm *GetPrevLink() const { return m_pPrevLink; } - SwFlyFrm *GetNextLink() const { return m_pNextLink; } + SwFlyFrame *GetPrevLink() const { return m_pPrevLink; } + SwFlyFrame *GetNextLink() const { return m_pNextLink; } - static void ChainFrames( SwFlyFrm *pMaster, SwFlyFrm *pFollow ); - static void UnchainFrames( SwFlyFrm *pMaster, SwFlyFrm *pFollow ); + static void ChainFrames( SwFlyFrame *pMaster, SwFlyFrame *pFollow ); + static void UnchainFrames( SwFlyFrame *pMaster, SwFlyFrame *pFollow ); - SwFlyFrm *FindChainNeighbour( SwFrameFormat &rFormat, SwFrm *pAnch = nullptr ); + SwFlyFrame *FindChainNeighbour( SwFrameFormat &rFormat, SwFrame *pAnch = nullptr ); // #i26791# const SwVirtFlyDrawObj* GetVirtDrawObj() const; @@ -189,16 +189,16 @@ public: void ChgRelPos( const Point &rAbsPos ); bool IsInvalid() const { return m_bInvalid; } - void Invalidate() const { const_cast<SwFlyFrm*>(this)->m_bInvalid = true; } - void Validate() const { const_cast<SwFlyFrm*>(this)->m_bInvalid = false; } + void Invalidate() const { const_cast<SwFlyFrame*>(this)->m_bInvalid = true; } + void Validate() const { const_cast<SwFlyFrame*>(this)->m_bInvalid = false; } bool IsMinHeight() const { return m_bMinHeight; } bool IsLocked() const { return m_bLocked; } bool IsAutoPos() const { return m_bAutoPosition; } - bool IsFlyInCntFrm() const { return m_bInCnt; } - bool IsFlyFreeFrm() const { return m_bAtCnt || m_bLayout; } - bool IsFlyLayFrm() const { return m_bLayout; } - bool IsFlyAtCntFrm() const { return m_bAtCnt; } + bool IsFlyInContentFrame() const { return m_bInCnt; } + bool IsFlyFreeFrame() const { return m_bAtCnt || m_bLayout; } + bool IsFlyLayFrame() const { return m_bLayout; } + bool IsFlyAtContentFrame() const { return m_bAtCnt; } bool IsNotifyBack() const { return m_bNotifyBack; } void SetNotifyBack() { m_bNotifyBack = true; } @@ -209,13 +209,13 @@ public: bool IsClipped() const { return m_bHeightClipped || m_bWidthClipped; } bool IsHeightClipped() const { return m_bHeightClipped; } - bool IsLowerOf( const SwLayoutFrm* pUpper ) const; - inline bool IsUpperOf( const SwFlyFrm& _rLower ) const + bool IsLowerOf( const SwLayoutFrame* pUpper ) const; + inline bool IsUpperOf( const SwFlyFrame& _rLower ) const { return _rLower.IsLowerOf( this ); } - SwFrm *FindLastLower(); + SwFrame *FindLastLower(); // #i13147# - add parameter <_bForPaint> to avoid load of // the graphic during paint. Default value: false @@ -225,7 +225,7 @@ public: // Paint on this shell (consider Preview, print flag, etc. recursively)? static bool IsPaint( SdrObject *pObj, const SwViewShell *pSh ); - /** SwFlyFrm::IsBackgroundTransparent + /** SwFlyFrame::IsBackgroundTransparent determines if background of fly frame has to be drawn transparently @@ -236,7 +236,7 @@ public: */ bool IsBackgroundTransparent() const; - void Chain( SwFrm* _pAnchor ); + void Chain( SwFrame* _pAnchor ); void Unchain(); void InsertCnt(); void DeleteCnt(); @@ -261,13 +261,13 @@ public: virtual bool IsFormatPossible() const override; static void GetAnchoredObjects( std::list<SwAnchoredObject*>&, const SwFormat& rFormat ); - // overwriting "SwFrameFormat *SwLayoutFrm::GetFormat" to provide the correct derived return type. + // overwriting "SwFrameFormat *SwLayoutFrame::GetFormat" to provide the correct derived return type. // (This is in order to skip on the otherwise necessary casting of the result to // 'SwFlyFrameFormat *' after calls to this function. The casting is now done in this function.) virtual const SwFlyFrameFormat *GetFormat() const override; virtual SwFlyFrameFormat *GetFormat() override; - virtual void dumpAsXml( xmlTextWriterPtr writer ) const override { SwLayoutFrm::dumpAsXml( writer ); }; + virtual void dumpAsXml( xmlTextWriterPtr writer ) const override { SwLayoutFrame::dumpAsXml( writer ); }; virtual void Calc(vcl::RenderContext* pRenderContext) const override; diff --git a/sw/source/core/inc/flyfrms.hxx b/sw/source/core/inc/flyfrms.hxx index 115f25e8fd71..a887f46af6b8 100644 --- a/sw/source/core/inc/flyfrms.hxx +++ b/sw/source/core/inc/flyfrms.hxx @@ -24,11 +24,11 @@ #include "flyfrm.hxx" // #i28701# -class SwFlyAtCntFrm; +class SwFlyAtContentFrame; // Base class for those Flys that can "move freely" or better that are not // bound in Content. -class SwFlyFreeFrm : public SwFlyFrm +class SwFlyFreeFrame : public SwFlyFrame { // #i34753# - flag for at-page anchored Writer fly frames // to prevent a positioning - call of method <MakeObjPos()> -, if Writer @@ -38,9 +38,9 @@ class SwFlyFreeFrm : public SwFlyFrm // #i37068# - flag to prevent move in method <CheckClip(..)> bool mbNoMoveOnCheckClip; - SwRect maUnclippedFrm; + SwRect maUnclippedFrame; - void CheckClip( const SwFormatFrmSize &rSz ); //'Emergency' Clipping. + void CheckClip( const SwFormatFrameSize &rSz ); //'Emergency' Clipping. /** determines, if direct environment of fly frame has 'auto' size @@ -58,12 +58,12 @@ protected: // #i28701# - new friend class <SwFlyNotify> for access to // method <NotifyBackground> friend class SwFlyNotify; - virtual void NotifyBackground( SwPageFrm *pPage, + virtual void NotifyBackground( SwPageFrame *pPage, const SwRect& rRect, PrepareHint eHint) override; - SwFlyFreeFrm( SwFlyFrameFormat*, SwFrm*, SwFrm *pAnchor ); + SwFlyFreeFrame( SwFlyFrameFormat*, SwFrame*, SwFrame *pAnchor ); virtual void DestroyImpl() override; - virtual ~SwFlyFreeFrm(); + virtual ~SwFlyFreeFrame(); public: // #i28701# @@ -82,14 +82,14 @@ public: // #i34753# - accessors for member <mbNoMakePos> inline void SetNoMakePos( const bool _bNoMakePos ) { - if ( IsFlyLayFrm() ) + if ( IsFlyLayFrame() ) { mbNoMakePos = _bNoMakePos; } } inline bool IsNoMakePos() const { - if ( IsFlyLayFrm() ) + if ( IsFlyLayFrame() ) { return mbNoMakePos; } @@ -99,39 +99,39 @@ public: } } - inline const SwRect& GetUnclippedFrm( ) const + inline const SwRect& GetUnclippedFrame( ) const { - if ( maUnclippedFrm.HasArea( ) ) - return maUnclippedFrm; + if ( maUnclippedFrame.HasArea( ) ) + return maUnclippedFrame; else - return Frm(); + return Frame(); } /** method to determine, if a format on the Writer fly frame is possible #i28701# refine 'IsFormatPossible'-conditions of method - <SwFlyFrm::IsFormatPossible()> by: + <SwFlyFrame::IsFormatPossible()> by: format isn't possible, if Writer fly frame isn't registered at a page frame and its anchor frame isn't inside another Writer fly frame. */ virtual bool IsFormatPossible() const override; }; -// Flys that are bound to LayoutFrms and not to Content -class SwFlyLayFrm : public SwFlyFreeFrm +// Flys that are bound to LayoutFrames and not to Content +class SwFlyLayFrame : public SwFlyFreeFrame { public: // #i28701# - SwFlyLayFrm( SwFlyFrameFormat*, SwFrm*, SwFrm *pAnchor ); + SwFlyLayFrame( SwFlyFrameFormat*, SwFrame*, SwFrame *pAnchor ); protected: virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ) override; }; // Flys that are bound to Content but not in Content -class SwFlyAtCntFrm : public SwFlyFreeFrm +class SwFlyAtContentFrame : public SwFlyFreeFrame { protected: virtual void MakeAll(vcl::RenderContext* pRenderContext) override; @@ -150,7 +150,7 @@ protected: public: // #i28701# - SwFlyAtCntFrm( SwFlyFrameFormat*, SwFrm*, SwFrm *pAnchor ); + SwFlyAtContentFrame( SwFlyFrameFormat*, SwFrame*, SwFrame *pAnchor ); void SetAbsPos( const Point &rNew ); @@ -161,14 +161,14 @@ public: #i28701# refine 'IsFormatPossible'-conditions of method - <SwFlyFreeFrm::IsFormatPossible()> by: + <SwFlyFreeFrame::IsFormatPossible()> by: format isn't possible, if method <MakeAll()> is already in progress. */ virtual bool IsFormatPossible() const override; }; // Flys that are bound to a character in Content -class SwFlyInCntFrm : public SwFlyFrm +class SwFlyInContentFrame : public SwFlyFrame { Point aRef; // relative to this point AbsPos is being calculated @@ -176,10 +176,10 @@ class SwFlyInCntFrm : public SwFlyFrm bool bInvalidContent :1; virtual void DestroyImpl() override; - virtual ~SwFlyInCntFrm(); + virtual ~SwFlyInContentFrame(); protected: - virtual void NotifyBackground( SwPageFrm *pPage, + virtual void NotifyBackground( SwPageFrame *pPage, const SwRect& rRect, PrepareHint eHint) override; virtual void MakeAll(vcl::RenderContext* pRenderContext) override; virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ) override; @@ -187,7 +187,7 @@ protected: public: // #i28701# - SwFlyInCntFrm( SwFlyFrameFormat*, SwFrm*, SwFrm *pAnchor ); + SwFlyInContentFrame( SwFlyFrameFormat*, SwFrame*, SwFrame *pAnchor ); virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = nullptr ) override; @@ -218,13 +218,13 @@ public: virtual void _ActionOnInvalidation( const InvalidationType _nInvalid ) override; }; -inline void SwFlyInCntFrm::InvalidateLayout() const +inline void SwFlyInContentFrame::InvalidateLayout() const { - const_cast<SwFlyInCntFrm*>(this)->bInvalidLayout = true; + const_cast<SwFlyInContentFrame*>(this)->bInvalidLayout = true; } -inline void SwFlyInCntFrm::InvalidateContent() const +inline void SwFlyInContentFrame::InvalidateContent() const { - const_cast<SwFlyInCntFrm*>(this)->bInvalidContent = true; + const_cast<SwFlyInContentFrame*>(this)->bInvalidContent = true; } diff --git a/sw/source/core/inc/fntcache.hxx b/sw/source/core/inc/fntcache.hxx index 1a70f1f6e358..ed634e5d43b7 100644 --- a/sw/source/core/inc/fntcache.hxx +++ b/sw/source/core/inc/fntcache.hxx @@ -110,7 +110,7 @@ public: void DrawText( SwDrawTextInfo &rInf ); /// determine the TextSize (of the printer) Size GetTextSize( SwDrawTextInfo &rInf ); - sal_Int32 GetCrsrOfst( SwDrawTextInfo &rInf ); + sal_Int32 GetCursorOfst( SwDrawTextInfo &rInf ); void CreateScrFont( const SwViewShell& rSh, const OutputDevice& rOut ); void CreatePrtFont( const OutputDevice& rOut ); diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx index 9fcc0a9c9870..1a51e14c9da2 100644 --- a/sw/source/core/inc/frame.hxx +++ b/sw/source/core/inc/frame.hxx @@ -32,17 +32,17 @@ #include <com/sun/star/style/TabStop.hpp> -class SwLayoutFrm; -class SwRootFrm; -class SwPageFrm; -class SwFlyFrm; -class SwSectionFrm; -class SwFootnoteFrm; -class SwFootnoteBossFrm; -class SwTabFrm; -class SwRowFrm; -class SwFlowFrm; -class SwContentFrm; +class SwLayoutFrame; +class SwRootFrame; +class SwPageFrame; +class SwFlyFrame; +class SwSectionFrame; +class SwFootnoteFrame; +class SwFootnoteBossFrame; +class SwTabFrame; +class SwRowFrame; +class SwFlowFrame; +class SwContentFrame; class SfxPoolItem; class SwAttrSet; class SwViewShell; @@ -54,16 +54,16 @@ class XFillStyleItem; class XFillGradientItem; class SwSelectionList; struct SwPosition; -struct SwCrsrMoveState; +struct SwCursorMoveState; class SwFormat; class SwPrintData; class SwSortedObjs; class SwAnchoredObject; typedef struct _xmlTextWriter *xmlTextWriterPtr; -// Each FrmType is represented here as a bit. +// Each FrameType is represented here as a bit. // The bits must be set in a way that it can be determined with masking of -// which kind of FrmType an instance is _and_ from what classes it was derived. +// which kind of FrameType an instance is _and_ from what classes it was derived. // Each frame has in its base class a member that must be set by the // constructors accordingly. #define FRM_ROOT 0x0001 @@ -94,12 +94,12 @@ typedef struct _xmlTextWriter *xmlTextWriterPtr; #define FRM_HEADFOOT 0x0018 #define FRM_BODYFTNC 0x00a0 -class SwFrm; -typedef long (SwFrm:: *SwFrmGet)() const; -typedef bool (SwFrm:: *SwFrmMax)( long ); -typedef void (SwFrm:: *SwFrmMakePos)( const SwFrm*, const SwFrm*, bool ); +class SwFrame; +typedef long (SwFrame:: *SwFrameGet)() const; +typedef bool (SwFrame:: *SwFrameMax)( long ); +typedef void (SwFrame:: *SwFrameMakePos)( const SwFrame*, const SwFrame*, bool ); typedef long (*SwOperator)( long, long ); -typedef void (SwFrm:: *SwFrmSet)( long, long ); +typedef void (SwFrame:: *SwFrameSet)( long, long ); struct SwRectFnCollection { @@ -129,25 +129,25 @@ struct SwRectFnCollection SwRectSet fnSetPosX; SwRectSet fnSetPosY; - SwFrmGet fnGetTopMargin; - SwFrmGet fnGetBottomMargin; - SwFrmGet fnGetLeftMargin; - SwFrmGet fnGetRightMargin; - SwFrmSet fnSetXMargins; - SwFrmSet fnSetYMargins; - SwFrmGet fnGetPrtTop; - SwFrmGet fnGetPrtBottom; - SwFrmGet fnGetPrtLeft; - SwFrmGet fnGetPrtRight; + SwFrameGet fnGetTopMargin; + SwFrameGet fnGetBottomMargin; + SwFrameGet fnGetLeftMargin; + SwFrameGet fnGetRightMargin; + SwFrameSet fnSetXMargins; + SwFrameSet fnSetYMargins; + SwFrameGet fnGetPrtTop; + SwFrameGet fnGetPrtBottom; + SwFrameGet fnGetPrtLeft; + SwFrameGet fnGetPrtRight; SwRectDist fnTopDist; SwRectDist fnBottomDist; SwRectDist fnLeftDist; SwRectDist fnRightDist; - SwFrmMax fnSetLimit; + SwFrameMax fnSetLimit; SwRectMax fnOverStep; SwRectSetPos fnSetPos; - SwFrmMakePos fnMakePos; + SwFrameMakePos fnMakePos; SwOperator fnXDiff; SwOperator fnYDiff; SwOperator fnXInc; @@ -160,35 +160,35 @@ struct SwRectFnCollection typedef SwRectFnCollection* SwRectFn; extern SwRectFn fnRectHori, fnRectVert, fnRectB2T, fnRectVL2R, fnRectVertL2R; -#define SWRECTFN( pFrm ) bool bVert = pFrm->IsVertical(); \ - bool bRev = pFrm->IsReverse(); \ - bool bVertL2R = pFrm->IsVertLR(); \ +#define SWRECTFN( pFrame ) bool bVert = pFrame->IsVertical(); \ + bool bRev = pFrame->IsReverse(); \ + bool bVertL2R = pFrame->IsVertLR(); \ SwRectFn fnRect = bVert ? \ ( bRev ? fnRectVL2R : ( bVertL2R ? fnRectVertL2R : fnRectVert ) ): \ ( bRev ? fnRectB2T : fnRectHori ); -#define SWRECTFNX( pFrm ) bool bVertX = pFrm->IsVertical(); \ - bool bRevX = pFrm->IsReverse(); \ - bool bVertL2RX = pFrm->IsVertLR(); \ +#define SWRECTFNX( pFrame ) bool bVertX = pFrame->IsVertical(); \ + bool bRevX = pFrame->IsReverse(); \ + bool bVertL2RX = pFrame->IsVertLR(); \ SwRectFn fnRectX = bVertX ? \ ( bRevX ? fnRectVL2R : ( bVertL2RX ? fnRectVertL2R : fnRectVert ) ): \ ( bRevX ? fnRectB2T : fnRectHori ); -#define SWREFRESHFN( pFrm ) { if( bVert != pFrm->IsVertical() || \ - bRev != pFrm->IsReverse() ) \ - bVert = pFrm->IsVertical(); \ - bRev = pFrm->IsReverse(); \ - bVertL2R = pFrm->IsVertLR(); \ +#define SWREFRESHFN( pFrame ) { if( bVert != pFrame->IsVertical() || \ + bRev != pFrame->IsReverse() ) \ + bVert = pFrame->IsVertical(); \ + bRev = pFrame->IsReverse(); \ + bVertL2R = pFrame->IsVertLR(); \ fnRect = bVert ? \ ( bRev ? fnRectVL2R : ( bVertL2R ? fnRectVertL2R : fnRectVert ) ): \ ( bRev ? fnRectB2T : fnRectHori ); } -#define SWRECTFN2( pFrm ) bool bVert = pFrm->IsVertical(); \ - bool bVertL2R = pFrm->IsVertLR(); \ - bool bNeighb = pFrm->IsNeighbourFrm(); \ +#define SWRECTFN2( pFrame ) bool bVert = pFrame->IsVertical(); \ + bool bVertL2R = pFrame->IsVertLR(); \ + bool bNeighb = pFrame->IsNeighbourFrame(); \ SwRectFn fnRect = bVert == bNeighb ? \ fnRectHori : ( bVertL2R ? fnRectVertL2R : fnRectVert ); -#define POS_DIFF( aFrm1, aFrm2 ) \ - ( (aFrm1.*fnRect->fnGetTop)() != (aFrm2.*fnRect->fnGetTop)() || \ - (aFrm1.*fnRect->fnGetLeft)() != (aFrm2.*fnRect->fnGetLeft)() ) +#define POS_DIFF( aFrame1, aFrame2 ) \ + ( (aFrame1.*fnRect->fnGetTop)() != (aFrame2.*fnRect->fnGetTop)() || \ + (aFrame1.*fnRect->fnGetLeft)() != (aFrame2.*fnRect->fnGetLeft)() ) // for GetNextLeaf/GetPrevLeaf. enum MakePageType @@ -213,23 +213,23 @@ namespace drawinglayer { namespace attribute { * level: pages, headers, footers, etc. (Inside a paragraph SwLinePortion * instances are used.) */ -class SW_DLLPUBLIC SwFrm: public SwClient, public SfxBroadcaster +class SW_DLLPUBLIC SwFrame: public SwClient, public SfxBroadcaster { - // the hidden Frm - friend class SwFlowFrm; - friend class SwLayoutFrm; + // the hidden Frame + friend class SwFlowFrame; + friend class SwLayoutFrame; friend class SwLooping; // voids lower during creation of a column - friend SwFrm *SaveContent( SwLayoutFrm *, SwFrm* pStart ); - friend void RestoreContent( SwFrm *, SwLayoutFrm *, SwFrm *pSibling, bool bGrow ); + friend SwFrame *SaveContent( SwLayoutFrame *, SwFrame* pStart ); + friend void RestoreContent( SwFrame *, SwLayoutFrame *, SwFrame *pSibling, bool bGrow ); - // for validating a mistakenly invalidated one in SwContentFrm::MakeAll - friend void ValidateSz( SwFrm *pFrm ); + // for validating a mistakenly invalidated one in SwContentFrame::MakeAll + friend void ValidateSz( SwFrame *pFrame ); // implemented in text/txtftn.cxx, prevents Footnote oscillation - friend void ValidateText( SwFrm *pFrm ); + friend void ValidateText( SwFrame *pFrame ); - friend void MakeNxt( SwFrm *pFrm, SwFrm *pNxt ); + friend void MakeNxt( SwFrame *pFrame, SwFrame *pNxt ); // cache for (border) attributes static SwCache *mpCache; @@ -239,16 +239,16 @@ class SW_DLLPUBLIC SwFrm: public SwClient, public SfxBroadcaster // #i65250# // frame ID is now in general available - used for layout loop control - static sal_uInt32 mnLastFrmId; - const sal_uInt32 mnFrmId; + static sal_uInt32 mnLastFrameId; + const sal_uInt32 mnFrameId; - SwRootFrm *mpRoot; - SwLayoutFrm *mpUpper; - SwFrm *mpNext; - SwFrm *mpPrev; + SwRootFrame *mpRoot; + SwLayoutFrame *mpUpper; + SwFrame *mpNext; + SwFrame *mpPrev; - SwFrm *_FindNext(); - SwFrm *_FindPrev(); + SwFrame *_FindNext(); + SwFrame *_FindPrev(); /** method to determine next content frame in the same environment for a flow frame (content frame, table frame, section frame) @@ -274,10 +274,10 @@ class SW_DLLPUBLIC SwFrm: public SwClient, public SfxBroadcaster frame has to be in the same footnote frame. This parameter is only relevant for flow frames in footnotes. - @return SwContentFrm* + @return SwContentFrame* pointer to the found next content frame. It's NULL, if none exists. */ - SwContentFrm* _FindNextCnt( const bool _bInSameFootnote = false ); + SwContentFrame* _FindNextCnt( const bool _bInSameFootnote = false ); /** method to determine previous content frame in the same environment for a flow frame (content frame, table frame, section frame) @@ -303,26 +303,26 @@ class SW_DLLPUBLIC SwFrm: public SwClient, public SfxBroadcaster frame has to be in the same footnote frame. This parameter is only relevant for flow frames in footnotes. - @return SwContentFrm* + @return SwContentFrame* pointer to the found previous content frame. It's NULL, if none exists. */ - SwContentFrm* _FindPrevCnt( const bool _bInSameFootnote = false ); + SwContentFrame* _FindPrevCnt( const bool _bInSameFootnote = false ); - void _UpdateAttrFrm( const SfxPoolItem*, const SfxPoolItem*, sal_uInt8 & ); - SwFrm* _GetIndNext(); + void _UpdateAttrFrame( const SfxPoolItem*, const SfxPoolItem*, sal_uInt8 & ); + SwFrame* _GetIndNext(); void SetDirFlags( bool bVert ); - const SwLayoutFrm* ImplGetNextLayoutLeaf( bool bFwd ) const; + const SwLayoutFrame* ImplGetNextLayoutLeaf( bool bFwd ) const; - SwPageFrm* ImplFindPageFrm(); + SwPageFrame* ImplFindPageFrame(); protected: SwSortedObjs* mpDrawObjs; // draw objects, can be 0 - SwRect maFrm; // absolute position in document and size of the Frm - SwRect maPrt; // position relatively to Frm and size of PrtArea + SwRect maFrame; // absolute position in document and size of the Frame + SwRect maPrt; // position relatively to Frame and size of PrtArea - sal_uInt16 mnFrmType; //Who am I? + sal_uInt16 mnFrameType; //Who am I? bool mbReverse : 1; // Next line above/at the right side instead // under/at the left side of the previous line @@ -341,17 +341,17 @@ protected: bool mbValidLineNum : 1; bool mbFixSize : 1; // if true, frame will be painted completely even content was changed - // only partially. For ContentFrms a border (from Action) will exclusively + // only partially. For ContentFrames a border (from Action) will exclusively // painted if <mbCompletePaint> is true. bool mbCompletePaint : 1; bool mbRetouche : 1; // frame is responsible for retouching bool mbInfInvalid : 1; // InfoFlags are invalid - bool mbInfBody : 1; // Frm is in document body - bool mbInfTab : 1; // Frm is in a table - bool mbInfFly : 1; // Frm is in a Fly - bool mbInfFootnote : 1; // Frm is in a footnote - bool mbInfSct : 1; // Frm is in a section + bool mbInfBody : 1; // Frame is in document body + bool mbInfTab : 1; // Frame is in a table + bool mbInfFly : 1; // Frame is in a Fly + bool mbInfFootnote : 1; // Frame is in a footnote + bool mbInfSct : 1; // Frame is in a section bool mbColLocked : 1; // lock Grow/Shrink for column-wise section // or fly frames, will be set in Format bool m_isInDestroy : 1; @@ -361,32 +361,32 @@ protected: void ColUnlock() { mbColLocked = false; } virtual void DestroyImpl(); - virtual ~SwFrm(); + virtual ~SwFrame(); - // Only used by SwRootFrm Ctor to get 'this' into mpRoot... - void setRootFrm( SwRootFrm* pRoot ) { mpRoot = pRoot; } + // Only used by SwRootFrame Ctor to get 'this' into mpRoot... + void setRootFrame( SwRootFrame* pRoot ) { mpRoot = pRoot; } - SwPageFrm *InsertPage( SwPageFrm *pSibling, bool bFootnote ); + SwPageFrame *InsertPage( SwPageFrame *pSibling, bool bFootnote ); void PrepareMake(vcl::RenderContext* pRenderContext); void OptPrepareMake(); void MakePos(); // Format next frame of table frame to assure keeping attributes. - // In case of nested tables method <SwFrm::MakeAll()> is called to + // In case of nested tables method <SwFrame::MakeAll()> is called to // avoid formatting of superior table frame. - friend SwFrm* sw_FormatNextContentForKeep( SwTabFrm* pTabFrm ); + friend SwFrame* sw_FormatNextContentForKeep( SwTabFrame* pTabFrame ); virtual void MakeAll(vcl::RenderContext* pRenderContext) = 0; // adjust frames of a page SwTwips AdjustNeighbourhood( SwTwips nDiff, bool bTst = false ); // change only frame size not the size of PrtArea - virtual SwTwips ShrinkFrm( SwTwips, bool bTst = false, bool bInfo = false ) = 0; - virtual SwTwips GrowFrm ( SwTwips, bool bTst = false, bool bInfo = false ) = 0; + virtual SwTwips ShrinkFrame( SwTwips, bool bTst = false, bool bInfo = false ) = 0; + virtual SwTwips GrowFrame ( SwTwips, bool bTst = false, bool bInfo = false ) = 0; SwModify *GetDep() { return GetRegisteredInNonConst(); } const SwModify *GetDep() const { return GetRegisteredIn(); } - SwFrm( SwModify*, SwFrm* ); + SwFrame( SwModify*, SwFrame* ); void CheckDir( sal_uInt16 nDir, bool bVert, bool bOnlyBiDi, bool bBrowse ); @@ -424,67 +424,67 @@ public: } - sal_uInt16 GetType() const { return mnFrmType; } + sal_uInt16 GetType() const { return mnFrameType; } static SwCache &GetCache() { return *mpCache; } static SwCache *GetCachePtr() { return mpCache; } static void SetCache( SwCache *pNew ) { mpCache = pNew; } - // change PrtArea size and FrmSize + // change PrtArea size and FrameSize SwTwips Shrink( SwTwips, bool bTst = false, bool bInfo = false ); SwTwips Grow ( SwTwips, bool bTst = false, bool bInfo = false ); // different methods for inserting in layout tree (for performance reasons) // insert before pBehind or at the end of the chain below mpUpper - void InsertBefore( SwLayoutFrm* pParent, SwFrm* pBehind ); + void InsertBefore( SwLayoutFrame* pParent, SwFrame* pBehind ); // insert after pBefore or at the beginning of the chain below mpUpper - void InsertBehind( SwLayoutFrm *pParent, SwFrm *pBefore ); + void InsertBehind( SwLayoutFrame *pParent, SwFrame *pBefore ); // insert before pBehind or at the end of the chain while considering // the siblings of pSct - bool InsertGroupBefore( SwFrm* pParent, SwFrm* pWhere, SwFrm* pSct ); + bool InsertGroupBefore( SwFrame* pParent, SwFrame* pWhere, SwFrame* pSct ); void RemoveFromLayout(); // For internal use only - who ignores this will be put in a sack and has // to stay there for two days // Does special treatment for _Get[Next|Prev]Leaf() (for tables). - SwLayoutFrm *GetLeaf( MakePageType eMakePage, bool bFwd ); - SwLayoutFrm *GetNextLeaf ( MakePageType eMakePage ); - SwLayoutFrm *GetNextFootnoteLeaf( MakePageType eMakePage ); - SwLayoutFrm *GetNextSctLeaf( MakePageType eMakePage ); - SwLayoutFrm *GetNextCellLeaf( MakePageType eMakePage ); - SwLayoutFrm *GetPrevLeaf ( MakePageType eMakeFootnote = MAKEPAGE_FTN ); - SwLayoutFrm *GetPrevFootnoteLeaf( MakePageType eMakeFootnote = MAKEPAGE_FTN ); - SwLayoutFrm *GetPrevSctLeaf( MakePageType eMakeFootnote = MAKEPAGE_FTN ); - SwLayoutFrm *GetPrevCellLeaf( MakePageType eMakeFootnote = MAKEPAGE_FTN ); - const SwLayoutFrm *GetLeaf ( MakePageType eMakePage, bool bFwd, - const SwFrm *pAnch ) const; - - bool WrongPageDesc( SwPageFrm* pNew ); + SwLayoutFrame *GetLeaf( MakePageType eMakePage, bool bFwd ); + SwLayoutFrame *GetNextLeaf ( MakePageType eMakePage ); + SwLayoutFrame *GetNextFootnoteLeaf( MakePageType eMakePage ); + SwLayoutFrame *GetNextSctLeaf( MakePageType eMakePage ); + SwLayoutFrame *GetNextCellLeaf( MakePageType eMakePage ); + SwLayoutFrame *GetPrevLeaf ( MakePageType eMakeFootnote = MAKEPAGE_FTN ); + SwLayoutFrame *GetPrevFootnoteLeaf( MakePageType eMakeFootnote = MAKEPAGE_FTN ); + SwLayoutFrame *GetPrevSctLeaf( MakePageType eMakeFootnote = MAKEPAGE_FTN ); + SwLayoutFrame *GetPrevCellLeaf( MakePageType eMakeFootnote = MAKEPAGE_FTN ); + const SwLayoutFrame *GetLeaf ( MakePageType eMakePage, bool bFwd, + const SwFrame *pAnch ) const; + + bool WrongPageDesc( SwPageFrame* pNew ); //#i28701# - new methods to append/remove drawing objects void AppendDrawObj( SwAnchoredObject& _rNewObj ); void RemoveDrawObj( SwAnchoredObject& _rToRemoveObj ); - // work with chain of FlyFrms - void AppendFly( SwFlyFrm *pNew ); - void RemoveFly( SwFlyFrm *pToRemove ); + // work with chain of FlyFrames + void AppendFly( SwFlyFrame *pNew ); + void RemoveFly( SwFlyFrame *pToRemove ); const SwSortedObjs *GetDrawObjs() const { return mpDrawObjs; } SwSortedObjs *GetDrawObjs() { return mpDrawObjs; } // #i28701# - change purpose of method and adjust its name void InvalidateObjs( const bool _bInvaPosOnly, const bool _bNoInvaOfAsCharAnchoredObjs = true ); - virtual void PaintBorder( const SwRect&, const SwPageFrm *pPage, + virtual void PaintBorder( const SwRect&, const SwPageFrame *pPage, const SwBorderAttrs & ) const; - void PaintBaBo( const SwRect&, const SwPageFrm *pPage = nullptr, + void PaintBaBo( const SwRect&, const SwPageFrame *pPage = nullptr, const bool bLowerBorder = false, const bool bOnlyTextBackground = false ) const; - void PaintBackground( const SwRect&, const SwPageFrm *pPage, + void PaintBackground( const SwRect&, const SwPageFrame *pPage, const SwBorderAttrs &, const bool bLowerMode = false, const bool bLowerBorder = false, const bool bOnlyTextBackground = false ) const; - void PaintBorderLine( const SwRect&, const SwRect&, const SwPageFrm*, + void PaintBorderLine( const SwRect&, const SwRect&, const SwPageFrame*, const Color *pColor, const editeng::SvxBorderStyle = css::table::BorderLineStyle::SOLID ) const; @@ -493,7 +493,7 @@ public: // FIXME: EasyHack (refactoring): rename method name in all files // retouch, not in the area of the given Rect! - void Retouche( const SwPageFrm *pPage, const SwRect &rRect ) const; + void Retouche( const SwPageFrame *pPage, const SwRect &rRect ) const; bool GetBackgroundBrush( drawinglayer::attribute::SdrAllFillAttributesHelperPtr& rFillAttributes, @@ -520,11 +520,11 @@ public: // If frame is inside a split table row, this function returns // the corresponding row frame in the follow table. - const SwRowFrm* IsInSplitTableRow() const; + const SwRowFrame* IsInSplitTableRow() const; // If frame is inside a follow flow row, this function returns // the corresponding row frame master table - const SwRowFrm* IsInFollowFlowRow() const; + const SwRowFrame* IsInFollowFlowRow() const; bool IsInBalancedSection() const; @@ -544,24 +544,24 @@ public: void CheckDirChange(); // returns upper left frame position for LTR and // upper right frame position for Asian / RTL frames - Point GetFrmAnchorPos( bool bIgnoreFlysAnchoredAtThisFrame ) const; + Point GetFrameAnchorPos( bool bIgnoreFlysAnchoredAtThisFrame ) const; /** determine, if frame is moveable in given environment method replaced 'old' method <bool IsMoveable() const>. Determines, if frame is moveable in given environment. if no environment - is given (parameter _pLayoutFrm == 0L), the movability in the actual + is given (parameter _pLayoutFrame == 0L), the movability in the actual environment (<this->GetUpper()) is checked. - @param _pLayoutFrm + @param _pLayoutFrame input parameter - given environment (layout frame), in which the movability will be checked. If not set ( == 0L ), actual environment is taken. @return boolean, indicating, if frame is moveable in given environment */ - bool IsMoveable( const SwLayoutFrm* _pLayoutFrm = nullptr ) const; + bool IsMoveable( const SwLayoutFrame* _pLayoutFrame = nullptr ) const; - // Is it permitted for the (Text)Frm to add a footnote in the current + // Is it permitted for the (Text)Frame to add a footnote in the current // environment (not e.g. for repeating table headlines) bool IsFootnoteAllowed() const; @@ -569,68 +569,68 @@ public: virtual void CheckDirection( bool bVert ); - void ReinitializeFrmSizeAttrFlags(); + void ReinitializeFrameSizeAttrFlags(); const SwAttrSet *GetAttrSet() const; inline bool HasFixSize() const { return mbFixSize; } // check all pages (starting from the given) and correct them if needed - static void CheckPageDescs( SwPageFrm *pStart, bool bNotifyFields = true, SwPageFrm** ppPrev = nullptr); + static void CheckPageDescs( SwPageFrame *pStart, bool bNotifyFields = true, SwPageFrame** ppPrev = nullptr); // might return 0, with and without const - SwFrm *GetNext() { return mpNext; } - SwFrm *GetPrev() { return mpPrev; } - SwLayoutFrm *GetUpper() { return mpUpper; } - SwRootFrm *getRootFrm(){ return mpRoot; } - SwPageFrm *FindPageFrm() { return IsPageFrm() ? reinterpret_cast<SwPageFrm*>(this) : ImplFindPageFrm(); } - SwFrm *FindColFrm(); - SwRowFrm *FindRowFrm(); - SwFootnoteBossFrm *FindFootnoteBossFrm( bool bFootnotes = false ); - SwTabFrm *ImplFindTabFrm(); - SwFootnoteFrm *ImplFindFootnoteFrm(); - SwFlyFrm *ImplFindFlyFrm(); - SwSectionFrm *ImplFindSctFrm(); - SwFrm *FindFooterOrHeader(); - SwFrm *GetLower(); - const SwFrm *GetNext() const { return mpNext; } - const SwFrm *GetPrev() const { return mpPrev; } - const SwLayoutFrm *GetUpper() const { return mpUpper; } - const SwRootFrm *getRootFrm() const { return mpRoot; } - inline SwTabFrm *FindTabFrm(); - inline SwFootnoteFrm *FindFootnoteFrm(); - inline SwFlyFrm *FindFlyFrm(); - inline SwSectionFrm *FindSctFrm(); - inline SwFrm *FindNext(); + SwFrame *GetNext() { return mpNext; } + SwFrame *GetPrev() { return mpPrev; } + SwLayoutFrame *GetUpper() { return mpUpper; } + SwRootFrame *getRootFrame(){ return mpRoot; } + SwPageFrame *FindPageFrame() { return IsPageFrame() ? reinterpret_cast<SwPageFrame*>(this) : ImplFindPageFrame(); } + SwFrame *FindColFrame(); + SwRowFrame *FindRowFrame(); + SwFootnoteBossFrame *FindFootnoteBossFrame( bool bFootnotes = false ); + SwTabFrame *ImplFindTabFrame(); + SwFootnoteFrame *ImplFindFootnoteFrame(); + SwFlyFrame *ImplFindFlyFrame(); + SwSectionFrame *ImplFindSctFrame(); + SwFrame *FindFooterOrHeader(); + SwFrame *GetLower(); + const SwFrame *GetNext() const { return mpNext; } + const SwFrame *GetPrev() const { return mpPrev; } + const SwLayoutFrame *GetUpper() const { return mpUpper; } + const SwRootFrame *getRootFrame() const { return mpRoot; } + inline SwTabFrame *FindTabFrame(); + inline SwFootnoteFrame *FindFootnoteFrame(); + inline SwFlyFrame *FindFlyFrame(); + inline SwSectionFrame *FindSctFrame(); + inline SwFrame *FindNext(); // #i27138# - add parameter <_bInSameFootnote> - SwContentFrm* FindNextCnt( const bool _bInSameFootnote = false ); - inline SwFrm *FindPrev(); - inline const SwPageFrm *FindPageFrm() const; - inline const SwFootnoteBossFrm *FindFootnoteBossFrm( bool bFootnote = false ) const; - inline const SwFrm *FindColFrm() const; - inline const SwFrm *FindFooterOrHeader() const; - inline const SwTabFrm *FindTabFrm() const; - inline const SwFootnoteFrm *FindFootnoteFrm() const; - inline const SwFlyFrm *FindFlyFrm() const; - inline const SwSectionFrm *FindSctFrm() const; - inline const SwFrm *FindNext() const; + SwContentFrame* FindNextCnt( const bool _bInSameFootnote = false ); + inline SwFrame *FindPrev(); + inline const SwPageFrame *FindPageFrame() const; + inline const SwFootnoteBossFrame *FindFootnoteBossFrame( bool bFootnote = false ) const; + inline const SwFrame *FindColFrame() const; + inline const SwFrame *FindFooterOrHeader() const; + inline const SwTabFrame *FindTabFrame() const; + inline const SwFootnoteFrame *FindFootnoteFrame() const; + inline const SwFlyFrame *FindFlyFrame() const; + inline const SwSectionFrame *FindSctFrame() const; + inline const SwFrame *FindNext() const; // #i27138# - add parameter <_bInSameFootnote> - const SwContentFrm* FindNextCnt( const bool _bInSameFootnote = false ) const; - inline const SwFrm *FindPrev() const; - const SwFrm *GetLower() const; + const SwContentFrame* FindNextCnt( const bool _bInSameFootnote = false ) const; + inline const SwFrame *FindPrev() const; + const SwFrame *GetLower() const; - SwContentFrm* FindPrevCnt( const bool _bInSameFootnote = false ); + SwContentFrame* FindPrevCnt( const bool _bInSameFootnote = false ); - const SwContentFrm* FindPrevCnt( const bool _bInSameFootnote = false ) const; + const SwContentFrame* FindPrevCnt( const bool _bInSameFootnote = false ) const; // #i79774# - SwFrm* _GetIndPrev() const; - SwFrm* GetIndPrev() const + SwFrame* _GetIndPrev() const; + SwFrame* GetIndPrev() const { return ( mpPrev || !IsInSct() ) ? mpPrev : _GetIndPrev(); } - SwFrm* GetIndNext() + SwFrame* GetIndNext() { return ( mpNext || !IsInSct() ) ? mpNext : _GetIndNext(); } - const SwFrm* GetIndNext() const { return const_cast<SwFrm*>(this)->GetIndNext(); } + const SwFrame* GetIndNext() const { return const_cast<SwFrame*>(this)->GetIndNext(); } sal_uInt16 GetPhyPageNum() const; // page number without offset sal_uInt16 GetVirtPageNum() const; // page number with offset @@ -638,31 +638,31 @@ public: bool WannaRightPage() const; bool OnFirstPage() const; - inline const SwLayoutFrm *GetPrevLayoutLeaf() const; - inline const SwLayoutFrm *GetNextLayoutLeaf() const; - inline SwLayoutFrm *GetPrevLayoutLeaf(); - inline SwLayoutFrm *GetNextLayoutLeaf(); + inline const SwLayoutFrame *GetPrevLayoutLeaf() const; + inline const SwLayoutFrame *GetNextLayoutLeaf() const; + inline SwLayoutFrame *GetPrevLayoutLeaf(); + inline SwLayoutFrame *GetNextLayoutLeaf(); virtual void Calc(vcl::RenderContext* pRenderContext) const; // here might be "formatted" inline void OptCalc() const; // here we assume (for optimization) that // the predecessors are already formatted Point GetRelPos() const; - const SwRect &Frm() const { return maFrm; } + const SwRect &Frame() const { return maFrame; } const SwRect &Prt() const { return maPrt; } // PaintArea is the area where content might be displayed. // The margin of a page or the space between columns belongs to it. const SwRect PaintArea() const; - // UnionFrm is the union of Frm- and PrtArea, normally identical - // to the FrmArea except in case of negative Prt margins. - const SwRect UnionFrm( bool bBorder = false ) const; + // UnionFrame is the union of Frame- and PrtArea, normally identical + // to the FrameArea except in case of negative Prt margins. + const SwRect UnionFrame( bool bBorder = false ) const; // HACK: Here we exceptionally allow direct access to members. // This should not delude into changing those value randomly; it is the // only option to circumvent compiler problems (same method with public // and protected). - SwRect &Frm() { return maFrm; } + SwRect &Frame() { return maFrame; } SwRect &Prt() { return maPrt; } virtual Size ChgSize( const Size& aNewSize ); @@ -670,7 +670,7 @@ public: virtual void Cut() = 0; //Add a method to change the acc table dispose state. void SetAccTableDispose(bool bDispose) { mbIfAccTableShouldDisposing = bDispose;} - virtual void Paste( SwFrm* pParent, SwFrm* pSibling = nullptr ) = 0; + virtual void Paste( SwFrame* pParent, SwFrame* pSibling = nullptr ) = 0; void ValidateLineNum() { mbValidLineNum = true; } @@ -680,7 +680,7 @@ public: bool GetValidLineNumFlag()const { return mbValidLineNum; } bool IsValid() const { return mbValidPos && mbValidSize && mbValidPrtArea; } - // Only invalidate Frm + // Only invalidate Frame // #i28701# - add call to method <_ActionOnInvalidation(..)> // for all invalidation methods. // #i28701# - use method <_InvalidationAllowed(..)> to @@ -747,14 +747,14 @@ public: */ void InvalidateNextPrtArea(); - void InvalidatePage( const SwPageFrm *pPage = nullptr ) const; + void InvalidatePage( const SwPageFrame *pPage = nullptr ) const; virtual bool FillSelection( SwSelectionList& rList, const SwRect& rRect ) const; - virtual bool GetCrsrOfst( SwPosition *, Point&, - SwCrsrMoveState* = nullptr, bool bTestBackground = false ) const; + virtual bool GetCursorOfst( SwPosition *, Point&, + SwCursorMoveState* = nullptr, bool bTestBackground = false ) const; virtual bool GetCharRect( SwRect &, const SwPosition&, - SwCrsrMoveState* = nullptr ) const; + SwCursorMoveState* = nullptr ) const; virtual void Paint( vcl::RenderContext& rRenderContext, SwRect const&, SwPrintData const*const pPrintData = nullptr ) const; @@ -765,45 +765,45 @@ public: const void *pVoid = nullptr, bool bNotify = true ); // true if it is the correct class, false otherwise - inline bool IsLayoutFrm() const; - inline bool IsRootFrm() const; - inline bool IsPageFrm() const; - inline bool IsColumnFrm() const; - inline bool IsFootnoteBossFrm() const; // footnote bosses might be PageFrms or ColumnFrms - inline bool IsHeaderFrm() const; - inline bool IsFooterFrm() const; - inline bool IsFootnoteContFrm() const; - inline bool IsFootnoteFrm() const; - inline bool IsBodyFrm() const; - inline bool IsColBodyFrm() const; // implemented in layfrm.hxx, BodyFrm above ColumnFrm - inline bool IsPageBodyFrm() const; // implemented in layfrm.hxx, BodyFrm above PageFrm - inline bool IsFlyFrm() const; - inline bool IsSctFrm() const; - inline bool IsTabFrm() const; - inline bool IsRowFrm() const; - inline bool IsCellFrm() const; - inline bool IsContentFrm() const; - inline bool IsTextFrm() const; - inline bool IsNoTextFrm() const; - // Frms where its PrtArea depends on their neighbors and that are + inline bool IsLayoutFrame() const; + inline bool IsRootFrame() const; + inline bool IsPageFrame() const; + inline bool IsColumnFrame() const; + inline bool IsFootnoteBossFrame() const; // footnote bosses might be PageFrames or ColumnFrames + inline bool IsHeaderFrame() const; + inline bool IsFooterFrame() const; + inline bool IsFootnoteContFrame() const; + inline bool IsFootnoteFrame() const; + inline bool IsBodyFrame() const; + inline bool IsColBodyFrame() const; // implemented in layfrm.hxx, BodyFrame above ColumnFrame + inline bool IsPageBodyFrame() const; // implemented in layfrm.hxx, BodyFrame above PageFrame + inline bool IsFlyFrame() const; + inline bool IsSctFrame() const; + inline bool IsTabFrame() const; + inline bool IsRowFrame() const; + inline bool IsCellFrame() const; + inline bool IsContentFrame() const; + inline bool IsTextFrame() const; + inline bool IsNoTextFrame() const; + // Frames where its PrtArea depends on their neighbors and that are // positioned in the content flow - inline bool IsFlowFrm() const; - // Frms that are capable of retouching or that might need to retouch behind + inline bool IsFlowFrame() const; + // Frames that are capable of retouching or that might need to retouch behind // themselves - inline bool IsRetoucheFrm() const; - inline bool IsAccessibleFrm() const; + inline bool IsRetoucheFrame() const; + inline bool IsAccessibleFrame() const; - void PrepareCrsr(); // CrsrShell is allowed to call this + void PrepareCursor(); // CursorShell is allowed to call this - // Is the Frm (or the section containing it) protected? Same for Fly in + // Is the Frame (or the section containing it) protected? Same for Fly in // Fly in ... and footnotes bool IsProtected() const; bool IsColLocked() const { return mbColLocked; } bool IsDeleteForbidden() const { return mbForbidDelete; } - /// this is the only way to delete a SwFrm instance - static void DestroyFrm(SwFrm *const pFrm); + /// this is the only way to delete a SwFrame instance + static void DestroyFrame(SwFrame *const pFrame); bool IsInDtor() const { return mbInDtor; } @@ -824,15 +824,15 @@ public: bool SetMaxBottom( long ); bool SetMaxRight( long ); bool SetMinTop( long ); - void MakeBelowPos( const SwFrm*, const SwFrm*, bool ); - void MakeUpperPos( const SwFrm*, const SwFrm*, bool ); - void MakeLeftPos( const SwFrm*, const SwFrm*, bool ); - void MakeRightPos( const SwFrm*, const SwFrm*, bool ); - inline bool IsNeighbourFrm() const + void MakeBelowPos( const SwFrame*, const SwFrame*, bool ); + void MakeUpperPos( const SwFrame*, const SwFrame*, bool ); + void MakeLeftPos( const SwFrame*, const SwFrame*, bool ); + void MakeRightPos( const SwFrame*, const SwFrame*, bool ); + inline bool IsNeighbourFrame() const { return (GetType() & FRM_NEIGHBOUR) != 0; } // #i65250# - inline sal_uInt32 GetFrmId() const { return mnFrmId; } + inline sal_uInt32 GetFrameId() const { return mnFrameId; } // NEW TABLES // Some functions for covered/covering table cells. This way unnecessary @@ -862,109 +862,109 @@ public: bool IsCollapse() const; }; -inline bool SwFrm::IsInDocBody() const +inline bool SwFrame::IsInDocBody() const { if ( mbInfInvalid ) - const_cast<SwFrm*>(this)->SetInfFlags(); + const_cast<SwFrame*>(this)->SetInfFlags(); return mbInfBody; } -inline bool SwFrm::IsInFootnote() const +inline bool SwFrame::IsInFootnote() const { if ( mbInfInvalid ) - const_cast<SwFrm*>(this)->SetInfFlags(); + const_cast<SwFrame*>(this)->SetInfFlags(); return mbInfFootnote; } -inline bool SwFrm::IsInTab() const +inline bool SwFrame::IsInTab() const { if ( mbInfInvalid ) - const_cast<SwFrm*>(this)->SetInfFlags(); + const_cast<SwFrame*>(this)->SetInfFlags(); return mbInfTab; } -inline bool SwFrm::IsInFly() const +inline bool SwFrame::IsInFly() const { if ( mbInfInvalid ) - const_cast<SwFrm*>(this)->SetInfFlags(); + const_cast<SwFrame*>(this)->SetInfFlags(); return mbInfFly; } -inline bool SwFrm::IsInSct() const +inline bool SwFrame::IsInSct() const { if ( mbInfInvalid ) - const_cast<SwFrm*>(this)->SetInfFlags(); + const_cast<SwFrame*>(this)->SetInfFlags(); return mbInfSct; } -bool SwFrm::IsVertical() const +bool SwFrame::IsVertical() const { if( mbInvalidVert ) - const_cast<SwFrm*>(this)->SetDirFlags( true ); + const_cast<SwFrame*>(this)->SetDirFlags( true ); return mbVertical; } -inline bool SwFrm::IsVertLR() const +inline bool SwFrame::IsVertLR() const { return mbVertLR; } -inline bool SwFrm::IsRightToLeft() const +inline bool SwFrame::IsRightToLeft() const { if( mbInvalidR2L ) - const_cast<SwFrm*>(this)->SetDirFlags( false ); + const_cast<SwFrame*>(this)->SetDirFlags( false ); return mbRightToLeft; } -inline void SwFrm::SetCompletePaint() const +inline void SwFrame::SetCompletePaint() const { - const_cast<SwFrm*>(this)->mbCompletePaint = true; + const_cast<SwFrame*>(this)->mbCompletePaint = true; } -inline void SwFrm::ResetCompletePaint() const +inline void SwFrame::ResetCompletePaint() const { - const_cast<SwFrm*>(this)->mbCompletePaint = false; + const_cast<SwFrame*>(this)->mbCompletePaint = false; } -inline void SwFrm::SetRetouche() const +inline void SwFrame::SetRetouche() const { - const_cast<SwFrm*>(this)->mbRetouche = true; + const_cast<SwFrame*>(this)->mbRetouche = true; } -inline void SwFrm::ResetRetouche() const +inline void SwFrame::ResetRetouche() const { - const_cast<SwFrm*>(this)->mbRetouche = false; + const_cast<SwFrame*>(this)->mbRetouche = false; } -inline SwLayoutFrm *SwFrm::GetNextLayoutLeaf() +inline SwLayoutFrame *SwFrame::GetNextLayoutLeaf() { - return const_cast<SwLayoutFrm*>(static_cast<const SwFrm*>(this)->GetNextLayoutLeaf()); + return const_cast<SwLayoutFrame*>(static_cast<const SwFrame*>(this)->GetNextLayoutLeaf()); } -inline SwLayoutFrm *SwFrm::GetPrevLayoutLeaf() +inline SwLayoutFrame *SwFrame::GetPrevLayoutLeaf() { - return const_cast<SwLayoutFrm*>(static_cast<const SwFrm*>(this)->GetPrevLayoutLeaf()); + return const_cast<SwLayoutFrame*>(static_cast<const SwFrame*>(this)->GetPrevLayoutLeaf()); } -inline const SwLayoutFrm *SwFrm::GetNextLayoutLeaf() const +inline const SwLayoutFrame *SwFrame::GetNextLayoutLeaf() const { return ImplGetNextLayoutLeaf( true ); } -inline const SwLayoutFrm *SwFrm::GetPrevLayoutLeaf() const +inline const SwLayoutFrame *SwFrame::GetPrevLayoutLeaf() const { return ImplGetNextLayoutLeaf( false ); } -inline void SwFrm::InvalidateSize() +inline void SwFrame::InvalidateSize() { if ( mbValidSize ) ImplInvalidateSize(); } -inline void SwFrm::InvalidatePrt() +inline void SwFrame::InvalidatePrt() { if ( mbValidPrtArea ) ImplInvalidatePrt(); } -inline void SwFrm::InvalidatePos() +inline void SwFrame::InvalidatePos() { if ( mbValidPos ) ImplInvalidatePos(); } -inline void SwFrm::InvalidateLineNum() +inline void SwFrame::InvalidateLineNum() { if ( mbValidLineNum ) ImplInvalidateLineNum(); } -inline void SwFrm::InvalidateAll() +inline void SwFrame::InvalidateAll() { if ( _InvalidationAllowed( INVALID_ALL ) ) { @@ -976,204 +976,204 @@ inline void SwFrm::InvalidateAll() _ActionOnInvalidation( INVALID_ALL ); } } -inline void SwFrm::InvalidateNextPos( bool bNoFootnote ) +inline void SwFrame::InvalidateNextPos( bool bNoFootnote ) { - if ( mpNext && !mpNext->IsSctFrm() ) + if ( mpNext && !mpNext->IsSctFrame() ) mpNext->InvalidatePos(); else ImplInvalidateNextPos( bNoFootnote ); } -inline void SwFrm::OptCalc() const +inline void SwFrame::OptCalc() const { if ( !mbValidPos || !mbValidPrtArea || !mbValidSize ) - const_cast<SwFrm*>(this)->OptPrepareMake(); + const_cast<SwFrame*>(this)->OptPrepareMake(); } -inline const SwPageFrm *SwFrm::FindPageFrm() const +inline const SwPageFrame *SwFrame::FindPageFrame() const { - return const_cast<SwFrm*>(this)->FindPageFrm(); + return const_cast<SwFrame*>(this)->FindPageFrame(); } -inline const SwFrm *SwFrm::FindColFrm() const +inline const SwFrame *SwFrame::FindColFrame() const { - return const_cast<SwFrm*>(this)->FindColFrm(); + return const_cast<SwFrame*>(this)->FindColFrame(); } -inline const SwFrm *SwFrm::FindFooterOrHeader() const +inline const SwFrame *SwFrame::FindFooterOrHeader() const { - return const_cast<SwFrm*>(this)->FindFooterOrHeader(); + return const_cast<SwFrame*>(this)->FindFooterOrHeader(); } -inline SwTabFrm *SwFrm::FindTabFrm() +inline SwTabFrame *SwFrame::FindTabFrame() { - return IsInTab() ? ImplFindTabFrm() : nullptr; + return IsInTab() ? ImplFindTabFrame() : nullptr; } -inline const SwFootnoteBossFrm *SwFrm::FindFootnoteBossFrm( bool bFootnote ) const +inline const SwFootnoteBossFrame *SwFrame::FindFootnoteBossFrame( bool bFootnote ) const { - return const_cast<SwFrm*>(this)->FindFootnoteBossFrm( bFootnote ); + return const_cast<SwFrame*>(this)->FindFootnoteBossFrame( bFootnote ); } -inline SwFootnoteFrm *SwFrm::FindFootnoteFrm() +inline SwFootnoteFrame *SwFrame::FindFootnoteFrame() { - return IsInFootnote() ? ImplFindFootnoteFrm() : nullptr; + return IsInFootnote() ? ImplFindFootnoteFrame() : nullptr; } -inline SwFlyFrm *SwFrm::FindFlyFrm() +inline SwFlyFrame *SwFrame::FindFlyFrame() { - return IsInFly() ? ImplFindFlyFrm() : nullptr; + return IsInFly() ? ImplFindFlyFrame() : nullptr; } -inline SwSectionFrm *SwFrm::FindSctFrm() +inline SwSectionFrame *SwFrame::FindSctFrame() { - return IsInSct() ? ImplFindSctFrm() : nullptr; + return IsInSct() ? ImplFindSctFrame() : nullptr; } -inline const SwTabFrm *SwFrm::FindTabFrm() const +inline const SwTabFrame *SwFrame::FindTabFrame() const { - return IsInTab() ? const_cast<SwFrm*>(this)->ImplFindTabFrm() : nullptr; + return IsInTab() ? const_cast<SwFrame*>(this)->ImplFindTabFrame() : nullptr; } -inline const SwFootnoteFrm *SwFrm::FindFootnoteFrm() const +inline const SwFootnoteFrame *SwFrame::FindFootnoteFrame() const { - return IsInFootnote() ? const_cast<SwFrm*>(this)->ImplFindFootnoteFrm() : nullptr; + return IsInFootnote() ? const_cast<SwFrame*>(this)->ImplFindFootnoteFrame() : nullptr; } -inline const SwFlyFrm *SwFrm::FindFlyFrm() const +inline const SwFlyFrame *SwFrame::FindFlyFrame() const { - return IsInFly() ? const_cast<SwFrm*>(this)->ImplFindFlyFrm() : nullptr; + return IsInFly() ? const_cast<SwFrame*>(this)->ImplFindFlyFrame() : nullptr; } -inline const SwSectionFrm *SwFrm::FindSctFrm() const +inline const SwSectionFrame *SwFrame::FindSctFrame() const { - return IsInSct() ? const_cast<SwFrm*>(this)->ImplFindSctFrm() : nullptr; + return IsInSct() ? const_cast<SwFrame*>(this)->ImplFindSctFrame() : nullptr; } -inline SwFrm *SwFrm::FindNext() +inline SwFrame *SwFrame::FindNext() { if ( mpNext ) return mpNext; else return _FindNext(); } -inline const SwFrm *SwFrm::FindNext() const +inline const SwFrame *SwFrame::FindNext() const { if ( mpNext ) return mpNext; else - return const_cast<SwFrm*>(this)->_FindNext(); + return const_cast<SwFrame*>(this)->_FindNext(); } -inline SwFrm *SwFrm::FindPrev() +inline SwFrame *SwFrame::FindPrev() { - if ( mpPrev && !mpPrev->IsSctFrm() ) + if ( mpPrev && !mpPrev->IsSctFrame() ) return mpPrev; else return _FindPrev(); } -inline const SwFrm *SwFrm::FindPrev() const +inline const SwFrame *SwFrame::FindPrev() const { - if ( mpPrev && !mpPrev->IsSctFrm() ) + if ( mpPrev && !mpPrev->IsSctFrame() ) return mpPrev; else - return const_cast<SwFrm*>(this)->_FindPrev(); + return const_cast<SwFrame*>(this)->_FindPrev(); } -inline bool SwFrm::IsLayoutFrm() const +inline bool SwFrame::IsLayoutFrame() const { return (GetType() & FRM_LAYOUT) != 0; } -inline bool SwFrm::IsRootFrm() const +inline bool SwFrame::IsRootFrame() const { - return mnFrmType == FRM_ROOT; + return mnFrameType == FRM_ROOT; } -inline bool SwFrm::IsPageFrm() const +inline bool SwFrame::IsPageFrame() const { - return mnFrmType == FRM_PAGE; + return mnFrameType == FRM_PAGE; } -inline bool SwFrm::IsColumnFrm() const +inline bool SwFrame::IsColumnFrame() const { - return mnFrmType == FRM_COLUMN; + return mnFrameType == FRM_COLUMN; } -inline bool SwFrm::IsFootnoteBossFrm() const +inline bool SwFrame::IsFootnoteBossFrame() const { return (GetType() & FRM_FTNBOSS) != 0; } -inline bool SwFrm::IsHeaderFrm() const +inline bool SwFrame::IsHeaderFrame() const { - return mnFrmType == FRM_HEADER; + return mnFrameType == FRM_HEADER; } -inline bool SwFrm::IsFooterFrm() const +inline bool SwFrame::IsFooterFrame() const { - return mnFrmType == FRM_FOOTER; + return mnFrameType == FRM_FOOTER; } -inline bool SwFrm::IsFootnoteContFrm() const +inline bool SwFrame::IsFootnoteContFrame() const { - return mnFrmType == FRM_FTNCONT; + return mnFrameType == FRM_FTNCONT; } -inline bool SwFrm::IsFootnoteFrm() const +inline bool SwFrame::IsFootnoteFrame() const { - return mnFrmType == FRM_FTN; + return mnFrameType == FRM_FTN; } -inline bool SwFrm::IsBodyFrm() const +inline bool SwFrame::IsBodyFrame() const { - return mnFrmType == FRM_BODY; + return mnFrameType == FRM_BODY; } -inline bool SwFrm::IsFlyFrm() const +inline bool SwFrame::IsFlyFrame() const { - return mnFrmType == FRM_FLY; + return mnFrameType == FRM_FLY; } -inline bool SwFrm::IsSctFrm() const +inline bool SwFrame::IsSctFrame() const { - return mnFrmType == FRM_SECTION; + return mnFrameType == FRM_SECTION; } -inline bool SwFrm::IsTabFrm() const +inline bool SwFrame::IsTabFrame() const { - return mnFrmType == FRM_TAB; + return mnFrameType == FRM_TAB; } -inline bool SwFrm::IsRowFrm() const +inline bool SwFrame::IsRowFrame() const { - return mnFrmType == FRM_ROW; + return mnFrameType == FRM_ROW; } -inline bool SwFrm::IsCellFrm() const +inline bool SwFrame::IsCellFrame() const { - return mnFrmType == FRM_CELL; + return mnFrameType == FRM_CELL; } -inline bool SwFrm::IsContentFrm() const +inline bool SwFrame::IsContentFrame() const { return (GetType() & FRM_CNTNT) != 0; } -inline bool SwFrm::IsTextFrm() const +inline bool SwFrame::IsTextFrame() const { - return mnFrmType == FRM_TXT; + return mnFrameType == FRM_TXT; } -inline bool SwFrm::IsNoTextFrm() const +inline bool SwFrame::IsNoTextFrame() const { - return mnFrmType == FRM_NOTXT; + return mnFrameType == FRM_NOTXT; } -inline bool SwFrm::IsFlowFrm() const +inline bool SwFrame::IsFlowFrame() const { return (GetType() & (FRM_CNTNT|FRM_TAB|FRM_SECTION)) != 0; } -inline bool SwFrm::IsRetoucheFrm() const +inline bool SwFrame::IsRetoucheFrame() const { return (GetType() & (FRM_CNTNT|FRM_TAB|FRM_SECTION|FRM_FTN)) != 0; } -inline bool SwFrm::IsAccessibleFrm() const +inline bool SwFrame::IsAccessibleFrame() const { return (GetType() & FRM_ACCESSIBLE) != 0; } -//use this to protect a SwFrm for a given scope from getting deleted -class SwFrmDeleteGuard +//use this to protect a SwFrame for a given scope from getting deleted +class SwFrameDeleteGuard { private: - SwFrm *m_pFrm; + SwFrame *m_pFrame; bool m_bOldDeleteAllowed; public: - //Flag pFrm for SwFrmDeleteGuard lifetime that we shouldn't delete - //it in e.g. SwSectionFrm::MergeNext etc because we will need it - //again after the SwFrmDeleteGuard dtor - explicit SwFrmDeleteGuard(SwFrm* pFrm) - : m_pFrm(pFrm) + //Flag pFrame for SwFrameDeleteGuard lifetime that we shouldn't delete + //it in e.g. SwSectionFrame::MergeNext etc because we will need it + //again after the SwFrameDeleteGuard dtor + explicit SwFrameDeleteGuard(SwFrame* pFrame) + : m_pFrame(pFrame) { - m_bOldDeleteAllowed = m_pFrm && !m_pFrm->IsDeleteForbidden(); + m_bOldDeleteAllowed = m_pFrame && !m_pFrame->IsDeleteForbidden(); if (m_bOldDeleteAllowed) - m_pFrm->ForbidDelete(); + m_pFrame->ForbidDelete(); } - ~SwFrmDeleteGuard() + ~SwFrameDeleteGuard() { if (m_bOldDeleteAllowed) - m_pFrm->AllowDelete(); + m_pFrame->AllowDelete(); } }; diff --git a/sw/source/core/inc/frminf.hxx b/sw/source/core/inc/frminf.hxx index ae613d3bdcf5..c4d30f01e375 100644 --- a/sw/source/core/inc/frminf.hxx +++ b/sw/source/core/inc/frminf.hxx @@ -22,19 +22,19 @@ #include "swtypes.hxx" -class SwTextFrm; +class SwTextFrame; class SwPaM; class SwTextCursor; -class SwTextFrmInfo +class SwTextFrameInfo { - const SwTextFrm *pFrm; + const SwTextFrame *pFrame; // Where does the text (w/o whitespaces) start (document is global!)? static SwTwips GetLineStart( const SwTextCursor &rLine ); public: - inline SwTextFrmInfo( const SwTextFrm *pTextFrm ) : pFrm(pTextFrm) { } + inline SwTextFrameInfo( const SwTextFrame *pTextFrame ) : pFrame(pTextFrame) { } // Does the paragraph fit into a single line? bool IsOneLine() const; @@ -57,13 +57,13 @@ public: // determine intentation for first line SwTwips GetFirstIndent() const; - const SwTextFrm* GetFrm() const { return pFrm; } - SwTextFrmInfo& SetFrm( const SwTextFrm* pNew ) - { pFrm = pNew; return *this; } + const SwTextFrame* GetFrame() const { return pFrame; } + SwTextFrameInfo& SetFrame( const SwTextFrame* pNew ) + { pFrame = pNew; return *this; } // Is it a comparison? Returns position in frame. sal_Int32 GetBigIndent( sal_Int32& rFndPos, - const SwTextFrm *pNextFrm = nullptr ) const; + const SwTextFrame *pNextFrame = nullptr ) const; }; #endif diff --git a/sw/source/core/inc/frmtool.hxx b/sw/source/core/inc/frmtool.hxx index fe82b38c8e6f..8c984def8720 100644 --- a/sw/source/core/inc/frmtool.hxx +++ b/sw/source/core/inc/frmtool.hxx @@ -28,10 +28,10 @@ #include <swfont.hxx> #include <flyfrm.hxx> -class SwPageFrm; -class SwFlyFrm; -class SwContentFrm; -class SwRootFrm; +class SwPageFrame; +class SwFlyFrame; +class SwContentFrame; +class SwRootFrame; class SwDoc; class SwAttrSet; class SdrObject; @@ -54,7 +54,7 @@ class SwRegionRects; #define GRFNUM_REPLACE 2 void AppendObjs( const SwFrameFormats *pTable, sal_uLong nIndex, - SwFrm *pFrm, SwPageFrm *pPage, SwDoc* doc ); + SwFrame *pFrame, SwPageFrame *pPage, SwDoc* doc ); // draw background with brush or graphics // The 6th parameter indicates that the method should consider background @@ -100,81 +100,81 @@ void PaintCharacterBorder( // get Fly, if no List is given use the current shell // Implementation in feshview.cxx -SwFlyFrm *GetFlyFromMarked( const SdrMarkList *pLst, SwViewShell *pSh ); +SwFlyFrame *GetFlyFromMarked( const SdrMarkList *pLst, SwViewShell *pSh ); -SwFrm *SaveContent( SwLayoutFrm *pLay, SwFrm *pStart = nullptr ); -void RestoreContent( SwFrm *pSav, SwLayoutFrm *pParent, SwFrm *pSibling, bool bGrow ); +SwFrame *SaveContent( SwLayoutFrame *pLay, SwFrame *pStart = nullptr ); +void RestoreContent( SwFrame *pSav, SwLayoutFrame *pParent, SwFrame *pSibling, bool bGrow ); -// Get ContentNodes, create ContentFrms, and add them to LayFrm. -void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc, sal_uLong nIndex, +// Get ContentNodes, create ContentFrames, and add them to LayFrame. +void _InsertCnt( SwLayoutFrame *pLay, SwDoc *pDoc, sal_uLong nIndex, bool bPages = false, sal_uLong nEndIndex = 0, - SwFrm *pPrv = nullptr ); + SwFrame *pPrv = nullptr ); // Creation of frames for a specific section (uses _InsertCnt) -void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx, +void MakeFrames( SwDoc *pDoc, const SwNodeIndex &rSttIdx, const SwNodeIndex &rEndIdx ); // prevent creation of Flys in _InsertCnt, e.g. for table headlines extern bool bDontCreateObjects; -// for FlyCnts, see SwFlyAtCntFrm::MakeAll() +// for FlyCnts, see SwFlyAtContentFrame::MakeAll() extern bool bSetCompletePaintOnInvalidate; // for table settings via keyboard -long CalcRowRstHeight( SwLayoutFrm *pRow ); -long CalcHeightWithFlys( const SwFrm *pFrm ); +long CalcRowRstHeight( SwLayoutFrame *pRow ); +long CalcHeightWithFlys( const SwFrame *pFrame ); -SwPageFrm *InsertNewPage( SwPageDesc &rDesc, SwFrm *pUpper, +SwPageFrame *InsertNewPage( SwPageDesc &rDesc, SwFrame *pUpper, bool bOdd, bool bFirst, bool bInsertEmpty, bool bFootnote, - SwFrm *pSibling ); + SwFrame *pSibling ); // connect Flys with page -void RegistFlys( SwPageFrm*, const SwLayoutFrm* ); +void RegistFlys( SwPageFrame*, const SwLayoutFrame* ); // notification of Fly's background if needed -void Notify( SwFlyFrm *pFly, SwPageFrm *pOld, const SwRect &rOld, +void Notify( SwFlyFrame *pFly, SwPageFrame *pOld, const SwRect &rOld, const SwRect* pOldRect = nullptr ); void Notify_Background( const SdrObject* pObj, - SwPageFrm* pPage, + SwPageFrame* pPage, const SwRect& rRect, const PrepareHint eHint, const bool bInva ); -const SwFrm* GetVirtualUpper( const SwFrm* pFrm, const Point& rPos ); +const SwFrame* GetVirtualUpper( const SwFrame* pFrame, const Point& rPos ); -bool Is_Lower_Of( const SwFrm *pCurrFrm, const SdrObject* pObj ); +bool Is_Lower_Of( const SwFrame *pCurrFrame, const SdrObject* pObj ); // FIXME: EasyHack (refactoring): rename method and parameter name in all files -const SwFrm *FindKontext( const SwFrm *pFrm, sal_uInt16 nAdditionalKontextTyp ); +const SwFrame *FindKontext( const SwFrame *pFrame, sal_uInt16 nAdditionalKontextTyp ); -bool IsFrmInSameKontext( const SwFrm *pInnerFrm, const SwFrm *pFrm ); +bool IsFrameInSameKontext( const SwFrame *pInnerFrame, const SwFrame *pFrame ); -const SwFrm * FindPage( const SwRect &rRect, const SwFrm *pPage ); +const SwFrame * FindPage( const SwRect &rRect, const SwFrame *pPage ); -// used by SwContentNode::GetFrm and SwFlyFrm::GetFrm -SwFrm* GetFrmOfModify( const SwRootFrm* pLayout, +// used by SwContentNode::GetFrame and SwFlyFrame::GetFrame +SwFrame* GetFrameOfModify( const SwRootFrame* pLayout, SwModify const&, - sal_uInt16 const nFrmType, + sal_uInt16 const nFrameType, const Point* = nullptr, const SwPosition *pPos = nullptr, - const bool bCalcFrm = false ); + const bool bCalcFrame = false ); // Should extra data (redline stroke, line numbers) be painted? bool IsExtraData( const SwDoc *pDoc ); // #i11760# - method declaration <CalcContent(..)> -void CalcContent( SwLayoutFrm *pLay, +void CalcContent( SwLayoutFrame *pLay, bool bNoColl = false, bool bNoCalcFollow = false ); // Notify classes memorize the current sizes in their constructor and do // the necessary notifications in their destructor if needed -class SwFrmNotify +class SwFrameNotify { protected: - SwFrm *mpFrm; - const SwRect maFrm; + SwFrame *mpFrame; + const SwRect maFrame; const SwRect maPrt; SwTwips mnFlyAnchorOfst; SwTwips mnFlyAnchorOfstNoWrap; @@ -182,24 +182,24 @@ protected: bool mbInvaKeep; bool mbValidSize; // #i49383# - bool mbFrmDeleted; + bool mbFrameDeleted; public: - SwFrmNotify( SwFrm *pFrm ); - ~SwFrmNotify(); + SwFrameNotify( SwFrame *pFrame ); + ~SwFrameNotify(); - const SwRect &Frm() const { return maFrm; } + const SwRect &Frame() const { return maFrame; } void SetInvaKeep() { mbInvaKeep = true; } }; -class SwLayNotify : public SwFrmNotify +class SwLayNotify : public SwFrameNotify { bool bLowersComplete; - SwLayoutFrm *GetLay() { return static_cast<SwLayoutFrm*>(mpFrm); } + SwLayoutFrame *GetLay() { return static_cast<SwLayoutFrame*>(mpFrame); } public: - SwLayNotify( SwLayoutFrm *pLayFrm ); + SwLayNotify( SwLayoutFrame *pLayFrame ); ~SwLayNotify(); void SetLowersComplete( bool b ) { bLowersComplete = b; } @@ -208,16 +208,16 @@ public: class SwFlyNotify : public SwLayNotify { - SwPageFrm *pOldPage; - const SwRect aFrmAndSpace; - SwFlyFrm *GetFly() { return static_cast<SwFlyFrm*>(mpFrm); } + SwPageFrame *pOldPage; + const SwRect aFrameAndSpace; + SwFlyFrame *GetFly() { return static_cast<SwFlyFrame*>(mpFrame); } public: - SwFlyNotify( SwFlyFrm *pFlyFrm ); + SwFlyNotify( SwFlyFrame *pFlyFrame ); ~SwFlyNotify(); }; -class SwContentNotify : public SwFrmNotify +class SwContentNotify : public SwFrameNotify { private: // #i11859# @@ -228,10 +228,10 @@ private: bool mbInvalidatePrevPrtArea; bool mbBordersJoinedWithPrev; - SwContentFrm *GetCnt(); + SwContentFrame *GetCnt(); public: - SwContentNotify( SwContentFrm *pCntFrm ); + SwContentNotify( SwContentFrame *pContentFrame ); ~SwContentNotify(); // #i25029# @@ -310,32 +310,32 @@ class SwBorderAttrs : public SwCacheObj void _IsLine(); - // #i25029# - If <_pPrevFrm> is set, its value is taken for testing, if + // #i25029# - If <_pPrevFrame> is set, its value is taken for testing, if // borders/shadow have to be joined with previous frame. - void _GetTopLine ( const SwFrm& _rFrm, - const SwFrm* _pPrevFrm = nullptr ); - void _GetBottomLine( const SwFrm& _rFrm ); + void _GetTopLine ( const SwFrame& _rFrame, + const SwFrame* _pPrevFrame = nullptr ); + void _GetBottomLine( const SwFrame& _rFrame ); // calculate cached values <m_bJoinedWithPrev> and <m_bJoinedWithNext> - // #i25029# - If <_pPrevFrm> is set, its value is taken for testing, if + // #i25029# - If <_pPrevFrame> is set, its value is taken for testing, if // borders/shadow have to be joined with previous frame. - void _CalcJoinedWithPrev( const SwFrm& _rFrm, - const SwFrm* _pPrevFrm = nullptr ); - void _CalcJoinedWithNext( const SwFrm& _rFrm ); + void _CalcJoinedWithPrev( const SwFrame& _rFrame, + const SwFrame* _pPrevFrame = nullptr ); + void _CalcJoinedWithNext( const SwFrame& _rFrame ); // internal helper method for _CalcJoinedWithPrev and _CalcJoinedWithNext - bool _JoinWithCmp( const SwFrm& _rCallerFrm, - const SwFrm& _rCmpFrm ) const; + bool _JoinWithCmp( const SwFrame& _rCallerFrame, + const SwFrame& _rCmpFrame ) const; // Are the left and right line and the LRSpace equal? bool CmpLeftRight( const SwBorderAttrs &rCmpAttrs, - const SwFrm *pCaller, - const SwFrm *pCmp ) const; + const SwFrame *pCaller, + const SwFrame *pCmp ) const; public: DECL_FIXEDMEMPOOL_NEWDEL(SwBorderAttrs) - SwBorderAttrs( const SwModify *pOwner, const SwFrm *pConstructor ); + SwBorderAttrs( const SwModify *pOwner, const SwFrame *pConstructor ); virtual ~SwBorderAttrs(); inline const SwAttrSet &GetAttrSet() const { return m_rAttrSet; } @@ -349,8 +349,8 @@ public: inline sal_uInt16 CalcRightLine() const; inline sal_uInt16 CalcTop() const; inline sal_uInt16 CalcBottom() const; - long CalcLeft( const SwFrm *pCaller ) const; - long CalcRight( const SwFrm *pCaller ) const; + long CalcLeft( const SwFrame *pCaller ) const; + long CalcRight( const SwFrame *pCaller ) const; inline bool IsLine() const; @@ -359,30 +359,30 @@ public: inline bool IsBorderDist() const { return m_bBorderDist; } // Should upper (or lower) border be evaluated for this frame? - // #i25029# - If <_pPrevFrm> is set, its value is taken for testing, if + // #i25029# - If <_pPrevFrame> is set, its value is taken for testing, if // borders/shadow have to be joined with previous frame. - inline sal_uInt16 GetTopLine ( const SwFrm& _rFrm, - const SwFrm* _pPrevFrm = nullptr ) const; - inline sal_uInt16 GetBottomLine( const SwFrm& _rFrm ) const; + inline sal_uInt16 GetTopLine ( const SwFrame& _rFrame, + const SwFrame* _pPrevFrame = nullptr ) const; + inline sal_uInt16 GetBottomLine( const SwFrame& _rFrame ) const; inline void SetGetCacheLine( bool bNew ) const; // Accessors for cached values <m_bJoinedWithPrev> and <m_bJoinedWithNext> - // #i25029# - If <_pPrevFrm> is set, its value is taken for testing, if + // #i25029# - If <_pPrevFrame> is set, its value is taken for testing, if // borders/shadow have to be joined with previous frame. - bool JoinedWithPrev( const SwFrm& _rFrm, - const SwFrm* _pPrevFrm = nullptr ) const; - bool JoinedWithNext( const SwFrm& _rFrm ) const; + bool JoinedWithPrev( const SwFrame& _rFrame, + const SwFrame* _pPrevFrame = nullptr ) const; + bool JoinedWithNext( const SwFrame& _rFrame ) const; }; class SwBorderAttrAccess : public SwCacheAccess { - const SwFrm *pConstructor; //opt: for passing on to SwBorderAttrs + const SwFrame *pConstructor; //opt: for passing on to SwBorderAttrs protected: virtual SwCacheObj *NewObj() override; public: - SwBorderAttrAccess( SwCache &rCache, const SwFrm *pOwner ); + SwBorderAttrAccess( SwCache &rCache, const SwFrame *pOwner ); SwBorderAttrs *Get(); }; @@ -392,12 +392,12 @@ public: // SortArray needs to be traversed. class SwOrderIter { - const SwPageFrm *m_pPage; + const SwPageFrame *m_pPage; const SdrObject *m_pCurrent; const bool m_bFlysOnly; public: - SwOrderIter( const SwPageFrm *pPage, bool bFlysOnly = true ); + SwOrderIter( const SwPageFrame *pPage, bool bFlysOnly = true ); void Current( const SdrObject *pNew ) { m_pCurrent = pNew; } const SdrObject *operator()() const { return m_pCurrent; } @@ -429,21 +429,21 @@ public: }; // Should upper (or lower) border be evaluated for this frame? -// #i25029# - If <_pPrevFrm> is set, its value is taken for testing, if +// #i25029# - If <_pPrevFrame> is set, its value is taken for testing, if // borders/shadow have to be joined with previous frame. -inline sal_uInt16 SwBorderAttrs::GetTopLine ( const SwFrm& _rFrm, - const SwFrm* _pPrevFrm ) const +inline sal_uInt16 SwBorderAttrs::GetTopLine ( const SwFrame& _rFrame, + const SwFrame* _pPrevFrame ) const { - if ( !m_bCachedGetTopLine || _pPrevFrm ) + if ( !m_bCachedGetTopLine || _pPrevFrame ) { - const_cast<SwBorderAttrs*>(this)->_GetTopLine( _rFrm, _pPrevFrm ); + const_cast<SwBorderAttrs*>(this)->_GetTopLine( _rFrame, _pPrevFrame ); } return m_nGetTopLine; } -inline sal_uInt16 SwBorderAttrs::GetBottomLine( const SwFrm& _rFrm ) const +inline sal_uInt16 SwBorderAttrs::GetBottomLine( const SwFrame& _rFrame ) const { if ( !m_bCachedGetBottomLine ) - const_cast<SwBorderAttrs*>(this)->_GetBottomLine( _rFrm ); + const_cast<SwBorderAttrs*>(this)->_GetBottomLine( _rFrame ); return m_nGetBottomLine; } inline void SwBorderAttrs::SetGetCacheLine( bool bNew ) const @@ -507,7 +507,7 @@ inline bool SwBorderAttrs::IsLine() const #i102458# Add output parameter <obIsLineSpacingProportional> - @param rFrm + @param rFrame input parameter - frame, for which the spacing values are determined. @param onPrevLowerSpacing @@ -518,7 +518,7 @@ inline bool SwBorderAttrs::IsLine() const @param obIsLineSpacingProportional */ -void GetSpacingValuesOfFrm( const SwFrm& rFrm, +void GetSpacingValuesOfFrame( const SwFrame& rFrame, SwTwips& onLowerSpacing, SwTwips& onLineSpacing, bool& obIsLineSpacingProportional ); @@ -535,7 +535,7 @@ void GetSpacingValuesOfFrm( const SwFrm& rFrm, pointer to the found content frame or 0 */ -const SwContentFrm* GetCellContent( const SwLayoutFrm& rCell_ ); +const SwContentFrame* GetCellContent( const SwLayoutFrame& rCell_ ); /** helper class to check if a frame has been deleted during an operation * WARNING! This should only be used as a last and desperate means to make the @@ -545,19 +545,19 @@ const SwContentFrm* GetCellContent( const SwLayoutFrm& rCell_ ); class SwDeletionChecker { private: - const SwFrm* mpFrm; + const SwFrame* mpFrame; const SwModify* mpRegIn; public: - SwDeletionChecker( const SwFrm* pFrm ) - : mpFrm( pFrm ), - mpRegIn( pFrm ? const_cast<SwFrm*>(pFrm)->GetRegisteredIn() : nullptr ) + SwDeletionChecker( const SwFrame* pFrame ) + : mpFrame( pFrame ), + mpRegIn( pFrame ? const_cast<SwFrame*>(pFrame)->GetRegisteredIn() : nullptr ) { } /** * return - * true if mpFrm != 0 and mpFrm is not client of pRegIn + * true if mpFrame != 0 and mpFrame is not client of pRegIn * false otherwise */ bool HasBeenDeleted(); diff --git a/sw/source/core/inc/ftnboss.hxx b/sw/source/core/inc/ftnboss.hxx index 6d62c2e01754..2a61219801ce 100644 --- a/sw/source/core/inc/ftnboss.hxx +++ b/sw/source/core/inc/ftnboss.hxx @@ -22,20 +22,20 @@ #include "layfrm.hxx" -class SwFootnoteBossFrm; -class SwFootnoteContFrm; -class SwFootnoteFrm; +class SwFootnoteBossFrame; +class SwFootnoteContFrame; +class SwFootnoteFrame; class SwTextFootnote; // Set max. footnote area. // Restoration of the old value in DTor. Implementation in ftnfrm.cxx class SwSaveFootnoteHeight { - SwFootnoteBossFrm *pBoss; + SwFootnoteBossFrame *pBoss; const SwTwips nOldHeight; SwTwips nNewHeight; public: - SwSaveFootnoteHeight( SwFootnoteBossFrm *pBs, const SwTwips nDeadLine ); + SwSaveFootnoteHeight( SwFootnoteBossFrame *pBs, const SwTwips nDeadLine ); ~SwSaveFootnoteHeight(); }; @@ -44,47 +44,47 @@ public: #define NA_GROW_ADJUST 2 #define NA_ADJUST_GROW 3 -typedef std::vector<SwFootnoteFrm*> SwFootnoteFrms; +typedef std::vector<SwFootnoteFrame*> SwFootnoteFrames; -class SwFootnoteBossFrm: public SwLayoutFrm +class SwFootnoteBossFrame: public SwLayoutFrame { // for private footnote operations - friend class SwFrm; + friend class SwFrame; friend class SwSaveFootnoteHeight; - friend class SwPageFrm; // for setting of MaxFootnoteHeight + friend class SwPageFrame; // for setting of MaxFootnoteHeight // max. height of the footnote container on this page SwTwips nMaxFootnoteHeight; - SwFootnoteContFrm *MakeFootnoteCont(); - SwFootnoteFrm *FindFirstFootnote(); - sal_uInt8 _NeighbourhoodAdjustment( const SwFrm* pFrm ) const; + SwFootnoteContFrame *MakeFootnoteCont(); + SwFootnoteFrame *FindFirstFootnote(); + sal_uInt8 _NeighbourhoodAdjustment( const SwFrame* pFrame ) const; protected: - void InsertFootnote( SwFootnoteFrm * ); - static void ResetFootnote( const SwFootnoteFrm *pAssumed ); + void InsertFootnote( SwFootnoteFrame * ); + static void ResetFootnote( const SwFootnoteFrame *pAssumed ); public: - inline SwFootnoteBossFrm( SwFrameFormat* pFormat, SwFrm* pSib ) - : SwLayoutFrm( pFormat, pSib ) + inline SwFootnoteBossFrame( SwFrameFormat* pFormat, SwFrame* pSib ) + : SwLayoutFrame( pFormat, pSib ) , nMaxFootnoteHeight(0) {} - SwLayoutFrm *FindBodyCont(); - inline const SwLayoutFrm *FindBodyCont() const; + SwLayoutFrame *FindBodyCont(); + inline const SwLayoutFrame *FindBodyCont() const; inline void SetMaxFootnoteHeight( const SwTwips nNewMax ) { nMaxFootnoteHeight = nNewMax; } // footnote interface - void AppendFootnote( SwContentFrm *, SwTextFootnote * ); - void RemoveFootnote( const SwContentFrm *, const SwTextFootnote *, bool bPrep = true ); - static SwFootnoteFrm *FindFootnote( const SwContentFrm *, const SwTextFootnote * ); - SwFootnoteContFrm *FindFootnoteCont(); - inline const SwFootnoteContFrm *FindFootnoteCont() const; - const SwFootnoteFrm *FindFirstFootnote( SwContentFrm* ) const; - SwFootnoteContFrm *FindNearestFootnoteCont( bool bDontLeave = false ); - - static void ChangeFootnoteRef( const SwContentFrm *pOld, const SwTextFootnote *, - SwContentFrm *pNew ); + void AppendFootnote( SwContentFrame *, SwTextFootnote * ); + void RemoveFootnote( const SwContentFrame *, const SwTextFootnote *, bool bPrep = true ); + static SwFootnoteFrame *FindFootnote( const SwContentFrame *, const SwTextFootnote * ); + SwFootnoteContFrame *FindFootnoteCont(); + inline const SwFootnoteContFrame *FindFootnoteCont() const; + const SwFootnoteFrame *FindFirstFootnote( SwContentFrame* ) const; + SwFootnoteContFrame *FindNearestFootnoteCont( bool bDontLeave = false ); + + static void ChangeFootnoteRef( const SwContentFrame *pOld, const SwTextFootnote *, + SwContentFrame *pNew ); void RearrangeFootnotes( const SwTwips nDeadLine, const bool bLock = false, const SwTextFootnote *pAttr = nullptr ); @@ -97,40 +97,40 @@ public: SwTwips GetVarSpace() const; // methods needed for layouting - // The parameters <_bCollectOnlyPreviousFootnotes> and <_pRefFootnoteBossFrm> control + // The parameters <_bCollectOnlyPreviousFootnotes> and <_pRefFootnoteBossFrame> control // if only footnotes that are positioned before the given reference // footnote boss-frame have to be collected. // Note: if parameter <_bCollectOnlyPreviousFootnotes> is true, then parameter - // <_pRefFootnoteBossFrm> has to be referenced by an object. - static void _CollectFootnotes( const SwContentFrm* _pRef, - SwFootnoteFrm* _pFootnote, - SwFootnoteFrms& _rFootnoteArr, + // <_pRefFootnoteBossFrame> has to be referenced by an object. + static void _CollectFootnotes( const SwContentFrame* _pRef, + SwFootnoteFrame* _pFootnote, + SwFootnoteFrames& _rFootnoteArr, const bool _bCollectOnlyPreviousFootnotes = false, - const SwFootnoteBossFrm* _pRefFootnoteBossFrm = nullptr); + const SwFootnoteBossFrame* _pRefFootnoteBossFrame = nullptr); // The parameter <_bCollectOnlyPreviousFootnotes> controls if only footnotes // that are positioned before the footnote boss-frame <this> have to be // collected. - void CollectFootnotes( const SwContentFrm* _pRef, - SwFootnoteBossFrm* _pOld, - SwFootnoteFrms& _rFootnoteArr, + void CollectFootnotes( const SwContentFrame* _pRef, + SwFootnoteBossFrame* _pOld, + SwFootnoteFrames& _rFootnoteArr, const bool _bCollectOnlyPreviousFootnotes = false ); - void _MoveFootnotes( SwFootnoteFrms &rFootnoteArr, bool bCalc = false ); - void MoveFootnotes( const SwContentFrm *pSrc, SwContentFrm *pDest, + void _MoveFootnotes( SwFootnoteFrames &rFootnoteArr, bool bCalc = false ); + void MoveFootnotes( const SwContentFrame *pSrc, SwContentFrame *pDest, SwTextFootnote *pAttr ); // should AdjustNeighbourhood be called (or Grow/Shrink)? - sal_uInt8 NeighbourhoodAdjustment( const SwFrm* pFrm ) const - { return IsPageFrm() ? NA_ONLY_ADJUST : _NeighbourhoodAdjustment( pFrm ); } + sal_uInt8 NeighbourhoodAdjustment( const SwFrame* pFrame ) const + { return IsPageFrame() ? NA_ONLY_ADJUST : _NeighbourhoodAdjustment( pFrame ); } }; -inline const SwLayoutFrm *SwFootnoteBossFrm::FindBodyCont() const +inline const SwLayoutFrame *SwFootnoteBossFrame::FindBodyCont() const { - return const_cast<SwFootnoteBossFrm*>(this)->FindBodyCont(); + return const_cast<SwFootnoteBossFrame*>(this)->FindBodyCont(); } -inline const SwFootnoteContFrm *SwFootnoteBossFrm::FindFootnoteCont() const +inline const SwFootnoteContFrame *SwFootnoteBossFrame::FindFootnoteCont() const { - return const_cast<SwFootnoteBossFrm*>(this)->FindFootnoteCont(); + return const_cast<SwFootnoteBossFrame*>(this)->FindFootnoteCont(); } #endif diff --git a/sw/source/core/inc/ftnfrm.hxx b/sw/source/core/inc/ftnfrm.hxx index ab8f83d76ef9..974ad841783f 100644 --- a/sw/source/core/inc/ftnfrm.hxx +++ b/sw/source/core/inc/ftnfrm.hxx @@ -22,42 +22,42 @@ #include "layfrm.hxx" -class SwContentFrm; +class SwContentFrame; class SwTextFootnote; class SwBorderAttrs; -class SwFootnoteFrm; +class SwFootnoteFrame; -void sw_RemoveFootnotes( SwFootnoteBossFrm* pBoss, bool bPageOnly, bool bEndNotes ); +void sw_RemoveFootnotes( SwFootnoteBossFrame* pBoss, bool bPageOnly, bool bEndNotes ); // There exists a special section on a page for footnotes. It's called -// SwFootnoteContFrm. Each footnote is separated by a SwFootnoteFrm which contains -// the paragraphs of a footnote. SwFootnoteFrm can be splitted and will then +// SwFootnoteContFrame. Each footnote is separated by a SwFootnoteFrame which contains +// the paragraphs of a footnote. SwFootnoteFrame can be splitted and will then // continue on another page. -class SwFootnoteContFrm: public SwLayoutFrm +class SwFootnoteContFrame: public SwLayoutFrame { public: - SwFootnoteContFrm( SwFrameFormat*, SwFrm* ); + SwFootnoteContFrame( SwFrameFormat*, SwFrame* ); - const SwFootnoteFrm* FindFootNote() const; + const SwFootnoteFrame* FindFootNote() const; - virtual SwTwips ShrinkFrm( SwTwips, bool bTst = false, bool bInfo = false ) override; - virtual SwTwips GrowFrm ( SwTwips, bool bTst = false, bool bInfo = false ) override; + virtual SwTwips ShrinkFrame( SwTwips, bool bTst = false, bool bInfo = false ) override; + virtual SwTwips GrowFrame ( SwTwips, bool bTst = false, bool bInfo = false ) override; virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = nullptr ) override; - virtual void PaintBorder( const SwRect &, const SwPageFrm *pPage, + virtual void PaintBorder( const SwRect &, const SwPageFrame *pPage, const SwBorderAttrs & ) const override; - virtual void PaintSubsidiaryLines( const SwPageFrm*, const SwRect& ) const override; - void PaintLine( const SwRect &, const SwPageFrm * ) const; + virtual void PaintSubsidiaryLines( const SwPageFrame*, const SwRect& ) const override; + void PaintLine( const SwRect &, const SwPageFrame * ) const; }; -class SwFootnoteFrm: public SwLayoutFrm +class SwFootnoteFrame: public SwLayoutFrame { - // Pointer to FootnoteFrm in which the footnote will be continued: + // Pointer to FootnoteFrame in which the footnote will be continued: // - 0 no following existent // - this for the last one - // - otherwise the following FootnoteFrm - SwFootnoteFrm *pFollow; - SwFootnoteFrm *pMaster; // FootnoteFrm from which I am the following - SwContentFrm *pRef; // in this ContentFrm is the footnote reference + // - otherwise the following FootnoteFrame + SwFootnoteFrame *pFollow; + SwFootnoteFrame *pMaster; // FootnoteFrame from which I am the following + SwContentFrame *pRef; // in this ContentFrame is the footnote reference SwTextFootnote *pAttr; // footnote attribute (for recognition) // if true paragraphs in this footnote are NOT permitted to flow backwards @@ -66,50 +66,50 @@ class SwFootnoteFrm: public SwLayoutFrm bool mbUnlockPosOfLowerObjs : 1; #ifdef DBG_UTIL protected: - virtual SwTwips ShrinkFrm( SwTwips, bool bTst = false, bool bInfo = false ) override; - virtual SwTwips GrowFrm ( SwTwips, bool bTst = false, bool bInfo = false ) override; + virtual SwTwips ShrinkFrame( SwTwips, bool bTst = false, bool bInfo = false ) override; + virtual SwTwips GrowFrame ( SwTwips, bool bTst = false, bool bInfo = false ) override; #endif public: - SwFootnoteFrm( SwFrameFormat*, SwFrm*, SwContentFrm*, SwTextFootnote* ); + SwFootnoteFrame( SwFrameFormat*, SwFrame*, SwContentFrame*, SwTextFootnote* ); virtual void Cut() override; - virtual void Paste( SwFrm* pParent, SwFrm* pSibling = nullptr ) override; + virtual void Paste( SwFrame* pParent, SwFrame* pSibling = nullptr ) override; - virtual void PaintSubsidiaryLines( const SwPageFrm*, const SwRect& ) const override; + virtual void PaintSubsidiaryLines( const SwPageFrame*, const SwRect& ) const override; bool operator<( const SwTextFootnote* pTextFootnote ) const; #ifdef DBG_UTIL - const SwContentFrm *GetRef() const; - SwContentFrm *GetRef(); + const SwContentFrame *GetRef() const; + SwContentFrame *GetRef(); #else - const SwContentFrm *GetRef() const { return pRef; } - SwContentFrm *GetRef() { return pRef; } + const SwContentFrame *GetRef() const { return pRef; } + SwContentFrame *GetRef() { return pRef; } #endif - const SwContentFrm *GetRefFromAttr() const; - SwContentFrm *GetRefFromAttr(); + const SwContentFrame *GetRefFromAttr() const; + SwContentFrame *GetRefFromAttr(); - const SwFootnoteFrm *GetFollow() const { return pFollow; } - SwFootnoteFrm *GetFollow() { return pFollow; } + const SwFootnoteFrame *GetFollow() const { return pFollow; } + SwFootnoteFrame *GetFollow() { return pFollow; } - const SwFootnoteFrm *GetMaster() const { return pMaster; } - SwFootnoteFrm *GetMaster() { return pMaster; } + const SwFootnoteFrame *GetMaster() const { return pMaster; } + SwFootnoteFrame *GetMaster() { return pMaster; } const SwTextFootnote *GetAttr() const { return pAttr; } SwTextFootnote *GetAttr() { return pAttr; } - void SetFollow( SwFootnoteFrm *pNew ) { pFollow = pNew; } - void SetMaster( SwFootnoteFrm *pNew ) { pMaster = pNew; } - void SetRef ( SwContentFrm *pNew ) { pRef = pNew; } + void SetFollow( SwFootnoteFrame *pNew ) { pFollow = pNew; } + void SetMaster( SwFootnoteFrame *pNew ) { pMaster = pNew; } + void SetRef ( SwContentFrame *pNew ) { pRef = pNew; } - void InvalidateNxtFootnoteCnts( SwPageFrm* pPage ); + void InvalidateNxtFootnoteCnts( SwPageFrame* pPage ); void LockBackMove() { bBackMoveLocked = true; } void UnlockBackMove() { bBackMoveLocked = false;} bool IsBackMoveLocked() { return bBackMoveLocked; } - // prevents that the last content deletes the SwFootnoteFrm as well (Cut()) + // prevents that the last content deletes the SwFootnoteFrame as well (Cut()) inline void ColLock() { mbColLocked = true; } inline void ColUnlock() { mbColLocked = false; } @@ -131,10 +131,10 @@ public: OD 2005-12-02 #i27138# - @return SwContentFrm* + @return SwContentFrame* pointer to found last content frame. NULL, if none is found. */ - SwContentFrm* FindLastContent(); + SwContentFrame* FindLastContent(); }; #endif diff --git a/sw/source/core/inc/hffrm.hxx b/sw/source/core/inc/hffrm.hxx index 273bda293568..9986df1e6846 100644 --- a/sw/source/core/inc/hffrm.hxx +++ b/sw/source/core/inc/hffrm.hxx @@ -23,7 +23,7 @@ #include <tools/mempool.hxx> #include "layfrm.hxx" -class SwHeadFootFrm : public SwLayoutFrm +class SwHeadFootFrame : public SwLayoutFrame { protected: void FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs); @@ -31,31 +31,31 @@ protected: inline bool GetEatSpacing() const; // in hffrm.cxx public: - SwHeadFootFrm(SwFrameFormat * pFrm, SwFrm*, sal_uInt16 aType); + SwHeadFootFrame(SwFrameFormat * pFrame, SwFrame*, sal_uInt16 aType); virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = nullptr ) override; - virtual SwTwips GrowFrm( SwTwips, + virtual SwTwips GrowFrame( SwTwips, bool bTst = false, bool bInfo = false ) override; - virtual SwTwips ShrinkFrm( SwTwips, + virtual SwTwips ShrinkFrame( SwTwips, bool bTst = false, bool bInfo = false ) override; - virtual void PaintSubsidiaryLines( const SwPageFrm*, const SwRect& ) const override; + virtual void PaintSubsidiaryLines( const SwPageFrame*, const SwRect& ) const override; }; /// Header in the document layout, inside a page. -class SwHeaderFrm: public SwHeadFootFrm +class SwHeaderFrame: public SwHeadFootFrame { public: - SwHeaderFrm( SwFrameFormat* pFrm, SwFrm* pSib ) : SwHeadFootFrm(pFrm, pSib, FRM_HEADER) {}; + SwHeaderFrame( SwFrameFormat* pFrame, SwFrame* pSib ) : SwHeadFootFrame(pFrame, pSib, FRM_HEADER) {}; - DECL_FIXEDMEMPOOL_NEWDEL(SwHeaderFrm) + DECL_FIXEDMEMPOOL_NEWDEL(SwHeaderFrame) }; /// Footer in the document layout, inside a page. -class SwFooterFrm: public SwHeadFootFrm +class SwFooterFrame: public SwHeadFootFrame { public: - SwFooterFrm( SwFrameFormat* pFrm, SwFrm* pSib ) : SwHeadFootFrm(pFrm, pSib, FRM_FOOTER) {}; + SwFooterFrame( SwFrameFormat* pFrame, SwFrame* pSib ) : SwHeadFootFrame(pFrame, pSib, FRM_FOOTER) {}; - DECL_FIXEDMEMPOOL_NEWDEL(SwFooterFrm) + DECL_FIXEDMEMPOOL_NEWDEL(SwFooterFrame) }; #endif diff --git a/sw/source/core/inc/layact.hxx b/sw/source/core/inc/layact.hxx index 57259d8344ca..bcb1a0f7cfb2 100644 --- a/sw/source/core/inc/layact.hxx +++ b/sw/source/core/inc/layact.hxx @@ -26,12 +26,12 @@ #include "swtypes.hxx" #include "swrect.hxx" -class SwRootFrm; -class SwLayoutFrm; -class SwPageFrm; -class SwFlyFrm; -class SwContentFrm; -class SwTabFrm; +class SwRootFrame; +class SwLayoutFrame; +class SwPageFrame; +class SwFlyFrame; +class SwContentFrame; +class SwTabFrame; class SwViewShellImp; class SwContentNode; class SwWait; @@ -50,15 +50,15 @@ class SwWait; */ class SwLayAction { - SwRootFrm *m_pRoot; + SwRootFrame *m_pRoot; SwViewShellImp *m_pImp; // here the action logs in and off // For the sake of optimization, so that the tables stick a bit better to - // the Crsr when hitting return/backspace in front of one. - // The first TabFrm that paints itself (per page) adds itself to the pointer. - // The ContentFrms beneath the page do not need to deregister at the Shell for + // the Cursor when hitting return/backspace in front of one. + // The first TabFrame that paints itself (per page) adds itself to the pointer. + // The ContentFrames beneath the page do not need to deregister at the Shell for // painting. - const SwTabFrm *m_pOptTab; + const SwTabFrame *m_pOptTab; SwWait *m_pWait; @@ -68,7 +68,7 @@ class SwLayAction sal_uInt16 m_nPreInvaPage; std::clock_t m_nStartTicks; // The Action's starting time; if too much time passes the - // WaitCrsr can be enabled via CheckWaitCrsr() + // WaitCursor can be enabled via CheckWaitCursor() VclInputFlags m_nInputType; // Which input should terminate processing sal_uInt16 m_nEndPage; // StatBar control @@ -93,25 +93,25 @@ class SwLayAction // OD 14.04.2003 #106346# - new flag for content formatting on interrupt. bool mbFormatContentOnInterrupt; - void PaintContent( const SwContentFrm *, const SwPageFrm *, + void PaintContent( const SwContentFrame *, const SwPageFrame *, const SwRect &rOldRect, long nOldBottom ); - bool PaintWithoutFlys( const SwRect &, const SwContentFrm *, - const SwPageFrm * ); - inline bool _PaintContent( const SwContentFrm *, const SwPageFrm *, + bool PaintWithoutFlys( const SwRect &, const SwContentFrame *, + const SwPageFrame * ); + inline bool _PaintContent( const SwContentFrame *, const SwPageFrame *, const SwRect & ); - bool FormatLayout( OutputDevice* pRenderContext, SwLayoutFrm *, bool bAddRect = true ); - bool FormatLayoutTab( SwTabFrm *, bool bAddRect = true ); - bool FormatContent( const SwPageFrm* pPage ); - void _FormatContent( const SwContentFrm* pContent, - const SwPageFrm* pPage ); - bool IsShortCut( SwPageFrm *& ); + bool FormatLayout( OutputDevice* pRenderContext, SwLayoutFrame *, bool bAddRect = true ); + bool FormatLayoutTab( SwTabFrame *, bool bAddRect = true ); + bool FormatContent( const SwPageFrame* pPage ); + void _FormatContent( const SwContentFrame* pContent, + const SwPageFrame* pPage ); + bool IsShortCut( SwPageFrame *& ); bool TurboAction(); - bool _TurboAction( const SwContentFrm * ); + bool _TurboAction( const SwContentFrame * ); void InternalAction(OutputDevice* pRenderContext); - static SwPageFrm *CheckFirstVisPage( SwPageFrm *pPage ); + static SwPageFrame *CheckFirstVisPage( SwPageFrame *pPage ); bool RemoveEmptyBrowserPages(); @@ -119,7 +119,7 @@ class SwLayAction inline std::clock_t GetStartTicks() { return m_nStartTicks; } public: - SwLayAction( SwRootFrm *pRt, SwViewShellImp *pImp ); + SwLayAction( SwRootFrame *pRt, SwViewShellImp *pImp ); ~SwLayAction(); void SetIdle ( bool bNew ) { m_bIdle = bNew; } @@ -167,21 +167,21 @@ public: sal_uInt16 GetCheckPageNum() const { return m_nCheckPageNum; } - // others should be able to activate the WaitCrsr, too - void CheckWaitCrsr(); + // others should be able to activate the WaitCursor, too + void CheckWaitCursor(); // #i28701# - method is now public; // delete 2nd parameter, because its not used; - bool FormatLayoutFly( SwFlyFrm * ); + bool FormatLayoutFly( SwFlyFrame * ); // #i28701# - method is now public - bool _FormatFlyContent( const SwFlyFrm * ); + bool _FormatFlyContent( const SwFlyFrame * ); }; class SwLayIdle { - SwRootFrm *pRoot; + SwRootFrame *pRoot; SwViewShellImp *pImp; // The Idler registers and deregisters here SwContentNode *pContentNode; // The current cursor position is saved here sal_Int32 nTextPos; @@ -197,11 +197,11 @@ class SwLayIdle #endif enum IdleJobType{ ONLINE_SPELLING, AUTOCOMPLETE_WORDS, WORD_COUNT, SMART_TAGS }; - bool _DoIdleJob( const SwContentFrm*, IdleJobType ); + bool _DoIdleJob( const SwContentFrame*, IdleJobType ); bool DoIdleJob( IdleJobType, bool bVisAreaOnly ); public: - SwLayIdle( SwRootFrm *pRt, SwViewShellImp *pImp ); + SwLayIdle( SwRootFrame *pRt, SwViewShellImp *pImp ); ~SwLayIdle(); }; diff --git a/sw/source/core/inc/layfrm.hxx b/sw/source/core/inc/layfrm.hxx index 972c0daff1a8..566ca5490ee7 100644 --- a/sw/source/core/inc/layfrm.hxx +++ b/sw/source/core/inc/layfrm.hxx @@ -22,51 +22,51 @@ #include "frame.hxx" class SwAnchoredObject; -class SwContentFrm; -class SwFlowFrm; +class SwContentFrame; +class SwFlowFrame; class SwFormatCol; -struct SwCrsrMoveState; +struct SwCursorMoveState; class SwFrameFormat; class SwBorderAttrs; -class SwFormatFrmSize; -class SwCellFrm; +class SwFormatFrameSize; +class SwCellFrame; -class SwLayoutFrm: public SwFrm +class SwLayoutFrame: public SwFrame { - // The SwFrm in disguise - friend class SwFlowFrm; - friend class SwFrm; + // The SwFrame in disguise + friend class SwFlowFrame; + friend class SwFrame; // Releases the Lower while restructuring columns - friend SwFrm* SaveContent( SwLayoutFrm *, SwFrm * ); - friend void RestoreContent( SwFrm *, SwLayoutFrm *, SwFrm *pSibling, bool bGrow ); + friend SwFrame* SaveContent( SwLayoutFrame *, SwFrame * ); + friend void RestoreContent( SwFrame *, SwLayoutFrame *, SwFrame *pSibling, bool bGrow ); #ifdef DBG_UTIL - //removes empty SwSectionFrms from a chain - friend SwFrm* SwClearDummies( SwFrm* pFrm ); + //removes empty SwSectionFrames from a chain + friend SwFrame* SwClearDummies( SwFrame* pFrame ); #endif protected: virtual void DestroyImpl() override; - virtual ~SwLayoutFrm(); + virtual ~SwLayoutFrame(); virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = nullptr ) override; virtual void MakeAll(vcl::RenderContext* pRenderContext) override; - SwFrm * m_pLower; - std::vector<SwAnchoredObject*> m_VertPosOrientFrmsFor; + SwFrame * m_pLower; + std::vector<SwAnchoredObject*> m_VertPosOrientFramesFor; - virtual SwTwips ShrinkFrm( SwTwips, bool bTst = false, bool bInfo = false ) override; - virtual SwTwips GrowFrm ( SwTwips, bool bTst = false, bool bInfo = false ) override; + virtual SwTwips ShrinkFrame( SwTwips, bool bTst = false, bool bInfo = false ) override; + virtual SwTwips GrowFrame ( SwTwips, bool bTst = false, bool bInfo = false ) override; - long CalcRel( const SwFormatFrmSize &rSz, bool bWidth ) const; + long CalcRel( const SwFormatFrameSize &rSz, bool bWidth ) const; public: // --> #i28701# - virtual void PaintSubsidiaryLines( const SwPageFrm*, const SwRect& ) const; - void RefreshLaySubsidiary( const SwPageFrm*, const SwRect& ) const; + virtual void PaintSubsidiaryLines( const SwPageFrame*, const SwRect& ) const; + void RefreshLaySubsidiary( const SwPageFrame*, const SwRect& ) const; void RefreshExtraData( const SwRect & ) const; /// Change size of lowers proportionally @@ -79,36 +79,36 @@ public: /// Paints the column separation line for the inner columns void PaintColLines( const SwRect &, const SwFormatCol &, - const SwPageFrm * ) const; + const SwPageFrame * ) const; virtual bool FillSelection( SwSelectionList& rList, const SwRect& rRect ) const override; - virtual bool GetCrsrOfst( SwPosition *, Point&, - SwCrsrMoveState* = nullptr, bool bTestBackground = false ) const override; + virtual bool GetCursorOfst( SwPosition *, Point&, + SwCursorMoveState* = nullptr, bool bTestBackground = false ) const override; virtual void Cut() override; - virtual void Paste( SwFrm* pParent, SwFrm* pSibling = nullptr ) override; + virtual void Paste( SwFrame* pParent, SwFrame* pSibling = nullptr ) override; /** * Finds the closest Content for the SPoint - * Is used for Pages, Flys and Cells if GetCrsrOfst failed + * Is used for Pages, Flys and Cells if GetCursorOfst failed */ - const SwContentFrm* GetContentPos( Point &rPoint, const bool bDontLeave, + const SwContentFrame* GetContentPos( Point &rPoint, const bool bDontLeave, const bool bBodyOnly = false, const bool bCalc = false, - const SwCrsrMoveState *pCMS = nullptr, + const SwCursorMoveState *pCMS = nullptr, const bool bDefaultExpand = true ) const; - SwLayoutFrm( SwFrameFormat*, SwFrm* ); + SwLayoutFrame( SwFrameFormat*, SwFrame* ); virtual void Paint( vcl::RenderContext& rRenderContext, SwRect const&, SwPrintData const*const pPrintData = nullptr ) const override; - const SwFrm *Lower() const { return m_pLower; } - SwFrm *Lower() { return m_pLower; } - const SwContentFrm *ContainsContent() const; - inline SwContentFrm *ContainsContent(); - const SwCellFrm *FirstCell() const; - inline SwCellFrm *FirstCell(); + const SwFrame *Lower() const { return m_pLower; } + SwFrame *Lower() { return m_pLower; } + const SwContentFrame *ContainsContent() const; + inline SwContentFrame *ContainsContent(); + const SwCellFrame *FirstCell() const; + inline SwCellFrame *FirstCell(); /** * Method <ContainsAny()> doesn't investigate content of footnotes by default. @@ -117,9 +117,9 @@ public: * It's default is <false>, still indicating that content of footnotes isn't * investigated for sections. */ - const SwFrm *ContainsAny( const bool _bInvestigateFootnoteForSections = false ) const; - inline SwFrm *ContainsAny( const bool _bInvestigateFootnoteForSections = false ); - bool IsAnLower( const SwFrm * ) const; + const SwFrame *ContainsAny( const bool _bInvestigateFootnoteForSections = false ) const; + inline SwFrame *ContainsAny( const bool _bInvestigateFootnoteForSections = false ); + bool IsAnLower( const SwFrame * ) const; virtual const SwFrameFormat *GetFormat() const; virtual SwFrameFormat *GetFormat(); @@ -131,8 +131,8 @@ public: * @returns true if at least one Footnote was moved * Calls the page number update if bFootnoteNums is set */ - bool MoveLowerFootnotes( SwContentFrm *pStart, SwFootnoteBossFrm *pOldBoss, - SwFootnoteBossFrm *pNewBoss, const bool bFootnoteNums ); + bool MoveLowerFootnotes( SwContentFrame *pStart, SwFootnoteBossFrame *pOldBoss, + SwFootnoteBossFrame *pNewBoss, const bool bFootnoteNums ); // --> #i28701# - change purpose of method and its name // --> #i44016# - add parameter <_bUnlockPosOfObjs> to @@ -162,30 +162,30 @@ public: refactoring of pseudo-local method <lcl_Apres(..)> in <txtftn.cxx> for #104840#. - @param _aCheckRefLayFrm - constant reference of an instance of class <SwLayoutFrm> which + @param _aCheckRefLayFrame + constant reference of an instance of class <SwLayoutFrame> which is used as the reference for the relative position check. @return true, if <this> is positioned before the layout frame <p> */ - bool IsBefore( const SwLayoutFrm* _pCheckRefLayFrm ) const; + bool IsBefore( const SwLayoutFrame* _pCheckRefLayFrame ) const; - const SwFrm* GetLastLower() const; - inline SwFrm* GetLastLower(); + const SwFrame* GetLastLower() const; + inline SwFrame* GetLastLower(); virtual void PaintBreak() const; - void SetVertPosOrientFrmFor(SwAnchoredObject *pObj) + void SetVertPosOrientFrameFor(SwAnchoredObject *pObj) { - m_VertPosOrientFrmsFor.push_back(pObj); + m_VertPosOrientFramesFor.push_back(pObj); } - void ClearVertPosOrientFrmFor(SwAnchoredObject *pObj) + void ClearVertPosOrientFrameFor(SwAnchoredObject *pObj) { - m_VertPosOrientFrmsFor.erase( - std::remove(m_VertPosOrientFrmsFor.begin(), - m_VertPosOrientFrmsFor.end(), pObj), - m_VertPosOrientFrmsFor.end()); + m_VertPosOrientFramesFor.erase( + std::remove(m_VertPosOrientFramesFor.begin(), + m_VertPosOrientFramesFor.end(), pObj), + m_VertPosOrientFramesFor.end()); } }; @@ -193,37 +193,37 @@ public: * In order to save us from duplicating implementations, we cast here * a little. */ -inline SwContentFrm* SwLayoutFrm::ContainsContent() +inline SwContentFrame* SwLayoutFrame::ContainsContent() { - return const_cast<SwContentFrm*>(static_cast<const SwLayoutFrm*>(this)->ContainsContent()); + return const_cast<SwContentFrame*>(static_cast<const SwLayoutFrame*>(this)->ContainsContent()); } -inline SwCellFrm* SwLayoutFrm::FirstCell() +inline SwCellFrame* SwLayoutFrame::FirstCell() { - return const_cast<SwCellFrm*>(static_cast<const SwLayoutFrm*>(this)->FirstCell()); + return const_cast<SwCellFrame*>(static_cast<const SwLayoutFrame*>(this)->FirstCell()); } -inline SwFrm* SwLayoutFrm::ContainsAny( const bool _bInvestigateFootnoteForSections ) +inline SwFrame* SwLayoutFrame::ContainsAny( const bool _bInvestigateFootnoteForSections ) { - return const_cast<SwFrm*>(static_cast<const SwLayoutFrm*>(this)->ContainsAny( _bInvestigateFootnoteForSections )); + return const_cast<SwFrame*>(static_cast<const SwLayoutFrame*>(this)->ContainsAny( _bInvestigateFootnoteForSections )); } /** - * These SwFrm inlines are here, so that frame.hxx does not need to include layfrm.hxx + * These SwFrame inlines are here, so that frame.hxx does not need to include layfrm.hxx */ -inline bool SwFrm::IsColBodyFrm() const +inline bool SwFrame::IsColBodyFrame() const { - return mnFrmType == FRM_BODY && GetUpper()->IsColumnFrm(); + return mnFrameType == FRM_BODY && GetUpper()->IsColumnFrame(); } -inline bool SwFrm::IsPageBodyFrm() const +inline bool SwFrame::IsPageBodyFrame() const { - return mnFrmType == FRM_BODY && GetUpper()->IsPageFrm(); + return mnFrameType == FRM_BODY && GetUpper()->IsPageFrame(); } -inline SwFrm* SwLayoutFrm::GetLastLower() +inline SwFrame* SwLayoutFrame::GetLastLower() { - return const_cast<SwFrm*>(static_cast<const SwLayoutFrm*>(this)->GetLastLower()); + return const_cast<SwFrame*>(static_cast<const SwLayoutFrame*>(this)->GetLastLower()); } #endif // INCLUDED_SW_SOURCE_CORE_INC_LAYFRM_HXX diff --git a/sw/source/core/inc/layouter.hxx b/sw/source/core/inc/layouter.hxx index 2c343b239374..bb4b8ed4e656 100644 --- a/sw/source/core/inc/layouter.hxx +++ b/sw/source/core/inc/layouter.hxx @@ -24,18 +24,18 @@ class SwEndnoter; class SwDoc; -class SwSectionFrm; -class SwFootnoteFrm; -class SwPageFrm; +class SwSectionFrame; +class SwFootnoteFrame; +class SwPageFrame; class SwLooping; -class SwMovedFwdFrmsByObjPos; -class SwTextFrm; -class SwRowFrm; +class SwMovedFwdFramesByObjPos; +class SwTextFrame; +class SwRowFrame; class SwObjsMarkedAsTmpConsiderWrapInfluence; class SwAnchoredObject; -class SwFlowFrm; -class SwLayoutFrm; +class SwFlowFrame; +class SwLayoutFrame; #define LOOP_PAGE 1 @@ -43,11 +43,11 @@ class SwLayouter { SwEndnoter* mpEndnoter; SwLooping* mpLooping; - void _CollectEndnotes( SwSectionFrm* pSect ); - bool StartLooping( SwPageFrm* pPage ); + void _CollectEndnotes( SwSectionFrame* pSect ); + bool StartLooping( SwPageFrame* pPage ); // --> #i28701# - SwMovedFwdFrmsByObjPos* mpMovedFwdFrms; + SwMovedFwdFramesByObjPos* mpMovedFwdFrames; // --> #i35911# SwObjsMarkedAsTmpConsiderWrapInfluence* mpObjsTmpConsiderWrapInfl; @@ -57,7 +57,7 @@ public: struct tMoveBwdLayoutInfoKey { // frame ID of flow frame - sal_uInt32 mnFrmId; + sal_uInt32 mnFrameId; // position of new upper frame SwTwips mnNewUpperPosX; SwTwips mnNewUpperPosY; @@ -73,7 +73,7 @@ private: { size_t operator()( const tMoveBwdLayoutInfoKey& p_key ) const { - return p_key.mnFrmId; + return p_key.mnFrameId; } }; struct fMoveBwdLayoutInfoKeyEq @@ -81,7 +81,7 @@ private: bool operator()( const tMoveBwdLayoutInfoKey& p_key1, const tMoveBwdLayoutInfoKey& p_key2 ) const { - return p_key1.mnFrmId == p_key2.mnFrmId && + return p_key1.mnFrameId == p_key2.mnFrameId && p_key1.mnNewUpperPosX == p_key2.mnNewUpperPosX && p_key1.mnNewUpperPosY == p_key2.mnNewUpperPosY && p_key1.mnNewUpperWidth == p_key2.mnNewUpperWidth && @@ -95,32 +95,32 @@ private: public: SwLayouter(); ~SwLayouter(); - void InsertEndnotes( SwSectionFrm* pSect ); - void CollectEndnote( SwFootnoteFrm* pFootnote ); + void InsertEndnotes( SwSectionFrame* pSect ); + void CollectEndnote( SwFootnoteFrame* pFootnote ); bool HasEndnotes() const; - void LoopControl( SwPageFrm* pPage, sal_uInt8 nLoop ); + void LoopControl( SwPageFrame* pPage, sal_uInt8 nLoop ); void EndLoopControl(); - void LoopingLouieLight( const SwDoc& rDoc, const SwTextFrm& rFrm ); + void LoopingLouieLight( const SwDoc& rDoc, const SwTextFrame& rFrame ); - static void CollectEndnotes( SwDoc* pDoc, SwSectionFrm* pSect ); - static bool Collecting( SwDoc* pDoc, SwSectionFrm* pSect, SwFootnoteFrm* pFootnote ); - static bool StartLoopControl( SwDoc* pDoc, SwPageFrm *pPage ); + static void CollectEndnotes( SwDoc* pDoc, SwSectionFrame* pSect ); + static bool Collecting( SwDoc* pDoc, SwSectionFrame* pSect, SwFootnoteFrame* pFootnote ); + static bool StartLoopControl( SwDoc* pDoc, SwPageFrame *pPage ); // --> #i28701# - static void ClearMovedFwdFrms( const SwDoc& _rDoc ); - static void InsertMovedFwdFrm( const SwDoc& _rDoc, - const SwTextFrm& _rMovedFwdFrmByObjPos, + static void ClearMovedFwdFrames( const SwDoc& _rDoc ); + static void InsertMovedFwdFrame( const SwDoc& _rDoc, + const SwTextFrame& _rMovedFwdFrameByObjPos, const sal_uInt32 _nToPageNum ); - static bool FrmMovedFwdByObjPos( const SwDoc& _rDoc, - const SwTextFrm& _rTextFrm, + static bool FrameMovedFwdByObjPos( const SwDoc& _rDoc, + const SwTextFrame& _rTextFrame, sal_uInt32& _ornToPageNum ); // --> #i40155# - unmark given frame as to be moved forward. - static void RemoveMovedFwdFrm( const SwDoc& _rDoc, - const SwTextFrm& _rTextFrm ); + static void RemoveMovedFwdFrame( const SwDoc& _rDoc, + const SwTextFrame& _rTextFrame ); // --> #i26945# - static bool DoesRowContainMovedFwdFrm( const SwDoc& _rDoc, - const SwRowFrm& _rRowFrm ); + static bool DoesRowContainMovedFwdFrame( const SwDoc& _rDoc, + const SwRowFrame& _rRowFrame ); // --> #i35911# static void ClearObjsTmpConsiderWrapInfluence( const SwDoc& _rDoc ); @@ -129,12 +129,12 @@ public: SwAnchoredObject& _rAnchoredObj ); // --> #i65250# static bool MoveBwdSuppressed( const SwDoc& p_rDoc, - const SwFlowFrm& p_rFlowFrm, - const SwLayoutFrm& p_rNewUpperFrm ); + const SwFlowFrame& p_rFlowFrame, + const SwLayoutFrame& p_rNewUpperFrame ); static void ClearMoveBwdLayoutInfo( const SwDoc& p_rDoc ); }; -extern void LOOPING_LOUIE_LIGHT( bool bCondition, const SwTextFrm& rTextFrm ); +extern void LOOPING_LOUIE_LIGHT( bool bCondition, const SwTextFrame& rTextFrame ); #endif // INCLUDED_SW_SOURCE_CORE_INC_LAYOUTER_HXX diff --git a/sw/source/core/inc/movedfwdfrmsbyobjpos.hxx b/sw/source/core/inc/movedfwdfrmsbyobjpos.hxx index 86b5afe70ced..aec68040cbea 100644 --- a/sw/source/core/inc/movedfwdfrmsbyobjpos.hxx +++ b/sw/source/core/inc/movedfwdfrmsbyobjpos.hxx @@ -23,36 +23,36 @@ #include <sal/types.h> class SwTextNode; -class SwTextFrm; +class SwTextFrame; // --> #i26945# -class SwRowFrm; +class SwRowFrame; typedef std::map< const SwTextNode*, const sal_uInt32 > NodeMap; typedef std::map< const SwTextNode*, const sal_uInt32 >::const_iterator NodeMapIter; typedef NodeMap::value_type NodeMapEntry; -class SwMovedFwdFrmsByObjPos +class SwMovedFwdFramesByObjPos { private: - NodeMap maMovedFwdFrms; + NodeMap maMovedFwdFrames; public: - SwMovedFwdFrmsByObjPos(); - ~SwMovedFwdFrmsByObjPos(); + SwMovedFwdFramesByObjPos(); + ~SwMovedFwdFramesByObjPos(); - void Insert( const SwTextFrm& _rMovedFwdFrmByObjPos, + void Insert( const SwTextFrame& _rMovedFwdFrameByObjPos, const sal_uInt32 _nToPageNum ); // --> #i40155# - void Remove( const SwTextFrm& _rTextFrm ); + void Remove( const SwTextFrame& _rTextFrame ); - bool FrmMovedFwdByObjPos( const SwTextFrm& _rTextFrm, + bool FrameMovedFwdByObjPos( const SwTextFrame& _rTextFrame, sal_uInt32& _ornToPageNum ) const; // --> #i26945# - bool DoesRowContainMovedFwdFrm( const SwRowFrm& _rRowFrm ) const; + bool DoesRowContainMovedFwdFrame( const SwRowFrame& _rRowFrame ) const; - void Clear() { maMovedFwdFrms.clear(); }; + void Clear() { maMovedFwdFrames.clear(); }; }; #endif diff --git a/sw/source/core/inc/mvsave.hxx b/sw/source/core/inc/mvsave.hxx index b0bb4420c299..e6b94dedd318 100644 --- a/sw/source/core/inc/mvsave.hxx +++ b/sw/source/core/inc/mvsave.hxx @@ -130,8 +130,8 @@ public: }; /** - * Function declarations so that everything below the CrsrShell can - * move the Crsr once in a while. + * Function declarations so that everything below the CursorShell can + * move the Cursor once in a while. * These functions do not call the SwDoc::Corr methods! */ void PaMCorrAbs( const SwPaM& rRange, diff --git a/sw/source/core/inc/node2lay.hxx b/sw/source/core/inc/node2lay.hxx index e424c4f79e27..292fd7b6fbca 100644 --- a/sw/source/core/inc/node2lay.hxx +++ b/sw/source/core/inc/node2lay.hxx @@ -30,23 +30,23 @@ * the relevant ones are returned. Repeated table headers are also taken * into account. * It's possible to iterate over SectionNodes that are either not directly - * assigned to a SectionFrm or to multiple ones due to nesting. + * assigned to a SectionFrame or to multiple ones due to nesting. * * This class is an interface between the method and a SwClientIter: it * chooses the right SwModify depending on the task, creates a SwClientIter * and filters its iterations depending on the task. * The task is determined by the choice of ctor. * - * 1. Collecting the UpperFrms (so that later on it becomes RestoreUpperFrms) - * is called by MakeFrms, if there's no PrevNext (before/after we can insert + * 1. Collecting the UpperFrames (so that later on it becomes RestoreUpperFrames) + * is called by MakeFrames, if there's no PrevNext (before/after we can insert * the Frames). * 2. Inserting the Frames before/after which the new Frames of a Node need to - * be inserted, is also called by MakeFrms. + * be inserted, is also called by MakeFrames. */ class SwNode2LayImpl; -class SwFrm; -class SwLayoutFrm; +class SwFrame; +class SwLayoutFrame; class SwNode; class SwNodes; class Point; @@ -56,20 +56,20 @@ class SwNode2Layout { std::unique_ptr<SwNode2LayImpl> pImpl; public: - /// Use this ctor for collecting the UpperFrms + /// Use this ctor for collecting the UpperFrames SwNode2Layout( const SwNode& rNd ); /// Use this ctor for inserting before/after rNd /// @param nIdx is the index of the to-be-inserted Node SwNode2Layout( const SwNode& rNd, sal_uLong nIdx ); ~SwNode2Layout(); - SwFrm* NextFrm(); - SwLayoutFrm* UpperFrm( SwFrm* &rpFrm, const SwNode& rNode ); - void RestoreUpperFrms( SwNodes& rNds, sal_uLong nStt, sal_uLong nEnd ); + SwFrame* NextFrame(); + SwLayoutFrame* UpperFrame( SwFrame* &rpFrame, const SwNode& rNode ); + void RestoreUpperFrames( SwNodes& rNds, sal_uLong nStt, sal_uLong nEnd ); - SwFrm *GetFrm( const Point* pDocPos = nullptr, + SwFrame *GetFrame( const Point* pDocPos = nullptr, const SwPosition *pPos = nullptr, - const bool bCalcFrm = true ) const; + const bool bCalcFrame = true ) const; }; #endif diff --git a/sw/source/core/inc/notxtfrm.hxx b/sw/source/core/inc/notxtfrm.hxx index f82410698d86..ddd7ba9c81f8 100644 --- a/sw/source/core/inc/notxtfrm.hxx +++ b/sw/source/core/inc/notxtfrm.hxx @@ -24,11 +24,11 @@ class SwNoTextNode; class OutputDevice; class SwBorderAttrs; -struct SwCrsrMoveState; +struct SwCursorMoveState; -class SwNoTextFrm: public SwContentFrm +class SwNoTextFrame: public SwContentFrame { - friend void _FrmFinit(); + friend void _FrameFinit(); const Size& GetSize() const; @@ -38,20 +38,20 @@ class SwNoTextFrm: public SwContentFrm void PaintPicture( vcl::RenderContext*, const SwRect& ) const; virtual void DestroyImpl() override; - virtual ~SwNoTextFrm(); + virtual ~SwNoTextFrame(); protected: virtual void MakeAll(vcl::RenderContext* pRenderContext) override; virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ) override; public: - SwNoTextFrm( SwNoTextNode * const, SwFrm* ); + SwNoTextFrame( SwNoTextNode * const, SwFrame* ); virtual void Paint( vcl::RenderContext& rRenderContext, SwRect const&, SwPrintData const*const pPrintData = nullptr ) const override; virtual bool GetCharRect( SwRect &, const SwPosition&, - SwCrsrMoveState* = nullptr) const override; - virtual bool GetCrsrOfst(SwPosition* pPos, Point& aPoint, - SwCrsrMoveState* = nullptr, bool bTestBackground = false) const override; + SwCursorMoveState* = nullptr) const override; + virtual bool GetCursorOfst(SwPosition* pPos, Point& aPoint, + SwCursorMoveState* = nullptr, bool bTestBackground = false) const override; void GetGrfArea( SwRect &rRect, SwRect * = nullptr, bool bMirror = true ) const; diff --git a/sw/source/core/inc/objectformatter.hxx b/sw/source/core/inc/objectformatter.hxx index 90ec469a073f..b309ca1a195d 100644 --- a/sw/source/core/inc/objectformatter.hxx +++ b/sw/source/core/inc/objectformatter.hxx @@ -21,11 +21,11 @@ #include <sal/types.h> -class SwFrm; +class SwFrame; // #i26945# -class SwTextFrm; -class SwLayoutFrm; -class SwPageFrm; +class SwTextFrame; +class SwLayoutFrame; +class SwPageFrame; class SwAnchoredObject; class SwLayAction; // OD 2004-10-04 #i26945# @@ -39,7 +39,7 @@ class SwObjectFormatter { private: // page frame, at which the floating screen objects are registered. - const SwPageFrm& mrPageFrm; + const SwPageFrame& mrPageFrame; // boolean, indicating that only as-character anchored objects have to // be formatted. @@ -66,7 +66,7 @@ class SwObjectFormatter <SwLayAction::FormatLayout(..)>. Thus, its code for the formatting have to be synchronised. */ - void _FormatLayout( SwLayoutFrm& _rLayoutFrm ); + void _FormatLayout( SwLayoutFrame& _rLayoutFrame ); /** helper method for method <_FormatObj(..)> - performs the intrinsic format of the content of the given floating screen object. @@ -76,19 +76,19 @@ class SwObjectFormatter void _FormatObjContent( SwAnchoredObject& _rAnchoredObj ); protected: - SwObjectFormatter( const SwPageFrm& _rPageFrm, + SwObjectFormatter( const SwPageFrame& _rPageFrame, SwLayAction* _pLayAction = nullptr, const bool _bCollectPgNumOfAnchors = false ); - static SwObjectFormatter* CreateObjFormatter( SwFrm& _rAnchorFrm, - const SwPageFrm& _rPageFrm, + static SwObjectFormatter* CreateObjFormatter( SwFrame& _rAnchorFrame, + const SwPageFrame& _rPageFrame, SwLayAction* _pLayAction ); - virtual SwFrm& GetAnchorFrm() = 0; + virtual SwFrame& GetAnchorFrame() = 0; - inline const SwPageFrm& GetPageFrm() const + inline const SwPageFrame& GetPageFrame() const { - return mrPageFrm; + return mrPageFrame; } inline bool ConsiderWrapOnObjPos() const @@ -118,10 +118,10 @@ class SwObjectFormatter Thus, the objects, whose anchor character is inside the follow text frame can be formatted. - @param _pMasterTextFrm + @param _pMasterTextFrame input parameter - pointer to 'master' text frame. default value: NULL */ - bool _FormatObjsAtFrm( SwTextFrm* _pMasterTextFrm = nullptr ); + bool _FormatObjsAtFrame( SwTextFrame* _pMasterTextFrame = nullptr ); /** accessor to collected anchored object */ @@ -166,15 +166,15 @@ class SwObjectFormatter /** method to format all floating screen objects at the given anchor frame */ - static bool FormatObjsAtFrm( SwFrm& _rAnchorFrm, - const SwPageFrm& _rPageFrm, + static bool FormatObjsAtFrame( SwFrame& _rAnchorFrame, + const SwPageFrame& _rPageFrame, SwLayAction* _pLayAction = nullptr ); /** method to format a given floating screen object */ static bool FormatObj( SwAnchoredObject& _rAnchoredObj, - SwFrm* _pAnchorFrm = nullptr, - const SwPageFrm* _pPageFrm = nullptr, + SwFrame* _pAnchorFrame = nullptr, + const SwPageFrame* _pPageFrame = nullptr, SwLayAction* _pLayAction = nullptr ); }; diff --git a/sw/source/core/inc/pagefrm.hxx b/sw/source/core/inc/pagefrm.hxx index 3e60e021b581..840c580ff382 100644 --- a/sw/source/core/inc/pagefrm.hxx +++ b/sw/source/core/inc/pagefrm.hxx @@ -25,12 +25,12 @@ #include <SidebarWindowsTypes.hxx> -class SwFlyFrm; +class SwFlyFrame; class SwFlyFrameFormat; class SwPageDesc; -class SwContentFrm; +class SwContentFrame; struct SwPosition; -struct SwCrsrMoveState; +struct SwCursorMoveState; class SwAttrSetChg; namespace vcl { class Font; } class SwSortedObjs; @@ -44,9 +44,9 @@ enum SwPageChg }; /// A page of the document layout. -class SwPageFrm: public SwFootnoteBossFrm +class SwPageFrame: public SwFootnoteBossFrame { - friend class SwFrm; + friend class SwFrame; SwSortedObjs *m_pSortedObjs; @@ -103,7 +103,7 @@ class SwPageFrm: public SwFootnoteBossFrm bool bRightSidebar ); virtual void DestroyImpl() override; - virtual ~SwPageFrm(); + virtual ~SwPageFrame(); protected: virtual void MakeAll(vcl::RenderContext* pRenderContext) override; @@ -114,9 +114,9 @@ protected: size_t GetContentHeight(const long nTop, const long nBottom) const; public: - DECL_FIXEDMEMPOOL_NEWDEL(SwPageFrm) + DECL_FIXEDMEMPOOL_NEWDEL(SwPageFrame) - SwPageFrm( SwFrameFormat*, SwFrm*, SwPageDesc* ); + SwPageFrame( SwFrameFormat*, SwFrame*, SwPageDesc* ); /// Make this public, so that the SwViewShell can access it when switching from browse mode /// Add/remove header/footer @@ -129,19 +129,19 @@ public: void AppendDrawObjToPage( SwAnchoredObject& _rNewObj ); void RemoveDrawObjFromPage( SwAnchoredObject& _rToRemoveObj ); - void AppendFlyToPage( SwFlyFrm *pNew ); - void RemoveFlyFromPage( SwFlyFrm *pToRemove ); - void MoveFly( SwFlyFrm *pToMove, SwPageFrm *pDest ); // Optimized Remove/Append + void AppendFlyToPage( SwFlyFrame *pNew ); + void RemoveFlyFromPage( SwFlyFrame *pToRemove ); + void MoveFly( SwFlyFrame *pToMove, SwPageFrame *pDest ); // Optimized Remove/Append void SetPageDesc( SwPageDesc *, SwFrameFormat * ); SwPageDesc *GetPageDesc() { return m_pDesc; } const SwPageDesc *GetPageDesc() const { return m_pDesc; } SwPageDesc *FindPageDesc(); - SwContentFrm *FindLastBodyContent(); - inline SwContentFrm *FindFirstBodyContent(); - inline const SwContentFrm *FindFirstBodyContent() const; - inline const SwContentFrm *FindLastBodyContent() const; + SwContentFrame *FindLastBodyContent(); + inline SwContentFrame *FindFirstBodyContent(); + inline const SwContentFrame *FindFirstBodyContent() const; + inline const SwContentFrame *FindLastBodyContent() const; SwRect GetBoundRect(OutputDevice* pOutputDevice) const; @@ -160,27 +160,27 @@ public: void PrepareRegisterChg(); // Appends a fly frame - the given one or a new one - at the page frame. - // Needed for <Modify> and <MakeFrms> + // Needed for <Modify> and <MakeFrames> // - return value not needed any more // - second parameter is of type <SwFlyFrameFormat*> // - third parameter only needed for assertion, but calling method assures // this assertion. Thus, delete it. - void PlaceFly( SwFlyFrm* pFly, SwFlyFrameFormat* pFormat ); + void PlaceFly( SwFlyFrame* pFly, SwFlyFrameFormat* pFormat ); - virtual bool GetCrsrOfst( SwPosition *, Point&, - SwCrsrMoveState* = nullptr, bool bTestBackground = false ) const override; + virtual bool GetCursorOfst( SwPosition *, Point&, + SwCursorMoveState* = nullptr, bool bTestBackground = false ) const override; /// Get info from Client virtual bool GetInfo( SfxPoolItem& ) const override; virtual void Cut() override; - virtual void Paste( SwFrm* pParent, SwFrm* pSibling = nullptr ) override; + virtual void Paste( SwFrame* pParent, SwFrame* pSibling = nullptr ) override; virtual void CheckDirection( bool bVert ) override; void CheckGrid( bool bInvalidate ); void PaintGrid( OutputDevice* pOut, SwRect &rRect ) const; bool HasGrid() const { return m_bHasGrid; } void PaintDecorators( ) const; - virtual void PaintSubsidiaryLines( const SwPageFrm*, const SwRect& ) const override; + virtual void PaintSubsidiaryLines( const SwPageFrame*, const SwRect& ) const override; virtual void PaintBreak() const override; /// Paint line number etc. @@ -234,7 +234,7 @@ public: bool IsInvalidAutoCompleteWords() const { return m_bInvalidAutoCmplWrds; } bool IsInvalidWordCount() const { return m_bInvalidWordCount; } - /** SwPageFrm::GetDrawBackgrdColor + /** SwPageFrame::GetDrawBackgrdColor determine the color, that is respectively will be drawn as background for the page frame. @@ -324,7 +324,7 @@ public: const SwRect PrtWithoutHeaderAndFooter() const; // in case this is am empty page, this function returns the 'reference' page - const SwPageFrm& GetFormatPage() const; + const SwPageFrame& GetFormatPage() const; /// If in header or footer area, it also indicates the exact area in rControl. /// Header or footer must be active, otherwise returns false. @@ -336,100 +336,100 @@ public: static SwTwips GetSidebarBorderWidth( const SwViewShell* ); }; -inline SwContentFrm *SwPageFrm::FindFirstBodyContent() +inline SwContentFrame *SwPageFrame::FindFirstBodyContent() { - SwLayoutFrm *pBody = FindBodyCont(); + SwLayoutFrame *pBody = FindBodyCont(); return pBody ? pBody->ContainsContent() : nullptr; } -inline const SwContentFrm *SwPageFrm::FindFirstBodyContent() const +inline const SwContentFrame *SwPageFrame::FindFirstBodyContent() const { - const SwLayoutFrm *pBody = FindBodyCont(); + const SwLayoutFrame *pBody = FindBodyCont(); return pBody ? pBody->ContainsContent() : nullptr; } -inline const SwContentFrm *SwPageFrm::FindLastBodyContent() const +inline const SwContentFrame *SwPageFrame::FindLastBodyContent() const { - return const_cast<SwPageFrm*>(this)->FindLastBodyContent(); + return const_cast<SwPageFrame*>(this)->FindLastBodyContent(); } -inline void SwPageFrm::InvalidateFlyLayout() const +inline void SwPageFrame::InvalidateFlyLayout() const { - const_cast<SwPageFrm*>(this)->m_bInvalidFlyLayout = true; + const_cast<SwPageFrame*>(this)->m_bInvalidFlyLayout = true; } -inline void SwPageFrm::InvalidateFlyContent() const +inline void SwPageFrame::InvalidateFlyContent() const { - const_cast<SwPageFrm*>(this)->m_bInvalidFlyContent = true; + const_cast<SwPageFrame*>(this)->m_bInvalidFlyContent = true; } -inline void SwPageFrm::InvalidateFlyInCnt() const +inline void SwPageFrame::InvalidateFlyInCnt() const { - const_cast<SwPageFrm*>(this)->m_bInvalidFlyInCnt = true; + const_cast<SwPageFrame*>(this)->m_bInvalidFlyInCnt = true; } -inline void SwPageFrm::InvalidateLayout() const +inline void SwPageFrame::InvalidateLayout() const { - const_cast<SwPageFrm*>(this)->m_bInvalidLayout = true; + const_cast<SwPageFrame*>(this)->m_bInvalidLayout = true; } -inline void SwPageFrm::InvalidateContent() const +inline void SwPageFrame::InvalidateContent() const { - const_cast<SwPageFrm*>(this)->m_bInvalidContent = true; + const_cast<SwPageFrame*>(this)->m_bInvalidContent = true; } -inline void SwPageFrm::InvalidateSpelling() const +inline void SwPageFrame::InvalidateSpelling() const { - const_cast<SwPageFrm*>(this)->m_bInvalidSpelling = true; + const_cast<SwPageFrame*>(this)->m_bInvalidSpelling = true; } -inline void SwPageFrm::InvalidateSmartTags() const +inline void SwPageFrame::InvalidateSmartTags() const { - const_cast<SwPageFrm*>(this)->m_bInvalidSmartTags = true; + const_cast<SwPageFrame*>(this)->m_bInvalidSmartTags = true; } -inline void SwPageFrm::InvalidateAutoCompleteWords() const +inline void SwPageFrame::InvalidateAutoCompleteWords() const { - const_cast<SwPageFrm*>(this)->m_bInvalidAutoCmplWrds = true; + const_cast<SwPageFrame*>(this)->m_bInvalidAutoCmplWrds = true; } -inline void SwPageFrm::InvalidateWordCount() const +inline void SwPageFrame::InvalidateWordCount() const { - const_cast<SwPageFrm*>(this)->m_bInvalidWordCount = true; + const_cast<SwPageFrame*>(this)->m_bInvalidWordCount = true; } -inline void SwPageFrm::ValidateFlyLayout() const +inline void SwPageFrame::ValidateFlyLayout() const { - const_cast<SwPageFrm*>(this)->m_bInvalidFlyLayout = false; + const_cast<SwPageFrame*>(this)->m_bInvalidFlyLayout = false; } -inline void SwPageFrm::ValidateFlyContent() const +inline void SwPageFrame::ValidateFlyContent() const { - const_cast<SwPageFrm*>(this)->m_bInvalidFlyContent = false; + const_cast<SwPageFrame*>(this)->m_bInvalidFlyContent = false; } -inline void SwPageFrm::ValidateFlyInCnt() const +inline void SwPageFrame::ValidateFlyInCnt() const { - const_cast<SwPageFrm*>(this)->m_bInvalidFlyInCnt = false; + const_cast<SwPageFrame*>(this)->m_bInvalidFlyInCnt = false; } -inline void SwPageFrm::ValidateLayout() const +inline void SwPageFrame::ValidateLayout() const { - const_cast<SwPageFrm*>(this)->m_bInvalidLayout = false; + const_cast<SwPageFrame*>(this)->m_bInvalidLayout = false; } -inline void SwPageFrm::ValidateContent() const +inline void SwPageFrame::ValidateContent() const { - const_cast<SwPageFrm*>(this)->m_bInvalidContent = false; + const_cast<SwPageFrame*>(this)->m_bInvalidContent = false; } -inline void SwPageFrm::ValidateSpelling() const +inline void SwPageFrame::ValidateSpelling() const { - const_cast<SwPageFrm*>(this)->m_bInvalidSpelling = false; + const_cast<SwPageFrame*>(this)->m_bInvalidSpelling = false; } -inline void SwPageFrm::ValidateSmartTags() const +inline void SwPageFrame::ValidateSmartTags() const { - const_cast<SwPageFrm*>(this)->m_bInvalidSmartTags = false; + const_cast<SwPageFrame*>(this)->m_bInvalidSmartTags = false; } -inline void SwPageFrm::ValidateAutoCompleteWords() const +inline void SwPageFrame::ValidateAutoCompleteWords() const { - const_cast<SwPageFrm*>(this)->m_bInvalidAutoCmplWrds = false; + const_cast<SwPageFrame*>(this)->m_bInvalidAutoCmplWrds = false; } -inline void SwPageFrm::ValidateWordCount() const +inline void SwPageFrame::ValidateWordCount() const { - const_cast<SwPageFrm*>(this)->m_bInvalidWordCount = false; + const_cast<SwPageFrame*>(this)->m_bInvalidWordCount = false; } -inline bool SwPageFrm::IsInvalid() const +inline bool SwPageFrame::IsInvalid() const { return (m_bInvalidContent || m_bInvalidLayout || m_bInvalidFlyInCnt); } -inline bool SwPageFrm::IsInvalidFly() const +inline bool SwPageFrame::IsInvalidFly() const { return m_bInvalidFlyLayout || m_bInvalidFlyContent; } @@ -437,7 +437,7 @@ inline bool SwPageFrm::IsInvalidFly() const class SwTextGridItem; -SwTextGridItem const* GetGridItem(SwPageFrm const*const); +SwTextGridItem const* GetGridItem(SwPageFrame const*const); sal_uInt16 GetGridWidth(SwTextGridItem const&, SwDoc const&); diff --git a/sw/source/core/inc/pamtyp.hxx b/sw/source/core/inc/pamtyp.hxx index 6a6ffbddfe28..1bc4a0c6257c 100644 --- a/sw/source/core/inc/pamtyp.hxx +++ b/sw/source/core/inc/pamtyp.hxx @@ -49,7 +49,7 @@ bool GoPrevious(SwNode* pNd, SwIndex * pIdx, sal_uInt16 nMode ); SW_DLLPUBLIC SwContentNode* GoNextNds( SwNodeIndex * pIdx, bool ); SwContentNode* GoPreviousNds( SwNodeIndex * pIdx, bool ); -// Funktionsdefinitionen fuer die SwCrsrShell +// Funktionsdefinitionen fuer die SwCursorShell bool GoPrevPara( SwPaM&, SwPosPara); bool GoCurrPara( SwPaM&, SwPosPara); bool GoNextPara( SwPaM&, SwPosPara); diff --git a/sw/source/core/inc/prevwpage.hxx b/sw/source/core/inc/prevwpage.hxx index c426327c51e5..d9c8d1df0fb6 100644 --- a/sw/source/core/inc/prevwpage.hxx +++ b/sw/source/core/inc/prevwpage.hxx @@ -23,13 +23,13 @@ // classes <Point>, <Size> and <Rectangle> #include <tools/gen.hxx> -class SwPageFrm; +class SwPageFrame; /** data structure for a preview page in the current preview layout */ struct PreviewPage { - const SwPageFrm* pPage; + const SwPageFrame* pPage; bool bVisible; Size aPageSize; Point aPreviewWinPos; diff --git a/sw/source/core/inc/ptqueue.hxx b/sw/source/core/inc/ptqueue.hxx index 311ed32e1f07..6c578989bfde 100644 --- a/sw/source/core/inc/ptqueue.hxx +++ b/sw/source/core/inc/ptqueue.hxx @@ -23,14 +23,14 @@ * Unfortunately we have some problems with processing more than one Paint() * at a time. This happens especially often during printing. * - * SwRootFrm::Paint() determines that it's called a second time and adds the + * SwRootFrame::Paint() determines that it's called a second time and adds the * rectangle and the corresponding Shell to the PaintCollector. * The call sites that are causing the double Paint() only need to process the * collected Paint()s at the right point in time. * Doing this during printing (after having printed one page) is very suitable * for doing that. * - * Invalidating windows directly from the RootFrm::Paint was not a successful + * Invalidating windows directly from the RootFrame::Paint was not a successful * approach, because the Paint()s arrive at a very unfavourable point in time. * Triggering an update for all windows after printing each page does not seem * appropriate either: on the one hand we don't have direct access to the edit diff --git a/sw/source/core/inc/rootfrm.hxx b/sw/source/core/inc/rootfrm.hxx index 7feb3c6d984f..d30b8b160f81 100644 --- a/sw/source/core/inc/rootfrm.hxx +++ b/sw/source/core/inc/rootfrm.hxx @@ -24,13 +24,13 @@ #include <doc.hxx> #include <IDocumentTimerAccess.hxx> -class SwContentFrm; +class SwContentFrame; class SwViewShell; class SdrPage; class SwFrameFormat; class SwPaM; class SwCursor; -class SwShellCrsr; +class SwShellCursor; class SwTableCursor; class SwLayVout; class SwDestroyList; @@ -38,7 +38,7 @@ class SwCurrShells; class SwViewOption; class SwSelectionList; struct SwPosition; -struct SwCrsrMoveState; +struct SwCursorMoveState; #define INV_SIZE 1 #define INV_PRTAREA 2 @@ -51,17 +51,17 @@ struct SwCrsrMoveState; #include <vector> /// The root element of a Writer document layout. -class SwRootFrm: public SwLayoutFrm +class SwRootFrame: public SwLayoutFrame { // Needs to disable the Superfluous temporarily - friend void AdjustSizeChgNotify( SwRootFrm *pRoot ); + friend void AdjustSizeChgNotify( SwRootFrame *pRoot ); - // Maintains the mpLastPage (Cut() and Paste() of SwPageFrm - friend inline void SetLastPage( SwPageFrm* ); + // Maintains the mpLastPage (Cut() and Paste() of SwPageFrame + friend inline void SetLastPage( SwPageFrame* ); // For creating and destroying of the virtual output device manager - friend void _FrmInit(); // Creates s_pVout - friend void _FrmFinit(); // Destroys s_pVout + friend void _FrameInit(); // Creates s_pVout + friend void _FrameFinit(); // Destroys s_pVout std::vector<SwRect> maPageRects;// returns the current rectangle for each page frame // the rectangle is extended to the top/bottom/left/right @@ -96,11 +96,11 @@ class SwRootFrm: public SwLayoutFrm */ long mnBrowseWidth; - /// If we only have to format one ContentFrm, its in mpTurbo - const SwContentFrm *mpTurbo; + /// If we only have to format one ContentFrame, its in mpTurbo + const SwContentFrame *mpTurbo; /// We should not need to always struggle to find the last page, so store it here - SwPageFrm *mpLastPage; + SwPageFrame *mpLastPage; /** [ Comment from the original StarOffice checkin ]: * The root takes care of the shell access. Via the document @@ -126,7 +126,7 @@ class SwRootFrm: public SwLayoutFrm */ friend class CurrShell; friend void SetShell( SwViewShell *pSh ); - friend void InitCurrShells( SwRootFrm *pRoot ); + friend void InitCurrShells( SwRootFrame *pRoot ); SwViewShell *mpCurrShell; SwViewShell *mpWaitingCurrShell; SwCurrShells *mpCurrShells; @@ -142,11 +142,11 @@ class SwRootFrm: public SwLayoutFrm void ImplCalcBrowseWidth(); void ImplInvalidateBrowseWidth(); - void _DeleteEmptySct(); // Destroys the registered SectionFrms - void _RemoveFromList( SwSectionFrm* pSct ); // Removes SectionFrms from the Delete List + void _DeleteEmptySct(); // Destroys the registered SectionFrames + void _RemoveFromList( SwSectionFrame* pSct ); // Removes SectionFrames from the Delete List virtual void DestroyImpl() override; - virtual ~SwRootFrm(); + virtual ~SwRootFrame(); protected: @@ -169,7 +169,7 @@ public: /// Save Clipping if exactly the ClipRect is outputted static bool HasSameRect( const SwRect& rRect ); - SwRootFrm( SwFrameFormat*, SwViewShell* ); + SwRootFrame( SwFrameFormat*, SwViewShell* ); void Init(SwFrameFormat*); SwViewShell *GetCurrShell() const { return mpCurrShell; } @@ -179,7 +179,7 @@ public: * Set up Start-/EndAction for all Shells on a as high as possible * (Shell section) level. * For the StarONE binding, which does not know the Shells directly. - * The ChangeLinkd of the CrsrShell (UI notifications) is called + * The ChangeLinkd of the CursorShell (UI notifications) is called * automatically in the EndAllAction. */ void StartAllAction(); @@ -196,16 +196,16 @@ public: SdrPage* GetDrawPage() { return mpDrawPage; } void SetDrawPage( SdrPage* pNew ){ mpDrawPage = pNew; } - virtual bool GetCrsrOfst( SwPosition *, Point&, - SwCrsrMoveState* = nullptr, bool bTestBackground = false ) const override; + virtual bool GetCursorOfst( SwPosition *, Point&, + SwCursorMoveState* = nullptr, bool bTestBackground = false ) const override; virtual void Paint( vcl::RenderContext& rRenderContext, SwRect const&, SwPrintData const*const pPrintData = nullptr ) const override; - virtual SwTwips ShrinkFrm( SwTwips, bool bTst = false, bool bInfo = false ) override; - virtual SwTwips GrowFrm ( SwTwips, bool bTst = false, bool bInfo = false ) override; + virtual SwTwips ShrinkFrame( SwTwips, bool bTst = false, bool bInfo = false ) override; + virtual SwTwips GrowFrame ( SwTwips, bool bTst = false, bool bInfo = false ) override; #ifdef DBG_UTIL virtual void Cut() override; - virtual void Paste( SwFrm* pParent, SwFrm* pSibling = nullptr ) override; + virtual void Paste( SwFrame* pParent, SwFrame* pSibling = nullptr ) override; #endif virtual bool FillSelection( SwSelectionList& rList, const SwRect& rRect ) const override; @@ -251,7 +251,7 @@ public: * Makes sure that, starting from the passed Page, all page-bound Frames * are on the right Page (pagenumber). */ - static void AssertPageFlys( SwPageFrm * ); + static void AssertPageFlys( SwPageFrame * ); /// Invalidate all Content, Size or PrtArea void InvalidateAllContent( sal_uInt8 nInvalidate ); @@ -289,7 +289,7 @@ public: * bool bExtend: Extend each page to the left/right/top/botton up to the * next page margin */ - const SwPageFrm* GetPageAtPos( const Point& rPt, const Size* pSize = nullptr, bool bExtend = false ) const; + const SwPageFrame* GetPageAtPos( const Point& rPt, const Size* pSize = nullptr, bool bExtend = false ) const; /** * Point rPt: The point to test @@ -300,7 +300,7 @@ public: */ bool IsBetweenPages(const Point& rPt) const; - void CalcFrmRects( SwShellCrsr& ); + void CalcFrameRects( SwShellCursor& ); /** * Calculates the cells included from the current selection @@ -308,25 +308,25 @@ public: * @returns false: There was no result because of an invalid layout * @returns true: Everything worked fine. */ - bool MakeTableCrsrs( SwTableCursor& ); + bool MakeTableCursors( SwTableCursor& ); - void DisallowTurbo() const { const_cast<SwRootFrm*>(this)->mbTurboAllowed = false; } - void ResetTurboFlag() const { const_cast<SwRootFrm*>(this)->mbTurboAllowed = true; } + void DisallowTurbo() const { const_cast<SwRootFrame*>(this)->mbTurboAllowed = false; } + void ResetTurboFlag() const { const_cast<SwRootFrame*>(this)->mbTurboAllowed = true; } bool IsTurboAllowed() const { return mbTurboAllowed; } - void SetTurbo( const SwContentFrm *pContent ) { mpTurbo = pContent; } + void SetTurbo( const SwContentFrame *pContent ) { mpTurbo = pContent; } void ResetTurbo() { mpTurbo = nullptr; } - const SwContentFrm *GetTurbo() { return mpTurbo; } + const SwContentFrame *GetTurbo() { return mpTurbo; } /// Update the footernumbers of all Pages void UpdateFootnoteNums(); // Only for page by page numnbering! /// Remove all footnotes (but no references) - void RemoveFootnotes( SwPageFrm *pPage = nullptr, bool bPageOnly = false, + void RemoveFootnotes( SwPageFrame *pPage = nullptr, bool bPageOnly = false, bool bEndNotes = false ); void CheckFootnotePageDescs( bool bEndNote ); - const SwPageFrm *GetLastPage() const { return mpLastPage; } - SwPageFrm *GetLastPage() { return mpLastPage; } + const SwPageFrame *GetLastPage() const { return mpLastPage; } + SwPageFrame *GetLastPage() { return mpLastPage; } static bool IsInPaint() { return s_isInPaint; } @@ -339,14 +339,14 @@ public: void ResetNewLayout() { mbIsNewLayout = false;} /** - * Empty SwSectionFrms are registered here for deletion and + * Empty SwSectionFrames are registered here for deletion and * destroyed later on or deregistered. */ - void InsertEmptySct( SwSectionFrm* pDel ); + void InsertEmptySct( SwSectionFrame* pDel ); void DeleteEmptySct() { if( mpDestroy ) _DeleteEmptySct(); } - void RemoveFromList( SwSectionFrm* pSct ) { if( mpDestroy ) _RemoveFromList( pSct ); } + void RemoveFromList( SwSectionFrame* pSct ) { if( mpDestroy ) _RemoveFromList( pSct ); } #ifdef DBG_UTIL - bool IsInDelList( SwSectionFrm* pSct ) const; + bool IsInDelList( SwSectionFrame* pSct ) const; #endif void SetCallbackActionEnabled( bool b ) { mbCallbackActionEnabled = b; } @@ -368,7 +368,7 @@ public: * * @return pointer to the page frame with the given physical page number */ - SwPageFrm* GetPageByPageNum( sal_uInt16 _nPageNum ) const; + SwPageFrame* GetPageByPageNum( sal_uInt16 _nPageNum ) const; void CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVisArea ); bool IsLeftToRightViewLayout() const; @@ -379,22 +379,22 @@ public: void FreezeLayout( bool freeze ) { mbLayoutFreezed = freeze; } }; -inline long SwRootFrm::GetBrowseWidth() const +inline long SwRootFrame::GetBrowseWidth() const { if ( !mbBrowseWidthValid ) - const_cast<SwRootFrm*>(this)->ImplCalcBrowseWidth(); + const_cast<SwRootFrame*>(this)->ImplCalcBrowseWidth(); return mnBrowseWidth; } -inline void SwRootFrm::InvalidateBrowseWidth() +inline void SwRootFrame::InvalidateBrowseWidth() { if ( mbBrowseWidthValid ) ImplInvalidateBrowseWidth(); } -inline void SwRootFrm::SetVirtPageNum( const bool bOf) const +inline void SwRootFrame::SetVirtPageNum( const bool bOf) const { - const_cast<SwRootFrm*>(this)->mbIsVirtPageNum = bOf; + const_cast<SwRootFrame*>(this)->mbIsVirtPageNum = bOf; } #endif // INCLUDED_SW_SOURCE_CORE_INC_ROOTFRM_HXX diff --git a/sw/source/core/inc/rowfrm.hxx b/sw/source/core/inc/rowfrm.hxx index fdbfebfa0f7d..da689b48f0df 100644 --- a/sw/source/core/inc/rowfrm.hxx +++ b/sw/source/core/inc/rowfrm.hxx @@ -26,16 +26,16 @@ class SwTableLine; class SwBorderAttrs; -/// SwRowFrm is one table row in the document layout. -class SwRowFrm: public SwLayoutFrm +/// SwRowFrame is one table row in the document layout. +class SwRowFrame: public SwLayoutFrame { virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = nullptr ) override; /// Only change the Frame size, not the PrtArea SSize - virtual SwTwips ShrinkFrm( SwTwips, bool bTst = false, bool bInfo = false ) override; - virtual SwTwips GrowFrm ( SwTwips, bool bTst = false, bool bInfo = false ) override; + virtual SwTwips ShrinkFrame( SwTwips, bool bTst = false, bool bInfo = false ) override; + virtual SwTwips GrowFrame ( SwTwips, bool bTst = false, bool bInfo = false ) override; const SwTableLine * m_pTabLine; - SwRowFrm * m_pFollowRow; + SwRowFrame * m_pFollowRow; // #i29550# sal_uInt16 mnTopMarginForLowers; sal_uInt16 mnBottomMarginForLowers; @@ -46,14 +46,14 @@ class SwRowFrm: public SwLayoutFrm bool m_bIsRowSpanLine; virtual void DestroyImpl() override; - virtual ~SwRowFrm(); + virtual ~SwRowFrame(); protected: virtual void MakeAll(vcl::RenderContext* pRenderContext) override; virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ) override; public: - SwRowFrm( const SwTableLine &, SwFrm*, bool bInsertContent = true ); + SwRowFrame( const SwTableLine &, SwFrame*, bool bInsertContent = true ); virtual void Cut() override; @@ -63,7 +63,7 @@ public: * been created; the same holds true for the Page at which the Flys * are to be registered at. */ - void RegistFlys( SwPageFrm *pPage = nullptr ); + void RegistFlys( SwPageFrame *pPage = nullptr ); const SwTableLine *GetTabLine() const { return m_pTabLine; } @@ -73,8 +73,8 @@ public: */ void AdjustCells( const SwTwips nHeight, const bool bHeight ); - SwRowFrm* GetFollowRow() const { return m_pFollowRow; } - void SetFollowRow( SwRowFrm* pNew ) { m_pFollowRow = pNew; } + SwRowFrame* GetFollowRow() const { return m_pFollowRow; } + void SetFollowRow( SwRowFrame* pNew ) { m_pFollowRow = pNew; } // #i29550# sal_uInt16 GetTopMarginForLowers() const { return mnTopMarginForLowers; } @@ -101,7 +101,7 @@ public: bool IsRowSpanLine() const { return m_bIsRowSpanLine; } void SetRowSpanLine( bool bNew ) { m_bIsRowSpanLine = bNew; } - DECL_FIXEDMEMPOOL_NEWDEL(SwRowFrm) + DECL_FIXEDMEMPOOL_NEWDEL(SwRowFrame) }; #endif diff --git a/sw/source/core/inc/sectfrm.hxx b/sw/source/core/inc/sectfrm.hxx index b5ddcd9480d4..395f18ceb16f 100644 --- a/sw/source/core/inc/sectfrm.hxx +++ b/sw/source/core/inc/sectfrm.hxx @@ -27,14 +27,14 @@ class SwSection; class SwSectionFormat; class SwAttrSetChg; -class SwFootnoteContFrm; +class SwFootnoteContFrame; class SwLayouter; #define FINDMODE_ENDNOTE 1 #define FINDMODE_LASTCNT 2 #define FINDMODE_MYLAST 4 -class SwSectionFrm: public SwLayoutFrm, public SwFlowFrm +class SwSectionFrame: public SwLayoutFrame, public SwFlowFrame { SwSection* m_pSection; bool m_bFootnoteAtEnd; // footnotes at the end of section @@ -55,33 +55,33 @@ class SwSectionFrm: public SwLayoutFrm, public SwFlowFrm bool IsEndnoteAtMyEnd() const; virtual void DestroyImpl() override; - virtual ~SwSectionFrm(); + virtual ~SwSectionFrame(); protected: virtual void MakeAll(vcl::RenderContext* pRenderContext) override; - virtual bool ShouldBwdMoved( SwLayoutFrm *pNewUpper, bool bHead, bool &rReformat ) override; + virtual bool ShouldBwdMoved( SwLayoutFrame *pNewUpper, bool bHead, bool &rReformat ) override; virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = nullptr ) override; virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ) override; virtual void SwClientNotify( const SwModify&, const SfxHint& ) override; public: - SwSectionFrm( SwSection &, SwFrm* ); // Content is not created! - SwSectionFrm( SwSectionFrm &, bool bMaster ); // _ONLY_ for creating Master/Follows! + SwSectionFrame( SwSection &, SwFrame* ); // Content is not created! + SwSectionFrame( SwSectionFrame &, bool bMaster ); // _ONLY_ for creating Master/Follows! void Init(); virtual void CheckDirection( bool bVert ) override; - virtual void PaintSubsidiaryLines( const SwPageFrm*, const SwRect& ) const override; + virtual void PaintSubsidiaryLines( const SwPageFrame*, const SwRect& ) const override; virtual void Cut() override; - virtual void Paste( SwFrm* pParent, SwFrm* pSibling = nullptr ) override; + virtual void Paste( SwFrame* pParent, SwFrame* pSibling = nullptr ) override; - inline const SwSectionFrm *GetFollow() const; - inline SwSectionFrm *GetFollow(); - SwSectionFrm* FindMaster() const; + inline const SwSectionFrame *GetFollow() const; + inline SwSectionFrame *GetFollow(); + SwSectionFrame* FindMaster() const; - SwContentFrm *FindLastContent( sal_uInt8 nMode = 0 ); - inline const SwContentFrm *FindLastContent( sal_uInt8 nMode = 0 ) const; + SwContentFrame *FindLastContent( sal_uInt8 nMode = 0 ); + inline const SwContentFrame *FindLastContent( sal_uInt8 nMode = 0 ) const; inline SwSection* GetSection() { return m_pSection; } inline const SwSection* GetSection() const { return m_pSection; } inline void ColLock() { mbColLocked = true; } @@ -90,16 +90,16 @@ public: void CalcFootnoteContent(); void SimpleFormat(); bool IsDescendantFrom( const SwSectionFormat* pSect ) const; - bool HasToBreak( const SwFrm* pFrm ) const; - void MergeNext( SwSectionFrm* pNxt ); + bool HasToBreak( const SwFrame* pFrame ) const; + void MergeNext( SwSectionFrame* pNxt ); /** - * Splits the SectionFrm surrounding the pFrm up in two parts: - * pFrm and the start of the 2nd part + * Splits the SectionFrame surrounding the pFrame up in two parts: + * pFrame and the start of the 2nd part */ - bool SplitSect( SwFrm* pFrm, bool bApres ); + bool SplitSect( SwFrame* pFrame, bool bApres ); void DelEmpty( bool bRemove ); // Like Cut(), except for that Follow chaining is maintained - SwFootnoteContFrm* ContainsFootnoteCont( const SwFootnoteContFrm* pCont = nullptr ) const; + SwFootnoteContFrame* ContainsFootnoteCont( const SwFootnoteContFrame* pCont = nullptr ) const; bool Growable() const; SwTwips _Shrink( SwTwips, bool bTst ); SwTwips _Grow ( SwTwips, bool bTst ); @@ -112,18 +112,18 @@ public: bool ToMaximize( bool bCheckFollow ) const; inline bool _ToMaximize() const { if( !m_pSection ) return false; return ToMaximize( false ); } - bool MoveAllowed( const SwFrm* ) const; + bool MoveAllowed( const SwFrame* ) const; bool CalcMinDiff( SwTwips& rMinDiff ) const; /** * Returns the size delta that the section would like to be - * greater if it has undersized TextFrms in it. + * greater if it has undersized TextFrames in it. * * If we don't pass a @param bOverSize or false, the return value * is > 0 for undersized Frames, or 0 otherwise. * If @param bOverSize == true, we can also get a negative return value, - * if the SectionFrm is not completely filled, which happens often for - * e.g. SectionFrms with Follows. + * if the SectionFrame is not completely filled, which happens often for + * e.g. SectionFrames with Follows. * * If necessary the undersized-flag is corrected. * We need this in the FormatWidthCols to "deflate" columns there. @@ -139,7 +139,7 @@ public: const SwSectionFormat* GetEndSectFormat() const { if( IsEndnAtEnd() ) return _GetEndSectFormat(); return nullptr; } - static void MoveContentAndDelete( SwSectionFrm* pDel, bool bSave ); + static void MoveContentAndDelete( SwSectionFrame* pDel, bool bSave ); bool IsBalancedSection() const; @@ -157,22 +157,22 @@ public: void SetFootnoteLock( bool bNew ) { m_bFootnoteLock = bNew; } bool IsFootnoteLock() const { return m_bFootnoteLock; } - DECL_FIXEDMEMPOOL_NEWDEL(SwSectionFrm) + DECL_FIXEDMEMPOOL_NEWDEL(SwSectionFrame) }; -class SwDestroyList : public std::set<SwSectionFrm*> {}; +class SwDestroyList : public std::set<SwSectionFrame*> {}; -inline const SwSectionFrm *SwSectionFrm::GetFollow() const +inline const SwSectionFrame *SwSectionFrame::GetFollow() const { - return static_cast<const SwSectionFrm*>(SwFlowFrm::GetFollow()); + return static_cast<const SwSectionFrame*>(SwFlowFrame::GetFollow()); } -inline SwSectionFrm *SwSectionFrm::GetFollow() +inline SwSectionFrame *SwSectionFrame::GetFollow() { - return static_cast<SwSectionFrm*>(SwFlowFrm::GetFollow()); + return static_cast<SwSectionFrame*>(SwFlowFrame::GetFollow()); } -inline const SwContentFrm *SwSectionFrm::FindLastContent( sal_uInt8 nMode ) const +inline const SwContentFrame *SwSectionFrame::FindLastContent( sal_uInt8 nMode ) const { - return const_cast<SwSectionFrm*>(this)->FindLastContent( nMode ); + return const_cast<SwSectionFrame*>(this)->FindLastContent( nMode ); } #endif // INCLUDED_SW_SOURCE_CORE_INC_SECTFRM_HXX diff --git a/sw/source/core/inc/swfont.hxx b/sw/source/core/inc/swfont.hxx index e290153f8c58..1df9c22ba665 100644 --- a/sw/source/core/inc/swfont.hxx +++ b/sw/source/core/inc/swfont.hxx @@ -79,8 +79,8 @@ class SwSubFont : public SvxFont void DrawStretchCapital( SwDrawTextInfo &rInf ); void DoOnCapitals( SwDoCapitals &rDo ); void _DrawStretchText( SwDrawTextInfo &rInf ); - sal_Int32 _GetCrsrOfst( SwDrawTextInfo& rInf ); - sal_Int32 GetCapitalCrsrOfst( SwDrawTextInfo& rInf ); + sal_Int32 _GetCursorOfst( SwDrawTextInfo& rInf ); + sal_Int32 GetCapitalCursorOfst( SwDrawTextInfo& rInf ); inline void SetColor( const Color& rColor ); inline void SetFillColor( const Color& rColor ); @@ -311,8 +311,8 @@ public: sal_Int32 GetTextBreak( SwDrawTextInfo& rInf, long nTextWidth ); - sal_Int32 _GetCrsrOfst( SwDrawTextInfo& rInf ) - { return m_aSub[m_nActual]._GetCrsrOfst( rInf ); } + sal_Int32 _GetCursorOfst( SwDrawTextInfo& rInf ) + { return m_aSub[m_nActual]._GetCursorOfst( rInf ); } inline void _DrawText( SwDrawTextInfo &rInf ) { m_aSub[m_nActual]._DrawText( rInf, IsGreyWave() ); } diff --git a/sw/source/core/inc/swselectionlist.hxx b/sw/source/core/inc/swselectionlist.hxx index 01bbfef5575a..53350dd6485a 100644 --- a/sw/source/core/inc/swselectionlist.hxx +++ b/sw/source/core/inc/swselectionlist.hxx @@ -22,7 +22,7 @@ #include <list> class SwPaM; -class SwFrm; +class SwFrame; /** This class is used as parameter for creation of a block cursor selection @@ -40,15 +40,15 @@ class SwFrm; class SwSelectionList { std::list< SwPaM* > aList; // container for the selected text portions - const SwFrm* pContext; // the context of these text portions + const SwFrame* pContext; // the context of these text portions public: /** Ctor to create an empty list for a given context @param pInitCxt - The frame (normally a SwTextFrm) where the block cursor selection starts, + The frame (normally a SwTextFrame) where the block cursor selection starts, it will be used to get the allowed context for the text selections. */ - explicit SwSelectionList( const SwFrm* pInitCxt ); + explicit SwSelectionList( const SwFrame* pInitCxt ); /** Start of the container for the selected text portions */ @@ -83,7 +83,7 @@ public: @return true, if the context of the frame is equal to the one of the list */ - bool checkContext( const SwFrm* pCheck ); + bool checkContext( const SwFrame* pCheck ); }; #endif // INCLUDED_SW_SOURCE_CORE_INC_SWSELECTIONLIST_HXX diff --git a/sw/source/core/inc/tabfrm.hxx b/sw/source/core/inc/tabfrm.hxx index a9f025983a21..0422e8f62b22 100644 --- a/sw/source/core/inc/tabfrm.hxx +++ b/sw/source/core/inc/tabfrm.hxx @@ -27,13 +27,13 @@ class SwTable; class SwBorderAttrs; class SwAttrSetChg; -/// SwTabFrm is one table in the document layout, containing rows (which contain cells). -class SwTabFrm: public SwLayoutFrm, public SwFlowFrm +/// SwTabFrame is one table in the document layout, containing rows (which contain cells). +class SwTabFrame: public SwLayoutFrame, public SwFlowFrame { - friend void CalcContent( SwLayoutFrm *pLay, bool bNoColl, bool bNoCalcFollow ); + friend void CalcContent( SwLayoutFrame *pLay, bool bNoColl, bool bNoCalcFollow ); // does the special treatment for _Get[Next|Prev]Leaf() - using SwFrm::GetLeaf; + using SwFrame::GetLeaf; SwTable * m_pTable; @@ -46,7 +46,7 @@ class SwTabFrm: public SwLayoutFrm, public SwFlowFrm bool m_bLockBackMove :1; /// The Master took care of the BackMove test bool m_bResizeHTMLTable :1; /// Call the Resize of the HTMLTableLayout in the MakeAll /// This is an optimization, so that we don't have to call - /// it in ContentFrm::Grow; there it might be called for + /// it in ContentFrame::Grow; there it might be called for /// _every_ Cell bool m_bONECalcLowers :1; /// Primarily for the StarONE SS @@ -62,7 +62,7 @@ class SwTabFrm: public SwLayoutFrm, public SwFlowFrm // want any notification to the master table bool m_bRestrictTableGrowth :1; // Usually, the table may grow infinitely, - // as the table can be split in SwTabFrm::MakeAll + // as the table can be split in SwTabFrame::MakeAll // In MakeAll, this flag is set to indicate that // the table may only grow inside its upper. This // is necessary, in order to let the text flow into @@ -86,7 +86,7 @@ class SwTabFrm: public SwLayoutFrm, public SwFlowFrm bool m_bInRecalcLowerRow : 1; /** - * Split() splits the Frm at the specified position: a Follow is + * Split() splits the Frame at the specified position: a Follow is * created and constructed and inserted directly after this. * Join() gets the Follow's content and destroys it. */ @@ -99,30 +99,30 @@ class SwTabFrm: public SwLayoutFrm, public SwFlowFrm SwAttrSetChg *pa = nullptr, SwAttrSetChg *pb = nullptr ); - virtual bool ShouldBwdMoved( SwLayoutFrm *pNewUpper, bool bHead, bool &rReformat ) override; + virtual bool ShouldBwdMoved( SwLayoutFrame *pNewUpper, bool bHead, bool &rReformat ) override; virtual void DestroyImpl() override; - virtual ~SwTabFrm(); + virtual ~SwTabFrame(); protected: virtual void MakeAll(vcl::RenderContext* pRenderContext) override; virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = nullptr ) override; virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ) override; // only changes the Framesize, not the PrtArea size - virtual SwTwips GrowFrm ( SwTwips, bool bTst = false, bool bInfo = false ) override; + virtual SwTwips GrowFrame ( SwTwips, bool bTst = false, bool bInfo = false ) override; public: - SwTabFrm( SwTable &, SwFrm* ); // calling Regist Flys always after creation _and_pasting! - SwTabFrm( SwTabFrm & ); // _only_ for the creation of follows + SwTabFrame( SwTable &, SwFrame* ); // calling Regist Flys always after creation _and_pasting! + SwTabFrame( SwTabFrame & ); // _only_ for the creation of follows - void JoinAndDelFollows(); // for DelFrms of the TableNodes! + void JoinAndDelFollows(); // for DelFrames of the TableNodes! // calls thr RegistFlys of the rows void RegistFlys(); - inline const SwTabFrm *GetFollow() const; - inline SwTabFrm *GetFollow(); - SwTabFrm* FindMaster( bool bFirstMaster = false ) const; + inline const SwTabFrame *GetFollow() const; + inline SwTabFrame *GetFollow(); + SwTabFrame* FindMaster( bool bFirstMaster = false ) const; virtual bool GetInfo( SfxPoolItem &rHint ) const override; virtual void Paint( vcl::RenderContext& rRenderContext, SwRect const&, @@ -130,13 +130,13 @@ public: virtual void CheckDirection( bool bVert ) override; virtual void Cut() override; - virtual void Paste( SwFrm* pParent, SwFrm* pSibling = nullptr ) override; + virtual void Paste( SwFrame* pParent, SwFrame* pSibling = nullptr ) override; virtual bool Prepare( const PrepareHint ePrep = PREP_CLEAR, const void *pVoid = nullptr, bool bNotify = true ) override; - SwContentFrm *FindLastContent(); - inline const SwContentFrm *FindLastContent() const; + SwContentFrame *FindLastContent(); + inline const SwContentFrame *FindLastContent() const; const SwTable *GetTable() const { return m_pTable; } SwTable *GetTable() { return m_pTable; } @@ -156,8 +156,8 @@ public: bool HasFollowFlowLine() const { return m_bHasFollowFlowLine; } void SetFollowFlowLine(bool bNew) { m_bHasFollowFlowLine = bNew; } - //return the SwTabFrm (if any) that this SwTabFrm is a follow flow line for - SwTabFrm* GetFollowFlowLineFor(); + //return the SwTabFrame (if any) that this SwTabFrame is a follow flow line for + SwTabFrame* GetFollowFlowLineFor(); bool IsRebuildLastLine() const { return m_bIsRebuildLastLine; } void SetRebuildLastLine(bool bNew) { m_bIsRebuildLastLine = bNew; } @@ -208,8 +208,8 @@ public: SwTwips CalcHeightOfFirstContentLine() const; - bool IsInHeadline( const SwFrm& rFrm ) const; - SwRowFrm* GetFirstNonHeadlineRow() const; + bool IsInHeadline( const SwFrame& rFrame ) const; + SwRowFrame* GetFirstNonHeadlineRow() const; bool IsLayoutSplitAllowed() const; @@ -220,21 +220,21 @@ public: virtual void dumpAsXmlAttributes(xmlTextWriterPtr writer) const override; - DECL_FIXEDMEMPOOL_NEWDEL(SwTabFrm) + DECL_FIXEDMEMPOOL_NEWDEL(SwTabFrame) }; -inline const SwContentFrm *SwTabFrm::FindLastContent() const +inline const SwContentFrame *SwTabFrame::FindLastContent() const { - return const_cast<SwTabFrm*>(this)->FindLastContent(); + return const_cast<SwTabFrame*>(this)->FindLastContent(); } -inline const SwTabFrm *SwTabFrm::GetFollow() const +inline const SwTabFrame *SwTabFrame::GetFollow() const { - return static_cast<const SwTabFrm*>(SwFlowFrm::GetFollow()); + return static_cast<const SwTabFrame*>(SwFlowFrame::GetFollow()); } -inline SwTabFrm *SwTabFrm::GetFollow() +inline SwTabFrame *SwTabFrame::GetFollow() { - return static_cast<SwTabFrm*>(SwFlowFrm::GetFollow()); + return static_cast<SwTabFrame*>(SwFlowFrame::GetFollow()); } #endif // INCLUDED_SW_SOURCE_CORE_INC_TABFRM_HXX diff --git a/sw/source/core/inc/tblrwcl.hxx b/sw/source/core/inc/tblrwcl.hxx index 7a00950477de..31f16b0ad30f 100644 --- a/sw/source/core/inc/tblrwcl.hxx +++ b/sw/source/core/inc/tblrwcl.hxx @@ -38,7 +38,7 @@ class SwHistory; class SwContentNode; class SfxPoolItem; class SwShareBoxFormats; -class SwFormatFrmSize; +class SwFormatFrameSize; struct _CpyPara; struct _InsULPara; @@ -190,7 +190,7 @@ public: void AddFormat( const SwFrameFormat& rOld, SwFrameFormat& rNew ); - void SetSize( SwTableBox& rBox, const SwFormatFrmSize& rSz ); + void SetSize( SwTableBox& rBox, const SwFormatFrameSize& rSz ); void SetAttr( SwTableBox& rBox, const SfxPoolItem& rItem ); void SetAttr( SwTableLine& rLine, const SfxPoolItem& rItem ); diff --git a/sw/source/core/inc/tocntntanchoredobjectposition.hxx b/sw/source/core/inc/tocntntanchoredobjectposition.hxx index e332af4c4b9c..6521e94e8a34 100644 --- a/sw/source/core/inc/tocntntanchoredobjectposition.hxx +++ b/sw/source/core/inc/tocntntanchoredobjectposition.hxx @@ -20,9 +20,9 @@ #define INCLUDED_SW_SOURCE_CORE_INC_TOCNTNTANCHOREDOBJECTPOSITION_HXX #include <anchoredobjectposition.hxx> -class SwFrm; -class SwTextFrm; -class SwLayoutFrm; +class SwFrame; +class SwTextFrame; +class SwLayoutFrame; class SwRect; namespace objectpositioning @@ -31,27 +31,27 @@ namespace objectpositioning { private: // calculated data for object position - const SwLayoutFrm* mpVertPosOrientFrm; + const SwLayoutFrame* mpVertPosOrientFrame; // #i26791# // determine offset to frame anchor position according to the // positioning alignments - Point maOffsetToFrmAnchorPos; + Point maOffsetToFrameAnchorPos; // data for calculation of position bool mbAnchorToChar; - const SwFrm* mpToCharOrientFrm; + const SwFrame* mpToCharOrientFrame; const SwRect* mpToCharRect; SwTwips mnToCharTopOfLine; virtual bool IsAnchoredToChar() const override; - virtual const SwFrm* ToCharOrientFrm() const override; + virtual const SwFrame* ToCharOrientFrame() const override; virtual const SwRect* ToCharRect() const override; // #i22341# virtual SwTwips ToCharTopOfLine() const override; - // method to cast <SwAnchoredObjectPosition::GetAnchorFrm()> to + // method to cast <SwAnchoredObjectPosition::GetAnchorFrame()> to // the needed type - SwTextFrm& GetAnchorTextFrm() const; + SwTextFrame& GetAnchorTextFrame() const; /** determine frame for horizontal position @@ -62,13 +62,13 @@ namespace objectpositioning for the first, that the anchor or a follow of the anchor. If none is found, the proposed frame is returned. - @param _pProposedFrm + @param _pProposedFrame input parameter - proposed frame for horizontal position - @return constant reference to <SwFrm> object, at which the + @return constant reference to <SwFrame> object, at which the horizontal position is determined. */ - const SwFrm& _GetHoriVirtualAnchor( const SwLayoutFrm& _pProposedFrm ) const; + const SwFrame& _GetHoriVirtualAnchor( const SwLayoutFrame& _pProposedFrame ) const; public: SwToContentAnchoredObjectPosition( SdrObject& _rDrawObj ); @@ -80,7 +80,7 @@ namespace objectpositioning /** frame, at which the vertical position is oriented at */ - const SwLayoutFrm& GetVertPosOrientFrm() const { return *mpVertPosOrientFrm;} + const SwLayoutFrame& GetVertPosOrientFrame() const { return *mpVertPosOrientFrame;} }; } // namespace objectpositioning diff --git a/sw/source/core/inc/tolayoutanchoredobjectposition.hxx b/sw/source/core/inc/tolayoutanchoredobjectposition.hxx index debc00fb6e79..0ad7b00569a0 100644 --- a/sw/source/core/inc/tolayoutanchoredobjectposition.hxx +++ b/sw/source/core/inc/tolayoutanchoredobjectposition.hxx @@ -33,7 +33,7 @@ namespace objectpositioning // #i26791# // determine offset to frame anchor position according to the // positioning alignments - Point maOffsetToFrmAnchorPos; + Point maOffsetToFrameAnchorPos; public: SwToLayoutAnchoredObjectPosition( SdrObject& _rDrawObj ); diff --git a/sw/source/core/inc/txtfly.hxx b/sw/source/core/inc/txtfly.hxx index bdb26e4bb778..6702f8f62eaf 100644 --- a/sw/source/core/inc/txtfly.hxx +++ b/sw/source/core/inc/txtfly.hxx @@ -25,15 +25,15 @@ #include <vector> class OutputDevice; -class SwContentFrm; -class SwPageFrm; +class SwContentFrame; +class SwPageFrame; class SwTextFly; class SdrObject; class SwTextPaintInfo; class SwFormat; class TextRanger; class SwAnchoredObject; -class SwTextFrm; +class SwTextFrame; class SwDrawTextInfo; class SwContourCache; @@ -60,7 +60,7 @@ class SwContourCache long nPntCnt; sal_uInt16 nObjCnt; const SwRect ContourRect( const SwFormat* pFormat, const SdrObject* pObj, - const SwTextFrm* pFrm, const SwRect &rLine, const long nXPos, + const SwTextFrame* pFrame, const SwRect &rLine, const long nXPos, const bool bRight ); public: @@ -79,7 +79,7 @@ public: */ static const SwRect CalcBoundRect( const SwAnchoredObject* pAnchoredObj, const SwRect &rLine, - const SwTextFrm* pFrm, + const SwTextFrame* pFrame, const long nXPos, const bool bRight ); }; @@ -118,10 +118,10 @@ public: */ class SwTextFly { - const SwPageFrm * pPage; + const SwPageFrame * pPage; const SwAnchoredObject * mpCurrAnchoredObj; - const SwTextFrm * pCurrFrm; - const SwContentFrm * pMaster; + const SwTextFrame * pCurrFrame; + const SwContentFrame * pMaster; SwAnchoredObjList * mpAnchoredObjList; long nMinBottom; @@ -146,7 +146,7 @@ class SwTextFly \param[in] rPortion Scope: document global. */ - SwRect _GetFrm( const SwRect &rPortion, bool bTop ) const; + SwRect _GetFrame( const SwRect &rPortion, bool bTop ) const; SwAnchoredObjList* InitAnchoredObjList(); @@ -184,7 +184,7 @@ class SwTextFly /** The left margin is the left margin of the current PrintArea or - it is determined by the last FlyFrm, which stands on the line. + it is determined by the last FlyFrame, which stands on the line. */ void CalcLeftMargin( SwRect &rFly, SwAnchoredObjList::size_type nPos, @@ -201,20 +201,20 @@ class SwTextFly SwTwips CalcMinBottom() const; - const SwContentFrm* _GetMaster(); + const SwContentFrame* _GetMaster(); public: SwTextFly(); - SwTextFly( const SwTextFrm *pFrm ); + SwTextFly( const SwTextFrame *pFrame ); SwTextFly( const SwTextFly& rTextFly ); ~SwTextFly(); - void CtorInitTextFly( const SwTextFrm *pFrm ); + void CtorInitTextFly( const SwTextFrame *pFrame ); void SetTopRule(); - SwRect GetFrm( const SwRect &rPortion, bool bTop = true ) const; + SwRect GetFrame( const SwRect &rPortion, bool bTop = true ) const; bool IsOn() const; /** @@ -227,7 +227,7 @@ public: bool Relax(); SwTwips GetMinBottom() const; - const SwContentFrm* GetMaster() const; + const SwContentFrame* GetMaster() const; // This temporary variable needs to be manipulated in const methods long GetNextTop() const; @@ -250,7 +250,7 @@ public: Ensures that the overlapping frames (except the transparent frames) won't be scribbled by setting clip regions so that only the portions that are not - in the area of FlyFrms that are opaque and above the current frame will + in the area of FlyFrames that are opaque and above the current frame will be output. DrawText() takes over the on optimization! @@ -274,13 +274,13 @@ public: \param[in] the line area \return whether the line will be overlapped by a frame */ - bool IsAnyFrm( const SwRect &rLine ) const; + bool IsAnyFrame( const SwRect &rLine ) const; /** - Same as IsAnyFrm(const SwRect&), but uses the current frame print + Same as IsAnyFrame(const SwRect&), but uses the current frame print area */ - bool IsAnyFrm() const; + bool IsAnyFrame() const; /** true when a frame or DrawObj must to be taken in account. The optimizations @@ -320,7 +320,7 @@ inline bool SwTextFly::Relax( const SwRect &rRect ) { if (bOn) { - bOn = IsAnyFrm( rRect ); + bOn = IsAnyFrame( rRect ); } return bOn; } @@ -329,7 +329,7 @@ inline bool SwTextFly::Relax() { if (bOn) { - bOn = IsAnyFrm(); + bOn = IsAnyFrame(); } return bOn; } @@ -339,7 +339,7 @@ inline SwTwips SwTextFly::GetMinBottom() const return mpAnchoredObjList ? nMinBottom : CalcMinBottom(); } -inline const SwContentFrm* SwTextFly::GetMaster() const +inline const SwContentFrame* SwTextFly::GetMaster() const { return pMaster ? pMaster : const_cast<SwTextFly*>(this)->_GetMaster(); } @@ -354,9 +354,9 @@ inline void SwTextFly::SetNextTop( long nNew ) const const_cast<SwTextFly*>(this)->nNextTop = nNew; } -inline SwRect SwTextFly::GetFrm( const SwRect &rRect, bool bTop ) const +inline SwRect SwTextFly::GetFrame( const SwRect &rRect, bool bTop ) const { - return bOn ? _GetFrm( rRect, bTop ) : SwRect(); + return bOn ? _GetFrame( rRect, bTop ) : SwRect(); } inline void SwTextFly::SetIgnoreCurrentFrame( bool bNew ) diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx index b20d2d3d18ba..d662ac83717b 100644 --- a/sw/source/core/inc/txtfrm.hxx +++ b/sw/source/core/inc/txtfrm.hxx @@ -30,7 +30,7 @@ class SwTextFormatter; class SwTextFormatInfo; class SwParaPortion; class WidowsAndOrphans; -class SwBodyFrm; +class SwBodyFrame; class SwTextFootnote; class SwInterHyphInfo; // Hyphenate() class SwCache; @@ -38,7 +38,7 @@ class SwBorderAttrs; class SwFrameFormat; class OutputDevice; class SwTestFormat; -struct SwCrsrMoveState; +struct SwCursorMoveState; struct SwFillData; class SwPortionHandler; class SwScriptInfo; @@ -48,13 +48,13 @@ class SwWrongList; #define NON_PRINTING_CHARACTER_COLOR RGB_COLORDATA(0x26, 0x8b, 0xd2) /// Represents the visualization of a paragraph. -class SwTextFrm: public SwContentFrm +class SwTextFrame: public SwContentFrame { friend class SwTextIter; friend class SwTestFormat; friend class WidowsAndOrphans; - friend class TextFrmLockGuard; // May Lock()/Unlock() - friend bool sw_ChangeOffset( SwTextFrm* pFrm, sal_Int32 nNew ); + friend class TextFrameLockGuard; // May Lock()/Unlock() + friend bool sw_ChangeOffset( SwTextFrame* pFrame, sal_Int32 nNew ); static SwCache *pTextCache; // Pointer to the Line Cache static long nMinPrtLine; // This Line must not be underrun when printing @@ -64,7 +64,7 @@ class SwTextFrm: public SwContentFrm sal_uLong mnThisLines :8; // Count of Lines of the Frame // The x position for flys anchored at this paragraph. - // These values are calculated in SwTextFrm::CalcBaseOfstForFly() + // These values are calculated in SwTextFrame::CalcBaseOfstForFly() SwTwips mnFlyAnchorOfst; // The x position for wrap-through flys anchored at this paragraph. SwTwips mnFlyAnchorOfstNoWrap; @@ -90,7 +90,7 @@ class SwTextFrm: public SwContentFrm void CalcLineSpace(); // Only called in Format - void AdjustFrm( const SwTwips nChgHeight, bool bHasToFit = false ); + void AdjustFrame( const SwTwips nChgHeight, bool bHasToFit = false ); // Evaluates the Preps in Format() bool CalcPreps(); @@ -98,8 +98,8 @@ class SwTextFrm: public SwContentFrm void _InvalidateRange( const SwCharRange &, const long = 0); inline void InvalidateRange( const SwCharRange &, const long = 0); - // WidowsAndOrphans, AdjustFrm, AdjustFollow - void FormatAdjust( SwTextFormatter &rLine, WidowsAndOrphans &rFrmBreak, + // WidowsAndOrphans, AdjustFrame, AdjustFollow + void FormatAdjust( SwTextFormatter &rLine, WidowsAndOrphans &rFrameBreak, const sal_Int32 nStrLen, const bool bDummy ); bool mbLocked : 1; // In the Format? @@ -108,7 +108,7 @@ class SwTextFrm: public SwContentFrm bool mbEmpty : 1; // Are we an empty paragraph? bool mbInFootnoteConnect : 1; // Is in Connect at the moment bool mbFootnote : 1; // Has at least one footnote - bool mbRepaint : 1; // TextFrm: Repaint is ready to be fetched + bool mbRepaint : 1; // TextFrame: Repaint is ready to be fetched bool mbHasBlinkPortions : 1; // Contains Blink Portions bool mbFieldFollow : 1; // Start with Field rest of the Master bool mbHasAnimation : 1; // Contains animated SwGrfNumPortion @@ -116,7 +116,7 @@ class SwTextFrm: public SwContentFrm // width and height for vertical formatting // OD 14.03.2003 #i11760# - flag to control, if follow is formatted in // method <CalcFollow(..)>. - // E.g., avoid formatting of follow, if method <SwLayoutFrm::FormatWidthCols(..)> + // E.g., avoid formatting of follow, if method <SwLayoutFrame::FormatWidthCols(..)> // is running. bool mbFollowFormatAllowed : 1; @@ -131,9 +131,9 @@ class SwTextFrm: public SwContentFrm bool IsIdxInside( const sal_Int32 nPos, const sal_Int32 nLen ) const; // Changes the Frame or not (cf. FlyCnt) - bool _GetCrsrOfst(SwPosition *pPos, const Point &rPoint, - const bool bChgFrm, SwCrsrMoveState* = nullptr ) const; - void FillCrsrPos( SwFillData &rFill ) const; + bool _GetCursorOfst(SwPosition *pPos, const Point &rPoint, + const bool bChgFrame, SwCursorMoveState* = nullptr ) const; + void FillCursorPos( SwFillData &rFill ) const; // Format exactly one Line bool FormatLine( SwTextFormatter &rLine, const bool bPrev ); @@ -153,20 +153,20 @@ class SwTextFrm: public SwContentFrm const sal_Int32 nEnd); // inline branch - SwTwips _GetFootnoteFrmHeight() const; + SwTwips _GetFootnoteFrameHeight() const; // Outsourced to CalcPreps bool CalcPrepFootnoteAdjust(); // For Footnote and WidOrp: Forced validation - void ValidateFrm(); - void ValidateBodyFrm(); + void ValidateFrame(); + void ValidateBodyFrame(); bool _GetDropRect( SwRect &rRect ) const; void SetPara( SwParaPortion *pNew, bool bDelete = true ); - bool _IsFootnoteNumFrm() const; + bool _IsFootnoteNumFrame() const; // Refresh formatting information bool FormatQuick( bool bForceQuickFormat ); @@ -197,7 +197,7 @@ class SwTextFrm: public SwContentFrm void _CalcHeightOfLastLine( const bool _bUseFont = false ); virtual void DestroyImpl() override; - virtual ~SwTextFrm(); + virtual ~SwTextFrame(); protected: virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ) override; @@ -224,11 +224,11 @@ public: /** * Returns the screen position of rPos. The values are relative to the upper * left position of the page frame. - * Additional information can be obtained by passing an SwCrsrMoveState object. + * Additional information can be obtained by passing an SwCursorMoveState object. * Returns false if rPos > number of character is string */ virtual bool GetCharRect( SwRect& rRect, const SwPosition& rPos, - SwCrsrMoveState* pCMS = nullptr ) const override; + SwCursorMoveState* pCMS = nullptr ) const override; /// A slimmer version of GetCharRect for autopositioning Frames bool GetAutoPos( SwRect &, const SwPosition& ) const; @@ -266,15 +266,15 @@ public: * @returns false if the SPoint is outside of the SSize else * returns true */ - virtual bool GetCrsrOfst( SwPosition *, Point&, - SwCrsrMoveState* = nullptr, bool bTestBackground = false ) const override; + virtual bool GetCursorOfst( SwPosition *, Point&, + SwCursorMoveState* = nullptr, bool bTestBackground = false ) const override; /** * Makes sure that the Frame is not switched (e.g. switched for a * character-bound Frame) */ - inline bool GetKeyCrsrOfst(SwPosition *pPos, const Point &rPoint ) const - { return _GetCrsrOfst( pPos, rPoint, false ); } + inline bool GetKeyCursorOfst(SwPosition *pPos, const Point &rPoint ) const + { return _GetCursorOfst( pPos, rPoint, false ); } void PaintExtraData( const SwRect & rRect ) const; /// Page number etc. SwRect Paint(); @@ -303,19 +303,19 @@ public: * Prepares the cursor position for a visual cursor move (BiDi). * The behaviour is different for insert and overwrite cursors */ - void PrepareVisualMove( sal_Int32& nPos, sal_uInt8& nCrsrLevel, - bool& bRight, bool bInsertCrsr ); + void PrepareVisualMove( sal_Int32& nPos, sal_uInt8& nCursorLevel, + bool& bRight, bool bInsertCursor ); /// Methods to manage the FollowFrame - SwContentFrm *SplitFrm( const sal_Int32 nTextPos ); - SwContentFrm *JoinFrm(); + SwContentFrame *SplitFrame( const sal_Int32 nTextPos ); + SwContentFrame *JoinFrame(); inline sal_Int32 GetOfst() const { return mnOffset; } void _SetOfst( const sal_Int32 nNewOfst ); inline void SetOfst ( const sal_Int32 nNewOfst ); inline void ManipOfst ( const sal_Int32 nNewOfst ){ mnOffset = nNewOfst; } - SwTextFrm *GetFrmAtPos ( const SwPosition &rPos); - inline const SwTextFrm *GetFrmAtPos ( const SwPosition &rPos) const; - SwTextFrm& GetFrmAtOfst( const sal_Int32 nOfst ); + SwTextFrame *GetFrameAtPos ( const SwPosition &rPos); + inline const SwTextFrame *GetFrameAtPos ( const SwPosition &rPos) const; + SwTextFrame& GetFrameAtOfst( const sal_Int32 nOfst ); /// If there's a Follow and we don't contain text ourselves inline bool IsEmptyMaster() const { return GetFollow() && !GetFollow()->GetOfst(); } @@ -323,18 +323,18 @@ public: /// Returns the text portion we want to edit (for inline see underneath) const OUString& GetText() const; inline SwTextNode *GetTextNode() - { return static_cast< SwTextNode* >( SwContentFrm::GetNode()); } + { return static_cast< SwTextNode* >( SwContentFrame::GetNode()); } inline const SwTextNode *GetTextNode() const - { return static_cast< const SwTextNode* >( SwContentFrm::GetNode()); } + { return static_cast< const SwTextNode* >( SwContentFrame::GetNode()); } - SwTextFrm(SwTextNode * const, SwFrm* ); + SwTextFrame(SwTextNode * const, SwFrame* ); /** - * SwContentFrm: the shortcut for the Frames + * SwContentFrame: the shortcut for the Frames * If the void* casts wrongly, it's its own fault! * The void* must be checked for 0 in any case! * - * return true if the Portion associated with this SwTextFrm was + * return true if the Portion associated with this SwTextFrame was * potentially destroyed and replaced by Prepare */ virtual bool Prepare( const PrepareHint ePrep = PREP_CLEAR, @@ -353,7 +353,7 @@ public: * determines whether the paragraph needs to be split. * We pass the potential predecessor for the distance calculation */ - bool TestFormat( const SwFrm* pPrv, SwTwips &nMaxHeight, bool &bSplit ); + bool TestFormat( const SwFrame* pPrv, SwTwips &nMaxHeight, bool &bSplit ); /** * We format a Line for interactive hyphenation @@ -374,7 +374,7 @@ public: SwTwips HangingMargin() const; // RTTI - DECL_FIXEDMEMPOOL_NEWDEL(SwTextFrm) + DECL_FIXEDMEMPOOL_NEWDEL(SwTextFrame) // Locking inline bool IsLocked() const { return mbLocked; } @@ -393,14 +393,14 @@ public: inline void ResetBlinkPor() const; inline bool HasBlinkPor() const { return mbHasBlinkPortions; } inline void SetAnimation() const - { const_cast<SwTextFrm*>(this)->mbHasAnimation = true; } + { const_cast<SwTextFrame*>(this)->mbHasAnimation = true; } inline bool HasAnimation() const { return mbHasAnimation; } inline bool IsSwapped() const { return mbIsSwapped; } - /// Does the Frm have a local footnote (in this Frm or Follow)? + /// Does the Frame have a local footnote (in this Frame or Follow)? #ifdef DBG_UTIL - void CalcFootnoteFlag( sal_Int32 nStop = COMPLETE_STRING ); //For testing SplitFrm + void CalcFootnoteFlag( sal_Int32 nStop = COMPLETE_STRING ); //For testing SplitFrame #else void CalcFootnoteFlag(); #endif @@ -420,15 +420,15 @@ public: /// Footnote void RemoveFootnote( const sal_Int32 nStart = 0, const sal_Int32 nLen = COMPLETE_STRING ); - inline SwTwips GetFootnoteFrmHeight() const; - SwTextFrm *FindFootnoteRef( const SwTextFootnote *pFootnote ); - inline const SwTextFrm *FindFootnoteRef( const SwTextFootnote *pFootnote ) const - { return const_cast<SwTextFrm *>(this)->FindFootnoteRef( pFootnote ); } + inline SwTwips GetFootnoteFrameHeight() const; + SwTextFrame *FindFootnoteRef( const SwTextFootnote *pFootnote ); + inline const SwTextFrame *FindFootnoteRef( const SwTextFootnote *pFootnote ) const + { return const_cast<SwTextFrame *>(this)->FindFootnoteRef( pFootnote ); } void ConnectFootnote( SwTextFootnote *pFootnote, const SwTwips nDeadLine ); /** * If we're a Footnote that grows towards its reference ... - * public, because it's needed by SwContentFrm::MakeAll + * public, because it's needed by SwContentFrame::MakeAll */ SwTwips GetFootnoteLine( const SwTextFootnote *pFootnote ) const; @@ -438,11 +438,11 @@ public: /// Returns the sum of line height in pLine sal_uInt16 GetParHeight() const; - inline SwTextFrm *GetFollow(); - inline const SwTextFrm *GetFollow() const; + inline SwTextFrame *GetFollow(); + inline const SwTextFrame *GetFollow() const; /// Find the page number of ErgoSum and QuoVadis - SwTextFrm *FindQuoVadisFrm(); + SwTextFrame *FindQuoVadisFrame(); /** * Makes up for formatting if the Idle Handler has struck @@ -452,7 +452,7 @@ public: * has to be avoided during painting. Therefore we need to pass the * information that we are currently in the paint process. */ - SwTextFrm* GetFormatted( bool bForceQuickFormat = false ); + SwTextFrame* GetFormatted( bool bForceQuickFormat = false ); /// Will be moved soon inline void SetFootnote( const bool bNew ) { mbFootnote = bNew; } @@ -460,7 +460,7 @@ public: /// Respect the Follows inline bool IsInside( const sal_Int32 nPos ) const; - const SwBodyFrm *FindBodyFrm() const; + const SwBodyFrame *FindBodyFrame() const; /// DropCaps and selections inline bool GetDropRect( SwRect &rRect ) const @@ -477,9 +477,9 @@ public: /// Removes the Line information from the Cache void ClearPara(); - /// Am I a FootnoteFrm, with a number at the start of the paragraph? - inline bool IsFootnoteNumFrm() const - { return IsInFootnote() && !GetIndPrev() && _IsFootnoteNumFrm(); } + /// Am I a FootnoteFrame, with a number at the start of the paragraph? + inline bool IsFootnoteNumFrame() const + { return IsInFootnote() && !GetIndPrev() && _IsFootnoteNumFrame(); } /** * Simulates a formatting as if there were not right margin or Flys or other @@ -510,10 +510,10 @@ public: /// Returns the first line height sal_uInt16 FirstLineHeight() const; - /// Rewires FlyInCntFrm, if nEnd > Index >= nStart - void MoveFlyInCnt( SwTextFrm *pNew, sal_Int32 nStart, sal_Int32 nEnd ); + /// Rewires FlyInContentFrame, if nEnd > Index >= nStart + void MoveFlyInCnt( SwTextFrame *pNew, sal_Int32 nStart, sal_Int32 nEnd ); - /// Calculates the position of FlyInCntFrms + /// Calculates the position of FlyInContentFrames sal_Int32 CalcFlyPos( SwFrameFormat* pSearch ); /// Determines the start position and step size of the register @@ -631,23 +631,23 @@ public: virtual void dumpAsXmlAttributes(xmlTextWriterPtr writer) const override; }; -//use this to protect a SwTextFrm for a given scope from getting merged with +//use this to protect a SwTextFrame for a given scope from getting merged with //its neighbour and thus deleted -class TextFrmLockGuard +class TextFrameLockGuard { private: - SwTextFrm *m_pTextFrm; + SwTextFrame *m_pTextFrame; bool m_bOldLocked; public: - //Lock pFrm for the lifetime of the Cut/Paste call, etc. to avoid - //SwTextFrm::_AdjustFollow removing the pFrm we're trying to Make - TextFrmLockGuard(SwFrm* pFrm) + //Lock pFrame for the lifetime of the Cut/Paste call, etc. to avoid + //SwTextFrame::_AdjustFollow removing the pFrame we're trying to Make + TextFrameLockGuard(SwFrame* pFrame) { - m_pTextFrm = pFrm->IsTextFrm() ? static_cast<SwTextFrm*>(pFrm) : nullptr; - if (m_pTextFrm) + m_pTextFrame = pFrame->IsTextFrame() ? static_cast<SwTextFrame*>(pFrame) : nullptr; + if (m_pTextFrame) { - m_bOldLocked = m_pTextFrm->IsLocked(); - m_pTextFrm->Lock(); + m_bOldLocked = m_pTextFrame->IsLocked(); + m_pTextFrame->Lock(); } else { @@ -655,91 +655,91 @@ public: } } - ~TextFrmLockGuard() + ~TextFrameLockGuard() { - if (m_pTextFrm && !m_bOldLocked) - m_pTextFrm->Unlock(); + if (m_pTextFrame && !m_bOldLocked) + m_pTextFrame->Unlock(); } }; -inline const SwParaPortion *SwTextFrm::GetPara() const +inline const SwParaPortion *SwTextFrame::GetPara() const { - return const_cast<SwTextFrm*>(this)->GetPara(); + return const_cast<SwTextFrame*>(this)->GetPara(); } -inline bool SwTextFrm::HasPara() const +inline bool SwTextFrame::HasPara() const { return mnCacheIndex!=USHRT_MAX && _HasPara(); } -inline SwTwips SwTextFrm::GrowTst( const SwTwips nGrow ) +inline SwTwips SwTextFrame::GrowTst( const SwTwips nGrow ) { return Grow( nGrow, true ); } -inline bool SwTextFrm::IsInside( const sal_Int32 nPos ) const +inline bool SwTextFrame::IsInside( const sal_Int32 nPos ) const { bool bRet = true; if( nPos < GetOfst() ) bRet = false; else { - const SwTextFrm *pFoll = GetFollow(); + const SwTextFrame *pFoll = GetFollow(); if( pFoll && nPos >= pFoll->GetOfst() ) bRet = false; } return bRet; } -inline SwTwips SwTextFrm::GetFootnoteFrmHeight() const +inline SwTwips SwTextFrame::GetFootnoteFrameHeight() const { if( !IsFollow() && IsInFootnote() && HasPara() ) - return _GetFootnoteFrmHeight(); + return _GetFootnoteFrameHeight(); else return 0; } -inline const SwTextFrm *SwTextFrm::GetFollow() const +inline const SwTextFrame *SwTextFrame::GetFollow() const { - return static_cast<const SwTextFrm*>(SwContentFrm::GetFollow()); + return static_cast<const SwTextFrame*>(SwContentFrame::GetFollow()); } -inline SwTextFrm *SwTextFrm::GetFollow() +inline SwTextFrame *SwTextFrame::GetFollow() { - return static_cast<SwTextFrm*>(SwContentFrm::GetFollow()); + return static_cast<SwTextFrame*>(SwContentFrame::GetFollow()); } -inline const SwTextFrm *SwTextFrm::GetFrmAtPos( const SwPosition &rPos) const +inline const SwTextFrame *SwTextFrame::GetFrameAtPos( const SwPosition &rPos) const { - return const_cast<SwTextFrm*>(this)->GetFrmAtPos( rPos ); + return const_cast<SwTextFrame*>(this)->GetFrameAtPos( rPos ); } -inline void SwTextFrm::SetOfst( const sal_Int32 nNewOfst ) +inline void SwTextFrame::SetOfst( const sal_Int32 nNewOfst ) { if ( mnOffset != nNewOfst ) _SetOfst( nNewOfst ); } -inline void SwTextFrm::SetRepaint() const +inline void SwTextFrame::SetRepaint() const { - const_cast<SwTextFrm*>(this)->mbRepaint = true; + const_cast<SwTextFrame*>(this)->mbRepaint = true; } -inline void SwTextFrm::ResetRepaint() const +inline void SwTextFrame::ResetRepaint() const { - const_cast<SwTextFrm*>(this)->mbRepaint = false; + const_cast<SwTextFrame*>(this)->mbRepaint = false; } -inline void SwTextFrm::SetBlinkPor() const +inline void SwTextFrame::SetBlinkPor() const { - const_cast<SwTextFrm*>(this)->mbHasBlinkPortions = true; + const_cast<SwTextFrame*>(this)->mbHasBlinkPortions = true; } -inline void SwTextFrm::ResetBlinkPor() const +inline void SwTextFrame::ResetBlinkPor() const { - const_cast<SwTextFrm*>(this)->mbHasBlinkPortions = false; + const_cast<SwTextFrame*>(this)->mbHasBlinkPortions = false; } class TemporarySwap { protected: - explicit TemporarySwap(SwTextFrm * frame, bool swap): + explicit TemporarySwap(SwTextFrame * frame, bool swap): frame_(frame), undo_(false) { if (frame_->IsVertical() && swap) { @@ -758,19 +758,19 @@ private: TemporarySwap(TemporarySwap &) = delete; void operator =(TemporarySwap &) = delete; - SwTextFrm * frame_; + SwTextFrame * frame_; bool undo_; }; class SwSwapIfSwapped: private TemporarySwap { public: - explicit SwSwapIfSwapped(SwTextFrm* frame): + explicit SwSwapIfSwapped(SwTextFrame* frame): TemporarySwap(frame, frame->IsSwapped()) {} }; class SwSwapIfNotSwapped: private TemporarySwap { public: - explicit SwSwapIfNotSwapped(SwTextFrm* frame): + explicit SwSwapIfNotSwapped(SwTextFrame* frame): TemporarySwap(frame, !frame->IsSwapped()) {} }; @@ -778,13 +778,13 @@ public: * Helper class which can be used instead of the macros if a function * has too many returns */ -class SwFrmSwapper +class SwFrameSwapper { - const SwTextFrm* pFrm; + const SwTextFrame* pFrame; bool bUndo; public: - SwFrmSwapper( const SwTextFrm* pFrm, bool bSwapIfNotSwapped ); - ~SwFrmSwapper(); + SwFrameSwapper( const SwTextFrame* pFrame, bool bSwapIfNotSwapped ); + ~SwFrameSwapper(); }; class SwLayoutModeModifier diff --git a/sw/source/core/inc/unoport.hxx b/sw/source/core/inc/unoport.hxx index cb8e364f87c6..8b9e72426f1c 100644 --- a/sw/source/core/inc/unoport.hxx +++ b/sw/source/core/inc/unoport.hxx @@ -122,7 +122,7 @@ private: bool m_bIsCollapsed; - void init(const SwUnoCrsr* pPortionCursor); + void init(const SwUnoCursor* pPortionCursor); protected: @@ -135,7 +135,7 @@ protected: throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException); void GetPropertyValue( css::uno::Any &rVal, - const SfxItemPropertySimpleEntry& rEntry, SwUnoCrsr *pUnoCrsr, SfxItemSet *&pSet ); + const SfxItemPropertySimpleEntry& rEntry, SwUnoCursor *pUnoCursor, SfxItemSet *&pSet ); css::uno::Sequence<css::beans::GetDirectPropertyTolerantResult> SAL_CALL GetPropertyValuesTolerant_Impl( const css::uno::Sequence< OUString >& rPropertyNames, bool bDirectValuesOnly ) @@ -147,11 +147,11 @@ protected: virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) override; public: - SwXTextPortion(const SwUnoCrsr* pPortionCrsr, css::uno::Reference< css::text::XText > const& rParent, SwTextPortionType eType ); - SwXTextPortion(const SwUnoCrsr* pPortionCrsr, css::uno::Reference< css::text::XText > const& rParent, SwFrameFormat& rFormat ); + SwXTextPortion(const SwUnoCursor* pPortionCursor, css::uno::Reference< css::text::XText > const& rParent, SwTextPortionType eType ); + SwXTextPortion(const SwUnoCursor* pPortionCursor, css::uno::Reference< css::text::XText > const& rParent, SwFrameFormat& rFormat ); // for Ruby - SwXTextPortion(const SwUnoCrsr* pPortionCrsr, + SwXTextPortion(const SwUnoCursor* pPortionCursor, SwTextRuby const& rAttr, css::uno::Reference< css::text::XText > const& xParent, bool bIsEnd ); @@ -225,7 +225,7 @@ public: SwTextPortionType GetTextPortionType() const { return m_ePortionType; } - SwUnoCrsr& GetCursor() const + SwUnoCursor& GetCursor() const { return *m_pUnoCursor; } }; @@ -237,20 +237,20 @@ class SwXTextPortionEnumeration > { TextRangeList_t m_Portions; // contains all portions, filled by ctor - sw::UnoCursorPointer m_pUnoCrsr; + sw::UnoCursorPointer m_pUnoCursor; - SwUnoCrsr& GetCursor() const - {return *m_pUnoCrsr;} + SwUnoCursor& GetCursor() const + {return *m_pUnoCursor;} protected: virtual ~SwXTextPortionEnumeration(); public: - SwXTextPortionEnumeration(SwPaM& rParaCrsr, + SwXTextPortionEnumeration(SwPaM& rParaCursor, css::uno::Reference< css::text::XText > const & xParent, const sal_Int32 nStart, const sal_Int32 nEnd ); - SwXTextPortionEnumeration(SwPaM& rParaCrsr, + SwXTextPortionEnumeration(SwPaM& rParaCursor, TextRangeList_t const & rPortions ); static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId(); @@ -292,7 +292,7 @@ private: public: SwXRedlinePortion( SwRangeRedline const& rRedline, - SwUnoCrsr const* pPortionCrsr, + SwUnoCursor const* pPortionCursor, css::uno::Reference< css::text::XText > const& xParent, bool const bIsStart); diff --git a/sw/source/core/inc/viewimp.hxx b/sw/source/core/inc/viewimp.hxx index e6efdf4278be..3bde62fcaef9 100644 --- a/sw/source/core/inc/viewimp.hxx +++ b/sw/source/core/inc/viewimp.hxx @@ -28,15 +28,15 @@ #include <vector> class SwViewShell; -class SwFlyFrm; +class SwFlyFrame; class SwViewOption; class SwRegionRects; -class SwFrm; +class SwFrame; class SwLayAction; class SwLayIdle; class SwDrawView; class SdrPageView; -class SwPageFrm; +class SwPageFrame; class SwRegionRects; class SwAccessibleMap; class SdrObject; @@ -44,7 +44,7 @@ class Fraction; class SwPrintData; class SwPagePreviewLayout; struct PreviewPage; -class SwTextFrm; +class SwTextFrame; // --> OD #i76669# namespace sdr { namespace contact { class ViewObjectContactRedirector; @@ -67,7 +67,7 @@ class SwViewShellImp SwDrawView *m_pDrawView; // Our DrawView SdrPageView *m_pSdrPageView; // Exactly one Page for our DrawView - SwPageFrm *m_pFirstVisiblePage; // Always points to the first visible Page + SwPageFrame *m_pFirstVisiblePage; // Always points to the first visible Page SwRegionRects *m_pRegion; // Collector of Paintrects from the LayAction SwLayAction *m_pLayAction; // Is set if an Action object exists @@ -103,18 +103,18 @@ private: implementation for wrapper method <SwViewShell::InvalidateAccessibleParaFlowRelation(..)> - @param _pFromTextFrm + @param _pFromTextFrame input parameter - paragraph frame, for which the relation CONTENT_FLOWS_FROM has to be invalidated. If NULL, no CONTENT_FLOWS_FROM relation has to be invalidated - @param _pToTextFrm + @param _pToTextFrame input parameter - paragraph frame, for which the relation CONTENT_FLOWS_TO has to be invalidated. If NULL, no CONTENT_FLOWS_TO relation has to be invalidated */ - void _InvalidateAccessibleParaFlowRelation( const SwTextFrm* _pFromTextFrm, - const SwTextFrm* _pToTextFrm ); + void _InvalidateAccessibleParaFlowRelation( const SwTextFrame* _pFromTextFrame, + const SwTextFrame* _pToTextFrame ); /** invalidate text selection for paragraphs @@ -130,7 +130,7 @@ private: implementation for wrapper method <SwViewShell::InvalidateAccessibleParaAttrs(..)> */ - void _InvalidateAccessibleParaAttrs( const SwTextFrm& rTextFrm ); + void _InvalidateAccessibleParaAttrs( const SwTextFrame& rTextFrame ); public: SwViewShellImp( SwViewShell * ); @@ -143,8 +143,8 @@ public: Color GetRetoucheColor() const; /// Management of the first visible Page - const SwPageFrm *GetFirstVisPage(OutputDevice* pRenderContext) const; - SwPageFrm *GetFirstVisPage(OutputDevice* pRenderContext); + const SwPageFrame *GetFirstVisPage(OutputDevice* pRenderContext) const; + SwPageFrame *GetFirstVisPage(OutputDevice* pRenderContext); void SetFirstVisPageInvalid() { m_bFirstPageInvalid = true; } bool AddPaintRect( const SwRect &rRect ); @@ -191,9 +191,9 @@ public: /** * If an Action is running we ask it to check whether it's time - * to enable the WaitCrsr + * to enable the WaitCursor */ - void CheckWaitCrsr(); + void CheckWaitCursor(); /// Asks the LayAction if present bool IsCalcLayoutProgress() const; @@ -224,41 +224,41 @@ public: void UpdateAccessible(); /// Remove a frame from the accessible view - void DisposeAccessible( const SwFrm *pFrm, const SdrObject *pObj, + void DisposeAccessible( const SwFrame *pFrame, const SdrObject *pObj, bool bRecursive ); - inline void DisposeAccessibleFrm( const SwFrm *pFrm, + inline void DisposeAccessibleFrame( const SwFrame *pFrame, bool bRecursive = false ); inline void DisposeAccessibleObj( const SdrObject *pObj ); /// Move a frame's position in the accessible view - void MoveAccessible( const SwFrm *pFrm, const SdrObject *pObj, - const SwRect& rOldFrm ); - inline void MoveAccessibleFrm( const SwFrm *pFrm, const SwRect& rOldFrm ); + void MoveAccessible( const SwFrame *pFrame, const SdrObject *pObj, + const SwRect& rOldFrame ); + inline void MoveAccessibleFrame( const SwFrame *pFrame, const SwRect& rOldFrame ); /// Add a frame in the accessible view - inline void AddAccessibleFrm( const SwFrm *pFrm ); + inline void AddAccessibleFrame( const SwFrame *pFrame ); inline void AddAccessibleObj( const SdrObject *pObj ); /// Invalidate accessible frame's frame's content - void InvalidateAccessibleFrmContent( const SwFrm *pFrm ); + void InvalidateAccessibleFrameContent( const SwFrame *pFrame ); /// Invalidate accessible frame's cursor position - void InvalidateAccessibleCursorPosition( const SwFrm *pFrm ); + void InvalidateAccessibleCursorPosition( const SwFrame *pFrame ); /// Invalidate editable state for all accessible frames void InvalidateAccessibleEditableState( bool bAllShells = true, - const SwFrm *pFrm=nullptr ); + const SwFrame *pFrame=nullptr ); /// Invalidate frame's relation set (for chained frames) - void InvalidateAccessibleRelationSet( const SwFlyFrm *pMaster, - const SwFlyFrm *pFollow ); + void InvalidateAccessibleRelationSet( const SwFlyFrame *pMaster, + const SwFlyFrame *pFollow ); /// update data for accessible preview /// change method signature due to new page preview functionality void UpdateAccessiblePreview( const std::vector<PreviewPage*>& _rPreviewPages, const Fraction& _rScale, - const SwPageFrm* _pSelectedPageFrm, + const SwPageFrame* _pSelectedPageFrame, const Size& _rPreviewWinSize ); void InvalidateAccessiblePreviewSelection( sal_uInt16 nSelPage ); @@ -275,10 +275,10 @@ inline SwAccessibleMap& SwViewShellImp::GetAccessibleMap() return *m_pAccessibleMap; } -inline void SwViewShellImp::DisposeAccessibleFrm( const SwFrm *pFrm, +inline void SwViewShellImp::DisposeAccessibleFrame( const SwFrame *pFrame, bool bRecursive ) { - DisposeAccessible( pFrm, nullptr, bRecursive ); + DisposeAccessible( pFrame, nullptr, bRecursive ); } inline void SwViewShellImp::DisposeAccessibleObj( const SdrObject *pObj ) @@ -286,16 +286,16 @@ inline void SwViewShellImp::DisposeAccessibleObj( const SdrObject *pObj ) DisposeAccessible( nullptr, pObj, false ); } -inline void SwViewShellImp::MoveAccessibleFrm( const SwFrm *pFrm, - const SwRect& rOldFrm ) +inline void SwViewShellImp::MoveAccessibleFrame( const SwFrame *pFrame, + const SwRect& rOldFrame ) { - MoveAccessible( pFrm, nullptr, rOldFrm ); + MoveAccessible( pFrame, nullptr, rOldFrame ); } -inline void SwViewShellImp::AddAccessibleFrm( const SwFrm *pFrm ) +inline void SwViewShellImp::AddAccessibleFrame( const SwFrame *pFrame ) { SwRect aEmptyRect; - MoveAccessible( pFrm, nullptr, aEmptyRect ); + MoveAccessible( pFrame, nullptr, aEmptyRect ); } inline void SwViewShellImp::AddAccessibleObj( const SdrObject *pObj ) diff --git a/sw/source/core/layout/anchoreddrawobject.cxx b/sw/source/core/layout/anchoreddrawobject.cxx index 2d09ae61a509..da6c2fff6ee4 100644 --- a/sw/source/core/layout/anchoreddrawobject.cxx +++ b/sw/source/core/layout/anchoreddrawobject.cxx @@ -41,7 +41,7 @@ class SwPosNotify private: SwAnchoredDrawObject* mpAnchoredDrawObj; SwRect maOldObjRect; - SwPageFrm* mpOldPageFrm; + SwPageFrame* mpOldPageFrame; public: explicit SwPosNotify( SwAnchoredDrawObject* _pAnchoredDrawObj ); @@ -55,25 +55,25 @@ SwPosNotify::SwPosNotify( SwAnchoredDrawObject* _pAnchoredDrawObj ) : { maOldObjRect = mpAnchoredDrawObj->GetObjRect(); // --> #i35640# - determine correct page frame - mpOldPageFrm = mpAnchoredDrawObj->GetPageFrm(); + mpOldPageFrame = mpAnchoredDrawObj->GetPageFrame(); } SwPosNotify::~SwPosNotify() { if ( maOldObjRect != mpAnchoredDrawObj->GetObjRect() ) { - if( maOldObjRect.HasArea() && mpOldPageFrm ) + if( maOldObjRect.HasArea() && mpOldPageFrame ) { - mpAnchoredDrawObj->NotifyBackground( mpOldPageFrm, maOldObjRect, + mpAnchoredDrawObj->NotifyBackground( mpOldPageFrame, maOldObjRect, PREP_FLY_LEAVE ); } SwRect aNewObjRect( mpAnchoredDrawObj->GetObjRect() ); if( aNewObjRect.HasArea() ) { // --> #i35640# - determine correct page frame - SwPageFrm* pNewPageFrm = mpAnchoredDrawObj->GetPageFrm(); - if( pNewPageFrm ) - mpAnchoredDrawObj->NotifyBackground( pNewPageFrm, aNewObjRect, + SwPageFrame* pNewPageFrame = mpAnchoredDrawObj->GetPageFrame(); + if( pNewPageFrame ) + mpAnchoredDrawObj->NotifyBackground( pNewPageFrame, aNewObjRect, PREP_FLY_ARRIVE ); } @@ -84,10 +84,10 @@ SwPosNotify::~SwPosNotify() // --> #i43255# - refine condition to avoid unneeded // invalidations: anchored object had to be on the page of its anchor // text frame. - if ( mpAnchoredDrawObj->GetAnchorFrm()->IsTextFrm() && - mpOldPageFrm == mpAnchoredDrawObj->GetAnchorFrm()->FindPageFrm() ) + if ( mpAnchoredDrawObj->GetAnchorFrame()->IsTextFrame() && + mpOldPageFrame == mpAnchoredDrawObj->GetAnchorFrame()->FindPageFrame() ) { - mpAnchoredDrawObj->AnchorFrm()->Prepare( PREP_FLY_LEAVE ); + mpAnchoredDrawObj->AnchorFrame()->Prepare( PREP_FLY_LEAVE ); } // indicate a restart of the layout process @@ -104,13 +104,13 @@ SwPosNotify::~SwPosNotify() mpAnchoredDrawObj->SetConsiderForTextWrap( true ); // invalidate 'background' in order to allow its 'background' // to wrap around it. - mpAnchoredDrawObj->NotifyBackground( mpAnchoredDrawObj->GetPageFrm(), + mpAnchoredDrawObj->NotifyBackground( mpAnchoredDrawObj->GetPageFrame(), mpAnchoredDrawObj->GetObjRectWithSpaces(), PREP_FLY_ARRIVE ); // invalidate position of anchor frame in order to force // a re-format of the anchor frame, which also causes a // re-format of the invalid previous frames of the anchor frame. - mpAnchoredDrawObj->AnchorFrm()->InvalidatePos(); + mpAnchoredDrawObj->AnchorFrame()->InvalidatePos(); } } } @@ -231,11 +231,11 @@ bool SwAnchoredDrawObject::IsOutsidePage() const { bool bOutsidePage( false ); - if ( !NotYetPositioned() && GetPageFrm() ) + if ( !NotYetPositioned() && GetPageFrame() ) { SwRect aTmpRect( GetObjRect() ); bOutsidePage = - ( aTmpRect.Intersection( GetPageFrm()->Frm() ) != GetObjRect() ); + ( aTmpRect.Intersection( GetPageFrame()->Frame() ) != GetObjRect() ); } return bOutsidePage; @@ -339,7 +339,7 @@ void SwAnchoredDrawObject::MakeObjPos() // the anchor frame is valid. if ( dynamic_cast< const SwDrawVirtObj* >(GetDrawObj()) == nullptr && !pDrawContact->ObjAnchoredAsChar() && - GetAnchorFrm()->IsValid() ) + GetAnchorFrame()->IsValid() ) { pDrawContact->ChkPage(); } @@ -347,9 +347,9 @@ void SwAnchoredDrawObject::MakeObjPos() // --> #i62875# if ( mbCaptureAfterLayoutDirChange && - GetPageFrm() ) + GetPageFrame() ) { - SwRect aPageRect( GetPageFrm()->Frm() ); + SwRect aPageRect( GetPageFrame()->Frame() ); SwRect aObjRect( GetObjRect() ); if ( aObjRect.Right() >= aPageRect.Right() + 10 ) { @@ -388,14 +388,14 @@ void SwAnchoredDrawObject::_MakeObjPosAnchoredAtPara() // position. E.g., for at-character anchored object this can be the follow // frame of the anchor frame, which contains the anchor character. const bool bFormatAnchor = - !static_cast<const SwTextFrm*>( GetAnchorFrmContainingAnchPos() )->IsAnyJoinLocked() && + !static_cast<const SwTextFrame*>( GetAnchorFrameContainingAnchPos() )->IsAnyJoinLocked() && !ConsiderObjWrapInfluenceOnObjPos() && !ConsiderObjWrapInfluenceOfOtherObjs(); if ( bFormatAnchor ) { // --> #i50356# - GetAnchorFrmContainingAnchPos()->Calc(GetAnchorFrmContainingAnchPos()->getRootFrm()->GetCurrShell()->GetOut()); + GetAnchorFrameContainingAnchPos()->Calc(GetAnchorFrameContainingAnchPos()->getRootFrame()->GetCurrShell()->GetOut()); } bool bOscillationDetected = false; @@ -419,7 +419,7 @@ void SwAnchoredDrawObject::_MakeObjPosAnchoredAtPara() aObjPositioning.CalcPosition(); // get further needed results of the positioning algorithm - SetVertPosOrientFrm ( aObjPositioning.GetVertPosOrientFrm() ); + SetVertPosOrientFrame ( aObjPositioning.GetVertPosOrientFrame() ); _SetDrawObjAnchor(); // check for object position oscillation, if position has changed. @@ -434,7 +434,7 @@ void SwAnchoredDrawObject::_MakeObjPosAnchoredAtPara() if ( bFormatAnchor ) { // --> #i50356# - GetAnchorFrmContainingAnchPos()->Calc(GetAnchorFrmContainingAnchPos()->getRootFrm()->GetCurrShell()->GetOut()); + GetAnchorFrameContainingAnchPos()->Calc(GetAnchorFrameContainingAnchPos()->getRootFrame()->GetCurrShell()->GetOut()); } // --> #i3317# @@ -481,15 +481,15 @@ void SwAnchoredDrawObject::_MakeObjPosAnchoredAtLayout() // especially for the xml-filter to the OpenOffice.org file format { const Point aNewAnchorPos = - GetAnchorFrm()->GetFrmAnchorPos( ::HasWrap( GetDrawObj() ) ); + GetAnchorFrame()->GetFrameAnchorPos( ::HasWrap( GetDrawObj() ) ); DrawObj()->SetAnchorPos( aNewAnchorPos ); // --> #i70122# - missing invalidation InvalidateObjRectWithSpaces(); } SetCurrRelPos( aObjPositioning.GetRelPos() ); - const SwFrm* pAnchorFrm = GetAnchorFrm(); - SWRECTFN( pAnchorFrm ); - const Point aAnchPos( (pAnchorFrm->Frm().*fnRect->fnGetPos)() ); + const SwFrame* pAnchorFrame = GetAnchorFrame(); + SWRECTFN( pAnchorFrame ); + const Point aAnchPos( (pAnchorFrame->Frame().*fnRect->fnGetPos)() ); SetObjLeft( aAnchPos.X() + GetCurrRelPos().X() ); SetObjTop( aAnchPos.Y() + GetCurrRelPos().Y() ); } @@ -499,7 +499,7 @@ void SwAnchoredDrawObject::_SetDrawObjAnchor() // new anchor position // --> #i31698# - Point aNewAnchorPos = - GetAnchorFrm()->GetFrmAnchorPos( ::HasWrap( GetDrawObj() ) ); + GetAnchorFrame()->GetFrameAnchorPos( ::HasWrap( GetDrawObj() ) ); Point aCurrAnchorPos = GetDrawObj()->GetAnchorPos(); if ( aNewAnchorPos != aCurrAnchorPos ) { @@ -519,32 +519,32 @@ void SwAnchoredDrawObject::_SetDrawObjAnchor() #i28701# */ -void SwAnchoredDrawObject::_InvalidatePage( SwPageFrm* _pPageFrm ) +void SwAnchoredDrawObject::_InvalidatePage( SwPageFrame* _pPageFrame ) { - if ( _pPageFrm && !_pPageFrm->GetFormat()->GetDoc()->IsInDtor() ) + if ( _pPageFrame && !_pPageFrame->GetFormat()->GetDoc()->IsInDtor() ) { - if ( _pPageFrm->GetUpper() ) + if ( _pPageFrame->GetUpper() ) { // --> #i35007# - correct invalidation for as-character // anchored objects. if ( GetFrameFormat().GetAnchor().GetAnchorId() == FLY_AS_CHAR ) { - _pPageFrm->InvalidateFlyInCnt(); + _pPageFrame->InvalidateFlyInCnt(); } else { - _pPageFrm->InvalidateFlyLayout(); + _pPageFrame->InvalidateFlyLayout(); } - SwRootFrm* pRootFrm = static_cast<SwRootFrm*>(_pPageFrm->GetUpper()); - pRootFrm->DisallowTurbo(); - if ( pRootFrm->GetTurbo() ) + SwRootFrame* pRootFrame = static_cast<SwRootFrame*>(_pPageFrame->GetUpper()); + pRootFrame->DisallowTurbo(); + if ( pRootFrame->GetTurbo() ) { - const SwContentFrm* pTmpFrm = pRootFrm->GetTurbo(); - pRootFrm->ResetTurbo(); - pTmpFrm->InvalidatePage(); + const SwContentFrame* pTmpFrame = pRootFrame->GetTurbo(); + pRootFrame->ResetTurbo(); + pTmpFrame->InvalidatePage(); } - pRootFrm->SetIdleFlags(); + pRootFrame->SetIdleFlags(); } } } @@ -560,43 +560,43 @@ void SwAnchoredDrawObject::InvalidateObjPos() InvalidateObjRectWithSpaces(); // --> #i44339# - check, if anchor frame exists. - if ( GetAnchorFrm() ) + if ( GetAnchorFrame() ) { // --> #118547# - notify anchor frame of as-character // anchored object, because its positioned by the format of its anchor frame. // --> #i44559# - assure, that text hint is already // existing in the text frame - if ( dynamic_cast< const SwTextFrm* >(GetAnchorFrm()) != nullptr && + if ( dynamic_cast< const SwTextFrame* >(GetAnchorFrame()) != nullptr && (GetFrameFormat().GetAnchor().GetAnchorId() == FLY_AS_CHAR) ) { - SwTextFrm* pAnchorTextFrm( static_cast<SwTextFrm*>(AnchorFrm()) ); - if ( pAnchorTextFrm->GetTextNode()->GetpSwpHints() && - pAnchorTextFrm->CalcFlyPos( &GetFrameFormat() ) != COMPLETE_STRING ) + SwTextFrame* pAnchorTextFrame( static_cast<SwTextFrame*>(AnchorFrame()) ); + if ( pAnchorTextFrame->GetTextNode()->GetpSwpHints() && + pAnchorTextFrame->CalcFlyPos( &GetFrameFormat() ) != COMPLETE_STRING ) { - AnchorFrm()->Prepare( PREP_FLY_ATTR_CHG, &GetFrameFormat() ); + AnchorFrame()->Prepare( PREP_FLY_ATTR_CHG, &GetFrameFormat() ); } } - SwPageFrm* pPageFrm = AnchorFrm()->FindPageFrm(); - _InvalidatePage( pPageFrm ); + SwPageFrame* pPageFrame = AnchorFrame()->FindPageFrame(); + _InvalidatePage( pPageFrame ); // --> #i32270# - also invalidate page frame, at which the // drawing object is registered at. - SwPageFrm* pPageFrmRegisteredAt = GetPageFrm(); - if ( pPageFrmRegisteredAt && - pPageFrmRegisteredAt != pPageFrm ) + SwPageFrame* pPageFrameRegisteredAt = GetPageFrame(); + if ( pPageFrameRegisteredAt && + pPageFrameRegisteredAt != pPageFrame ) { - _InvalidatePage( pPageFrmRegisteredAt ); + _InvalidatePage( pPageFrameRegisteredAt ); } - // #i33751#, #i34060# - method <GetPageFrmOfAnchor()> - // is replaced by method <FindPageFrmOfAnchor()>. It's return value + // #i33751#, #i34060# - method <GetPageFrameOfAnchor()> + // is replaced by method <FindPageFrameOfAnchor()>. It's return value // have to be checked. - SwPageFrm* pPageFrmOfAnchor = FindPageFrmOfAnchor(); - if ( pPageFrmOfAnchor && - pPageFrmOfAnchor != pPageFrm && - pPageFrmOfAnchor != pPageFrmRegisteredAt ) + SwPageFrame* pPageFrameOfAnchor = FindPageFrameOfAnchor(); + if ( pPageFrameOfAnchor && + pPageFrameOfAnchor != pPageFrame && + pPageFrameOfAnchor != pPageFrameRegisteredAt ) { - _InvalidatePage( pPageFrmOfAnchor ); + _InvalidatePage( pPageFrameOfAnchor ); } } } @@ -627,7 +627,7 @@ const SwRect SwAnchoredDrawObject::GetObjBoundRect() const { bool bGroupShape = dynamic_cast<const SdrObjGroup*>( GetDrawObj() ); // Resize objects with relative width or height - if ( !bGroupShape && GetPageFrm( ) && ( GetDrawObj( )->GetRelativeWidth( ) || GetDrawObj()->GetRelativeHeight( ) ) ) + if ( !bGroupShape && GetPageFrame( ) && ( GetDrawObj( )->GetRelativeWidth( ) || GetDrawObj()->GetRelativeHeight( ) ) ) { Rectangle aCurrObjRect = GetDrawObj()->GetCurrentBoundRect(); @@ -637,9 +637,9 @@ const SwRect SwAnchoredDrawObject::GetObjBoundRect() const Rectangle aPageRect; if (GetDrawObj()->GetRelativeWidthRelation() == text::RelOrientation::FRAME) // Exclude margins. - aPageRect = GetPageFrm()->Prt().SVRect(); + aPageRect = GetPageFrame()->Prt().SVRect(); else - aPageRect = GetPageFrm( )->GetBoundRect( GetPageFrm()->getRootFrm()->GetCurrShell()->GetOut() ).SVRect(); + aPageRect = GetPageFrame( )->GetBoundRect( GetPageFrame()->getRootFrame()->GetCurrShell()->GetOut() ).SVRect(); nTargetWidth = aPageRect.GetWidth( ) * (*GetDrawObj( )->GetRelativeWidth()); } @@ -649,15 +649,15 @@ const SwRect SwAnchoredDrawObject::GetObjBoundRect() const Rectangle aPageRect; if (GetDrawObj()->GetRelativeHeightRelation() == text::RelOrientation::FRAME) // Exclude margins. - aPageRect = GetPageFrm()->Prt().SVRect(); + aPageRect = GetPageFrame()->Prt().SVRect(); else - aPageRect = GetPageFrm( )->GetBoundRect( GetPageFrm()->getRootFrm()->GetCurrShell()->GetOut() ).SVRect(); + aPageRect = GetPageFrame( )->GetBoundRect( GetPageFrame()->getRootFrame()->GetCurrShell()->GetOut() ).SVRect(); nTargetHeight = aPageRect.GetHeight( ) * (*GetDrawObj( )->GetRelativeHeight()); } if ( nTargetWidth != aCurrObjRect.GetWidth( ) || nTargetHeight != aCurrObjRect.GetHeight( ) ) { - SwDoc* pDoc = const_cast<SwDoc*>(GetPageFrm()->GetFormat()->GetDoc()); + SwDoc* pDoc = const_cast<SwDoc*>(GetPageFrame()->GetFormat()->GetDoc()); bool bModified = pDoc->getIDocumentState().IsModified(); const_cast< SdrObject* >( GetDrawObj() )->Resize( aCurrObjRect.TopLeft(), Fraction( nTargetWidth, aCurrObjRect.GetWidth() ), @@ -689,16 +689,16 @@ bool SwAnchoredDrawObject::_SetObjLeft( const SwTwips _nLeft ) #i33313# - add second optional parameter <_pNewObjRect> */ -void SwAnchoredDrawObject::AdjustPositioningAttr( const SwFrm* _pNewAnchorFrm, +void SwAnchoredDrawObject::AdjustPositioningAttr( const SwFrame* _pNewAnchorFrame, const SwRect* _pNewObjRect ) { SwTwips nHoriRelPos = 0; SwTwips nVertRelPos = 0; - const Point aAnchorPos = _pNewAnchorFrm->GetFrmAnchorPos( ::HasWrap( GetDrawObj() ) ); + const Point aAnchorPos = _pNewAnchorFrame->GetFrameAnchorPos( ::HasWrap( GetDrawObj() ) ); // --> #i33313# const SwRect aObjRect( _pNewObjRect ? *_pNewObjRect : GetObjRect() ); - const bool bVert = _pNewAnchorFrm->IsVertical(); - const bool bR2L = _pNewAnchorFrm->IsRightToLeft(); + const bool bVert = _pNewAnchorFrame->IsVertical(); + const bool bR2L = _pNewAnchorFrame->IsRightToLeft(); if ( bVert ) { nHoriRelPos = aObjRect.Top() - aAnchorPos.Y(); @@ -819,11 +819,11 @@ void SwAnchoredDrawObject::_SetPositioningAttr() static_cast<SwDrawFrameFormat&>(GetFrameFormat()).PosAttrSet(); } -void SwAnchoredDrawObject::NotifyBackground( SwPageFrm* _pPageFrm, +void SwAnchoredDrawObject::NotifyBackground( SwPageFrame* _pPageFrame, const SwRect& _rRect, PrepareHint _eHint ) { - ::Notify_Background( GetDrawObj(), _pPageFrm, _rRect, _eHint, true ); + ::Notify_Background( GetDrawObj(), _pPageFrame, _rRect, _eHint, true ); } /** method to assure that anchored object is registered at the correct @@ -833,16 +833,16 @@ void SwAnchoredDrawObject::NotifyBackground( SwPageFrm* _pPageFrm, */ void SwAnchoredDrawObject::RegisterAtCorrectPage() { - SwPageFrm* pPageFrm( nullptr ); - if ( GetVertPosOrientFrm() ) + SwPageFrame* pPageFrame( nullptr ); + if ( GetVertPosOrientFrame() ) { - pPageFrm = const_cast<SwPageFrm*>(GetVertPosOrientFrm()->FindPageFrm()); + pPageFrame = const_cast<SwPageFrame*>(GetVertPosOrientFrame()->FindPageFrame()); } - if ( pPageFrm && GetPageFrm() != pPageFrm ) + if ( pPageFrame && GetPageFrame() != pPageFrame ) { - if ( GetPageFrm() ) - GetPageFrm()->RemoveDrawObjFromPage( *this ); - pPageFrm->AppendDrawObjToPage( *this ); + if ( GetPageFrame() ) + GetPageFrame()->RemoveDrawObjFromPage( *this ); + pPageFrame->AppendDrawObjToPage( *this ); } } diff --git a/sw/source/core/layout/anchoredobject.cxx b/sw/source/core/layout/anchoredobject.cxx index d054a05d50c2..ff0df5e38a84 100644 --- a/sw/source/core/layout/anchoredobject.cxx +++ b/sw/source/core/layout/anchoredobject.cxx @@ -67,13 +67,13 @@ SwObjPositioningInProgress::~SwObjPositioningInProgress() SwAnchoredObject::SwAnchoredObject() : mpDrawObj( nullptr ), - mpAnchorFrm( nullptr ), + mpAnchorFrame( nullptr ), // --> #i28701# - mpPageFrm( nullptr ), + mpPageFrame( nullptr ), maRelPos(), maLastCharRect(), mnLastTopOfLine( 0L ), - mpVertPosOrientFrm( nullptr ), + mpVertPosOrientFrame( nullptr ), // --> #i28701# mbPositioningInProgress( false ), mbConsiderForTextWrap( false ), @@ -92,18 +92,18 @@ SwAnchoredObject::SwAnchoredObject() : { } -void SwAnchoredObject::ClearVertPosOrientFrm() +void SwAnchoredObject::ClearVertPosOrientFrame() { - if (mpVertPosOrientFrm) + if (mpVertPosOrientFrame) { - const_cast<SwLayoutFrm*>(mpVertPosOrientFrm)->ClearVertPosOrientFrmFor(this); - mpVertPosOrientFrm = nullptr; + const_cast<SwLayoutFrame*>(mpVertPosOrientFrame)->ClearVertPosOrientFrameFor(this); + mpVertPosOrientFrame = nullptr; } } SwAnchoredObject::~SwAnchoredObject() { - ClearVertPosOrientFrm(); + ClearVertPosOrientFrame(); } void SwAnchoredObject::SetDrawObj( SdrObject& _rDrawObj ) @@ -115,11 +115,11 @@ void SwAnchoredObject::SetDrawObj( SdrObject& _rDrawObj ) -void SwAnchoredObject::ChgAnchorFrm( SwFrm* _pNewAnchorFrm ) +void SwAnchoredObject::ChgAnchorFrame( SwFrame* _pNewAnchorFrame ) { - mpAnchorFrm = _pNewAnchorFrm; + mpAnchorFrame = _pNewAnchorFrame; - if ( mpAnchorFrm ) + if ( mpAnchorFrame ) { ObjectAttachedToAnchorFrame(); } @@ -128,51 +128,51 @@ void SwAnchoredObject::ChgAnchorFrm( SwFrm* _pNewAnchorFrm ) /** determine anchor frame containing the anchor position #i26945# - the anchor frame, which is determined, is <mpAnchorFrm> + the anchor frame, which is determined, is <mpAnchorFrame> for an at-page, at-frame or at-paragraph anchored object and the anchor character frame for an at-character and as-character anchored object. */ -SwFrm* SwAnchoredObject::GetAnchorFrmContainingAnchPos() +SwFrame* SwAnchoredObject::GetAnchorFrameContainingAnchPos() { - SwFrm* pAnchorFrmContainingAnchPos = FindAnchorCharFrm(); - if ( !pAnchorFrmContainingAnchPos ) + SwFrame* pAnchorFrameContainingAnchPos = FindAnchorCharFrame(); + if ( !pAnchorFrameContainingAnchPos ) { - pAnchorFrmContainingAnchPos = AnchorFrm(); + pAnchorFrameContainingAnchPos = AnchorFrame(); } - return pAnchorFrmContainingAnchPos; + return pAnchorFrameContainingAnchPos; } -void SwAnchoredObject::SetPageFrm( SwPageFrm* _pNewPageFrm ) +void SwAnchoredObject::SetPageFrame( SwPageFrame* _pNewPageFrame ) { - if ( mpPageFrm != _pNewPageFrm ) + if ( mpPageFrame != _pNewPageFrame ) { // clear member, which denotes the layout frame at which the vertical // position is oriented at, if it doesn't fit to the new page frame. - if ( GetVertPosOrientFrm() && - ( !_pNewPageFrm || - _pNewPageFrm != GetVertPosOrientFrm()->FindPageFrm() ) ) + if ( GetVertPosOrientFrame() && + ( !_pNewPageFrame || + _pNewPageFrame != GetVertPosOrientFrame()->FindPageFrame() ) ) { - ClearVertPosOrientFrm(); + ClearVertPosOrientFrame(); } // assign new page frame - mpPageFrm = _pNewPageFrm; + mpPageFrame = _pNewPageFrame; } } -SwTwips SwAnchoredObject::GetRelCharX( const SwFrm* pFrm ) const +SwTwips SwAnchoredObject::GetRelCharX( const SwFrame* pFrame ) const { - return maLastCharRect.Left() - pFrm->Frm().Left(); + return maLastCharRect.Left() - pFrame->Frame().Left(); } -SwTwips SwAnchoredObject::GetRelCharY( const SwFrm* pFrm ) const +SwTwips SwAnchoredObject::GetRelCharY( const SwFrame* pFrame ) const { - return maLastCharRect.Bottom() - pFrm->Frm().Top(); + return maLastCharRect.Bottom() - pFrame->Frame().Top(); } void SwAnchoredObject::AddLastCharY( long nDiff ) @@ -185,15 +185,15 @@ void SwAnchoredObject::ResetLastCharRectHeight() maLastCharRect.Height( 0 ); } -void SwAnchoredObject::SetVertPosOrientFrm( const SwLayoutFrm& _rVertPosOrientFrm ) +void SwAnchoredObject::SetVertPosOrientFrame( const SwLayoutFrame& _rVertPosOrientFrame ) { - ClearVertPosOrientFrm(); + ClearVertPosOrientFrame(); - mpVertPosOrientFrm = &_rVertPosOrientFrm; - const_cast<SwLayoutFrm*>(mpVertPosOrientFrm)->SetVertPosOrientFrmFor(this); + mpVertPosOrientFrame = &_rVertPosOrientFrame; + const_cast<SwLayoutFrame*>(mpVertPosOrientFrame)->SetVertPosOrientFrameFor(this); // #i28701# - take over functionality of deleted method - // <SwFlyAtCntFrm::AssertPage()>: assure for at-paragraph and at-character + // <SwFlyAtContentFrame::AssertPage()>: assure for at-paragraph and at-character // an anchored object, that it is registered at the correct page frame RegisterAtCorrectPage(); } @@ -218,8 +218,8 @@ void SwAnchoredObject::AddLastTopOfLineY( SwTwips _nDiff ) void SwAnchoredObject::CheckCharRectAndTopOfLine( const bool _bCheckForParaPorInf ) { - if ( GetAnchorFrm() && - GetAnchorFrm()->IsTextFrm() ) + if ( GetAnchorFrame() && + GetAnchorFrame()->IsTextFrame() ) { const SwFormatAnchor& rAnch = GetFrameFormat().GetAnchor(); if ( (rAnch.GetAnchorId() == FLY_AT_CHAR) && @@ -231,12 +231,12 @@ void SwAnchoredObject::CheckCharRectAndTopOfLine( // anchor character rectangle respectively the top of the line. // Thus, a format of this frame is avoided to determine the // paragraph portion information. - // --> #i26945# - use new method <FindAnchorCharFrm()> - const SwTextFrm& aAnchorCharFrm = *(FindAnchorCharFrm()); - if ( !_bCheckForParaPorInf || aAnchorCharFrm.HasPara() ) + // --> #i26945# - use new method <FindAnchorCharFrame()> + const SwTextFrame& aAnchorCharFrame = *(FindAnchorCharFrame()); + if ( !_bCheckForParaPorInf || aAnchorCharFrame.HasPara() ) { - _CheckCharRect( rAnch, aAnchorCharFrm ); - _CheckTopOfLine( rAnch, aAnchorCharFrm ); + _CheckCharRect( rAnch, aAnchorCharFrame ); + _CheckTopOfLine( rAnch, aAnchorCharFrame ); } } } @@ -250,14 +250,14 @@ void SwAnchoredObject::CheckCharRectAndTopOfLine( is updated. This is checked for change and depending on the applied positioning, it's decided, if the Writer fly frame has to be invalidated. - improvement - add second parameter <_rAnchorCharFrm> + improvement - add second parameter <_rAnchorCharFrame> */ void SwAnchoredObject::_CheckCharRect( const SwFormatAnchor& _rAnch, - const SwTextFrm& _rAnchorCharFrm ) + const SwTextFrame& _rAnchorCharFrame ) { // determine rectangle of anchor character. If not exist, abort operation SwRect aCharRect; - if ( !_rAnchorCharFrm.GetAutoPos( aCharRect, *_rAnch.GetContentAnchor() ) ) + if ( !_rAnchorCharFrame.GetAutoPos( aCharRect, *_rAnch.GetContentAnchor() ) ) { return; } @@ -266,7 +266,7 @@ void SwAnchoredObject::_CheckCharRect( const SwFormatAnchor& _rAnch, { // check positioning and alignment for invalidation of position { - SWRECTFN( (&_rAnchorCharFrm) ); + SWRECTFN( (&_rAnchorCharFrame) ); // determine positioning and alignment SwFormatVertOrient aVert( GetFrameFormat().GetVertOrient() ); SwFormatHoriOrient aHori( GetFrameFormat().GetHoriOrient() ); @@ -294,7 +294,7 @@ void SwAnchoredObject::_CheckCharRect( const SwFormatAnchor& _rAnch, // #i26945#, #i35911# - unlock position of // anchored object, if it isn't registered at the page, // where its anchor character frame is on. - if ( GetPageFrm() != _rAnchorCharFrm.FindPageFrm() ) + if ( GetPageFrame() != _rAnchorCharFrame.FindPageFrame() ) { UnlockPosition(); } @@ -314,13 +314,13 @@ void SwAnchoredObject::_CheckCharRect( const SwFormatAnchor& _rAnch, is updated. This is checked for change and depending on the applied positioning, it's decided, if the Writer fly frame has to be invalidated. - improvement - add second parameter <_rAnchorCharFrm> + improvement - add second parameter <_rAnchorCharFrame> */ void SwAnchoredObject::_CheckTopOfLine( const SwFormatAnchor& _rAnch, - const SwTextFrm& _rAnchorCharFrm ) + const SwTextFrame& _rAnchorCharFrame ) { SwTwips nTopOfLine = 0L; - if ( _rAnchorCharFrm.GetTopOfLine( nTopOfLine, *_rAnch.GetContentAnchor() ) ) + if ( _rAnchorCharFrame.GetTopOfLine( nTopOfLine, *_rAnch.GetContentAnchor() ) ) { if ( nTopOfLine != mnLastTopOfLine ) { @@ -330,7 +330,7 @@ void SwAnchoredObject::_CheckTopOfLine( const SwFormatAnchor& _rAnch, // #i26945#, #i35911# - unlock position of // anchored object, if it isn't registered at the page, // where its anchor character frame is on. - if ( GetPageFrm() != _rAnchorCharFrm.FindPageFrm() ) + if ( GetPageFrame() != _rAnchorCharFrame.FindPageFrame() ) { UnlockPosition(); } @@ -370,11 +370,11 @@ void SwAnchoredObject::ObjectAttachedToAnchorFrame() void SwAnchoredObject::UpdateLayoutDir() { SwFrameFormat::tLayoutDir nLayoutDir = SwFrameFormat::HORI_L2R; - const SwFrm* pAnchorFrm = GetAnchorFrm(); - if ( pAnchorFrm ) + const SwFrame* pAnchorFrame = GetAnchorFrame(); + if ( pAnchorFrame ) { - const bool bVert = pAnchorFrm->IsVertical(); - const bool bR2L = pAnchorFrm->IsRightToLeft(); + const bool bVert = pAnchorFrame->IsVertical(); + const bool bR2L = pAnchorFrame->IsRightToLeft(); if ( bVert ) { nLayoutDir = SwFrameFormat::VERT_R2L; @@ -407,7 +407,7 @@ void SwAnchoredObject::InvalidateObjPosForConsiderWrapInfluence( // invalidate 'background', if requested if ( _bNotifyBackgrd ) { - NotifyBackground( GetPageFrm(), GetObjRectWithSpaces(), PREP_FLY_LEAVE ); + NotifyBackground( GetPageFrame(), GetObjRectWithSpaces(), PREP_FLY_LEAVE ); } } } @@ -460,7 +460,7 @@ bool SwAnchoredObject::ConsiderObjWrapInfluenceOfOtherObjs() const { bool bRet( false ); - const SwSortedObjs* pObjs = GetAnchorFrm()->GetDrawObjs(); + const SwSortedObjs* pObjs = GetAnchorFrame()->GetDrawObjs(); if ( pObjs->size() > 1 ) { for ( size_t i = 0; i < pObjs->size(); ++i ) @@ -535,29 +535,29 @@ bool SwAnchoredObject::HasClearedEnvironment() const bool bHasClearedEnvironment( false ); // --> #i43913# - layout frame, vertical position is orient at, has to be set. - OSL_ENSURE( GetVertPosOrientFrm(), + OSL_ENSURE( GetVertPosOrientFrame(), "<SwAnchoredObject::HasClearedEnvironment()> - layout frame missing, at which the vertical position is oriented at." ); - if ( GetVertPosOrientFrm() && - GetAnchorFrm()->IsTextFrm() && - !static_cast<const SwTextFrm*>(GetAnchorFrm())->IsFollow() && - static_cast<const SwTextFrm*>(GetAnchorFrm())->FindPageFrm()->GetPhyPageNum() >= - GetPageFrm()->GetPhyPageNum() ) + if ( GetVertPosOrientFrame() && + GetAnchorFrame()->IsTextFrame() && + !static_cast<const SwTextFrame*>(GetAnchorFrame())->IsFollow() && + static_cast<const SwTextFrame*>(GetAnchorFrame())->FindPageFrame()->GetPhyPageNum() >= + GetPageFrame()->GetPhyPageNum() ) { - const SwFrm* pTmpFrm = GetVertPosOrientFrm()->Lower(); - while ( pTmpFrm && pTmpFrm->IsLayoutFrm() && !pTmpFrm->IsTabFrm() ) + const SwFrame* pTmpFrame = GetVertPosOrientFrame()->Lower(); + while ( pTmpFrame && pTmpFrame->IsLayoutFrame() && !pTmpFrame->IsTabFrame() ) { - pTmpFrm = static_cast<const SwLayoutFrm*>(pTmpFrm)->Lower(); + pTmpFrame = static_cast<const SwLayoutFrame*>(pTmpFrame)->Lower(); } - if ( !pTmpFrm ) + if ( !pTmpFrame ) { bHasClearedEnvironment = true; } - else if ( pTmpFrm->IsTextFrm() && !pTmpFrm->GetNext() ) + else if ( pTmpFrame->IsTextFrame() && !pTmpFrame->GetNext() ) { - const SwTextFrm* pTmpTextFrm = static_cast<const SwTextFrm*>(pTmpFrm); - if ( pTmpTextFrm->IsUndersized() || - ( pTmpTextFrm->GetFollow() && - pTmpTextFrm->GetFollow()->GetOfst() == 0 ) ) + const SwTextFrame* pTmpTextFrame = static_cast<const SwTextFrame*>(pTmpFrame); + if ( pTmpTextFrame->IsUndersized() || + ( pTmpTextFrame->GetFollow() && + pTmpTextFrame->GetFollow()->GetOfst() == 0 ) ) { bHasClearedEnvironment = true; } @@ -629,14 +629,14 @@ void SwAnchoredObject::SetObjLeft( const SwTwips _nLeft) */ void SwAnchoredObject::UpdateObjInSortedList() { - if ( GetAnchorFrm() ) + if ( GetAnchorFrame() ) { if ( GetFrameFormat().getIDocumentSettingAccess().get(DocumentSettingId::CONSIDER_WRAP_ON_OBJECT_POSITION) ) { // invalidate position of all anchored objects at anchor frame - if ( GetAnchorFrm()->GetDrawObjs() ) + if ( GetAnchorFrame()->GetDrawObjs() ) { - const SwSortedObjs* pObjs = GetAnchorFrm()->GetDrawObjs(); + const SwSortedObjs* pObjs = GetAnchorFrame()->GetDrawObjs(); // determine start index for ( size_t i = 0; i < pObjs->size(); ++i ) { @@ -648,9 +648,9 @@ void SwAnchoredObject::UpdateObjInSortedList() } } // invalidate all following anchored objects on the page frame - if ( GetPageFrm() && GetPageFrm()->GetSortedObjs() ) + if ( GetPageFrame() && GetPageFrame()->GetSortedObjs() ) { - const SwSortedObjs* pObjs = GetPageFrm()->GetSortedObjs(); + const SwSortedObjs* pObjs = GetPageFrame()->GetSortedObjs(); // determine start index for ( size_t i = pObjs->ListPosOf( *this ) + 1; i < pObjs->size(); ++i ) { @@ -663,12 +663,12 @@ void SwAnchoredObject::UpdateObjInSortedList() } } // update its position in the sorted object list of its anchor frame - AnchorFrm()->GetDrawObjs()->Update( *this ); + AnchorFrame()->GetDrawObjs()->Update( *this ); // update its position in the sorted object list of its page frame // note: as-character anchored object aren't registered at a page frame if ( GetFrameFormat().GetAnchor().GetAnchorId() != FLY_AS_CHAR ) { - GetPageFrm()->GetSortedObjs()->Update( *this ); + GetPageFrame()->GetSortedObjs()->Update( *this ); } } } @@ -694,18 +694,18 @@ bool SwAnchoredObject::InvalidationOfPosAllowed() const can be found. Thus, the return type changed to be a pointer and can be NULL. */ -SwPageFrm* SwAnchoredObject::FindPageFrmOfAnchor() +SwPageFrame* SwAnchoredObject::FindPageFrameOfAnchor() { - SwPageFrm* pRetPageFrm = nullptr; + SwPageFrame* pRetPageFrame = nullptr; // --> #i44339# - check, if anchor frame exists. - if ( mpAnchorFrm ) + if ( mpAnchorFrame ) { - // --> #i26945# - use new method <GetAnchorFrmContainingAnchPos()> - pRetPageFrm = GetAnchorFrmContainingAnchPos()->FindPageFrm(); + // --> #i26945# - use new method <GetAnchorFrameContainingAnchPos()> + pRetPageFrame = GetAnchorFrameContainingAnchPos()->FindPageFrame(); } - return pRetPageFrm; + return pRetPageFrame; } /** get frame, which contains the anchor character, if the object @@ -713,27 +713,27 @@ SwPageFrm* SwAnchoredObject::FindPageFrmOfAnchor() #i26945# - @return SwTextFrm* + @return SwTextFrame* text frame containing the anchor character. It's NULL, if the object isn't anchored at-character resp. as-character. */ -SwTextFrm* SwAnchoredObject::FindAnchorCharFrm() +SwTextFrame* SwAnchoredObject::FindAnchorCharFrame() { - SwTextFrm* pAnchorCharFrm( nullptr ); + SwTextFrame* pAnchorCharFrame( nullptr ); // --> #i44339# - check, if anchor frame exists. - if ( mpAnchorFrm ) + if ( mpAnchorFrame ) { const SwFormatAnchor& rAnch = GetFrameFormat().GetAnchor(); if ((rAnch.GetAnchorId() == FLY_AT_CHAR) || (rAnch.GetAnchorId() == FLY_AS_CHAR)) { - pAnchorCharFrm = &(static_cast<SwTextFrm*>(AnchorFrm())-> - GetFrmAtOfst( rAnch.GetContentAnchor()->nContent.GetIndex() )); + pAnchorCharFrame = &(static_cast<SwTextFrame*>(AnchorFrame())-> + GetFrameAtOfst( rAnch.GetContentAnchor()->nContent.GetIndex() )); } } - return pAnchorCharFrm; + return pAnchorCharFrame; } /** method to determine, if a format on the anchored object is possible @@ -762,7 +762,7 @@ void SwAnchoredObject::SetTmpConsiderWrapInfluence( const bool _bTmpConsiderWrap void SwAnchoredObject::SetTmpConsiderWrapInfluenceOfOtherObjs( const bool bTmpConsiderWrapInfluence ) { - const SwSortedObjs* pObjs = GetAnchorFrm()->GetDrawObjs(); + const SwSortedObjs* pObjs = GetAnchorFrame()->GetDrawObjs(); if ( pObjs->size() > 1 ) { for ( size_t i = 0; i < pObjs->size(); ++i ) @@ -789,17 +789,17 @@ bool SwAnchoredObject::OverlapsPrevColumn() const { bool bOverlapsPrevColumn( false ); - if ( mpAnchorFrm && mpAnchorFrm->IsTextFrm() ) + if ( mpAnchorFrame && mpAnchorFrame->IsTextFrame() ) { - const SwFrm* pColFrm = mpAnchorFrm->FindColFrm(); - if ( pColFrm && pColFrm->GetPrev() ) + const SwFrame* pColFrame = mpAnchorFrame->FindColFrame(); + if ( pColFrame && pColFrame->GetPrev() ) { - const SwFrm* pTmpColFrm = pColFrm->GetPrev(); + const SwFrame* pTmpColFrame = pColFrame->GetPrev(); SwRect aChkRect; - while ( pTmpColFrm ) + while ( pTmpColFrame ) { - aChkRect.Union( pTmpColFrm->Frm() ); - pTmpColFrm = pTmpColFrm->GetPrev(); + aChkRect.Union( pTmpColFrame->Frame() ); + pTmpColFrame = pTmpColFrame->GetPrev(); } bOverlapsPrevColumn = GetObjRect().IsOver( aChkRect ); } @@ -814,14 +814,14 @@ bool SwAnchoredObject::OverlapsPrevColumn() const #i30669# Usage: Needed layout information for WW8 export */ -Point SwAnchoredObject::GetRelPosToAnchorFrm() const +Point SwAnchoredObject::GetRelPosToAnchorFrame() const { Point aRelPos; - OSL_ENSURE( GetAnchorFrm(), - "<SwAnchoredObject::GetRelPosToAnchorFrm()> - missing anchor frame." ); + OSL_ENSURE( GetAnchorFrame(), + "<SwAnchoredObject::GetRelPosToAnchorFrame()> - missing anchor frame." ); aRelPos = GetObjRect().Pos(); - aRelPos -= GetAnchorFrm()->Frm().Pos(); + aRelPos -= GetAnchorFrame()->Frame().Pos(); return aRelPos; } @@ -837,41 +837,41 @@ Point SwAnchoredObject::GetRelPosToAnchorFrm() const the position relative to the table cell is determined. Output parameter <_obRelToTableCell> reflects this situation */ -Point SwAnchoredObject::GetRelPosToPageFrm( const bool _bFollowTextFlow, +Point SwAnchoredObject::GetRelPosToPageFrame( const bool _bFollowTextFlow, bool& _obRelToTableCell ) const { Point aRelPos; _obRelToTableCell = false; - OSL_ENSURE( GetAnchorFrm(), - "<SwAnchoredObject::GetRelPosToPageFrm()> - missing anchor frame." ); - OSL_ENSURE( GetAnchorFrm()->FindPageFrm(), - "<SwAnchoredObject::GetRelPosToPageFrm()> - missing page frame." ); + OSL_ENSURE( GetAnchorFrame(), + "<SwAnchoredObject::GetRelPosToPageFrame()> - missing anchor frame." ); + OSL_ENSURE( GetAnchorFrame()->FindPageFrame(), + "<SwAnchoredObject::GetRelPosToPageFrame()> - missing page frame." ); aRelPos = GetObjRect().Pos(); // --> #i33818# - search for cell frame, if object has to // follow the text flow. - const SwFrm* pFrm( nullptr ); - if ( _bFollowTextFlow && !GetAnchorFrm()->IsPageFrm() ) + const SwFrame* pFrame( nullptr ); + if ( _bFollowTextFlow && !GetAnchorFrame()->IsPageFrame() ) { - pFrm = GetAnchorFrm()->GetUpper(); - while ( !pFrm->IsCellFrm() && !pFrm->IsPageFrm() ) + pFrame = GetAnchorFrame()->GetUpper(); + while ( !pFrame->IsCellFrame() && !pFrame->IsPageFrame() ) { - pFrm = pFrm->GetUpper(); + pFrame = pFrame->GetUpper(); } } else { - pFrm = GetAnchorFrm()->FindPageFrm(); + pFrame = GetAnchorFrame()->FindPageFrame(); } - if ( pFrm->IsCellFrm() ) + if ( pFrame->IsCellFrame() ) { - aRelPos -= ( pFrm->Frm().Pos() + pFrm->Prt().Pos() ); + aRelPos -= ( pFrame->Frame().Pos() + pFrame->Prt().Pos() ); _obRelToTableCell = true; } else { - aRelPos -= pFrm->Frm().Pos(); + aRelPos -= pFrame->Frame().Pos(); } return aRelPos; diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index c8d4ca656fc8..9e0b50c15fb4 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -117,14 +117,14 @@ void DelHFFormat( SwClient *pToRemove, SwFrameFormat *pFormat ) // It's suboptimal if the format is deleted beforehand. SwIterator<SwClient,SwFrameFormat> aIter(*pFormat); for(SwClient* pLast = aIter.First(); bDel && pLast; pLast = aIter.Next()) - if(dynamic_cast<const SwFrm*>( pLast ) == nullptr || !SwXHeadFootText::IsXHeadFootText(pLast)) + if(dynamic_cast<const SwFrame*>( pLast ) == nullptr || !SwXHeadFootText::IsXHeadFootText(pLast)) bDel = false; } if ( bDel ) { - // If there is a Crsr registered in one of the nodes, we need to call the - // ParkCrsr in an (arbitrary) shell. + // If there is a Cursor registered in one of the nodes, we need to call the + // ParkCursor in an (arbitrary) shell. SwFormatContent& rCnt = (SwFormatContent&)pFormat->GetContent(); if ( rCnt.GetContentIdx() ) { @@ -135,8 +135,8 @@ void DelHFFormat( SwClient *pToRemove, SwFrameFormat *pFormat ) // complete content is checked for cursors and the complete content // is deleted on below made method call <pDoc->getIDocumentContentOperations().DeleteSection(pNode)> SwNodeIndex aIdx( *rCnt.GetContentIdx(), 0 ); - // If there is a Crsr registered in one of the nodes, we need to call the - // ParkCrsr in an (arbitrary) shell. + // If there is a Cursor registered in one of the nodes, we need to call the + // ParkCursor in an (arbitrary) shell. pNode = & aIdx.GetNode(); sal_uInt32 nEnd = pNode->EndOfSectionIndex(); while ( aIdx < nEnd ) @@ -144,10 +144,10 @@ void DelHFFormat( SwClient *pToRemove, SwFrameFormat *pFormat ) if ( pNode->IsContentNode() && static_cast<SwContentNode*>(pNode)->HasWriterListeners() ) { - SwCrsrShell *pShell = SwIterator<SwCrsrShell,SwContentNode>( *static_cast<SwContentNode*>(pNode) ).First(); + SwCursorShell *pShell = SwIterator<SwCursorShell,SwContentNode>( *static_cast<SwContentNode*>(pNode) ).First(); if( pShell ) { - pShell->ParkCrsr( aIdx ); + pShell->ParkCursor( aIdx ); aIdx = nEnd-1; } } @@ -169,20 +169,20 @@ void DelHFFormat( SwClient *pToRemove, SwFrameFormat *pFormat ) } // Partially implemented inline in hxx -SwFormatFrmSize::SwFormatFrmSize( SwFrmSize eSize, SwTwips nWidth, SwTwips nHeight ) +SwFormatFrameSize::SwFormatFrameSize( SwFrameSize eSize, SwTwips nWidth, SwTwips nHeight ) : SfxPoolItem( RES_FRM_SIZE ), m_aSize( nWidth, nHeight ), - m_eFrmHeightType( eSize ), - m_eFrmWidthType( ATT_FIX_SIZE ) + m_eFrameHeightType( eSize ), + m_eFrameWidthType( ATT_FIX_SIZE ) { m_nWidthPercent = m_eWidthPercentRelation = m_nHeightPercent = m_eHeightPercentRelation = 0; } -SwFormatFrmSize& SwFormatFrmSize::operator=( const SwFormatFrmSize& rCpy ) +SwFormatFrameSize& SwFormatFrameSize::operator=( const SwFormatFrameSize& rCpy ) { m_aSize = rCpy.GetSize(); - m_eFrmHeightType = rCpy.GetHeightSizeType(); - m_eFrmWidthType = rCpy.GetWidthSizeType(); + m_eFrameHeightType = rCpy.GetHeightSizeType(); + m_eFrameWidthType = rCpy.GetWidthSizeType(); m_nHeightPercent = rCpy.GetHeightPercent(); m_eHeightPercentRelation = rCpy.GetHeightPercentRelation(); m_nWidthPercent = rCpy.GetWidthPercent(); @@ -190,24 +190,24 @@ SwFormatFrmSize& SwFormatFrmSize::operator=( const SwFormatFrmSize& rCpy ) return *this; } -bool SwFormatFrmSize::operator==( const SfxPoolItem& rAttr ) const +bool SwFormatFrameSize::operator==( const SfxPoolItem& rAttr ) const { assert(SfxPoolItem::operator==(rAttr)); - return( m_eFrmHeightType == static_cast<const SwFormatFrmSize&>(rAttr).m_eFrmHeightType && - m_eFrmWidthType == static_cast<const SwFormatFrmSize&>(rAttr).m_eFrmWidthType && - m_aSize == static_cast<const SwFormatFrmSize&>(rAttr).GetSize()&& - m_nWidthPercent == static_cast<const SwFormatFrmSize&>(rAttr).GetWidthPercent() && - m_eWidthPercentRelation == static_cast<const SwFormatFrmSize&>(rAttr).GetWidthPercentRelation() && - m_nHeightPercent == static_cast<const SwFormatFrmSize&>(rAttr).GetHeightPercent() && - m_eHeightPercentRelation == static_cast<const SwFormatFrmSize&>(rAttr).GetHeightPercentRelation() ); + return( m_eFrameHeightType == static_cast<const SwFormatFrameSize&>(rAttr).m_eFrameHeightType && + m_eFrameWidthType == static_cast<const SwFormatFrameSize&>(rAttr).m_eFrameWidthType && + m_aSize == static_cast<const SwFormatFrameSize&>(rAttr).GetSize()&& + m_nWidthPercent == static_cast<const SwFormatFrameSize&>(rAttr).GetWidthPercent() && + m_eWidthPercentRelation == static_cast<const SwFormatFrameSize&>(rAttr).GetWidthPercentRelation() && + m_nHeightPercent == static_cast<const SwFormatFrameSize&>(rAttr).GetHeightPercent() && + m_eHeightPercentRelation == static_cast<const SwFormatFrameSize&>(rAttr).GetHeightPercentRelation() ); } -SfxPoolItem* SwFormatFrmSize::Clone( SfxItemPool* ) const +SfxPoolItem* SwFormatFrameSize::Clone( SfxItemPool* ) const { - return new SwFormatFrmSize( *this ); + return new SwFormatFrameSize( *this ); } -bool SwFormatFrmSize::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const +bool SwFormatFrameSize::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { // here we convert always! nMemberId &= ~CONVERT_TWIPS; @@ -222,22 +222,22 @@ bool SwFormatFrmSize::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const } break; case MID_FRMSIZE_REL_HEIGHT: - rVal <<= (sal_Int16)(GetHeightPercent() != SwFormatFrmSize::SYNCED ? GetHeightPercent() : 0); + rVal <<= (sal_Int16)(GetHeightPercent() != SwFormatFrameSize::SYNCED ? GetHeightPercent() : 0); break; case MID_FRMSIZE_REL_HEIGHT_RELATION: rVal <<= GetHeightPercentRelation(); break; case MID_FRMSIZE_REL_WIDTH: - rVal <<= (sal_Int16)(GetWidthPercent() != SwFormatFrmSize::SYNCED ? GetWidthPercent() : 0); + rVal <<= (sal_Int16)(GetWidthPercent() != SwFormatFrameSize::SYNCED ? GetWidthPercent() : 0); break; case MID_FRMSIZE_REL_WIDTH_RELATION: rVal <<= GetWidthPercentRelation(); break; case MID_FRMSIZE_IS_SYNC_HEIGHT_TO_WIDTH: - rVal <<= SwFormatFrmSize::SYNCED == GetHeightPercent(); + rVal <<= SwFormatFrameSize::SYNCED == GetHeightPercent(); break; case MID_FRMSIZE_IS_SYNC_WIDTH_TO_HEIGHT: - rVal <<= SwFormatFrmSize::SYNCED == GetWidthPercent(); + rVal <<= SwFormatFrameSize::SYNCED == GetWidthPercent(); break; case MID_FRMSIZE_WIDTH : rVal <<= (sal_Int32)convertTwipToMm100(m_aSize.Width()); @@ -262,7 +262,7 @@ bool SwFormatFrmSize::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const return true; } -bool SwFormatFrmSize::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) +bool SwFormatFrameSize::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { bool bConvert = 0 != (nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -293,7 +293,7 @@ bool SwFormatFrmSize::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { sal_Int16 nSet = 0; rVal >>= nSet; - if(nSet >= 0 && nSet < SwFormatFrmSize::SYNCED) + if(nSet >= 0 && nSet < SwFormatFrameSize::SYNCED) SetHeightPercent((sal_uInt8)nSet); else bRet = false; @@ -310,7 +310,7 @@ bool SwFormatFrmSize::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { sal_Int16 nSet = 0; rVal >>= nSet; - if(nSet >= 0 && nSet < SwFormatFrmSize::SYNCED) + if(nSet >= 0 && nSet < SwFormatFrameSize::SYNCED) SetWidthPercent((sal_uInt8)nSet); else bRet = false; @@ -327,8 +327,8 @@ bool SwFormatFrmSize::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { bool bSet = *static_cast<sal_Bool const *>(rVal.getValue()); if(bSet) - SetHeightPercent(SwFormatFrmSize::SYNCED); - else if( SwFormatFrmSize::SYNCED == GetHeightPercent() ) + SetHeightPercent(SwFormatFrameSize::SYNCED); + else if( SwFormatFrameSize::SYNCED == GetHeightPercent() ) SetHeightPercent( 0 ); } break; @@ -336,8 +336,8 @@ bool SwFormatFrmSize::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { bool bSet = *static_cast<sal_Bool const *>(rVal.getValue()); if(bSet) - SetWidthPercent(SwFormatFrmSize::SYNCED); - else if( SwFormatFrmSize::SYNCED == GetWidthPercent() ) + SetWidthPercent(SwFormatFrameSize::SYNCED); + else if( SwFormatFrameSize::SYNCED == GetWidthPercent() ) SetWidthPercent(0); } break; @@ -376,7 +376,7 @@ bool SwFormatFrmSize::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) sal_Int16 nType = 0; if((rVal >>= nType) && nType >= 0 && nType <= ATT_MIN_SIZE ) { - SetHeightSizeType((SwFrmSize)nType); + SetHeightSizeType((SwFrameSize)nType); } else bRet = false; @@ -393,7 +393,7 @@ bool SwFormatFrmSize::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) sal_Int16 nType = 0; if((rVal >>= nType) && nType >= 0 && nType <= ATT_MIN_SIZE ) { - SetWidthSizeType((SwFrmSize)nType); + SetWidthSizeType((SwFrameSize)nType); } else bRet = false; @@ -405,17 +405,17 @@ bool SwFormatFrmSize::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) return bRet; } -void SwFormatFrmSize::dumpAsXml(xmlTextWriterPtr pWriter) const +void SwFormatFrameSize::dumpAsXml(xmlTextWriterPtr pWriter) const { - xmlTextWriterStartElement(pWriter, BAD_CAST("swFormatFrmSize")); + xmlTextWriterStartElement(pWriter, BAD_CAST("swFormatFrameSize")); xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr())); std::stringstream aSize; aSize << m_aSize; xmlTextWriterWriteAttribute(pWriter, BAD_CAST("size"), BAD_CAST(aSize.str().c_str())); - xmlTextWriterWriteAttribute(pWriter, BAD_CAST("eFrmHeightType"), BAD_CAST(OString::number(m_eFrmHeightType).getStr())); - xmlTextWriterWriteAttribute(pWriter, BAD_CAST("eFrmWidthType"), BAD_CAST(OString::number(m_eFrmWidthType).getStr())); + xmlTextWriterWriteAttribute(pWriter, BAD_CAST("eFrameHeightType"), BAD_CAST(OString::number(m_eFrameHeightType).getStr())); + xmlTextWriterWriteAttribute(pWriter, BAD_CAST("eFrameWidthType"), BAD_CAST(OString::number(m_eFrameWidthType).getStr())); xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nWidthPercent"), BAD_CAST(OString::number(m_nWidthPercent).getStr())); xmlTextWriterWriteAttribute(pWriter, BAD_CAST("eWidthPercentRelation"), BAD_CAST(OString::number(m_eWidthPercentRelation).getStr())); xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nHeightPercent"), BAD_CAST(OString::number(m_nHeightPercent).getStr())); @@ -2500,10 +2500,10 @@ IMPL_FIXEDMEMPOOL_NEWDEL_DLL( SwFrameFormat ) SwFrameFormat::SwFrameFormat( SwAttrPool& rPool, const sal_Char* pFormatNm, - SwFrameFormat *pDrvdFrm, + SwFrameFormat *pDrvdFrame, sal_uInt16 nFormatWhich, const sal_uInt16* pWhichRange) -: SwFormat(rPool, pFormatNm, (pWhichRange ? pWhichRange : aFrameFormatSetRange), pDrvdFrm, nFormatWhich), +: SwFormat(rPool, pFormatNm, (pWhichRange ? pWhichRange : aFrameFormatSetRange), pDrvdFrame, nFormatWhich), m_wXObject(), maFillAttributes() { @@ -2512,10 +2512,10 @@ SwFrameFormat::SwFrameFormat( SwFrameFormat::SwFrameFormat( SwAttrPool& rPool, const OUString &rFormatNm, - SwFrameFormat *pDrvdFrm, + SwFrameFormat *pDrvdFrame, sal_uInt16 nFormatWhich, const sal_uInt16* pWhichRange) -: SwFormat(rPool, rFormatNm, (pWhichRange ? pWhichRange : aFrameFormatSetRange), pDrvdFrm, nFormatWhich), +: SwFormat(rPool, rFormatNm, (pWhichRange ? pWhichRange : aFrameFormatSetRange), pDrvdFrame, nFormatWhich), m_wXObject(), maFillAttributes() { @@ -2636,28 +2636,28 @@ void SwFrameFormat::RegisterToFormat( SwFormat& rFormat ) rFormat.Add( this ); } -/// Delete all Frms that are registered in aDepend. -void SwFrameFormat::DelFrms() +/// Delete all Frames that are registered in aDepend. +void SwFrameFormat::DelFrames() { - SwIterator<SwFrm,SwFormat> aIter( *this ); - SwFrm * pLast = aIter.First(); + SwIterator<SwFrame,SwFormat> aIter( *this ); + SwFrame * pLast = aIter.First(); if( pLast ) do { pLast->Cut(); - SwFrm::DestroyFrm(pLast); + SwFrame::DestroyFrame(pLast); } while( nullptr != ( pLast = aIter.Next() )); } -void SwFrameFormat::MakeFrms() +void SwFrameFormat::MakeFrames() { OSL_ENSURE( false, "Sorry not implemented." ); } SwRect SwFrameFormat::FindLayoutRect( const bool bPrtArea, const Point* pPoint, - const bool bCalcFrm ) const + const bool bCalcFrame ) const { SwRect aRet; - SwFrm *pFrm = nullptr; + SwFrame *pFrame = nullptr; if( dynamic_cast<const SwSectionFormat*>( this ) != nullptr ) { // get the Frame using Node2Layout @@ -2665,9 +2665,9 @@ SwRect SwFrameFormat::FindLayoutRect( const bool bPrtArea, const Point* pPoint, if( pSectNd ) { SwNode2Layout aTmp( *pSectNd, pSectNd->GetIndex() - 1 ); - pFrm = aTmp.NextFrm(); + pFrame = aTmp.NextFrame(); - if( pFrm && !pFrm->KnowsFormat(*this) ) + if( pFrame && !pFrame->KnowsFormat(*this) ) { // the Section doesn't have his own Frame, so if someone // needs the real size, we have to implement this by requesting @@ -2675,29 +2675,29 @@ SwRect SwFrameFormat::FindLayoutRect( const bool bPrtArea, const Point* pPoint, // PROBLEM: what happens if SectionFrames overlaps multiple // pages? if( bPrtArea ) - aRet = pFrm->Prt(); + aRet = pFrame->Prt(); else { - aRet = pFrm->Frm(); + aRet = pFrame->Frame(); --aRet.Pos().Y(); } - pFrm = nullptr; // the rect is finished by now + pFrame = nullptr; // the rect is finished by now } } } else { - const sal_uInt16 nFrmType = RES_FLYFRMFMT == Which() ? FRM_FLY : USHRT_MAX; - pFrm = ::GetFrmOfModify( nullptr, *const_cast<SwModify*>(static_cast<SwModify const *>(this)), nFrmType, pPoint, - nullptr, bCalcFrm ); + const sal_uInt16 nFrameType = RES_FLYFRMFMT == Which() ? FRM_FLY : USHRT_MAX; + pFrame = ::GetFrameOfModify( nullptr, *const_cast<SwModify*>(static_cast<SwModify const *>(this)), nFrameType, pPoint, + nullptr, bCalcFrame ); } - if( pFrm ) + if( pFrame ) { if( bPrtArea ) - aRet = pFrm->Prt(); + aRet = pFrame->Prt(); else - aRet = pFrm->Frm(); + aRet = pFrame->Frame(); } return aRet; } @@ -2720,7 +2720,7 @@ SdrObject* SwFrameFormat::FindRealSdrObject() if( RES_FLYFRMFMT == Which() ) { Point aNullPt; - SwFlyFrm* pFly = static_cast<SwFlyFrm*>(::GetFrmOfModify( nullptr, *this, FRM_FLY, + SwFlyFrame* pFly = static_cast<SwFlyFrame*>(::GetFrameOfModify( nullptr, *this, FRM_FLY, &aNullPt )); return pFly ? pFly->GetVirtDrawObj() : nullptr; } @@ -2731,10 +2731,10 @@ bool SwFrameFormat::IsLowerOf( const SwFrameFormat& rFormat ) const { //Also linking from inside to outside or from outside to inside is not //allowed. - SwFlyFrm *pSFly = SwIterator<SwFlyFrm,SwFormat>(*this).First(); + SwFlyFrame *pSFly = SwIterator<SwFlyFrame,SwFormat>(*this).First(); if( pSFly ) { - SwFlyFrm *pAskFly = SwIterator<SwFlyFrm,SwFormat>(rFormat).First(); + SwFlyFrame *pAskFly = SwIterator<SwFlyFrame,SwFormat>(rFormat).First(); if( pAskFly ) return pSFly->IsLowerOf( pAskFly ); } @@ -2847,12 +2847,12 @@ IMPL_FIXEDMEMPOOL_NEWDEL( SwFlyFrameFormat ) SwFlyFrameFormat::~SwFlyFrameFormat() { - SwIterator<SwFlyFrm,SwFormat> aIter( *this ); - SwFlyFrm * pLast = aIter.First(); + SwIterator<SwFlyFrame,SwFormat> aIter( *this ); + SwFlyFrame * pLast = aIter.First(); if( pLast ) do { - SwFrm::DestroyFrm(pLast); + SwFrame::DestroyFrame(pLast); } while( nullptr != ( pLast = aIter.Next() )); SwIterator<SwFlyDrawContact,SwFormat> a2ndIter( *this ); @@ -2864,9 +2864,9 @@ SwFlyFrameFormat::~SwFlyFrameFormat() } while( nullptr != ( pC = a2ndIter.Next() )); } -/// Creates the Frms if the format describes a paragraph-bound frame. -/// MA: 1994-02-14: creates the Frms also for frames anchored at page. -void SwFlyFrameFormat::MakeFrms() +/// Creates the Frames if the format describes a paragraph-bound frame. +/// MA: 1994-02-14: creates the Frames also for frames anchored at page. +void SwFlyFrameFormat::MakeFrames() { // is there a layout? if( !GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell() ) @@ -2903,7 +2903,7 @@ void SwFlyFrameFormat::MakeFrms() } if ( pCNd ) { - if( SwIterator<SwFrm,SwContentNode>( *pCNd ).First() ) + if( SwIterator<SwFrame,SwContentNode>( *pCNd ).First() ) { pModify = pCNd; } @@ -2930,14 +2930,14 @@ void SwFlyFrameFormat::MakeFrms() case FLY_AT_PAGE: { sal_uInt16 nPgNum = aAnchorAttr.GetPageNum(); - SwPageFrm *pPage = static_cast<SwPageFrm*>(GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout()->Lower()); + SwPageFrame *pPage = static_cast<SwPageFrame*>(GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout()->Lower()); if( nPgNum == 0 && aAnchorAttr.GetContentAnchor() ) { SwContentNode *pCNd = aAnchorAttr.GetContentAnchor()->nNode.GetNode().GetContentNode(); - SwIterator<SwFrm,SwContentNode> aIter( *pCNd ); - for ( SwFrm* pFrm = aIter.First(); pFrm != nullptr; pFrm = aIter.Next() ) + SwIterator<SwFrame,SwContentNode> aIter( *pCNd ); + for ( SwFrame* pFrame = aIter.First(); pFrame != nullptr; pFrame = aIter.Next() ) { - pPage = pFrm->FindPageFrm(); + pPage = pFrame->FindPageFrame(); if( pPage ) { nPgNum = pPage->GetPhyPageNum(); @@ -2956,7 +2956,7 @@ void SwFlyFrameFormat::MakeFrms() pPage->PlaceFly( nullptr, this ); break; } - pPage = static_cast<SwPageFrm*>(pPage->GetNext()); + pPage = static_cast<SwPageFrame*>(pPage->GetNext()); } } break; @@ -2966,38 +2966,38 @@ void SwFlyFrameFormat::MakeFrms() if( pModify ) { - SwIterator<SwFrm,SwModify> aIter( *pModify ); - for( SwFrm *pFrm = aIter.First(); pFrm; pFrm = aIter.Next() ) + SwIterator<SwFrame,SwModify> aIter( *pModify ); + for( SwFrame *pFrame = aIter.First(); pFrame; pFrame = aIter.Next() ) { - bool bAdd = !pFrm->IsContentFrm() || - !static_cast<SwContentFrm*>(pFrm)->IsFollow(); + bool bAdd = !pFrame->IsContentFrame() || + !static_cast<SwContentFrame*>(pFrame)->IsFollow(); - if ( FLY_AT_FLY == aAnchorAttr.GetAnchorId() && !pFrm->IsFlyFrm() ) + if ( FLY_AT_FLY == aAnchorAttr.GetAnchorId() && !pFrame->IsFlyFrame() ) { - SwFrm* pFlyFrm = pFrm->FindFlyFrm(); - if ( pFlyFrm ) + SwFrame* pFlyFrame = pFrame->FindFlyFrame(); + if ( pFlyFrame ) { - pFrm = pFlyFrm; + pFrame = pFlyFrame; } else { aAnchorAttr.SetType( FLY_AT_PARA ); SetFormatAttr( aAnchorAttr ); - MakeFrms(); + MakeFrames(); return; } } - if( pFrm->GetDrawObjs() ) + if( pFrame->GetDrawObjs() ) { // #i28701# - new type <SwSortedObjs> - SwSortedObjs &rObjs = *pFrm->GetDrawObjs(); + SwSortedObjs &rObjs = *pFrame->GetDrawObjs(); for( size_t i = 0; i < rObjs.size(); ++i) { // #i28701# - consider changed type of // <SwSortedObjs> entries. SwAnchoredObject* pObj = rObjs[i]; - if( dynamic_cast<const SwFlyFrm*>( pObj) != nullptr && + if( dynamic_cast<const SwFlyFrame*>( pObj) != nullptr && (&pObj->GetFrameFormat()) == this ) { bAdd = false; @@ -3008,29 +3008,29 @@ void SwFlyFrameFormat::MakeFrms() if( bAdd ) { - SwFlyFrm *pFly; + SwFlyFrame *pFly; switch( aAnchorAttr.GetAnchorId() ) { case FLY_AT_FLY: - pFly = new SwFlyLayFrm( this, pFrm, pFrm ); + pFly = new SwFlyLayFrame( this, pFrame, pFrame ); break; case FLY_AT_PARA: case FLY_AT_CHAR: - pFly = new SwFlyAtCntFrm( this, pFrm, pFrm ); + pFly = new SwFlyAtContentFrame( this, pFrame, pFrame ); break; default: assert(false && "Neuer Ankertyp" ); //fall-through case FLY_AS_CHAR: - pFly = new SwFlyInCntFrm( this, pFrm, pFrm ); + pFly = new SwFlyInContentFrame( this, pFrame, pFrame ); break; } - pFrm->AppendFly( pFly ); + pFrame->AppendFly( pFly ); pFly->GetFormat()->SetObjTitle(GetObjTitle()); pFly->GetFormat()->SetObjDescription(GetObjDescription()); - SwPageFrm *pPage = pFly->FindPageFrm(); + SwPageFrame *pPage = pFly->FindPageFrame(); if( pPage ) ::RegistFlys( pPage, pFly ); } @@ -3038,18 +3038,18 @@ void SwFlyFrameFormat::MakeFrms() } } -SwFlyFrm* SwFlyFrameFormat::GetFrm( const Point* pPoint, const bool bCalcFrm ) const +SwFlyFrame* SwFlyFrameFormat::GetFrame( const Point* pPoint, const bool bCalcFrame ) const { - return static_cast<SwFlyFrm*>(::GetFrmOfModify( nullptr, *const_cast<SwModify*>(static_cast<SwModify const *>(this)), FRM_FLY, - pPoint, nullptr, bCalcFrm )); + return static_cast<SwFlyFrame*>(::GetFrameOfModify( nullptr, *const_cast<SwModify*>(static_cast<SwModify const *>(this)), FRM_FLY, + pPoint, nullptr, bCalcFrame )); } -SwAnchoredObject* SwFlyFrameFormat::GetAnchoredObj( const Point* pPoint, const bool bCalcFrm ) const +SwAnchoredObject* SwFlyFrameFormat::GetAnchoredObj( const Point* pPoint, const bool bCalcFrame ) const { - SwFlyFrm* pFlyFrm( GetFrm( pPoint, bCalcFrm ) ); - if ( pFlyFrm ) + SwFlyFrame* pFlyFrame( GetFrame( pPoint, bCalcFrame ) ); + if ( pFlyFrame ) { - return dynamic_cast<SwAnchoredObject*>(pFlyFrm); + return dynamic_cast<SwAnchoredObject*>(pFlyFrame); } else { @@ -3064,7 +3064,7 @@ bool SwFlyFrameFormat::GetInfo( SfxPoolItem& rInfo ) const { case RES_CONTENT_VISIBLE: { - static_cast<SwPtrMsgPoolItem&>(rInfo).pObject = SwIterator<SwFrm,SwFormat>( *this ).First(); + static_cast<SwPtrMsgPoolItem&>(rInfo).pObject = SwIterator<SwFrame,SwFormat>( *this ).First(); } bRet = false; break; @@ -3199,7 +3199,7 @@ bool SwFlyFrameFormat::IsBackgroundTransparent() const background is "inherited" from its parent/grandparent. This is the case, if no background graphic is set and the background color is "no fill"/"auto fill" - NOTE: condition is "copied" from method <SwFrm::GetBackgroundBrush(..). + NOTE: condition is "copied" from method <SwFrame::GetBackgroundBrush(..). @return true, if background brush is "inherited" from parent/grandparent */ @@ -3225,7 +3225,7 @@ bool SwFlyFrameFormat::IsBackgroundBrushInherited() const SwHandleAnchorNodeChg::SwHandleAnchorNodeChg( SwFlyFrameFormat& _rFlyFrameFormat, const SwFormatAnchor& _rNewAnchorFormat, - SwFlyFrm* _pKeepThisFlyFrm ) + SwFlyFrame* _pKeepThisFlyFrame ) : mrFlyFrameFormat( _rFlyFrameFormat ), mbAnchorNodeChanged( false ) { @@ -3243,33 +3243,33 @@ SwHandleAnchorNodeChg::SwHandleAnchorNodeChg( SwFlyFrameFormat& _rFlyFrameFormat _rNewAnchorFormat.GetContentAnchor()->nNode ) { // determine 'old' number of anchor frames - sal_uInt32 nOldNumOfAnchFrm( 0L ); - SwIterator<SwFrm,SwContentNode> aOldIter( *(aOldAnchorFormat.GetContentAnchor()->nNode.GetNode().GetContentNode()) ); - for( SwFrm* pOld = aOldIter.First(); pOld; pOld = aOldIter.Next() ) + sal_uInt32 nOldNumOfAnchFrame( 0L ); + SwIterator<SwFrame,SwContentNode> aOldIter( *(aOldAnchorFormat.GetContentAnchor()->nNode.GetNode().GetContentNode()) ); + for( SwFrame* pOld = aOldIter.First(); pOld; pOld = aOldIter.Next() ) { - ++nOldNumOfAnchFrm; + ++nOldNumOfAnchFrame; } // determine 'new' number of anchor frames - sal_uInt32 nNewNumOfAnchFrm( 0L ); - SwIterator<SwFrm,SwContentNode> aNewIter( *(_rNewAnchorFormat.GetContentAnchor()->nNode.GetNode().GetContentNode()) ); - for( SwFrm* pNew = aNewIter.First(); pNew; pNew = aNewIter.Next() ) + sal_uInt32 nNewNumOfAnchFrame( 0L ); + SwIterator<SwFrame,SwContentNode> aNewIter( *(_rNewAnchorFormat.GetContentAnchor()->nNode.GetNode().GetContentNode()) ); + for( SwFrame* pNew = aNewIter.First(); pNew; pNew = aNewIter.Next() ) { - ++nNewNumOfAnchFrm; + ++nNewNumOfAnchFrame; } - if ( nOldNumOfAnchFrm != nNewNumOfAnchFrm ) + if ( nOldNumOfAnchFrame != nNewNumOfAnchFrame ) { - // delete existing fly frames except <_pKeepThisFlyFrm> - SwIterator<SwFrm,SwFormat> aIter( mrFlyFrameFormat ); - SwFrm* pFrm = aIter.First(); - if ( pFrm ) + // delete existing fly frames except <_pKeepThisFlyFrame> + SwIterator<SwFrame,SwFormat> aIter( mrFlyFrameFormat ); + SwFrame* pFrame = aIter.First(); + if ( pFrame ) { do { - if ( pFrm != _pKeepThisFlyFrm ) + if ( pFrame != _pKeepThisFlyFrame ) { - pFrm->Cut(); - SwFrm::DestroyFrm(pFrm); + pFrame->Cut(); + SwFrame::DestroyFrame(pFrame); } - } while( nullptr != ( pFrm = aIter.Next() )); + } while( nullptr != ( pFrame = aIter.Next() )); } // indicate, that re-creation of fly frames necessary mbAnchorNodeChanged = true; @@ -3282,7 +3282,7 @@ SwHandleAnchorNodeChg::~SwHandleAnchorNodeChg() { if ( mbAnchorNodeChanged ) { - mrFlyFrameFormat.MakeFrms(); + mrFlyFrameFormat.MakeFrames(); } } @@ -3297,14 +3297,14 @@ SwDrawFrameFormat::~SwDrawFrameFormat() delete pContact; } -void SwDrawFrameFormat::MakeFrms() +void SwDrawFrameFormat::MakeFrames() { SwDrawContact *pContact = static_cast<SwDrawContact*>(FindContactObj()); if ( pContact ) pContact->ConnectToLayout(); } -void SwDrawFrameFormat::DelFrms() +void SwDrawFrameFormat::DelFrames() { SwDrawContact *pContact = static_cast<SwDrawContact *>(FindContactObj()); if ( pContact ) //for the reader and other unpredictable things. @@ -3371,7 +3371,7 @@ OUString SwDrawFrameFormat::GetDescription() const } IMapObject* SwFrameFormat::GetIMapObject( const Point& rPoint, - const SwFlyFrm *pFly ) const + const SwFlyFrame *pFly ) const { const SwFormatURL &rURL = GetURL(); if( !rURL.GetMap() ) @@ -3379,37 +3379,37 @@ IMapObject* SwFrameFormat::GetIMapObject( const Point& rPoint, if( !pFly ) { - pFly = SwIterator<SwFlyFrm,SwFormat>( *this ).First(); + pFly = SwIterator<SwFlyFrame,SwFormat>( *this ).First(); if( !pFly ) return nullptr; } //Original size for OLE and graphic is TwipSize, otherwise the size of //FrameFormat of the Fly. - const SwFrm *pRef; + const SwFrame *pRef; const SwNoTextNode *pNd = nullptr; Size aOrigSz; - if( pFly->Lower() && pFly->Lower()->IsNoTextFrm() ) + if( pFly->Lower() && pFly->Lower()->IsNoTextFrame() ) { pRef = pFly->Lower(); - pNd = static_cast<const SwContentFrm*>(pRef)->GetNode()->GetNoTextNode(); + pNd = static_cast<const SwContentFrame*>(pRef)->GetNode()->GetNoTextNode(); aOrigSz = pNd->GetTwipSize(); } else { pRef = pFly; - aOrigSz = pFly->GetFormat()->GetFrmSize().GetSize(); + aOrigSz = pFly->GetFormat()->GetFrameSize().GetSize(); } if( aOrigSz.Width() != 0 && aOrigSz.Height() != 0 ) { Point aPos( rPoint ); - Size aActSz ( pRef == pFly ? pFly->Frm().SSize() : pRef->Prt().SSize() ); + Size aActSz ( pRef == pFly ? pFly->Frame().SSize() : pRef->Prt().SSize() ); const MapMode aSrc ( MAP_TWIP ); const MapMode aDest( MAP_100TH_MM ); aOrigSz = OutputDevice::LogicToLogic( aOrigSz, aSrc, aDest ); aActSz = OutputDevice::LogicToLogic( aActSz, aSrc, aDest ); - aPos -= pRef->Frm().Pos(); + aPos -= pRef->Frame().Pos(); aPos -= pRef->Prt().Pos(); aPos = OutputDevice::LogicToLogic( aPos, aSrc, aDest ); sal_uInt32 nFlags = 0; @@ -3459,21 +3459,21 @@ bool IsFlyFrameFormatInHeader(const SwFrameFormat& rFormat) const SwFlyFrameFormat* pFlyFrameFormat = dynamic_cast<const SwFlyFrameFormat*>(&rFormat); if (!pFlyFrameFormat) return false; - SwFlyFrm* pFlyFrm = pFlyFrameFormat->GetFrm(); - if (!pFlyFrm) // fdo#54648: "hidden" drawing object has no layout frame + SwFlyFrame* pFlyFrame = pFlyFrameFormat->GetFrame(); + if (!pFlyFrame) // fdo#54648: "hidden" drawing object has no layout frame { return false; } - SwPageFrm* pPageFrm = pFlyFrm->FindPageFrmOfAnchor(); - SwFrm* pHeader = pPageFrm->Lower(); + SwPageFrame* pPageFrame = pFlyFrame->FindPageFrameOfAnchor(); + SwFrame* pHeader = pPageFrame->Lower(); if (pHeader->GetType() == FRM_HEADER) { - const SwFrm* pFrm = pFlyFrm->GetAnchorFrm(); - while (pFrm) + const SwFrame* pFrame = pFlyFrame->GetAnchorFrame(); + while (pFrame) { - if (pFrm == pHeader) + if (pFrame == pHeader) return true; - pFrm = pFrm->GetUpper(); + pFrame = pFrame->GetUpper(); } } return false; @@ -3507,8 +3507,8 @@ void CheckAnchoredFlyConsistency(SwDoc const& rDoc) { assert(!rAnchor.GetContentAnchor() // for invalid documents that lack text:anchor-page-number - // it may have an anchor before MakeFrms() is called - || (!SwIterator<SwFrm, SwFrameFormat>(**it).First())); + // it may have an anchor before MakeFrames() is called + || (!SwIterator<SwFrame, SwFrameFormat>(**it).First())); } else { diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx index 9469f2abe40c..cac6574158d9 100644 --- a/sw/source/core/layout/calcmove.cxx +++ b/sw/source/core/layout/calcmove.cxx @@ -47,45 +47,45 @@ // Move methods -/// Return value tells whether the Frm should be moved. -bool SwContentFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, bool, bool & ) +/// Return value tells whether the Frame should be moved. +bool SwContentFrame::ShouldBwdMoved( SwLayoutFrame *pNewUpper, bool, bool & ) { - if ( (SwFlowFrm::IsMoveBwdJump() || !IsPrevObjMove())) + if ( (SwFlowFrame::IsMoveBwdJump() || !IsPrevObjMove())) { // Floating back a frm uses a bit of time unfortunately. - // The most common case is the following: The Frm wants to float to - // somewhere where the FixSize is the same that the Frm itself has already. - // In that case it's pretty easy to check if the Frm has enough space + // The most common case is the following: The Frame wants to float to + // somewhere where the FixSize is the same that the Frame itself has already. + // In that case it's pretty easy to check if the Frame has enough space // for its VarSize. If this is NOT the case, we already know that // we don't need to move. - // The Frm checks itself whether it has enough space - respecting the fact + // The Frame checks itself whether it has enough space - respecting the fact // that it could possibly split itself if needed. - // If, however, the FixSize differs from the Frm or Flys are involved + // If, however, the FixSize differs from the Frame or Flys are involved // (either in the old or the new position), checking is pointless, - // and we have to move the Frm just to see what happens - if there's + // and we have to move the Frame just to see what happens - if there's // some space available to do it, that is. // The FixSize of the containers of Contents is always the width. // If we moved more than one sheet back (for example jumping over empty - // pages), we have to move either way. Otherwise, if the Frm doesn't fit + // pages), we have to move either way. Otherwise, if the Frame doesn't fit // into the page, empty pages wouldn't be respected anymore. sal_uInt8 nMoveAnyway = 0; - SwPageFrm * const pNewPage = pNewUpper->FindPageFrm(); - SwPageFrm *pOldPage = FindPageFrm(); + SwPageFrame * const pNewPage = pNewUpper->FindPageFrame(); + SwPageFrame *pOldPage = FindPageFrame(); - if ( SwFlowFrm::IsMoveBwdJump() ) + if ( SwFlowFrame::IsMoveBwdJump() ) return true; if( IsInFootnote() && IsInSct() ) { - SwFootnoteFrm* pFootnote = FindFootnoteFrm(); - SwSectionFrm* pMySect = pFootnote->FindSctFrm(); + SwFootnoteFrame* pFootnote = FindFootnoteFrame(); + SwSectionFrame* pMySect = pFootnote->FindSctFrame(); if( pMySect && pMySect->IsFootnoteLock() ) { - SwSectionFrm *pSect = pNewUpper->FindSctFrm(); + SwSectionFrame *pSect = pNewUpper->FindSctFrame(); while( pSect && pSect->IsInFootnote() ) - pSect = pSect->GetUpper()->FindSctFrm(); + pSect = pSect->GetUpper()->FindSctFrame(); OSL_ENSURE( pSect, "Escaping footnote" ); if( pSect != pMySect ) return false; @@ -101,39 +101,39 @@ bool SwContentFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, bool, bool & ) // OD 2004-05-26 #i25904# - do *not* move backward, // if <nMoveAnyway> equals 3 and no space is left in new upper. - nMoveAnyway |= BwdMoveNecessary( pOldPage, Frm() ); + nMoveAnyway |= BwdMoveNecessary( pOldPage, Frame() ); { const IDocumentSettingAccess& rIDSA = pNewPage->GetFormat()->getIDocumentSettingAccess(); SwTwips nSpace = 0; SwRect aRect( pNewUpper->Prt() ); - aRect.Pos() += pNewUpper->Frm().Pos(); - const SwFrm *pPrevFrm = pNewUpper->Lower(); - while ( pPrevFrm ) + aRect.Pos() += pNewUpper->Frame().Pos(); + const SwFrame *pPrevFrame = pNewUpper->Lower(); + while ( pPrevFrame ) { - SwTwips nNewTop = (pPrevFrm->Frm().*fnRectX->fnGetBottom)(); + SwTwips nNewTop = (pPrevFrame->Frame().*fnRectX->fnGetBottom)(); // OD 2004-03-01 #106629#: // consider lower spacing of last frame in a table cell { // check, if last frame is inside table and if it includes // its lower spacing. - if ( !pPrevFrm->GetNext() && pPrevFrm->IsInTab() && + if ( !pPrevFrame->GetNext() && pPrevFrame->IsInTab() && rIDSA.get(DocumentSettingId::ADD_PARA_SPACING_TO_TABLE_CELLS) ) { - const SwFrm* pLastFrm = pPrevFrm; + const SwFrame* pLastFrame = pPrevFrame; // if last frame is a section, take its last content - if ( pPrevFrm->IsSctFrm() ) + if ( pPrevFrame->IsSctFrame() ) { - pLastFrm = static_cast<const SwSectionFrm*>(pPrevFrm)->FindLastContent(); - if ( pLastFrm && - pLastFrm->FindTabFrm() != pPrevFrm->FindTabFrm() ) + pLastFrame = static_cast<const SwSectionFrame*>(pPrevFrame)->FindLastContent(); + if ( pLastFrame && + pLastFrame->FindTabFrame() != pPrevFrame->FindTabFrame() ) { - pLastFrm = pLastFrm->FindTabFrm(); + pLastFrame = pLastFrame->FindTabFrame(); } } - if ( pLastFrm ) + if ( pLastFrame ) { - SwBorderAttrAccess aAccess( SwFrm::GetCache(), pLastFrm ); + SwBorderAttrAccess aAccess( SwFrame::GetCache(), pLastFrame ); const SwBorderAttrs& rAttrs = *aAccess.Get(); nNewTop -= rAttrs.GetULSpace().GetLower(); } @@ -141,19 +141,19 @@ bool SwContentFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, bool, bool & ) } (aRect.*fnRectX->fnSetTop)( nNewTop ); - pPrevFrm = pPrevFrm->GetNext(); + pPrevFrame = pPrevFrame->GetNext(); } nMoveAnyway |= BwdMoveNecessary( pNewPage, aRect); //determine space left in new upper frame nSpace = (aRect.*fnRectX->fnGetHeight)(); - const SwViewShell *pSh = pNewUpper->getRootFrm()->GetCurrShell(); + const SwViewShell *pSh = pNewUpper->getRootFrame()->GetCurrShell(); if ( IsInFootnote() || (pSh && pSh->GetViewOptions()->getBrowseMode()) || - pNewUpper->IsCellFrm() || - ( pNewUpper->IsInSct() && ( pNewUpper->IsSctFrm() || - ( pNewUpper->IsColBodyFrm() && + pNewUpper->IsCellFrame() || + ( pNewUpper->IsInSct() && ( pNewUpper->IsSctFrame() || + ( pNewUpper->IsColBodyFrame() && !pNewUpper->GetUpper()->GetPrev() && !pNewUpper->GetUpper()->GetNext() ) ) ) ) nSpace += pNewUpper->Grow( LONG_MAX, true ); @@ -185,7 +185,7 @@ bool SwContentFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, bool, bool & ) // It's impossible for _WouldFit to return a usable result if // we have a fresh multi-column section - so we really have to // float back unless there is no space. - return pNewUpper->IsInSct() && pNewUpper->IsColBodyFrm() && + return pNewUpper->IsInSct() && pNewUpper->IsColBodyFrame() && !(pNewUpper->Prt().*fnRectX->fnGetWidth)() && ( pNewUpper->GetUpper()->GetPrev() || pNewUpper->GetUpper()->GetNext() ); @@ -201,30 +201,30 @@ bool SwContentFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, bool, bool & ) // Calc methods // Two little friendships form a secret society -inline void PrepareLock( SwFlowFrm *pTab ) +inline void PrepareLock( SwFlowFrame *pTab ) { pTab->LockJoin(); } -inline void PrepareUnlock( SwFlowFrm *pTab ) +inline void PrepareUnlock( SwFlowFrame *pTab ) { pTab->UnlockJoin(); } // hopefully, one day this function simply will return 'false' -static bool lcl_IsCalcUpperAllowed( const SwFrm& rFrm ) +static bool lcl_IsCalcUpperAllowed( const SwFrame& rFrame ) { - return !rFrm.GetUpper()->IsSctFrm() && - !rFrm.GetUpper()->IsFooterFrm() && + return !rFrame.GetUpper()->IsSctFrame() && + !rFrame.GetUpper()->IsFooterFrame() && // #i23129#, #i36347# - no format of upper Writer fly frame - !rFrm.GetUpper()->IsFlyFrm() && - !( rFrm.GetUpper()->IsTabFrm() && rFrm.GetUpper()->GetUpper()->IsInTab() ) && - !( rFrm.IsTabFrm() && rFrm.GetUpper()->IsInTab() ); + !rFrame.GetUpper()->IsFlyFrame() && + !( rFrame.GetUpper()->IsTabFrame() && rFrame.GetUpper()->GetUpper()->IsInTab() ) && + !( rFrame.IsTabFrame() && rFrame.GetUpper()->IsInTab() ); } /** Prepares the Frame for "formatting" (MakeAll()). * - * This method serves to save stack space: To calculate the position of the Frm + * This method serves to save stack space: To calculate the position of the Frame * we have to make sure that the positions of Upper and Prev respectively are * valid. This may require a recursive call (a loop would be quite expensive, * as it's not required very often). @@ -239,7 +239,7 @@ static bool lcl_IsCalcUpperAllowed( const SwFrm& rFrm ) * * @see MakeAll() */ -void SwFrm::PrepareMake(vcl::RenderContext* pRenderContext) +void SwFrame::PrepareMake(vcl::RenderContext* pRenderContext) { StackHack aHack; if ( GetUpper() ) @@ -250,29 +250,29 @@ void SwFrm::PrepareMake(vcl::RenderContext* pRenderContext) if ( !GetUpper() ) return; - const bool bCnt = IsContentFrm(); - const bool bTab = IsTabFrm(); + const bool bCnt = IsContentFrame(); + const bool bTab = IsTabFrame(); bool bNoSect = IsInSct(); bool bOldTabLock = false, bFoll = false; - SwFlowFrm* pThis = bCnt ? static_cast<SwContentFrm*>(this) : nullptr; + SwFlowFrame* pThis = bCnt ? static_cast<SwContentFrame*>(this) : nullptr; if ( bTab ) { - pThis = static_cast<SwTabFrm*>(this); - bOldTabLock = static_cast<SwTabFrm*>(this)->IsJoinLocked(); - ::PrepareLock( static_cast<SwTabFrm*>(this) ); + pThis = static_cast<SwTabFrame*>(this); + bOldTabLock = static_cast<SwTabFrame*>(this)->IsJoinLocked(); + ::PrepareLock( static_cast<SwTabFrame*>(this) ); bFoll = pThis->IsFollow(); } - else if( IsSctFrm() ) + else if( IsSctFrame() ) { - pThis = static_cast<SwSectionFrm*>(this); + pThis = static_cast<SwSectionFrame*>(this); bFoll = pThis->IsFollow(); bNoSect = false; } else if ( bCnt && (bFoll = pThis->IsFollow()) && GetPrev() ) { //Do not follow the chain when we need only one instance - const SwTextFrm* pMaster = static_cast<SwContentFrm*>(this)->FindMaster(); + const SwTextFrame* pMaster = static_cast<SwContentFrame*>(this)->FindMaster(); if ( pMaster && pMaster->IsLocked() ) { MakeAll(pRenderContext); @@ -287,42 +287,42 @@ void SwFrm::PrepareMake(vcl::RenderContext* pRenderContext) !GetPrev()->GetAttrSet()->GetKeep().GetValue(); if ( bFormatPrev ) { - SwFrm *pFrm = GetUpper()->Lower(); - while ( pFrm != this ) + SwFrame *pFrame = GetUpper()->Lower(); + while ( pFrame != this ) { - OSL_ENSURE( pFrm, ":-( Layout unstable (this not found)." ); - if ( !pFrm ) + OSL_ENSURE( pFrame, ":-( Layout unstable (this not found)." ); + if ( !pFrame ) return; //Oioioioi ... - if ( !pFrm->IsValid() ) + if ( !pFrame->IsValid() ) { // A small interference that hopefully improves on the stability: - // If I'm Follow AND neighbor of a Frm before me, it would delete + // If I'm Follow AND neighbor of a Frame before me, it would delete // me when formatting. This as you can see could easily become a // confusing situation that we want to avoid. - if ( bFoll && pFrm->IsFlowFrm() && - (SwFlowFrm::CastFlowFrm(pFrm))->IsAnFollow( pThis ) ) + if ( bFoll && pFrame->IsFlowFrame() && + (SwFlowFrame::CastFlowFrame(pFrame))->IsAnFollow( pThis ) ) break; - pFrm->MakeAll(pRenderContext); - if( IsSctFrm() && !static_cast<SwSectionFrm*>(this)->GetSection() ) + pFrame->MakeAll(pRenderContext); + if( IsSctFrame() && !static_cast<SwSectionFrame*>(this)->GetSection() ) break; } - // With ContentFrms, the chain may be broken while walking through + // With ContentFrames, the chain may be broken while walking through // it. Therefore we have to figure out the follower in a bit more // complicated way. However, I'll HAVE to get back to myself // sometime again. - pFrm = pFrm->FindNext(); + pFrame = pFrame->FindNext(); - // If we started out in a SectionFrm, it might have happened that + // If we started out in a SectionFrame, it might have happened that // we landed in a Section Follow via the MakeAll calls. - // FindNext only gives us the SectionFrm, not it's content - we + // FindNext only gives us the SectionFrame, not it's content - we // won't find ourselves anymore! - if( bNoSect && pFrm && pFrm->IsSctFrm() ) + if( bNoSect && pFrame && pFrame->IsSctFrame() ) { - SwFrm* pCnt = static_cast<SwSectionFrm*>(pFrm)->ContainsAny(); + SwFrame* pCnt = static_cast<SwSectionFrame*>(pFrame)->ContainsAny(); if( pCnt ) - pFrm = pCnt; + pFrame = pCnt; } } OSL_ENSURE( GetUpper(), "Layout unstable (Upper gone II)." ); @@ -336,155 +336,155 @@ void SwFrm::PrepareMake(vcl::RenderContext* pRenderContext) } if ( bTab && !bOldTabLock ) - ::PrepareUnlock( static_cast<SwTabFrm*>(this) ); + ::PrepareUnlock( static_cast<SwTabFrame*>(this) ); } MakeAll(pRenderContext); } -void SwFrm::OptPrepareMake() +void SwFrame::OptPrepareMake() { // #i23129#, #i36347# - no format of upper Writer fly frame - if ( GetUpper() && !GetUpper()->IsFooterFrm() && - !GetUpper()->IsFlyFrm() ) + if ( GetUpper() && !GetUpper()->IsFooterFrame() && + !GetUpper()->IsFlyFrame() ) { { - SwFrmDeleteGuard aDeleteGuard(this); - GetUpper()->Calc(getRootFrm()->GetCurrShell() ? getRootFrm()->GetCurrShell()->GetOut() : nullptr); + SwFrameDeleteGuard aDeleteGuard(this); + GetUpper()->Calc(getRootFrame()->GetCurrShell() ? getRootFrame()->GetCurrShell()->GetOut() : nullptr); } OSL_ENSURE( GetUpper(), ":-( Layout unstable (Upper gone)." ); if ( !GetUpper() ) return; } if ( GetPrev() && !GetPrev()->IsValid() ) - PrepareMake(getRootFrm()->GetCurrShell() ? getRootFrm()->GetCurrShell()->GetOut() : nullptr); + PrepareMake(getRootFrame()->GetCurrShell() ? getRootFrame()->GetCurrShell()->GetOut() : nullptr); else { StackHack aHack; - MakeAll(IsRootFrm() ? nullptr : getRootFrm()->GetCurrShell()->GetOut()); + MakeAll(IsRootFrame() ? nullptr : getRootFrame()->GetCurrShell()->GetOut()); } } -void SwFrm::PrepareCrsr() +void SwFrame::PrepareCursor() { StackHack aHack; - if( GetUpper() && !GetUpper()->IsSctFrm() ) + if( GetUpper() && !GetUpper()->IsSctFrame() ) { - GetUpper()->PrepareCrsr(); - GetUpper()->Calc(getRootFrm()->GetCurrShell() ? getRootFrm()->GetCurrShell()->GetOut() : nullptr); + GetUpper()->PrepareCursor(); + GetUpper()->Calc(getRootFrame()->GetCurrShell() ? getRootFrame()->GetCurrShell()->GetOut() : nullptr); OSL_ENSURE( GetUpper(), ":-( Layout unstable (Upper gone)." ); if ( !GetUpper() ) return; - const bool bCnt = IsContentFrm(); - const bool bTab = IsTabFrm(); + const bool bCnt = IsContentFrame(); + const bool bTab = IsTabFrame(); bool bNoSect = IsInSct(); bool bOldTabLock = false, bFoll; - SwFlowFrm* pThis = bCnt ? static_cast<SwContentFrm*>(this) : nullptr; + SwFlowFrame* pThis = bCnt ? static_cast<SwContentFrame*>(this) : nullptr; if ( bTab ) { - bOldTabLock = static_cast<SwTabFrm*>(this)->IsJoinLocked(); - ::PrepareLock( static_cast<SwTabFrm*>(this) ); - pThis = static_cast<SwTabFrm*>(this); + bOldTabLock = static_cast<SwTabFrame*>(this)->IsJoinLocked(); + ::PrepareLock( static_cast<SwTabFrame*>(this) ); + pThis = static_cast<SwTabFrame*>(this); } - else if( IsSctFrm() ) + else if( IsSctFrame() ) { - pThis = static_cast<SwSectionFrm*>(this); + pThis = static_cast<SwSectionFrame*>(this); bNoSect = false; } bFoll = pThis && pThis->IsFollow(); - SwFrm *pFrm = GetUpper()->Lower(); - while ( pFrm != this ) + SwFrame *pFrame = GetUpper()->Lower(); + while ( pFrame != this ) { - OSL_ENSURE( pFrm, ":-( Layout unstable (this not found)." ); - if ( !pFrm ) + OSL_ENSURE( pFrame, ":-( Layout unstable (this not found)." ); + if ( !pFrame ) return; //Oioioioi ... - if ( !pFrm->IsValid() ) + if ( !pFrame->IsValid() ) { // A small interference that hopefully improves on the stability: - // If I'm Follow AND neighbor of a Frm before me, it would delete + // If I'm Follow AND neighbor of a Frame before me, it would delete // me when formatting. This as you can see could easily become a // confusing situation that we want to avoid. - if ( bFoll && pFrm->IsFlowFrm() && - (SwFlowFrm::CastFlowFrm(pFrm))->IsAnFollow( pThis ) ) + if ( bFoll && pFrame->IsFlowFrame() && + (SwFlowFrame::CastFlowFrame(pFrame))->IsAnFollow( pThis ) ) break; - pFrm->MakeAll(getRootFrm()->GetCurrShell()->GetOut()); + pFrame->MakeAll(getRootFrame()->GetCurrShell()->GetOut()); } - // With ContentFrms, the chain may be broken while walking through + // With ContentFrames, the chain may be broken while walking through // it. Therefore we have to figure out the follower in a bit more // complicated way. However, I'll HAVE to get back to myself // sometime again. - pFrm = pFrm->FindNext(); - if( bNoSect && pFrm && pFrm->IsSctFrm() ) + pFrame = pFrame->FindNext(); + if( bNoSect && pFrame && pFrame->IsSctFrame() ) { - SwFrm* pCnt = static_cast<SwSectionFrm*>(pFrm)->ContainsAny(); + SwFrame* pCnt = static_cast<SwSectionFrame*>(pFrame)->ContainsAny(); if( pCnt ) - pFrm = pCnt; + pFrame = pCnt; } } OSL_ENSURE( GetUpper(), "Layout unstable (Upper gone II)." ); if ( !GetUpper() ) return; - GetUpper()->Calc(getRootFrm()->GetCurrShell()->GetOut()); + GetUpper()->Calc(getRootFrame()->GetCurrShell()->GetOut()); OSL_ENSURE( GetUpper(), "Layout unstable (Upper gone III)." ); if ( bTab && !bOldTabLock ) - ::PrepareUnlock( static_cast<SwTabFrm*>(this) ); + ::PrepareUnlock( static_cast<SwTabFrame*>(this) ); } - Calc(getRootFrm()->GetCurrShell() ? getRootFrm()->GetCurrShell()->GetOut() : nullptr); + Calc(getRootFrame()->GetCurrShell() ? getRootFrame()->GetCurrShell()->GetOut() : nullptr); } -// Here we return GetPrev(); however we will ignore empty SectionFrms -static SwFrm* lcl_Prev( SwFrm* pFrm, bool bSectPrv = true ) +// Here we return GetPrev(); however we will ignore empty SectionFrames +static SwFrame* lcl_Prev( SwFrame* pFrame, bool bSectPrv = true ) { - SwFrm* pRet = pFrm->GetPrev(); - if( !pRet && pFrm->GetUpper() && pFrm->GetUpper()->IsSctFrm() && - bSectPrv && !pFrm->IsColumnFrm() ) - pRet = pFrm->GetUpper()->GetPrev(); - while( pRet && pRet->IsSctFrm() && - !static_cast<SwSectionFrm*>(pRet)->GetSection() ) + SwFrame* pRet = pFrame->GetPrev(); + if( !pRet && pFrame->GetUpper() && pFrame->GetUpper()->IsSctFrame() && + bSectPrv && !pFrame->IsColumnFrame() ) + pRet = pFrame->GetUpper()->GetPrev(); + while( pRet && pRet->IsSctFrame() && + !static_cast<SwSectionFrame*>(pRet)->GetSection() ) pRet = pRet->GetPrev(); return pRet; } -static SwFrm* lcl_NotHiddenPrev( SwFrm* pFrm ) +static SwFrame* lcl_NotHiddenPrev( SwFrame* pFrame ) { - SwFrm *pRet = pFrm; + SwFrame *pRet = pFrame; do { pRet = lcl_Prev( pRet ); - } while ( pRet && pRet->IsTextFrm() && static_cast<SwTextFrm*>(pRet)->IsHiddenNow() ); + } while ( pRet && pRet->IsTextFrame() && static_cast<SwTextFrame*>(pRet)->IsHiddenNow() ); return pRet; } -void SwFrm::MakePos() +void SwFrame::MakePos() { if ( !mbValidPos ) { mbValidPos = true; bool bUseUpper = false; - SwFrm* pPrv = lcl_Prev( this ); + SwFrame* pPrv = lcl_Prev( this ); if ( pPrv && - ( !pPrv->IsContentFrm() || - ( static_cast<SwContentFrm*>(pPrv)->GetFollow() != this ) ) + ( !pPrv->IsContentFrame() || + ( static_cast<SwContentFrame*>(pPrv)->GetFollow() != this ) ) ) { if ( !StackHack::IsLocked() && - ( !IsInSct() || IsSctFrm() ) && - !pPrv->IsSctFrm() && + ( !IsInSct() || IsSctFrame() ) && + !pPrv->IsSctFrame() && !pPrv->GetAttrSet()->GetKeep().GetValue() ) { - pPrv->Calc(getRootFrm()->GetCurrShell() ? getRootFrm()->GetCurrShell()->GetOut() : nullptr); // This may cause Prev to vanish! + pPrv->Calc(getRootFrame()->GetCurrShell() ? getRootFrame()->GetCurrShell()->GetOut() : nullptr); // This may cause Prev to vanish! } - else if ( pPrv->Frm().Top() == 0 ) + else if ( pPrv->Frame().Top() == 0 ) { bUseUpper = true; } @@ -492,42 +492,42 @@ void SwFrm::MakePos() pPrv = lcl_Prev( this, false ); const sal_uInt16 nMyType = GetType(); - SWRECTFN( ( IsCellFrm() && GetUpper() ? GetUpper() : this ) ) + SWRECTFN( ( IsCellFrame() && GetUpper() ? GetUpper() : this ) ) if ( !bUseUpper && pPrv ) { - maFrm.Pos( pPrv->Frm().Pos() ); + maFrame.Pos( pPrv->Frame().Pos() ); if( FRM_NEIGHBOUR & nMyType ) { bool bR2L = IsRightToLeft(); if( bR2L ) - (maFrm.*fnRect->fnSetPosX)( (maFrm.*fnRect->fnGetLeft)() - - (maFrm.*fnRect->fnGetWidth)() ); + (maFrame.*fnRect->fnSetPosX)( (maFrame.*fnRect->fnGetLeft)() - + (maFrame.*fnRect->fnGetWidth)() ); else - (maFrm.*fnRect->fnSetPosX)( (maFrm.*fnRect->fnGetLeft)() + - (pPrv->Frm().*fnRect->fnGetWidth)() ); + (maFrame.*fnRect->fnSetPosX)( (maFrame.*fnRect->fnGetLeft)() + + (pPrv->Frame().*fnRect->fnGetWidth)() ); // cells may now leave their uppers if( bVert && FRM_CELL & nMyType && !mbReverse ) - maFrm.Pos().setX(maFrm.Pos().getX() - maFrm.Width() + pPrv->Frm().Width()); + maFrame.Pos().setX(maFrame.Pos().getX() - maFrame.Width() + pPrv->Frame().Width()); } else if( bVert && FRM_NOTE_VERT & nMyType ) { if( mbReverse ) - maFrm.Pos().setX(maFrm.Pos().getX() + pPrv->Frm().Width()); + maFrame.Pos().setX(maFrame.Pos().getX() + pPrv->Frame().Width()); else { if ( bVertL2R ) - maFrm.Pos().setX(maFrm.Pos().getX() + pPrv->Frm().Width()); + maFrame.Pos().setX(maFrame.Pos().getX() + pPrv->Frame().Width()); else - maFrm.Pos().setX(maFrm.Pos().getX() - maFrm.Width()); + maFrame.Pos().setX(maFrame.Pos().getX() - maFrame.Width()); } } else - maFrm.Pos().setY(maFrm.Pos().getY() + pPrv->Frm().Height()); + maFrame.Pos().setY(maFrame.Pos().getY() + pPrv->Frame().Height()); } else if ( GetUpper() ) { - // OD 15.10.2002 #103517# - add safeguard for <SwFooterFrm::Calc()> + // OD 15.10.2002 #103517# - add safeguard for <SwFooterFrame::Calc()> // If parent frame is a footer frame and its <ColLocked()>, then // do *not* calculate it. // NOTE: Footer frame is <ColLocked()> during its @@ -536,79 +536,79 @@ void SwFrm::MakePos() // #i56850# // - no format of upper Writer fly frame, which is anchored // at-paragraph or at-character. - if ( !GetUpper()->IsTabFrm() && - !( IsTabFrm() && GetUpper()->IsInTab() ) && - !GetUpper()->IsSctFrm() && - !dynamic_cast<SwFlyAtCntFrm*>(GetUpper()) && - !( GetUpper()->IsFooterFrm() && + if ( !GetUpper()->IsTabFrame() && + !( IsTabFrame() && GetUpper()->IsInTab() ) && + !GetUpper()->IsSctFrame() && + !dynamic_cast<SwFlyAtContentFrame*>(GetUpper()) && + !( GetUpper()->IsFooterFrame() && GetUpper()->IsColLocked() ) ) { - GetUpper()->Calc(getRootFrm()->GetCurrShell()->GetOut()); + GetUpper()->Calc(getRootFrame()->GetCurrShell()->GetOut()); } pPrv = lcl_Prev( this, false ); if ( !bUseUpper && pPrv ) { - maFrm.Pos( pPrv->Frm().Pos() ); + maFrame.Pos( pPrv->Frame().Pos() ); if( FRM_NEIGHBOUR & nMyType ) { bool bR2L = IsRightToLeft(); if( bR2L ) - (maFrm.*fnRect->fnSetPosX)( (maFrm.*fnRect->fnGetLeft)() - - (maFrm.*fnRect->fnGetWidth)() ); + (maFrame.*fnRect->fnSetPosX)( (maFrame.*fnRect->fnGetLeft)() - + (maFrame.*fnRect->fnGetWidth)() ); else - (maFrm.*fnRect->fnSetPosX)( (maFrm.*fnRect->fnGetLeft)() + - (pPrv->Frm().*fnRect->fnGetWidth)() ); + (maFrame.*fnRect->fnSetPosX)( (maFrame.*fnRect->fnGetLeft)() + + (pPrv->Frame().*fnRect->fnGetWidth)() ); // cells may now leave their uppers if( bVert && FRM_CELL & nMyType && !mbReverse ) - maFrm.Pos().setX(maFrm.Pos().getX() - maFrm.Width() + pPrv->Frm().Width()); + maFrame.Pos().setX(maFrame.Pos().getX() - maFrame.Width() + pPrv->Frame().Width()); } else if( bVert && FRM_NOTE_VERT & nMyType ) { if( mbReverse ) - maFrm.Pos().setX(maFrm.Pos().getX() + pPrv->Frm().Width()); + maFrame.Pos().setX(maFrame.Pos().getX() + pPrv->Frame().Width()); else - maFrm.Pos().setX(maFrm.Pos().getX() - maFrm.Width()); + maFrame.Pos().setX(maFrame.Pos().getX() - maFrame.Width()); } else - maFrm.Pos().setY(maFrm.Pos().getY() + pPrv->Frm().Height()); + maFrame.Pos().setY(maFrame.Pos().getY() + pPrv->Frame().Height()); } else { - maFrm.Pos( GetUpper()->Frm().Pos() ); - if( GetUpper()->IsFlyFrm() ) - maFrm.Pos() += static_cast<SwFlyFrm*>(GetUpper())->ContentPos(); + maFrame.Pos( GetUpper()->Frame().Pos() ); + if( GetUpper()->IsFlyFrame() ) + maFrame.Pos() += static_cast<SwFlyFrame*>(GetUpper())->ContentPos(); else - maFrm.Pos() += GetUpper()->Prt().Pos(); + maFrame.Pos() += GetUpper()->Prt().Pos(); if( FRM_NEIGHBOUR & nMyType && IsRightToLeft() ) { if( bVert ) - maFrm.Pos().setY(maFrm.Pos().getY() + GetUpper()->Prt().Height() - - maFrm.Height()); + maFrame.Pos().setY(maFrame.Pos().getY() + GetUpper()->Prt().Height() + - maFrame.Height()); else - maFrm.Pos().setX(maFrm.Pos().getX() + GetUpper()->Prt().Width() - - maFrm.Width()); + maFrame.Pos().setX(maFrame.Pos().getX() + GetUpper()->Prt().Width() + - maFrame.Width()); } else if( bVert && !bVertL2R && FRM_NOTE_VERT & nMyType && !mbReverse ) - maFrm.Pos().setX(maFrm.Pos().getX() - maFrm.Width() + GetUpper()->Prt().Width()); + maFrame.Pos().setX(maFrame.Pos().getX() - maFrame.Width() + GetUpper()->Prt().Width()); } } else { - maFrm.Pos().setX(0); - maFrm.Pos().setY(0); + maFrame.Pos().setX(0); + maFrame.Pos().setY(0); } - if( IsBodyFrm() && bVert && !bVertL2R && !mbReverse && GetUpper() ) - maFrm.Pos().setX(maFrm.Pos().getX() + GetUpper()->Prt().Width() - maFrm.Width()); + if( IsBodyFrame() && bVert && !bVertL2R && !mbReverse && GetUpper() ) + maFrame.Pos().setX(maFrame.Pos().getX() + GetUpper()->Prt().Width() - maFrame.Width()); mbValidPos = true; } } // #i28701# - new type <SwSortedObjs> -static void lcl_CheckObjects( SwSortedObjs* pSortedObjs, const SwFrm* pFrm, long& rBot ) +static void lcl_CheckObjects( SwSortedObjs* pSortedObjs, const SwFrame* pFrame, long& rBot ) { // And then there can be paragraph anchored frames that sit below their paragraph. long nMax = 0; @@ -618,16 +618,16 @@ static void lcl_CheckObjects( SwSortedObjs* pSortedObjs, const SwFrm* pFrm, long // entries. SwAnchoredObject* pObj = (*pSortedObjs)[i]; long nTmp = 0; - if ( dynamic_cast<const SwFlyFrm*>( pObj) != nullptr ) + if ( dynamic_cast<const SwFlyFrame*>( pObj) != nullptr ) { - SwFlyFrm *pFly = static_cast<SwFlyFrm*>(pObj); - if( pFly->Frm().Top() != FAR_AWAY && - ( pFrm->IsPageFrm() ? pFly->IsFlyLayFrm() : - ( pFly->IsFlyAtCntFrm() && - ( pFrm->IsBodyFrm() ? pFly->GetAnchorFrm()->IsInDocBody() : - pFly->GetAnchorFrm()->IsInFootnote() ) ) ) ) + SwFlyFrame *pFly = static_cast<SwFlyFrame*>(pObj); + if( pFly->Frame().Top() != FAR_AWAY && + ( pFrame->IsPageFrame() ? pFly->IsFlyLayFrame() : + ( pFly->IsFlyAtContentFrame() && + ( pFrame->IsBodyFrame() ? pFly->GetAnchorFrame()->IsInDocBody() : + pFly->GetAnchorFrame()->IsInFootnote() ) ) ) ) { - nTmp = pFly->Frm().Bottom(); + nTmp = pFly->Frame().Bottom(); } } else @@ -638,33 +638,33 @@ static void lcl_CheckObjects( SwSortedObjs* pSortedObjs, const SwFrm* pFrm, long rBot = std::max( rBot, nMax ); } -size_t SwPageFrm::GetContentHeight(const long nTop, const long nBottom) const +size_t SwPageFrame::GetContentHeight(const long nTop, const long nBottom) const { - OSL_ENSURE(!(FindBodyCont() && FindBodyCont()->Lower() && FindBodyCont()->Lower()->IsColumnFrm()), - "SwPageFrm::GetContentHeight(): No support for columns."); + OSL_ENSURE(!(FindBodyCont() && FindBodyCont()->Lower() && FindBodyCont()->Lower()->IsColumnFrame()), + "SwPageFrame::GetContentHeight(): No support for columns."); // In pages without columns, the content defines the size. - long nBot = Frm().Top() + nTop; - const SwFrm *pFrm = Lower(); - while (pFrm) + long nBot = Frame().Top() + nTop; + const SwFrame *pFrame = Lower(); + while (pFrame) { long nTmp = 0; - const SwFrm *pCnt = static_cast<const SwLayoutFrm*>(pFrm)->ContainsAny(); - while (pCnt && (pCnt->GetUpper() == pFrm || - static_cast<const SwLayoutFrm*>(pFrm)->IsAnLower(pCnt))) + const SwFrame *pCnt = static_cast<const SwLayoutFrame*>(pFrame)->ContainsAny(); + while (pCnt && (pCnt->GetUpper() == pFrame || + static_cast<const SwLayoutFrame*>(pFrame)->IsAnLower(pCnt))) { - nTmp += pCnt->Frm().Height(); - if (pCnt->IsTextFrm() && - static_cast<const SwTextFrm*>(pCnt)->IsUndersized()) + nTmp += pCnt->Frame().Height(); + if (pCnt->IsTextFrame() && + static_cast<const SwTextFrame*>(pCnt)->IsUndersized()) { - // This TextFrm would like to be a bit bigger. - nTmp += static_cast<const SwTextFrm*>(pCnt)->GetParHeight() + // This TextFrame would like to be a bit bigger. + nTmp += static_cast<const SwTextFrame*>(pCnt)->GetParHeight() - pCnt->Prt().Height(); } - else if (pCnt->IsSctFrm()) + else if (pCnt->IsSctFrame()) { // Grow if undersized, but don't shrink if oversized. - const auto delta = static_cast<const SwSectionFrm*>(pCnt)->CalcUndersize(); + const auto delta = static_cast<const SwSectionFrame*>(pCnt)->CalcUndersize(); if (delta > 0) nTmp += delta; } @@ -672,45 +672,45 @@ size_t SwPageFrm::GetContentHeight(const long nTop, const long nBottom) const pCnt = pCnt->FindNext(); } // OD 29.10.2002 #97265# - consider invalid body frame properties - if (pFrm->IsBodyFrm() && - (!pFrm->GetValidSizeFlag() || - !pFrm->GetValidPrtAreaFlag()) && - (pFrm->Frm().Height() < pFrm->Prt().Height()) + if (pFrame->IsBodyFrame() && + (!pFrame->GetValidSizeFlag() || + !pFrame->GetValidPrtAreaFlag()) && + (pFrame->Frame().Height() < pFrame->Prt().Height()) ) { - nTmp = std::min(nTmp, pFrm->Frm().Height()); + nTmp = std::min(nTmp, pFrame->Frame().Height()); } else { // OD 30.10.2002 #97265# - assert invalid lower property - OSL_ENSURE(!(pFrm->Frm().Height() < pFrm->Prt().Height()), - "SwPageFrm::GetContentHeight(): Lower with frame height < printing height"); - nTmp += pFrm->Frm().Height() - pFrm->Prt().Height(); + OSL_ENSURE(!(pFrame->Frame().Height() < pFrame->Prt().Height()), + "SwPageFrame::GetContentHeight(): Lower with frame height < printing height"); + nTmp += pFrame->Frame().Height() - pFrame->Prt().Height(); } - if (!pFrm->IsBodyFrm()) - nTmp = std::min(nTmp, pFrm->Frm().Height()); + if (!pFrame->IsBodyFrame()) + nTmp = std::min(nTmp, pFrame->Frame().Height()); nBot += nTmp; // Here we check whether paragraph anchored objects // protrude outside the Body/FootnoteCont. - if (m_pSortedObjs && !pFrm->IsHeaderFrm() && - !pFrm->IsFooterFrm()) - lcl_CheckObjects(m_pSortedObjs, pFrm, nBot); - pFrm = pFrm->GetNext(); + if (m_pSortedObjs && !pFrame->IsHeaderFrame() && + !pFrame->IsFooterFrame()) + lcl_CheckObjects(m_pSortedObjs, pFrame, nBot); + pFrame = pFrame->GetNext(); } nBot += nBottom; // And the page anchored ones if (m_pSortedObjs) lcl_CheckObjects(m_pSortedObjs, this, nBot); - nBot -= Frm().Top(); + nBot -= Frame().Top(); return nBot; } -void SwPageFrm::MakeAll(vcl::RenderContext* pRenderContext) +void SwPageFrame::MakeAll(vcl::RenderContext* pRenderContext) { PROTOCOL_ENTER( this, PROT_MAKEALL, 0, nullptr ) - const SwRect aOldRect( Frm() ); // Adjust root size + const SwRect aOldRect( Frame() ); // Adjust root size const SwLayNotify aNotify( this ); // takes care of the notification in the dtor std::unique_ptr<SwBorderAttrAccess> pAccess; const SwBorderAttrs*pAttrs = nullptr; @@ -726,8 +726,8 @@ void SwPageFrm::MakeAll(vcl::RenderContext* pRenderContext) { if ( IsEmptyPage() ) { - Frm().Width( 0 ); Prt().Width( 0 ); - Frm().Height( 0 ); Prt().Height( 0 ); + Frame().Width( 0 ); Prt().Width( 0 ); + Frame().Height( 0 ); Prt().Height( 0 ); Prt().Left( 0 ); Prt().Top( 0 ); mbValidSize = mbValidPrtArea = true; } @@ -735,12 +735,12 @@ void SwPageFrm::MakeAll(vcl::RenderContext* pRenderContext) { if (!pAccess) { - pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrm::GetCache(), this); + pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrame::GetCache(), this); pAttrs = pAccess->Get(); } assert(pAttrs); - SwViewShell *pSh = getRootFrm()->GetCurrShell(); + SwViewShell *pSh = getRootFrame()->GetCurrShell(); if (pSh && pSh->GetViewOptions()->getBrowseMode()) { // In BrowseView, we use fixed settings @@ -748,20 +748,20 @@ void SwPageFrm::MakeAll(vcl::RenderContext* pRenderContext) const long nTop = pAttrs->CalcTopLine() + aBorder.Height(); const long nBottom = pAttrs->CalcBottomLine()+ aBorder.Height(); - long nWidth = GetUpper() ? static_cast<SwRootFrm*>(GetUpper())->GetBrowseWidth() : 0; + long nWidth = GetUpper() ? static_cast<SwRootFrame*>(GetUpper())->GetBrowseWidth() : 0; const auto nDefWidth = pSh->GetBrowseWidth(); if (nWidth < nDefWidth) nWidth = nDefWidth; nWidth += + 2 * aBorder.Width(); nWidth = std::max( nWidth, 2L * aBorder.Width() + 4L*MM50 ); - Frm().Width( nWidth ); + Frame().Width( nWidth ); - SwLayoutFrm *pBody = FindBodyCont(); - if ( pBody && pBody->Lower() && pBody->Lower()->IsColumnFrm() ) + SwLayoutFrame *pBody = FindBodyCont(); + if ( pBody && pBody->Lower() && pBody->Lower()->IsColumnFrame() ) { // Columns have a fixed height - Frm().Height( pAttrs->GetSize().Height() ); + Frame().Height( pAttrs->GetSize().Height() ); } else { @@ -777,21 +777,21 @@ void SwPageFrm::MakeAll(vcl::RenderContext* pRenderContext) } // #i35143# - Assure, that the page // doesn't exceed the defined browse height. - Frm().Height( std::min( nBot, BROWSE_HEIGHT ) ); + Frame().Height( std::min( nBot, BROWSE_HEIGHT ) ); } Prt().Left ( pAttrs->CalcLeftLine() + aBorder.Width() ); Prt().Top ( nTop ); - Prt().Width( Frm().Width() - ( Prt().Left() + Prt().Width( Frame().Width() - ( Prt().Left() + pAttrs->CalcRightLine() + aBorder.Width() ) ); - Prt().Height( Frm().Height() - (nTop + nBottom) ); + Prt().Height( Frame().Height() - (nTop + nBottom) ); mbValidSize = mbValidPrtArea = true; continue; } else if (pSh && pSh->GetViewOptions()->IsWhitespaceHidden()) { long height = 0; - SwLayoutFrm *pBody = FindBodyCont(); - if ( pBody && pBody->Lower() && pBody->Lower()->IsColumnFrm() ) + SwLayoutFrame *pBody = FindBodyCont(); + if ( pBody && pBody->Lower() && pBody->Lower()->IsColumnFrame() ) { // Columns have a fixed height height = pAttrs->GetSize().Height(); @@ -804,7 +804,7 @@ void SwPageFrm::MakeAll(vcl::RenderContext* pRenderContext) if (height > 0) { - ChgSize(Size(Frm().Width(), height)); + ChgSize(Size(Frame().Width(), height)); Prt().Top(0); Prt().Height(height); @@ -820,20 +820,20 @@ void SwPageFrm::MakeAll(vcl::RenderContext* pRenderContext) // Set FixSize. For pages, this is not done from Upper, but from // the attribute. //FIXME: This resets the size when (mbValidSize && !mbValidPrtArea). - Frm().SSize( pAttrs->GetSize() ); + Frame().SSize( pAttrs->GetSize() ); Format( pRenderContext, pAttrs ); } } } //while ( !mbValidPos || !mbValidSize || !mbValidPrtArea ) - if ( Frm() != aOldRect && GetUpper() ) - static_cast<SwRootFrm*>(GetUpper())->CheckViewLayout( nullptr, nullptr ); + if ( Frame() != aOldRect && GetUpper() ) + static_cast<SwRootFrame*>(GetUpper())->CheckViewLayout( nullptr, nullptr ); - OSL_ENSURE( !GetUpper() || GetUpper()->Prt().Width() >= maFrm.Width(), + OSL_ENSURE( !GetUpper() || GetUpper()->Prt().Width() >= maFrame.Width(), "Upper (Root) must be wide enough to contain the widest page"); } -void SwLayoutFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) +void SwLayoutFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/) { PROTOCOL_ENTER( this, PROT_MAKEALL, 0, nullptr ) @@ -841,7 +841,7 @@ void SwLayoutFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) const SwLayNotify aNotify( this ); bool bVert = IsVertical(); - SwRectFn fnRect = ( IsNeighbourFrm() == bVert )? fnRectHori : ( IsVertLR() ? fnRectVertL2R : fnRectVert ); + SwRectFn fnRect = ( IsNeighbourFrame() == bVert )? fnRectHori : ( IsVertLR() ? fnRectVertL2R : fnRectVert ); std::unique_ptr<SwBorderAttrAccess> pAccess; const SwBorderAttrs*pAttrs = nullptr; @@ -867,32 +867,32 @@ void SwLayoutFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) mbValidPrtArea = false; SwTwips nPrtWidth = (GetUpper()->Prt().*fnRect->fnGetWidth)(); - if( bVert && ( IsBodyFrm() || IsFootnoteContFrm() ) ) + if( bVert && ( IsBodyFrame() || IsFootnoteContFrame() ) ) { - SwFrm* pNxt = GetPrev(); - while( pNxt && !pNxt->IsHeaderFrm() ) + SwFrame* pNxt = GetPrev(); + while( pNxt && !pNxt->IsHeaderFrame() ) pNxt = pNxt->GetPrev(); if( pNxt ) - nPrtWidth -= pNxt->Frm().Height(); + nPrtWidth -= pNxt->Frame().Height(); pNxt = GetNext(); - while( pNxt && !pNxt->IsFooterFrm() ) + while( pNxt && !pNxt->IsFooterFrame() ) pNxt = pNxt->GetNext(); if( pNxt ) - nPrtWidth -= pNxt->Frm().Height(); + nPrtWidth -= pNxt->Frame().Height(); } - const long nDiff = nPrtWidth - (Frm().*fnRect->fnGetWidth)(); + const long nDiff = nPrtWidth - (Frame().*fnRect->fnGetWidth)(); - if( IsNeighbourFrm() && IsRightToLeft() ) - (Frm().*fnRect->fnSubLeft)( nDiff ); + if( IsNeighbourFrame() && IsRightToLeft() ) + (Frame().*fnRect->fnSubLeft)( nDiff ); else - (Frm().*fnRect->fnAddRight)( nDiff ); + (Frame().*fnRect->fnAddRight)( nDiff ); } else { // Don't leave your upper const SwTwips nDeadLine = (GetUpper()->*fnRect->fnGetPrtBottom)(); - if( (Frm().*fnRect->fnOverStep)( nDeadLine ) ) + if( (Frame().*fnRect->fnOverStep)( nDeadLine ) ) mbValidSize = false; } } @@ -902,10 +902,10 @@ void SwLayoutFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) { if ( !pAccess ) { - pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrm::GetCache(), this); + pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrame::GetCache(), this); pAttrs = pAccess->Get(); } - Format( getRootFrm()->GetCurrShell()->GetOut(), pAttrs ); + Format( getRootFrame()->GetCurrShell()->GetOut(), pAttrs ); } } //while ( !mbValidPos || !mbValidSize || !mbValidPrtArea ) } @@ -922,7 +922,7 @@ bool SwTextNode::IsCollapse() const // The paragraph is collapsed only if the NdAfter is the end of a cell bool bInTable = this->FindTableNode( ) != nullptr; - SwSortedObjs* pObjs = this->getLayoutFrm( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() )->GetDrawObjs( ); + SwSortedObjs* pObjs = this->getLayoutFrame( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() )->GetDrawObjs( ); const size_t nObjs = ( pObjs != nullptr ) ? pObjs->size( ) : 0; return pNdBefore!=nullptr && pNdAfter!=nullptr && nObjs == 0 && bInTable; @@ -931,17 +931,17 @@ bool SwTextNode::IsCollapse() const return false; } -bool SwFrm::IsCollapse() const +bool SwFrame::IsCollapse() const { - if (!IsTextFrm()) + if (!IsTextFrame()) return false; - const SwTextFrm *pTextFrm = static_cast<const SwTextFrm*>(this); - const SwTextNode *pTextNode = pTextFrm->GetTextNode(); + const SwTextFrame *pTextFrame = static_cast<const SwTextFrame*>(this); + const SwTextNode *pTextNode = pTextFrame->GetTextNode(); return pTextNode && pTextNode->IsCollapse(); } -bool SwContentFrm::MakePrtArea( const SwBorderAttrs &rAttrs ) +bool SwContentFrame::MakePrtArea( const SwBorderAttrs &rAttrs ) { bool bSizeChgd = false; @@ -950,24 +950,24 @@ bool SwContentFrm::MakePrtArea( const SwBorderAttrs &rAttrs ) mbValidPrtArea = true; SWRECTFN( this ) - const bool bTextFrm = IsTextFrm(); + const bool bTextFrame = IsTextFrame(); SwTwips nUpper = 0; - if ( bTextFrm && static_cast<SwTextFrm*>(this)->IsHiddenNow() ) + if ( bTextFrame && static_cast<SwTextFrame*>(this)->IsHiddenNow() ) { - if ( static_cast<SwTextFrm*>(this)->HasFollow() ) - static_cast<SwTextFrm*>(this)->JoinFrm(); + if ( static_cast<SwTextFrame*>(this)->HasFollow() ) + static_cast<SwTextFrame*>(this)->JoinFrame(); if( (Prt().*fnRect->fnGetHeight)() ) - static_cast<SwTextFrm*>(this)->HideHidden(); + static_cast<SwTextFrame*>(this)->HideHidden(); Prt().Pos().setX(0); Prt().Pos().setY(0); - (Prt().*fnRect->fnSetWidth)( (Frm().*fnRect->fnGetWidth)() ); + (Prt().*fnRect->fnSetWidth)( (Frame().*fnRect->fnGetWidth)() ); (Prt().*fnRect->fnSetHeight)( 0 ); - nUpper = -( (Frm().*fnRect->fnGetHeight)() ); + nUpper = -( (Frame().*fnRect->fnGetHeight)() ); } else { - // Simplification: ContentFrms are always variable in height! + // Simplification: ContentFrames are always variable in height! // At the FixSize, the surrounding Frame enforces the size; // the borders are simply subtracted. @@ -975,15 +975,15 @@ bool SwContentFrm::MakePrtArea( const SwBorderAttrs &rAttrs ) const long nRight = rAttrs.CalcRight( this ); (this->*fnRect->fnSetXMargins)( nLeft, nRight ); - SwViewShell *pSh = getRootFrm()->GetCurrShell(); + SwViewShell *pSh = getRootFrame()->GetCurrShell(); SwTwips nWidthArea; if( pSh && 0!=(nWidthArea=(pSh->VisArea().*fnRect->fnGetWidth)()) && - GetUpper()->IsPageBodyFrm() && // but not for BodyFrms in Columns + GetUpper()->IsPageBodyFrame() && // but not for BodyFrames in Columns pSh->GetViewOptions()->getBrowseMode() ) { // Do not protrude the edge of the visible area. The page may be // wider, because there may be objects with excess width - // (RootFrm::ImplCalcBrowseWidth()) + // (RootFrame::ImplCalcBrowseWidth()) long nMinWidth = 0; for (size_t i = 0; GetDrawObjs() && i < GetDrawObjs()->size(); ++i) @@ -992,9 +992,9 @@ bool SwContentFrm::MakePrtArea( const SwBorderAttrs &rAttrs ) // <SwSortedObjs> entries SwAnchoredObject* pObj = (*GetDrawObjs())[i]; const SwFrameFormat& rFormat = pObj->GetFrameFormat(); - const bool bFly = dynamic_cast<const SwFlyFrm*>( pObj) != nullptr; + const bool bFly = dynamic_cast<const SwFlyFrame*>( pObj) != nullptr; if ((bFly && (FAR_AWAY == pObj->GetObjRect().Width())) - || rFormat.GetFrmSize().GetWidthPercent()) + || rFormat.GetFrameSize().GetWidthPercent()) { continue; } @@ -1002,7 +1002,7 @@ bool SwContentFrm::MakePrtArea( const SwBorderAttrs &rAttrs ) if ( FLY_AS_CHAR == rFormat.GetAnchor().GetAnchorId() ) { nMinWidth = std::max( nMinWidth, - bFly ? rFormat.GetFrmSize().GetWidth() + bFly ? rFormat.GetFrameSize().GetWidth() : pObj->GetObjRect().Width() ); } } @@ -1021,8 +1021,8 @@ bool SwContentFrm::MakePrtArea( const SwBorderAttrs &rAttrs ) // The PrtArea should already be at least MINLAY wide, matching the // minimal values of the UI (Prt().*fnRect->fnSetWidth)( std::min( long(MINLAY), - (Frm().*fnRect->fnGetWidth)() ) ); - SwTwips nTmp = (Frm().*fnRect->fnGetWidth)() - + (Frame().*fnRect->fnGetWidth)() ) ); + SwTwips nTmp = (Frame().*fnRect->fnGetWidth)() - (Prt().*fnRect->fnGetWidth)(); if( (Prt().*fnRect->fnGetLeft)() > nTmp ) (Prt().*fnRect->fnSetLeft)( nTmp ); @@ -1037,7 +1037,7 @@ bool SwContentFrm::MakePrtArea( const SwBorderAttrs &rAttrs ) // that are given by UL- and LRSpace. There might be a spacing // in all directions however; this may be caused by borders // and / or shadows. - // 4. The spacing for TextFrms corresponds to the interline lead, + // 4. The spacing for TextFrames corresponds to the interline lead, // at a minimum. nUpper = CalcUpperSpace( &rAttrs ); @@ -1050,7 +1050,7 @@ bool SwContentFrm::MakePrtArea( const SwBorderAttrs &rAttrs ) (Prt().*fnRect->fnSetPosY)( (!bVert || mbReverse) ? nUpper : nLower); nUpper += nLower; - nUpper -= (Frm().*fnRect->fnGetHeight)() - + nUpper -= (Frame().*fnRect->fnGetHeight)() - (Prt().*fnRect->fnGetHeight)(); } // If there's a difference between old and new size, call Grow() or @@ -1058,9 +1058,9 @@ bool SwContentFrm::MakePrtArea( const SwBorderAttrs &rAttrs ) if ( nUpper ) { if ( nUpper > 0 ) - GrowFrm( nUpper ); + GrowFrame( nUpper ); else - ShrinkFrm( -nUpper ); + ShrinkFrame( -nUpper ); bSizeChgd = true; } } @@ -1071,19 +1071,19 @@ bool SwContentFrm::MakePrtArea( const SwBorderAttrs &rAttrs ) // - loop prevention const int cnStopFormat = 15; -inline void ValidateSz( SwFrm *pFrm ) +inline void ValidateSz( SwFrame *pFrame ) { - if ( pFrm ) + if ( pFrame ) { - pFrm->mbValidSize = true; - pFrm->mbValidPrtArea = true; + pFrame->mbValidSize = true; + pFrame->mbValidPrtArea = true; } } -void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) +void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/) { OSL_ENSURE( GetUpper(), "no Upper?" ); - OSL_ENSURE( IsTextFrm(), "MakeAll(), NoText" ); + OSL_ENSURE( IsTextFrame(), "MakeAll(), NoText" ); if ( !IsFollow() && StackHack::IsLocked() ) return; @@ -1091,13 +1091,13 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) if ( IsJoinLocked() ) return; - OSL_ENSURE( !static_cast<SwTextFrm*>(this)->IsSwapped(), "Calculation of a swapped frame" ); + OSL_ENSURE( !static_cast<SwTextFrame*>(this)->IsSwapped(), "Calculation of a swapped frame" ); StackHack aHack; - if ( static_cast<SwTextFrm*>(this)->IsLocked() ) + if ( static_cast<SwTextFrame*>(this)->IsLocked() ) { - OSL_FAIL( "Format for locked TextFrm." ); + OSL_FAIL( "Format for locked TextFrame." ); return; } @@ -1131,12 +1131,12 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) bool bMakePage = true; // bMovedBwd gets set to true when the frame flows backwards bool bMovedBwd = false; - // as long as bMovedFwd is false, the Frm may flow backwards (until + // as long as bMovedFwd is false, the Frame may flow backwards (until // it has been moved forward once) bool bMovedFwd = false; sal_Bool bFormatted = sal_False; // For the widow/orphan rules, we encourage the - // last ContentFrm of a chain to format. This only - // needs to happen once. Every time the Frm is + // last ContentFrame of a chain to format. This only + // needs to happen once. Every time the Frame is // moved, the flag will have to be reset. bool bMustFit = false; // Once the emergency brake is pulled, // no other prepares will be triggered @@ -1149,10 +1149,10 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) const bool bTab = IsInTab(); const bool bFootnote = IsInFootnote(); const bool bSct = IsInSct(); - Point aOldFrmPos; // This is so we can compare with the last pos + Point aOldFramePos; // This is so we can compare with the last pos Point aOldPrtPos; // and determine whether it makes sense to Prepare - SwBorderAttrAccess aAccess( SwFrm::GetCache(), this ); + SwBorderAttrAccess aAccess( SwFrame::GetCache(), this ); const SwBorderAttrs &rAttrs = *aAccess.Get(); // OD 2004-02-26 #i25029# @@ -1166,42 +1166,42 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) SwSaveFootnoteHeight *pSaveFootnote = nullptr; if ( bFootnote ) { - SwFootnoteFrm *pFootnote = FindFootnoteFrm(); - SwSectionFrm* pSct = pFootnote->FindSctFrm(); - if ( !static_cast<SwTextFrm*>(pFootnote->GetRef())->IsLocked() ) + SwFootnoteFrame *pFootnote = FindFootnoteFrame(); + SwSectionFrame* pSct = pFootnote->FindSctFrame(); + if ( !static_cast<SwTextFrame*>(pFootnote->GetRef())->IsLocked() ) { - SwFootnoteBossFrm* pBoss = pFootnote->GetRef()->FindFootnoteBossFrm( + SwFootnoteBossFrame* pBoss = pFootnote->GetRef()->FindFootnoteBossFrame( pFootnote->GetAttr()->GetFootnote().IsEndNote() ); if( !pSct || pSct->IsColLocked() || !pSct->Growable() ) pSaveFootnote = new SwSaveFootnoteHeight( pBoss, - static_cast<SwTextFrm*>(pFootnote->GetRef())->GetFootnoteLine( pFootnote->GetAttr() ) ); + static_cast<SwTextFrame*>(pFootnote->GetRef())->GetFootnoteLine( pFootnote->GetAttr() ) ); } } - if ( GetUpper()->IsSctFrm() && + if ( GetUpper()->IsSctFrame() && HasFollow() && - &GetFollow()->GetFrm() == GetNext() ) + &GetFollow()->GetFrame() == GetNext() ) { - dynamic_cast<SwTextFrm&>(*this).JoinFrm(); + dynamic_cast<SwTextFrame&>(*this).JoinFrame(); } // #i28701# - move master forward, if it has to move, // because of its object positioning. - if ( !static_cast<SwTextFrm*>(this)->IsFollow() ) + if ( !static_cast<SwTextFrame*>(this)->IsFollow() ) { sal_uInt32 nToPageNum = 0L; - const bool bMoveFwdByObjPos = SwLayouter::FrmMovedFwdByObjPos( + const bool bMoveFwdByObjPos = SwLayouter::FrameMovedFwdByObjPos( *(GetAttrSet()->GetDoc()), - *(static_cast<SwTextFrm*>(this)), + *(static_cast<SwTextFrame*>(this)), nToPageNum ); // #i58182# // Also move a paragraph forward, which is the first one inside a table cell. if ( bMoveFwdByObjPos && - FindPageFrm()->GetPhyPageNum() < nToPageNum && + FindPageFrame()->GetPhyPageNum() < nToPageNum && ( lcl_Prev( this ) || - GetUpper()->IsCellFrm() || - ( GetUpper()->IsSctFrm() && - GetUpper()->GetUpper()->IsCellFrm() ) ) && + GetUpper()->IsCellFrame() || + ( GetUpper()->IsSctFrame() && + GetUpper()->GetUpper()->IsCellFrame() ) ) && IsMoveable() ) { bMovedFwd = true; @@ -1211,7 +1211,7 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) // If a Follow sits next to it's Master and doesn't fit, we know it can // be moved right now. - if ( lcl_Prev( this ) && static_cast<SwTextFrm*>(this)->IsFollow() && IsMoveable() ) + if ( lcl_Prev( this ) && static_cast<SwTextFrame*>(this)->IsFollow() && IsMoveable() ) { bMovedFwd = true; // OD 2004-03-02 #106629# - If follow frame is in table, it's master @@ -1229,12 +1229,12 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) // reference, it can be moved forward. if ( bFootnote && !mbValidPos ) { - SwFootnoteFrm* pFootnote = FindFootnoteFrm(); - SwContentFrm* pRefCnt = pFootnote ? pFootnote->GetRef() : nullptr; + SwFootnoteFrame* pFootnote = FindFootnoteFrame(); + SwContentFrame* pRefCnt = pFootnote ? pFootnote->GetRef() : nullptr; if ( pRefCnt && !pRefCnt->IsValid() ) { - SwFootnoteBossFrm* pFootnoteBossOfFootnote = pFootnote->FindFootnoteBossFrm(); - SwFootnoteBossFrm* pFootnoteBossOfRef = pRefCnt->FindFootnoteBossFrm(); + SwFootnoteBossFrame* pFootnoteBossOfFootnote = pFootnote->FindFootnoteBossFrame(); + SwFootnoteBossFrame* pFootnoteBossOfRef = pRefCnt->FindFootnoteBossFrame(); //<loop of movefwd until condition held or no move> if ( pFootnoteBossOfFootnote && pFootnoteBossOfRef && pFootnoteBossOfFootnote != pFootnoteBossOfRef && @@ -1253,11 +1253,11 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) while ( !mbValidPos || !mbValidSize || !mbValidPrtArea ) { // - loop prevention - SwRect aOldFrm_StopFormat( Frm() ); + SwRect aOldFrame_StopFormat( Frame() ); SwRect aOldPrt_StopFormat( Prt() ); if ( (bMoveable = IsMoveable()) ) { - SwFrm *pPre = GetIndPrev(); + SwFrame *pPre = GetIndPrev(); if ( CheckMoveFwd( bMakePage, bKeep, bMovedBwd ) ) { SWREFRESHFN( this ) @@ -1270,14 +1270,14 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) GetUpper()->ResetCompletePaint(); // The predecessor was invalidated, so this is obsolete as well now. OSL_ENSURE( pPre, "missing old Prev" ); - if( !pPre->IsSctFrm() ) + if( !pPre->IsSctFrame() ) ::ValidateSz( pPre ); } bMoveable = IsMoveable(); } } - aOldFrmPos = (Frm().*fnRect->fnGetPos)(); + aOldFramePos = (Frame().*fnRect->fnGetPos)(); aOldPrtPos = (Prt().*fnRect->fnGetPos)(); if ( !mbValidPos ) @@ -1295,23 +1295,23 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) // frame area width changes its width from 0 to something greater // than 0. // Note: A text frame can be in such a situation, if the format is - // triggered by method call <SwCrsrShell::SetCrsr()> after + // triggered by method call <SwCursorShell::SetCursor()> after // loading the document. - const SwTwips nNewFrmWidth = (GetUpper()->Prt().*fnRect->fnGetWidth)(); - if ( mbValidPrtArea && nNewFrmWidth > 0 && - (Frm().*fnRect->fnGetWidth)() == 0 && + const SwTwips nNewFrameWidth = (GetUpper()->Prt().*fnRect->fnGetWidth)(); + if ( mbValidPrtArea && nNewFrameWidth > 0 && + (Frame().*fnRect->fnGetWidth)() == 0 && (Prt().*fnRect->fnGetWidth)() == 0 ) { mbValidPrtArea = false; } - (Frm().*fnRect->fnSetWidth)( nNewFrmWidth ); + (Frame().*fnRect->fnSetWidth)( nNewFrameWidth ); // When a lower of a vertically aligned fly frame changes its size we need to recalculate content pos. - if( GetUpper() && GetUpper()->IsFlyFrm() && + if( GetUpper() && GetUpper()->IsFlyFrame() && GetUpper()->GetFormat()->GetTextVertAdjust().GetValue() != SDRTEXTVERTADJUST_TOP ) { - static_cast<SwFlyFrm*>(GetUpper())->InvalidateContentPos(); + static_cast<SwFlyFrame*>(GetUpper())->InvalidateContentPos(); GetUpper()->SetCompletePaint(); } } @@ -1319,29 +1319,29 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) { const long nOldW = (Prt().*fnRect->fnGetWidth)(); // #i34730# - keep current frame height - const SwTwips nOldH = (Frm().*fnRect->fnGetHeight)(); + const SwTwips nOldH = (Frame().*fnRect->fnGetHeight)(); MakePrtArea( rAttrs ); if ( nOldW != (Prt().*fnRect->fnGetWidth)() ) Prepare( PREP_FIXSIZE_CHG ); // #i34730# - check, if frame height has changed. // If yes, send a PREP_ADJUST_FRM and invalidate the size flag to // force a format. The format will check in its method - // <SwTextFrm::CalcPreps()>, if the already formatted lines still + // <SwTextFrame::CalcPreps()>, if the already formatted lines still // fit and if not, performs necessary actions. // #i40150# - no check, if frame is undersized. if ( mbValidSize && !IsUndersized() && - nOldH != (Frm().*fnRect->fnGetHeight)() ) + nOldH != (Frame().*fnRect->fnGetHeight)() ) { // #115759# - no PREP_ADJUST_FRM and size // invalidation, if height decreases only by the additional // lower space as last content of a table cell and an existing // follow containing one line exists. - const SwTwips nHDiff = nOldH - (Frm().*fnRect->fnGetHeight)(); - const bool bNoPrepAdjustFrm = + const SwTwips nHDiff = nOldH - (Frame().*fnRect->fnGetHeight)(); + const bool bNoPrepAdjustFrame = nHDiff > 0 && IsInTab() && GetFollow() && - ( 1 == static_cast<SwTextFrm*>(GetFollow())->GetLineCount( COMPLETE_STRING ) || (static_cast<SwTextFrm*>(GetFollow())->Frm().*fnRect->fnGetWidth)() < 0 ) && + ( 1 == static_cast<SwTextFrame*>(GetFollow())->GetLineCount( COMPLETE_STRING ) || (static_cast<SwTextFrame*>(GetFollow())->Frame().*fnRect->fnGetWidth)() < 0 ) && GetFollow()->CalcAddLowerSpaceAsLastInTableCell() == nHDiff; - if ( !bNoPrepAdjustFrm ) + if ( !bNoPrepAdjustFrame ) { Prepare( PREP_ADJUST_FRM ); mbValidSize = false; @@ -1349,7 +1349,7 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) } } - // To make the widow and orphan rules work, we need to notify the ContentFrm. + // To make the widow and orphan rules work, we need to notify the ContentFrame. // Criteria: // - It needs to be movable (otherwise, splitting doesn't make sense) // - It needs to overlap with the lower edge of the PrtArea of the Upper @@ -1358,12 +1358,12 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) bool bWidow = true; const SwTwips nDeadLine = (GetUpper()->*fnRect->fnGetPrtBottom)(); if ( bMoveable && !bFormatted && ( GetFollow() || - ( (Frm().*fnRect->fnOverStep)( nDeadLine ) ) ) ) + ( (Frame().*fnRect->fnOverStep)( nDeadLine ) ) ) ) { Prepare( PREP_WIDOWS_ORPHANS, nullptr, false ); mbValidSize = bWidow = false; } - if( (Frm().*fnRect->fnGetPos)() != aOldFrmPos || + if( (Frame().*fnRect->fnGetPos)() != aOldFramePos || (Prt().*fnRect->fnGetPos)() != aOldPrtPos ) { // In this Prepare, an _InvalidateSize() might happen. @@ -1388,12 +1388,12 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) // without change occur. if ( nConsecutiveFormatsWithoutChange <= cnStopFormat ) { - Format(getRootFrm()->GetCurrShell()->GetOut()); + Format(getRootFrame()->GetCurrShell()->GetOut()); } #if OSL_DEBUG_LEVEL > 0 else { - OSL_FAIL( "debug assertion: <SwContentFrm::MakeAll()> - format of text frame suppressed by fix b6448963" ); + OSL_FAIL( "debug assertion: <SwContentFrame::MakeAll()> - format of text frame suppressed by fix b6448963" ); } #endif } @@ -1406,7 +1406,7 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) if ( !lcl_Prev( this ) && !bMovedFwd && ( bMoveable || ( bFly && !bTab ) ) && - ( !bFootnote || !GetUpper()->FindFootnoteFrm()->GetPrev() ) + ( !bFootnote || !GetUpper()->FindFootnoteFrame()->GetPrev() ) && MoveBwd( bDummy ) ) { SWREFRESHFN( this ) @@ -1420,14 +1420,14 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) bMoveable = IsMoveable(); SWREFRESHFN( this ) } - Point aOldPos = (Frm().*fnRect->fnGetPos)(); + Point aOldPos = (Frame().*fnRect->fnGetPos)(); MakePos(); - if( aOldPos != (Frm().*fnRect->fnGetPos)() ) + if( aOldPos != (Frame().*fnRect->fnGetPos)() ) { Prepare( PREP_POS_CHGD, static_cast<const void*>(&bFormatted), false ); if ( !mbValidSize ) { - (Frm().*fnRect->fnSetWidth)( (GetUpper()-> + (Frame().*fnRect->fnSetWidth)( (GetUpper()-> Prt().*fnRect->fnGetWidth)() ); if ( !mbValidPrtArea ) { @@ -1440,15 +1440,15 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) Prepare( PREP_WIDOWS_ORPHANS, nullptr, false ); mbValidSize = true; bFormatted = sal_True; - Format(getRootFrm()->GetCurrShell()->GetOut()); + Format(getRootFrame()->GetCurrShell()->GetOut()); } } - SwFrm *pNxt = HasFollow() ? nullptr : FindNext(); - while( pNxt && pNxt->IsSctFrm() ) + SwFrame *pNxt = HasFollow() ? nullptr : FindNext(); + while( pNxt && pNxt->IsSctFrame() ) { // Leave empty sections out, go into the other ones. - if( static_cast<SwSectionFrm*>(pNxt)->GetSection() ) + if( static_cast<SwSectionFrame*>(pNxt)->GetSection() ) { - SwFrm* pTmp = static_cast<SwSectionFrm*>(pNxt)->ContainsAny(); + SwFrame* pTmp = static_cast<SwSectionFrame*>(pNxt)->ContainsAny(); if( pTmp ) { pNxt = pTmp; @@ -1459,13 +1459,13 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) } if ( pNxt ) { - pNxt->Calc(getRootFrm()->GetCurrShell()->GetOut()); + pNxt->Calc(getRootFrame()->GetCurrShell()->GetOut()); if( mbValidPos && !GetIndNext() ) { - SwSectionFrm *pSct = FindSctFrm(); + SwSectionFrame *pSct = FindSctFrame(); if( pSct && !pSct->GetValidSizeFlag() ) { - SwSectionFrm* pNxtSct = pNxt->FindSctFrm(); + SwSectionFrame* pNxtSct = pNxt->FindSctFrame(); if( pNxtSct && pSct->IsAnFollow( pNxtSct ) ) mbValidPos = false; } @@ -1476,7 +1476,7 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) } } - // In footnotes, the TextFrm may validate itself, which can lead to the + // In footnotes, the TextFrame may validate itself, which can lead to the // situation that it's position is wrong despite being "valid". if ( mbValidPos ) { @@ -1493,14 +1493,14 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) { mbValidPos = false; MakePos(); - aOldFrmPos = (Frm().*fnRect->fnGetPos)(); + aOldFramePos = (Frame().*fnRect->fnGetPos)(); aOldPrtPos = (Prt().*fnRect->fnGetPos)(); } } // - loop prevention { - if ( aOldFrm_StopFormat == Frm() && + if ( aOldFrame_StopFormat == Frame() && aOldPrt_StopFormat == Prt() ) { ++nConsecutiveFormatsWithoutChange; @@ -1517,10 +1517,10 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) // Done? // Attention: because height == 0, it's better to use Top()+Height() instead of - // Bottom(). This might happen with undersized TextFrms on the lower edge of a + // Bottom(). This might happen with undersized TextFrames on the lower edge of a // multi-column section const long nPrtBottom = (GetUpper()->*fnRect->fnGetPrtBottom)(); - const long nBottomDist = (Frm().*fnRect->fnBottomDist)( nPrtBottom ); + const long nBottomDist = (Frame().*fnRect->fnBottomDist)( nPrtBottom ); if( nBottomDist >= 0 ) { if ( bKeep && bMoveable ) @@ -1533,14 +1533,14 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) // bMoveFwdInvalid is required for #38407#. This was originally solved // in flowfrm.cxx rev 1.38, but broke the above schema and // preferred to play towers of hanoi (#43669#). - SwFrm *pNxt = HasFollow() ? nullptr : FindNext(); + SwFrame *pNxt = HasFollow() ? nullptr : FindNext(); // For sections we prefer the content, because it can change // the page if required. - while( pNxt && pNxt->IsSctFrm() ) + while( pNxt && pNxt->IsSctFrame() ) { - if( static_cast<SwSectionFrm*>(pNxt)->GetSection() ) + if( static_cast<SwSectionFrame*>(pNxt)->GetSection() ) { - pNxt = static_cast<SwSectionFrm*>(pNxt)->ContainsAny(); + pNxt = static_cast<SwSectionFrame*>(pNxt)->ContainsAny(); break; } pNxt = pNxt->FindNext(); @@ -1550,9 +1550,9 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) const bool bMoveFwdInvalid = nullptr != GetIndNext(); const bool bNxtNew = ( 0 == (pNxt->Prt().*fnRect->fnGetHeight)() ) && - (!pNxt->IsTextFrm() ||!static_cast<SwTextFrm*>(pNxt)->IsHiddenNow()); + (!pNxt->IsTextFrame() ||!static_cast<SwTextFrame*>(pNxt)->IsHiddenNow()); - pNxt->Calc(getRootFrm()->GetCurrShell()->GetOut()); + pNxt->Calc(getRootFrame()->GetCurrShell()->GetOut()); if ( !bMovedBwd && ((bMoveFwdInvalid && !GetIndNext()) || @@ -1570,14 +1570,14 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) // I don't fit into my parents, so it's time to make changes // as constructively as possible. - //If I'm NOT allowed to leave the parent Frm, I've got a problem. + //If I'm NOT allowed to leave the parent Frame, I've got a problem. // Following Arthur Dent, we do the only thing that you can do with // an unsolvable problem: We ignore it with all our power. if ( !bMoveable || IsUndersized() ) { if( !bMoveable && IsInTab() ) { - long nDiff = -(Frm().*fnRect->fnBottomDist)( + long nDiff = -(Frame().*fnRect->fnBottomDist)( (GetUpper()->*fnRect->fnGetPrtBottom)() ); long nReal = GetUpper()->Grow( nDiff ); if( nReal ) @@ -1593,13 +1593,13 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) // as well. // If I'm unable to split (WouldFit()) and can't be fitted, I'm going - // to tell my TextFrm part that, if possible, we still need to split despite + // to tell my TextFrame part that, if possible, we still need to split despite // the "don't split" attribute. bool bMoveOrFit = false; bool bDontMoveMe = !GetIndPrev(); if( bDontMoveMe && IsInSct() ) { - SwFootnoteBossFrm* pBoss = FindFootnoteBossFrm(); + SwFootnoteBossFrame* pBoss = FindFootnoteBossFrame(); bDontMoveMe = !pBoss->IsInSct() || ( !pBoss->Lower()->GetNext() && !pBoss->GetPrev() ); } @@ -1610,7 +1610,7 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) nullptr != GetNextCellLeaf( MAKEPAGE_NONE ) ) bDontMoveMe = false; - if ( bDontMoveMe && (Frm().*fnRect->fnGetHeight)() > + if ( bDontMoveMe && (Frame().*fnRect->fnGetHeight)() > (GetUpper()->Prt().*fnRect->fnGetHeight)() ) { if ( !bFitPromise ) @@ -1626,7 +1626,7 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) continue; } /* - * In earlier days, we never tried to fit TextFrms in + * In earlier days, we never tried to fit TextFrames in * frames and sections using bMoveOrFit by ignoring * its attributes (Widows, Keep). * This should have been done at least for column frames; @@ -1635,38 +1635,38 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) * the attributes. */ else if ( !bFootnote && bMoveable && - ( !bFly || !FindFlyFrm()->IsColLocked() ) && - ( !bSct || !FindSctFrm()->IsColLocked() ) ) + ( !bFly || !FindFlyFrame()->IsColLocked() ) && + ( !bSct || !FindSctFrame()->IsColLocked() ) ) bMoveOrFit = true; } #if OSL_DEBUG_LEVEL > 0 else { - OSL_FAIL( "+TextFrm didn't respect WouldFit promise." ); + OSL_FAIL( "+TextFrame didn't respect WouldFit promise." ); } #endif } // Let's see if I can find some space somewhere... // footnotes in the neighbourhood are moved into _MoveFootnoteCntFwd - SwFrm *pPre = GetIndPrev(); - SwFrm *pOldUp = GetUpper(); + SwFrame *pPre = GetIndPrev(); + SwFrame *pOldUp = GetUpper(); /* MA 13. Oct. 98: What is this supposed to be!? - * AMA 14. Dec 98: If a column section can't find any space for its first ContentFrm, it should be + * AMA 14. Dec 98: If a column section can't find any space for its first ContentFrame, it should be * moved not only to the next column, but probably even to the next page, creating * a section-follow there. */ - if( IsInSct() && bMovedFwd && bMakePage && pOldUp->IsColBodyFrm() && - pOldUp->GetUpper()->GetUpper()->IsSctFrm() && + if( IsInSct() && bMovedFwd && bMakePage && pOldUp->IsColBodyFrame() && + pOldUp->GetUpper()->GetUpper()->IsSctFrame() && ( pPre || pOldUp->GetUpper()->GetPrev() ) && - static_cast<SwSectionFrm*>(pOldUp->GetUpper()->GetUpper())->MoveAllowed(this) ) + static_cast<SwSectionFrame*>(pOldUp->GetUpper()->GetUpper())->MoveAllowed(this) ) { bMovedFwd = false; } - const bool bCheckForGrownBody = pOldUp->IsBodyFrm(); - const long nOldBodyHeight = (pOldUp->Frm().*fnRect->fnGetHeight)(); + const bool bCheckForGrownBody = pOldUp->IsBodyFrame(); + const long nOldBodyHeight = (pOldUp->Frame().*fnRect->fnGetHeight)(); if ( !bMovedFwd && !MoveFwd( bMakePage, false ) ) bMakePage = false; @@ -1679,7 +1679,7 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) // If pOldUp was a footnote frame, it has been deleted inside MoveFwd. // Therefore we only check for growing body frames. if ( bCheckForGrownBody && ! bMovedBwd && pOldUp != GetUpper() && - (pOldUp->Frm().*fnRect->fnGetHeight)() > nOldBodyHeight ) + (pOldUp->Frame().*fnRect->fnGetHeight)() > nOldBodyHeight ) { bMovedFwd = false; } @@ -1701,13 +1701,13 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) } #if OSL_DEBUG_LEVEL > 0 - OSL_FAIL( "LoopControl in SwContentFrm::MakeAll" ); + OSL_FAIL( "LoopControl in SwContentFrame::MakeAll" ); #endif } if ( bMovedBwd && GetUpper() ) { // Retire invalidations that have become useless. GetUpper()->ResetCompletePaint(); - if( pPre && !pPre->IsSctFrm() ) + if( pPre && !pPre->IsSctFrame() ) ::ValidateSz( pPre ); } @@ -1718,7 +1718,7 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) LOOPING_LOUIE_LIGHT( bMovedFwd && bMovedBwd && !IsInBalancedSection() && ( - ( bFootnote && !FindFootnoteFrm()->GetRef()->IsInSct() ) || + ( bFootnote && !FindFootnoteFrame()->GetRef()->IsInSct() ) || // #i33887# ( IsInSct() && bKeep ) @@ -1726,7 +1726,7 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) // ... add your conditions here ... ), - static_cast<SwTextFrm&>(*this) ); + static_cast<SwTextFrame&>(*this) ); delete pSaveFootnote; @@ -1744,92 +1744,92 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) SetFlyLock( false ); } -void MakeNxt( SwFrm *pFrm, SwFrm *pNxt ) +void MakeNxt( SwFrame *pFrame, SwFrame *pNxt ) { // fix(25455): Validate, otherwise this leads to a recursion. - // The first try, cancelling with pFrm = 0 if !Valid, leads to a problem, as + // The first try, cancelling with pFrame = 0 if !Valid, leads to a problem, as // the Keep may not be considered properly anymore (27417). - const bool bOldPos = pFrm->GetValidPosFlag(); - const bool bOldSz = pFrm->GetValidSizeFlag(); - const bool bOldPrt = pFrm->GetValidPrtAreaFlag(); - pFrm->mbValidPos = pFrm->mbValidPrtArea = pFrm->mbValidSize = true; + const bool bOldPos = pFrame->GetValidPosFlag(); + const bool bOldSz = pFrame->GetValidSizeFlag(); + const bool bOldPrt = pFrame->GetValidPrtAreaFlag(); + pFrame->mbValidPos = pFrame->mbValidPrtArea = pFrame->mbValidSize = true; - // fix(29272): Don't call MakeAll - there, pFrm might be invalidated again, and + // fix(29272): Don't call MakeAll - there, pFrame might be invalidated again, and // we recursively end up in here again. - if ( pNxt->IsContentFrm() ) + if ( pNxt->IsContentFrame() ) { - SwContentNotify aNotify( static_cast<SwContentFrm*>(pNxt) ); - SwBorderAttrAccess aAccess( SwFrm::GetCache(), pNxt ); + SwContentNotify aNotify( static_cast<SwContentFrame*>(pNxt) ); + SwBorderAttrAccess aAccess( SwFrame::GetCache(), pNxt ); const SwBorderAttrs &rAttrs = *aAccess.Get(); if ( !pNxt->GetValidSizeFlag() ) { if( pNxt->IsVertical() ) - pNxt->Frm().Height( pNxt->GetUpper()->Prt().Height() ); + pNxt->Frame().Height( pNxt->GetUpper()->Prt().Height() ); else - pNxt->Frm().Width( pNxt->GetUpper()->Prt().Width() ); + pNxt->Frame().Width( pNxt->GetUpper()->Prt().Width() ); } - static_cast<SwContentFrm*>(pNxt)->MakePrtArea( rAttrs ); - pNxt->Format( pNxt->getRootFrm()->GetCurrShell()->GetOut(), &rAttrs ); + static_cast<SwContentFrame*>(pNxt)->MakePrtArea( rAttrs ); + pNxt->Format( pNxt->getRootFrame()->GetCurrShell()->GetOut(), &rAttrs ); } else { - SwLayNotify aNotify( static_cast<SwLayoutFrm*>(pNxt) ); - SwBorderAttrAccess aAccess( SwFrm::GetCache(), pNxt ); + SwLayNotify aNotify( static_cast<SwLayoutFrame*>(pNxt) ); + SwBorderAttrAccess aAccess( SwFrame::GetCache(), pNxt ); const SwBorderAttrs &rAttrs = *aAccess.Get(); if ( !pNxt->GetValidSizeFlag() ) { if( pNxt->IsVertical() ) - pNxt->Frm().Height( pNxt->GetUpper()->Prt().Height() ); + pNxt->Frame().Height( pNxt->GetUpper()->Prt().Height() ); else - pNxt->Frm().Width( pNxt->GetUpper()->Prt().Width() ); + pNxt->Frame().Width( pNxt->GetUpper()->Prt().Width() ); } - pNxt->Format( pNxt->getRootFrm()->GetCurrShell()->GetOut(), &rAttrs ); + pNxt->Format( pNxt->getRootFrame()->GetCurrShell()->GetOut(), &rAttrs ); } - pFrm->mbValidPos = bOldPos; - pFrm->mbValidSize = bOldSz; - pFrm->mbValidPrtArea = bOldPrt; + pFrame->mbValidPos = bOldPos; + pFrame->mbValidSize = bOldSz; + pFrame->mbValidPrtArea = bOldPrt; } /// This routine checks whether there are no other FootnoteBosses -/// between the pFrm's FootnoteBoss and the pNxt's FootnoteBoss. -static bool lcl_IsNextFootnoteBoss( const SwFrm *pFrm, const SwFrm* pNxt ) +/// between the pFrame's FootnoteBoss and the pNxt's FootnoteBoss. +static bool lcl_IsNextFootnoteBoss( const SwFrame *pFrame, const SwFrame* pNxt ) { - assert(pFrm && pNxt && "lcl_IsNextFootnoteBoss: No Frames?"); - pFrm = pFrm->FindFootnoteBossFrm(); - pNxt = pNxt->FindFootnoteBossFrm(); - // If pFrm is a last column, we use the page instead. - while( pFrm && pFrm->IsColumnFrm() && !pFrm->GetNext() ) - pFrm = pFrm->GetUpper()->FindFootnoteBossFrm(); + assert(pFrame && pNxt && "lcl_IsNextFootnoteBoss: No Frames?"); + pFrame = pFrame->FindFootnoteBossFrame(); + pNxt = pNxt->FindFootnoteBossFrame(); + // If pFrame is a last column, we use the page instead. + while( pFrame && pFrame->IsColumnFrame() && !pFrame->GetNext() ) + pFrame = pFrame->GetUpper()->FindFootnoteBossFrame(); // If pNxt is a first column, we use the page instead. - while( pNxt && pNxt->IsColumnFrm() && !pNxt->GetPrev() ) - pNxt = pNxt->GetUpper()->FindFootnoteBossFrm(); - // So.. now pFrm and pNxt are either two adjacent pages or columns. - return pFrm && pNxt && pFrm->GetNext() == pNxt; + while( pNxt && pNxt->IsColumnFrame() && !pNxt->GetPrev() ) + pNxt = pNxt->GetUpper()->FindFootnoteBossFrame(); + // So.. now pFrame and pNxt are either two adjacent pages or columns. + return pFrame && pNxt && pFrame->GetNext() == pNxt; } -bool SwContentFrm::_WouldFit( SwTwips nSpace, - SwLayoutFrm *pNewUpper, +bool SwContentFrame::_WouldFit( SwTwips nSpace, + SwLayoutFrame *pNewUpper, bool bTstMove, const bool bObjsInNewUpper ) { // To have the footnote select it's place carefully, it needs // to be moved in any case if there is at least one page/column // between the footnote and the new Upper. - SwFootnoteFrm* pFootnoteFrm = nullptr; + SwFootnoteFrame* pFootnoteFrame = nullptr; if ( IsInFootnote() ) { if( !lcl_IsNextFootnoteBoss( pNewUpper, this ) ) return true; - pFootnoteFrm = FindFootnoteFrm(); + pFootnoteFrame = FindFootnoteFrame(); } bool bRet; bool bSplit = !pNewUpper->Lower(); - SwContentFrm *pFrm = this; - const SwFrm *pTmpPrev = pNewUpper->Lower(); - if( pTmpPrev && pTmpPrev->IsFootnoteFrm() ) - pTmpPrev = static_cast<const SwFootnoteFrm*>(pTmpPrev)->Lower(); + SwContentFrame *pFrame = this; + const SwFrame *pTmpPrev = pNewUpper->Lower(); + if( pTmpPrev && pTmpPrev->IsFootnoteFrame() ) + pTmpPrev = static_cast<const SwFootnoteFrame*>(pTmpPrev)->Lower(); while ( pTmpPrev && pTmpPrev->GetNext() ) pTmpPrev = pTmpPrev->GetNext(); do @@ -1840,50 +1840,50 @@ bool SwContentFrm::_WouldFit( SwTwips nSpace, bool bOldSplit = bSplit; if ( bTstMove || IsInFly() || ( IsInSct() && - ( pFrm->GetUpper()->IsColBodyFrm() || ( pFootnoteFrm && - pFootnoteFrm->GetUpper()->GetUpper()->IsColumnFrm() ) ) ) ) + ( pFrame->GetUpper()->IsColBodyFrame() || ( pFootnoteFrame && + pFootnoteFrame->GetUpper()->GetUpper()->IsColumnFrame() ) ) ) ) { // This is going to get a bit insidious now. If you're faint of heart, // you'd better look away here. If a Fly contains columns, then the Contents - // are movable, except ones in the last column (see SwFrm::IsMoveable()). + // are movable, except ones in the last column (see SwFrame::IsMoveable()). // Of course they're allowed to float back. WouldFit() only returns a usable - // value if the Frm is movable. To fool WouldFit() into believing there's - // a movable Frm, I'm just going to hang it somewhere else for the time. - // The same procedure applies for column sections to make SwSectionFrm::Growable() + // value if the Frame is movable. To fool WouldFit() into believing there's + // a movable Frame, I'm just going to hang it somewhere else for the time. + // The same procedure applies for column sections to make SwSectionFrame::Growable() // return the proper value. - // Within footnotes, we may even need to put the SwFootnoteFrm somewhere else, if - // there's no SwFootnoteFrm there. - SwFrm* pTmpFrm = pFrm->IsInFootnote() && !pNewUpper->FindFootnoteFrm() ? - static_cast<SwFrm*>(pFrm->FindFootnoteFrm()) : pFrm; - SwLayoutFrm *pUp = pTmpFrm->GetUpper(); - SwFrm *pOldNext = pTmpFrm->GetNext(); - pTmpFrm->RemoveFromLayout(); - pTmpFrm->InsertBefore( pNewUpper, nullptr ); - if ( pFrm->IsTextFrm() && + // Within footnotes, we may even need to put the SwFootnoteFrame somewhere else, if + // there's no SwFootnoteFrame there. + SwFrame* pTmpFrame = pFrame->IsInFootnote() && !pNewUpper->FindFootnoteFrame() ? + static_cast<SwFrame*>(pFrame->FindFootnoteFrame()) : pFrame; + SwLayoutFrame *pUp = pTmpFrame->GetUpper(); + SwFrame *pOldNext = pTmpFrame->GetNext(); + pTmpFrame->RemoveFromLayout(); + pTmpFrame->InsertBefore( pNewUpper, nullptr ); + if ( pFrame->IsTextFrame() && ( bTstMove || - static_cast<SwTextFrm*>(pFrm)->HasFollow() || - ( !static_cast<SwTextFrm*>(pFrm)->HasPara() && - !static_cast<SwTextFrm*>(pFrm)->IsEmpty() + static_cast<SwTextFrame*>(pFrame)->HasFollow() || + ( !static_cast<SwTextFrame*>(pFrame)->HasPara() && + !static_cast<SwTextFrame*>(pFrame)->IsEmpty() ) ) ) { bTstMove = true; - bRet = static_cast<SwTextFrm*>(pFrm)->TestFormat( pTmpPrev, nSpace, bSplit ); + bRet = static_cast<SwTextFrame*>(pFrame)->TestFormat( pTmpPrev, nSpace, bSplit ); } else - bRet = pFrm->WouldFit( nSpace, bSplit, false ); + bRet = pFrame->WouldFit( nSpace, bSplit, false ); - pTmpFrm->RemoveFromLayout(); - pTmpFrm->InsertBefore( pUp, pOldNext ); + pTmpFrame->RemoveFromLayout(); + pTmpFrame->InsertBefore( pUp, pOldNext ); } else { - bRet = pFrm->WouldFit( nSpace, bSplit, false ); + bRet = pFrame->WouldFit( nSpace, bSplit, false ); nSecondCheck = !bSplit ? 1 : 0; } - SwBorderAttrAccess aAccess( SwFrm::GetCache(), pFrm ); + SwBorderAttrAccess aAccess( SwFrame::GetCache(), pFrame ); const SwBorderAttrs &rAttrs = *aAccess.Get(); // Sad but true: We need to consider the spacing in our calculation. @@ -1899,23 +1899,23 @@ bool SwContentFrm::_WouldFit( SwTwips nSpace, // in balanced columned section frames we do not want the // common border bool bCommonBorder = true; - if ( pFrm->IsInSct() && pFrm->GetUpper()->IsColBodyFrm() ) + if ( pFrame->IsInSct() && pFrame->GetUpper()->IsColBodyFrame() ) { - const SwSectionFrm* pSct = pFrm->FindSctFrm(); + const SwSectionFrame* pSct = pFrame->FindSctFrame(); bCommonBorder = pSct->GetFormat()->GetBalancedColumns().GetValue(); } // #i46181# nSecondCheck = ( 1 == nSecondCheck && - pFrm == this && - IsTextFrm() && + pFrame == this && + IsTextFrame() && bCommonBorder && - !static_cast<const SwTextFrm*>(this)->IsEmpty() ) ? + !static_cast<const SwTextFrame*>(this)->IsEmpty() ) ? nUpper : 0; nUpper += bCommonBorder ? - rAttrs.GetBottomLine( *(pFrm) ) : + rAttrs.GetBottomLine( *(pFrame) ) : rAttrs.CalcBottomLine(); } @@ -1924,10 +1924,10 @@ bool SwContentFrm::_WouldFit( SwTwips nSpace, // #i46181# nSecondCheck = 0; - if( pFrm->IsVertical() ) - nUpper = pFrm->Frm().Width() - pFrm->Prt().Width(); + if( pFrame->IsVertical() ) + nUpper = pFrame->Frame().Width() - pFrame->Prt().Width(); else - nUpper = pFrm->Frm().Height() - pFrm->Prt().Height(); + nUpper = pFrame->Frame().Height() - pFrame->Prt().Height(); } nSpace -= nUpper; @@ -1941,14 +1941,14 @@ bool SwContentFrm::_WouldFit( SwTwips nSpace, { // The following code is intended to solve a (rare) problem // causing some frames not to move backward: - // SwTextFrm::WouldFit() claims that the whole paragraph + // SwTextFrame::WouldFit() claims that the whole paragraph // fits into the given space and subtracts the height of // all lines from nSpace. nSpace - nUpper is not a valid // indicator if the frame should be allowed to move backward. // We do a second check with the original remaining space // reduced by the required upper space: nOldSpace -= nSecondCheck; - const bool bSecondRet = nOldSpace >= 0 && pFrm->WouldFit( nOldSpace, bOldSplit, false ); + const bool bSecondRet = nOldSpace >= 0 && pFrame->WouldFit( nOldSpace, bOldSplit, false ); if ( bSecondRet && bOldSplit && nOldSpace >= 0 ) { bRet = true; @@ -1969,27 +1969,27 @@ bool SwContentFrm::_WouldFit( SwTwips nSpace, } } - if ( bRet && !bSplit && pFrm->IsKeep( rAttrs.GetAttrSet() ) ) + if ( bRet && !bSplit && pFrame->IsKeep( rAttrs.GetAttrSet() ) ) { if( bTstMove ) { - while( pFrm->IsTextFrm() && static_cast<SwTextFrm*>(pFrm)->HasFollow() ) + while( pFrame->IsTextFrame() && static_cast<SwTextFrame*>(pFrame)->HasFollow() ) { - pFrm = static_cast<SwTextFrm*>(pFrm)->GetFollow(); + pFrame = static_cast<SwTextFrame*>(pFrame)->GetFollow(); } // OD 11.04.2003 #108824# - If last follow frame of <this> text // frame isn't valid, a formatting of the next content frame // doesn't makes sense. Thus, return true. - if ( IsAnFollow( pFrm ) && !pFrm->IsValid() ) + if ( IsAnFollow( pFrame ) && !pFrame->IsValid() ) { - OSL_FAIL( "Only a warning for task 108824:/n<SwContentFrm::_WouldFit(..) - follow not valid!" ); + OSL_FAIL( "Only a warning for task 108824:/n<SwContentFrame::_WouldFit(..) - follow not valid!" ); return true; } } - SwFrm *pNxt; - if( nullptr != (pNxt = pFrm->FindNext()) && pNxt->IsContentFrm() && - ( !pFootnoteFrm || ( pNxt->IsInFootnote() && - pNxt->FindFootnoteFrm()->GetAttr() == pFootnoteFrm->GetAttr() ) ) ) + SwFrame *pNxt; + if( nullptr != (pNxt = pFrame->FindNext()) && pNxt->IsContentFrame() && + ( !pFootnoteFrame || ( pNxt->IsInFootnote() && + pNxt->FindFootnoteFrame()->GetAttr() == pFootnoteFrame->GetAttr() ) ) ) { // TestFormat(?) does not like paragraph- or character anchored objects. @@ -2002,7 +2002,7 @@ bool SwContentFrm::_WouldFit( SwTwips nSpace, } if ( !pNxt->IsValid() ) - MakeNxt( pFrm, pNxt ); + MakeNxt( pFrame, pNxt ); // Little trick: if the next has a predecessor, then the paragraph // spacing has been calculated already, and we don't need to re-calculate @@ -2011,20 +2011,20 @@ bool SwContentFrm::_WouldFit( SwTwips nSpace, pTmpPrev = nullptr; else { - if( pFrm->IsTextFrm() && static_cast<SwTextFrm*>(pFrm)->IsHiddenNow() ) - pTmpPrev = lcl_NotHiddenPrev( pFrm ); + if( pFrame->IsTextFrame() && static_cast<SwTextFrame*>(pFrame)->IsHiddenNow() ) + pTmpPrev = lcl_NotHiddenPrev( pFrame ); else - pTmpPrev = pFrm; + pTmpPrev = pFrame; } - pFrm = static_cast<SwContentFrm*>(pNxt); + pFrame = static_cast<SwContentFrame*>(pNxt); } else - pFrm = nullptr; + pFrame = nullptr; } else - pFrm = nullptr; + pFrame = nullptr; - } while ( bRet && pFrm ); + } while ( bRet && pFrame ); return bRet; } diff --git a/sw/source/core/layout/colfrm.cxx b/sw/source/core/layout/colfrm.cxx index 9c5b9796c18f..a583a1abeae6 100644 --- a/sw/source/core/layout/colfrm.cxx +++ b/sw/source/core/layout/colfrm.cxx @@ -32,16 +32,16 @@ #include <IDocumentState.hxx> #include <IDocumentLayoutAccess.hxx> -SwColumnFrm::SwColumnFrm( SwFrameFormat *pFormat, SwFrm* pSib ): - SwFootnoteBossFrm( pFormat, pSib ) +SwColumnFrame::SwColumnFrame( SwFrameFormat *pFormat, SwFrame* pSib ): + SwFootnoteBossFrame( pFormat, pSib ) { - mnFrmType = FRM_COLUMN; - SwBodyFrm* pColBody = new SwBodyFrm( pFormat->GetDoc()->GetDfltFrameFormat(), pSib ); - pColBody->InsertBehind( this, nullptr ); // ColumnFrms now with BodyFrm + mnFrameType = FRM_COLUMN; + SwBodyFrame* pColBody = new SwBodyFrame( pFormat->GetDoc()->GetDfltFrameFormat(), pSib ); + pColBody->InsertBehind( this, nullptr ); // ColumnFrames now with BodyFrame SetMaxFootnoteHeight( LONG_MAX ); } -void SwColumnFrm::DestroyImpl() +void SwColumnFrame::DestroyImpl() { SwFrameFormat *pFormat = GetFormat(); SwDoc *pDoc; @@ -53,53 +53,53 @@ void SwColumnFrm::DestroyImpl() pDoc->DelFrameFormat( pFormat ); } - SwFootnoteBossFrm::DestroyImpl(); + SwFootnoteBossFrame::DestroyImpl(); } -SwColumnFrm::~SwColumnFrm() +SwColumnFrame::~SwColumnFrame() { } -static void lcl_RemoveColumns( SwLayoutFrm *pCont, sal_uInt16 nCnt ) +static void lcl_RemoveColumns( SwLayoutFrame *pCont, sal_uInt16 nCnt ) { - OSL_ENSURE( pCont && pCont->Lower() && pCont->Lower()->IsColumnFrm(), + OSL_ENSURE( pCont && pCont->Lower() && pCont->Lower()->IsColumnFrame(), "no columns to remove." ); - SwColumnFrm *pColumn = static_cast<SwColumnFrm*>(pCont->Lower()); + SwColumnFrame *pColumn = static_cast<SwColumnFrame*>(pCont->Lower()); sw_RemoveFootnotes( pColumn, true, true ); while ( pColumn->GetNext() ) { - OSL_ENSURE( pColumn->GetNext()->IsColumnFrm(), + OSL_ENSURE( pColumn->GetNext()->IsColumnFrame(), "neighbor of ColumnFrame is no ColumnFrame." ); - pColumn = static_cast<SwColumnFrm*>(pColumn->GetNext()); + pColumn = static_cast<SwColumnFrame*>(pColumn->GetNext()); } for ( sal_uInt16 i = 0; i < nCnt; ++i ) { - SwColumnFrm *pTmp = static_cast<SwColumnFrm*>(pColumn->GetPrev()); + SwColumnFrame *pTmp = static_cast<SwColumnFrame*>(pColumn->GetPrev()); pColumn->Cut(); - SwFrm::DestroyFrm(pColumn); //format is going to be destroyed in the DTor if needed. + SwFrame::DestroyFrame(pColumn); //format is going to be destroyed in the DTor if needed. pColumn = pTmp; } } -static SwLayoutFrm * lcl_FindColumns( SwLayoutFrm *pLay, sal_uInt16 nCount ) +static SwLayoutFrame * lcl_FindColumns( SwLayoutFrame *pLay, sal_uInt16 nCount ) { - SwFrm *pCol = pLay->Lower(); - if ( pLay->IsPageFrm() ) - pCol = static_cast<SwPageFrm*>(pLay)->FindBodyCont()->Lower(); + SwFrame *pCol = pLay->Lower(); + if ( pLay->IsPageFrame() ) + pCol = static_cast<SwPageFrame*>(pLay)->FindBodyCont()->Lower(); - if ( pCol && pCol->IsColumnFrm() ) + if ( pCol && pCol->IsColumnFrame() ) { - SwFrm *pTmp = pCol; + SwFrame *pTmp = pCol; sal_uInt16 i; for ( i = 0; pTmp; pTmp = pTmp->GetNext(), ++i ) /* do nothing */; - return i == nCount ? static_cast<SwLayoutFrm*>(pCol) : nullptr; + return i == nCount ? static_cast<SwLayoutFrame*>(pCol) : nullptr; } return nullptr; } -static bool lcl_AddColumns( SwLayoutFrm *pCont, sal_uInt16 nCount ) +static bool lcl_AddColumns( SwLayoutFrame *pCont, sal_uInt16 nCount ) { SwDoc *pDoc = pCont->GetFormat()->GetDoc(); const bool bMod = pDoc->getIDocumentState().IsModified(); @@ -108,16 +108,16 @@ static bool lcl_AddColumns( SwLayoutFrm *pCont, sal_uInt16 nCount ) //the same column settings we can add them to the same format. //The neighbour can be searched using the format, however the owner of the //attribute depends on the frame type. - SwLayoutFrm *pAttrOwner = pCont; - if ( pCont->IsBodyFrm() ) - pAttrOwner = pCont->FindPageFrm(); - SwLayoutFrm *pNeighbourCol = nullptr; - SwIterator<SwLayoutFrm,SwFormat> aIter( *pAttrOwner->GetFormat() ); - SwLayoutFrm *pNeighbour = aIter.First(); + SwLayoutFrame *pAttrOwner = pCont; + if ( pCont->IsBodyFrame() ) + pAttrOwner = pCont->FindPageFrame(); + SwLayoutFrame *pNeighbourCol = nullptr; + SwIterator<SwLayoutFrame,SwFormat> aIter( *pAttrOwner->GetFormat() ); + SwLayoutFrame *pNeighbour = aIter.First(); sal_uInt16 nAdd = 0; - SwFrm *pCol = pCont->Lower(); - if ( pCol && pCol->IsColumnFrm() ) + SwFrame *pCol = pCont->Lower(); + if ( pCol && pCol->IsColumnFrame() ) for ( nAdd = 1; pCol; pCol = pCol->GetNext(), ++nAdd ) /* do nothing */; while ( pNeighbour ) @@ -130,23 +130,23 @@ static bool lcl_AddColumns( SwLayoutFrm *pCont, sal_uInt16 nCount ) } bool bRet; - SwTwips nMax = pCont->IsPageBodyFrm() ? - pCont->FindPageFrm()->GetMaxFootnoteHeight() : LONG_MAX; + SwTwips nMax = pCont->IsPageBodyFrame() ? + pCont->FindPageFrame()->GetMaxFootnoteHeight() : LONG_MAX; if ( pNeighbourCol ) { bRet = false; - SwFrm *pTmp = pCont->Lower(); + SwFrame *pTmp = pCont->Lower(); while ( pTmp ) { pTmp = pTmp->GetNext(); - pNeighbourCol = static_cast<SwLayoutFrm*>(pNeighbourCol->GetNext()); + pNeighbourCol = static_cast<SwLayoutFrame*>(pNeighbourCol->GetNext()); } for ( sal_uInt16 i = 0; i < nCount; ++i ) { - SwColumnFrm *pTmpCol = new SwColumnFrm( pNeighbourCol->GetFormat(), pCont ); + SwColumnFrame *pTmpCol = new SwColumnFrame( pNeighbourCol->GetFormat(), pCont ); pTmpCol->SetMaxFootnoteHeight( nMax ); pTmpCol->InsertBefore( pCont, nullptr ); - pNeighbourCol = static_cast<SwLayoutFrm*>(pNeighbourCol->GetNext()); + pNeighbourCol = static_cast<SwLayoutFrame*>(pNeighbourCol->GetNext()); } } else @@ -155,7 +155,7 @@ static bool lcl_AddColumns( SwLayoutFrm *pCont, sal_uInt16 nCount ) for ( sal_uInt16 i = 0; i < nCount; ++i ) { SwFrameFormat *pFormat = pDoc->MakeFrameFormat( aEmptyOUStr, pDoc->GetDfltFrameFormat()); - SwColumnFrm *pTmp = new SwColumnFrm( pFormat, pCont ); + SwColumnFrame *pTmp = new SwColumnFrame( pFormat, pCont ); pTmp->SetMaxFootnoteHeight( nMax ); pTmp->Paste( pCont ); } @@ -176,23 +176,23 @@ static bool lcl_AddColumns( SwLayoutFrm *pCont, sal_uInt16 nCount ) * @param rNew * @param bChgFootnote if true, the columnframe will be inserted or removed, if necessary. */ -void SwLayoutFrm::ChgColumns( const SwFormatCol &rOld, const SwFormatCol &rNew, +void SwLayoutFrame::ChgColumns( const SwFormatCol &rOld, const SwFormatCol &rNew, const bool bChgFootnote ) { if ( rOld.GetNumCols() <= 1 && rNew.GetNumCols() <= 1 && !bChgFootnote ) return; // #i97379# // If current lower is a no text frame, then columns are not allowed - if ( Lower() && Lower()->IsNoTextFrm() && + if ( Lower() && Lower()->IsNoTextFrame() && rNew.GetNumCols() > 1 ) { return; } sal_uInt16 nNewNum, nOldNum = 1; - if( Lower() && Lower()->IsColumnFrm() ) + if( Lower() && Lower()->IsColumnFrame() ) { - SwFrm* pCol = Lower(); + SwFrame* pCol = Lower(); while( nullptr != (pCol=pCol->GetNext()) ) ++nOldNum; } @@ -200,8 +200,8 @@ void SwLayoutFrm::ChgColumns( const SwFormatCol &rOld, const SwFormatCol &rNew, if( !nNewNum ) ++nNewNum; bool bAtEnd; - if( IsSctFrm() ) - bAtEnd = static_cast<SwSectionFrm*>(this)->IsAnyNoteAtEnd(); + if( IsSctFrame() ) + bAtEnd = static_cast<SwSectionFrame*>(this)->IsAnyNoteAtEnd(); else bAtEnd = false; @@ -209,22 +209,22 @@ void SwLayoutFrm::ChgColumns( const SwFormatCol &rOld, const SwFormatCol &rNew, bool bAdjustAttributes = nOldNum != rOld.GetNumCols(); //The content is saved and restored if the column count is different. - SwFrm *pSave = nullptr; + SwFrame *pSave = nullptr; if( nOldNum != nNewNum || bChgFootnote ) { SwDoc *pDoc = GetFormat()->GetDoc(); OSL_ENSURE( pDoc, "FrameFormat doesn't return a document." ); // SaveContent would also suck up the content of the footnote container // and store it within the normal text flow. - if( IsPageBodyFrm() ) - pDoc->getIDocumentLayoutAccess().GetCurrentLayout()->RemoveFootnotes( static_cast<SwPageFrm*>(GetUpper()) ); + if( IsPageBodyFrame() ) + pDoc->getIDocumentLayoutAccess().GetCurrentLayout()->RemoveFootnotes( static_cast<SwPageFrame*>(GetUpper()) ); pSave = ::SaveContent( this ); //If columns exist, they get deleted if a column count of 0 or 1 is requested. if ( nNewNum == 1 && !bAtEnd ) { ::lcl_RemoveColumns( this, nOldNum ); - if ( IsBodyFrm() ) + if ( IsBodyFrame() ) SetFrameFormat( pDoc->GetDfltFrameFormat() ); else GetFormat()->SetFormatAttr( SwFormatFillOrder() ); @@ -234,11 +234,11 @@ void SwLayoutFrm::ChgColumns( const SwFormatCol &rOld, const SwFormatCol &rNew, } if ( nOldNum == 1 ) { - if ( IsBodyFrm() ) + if ( IsBodyFrame() ) SetFrameFormat( pDoc->GetColumnContFormat() ); else GetFormat()->SetFormatAttr( SwFormatFillOrder( ATT_LEFT_TO_RIGHT ) ); - if( !Lower() || !Lower()->IsColumnFrm() ) + if( !Lower() || !Lower()->IsColumnFrame() ) --nOldNum; } if ( nOldNum > nNewNum ) @@ -278,15 +278,15 @@ void SwLayoutFrm::ChgColumns( const SwFormatCol &rOld, const SwFormatCol &rNew, //actions during setup. if ( pSave ) { - OSL_ENSURE( Lower() && Lower()->IsLayoutFrm() && - static_cast<SwLayoutFrm*>(Lower())->Lower() && - static_cast<SwLayoutFrm*>(Lower())->Lower()->IsLayoutFrm(), - "no column body." ); // ColumnFrms contain BodyFrms - ::RestoreContent( pSave, static_cast<SwLayoutFrm*>(static_cast<SwLayoutFrm*>(Lower())->Lower()), nullptr, true ); + OSL_ENSURE( Lower() && Lower()->IsLayoutFrame() && + static_cast<SwLayoutFrame*>(Lower())->Lower() && + static_cast<SwLayoutFrame*>(Lower())->Lower()->IsLayoutFrame(), + "no column body." ); // ColumnFrames contain BodyFrames + ::RestoreContent( pSave, static_cast<SwLayoutFrame*>(static_cast<SwLayoutFrame*>(Lower())->Lower()), nullptr, true ); } } -void SwLayoutFrm::AdjustColumns( const SwFormatCol *pAttr, bool bAdjustAttributes ) +void SwLayoutFrame::AdjustColumns( const SwFormatCol *pAttr, bool bAdjustAttributes ) { if( !Lower()->GetNext() ) { @@ -306,10 +306,10 @@ void SwLayoutFrm::AdjustColumns( const SwFormatCol *pAttr, bool bAdjustAttribute if ( !bAdjustAttributes ) { long nAvail = (Prt().*fnRect->fnGetWidth)(); - for ( SwLayoutFrm *pCol = static_cast<SwLayoutFrm*>(Lower()); + for ( SwLayoutFrame *pCol = static_cast<SwLayoutFrame*>(Lower()); pCol; - pCol = static_cast<SwLayoutFrm*>(pCol->GetNext()) ) - nAvail -= (pCol->Frm().*fnRect->fnGetWidth)(); + pCol = static_cast<SwLayoutFrame*>(pCol->GetNext()) ) + nAvail -= (pCol->Frame().*fnRect->fnGetWidth)(); if ( !nAvail ) return; } @@ -322,7 +322,7 @@ void SwLayoutFrm::AdjustColumns( const SwFormatCol *pAttr, bool bAdjustAttribute const sal_uInt16 nMin = bLine ? sal_uInt16( 20 + ( pAttr->GetLineWidth() / 2) ) : 0; const bool bR2L = IsRightToLeft(); - SwFrm *pCol = bR2L ? GetLastLower() : Lower(); + SwFrame *pCol = bR2L ? GetLastLower() : Lower(); // #i27399# // bOrtho means we have to adjust the column frames manually. Otherwise @@ -344,12 +344,12 @@ void SwLayoutFrm::AdjustColumns( const SwFormatCol *pAttr, bool bAdjustAttribute pCol->ChgSize( aColSz ); - // With this, the ColumnBodyFrms from page columns gets adjusted and + // With this, the ColumnBodyFrames from page columns gets adjusted and // their bFixHeight flag is set so they won't shrink/grow. - // Don't use the flag with frame columns because BodyFrms in frame + // Don't use the flag with frame columns because BodyFrames in frame // columns can grow/shrink. - if( IsBodyFrm() ) - static_cast<SwLayoutFrm*>(pCol)->Lower()->ChgSize( aColSz ); + if( IsBodyFrame() ) + static_cast<SwLayoutFrame*>(pCol)->Lower()->ChgSize( aColSz ); nAvail -= nWidth; } @@ -393,8 +393,8 @@ void SwLayoutFrm::AdjustColumns( const SwFormatCol *pAttr, bool bAdjustAttribute aUL.SetUpper( pC->GetUpper()); aUL.SetLower( pC->GetLower()); - static_cast<SwLayoutFrm*>(pCol)->GetFormat()->SetFormatAttr( aLR ); - static_cast<SwLayoutFrm*>(pCol)->GetFormat()->SetFormatAttr( aUL ); + static_cast<SwLayoutFrame*>(pCol)->GetFormat()->SetFormatAttr( aLR ); + static_cast<SwLayoutFrame*>(pCol)->GetFormat()->SetFormatAttr( aUL ); } nGutter += aLR.GetLeft() + aLR.GetRight(); @@ -426,8 +426,8 @@ void SwLayoutFrm::AdjustColumns( const SwFormatCol *pAttr, bool bAdjustAttribute pCol->ChgSize( aColSz ); - if( IsBodyFrm() ) - static_cast<SwLayoutFrm*>(pCol)->Lower()->ChgSize( aColSz ); + if( IsBodyFrame() ) + static_cast<SwLayoutFrame*>(pCol)->Lower()->ChgSize( aColSz ); nAvail -= nWidth; } diff --git a/sw/source/core/layout/dbg_lay.cxx b/sw/source/core/layout/dbg_lay.cxx index 07b64636aeb2..80182070235d 100644 --- a/sw/source/core/layout/dbg_lay.cxx +++ b/sw/source/core/layout/dbg_lay.cxx @@ -27,7 +27,7 @@ * be used. PROTOCOL_ENTER(...) additionally logs the leaving of a method. * * The PROTOCOL macros accept the following parameters: - * 1. A pointer to an SwFrm (usually "this" or "rThis") + * 1. A pointer to an SwFrame (usually "this" or "rThis") * 2. The function group i.e. PROT_MAKEALL. This is used to decide (inline) * whether this event shall be logged at the current time. * 3. The action, usually 0. For example ACT_START indents output in the log @@ -39,13 +39,13 @@ * a pointer to the value which defines how much to grow. * * The log file is called "dbg_lay.out", which is saved in the current (BIN-) - * directory. The file contains lines with FrmId, function group and additional + * directory. The file contains lines with FrameId, function group and additional * information. * * What exactly is going to be logged, can be defined as follows: * 1. The static variable SwProtocol::nRecord contains the function groups * which shall be logged. - * A value of i.e. PROT_GROW causes calls to SwFrm::Grow to be + * A value of i.e. PROT_GROW causes calls to SwFrame::Grow to be * logged; PROT_MAKEALL logs the calls to xxx::MakeAll. * The PROT_XY values can be combined using binary OR, the default value * is null - no method calls are logged. @@ -54,7 +54,7 @@ * The member nTypes can be set to values like FRM_PAGE or FRM_SECTION and * may be combined using binary OR. The default values is 0xFFFF - meaning * all frame types. - * 3. The SwImplProtocol class contains an ArrayPointer to FrmIds which need to be + * 3. The SwImplProtocol class contains an ArrayPointer to FrameIds which need to be * tracked. If the pointer is null, all frames will be logged; otherwise * only frames of linked from the array will be logged. * @@ -62,12 +62,12 @@ * in SwProtocol::Init() or change the debugger. There are several possible * places in the debugger: * 1. Set a breakpoint in SwProtocol::Init() and manipulate nRecord there, set - * FrmIds accordingly then start logging during program start. + * FrameIds accordingly then start logging during program start. * 2. Set a breakpoint before any PROTOCOL or PROTOCOL_ENTER macro during * program execution, then set the lowest bit (PROT_INIT) of * SwProtocol::nRecord. This activates the function group of the following * macro and causes it to be logged in the future. - * 3. There's a special case for 2: If one uses 2. in SwRootFrm::Paint(..), + * 3. There's a special case for 2: If one uses 2. in SwRootFrame::Paint(..), * the log settings are taken from the file "dbg_lay.ini"! * In this INI-file you can have comment lines starting with a '#'. * The sections "[frmid]", "[frmtype]" and "[record]" are relevant. @@ -76,7 +76,7 @@ * In the [frmtype] section, the frame types which should be logged are * listed; default is USHRT_MAX which means that all types are logged. * It's possible to remove types from the list using '!' in front of a - * value. The value !0xC000 would for example exclude SwContentFrms from + * value. The value !0xC000 would for example exclude SwContentFrames from * logging. * In the [record] section the functions group which should be logged are * listed; default is 0 which means that none are logged. It's also @@ -85,14 +85,14 @@ * #Functions: all, except PRTARE * [record] 0xFFFFFFFE !0x200 * [frmid] - * #the following FrmIds: + * #the following FrameIds: * 1 2 12 13 14 15 - * #no layout frames, except ColumnFrms + * #no layout frames, except ColumnFrames * [frmtype] !0x3FFF 0x4 * * As soon as the logging is in process, one can manipulate many things in * SwImplProtocol::_Record(...) using a debugger, especially concerning - * frame types and FrmIds. + * frame types and FrameIds. */ #include "dbg_lay.hxx" @@ -106,41 +106,41 @@ sal_uLong SwProtocol::nRecord = 0; SwImplProtocol* SwProtocol::pImpl = nullptr; -static sal_uLong lcl_GetFrameId( const SwFrm* pFrm ) +static sal_uLong lcl_GetFrameId( const SwFrame* pFrame ) { #if OSL_DEBUG_LEVEL > 1 static bool bFrameId = false; if( bFrameId ) - return pFrm->GetFrmId(); + return pFrame->GetFrameId(); #endif - if( pFrm && pFrm->IsTextFrm() ) - return static_cast<const SwTextFrm*>(pFrm)->GetTextNode()->GetIndex(); + if( pFrame && pFrame->IsTextFrame() ) + return static_cast<const SwTextFrame*>(pFrame)->GetTextNode()->GetIndex(); return 0; } class SwImplProtocol { SvFileStream *pStream; // output stream - std::set<sal_uInt16> *pFrmIds; // which FrmIds shall be logged ( NULL == all) + std::set<sal_uInt16> *pFrameIds; // which FrameIds shall be logged ( NULL == all) std::vector<long> aVars; // variables OStringBuffer aLayer; // indentation of output (" " per start/end) sal_uInt16 nTypes; // which types shall be logged sal_uInt16 nLineCount; // printed lines sal_uInt16 nMaxLines; // max lines to be printed - sal_uInt8 nInitFile; // range (FrmId,FrmType,Record) during reading of the INI file + sal_uInt8 nInitFile; // range (FrameId,FrameType,Record) during reading of the INI file sal_uInt8 nTestMode; // special for test formatting, logging may only be done in test formatting. - void _Record( const SwFrm* pFrm, sal_uLong nFunction, sal_uLong nAct, void* pParam ); + void _Record( const SwFrame* pFrame, sal_uLong nFunction, sal_uLong nAct, void* pParam ); bool NewStream(); void CheckLine( OString& rLine ); - static void SectFunc( OStringBuffer& rOut, const SwFrm* pFrm, sal_uLong nAct, void* pParam ); + static void SectFunc( OStringBuffer& rOut, const SwFrame* pFrame, sal_uLong nAct, void* pParam ); public: SwImplProtocol(); ~SwImplProtocol(); // logging - void Record( const SwFrm* pFrm, sal_uLong nFunction, sal_uLong nAct, void* pParam ) - { if( pStream ) _Record( pFrm, nFunction, nAct, pParam ); } - bool InsertFrm( sal_uInt16 nFrmId ); // take FrmId for logging - bool DeleteFrm( sal_uInt16 nFrmId ); // remove FrmId; don't log him anymore + void Record( const SwFrame* pFrame, sal_uLong nFunction, sal_uLong nAct, void* pParam ) + { if( pStream ) _Record( pFrame, nFunction, nAct, pParam ); } + bool InsertFrame( sal_uInt16 nFrameId ); // take FrameId for logging + bool DeleteFrame( sal_uInt16 nFrameId ); // remove FrameId; don't log him anymore void FileInit(); // read the INI file void ChkStream() { if( !pStream ) NewStream(); } }; @@ -159,12 +159,12 @@ public: class SwImplEnterLeave { protected: - const SwFrm* pFrm; // the frame + const SwFrame* pFrame; // the frame sal_uLong nFunction, nAction; // the function, the action if needed void* pParam; // further parameter public: - SwImplEnterLeave( const SwFrm* pF, sal_uLong nFunct, sal_uLong nAct, void* pPar ) - : pFrm( pF ), nFunction( nFunct ), nAction( nAct ), pParam( pPar ) {} + SwImplEnterLeave( const SwFrame* pF, sal_uLong nFunct, sal_uLong nAct, void* pPar ) + : pFrame( pF ), nFunction( nFunct ), nAction( nAct ), pParam( pPar ) {} virtual ~SwImplEnterLeave() {} virtual void Enter(); // message when entering virtual void Leave(); // message when leaving @@ -172,37 +172,37 @@ public: class SwSizeEnterLeave : public SwImplEnterLeave { - long nFrmHeight; + long nFrameHeight; public: - SwSizeEnterLeave( const SwFrm* pF, sal_uLong nFunct, sal_uLong nAct, void* pPar ) - : SwImplEnterLeave( pF, nFunct, nAct, pPar ), nFrmHeight( pF->Frm().Height() ) {} + SwSizeEnterLeave( const SwFrame* pF, sal_uLong nFunct, sal_uLong nAct, void* pPar ) + : SwImplEnterLeave( pF, nFunct, nAct, pPar ), nFrameHeight( pF->Frame().Height() ) {} virtual ~SwSizeEnterLeave() {} virtual void Leave() override; // resize message }; class SwUpperEnterLeave : public SwImplEnterLeave { - sal_uInt16 nFrmId; + sal_uInt16 nFrameId; public: - SwUpperEnterLeave( const SwFrm* pF, sal_uLong nFunct, sal_uLong nAct, void* pPar ) - : SwImplEnterLeave( pF, nFunct, nAct, pPar ), nFrmId( 0 ) {} + SwUpperEnterLeave( const SwFrame* pF, sal_uLong nFunct, sal_uLong nAct, void* pPar ) + : SwImplEnterLeave( pF, nFunct, nAct, pPar ), nFrameId( 0 ) {} virtual ~SwUpperEnterLeave() {} virtual void Enter() override; // message - virtual void Leave() override; // message of FrmId from upper + virtual void Leave() override; // message of FrameId from upper }; -class SwFrmChangesLeave : public SwImplEnterLeave +class SwFrameChangesLeave : public SwImplEnterLeave { - SwRect aFrm; + SwRect aFrame; public: - SwFrmChangesLeave( const SwFrm* pF, sal_uLong nFunct, sal_uLong nAct, void* pPar ) - : SwImplEnterLeave( pF, nFunct, nAct, pPar ), aFrm( pF->Frm() ) {} - virtual ~SwFrmChangesLeave() {} + SwFrameChangesLeave( const SwFrame* pF, sal_uLong nFunct, sal_uLong nAct, void* pPar ) + : SwImplEnterLeave( pF, nFunct, nAct, pPar ), aFrame( pF->Frame() ) {} + virtual ~SwFrameChangesLeave() {} virtual void Enter() override; // no message - virtual void Leave() override; // message when resizing the Frm area + virtual void Leave() override; // message when resizing the Frame area }; -void SwProtocol::Record( const SwFrm* pFrm, sal_uLong nFunction, sal_uLong nAct, void* pParam ) +void SwProtocol::Record( const SwFrame* pFrame, sal_uLong nFunction, sal_uLong nAct, void* pParam ) { if( Start() ) { // We reach this point if SwProtocol::nRecord is binary OR'd with PROT_INIT(0x1) using the debugger @@ -220,12 +220,12 @@ void SwProtocol::Record( const SwFrm* pFrm, sal_uLong nFunction, sal_uLong nAct, } if( !pImpl ) // Create Impl object if needed pImpl = new SwImplProtocol(); - pImpl->Record( pFrm, nFunction, nAct, pParam ); // ...and start logging + pImpl->Record( pFrame, nFunction, nAct, pParam ); // ...and start logging } // The following function gets called when pulling in the writer DLL through // TextInit(..) and gives the possibility to release functions -// and/or FrmIds to the debugger +// and/or FrameIds to the debugger void SwProtocol::Init() { @@ -255,7 +255,7 @@ void SwProtocol::Stop() } SwImplProtocol::SwImplProtocol() - : pStream( nullptr ), pFrmIds( nullptr ), nTypes( 0xffff ), + : pStream( nullptr ), pFrameIds( nullptr ), nTypes( 0xffff ), nLineCount( 0 ), nMaxLines( USHRT_MAX ), nTestMode( 0 ) { NewStream(); @@ -281,8 +281,8 @@ SwImplProtocol::~SwImplProtocol() pStream->Close(); delete pStream; } - pFrmIds->clear(); - delete pFrmIds; + pFrameIds->clear(); + delete pFrameIds; aVars.clear(); } @@ -293,15 +293,15 @@ void SwImplProtocol::CheckLine( OString& rLine ) rLine = rLine.replace( '\t', ' ' ); if( '#' == rLine[0] ) // comments start with '#' return; - if( '[' == rLine[0] ) // section: FrmIds, type or funciton + if( '[' == rLine[0] ) // section: FrameIds, type or funciton { OString aTmp = rLine.getToken(0, ']'); - if (aTmp == "[frmid") // section FrmIds + if (aTmp == "[frmid") // section FrameIds { nInitFile = 1; - pFrmIds->clear(); - delete pFrmIds; - pFrmIds = nullptr; // default: log all frames + pFrameIds->clear(); + delete pFrameIds; + pFrameIds = nullptr; // default: log all frames } else if (aTmp == "[frmtype")// section types { @@ -349,7 +349,7 @@ void SwImplProtocol::CheckLine( OString& rLine ) sscanf( aTok.getStr(), "%li", &nVal ); switch ( nInitFile ) { - case 1: InsertFrm( sal_uInt16( nVal ) ); // add FrmId + case 1: InsertFrame( sal_uInt16( nVal ) ); // add FrameId break; case 2: { sal_uInt16 nNew = (sal_uInt16)nVal; @@ -436,57 +436,57 @@ static void lcl_Start(OStringBuffer& rOut, OStringBuffer& rLay, sal_uLong nActio /// output the ValidSize-, ValidPos- and ValidPrtArea-Flag ("Sz","Ps","PA") /// of the frame; "+" stands for valid, "-" stands for invalid. -static void lcl_Flags(OStringBuffer& rOut, const SwFrm* pFrm) +static void lcl_Flags(OStringBuffer& rOut, const SwFrame* pFrame) { rOut.append(" Sz"); - rOut.append(pFrm->GetValidSizeFlag() ? '+' : '-'); + rOut.append(pFrame->GetValidSizeFlag() ? '+' : '-'); rOut.append(" Ps"); - rOut.append(pFrm->GetValidPosFlag() ? '+' : '-'); + rOut.append(pFrame->GetValidPosFlag() ? '+' : '-'); rOut.append(" PA"); - rOut.append(pFrm->GetValidPrtAreaFlag() ? '+' : '-'); + rOut.append(pFrame->GetValidPrtAreaFlag() ? '+' : '-'); } /// output the type of the frame as plain text. -static void lcl_FrameType( OStringBuffer& rOut, const SwFrm* pFrm ) +static void lcl_FrameType( OStringBuffer& rOut, const SwFrame* pFrame ) { - if( pFrm->IsTextFrm() ) + if( pFrame->IsTextFrame() ) rOut.append("Text "); - else if( pFrm->IsLayoutFrm() ) + else if( pFrame->IsLayoutFrame() ) { - if( pFrm->IsPageFrm() ) + if( pFrame->IsPageFrame() ) rOut.append("Page "); - else if( pFrm->IsColumnFrm() ) + else if( pFrame->IsColumnFrame() ) rOut.append("Col "); - else if( pFrm->IsBodyFrm() ) + else if( pFrame->IsBodyFrame() ) { - if( pFrm->GetUpper() && pFrm->IsColBodyFrm() ) + if( pFrame->GetUpper() && pFrame->IsColBodyFrame() ) rOut.append("(Col)"); rOut.append("Body "); } - else if( pFrm->IsRootFrm() ) + else if( pFrame->IsRootFrame() ) rOut.append("Root "); - else if( pFrm->IsCellFrm() ) + else if( pFrame->IsCellFrame() ) rOut.append("Cell "); - else if( pFrm->IsTabFrm() ) + else if( pFrame->IsTabFrame() ) rOut.append("Tab "); - else if( pFrm->IsRowFrm() ) + else if( pFrame->IsRowFrame() ) rOut.append("Row "); - else if( pFrm->IsSctFrm() ) + else if( pFrame->IsSctFrame() ) rOut.append("Sect "); - else if( pFrm->IsHeaderFrm() ) + else if( pFrame->IsHeaderFrame() ) rOut.append("Header "); - else if( pFrm->IsFooterFrm() ) + else if( pFrame->IsFooterFrame() ) rOut.append("Footer "); - else if( pFrm->IsFootnoteFrm() ) + else if( pFrame->IsFootnoteFrame() ) rOut.append("Footnote "); - else if( pFrm->IsFootnoteContFrm() ) + else if( pFrame->IsFootnoteContFrame() ) rOut.append("FootnoteCont "); - else if( pFrm->IsFlyFrm() ) + else if( pFrame->IsFlyFrame() ) rOut.append("Fly "); else rOut.append("Layout "); } - else if( pFrm->IsNoTextFrm() ) + else if( pFrame->IsNoTextFrame() ) rOut.append("NoText "); else rOut.append("Not impl. "); @@ -496,19 +496,19 @@ static void lcl_FrameType( OStringBuffer& rOut, const SwFrm* pFrm ) * Is only called if the PROTOCOL macro finds out, * that this function should be recorded ( @see{SwProtocol::nRecord} ). * - * In this method we also check if FrmId and frame type should be logged. + * In this method we also check if FrameId and frame type should be logged. */ -void SwImplProtocol::_Record( const SwFrm* pFrm, sal_uLong nFunction, sal_uLong nAct, void* pParam ) +void SwImplProtocol::_Record( const SwFrame* pFrame, sal_uLong nFunction, sal_uLong nAct, void* pParam ) { sal_uInt16 nSpecial = 0; if( nSpecial ) // the possible debugger manipulations { - sal_uInt16 nId = sal_uInt16(lcl_GetFrameId( pFrm )); + sal_uInt16 nId = sal_uInt16(lcl_GetFrameId( pFrame )); switch ( nSpecial ) { - case 1: InsertFrm( nId ); break; - case 2: DeleteFrm( nId ); break; - case 3: pFrmIds->clear(); delete pFrmIds; pFrmIds = nullptr; break; + case 1: InsertFrame( nId ); break; + case 2: DeleteFrame( nId ); break; + case 3: pFrameIds->clear(); delete pFrameIds; pFrameIds = nullptr; break; case 4: delete pStream; pStream = nullptr; break; } return; @@ -516,27 +516,27 @@ void SwImplProtocol::_Record( const SwFrm* pFrm, sal_uLong nFunction, sal_uLong if( !pStream && !NewStream() ) return; // still no stream - if( pFrmIds && !pFrmIds->count( sal_uInt16(lcl_GetFrameId( pFrm )) ) ) - return; // doesn't belong to the wished FrmIds + if( pFrameIds && !pFrameIds->count( sal_uInt16(lcl_GetFrameId( pFrame )) ) ) + return; // doesn't belong to the wished FrameIds - if( !(pFrm->GetType() & nTypes) ) + if( !(pFrame->GetType() & nTypes) ) return; // the type is unwanted if( 1 == nTestMode && nFunction != PROT_TESTFORMAT ) return; // we may only log inside a test formatting bool bTmp = false; OStringBuffer aOut(aLayer); - aOut.append(static_cast<sal_Int64>(lcl_GetFrameId(pFrm))); + aOut.append(static_cast<sal_Int64>(lcl_GetFrameId(pFrame))); aOut.append(' '); - lcl_FrameType( aOut, pFrm ); // then the frame type + lcl_FrameType( aOut, pFrame ); // then the frame type switch ( nFunction ) // and the function { - case PROT_SNAPSHOT: lcl_Flags( aOut, pFrm ); + case PROT_SNAPSHOT: lcl_Flags( aOut, pFrame ); break; case PROT_MAKEALL: aOut.append("MakeAll"); lcl_Start( aOut, aLayer, nAct ); if( nAct == ACT_START ) - lcl_Flags( aOut, pFrm ); + lcl_Flags( aOut, pFrame ); break; case PROT_MOVE_FWD: bTmp = true; // NoBreak case PROT_MOVE_BWD: @@ -585,7 +585,7 @@ void SwImplProtocol::_Record( const SwFrm* pFrm, sal_uLong nFunction, sal_uLong case PROT_SIZE: aOut.append("Size"); lcl_Start( aOut, aLayer, nAct ); aOut.append(' '); - aOut.append(static_cast<sal_Int64>(pFrm->Frm().Height())); + aOut.append(static_cast<sal_Int64>(pFrame->Frame().Height())); break; case PROT_LEAF: aOut.append("Prev/NextLeaf"); lcl_Start( aOut, aLayer, nAct ); @@ -593,13 +593,13 @@ void SwImplProtocol::_Record( const SwFrm* pFrm, sal_uLong nFunction, sal_uLong if( pParam ) { aOut.append(' '); - aOut.append(static_cast<sal_Int64>(lcl_GetFrameId(static_cast<SwFrm*>(pParam)))); + aOut.append(static_cast<sal_Int64>(lcl_GetFrameId(static_cast<SwFrame*>(pParam)))); } break; case PROT_FILE_INIT: FileInit(); aOut.append("Initialize"); break; - case PROT_SECTION: SectFunc(aOut, pFrm, nAct, pParam); + case PROT_SECTION: SectFunc(aOut, pFrame, nAct, pParam); break; case PROT_CUT: bTmp = true; // NoBreak case PROT_PASTE: @@ -607,7 +607,7 @@ void SwImplProtocol::_Record( const SwFrm* pFrm, sal_uLong nFunction, sal_uLong aOut.append("Cut from "); else aOut.append("Paste to "); - aOut.append(static_cast<sal_Int64>(lcl_GetFrameId(static_cast<SwFrm*>(pParam)))); + aOut.append(static_cast<sal_Int64>(lcl_GetFrameId(static_cast<SwFrame*>(pParam)))); break; case PROT_TESTFORMAT: aOut.append("Test"); @@ -619,33 +619,33 @@ void SwImplProtocol::_Record( const SwFrm* pFrm, sal_uLong nFunction, sal_uLong break; case PROT_FRMCHANGES: { - SwRect& rFrm = *static_cast<SwRect*>(pParam); - if( pFrm->Frm().Pos() != rFrm.Pos() ) + SwRect& rFrame = *static_cast<SwRect*>(pParam); + if( pFrame->Frame().Pos() != rFrame.Pos() ) { aOut.append("PosChg: ("); - aOut.append(static_cast<sal_Int64>(rFrm.Left())); + aOut.append(static_cast<sal_Int64>(rFrame.Left())); aOut.append(", "); - aOut.append(static_cast<sal_Int64>(rFrm.Top())); + aOut.append(static_cast<sal_Int64>(rFrame.Top())); aOut.append(") ("); - aOut.append(static_cast<sal_Int64>(pFrm->Frm().Left())); + aOut.append(static_cast<sal_Int64>(pFrame->Frame().Left())); aOut.append(", "); - aOut.append(static_cast<sal_Int64>(pFrm->Frm().Top())); + aOut.append(static_cast<sal_Int64>(pFrame->Frame().Top())); aOut.append(") "); } - if( pFrm->Frm().Height() != rFrm.Height() ) + if( pFrame->Frame().Height() != rFrame.Height() ) { aOut.append("Height: "); - aOut.append(static_cast<sal_Int64>(rFrm.Height())); + aOut.append(static_cast<sal_Int64>(rFrame.Height())); aOut.append(" -> "); - aOut.append(static_cast<sal_Int64>(pFrm->Frm().Height())); + aOut.append(static_cast<sal_Int64>(pFrame->Frame().Height())); aOut.append(" "); } - if( pFrm->Frm().Width() != rFrm.Width() ) + if( pFrame->Frame().Width() != rFrame.Width() ) { aOut.append("Width: "); - aOut.append(static_cast<sal_Int64>(rFrm.Width())); + aOut.append(static_cast<sal_Int64>(rFrame.Width())); aOut.append(" -> "); - aOut.append(static_cast<sal_Int64>(pFrm->Frm().Width())); + aOut.append(static_cast<sal_Int64>(pFrame->Frame().Width())); aOut.append(' '); } break; @@ -658,14 +658,14 @@ void SwImplProtocol::_Record( const SwFrm* pFrm, sal_uLong nFunction, sal_uLong SwProtocol::SetRecord( 0 ); // => end f logging } -/// Handle the output of the SectionFrms. -void SwImplProtocol::SectFunc(OStringBuffer &rOut, const SwFrm* , sal_uLong nAct, void* pParam) +/// Handle the output of the SectionFrames. +void SwImplProtocol::SectFunc(OStringBuffer &rOut, const SwFrame* , sal_uLong nAct, void* pParam) { bool bTmp = false; switch( nAct ) { case ACT_MERGE: rOut.append("Merge Section "); - rOut.append(static_cast<sal_Int64>(lcl_GetFrameId(static_cast<SwFrm*>(pParam)))); + rOut.append(static_cast<sal_Int64>(lcl_GetFrameId(static_cast<SwFrame*>(pParam)))); break; case ACT_CREATE_MASTER: bTmp = true; // NoBreak case ACT_CREATE_FOLLOW: rOut.append("Create Section "); @@ -673,7 +673,7 @@ void SwImplProtocol::SectFunc(OStringBuffer &rOut, const SwFrm* , sal_uLong nAct rOut.append("Master to "); else rOut.append("Follow from "); - rOut.append(static_cast<sal_Int64>(lcl_GetFrameId(static_cast<SwFrm*>(pParam)))); + rOut.append(static_cast<sal_Int64>(lcl_GetFrameId(static_cast<SwFrame*>(pParam)))); break; case ACT_DEL_MASTER: bTmp = true; // NoBreak case ACT_DEL_FOLLOW: rOut.append("Delete Section "); @@ -681,34 +681,34 @@ void SwImplProtocol::SectFunc(OStringBuffer &rOut, const SwFrm* , sal_uLong nAct rOut.append("Master to "); else rOut.append("Follow from "); - rOut.append(static_cast<sal_Int64>(lcl_GetFrameId(static_cast<SwFrm*>(pParam)))); + rOut.append(static_cast<sal_Int64>(lcl_GetFrameId(static_cast<SwFrame*>(pParam)))); break; } } /** - * if pFrmIds==NULL all Frames will be logged. But as soon as pFrmIds are - * set, only the added FrmIds are being logged. + * if pFrameIds==NULL all Frames will be logged. But as soon as pFrameIds are + * set, only the added FrameIds are being logged. * - * @param nId new FrmId for logging - * @return TRUE if newly added, FALSE if FrmId is already under control + * @param nId new FrameId for logging + * @return TRUE if newly added, FALSE if FrameId is already under control */ -bool SwImplProtocol::InsertFrm( sal_uInt16 nId ) +bool SwImplProtocol::InsertFrame( sal_uInt16 nId ) { - if( !pFrmIds ) - pFrmIds = new std::set<sal_uInt16>; - if( pFrmIds->count( nId ) ) + if( !pFrameIds ) + pFrameIds = new std::set<sal_uInt16>; + if( pFrameIds->count( nId ) ) return false; - pFrmIds->insert( nId ); + pFrameIds->insert( nId ); return true; } -/// Removes a FrmId from the pFrmIds array, so that it won't be logged anymore. -bool SwImplProtocol::DeleteFrm( sal_uInt16 nId ) +/// Removes a FrameId from the pFrameIds array, so that it won't be logged anymore. +bool SwImplProtocol::DeleteFrame( sal_uInt16 nId ) { - if( !pFrmIds ) + if( !pFrameIds ) return false; - if ( pFrmIds->erase(nId) ) + if ( pFrameIds->erase(nId) ) return true; return false; } @@ -718,17 +718,17 @@ bool SwImplProtocol::DeleteFrm( sal_uInt16 nId ) * The task here is to find the right SwImplEnterLeave object based on the * function; everything else is then done in his Ctor/Dtor. */ -void SwEnterLeave::Ctor( const SwFrm* pFrm, sal_uLong nFunc, sal_uLong nAct, void* pPar ) +void SwEnterLeave::Ctor( const SwFrame* pFrame, sal_uLong nFunc, sal_uLong nAct, void* pPar ) { switch( nFunc ) { case PROT_ADJUSTN : case PROT_GROW: - case PROT_SHRINK : pImpl = new SwSizeEnterLeave( pFrm, nFunc, nAct, pPar ); break; + case PROT_SHRINK : pImpl = new SwSizeEnterLeave( pFrame, nFunc, nAct, pPar ); break; case PROT_MOVE_FWD: - case PROT_MOVE_BWD : pImpl = new SwUpperEnterLeave( pFrm, nFunc, nAct, pPar ); break; - case PROT_FRMCHANGES : pImpl = new SwFrmChangesLeave( pFrm, nFunc, nAct, pPar ); break; - default: pImpl = new SwImplEnterLeave( pFrm, nFunc, nAct, pPar ); break; + case PROT_MOVE_BWD : pImpl = new SwUpperEnterLeave( pFrame, nFunc, nAct, pPar ); break; + case PROT_FRMCHANGES : pImpl = new SwFrameChangesLeave( pFrame, nFunc, nAct, pPar ); break; + default: pImpl = new SwImplEnterLeave( pFrame, nFunc, nAct, pPar ); break; } pImpl->Enter(); } @@ -748,40 +748,40 @@ void SwEnterLeave::Dtor() void SwImplEnterLeave::Enter() { - SwProtocol::Record( pFrm, nFunction, ACT_START, pParam ); + SwProtocol::Record( pFrame, nFunction, ACT_START, pParam ); } void SwImplEnterLeave::Leave() { - SwProtocol::Record( pFrm, nFunction, ACT_END, pParam ); + SwProtocol::Record( pFrame, nFunction, ACT_END, pParam ); } void SwSizeEnterLeave::Leave() { - nFrmHeight = pFrm->Frm().Height() - nFrmHeight; - SwProtocol::Record( pFrm, nFunction, ACT_END, &nFrmHeight ); + nFrameHeight = pFrame->Frame().Height() - nFrameHeight; + SwProtocol::Record( pFrame, nFunction, ACT_END, &nFrameHeight ); } void SwUpperEnterLeave::Enter() { - nFrmId = pFrm->GetUpper() ? sal_uInt16(lcl_GetFrameId( pFrm->GetUpper() )) : 0; - SwProtocol::Record( pFrm, nFunction, ACT_START, &nFrmId ); + nFrameId = pFrame->GetUpper() ? sal_uInt16(lcl_GetFrameId( pFrame->GetUpper() )) : 0; + SwProtocol::Record( pFrame, nFunction, ACT_START, &nFrameId ); } void SwUpperEnterLeave::Leave() { - nFrmId = pFrm->GetUpper() ? sal_uInt16(lcl_GetFrameId( pFrm->GetUpper() )) : 0; - SwProtocol::Record( pFrm, nFunction, ACT_END, &nFrmId ); + nFrameId = pFrame->GetUpper() ? sal_uInt16(lcl_GetFrameId( pFrame->GetUpper() )) : 0; + SwProtocol::Record( pFrame, nFunction, ACT_END, &nFrameId ); } -void SwFrmChangesLeave::Enter() +void SwFrameChangesLeave::Enter() { } -void SwFrmChangesLeave::Leave() +void SwFrameChangesLeave::Leave() { - if( pFrm->Frm() != aFrm ) - SwProtocol::Record( pFrm, PROT_FRMCHANGES, 0, &aFrm ); + if( pFrame->Frame() != aFrame ) + SwProtocol::Record( pFrame, PROT_FRMCHANGES, 0, &aFrame ); } #endif // DBG_UTIL diff --git a/sw/source/core/layout/dumpfilter.cxx b/sw/source/core/layout/dumpfilter.cxx index 9ec20ba597b1..36d28c7d4403 100644 --- a/sw/source/core/layout/dumpfilter.cxx +++ b/sw/source/core/layout/dumpfilter.cxx @@ -87,12 +87,12 @@ namespace sw utl::MediaDescriptor::PROP_OUTPUTSTREAM(), uno::Reference< io::XOutputStream >() ); - // Actually get the SwRootFrm to call dumpAsXml + // Actually get the SwRootFrame to call dumpAsXml uno::Reference< lang::XUnoTunnel > xDocTunnel( m_xSrcDoc, uno::UNO_QUERY ); SwXTextDocument* pXDoc = UnoTunnelGetImplementation< SwXTextDocument >( xDocTunnel ); if ( pXDoc ) { - SwRootFrm* pLayout = pXDoc->GetDocShell()->GetWrtShell()->GetLayout(); + SwRootFrame* pLayout = pXDoc->GetDocShell()->GetWrtShell()->GetLayout(); // Get sure that the whole layout is processed: set a visible area // even though there isn't any need of it diff --git a/sw/source/core/layout/findfrm.cxx b/sw/source/core/layout/findfrm.cxx index 5376296e9801..38dd5a78c7ff 100644 --- a/sw/source/core/layout/findfrm.cxx +++ b/sw/source/core/layout/findfrm.cxx @@ -33,20 +33,20 @@ #include <calbck.hxx> #include <viewopt.hxx> -/// Searches the first ContentFrm in BodyText below the page. -SwLayoutFrm *SwFootnoteBossFrm::FindBodyCont() +/// Searches the first ContentFrame in BodyText below the page. +SwLayoutFrame *SwFootnoteBossFrame::FindBodyCont() { - SwFrm *pLay = Lower(); - while ( pLay && !pLay->IsBodyFrm() ) + SwFrame *pLay = Lower(); + while ( pLay && !pLay->IsBodyFrame() ) pLay = pLay->GetNext(); - return static_cast<SwLayoutFrm*>(pLay); + return static_cast<SwLayoutFrame*>(pLay); } -/// Searches the last ContentFrm in BodyText below the page. -SwContentFrm *SwPageFrm::FindLastBodyContent() +/// Searches the last ContentFrame in BodyText below the page. +SwContentFrame *SwPageFrame::FindLastBodyContent() { - SwContentFrm *pRet = FindFirstBodyContent(); - SwContentFrm *pNxt = pRet; + SwContentFrame *pRet = FindFirstBodyContent(); + SwContentFrame *pNxt = pRet; while ( pNxt && pNxt->IsInDocBody() && IsAnLower( pNxt ) ) { pRet = pNxt; pNxt = pNxt->FindNextCnt(); @@ -55,42 +55,42 @@ SwContentFrm *SwPageFrm::FindLastBodyContent() } /** - * Checks if the frame contains one or more ContentFrm's anywhere in his - * subsidiary structure; if so the first found ContentFrm is returned. + * Checks if the frame contains one or more ContentFrame's anywhere in his + * subsidiary structure; if so the first found ContentFrame is returned. */ -const SwContentFrm *SwLayoutFrm::ContainsContent() const +const SwContentFrame *SwLayoutFrame::ContainsContent() const { //Search downwards the layout leaf and if there is no content, jump to the //next leaf until content is found or we leave "this". //Sections: Content next to sections would not be found this way (empty - //sections directly next to ContentFrm) therefore we need to recursively + //sections directly next to ContentFrame) therefore we need to recursively //search for them even if it's more complex. - const SwLayoutFrm *pLayLeaf = this; + const SwLayoutFrame *pLayLeaf = this; do { - while ( (!pLayLeaf->IsSctFrm() || pLayLeaf == this ) && - pLayLeaf->Lower() && pLayLeaf->Lower()->IsLayoutFrm() ) - pLayLeaf = static_cast<const SwLayoutFrm*>(pLayLeaf->Lower()); + while ( (!pLayLeaf->IsSctFrame() || pLayLeaf == this ) && + pLayLeaf->Lower() && pLayLeaf->Lower()->IsLayoutFrame() ) + pLayLeaf = static_cast<const SwLayoutFrame*>(pLayLeaf->Lower()); - if( pLayLeaf->IsSctFrm() && pLayLeaf != this ) + if( pLayLeaf->IsSctFrame() && pLayLeaf != this ) { - const SwContentFrm *pCnt = pLayLeaf->ContainsContent(); + const SwContentFrame *pCnt = pLayLeaf->ContainsContent(); if( pCnt ) return pCnt; if( pLayLeaf->GetNext() ) { - if( pLayLeaf->GetNext()->IsLayoutFrm() ) + if( pLayLeaf->GetNext()->IsLayoutFrame() ) { - pLayLeaf = static_cast<const SwLayoutFrm*>(pLayLeaf->GetNext()); + pLayLeaf = static_cast<const SwLayoutFrame*>(pLayLeaf->GetNext()); continue; } else - return static_cast<const SwContentFrm*>(pLayLeaf->GetNext()); + return static_cast<const SwContentFrame*>(pLayLeaf->GetNext()); } } else if ( pLayLeaf->Lower() ) - return static_cast<const SwContentFrm*>(pLayLeaf->Lower()); + return static_cast<const SwContentFrame*>(pLayLeaf->Lower()); pLayLeaf = pLayLeaf->GetNextLayoutLeaf(); if( !IsAnLower( pLayLeaf) ) @@ -101,46 +101,46 @@ const SwContentFrm *SwLayoutFrm::ContainsContent() const /** * Calls ContainsAny first to reach the innermost cell. From there we walk back - * up to the first SwCellFrm. Since we use SectionFrms, ContainsContent()->GetUpper() + * up to the first SwCellFrame. Since we use SectionFrames, ContainsContent()->GetUpper() * is not enough anymore. */ -const SwCellFrm *SwLayoutFrm::FirstCell() const +const SwCellFrame *SwLayoutFrame::FirstCell() const { - const SwFrm* pCnt = ContainsAny(); - while( pCnt && !pCnt->IsCellFrm() ) + const SwFrame* pCnt = ContainsAny(); + while( pCnt && !pCnt->IsCellFrame() ) pCnt = pCnt->GetUpper(); - return static_cast<const SwCellFrm*>(pCnt); + return static_cast<const SwCellFrame*>(pCnt); } -/** return ContentFrms, sections, and tables. +/** return ContentFrames, sections, and tables. * * @param _bInvestigateFootnoteForSections controls investigation of content of footnotes for sections. * @see ContainsContent */ -const SwFrm *SwLayoutFrm::ContainsAny( const bool _bInvestigateFootnoteForSections ) const +const SwFrame *SwLayoutFrame::ContainsAny( const bool _bInvestigateFootnoteForSections ) const { //Search downwards the layout leaf and if there is no content, jump to the //next leaf until content is found, we leave "this" or until we found - //a SectionFrm or a TabFrm. + //a SectionFrame or a TabFrame. - const SwLayoutFrm *pLayLeaf = this; - const bool bNoFootnote = IsSctFrm() && !_bInvestigateFootnoteForSections; + const SwLayoutFrame *pLayLeaf = this; + const bool bNoFootnote = IsSctFrame() && !_bInvestigateFootnoteForSections; do { - while ( ( (!pLayLeaf->IsSctFrm() && !pLayLeaf->IsTabFrm()) + while ( ( (!pLayLeaf->IsSctFrame() && !pLayLeaf->IsTabFrame()) || pLayLeaf == this ) && - pLayLeaf->Lower() && pLayLeaf->Lower()->IsLayoutFrm() ) - pLayLeaf = static_cast<const SwLayoutFrm*>(pLayLeaf->Lower()); + pLayLeaf->Lower() && pLayLeaf->Lower()->IsLayoutFrame() ) + pLayLeaf = static_cast<const SwLayoutFrame*>(pLayLeaf->Lower()); - if( ( pLayLeaf->IsTabFrm() || pLayLeaf->IsSctFrm() ) + if( ( pLayLeaf->IsTabFrame() || pLayLeaf->IsSctFrame() ) && pLayLeaf != this ) { - // Now we also return "deleted" SectionFrms so they can be + // Now we also return "deleted" SectionFrames so they can be // maintained on SaveContent and RestoreContent return pLayLeaf; } else if ( pLayLeaf->Lower() ) - return static_cast<const SwContentFrm*>(pLayLeaf->Lower()); + return static_cast<const SwContentFrame*>(pLayLeaf->Lower()); pLayLeaf = pLayLeaf->GetNextLayoutLeaf(); if( bNoFootnote && pLayLeaf && pLayLeaf->IsInFootnote() ) @@ -156,57 +156,57 @@ const SwFrm *SwLayoutFrm::ContainsAny( const bool _bInvestigateFootnoteForSectio return nullptr; } -const SwFrm* SwFrm::GetLower() const +const SwFrame* SwFrame::GetLower() const { - return IsLayoutFrm() ? static_cast<const SwLayoutFrm*>(this)->Lower() : nullptr; + return IsLayoutFrame() ? static_cast<const SwLayoutFrame*>(this)->Lower() : nullptr; } -SwFrm* SwFrm::GetLower() +SwFrame* SwFrame::GetLower() { - return IsLayoutFrm() ? static_cast<SwLayoutFrm*>(this)->Lower() : nullptr; + return IsLayoutFrame() ? static_cast<SwLayoutFrame*>(this)->Lower() : nullptr; } -SwContentFrm* SwFrm::FindPrevCnt( const bool _bInSameFootnote ) +SwContentFrame* SwFrame::FindPrevCnt( const bool _bInSameFootnote ) { - if ( GetPrev() && GetPrev()->IsContentFrm() ) - return static_cast<SwContentFrm*>(GetPrev()); + if ( GetPrev() && GetPrev()->IsContentFrame() ) + return static_cast<SwContentFrame*>(GetPrev()); else return _FindPrevCnt( _bInSameFootnote ); } -const SwContentFrm* SwFrm::FindPrevCnt( const bool _bInSameFootnote ) const +const SwContentFrame* SwFrame::FindPrevCnt( const bool _bInSameFootnote ) const { - if ( GetPrev() && GetPrev()->IsContentFrm() ) - return static_cast<const SwContentFrm*>(GetPrev()); + if ( GetPrev() && GetPrev()->IsContentFrame() ) + return static_cast<const SwContentFrame*>(GetPrev()); else - return const_cast<SwFrm*>(this)->_FindPrevCnt( _bInSameFootnote ); + return const_cast<SwFrame*>(this)->_FindPrevCnt( _bInSameFootnote ); } -SwContentFrm *SwFrm::FindNextCnt( const bool _bInSameFootnote ) +SwContentFrame *SwFrame::FindNextCnt( const bool _bInSameFootnote ) { - if ( mpNext && mpNext->IsContentFrm() ) - return static_cast<SwContentFrm*>(mpNext); + if ( mpNext && mpNext->IsContentFrame() ) + return static_cast<SwContentFrame*>(mpNext); else return _FindNextCnt( _bInSameFootnote ); } -const SwContentFrm *SwFrm::FindNextCnt( const bool _bInSameFootnote ) const +const SwContentFrame *SwFrame::FindNextCnt( const bool _bInSameFootnote ) const { - if ( mpNext && mpNext->IsContentFrm() ) - return static_cast<SwContentFrm*>(mpNext); + if ( mpNext && mpNext->IsContentFrame() ) + return static_cast<SwContentFrame*>(mpNext); else - return const_cast<SwFrm*>(this)->_FindNextCnt( _bInSameFootnote ); + return const_cast<SwFrame*>(this)->_FindNextCnt( _bInSameFootnote ); } -bool SwLayoutFrm::IsAnLower( const SwFrm *pAssumed ) const +bool SwLayoutFrame::IsAnLower( const SwFrame *pAssumed ) const { - const SwFrm *pUp = pAssumed; + const SwFrame *pUp = pAssumed; while ( pUp ) { if ( pUp == this ) return true; - if ( pUp->IsFlyFrm() ) - pUp = static_cast<const SwFlyFrm*>(pUp)->GetAnchorFrm(); + if ( pUp->IsFlyFrame() ) + pUp = static_cast<const SwFlyFrame*>(pUp)->GetAnchorFrame(); else pUp = pUp->GetUpper(); } @@ -219,22 +219,22 @@ bool SwLayoutFrm::IsAnLower( const SwFrm *pAssumed ) const OD 08.11.2002 - refactoring of pseudo-local method <lcl_Apres(..)> in <txtftn.cxx> for #104840#. - @param _aCheckRefLayFrm - constant reference of an instance of class <SwLayoutFrm> which + @param _aCheckRefLayFrame + constant reference of an instance of class <SwLayoutFrame> which is used as the reference for the relative position check. @return true, if <this> is positioned before the layout frame <p> */ -bool SwLayoutFrm::IsBefore( const SwLayoutFrm* _pCheckRefLayFrm ) const +bool SwLayoutFrame::IsBefore( const SwLayoutFrame* _pCheckRefLayFrame ) const { - OSL_ENSURE( !IsRootFrm() , "<IsBefore> called at a <SwRootFrm>."); - OSL_ENSURE( !_pCheckRefLayFrm->IsRootFrm() , "<IsBefore> called with a <SwRootFrm>."); + OSL_ENSURE( !IsRootFrame() , "<IsBefore> called at a <SwRootFrame>."); + OSL_ENSURE( !_pCheckRefLayFrame->IsRootFrame() , "<IsBefore> called with a <SwRootFrame>."); bool bReturn; // check, if on different pages - const SwPageFrm *pMyPage = FindPageFrm(); - const SwPageFrm *pCheckRefPage = _pCheckRefLayFrm->FindPageFrm(); + const SwPageFrame *pMyPage = FindPageFrame(); + const SwPageFrame *pCheckRefPage = _pCheckRefLayFrame->FindPageFrame(); if( pMyPage != pCheckRefPage ) { // being on different page as check reference @@ -244,9 +244,9 @@ bool SwLayoutFrm::IsBefore( const SwLayoutFrm* _pCheckRefLayFrm ) const { // being on same page as check reference // --> search my supreme parent <pUp>, which doesn't contain check reference. - const SwLayoutFrm* pUp = this; + const SwLayoutFrame* pUp = this; while ( pUp->GetUpper() && - !pUp->GetUpper()->IsAnLower( _pCheckRefLayFrm ) + !pUp->GetUpper()->IsAnLower( _pCheckRefLayFrame ) ) pUp = pUp->GetUpper(); if( !pUp->GetUpper() ) @@ -258,11 +258,11 @@ bool SwLayoutFrm::IsBefore( const SwLayoutFrm* _pCheckRefLayFrm ) const { // travel through the next's of <pUp> and check if one of these // contain the check reference. - const SwLayoutFrm* pUpNext = static_cast<const SwLayoutFrm*>(pUp->GetNext()); + const SwLayoutFrame* pUpNext = static_cast<const SwLayoutFrame*>(pUp->GetNext()); while ( pUpNext && - !pUpNext->IsAnLower( _pCheckRefLayFrm ) ) + !pUpNext->IsAnLower( _pCheckRefLayFrame ) ) { - pUpNext = static_cast<const SwLayoutFrm*>(pUpNext->GetNext()); + pUpNext = static_cast<const SwLayoutFrame*>(pUpNext->GetNext()); } bReturn = pUpNext != nullptr; } @@ -273,25 +273,25 @@ bool SwLayoutFrm::IsBefore( const SwLayoutFrm* _pCheckRefLayFrm ) const // Local helper functions for GetNextLayoutLeaf -static const SwFrm* lcl_FindLayoutFrame( const SwFrm* pFrm, bool bNext ) +static const SwFrame* lcl_FindLayoutFrame( const SwFrame* pFrame, bool bNext ) { - const SwFrm* pRet = nullptr; - if ( pFrm->IsFlyFrm() ) - pRet = bNext ? static_cast<const SwFlyFrm*>(pFrm)->GetNextLink() : static_cast<const SwFlyFrm*>(pFrm)->GetPrevLink(); + const SwFrame* pRet = nullptr; + if ( pFrame->IsFlyFrame() ) + pRet = bNext ? static_cast<const SwFlyFrame*>(pFrame)->GetNextLink() : static_cast<const SwFlyFrame*>(pFrame)->GetPrevLink(); else - pRet = bNext ? pFrm->GetNext() : pFrm->GetPrev(); + pRet = bNext ? pFrame->GetNext() : pFrame->GetPrev(); return pRet; } -static const SwFrm* lcl_GetLower( const SwFrm* pFrm, bool bFwd ) +static const SwFrame* lcl_GetLower( const SwFrame* pFrame, bool bFwd ) { - if ( !pFrm->IsLayoutFrm() ) + if ( !pFrame->IsLayoutFrame() ) return nullptr; return bFwd ? - static_cast<const SwLayoutFrm*>(pFrm)->Lower() : - static_cast<const SwLayoutFrm*>(pFrm)->GetLastLower(); + static_cast<const SwLayoutFrame*>(pFrame)->Lower() : + static_cast<const SwLayoutFrame*>(pFrame)->GetLastLower(); } /** @@ -299,30 +299,30 @@ static const SwFrm* lcl_GetLower( const SwFrm* pFrm, bool bFwd ) * have a lower which is a LayoutFrame. That means, pLower can be 0 or a * content frame. * - * However, pLower may be a TabFrm + * However, pLower may be a TabFrame */ -const SwLayoutFrm *SwFrm::ImplGetNextLayoutLeaf( bool bFwd ) const +const SwLayoutFrame *SwFrame::ImplGetNextLayoutLeaf( bool bFwd ) const { - const SwFrm *pFrm = this; - const SwLayoutFrm *pLayoutFrm = nullptr; - const SwFrm *p = nullptr; + const SwFrame *pFrame = this; + const SwLayoutFrame *pLayoutFrame = nullptr; + const SwFrame *p = nullptr; bool bGoingUp = !bFwd; // false for forward, true for backward do { bool bGoingFwdOrBwd = false; - bool bGoingDown = ( !bGoingUp && ( nullptr != (p = lcl_GetLower( pFrm, bFwd ) ) ) ); + bool bGoingDown = ( !bGoingUp && ( nullptr != (p = lcl_GetLower( pFrame, bFwd ) ) ) ); if ( !bGoingDown ) { // I cannot go down, because either I'm currently going up or // because the is no lower. // I'll try to go forward: - bGoingFwdOrBwd = (nullptr != (p = lcl_FindLayoutFrame( pFrm, bFwd ) ) ); + bGoingFwdOrBwd = (nullptr != (p = lcl_FindLayoutFrame( pFrame, bFwd ) ) ); if ( !bGoingFwdOrBwd ) { // I cannot go forward, because there is no next frame. // I'll try to go up: - bGoingUp = (nullptr != (p = pFrm->GetUpper() ) ); + bGoingUp = (nullptr != (p = pFrame->GetUpper() ) ); if ( !bGoingUp ) { // I cannot go up, because there is no upper frame. @@ -334,43 +334,43 @@ const SwLayoutFrm *SwFrm::ImplGetNextLayoutLeaf( bool bFwd ) const // If I could not go down or forward, I'll have to go up bGoingUp = !bGoingFwdOrBwd && !bGoingDown; - pFrm = p; - p = lcl_GetLower( pFrm, true ); + pFrame = p; + p = lcl_GetLower( pFrame, true ); - } while( ( p && !p->IsFlowFrm() ) || - pFrm == this || - nullptr == ( pLayoutFrm = pFrm->IsLayoutFrm() ? static_cast<const SwLayoutFrm*>(pFrm) : nullptr ) || - pLayoutFrm->IsAnLower( this ) ); + } while( ( p && !p->IsFlowFrame() ) || + pFrame == this || + nullptr == ( pLayoutFrame = pFrame->IsLayoutFrame() ? static_cast<const SwLayoutFrame*>(pFrame) : nullptr ) || + pLayoutFrame->IsAnLower( this ) ); - return pLayoutFrm; + return pLayoutFrame; } /** - * Walk back inside the tree: grab the subordinate Frm if one exists and the + * Walk back inside the tree: grab the subordinate Frame if one exists and the * last step was not moving up a level (this would lead to an infinite up/down * loop!). With this we ensure that during walking back we search through all * sub trees. If we walked downwards we have to go to the end of the chain first - * because we go backwards from the last Frm inside another Frm. Walking + * because we go backwards from the last Frame inside another Frame. Walking * forward works the same. * - * @warning fixes here may also need to be applied to the @{lcl_NextFrm} method above + * @warning fixes here may also need to be applied to the @{lcl_NextFrame} method above */ -const SwContentFrm* SwContentFrm::ImplGetNextContentFrm( bool bFwd ) const +const SwContentFrame* SwContentFrame::ImplGetNextContentFrame( bool bFwd ) const { - const SwFrm *pFrm = this; - const SwContentFrm *pContentFrm = nullptr; + const SwFrame *pFrame = this; + const SwContentFrame *pContentFrame = nullptr; bool bGoingUp = false; do { - const SwFrm *p = nullptr; + const SwFrame *p = nullptr; bool bGoingFwdOrBwd = false; - bool bGoingDown = ( !bGoingUp && ( nullptr != ( p = lcl_GetLower( pFrm, true ) ) ) ); + bool bGoingDown = ( !bGoingUp && ( nullptr != ( p = lcl_GetLower( pFrame, true ) ) ) ); if ( !bGoingDown ) { - bGoingFwdOrBwd = ( nullptr != ( p = lcl_FindLayoutFrame( pFrm, bFwd ) ) ); + bGoingFwdOrBwd = ( nullptr != ( p = lcl_FindLayoutFrame( pFrame, bFwd ) ) ); if ( !bGoingFwdOrBwd ) { - bGoingUp = ( nullptr != ( p = pFrm->GetUpper() ) ); + bGoingUp = ( nullptr != ( p = pFrame->GetUpper() ) ); if ( !bGoingUp ) { return nullptr; @@ -387,161 +387,161 @@ const SwContentFrm* SwContentFrm::ImplGetNextContentFrm( bool bFwd ) const p = p->GetNext(); } - pFrm = p; - } while ( nullptr == (pContentFrm = (pFrm->IsContentFrm() ? static_cast<const SwContentFrm*>(pFrm) : nullptr) )); + pFrame = p; + } while ( nullptr == (pContentFrame = (pFrame->IsContentFrame() ? static_cast<const SwContentFrame*>(pFrame) : nullptr) )); - return pContentFrm; + return pContentFrame; } -SwPageFrm* SwFrm::ImplFindPageFrm() +SwPageFrame* SwFrame::ImplFindPageFrame() { - SwFrm *pRet = this; - while ( pRet && !pRet->IsPageFrm() ) + SwFrame *pRet = this; + while ( pRet && !pRet->IsPageFrame() ) { if ( pRet->GetUpper() ) pRet = pRet->GetUpper(); - else if ( pRet->IsFlyFrm() ) + else if ( pRet->IsFlyFrame() ) { - // #i28701# - use new method <GetPageFrm()> - const auto pFly(static_cast<SwFlyFrm*>(pRet)); - pRet = pFly->GetPageFrm(); + // #i28701# - use new method <GetPageFrame()> + const auto pFly(static_cast<SwFlyFrame*>(pRet)); + pRet = pFly->GetPageFrame(); if (pRet == nullptr) - pRet = pFly->AnchorFrm(); + pRet = pFly->AnchorFrame(); } else return nullptr; } - return static_cast<SwPageFrm*>(pRet); + return static_cast<SwPageFrame*>(pRet); } -SwFootnoteBossFrm* SwFrm::FindFootnoteBossFrm( bool bFootnotes ) +SwFootnoteBossFrame* SwFrame::FindFootnoteBossFrame( bool bFootnotes ) { - SwFrm *pRet = this; + SwFrame *pRet = this; // Footnote bosses can't exist inside a table; also sections with columns // don't contain footnote texts there if( pRet->IsInTab() ) - pRet = pRet->FindTabFrm(); - while ( pRet && !pRet->IsFootnoteBossFrm() ) + pRet = pRet->FindTabFrame(); + while ( pRet && !pRet->IsFootnoteBossFrame() ) { if ( pRet->GetUpper() ) pRet = pRet->GetUpper(); - else if ( pRet->IsFlyFrm() ) + else if ( pRet->IsFlyFrame() ) { - // #i28701# - use new method <GetPageFrm()> - if ( static_cast<SwFlyFrm*>(pRet)->GetPageFrm() ) - pRet = static_cast<SwFlyFrm*>(pRet)->GetPageFrm(); + // #i28701# - use new method <GetPageFrame()> + if ( static_cast<SwFlyFrame*>(pRet)->GetPageFrame() ) + pRet = static_cast<SwFlyFrame*>(pRet)->GetPageFrame(); else - pRet = static_cast<SwFlyFrm*>(pRet)->AnchorFrm(); + pRet = static_cast<SwFlyFrame*>(pRet)->AnchorFrame(); } else return nullptr; } - if( bFootnotes && pRet && pRet->IsColumnFrm() && + if( bFootnotes && pRet && pRet->IsColumnFrame() && !pRet->GetNext() && !pRet->GetPrev() ) { - SwSectionFrm* pSct = pRet->FindSctFrm(); - OSL_ENSURE( pSct, "FindFootnoteBossFrm: Single column outside section?" ); + SwSectionFrame* pSct = pRet->FindSctFrame(); + OSL_ENSURE( pSct, "FindFootnoteBossFrame: Single column outside section?" ); if( !pSct->IsFootnoteAtEnd() ) - return pSct->FindFootnoteBossFrm( true ); + return pSct->FindFootnoteBossFrame( true ); } - return static_cast<SwFootnoteBossFrm*>(pRet); + return static_cast<SwFootnoteBossFrame*>(pRet); } -SwTabFrm* SwFrm::ImplFindTabFrm() +SwTabFrame* SwFrame::ImplFindTabFrame() { - SwFrm *pRet = this; - while ( !pRet->IsTabFrm() ) + SwFrame *pRet = this; + while ( !pRet->IsTabFrame() ) { pRet = pRet->GetUpper(); if ( !pRet ) return nullptr; } - return static_cast<SwTabFrm*>(pRet); + return static_cast<SwTabFrame*>(pRet); } -SwSectionFrm* SwFrm::ImplFindSctFrm() +SwSectionFrame* SwFrame::ImplFindSctFrame() { - SwFrm *pRet = this; - while ( !pRet->IsSctFrm() ) + SwFrame *pRet = this; + while ( !pRet->IsSctFrame() ) { pRet = pRet->GetUpper(); if ( !pRet ) return nullptr; } - return static_cast<SwSectionFrm*>(pRet); + return static_cast<SwSectionFrame*>(pRet); } -SwFootnoteFrm *SwFrm::ImplFindFootnoteFrm() +SwFootnoteFrame *SwFrame::ImplFindFootnoteFrame() { - SwFrm *pRet = this; - while ( !pRet->IsFootnoteFrm() ) + SwFrame *pRet = this; + while ( !pRet->IsFootnoteFrame() ) { pRet = pRet->GetUpper(); if ( !pRet ) return nullptr; } - return static_cast<SwFootnoteFrm*>(pRet); + return static_cast<SwFootnoteFrame*>(pRet); } -SwFlyFrm *SwFrm::ImplFindFlyFrm() +SwFlyFrame *SwFrame::ImplFindFlyFrame() { - SwFrm *pRet = this; + SwFrame *pRet = this; do { - if ( pRet->IsFlyFrm() ) - return static_cast<SwFlyFrm*>(pRet); + if ( pRet->IsFlyFrame() ) + return static_cast<SwFlyFrame*>(pRet); else pRet = pRet->GetUpper(); } while ( pRet ); return nullptr; } -SwFrm *SwFrm::FindColFrm() +SwFrame *SwFrame::FindColFrame() { - SwFrm *pFrm = this; + SwFrame *pFrame = this; do - { pFrm = pFrm->GetUpper(); - } while ( pFrm && !pFrm->IsColumnFrm() ); - return pFrm; + { pFrame = pFrame->GetUpper(); + } while ( pFrame && !pFrame->IsColumnFrame() ); + return pFrame; } -SwRowFrm *SwFrm::FindRowFrm() +SwRowFrame *SwFrame::FindRowFrame() { - SwFrm *pFrm = this; + SwFrame *pFrame = this; do - { pFrm = pFrm->GetUpper(); - } while ( pFrm && !pFrm->IsRowFrm() ); - return dynamic_cast< SwRowFrm* >( pFrm ); + { pFrame = pFrame->GetUpper(); + } while ( pFrame && !pFrame->IsRowFrame() ); + return dynamic_cast< SwRowFrame* >( pFrame ); } -SwFrm* SwFrm::FindFooterOrHeader() +SwFrame* SwFrame::FindFooterOrHeader() { - SwFrm* pRet = this; + SwFrame* pRet = this; do { if (pRet->GetType() & FRM_HEADFOOT) //header and footer return pRet; else if ( pRet->GetUpper() ) pRet = pRet->GetUpper(); - else if ( pRet->IsFlyFrm() ) - pRet = static_cast<SwFlyFrm*>(pRet)->AnchorFrm(); + else if ( pRet->IsFlyFrame() ) + pRet = static_cast<SwFlyFrame*>(pRet)->AnchorFrame(); else return nullptr; } while ( pRet ); return pRet; } -const SwFootnoteFrm* SwFootnoteContFrm::FindFootNote() const +const SwFootnoteFrame* SwFootnoteContFrame::FindFootNote() const { - const SwFootnoteFrm* pRet = static_cast<const SwFootnoteFrm*>(Lower()); + const SwFootnoteFrame* pRet = static_cast<const SwFootnoteFrame*>(Lower()); if( pRet && !pRet->GetAttr()->GetFootnote().IsEndNote() ) return pRet; return nullptr; } -const SwPageFrm* SwRootFrm::GetPageAtPos( const Point& rPt, const Size* pSize, bool bExtend ) const +const SwPageFrame* SwRootFrame::GetPageAtPos( const Point& rPt, const Size* pSize, bool bExtend ) const { - const SwPageFrm* pRet = nullptr; + const SwPageFrame* pRet = nullptr; SwRect aRect; if ( pSize ) @@ -550,15 +550,15 @@ const SwPageFrm* SwRootFrm::GetPageAtPos( const Point& rPt, const Size* pSize, b aRect.SSize() = *pSize; } - const SwFrm* pPage = Lower(); + const SwFrame* pPage = Lower(); if ( !bExtend ) { - if( !Frm().IsInside( rPt ) ) + if( !Frame().IsInside( rPt ) ) return nullptr; // skip pages above point: - while( pPage && rPt.Y() > pPage->Frm().Bottom() ) + while( pPage && rPt.Y() > pPage->Frame().Bottom() ) pPage = pPage->GetNext(); } @@ -567,12 +567,12 @@ const SwPageFrm* SwRootFrm::GetPageAtPos( const Point& rPt, const Size* pSize, b while ( pPage && !pRet ) { - const SwRect& rBoundRect = bExtend ? maPageRects[ nPageIdx++ ] : pPage->Frm(); + const SwRect& rBoundRect = bExtend ? maPageRects[ nPageIdx++ ] : pPage->Frame(); if ( (!pSize && rBoundRect.IsInside(rPt)) || (pSize && rBoundRect.IsOver(aRect)) ) { - pRet = static_cast<const SwPageFrm*>(pPage); + pRet = static_cast<const SwPageFrame*>(pPage); } pPage = pPage->GetNext(); @@ -581,26 +581,26 @@ const SwPageFrm* SwRootFrm::GetPageAtPos( const Point& rPt, const Size* pSize, b return pRet; } -bool SwRootFrm::IsBetweenPages(const Point& rPt) const +bool SwRootFrame::IsBetweenPages(const Point& rPt) const { - if (!Frm().IsInside(rPt)) + if (!Frame().IsInside(rPt)) return false; // top visible page - const SwFrm* pPage = Lower(); + const SwFrame* pPage = Lower(); if (pPage == nullptr) return false; // skip pages above point: - while (pPage && rPt.Y() > pPage->Frm().Bottom()) + while (pPage && rPt.Y() > pPage->Frame().Bottom()) pPage = pPage->GetNext(); if (pPage && - rPt.X() >= pPage->Frm().Left() && - rPt.X() <= pPage->Frm().Right()) + rPt.X() >= pPage->Frame().Left() && + rPt.X() <= pPage->Frame().Right()) { // Trivial case when we're right in between. - if (!pPage->Frm().IsInside(rPt)) + if (!pPage->Frame().IsInside(rPt)) return true; // In normal mode the gap is large enough and @@ -612,8 +612,8 @@ bool SwRootFrm::IsBetweenPages(const Point& rPt) const if (pSh && pSh->GetViewOptions()->IsWhitespaceHidden()) { // If we are really close to the bottom or top of a page. - const auto toEdge = std::min(std::abs(pPage->Frm().Top() - rPt.Y()), - std::abs(pPage->Frm().Bottom() - rPt.Y())); + const auto toEdge = std::min(std::abs(pPage->Frame().Top() - rPt.Y()), + std::abs(pPage->Frame().Bottom() - rPt.Y())); return toEdge <= MmToTwips(2.0); } } @@ -621,46 +621,46 @@ bool SwRootFrm::IsBetweenPages(const Point& rPt) const return false; } -const SwAttrSet* SwFrm::GetAttrSet() const +const SwAttrSet* SwFrame::GetAttrSet() const { - if ( IsContentFrm() ) - return &static_cast<const SwContentFrm*>(this)->GetNode()->GetSwAttrSet(); + if ( IsContentFrame() ) + return &static_cast<const SwContentFrame*>(this)->GetNode()->GetSwAttrSet(); else - return &static_cast<const SwLayoutFrm*>(this)->GetFormat()->GetAttrSet(); + return &static_cast<const SwLayoutFrame*>(this)->GetFormat()->GetAttrSet(); } //UUUU -drawinglayer::attribute::SdrAllFillAttributesHelperPtr SwFrm::getSdrAllFillAttributesHelper() const +drawinglayer::attribute::SdrAllFillAttributesHelperPtr SwFrame::getSdrAllFillAttributesHelper() const { - if(IsContentFrm()) + if(IsContentFrame()) { - return static_cast< const SwContentFrm* >(this)->GetNode()->getSdrAllFillAttributesHelper(); + return static_cast< const SwContentFrame* >(this)->GetNode()->getSdrAllFillAttributesHelper(); } else { - return static_cast< const SwLayoutFrm* >(this)->GetFormat()->getSdrAllFillAttributesHelper(); + return static_cast< const SwLayoutFrame* >(this)->GetFormat()->getSdrAllFillAttributesHelper(); } } -bool SwFrm::supportsFullDrawingLayerFillAttributeSet() const +bool SwFrame::supportsFullDrawingLayerFillAttributeSet() const { - if (IsContentFrm()) + if (IsContentFrame()) { return true; } else { - return static_cast< const SwLayoutFrm* >(this)->GetFormat()->supportsFullDrawingLayerFillAttributeSet(); + return static_cast< const SwLayoutFrame* >(this)->GetFormat()->supportsFullDrawingLayerFillAttributeSet(); } } /* - * SwFrm::_FindNext(), _FindPrev(), InvalidateNextPos() - * _FindNextCnt() visits tables and sections and only returns SwContentFrms. + * SwFrame::_FindNext(), _FindPrev(), InvalidateNextPos() + * _FindNextCnt() visits tables and sections and only returns SwContentFrames. * * Description Invalidates the position of the next frame. - * This is the direct successor or in case of ContentFrms the next - * ContentFrm which sits in the same flow as I do: + * This is the direct successor or in case of ContentFrames the next + * ContentFrame which sits in the same flow as I do: * - body, * - footnote, * - in headers/footers the notification only needs to be forwarded @@ -670,24 +670,24 @@ bool SwFrm::supportsFullDrawingLayerFillAttributeSet() const * - in principle tables behave exactly like the Contents * - sections also */ -// This helper function is an equivalent to the ImplGetNextContentFrm() method, -// besides ContentFrames this function also returns TabFrms and SectionFrms. -static SwFrm* lcl_NextFrm( SwFrm* pFrm ) +// This helper function is an equivalent to the ImplGetNextContentFrame() method, +// besides ContentFrames this function also returns TabFrames and SectionFrames. +static SwFrame* lcl_NextFrame( SwFrame* pFrame ) { - SwFrm *pRet = nullptr; + SwFrame *pRet = nullptr; bool bGoingUp = false; do { - SwFrm *p = nullptr; + SwFrame *p = nullptr; bool bGoingFwd = false; - bool bGoingDown = (!bGoingUp && ( nullptr != (p = pFrm->IsLayoutFrm() ? static_cast<SwLayoutFrm*>(pFrm)->Lower() : nullptr))); + bool bGoingDown = (!bGoingUp && ( nullptr != (p = pFrame->IsLayoutFrame() ? static_cast<SwLayoutFrame*>(pFrame)->Lower() : nullptr))); if( !bGoingDown ) { - bGoingFwd = (nullptr != (p = ( pFrm->IsFlyFrm() ? static_cast<SwFlyFrm*>(pFrm)->GetNextLink() : pFrm->GetNext()))); + bGoingFwd = (nullptr != (p = ( pFrame->IsFlyFrame() ? static_cast<SwFlyFrame*>(pFrame)->GetNextLink() : pFrame->GetNext()))); if ( !bGoingFwd ) { - bGoingUp = (nullptr != (p = pFrm->GetUpper())); + bGoingUp = (nullptr != (p = pFrame->GetUpper())); if ( !bGoingUp ) { return nullptr; @@ -695,69 +695,69 @@ static SwFrm* lcl_NextFrm( SwFrm* pFrm ) } } bGoingUp = !(bGoingFwd || bGoingDown); - pFrm = p; - } while ( nullptr == (pRet = ( ( pFrm->IsContentFrm() || ( !bGoingUp && - ( pFrm->IsTabFrm() || pFrm->IsSctFrm() ) ) )? pFrm : nullptr ) ) ); + pFrame = p; + } while ( nullptr == (pRet = ( ( pFrame->IsContentFrame() || ( !bGoingUp && + ( pFrame->IsTabFrame() || pFrame->IsSctFrame() ) ) )? pFrame : nullptr ) ) ); return pRet; } -SwFrm *SwFrm::_FindNext() +SwFrame *SwFrame::_FindNext() { bool bIgnoreTab = false; - SwFrm *pThis = this; + SwFrame *pThis = this; - if ( IsTabFrm() ) + if ( IsTabFrame() ) { //The last Content of the table gets picked up and his follower is //returned. To be able to deactivate the special case for tables //(see below) bIgnoreTab will be set. - if ( static_cast<SwTabFrm*>(this)->GetFollow() ) - return static_cast<SwTabFrm*>(this)->GetFollow(); + if ( static_cast<SwTabFrame*>(this)->GetFollow() ) + return static_cast<SwTabFrame*>(this)->GetFollow(); - pThis = static_cast<SwTabFrm*>(this)->FindLastContent(); + pThis = static_cast<SwTabFrame*>(this)->FindLastContent(); if ( !pThis ) pThis = this; bIgnoreTab = true; } - else if ( IsSctFrm() ) + else if ( IsSctFrame() ) { //The last Content of the section gets picked and his follower is returned. - if ( static_cast<SwSectionFrm*>(this)->GetFollow() ) - return static_cast<SwSectionFrm*>(this)->GetFollow(); + if ( static_cast<SwSectionFrame*>(this)->GetFollow() ) + return static_cast<SwSectionFrame*>(this)->GetFollow(); - pThis = static_cast<SwSectionFrm*>(this)->FindLastContent(); + pThis = static_cast<SwSectionFrame*>(this)->FindLastContent(); if ( !pThis ) pThis = this; } - else if ( IsContentFrm() ) + else if ( IsContentFrame() ) { - if( static_cast<SwContentFrm*>(this)->GetFollow() ) - return static_cast<SwContentFrm*>(this)->GetFollow(); + if( static_cast<SwContentFrame*>(this)->GetFollow() ) + return static_cast<SwContentFrame*>(this)->GetFollow(); } - else if ( IsRowFrm() ) + else if ( IsRowFrame() ) { - SwFrm* pMyUpper = GetUpper(); - if ( pMyUpper->IsTabFrm() && static_cast<SwTabFrm*>(pMyUpper)->GetFollow() ) - return static_cast<SwTabFrm*>(pMyUpper)->GetFollow()->GetLower(); + SwFrame* pMyUpper = GetUpper(); + if ( pMyUpper->IsTabFrame() && static_cast<SwTabFrame*>(pMyUpper)->GetFollow() ) + return static_cast<SwTabFrame*>(pMyUpper)->GetFollow()->GetLower(); else return nullptr; } else return nullptr; - SwFrm* pRet = nullptr; + SwFrame* pRet = nullptr; const bool bFootnote = pThis->IsInFootnote(); if ( !bIgnoreTab && pThis->IsInTab() ) { - SwLayoutFrm *pUp = pThis->GetUpper(); - while (pUp && !pUp->IsCellFrm()) + SwLayoutFrame *pUp = pThis->GetUpper(); + while (pUp && !pUp->IsCellFrame()) pUp = pUp->GetUpper(); SAL_WARN_IF(!pUp, "sw.core", "Content in table but not in cell."); - SwFrm* pNxt = pUp ? static_cast<SwCellFrm*>(pUp)->GetFollowCell() : nullptr; + SwFrame* pNxt = pUp ? static_cast<SwCellFrame*>(pUp)->GetFollowCell() : nullptr; if ( pNxt ) - pNxt = static_cast<SwCellFrm*>(pNxt)->ContainsContent(); + pNxt = static_cast<SwCellFrame*>(pNxt)->ContainsContent(); if ( !pNxt ) { - pNxt = lcl_NextFrm( pThis ); + pNxt = lcl_NextFrame( pThis ); if (pUp && pUp->IsAnLower(pNxt)) pRet = pNxt; } @@ -767,7 +767,7 @@ SwFrm *SwFrm::_FindNext() else { const bool bBody = pThis->IsInDocBody(); - SwFrm *pNxtCnt = lcl_NextFrm( pThis ); + SwFrame *pNxtCnt = lcl_NextFrame( pThis ); if ( pNxtCnt ) { if ( bBody || bFootnote ) @@ -777,43 +777,43 @@ SwFrm *SwFrm::_FindNext() // OD 02.04.2003 #108446# - check for endnote, only if found // next content isn't contained in a section, that collect its // endnotes at its end. - bool bEndn = IsInSct() && !IsSctFrm() && + bool bEndn = IsInSct() && !IsSctFrame() && ( !pNxtCnt->IsInSct() || - !pNxtCnt->FindSctFrm()->IsEndnAtEnd() + !pNxtCnt->FindSctFrame()->IsEndnAtEnd() ); if ( ( bBody && pNxtCnt->IsInDocBody() ) || ( pNxtCnt->IsInFootnote() && ( bFootnote || - ( bEndn && pNxtCnt->FindFootnoteFrm()->GetAttr()->GetFootnote().IsEndNote() ) + ( bEndn && pNxtCnt->FindFootnoteFrame()->GetAttr()->GetFootnote().IsEndNote() ) ) ) ) { - pRet = pNxtCnt->IsInTab() ? pNxtCnt->FindTabFrm() + pRet = pNxtCnt->IsInTab() ? pNxtCnt->FindTabFrame() : pNxtCnt; break; } - pNxtCnt = lcl_NextFrm( pNxtCnt ); + pNxtCnt = lcl_NextFrame( pNxtCnt ); } } else if ( pThis->IsInFly() ) { - pRet = pNxtCnt->IsInTab() ? pNxtCnt->FindTabFrm() + pRet = pNxtCnt->IsInTab() ? pNxtCnt->FindTabFrame() : pNxtCnt; } else //footer-/or header section { - const SwFrm *pUp = pThis->GetUpper(); - const SwFrm *pCntUp = pNxtCnt->GetUpper(); + const SwFrame *pUp = pThis->GetUpper(); + const SwFrame *pCntUp = pNxtCnt->GetUpper(); while ( pUp && pUp->GetUpper() && - !pUp->IsHeaderFrm() && !pUp->IsFooterFrm() ) + !pUp->IsHeaderFrame() && !pUp->IsFooterFrame() ) pUp = pUp->GetUpper(); while ( pCntUp && pCntUp->GetUpper() && - !pCntUp->IsHeaderFrm() && !pCntUp->IsFooterFrm() ) + !pCntUp->IsHeaderFrame() && !pCntUp->IsFooterFrame() ) pCntUp = pCntUp->GetUpper(); if ( pCntUp == pUp ) { - pRet = pNxtCnt->IsInTab() ? pNxtCnt->FindTabFrm() + pRet = pNxtCnt->IsInTab() ? pNxtCnt->FindTabFrame() : pNxtCnt; } } @@ -821,7 +821,7 @@ SwFrm *SwFrm::_FindNext() } if( pRet && pRet->IsInSct() ) { - SwSectionFrm* pSct = pRet->FindSctFrm(); + SwSectionFrame* pSct = pRet->FindSctFrame(); //Footnotes in frames with columns must not return the section which //contains the footnote if( !pSct->IsAnLower( this ) && @@ -832,42 +832,42 @@ SwFrm *SwFrm::_FindNext() } // #i27138# - add parameter <_bInSameFootnote> -SwContentFrm *SwFrm::_FindNextCnt( const bool _bInSameFootnote ) +SwContentFrame *SwFrame::_FindNextCnt( const bool _bInSameFootnote ) { - SwFrm *pThis = this; + SwFrame *pThis = this; - if ( IsTabFrm() ) + if ( IsTabFrame() ) { - if ( static_cast<SwTabFrm*>(this)->GetFollow() ) + if ( static_cast<SwTabFrame*>(this)->GetFollow() ) { - pThis = static_cast<SwTabFrm*>(this)->GetFollow()->ContainsContent(); + pThis = static_cast<SwTabFrame*>(this)->GetFollow()->ContainsContent(); if( pThis ) - return static_cast<SwContentFrm*>(pThis); + return static_cast<SwContentFrame*>(pThis); } - pThis = static_cast<SwTabFrm*>(this)->FindLastContent(); + pThis = static_cast<SwTabFrame*>(this)->FindLastContent(); if ( !pThis ) return nullptr; } - else if ( IsSctFrm() ) + else if ( IsSctFrame() ) { - if ( static_cast<SwSectionFrm*>(this)->GetFollow() ) + if ( static_cast<SwSectionFrame*>(this)->GetFollow() ) { - pThis = static_cast<SwSectionFrm*>(this)->GetFollow()->ContainsContent(); + pThis = static_cast<SwSectionFrame*>(this)->GetFollow()->ContainsContent(); if( pThis ) - return static_cast<SwContentFrm*>(pThis); + return static_cast<SwContentFrame*>(pThis); } - pThis = static_cast<SwSectionFrm*>(this)->FindLastContent(); + pThis = static_cast<SwSectionFrame*>(this)->FindLastContent(); if ( !pThis ) return nullptr; } - else if ( IsContentFrm() && static_cast<SwContentFrm*>(this)->GetFollow() ) - return static_cast<SwContentFrm*>(this)->GetFollow(); + else if ( IsContentFrame() && static_cast<SwContentFrame*>(this)->GetFollow() ) + return static_cast<SwContentFrame*>(this)->GetFollow(); - if ( pThis->IsContentFrm() ) + if ( pThis->IsContentFrame() ) { const bool bBody = pThis->IsInDocBody(); const bool bFootnote = pThis->IsInFootnote(); - SwContentFrm *pNxtCnt = static_cast<SwContentFrm*>(pThis)->GetNextContentFrm(); + SwContentFrame *pNxtCnt = static_cast<SwContentFrame*>(pThis)->GetNextContentFrame(); if ( pNxtCnt ) { // #i27138# @@ -879,7 +879,7 @@ SwContentFrm *SwFrm::_FindNextCnt( const bool _bInSameFootnote ) if ( (bBody && pNxtCnt->IsInDocBody()) || (bFootnote && pNxtCnt->IsInFootnote()) ) return pNxtCnt; - pNxtCnt = pNxtCnt->GetNextContentFrm(); + pNxtCnt = pNxtCnt->GetNextContentFrame(); } } // #i27138# @@ -887,25 +887,25 @@ SwContentFrm *SwFrm::_FindNextCnt( const bool _bInSameFootnote ) { // handling for environments 'each footnote': // Assure that found next content frame belongs to the same footnotes - const SwFootnoteFrm* pFootnoteFrmOfNext( pNxtCnt->FindFootnoteFrm() ); - const SwFootnoteFrm* pFootnoteFrmOfCurr( pThis->FindFootnoteFrm() ); - OSL_ENSURE( pFootnoteFrmOfCurr, - "<SwFrm::_FindNextCnt() - unknown layout situation: current frame has to have an upper footnote frame." ); - if ( pFootnoteFrmOfNext == pFootnoteFrmOfCurr ) + const SwFootnoteFrame* pFootnoteFrameOfNext( pNxtCnt->FindFootnoteFrame() ); + const SwFootnoteFrame* pFootnoteFrameOfCurr( pThis->FindFootnoteFrame() ); + OSL_ENSURE( pFootnoteFrameOfCurr, + "<SwFrame::_FindNextCnt() - unknown layout situation: current frame has to have an upper footnote frame." ); + if ( pFootnoteFrameOfNext == pFootnoteFrameOfCurr ) { return pNxtCnt; } - else if ( pFootnoteFrmOfCurr->GetFollow() ) + else if ( pFootnoteFrameOfCurr->GetFollow() ) { // next content frame has to be the first content frame // in the follow footnote, which contains a content frame. - SwFootnoteFrm* pFollowFootnoteFrmOfCurr( - const_cast<SwFootnoteFrm*>(pFootnoteFrmOfCurr) ); + SwFootnoteFrame* pFollowFootnoteFrameOfCurr( + const_cast<SwFootnoteFrame*>(pFootnoteFrameOfCurr) ); pNxtCnt = nullptr; do { - pFollowFootnoteFrmOfCurr = pFollowFootnoteFrmOfCurr->GetFollow(); - pNxtCnt = pFollowFootnoteFrmOfCurr->ContainsContent(); - } while ( !pNxtCnt && pFollowFootnoteFrmOfCurr->GetFollow() ); + pFollowFootnoteFrameOfCurr = pFollowFootnoteFrameOfCurr->GetFollow(); + pNxtCnt = pFollowFootnoteFrameOfCurr->ContainsContent(); + } while ( !pNxtCnt && pFollowFootnoteFrameOfCurr->GetFollow() ); return pNxtCnt; } else @@ -922,13 +922,13 @@ SwContentFrm *SwFrm::_FindNextCnt( const bool _bInSameFootnote ) else { // handling for environments 'page header' and 'page footer': - const SwFrm *pUp = pThis->GetUpper(); - const SwFrm *pCntUp = pNxtCnt->GetUpper(); + const SwFrame *pUp = pThis->GetUpper(); + const SwFrame *pCntUp = pNxtCnt->GetUpper(); while ( pUp && pUp->GetUpper() && - !pUp->IsHeaderFrm() && !pUp->IsFooterFrm() ) + !pUp->IsHeaderFrame() && !pUp->IsFooterFrame() ) pUp = pUp->GetUpper(); while ( pCntUp && pCntUp->GetUpper() && - !pCntUp->IsHeaderFrm() && !pCntUp->IsFooterFrm() ) + !pCntUp->IsHeaderFrame() && !pCntUp->IsFooterFrame() ) pCntUp = pCntUp->GetUpper(); if ( pCntUp == pUp ) return pNxtCnt; @@ -943,115 +943,115 @@ SwContentFrm *SwFrm::_FindNextCnt( const bool _bInSameFootnote ) OD 2005-11-30 #i27138# */ -SwContentFrm* SwFrm::_FindPrevCnt( const bool _bInSameFootnote ) +SwContentFrame* SwFrame::_FindPrevCnt( const bool _bInSameFootnote ) { - if ( !IsFlowFrm() ) + if ( !IsFlowFrame() ) { // nothing to do, if current frame isn't a flow frame. return nullptr; } - SwContentFrm* pPrevContentFrm( nullptr ); + SwContentFrame* pPrevContentFrame( nullptr ); - // Because method <SwContentFrm::GetPrevContentFrm()> is used to travel + // Because method <SwContentFrame::GetPrevContentFrame()> is used to travel // through the layout, a content frame, at which the travel starts, is needed. - SwContentFrm* pCurrContentFrm = dynamic_cast<SwContentFrm*>(this); + SwContentFrame* pCurrContentFrame = dynamic_cast<SwContentFrame*>(this); // perform shortcut, if current frame is a follow, and - // determine <pCurrContentFrm>, if current frame is a table or section frame - if ( pCurrContentFrm && pCurrContentFrm->IsFollow() ) + // determine <pCurrContentFrame>, if current frame is a table or section frame + if ( pCurrContentFrame && pCurrContentFrame->IsFollow() ) { // previous content frame is its master content frame - pPrevContentFrm = pCurrContentFrm->FindMaster(); + pPrevContentFrame = pCurrContentFrame->FindMaster(); } - else if ( IsTabFrm() ) + else if ( IsTabFrame() ) { - SwTabFrm* pTabFrm( static_cast<SwTabFrm*>(this) ); - if ( pTabFrm->IsFollow() ) + SwTabFrame* pTabFrame( static_cast<SwTabFrame*>(this) ); + if ( pTabFrame->IsFollow() ) { // previous content frame is the last content of its master table frame - pPrevContentFrm = pTabFrm->FindMaster()->FindLastContent(); + pPrevContentFrame = pTabFrame->FindMaster()->FindLastContent(); } else { // start content frame for the search is the first content frame of // the table frame. - pCurrContentFrm = pTabFrm->ContainsContent(); + pCurrContentFrame = pTabFrame->ContainsContent(); } } - else if ( IsSctFrm() ) + else if ( IsSctFrame() ) { - SwSectionFrm* pSectFrm( static_cast<SwSectionFrm*>(this) ); - if ( pSectFrm->IsFollow() ) + SwSectionFrame* pSectFrame( static_cast<SwSectionFrame*>(this) ); + if ( pSectFrame->IsFollow() ) { // previous content frame is the last content of its master section frame - pPrevContentFrm = pSectFrm->FindMaster()->FindLastContent(); + pPrevContentFrame = pSectFrame->FindMaster()->FindLastContent(); } else { // start content frame for the search is the first content frame of // the section frame. - pCurrContentFrm = pSectFrm->ContainsContent(); + pCurrContentFrame = pSectFrame->ContainsContent(); } } // search for next content frame, depending on the environment, in which // the current frame is in. - if ( !pPrevContentFrm && pCurrContentFrm ) + if ( !pPrevContentFrame && pCurrContentFrame ) { - pPrevContentFrm = pCurrContentFrm->GetPrevContentFrm(); - if ( pPrevContentFrm ) + pPrevContentFrame = pCurrContentFrame->GetPrevContentFrame(); + if ( pPrevContentFrame ) { - if ( pCurrContentFrm->IsInFly() ) + if ( pCurrContentFrame->IsInFly() ) { // handling for environments 'unlinked fly frame' and // 'group of linked fly frames': - // Nothing to do, <pPrevContentFrm> is the one + // Nothing to do, <pPrevContentFrame> is the one } else { - const bool bInDocBody = pCurrContentFrm->IsInDocBody(); - const bool bInFootnote = pCurrContentFrm->IsInFootnote(); + const bool bInDocBody = pCurrContentFrame->IsInDocBody(); + const bool bInFootnote = pCurrContentFrame->IsInFootnote(); if ( bInDocBody || ( bInFootnote && !_bInSameFootnote ) ) { // handling for environments 'footnotes' and 'document body frames': // Assure that found previous frame is also in one of these // environments. Otherwise, travel further - while ( pPrevContentFrm ) + while ( pPrevContentFrame ) { - if ( ( bInDocBody && pPrevContentFrm->IsInDocBody() ) || - ( bInFootnote && pPrevContentFrm->IsInFootnote() ) ) + if ( ( bInDocBody && pPrevContentFrame->IsInDocBody() ) || + ( bInFootnote && pPrevContentFrame->IsInFootnote() ) ) { break; } - pPrevContentFrm = pPrevContentFrm->GetPrevContentFrm(); + pPrevContentFrame = pPrevContentFrame->GetPrevContentFrame(); } } else if ( bInFootnote && _bInSameFootnote ) { // handling for environments 'each footnote': // Assure that found next content frame belongs to the same footnotes - const SwFootnoteFrm* pFootnoteFrmOfPrev( pPrevContentFrm->FindFootnoteFrm() ); - const SwFootnoteFrm* pFootnoteFrmOfCurr( pCurrContentFrm->FindFootnoteFrm() ); - if ( pFootnoteFrmOfPrev != pFootnoteFrmOfCurr ) + const SwFootnoteFrame* pFootnoteFrameOfPrev( pPrevContentFrame->FindFootnoteFrame() ); + const SwFootnoteFrame* pFootnoteFrameOfCurr( pCurrContentFrame->FindFootnoteFrame() ); + if ( pFootnoteFrameOfPrev != pFootnoteFrameOfCurr ) { - if ( pFootnoteFrmOfCurr->GetMaster() ) + if ( pFootnoteFrameOfCurr->GetMaster() ) { - SwFootnoteFrm* pMasterFootnoteFrmOfCurr( - const_cast<SwFootnoteFrm*>(pFootnoteFrmOfCurr) ); - pPrevContentFrm = nullptr; + SwFootnoteFrame* pMasterFootnoteFrameOfCurr( + const_cast<SwFootnoteFrame*>(pFootnoteFrameOfCurr) ); + pPrevContentFrame = nullptr; // correct wrong loop-condition do { - pMasterFootnoteFrmOfCurr = pMasterFootnoteFrmOfCurr->GetMaster(); - pPrevContentFrm = pMasterFootnoteFrmOfCurr->FindLastContent(); - } while ( !pPrevContentFrm && - pMasterFootnoteFrmOfCurr->GetMaster() ); + pMasterFootnoteFrameOfCurr = pMasterFootnoteFrameOfCurr->GetMaster(); + pPrevContentFrame = pMasterFootnoteFrameOfCurr->FindLastContent(); + } while ( !pPrevContentFrame && + pMasterFootnoteFrameOfCurr->GetMaster() ); } else { // current content frame is the first content in the // footnote - no previous content exists. - pPrevContentFrm = nullptr; + pPrevContentFrame = nullptr; } } } @@ -1059,55 +1059,55 @@ SwContentFrm* SwFrm::_FindPrevCnt( const bool _bInSameFootnote ) { // handling for environments 'page header' and 'page footer': // Assure that found previous frame is also in the same - // page header respectively page footer as <pCurrContentFrm> - // Note: At this point its clear, that <pCurrContentFrm> has + // page header respectively page footer as <pCurrContentFrame> + // Note: At this point its clear, that <pCurrContentFrame> has // to be inside a page header or page footer and that - // neither <pCurrContentFrm> nor <pPrevContentFrm> are + // neither <pCurrContentFrame> nor <pPrevContentFrame> are // inside a fly frame. // Thus, method <FindFooterOrHeader()> can be used. - OSL_ENSURE( pCurrContentFrm->FindFooterOrHeader(), - "<SwFrm::_FindPrevCnt()> - unknown layout situation: current frame should be in page header or page footer" ); - OSL_ENSURE( !pPrevContentFrm->IsInFly(), - "<SwFrm::_FindPrevCnt()> - unknown layout situation: found previous frame should *not* be inside a fly frame." ); - if ( pPrevContentFrm->FindFooterOrHeader() != - pCurrContentFrm->FindFooterOrHeader() ) + OSL_ENSURE( pCurrContentFrame->FindFooterOrHeader(), + "<SwFrame::_FindPrevCnt()> - unknown layout situation: current frame should be in page header or page footer" ); + OSL_ENSURE( !pPrevContentFrame->IsInFly(), + "<SwFrame::_FindPrevCnt()> - unknown layout situation: found previous frame should *not* be inside a fly frame." ); + if ( pPrevContentFrame->FindFooterOrHeader() != + pCurrContentFrame->FindFooterOrHeader() ) { - pPrevContentFrm = nullptr; + pPrevContentFrame = nullptr; } } } } } - return pPrevContentFrm; + return pPrevContentFrame; } -SwFrm *SwFrm::_FindPrev() +SwFrame *SwFrame::_FindPrev() { bool bIgnoreTab = false; - SwFrm *pThis = this; + SwFrame *pThis = this; - if ( IsTabFrm() ) + if ( IsTabFrame() ) { //The first Content of the table gets picked up and his predecessor is //returned. To be able to deactivate the special case for tables //(see below) bIgnoreTab will be set. - if ( static_cast<SwTabFrm*>(this)->IsFollow() ) - return static_cast<SwTabFrm*>(this)->FindMaster(); + if ( static_cast<SwTabFrame*>(this)->IsFollow() ) + return static_cast<SwTabFrame*>(this)->FindMaster(); else - pThis = static_cast<SwTabFrm*>(this)->ContainsContent(); + pThis = static_cast<SwTabFrame*>(this)->ContainsContent(); bIgnoreTab = true; } - if ( pThis && pThis->IsContentFrm() ) + if ( pThis && pThis->IsContentFrame() ) { - SwContentFrm *pPrvCnt = static_cast<SwContentFrm*>(pThis)->GetPrevContentFrm(); + SwContentFrame *pPrvCnt = static_cast<SwContentFrame*>(pThis)->GetPrevContentFrame(); if( !pPrvCnt ) return nullptr; if ( !bIgnoreTab && pThis->IsInTab() ) { - SwLayoutFrm *pUp = pThis->GetUpper(); - while (pUp && !pUp->IsCellFrm()) + SwLayoutFrame *pUp = pThis->GetUpper(); + while (pUp && !pUp->IsCellFrame()) pUp = pUp->GetUpper(); SAL_WARN_IF(!pUp, "sw.core", "Content in table but not in cell."); if (pUp && pUp->IsAnLower(pPrvCnt)) @@ -1115,7 +1115,7 @@ SwFrm *SwFrm::_FindPrev() } else { - SwFrm* pRet; + SwFrame* pRet; const bool bBody = pThis->IsInDocBody(); const bool bFootnote = !bBody && pThis->IsInFootnote(); if ( bBody || bFootnote ) @@ -1125,32 +1125,32 @@ SwFrm *SwFrm::_FindPrev() if ( (bBody && pPrvCnt->IsInDocBody()) || (bFootnote && pPrvCnt->IsInFootnote()) ) { - pRet = pPrvCnt->IsInTab() ? pPrvCnt->FindTabFrm() - : static_cast<SwFrm*>(pPrvCnt); + pRet = pPrvCnt->IsInTab() ? pPrvCnt->FindTabFrame() + : static_cast<SwFrame*>(pPrvCnt); return pRet; } - pPrvCnt = pPrvCnt->GetPrevContentFrm(); + pPrvCnt = pPrvCnt->GetPrevContentFrame(); } } else if ( pThis->IsInFly() ) { - pRet = pPrvCnt->IsInTab() ? pPrvCnt->FindTabFrm() - : static_cast<SwFrm*>(pPrvCnt); + pRet = pPrvCnt->IsInTab() ? pPrvCnt->FindTabFrame() + : static_cast<SwFrame*>(pPrvCnt); return pRet; } else // footer or header or Fly { - const SwFrm *pUp = pThis->GetUpper(); - const SwFrm *pCntUp = pPrvCnt->GetUpper(); + const SwFrame *pUp = pThis->GetUpper(); + const SwFrame *pCntUp = pPrvCnt->GetUpper(); while ( pUp && pUp->GetUpper() && - !pUp->IsHeaderFrm() && !pUp->IsFooterFrm() ) + !pUp->IsHeaderFrame() && !pUp->IsFooterFrame() ) pUp = pUp->GetUpper(); while ( pCntUp && pCntUp->GetUpper() ) pCntUp = pCntUp->GetUpper(); if ( pCntUp == pUp ) { - pRet = pPrvCnt->IsInTab() ? pPrvCnt->FindTabFrm() - : static_cast<SwFrm*>(pPrvCnt); + pRet = pPrvCnt->IsInTab() ? pPrvCnt->FindTabFrame() + : static_cast<SwFrame*>(pPrvCnt); return pRet; } } @@ -1159,46 +1159,46 @@ SwFrm *SwFrm::_FindPrev() return nullptr; } -void SwFrm::ImplInvalidateNextPos( bool bNoFootnote ) +void SwFrame::ImplInvalidateNextPos( bool bNoFootnote ) { - SwFrm *pFrm; - if ( nullptr != (pFrm = _FindNext()) ) + SwFrame *pFrame; + if ( nullptr != (pFrame = _FindNext()) ) { - if( pFrm->IsSctFrm() ) + if( pFrame->IsSctFrame() ) { - while( pFrm && pFrm->IsSctFrm() ) + while( pFrame && pFrame->IsSctFrame() ) { - if( static_cast<SwSectionFrm*>(pFrm)->GetSection() ) + if( static_cast<SwSectionFrame*>(pFrame)->GetSection() ) { - SwFrm* pTmp = static_cast<SwSectionFrm*>(pFrm)->ContainsAny(); + SwFrame* pTmp = static_cast<SwSectionFrame*>(pFrame)->ContainsAny(); if( pTmp ) pTmp->InvalidatePos(); else if( !bNoFootnote ) - static_cast<SwSectionFrm*>(pFrm)->InvalidateFootnotePos(); - if( !IsInSct() || FindSctFrm()->GetFollow() != pFrm ) - pFrm->InvalidatePos(); + static_cast<SwSectionFrame*>(pFrame)->InvalidateFootnotePos(); + if( !IsInSct() || FindSctFrame()->GetFollow() != pFrame ) + pFrame->InvalidatePos(); return; } - pFrm = pFrm->FindNext(); + pFrame = pFrame->FindNext(); } - if( pFrm ) + if( pFrame ) { - if ( pFrm->IsSctFrm()) + if ( pFrame->IsSctFrame()) { // We need to invalidate the section's content so it gets // the chance to flow to a different page. - SwFrm* pTmp = static_cast<SwSectionFrm*>(pFrm)->ContainsAny(); + SwFrame* pTmp = static_cast<SwSectionFrame*>(pFrame)->ContainsAny(); if( pTmp ) pTmp->InvalidatePos(); - if( !IsInSct() || FindSctFrm()->GetFollow() != pFrm ) - pFrm->InvalidatePos(); + if( !IsInSct() || FindSctFrame()->GetFollow() != pFrame ) + pFrame->InvalidatePos(); } else - pFrm->InvalidatePos(); + pFrame->InvalidatePos(); } } else - pFrm->InvalidatePos(); + pFrame->InvalidatePos(); } } @@ -1206,65 +1206,65 @@ void SwFrm::ImplInvalidateNextPos( bool bNoFootnote ) OD 09.01.2004 #i11859# - FME 2004-04-19 #i27145# Moved function from SwTextFrm to SwFrm + FME 2004-04-19 #i27145# Moved function from SwTextFrame to SwFrame */ -void SwFrm::InvalidateNextPrtArea() +void SwFrame::InvalidateNextPrtArea() { // determine next frame - SwFrm* pNextFrm = FindNext(); + SwFrame* pNextFrame = FindNext(); // skip empty section frames and hidden text frames { - while ( pNextFrm && - ( ( pNextFrm->IsSctFrm() && - !static_cast<SwSectionFrm*>(pNextFrm)->GetSection() ) || - ( pNextFrm->IsTextFrm() && - static_cast<SwTextFrm*>(pNextFrm)->IsHiddenNow() ) ) ) + while ( pNextFrame && + ( ( pNextFrame->IsSctFrame() && + !static_cast<SwSectionFrame*>(pNextFrame)->GetSection() ) || + ( pNextFrame->IsTextFrame() && + static_cast<SwTextFrame*>(pNextFrame)->IsHiddenNow() ) ) ) { - pNextFrm = pNextFrm->FindNext(); + pNextFrame = pNextFrame->FindNext(); } } // Invalidate printing area of found next frame - if ( pNextFrm ) + if ( pNextFrame ) { - if ( pNextFrm->IsSctFrm() ) + if ( pNextFrame->IsSctFrame() ) { // Invalidate printing area of found section frame, if // (1) this text frame isn't in a section OR // (2) found section frame isn't a follow of the section frame this // text frame is in. - if ( !IsInSct() || FindSctFrm()->GetFollow() != pNextFrm ) + if ( !IsInSct() || FindSctFrame()->GetFollow() != pNextFrame ) { - pNextFrm->InvalidatePrt(); + pNextFrame->InvalidatePrt(); } // Invalidate printing area of first content in found section. - SwFrm* pFstContentOfSctFrm = - static_cast<SwSectionFrm*>(pNextFrm)->ContainsAny(); - if ( pFstContentOfSctFrm ) + SwFrame* pFstContentOfSctFrame = + static_cast<SwSectionFrame*>(pNextFrame)->ContainsAny(); + if ( pFstContentOfSctFrame ) { - pFstContentOfSctFrm->InvalidatePrt(); + pFstContentOfSctFrame->InvalidatePrt(); } } else { - pNextFrm->InvalidatePrt(); + pNextFrame->InvalidatePrt(); } } } /// @returns true if the frame _directly_ sits in a section with columns /// but not if it sits in a table which itself sits in a section with columns. -static bool lcl_IsInColSct( const SwFrm *pUp ) +static bool lcl_IsInColSct( const SwFrame *pUp ) { bool bRet = false; while( pUp ) { - if( pUp->IsColumnFrm() ) + if( pUp->IsColumnFrame() ) bRet = true; - else if( pUp->IsSctFrm() ) + else if( pUp->IsSctFrame() ) return bRet; - else if( pUp->IsTabFrm() ) + else if( pUp->IsTabFrame() ) return false; pUp = pUp->GetUpper(); } @@ -1276,40 +1276,40 @@ static bool lcl_IsInColSct( const SwFrm *pUp ) OD 08.08.2003 #110978# method replaced 'old' method <sal_Bool IsMoveable() const>. Determines, if frame is moveable in given environment. if no environment - is given (parameter _pLayoutFrm == 0L), the movability in the actual + is given (parameter _pLayoutFrame == 0L), the movability in the actual environment (<this->GetUpper()) is checked. */ -bool SwFrm::IsMoveable( const SwLayoutFrm* _pLayoutFrm ) const +bool SwFrame::IsMoveable( const SwLayoutFrame* _pLayoutFrame ) const { bool bRetVal = false; - if ( !_pLayoutFrm ) + if ( !_pLayoutFrame ) { - _pLayoutFrm = GetUpper(); + _pLayoutFrame = GetUpper(); } - if ( _pLayoutFrm && IsFlowFrm() ) + if ( _pLayoutFrame && IsFlowFrame() ) { - if ( _pLayoutFrm->IsInSct() && lcl_IsInColSct( _pLayoutFrm ) ) + if ( _pLayoutFrame->IsInSct() && lcl_IsInColSct( _pLayoutFrame ) ) { bRetVal = true; } - else if ( _pLayoutFrm->IsInFly() || - _pLayoutFrm->IsInDocBody() || - _pLayoutFrm->IsInFootnote() ) + else if ( _pLayoutFrame->IsInFly() || + _pLayoutFrame->IsInDocBody() || + _pLayoutFrame->IsInFootnote() ) { - if ( _pLayoutFrm->IsInTab() && !IsTabFrm() && - ( !IsContentFrm() || !const_cast<SwFrm*>(this)->GetNextCellLeaf( MAKEPAGE_NONE ) ) ) + if ( _pLayoutFrame->IsInTab() && !IsTabFrame() && + ( !IsContentFrame() || !const_cast<SwFrame*>(this)->GetNextCellLeaf( MAKEPAGE_NONE ) ) ) { bRetVal = false; } else { - if ( _pLayoutFrm->IsInFly() ) + if ( _pLayoutFrame->IsInFly() ) { // if fly frame has a follow (next linked fly frame), // frame is moveable. - if ( const_cast<SwLayoutFrm*>(_pLayoutFrm)->FindFlyFrm()->GetNextLink() ) + if ( const_cast<SwLayoutFrame*>(_pLayoutFrame)->FindFlyFrame()->GetNextLink() ) { bRetVal = true; } @@ -1318,8 +1318,8 @@ bool SwFrm::IsMoveable( const SwLayoutFrm* _pLayoutFrm ) const // if environment is columned, frame is moveable, if // it isn't in last column. // search for column frame - const SwFrm* pCol = _pLayoutFrm; - while ( pCol && !pCol->IsColumnFrm() ) + const SwFrame* pCol = _pLayoutFrame; + while ( pCol && !pCol->IsColumnFrame() ) { pCol = pCol->GetUpper(); } @@ -1341,36 +1341,36 @@ bool SwFrm::IsMoveable( const SwLayoutFrm* _pLayoutFrm ) const return bRetVal; } -void SwFrm::SetInfFlags() +void SwFrame::SetInfFlags() { - if ( !IsFlyFrm() && !GetUpper() ) //not yet pasted, no information available + if ( !IsFlyFrame() && !GetUpper() ) //not yet pasted, no information available return; mbInfInvalid = mbInfBody = mbInfTab = mbInfFly = mbInfFootnote = mbInfSct = false; - SwFrm *pFrm = this; - if( IsFootnoteContFrm() ) + SwFrame *pFrame = this; + if( IsFootnoteContFrame() ) mbInfFootnote = true; do { // mbInfBody is only set in the page body, but not in the column body - if ( pFrm->IsBodyFrm() && !mbInfFootnote && pFrm->GetUpper() - && pFrm->GetUpper()->IsPageFrm() ) + if ( pFrame->IsBodyFrame() && !mbInfFootnote && pFrame->GetUpper() + && pFrame->GetUpper()->IsPageFrame() ) mbInfBody = true; - else if ( pFrm->IsTabFrm() || pFrm->IsCellFrm() ) + else if ( pFrame->IsTabFrame() || pFrame->IsCellFrame() ) { mbInfTab = true; } - else if ( pFrm->IsFlyFrm() ) + else if ( pFrame->IsFlyFrame() ) mbInfFly = true; - else if ( pFrm->IsSctFrm() ) + else if ( pFrame->IsSctFrame() ) mbInfSct = true; - else if ( pFrm->IsFootnoteFrm() ) + else if ( pFrame->IsFootnoteFrame() ) mbInfFootnote = true; - pFrm = pFrm->GetUpper(); + pFrame = pFrame->GetUpper(); - } while ( pFrm && !pFrm->IsPageFrm() ); //there is nothing above the page + } while ( pFrame && !pFrame->IsPageFrame() ); //there is nothing above the page } /** Updates the vertical or the righttoleft-flags. @@ -1378,7 +1378,7 @@ void SwFrm::SetInfFlags() * If the property is derived, it's from the upper or (for fly frames) from * the anchor. Otherwise we've to call a virtual method to check the property. */ -void SwFrm::SetDirFlags( bool bVert ) +void SwFrame::SetDirFlags( bool bVert ) { if( bVert ) { @@ -1386,8 +1386,8 @@ void SwFrm::SetDirFlags( bool bVert ) // vertical flag of upper/anchor is valid. if( mbDerivedVert ) { - const SwFrm* pAsk = IsFlyFrm() ? - static_cast<SwFlyFrm*>(this)->GetAnchorFrm() : GetUpper(); + const SwFrame* pAsk = IsFlyFrame() ? + static_cast<SwFlyFrame*>(this)->GetAnchorFrame() : GetUpper(); OSL_ENSURE( pAsk != this, "Autsch! Stack overflow is about to happen" ); @@ -1412,8 +1412,8 @@ void SwFrm::SetDirFlags( bool bVert ) CheckDirection( bVert ); if( mbDerivedR2L ) { - const SwFrm* pAsk = IsFlyFrm() ? - static_cast<SwFlyFrm*>(this)->GetAnchorFrm() : GetUpper(); + const SwFrame* pAsk = IsFlyFrame() ? + static_cast<SwFlyFrame*>(this)->GetAnchorFrame() : GetUpper(); OSL_ENSURE( pAsk != this, "Oops! Stack overflow is about to happen" ); @@ -1426,66 +1426,66 @@ void SwFrm::SetDirFlags( bool bVert ) } } -SwLayoutFrm* SwFrm::GetNextCellLeaf( MakePageType ) +SwLayoutFrame* SwFrame::GetNextCellLeaf( MakePageType ) { - SwFrm* pTmpFrm = this; - while (pTmpFrm && !pTmpFrm->IsCellFrm()) - pTmpFrm = pTmpFrm->GetUpper(); + SwFrame* pTmpFrame = this; + while (pTmpFrame && !pTmpFrame->IsCellFrame()) + pTmpFrame = pTmpFrame->GetUpper(); - SAL_WARN_IF(!pTmpFrm, "sw.core", "SwFrm::GetNextCellLeaf() without cell"); - return pTmpFrm ? static_cast<SwCellFrm*>(pTmpFrm)->GetFollowCell() : nullptr; + SAL_WARN_IF(!pTmpFrame, "sw.core", "SwFrame::GetNextCellLeaf() without cell"); + return pTmpFrame ? static_cast<SwCellFrame*>(pTmpFrame)->GetFollowCell() : nullptr; } -SwLayoutFrm* SwFrm::GetPrevCellLeaf( MakePageType ) +SwLayoutFrame* SwFrame::GetPrevCellLeaf( MakePageType ) { - SwFrm* pTmpFrm = this; - while ( !pTmpFrm->IsCellFrm() ) - pTmpFrm = pTmpFrm->GetUpper(); + SwFrame* pTmpFrame = this; + while ( !pTmpFrame->IsCellFrame() ) + pTmpFrame = pTmpFrame->GetUpper(); - OSL_ENSURE( pTmpFrm, "SwFrm::GetNextPreviousLeaf() without cell" ); - return static_cast<SwCellFrm*>(pTmpFrm)->GetPreviousCell(); + OSL_ENSURE( pTmpFrame, "SwFrame::GetNextPreviousLeaf() without cell" ); + return static_cast<SwCellFrame*>(pTmpFrame)->GetPreviousCell(); } -static SwCellFrm* lcl_FindCorrespondingCellFrm( const SwRowFrm& rOrigRow, - const SwCellFrm& rOrigCell, - const SwRowFrm& rCorrRow, +static SwCellFrame* lcl_FindCorrespondingCellFrame( const SwRowFrame& rOrigRow, + const SwCellFrame& rOrigCell, + const SwRowFrame& rCorrRow, bool bInFollow ) { - SwCellFrm* pRet = nullptr; - const SwCellFrm* pCell = static_cast<const SwCellFrm*>(rOrigRow.Lower()); - SwCellFrm* pCorrCell = const_cast<SwCellFrm*>(static_cast<const SwCellFrm*>(rCorrRow.Lower())); + SwCellFrame* pRet = nullptr; + const SwCellFrame* pCell = static_cast<const SwCellFrame*>(rOrigRow.Lower()); + SwCellFrame* pCorrCell = const_cast<SwCellFrame*>(static_cast<const SwCellFrame*>(rCorrRow.Lower())); while ( pCell != &rOrigCell && !pCell->IsAnLower( &rOrigCell ) ) { - pCell = static_cast<const SwCellFrm*>(pCell->GetNext()); - pCorrCell = static_cast<SwCellFrm*>(pCorrCell->GetNext()); + pCell = static_cast<const SwCellFrame*>(pCell->GetNext()); + pCorrCell = static_cast<SwCellFrame*>(pCorrCell->GetNext()); } - assert(pCell && pCorrCell && "lcl_FindCorrespondingCellFrm does not work"); + assert(pCell && pCorrCell && "lcl_FindCorrespondingCellFrame does not work"); if ( pCell != &rOrigCell ) { // rOrigCell must be a lower of pCell. We need to recurse into the rows: - assert(pCell->Lower() && pCell->Lower()->IsRowFrm() && - "lcl_FindCorrespondingCellFrm does not work"); + assert(pCell->Lower() && pCell->Lower()->IsRowFrame() && + "lcl_FindCorrespondingCellFrame does not work"); - const SwRowFrm* pRow = static_cast<const SwRowFrm*>(pCell->Lower()); + const SwRowFrame* pRow = static_cast<const SwRowFrame*>(pCell->Lower()); while ( !pRow->IsAnLower( &rOrigCell ) ) - pRow = static_cast<const SwRowFrm*>(pRow->GetNext()); + pRow = static_cast<const SwRowFrame*>(pRow->GetNext()); - SwRowFrm* pCorrRow = nullptr; + SwRowFrame* pCorrRow = nullptr; if ( bInFollow ) pCorrRow = pRow->GetFollowRow(); else { - SwRowFrm* pTmpRow = static_cast<SwRowFrm*>(pCorrCell->GetLastLower()); + SwRowFrame* pTmpRow = static_cast<SwRowFrame*>(pCorrCell->GetLastLower()); if ( pTmpRow && pTmpRow->GetFollowRow() == pRow ) pCorrRow = pTmpRow; } if ( pCorrRow ) - pRet = lcl_FindCorrespondingCellFrm( *pRow, rOrigCell, *pCorrRow, bInFollow ); + pRet = lcl_FindCorrespondingCellFrame( *pRow, rOrigCell, *pCorrRow, bInFollow ); } else pRet = pCorrCell; @@ -1494,9 +1494,9 @@ static SwCellFrm* lcl_FindCorrespondingCellFrm( const SwRowFrm& rOrigRow, } // VERSION OF GetFollowCell() that assumes that we always have a follow flow line: -SwCellFrm* SwCellFrm::GetFollowCell() const +SwCellFrame* SwCellFrame::GetFollowCell() const { - SwCellFrm* pRet = nullptr; + SwCellFrame* pRet = nullptr; // NEW TABLES // Covered cells do not have follow cells! @@ -1505,19 +1505,19 @@ SwCellFrm* SwCellFrm::GetFollowCell() const return nullptr; // find most upper row frame - const SwFrm* pRow = GetUpper(); + const SwFrame* pRow = GetUpper(); - while (pRow && (!pRow->IsRowFrm() || !pRow->GetUpper()->IsTabFrm())) + while (pRow && (!pRow->IsRowFrame() || !pRow->GetUpper()->IsTabFrame())) pRow = pRow->GetUpper(); if (!pRow) return nullptr; - const SwTabFrm* pTabFrm = static_cast<const SwTabFrm*>(pRow->GetUpper()); - if (!pTabFrm || !pTabFrm->GetFollow() || !pTabFrm->HasFollowFlowLine()) + const SwTabFrame* pTabFrame = static_cast<const SwTabFrame*>(pRow->GetUpper()); + if (!pTabFrame || !pTabFrame->GetFollow() || !pTabFrame->HasFollowFlowLine()) return nullptr; - const SwCellFrm* pThisCell = this; + const SwCellFrame* pThisCell = this; // Get last cell of the current table frame that belongs to the rowspan: if ( nRowSpan > 1 ) @@ -1534,19 +1534,19 @@ SwCellFrm* SwCellFrm::GetFollowCell() const } } - const SwRowFrm* pFollowRow = nullptr; + const SwRowFrame* pFollowRow = nullptr; if ( !pRow->GetNext() && nullptr != ( pFollowRow = pRow->IsInSplitTableRow() ) && ( !pFollowRow->IsRowSpanLine() || nRowSpan > 1 ) ) - pRet = lcl_FindCorrespondingCellFrm( *static_cast<const SwRowFrm*>(pRow), *pThisCell, *pFollowRow, true ); + pRet = lcl_FindCorrespondingCellFrame( *static_cast<const SwRowFrame*>(pRow), *pThisCell, *pFollowRow, true ); return pRet; } // VERSION OF GetPreviousCell() THAT ASSUMES THAT WE ALWAYS HAVE A FFL -SwCellFrm* SwCellFrm::GetPreviousCell() const +SwCellFrame* SwCellFrame::GetPreviousCell() const { - SwCellFrm* pRet = nullptr; + SwCellFrame* pRet = nullptr; // NEW TABLES // Covered cells do not have previous cells! @@ -1554,29 +1554,29 @@ SwCellFrm* SwCellFrm::GetPreviousCell() const return nullptr; // find most upper row frame - const SwFrm* pRow = GetUpper(); - while( !pRow->IsRowFrm() || !pRow->GetUpper()->IsTabFrm() ) + const SwFrame* pRow = GetUpper(); + while( !pRow->IsRowFrame() || !pRow->GetUpper()->IsTabFrame() ) pRow = pRow->GetUpper(); - OSL_ENSURE( pRow->GetUpper() && pRow->GetUpper()->IsTabFrm(), "GetPreviousCell without Table" ); + OSL_ENSURE( pRow->GetUpper() && pRow->GetUpper()->IsTabFrame(), "GetPreviousCell without Table" ); - const SwTabFrm* pTab = static_cast<const SwTabFrm*>(pRow->GetUpper()); + const SwTabFrame* pTab = static_cast<const SwTabFrame*>(pRow->GetUpper()); if ( pTab->IsFollow() ) { - const SwFrm* pTmp = pTab->GetFirstNonHeadlineRow(); + const SwFrame* pTmp = pTab->GetFirstNonHeadlineRow(); const bool bIsInFirstLine = ( pTmp == pRow ); if ( bIsInFirstLine ) { - SwTabFrm *pMaster = pTab->FindMaster(); + SwTabFrame *pMaster = pTab->FindMaster(); if ( pMaster && pMaster->HasFollowFlowLine() ) { - SwRowFrm* pMasterRow = static_cast<SwRowFrm*>(pMaster->GetLastLower()); + SwRowFrame* pMasterRow = static_cast<SwRowFrame*>(pMaster->GetLastLower()); if ( pMasterRow ) - pRet = lcl_FindCorrespondingCellFrm( *static_cast<const SwRowFrm*>(pRow), *this, *pMasterRow, false ); + pRet = lcl_FindCorrespondingCellFrame( *static_cast<const SwRowFrame*>(pRow), *this, *pMasterRow, false ); if ( pRet && pRet->GetTabBox()->getRowSpan() < 1 ) - pRet = &const_cast<SwCellFrm&>(pRet->FindStartEndOfRowSpanCell( true, true )); + pRet = &const_cast<SwCellFrame&>(pRet->FindStartEndOfRowSpanCell( true, true )); } } } @@ -1585,30 +1585,30 @@ SwCellFrm* SwCellFrm::GetPreviousCell() const } // --> NEW TABLES -const SwCellFrm& SwCellFrm::FindStartEndOfRowSpanCell( bool bStart, bool bCurrentTableOnly ) const +const SwCellFrame& SwCellFrame::FindStartEndOfRowSpanCell( bool bStart, bool bCurrentTableOnly ) const { - const SwCellFrm* pRet = nullptr; + const SwCellFrame* pRet = nullptr; - const SwTabFrm* pTableFrm = dynamic_cast<const SwTabFrm*>(GetUpper()->GetUpper()); + const SwTabFrame* pTableFrame = dynamic_cast<const SwTabFrame*>(GetUpper()->GetUpper()); - if ( !bStart && pTableFrm && pTableFrm->IsFollow() && pTableFrm->IsInHeadline( *this ) ) + if ( !bStart && pTableFrame && pTableFrame->IsFollow() && pTableFrame->IsInHeadline( *this ) ) return *this; - OSL_ENSURE( pTableFrm && + OSL_ENSURE( pTableFrame && ( (bStart && GetTabBox()->getRowSpan() < 1) || (!bStart && GetLayoutRowSpan() > 1) ), - "SwCellFrm::FindStartRowSpanCell: No rowspan, no table, no cookies" ); + "SwCellFrame::FindStartRowSpanCell: No rowspan, no table, no cookies" ); - if ( pTableFrm ) + if ( pTableFrame ) { - const SwTable* pTable = pTableFrm->GetTable(); + const SwTable* pTable = pTableFrame->GetTable(); sal_uInt16 nMax = USHRT_MAX; if ( bCurrentTableOnly ) { - const SwFrm* pCurrentRow = GetUpper(); - const bool bDoNotEnterHeadline = bStart && pTableFrm->IsFollow() && - !pTableFrm->IsInHeadline( *pCurrentRow ); + const SwFrame* pCurrentRow = GetUpper(); + const bool bDoNotEnterHeadline = bStart && pTableFrame->IsFollow() && + !pTableFrame->IsInHeadline( *pCurrentRow ); // check how many rows we are allowed to go up or down until we reach the end of // the current table frame: @@ -1618,8 +1618,8 @@ const SwCellFrm& SwCellFrm::FindStartEndOfRowSpanCell( bool bStart, bool bCurren if ( bStart ) { // do not enter a repeated headline: - if ( bDoNotEnterHeadline && pTableFrm->IsFollow() && - pTableFrm->IsInHeadline( *pCurrentRow->GetPrev() ) ) + if ( bDoNotEnterHeadline && pTableFrame->IsFollow() && + pTableFrame->IsInHeadline( *pCurrentRow->GetPrev() ) ) break; pCurrentRow = pCurrentRow->GetPrev(); @@ -1632,23 +1632,23 @@ const SwCellFrm& SwCellFrm::FindStartEndOfRowSpanCell( bool bStart, bool bCurren } // By passing the nMax value for Find*OfRowSpan (in case of bCurrentTableOnly - // is set) we assure that we find a rMasterBox that has a SwCellFrm in + // is set) we assure that we find a rMasterBox that has a SwCellFrame in // the current table frame: const SwTableBox& rMasterBox = bStart ? GetTabBox()->FindStartOfRowSpan( *pTable, nMax ) : GetTabBox()->FindEndOfRowSpan( *pTable, nMax ); - SwIterator<SwCellFrm,SwFormat> aIter( *rMasterBox.GetFrameFormat() ); + SwIterator<SwCellFrame,SwFormat> aIter( *rMasterBox.GetFrameFormat() ); - for ( SwCellFrm* pMasterCell = aIter.First(); pMasterCell; pMasterCell = aIter.Next() ) + for ( SwCellFrame* pMasterCell = aIter.First(); pMasterCell; pMasterCell = aIter.Next() ) { if ( pMasterCell->GetTabBox() == &rMasterBox ) { - const SwTabFrm* pMasterTable = static_cast<const SwTabFrm*>(pMasterCell->GetUpper()->GetUpper()); + const SwTabFrame* pMasterTable = static_cast<const SwTabFrame*>(pMasterCell->GetUpper()->GetUpper()); if ( bCurrentTableOnly ) { - if ( pMasterTable == pTableFrm ) + if ( pMasterTable == pTableFrame ) { pRet = pMasterCell; break; @@ -1656,9 +1656,9 @@ const SwCellFrm& SwCellFrm::FindStartEndOfRowSpanCell( bool bStart, bool bCurren } else { - if ( pMasterTable == pTableFrm || - ( (bStart && pMasterTable->IsAnFollow(pTableFrm)) || - (!bStart && pTableFrm->IsAnFollow(pMasterTable)) ) ) + if ( pMasterTable == pTableFrame || + ( (bStart && pMasterTable->IsAnFollow(pTableFrame)) || + (!bStart && pTableFrame->IsAnFollow(pMasterTable)) ) ) { pRet = pMasterCell; break; @@ -1668,91 +1668,91 @@ const SwCellFrm& SwCellFrm::FindStartEndOfRowSpanCell( bool bStart, bool bCurren } } - assert(pRet && "SwCellFrm::FindStartRowSpanCell: No result"); + assert(pRet && "SwCellFrame::FindStartRowSpanCell: No result"); return *pRet; } // <-- NEW TABLES -const SwRowFrm* SwFrm::IsInSplitTableRow() const +const SwRowFrame* SwFrame::IsInSplitTableRow() const { OSL_ENSURE( IsInTab(), "IsInSplitTableRow should only be called for frames in tables" ); - const SwFrm* pRow = this; + const SwFrame* pRow = this; // find most upper row frame - while( pRow && ( !pRow->IsRowFrm() || !pRow->GetUpper()->IsTabFrm() ) ) + while( pRow && ( !pRow->IsRowFrame() || !pRow->GetUpper()->IsTabFrame() ) ) pRow = pRow->GetUpper(); if ( !pRow ) return nullptr; - OSL_ENSURE( pRow->GetUpper()->IsTabFrm(), "Confusion in table layout" ); + OSL_ENSURE( pRow->GetUpper()->IsTabFrame(), "Confusion in table layout" ); - const SwTabFrm* pTab = static_cast<const SwTabFrm*>(pRow->GetUpper()); + const SwTabFrame* pTab = static_cast<const SwTabFrame*>(pRow->GetUpper()); // If most upper row frame is a headline row, the current frame // can't be in a splitted table row. Thus, add corresponding condition. if ( pRow->GetNext() || pTab->GetTable()->IsHeadline( - *(static_cast<const SwRowFrm*>(pRow)->GetTabLine()) ) || + *(static_cast<const SwRowFrame*>(pRow)->GetTabLine()) ) || !pTab->HasFollowFlowLine() || !pTab->GetFollow() ) return nullptr; // skip headline - const SwRowFrm* pFollowRow = pTab->GetFollow()->GetFirstNonHeadlineRow(); + const SwRowFrame* pFollowRow = pTab->GetFollow()->GetFirstNonHeadlineRow(); - OSL_ENSURE( pFollowRow, "SwFrm::IsInSplitTableRow() does not work" ); + OSL_ENSURE( pFollowRow, "SwFrame::IsInSplitTableRow() does not work" ); return pFollowRow; } -const SwRowFrm* SwFrm::IsInFollowFlowRow() const +const SwRowFrame* SwFrame::IsInFollowFlowRow() const { OSL_ENSURE( IsInTab(), "IsInSplitTableRow should only be called for frames in tables" ); // find most upper row frame - const SwFrm* pRow = this; - while( pRow && ( !pRow->IsRowFrm() || !pRow->GetUpper()->IsTabFrm() ) ) + const SwFrame* pRow = this; + while( pRow && ( !pRow->IsRowFrame() || !pRow->GetUpper()->IsTabFrame() ) ) pRow = pRow->GetUpper(); if ( !pRow ) return nullptr; - OSL_ENSURE( pRow->GetUpper()->IsTabFrm(), "Confusion in table layout" ); + OSL_ENSURE( pRow->GetUpper()->IsTabFrame(), "Confusion in table layout" ); - const SwTabFrm* pTab = static_cast<const SwTabFrm*>(pRow->GetUpper()); + const SwTabFrame* pTab = static_cast<const SwTabFrame*>(pRow->GetUpper()); - const SwTabFrm* pMaster = pTab->IsFollow() ? pTab->FindMaster() : nullptr; + const SwTabFrame* pMaster = pTab->IsFollow() ? pTab->FindMaster() : nullptr; if ( !pMaster || !pMaster->HasFollowFlowLine() ) return nullptr; - const SwFrm* pTmp = pTab->GetFirstNonHeadlineRow(); + const SwFrame* pTmp = pTab->GetFirstNonHeadlineRow(); const bool bIsInFirstLine = ( pTmp == pRow ); if ( !bIsInFirstLine ) return nullptr; - const SwRowFrm* pMasterRow = static_cast<const SwRowFrm*>(pMaster->GetLastLower()); + const SwRowFrame* pMasterRow = static_cast<const SwRowFrame*>(pMaster->GetLastLower()); return pMasterRow; } -bool SwFrm::IsInBalancedSection() const +bool SwFrame::IsInBalancedSection() const { bool bRet = false; if ( IsInSct() ) { - const SwSectionFrm* pSectionFrm = FindSctFrm(); - if ( pSectionFrm ) - bRet = pSectionFrm->IsBalancedSection(); + const SwSectionFrame* pSectionFrame = FindSctFrame(); + if ( pSectionFrame ) + bRet = pSectionFrame->IsBalancedSection(); } return bRet; } -const SwFrm* SwLayoutFrm::GetLastLower() const +const SwFrame* SwLayoutFrame::GetLastLower() const { - const SwFrm* pRet = Lower(); + const SwFrame* pRet = Lower(); if ( !pRet ) return nullptr; while ( pRet->GetNext() ) diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx index 65b9f03923ab..850fc4e303be 100644 --- a/sw/source/core/layout/flowfrm.cxx +++ b/sw/source/core/layout/flowfrm.cxx @@ -57,10 +57,10 @@ #include <IDocumentDrawModelAccess.hxx> #include <o3tl/make_unique.hxx> -bool SwFlowFrm::m_bMoveBwdJump = false; +bool SwFlowFrame::m_bMoveBwdJump = false; -SwFlowFrm::SwFlowFrm( SwFrm &rFrm ) : - m_rThis( rFrm ), +SwFlowFrame::SwFlowFrame( SwFrame &rFrame ) : + m_rThis( rFrame ), m_pFollow( nullptr ), m_pPrecede( nullptr ), m_bLockJoin( false ), @@ -68,7 +68,7 @@ SwFlowFrm::SwFlowFrm( SwFrm &rFrm ) : m_bFlyLock( false ) {} -SwFlowFrm::~SwFlowFrm() +SwFlowFrame::~SwFlowFrame() { if (m_pFollow) { @@ -80,7 +80,7 @@ SwFlowFrm::~SwFlowFrm() } } -void SwFlowFrm::SetFollow(SwFlowFrm *const pFollow) +void SwFlowFrame::SetFollow(SwFlowFrame *const pFollow) { if (m_pFollow) { @@ -100,61 +100,61 @@ void SwFlowFrm::SetFollow(SwFlowFrm *const pFollow) } /// @return true if any follow has the JoinLocked flag -bool SwFlowFrm::HasLockedFollow() const +bool SwFlowFrame::HasLockedFollow() const { - const SwFlowFrm* pFrm = GetFollow(); - while( pFrm ) + const SwFlowFrame* pFrame = GetFollow(); + while( pFrame ) { - if( pFrm->IsJoinLocked() ) + if( pFrame->IsJoinLocked() ) return true; - pFrm = pFrm->GetFollow(); + pFrame = pFrame->GetFollow(); } return false; } -bool SwFlowFrm::IsKeepFwdMoveAllowed() +bool SwFlowFrame::IsKeepFwdMoveAllowed() { // If all the predecessors up to the first of the chain have // the 'keep' attribute set, and the first of the chain's // IsFwdMoveAllowed returns false, then we're not allowed to move. - SwFrm *pFrm = &m_rThis; - if ( !pFrm->IsInFootnote() ) + SwFrame *pFrame = &m_rThis; + if ( !pFrame->IsInFootnote() ) do - { if ( pFrm->GetAttrSet()->GetKeep().GetValue() ) - pFrm = pFrm->GetIndPrev(); + { if ( pFrame->GetAttrSet()->GetKeep().GetValue() ) + pFrame = pFrame->GetIndPrev(); else return true; - } while ( pFrm ); + } while ( pFrame ); //See IsFwdMoveAllowed() bool bRet = false; - if ( pFrm && pFrm->GetIndPrev() ) + if ( pFrame && pFrame->GetIndPrev() ) bRet = true; return bRet; } -void SwFlowFrm::CheckKeep() +void SwFlowFrame::CheckKeep() { // Kick off the "last" predecessor with a 'keep' attribute, because // it's possible for the whole troop to move back. - SwFrm *pPre = m_rThis.GetIndPrev(); - if( pPre->IsSctFrm() ) + SwFrame *pPre = m_rThis.GetIndPrev(); + if( pPre->IsSctFrame() ) { - SwFrm *pLast = static_cast<SwSectionFrm*>(pPre)->FindLastContent(); - if( pLast && pLast->FindSctFrm() == pPre ) + SwFrame *pLast = static_cast<SwSectionFrame*>(pPre)->FindLastContent(); + if( pLast && pLast->FindSctFrame() == pPre ) pPre = pLast; else return; } - SwFrm* pTmp; + SwFrame* pTmp; bool bKeep; while ( (bKeep = pPre->GetAttrSet()->GetKeep().GetValue()) && nullptr != ( pTmp = pPre->GetIndPrev() ) ) { - if( pTmp->IsSctFrm() ) + if( pTmp->IsSctFrame() ) { - SwFrm *pLast = static_cast<SwSectionFrm*>(pTmp)->FindLastContent(); - if( pLast && pLast->FindSctFrm() == pTmp ) + SwFrame *pLast = static_cast<SwSectionFrame*>(pTmp)->FindLastContent(); + if( pLast && pLast->FindSctFrame() == pTmp ) pTmp = pLast; else break; @@ -165,7 +165,7 @@ void SwFlowFrm::CheckKeep() pPre->InvalidatePos(); } -bool SwFlowFrm::IsKeep( const SwAttrSet& rAttrs, bool bCheckIfLastRowShouldKeep ) const +bool SwFlowFrame::IsKeep( const SwAttrSet& rAttrs, bool bCheckIfLastRowShouldKeep ) const { // 1. The keep attribute is ignored inside footnotes // 2. For compatibility reasons, the keep attribute is @@ -175,10 +175,10 @@ bool SwFlowFrm::IsKeep( const SwAttrSet& rAttrs, bool bCheckIfLastRowShouldKeep // or break before attributes set for the next content (or next table) bool bKeep = bCheckIfLastRowShouldKeep || ( !m_rThis.IsInFootnote() && - ( !m_rThis.IsInTab() || m_rThis.IsTabFrm() ) && + ( !m_rThis.IsInTab() || m_rThis.IsTabFrame() ) && rAttrs.GetKeep().GetValue() ); - OSL_ENSURE( !bCheckIfLastRowShouldKeep || m_rThis.IsTabFrm(), + OSL_ENSURE( !bCheckIfLastRowShouldKeep || m_rThis.IsTabFrame(), "IsKeep with bCheckIfLastRowShouldKeep should only be used for tabfrms" ); // Ignore keep attribute if there are break situations: @@ -197,9 +197,9 @@ bool SwFlowFrm::IsKeep( const SwAttrSet& rAttrs, bool bCheckIfLastRowShouldKeep } if ( bKeep ) { - SwFrm *pNxt; + SwFrame *pNxt; if( nullptr != (pNxt = m_rThis.FindNextCnt()) && - (!m_pFollow || pNxt != &m_pFollow->GetFrm())) + (!m_pFollow || pNxt != &m_pFollow->GetFrame())) { // The last row of a table only keeps with the next content // it they are in the same section: @@ -207,14 +207,14 @@ bool SwFlowFrm::IsKeep( const SwAttrSet& rAttrs, bool bCheckIfLastRowShouldKeep { const SwSection* pThisSection = nullptr; const SwSection* pNextSection = nullptr; - const SwSectionFrm* pThisSectionFrm = m_rThis.FindSctFrm(); - const SwSectionFrm* pNextSectionFrm = pNxt->FindSctFrm(); + const SwSectionFrame* pThisSectionFrame = m_rThis.FindSctFrame(); + const SwSectionFrame* pNextSectionFrame = pNxt->FindSctFrame(); - if ( pThisSectionFrm ) - pThisSection = pThisSectionFrm->GetSection(); + if ( pThisSectionFrame ) + pThisSection = pThisSectionFrame->GetSection(); - if ( pNextSectionFrm ) - pNextSection = pNextSectionFrm->GetSection(); + if ( pNextSectionFrame ) + pNextSection = pNextSectionFrame->GetSection(); if ( pThisSection != pNextSection ) bKeep = false; @@ -226,8 +226,8 @@ bool SwFlowFrm::IsKeep( const SwAttrSet& rAttrs, bool bCheckIfLastRowShouldKeep if ( pNxt->IsInTab() ) { - SwTabFrm* pTab = pNxt->FindTabFrm(); - if ( ! m_rThis.IsInTab() || m_rThis.FindTabFrm() != pTab ) + SwTabFrame* pTab = pNxt->FindTabFrame(); + if ( ! m_rThis.IsInTab() || m_rThis.FindTabFrame() != pTab ) pSet = &pTab->GetFormat()->GetAttrSet(); } @@ -254,7 +254,7 @@ bool SwFlowFrm::IsKeep( const SwAttrSet& rAttrs, bool bCheckIfLastRowShouldKeep return bKeep; } -sal_uInt8 SwFlowFrm::BwdMoveNecessary( const SwPageFrm *pPage, const SwRect &rRect ) +sal_uInt8 SwFlowFrame::BwdMoveNecessary( const SwPageFrame *pPage, const SwRect &rRect ) { // The return value helps deciding whether we need to flow back (3), // or whether we can use the good old WouldFit (0, 1), or if @@ -275,13 +275,13 @@ sal_uInt8 SwFlowFrm::BwdMoveNecessary( const SwPageFrm *pPage, const SwRect &rRe // it's likely that it will follow me with the flow. A test formatting is // not allowed in that case, however! sal_uInt8 nRet = 0; - SwFlowFrm *pTmp = this; + SwFlowFrame *pTmp = this; do { // If there are objects hanging either on me or on a follow, we can't // do a test formatting, because paragraph bound objects wouldn't // be properly considered, and character bound objects shouldn't // be test formatted at all. - if( pTmp->GetFrm().GetDrawObjs() ) + if( pTmp->GetFrame().GetDrawObjs() ) nRet = 1; pTmp = pTmp->GetFollow(); } while ( !nRet && pTmp ); @@ -300,17 +300,17 @@ sal_uInt8 SwFlowFrm::BwdMoveNecessary( const SwPageFrm *pPage, const SwRect &rRe if ( aRect.IsOver( rRect ) && rFormat.GetSurround().GetSurround() != SURROUND_THROUGHT ) { - if( m_rThis.IsLayoutFrm() && //Fly Lower of This? + if( m_rThis.IsLayoutFrame() && //Fly Lower of This? Is_Lower_Of( &m_rThis, pObj->GetDrawObj() ) ) continue; - if( dynamic_cast<const SwFlyFrm*>( pObj) != nullptr ) + if( dynamic_cast<const SwFlyFrame*>( pObj) != nullptr ) { - const SwFlyFrm *pFly = static_cast<const SwFlyFrm*>(pObj); + const SwFlyFrame *pFly = static_cast<const SwFlyFrame*>(pObj); if ( pFly->IsAnLower( &m_rThis ) )//This Lower of Fly? continue; } - const SwFrm* pAnchor = pObj->GetAnchorFrm(); + const SwFrame* pAnchor = pObj->GetAnchorFrame(); if ( pAnchor == &m_rThis ) { nRet |= 1; @@ -319,7 +319,7 @@ sal_uInt8 SwFlowFrm::BwdMoveNecessary( const SwPageFrm *pPage, const SwRect &rRe // Don't do this if the object is anchored behind me in the text // flow, because then I wouldn't evade it. - if ( ::IsFrmInSameKontext( pAnchor, &m_rThis ) ) + if ( ::IsFrameInSameKontext( pAnchor, &m_rThis ) ) { if ( rFormat.GetAnchor().GetAnchorId() == FLY_AT_PARA ) { @@ -333,15 +333,15 @@ sal_uInt8 SwFlowFrm::BwdMoveNecessary( const SwPageFrm *pPage, const SwRect &rRe if( ULONG_MAX == nIndex ) { const SwNode *pNode; - if ( m_rThis.IsContentFrm() ) - pNode = static_cast<SwContentFrm&>(m_rThis).GetNode(); - else if( m_rThis.IsSctFrm() ) - pNode = static_cast<SwSectionFormat*>(static_cast<SwSectionFrm&>(m_rThis). + if ( m_rThis.IsContentFrame() ) + pNode = static_cast<SwContentFrame&>(m_rThis).GetNode(); + else if( m_rThis.IsSctFrame() ) + pNode = static_cast<SwSectionFormat*>(static_cast<SwSectionFrame&>(m_rThis). GetFormat())->GetSectionNode(); else { - OSL_ENSURE( m_rThis.IsTabFrm(), "new FowFrm?" ); - pNode = static_cast<SwTabFrm&>(m_rThis).GetTable()-> + OSL_ENSURE( m_rThis.IsTabFrame(), "new FowFrame?" ); + pNode = static_cast<SwTabFrame&>(m_rThis).GetTable()-> GetTabSortBoxes()[0]->GetSttNd()->FindTableNode(); } nIndex = pNode->GetIndex(); @@ -362,21 +362,21 @@ sal_uInt8 SwFlowFrm::BwdMoveNecessary( const SwPageFrm *pPage, const SwRect &rRe /// A specialized form of Cut(), which relocates a whole chain (this and the following, /// in particular). During this process, only the minimum operations and notifications are done. -SwLayoutFrm *SwFlowFrm::CutTree( SwFrm *pStart ) +SwLayoutFrame *SwFlowFrame::CutTree( SwFrame *pStart ) { // Cut the Start and all the neighbours; they are chained together and // a handle to the first one is returned. Residuals are invalidated // as appropriate. - SwLayoutFrm *pLay = pStart->GetUpper(); + SwLayoutFrame *pLay = pStart->GetUpper(); if ( pLay->IsInFootnote() ) - pLay = pLay->FindFootnoteFrm(); + pLay = pLay->FindFootnoteFrame(); // #i58846# // <pPrepare( PREP_QUOVADIS )> only for frames in footnotes if( pStart->IsInFootnote() ) { - SwFrm* pTmp = pStart->GetIndPrev(); + SwFrame* pTmp = pStart->GetIndPrev(); if( pTmp ) pTmp->Prepare( PREP_QUOVADIS ); } @@ -391,35 +391,35 @@ SwLayoutFrm *SwFlowFrm::CutTree( SwFrm *pStart ) pStart->mpPrev = nullptr; } - if ( pLay->IsFootnoteFrm() ) + if ( pLay->IsFootnoteFrame() ) { if ( !pLay->Lower() && !pLay->IsColLocked() && - !static_cast<SwFootnoteFrm*>(pLay)->IsBackMoveLocked() ) + !static_cast<SwFootnoteFrame*>(pLay)->IsBackMoveLocked() ) { pLay->Cut(); - SwFrm::DestroyFrm(pLay); + SwFrame::DestroyFrame(pLay); } else { - bool bUnlock = !static_cast<SwFootnoteFrm*>(pLay)->IsBackMoveLocked(); - static_cast<SwFootnoteFrm*>(pLay)->LockBackMove(); + bool bUnlock = !static_cast<SwFootnoteFrame*>(pLay)->IsBackMoveLocked(); + static_cast<SwFootnoteFrame*>(pLay)->LockBackMove(); pLay->InvalidateSize(); - pLay->Calc(pLay->getRootFrm()->GetCurrShell()->GetOut()); - SwContentFrm *pCnt = pLay->ContainsContent(); + pLay->Calc(pLay->getRootFrame()->GetCurrShell()->GetOut()); + SwContentFrame *pCnt = pLay->ContainsContent(); while ( pCnt && pLay->IsAnLower( pCnt ) ) { - // It's possible for the CntFrm to be locked, and we don't want + // It's possible for the ContentFrame to be locked, and we don't want // to end up in an endless page migration, so we're not even // going to call Calc! - OSL_ENSURE( pCnt->IsTextFrm(), "The Graphic has landed." ); - if ( static_cast<SwTextFrm*>(pCnt)->IsLocked() || - static_cast<SwTextFrm*>(pCnt)->GetFollow() == pStart ) + OSL_ENSURE( pCnt->IsTextFrame(), "The Graphic has landed." ); + if ( static_cast<SwTextFrame*>(pCnt)->IsLocked() || + static_cast<SwTextFrame*>(pCnt)->GetFollow() == pStart ) break; - pCnt->Calc(pCnt->getRootFrm()->GetCurrShell()->GetOut()); - pCnt = pCnt->GetNextContentFrm(); + pCnt->Calc(pCnt->getRootFrame()->GetCurrShell()->GetOut()); + pCnt = pCnt->GetNextContentFrame(); } if( bUnlock ) - static_cast<SwFootnoteFrm*>(pLay)->UnlockBackMove(); + static_cast<SwFootnoteFrame*>(pLay)->UnlockBackMove(); } pLay = nullptr; } @@ -428,10 +428,10 @@ SwLayoutFrm *SwFlowFrm::CutTree( SwFrm *pStart ) /// A specialized form of Paste(), which relocates a whole chain (this and the following, /// in particular). During this process, only the minimum operations and notifications are done. -bool SwFlowFrm::PasteTree( SwFrm *pStart, SwLayoutFrm *pParent, SwFrm *pSibling, - SwFrm *pOldParent ) +bool SwFlowFrame::PasteTree( SwFrame *pStart, SwLayoutFrame *pParent, SwFrame *pSibling, + SwFrame *pOldParent ) { - // returns true if there's a LayoutFrm in the chain. + // returns true if there's a LayoutFrame in the chain. bool bRet = false; // The chain beginning with pStart is inserted before pSibling @@ -462,7 +462,7 @@ bool SwFlowFrm::PasteTree( SwFrm *pStart, SwLayoutFrm *pParent, SwFrm *pSibling, //add the pStart after the last child. // pParent->Lower()->pNext = pStart; { - SwFrm* pTemp = pParent->m_pLower; + SwFrame* pTemp = pParent->m_pLower; while (pTemp) { if (pTemp->mpNext) @@ -478,7 +478,7 @@ bool SwFlowFrm::PasteTree( SwFrm *pStart, SwLayoutFrm *pParent, SwFrm *pSibling, //End modification for #i100782#,04/03/2009 // #i27145# - if ( pParent->IsSctFrm() ) + if ( pParent->IsSctFrame() ) { // We have no sibling because pParent is a section frame and // has just been created to contain some content. The printing @@ -488,8 +488,8 @@ bool SwFlowFrm::PasteTree( SwFrm *pStart, SwLayoutFrm *pParent, SwFrm *pSibling, pParent->InvalidateNextPrtArea(); } } - SwFrm *pFloat = pStart; - SwFrm *pLst = nullptr; + SwFrame *pFloat = pStart; + SwFrame *pLst = nullptr; SWRECTFN( pParent ) SwTwips nGrowVal = 0; do @@ -497,17 +497,17 @@ bool SwFlowFrm::PasteTree( SwFrm *pStart, SwLayoutFrm *pParent, SwFrm *pSibling, pFloat->_InvalidateAll(); pFloat->CheckDirChange(); - // I'm a friend of the TextFrm and thus am allowed to do many things. + // I'm a friend of the TextFrame and thus am allowed to do many things. // The CacheIdx idea seems to be a bit risky! - if ( pFloat->IsTextFrm() ) + if ( pFloat->IsTextFrame() ) { - if ( static_cast<SwTextFrm*>(pFloat)->GetCacheIdx() != USHRT_MAX ) - static_cast<SwTextFrm*>(pFloat)->Init(); // I'm his friend. + if ( static_cast<SwTextFrame*>(pFloat)->GetCacheIdx() != USHRT_MAX ) + static_cast<SwTextFrame*>(pFloat)->Init(); // I'm his friend. } else bRet = true; - nGrowVal += (pFloat->Frm().*fnRect->fnGetHeight)(); + nGrowVal += (pFloat->Frame().*fnRect->fnGetHeight)(); if ( pFloat->GetNext() ) pFloat = pFloat->GetNext(); else @@ -523,37 +523,37 @@ bool SwFlowFrm::PasteTree( SwFrm *pStart, SwLayoutFrm *pParent, SwFrm *pSibling, pSibling->mpPrev = pLst; if( pSibling->IsInFootnote() ) { - if( pSibling->IsSctFrm() ) - pSibling = static_cast<SwSectionFrm*>(pSibling)->ContainsAny(); + if( pSibling->IsSctFrame() ) + pSibling = static_cast<SwSectionFrame*>(pSibling)->ContainsAny(); if( pSibling ) pSibling->Prepare( PREP_ERGOSUM ); } } if ( nGrowVal ) { - if ( pOldParent && pOldParent->IsBodyFrm() ) // For variable page height while browsing + if ( pOldParent && pOldParent->IsBodyFrame() ) // For variable page height while browsing pOldParent->Shrink( nGrowVal ); pParent->Grow( nGrowVal ); } - if ( pParent->IsFootnoteFrm() ) - static_cast<SwFootnoteFrm*>(pParent)->InvalidateNxtFootnoteCnts( pParent->FindPageFrm() ); + if ( pParent->IsFootnoteFrame() ) + static_cast<SwFootnoteFrame*>(pParent)->InvalidateNxtFootnoteCnts( pParent->FindPageFrame() ); return bRet; } -void SwFlowFrm::MoveSubTree( SwLayoutFrm* pParent, SwFrm* pSibling ) +void SwFlowFrame::MoveSubTree( SwLayoutFrame* pParent, SwFrame* pSibling ) { OSL_ENSURE( pParent, "No parent given." ); OSL_ENSURE( m_rThis.GetUpper(), "Where are we coming from?" ); // Be economical with notifications if an action is running. - SwViewShell *pSh = m_rThis.getRootFrm()->GetCurrShell(); + SwViewShell *pSh = m_rThis.getRootFrame()->GetCurrShell(); const SwViewShellImp *pImp = pSh ? pSh->Imp() : nullptr; const bool bComplete = pImp && pImp->IsAction() && pImp->GetLayAction().IsComplete(); if ( !bComplete ) { - SwFrm *pPre = m_rThis.GetIndPrev(); + SwFrame *pPre = m_rThis.GetIndPrev(); if ( pPre ) { pPre->SetRetouche(); @@ -572,28 +572,28 @@ void SwFlowFrm::MoveSubTree( SwLayoutFrm* pParent, SwFrm* pSibling ) } } - SwPageFrm *pOldPage = m_rThis.FindPageFrm(); + SwPageFrame *pOldPage = m_rThis.FindPageFrame(); - SwLayoutFrm *pOldParent; + SwLayoutFrame *pOldParent; bool bInvaLay; { //JoinLock pParent for the lifetime of the Cut/Paste call to avoid - //SwSectionFrm::MergeNext removing the pParent we're trying to reparent + //SwSectionFrame::MergeNext removing the pParent we're trying to reparent //into - FlowFrmJoinLockGuard aJoinGuard(pParent); + FlowFrameJoinLockGuard aJoinGuard(pParent); pOldParent = CutTree( &m_rThis ); bInvaLay = PasteTree( &m_rThis, pParent, pSibling, pOldParent ); } - // If, by cutting & pasting, an empty SectionFrm came into existence, it should + // If, by cutting & pasting, an empty SectionFrame came into existence, it should // disappear automatically. - SwSectionFrm *pSct; + SwSectionFrame *pSct; // #126020# - adjust check for empty section // #130797# - correct fix #126020# if ( pOldParent && !pOldParent->Lower() && ( pOldParent->IsInSct() && - !(pSct = pOldParent->FindSctFrm())->ContainsContent() && + !(pSct = pOldParent->FindSctFrame())->ContainsContent() && !pSct->ContainsAny( true ) ) ) { pSct->DelEmpty( false ); @@ -601,25 +601,25 @@ void SwFlowFrm::MoveSubTree( SwLayoutFrm* pParent, SwFrm* pSibling ) // If we're in a column section, we'd rather not call Calc "from below" if( !m_rThis.IsInSct() && - ( !m_rThis.IsInTab() || ( m_rThis.IsTabFrm() && !m_rThis.GetUpper()->IsInTab() ) ) ) - m_rThis.GetUpper()->Calc(m_rThis.getRootFrm()->GetCurrShell()->GetOut()); - else if( m_rThis.GetUpper()->IsSctFrm() ) + ( !m_rThis.IsInTab() || ( m_rThis.IsTabFrame() && !m_rThis.GetUpper()->IsInTab() ) ) ) + m_rThis.GetUpper()->Calc(m_rThis.getRootFrame()->GetCurrShell()->GetOut()); + else if( m_rThis.GetUpper()->IsSctFrame() ) { - SwSectionFrm* pTmpSct = static_cast<SwSectionFrm*>(m_rThis.GetUpper()); + SwSectionFrame* pTmpSct = static_cast<SwSectionFrame*>(m_rThis.GetUpper()); bool bOld = pTmpSct->IsContentLocked(); pTmpSct->SetContentLock( true ); - pTmpSct->Calc(m_rThis.getRootFrm()->GetCurrShell()->GetOut()); + pTmpSct->Calc(m_rThis.getRootFrame()->GetCurrShell()->GetOut()); if( !bOld ) pTmpSct->SetContentLock( false ); } - SwPageFrm *pPage = m_rThis.FindPageFrm(); + SwPageFrame *pPage = m_rThis.FindPageFrame(); if ( pOldPage != pPage ) { m_rThis.InvalidatePage( pPage ); - if ( m_rThis.IsLayoutFrm() ) + if ( m_rThis.IsLayoutFrame() ) { - SwContentFrm *pCnt = static_cast<SwLayoutFrm*>(&m_rThis)->ContainsContent(); + SwContentFrame *pCnt = static_cast<SwLayoutFrame*>(&m_rThis)->ContainsContent(); if ( pCnt ) pCnt->InvalidatePage( pPage ); } @@ -629,13 +629,13 @@ void SwFlowFrm::MoveSubTree( SwLayoutFrm* pParent, SwFrm* pSibling ) m_rThis._InvalidateLineNum(); } } - if ( bInvaLay || (pSibling && pSibling->IsLayoutFrm()) ) + if ( bInvaLay || (pSibling && pSibling->IsLayoutFrame()) ) m_rThis.GetUpper()->InvalidatePage( pPage ); } -bool SwFlowFrm::IsAnFollow( const SwFlowFrm *pAssumed ) const +bool SwFlowFrame::IsAnFollow( const SwFlowFrame *pAssumed ) const { - const SwFlowFrm *pFoll = this; + const SwFlowFrame *pFoll = this; do { if ( pAssumed == pFoll ) return true; @@ -644,31 +644,31 @@ bool SwFlowFrm::IsAnFollow( const SwFlowFrm *pAssumed ) const return false; } -SwTextFrm* SwContentFrm::FindMaster() const +SwTextFrame* SwContentFrame::FindMaster() const { - OSL_ENSURE( IsFollow(), "SwContentFrm::FindMaster(): !IsFollow" ); + OSL_ENSURE( IsFollow(), "SwContentFrame::FindMaster(): !IsFollow" ); - const SwContentFrm* pPrec = GetPrecede(); + const SwContentFrame* pPrec = GetPrecede(); if ( pPrec && pPrec->HasFollow() && pPrec->GetFollow() == this ) { - OSL_ENSURE( pPrec->IsTextFrm(), "NoTextFrm with follow found" ); - return const_cast<SwTextFrm*>(static_cast< const SwTextFrm* >(pPrec)); + OSL_ENSURE( pPrec->IsTextFrame(), "NoTextFrame with follow found" ); + return const_cast<SwTextFrame*>(static_cast< const SwTextFrame* >(pPrec)); } OSL_FAIL( "Follow ist lost in Space." ); return nullptr; } -SwSectionFrm* SwSectionFrm::FindMaster() const +SwSectionFrame* SwSectionFrame::FindMaster() const { - OSL_ENSURE( IsFollow(), "SwSectionFrm::FindMaster(): !IsFollow" ); + OSL_ENSURE( IsFollow(), "SwSectionFrame::FindMaster(): !IsFollow" ); if (!m_pSection) return nullptr; - SwIterator<SwSectionFrm,SwFormat> aIter( *m_pSection->GetFormat() ); - SwSectionFrm* pSect = aIter.First(); + SwIterator<SwSectionFrame,SwFormat> aIter( *m_pSection->GetFormat() ); + SwSectionFrame* pSect = aIter.First(); while ( pSect ) { if (pSect->GetFollow() == this) @@ -680,12 +680,12 @@ SwSectionFrm* SwSectionFrm::FindMaster() const return nullptr; } -SwTabFrm* SwTabFrm::FindMaster( bool bFirstMaster ) const +SwTabFrame* SwTabFrame::FindMaster( bool bFirstMaster ) const { - OSL_ENSURE( IsFollow(), "SwTabFrm::FindMaster(): !IsFollow" ); + OSL_ENSURE( IsFollow(), "SwTabFrame::FindMaster(): !IsFollow" ); - SwIterator<SwTabFrm,SwFormat> aIter( *GetTable()->GetFrameFormat() ); - SwTabFrm* pTab = aIter.First(); + SwIterator<SwTabFrame,SwFormat> aIter( *GetTable()->GetFrameFormat() ); + SwTabFrame* pTab = aIter.First(); while ( pTab ) { if ( bFirstMaster ) @@ -696,7 +696,7 @@ SwTabFrm* SwTabFrm::FindMaster( bool bFirstMaster ) const if ( !pTab->IsFollow() ) { - SwTabFrm* pNxt = pTab; + SwTabFrame* pNxt = pTab; while ( pNxt ) { if ( pNxt->GetFollow() == this ) @@ -722,21 +722,21 @@ SwTabFrm* SwTabFrm::FindMaster( bool bFirstMaster ) const * Returns the next/previous Layout leaf that's NOT below this (or even is this itself). * Also, that leaf must be in the same text flow as the pAnch origin frame (Body, Footnote) */ -const SwLayoutFrm *SwFrm::GetLeaf( MakePageType eMakePage, bool bFwd, - const SwFrm *pAnch ) const +const SwLayoutFrame *SwFrame::GetLeaf( MakePageType eMakePage, bool bFwd, + const SwFrame *pAnch ) const { // No flow, no joy... if ( !(IsInDocBody() || IsInFootnote() || IsInFly()) ) return nullptr; - const SwFrm *pLeaf = this; + const SwFrame *pLeaf = this; bool bFound = false; do - { pLeaf = const_cast<SwFrm*>(pLeaf)->GetLeaf( eMakePage, bFwd ); + { pLeaf = const_cast<SwFrame*>(pLeaf)->GetLeaf( eMakePage, bFwd ); if ( pLeaf && - (!IsLayoutFrm() || !static_cast<const SwLayoutFrm*>(this)->IsAnLower( pLeaf ))) + (!IsLayoutFrame() || !static_cast<const SwLayoutFrame*>(this)->IsAnLower( pLeaf ))) { if ( pAnch->IsInDocBody() == pLeaf->IsInDocBody() && pAnch->IsInFootnote() == pLeaf->IsInFootnote() ) @@ -746,10 +746,10 @@ const SwLayoutFrm *SwFrm::GetLeaf( MakePageType eMakePage, bool bFwd, } } while ( !bFound && pLeaf ); - return static_cast<const SwLayoutFrm*>(pLeaf); + return static_cast<const SwLayoutFrame*>(pLeaf); } -SwLayoutFrm *SwFrm::GetLeaf( MakePageType eMakePage, bool bFwd ) +SwLayoutFrame *SwFrame::GetLeaf( MakePageType eMakePage, bool bFwd ) { if ( IsInFootnote() ) return bFwd ? GetNextFootnoteLeaf( eMakePage ) : GetPrevFootnoteLeaf( eMakePage ); @@ -761,27 +761,27 @@ SwLayoutFrm *SwFrm::GetLeaf( MakePageType eMakePage, bool bFwd ) bool bInSct( IsInSct() ); if ( bInTab && bInSct ) { - const SwFrm* pUpperFrm( GetUpper() ); - while ( pUpperFrm ) + const SwFrame* pUpperFrame( GetUpper() ); + while ( pUpperFrame ) { - if ( pUpperFrm->IsTabFrm() ) + if ( pUpperFrame->IsTabFrame() ) { // the table is the first. bInSct = false; break; } - else if ( pUpperFrm->IsSctFrm() ) + else if ( pUpperFrame->IsSctFrame() ) { // the section is the first. bInTab = false; break; } - pUpperFrm = pUpperFrm->GetUpper(); + pUpperFrame = pUpperFrame->GetUpper(); } } - if ( bInTab && ( !IsTabFrm() || GetUpper()->IsCellFrm() ) ) // TABLE IN TABLE + if ( bInTab && ( !IsTabFrame() || GetUpper()->IsCellFrame() ) ) // TABLE IN TABLE return bFwd ? GetNextCellLeaf( eMakePage ) : GetPrevCellLeaf( eMakePage ); if ( bInSct ) @@ -790,7 +790,7 @@ SwLayoutFrm *SwFrm::GetLeaf( MakePageType eMakePage, bool bFwd ) return bFwd ? GetNextLeaf( eMakePage ) : GetPrevLeaf( eMakePage ); } -bool SwFrm::WrongPageDesc( SwPageFrm* pNew ) +bool SwFrame::WrongPageDesc( SwPageFrame* pNew ) { // Now it's getting a bit complicated: @@ -818,7 +818,7 @@ bool SwFrm::WrongPageDesc( SwPageFrm* pNew ) //My Pagedesc doesn't count if I'm a follow! SwPageDesc *pDesc = nullptr; int nTmp = 0; - SwFlowFrm *pFlow = SwFlowFrm::CastFlowFrm( this ); + SwFlowFrame *pFlow = SwFlowFrame::CastFlowFrame( this ); if ( !pFlow || !pFlow->IsFollow() ) { pDesc = const_cast<SwPageDesc*>(rFormatDesc.GetPageDesc()); @@ -842,14 +842,14 @@ bool SwFrm::WrongPageDesc( SwPageFrm* pNew ) bool bFirst = pNew->OnFirstPage(); - const SwFlowFrm *pNewFlow = pNew->FindFirstBodyContent(); + const SwFlowFrame *pNewFlow = pNew->FindFirstBodyContent(); // Did we find ourselves? if( pNewFlow == pFlow ) pNewFlow = nullptr; - if ( pNewFlow && pNewFlow->GetFrm().IsInTab() ) - pNewFlow = pNewFlow->GetFrm().FindTabFrm(); + if ( pNewFlow && pNewFlow->GetFrame().IsInTab() ) + pNewFlow = pNewFlow->GetFrame().FindTabFrame(); const SwPageDesc *pNewDesc= ( pNewFlow && !pNewFlow->IsFollow() ) - ? pNewFlow->GetFrm().GetAttrSet()->GetPageDesc().GetPageDesc() : nullptr; + ? pNewFlow->GetFrame().GetAttrSet()->GetPageDesc().GetPageDesc() : nullptr; return (pNew->GetPageDesc() != pDesc) // own desc ? || (pNew->GetFormat() != @@ -858,7 +858,7 @@ bool SwFrm::WrongPageDesc( SwPageFrm* pNew ) } /// Returns the next layout leaf in which we can move the frame. -SwLayoutFrm *SwFrm::GetNextLeaf( MakePageType eMakePage ) +SwLayoutFrame *SwFrame::GetNextLeaf( MakePageType eMakePage ) { OSL_ENSURE( !IsInFootnote(), "GetNextLeaf(), don't call me for Footnote." ); OSL_ENSURE( !IsInSct(), "GetNextLeaf(), don't call me for Sections." ); @@ -873,17 +873,17 @@ SwLayoutFrm *SwFrm::GetNextLeaf( MakePageType eMakePage ) // For tables, we just take the big leap. A simple GetNext would // iterate through the first cells and, in turn, all other cells. - SwLayoutFrm *pLayLeaf = nullptr; - if ( IsTabFrm() ) + SwLayoutFrame *pLayLeaf = nullptr; + if ( IsTabFrame() ) { - SwContentFrm* pTmp = static_cast<SwTabFrm*>(this)->FindLastContent(); + SwContentFrame* pTmp = static_cast<SwTabFrame*>(this)->FindLastContent(); if ( pTmp ) pLayLeaf = pTmp->GetUpper(); } if ( !pLayLeaf ) pLayLeaf = GetNextLayoutLeaf(); - SwLayoutFrm *pOldLayLeaf = nullptr; // Make sure that we don't have to + SwLayoutFrame *pOldLayLeaf = nullptr; // Make sure that we don't have to // start searching from top when we // have a freshly created page. bool bNewPg = false; // Only insert a new page once. @@ -892,11 +892,11 @@ SwLayoutFrm *SwFrm::GetNextLeaf( MakePageType eMakePage ) { if ( pLayLeaf ) { - // There's yet another LayoutFrm. Let's see if it's ready to host + // There's yet another LayoutFrame. Let's see if it's ready to host // me as well. // It only needs to be of the same kind like my starting point // (DocBody or Footnote respectively) - if ( pLayLeaf->FindPageFrm()->IsFootnotePage() ) + if ( pLayLeaf->FindPageFrame()->IsFootnotePage() ) { // If I ended up at the end note pages, we're done. pLayLeaf = nullptr; continue; @@ -914,14 +914,14 @@ SwLayoutFrm *SwFrm::GetNextLeaf( MakePageType eMakePage ) // during a page break, the page type isn't the desired one. In that // case we have to insert a page of the correct type. - if( !IsFlowFrm() && ( eMakePage == MAKEPAGE_NONE || + if( !IsFlowFrame() && ( eMakePage == MAKEPAGE_NONE || eMakePage==MAKEPAGE_APPEND || eMakePage==MAKEPAGE_NOSECTION ) ) return pLayLeaf; - SwPageFrm *pNew = pLayLeaf->FindPageFrm(); - const SwViewShell *pSh = getRootFrm()->GetCurrShell(); + SwPageFrame *pNew = pLayLeaf->FindPageFrame(); + const SwViewShell *pSh = getRootFrame()->GetCurrShell(); // #111704# The pagedesc check does not make sense for frames in fly frames - if ( pNew != FindPageFrm() && !bNewPg && !IsInFly() && + if ( pNew != FindPageFrame() && !bNewPg && !IsInFly() && // #i46683# // Do not consider page descriptions in browse mode (since // MoveBwd ignored them) @@ -929,13 +929,13 @@ SwLayoutFrm *SwFrm::GetNextLeaf( MakePageType eMakePage ) { if( WrongPageDesc( pNew ) ) { - SwFootnoteContFrm *pCont = pNew->FindFootnoteCont(); + SwFootnoteContFrame *pCont = pNew->FindFootnoteCont(); if( pCont ) { // If the reference of the first footnote of this page // lies before the page, we'd rather not insert a new page. // (Bug #55620#) - SwFootnoteFrm *pFootnote = static_cast<SwFootnoteFrm*>(pCont->Lower()); + SwFootnoteFrame *pFootnote = static_cast<SwFootnoteFrame*>(pCont->Lower()); if( pFootnote && pFootnote->GetRef() ) { const sal_uInt16 nRefNum = pNew->GetPhyPageNum(); @@ -949,14 +949,14 @@ SwLayoutFrm *SwFrm::GetNextLeaf( MakePageType eMakePage ) { bNewPg = true; - SwPageFrm *pPg = pOldLayLeaf ? - pOldLayLeaf->FindPageFrm() : nullptr; + SwPageFrame *pPg = pOldLayLeaf ? + pOldLayLeaf->FindPageFrame() : nullptr; if ( pPg && pPg->IsEmptyPage() ) // Don't insert behind. Insert before the EmptyPage. - pPg = static_cast<SwPageFrm*>(pPg->GetPrev()); + pPg = static_cast<SwPageFrame*>(pPg->GetPrev()); if ( !pPg || pPg == pNew ) - pPg = FindPageFrm(); + pPg = FindPageFrame(); InsertPage( pPg, false ); pLayLeaf = GetNextLayoutLeaf(); @@ -971,12 +971,12 @@ SwLayoutFrm *SwFrm::GetNextLeaf( MakePageType eMakePage ) } else { - // There's no other matching LayoutFrm, so we have to insert + // There's no other matching LayoutFrame, so we have to insert // a new page. if ( eMakePage == MAKEPAGE_APPEND || eMakePage == MAKEPAGE_INSERT ) { InsertPage( - pOldLayLeaf ? pOldLayLeaf->FindPageFrm() : FindPageFrm(), + pOldLayLeaf ? pOldLayLeaf->FindPageFrame() : FindPageFrame(), false ); // And again from the start. @@ -990,7 +990,7 @@ SwLayoutFrm *SwFrm::GetNextLeaf( MakePageType eMakePage ) } /// Returns the previous layout leaf where we can move the frame. -SwLayoutFrm *SwFrm::GetPrevLeaf( MakePageType ) +SwLayoutFrame *SwFrame::GetPrevLeaf( MakePageType ) { OSL_ENSURE( !IsInFootnote(), "GetPrevLeaf(), don't call me for Footnote." ); @@ -998,8 +998,8 @@ SwLayoutFrm *SwFrm::GetPrevLeaf( MakePageType ) // I want to end up in the body. const bool bFly = IsInFly(); - SwLayoutFrm *pLayLeaf = GetPrevLayoutLeaf(); - SwLayoutFrm *pPrevLeaf = nullptr; + SwLayoutFrame *pLayLeaf = GetPrevLayoutLeaf(); + SwLayoutFrame *pPrevLeaf = nullptr; while ( pLayLeaf ) { @@ -1013,7 +1013,7 @@ SwLayoutFrm *SwFrm::GetPrevLeaf( MakePageType ) pPrevLeaf = pLayLeaf; pLayLeaf = pLayLeaf->GetPrevLayoutLeaf(); if ( pLayLeaf ) - SwFlowFrm::SetMoveBwdJump( true ); + SwFlowFrame::SetMoveBwdJump( true ); } else if ( bFly ) break; //Contents in Flys should accept any layout leaf. @@ -1023,37 +1023,37 @@ SwLayoutFrm *SwFrm::GetPrevLeaf( MakePageType ) return pLayLeaf ? pLayLeaf : pPrevLeaf; } -bool SwFlowFrm::IsPrevObjMove() const +bool SwFlowFrame::IsPrevObjMove() const { - // true: The FlowFrm must respect the a border of the predecessor, also needs + // true: The FlowFrame must respect the a border of the predecessor, also needs // to insert a break if required. //!!!!!!!!!!!Hack!!!!!!!!!!! - const SwViewShell *pSh = m_rThis.getRootFrm()->GetCurrShell(); + const SwViewShell *pSh = m_rThis.getRootFrame()->GetCurrShell(); if( pSh && pSh->GetViewOptions()->getBrowseMode() ) return false; - SwFrm *pPre = m_rThis.FindPrev(); + SwFrame *pPre = m_rThis.FindPrev(); if ( pPre && pPre->GetDrawObjs() ) { - OSL_ENSURE( SwFlowFrm::CastFlowFrm( pPre ), "new flowfrm?" ); - if( SwFlowFrm::CastFlowFrm( pPre )->IsAnFollow( this ) ) + OSL_ENSURE( SwFlowFrame::CastFlowFrame( pPre ), "new flowfrm?" ); + if( SwFlowFrame::CastFlowFrame( pPre )->IsAnFollow( this ) ) return false; - SwLayoutFrm* pPreUp = pPre->GetUpper(); - // If the upper is a SectionFrm, or a column of a SectionFrm, we're + SwLayoutFrame* pPreUp = pPre->GetUpper(); + // If the upper is a SectionFrame, or a column of a SectionFrame, we're // allowed to protrude out of it. However, we need to respect the - // Upper of the SectionFrm. + // Upper of the SectionFrame. if( pPreUp->IsInSct() ) { - if( pPreUp->IsSctFrm() ) + if( pPreUp->IsSctFrame() ) pPreUp = pPreUp->GetUpper(); - else if( pPreUp->IsColBodyFrm() && - pPreUp->GetUpper()->GetUpper()->IsSctFrm() ) + else if( pPreUp->IsColBodyFrame() && + pPreUp->GetUpper()->GetUpper()->IsSctFrame() ) pPreUp = pPreUp->GetUpper()->GetUpper()->GetUpper(); } // #i26945# - re-factoring - // use <GetVertPosOrientFrm()> to determine, if object has followed the + // use <GetVertPosOrientFrame()> to determine, if object has followed the // text flow to the next layout frame for ( size_t i = 0; i < pPre->GetDrawObjs()->size(); ++i ) { @@ -1067,10 +1067,10 @@ bool SwFlowFrm::IsPrevObjMove() const pObj->GetDrawObj()->GetLayer() ) && pObj->GetFrameFormat().GetFollowTextFlow().GetValue() ) { - const SwLayoutFrm* pVertPosOrientFrm = pObj->GetVertPosOrientFrm(); - if ( pVertPosOrientFrm && - pPreUp != pVertPosOrientFrm && - !pPreUp->IsAnLower( pVertPosOrientFrm ) ) + const SwLayoutFrame* pVertPosOrientFrame = pObj->GetVertPosOrientFrame(); + if ( pVertPosOrientFrame && + pPreUp != pVertPosOrientFrame && + !pPreUp->IsAnLower( pVertPosOrientFrame ) ) { return true; } @@ -1081,7 +1081,7 @@ bool SwFlowFrm::IsPrevObjMove() const } /** -|* If there's a hard page break before the Frm AND there's a +|* If there's a hard page break before the Frame AND there's a |* predecessor on the same page, true is returned (we need to create a |* new PageBreak). Otherwise, returns false. |* If bAct is set to true, this function returns true if @@ -1092,34 +1092,34 @@ bool SwFlowFrm::IsPrevObjMove() const |* need to think further. |* Also, a page break (or the need for one) is also present if |* the FrameFormat contains a PageDesc. -|* The implementation works only on ContentFrms! - the definition -|* of the predecessor is not clear for LayoutFrms. +|* The implementation works only on ContentFrames! - the definition +|* of the predecessor is not clear for LayoutFrames. |*/ -bool SwFlowFrm::IsPageBreak( bool bAct ) const +bool SwFlowFrame::IsPageBreak( bool bAct ) const { if ( !IsFollow() && m_rThis.IsInDocBody() && - ( !m_rThis.IsInTab() || ( m_rThis.IsTabFrm() && !m_rThis.GetUpper()->IsInTab() ) ) ) // i66968 + ( !m_rThis.IsInTab() || ( m_rThis.IsTabFrame() && !m_rThis.GetUpper()->IsInTab() ) ) ) // i66968 { - const SwViewShell *pSh = m_rThis.getRootFrm()->GetCurrShell(); + const SwViewShell *pSh = m_rThis.getRootFrame()->GetCurrShell(); if( pSh && pSh->GetViewOptions()->getBrowseMode() ) return false; const SwAttrSet *pSet = m_rThis.GetAttrSet(); // Determine predecessor - const SwFrm *pPrev = m_rThis.FindPrev(); + const SwFrame *pPrev = m_rThis.FindPrev(); while ( pPrev && ( !pPrev->IsInDocBody() || - ( pPrev->IsTextFrm() && static_cast<const SwTextFrm*>(pPrev)->IsHiddenNow() ) ) ) + ( pPrev->IsTextFrame() && static_cast<const SwTextFrame*>(pPrev)->IsHiddenNow() ) ) ) pPrev = pPrev->FindPrev(); if ( pPrev ) { OSL_ENSURE( pPrev->IsInDocBody(), "IsPageBreak: Not in DocBody?" ); if ( bAct ) - { if ( m_rThis.FindPageFrm() == pPrev->FindPageFrm() ) + { if ( m_rThis.FindPageFrame() == pPrev->FindPageFrame() ) return false; } else - { if ( m_rThis.FindPageFrm() != pPrev->FindPageFrm() ) + { if ( m_rThis.FindPageFrame() != pPrev->FindPageFrame() ) return false; } @@ -1140,7 +1140,7 @@ bool SwFlowFrm::IsPageBreak( bool bAct ) const } /** -|* If there's a hard column break before the Frm AND there is +|* If there's a hard column break before the Frame AND there is |* a predecessor in the same column, we return true (we need to create |* a ColBreak). Otherwise, we return false. |* If bAct is set to true, we return true if there's a ColBreak. @@ -1149,30 +1149,30 @@ bool SwFlowFrm::IsPageBreak( bool bAct ) const |* The column break is in it's own FrameFormat (BEFORE) or in the FrameFormat of the |* predecessor (AFTER). If there's no predecessor in the column, we don't |* need to think further. -|* The implementation works only on ContentFrms! - the definition -|* of the predecessor is not clear for LayoutFrms. +|* The implementation works only on ContentFrames! - the definition +|* of the predecessor is not clear for LayoutFrames. |*/ -bool SwFlowFrm::IsColBreak( bool bAct ) const +bool SwFlowFrame::IsColBreak( bool bAct ) const { if ( !IsFollow() && (m_rThis.IsMoveable() || bAct) ) { - const SwFrm *pCol = m_rThis.FindColFrm(); + const SwFrame *pCol = m_rThis.FindColFrame(); if ( pCol ) { // Determine predecessor - const SwFrm *pPrev = m_rThis.FindPrev(); + const SwFrame *pPrev = m_rThis.FindPrev(); while( pPrev && ( ( !pPrev->IsInDocBody() && !m_rThis.IsInFly() ) || - ( pPrev->IsTextFrm() && static_cast<const SwTextFrm*>(pPrev)->IsHiddenNow() ) ) ) + ( pPrev->IsTextFrame() && static_cast<const SwTextFrame*>(pPrev)->IsHiddenNow() ) ) ) pPrev = pPrev->FindPrev(); if ( pPrev ) { if ( bAct ) - { if ( pCol == pPrev->FindColFrm() ) + { if ( pCol == pPrev->FindColFrame() ) return false; } else - { if ( pCol != pPrev->FindColFrm() ) + { if ( pCol != pPrev->FindColFrame() ) return false; } @@ -1193,32 +1193,32 @@ bool SwFlowFrm::IsColBreak( bool bAct ) const return false; } -bool SwFlowFrm::HasParaSpaceAtPages( bool bSct ) const +bool SwFlowFrame::HasParaSpaceAtPages( bool bSct ) const { if( m_rThis.IsInSct() ) { - const SwFrm* pTmp = m_rThis.GetUpper(); + const SwFrame* pTmp = m_rThis.GetUpper(); while( pTmp ) { - if( pTmp->IsCellFrm() || pTmp->IsFlyFrm() || - pTmp->IsFooterFrm() || pTmp->IsHeaderFrm() || - ( pTmp->IsFootnoteFrm() && !static_cast<const SwFootnoteFrm*>(pTmp)->GetMaster() ) ) + if( pTmp->IsCellFrame() || pTmp->IsFlyFrame() || + pTmp->IsFooterFrame() || pTmp->IsHeaderFrame() || + ( pTmp->IsFootnoteFrame() && !static_cast<const SwFootnoteFrame*>(pTmp)->GetMaster() ) ) return true; - if( pTmp->IsPageFrm() ) + if( pTmp->IsPageFrame() ) return !( pTmp->GetPrev() && !IsPageBreak(true) ); - if( pTmp->IsColumnFrm() && pTmp->GetPrev() ) + if( pTmp->IsColumnFrame() && pTmp->GetPrev() ) return IsColBreak( true ); - if( pTmp->IsSctFrm() && ( !bSct || pTmp->GetPrev() ) ) + if( pTmp->IsSctFrame() && ( !bSct || pTmp->GetPrev() ) ) return false; pTmp = pTmp->GetUpper(); } OSL_FAIL( "HasParaSpaceAtPages: Where's my page?" ); return false; } - if( !m_rThis.IsInDocBody() || ( m_rThis.IsInTab() && !m_rThis.IsTabFrm()) || - IsPageBreak( true ) || ( m_rThis.FindColFrm() && IsColBreak( true ) ) ) + if( !m_rThis.IsInDocBody() || ( m_rThis.IsInTab() && !m_rThis.IsTabFrame()) || + IsPageBreak( true ) || ( m_rThis.FindColFrame() && IsColBreak( true ) ) ) return true; - const SwFrm* pTmp = m_rThis.FindColFrm(); + const SwFrame* pTmp = m_rThis.FindColFrame(); if( pTmp ) { if( pTmp->GetPrev() ) @@ -1226,7 +1226,7 @@ bool SwFlowFrm::HasParaSpaceAtPages( bool bSct ) const } else pTmp = &m_rThis; - pTmp = pTmp->FindPageFrm(); + pTmp = pTmp->FindPageFrame(); return pTmp && !pTmp->GetPrev(); } @@ -1235,102 +1235,102 @@ bool SwFlowFrm::HasParaSpaceAtPages( bool bSct ) const OD 2004-03-10 #i11860# */ -const SwFrm* SwFlowFrm::_GetPrevFrmForUpperSpaceCalc( const SwFrm* _pProposedPrevFrm ) const +const SwFrame* SwFlowFrame::_GetPrevFrameForUpperSpaceCalc( const SwFrame* _pProposedPrevFrame ) const { - const SwFrm* pPrevFrm = _pProposedPrevFrm - ? _pProposedPrevFrm + const SwFrame* pPrevFrame = _pProposedPrevFrame + ? _pProposedPrevFrame : m_rThis.GetPrev(); // Skip hidden paragraphs and empty sections - while ( pPrevFrm && - ( ( pPrevFrm->IsTextFrm() && - static_cast<const SwTextFrm*>(pPrevFrm)->IsHiddenNow() ) || - ( pPrevFrm->IsSctFrm() && - !static_cast<const SwSectionFrm*>(pPrevFrm)->GetSection() ) ) ) + while ( pPrevFrame && + ( ( pPrevFrame->IsTextFrame() && + static_cast<const SwTextFrame*>(pPrevFrame)->IsHiddenNow() ) || + ( pPrevFrame->IsSctFrame() && + !static_cast<const SwSectionFrame*>(pPrevFrame)->GetSection() ) ) ) { - pPrevFrm = pPrevFrm->GetPrev(); + pPrevFrame = pPrevFrame->GetPrev(); } // Special case: no direct previous frame is found but frame is in footnote // Search for a previous frame in previous footnote, // if frame isn't in a section, which is also in the footnote - if ( !pPrevFrm && m_rThis.IsInFootnote() && - ( m_rThis.IsSctFrm() || - !m_rThis.IsInSct() || !m_rThis.FindSctFrm()->IsInFootnote() ) ) + if ( !pPrevFrame && m_rThis.IsInFootnote() && + ( m_rThis.IsSctFrame() || + !m_rThis.IsInSct() || !m_rThis.FindSctFrame()->IsInFootnote() ) ) { - const SwFootnoteFrm* pPrevFootnoteFrm = - static_cast<const SwFootnoteFrm*>(m_rThis.FindFootnoteFrm()->GetPrev()); - if ( pPrevFootnoteFrm ) + const SwFootnoteFrame* pPrevFootnoteFrame = + static_cast<const SwFootnoteFrame*>(m_rThis.FindFootnoteFrame()->GetPrev()); + if ( pPrevFootnoteFrame ) { - pPrevFrm = pPrevFootnoteFrm->GetLastLower(); + pPrevFrame = pPrevFootnoteFrame->GetLastLower(); // Skip hidden paragraphs and empty sections - while ( pPrevFrm && - ( ( pPrevFrm->IsTextFrm() && - static_cast<const SwTextFrm*>(pPrevFrm)->IsHiddenNow() ) || - ( pPrevFrm->IsSctFrm() && - !static_cast<const SwSectionFrm*>(pPrevFrm)->GetSection() ) ) ) + while ( pPrevFrame && + ( ( pPrevFrame->IsTextFrame() && + static_cast<const SwTextFrame*>(pPrevFrame)->IsHiddenNow() ) || + ( pPrevFrame->IsSctFrame() && + !static_cast<const SwSectionFrame*>(pPrevFrame)->GetSection() ) ) ) { - pPrevFrm = pPrevFrm->GetPrev(); + pPrevFrame = pPrevFrame->GetPrev(); } } } // Special case: found previous frame is a section // Search for the last content in the section - if( pPrevFrm && pPrevFrm->IsSctFrm() ) + if( pPrevFrame && pPrevFrame->IsSctFrame() ) { - const SwSectionFrm* pPrevSectFrm = - static_cast<const SwSectionFrm*>(pPrevFrm); - pPrevFrm = pPrevSectFrm->FindLastContent(); + const SwSectionFrame* pPrevSectFrame = + static_cast<const SwSectionFrame*>(pPrevFrame); + pPrevFrame = pPrevSectFrame->FindLastContent(); // If the last content is in a table _inside_ the section, // take the table herself. // OD 2004-02-18 #106629# - correction: // Check directly, if table is inside table, instead of indirectly // by checking, if section isn't inside a table - if ( pPrevFrm && pPrevFrm->IsInTab() ) + if ( pPrevFrame && pPrevFrame->IsInTab() ) { - const SwTabFrm* pTableFrm = pPrevFrm->FindTabFrm(); - if ( pPrevSectFrm->IsAnLower( pTableFrm ) ) + const SwTabFrame* pTableFrame = pPrevFrame->FindTabFrame(); + if ( pPrevSectFrame->IsAnLower( pTableFrame ) ) { - pPrevFrm = pTableFrm; + pPrevFrame = pTableFrame; } } // OD 2004-02-18 #106629# correction: skip hidden text frames - while ( pPrevFrm && - pPrevFrm->IsTextFrm() && - static_cast<const SwTextFrm*>(pPrevFrm)->IsHiddenNow() ) + while ( pPrevFrame && + pPrevFrame->IsTextFrame() && + static_cast<const SwTextFrame*>(pPrevFrame)->IsHiddenNow() ) { - pPrevFrm = pPrevFrm->GetPrev(); + pPrevFrame = pPrevFrame->GetPrev(); } } - return pPrevFrm; + return pPrevFrame; } /// Compare styles attached to these text frames. -static bool lcl_IdenticalStyles(const SwFrm* pPrevFrm, const SwFrm* pFrm) +static bool lcl_IdenticalStyles(const SwFrame* pPrevFrame, const SwFrame* pFrame) { SwTextFormatColl *pPrevFormatColl = nullptr; - if (pPrevFrm && pPrevFrm->IsTextFrm()) + if (pPrevFrame && pPrevFrame->IsTextFrame()) { - const SwTextFrm *pTextFrm = static_cast< const SwTextFrm * >( pPrevFrm ); - pPrevFormatColl = dynamic_cast<SwTextFormatColl*>(pTextFrm->GetTextNode()->GetFormatColl()); + const SwTextFrame *pTextFrame = static_cast< const SwTextFrame * >( pPrevFrame ); + pPrevFormatColl = dynamic_cast<SwTextFormatColl*>(pTextFrame->GetTextNode()->GetFormatColl()); } bool bIdenticalStyles = false; - if (pFrm && pFrm->IsTextFrm()) + if (pFrame && pFrame->IsTextFrame()) { - const SwTextFrm *pTextFrm = static_cast< const SwTextFrm * >( pFrm ); - SwTextFormatColl *pFormatColl = dynamic_cast<SwTextFormatColl*>(pTextFrm->GetTextNode()->GetFormatColl()); + const SwTextFrame *pTextFrame = static_cast< const SwTextFrame * >( pFrame ); + SwTextFormatColl *pFormatColl = dynamic_cast<SwTextFormatColl*>(pTextFrame->GetTextNode()->GetFormatColl()); bIdenticalStyles = pPrevFormatColl == pFormatColl; } return bIdenticalStyles; } -static bool lcl_getContextualSpacing(const SwFrm* pPrevFrm) +static bool lcl_getContextualSpacing(const SwFrame* pPrevFrame) { bool bRet; - auto pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrm::GetCache(), pPrevFrm); + auto pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrame::GetCache(), pPrevFrame); const SwBorderAttrs *pAttrs = pAccess->Get(); bRet = pAttrs->GetULSpace().GetContext(); @@ -1339,20 +1339,20 @@ static bool lcl_getContextualSpacing(const SwFrm* pPrevFrm) } // OD 2004-03-12 #i11860# - add 3rd parameter <_bConsiderGrid> -SwTwips SwFlowFrm::CalcUpperSpace( const SwBorderAttrs *pAttrs, - const SwFrm* pPr, +SwTwips SwFlowFrame::CalcUpperSpace( const SwBorderAttrs *pAttrs, + const SwFrame* pPr, const bool _bConsiderGrid ) const { - // OD 2004-03-10 #i11860# - use new method <GetPrevFrmForUpperSpaceCalc(..)> - const SwFrm* pPrevFrm = _GetPrevFrmForUpperSpaceCalc( pPr ); + // OD 2004-03-10 #i11860# - use new method <GetPrevFrameForUpperSpaceCalc(..)> + const SwFrame* pPrevFrame = _GetPrevFrameForUpperSpaceCalc( pPr ); std::unique_ptr<SwBorderAttrAccess> pAccess; - SwFrm* pOwn; + SwFrame* pOwn; if( !pAttrs ) { - if( m_rThis.IsSctFrm() ) + if( m_rThis.IsSctFrame() ) { - SwSectionFrm* pFoll = &static_cast<SwSectionFrm&>(m_rThis); + SwSectionFrame* pFoll = &static_cast<SwSectionFrame&>(m_rThis); do pOwn = pFoll->ContainsAny(); while( !pOwn && nullptr != ( pFoll = pFoll->GetFollow() ) ); @@ -1361,7 +1361,7 @@ SwTwips SwFlowFrm::CalcUpperSpace( const SwBorderAttrs *pAttrs, } else pOwn = &m_rThis; - pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrm::GetCache(), pOwn); + pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrame::GetCache(), pOwn); pAttrs = pAccess->Get(); } else @@ -1373,7 +1373,7 @@ SwTwips SwFlowFrm::CalcUpperSpace( const SwBorderAttrs *pAttrs, { const IDocumentSettingAccess& rIDSA = m_rThis.GetUpper()->GetFormat()->getIDocumentSettingAccess(); const bool bUseFormerLineSpacing = rIDSA.get(DocumentSettingId::OLD_LINE_SPACING); - if( pPrevFrm ) + if( pPrevFrame ) { // OD 2004-03-10 #i11860# - use new method to determine needed spacing // values of found previous frame and use these values. @@ -1381,7 +1381,7 @@ SwTwips SwFlowFrm::CalcUpperSpace( const SwBorderAttrs *pAttrs, SwTwips nPrevLineSpacing = 0; // #i102458# bool bPrevLineSpacingPorportional = false; - GetSpacingValuesOfFrm( (*pPrevFrm), + GetSpacingValuesOfFrame( (*pPrevFrame), nPrevLowerSpace, nPrevLineSpacing, bPrevLineSpacingPorportional ); if( rIDSA.get(DocumentSettingId::PARA_SPACE_MAX) ) @@ -1393,9 +1393,9 @@ SwTwips SwFlowFrm::CalcUpperSpace( const SwBorderAttrs *pAttrs, if ( bUseFormerLineSpacing ) { // former consideration - if ( pOwn->IsTextFrm() ) + if ( pOwn->IsTextFrame() ) { - nAdd = std::max( nAdd, static_cast<SwTextFrm*>(pOwn)->GetLineSpace() ); + nAdd = std::max( nAdd, static_cast<SwTextFrame*>(pOwn)->GetLineSpace() ); } nUpper += nAdd; } @@ -1406,7 +1406,7 @@ SwTwips SwFlowFrm::CalcUpperSpace( const SwBorderAttrs *pAttrs, // text frame is considered for the upper spacing and // the line spacing values are add up instead of // building its maximum. - if ( pOwn->IsTextFrm() ) + if ( pOwn->IsTextFrame() ) { // #i102458# // Correction: @@ -1417,11 +1417,11 @@ SwTwips SwFlowFrm::CalcUpperSpace( const SwBorderAttrs *pAttrs, // spacing is built. if ( bPrevLineSpacingPorportional ) { - nAdd += static_cast<SwTextFrm*>(pOwn)->GetLineSpace( true ); + nAdd += static_cast<SwTextFrame*>(pOwn)->GetLineSpace( true ); } else { - nAdd = std::max( nAdd, static_cast<SwTextFrm*>(pOwn)->GetLineSpace( true ) ); + nAdd = std::max( nAdd, static_cast<SwTextFrame*>(pOwn)->GetLineSpace( true ) ); } } nUpper += nAdd; @@ -1436,8 +1436,8 @@ SwTwips SwFlowFrm::CalcUpperSpace( const SwBorderAttrs *pAttrs, if ( bUseFormerLineSpacing ) { // former consideration - if ( pOwn->IsTextFrm() ) - nUpper = std::max( nUpper, static_cast<SwTextFrm*>(pOwn)->GetLineSpace() ); + if ( pOwn->IsTextFrame() ) + nUpper = std::max( nUpper, static_cast<SwTextFrame*>(pOwn)->GetLineSpace() ); if ( nPrevLineSpacing != 0 ) { nUpper = std::max( nUpper, nPrevLineSpacing ); @@ -1452,7 +1452,7 @@ SwTwips SwFlowFrm::CalcUpperSpace( const SwBorderAttrs *pAttrs, // the paragraph spacing instead of building the // maximum of the line spacings and the paragraph spacing. SwTwips nAdd = nPrevLineSpacing; - if ( pOwn->IsTextFrm() ) + if ( pOwn->IsTextFrame() ) { // #i102458# // Correction: @@ -1463,11 +1463,11 @@ SwTwips SwFlowFrm::CalcUpperSpace( const SwBorderAttrs *pAttrs, // spacing is built. if ( bPrevLineSpacingPorportional ) { - nAdd += static_cast<SwTextFrm*>(pOwn)->GetLineSpace( true ); + nAdd += static_cast<SwTextFrame*>(pOwn)->GetLineSpace( true ); } else { - nAdd = std::max( nAdd, static_cast<SwTextFrm*>(pOwn)->GetLineSpace( true ) ); + nAdd = std::max( nAdd, static_cast<SwTextFrame*>(pOwn)->GetLineSpace( true ) ); } } nUpper += nAdd; @@ -1475,16 +1475,16 @@ SwTwips SwFlowFrm::CalcUpperSpace( const SwBorderAttrs *pAttrs, } } else if ( rIDSA.get(DocumentSettingId::PARA_SPACE_MAX_AT_PAGES) && - CastFlowFrm( pOwn )->HasParaSpaceAtPages( m_rThis.IsSctFrm() ) ) + CastFlowFrame( pOwn )->HasParaSpaceAtPages( m_rThis.IsSctFrame() ) ) { nUpper = pAttrs->GetULSpace().GetUpper(); } } - // OD 2004-02-26 #i25029# - pass previous frame <pPrevFrm> + // OD 2004-02-26 #i25029# - pass previous frame <pPrevFrame> // to method <GetTopLine(..)>, if parameter <pPr> is set. - // Note: parameter <pPr> is set, if method is called from <SwTextFrm::WouldFit(..)> - nUpper += pAttrs->GetTopLine( m_rThis, (pPr ? pPrevFrm : nullptr) ); + // Note: parameter <pPr> is set, if method is called from <SwTextFrame::WouldFit(..)> + nUpper += pAttrs->GetTopLine( m_rThis, (pPr ? pPrevFrame : nullptr) ); // OD 2004-03-12 #i11860# - consider value of new parameter <_bConsiderGrid> // and use new method <GetUpperSpaceAmountConsideredForPageGrid(..)> @@ -1497,8 +1497,8 @@ SwTwips SwFlowFrm::CalcUpperSpace( const SwBorderAttrs *pAttrs, const bool bContextualSpacing = pAttrs->GetULSpace().GetContext(); - if (bContextualSpacing && pPrevFrm && lcl_getContextualSpacing(pPrevFrm) - && lcl_IdenticalStyles(pPrevFrm, &m_rThis)) + if (bContextualSpacing && pPrevFrame && lcl_getContextualSpacing(pPrevFrame) + && lcl_IdenticalStyles(pPrevFrame, &m_rThis)) { return 0; } @@ -1512,27 +1512,27 @@ SwTwips SwFlowFrm::CalcUpperSpace( const SwBorderAttrs *pAttrs, OD 2004-03-12 #i11860# Precondition: Position of frame is valid. */ -SwTwips SwFlowFrm::_GetUpperSpaceAmountConsideredForPageGrid( +SwTwips SwFlowFrame::_GetUpperSpaceAmountConsideredForPageGrid( const SwTwips _nUpperSpaceWithoutGrid ) const { SwTwips nUpperSpaceAmountConsideredForPageGrid = 0; if ( m_rThis.IsInDocBody() && m_rThis.GetAttrSet()->GetParaGrid().GetValue() ) { - const SwPageFrm* pPageFrm = m_rThis.FindPageFrm(); - SwTextGridItem const*const pGrid(GetGridItem(pPageFrm)); + const SwPageFrame* pPageFrame = m_rThis.FindPageFrame(); + SwTextGridItem const*const pGrid(GetGridItem(pPageFrame)); if( pGrid ) { - const SwFrm* pBodyFrm = pPageFrm->FindBodyCont(); - if ( pBodyFrm ) + const SwFrame* pBodyFrame = pPageFrame->FindBodyCont(); + if ( pBodyFrame ) { const long nGridLineHeight = pGrid->GetBaseHeight() + pGrid->GetRubyHeight(); SWRECTFN( (&m_rThis) ) - const SwTwips nBodyPrtTop = (pBodyFrm->*fnRect->fnGetPrtTop)(); + const SwTwips nBodyPrtTop = (pBodyFrame->*fnRect->fnGetPrtTop)(); const SwTwips nProposedPrtTop = - (*fnRect->fnYInc)( (m_rThis.Frm().*fnRect->fnGetTop)(), + (*fnRect->fnYInc)( (m_rThis.Frame().*fnRect->fnGetTop)(), _nUpperSpaceWithoutGrid ); const SwTwips nSpaceAbovePrtTop = @@ -1548,13 +1548,13 @@ SwTwips SwFlowFrm::_GetUpperSpaceAmountConsideredForPageGrid( const SwTwips nNewUpperSpace = (*fnRect->fnYDiff)( nNewPrtTop, - (m_rThis.Frm().*fnRect->fnGetTop)() ); + (m_rThis.Frame().*fnRect->fnGetTop)() ); nUpperSpaceAmountConsideredForPageGrid = nNewUpperSpace - _nUpperSpaceWithoutGrid; OSL_ENSURE( nUpperSpaceAmountConsideredForPageGrid >= 0, - "<SwFlowFrm::GetUpperSpaceAmountConsideredForPageGrid(..)> - negative space considered for page grid!" ); + "<SwFlowFrame::GetUpperSpaceAmountConsideredForPageGrid(..)> - negative space considered for page grid!" ); } } } @@ -1566,34 +1566,34 @@ SwTwips SwFlowFrm::_GetUpperSpaceAmountConsideredForPageGrid( OD 2004-03-11 #i11860# */ -SwTwips SwFlowFrm::_GetUpperSpaceAmountConsideredForPrevFrm() const +SwTwips SwFlowFrame::_GetUpperSpaceAmountConsideredForPrevFrame() const { - SwTwips nUpperSpaceAmountOfPrevFrm = 0; + SwTwips nUpperSpaceAmountOfPrevFrame = 0; - const SwFrm* pPrevFrm = _GetPrevFrmForUpperSpaceCalc(); - if ( pPrevFrm ) + const SwFrame* pPrevFrame = _GetPrevFrameForUpperSpaceCalc(); + if ( pPrevFrame ) { SwTwips nPrevLowerSpace = 0; SwTwips nPrevLineSpacing = 0; // #i102458# bool bDummy = false; - GetSpacingValuesOfFrm( (*pPrevFrm), nPrevLowerSpace, nPrevLineSpacing, bDummy ); + GetSpacingValuesOfFrame( (*pPrevFrame), nPrevLowerSpace, nPrevLineSpacing, bDummy ); if ( nPrevLowerSpace > 0 || nPrevLineSpacing > 0 ) { const IDocumentSettingAccess& rIDSA = m_rThis.GetUpper()->GetFormat()->getIDocumentSettingAccess(); if ( rIDSA.get(DocumentSettingId::PARA_SPACE_MAX) || !rIDSA.get(DocumentSettingId::OLD_LINE_SPACING) ) { - nUpperSpaceAmountOfPrevFrm = nPrevLowerSpace + nPrevLineSpacing; + nUpperSpaceAmountOfPrevFrame = nPrevLowerSpace + nPrevLineSpacing; } else { - nUpperSpaceAmountOfPrevFrm = std::max( nPrevLowerSpace, nPrevLineSpacing ); + nUpperSpaceAmountOfPrevFrame = std::max( nPrevLowerSpace, nPrevLineSpacing ); } } } - return nUpperSpaceAmountOfPrevFrm; + return nUpperSpaceAmountOfPrevFrame; } /** method to determine the upper space amount, which is considered for @@ -1602,42 +1602,42 @@ SwTwips SwFlowFrm::_GetUpperSpaceAmountConsideredForPrevFrm() const OD 2004-03-18 #i11860# */ -SwTwips SwFlowFrm::GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() const +SwTwips SwFlowFrame::GetUpperSpaceAmountConsideredForPrevFrameAndPageGrid() const { - SwTwips nUpperSpaceAmountConsideredForPrevFrmAndPageGrid = 0; + SwTwips nUpperSpaceAmountConsideredForPrevFrameAndPageGrid = 0; if ( !m_rThis.GetUpper()->GetFormat()->getIDocumentSettingAccess().get(DocumentSettingId::USE_FORMER_OBJECT_POS) ) { - nUpperSpaceAmountConsideredForPrevFrmAndPageGrid = - _GetUpperSpaceAmountConsideredForPrevFrm() + + nUpperSpaceAmountConsideredForPrevFrameAndPageGrid = + _GetUpperSpaceAmountConsideredForPrevFrame() + ( m_rThis.GetUpper()->GetFormat()->GetDoc()->IsSquaredPageMode() ? _GetUpperSpaceAmountConsideredForPageGrid( CalcUpperSpace( nullptr, nullptr, false ) ) : 0 ); } - return nUpperSpaceAmountConsideredForPrevFrmAndPageGrid; + return nUpperSpaceAmountConsideredForPrevFrameAndPageGrid; } /** calculation of lower space OD 2004-03-02 #106629# */ -SwTwips SwFlowFrm::CalcLowerSpace( const SwBorderAttrs* _pAttrs ) const +SwTwips SwFlowFrame::CalcLowerSpace( const SwBorderAttrs* _pAttrs ) const { SwTwips nLowerSpace = 0; std::unique_ptr<SwBorderAttrAccess> pAttrAccess; if ( !_pAttrs ) { - pAttrAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrm::GetCache(), &m_rThis); + pAttrAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrame::GetCache(), &m_rThis); _pAttrs = pAttrAccess->Get(); } bool bCommonBorder = true; - if ( m_rThis.IsInSct() && m_rThis.GetUpper()->IsColBodyFrm() ) + if ( m_rThis.IsInSct() && m_rThis.GetUpper()->IsColBodyFrame() ) { - const SwSectionFrm* pSectFrm = m_rThis.FindSctFrm(); - bCommonBorder = pSectFrm->GetFormat()->GetBalancedColumns().GetValue(); + const SwSectionFrame* pSectFrame = m_rThis.FindSctFrame(); + bCommonBorder = pSectFrame->GetFormat()->GetBalancedColumns().GetValue(); } nLowerSpace = bCommonBorder ? _pAttrs->GetBottomLine( m_rThis ) : @@ -1646,7 +1646,7 @@ SwTwips SwFlowFrm::CalcLowerSpace( const SwBorderAttrs* _pAttrs ) const // #i26250# // - correct consideration of table frames // - use new method <CalcAddLowerSpaceAsLastInTableCell(..)> - if ( ( ( m_rThis.IsTabFrm() && m_rThis.GetUpper()->IsInTab() ) || + if ( ( ( m_rThis.IsTabFrame() && m_rThis.GetUpper()->IsInTab() ) || // #115759# - no lower spacing, if frame has a follow ( m_rThis.IsInTab() && !GetFollow() ) ) && !m_rThis.GetIndNext() ) @@ -1662,32 +1662,32 @@ SwTwips SwFlowFrm::CalcLowerSpace( const SwBorderAttrs* _pAttrs ) const OD 2004-07-16 #i26250# */ -SwTwips SwFlowFrm::CalcAddLowerSpaceAsLastInTableCell( +SwTwips SwFlowFrame::CalcAddLowerSpaceAsLastInTableCell( const SwBorderAttrs* _pAttrs ) const { SwTwips nAdditionalLowerSpace = 0; if ( m_rThis.GetUpper()->GetFormat()->getIDocumentSettingAccess().get(DocumentSettingId::ADD_PARA_SPACING_TO_TABLE_CELLS) ) { - const SwFrm* pFrm = &m_rThis; - if ( pFrm->IsSctFrm() ) + const SwFrame* pFrame = &m_rThis; + if ( pFrame->IsSctFrame() ) { - const SwSectionFrm* pSectFrm = static_cast<const SwSectionFrm*>(pFrm); - pFrm = pSectFrm->FindLastContent(); - if ( pFrm && pFrm->IsInTab() ) + const SwSectionFrame* pSectFrame = static_cast<const SwSectionFrame*>(pFrame); + pFrame = pSectFrame->FindLastContent(); + if ( pFrame && pFrame->IsInTab() ) { - const SwTabFrm* pTableFrm = pFrm->FindTabFrm(); - if ( pSectFrm->IsAnLower( pTableFrm ) ) + const SwTabFrame* pTableFrame = pFrame->FindTabFrame(); + if ( pSectFrame->IsAnLower( pTableFrame ) ) { - pFrm = pTableFrm; + pFrame = pTableFrame; } } } std::unique_ptr<SwBorderAttrAccess> pAttrAccess; - if (pFrm && (!_pAttrs || pFrm != &m_rThis)) + if (pFrame && (!_pAttrs || pFrame != &m_rThis)) { - pAttrAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrm::GetCache(), pFrm); + pAttrAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrame::GetCache(), pFrame); _pAttrs = pAttrAccess->Get(); } @@ -1698,21 +1698,21 @@ SwTwips SwFlowFrm::CalcAddLowerSpaceAsLastInTableCell( return nAdditionalLowerSpace; } -/// Moves the Frm forward if it seems necessary regarding the current conditions and attributes. -bool SwFlowFrm::CheckMoveFwd( bool& rbMakePage, bool bKeep, bool ) +/// Moves the Frame forward if it seems necessary regarding the current conditions and attributes. +bool SwFlowFrame::CheckMoveFwd( bool& rbMakePage, bool bKeep, bool ) { - const SwFrm* pNxt = m_rThis.GetIndNext(); + const SwFrame* pNxt = m_rThis.GetIndNext(); if ( bKeep && //!bMovedBwd && - ( !pNxt || ( pNxt->IsTextFrm() && static_cast<const SwTextFrm*>(pNxt)->IsEmptyMaster() ) ) && + ( !pNxt || ( pNxt->IsTextFrame() && static_cast<const SwTextFrame*>(pNxt)->IsEmptyMaster() ) ) && ( nullptr != (pNxt = m_rThis.FindNext()) ) && IsKeepFwdMoveAllowed() ) { - if( pNxt->IsSctFrm() ) - { // Don't get fooled by empty SectionFrms - const SwFrm* pTmp = nullptr; - while( pNxt && pNxt->IsSctFrm() && - ( !static_cast<const SwSectionFrm*>(pNxt)->GetSection() || - nullptr == ( pTmp = static_cast<const SwSectionFrm*>(pNxt)->ContainsAny() ) ) ) + if( pNxt->IsSctFrame() ) + { // Don't get fooled by empty SectionFrames + const SwFrame* pTmp = nullptr; + while( pNxt && pNxt->IsSctFrame() && + ( !static_cast<const SwSectionFrame*>(pNxt)->GetSection() || + nullptr == ( pTmp = static_cast<const SwSectionFrame*>(pNxt)->ContainsAny() ) ) ) { pNxt = pNxt->FindNext(); pTmp = nullptr; @@ -1723,10 +1723,10 @@ bool SwFlowFrm::CheckMoveFwd( bool& rbMakePage, bool bKeep, bool ) if( pNxt && pNxt->GetValidPosFlag() ) { bool bMove = false; - const SwSectionFrm *pSct = m_rThis.FindSctFrm(); + const SwSectionFrame *pSct = m_rThis.FindSctFrame(); if( pSct && !pSct->GetValidSizeFlag() ) { - const SwSectionFrm* pNxtSct = pNxt->FindSctFrm(); + const SwSectionFrame* pNxtSct = pNxt->FindSctFrame(); if( pNxtSct && pSct->IsAnFollow( pNxtSct ) ) bMove = true; } @@ -1762,11 +1762,11 @@ bool SwFlowFrm::CheckMoveFwd( bool& rbMakePage, bool bKeep, bool ) } else if ( IsColBreak ( false ) ) { - const SwPageFrm *pPage = m_rThis.FindPageFrm(); - SwFrm *pCol = m_rThis.FindColFrm(); + const SwPageFrame *pPage = m_rThis.FindPageFrame(); + SwFrame *pCol = m_rThis.FindColFrame(); do { MoveFwd( rbMakePage, false ); - SwFrm *pTmp = m_rThis.FindColFrm(); + SwFrame *pTmp = m_rThis.FindColFrame(); if( pTmp != pCol ) { bMovedFwd = true; @@ -1775,7 +1775,7 @@ bool SwFlowFrm::CheckMoveFwd( bool& rbMakePage, bool bKeep, bool ) else break; } while ( IsColBreak( false ) ); - if ( pPage != m_rThis.FindPageFrm() ) + if ( pPage != m_rThis.FindPageFrame() ) rbMakePage = false; } } @@ -1783,19 +1783,19 @@ bool SwFlowFrm::CheckMoveFwd( bool& rbMakePage, bool bKeep, bool ) return bMovedFwd; } -/// Return value tells us whether the Frm has changed the page. -bool SwFlowFrm::MoveFwd( bool bMakePage, bool bPageBreak, bool bMoveAlways ) +/// Return value tells us whether the Frame has changed the page. +bool SwFlowFrame::MoveFwd( bool bMakePage, bool bPageBreak, bool bMoveAlways ) { //!!!!MoveFootnoteCntFwd might need to be updated as well. - SwFootnoteBossFrm *pOldBoss = m_rThis.FindFootnoteBossFrm(); + SwFootnoteBossFrame *pOldBoss = m_rThis.FindFootnoteBossFrame(); if (m_rThis.IsInFootnote()) { - if (!m_rThis.IsContentFrm()) + if (!m_rThis.IsContentFrame()) { SAL_WARN("sw.core", "Tables in footnotes are not truly supported"); return false; } - return static_cast<SwContentFrm&>(m_rThis).MoveFootnoteCntFwd( bMakePage, pOldBoss ); + return static_cast<SwContentFrame&>(m_rThis).MoveFootnoteCntFwd( bMakePage, pOldBoss ); } if( !IsFwdMoveAllowed() && !bMoveAlways ) @@ -1803,71 +1803,71 @@ bool SwFlowFrm::MoveFwd( bool bMakePage, bool bPageBreak, bool bMoveAlways ) bool bNoFwd = true; if( m_rThis.IsInSct() ) { - SwFootnoteBossFrm* pBoss = m_rThis.FindFootnoteBossFrm(); + SwFootnoteBossFrame* pBoss = m_rThis.FindFootnoteBossFrame(); bNoFwd = !pBoss->IsInSct() || ( !pBoss->Lower()->GetNext() && !pBoss->GetPrev() ); } // Allow the MoveFwd even if we do not have an IndPrev in these cases: if ( m_rThis.IsInTab() && - ( !m_rThis.IsTabFrm() || + ( !m_rThis.IsTabFrame() || ( m_rThis.GetUpper()->IsInTab() && - m_rThis.GetUpper()->FindTabFrm()->IsFwdMoveAllowed() ) ) && - nullptr != const_cast<SwFrm&>(m_rThis).GetNextCellLeaf( MAKEPAGE_NONE ) ) + m_rThis.GetUpper()->FindTabFrame()->IsFwdMoveAllowed() ) ) && + nullptr != const_cast<SwFrame&>(m_rThis).GetNextCellLeaf( MAKEPAGE_NONE ) ) { bNoFwd = false; } if( bNoFwd ) { - // It's allowed to move PageBreaks if the Frm isn't the first + // It's allowed to move PageBreaks if the Frame isn't the first // one on the page. if ( !bPageBreak ) return false; - const SwFrm *pCol = m_rThis.FindColFrm(); + const SwFrame *pCol = m_rThis.FindColFrame(); if ( !pCol || !pCol->GetPrev() ) return false; } } bool bSamePage = true; - SwLayoutFrm *pNewUpper = + SwLayoutFrame *pNewUpper = m_rThis.GetLeaf( bMakePage ? MAKEPAGE_INSERT : MAKEPAGE_NONE, true ); if ( pNewUpper ) { PROTOCOL_ENTER( &m_rThis, PROT_MOVE_FWD, 0, nullptr ); - SwPageFrm *pOldPage = pOldBoss->FindPageFrm(); + SwPageFrame *pOldPage = pOldBoss->FindPageFrame(); // We move ourself and all the direct successors before the - // first ContentFrm below the new Upper. + // first ContentFrame below the new Upper. - // If our NewUpper lies in a SectionFrm, we need to make sure + // If our NewUpper lies in a SectionFrame, we need to make sure // that it won't destroy itself in Calc. - SwSectionFrm* pSect = pNewUpper->FindSctFrm(); + SwSectionFrame* pSect = pNewUpper->FindSctFrame(); if( pSect ) { - // If we only switch column within our SectionFrm, we better don't - // call Calc, as this would format the SectionFrm, which in turn would + // If we only switch column within our SectionFrame, we better don't + // call Calc, as this would format the SectionFrame, which in turn would // call us again, etc. - if( pSect != m_rThis.FindSctFrm() ) + if( pSect != m_rThis.FindSctFrame() ) { bool bUnlock = !pSect->IsColLocked(); pSect->ColLock(); - pNewUpper->Calc(m_rThis.getRootFrm()->GetCurrShell()->GetOut()); + pNewUpper->Calc(m_rThis.getRootFrame()->GetCurrShell()->GetOut()); if( bUnlock ) pSect->ColUnlock(); } } // Do not calculate split cell frames. - else if ( !pNewUpper->IsCellFrm() || static_cast<SwLayoutFrm*>(pNewUpper)->Lower() ) - pNewUpper->Calc(m_rThis.getRootFrm()->GetCurrShell()->GetOut()); + else if ( !pNewUpper->IsCellFrame() || static_cast<SwLayoutFrame*>(pNewUpper)->Lower() ) + pNewUpper->Calc(m_rThis.getRootFrame()->GetCurrShell()->GetOut()); - SwFootnoteBossFrm *pNewBoss = pNewUpper->FindFootnoteBossFrm(); + SwFootnoteBossFrame *pNewBoss = pNewUpper->FindFootnoteBossFrame(); bool bBossChg = pNewBoss != pOldBoss; - pNewBoss = pNewBoss->FindFootnoteBossFrm( true ); - pOldBoss = pOldBoss->FindFootnoteBossFrm( true ); - SwPageFrm* pNewPage = pOldPage; + pNewBoss = pNewBoss->FindFootnoteBossFrame( true ); + pOldBoss = pOldBoss->FindFootnoteBossFrame( true ); + SwPageFrame* pNewPage = pOldPage; // First, we move the footnotes. bool bFootnoteMoved = false; @@ -1878,40 +1878,40 @@ bool SwFlowFrm::MoveFwd( bool bMakePage, bool bPageBreak, bool bMoveAlways ) // In this case we prefer to call a SimpleFormat for this new // section after we inserted the contents. Otherwise the section // frame will invalidate its lowers, if its printing area changes - // in SwSectionFrm::Format, which can cause loops. + // in SwSectionFrame::Format, which can cause loops. const bool bForceSimpleFormat = pSect && pSect->HasFollow() && !pSect->ContainsAny(); if ( pNewBoss != pOldBoss ) { - pNewPage = pNewBoss->FindPageFrm(); + pNewPage = pNewBoss->FindPageFrame(); bSamePage = pNewPage == pOldPage; // Set deadline, so the footnotes don't think up // silly things... SWRECTFN( pOldBoss ) SwSaveFootnoteHeight aHeight( pOldBoss, - (pOldBoss->Frm().*fnRect->fnGetBottom)() ); - SwContentFrm* pStart = m_rThis.IsContentFrm() ? - static_cast<SwContentFrm*>(&m_rThis) : static_cast<SwLayoutFrm&>(m_rThis).ContainsContent(); - OSL_ENSURE( pStart || ( m_rThis.IsTabFrm() && !static_cast<SwTabFrm&>(m_rThis).Lower() ), + (pOldBoss->Frame().*fnRect->fnGetBottom)() ); + SwContentFrame* pStart = m_rThis.IsContentFrame() ? + static_cast<SwContentFrame*>(&m_rThis) : static_cast<SwLayoutFrame&>(m_rThis).ContainsContent(); + OSL_ENSURE( pStart || ( m_rThis.IsTabFrame() && !static_cast<SwTabFrame&>(m_rThis).Lower() ), "MoveFwd: Missing Content" ); - SwLayoutFrm* pBody = pStart ? ( pStart->IsTextFrm() ? - const_cast<SwBodyFrm *>(static_cast<SwTextFrm*>(pStart)->FindBodyFrm()) : nullptr ) : nullptr; + SwLayoutFrame* pBody = pStart ? ( pStart->IsTextFrame() ? + const_cast<SwBodyFrame *>(static_cast<SwTextFrame*>(pStart)->FindBodyFrame()) : nullptr ) : nullptr; if( pBody ) bFootnoteMoved = pBody->MoveLowerFootnotes( pStart, pOldBoss, pNewBoss, false); } - // It's possible when dealing with SectionFrms that we have been moved + // It's possible when dealing with SectionFrames that we have been moved // by pNewUpper->Calc(), for instance into the pNewUpper. // MoveSubTree or PasteTree respectively is not prepared to handle such a // situation. if( pNewUpper != m_rThis.GetUpper() ) { // #i27145# - SwSectionFrm* pOldSct = nullptr; - if ( m_rThis.GetUpper()->IsSctFrm() ) + SwSectionFrame* pOldSct = nullptr; + if ( m_rThis.GetUpper()->IsSctFrame() ) { - pOldSct = static_cast<SwSectionFrm*>(m_rThis.GetUpper()); + pOldSct = static_cast<SwSectionFrame*>(m_rThis.GetUpper()); } MoveSubTree( pNewUpper, pNewUpper->Lower() ); @@ -1948,7 +1948,7 @@ bool SwFlowFrm::MoveFwd( bool bMakePage, bool bPageBreak, bool bMoveAlways ) m_rThis.Prepare( PREP_BOSS_CHGD, nullptr, false ); if( !bSamePage ) { - SwViewShell *pSh = m_rThis.getRootFrm()->GetCurrShell(); + SwViewShell *pSh = m_rThis.getRootFrame()->GetCurrShell(); if ( pSh && !pSh->Imp()->IsUpdateExpFields() ) pSh->GetDoc()->getIDocumentFieldsAccess().SetNewFieldLst(true); // Will be done by CalcLayout() later on! @@ -1960,7 +1960,7 @@ bool SwFlowFrm::MoveFwd( bool bMakePage, bool bPageBreak, bool bMoveAlways ) } } // OD 30.10.2002 #97265# - no <CheckPageDesc(..)> in online layout - const SwViewShell *pSh = m_rThis.getRootFrm()->GetCurrShell(); + const SwViewShell *pSh = m_rThis.getRootFrame()->GetCurrShell(); if ( !( pSh && pSh->GetViewOptions()->getBrowseMode() ) ) { @@ -1970,48 +1970,48 @@ bool SwFlowFrm::MoveFwd( bool bMakePage, bool bPageBreak, bool bMoveAlways ) ( m_rThis.GetAttrSet()->GetPageDesc().GetPageDesc() || pOldPage->GetPageDesc()->GetFollow() != pNewPage->GetPageDesc() ) ) { - SwFrm::CheckPageDescs( pNewPage, false ); + SwFrame::CheckPageDescs( pNewPage, false ); } } } return bSamePage; } -/** Return value tells whether the Frm should change the page. +/** Return value tells whether the Frame should change the page. * * @note This should be called by derived classes. * @note The actual moving must be implemented in the subclasses. */ -bool SwFlowFrm::MoveBwd( bool &rbReformat ) +bool SwFlowFrame::MoveBwd( bool &rbReformat ) { - SwFlowFrm::SetMoveBwdJump( false ); + SwFlowFrame::SetMoveBwdJump( false ); - SwFootnoteFrm* pFootnote = m_rThis.FindFootnoteFrm(); + SwFootnoteFrame* pFootnote = m_rThis.FindFootnoteFrame(); if ( pFootnote && pFootnote->IsBackMoveLocked() ) return false; // #115759# - text frames, which are directly inside // tables aren't allowed to move backward. - if ( m_rThis.IsTextFrm() && m_rThis.IsInTab() ) + if ( m_rThis.IsTextFrame() && m_rThis.IsInTab() ) { - const SwLayoutFrm* pUpperFrm = m_rThis.GetUpper(); - while ( pUpperFrm ) + const SwLayoutFrame* pUpperFrame = m_rThis.GetUpper(); + while ( pUpperFrame ) { - if ( pUpperFrm->IsTabFrm() ) + if ( pUpperFrame->IsTabFrame() ) { return false; } - if ( pUpperFrm->IsColumnFrm() && pUpperFrm->IsInSct() ) + if ( pUpperFrame->IsColumnFrame() && pUpperFrame->IsInSct() ) { break; } - pUpperFrm = pUpperFrm->GetUpper(); + pUpperFrame = pUpperFrame->GetUpper(); } } - SwFootnoteBossFrm * pOldBoss = m_rThis.FindFootnoteBossFrm(); - SwPageFrm * const pOldPage = pOldBoss->FindPageFrm(); - SwLayoutFrm *pNewUpper = nullptr; + SwFootnoteBossFrame * pOldBoss = m_rThis.FindFootnoteBossFrame(); + SwPageFrame * const pOldPage = pOldBoss->FindPageFrame(); + SwLayoutFrame *pNewUpper = nullptr; bool bCheckPageDescs = false; bool bCheckPageDescOfNextPage = false; @@ -2022,11 +2022,11 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat ) // #i37084# FindLastContent does not necessarily // have to have a result != 0 - SwFrm* pRef = nullptr; + SwFrame* pRef = nullptr; const bool bEndnote = pFootnote->GetAttr()->GetFootnote().IsEndNote(); if( bEndnote && pFootnote->IsInSct() ) { - SwSectionFrm* pSect = pFootnote->FindSctFrm(); + SwSectionFrame* pSect = pFootnote->FindSctFrame(); if( pSect->IsEndnAtEnd() ) pRef = pSect->FindLastContent( FINDMODE_LASTCNT ); } @@ -2036,10 +2036,10 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat ) OSL_ENSURE( pRef, "MoveBwd: Endnote for an empty section?" ); if( !bEndnote ) - pOldBoss = pOldBoss->FindFootnoteBossFrm( true ); - SwFootnoteBossFrm *pRefBoss = pRef->FindFootnoteBossFrm( !bEndnote ); + pOldBoss = pOldBoss->FindFootnoteBossFrame( true ); + SwFootnoteBossFrame *pRefBoss = pRef->FindFootnoteBossFrame( !bEndnote ); if ( pOldBoss != pRefBoss && - // OD 08.11.2002 #104840# - use <SwLayoutFrm::IsBefore(..)> + // OD 08.11.2002 #104840# - use <SwLayoutFrame::IsBefore(..)> ( !bEndnote || pRefBoss->IsBefore( pOldBoss ) ) ) @@ -2047,23 +2047,23 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat ) } else if ( IsPageBreak( true ) ) // Do we have to respect a PageBreak? { - // If the previous page doesn't have an Frm in the body, + // If the previous page doesn't have an Frame in the body, // flowing back makes sense despite the PageBreak (otherwise, // we'd get an empty page). // Of course we need to overlook empty pages! - const SwFrm *pFlow = &m_rThis; + const SwFrame *pFlow = &m_rThis; do { pFlow = pFlow->FindPrev(); } while ( pFlow && - ( pFlow->FindPageFrm() == pOldPage || + ( pFlow->FindPageFrame() == pOldPage || !pFlow->IsInDocBody() ) ); if ( pFlow ) { long nDiff = pOldPage->GetPhyPageNum() - pFlow->GetPhyPageNum(); if ( nDiff > 1 ) { - if ( static_cast<SwPageFrm*>(pOldPage->GetPrev())->IsEmptyPage() ) + if ( static_cast<SwPageFrame*>(pOldPage->GetPrev())->IsEmptyPage() ) nDiff -= 1; if ( nDiff > 1 ) { @@ -2092,7 +2092,7 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat ) // returns new upper on page 2. if (pNewUpper && pNewUpper->Lower()) { - SwLayoutFrm* pNewNextUpper = pNewUpper->GetLeaf( MAKEPAGE_NONE, true ); + SwLayoutFrame* pNewNextUpper = pNewUpper->GetLeaf( MAKEPAGE_NONE, true ); if ( pNewNextUpper && pNewNextUpper != m_rThis.GetUpper() && pNewNextUpper->GetType() == pNewUpper->GetType() && @@ -2100,7 +2100,7 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat ) pNewNextUpper->IsInFootnote() == pNewUpper->IsInFootnote() && pNewNextUpper->IsInTab() == pNewUpper->IsInTab() && pNewNextUpper->IsInSct() == pNewUpper->IsInSct() && - !m_rThis.WrongPageDesc( pNewNextUpper->FindPageFrm() ) ) + !m_rThis.WrongPageDesc( pNewNextUpper->FindPageFrame() ) ) { pNewUpper = pNewNextUpper; bCheckPageDescOfNextPage = true; @@ -2114,24 +2114,24 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat ) } else if ( IsColBreak( true ) ) { - // If the previous column doesn't contain a ContentFrm, flowing back + // If the previous column doesn't contain a ContentFrame, flowing back // makes sense despite the ColumnBreak, as otherwise we'd get // an empty column. if( m_rThis.IsInSct() ) { pNewUpper = m_rThis.GetLeaf( MAKEPAGE_NONE, false ); - if( pNewUpper && !SwFlowFrm::IsMoveBwdJump() && + if( pNewUpper && !SwFlowFrame::IsMoveBwdJump() && ( pNewUpper->ContainsContent() || - ( ( !pNewUpper->IsColBodyFrm() || + ( ( !pNewUpper->IsColBodyFrame() || !pNewUpper->GetUpper()->GetPrev() ) && - !pNewUpper->FindSctFrm()->GetPrev() ) ) ) + !pNewUpper->FindSctFrame()->GetPrev() ) ) ) { pNewUpper = nullptr; } // #i53139# // #i69409# - check <pNewUpper> - // #i71065# - check <SwFlowFrm::IsMoveBwdJump()> - else if ( pNewUpper && !SwFlowFrm::IsMoveBwdJump() ) + // #i71065# - check <SwFlowFrame::IsMoveBwdJump()> + else if ( pNewUpper && !SwFlowFrame::IsMoveBwdJump() ) { // Now <pNewUpper> is a previous layout frame, which // contains content. But the new upper layout frame @@ -2143,14 +2143,14 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat ) // #136538# - another correction of fix for i53139 // Beside type check, check also, if proposed new next upper // frame is inside the same frame types. - SwLayoutFrm* pNewNextUpper = pNewUpper->GetLeaf( MAKEPAGE_NOSECTION, true ); + SwLayoutFrame* pNewNextUpper = pNewUpper->GetLeaf( MAKEPAGE_NOSECTION, true ); if ( pNewNextUpper && pNewNextUpper->GetType() == pNewUpper->GetType() && pNewNextUpper->IsInDocBody() == pNewUpper->IsInDocBody() && pNewNextUpper->IsInFootnote() == pNewUpper->IsInFootnote() && pNewNextUpper->IsInTab() == pNewUpper->IsInTab() && pNewNextUpper->IsInSct() == pNewUpper->IsInSct() && - !m_rThis.WrongPageDesc( pNewNextUpper->FindPageFrm() ) ) + !m_rThis.WrongPageDesc( pNewNextUpper->FindPageFrame() ) ) { pNewUpper = pNewNextUpper; } @@ -2158,7 +2158,7 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat ) } else { - const SwFrm *pCol = m_rThis.FindColFrm(); + const SwFrame *pCol = m_rThis.FindColFrame(); bool bGoOn = true; bool bJump = false; do @@ -2172,15 +2172,15 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat ) } if ( pCol ) { - // ColumnFrms now with BodyFrm - SwLayoutFrm* pColBody = pCol->IsColumnFrm() ? - const_cast<SwLayoutFrm*>(static_cast<const SwLayoutFrm*>(static_cast<const SwLayoutFrm*>(pCol)->Lower())) : - const_cast<SwLayoutFrm*>(static_cast<const SwLayoutFrm*>(pCol)); + // ColumnFrames now with BodyFrame + SwLayoutFrame* pColBody = pCol->IsColumnFrame() ? + const_cast<SwLayoutFrame*>(static_cast<const SwLayoutFrame*>(static_cast<const SwLayoutFrame*>(pCol)->Lower())) : + const_cast<SwLayoutFrame*>(static_cast<const SwLayoutFrame*>(pCol)); if ( pColBody->ContainsContent() ) { bGoOn = false; // We have content here! we accept this // only if GetLeaf() has set the MoveBwdJump. - if( SwFlowFrm::IsMoveBwdJump() ) + if( SwFlowFrame::IsMoveBwdJump() ) { pNewUpper = pColBody; // #i53139# @@ -2197,7 +2197,7 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat ) // #i71065# // Check that the proposed new next upper layout // frame isn't the current one. - SwLayoutFrm* pNewNextUpper = pNewUpper->GetLeaf( MAKEPAGE_NONE, true ); + SwLayoutFrame* pNewNextUpper = pNewUpper->GetLeaf( MAKEPAGE_NONE, true ); if ( pNewNextUpper && pNewNextUpper != m_rThis.GetUpper() && pNewNextUpper->GetType() == pNewUpper->GetType() && @@ -2205,7 +2205,7 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat ) pNewNextUpper->IsInFootnote() == pNewUpper->IsInFootnote() && pNewNextUpper->IsInTab() == pNewUpper->IsInTab() && pNewNextUpper->IsInSct() == pNewUpper->IsInSct() && - !m_rThis.WrongPageDesc( pNewNextUpper->FindPageFrm() ) ) + !m_rThis.WrongPageDesc( pNewNextUpper->FindPageFrame() ) ) { pNewUpper = pNewNextUpper; } @@ -2221,7 +2221,7 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat ) } } while( bGoOn ); if( bJump ) - SwFlowFrm::SetMoveBwdJump( true ); + SwFlowFrame::SetMoveBwdJump( true ); } } else // No breaks - we can flow back. @@ -2236,15 +2236,15 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat ) // - allow move backward as long as the anchored object is only temporarily // positions considering its wrapping style. if ( pNewUpper && - m_rThis.IsTextFrm() && !IsFollow() ) + m_rThis.IsTextFrame() && !IsFollow() ) { sal_uInt32 nToPageNum( 0L ); - const bool bMoveFwdByObjPos = SwLayouter::FrmMovedFwdByObjPos( + const bool bMoveFwdByObjPos = SwLayouter::FrameMovedFwdByObjPos( *(pOldPage->GetFormat()->GetDoc()), - static_cast<SwTextFrm&>(m_rThis), + static_cast<SwTextFrame&>(m_rThis), nToPageNum ); if ( bMoveFwdByObjPos && - pNewUpper->FindPageFrm()->GetPhyPageNum() < nToPageNum ) + pNewUpper->FindPageFrame()->GetPhyPageNum() < nToPageNum ) { pNewUpper = nullptr; } @@ -2275,11 +2275,11 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat ) // neglect empty sections in proposed new upper frame bool bProposedNewUpperContainsOnlyEmptySections( true ); { - const SwFrm* pLower( pNewUpper->Lower() ); + const SwFrame* pLower( pNewUpper->Lower() ); while ( pLower ) { - if ( pLower->IsSctFrm() && - !dynamic_cast<const SwSectionFrm*>(pLower)->GetSection() ) + if ( pLower->IsSctFrame() && + !dynamic_cast<const SwSectionFrame*>(pLower)->GetSection() ) { pLower = pLower->GetNext(); continue; @@ -2293,13 +2293,13 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat ) } if ( !bProposedNewUpperContainsOnlyEmptySections ) { - if ( SwFlowFrm::IsMoveBwdJump() ) + if ( SwFlowFrame::IsMoveBwdJump() ) { // Don't move after the Master, but into the next empty page. - SwFrm *pFrm = pNewUpper->Lower(); - while ( pFrm->GetNext() ) - pFrm = pFrm->GetNext(); - pNewUpper = pFrm->GetLeaf( MAKEPAGE_INSERT, true ); + SwFrame *pFrame = pNewUpper->Lower(); + while ( pFrame->GetNext() ) + pFrame = pFrame->GetNext(); + pNewUpper = pFrame->GetLeaf( MAKEPAGE_INSERT, true ); if( pNewUpper == m_rThis.GetUpper() ) // Did we end up in the same place? pNewUpper = nullptr; // If so, moving is not needed. } @@ -2311,21 +2311,21 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat ) { if( !pNewUpper->Lower() ) { - if( pNewUpper->IsFootnoteContFrm() ) + if( pNewUpper->IsFootnoteContFrame() ) { pNewUpper->Cut(); - SwFrm::DestroyFrm(pNewUpper); + SwFrame::DestroyFrame(pNewUpper); } else { - SwSectionFrm* pSectFrm = pNewUpper->FindSctFrm(); + SwSectionFrame* pSectFrame = pNewUpper->FindSctFrame(); // #126020# - adjust check for empty section // #130797# - correct fix #126020# - if ( pSectFrm && !pSectFrm->IsColLocked() && - !pSectFrm->ContainsContent() && !pSectFrm->ContainsAny( true ) ) + if ( pSectFrame && !pSectFrame->IsColLocked() && + !pSectFrame->ContainsContent() && !pSectFrame->ContainsAny( true ) ) { - pSectFrm->DelEmpty( true ); - SwFrm::DestroyFrm(pSectFrm); + pSectFrame->DelEmpty( true ); + SwFrame::DestroyFrame(pSectFrame); m_rThis.mbValidPos = true; } } @@ -2340,16 +2340,16 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat ) if ( pNewUpper && !IsFollow() && m_rThis.GetAttrSet()->GetKeep().GetValue() && m_rThis.GetIndNext() ) { - SwFrm* pIndNext = m_rThis.GetIndNext(); + SwFrame* pIndNext = m_rThis.GetIndNext(); // #i38232# - if ( !pIndNext->IsTabFrm() ) + if ( !pIndNext->IsTabFrame() ) { // get first content of section, while empty sections are skipped - while ( pIndNext && pIndNext->IsSctFrm() ) + while ( pIndNext && pIndNext->IsSctFrame() ) { - if( static_cast<SwSectionFrm*>(pIndNext)->GetSection() ) + if( static_cast<SwSectionFrame*>(pIndNext)->GetSection() ) { - SwFrm* pTmp = static_cast<SwSectionFrm*>(pIndNext)->ContainsAny(); + SwFrame* pTmp = static_cast<SwSectionFrame*>(pIndNext)->ContainsAny(); if ( pTmp ) { pIndNext = pTmp; @@ -2358,10 +2358,10 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat ) } pIndNext = pIndNext->GetIndNext(); } - OSL_ENSURE( !pIndNext || dynamic_cast<const SwTextFrm*>( pIndNext) != nullptr, - "<SwFlowFrm::MovedBwd(..)> - incorrect next found." ); - if ( pIndNext && pIndNext->IsFlowFrm() && - SwFlowFrm::CastFlowFrm(pIndNext)->IsJoinLocked() ) + OSL_ENSURE( !pIndNext || dynamic_cast<const SwTextFrame*>( pIndNext) != nullptr, + "<SwFlowFrame::MovedBwd(..)> - incorrect next found." ); + if ( pIndNext && pIndNext->IsFlowFrame() && + SwFlowFrame::CastFlowFrame(pIndNext)->IsJoinLocked() ) { pNewUpper = nullptr; } @@ -2376,32 +2376,32 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat ) SwLayouter::MoveBwdSuppressed( *(pOldPage->GetFormat()->GetDoc()), *this, *pNewUpper ) ) { - SwLayoutFrm* pNextNewUpper = pNewUpper->GetLeaf( - ( !m_rThis.IsSctFrm() && m_rThis.IsInSct() ) + SwLayoutFrame* pNextNewUpper = pNewUpper->GetLeaf( + ( !m_rThis.IsSctFrame() && m_rThis.IsInSct() ) ? MAKEPAGE_NOSECTION : MAKEPAGE_NONE, true ); // #i73194# - make code robust - OSL_ENSURE( pNextNewUpper, "<SwFlowFrm::MoveBwd(..)> - missing next new upper" ); + OSL_ENSURE( pNextNewUpper, "<SwFlowFrame::MoveBwd(..)> - missing next new upper" ); if ( pNextNewUpper && ( pNextNewUpper == m_rThis.GetUpper() || pNextNewUpper->GetType() != m_rThis.GetUpper()->GetType() ) ) { pNewUpper = nullptr; - OSL_FAIL( "<SwFlowFrm::MoveBwd(..)> - layout loop control for layout action <Move Backward> applied!" ); + OSL_FAIL( "<SwFlowFrame::MoveBwd(..)> - layout loop control for layout action <Move Backward> applied!" ); } } OSL_ENSURE( pNewUpper != m_rThis.GetUpper(), - "<SwFlowFrm::MoveBwd(..)> - moving backward to the current upper frame!?" ); + "<SwFlowFrame::MoveBwd(..)> - moving backward to the current upper frame!?" ); if ( pNewUpper ) { PROTOCOL_ENTER( &m_rThis, PROT_MOVE_BWD, 0, nullptr ); - if ( pNewUpper->IsFootnoteContFrm() ) + if ( pNewUpper->IsFootnoteContFrame() ) { // I may have gotten a Container - SwFootnoteFrm *pOld = m_rThis.FindFootnoteFrm(); - SwFootnoteFrm *pNew = new SwFootnoteFrm( pOld->GetFormat(), pOld, + SwFootnoteFrame *pOld = m_rThis.FindFootnoteFrame(); + SwFootnoteFrame *pNew = new SwFootnoteFrame( pOld->GetFormat(), pOld, pOld->GetRef(), pOld->GetAttr() ); if ( pOld->GetMaster() ) { @@ -2413,27 +2413,27 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat ) pNew->Paste( pNewUpper ); pNewUpper = pNew; } - if( pNewUpper->IsFootnoteFrm() && m_rThis.IsInSct() ) + if( pNewUpper->IsFootnoteFrame() && m_rThis.IsInSct() ) { - SwSectionFrm* pSct = m_rThis.FindSctFrm(); + SwSectionFrame* pSct = m_rThis.FindSctFrame(); // If we're in a section of a footnote, we may need to create - // a SwSectionFrm in the new upper + // a SwSectionFrame in the new upper if( pSct->IsInFootnote() ) { - SwFrm* pTmp = pNewUpper->Lower(); + SwFrame* pTmp = pNewUpper->Lower(); if( pTmp ) { while( pTmp->GetNext() ) pTmp = pTmp->GetNext(); - if( !pTmp->IsSctFrm() || - static_cast<SwSectionFrm*>(pTmp)->GetFollow() != pSct ) + if( !pTmp->IsSctFrame() || + static_cast<SwSectionFrame*>(pTmp)->GetFollow() != pSct ) pTmp = nullptr; } if( pTmp ) - pNewUpper = static_cast<SwSectionFrm*>(pTmp); + pNewUpper = static_cast<SwSectionFrame*>(pTmp); else { - pSct = new SwSectionFrm( *pSct, true ); + pSct = new SwSectionFrame( *pSct, true ); pSct->Paste( pNewUpper ); pSct->Init(); pNewUpper = pSct; @@ -2445,14 +2445,14 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat ) bool bFollow = false; // Lock section. Otherwise, it could get destroyed if the only Content // moves e.g. from the second into the first column. - SwSectionFrm* pSect = pNewUpper->FindSctFrm(); + SwSectionFrame* pSect = pNewUpper->FindSctFrame(); if( pSect ) { bUnlock = !pSect->IsColLocked(); pSect->ColLock(); bFollow = pSect->HasFollow(); } - pNewUpper->Calc(m_rThis.getRootFrm()->GetCurrShell()->GetOut()); + pNewUpper->Calc(m_rThis.getRootFrame()->GetCurrShell()->GetOut()); m_rThis.Cut(); // optimization: format section, if its size is invalidated and if it's @@ -2473,13 +2473,13 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat ) m_rThis.Paste( pNewUpper ); // - optimization if ( bFormatSect ) - pSect->Calc(m_rThis.getRootFrm()->GetCurrShell()->GetOut()); + pSect->Calc(m_rThis.getRootFrame()->GetCurrShell()->GetOut()); - SwPageFrm *pNewPage = m_rThis.FindPageFrm(); + SwPageFrame *pNewPage = m_rThis.FindPageFrame(); if( pNewPage != pOldPage ) { m_rThis.Prepare( PREP_BOSS_CHGD, static_cast<const void*>(pOldPage), false ); - SwViewShell *pSh = m_rThis.getRootFrm()->GetCurrShell(); + SwViewShell *pSh = m_rThis.getRootFrame()->GetCurrShell(); if ( pSh && !pSh->Imp()->IsUpdateExpFields() ) pSh->GetDoc()->getIDocumentFieldsAccess().SetNewFieldLst(true); // Will be done by CalcLayout() later on @@ -2493,16 +2493,16 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat ) { if ( bCheckPageDescs && pNewPage->GetNext() ) { - SwPageFrm* pStartPage = bCheckPageDescOfNextPage ? + SwPageFrame* pStartPage = bCheckPageDescOfNextPage ? pNewPage : - static_cast<SwPageFrm*>(pNewPage->GetNext()); - SwFrm::CheckPageDescs( pStartPage, false); + static_cast<SwPageFrame*>(pNewPage->GetNext()); + SwFrame::CheckPageDescs( pStartPage, false); } else if ( m_rThis.GetAttrSet()->GetPageDesc().GetPageDesc() ) { // First page could get empty for example by disabling // a section - SwFrm::CheckPageDescs( pNewPage, false); + SwFrame::CheckPageDescs( pNewPage, false); } } } @@ -2510,25 +2510,25 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat ) return pNewUpper != nullptr; } -SwFlowFrm *SwFlowFrm::CastFlowFrm( SwFrm *pFrm ) +SwFlowFrame *SwFlowFrame::CastFlowFrame( SwFrame *pFrame ) { - if ( pFrm->IsContentFrm() ) - return static_cast<SwContentFrm*>(pFrm); - if ( pFrm->IsTabFrm() ) - return static_cast<SwTabFrm*>(pFrm); - if ( pFrm->IsSctFrm() ) - return static_cast<SwSectionFrm*>(pFrm); + if ( pFrame->IsContentFrame() ) + return static_cast<SwContentFrame*>(pFrame); + if ( pFrame->IsTabFrame() ) + return static_cast<SwTabFrame*>(pFrame); + if ( pFrame->IsSctFrame() ) + return static_cast<SwSectionFrame*>(pFrame); return nullptr; } -const SwFlowFrm *SwFlowFrm::CastFlowFrm( const SwFrm *pFrm ) +const SwFlowFrame *SwFlowFrame::CastFlowFrame( const SwFrame *pFrame ) { - if ( pFrm->IsContentFrm() ) - return static_cast<const SwContentFrm*>(pFrm); - if ( pFrm->IsTabFrm() ) - return static_cast<const SwTabFrm*>(pFrm); - if ( pFrm->IsSctFrm() ) - return static_cast<const SwSectionFrm*>(pFrm); + if ( pFrame->IsContentFrame() ) + return static_cast<const SwContentFrame*>(pFrame); + if ( pFrame->IsTabFrame() ) + return static_cast<const SwTabFrame*>(pFrame); + if ( pFrame->IsSctFrame() ) + return static_cast<const SwSectionFrame*>(pFrame); return nullptr; } diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx index afc4f926fbb9..57c7d1d036be 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -67,8 +67,8 @@ using namespace ::com::sun::star; -SwFlyFrm::SwFlyFrm( SwFlyFrameFormat *pFormat, SwFrm* pSib, SwFrm *pAnch ) : - SwLayoutFrm( pFormat, pSib ), +SwFlyFrame::SwFlyFrame( SwFlyFrameFormat *pFormat, SwFrame* pSib, SwFrame *pAnch ) : + SwLayoutFrame( pFormat, pSib ), SwAnchoredObject(), // #i26791# m_pPrevLink( nullptr ), m_pNextLink( nullptr ), @@ -80,14 +80,14 @@ SwFlyFrm::SwFlyFrm( SwFlyFrameFormat *pFormat, SwFrm* pSib, SwFrm *pAnch ) : m_bLockDeleteContent( false ), m_bValidContentPos( false ) { - mnFrmType = FRM_FLY; + mnFrameType = FRM_FLY; m_bInvalid = m_bNotifyBack = true; m_bLocked = m_bMinHeight = m_bHeightClipped = m_bWidthClipped = m_bFormatHeightOnly = false; // Size setting: Fixed size is always the width - const SwFormatFrmSize &rFrmSize = pFormat->GetFrmSize(); + const SwFormatFrameSize &rFrameSize = pFormat->GetFrameSize(); const sal_uInt16 nDir = static_cast<const SvxFrameDirectionItem&>(pFormat->GetFormatAttr( RES_FRAMEDIR )).GetValue(); if( FRMDIR_ENVIRONMENT == nDir ) @@ -107,7 +107,7 @@ SwFlyFrm::SwFlyFrm( SwFlyFrameFormat *pFormat, SwFrm* pSib, SwFrm *pAnch ) : } else { - const SwViewShell *pSh = getRootFrm() ? getRootFrm()->GetCurrShell() : nullptr; + const SwViewShell *pSh = getRootFrame() ? getRootFrame()->GetCurrShell() : nullptr; if( pSh && pSh->GetViewOptions()->getBrowseMode() ) { mbVertLR = false; @@ -131,13 +131,13 @@ SwFlyFrm::SwFlyFrm( SwFlyFrameFormat *pFormat, SwFrm* pSib, SwFrm *pAnch ) : mbRightToLeft = false; } - Frm().Width( rFrmSize.GetWidth() ); - Frm().Height( rFrmSize.GetHeightSizeType() == ATT_VAR_SIZE ? MINFLY : rFrmSize.GetHeight() ); + Frame().Width( rFrameSize.GetWidth() ); + Frame().Height( rFrameSize.GetHeightSizeType() == ATT_VAR_SIZE ? MINFLY : rFrameSize.GetHeight() ); // Fixed or variable Height? - if ( rFrmSize.GetHeightSizeType() == ATT_MIN_SIZE ) + if ( rFrameSize.GetHeightSizeType() == ATT_MIN_SIZE ) m_bMinHeight = true; - else if ( rFrmSize.GetHeightSizeType() == ATT_FIX_SIZE ) + else if ( rFrameSize.GetHeightSizeType() == ATT_FIX_SIZE ) mbFixSize = true; // insert columns, if necessary @@ -153,11 +153,11 @@ SwFlyFrm::SwFlyFrm( SwFlyFrameFormat *pFormat, SwFrm* pSib, SwFrm *pAnch ) : InsertCnt(); // Put it somewhere outside so that out document is not formatted unnecessarily often - Frm().Pos().setX(FAR_AWAY); - Frm().Pos().setY(FAR_AWAY); + Frame().Pos().setX(FAR_AWAY); + Frame().Pos().setY(FAR_AWAY); } -void SwFlyFrm::Chain( SwFrm* _pAnch ) +void SwFlyFrame::Chain( SwFrame* _pAnch ) { // Connect to chain neighboors. // No problem, if a neighboor doesn't exist - the construction of the @@ -167,40 +167,40 @@ void SwFlyFrm::Chain( SwFrm* _pAnch ) { if ( rChain.GetNext() ) { - SwFlyFrm* pFollow = FindChainNeighbour( *rChain.GetNext(), _pAnch ); + SwFlyFrame* pFollow = FindChainNeighbour( *rChain.GetNext(), _pAnch ); if ( pFollow ) { OSL_ENSURE( !pFollow->GetPrevLink(), "wrong chain detected" ); if ( !pFollow->GetPrevLink() ) - SwFlyFrm::ChainFrames( this, pFollow ); + SwFlyFrame::ChainFrames( this, pFollow ); } } if ( rChain.GetPrev() ) { - SwFlyFrm *pMaster = FindChainNeighbour( *rChain.GetPrev(), _pAnch ); + SwFlyFrame *pMaster = FindChainNeighbour( *rChain.GetPrev(), _pAnch ); if ( pMaster ) { OSL_ENSURE( !pMaster->GetNextLink(), "wrong chain detected" ); if ( !pMaster->GetNextLink() ) - SwFlyFrm::ChainFrames( pMaster, this ); + SwFlyFrame::ChainFrames( pMaster, this ); } } } } -void SwFlyFrm::InsertCnt() +void SwFlyFrame::InsertCnt() { if ( !GetPrevLink() ) { const SwFormatContent& rContent = GetFormat()->GetContent(); OSL_ENSURE( rContent.GetContentIdx(), ":-( no content prepared." ); sal_uLong nIndex = rContent.GetContentIdx()->GetIndex(); - // Lower() means SwColumnFrm; the Content then needs to be inserted into the (Column)BodyFrm - ::_InsertCnt( Lower() ? static_cast<SwLayoutFrm*>(static_cast<SwLayoutFrm*>(Lower())->Lower()) : static_cast<SwLayoutFrm*>(this), + // Lower() means SwColumnFrame; the Content then needs to be inserted into the (Column)BodyFrame + ::_InsertCnt( Lower() ? static_cast<SwLayoutFrame*>(static_cast<SwLayoutFrame*>(Lower())->Lower()) : static_cast<SwLayoutFrame*>(this), GetFormat()->GetDoc(), nIndex ); // NoText always have a fixed height. - if ( Lower() && Lower()->IsNoTextFrm() ) + if ( Lower() && Lower()->IsNoTextFrame() ) { mbFixSize = true; m_bMinHeight = false; @@ -208,13 +208,13 @@ void SwFlyFrm::InsertCnt() } } -void SwFlyFrm::InsertColumns() +void SwFlyFrame::InsertColumns() { // #i97379# // Check, if column are allowed. // Columns are not allowed for fly frames, which represent graphics or embedded objects. const SwFormatContent& rContent = GetFormat()->GetContent(); - OSL_ENSURE( rContent.GetContentIdx(), "<SwFlyFrm::InsertColumns()> - no content prepared." ); + OSL_ENSURE( rContent.GetContentIdx(), "<SwFlyFrame::InsertColumns()> - no content prepared." ); SwNodeIndex aFirstContent( *(rContent.GetContentIdx()), 1 ); if ( aFirstContent.GetNode().IsNoTextNode() ) { @@ -224,32 +224,32 @@ void SwFlyFrm::InsertColumns() const SwFormatCol &rCol = GetFormat()->GetCol(); if ( rCol.GetNumCols() > 1 ) { - // Start off PrtArea to be as large as Frm, so that we can put in the columns + // Start off PrtArea to be as large as Frame, so that we can put in the columns // properly. It'll adjust later on. - Prt().Width( Frm().Width() ); - Prt().Height( Frm().Height() ); + Prt().Width( Frame().Width() ); + Prt().Height( Frame().Height() ); const SwFormatCol aOld; // ChgColumns() also needs an old value passed ChgColumns( aOld, rCol ); } } -void SwFlyFrm::DestroyImpl() +void SwFlyFrame::DestroyImpl() { // Accessible objects for fly frames will be destroyed in this destructor. // For frames bound as char or frames that don't have an anchor we have // to do that ourselves. For any other frame the call RemoveFly at the // anchor will do that. - if( IsAccessibleFrm() && GetFormat() && (IsFlyInCntFrm() || !GetAnchorFrm()) ) + if( IsAccessibleFrame() && GetFormat() && (IsFlyInContentFrame() || !GetAnchorFrame()) ) { - SwRootFrm *pRootFrm = getRootFrm(); - if( pRootFrm && pRootFrm->IsAnyShellAccessible() ) + SwRootFrame *pRootFrame = getRootFrame(); + if( pRootFrame && pRootFrame->IsAnyShellAccessible() ) { - SwViewShell *pVSh = pRootFrm->GetCurrShell(); + SwViewShell *pVSh = pRootFrame->GetCurrShell(); if( pVSh && pVSh->Imp() ) { // Lowers aren't disposed already, so we have to do a recursive // dispose - pVSh->Imp()->DisposeAccessibleFrm( this, true ); + pVSh->Imp()->DisposeAccessibleFrame( this, true ); } } } @@ -262,26 +262,26 @@ void SwFlyFrm::DestroyImpl() // OD 2004-01-19 #110582# DeleteCnt(); - if ( GetAnchorFrm() ) - AnchorFrm()->RemoveFly( this ); + if ( GetAnchorFrame() ) + AnchorFrame()->RemoveFly( this ); } FinitDrawObj(); - SwLayoutFrm::DestroyImpl(); + SwLayoutFrame::DestroyImpl(); } -SwFlyFrm::~SwFlyFrm() +SwFlyFrame::~SwFlyFrame() { } -const IDocumentDrawModelAccess& SwFlyFrm::getIDocumentDrawModelAccess() +const IDocumentDrawModelAccess& SwFlyFrame::getIDocumentDrawModelAccess() { return GetFormat()->getIDocumentDrawModelAccess(); } // OD 2004-01-19 #110582# -void SwFlyFrm::Unchain() +void SwFlyFrame::Unchain() { if ( GetPrevLink() ) UnchainFrames( GetPrevLink(), this ); @@ -290,21 +290,21 @@ void SwFlyFrm::Unchain() } // OD 2004-01-19 #110582# -void SwFlyFrm::DeleteCnt() +void SwFlyFrame::DeleteCnt() { // #110582#-2 if ( IsLockDeleteContent() ) return; - SwFrm* pFrm = m_pLower; - while ( pFrm ) + SwFrame* pFrame = m_pLower; + while ( pFrame ) { - while ( pFrm->GetDrawObjs() && pFrm->GetDrawObjs()->size() ) + while ( pFrame->GetDrawObjs() && pFrame->GetDrawObjs()->size() ) { - SwAnchoredObject *pAnchoredObj = (*pFrm->GetDrawObjs())[0]; - if ( dynamic_cast<const SwFlyFrm*>( pAnchoredObj) != nullptr ) + SwAnchoredObject *pAnchoredObj = (*pFrame->GetDrawObjs())[0]; + if ( dynamic_cast<const SwFlyFrame*>( pAnchoredObj) != nullptr ) { - SwFrm::DestroyFrm(static_cast<SwFlyFrm*>(pAnchoredObj)); + SwFrame::DestroyFrame(static_cast<SwFlyFrame*>(pAnchoredObj)); } else if ( dynamic_cast<const SwAnchoredDrawObject*>( pAnchoredObj) != nullptr ) { @@ -328,33 +328,33 @@ void SwFlyFrm::DeleteCnt() } } - pFrm->RemoveFromLayout(); - SwFrm::DestroyFrm(pFrm); - pFrm = m_pLower; + pFrame->RemoveFromLayout(); + SwFrame::DestroyFrame(pFrame); + pFrame = m_pLower; } InvalidatePage(); } -sal_uInt32 SwFlyFrm::_GetOrdNumForNewRef( const SwFlyDrawContact* pContact ) +sal_uInt32 SwFlyFrame::_GetOrdNumForNewRef( const SwFlyDrawContact* pContact ) { sal_uInt32 nOrdNum( 0L ); // search for another Writer fly frame registered at same frame format - SwIterator<SwFlyFrm,SwFormat> aIter( *pContact->GetFormat() ); - const SwFlyFrm* pFlyFrm( nullptr ); - for ( pFlyFrm = aIter.First(); pFlyFrm; pFlyFrm = aIter.Next() ) + SwIterator<SwFlyFrame,SwFormat> aIter( *pContact->GetFormat() ); + const SwFlyFrame* pFlyFrame( nullptr ); + for ( pFlyFrame = aIter.First(); pFlyFrame; pFlyFrame = aIter.Next() ) { - if ( pFlyFrm != this ) + if ( pFlyFrame != this ) { break; } } - if ( pFlyFrm ) + if ( pFlyFrame ) { // another Writer fly frame found. Take its order number - nOrdNum = pFlyFrm->GetVirtDrawObj()->GetOrdNum(); + nOrdNum = pFlyFrame->GetVirtDrawObj()->GetOrdNum(); } else { @@ -368,7 +368,7 @@ sal_uInt32 SwFlyFrm::_GetOrdNumForNewRef( const SwFlyDrawContact* pContact ) return nOrdNum; } -SwVirtFlyDrawObj* SwFlyFrm::CreateNewRef( SwFlyDrawContact *pContact ) +SwVirtFlyDrawObj* SwFlyFrame::CreateNewRef( SwFlyDrawContact *pContact ) { SwVirtFlyDrawObj *pDrawObj = new SwVirtFlyDrawObj( *pContact->GetMaster(), this ); pDrawObj->SetModel( pContact->GetMaster()->GetModel() ); @@ -397,7 +397,7 @@ SwVirtFlyDrawObj* SwFlyFrm::CreateNewRef( SwFlyDrawContact *pContact ) return pDrawObj; } -void SwFlyFrm::InitDrawObj( bool bNotify ) +void SwFlyFrame::InitDrawObj( bool bNotify ) { // Find ContactObject from the Format. If there's already one, we just // need to create a new Ref, else we create the Contact now. @@ -426,7 +426,7 @@ void SwFlyFrm::InitDrawObj( bool bNotify ) NotifyDrawObj(); } -void SwFlyFrm::FinitDrawObj() +void SwFlyFrame::FinitDrawObj() { if ( !GetVirtDrawObj() ) return; @@ -434,7 +434,7 @@ void SwFlyFrm::FinitDrawObj() // Deregister from SdrPageViews if the Objects is still selected there. if ( !GetFormat()->GetDoc()->IsInDtor() ) { - SwViewShell *p1St = getRootFrm()->GetCurrShell(); + SwViewShell *p1St = getRootFrame()->GetCurrShell(); if ( p1St ) { for(SwViewShell& rCurrentShell : p1St->GetRingContainer()) @@ -453,17 +453,17 @@ void SwFlyFrm::FinitDrawObj() if ( GetFormat() ) { bool bContinue = true; - SwIterator<SwFrm,SwFormat> aFrmIter( *GetFormat() ); - for ( SwFrm* pFrm = aFrmIter.First(); pFrm; pFrm = aFrmIter.Next() ) - if ( pFrm != this ) + SwIterator<SwFrame,SwFormat> aFrameIter( *GetFormat() ); + for ( SwFrame* pFrame = aFrameIter.First(); pFrame; pFrame = aFrameIter.Next() ) + if ( pFrame != this ) { - // don't delete Contact if there is still a Frm + // don't delete Contact if there is still a Frame bContinue = false; break; } if ( bContinue ) - // no Frm left, find Contact object to destroy + // no Frame left, find Contact object to destroy pMyContact = SwIterator<SwFlyDrawContact,SwFormat>( *GetFormat() ).First(); } @@ -479,7 +479,7 @@ void SwFlyFrm::FinitDrawObj() delete pMyContact; // Destroys the Master itself } -void SwFlyFrm::ChainFrames( SwFlyFrm *pMaster, SwFlyFrm *pFollow ) +void SwFlyFrame::ChainFrames( SwFlyFrame *pMaster, SwFlyFrame *pFollow ) { OSL_ENSURE( pMaster && pFollow, "uncomplete chain" ); OSL_ENSURE( !pMaster->GetNextLink(), "link can not be changed" ); @@ -491,12 +491,12 @@ void SwFlyFrm::ChainFrames( SwFlyFrm *pMaster, SwFlyFrm *pFollow ) if ( pMaster->ContainsContent() ) { // To get a text flow we need to invalidate - SwFrm *pInva = pMaster->FindLastLower(); + SwFrame *pInva = pMaster->FindLastLower(); SWRECTFN( pMaster ) const long nBottom = (pMaster->*fnRect->fnGetPrtBottom)(); while ( pInva ) { - if( (pInva->Frm().*fnRect->fnBottomDist)( nBottom ) <= 0 ) + if( (pInva->Frame().*fnRect->fnBottomDist)( nBottom ) <= 0 ) { pInva->InvalidateSize(); pInva->Prepare(); @@ -511,23 +511,23 @@ void SwFlyFrm::ChainFrames( SwFlyFrm *pMaster, SwFlyFrm *pFollow ) { // There's only the content from the Masters left; the content from the Follow // does not have any Frames left (should always be exactly one empty TextNode). - SwFrm *pFrm = pFollow->ContainsContent(); - OSL_ENSURE( !pFrm->IsTabFrm() && !pFrm->FindNext(), "follow in chain contains content" ); - pFrm->Cut(); - SwFrm::DestroyFrm(pFrm); + SwFrame *pFrame = pFollow->ContainsContent(); + OSL_ENSURE( !pFrame->IsTabFrame() && !pFrame->FindNext(), "follow in chain contains content" ); + pFrame->Cut(); + SwFrame::DestroyFrame(pFrame); } // invalidate accessible relation set (accessibility wrapper) - SwViewShell* pSh = pMaster->getRootFrm()->GetCurrShell(); + SwViewShell* pSh = pMaster->getRootFrame()->GetCurrShell(); if( pSh ) { - SwRootFrm* pLayout = pMaster->getRootFrm(); + SwRootFrame* pLayout = pMaster->getRootFrame(); if( pLayout && pLayout->IsAnyShellAccessible() ) pSh->Imp()->InvalidateAccessibleRelationSet( pMaster, pFollow ); } } -void SwFlyFrm::UnchainFrames( SwFlyFrm *pMaster, SwFlyFrm *pFollow ) +void SwFlyFrame::UnchainFrames( SwFlyFrame *pMaster, SwFlyFrame *pFollow ) { pMaster->m_pNextLink = nullptr; pFollow->m_pPrevLink = nullptr; @@ -535,17 +535,17 @@ void SwFlyFrm::UnchainFrames( SwFlyFrm *pMaster, SwFlyFrm *pFollow ) if ( pFollow->ContainsContent() ) { // The Master sucks up the content of the Follow - SwLayoutFrm *pUpper = pMaster; - if ( pUpper->Lower()->IsColumnFrm() ) + SwLayoutFrame *pUpper = pMaster; + if ( pUpper->Lower()->IsColumnFrame() ) { - pUpper = static_cast<SwLayoutFrm*>(pUpper->GetLastLower()); - pUpper = static_cast<SwLayoutFrm*>(pUpper->Lower()); // The (Column)BodyFrm - OSL_ENSURE( pUpper && pUpper->IsColBodyFrm(), "Missing ColumnBody" ); + pUpper = static_cast<SwLayoutFrame*>(pUpper->GetLastLower()); + pUpper = static_cast<SwLayoutFrame*>(pUpper->Lower()); // The (Column)BodyFrame + OSL_ENSURE( pUpper && pUpper->IsColBodyFrame(), "Missing ColumnBody" ); } - SwFlyFrm *pFoll = pFollow; + SwFlyFrame *pFoll = pFollow; while ( pFoll ) { - SwFrm *pTmp = ::SaveContent( pFoll ); + SwFrame *pTmp = ::SaveContent( pFoll ); if ( pTmp ) ::RestoreContent( pTmp, pUpper, pMaster->FindLastLower(), true ); pFoll->SetCompletePaint(); @@ -558,32 +558,32 @@ void SwFlyFrm::UnchainFrames( SwFlyFrm *pMaster, SwFlyFrm *pFollow ) const SwFormatContent &rContent = pFollow->GetFormat()->GetContent(); OSL_ENSURE( rContent.GetContentIdx(), ":-( No content prepared." ); sal_uLong nIndex = rContent.GetContentIdx()->GetIndex(); - // Lower() means SwColumnFrm: this one contains another SwBodyFrm - ::_InsertCnt( pFollow->Lower() ? const_cast<SwLayoutFrm*>(static_cast<const SwLayoutFrm*>(static_cast<const SwLayoutFrm*>(pFollow->Lower())->Lower())) - : static_cast<SwLayoutFrm*>(pFollow), + // Lower() means SwColumnFrame: this one contains another SwBodyFrame + ::_InsertCnt( pFollow->Lower() ? const_cast<SwLayoutFrame*>(static_cast<const SwLayoutFrame*>(static_cast<const SwLayoutFrame*>(pFollow->Lower())->Lower())) + : static_cast<SwLayoutFrame*>(pFollow), pFollow->GetFormat()->GetDoc(), ++nIndex ); // invalidate accessible relation set (accessibility wrapper) - SwViewShell* pSh = pMaster->getRootFrm()->GetCurrShell(); + SwViewShell* pSh = pMaster->getRootFrame()->GetCurrShell(); if( pSh ) { - SwRootFrm* pLayout = pMaster->getRootFrm(); + SwRootFrame* pLayout = pMaster->getRootFrame(); if( pLayout && pLayout->IsAnyShellAccessible() ) pSh->Imp()->InvalidateAccessibleRelationSet( pMaster, pFollow ); } } -SwFlyFrm *SwFlyFrm::FindChainNeighbour( SwFrameFormat &rChain, SwFrm *pAnch ) +SwFlyFrame *SwFlyFrame::FindChainNeighbour( SwFrameFormat &rChain, SwFrame *pAnch ) { // We look for the Fly that's in the same Area. // Areas can for now only be Head/Footer or Flys. if ( !pAnch ) // If an Anchor was passed along, that one counts (ctor!) - pAnch = AnchorFrm(); + pAnch = AnchorFrame(); - SwLayoutFrm *pLay; + SwLayoutFrame *pLay; if ( pAnch->IsInFly() ) - pLay = pAnch->FindFlyFrm(); + pLay = pAnch->FindFlyFrame(); else { // FindFooterOrHeader is not appropriate here, as we may not have a @@ -593,17 +593,17 @@ SwFlyFrm *SwFlyFrm::FindChainNeighbour( SwFrameFormat &rChain, SwFrm *pAnch ) pLay = pLay->GetUpper(); } - SwIterator<SwFlyFrm,SwFormat> aIter( rChain ); - SwFlyFrm *pFly = aIter.First(); + SwIterator<SwFlyFrame,SwFormat> aIter( rChain ); + SwFlyFrame *pFly = aIter.First(); if ( pLay ) { while ( pFly ) { - if ( pFly->GetAnchorFrm() ) + if ( pFly->GetAnchorFrame() ) { - if ( pFly->GetAnchorFrm()->IsInFly() ) + if ( pFly->GetAnchorFrame()->IsInFly() ) { - if ( pFly->AnchorFrm()->FindFlyFrm() == pLay ) + if ( pFly->AnchorFrame()->FindFlyFrame() == pLay ) break; } else if ( pLay == pFly->FindFooterOrHeader() ) @@ -619,12 +619,12 @@ SwFlyFrm *SwFlyFrm::FindChainNeighbour( SwFrameFormat &rChain, SwFrm *pAnch ) return pFly; } -SwFrm *SwFlyFrm::FindLastLower() +SwFrame *SwFlyFrame::FindLastLower() { - SwFrm *pRet = ContainsAny(); + SwFrame *pRet = ContainsAny(); if ( pRet && pRet->IsInTab() ) - pRet = pRet->FindTabFrm(); - SwFrm *pNxt = pRet; + pRet = pRet->FindTabFrame(); + SwFrame *pNxt = pRet; while ( pNxt && IsAnLower( pNxt ) ) { pRet = pNxt; pNxt = pNxt->FindNext(); @@ -632,47 +632,47 @@ SwFrm *SwFlyFrm::FindLastLower() return pRet; } -bool SwFlyFrm::FrmSizeChg( const SwFormatFrmSize &rFrmSize ) +bool SwFlyFrame::FrameSizeChg( const SwFormatFrameSize &rFrameSize ) { bool bRet = false; - SwTwips nDiffHeight = Frm().Height(); - if ( rFrmSize.GetHeightSizeType() == ATT_VAR_SIZE ) + SwTwips nDiffHeight = Frame().Height(); + if ( rFrameSize.GetHeightSizeType() == ATT_VAR_SIZE ) mbFixSize = m_bMinHeight = false; else { - if ( rFrmSize.GetHeightSizeType() == ATT_FIX_SIZE ) + if ( rFrameSize.GetHeightSizeType() == ATT_FIX_SIZE ) { mbFixSize = true; m_bMinHeight = false; } - else if ( rFrmSize.GetHeightSizeType() == ATT_MIN_SIZE ) + else if ( rFrameSize.GetHeightSizeType() == ATT_MIN_SIZE ) { mbFixSize = false; m_bMinHeight = true; } - nDiffHeight -= rFrmSize.GetHeight(); + nDiffHeight -= rFrameSize.GetHeight(); } // If the Fly contains columns, we already need to set the Fly // and the Columns to the required value or else we run into problems. if ( Lower() ) { - if ( Lower()->IsColumnFrm() ) + if ( Lower()->IsColumnFrame() ) { const SwRect aOld( GetObjRectWithSpaces() ); const Size aOldSz( Prt().SSize() ); - const SwTwips nDiffWidth = Frm().Width() - rFrmSize.GetWidth(); - maFrm.Height( maFrm.Height() - nDiffHeight ); - maFrm.Width ( maFrm.Width() - nDiffWidth ); + const SwTwips nDiffWidth = Frame().Width() - rFrameSize.GetWidth(); + maFrame.Height( maFrame.Height() - nDiffHeight ); + maFrame.Width ( maFrame.Width() - nDiffWidth ); // #i68520# InvalidateObjRectWithSpaces(); maPrt.Height( maPrt.Height() - nDiffHeight ); maPrt.Width ( maPrt.Width() - nDiffWidth ); ChgLowersProp( aOldSz ); - ::Notify( this, FindPageFrm(), aOld ); + ::Notify( this, FindPageFrame(), aOld ); mbValidPos = false; bRet = true; } - else if ( Lower()->IsNoTextFrm() ) + else if ( Lower()->IsNoTextFrame() ) { mbFixSize = true; m_bMinHeight = false; @@ -681,7 +681,7 @@ bool SwFlyFrm::FrmSizeChg( const SwFormatFrmSize &rFrmSize ) return bRet; } -void SwFlyFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) +void SwFlyFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) { sal_uInt8 nInvFlags = 0; @@ -702,7 +702,7 @@ void SwFlyFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) aOIter.NextItem(); } if ( aOldSet.Count() || aNewSet.Count() ) - SwLayoutFrm::Modify( &aOldSet, &aNewSet ); + SwLayoutFrame::Modify( &aOldSet, &aNewSet ); } else _UpdateAttr( pOld, pNew, nInvFlags ); @@ -728,10 +728,10 @@ void SwFlyFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) SetNotifyBack(); if ( nInvFlags & 0x10 ) SetCompletePaint(); - if ( ( nInvFlags & 0x40 ) && Lower() && Lower()->IsNoTextFrm() ) + if ( ( nInvFlags & 0x40 ) && Lower() && Lower()->IsNoTextFrame() ) ClrContourCache( GetVirtDrawObj() ); - SwRootFrm *pRoot; - if ( nInvFlags & 0x20 && nullptr != (pRoot = getRootFrm()) ) + SwRootFrame *pRoot; + if ( nInvFlags & 0x20 && nullptr != (pRoot = getRootFrame()) ) pRoot->InvalidateBrowseWidth(); // #i28701# if ( nInvFlags & 0x80 ) @@ -745,13 +745,13 @@ void SwFlyFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) } } -void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew, +void SwFlyFrame::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew, sal_uInt8 &rInvFlags, SwAttrSetChg *pOldSet, SwAttrSetChg *pNewSet ) { bool bClear = true; const sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0; - SwViewShell *pSh = getRootFrm()->GetCurrShell(); + SwViewShell *pSh = getRootFrame()->GetCurrShell(); switch( nWhich ) { case RES_VERT_ORIENT: @@ -777,7 +777,7 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew, rInvFlags |= 0x41; // The background needs to be messaged and invalidated const SwRect aTmp( GetObjRectWithSpaces() ); - NotifyBackground( FindPageFrm(), aTmp, PREP_FLY_ATTR_CHG ); + NotifyBackground( FindPageFrame(), aTmp, PREP_FLY_ATTR_CHG ); // By changing the flow of frame-bound Frames, a vertical alignment // can be activated/deactivated => MakeFlyPos @@ -785,10 +785,10 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew, rInvFlags |= 0x09; // Delete contour in the Node if necessary - if ( Lower() && Lower()->IsNoTextFrm() && + if ( Lower() && Lower()->IsNoTextFrame() && !GetFormat()->GetSurround().IsContour() ) { - SwNoTextNode *pNd = static_cast<SwNoTextNode*>(static_cast<SwContentFrm*>(Lower())->GetNode()); + SwNoTextNode *pNd = static_cast<SwNoTextNode*>(static_cast<SwContentFrame*>(Lower())->GetNode()); if ( pNd->HasContour() ) pNd->SetContour( nullptr ); } @@ -806,7 +806,7 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew, GetVirtDrawObj()->SetResizeProtect( pP->IsSizeProtected() ); if( pSh ) { - SwRootFrm* pLayout = getRootFrm(); + SwRootFrame* pLayout = getRootFrame(); if( pLayout && pLayout->IsAnyShellAccessible() ) pSh->Imp()->InvalidateAccessibleEditableState( true, this ); } @@ -816,8 +816,8 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew, if (pOld && pNew) { ChgColumns( *static_cast<const SwFormatCol*>(pOld), *static_cast<const SwFormatCol*>(pNew) ); - const SwFormatFrmSize &rNew = GetFormat()->GetFrmSize(); - if ( FrmSizeChg( rNew ) ) + const SwFormatFrameSize &rNew = GetFormat()->GetFrameSize(); + if ( FrameSizeChg( rNew ) ) NotifyDrawObj(); rInvFlags |= 0x1A; break; @@ -826,14 +826,14 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew, case RES_FRM_SIZE: case RES_FMT_CHG: { - const SwFormatFrmSize &rNew = GetFormat()->GetFrmSize(); - if ( FrmSizeChg( rNew ) ) + const SwFormatFrameSize &rNew = GetFormat()->GetFrameSize(); + if ( FrameSizeChg( rNew ) ) NotifyDrawObj(); rInvFlags |= 0x7F; if ( RES_FMT_CHG == nWhich ) { SwRect aNew( GetObjRectWithSpaces() ); - SwRect aOld( maFrm ); + SwRect aOld( maFrame ); const SvxULSpaceItem &rUL = static_cast<const SwFormatChg*>(pOld)->pChangedFormat->GetULSpace(); aOld.Top( std::max( aOld.Top() - long(rUL.GetUpper()), 0L ) ); aOld.SSize().Height()+= rUL.GetLower(); @@ -841,17 +841,17 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew, aOld.Left ( std::max( aOld.Left() - long(rLR.GetLeft()), 0L ) ); aOld.SSize().Width() += rLR.GetRight(); aNew.Union( aOld ); - NotifyBackground( FindPageFrm(), aNew, PREP_CLEAR ); + NotifyBackground( FindPageFrame(), aNew, PREP_CLEAR ); // Special case: // When assigning a template we cannot rely on the old column // attribute. As there need to be at least enough for ChgColumns, // we need to create a temporary attribute. SwFormatCol aCol; - if ( Lower() && Lower()->IsColumnFrm() ) + if ( Lower() && Lower()->IsColumnFrame() ) { sal_uInt16 nCol = 0; - SwFrm *pTmp = Lower(); + SwFrame *pTmp = Lower(); do { ++nCol; pTmp = pTmp->GetNext(); @@ -863,18 +863,18 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew, SwFormatURL aURL( GetFormat()->GetURL() ); - SwFormatFrmSize *pNewFormatFrmSize = nullptr; + SwFormatFrameSize *pNewFormatFrameSize = nullptr; SwFormatChg *pOldFormatChg = nullptr; if (nWhich == RES_FRM_SIZE) - pNewFormatFrmSize = const_cast<SwFormatFrmSize*>(static_cast<const SwFormatFrmSize*>(pNew)); + pNewFormatFrameSize = const_cast<SwFormatFrameSize*>(static_cast<const SwFormatFrameSize*>(pNew)); else pOldFormatChg = const_cast<SwFormatChg*>(static_cast<const SwFormatChg*>(pOld)); - if (aURL.GetMap() && (pNewFormatFrmSize || pOldFormatChg)) + if (aURL.GetMap() && (pNewFormatFrameSize || pOldFormatChg)) { - const SwFormatFrmSize &rOld = pNewFormatFrmSize ? - *pNewFormatFrmSize : - pOldFormatChg->pChangedFormat->GetFrmSize(); + const SwFormatFrameSize &rOld = pNewFormatFrameSize ? + *pNewFormatFrameSize : + pOldFormatChg->pChangedFormat->GetFrameSize(); //#35091# Can be "times zero", when loading the template if ( rOld.GetWidth() && rOld.GetHeight() ) { @@ -893,7 +893,7 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew, GetVirtDrawObj()->SetResizeProtect( rP.IsSizeProtected() ); if ( pSh ) - pSh->InvalidateWindows( Frm() ); + pSh->InvalidateWindows( Frame() ); const IDocumentDrawModelAccess& rIDDMA = GetFormat()->getIDocumentDrawModelAccess(); const sal_uInt8 nId = GetFormat()->GetOpaque().GetValue() ? rIDDMA.GetHeavenId() : @@ -903,18 +903,18 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew, if ( Lower() ) { // Delete contour in the Node if necessary - if( Lower()->IsNoTextFrm() && + if( Lower()->IsNoTextFrame() && !GetFormat()->GetSurround().IsContour() ) { - SwNoTextNode *pNd = static_cast<SwNoTextNode*>(static_cast<SwContentFrm*>(Lower())->GetNode()); + SwNoTextNode *pNd = static_cast<SwNoTextNode*>(static_cast<SwContentFrame*>(Lower())->GetNode()); if ( pNd->HasContour() ) pNd->SetContour( nullptr ); } - else if( !Lower()->IsColumnFrm() ) + else if( !Lower()->IsColumnFrame() ) { - SwFrm* pFrm = GetLastLower(); - if( pFrm->IsTextFrm() && static_cast<SwTextFrm*>(pFrm)->IsUndersized() ) - pFrm->Prepare( PREP_ADJUST_FRM ); + SwFrame* pFrame = GetLastLower(); + if( pFrame->IsTextFrame() && static_cast<SwTextFrame*>(pFrame)->IsUndersized() ) + pFrame->Prepare( PREP_ADJUST_FRM ); } } @@ -929,9 +929,9 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew, { rInvFlags |= 0x41; if( pSh && pSh->GetViewOptions()->getBrowseMode() ) - getRootFrm()->InvalidateBrowseWidth(); + getRootFrame()->InvalidateBrowseWidth(); SwRect aNew( GetObjRectWithSpaces() ); - SwRect aOld( maFrm ); + SwRect aOld( maFrame ); if (pNew) { if ( RES_UL_SPACE == nWhich ) @@ -948,7 +948,7 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew, } } aNew.Union( aOld ); - NotifyBackground( FindPageFrm(), aNew, PREP_CLEAR ); + NotifyBackground( FindPageFrame(), aNew, PREP_CLEAR ); } break; @@ -973,7 +973,7 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew, case RES_OPAQUE: { if ( pSh ) - pSh->InvalidateWindows( Frm() ); + pSh->InvalidateWindows( Frame() ); const IDocumentDrawModelAccess& rIDDMA = GetFormat()->getIDocumentDrawModelAccess(); const sal_uInt8 nId = static_cast<const SvxOpaqueItem*>(pNew)->GetValue() ? @@ -982,11 +982,11 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew, GetVirtDrawObj()->SetLayer( nId ); if( pSh ) { - SwRootFrm* pLayout = getRootFrm(); + SwRootFrame* pLayout = getRootFrame(); if( pLayout && pLayout->IsAnyShellAccessible() ) { - pSh->Imp()->DisposeAccessibleFrm( this ); - pSh->Imp()->AddAccessibleFrm( this ); + pSh->Imp()->DisposeAccessibleFrame( this ); + pSh->Imp()->AddAccessibleFrame( this ); } } // #i28701# - perform reorder of object lists @@ -997,17 +997,17 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew, case RES_URL: // The interface changes the frame size when interacting with text frames, - // the Map, however, needs to be relative to FrmSize(). - if ( (!Lower() || !Lower()->IsNoTextFrm()) && pNew && pOld && + // the Map, however, needs to be relative to FrameSize(). + if ( (!Lower() || !Lower()->IsNoTextFrame()) && pNew && pOld && static_cast<const SwFormatURL*>(pNew)->GetMap() && static_cast<const SwFormatURL*>(pOld)->GetMap() ) { - const SwFormatFrmSize &rSz = GetFormat()->GetFrmSize(); - if ( rSz.GetHeight() != Frm().Height() || - rSz.GetWidth() != Frm().Width() ) + const SwFormatFrameSize &rSz = GetFormat()->GetFrameSize(); + if ( rSz.GetHeight() != Frame().Height() || + rSz.GetWidth() != Frame().Width() ) { SwFormatURL aURL( GetFormat()->GetURL() ); - Fraction aScaleX( Frm().Width(), rSz.GetWidth() ); - Fraction aScaleY( Frm().Height(), rSz.GetHeight() ); + Fraction aScaleX( Frame().Width(), rSz.GetWidth() ); + Fraction aScaleY( Frame().Height(), rSz.GetHeight() ); aURL.GetMap()->Scale( aScaleX, aScaleY ); SwFrameFormat *pFormat = GetFormat(); pFormat->LockModify(); @@ -1024,38 +1024,38 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew, const SwFormatChain *pChain = static_cast<const SwFormatChain*>(pNew); if ( pChain->GetNext() ) { - SwFlyFrm *pFollow = FindChainNeighbour( *pChain->GetNext() ); + SwFlyFrame *pFollow = FindChainNeighbour( *pChain->GetNext() ); if ( GetNextLink() && pFollow != GetNextLink() ) - SwFlyFrm::UnchainFrames( this, GetNextLink()); + SwFlyFrame::UnchainFrames( this, GetNextLink()); if ( pFollow ) { if ( pFollow->GetPrevLink() && pFollow->GetPrevLink() != this ) - SwFlyFrm::UnchainFrames( pFollow->GetPrevLink(), + SwFlyFrame::UnchainFrames( pFollow->GetPrevLink(), pFollow ); if ( !GetNextLink() ) - SwFlyFrm::ChainFrames( this, pFollow ); + SwFlyFrame::ChainFrames( this, pFollow ); } } else if ( GetNextLink() ) - SwFlyFrm::UnchainFrames( this, GetNextLink() ); + SwFlyFrame::UnchainFrames( this, GetNextLink() ); if ( pChain->GetPrev() ) { - SwFlyFrm *pMaster = FindChainNeighbour( *pChain->GetPrev() ); + SwFlyFrame *pMaster = FindChainNeighbour( *pChain->GetPrev() ); if ( GetPrevLink() && pMaster != GetPrevLink() ) - SwFlyFrm::UnchainFrames( GetPrevLink(), this ); + SwFlyFrame::UnchainFrames( GetPrevLink(), this ); if ( pMaster ) { if ( pMaster->GetNextLink() && pMaster->GetNextLink() != this ) - SwFlyFrm::UnchainFrames( pMaster, + SwFlyFrame::UnchainFrames( pMaster, pMaster->GetNextLink() ); if ( !GetPrevLink() ) - SwFlyFrm::ChainFrames( pMaster, this ); + SwFlyFrame::ChainFrames( pMaster, this ); } } else if ( GetPrevLink() ) - SwFlyFrm::UnchainFrames( GetPrevLink(), this ); + SwFlyFrame::UnchainFrames( GetPrevLink(), this ); } //fall-through default: @@ -1071,44 +1071,44 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew, pNewSet->ClearItem( nWhich ); } else - SwLayoutFrm::Modify( pOld, pNew ); + SwLayoutFrame::Modify( pOld, pNew ); } } /// Gets information from the Modify -bool SwFlyFrm::GetInfo( SfxPoolItem & rInfo ) const +bool SwFlyFrame::GetInfo( SfxPoolItem & rInfo ) const { if( RES_AUTOFMT_DOCNODE == rInfo.Which() ) - return false; // There's a FlyFrm, so use it + return false; // There's a FlyFrame, so use it return true; // Continue searching } -void SwFlyFrm::_Invalidate( SwPageFrm *pPage ) +void SwFlyFrame::_Invalidate( SwPageFrame *pPage ) { InvalidatePage( pPage ); m_bNotifyBack = m_bInvalid = true; - SwFlyFrm *pFrm; - if ( GetAnchorFrm() && nullptr != (pFrm = AnchorFrm()->FindFlyFrm()) ) + SwFlyFrame *pFrame; + if ( GetAnchorFrame() && nullptr != (pFrame = AnchorFrame()->FindFlyFrame()) ) { // Very bad case: If the Fly is bound within another Fly which // contains columns, the Format should be from that one. - if ( !pFrm->IsLocked() && !pFrm->IsColLocked() && - pFrm->Lower() && pFrm->Lower()->IsColumnFrm() ) - pFrm->InvalidateSize(); + if ( !pFrame->IsLocked() && !pFrame->IsColLocked() && + pFrame->Lower() && pFrame->Lower()->IsColumnFrame() ) + pFrame->InvalidateSize(); } // #i85216# // if vertical position is oriented at a layout frame inside a ghost section, // assure that the position is invalidated and that the information about // the vertical position oriented frame is cleared - if ( GetVertPosOrientFrm() && GetVertPosOrientFrm()->IsLayoutFrm() ) + if ( GetVertPosOrientFrame() && GetVertPosOrientFrame()->IsLayoutFrame() ) { - const SwSectionFrm* pSectFrm( GetVertPosOrientFrm()->FindSctFrm() ); - if ( pSectFrm && pSectFrm->GetSection() == nullptr ) + const SwSectionFrame* pSectFrame( GetVertPosOrientFrame()->FindSctFrame() ); + if ( pSectFrame && pSectFrame->GetSection() == nullptr ) { InvalidatePos(); - ClearVertPosOrientFrm(); + ClearVertPosOrientFrame(); } } } @@ -1117,12 +1117,12 @@ void SwFlyFrm::_Invalidate( SwPageFrm *pPage ) * * The position will be Fix automatically and the attribute is changed accordingly. */ -void SwFlyFrm::ChgRelPos( const Point &rNewPos ) +void SwFlyFrame::ChgRelPos( const Point &rNewPos ) { if ( GetCurrRelPos() != rNewPos ) { SwFrameFormat *pFormat = GetFormat(); - const bool bVert = GetAnchorFrm()->IsVertical(); + const bool bVert = GetAnchorFrame()->IsVertical(); const SwTwips nNewY = bVert ? rNewPos.X() : rNewPos.Y(); SwTwips nTmpY = nNewY == LONG_MAX ? 0 : nNewY; if( bVert ) @@ -1131,7 +1131,7 @@ void SwFlyFrm::ChgRelPos( const Point &rNewPos ) RES_VERT_ORIENT, RES_HORI_ORIENT); SwFormatVertOrient aVert( pFormat->GetVertOrient() ); - const SwTextFrm *pAutoFrm = nullptr; + const SwTextFrame *pAutoFrame = nullptr; // #i34948# - handle also at-page and at-fly anchored // Writer fly frames const RndStdIds eAnchorType = GetFrameFormat().GetAnchor().GetAnchorId(); @@ -1145,7 +1145,7 @@ void SwFlyFrm::ChgRelPos( const Point &rNewPos ) aVert.SetVertOrient( text::VertOrientation::NONE ); aVert.SetRelationOrient( text::RelOrientation::FRAME ); } - else if ( IsFlyAtCntFrm() || text::VertOrientation::NONE != aVert.GetVertOrient() ) + else if ( IsFlyAtContentFrame() || text::VertOrientation::NONE != aVert.GetVertOrient() ) { if( text::RelOrientation::CHAR == aVert.GetRelationOrient() && IsAutoPos() ) { @@ -1154,17 +1154,17 @@ void SwFlyFrm::ChgRelPos( const Point &rNewPos ) aVert.SetVertOrient( text::VertOrientation::NONE ); sal_Int32 nOfs = pFormat->GetAnchor().GetContentAnchor()->nContent.GetIndex(); - OSL_ENSURE( GetAnchorFrm()->IsTextFrm(), "TextFrm expected" ); - pAutoFrm = static_cast<const SwTextFrm*>(GetAnchorFrm()); - while( pAutoFrm->GetFollow() && - pAutoFrm->GetFollow()->GetOfst() <= nOfs ) + OSL_ENSURE( GetAnchorFrame()->IsTextFrame(), "TextFrame expected" ); + pAutoFrame = static_cast<const SwTextFrame*>(GetAnchorFrame()); + while( pAutoFrame->GetFollow() && + pAutoFrame->GetFollow()->GetOfst() <= nOfs ) { - if( pAutoFrm == GetAnchorFrm() ) - nTmpY += pAutoFrm->GetRelPos().Y(); - nTmpY -= pAutoFrm->GetUpper()->Prt().Height(); - pAutoFrm = pAutoFrm->GetFollow(); + if( pAutoFrame == GetAnchorFrame() ) + nTmpY += pAutoFrame->GetRelPos().Y(); + nTmpY -= pAutoFrame->GetUpper()->Prt().Height(); + pAutoFrame = pAutoFrame->GetFollow(); } - nTmpY = static_cast<SwFlyAtCntFrm*>(this)->GetRelCharY(pAutoFrm)-nTmpY; + nTmpY = static_cast<SwFlyAtContentFrame*>(this)->GetRelCharY(pAutoFrame)-nTmpY; } else aVert.SetVertOrient( text::VertOrientation::CHAR_BOTTOM ); @@ -1180,7 +1180,7 @@ void SwFlyFrm::ChgRelPos( const Point &rNewPos ) // For Flys in the Cnt, the horizontal orientation is of no interest, // as it's always 0 - if ( !IsFlyInCntFrm() ) + if ( !IsFlyInContentFrame() ) { const SwTwips nNewX = bVert ? rNewPos.Y() : rNewPos.X(); SwTwips nTmpX = nNewX == LONG_MAX ? 0 : nNewX; @@ -1199,24 +1199,24 @@ void SwFlyFrm::ChgRelPos( const Point &rNewPos ) aHori.SetRelationOrient( text::RelOrientation::FRAME ); aHori.SetPosToggle( false ); } - else if ( IsFlyAtCntFrm() || text::HoriOrientation::NONE != aHori.GetHoriOrient() ) + else if ( IsFlyAtContentFrame() || text::HoriOrientation::NONE != aHori.GetHoriOrient() ) { aHori.SetHoriOrient( text::HoriOrientation::NONE ); if( text::RelOrientation::CHAR == aHori.GetRelationOrient() && IsAutoPos() ) { if( LONG_MAX != nNewX ) { - if( !pAutoFrm ) + if( !pAutoFrame ) { sal_Int32 nOfs = pFormat->GetAnchor().GetContentAnchor() ->nContent.GetIndex(); - OSL_ENSURE( GetAnchorFrm()->IsTextFrm(), "TextFrm expected"); - pAutoFrm = static_cast<const SwTextFrm*>(GetAnchorFrm()); - while( pAutoFrm->GetFollow() && - pAutoFrm->GetFollow()->GetOfst() <= nOfs ) - pAutoFrm = pAutoFrm->GetFollow(); + OSL_ENSURE( GetAnchorFrame()->IsTextFrame(), "TextFrame expected"); + pAutoFrame = static_cast<const SwTextFrame*>(GetAnchorFrame()); + while( pAutoFrame->GetFollow() && + pAutoFrame->GetFollow()->GetOfst() <= nOfs ) + pAutoFrame = pAutoFrame->GetFollow(); } - nTmpX -= static_cast<SwFlyAtCntFrm*>(this)->GetRelCharX(pAutoFrm); + nTmpX -= static_cast<SwFlyAtContentFrame*>(this)->GetRelCharX(pAutoFrame); } } else @@ -1231,40 +1231,40 @@ void SwFlyFrm::ChgRelPos( const Point &rNewPos ) } } -/** "Formats" the Frame; Frm and PrtArea. +/** "Formats" the Frame; Frame and PrtArea. * * The FixSize is not inserted here. */ -void SwFlyFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttrs *pAttrs ) +void SwFlyFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttrs *pAttrs ) { - OSL_ENSURE( pAttrs, "FlyFrm::Format, pAttrs is 0." ); + OSL_ENSURE( pAttrs, "FlyFrame::Format, pAttrs is 0." ); ColLock(); if ( !mbValidSize ) { - if ( Frm().Top() == FAR_AWAY && Frm().Left() == FAR_AWAY ) + if ( Frame().Top() == FAR_AWAY && Frame().Left() == FAR_AWAY ) { - // Remove safety switch (see SwFrm::CTor) - Frm().Pos().setX(0); - Frm().Pos().setY(0); + // Remove safety switch (see SwFrame::CTor) + Frame().Pos().setX(0); + Frame().Pos().setY(0); // #i68520# InvalidateObjRectWithSpaces(); } // Check column width and set it if needed - if ( Lower() && Lower()->IsColumnFrm() ) + if ( Lower() && Lower()->IsColumnFrame() ) AdjustColumns( nullptr, false ); mbValidSize = true; const SwTwips nUL = pAttrs->CalcTopLine() + pAttrs->CalcBottomLine(); const SwTwips nLR = pAttrs->CalcLeftLine() + pAttrs->CalcRightLine(); - const SwFormatFrmSize &rFrmSz = GetFormat()->GetFrmSize(); - Size aRelSize( CalcRel( rFrmSz ) ); + const SwFormatFrameSize &rFrameSz = GetFormat()->GetFrameSize(); + Size aRelSize( CalcRel( rFrameSz ) ); - OSL_ENSURE( pAttrs->GetSize().Height() != 0 || rFrmSz.GetHeightPercent(), "FrameAttr height is 0." ); - OSL_ENSURE( pAttrs->GetSize().Width() != 0 || rFrmSz.GetWidthPercent(), "FrameAttr width is 0." ); + OSL_ENSURE( pAttrs->GetSize().Height() != 0 || rFrameSz.GetHeightPercent(), "FrameAttr height is 0." ); + OSL_ENSURE( pAttrs->GetSize().Width() != 0 || rFrameSz.GetWidthPercent(), "FrameAttr width is 0." ); SWRECTFN( this ) if( !HasFixSize() ) @@ -1287,8 +1287,8 @@ void SwFlyFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAtt nRemaining = MINFLY; (Prt().*fnRect->fnSetHeight)( nRemaining ); - nRemaining -= (Frm().*fnRect->fnGetHeight)(); - (Frm().*fnRect->fnAddBottom)( nRemaining + nUL ); + nRemaining -= (Frame().*fnRect->fnGetHeight)(); + (Frame().*fnRect->fnAddBottom)( nRemaining + nUL ); // #i68520# if ( nRemaining + nUL != 0 ) { @@ -1304,7 +1304,7 @@ void SwFlyFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAtt if (SdrObjCustomShape* pCustomShape = dynamic_cast<SdrObjCustomShape*>( pShape) ) { // The shape is a customshape: then inform it about the calculated fly size. - Size aSize((Frm().*fnRect->fnGetWidth)(), (Frm().*fnRect->fnGetHeight)()); + Size aSize((Frame().*fnRect->fnGetWidth)(), (Frame().*fnRect->fnGetHeight)()); pCustomShape->SuggestTextFrameSize(aSize); // Do the calculations normally done after touching editeng text of the shape. pCustomShape->NbcSetOutlinerParaObjectForText(nullptr, nullptr); @@ -1313,15 +1313,15 @@ void SwFlyFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAtt } else { - mbValidSize = true; // Fixed Frms do not Format itself + mbValidSize = true; // Fixed Frames do not Format itself // Flys set their size using the attr SwTwips nNewSize = bVert ? aRelSize.Width() : aRelSize.Height(); nNewSize -= nUL; if( nNewSize < MINFLY ) nNewSize = MINFLY; (Prt().*fnRect->fnSetHeight)( nNewSize ); - nNewSize += nUL - (Frm().*fnRect->fnGetHeight)(); - (Frm().*fnRect->fnAddBottom)( nNewSize ); + nNewSize += nUL - (Frame().*fnRect->fnGetHeight)(); + (Frame().*fnRect->fnAddBottom)( nNewSize ); // #i68520# if ( nNewSize != 0 ) { @@ -1331,16 +1331,16 @@ void SwFlyFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAtt if ( !m_bFormatHeightOnly ) { - OSL_ENSURE( aRelSize == CalcRel( rFrmSz ), "SwFlyFrm::Format CalcRel problem" ); + OSL_ENSURE( aRelSize == CalcRel( rFrameSz ), "SwFlyFrame::Format CalcRel problem" ); SwTwips nNewSize = bVert ? aRelSize.Height() : aRelSize.Width(); - if ( rFrmSz.GetWidthSizeType() != ATT_FIX_SIZE ) + if ( rFrameSz.GetWidthSizeType() != ATT_FIX_SIZE ) { // #i9046# Autowidth for fly frames const SwTwips nAutoWidth = CalcAutoWidth(); if ( nAutoWidth ) { - if( ATT_MIN_SIZE == rFrmSz.GetWidthSizeType() ) + if( ATT_MIN_SIZE == rFrameSz.GetWidthSizeType() ) nNewSize = std::max( nNewSize - nLR, nAutoWidth ); else nNewSize = nAutoWidth; @@ -1352,8 +1352,8 @@ void SwFlyFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAtt if( nNewSize < MINFLY ) nNewSize = MINFLY; (Prt().*fnRect->fnSetWidth)( nNewSize ); - nNewSize += nLR - (Frm().*fnRect->fnGetWidth)(); - (Frm().*fnRect->fnAddRight)( nNewSize ); + nNewSize += nLR - (Frame().*fnRect->fnGetWidth)(); + (Frame().*fnRect->fnAddRight)( nNewSize ); // #i68520# if ( nNewSize != 0 ) { @@ -1371,19 +1371,19 @@ void SwFlyFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAtt // OD 11.04.2003 #108824# - new parameter <bNoCalcFollow> was used by method // <FormatWidthCols(..)> to avoid follow formatting // for text frames. But, unformatted follows causes -// problems in method <SwContentFrm::_WouldFit(..)>, +// problems in method <SwContentFrame::_WouldFit(..)>, // which assumes that the follows are formatted. // Thus, <bNoCalcFollow> no longer used by <FormatWidthCols(..)>. -void CalcContent( SwLayoutFrm *pLay, +void CalcContent( SwLayoutFrame *pLay, bool bNoColl, bool bNoCalcFollow ) { - vcl::RenderContext* pRenderContext = pLay->getRootFrm()->GetCurrShell()->GetOut(); - SwSectionFrm* pSect; + vcl::RenderContext* pRenderContext = pLay->getRootFrame()->GetCurrShell()->GetOut(); + SwSectionFrame* pSect; bool bCollect = false; - if( pLay->IsSctFrm() ) + if( pLay->IsSctFrame() ) { - pSect = static_cast<SwSectionFrm*>(pLay); + pSect = static_cast<SwSectionFrame*>(pLay); if( pSect->IsEndnAtEnd() && !bNoColl ) { bCollect = true; @@ -1393,14 +1393,14 @@ void CalcContent( SwLayoutFrm *pLay, } else pSect = nullptr; - SwFrm *pFrm = pLay->ContainsAny(); - if ( !pFrm ) + SwFrame *pFrame = pLay->ContainsAny(); + if ( !pFrame ) { if( pSect ) { if( pSect->HasFollow() ) - pFrm = pSect->GetFollow()->ContainsAny(); - if( !pFrm ) + pFrame = pSect->GetFollow()->ContainsAny(); + if( !pFrame ) { if( pSect->IsEndnAtEnd() ) { @@ -1415,12 +1415,12 @@ void CalcContent( SwLayoutFrm *pLay, } return; } - pFrm->_InvalidatePos(); + pFrame->_InvalidatePos(); } else return; } - pFrm->InvalidatePage(); + pFrame->InvalidatePage(); do { @@ -1431,46 +1431,46 @@ void CalcContent( SwLayoutFrm *pLay, // FME 2007-08-30 #i81146# new loop control int nLoopControlRuns = 0; const int nLoopControlMax = 20; - const SwFrm* pLoopControlCond = nullptr; + const SwFrame* pLoopControlCond = nullptr; - SwFrm* pLast; + SwFrame* pLast; do { - pLast = pFrm; - if( pFrm->IsVertical() ? - ( pFrm->GetUpper()->Prt().Height() != pFrm->Frm().Height() ) - : ( pFrm->GetUpper()->Prt().Width() != pFrm->Frm().Width() ) ) + pLast = pFrame; + if( pFrame->IsVertical() ? + ( pFrame->GetUpper()->Prt().Height() != pFrame->Frame().Height() ) + : ( pFrame->GetUpper()->Prt().Width() != pFrame->Frame().Width() ) ) { - pFrm->Prepare( PREP_FIXSIZE_CHG ); - pFrm->_InvalidateSize(); + pFrame->Prepare( PREP_FIXSIZE_CHG ); + pFrame->_InvalidateSize(); } - if ( pFrm->IsTabFrm() ) + if ( pFrame->IsTabFrame() ) { - static_cast<SwTabFrm*>(pFrm)->m_bCalcLowers = true; + static_cast<SwTabFrame*>(pFrame)->m_bCalcLowers = true; // OD 26.08.2003 #i18103# - lock move backward of follow table, // if no section content is formatted or follow table belongs // to the section, which content is formatted. - if ( static_cast<SwTabFrm*>(pFrm)->IsFollow() && - ( !pSect || pSect == pFrm->FindSctFrm() ) ) + if ( static_cast<SwTabFrame*>(pFrame)->IsFollow() && + ( !pSect || pSect == pFrame->FindSctFrame() ) ) { - static_cast<SwTabFrm*>(pFrm)->m_bLockBackMove = true; + static_cast<SwTabFrame*>(pFrame)->m_bLockBackMove = true; } } // OD 14.03.2003 #i11760# - forbid format of follow, if requested. - if ( bNoCalcFollow && pFrm->IsTextFrm() ) - static_cast<SwTextFrm*>(pFrm)->ForbidFollowFormat(); + if ( bNoCalcFollow && pFrame->IsTextFrame() ) + static_cast<SwTextFrame*>(pFrame)->ForbidFollowFormat(); { - SwFrmDeleteGuard aDeleteGuard(pSect); - pFrm->Calc(pRenderContext); + SwFrameDeleteGuard aDeleteGuard(pSect); + pFrame->Calc(pRenderContext); } // OD 14.03.2003 #i11760# - reset control flag for follow format. - if ( pFrm->IsTextFrm() ) + if ( pFrame->IsTextFrame() ) { - static_cast<SwTextFrm*>(pFrm)->AllowFollowFormat(); + static_cast<SwTextFrame*>(pFrame)->AllowFollowFormat(); } // #111937# The keep-attribute can cause the position @@ -1481,31 +1481,31 @@ void CalcContent( SwLayoutFrm *pLay, // frame due to its keep-attribute, if it can't move forward. // #i57765# - do not consider invalid previous // frame, if current frame has a column/page break before attribute. - SwFrm* pTmpPrev = pFrm->FindPrev(); - SwFlowFrm* pTmpPrevFlowFrm = pTmpPrev && pTmpPrev->IsFlowFrm() ? SwFlowFrm::CastFlowFrm(pTmpPrev) : nullptr; - SwFlowFrm* pTmpFlowFrm = pFrm->IsFlowFrm() ? SwFlowFrm::CastFlowFrm(pFrm) : nullptr; + SwFrame* pTmpPrev = pFrame->FindPrev(); + SwFlowFrame* pTmpPrevFlowFrame = pTmpPrev && pTmpPrev->IsFlowFrame() ? SwFlowFrame::CastFlowFrame(pTmpPrev) : nullptr; + SwFlowFrame* pTmpFlowFrame = pFrame->IsFlowFrame() ? SwFlowFrame::CastFlowFrame(pFrame) : nullptr; - bool bPrevInvalid = pTmpPrevFlowFrm && pTmpFlowFrm && - !pTmpFlowFrm->IsFollow() && + bool bPrevInvalid = pTmpPrevFlowFrame && pTmpFlowFrame && + !pTmpFlowFrame->IsFollow() && !StackHack::IsLocked() && // #i76382# - !pTmpFlowFrm->IsJoinLocked() && + !pTmpFlowFrame->IsJoinLocked() && !pTmpPrev->GetValidPosFlag() && pLay->IsAnLower( pTmpPrev ) && - pTmpPrevFlowFrm->IsKeep( *pTmpPrev->GetAttrSet() ) && - pTmpPrevFlowFrm->IsKeepFwdMoveAllowed(); + pTmpPrevFlowFrame->IsKeep( *pTmpPrev->GetAttrSet() ) && + pTmpPrevFlowFrame->IsKeepFwdMoveAllowed(); // format floating screen objects anchored to the frame. - if ( !bPrevInvalid && pFrm->GetDrawObjs() && pLay->IsAnLower( pFrm ) ) + if ( !bPrevInvalid && pFrame->GetDrawObjs() && pLay->IsAnLower( pFrame ) ) { bool bAgain = false; bool bRestartLayoutProcess = false; - SwPageFrm* pPageFrm = pFrm->FindPageFrm(); - size_t nCnt = pFrm->GetDrawObjs()->size(); + SwPageFrame* pPageFrame = pFrame->FindPageFrame(); + size_t nCnt = pFrame->GetDrawObjs()->size(); size_t i = 0; while ( i < nCnt ) { // #i28701# - SwAnchoredObject* pAnchoredObj = (*pFrm->GetDrawObjs())[i]; + SwAnchoredObject* pAnchoredObj = (*pFrame->GetDrawObjs())[i]; // determine if anchored object has to be // formatted and, in case, format it @@ -1516,7 +1516,7 @@ void CalcContent( SwLayoutFrm *pLay, // anchored objects. //pAnchoredObj->InvalidateObjPos(); SwRect aRect( pAnchoredObj->GetObjRect() ); - if ( !SwObjectFormatter::FormatObj( *pAnchoredObj, pFrm, pPageFrm ) ) + if ( !SwObjectFormatter::FormatObj( *pAnchoredObj, pFrame, pPageFrame ) ) { bRestartLayoutProcess = true; break; @@ -1566,9 +1566,9 @@ void CalcContent( SwLayoutFrm *pLay, } } - if ( !pFrm->GetDrawObjs() ) + if ( !pFrame->GetDrawObjs() ) break; - if ( pFrm->GetDrawObjs()->size() < nCnt ) + if ( pFrame->GetDrawObjs()->size() < nCnt ) { --nCnt; // Do not increment index, in this case @@ -1582,7 +1582,7 @@ void CalcContent( SwLayoutFrm *pLay, // requested by floating screen object formatting if ( bRestartLayoutProcess ) { - pFrm = pLay->ContainsAny(); + pFrame = pLay->ContainsAny(); pAgainObj1 = nullptr; pAgainObj2 = nullptr; continue; @@ -1592,27 +1592,27 @@ void CalcContent( SwLayoutFrm *pLay, // are formatted, if the wrapping style influence has to be considered. if ( pLay->GetFormat()->getIDocumentSettingAccess().get(DocumentSettingId::CONSIDER_WRAP_ON_OBJECT_POSITION) ) { - pFrm->Calc(pRenderContext); + pFrame->Calc(pRenderContext); } if ( bAgain ) { - pFrm = pLay->ContainsContent(); - if ( pFrm && pFrm->IsInTab() ) - pFrm = pFrm->FindTabFrm(); - if( pFrm && pFrm->IsInSct() ) + pFrame = pLay->ContainsContent(); + if ( pFrame && pFrame->IsInTab() ) + pFrame = pFrame->FindTabFrame(); + if( pFrame && pFrame->IsInSct() ) { - SwSectionFrm* pTmp = pFrm->FindSctFrm(); + SwSectionFrame* pTmp = pFrame->FindSctFrame(); if( pTmp != pLay && pLay->IsAnLower( pTmp ) ) - pFrm = pTmp; + pFrame = pTmp; } - if ( pFrm == pLoopControlCond ) + if ( pFrame == pLoopControlCond ) ++nLoopControlRuns; else { nLoopControlRuns = 0; - pLoopControlCond = pFrm; + pLoopControlCond = pFrame; } if ( nLoopControlRuns < nLoopControlMax ) @@ -1621,43 +1621,43 @@ void CalcContent( SwLayoutFrm *pLay, OSL_FAIL( "LoopControl in CalcContent" ); } } - if ( pFrm->IsTabFrm() ) + if ( pFrame->IsTabFrame() ) { - if ( static_cast<SwTabFrm*>(pFrm)->IsFollow() ) - static_cast<SwTabFrm*>(pFrm)->m_bLockBackMove = false; + if ( static_cast<SwTabFrame*>(pFrame)->IsFollow() ) + static_cast<SwTabFrame*>(pFrame)->m_bLockBackMove = false; } - pFrm = bPrevInvalid ? pTmpPrev : pFrm->FindNext(); - if( !bPrevInvalid && pFrm && pFrm->IsSctFrm() && pSect ) + pFrame = bPrevInvalid ? pTmpPrev : pFrame->FindNext(); + if( !bPrevInvalid && pFrame && pFrame->IsSctFrame() && pSect ) { - // Empty SectionFrms could be present here - while( pFrm && pFrm->IsSctFrm() && !static_cast<SwSectionFrm*>(pFrm)->GetSection() ) - pFrm = pFrm->FindNext(); + // Empty SectionFrames could be present here + while( pFrame && pFrame->IsSctFrame() && !static_cast<SwSectionFrame*>(pFrame)->GetSection() ) + pFrame = pFrame->FindNext(); // If FindNext returns the Follow of the original Area, we want to // continue with this content as long as it flows back. - if( pFrm && pFrm->IsSctFrm() && ( pFrm == pSect->GetFollow() || - static_cast<SwSectionFrm*>(pFrm)->IsAnFollow( pSect ) ) ) + if( pFrame && pFrame->IsSctFrame() && ( pFrame == pSect->GetFollow() || + static_cast<SwSectionFrame*>(pFrame)->IsAnFollow( pSect ) ) ) { - pFrm = static_cast<SwSectionFrm*>(pFrm)->ContainsAny(); - if( pFrm ) - pFrm->_InvalidatePos(); + pFrame = static_cast<SwSectionFrame*>(pFrame)->ContainsAny(); + if( pFrame ) + pFrame->_InvalidatePos(); } } // Stay in the pLay - // Except for SectionFrms with Follow: the first ContentFrm of the Follow + // Except for SectionFrames with Follow: the first ContentFrame of the Follow // will be formatted, so that it get's a chance to load in the pLay. // As long as these Frames are loading in pLay, we continue - } while ( pFrm && - ( pLay->IsAnLower( pFrm ) || + } while ( pFrame && + ( pLay->IsAnLower( pFrame ) || ( pSect && ( ( pSect->HasFollow() && ( pLay->IsAnLower( pLast ) || ( pLast->IsInSct() && - pLast->FindSctFrm()->IsAnFollow(pSect) ) ) && - pSect->GetFollow()->IsAnLower( pFrm ) ) || - ( pFrm->IsInSct() && - pFrm->FindSctFrm()->IsAnFollow( pSect ) ) ) ) ) ); + pLast->FindSctFrame()->IsAnFollow(pSect) ) ) && + pSect->GetFollow()->IsAnLower( pFrame ) ) || + ( pFrame->IsInSct() && + pFrame->FindSctFrame()->IsAnFollow( pSect ) ) ) ) ) ); if( pSect ) { if( bCollect ) @@ -1667,7 +1667,7 @@ void CalcContent( SwLayoutFrm *pLay, } if( pSect->HasFollow() ) { - SwSectionFrm* pNxt = pSect->GetFollow(); + SwSectionFrame* pNxt = pSect->GetFollow(); while( pNxt && !pNxt->ContainsContent() ) pNxt = pNxt->GetFollow(); if( pNxt ) @@ -1675,9 +1675,9 @@ void CalcContent( SwLayoutFrm *pLay, } if( bCollect ) { - pFrm = pLay->ContainsAny(); + pFrame = pLay->ContainsAny(); bCollect = false; - if( pFrm ) + if( pFrame ) continue; } } @@ -1687,15 +1687,15 @@ void CalcContent( SwLayoutFrm *pLay, } // OD 2004-03-23 #i26791# -void SwFlyFrm::MakeObjPos() +void SwFlyFrame::MakeObjPos() { if ( !mbValidPos ) { - vcl::RenderContext* pRenderContext = getRootFrm()->GetCurrShell()->GetOut(); + vcl::RenderContext* pRenderContext = getRootFrame()->GetCurrShell()->GetOut(); mbValidPos = true; // OD 29.10.2003 #113049# - use new class to position object - GetAnchorFrm()->Calc(pRenderContext); + GetAnchorFrame()->Calc(pRenderContext); objectpositioning::SwToLayoutAnchoredObjectPosition aObjPositioning( *GetVirtDrawObj() ); aObjPositioning.CalcPosition(); @@ -1704,15 +1704,15 @@ void SwFlyFrm::MakeObjPos() // update relative position SetCurrRelPos( aObjPositioning.GetRelPos() ); - SWRECTFN( GetAnchorFrm() ); - maFrm.Pos( aObjPositioning.GetRelPos() ); - maFrm.Pos() += (GetAnchorFrm()->Frm().*fnRect->fnGetPos)(); + SWRECTFN( GetAnchorFrame() ); + maFrame.Pos( aObjPositioning.GetRelPos() ); + maFrame.Pos() += (GetAnchorFrame()->Frame().*fnRect->fnGetPos)(); // #i69335# InvalidateObjRectWithSpaces(); } } -void SwFlyFrm::MakePrtArea( const SwBorderAttrs &rAttrs ) +void SwFlyFrame::MakePrtArea( const SwBorderAttrs &rAttrs ) { if ( !mbValidPrtArea ) { @@ -1727,14 +1727,14 @@ void SwFlyFrm::MakePrtArea( const SwBorderAttrs &rAttrs ) } } -void SwFlyFrm::MakeContentPos( const SwBorderAttrs &rAttrs ) +void SwFlyFrame::MakeContentPos( const SwBorderAttrs &rAttrs ) { if ( !m_bValidContentPos ) { m_bValidContentPos = true; const SwTwips nUL = rAttrs.CalcTopLine() + rAttrs.CalcBottomLine(); - Size aRelSize( CalcRel( GetFormat()->GetFrmSize() ) ); + Size aRelSize( CalcRel( GetFormat()->GetFrameSize() ) ); SWRECTFN( this ) long nMinHeight = 0; @@ -1778,33 +1778,33 @@ void SwFlyFrm::MakeContentPos( const SwBorderAttrs &rAttrs ) if( aNewContentPos != ContentPos() ) { ContentPos() = aNewContentPos; - for( SwFrm *pFrm = Lower(); pFrm; pFrm = pFrm->GetNext()) + for( SwFrame *pFrame = Lower(); pFrame; pFrame = pFrame->GetNext()) { - pFrm->InvalidatePos(); + pFrame->InvalidatePos(); } } } } -void SwFlyFrm::InvalidateContentPos() +void SwFlyFrame::InvalidateContentPos() { m_bValidContentPos = false; _Invalidate(); } -SwTwips SwFlyFrm::_Grow( SwTwips nDist, bool bTst ) +SwTwips SwFlyFrame::_Grow( SwTwips nDist, bool bTst ) { SWRECTFN( this ) if ( Lower() && !IsColLocked() && !HasFixSize() ) { - SwTwips nSize = (Frm().*fnRect->fnGetHeight)(); + SwTwips nSize = (Frame().*fnRect->fnGetHeight)(); if( nSize > 0 && nDist > ( LONG_MAX - nSize ) ) nDist = LONG_MAX - nSize; if ( nDist <= 0L ) return 0L; - if ( Lower()->IsColumnFrm() ) + if ( Lower()->IsColumnFrame() ) { // If it's a Column Frame, the Format takes control of the // resizing (due to the adjustment). if ( !bTst ) @@ -1823,7 +1823,7 @@ SwTwips SwFlyFrm::_Grow( SwTwips nDist, bool bTst ) _InvalidateSize(); const bool bOldLock = m_bLocked; Unlock(); - if ( IsFlyFreeFrm() ) + if ( IsFlyFreeFrame() ) { // #i37068# - no format of position here // and prevent move in method <CheckClip(..)>. @@ -1834,32 +1834,32 @@ SwTwips SwFlyFrm::_Grow( SwTwips nDist, bool bTst ) mbValidPos = true; // #i55416# // Suppress format of width for autowidth frame, because the - // format of the width would call <SwTextFrm::CalcFitToContent()> + // format of the width would call <SwTextFrame::CalcFitToContent()> // for the lower frame, which initiated this grow. const bool bOldFormatHeightOnly = m_bFormatHeightOnly; - const SwFormatFrmSize& rFrmSz = GetFormat()->GetFrmSize(); - if ( rFrmSz.GetWidthSizeType() != ATT_FIX_SIZE ) + const SwFormatFrameSize& rFrameSz = GetFormat()->GetFrameSize(); + if ( rFrameSz.GetWidthSizeType() != ATT_FIX_SIZE ) { m_bFormatHeightOnly = true; } - static_cast<SwFlyFreeFrm*>(this)->SetNoMoveOnCheckClip( true ); - static_cast<SwFlyFreeFrm*>(this)->SwFlyFreeFrm::MakeAll(getRootFrm()->GetCurrShell()->GetOut()); - static_cast<SwFlyFreeFrm*>(this)->SetNoMoveOnCheckClip( false ); + static_cast<SwFlyFreeFrame*>(this)->SetNoMoveOnCheckClip( true ); + static_cast<SwFlyFreeFrame*>(this)->SwFlyFreeFrame::MakeAll(getRootFrame()->GetCurrShell()->GetOut()); + static_cast<SwFlyFreeFrame*>(this)->SetNoMoveOnCheckClip( false ); // #i55416# - if ( rFrmSz.GetWidthSizeType() != ATT_FIX_SIZE ) + if ( rFrameSz.GetWidthSizeType() != ATT_FIX_SIZE ) { m_bFormatHeightOnly = bOldFormatHeightOnly; } } else - MakeAll(getRootFrm()->GetCurrShell()->GetOut()); + MakeAll(getRootFrame()->GetCurrShell()->GetOut()); _InvalidateSize(); InvalidatePos(); if ( bOldLock ) Lock(); const SwRect aNew( GetObjRectWithSpaces() ); if ( aOld != aNew ) - ::Notify( this, FindPageFrm(), aOld ); + ::Notify( this, FindPageFrame(), aOld ); return (aNew.*fnRect->fnGetHeight)()-(aOld.*fnRect->fnGetHeight)(); } return nDist; @@ -1867,19 +1867,19 @@ SwTwips SwFlyFrm::_Grow( SwTwips nDist, bool bTst ) return 0L; } -SwTwips SwFlyFrm::_Shrink( SwTwips nDist, bool bTst ) +SwTwips SwFlyFrame::_Shrink( SwTwips nDist, bool bTst ) { if( Lower() && !IsColLocked() && !HasFixSize() && !IsNoShrink() ) { SWRECTFN( this ) - SwTwips nHeight = (Frm().*fnRect->fnGetHeight)(); + SwTwips nHeight = (Frame().*fnRect->fnGetHeight)(); if ( nDist > nHeight ) nDist = nHeight; SwTwips nVal = nDist; if ( IsMinHeight() ) { - const SwFormatFrmSize& rFormatSize = GetFormat()->GetFrmSize(); + const SwFormatFrameSize& rFormatSize = GetFormat()->GetFrameSize(); SwTwips nFormatHeight = bVert ? rFormatSize.GetWidth() : rFormatSize.GetHeight(); nVal = std::min( nDist, nHeight - nFormatHeight ); @@ -1888,13 +1888,13 @@ SwTwips SwFlyFrm::_Shrink( SwTwips nDist, bool bTst ) if ( nVal <= 0L ) return 0L; - if ( Lower()->IsColumnFrm() ) + if ( Lower()->IsColumnFrame() ) { // If it's a Column Frame, the Format takes control of the // resizing (due to the adjustment). if ( !bTst ) { SwRect aOld( GetObjRectWithSpaces() ); - (Frm().*fnRect->fnSetHeight)( nHeight - nVal ); + (Frame().*fnRect->fnSetHeight)( nHeight - nVal ); // #i68520# if ( nHeight - nVal != 0 ) { @@ -1904,10 +1904,10 @@ SwTwips SwFlyFrm::_Shrink( SwTwips nDist, bool bTst ) (Prt().*fnRect->fnSetHeight)( nHeight - nVal ); _InvalidatePos(); InvalidateSize(); - ::Notify( this, FindPageFrm(), aOld ); + ::Notify( this, FindPageFrame(), aOld ); NotifyDrawObj(); - if ( GetAnchorFrm()->IsInFly() ) - AnchorFrm()->FindFlyFrm()->Shrink( nDist, bTst ); + if ( GetAnchorFrame()->IsInFly() ) + AnchorFrame()->FindFlyFrame()->Shrink( nDist, bTst ); } return 0L; } @@ -1918,7 +1918,7 @@ SwTwips SwFlyFrm::_Shrink( SwTwips nDist, bool bTst ) _InvalidateSize(); const bool bOldLocked = m_bLocked; Unlock(); - if ( IsFlyFreeFrm() ) + if ( IsFlyFreeFrame() ) { // #i37068# - no format of position here // and prevent move in method <CheckClip(..)>. @@ -1929,25 +1929,25 @@ SwTwips SwFlyFrm::_Shrink( SwTwips nDist, bool bTst ) mbValidPos = true; // #i55416# // Suppress format of width for autowidth frame, because the - // format of the width would call <SwTextFrm::CalcFitToContent()> + // format of the width would call <SwTextFrame::CalcFitToContent()> // for the lower frame, which initiated this shrink. const bool bOldFormatHeightOnly = m_bFormatHeightOnly; - const SwFormatFrmSize& rFrmSz = GetFormat()->GetFrmSize(); - if ( rFrmSz.GetWidthSizeType() != ATT_FIX_SIZE ) + const SwFormatFrameSize& rFrameSz = GetFormat()->GetFrameSize(); + if ( rFrameSz.GetWidthSizeType() != ATT_FIX_SIZE ) { m_bFormatHeightOnly = true; } - static_cast<SwFlyFreeFrm*>(this)->SetNoMoveOnCheckClip( true ); - static_cast<SwFlyFreeFrm*>(this)->SwFlyFreeFrm::MakeAll(getRootFrm()->GetCurrShell()->GetOut()); - static_cast<SwFlyFreeFrm*>(this)->SetNoMoveOnCheckClip( false ); + static_cast<SwFlyFreeFrame*>(this)->SetNoMoveOnCheckClip( true ); + static_cast<SwFlyFreeFrame*>(this)->SwFlyFreeFrame::MakeAll(getRootFrame()->GetCurrShell()->GetOut()); + static_cast<SwFlyFreeFrame*>(this)->SetNoMoveOnCheckClip( false ); // #i55416# - if ( rFrmSz.GetWidthSizeType() != ATT_FIX_SIZE ) + if ( rFrameSz.GetWidthSizeType() != ATT_FIX_SIZE ) { m_bFormatHeightOnly = bOldFormatHeightOnly; } } else - MakeAll(getRootFrm()->GetCurrShell()->GetOut()); + MakeAll(getRootFrame()->GetCurrShell()->GetOut()); _InvalidateSize(); InvalidatePos(); if ( bOldLocked ) @@ -1955,9 +1955,9 @@ SwTwips SwFlyFrm::_Shrink( SwTwips nDist, bool bTst ) const SwRect aNew( GetObjRectWithSpaces() ); if ( aOld != aNew ) { - ::Notify( this, FindPageFrm(), aOld ); - if ( GetAnchorFrm()->IsInFly() ) - AnchorFrm()->FindFlyFrm()->Shrink( nDist, bTst ); + ::Notify( this, FindPageFrame(), aOld ); + if ( GetAnchorFrame()->IsInFly() ) + AnchorFrame()->FindFlyFrame()->Shrink( nDist, bTst ); } return (aOld.*fnRect->fnGetHeight)() - (aNew.*fnRect->fnGetHeight)(); @@ -1967,7 +1967,7 @@ SwTwips SwFlyFrm::_Shrink( SwTwips nDist, bool bTst ) return 0L; } -Size SwFlyFrm::ChgSize( const Size& aNewSize ) +Size SwFlyFrame::ChgSize( const Size& aNewSize ) { // #i53298# // If the fly frame anchored at-paragraph or at-character contains an OLE @@ -1975,9 +1975,9 @@ Size SwFlyFrm::ChgSize( const Size& aNewSize ) // of the fly frame Size aAdjustedNewSize( aNewSize ); { - if ( dynamic_cast<SwFlyAtCntFrm*>(this) && - Lower() && dynamic_cast<SwNoTextFrm*>(Lower()) && - static_cast<SwNoTextFrm*>(Lower())->GetNode()->GetOLENode() ) + if ( dynamic_cast<SwFlyAtContentFrame*>(this) && + Lower() && dynamic_cast<SwNoTextFrame*>(Lower()) && + static_cast<SwNoTextFrame*>(Lower())->GetNode()->GetOLENode() ) { SwRect aClipRect; ::CalcClipRect( GetVirtDrawObj(), aClipRect, false ); @@ -1991,10 +1991,10 @@ Size SwFlyFrm::ChgSize( const Size& aNewSize ) } } } - if ( aAdjustedNewSize != Frm().SSize() ) + if ( aAdjustedNewSize != Frame().SSize() ) { SwFrameFormat *pFormat = GetFormat(); - SwFormatFrmSize aSz( pFormat->GetFrmSize() ); + SwFormatFrameSize aSz( pFormat->GetFrameSize() ); aSz.SetWidth( aAdjustedNewSize.Width() ); aSz.SetHeight( aAdjustedNewSize.Height() ); // go via the Doc for UNDO @@ -2002,49 +2002,49 @@ Size SwFlyFrm::ChgSize( const Size& aNewSize ) return aSz.GetSize(); } else - return Frm().SSize(); + return Frame().SSize(); } -bool SwFlyFrm::IsLowerOf( const SwLayoutFrm* pUpperFrm ) const +bool SwFlyFrame::IsLowerOf( const SwLayoutFrame* pUpperFrame ) const { - OSL_ENSURE( GetAnchorFrm(), "8-( Fly is lost in Space." ); - const SwFrm* pFrm = GetAnchorFrm(); + OSL_ENSURE( GetAnchorFrame(), "8-( Fly is lost in Space." ); + const SwFrame* pFrame = GetAnchorFrame(); do { - if ( pFrm == pUpperFrm ) + if ( pFrame == pUpperFrame ) return true; - pFrm = pFrm->IsFlyFrm() - ? static_cast<const SwFlyFrm*>(pFrm)->GetAnchorFrm() - : pFrm->GetUpper(); - } while ( pFrm ); + pFrame = pFrame->IsFlyFrame() + ? static_cast<const SwFlyFrame*>(pFrame)->GetAnchorFrame() + : pFrame->GetUpper(); + } while ( pFrame ); return false; } -void SwFlyFrm::Cut() +void SwFlyFrame::Cut() { } -void SwFrm::AppendFly( SwFlyFrm *pNew ) +void SwFrame::AppendFly( SwFlyFrame *pNew ) { if ( !mpDrawObjs ) mpDrawObjs = new SwSortedObjs(); mpDrawObjs->Insert( *pNew ); - pNew->ChgAnchorFrm( this ); + pNew->ChgAnchorFrame( this ); // Register at the page - // If there's none present, register via SwPageFrm::PreparePage - SwPageFrm* pPage = FindPageFrm(); + // If there's none present, register via SwPageFrame::PreparePage + SwPageFrame* pPage = FindPageFrame(); if ( pPage != nullptr ) { pPage->AppendFlyToPage( pNew ); } } -void SwFrm::RemoveFly( SwFlyFrm *pToRemove ) +void SwFrame::RemoveFly( SwFlyFrame *pToRemove ) { // Deregister from the page // Could already have happened, if the page was already destructed - SwPageFrm *pPage = pToRemove->FindPageFrm(); + SwPageFrame *pPage = pToRemove->FindPageFrame(); if ( pPage && pPage->GetSortedObjs() ) { pPage->RemoveFlyFromPage( pToRemove ); @@ -2052,17 +2052,17 @@ void SwFrm::RemoveFly( SwFlyFrm *pToRemove ) // #i73201# else { - if ( pToRemove->IsAccessibleFrm() && + if ( pToRemove->IsAccessibleFrame() && pToRemove->GetFormat() && - !pToRemove->IsFlyInCntFrm() ) + !pToRemove->IsFlyInContentFrame() ) { - SwRootFrm *pRootFrm = getRootFrm(); - if( pRootFrm && pRootFrm->IsAnyShellAccessible() ) + SwRootFrame *pRootFrame = getRootFrame(); + if( pRootFrame && pRootFrame->IsAnyShellAccessible() ) { - SwViewShell *pVSh = pRootFrm->GetCurrShell(); + SwViewShell *pVSh = pRootFrame->GetCurrShell(); if( pVSh && pVSh->Imp() ) { - pVSh->Imp()->DisposeAccessibleFrm( pToRemove ); + pVSh->Imp()->DisposeAccessibleFrame( pToRemove ); } } } @@ -2072,24 +2072,24 @@ void SwFrm::RemoveFly( SwFlyFrm *pToRemove ) if ( !mpDrawObjs->size() ) DELETEZ( mpDrawObjs ); - pToRemove->ChgAnchorFrm( nullptr ); + pToRemove->ChgAnchorFrame( nullptr ); - if ( !pToRemove->IsFlyInCntFrm() && GetUpper() && IsInTab() )//MA_FLY_HEIGHT + if ( !pToRemove->IsFlyInContentFrame() && GetUpper() && IsInTab() )//MA_FLY_HEIGHT GetUpper()->InvalidateSize(); } -void SwFrm::AppendDrawObj( SwAnchoredObject& _rNewObj ) +void SwFrame::AppendDrawObj( SwAnchoredObject& _rNewObj ) { assert(!mpDrawObjs || mpDrawObjs->is_sorted()); if ( dynamic_cast<const SwAnchoredDrawObject*>( &_rNewObj) == nullptr ) { - OSL_FAIL( "SwFrm::AppendDrawObj(..) - anchored object of unexpected type -> object not appended" ); + OSL_FAIL( "SwFrame::AppendDrawObj(..) - anchored object of unexpected type -> object not appended" ); return; } if ( dynamic_cast<const SwDrawVirtObj*>(_rNewObj.GetDrawObj()) == nullptr && - _rNewObj.GetAnchorFrm() && _rNewObj.GetAnchorFrm() != this ) + _rNewObj.GetAnchorFrame() && _rNewObj.GetAnchorFrame() != this ) { assert(!mpDrawObjs || mpDrawObjs->is_sorted()); // perform disconnect from layout, if 'master' drawing object is appended @@ -2099,12 +2099,12 @@ void SwFrm::AppendDrawObj( SwAnchoredObject& _rNewObj ) assert(!mpDrawObjs || mpDrawObjs->is_sorted()); } - if ( _rNewObj.GetAnchorFrm() != this ) + if ( _rNewObj.GetAnchorFrame() != this ) { if ( !mpDrawObjs ) mpDrawObjs = new SwSortedObjs(); mpDrawObjs->Insert( _rNewObj ); - _rNewObj.ChgAnchorFrm( this ); + _rNewObj.ChgAnchorFrame( this ); } // #i113730# @@ -2137,17 +2137,17 @@ void SwFrm::AppendDrawObj( SwAnchoredObject& _rNewObj ) _rNewObj.InvalidateObjPos(); // register at page frame - SwPageFrm* pPage = FindPageFrm(); + SwPageFrame* pPage = FindPageFrame(); if ( pPage ) { pPage->AppendDrawObjToPage( _rNewObj ); } // Notify accessible layout. - SwViewShell* pSh = getRootFrm()->GetCurrShell(); + SwViewShell* pSh = getRootFrame()->GetCurrShell(); if( pSh ) { - SwRootFrm* pLayout = getRootFrm(); + SwRootFrame* pLayout = getRootFrame(); if( pLayout && pLayout->IsAnyShellAccessible() ) pSh->Imp()->AddAccessibleObj( _rNewObj.GetDrawObj() ); } @@ -2155,19 +2155,19 @@ void SwFrm::AppendDrawObj( SwAnchoredObject& _rNewObj ) assert(!mpDrawObjs || mpDrawObjs->is_sorted()); } -void SwFrm::RemoveDrawObj( SwAnchoredObject& _rToRemoveObj ) +void SwFrame::RemoveDrawObj( SwAnchoredObject& _rToRemoveObj ) { // Notify accessible layout. - SwViewShell* pSh = getRootFrm()->GetCurrShell(); + SwViewShell* pSh = getRootFrame()->GetCurrShell(); if( pSh ) { - SwRootFrm* pLayout = getRootFrm(); + SwRootFrame* pLayout = getRootFrame(); if( pLayout && pLayout->IsAnyShellAccessible() ) pSh->Imp()->DisposeAccessibleObj( _rToRemoveObj.GetDrawObj() ); } // deregister from page frame - SwPageFrm* pPage = _rToRemoveObj.GetPageFrm(); + SwPageFrame* pPage = _rToRemoveObj.GetPageFrame(); if ( pPage && pPage->GetSortedObjs() ) pPage->RemoveDrawObjFromPage( _rToRemoveObj ); @@ -2175,12 +2175,12 @@ void SwFrm::RemoveDrawObj( SwAnchoredObject& _rToRemoveObj ) if ( !mpDrawObjs->size() ) DELETEZ( mpDrawObjs ); - _rToRemoveObj.ChgAnchorFrm( nullptr ); + _rToRemoveObj.ChgAnchorFrame( nullptr ); assert(!mpDrawObjs || mpDrawObjs->is_sorted()); } -void SwFrm::InvalidateObjs( const bool _bInvaPosOnly, +void SwFrame::InvalidateObjs( const bool _bInvaPosOnly, const bool _bNoInvaOfAsCharAnchoredObjs ) { if ( GetDrawObjs() ) @@ -2188,7 +2188,7 @@ void SwFrm::InvalidateObjs( const bool _bInvaPosOnly, // #i26945# - determine page the frame is on, // in order to check, if anchored object is registered at the same // page. - const SwPageFrm* pPageFrm = FindPageFrm(); + const SwPageFrame* pPageFrame = FindPageFrame(); // #i28701# - re-factoring for ( size_t i = 0; i < GetDrawObjs()->size(); ++i ) { @@ -2202,12 +2202,12 @@ void SwFrm::InvalidateObjs( const bool _bInvaPosOnly, // #i26945# - no invalidation, if anchored object // isn't registered at the same page and instead is registered at // the page, where its anchor character text frame is on. - if ( pAnchoredObj->GetPageFrm() && - pAnchoredObj->GetPageFrm() != pPageFrm ) + if ( pAnchoredObj->GetPageFrame() && + pAnchoredObj->GetPageFrame() != pPageFrame ) { - SwTextFrm* pAnchorCharFrm = pAnchoredObj->FindAnchorCharFrm(); - if ( pAnchorCharFrm && - pAnchoredObj->GetPageFrm() == pAnchorCharFrm->FindPageFrm() ) + SwTextFrame* pAnchorCharFrame = pAnchoredObj->FindAnchorCharFrame(); + if ( pAnchorCharFrame && + pAnchoredObj->GetPageFrame() == pAnchorCharFrame->FindPageFrame() ) { continue; } @@ -2224,16 +2224,16 @@ void SwFrm::InvalidateObjs( const bool _bInvaPosOnly, // has cleared environment, and unlock its position, if the anchored // object is registered at the same page as the anchor frame is on. if ( pAnchoredObj->ClearedEnvironment() && - pAnchoredObj->GetPageFrm() && - pAnchoredObj->GetPageFrm() == pPageFrm ) + pAnchoredObj->GetPageFrame() && + pAnchoredObj->GetPageFrame() == pPageFrame ) { pAnchoredObj->UnlockPosition(); pAnchoredObj->SetClearedEnvironment( false ); } // distinguish between writer fly frames and drawing objects - if ( dynamic_cast<const SwFlyFrm*>( pAnchoredObj) != nullptr ) + if ( dynamic_cast<const SwFlyFrame*>( pAnchoredObj) != nullptr ) { - SwFlyFrm* pFly = static_cast<SwFlyFrm*>(pAnchoredObj); + SwFlyFrame* pFly = static_cast<SwFlyFrame*>(pAnchoredObj); pFly->_Invalidate(); pFly->_InvalidatePos(); if ( !_bInvaPosOnly ) @@ -2252,13 +2252,13 @@ void SwFrm::InvalidateObjs( const bool _bInvaPosOnly, // frame. // #i44016# - add parameter <_bUnlockPosOfObjs> to // force an unlockposition call for the lower objects. -void SwLayoutFrm::NotifyLowerObjs( const bool _bUnlockPosOfObjs ) +void SwLayoutFrame::NotifyLowerObjs( const bool _bUnlockPosOfObjs ) { // invalidate lower floating screen objects - SwPageFrm* pPageFrm = FindPageFrm(); - if ( pPageFrm && pPageFrm->GetSortedObjs() ) + SwPageFrame* pPageFrame = FindPageFrame(); + if ( pPageFrame && pPageFrame->GetSortedObjs() ) { - SwSortedObjs& rObjs = *(pPageFrm->GetSortedObjs()); + SwSortedObjs& rObjs = *(pPageFrame->GetSortedObjs()); for ( size_t i = 0; i < rObjs.size(); ++i ) { SwAnchoredObject* pObj = rObjs[i]; @@ -2268,25 +2268,25 @@ void SwLayoutFrm::NotifyLowerObjs( const bool _bUnlockPosOfObjs ) // determine the anchor frame - usually it's the anchor frame, // for at-character/as-character anchored objects the anchor character // text frame is taken. - const SwFrm* pAnchorFrm = pObj->GetAnchorFrmContainingAnchPos(); - if ( dynamic_cast<const SwFlyFrm*>( pObj) != nullptr ) + const SwFrame* pAnchorFrame = pObj->GetAnchorFrameContainingAnchPos(); + if ( dynamic_cast<const SwFlyFrame*>( pObj) != nullptr ) { - SwFlyFrm* pFly = static_cast<SwFlyFrm*>(pObj); + SwFlyFrame* pFly = static_cast<SwFlyFrame*>(pObj); - if ( pFly->Frm().Left() == FAR_AWAY ) + if ( pFly->Frame().Left() == FAR_AWAY ) continue; if ( pFly->IsAnLower( this ) ) continue; - // #i26945# - use <pAnchorFrm> to check, if + // #i26945# - use <pAnchorFrame> to check, if // fly frame is lower of layout frame resp. if fly frame is // at a different page registered as its anchor frame is on. - const bool bLow = IsAnLower( pAnchorFrm ); - if ( bLow || pAnchorFrm->FindPageFrm() != pPageFrm ) + const bool bLow = IsAnLower( pAnchorFrame ); + if ( bLow || pAnchorFrame->FindPageFrame() != pPageFrame ) { - pFly->_Invalidate( pPageFrm ); - if ( !bLow || pFly->IsFlyAtCntFrm() ) + pFly->_Invalidate( pPageFrame ); + if ( !bLow || pFly->IsFlyAtContentFrame() ) { // #i44016# if ( _bUnlockPosOfObjs ) @@ -2302,12 +2302,12 @@ void SwLayoutFrm::NotifyLowerObjs( const bool _bUnlockPosOfObjs ) else { OSL_ENSURE( dynamic_cast<const SwAnchoredDrawObject*>( pObj) != nullptr, - "<SwLayoutFrm::NotifyFlys() - anchored object of unexpected type" ); - // #i26945# - use <pAnchorFrm> to check, if + "<SwLayoutFrame::NotifyFlys() - anchored object of unexpected type" ); + // #i26945# - use <pAnchorFrame> to check, if // fly frame is lower of layout frame resp. if fly frame is // at a different page registered as its anchor frame is on. - if ( IsAnLower( pAnchorFrm ) || - pAnchorFrm->FindPageFrm() != pPageFrm ) + if ( IsAnLower( pAnchorFrame ) || + pAnchorFrame->FindPageFrame() != pPageFrame ) { // #i44016# if ( _bUnlockPosOfObjs ) @@ -2321,7 +2321,7 @@ void SwLayoutFrm::NotifyLowerObjs( const bool _bUnlockPosOfObjs ) } } -void SwFlyFrm::NotifyDrawObj() +void SwFlyFrame::NotifyDrawObj() { SwVirtFlyDrawObj* pObj = GetVirtDrawObj(); pObj->SetRect(); @@ -2332,16 +2332,16 @@ void SwFlyFrm::NotifyDrawObj() ClrContourCache( pObj ); } -Size SwFlyFrm::CalcRel( const SwFormatFrmSize &rSz ) const +Size SwFlyFrame::CalcRel( const SwFormatFrameSize &rSz ) const { Size aRet( rSz.GetSize() ); - const SwFrm *pRel = IsFlyLayFrm() ? GetAnchorFrm() : GetAnchorFrm()->GetUpper(); + const SwFrame *pRel = IsFlyLayFrame() ? GetAnchorFrame() : GetAnchorFrame()->GetUpper(); if( pRel ) // LAYER_IMPL { long nRelWidth = LONG_MAX, nRelHeight = LONG_MAX; - const SwViewShell *pSh = getRootFrm()->GetCurrShell(); - if ( ( pRel->IsBodyFrm() || pRel->IsPageFrm() ) && + const SwViewShell *pSh = getRootFrame()->GetCurrShell(); + if ( ( pRel->IsBodyFrame() || pRel->IsPageFrame() ) && pSh && pSh->GetViewOptions()->getBrowseMode() && pSh->VisArea().HasArea() ) { @@ -2358,40 +2358,40 @@ Size SwFlyFrm::CalcRel( const SwFormatFrmSize &rSz ) const } // At the moment only the "== PAGE_FRAME" and "!= PAGE_FRAME" cases are handled. - // When size is a relative to page size, ignore size of SwBodyFrm. + // When size is a relative to page size, ignore size of SwBodyFrame. if (rSz.GetWidthPercentRelation() != text::RelOrientation::PAGE_FRAME) nRelWidth = std::min( nRelWidth, pRel->Prt().Width() ); if (rSz.GetHeightPercentRelation() != text::RelOrientation::PAGE_FRAME) nRelHeight = std::min( nRelHeight, pRel->Prt().Height() ); - if( !pRel->IsPageFrm() ) + if( !pRel->IsPageFrame() ) { - const SwPageFrm* pPage = FindPageFrm(); + const SwPageFrame* pPage = FindPageFrame(); if( pPage ) { if (rSz.GetWidthPercentRelation() == text::RelOrientation::PAGE_FRAME) // Ignore margins of pPage. - nRelWidth = std::min( nRelWidth, pPage->Frm().Width() ); + nRelWidth = std::min( nRelWidth, pPage->Frame().Width() ); else nRelWidth = std::min( nRelWidth, pPage->Prt().Width() ); if (rSz.GetHeightPercentRelation() == text::RelOrientation::PAGE_FRAME) // Ignore margins of pPage. - nRelHeight = std::min( nRelHeight, pPage->Frm().Height() ); + nRelHeight = std::min( nRelHeight, pPage->Frame().Height() ); else nRelHeight = std::min( nRelHeight, pPage->Prt().Height() ); } } - if ( rSz.GetWidthPercent() && rSz.GetWidthPercent() != SwFormatFrmSize::SYNCED ) + if ( rSz.GetWidthPercent() && rSz.GetWidthPercent() != SwFormatFrameSize::SYNCED ) aRet.Width() = nRelWidth * rSz.GetWidthPercent() / 100; - if ( rSz.GetHeightPercent() && rSz.GetHeightPercent() != SwFormatFrmSize::SYNCED ) + if ( rSz.GetHeightPercent() && rSz.GetHeightPercent() != SwFormatFrameSize::SYNCED ) aRet.Height() = nRelHeight * rSz.GetHeightPercent() / 100; - if ( rSz.GetWidthPercent() == SwFormatFrmSize::SYNCED ) + if ( rSz.GetWidthPercent() == SwFormatFrameSize::SYNCED ) { aRet.Width() *= aRet.Height(); aRet.Width() /= rSz.GetHeight(); } - else if ( rSz.GetHeightPercent() == SwFormatFrmSize::SYNCED ) + else if ( rSz.GetHeightPercent() == SwFormatFrameSize::SYNCED ) { aRet.Height() *= aRet.Width(); aRet.Height() /= rSz.GetWidth(); @@ -2400,39 +2400,39 @@ Size SwFlyFrm::CalcRel( const SwFormatFrmSize &rSz ) const return aRet; } -static SwTwips lcl_CalcAutoWidth( const SwLayoutFrm& rFrm ) +static SwTwips lcl_CalcAutoWidth( const SwLayoutFrame& rFrame ) { SwTwips nRet = 0; SwTwips nMin = 0; - const SwFrm* pFrm = rFrm.Lower(); + const SwFrame* pFrame = rFrame.Lower(); // No autowidth defined for columned frames - if ( !pFrm || pFrm->IsColumnFrm() ) + if ( !pFrame || pFrame->IsColumnFrame() ) return nRet; - while ( pFrm ) + while ( pFrame ) { - if ( pFrm->IsSctFrm() ) + if ( pFrame->IsSctFrame() ) { - nMin = lcl_CalcAutoWidth( *static_cast<const SwSectionFrm*>(pFrm) ); + nMin = lcl_CalcAutoWidth( *static_cast<const SwSectionFrame*>(pFrame) ); } - if ( pFrm->IsTextFrm() ) + if ( pFrame->IsTextFrame() ) { - nMin = const_cast<SwTextFrm*>(static_cast<const SwTextFrm*>(pFrm))->CalcFitToContent(); + nMin = const_cast<SwTextFrame*>(static_cast<const SwTextFrame*>(pFrame))->CalcFitToContent(); const SvxLRSpaceItem &rSpace = - static_cast<const SwTextFrm*>(pFrm)->GetTextNode()->GetSwAttrSet().GetLRSpace(); - if (!static_cast<const SwTextFrm*>(pFrm)->IsLocked()) + static_cast<const SwTextFrame*>(pFrame)->GetTextNode()->GetSwAttrSet().GetLRSpace(); + if (!static_cast<const SwTextFrame*>(pFrame)->IsLocked()) nMin += rSpace.GetRight() + rSpace.GetTextLeft() + rSpace.GetTextFirstLineOfst(); } - else if ( pFrm->IsTabFrm() ) + else if ( pFrame->IsTabFrame() ) { - const SwFormatFrmSize& rTableFormatSz = static_cast<const SwTabFrm*>(pFrm)->GetTable()->GetFrameFormat()->GetFrmSize(); + const SwFormatFrameSize& rTableFormatSz = static_cast<const SwTabFrame*>(pFrame)->GetTable()->GetFrameFormat()->GetFrameSize(); if ( USHRT_MAX == rTableFormatSz.GetSize().Width() || - text::HoriOrientation::NONE == static_cast<const SwTabFrm*>(pFrm)->GetFormat()->GetHoriOrient().GetHoriOrient() ) + text::HoriOrientation::NONE == static_cast<const SwTabFrame*>(pFrame)->GetFormat()->GetHoriOrient().GetHoriOrient() ) { - const SwPageFrm* pPage = rFrm.FindPageFrm(); + const SwPageFrame* pPage = rFrame.FindPageFrame(); // auto width table - nMin = pFrm->GetUpper()->IsVertical() ? + nMin = pFrame->GetUpper()->IsVertical() ? pPage->Prt().Height() : pPage->Prt().Width(); } @@ -2445,28 +2445,28 @@ static SwTwips lcl_CalcAutoWidth( const SwLayoutFrm& rFrm ) if ( nMin > nRet ) nRet = nMin; - pFrm = pFrm->GetNext(); + pFrame = pFrame->GetNext(); } return nRet; } -SwTwips SwFlyFrm::CalcAutoWidth() const +SwTwips SwFlyFrame::CalcAutoWidth() const { return lcl_CalcAutoWidth( *this ); } -/// OD 16.04.2003 #i13147# - If called for paint and the <SwNoTextFrm> contains +/// OD 16.04.2003 #i13147# - If called for paint and the <SwNoTextFrame> contains /// a graphic, load of intrinsic graphic has to be avoided. -bool SwFlyFrm::GetContour( tools::PolyPolygon& rContour, +bool SwFlyFrame::GetContour( tools::PolyPolygon& rContour, const bool _bForPaint ) const { - vcl::RenderContext* pRenderContext = getRootFrm()->GetCurrShell()->GetOut(); + vcl::RenderContext* pRenderContext = getRootFrame()->GetCurrShell()->GetOut(); bool bRet = false; if( GetFormat()->GetSurround().IsContour() && Lower() && - Lower()->IsNoTextFrm() ) + Lower()->IsNoTextFrame() ) { - SwNoTextNode *pNd = const_cast<SwNoTextNode*>(static_cast<const SwNoTextNode*>(static_cast<const SwContentFrm*>(Lower())->GetNode())); + SwNoTextNode *pNd = const_cast<SwNoTextNode*>(static_cast<const SwNoTextNode*>(static_cast<const SwContentFrame*>(Lower())->GetNode())); // OD 16.04.2003 #i13147# - determine <GraphicObject> instead of <Graphic> // in order to avoid load of graphic, if <SwNoTextNode> contains a graphic // node and method is called for paint. @@ -2482,7 +2482,7 @@ bool SwFlyFrm::GetContour( tools::PolyPolygon& rContour, pGrfObj = new GraphicObject( pNd->GetGraphic() ); bGrfObjCreated = true; } - OSL_ENSURE( pGrfObj, "SwFlyFrm::GetContour() - No Graphic/GraphicObject found at <SwNoTextNode>." ); + OSL_ENSURE( pGrfObj, "SwFlyFrame::GetContour() - No Graphic/GraphicObject found at <SwNoTextNode>." ); if ( pGrfObj && pGrfObj->GetType() != GRAPHIC_NONE ) { if( !pNd->HasContour() ) @@ -2491,7 +2491,7 @@ bool SwFlyFrm::GetContour( tools::PolyPolygon& rContour, // during paint. Thus, return (value of <bRet> should be <false>). if ( pGrfNd && _bForPaint ) { - OSL_FAIL( "SwFlyFrm::GetContour() - No Contour found at <SwNoTextNode> during paint." ); + OSL_FAIL( "SwFlyFrame::GetContour() - No Contour found at <SwNoTextNode> during paint." ); return bRet; } pNd->CreateContour(); @@ -2502,7 +2502,7 @@ bool SwFlyFrm::GetContour( tools::PolyPolygon& rContour, SwRect aClip; SwRect aOrig; Lower()->Calc(pRenderContext); - static_cast<const SwNoTextFrm*>(Lower())->GetGrfArea( aClip, &aOrig, false ); + static_cast<const SwNoTextFrame*>(Lower())->GetGrfArea( aClip, &aOrig, false ); // OD 16.04.2003 #i13147# - copy method code <SvxContourDlg::ScaleContour(..)> // in order to avoid that graphic has to be loaded for contour scale. //SvxContourDlg::ScaleContour( rContour, aGrf, MAP_TWIP, aOrig.SSize() ); @@ -2560,11 +2560,11 @@ bool SwFlyFrm::GetContour( tools::PolyPolygon& rContour, } // OD 2004-03-25 #i26791# -const SwVirtFlyDrawObj* SwFlyFrm::GetVirtDrawObj() const +const SwVirtFlyDrawObj* SwFlyFrame::GetVirtDrawObj() const { return static_cast<const SwVirtFlyDrawObj*>(GetDrawObj()); } -SwVirtFlyDrawObj* SwFlyFrm::GetVirtDrawObj() +SwVirtFlyDrawObj* SwFlyFrame::GetVirtDrawObj() { return static_cast<SwVirtFlyDrawObj*>(DrawObj()); } @@ -2572,52 +2572,52 @@ SwVirtFlyDrawObj* SwFlyFrm::GetVirtDrawObj() // OD 2004-03-24 #i26791# - implementation of pure virtual method declared in // base class <SwAnchoredObject> -void SwFlyFrm::InvalidateObjPos() +void SwFlyFrame::InvalidateObjPos() { InvalidatePos(); // #i68520# InvalidateObjRectWithSpaces(); } -SwFrameFormat& SwFlyFrm::GetFrameFormat() +SwFrameFormat& SwFlyFrame::GetFrameFormat() { OSL_ENSURE( GetFormat(), - "<SwFlyFrm::GetFrameFormat()> - missing frame format -> crash." ); + "<SwFlyFrame::GetFrameFormat()> - missing frame format -> crash." ); return *GetFormat(); } -const SwFrameFormat& SwFlyFrm::GetFrameFormat() const +const SwFrameFormat& SwFlyFrame::GetFrameFormat() const { OSL_ENSURE( GetFormat(), - "<SwFlyFrm::GetFrameFormat()> - missing frame format -> crash." ); + "<SwFlyFrame::GetFrameFormat()> - missing frame format -> crash." ); return *GetFormat(); } -const SwRect SwFlyFrm::GetObjRect() const +const SwRect SwFlyFrame::GetObjRect() const { - return Frm(); + return Frame(); } // #i70122# // for Writer fly frames the bounding rectangle equals the object rectangles -const SwRect SwFlyFrm::GetObjBoundRect() const +const SwRect SwFlyFrame::GetObjBoundRect() const { return GetObjRect(); } // #i68520# -bool SwFlyFrm::_SetObjTop( const SwTwips _nTop ) +bool SwFlyFrame::_SetObjTop( const SwTwips _nTop ) { - const bool bChanged( Frm().Pos().getY() != _nTop ); + const bool bChanged( Frame().Pos().getY() != _nTop ); - Frm().Pos().setY(_nTop); + Frame().Pos().setY(_nTop); return bChanged; } -bool SwFlyFrm::_SetObjLeft( const SwTwips _nLeft ) +bool SwFlyFrame::_SetObjLeft( const SwTwips _nLeft ) { - const bool bChanged( Frm().Pos().getX() != _nLeft ); + const bool bChanged( Frame().Pos().getX() != _nLeft ); - Frm().Pos().setX(_nLeft); + Frame().Pos().setX(_nLeft); return bChanged; } @@ -2627,7 +2627,7 @@ bool SwFlyFrm::_SetObjLeft( const SwTwips _nLeft ) OD 2004-07-02 #i28701# */ -void SwFlyFrm::RegisterAtCorrectPage() +void SwFlyFrame::RegisterAtCorrectPage() { // default behaviour is to do nothing. } @@ -2636,82 +2636,82 @@ void SwFlyFrm::RegisterAtCorrectPage() OD 2004-05-11 #i28701# */ -bool SwFlyFrm::IsFormatPossible() const +bool SwFlyFrame::IsFormatPossible() const { return SwAnchoredObject::IsFormatPossible() && !IsLocked() && !IsColLocked(); } -void SwFlyFrm::GetAnchoredObjects( std::list<SwAnchoredObject*>& aList, const SwFormat& rFormat ) +void SwFlyFrame::GetAnchoredObjects( std::list<SwAnchoredObject*>& aList, const SwFormat& rFormat ) { - SwIterator<SwFlyFrm,SwFormat> aIter( rFormat ); - for( SwFlyFrm* pFlyFrm = aIter.First(); pFlyFrm; pFlyFrm = aIter.Next() ) - aList.push_back( pFlyFrm ); + SwIterator<SwFlyFrame,SwFormat> aIter( rFormat ); + for( SwFlyFrame* pFlyFrame = aIter.First(); pFlyFrame; pFlyFrame = aIter.Next() ) + aList.push_back( pFlyFrame ); } -const SwFlyFrameFormat * SwFlyFrm::GetFormat() const +const SwFlyFrameFormat * SwFlyFrame::GetFormat() const { return static_cast< const SwFlyFrameFormat * >( GetDep() ); } -SwFlyFrameFormat * SwFlyFrm::GetFormat() +SwFlyFrameFormat * SwFlyFrame::GetFormat() { return static_cast< SwFlyFrameFormat * >( GetDep() ); } -void SwFlyFrm::Calc(vcl::RenderContext* pRenderContext) const +void SwFlyFrame::Calc(vcl::RenderContext* pRenderContext) const { if ( !m_bValidContentPos ) - const_cast<SwFlyFrm*>(this)->PrepareMake(pRenderContext); + const_cast<SwFlyFrame*>(this)->PrepareMake(pRenderContext); else - SwLayoutFrm::Calc(pRenderContext); + SwLayoutFrame::Calc(pRenderContext); } -SwTwips SwFlyFrm::CalcContentHeight(const SwBorderAttrs *pAttrs, const SwTwips nMinHeight, const SwTwips nUL) +SwTwips SwFlyFrame::CalcContentHeight(const SwBorderAttrs *pAttrs, const SwTwips nMinHeight, const SwTwips nUL) { SWRECTFN( this ) SwTwips nHeight = 0; if ( Lower() ) { - if ( Lower()->IsColumnFrm() ) + if ( Lower()->IsColumnFrame() ) { FormatWidthCols( *pAttrs, nUL, nMinHeight ); - nHeight = (Lower()->Frm().*fnRect->fnGetHeight)(); + nHeight = (Lower()->Frame().*fnRect->fnGetHeight)(); } else { - SwFrm *pFrm = Lower(); - while ( pFrm ) + SwFrame *pFrame = Lower(); + while ( pFrame ) { - nHeight += (pFrm->Frm().*fnRect->fnGetHeight)(); - if( pFrm->IsTextFrm() && static_cast<SwTextFrm*>(pFrm)->IsUndersized() ) - // This TextFrm would like to be a bit larger - nHeight += static_cast<SwTextFrm*>(pFrm)->GetParHeight() - - (pFrm->Prt().*fnRect->fnGetHeight)(); - else if( pFrm->IsSctFrm() && static_cast<SwSectionFrm*>(pFrm)->IsUndersized() ) - nHeight += static_cast<SwSectionFrm*>(pFrm)->Undersize(); - pFrm = pFrm->GetNext(); + nHeight += (pFrame->Frame().*fnRect->fnGetHeight)(); + if( pFrame->IsTextFrame() && static_cast<SwTextFrame*>(pFrame)->IsUndersized() ) + // This TextFrame would like to be a bit larger + nHeight += static_cast<SwTextFrame*>(pFrame)->GetParHeight() + - (pFrame->Prt().*fnRect->fnGetHeight)(); + else if( pFrame->IsSctFrame() && static_cast<SwSectionFrame*>(pFrame)->IsUndersized() ) + nHeight += static_cast<SwSectionFrame*>(pFrame)->Undersize(); + pFrame = pFrame->GetNext(); } } if ( GetDrawObjs() ) { const size_t nCnt = GetDrawObjs()->size(); - SwTwips nTop = (Frm().*fnRect->fnGetTop)(); - SwTwips nBorder = (Frm().*fnRect->fnGetHeight)() - + SwTwips nTop = (Frame().*fnRect->fnGetTop)(); + SwTwips nBorder = (Frame().*fnRect->fnGetHeight)() - (Prt().*fnRect->fnGetHeight)(); for ( size_t i = 0; i < nCnt; ++i ) { SwAnchoredObject* pAnchoredObj = (*GetDrawObjs())[i]; - if ( dynamic_cast<const SwFlyFrm*>( pAnchoredObj) != nullptr ) + if ( dynamic_cast<const SwFlyFrame*>( pAnchoredObj) != nullptr ) { - SwFlyFrm* pFly = static_cast<SwFlyFrm*>(pAnchoredObj); + SwFlyFrame* pFly = static_cast<SwFlyFrame*>(pAnchoredObj); // OD 06.11.2003 #i22305# - consider // only Writer fly frames, which follow the text flow. - if ( pFly->IsFlyLayFrm() && - pFly->Frm().Top() != FAR_AWAY && + if ( pFly->IsFlyLayFrame() && + pFly->Frame().Top() != FAR_AWAY && pFly->GetFormat()->GetFollowTextFlow().GetValue() ) { - SwTwips nDist = -(pFly->Frm().*fnRect-> + SwTwips nDist = -(pFly->Frame().*fnRect-> fnBottomDist)( nTop ); if( nDist > nBorder + nHeight ) nHeight = nDist - nBorder; diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx index f2fec6a7d311..475431451304 100644 --- a/sw/source/core/layout/flycnt.cxx +++ b/sw/source/core/layout/flycnt.cxx @@ -49,25 +49,25 @@ using namespace ::com::sun::star; namespace { -static inline SwTwips lcl_GetTopForObjPos(const SwContentFrm* pCnt, const bool bVert, const bool bVertL2R) +static inline SwTwips lcl_GetTopForObjPos(const SwContentFrame* pCnt, const bool bVert, const bool bVertL2R) { if ( bVert ) { - SwTwips aResult = pCnt->Frm().Left(); + SwTwips aResult = pCnt->Frame().Left(); if ( bVertL2R ) - aResult += pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid(); + aResult += pCnt->GetUpperSpaceAmountConsideredForPrevFrameAndPageGrid(); else - aResult += pCnt->Frm().Width() - pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid(); + aResult += pCnt->Frame().Width() - pCnt->GetUpperSpaceAmountConsideredForPrevFrameAndPageGrid(); return aResult; } else - return pCnt->Frm().Top() + pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid(); + return pCnt->Frame().Top() + pCnt->GetUpperSpaceAmountConsideredForPrevFrameAndPageGrid(); } } -SwFlyAtCntFrm::SwFlyAtCntFrm( SwFlyFrameFormat *pFormat, SwFrm* pSib, SwFrm *pAnch ) : - SwFlyFreeFrm( pFormat, pSib, pAnch ) +SwFlyAtContentFrame::SwFlyAtContentFrame( SwFlyFrameFormat *pFormat, SwFrame* pSib, SwFrame *pAnch ) : + SwFlyFreeFrame( pFormat, pSib, pAnch ) { m_bAtCnt = true; m_bAutoPosition = (FLY_AT_CHAR == pFormat->GetAnchor().GetAnchorId()); @@ -75,7 +75,7 @@ SwFlyAtCntFrm::SwFlyAtCntFrm( SwFlyFrameFormat *pFormat, SwFrm* pSib, SwFrm *pAn // #i28701# -void SwFlyAtCntFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) +void SwFlyAtContentFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) { const sal_uInt16 nWhich = pNew ? pNew->Which() : 0; const SwFormatAnchor *pAnch = nullptr; @@ -100,10 +100,10 @@ void SwFlyAtCntFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) //Unregister, get hold of a new anchor and attach it SwRect aOld( GetObjRectWithSpaces() ); - SwPageFrm *pOldPage = FindPageFrm(); - const SwFrm *pOldAnchor = GetAnchorFrm(); - SwContentFrm *pContent = const_cast<SwContentFrm*>(static_cast<const SwContentFrm*>(GetAnchorFrm())); - AnchorFrm()->RemoveFly( this ); + SwPageFrame *pOldPage = FindPageFrame(); + const SwFrame *pOldAnchor = GetAnchorFrame(); + SwContentFrame *pContent = const_cast<SwContentFrame*>(static_cast<const SwContentFrame*>(GetAnchorFrame())); + AnchorFrame()->RemoveFly( this ); const bool bBodyFootnote = (pContent->IsInDocBody() || pContent->IsInFootnote()); @@ -129,9 +129,9 @@ void SwFlyAtCntFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) do { if ( bNext ) - pContent = pContent->GetNextContentFrm(); + pContent = pContent->GetNextContentFrame(); else - pContent = pContent->GetPrevContentFrm(); + pContent = pContent->GetPrevContentFrame(); } while ( pContent && !( bBodyFootnote == ( pContent->IsInDocBody() || pContent->IsInFootnote() ) ) ); @@ -147,9 +147,9 @@ void SwFlyAtCntFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) SwSortedObjs &rObjs = *pContent->GetDrawObjs(); for( size_t i = 0; i < rObjs.size(); ++i) { - SwFlyFrm* pFlyFrm = dynamic_cast<SwFlyFrm*>(rObjs[i]); - if ( pFlyFrm && - &(pFlyFrm->GetFrameFormat()) == pMyFlyFrameFormat ) + SwFlyFrame* pFlyFrame = dynamic_cast<SwFlyFrame*>(rObjs[i]); + if ( pFlyFrame && + &(pFlyFrame->GetFrameFormat()) == pMyFlyFrameFormat ) { bFound = false; break; @@ -160,19 +160,19 @@ void SwFlyAtCntFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) if ( !pContent ) { SwContentNode *pNode = aNewIdx.GetNode().GetContentNode(); - pContent = pNode->getLayoutFrm( getRootFrm(), &pOldAnchor->Frm().Pos(), nullptr, false ); + pContent = pNode->getLayoutFrame( getRootFrame(), &pOldAnchor->Frame().Pos(), nullptr, false ); OSL_ENSURE( pContent, "Neuen Anker nicht gefunden" ); } //Flys are never attached to a follow, but always on the master which //we are going to search now. - SwContentFrm* pFlow = pContent; + SwContentFrame* pFlow = pContent; while ( pFlow->IsFollow() ) pFlow = pFlow->FindMaster(); pContent = pFlow; //and *puff* it's attached... pContent->AppendFly( this ); - if ( pOldPage && pOldPage != FindPageFrm() ) + if ( pOldPage && pOldPage != FindPageFrame() ) NotifyBackground( pOldPage, aOld, PREP_FLY_LEAVE ); //Fix(3495) @@ -184,7 +184,7 @@ void SwFlyAtCntFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) ClearCharRectAndTopOfLine(); } else - SwFlyFrm::Modify( pOld, pNew ); + SwFlyFrame::Modify( pOld, pNew ); } //We need some helper classes to monitor the oscillation and a few functions @@ -193,59 +193,59 @@ void SwFlyAtCntFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) // #i3317# - re-factoring of the position stack class SwOszControl { - static const SwFlyFrm *pStk1; - static const SwFlyFrm *pStk2; - static const SwFlyFrm *pStk3; - static const SwFlyFrm *pStk4; - static const SwFlyFrm *pStk5; + static const SwFlyFrame *pStack1; + static const SwFlyFrame *pStack2; + static const SwFlyFrame *pStack3; + static const SwFlyFrame *pStack4; + static const SwFlyFrame *pStack5; - const SwFlyFrm *pFly; + const SwFlyFrame *pFly; // #i3317# sal_uInt8 mnPosStackSize; std::vector<Point*> maObjPositions; public: - explicit SwOszControl( const SwFlyFrm *pFrm ); + explicit SwOszControl( const SwFlyFrame *pFrame ); ~SwOszControl(); bool ChkOsz(); - static bool IsInProgress( const SwFlyFrm *pFly ); + static bool IsInProgress( const SwFlyFrame *pFly ); }; -const SwFlyFrm *SwOszControl::pStk1 = nullptr; -const SwFlyFrm *SwOszControl::pStk2 = nullptr; -const SwFlyFrm *SwOszControl::pStk3 = nullptr; -const SwFlyFrm *SwOszControl::pStk4 = nullptr; -const SwFlyFrm *SwOszControl::pStk5 = nullptr; +const SwFlyFrame *SwOszControl::pStack1 = nullptr; +const SwFlyFrame *SwOszControl::pStack2 = nullptr; +const SwFlyFrame *SwOszControl::pStack3 = nullptr; +const SwFlyFrame *SwOszControl::pStack4 = nullptr; +const SwFlyFrame *SwOszControl::pStack5 = nullptr; -SwOszControl::SwOszControl( const SwFlyFrm *pFrm ) - : pFly( pFrm ), +SwOszControl::SwOszControl( const SwFlyFrame *pFrame ) + : pFly( pFrame ), // #i3317# mnPosStackSize( 20 ) { - if ( !SwOszControl::pStk1 ) - SwOszControl::pStk1 = pFly; - else if ( !SwOszControl::pStk2 ) - SwOszControl::pStk2 = pFly; - else if ( !SwOszControl::pStk3 ) - SwOszControl::pStk3 = pFly; - else if ( !SwOszControl::pStk4 ) - SwOszControl::pStk4 = pFly; - else if ( !SwOszControl::pStk5 ) - SwOszControl::pStk5 = pFly; + if ( !SwOszControl::pStack1 ) + SwOszControl::pStack1 = pFly; + else if ( !SwOszControl::pStack2 ) + SwOszControl::pStack2 = pFly; + else if ( !SwOszControl::pStack3 ) + SwOszControl::pStack3 = pFly; + else if ( !SwOszControl::pStack4 ) + SwOszControl::pStack4 = pFly; + else if ( !SwOszControl::pStack5 ) + SwOszControl::pStack5 = pFly; } SwOszControl::~SwOszControl() { - if ( SwOszControl::pStk1 == pFly ) - SwOszControl::pStk1 = nullptr; - else if ( SwOszControl::pStk2 == pFly ) - SwOszControl::pStk2 = nullptr; - else if ( SwOszControl::pStk3 == pFly ) - SwOszControl::pStk3 = nullptr; - else if ( SwOszControl::pStk4 == pFly ) - SwOszControl::pStk4 = nullptr; - else if ( SwOszControl::pStk5 == pFly ) - SwOszControl::pStk5 = nullptr; + if ( SwOszControl::pStack1 == pFly ) + SwOszControl::pStack1 = nullptr; + else if ( SwOszControl::pStack2 == pFly ) + SwOszControl::pStack2 = nullptr; + else if ( SwOszControl::pStack3 == pFly ) + SwOszControl::pStack3 = nullptr; + else if ( SwOszControl::pStack4 == pFly ) + SwOszControl::pStack4 = nullptr; + else if ( SwOszControl::pStack5 == pFly ) + SwOszControl::pStack5 = nullptr; // #i3317# while ( !maObjPositions.empty() ) { @@ -256,17 +256,17 @@ SwOszControl::~SwOszControl() } } -bool SwOszControl::IsInProgress( const SwFlyFrm *pFly ) +bool SwOszControl::IsInProgress( const SwFlyFrame *pFly ) { - if ( SwOszControl::pStk1 && !pFly->IsLowerOf( SwOszControl::pStk1 ) ) + if ( SwOszControl::pStack1 && !pFly->IsLowerOf( SwOszControl::pStack1 ) ) return true; - if ( SwOszControl::pStk2 && !pFly->IsLowerOf( SwOszControl::pStk2 ) ) + if ( SwOszControl::pStack2 && !pFly->IsLowerOf( SwOszControl::pStack2 ) ) return true; - if ( SwOszControl::pStk3 && !pFly->IsLowerOf( SwOszControl::pStk3 ) ) + if ( SwOszControl::pStack3 && !pFly->IsLowerOf( SwOszControl::pStack3 ) ) return true; - if ( SwOszControl::pStk4 && !pFly->IsLowerOf( SwOszControl::pStk4 ) ) + if ( SwOszControl::pStack4 && !pFly->IsLowerOf( SwOszControl::pStack4 ) ) return true; - if ( SwOszControl::pStk5 && !pFly->IsLowerOf( SwOszControl::pStk5 ) ) + if ( SwOszControl::pStack5 && !pFly->IsLowerOf( SwOszControl::pStack5 ) ) return true; return false; } @@ -309,7 +309,7 @@ bool SwOszControl::ChkOsz() |* the anchor reacts to changes of the fly. To this reaction the fly must |* certainly react too. Sadly this can lead to oscillations; for example the |* fly wants to go down therefore the content can go up - this leads to a -|* smaller TextFrm thus the fly needs to go up again whereby the text will +|* smaller TextFrame thus the fly needs to go up again whereby the text will |* get pushed down... |* To avoid such oscillations, a small position stack is built. If the fly |* reaches a position which it already had once, the action is stopped. @@ -320,7 +320,7 @@ bool SwOszControl::ChkOsz() |* alignment to not trigger a 'big oscillation' when calling from outside |* again. |*/ -void SwFlyAtCntFrm::MakeAll(vcl::RenderContext* pRenderContext) +void SwFlyAtContentFrame::MakeAll(vcl::RenderContext* pRenderContext) { if ( !GetFormat()->GetDoc()->getIDocumentDrawModelAccess().IsVisibleLayerId( GetVirtDrawObj()->GetLayer() ) ) { @@ -329,23 +329,23 @@ void SwFlyAtCntFrm::MakeAll(vcl::RenderContext* pRenderContext) if ( !SwOszControl::IsInProgress( this ) && !IsLocked() && !IsColLocked() ) { - // #i28701# - use new method <GetPageFrm()> - if( !GetPageFrm() && GetAnchorFrm() && GetAnchorFrm()->IsInFly() ) + // #i28701# - use new method <GetPageFrame()> + if( !GetPageFrame() && GetAnchorFrame() && GetAnchorFrame()->IsInFly() ) { - SwFlyFrm* pFly = AnchorFrm()->FindFlyFrm(); - SwPageFrm *pTmpPage = pFly ? pFly->FindPageFrm() : nullptr; + SwFlyFrame* pFly = AnchorFrame()->FindFlyFrame(); + SwPageFrame *pTmpPage = pFly ? pFly->FindPageFrame() : nullptr; if( pTmpPage ) pTmpPage->AppendFlyToPage( this ); } - // #i28701# - use new method <GetPageFrm()> - if( GetPageFrm() ) + // #i28701# - use new method <GetPageFrame()> + if( GetPageFrame() ) { bSetCompletePaintOnInvalidate = true; { SwFlyFrameFormat *pFormat = GetFormat(); - const SwFormatFrmSize &rFrmSz = GetFormat()->GetFrmSize(); - if( rFrmSz.GetHeightPercent() != SwFormatFrmSize::SYNCED && - rFrmSz.GetHeightPercent() >= 100 ) + const SwFormatFrameSize &rFrameSz = GetFormat()->GetFrameSize(); + if( rFrameSz.GetHeightPercent() != SwFormatFrameSize::SYNCED && + rFrameSz.GetHeightPercent() >= 100 ) { pFormat->LockModify(); SwFormatSurround aMain( pFormat->GetSurround() ); @@ -365,15 +365,15 @@ void SwFlyAtCntFrm::MakeAll(vcl::RenderContext* pRenderContext) // contains the anchor position. E.g., for at-character anchored // object this can be the follow frame of the anchor frame. const bool bFormatAnchor = - !static_cast<const SwTextFrm*>( GetAnchorFrmContainingAnchPos() )->IsAnyJoinLocked() && + !static_cast<const SwTextFrame*>( GetAnchorFrameContainingAnchPos() )->IsAnyJoinLocked() && !ConsiderObjWrapInfluenceOnObjPos() && !ConsiderObjWrapInfluenceOfOtherObjs(); - const SwFrm* pFooter = GetAnchorFrm()->FindFooterOrHeader(); - if( pFooter && !pFooter->IsFooterFrm() ) + const SwFrame* pFooter = GetAnchorFrame()->FindFooterOrHeader(); + if( pFooter && !pFooter->IsFooterFrame() ) pFooter = nullptr; bool bOsz = false; - bool bExtra = Lower() && Lower()->IsColumnFrm(); + bool bExtra = Lower() && Lower()->IsColumnFrame(); // #i3317# - boolean, to apply temporarly the // 'straightforward positioning process' for the frame due to its // overlapping with a previous column. @@ -389,10 +389,10 @@ void SwFlyAtCntFrm::MakeAll(vcl::RenderContext* pRenderContext) bool bConsiderWrapInfluenceDueToMovedFwdAnchor( false ); do { SWRECTFN( this ) - Point aOldPos( (Frm().*fnRect->fnGetPos)() ); - SwFlyFreeFrm::MakeAll(pRenderContext); + Point aOldPos( (Frame().*fnRect->fnGetPos)() ); + SwFlyFreeFrame::MakeAll(pRenderContext); const bool bPosChgDueToOwnFormat = - aOldPos != (Frm().*fnRect->fnGetPos)(); + aOldPos != (Frame().*fnRect->fnGetPos)(); // #i3317# if ( !ConsiderObjWrapInfluenceOnObjPos() && OverlapsPrevColumn() ) @@ -403,54 +403,54 @@ void SwFlyAtCntFrm::MakeAll(vcl::RenderContext* pRenderContext) // wrapping style influence is considered on object positioning if ( bFormatAnchor ) { - SwTextFrm& rAnchPosAnchorFrm = - dynamic_cast<SwTextFrm&>(*GetAnchorFrmContainingAnchPos()); + SwTextFrame& rAnchPosAnchorFrame = + dynamic_cast<SwTextFrame&>(*GetAnchorFrameContainingAnchPos()); // #i58182# - For the usage of new method - // <SwObjectFormatterTextFrm::CheckMovedFwdCondition(..)> + // <SwObjectFormatterTextFrame::CheckMovedFwdCondition(..)> // to check move forward of anchor frame due to the object // positioning it's needed to know, if the object is anchored // at the master frame before the anchor frame is formatted. - const bool bAnchoredAtMaster(!rAnchPosAnchorFrm.IsFollow()); + const bool bAnchoredAtMaster(!rAnchPosAnchorFrame.IsFollow()); // #i56300# // perform complete format of anchor text frame and its // previous frames, which have become invalid due to the // fly frame format. - SwObjectFormatterTextFrm::FormatAnchorFrmAndItsPrevs( rAnchPosAnchorFrm ); + SwObjectFormatterTextFrame::FormatAnchorFrameAndItsPrevs( rAnchPosAnchorFrame ); // #i35911# // #i40444# // #i58182# - usage of new method - // <SwObjectFormatterTextFrm::CheckMovedFwdCondition(..)> + // <SwObjectFormatterTextFrame::CheckMovedFwdCondition(..)> sal_uInt32 nToPageNum( 0L ); bool bDummy( false ); - if ( SwObjectFormatterTextFrm::CheckMovedFwdCondition( - *this, GetPageFrm()->GetPhyPageNum(), + if ( SwObjectFormatterTextFrame::CheckMovedFwdCondition( + *this, GetPageFrame()->GetPhyPageNum(), bAnchoredAtMaster, nToPageNum, bDummy ) ) { bConsiderWrapInfluenceDueToMovedFwdAnchor = true; // mark anchor text frame // directly, that it is moved forward by object positioning. - SwTextFrm* pAnchorTextFrm( static_cast<SwTextFrm*>(AnchorFrm()) ); + SwTextFrame* pAnchorTextFrame( static_cast<SwTextFrame*>(AnchorFrame()) ); bool bInsert( true ); - sal_uInt32 nAnchorFrmToPageNum( 0L ); + sal_uInt32 nAnchorFrameToPageNum( 0L ); const SwDoc& rDoc = *(GetFrameFormat().GetDoc()); - if ( SwLayouter::FrmMovedFwdByObjPos( - rDoc, *pAnchorTextFrm, nAnchorFrmToPageNum ) ) + if ( SwLayouter::FrameMovedFwdByObjPos( + rDoc, *pAnchorTextFrame, nAnchorFrameToPageNum ) ) { - if ( nAnchorFrmToPageNum < nToPageNum ) - SwLayouter::RemoveMovedFwdFrm( rDoc, *pAnchorTextFrm ); + if ( nAnchorFrameToPageNum < nToPageNum ) + SwLayouter::RemoveMovedFwdFrame( rDoc, *pAnchorTextFrame ); else bInsert = false; } if ( bInsert ) { - SwLayouter::InsertMovedFwdFrm( rDoc, *pAnchorTextFrm, + SwLayouter::InsertMovedFwdFrame( rDoc, *pAnchorTextFrame, nToPageNum ); } } } - if ( aOldPos != (Frm().*fnRect->fnGetPos)() || + if ( aOldPos != (Frame().*fnRect->fnGetPos)() || ( !GetValidPosFlag() && ( pFooter || bPosChgDueToOwnFormat ) ) ) { @@ -459,12 +459,12 @@ void SwFlyAtCntFrm::MakeAll(vcl::RenderContext* pRenderContext) // special loop prevention for dedicated document: if ( bOsz && HasFixSize() && IsClipped() && - GetAnchorFrm()->GetUpper()->IsCellFrm() ) + GetAnchorFrame()->GetUpper()->IsCellFrame() ) { SwFrameFormat* pFormat = GetFormat(); - const SwFormatFrmSize& rFrmSz = pFormat->GetFrmSize(); - if ( rFrmSz.GetWidthPercent() && - rFrmSz.GetHeightPercent() == SwFormatFrmSize::SYNCED ) + const SwFormatFrameSize& rFrameSz = pFormat->GetFrameSize(); + if ( rFrameSz.GetWidthPercent() && + rFrameSz.GetHeightPercent() == SwFormatFrameSize::SYNCED ) { SwFormatSurround aSurround( pFormat->GetSurround() ); if ( aSurround.GetSurround() == SURROUND_NONE ) @@ -474,7 +474,7 @@ void SwFlyAtCntFrm::MakeAll(vcl::RenderContext* pRenderContext) pFormat->SetFormatAttr( aSurround ); pFormat->UnlockModify(); bOsz = false; - OSL_FAIL( "<SwFlyAtCntFrm::MakeAll()> - special loop prevention for dedicated document of b6403541 applied" ); + OSL_FAIL( "<SwFlyAtContentFrame::MakeAll()> - special loop prevention for dedicated document of b6403541 applied" ); } } } @@ -500,19 +500,19 @@ void SwFlyAtCntFrm::MakeAll(vcl::RenderContext* pRenderContext) // #i80924# // handle special case during splitting of table rows if ( bConsiderWrapInfluenceDueToMovedFwdAnchor && - GetAnchorFrm()->IsInTab() && - GetAnchorFrm()->IsInFollowFlowRow() ) + GetAnchorFrame()->IsInTab() && + GetAnchorFrame()->IsInFollowFlowRow() ) { - const SwFrm* pCellFrm = GetAnchorFrm(); - while ( pCellFrm && !pCellFrm->IsCellFrm() ) + const SwFrame* pCellFrame = GetAnchorFrame(); + while ( pCellFrame && !pCellFrame->IsCellFrame() ) { - pCellFrm = pCellFrm->GetUpper(); + pCellFrame = pCellFrame->GetUpper(); } - if ( pCellFrm ) + if ( pCellFrame ) { - SWRECTFN( pCellFrm ) - if ( (pCellFrm->Frm().*fnRect->fnGetTop)() == 0 && - (pCellFrm->Frm().*fnRect->fnGetHeight)() == 0 ) + SWRECTFN( pCellFrame ) + if ( (pCellFrame->Frame().*fnRect->fnGetTop)() == 0 && + (pCellFrame->Frame().*fnRect->fnGetHeight)() == 0 ) { bConsiderWrapInfluenceDueToMovedFwdAnchor = false; } @@ -535,9 +535,9 @@ void SwFlyAtCntFrm::MakeAll(vcl::RenderContext* pRenderContext) #i28701# */ -bool SwFlyAtCntFrm::IsFormatPossible() const +bool SwFlyAtContentFrame::IsFormatPossible() const { - return SwFlyFreeFrm::IsFormatPossible() && + return SwFlyFreeFrame::IsFormatPossible() && !SwOszControl::IsInProgress( this ); } @@ -556,23 +556,23 @@ public: !rTwo.nSub || nSub <= rTwo.nSub ) ); } }; -static const SwFrm * lcl_CalcDownDist( SwDistance &rRet, +static const SwFrame * lcl_CalcDownDist( SwDistance &rRet, const Point &rPt, - const SwContentFrm *pCnt ) + const SwContentFrame *pCnt ) { rRet.nSub = 0; //If the point stays inside the Cnt everything is clear already; the Content //automatically has a distance of 0. - if ( pCnt->Frm().IsInside( rPt ) ) + if ( pCnt->Frame().IsInside( rPt ) ) { rRet.nMain = 0; return pCnt; } else { - const SwLayoutFrm *pUp = pCnt->IsInTab() ? pCnt->FindTabFrm()->GetUpper() : pCnt->GetUpper(); + const SwLayoutFrame *pUp = pCnt->IsInTab() ? pCnt->FindTabFrame()->GetUpper() : pCnt->GetUpper(); // single column sections need to interconnect to their upper - while( pUp->IsSctFrm() ) + while( pUp->IsSctFrame() ) pUp = pUp->GetUpper(); const bool bVert = pUp->IsVertical(); @@ -582,7 +582,7 @@ static const SwFrm * lcl_CalcDownDist( SwDistance &rRet, // #i70582# // --> OD 2009-03-05 - adopted for Support for Classical Mongolian Script const SwTwips nTopForObjPos = lcl_GetTopForObjPos(pCnt, bVert, bVertL2R); - if ( pUp->Frm().IsInside( rPt ) ) + if ( pUp->Frame().IsInside( rPt ) ) { // <rPt> point is inside environment of given content frame // #i70582# @@ -597,21 +597,21 @@ static const SwFrm * lcl_CalcDownDist( SwDistance &rRet, rRet.nMain = rPt.Y() - nTopForObjPos; return pCnt; } - else if ( rPt.Y() <= pUp->Frm().Top() ) + else if ( rPt.Y() <= pUp->Frame().Top() ) { // <rPt> point is above environment of given content frame // correct for vertical layout? rRet.nMain = LONG_MAX; } - else if( rPt.X() < pUp->Frm().Left() && - rPt.Y() <= ( bVert ? pUp->Frm().Top() : pUp->Frm().Bottom() ) ) + else if( rPt.X() < pUp->Frame().Left() && + rPt.Y() <= ( bVert ? pUp->Frame().Top() : pUp->Frame().Bottom() ) ) { // <rPt> point is left of environment of given content frame // seems not to be correct for vertical layout!? - const SwFrm *pLay = pUp->GetLeaf( MAKEPAGE_NONE, false, pCnt ); + const SwFrame *pLay = pUp->GetLeaf( MAKEPAGE_NONE, false, pCnt ); if( !pLay || - (bVert && (pLay->Frm().Top() + pLay->Prt().Bottom()) <rPt.Y())|| - (!bVert && (pLay->Frm().Left() + pLay->Prt().Right())<rPt.X()) ) + (bVert && (pLay->Frame().Top() + pLay->Prt().Bottom()) <rPt.Y())|| + (!bVert && (pLay->Frame().Left() + pLay->Prt().Right())<rPt.X()) ) { // <rPt> point is in left border of environment // #i70582# @@ -633,16 +633,16 @@ static const SwFrm * lcl_CalcDownDist( SwDistance &rRet, { rRet.nMain = bVert ? ( bVertL2R - ? ( (pUp->Frm().Left() + pUp->Prt().Right()) - nTopForObjPos ) - : ( nTopForObjPos - (pUp->Frm().Left() + pUp->Prt().Left() ) ) ) - : ( (pUp->Frm().Top() + pUp->Prt().Bottom()) - nTopForObjPos ); + ? ( (pUp->Frame().Left() + pUp->Prt().Right()) - nTopForObjPos ) + : ( nTopForObjPos - (pUp->Frame().Left() + pUp->Prt().Left() ) ) ) + : ( (pUp->Frame().Top() + pUp->Prt().Bottom()) - nTopForObjPos ); - const SwFrm *pPre = pCnt; - const SwFrm *pLay = pUp->GetLeaf( MAKEPAGE_NONE, true, pCnt ); - SwTwips nFrmTop = 0; + const SwFrame *pPre = pCnt; + const SwFrame *pLay = pUp->GetLeaf( MAKEPAGE_NONE, true, pCnt ); + SwTwips nFrameTop = 0; SwTwips nPrtHeight = 0; bool bSct = false; - const SwSectionFrm *pSect = pUp->FindSctFrm(); + const SwSectionFrame *pSect = pUp->FindSctFrame(); if( pSect ) { rRet.nSub = rRet.nMain; @@ -651,20 +651,20 @@ static const SwFrm * lcl_CalcDownDist( SwDistance &rRet, if( pSect && !pSect->IsAnLower( pLay ) ) { bSct = false; - const SwSectionFrm* pNxtSect = pLay ? pLay->FindSctFrm() : nullptr; + const SwSectionFrame* pNxtSect = pLay ? pLay->FindSctFrame() : nullptr; if (pSect->IsAnFollow(pNxtSect) && pLay) { if( pLay->IsVertical() ) { if ( pLay->IsVertLR() ) - nFrmTop = pLay->Frm().Left(); + nFrameTop = pLay->Frame().Left(); else - nFrmTop = pLay->Frm().Left() + pLay->Frm().Width(); + nFrameTop = pLay->Frame().Left() + pLay->Frame().Width(); nPrtHeight = pLay->Prt().Width(); } else { - nFrmTop = pLay->Frm().Top(); + nFrameTop = pLay->Frame().Top(); nPrtHeight = pLay->Prt().Height(); } pSect = pNxtSect; @@ -676,24 +676,24 @@ static const SwFrm * lcl_CalcDownDist( SwDistance &rRet, { if ( pLay->IsVertLR() ) { - nFrmTop = pSect->Frm().Right(); - nPrtHeight = pLay->Frm().Left() + pLay->Prt().Left() - + pLay->Prt().Width() - pSect->Frm().Left() - - pSect->Frm().Width(); + nFrameTop = pSect->Frame().Right(); + nPrtHeight = pLay->Frame().Left() + pLay->Prt().Left() + + pLay->Prt().Width() - pSect->Frame().Left() + - pSect->Frame().Width(); } else { - nFrmTop = pSect->Frm().Left(); - nPrtHeight = pSect->Frm().Left() - pLay->Frm().Left() + nFrameTop = pSect->Frame().Left(); + nPrtHeight = pSect->Frame().Left() - pLay->Frame().Left() - pLay->Prt().Left(); } } else { - nFrmTop = pSect->Frm().Bottom(); - nPrtHeight = pLay->Frm().Top() + pLay->Prt().Top() - + pLay->Prt().Height() - pSect->Frm().Top() - - pSect->Frm().Height(); + nFrameTop = pSect->Frame().Bottom(); + nPrtHeight = pLay->Frame().Top() + pLay->Prt().Top() + + pLay->Prt().Height() - pSect->Frame().Top() + - pSect->Frame().Height(); } pSect = nullptr; } @@ -704,34 +704,34 @@ static const SwFrm * lcl_CalcDownDist( SwDistance &rRet, { if ( pLay->IsVertLR() ) { - nFrmTop = pLay->Frm().Left(); + nFrameTop = pLay->Frame().Left(); nPrtHeight = pLay->Prt().Width(); } else { - nFrmTop = pLay->Frm().Left() + pLay->Frm().Width(); + nFrameTop = pLay->Frame().Left() + pLay->Frame().Width(); nPrtHeight = pLay->Prt().Width(); } } else { - nFrmTop = pLay->Frm().Top(); + nFrameTop = pLay->Frame().Top(); nPrtHeight = pLay->Prt().Height(); } bSct = nullptr != pSect; } - while ( pLay && !pLay->Frm().IsInside( rPt ) && - ( pLay->Frm().Top() <= rPt.Y() || pLay->IsInFly() || + while ( pLay && !pLay->Frame().IsInside( rPt ) && + ( pLay->Frame().Top() <= rPt.Y() || pLay->IsInFly() || ( pLay->IsInSct() && - pLay->FindSctFrm()->GetUpper()->Frm().Top() <= rPt.Y())) ) + pLay->FindSctFrame()->GetUpper()->Frame().Top() <= rPt.Y())) ) { - if ( pLay->IsFootnoteContFrm() ) + if ( pLay->IsFootnoteContFrame() ) { - if ( !static_cast<const SwLayoutFrm*>(pLay)->Lower() ) + if ( !static_cast<const SwLayoutFrame*>(pLay)->Lower() ) { - SwFrm *pDel = const_cast<SwFrm*>(pLay); + SwFrame *pDel = const_cast<SwFrame*>(pLay); pDel->Cut(); - SwFrm::DestroyFrm(pDel); + SwFrame::DestroyFrame(pDel); return pPre; } return nullptr; @@ -745,10 +745,10 @@ static const SwFrm * lcl_CalcDownDist( SwDistance &rRet, pPre = pLay; pLay = pLay->GetLeaf( MAKEPAGE_NONE, true, pCnt ); if( pSect && !pSect->IsAnLower( pLay ) ) - { // If we're leaving a SwSectionFrm, the next Leaf-Frm - // is the part of the upper below the SectionFrm. - const SwSectionFrm* pNxtSect = pLay ? - pLay->FindSctFrm() : nullptr; + { // If we're leaving a SwSectionFrame, the next Leaf-Frame + // is the part of the upper below the SectionFrame. + const SwSectionFrame* pNxtSect = pLay ? + pLay->FindSctFrame() : nullptr; bSct = false; if (pLay && pSect->IsAnFollow(pNxtSect)) { @@ -757,18 +757,18 @@ static const SwFrm * lcl_CalcDownDist( SwDistance &rRet, { if ( pLay->IsVertLR() ) { - nFrmTop = pLay->Frm().Left(); + nFrameTop = pLay->Frame().Left(); nPrtHeight = pLay->Prt().Width(); } else { - nFrmTop = pLay->Frm().Left() + pLay->Frm().Width(); + nFrameTop = pLay->Frame().Left() + pLay->Frame().Width(); nPrtHeight = pLay->Prt().Width(); } } else { - nFrmTop = pLay->Frm().Top(); + nFrameTop = pLay->Frame().Top(); nPrtHeight = pLay->Prt().Height(); } } @@ -779,24 +779,24 @@ static const SwFrm * lcl_CalcDownDist( SwDistance &rRet, { if ( pLay->IsVertLR() ) { - nFrmTop = pSect->Frm().Right(); - nPrtHeight = pLay->Frm().Left()+pLay->Prt().Left() - + pLay->Prt().Width() - pSect->Frm().Left() - - pSect->Frm().Width(); + nFrameTop = pSect->Frame().Right(); + nPrtHeight = pLay->Frame().Left()+pLay->Prt().Left() + + pLay->Prt().Width() - pSect->Frame().Left() + - pSect->Frame().Width(); } else { - nFrmTop = pSect->Frm().Left(); - nPrtHeight = pSect->Frm().Left() - - pLay->Frm().Left() - pLay->Prt().Left(); + nFrameTop = pSect->Frame().Left(); + nPrtHeight = pSect->Frame().Left() - + pLay->Frame().Left() - pLay->Prt().Left(); } } else { - nFrmTop = pSect->Frm().Bottom(); - nPrtHeight = pLay->Frm().Top()+pLay->Prt().Top() - + pLay->Prt().Height() - pSect->Frm().Top() - - pSect->Frm().Height(); + nFrameTop = pSect->Frame().Bottom(); + nPrtHeight = pLay->Frame().Top()+pLay->Prt().Top() + + pLay->Prt().Height() - pSect->Frame().Top() + - pSect->Frame().Height(); } pSect = nullptr; } @@ -807,18 +807,18 @@ static const SwFrm * lcl_CalcDownDist( SwDistance &rRet, { if ( pLay->IsVertLR() ) { - nFrmTop = pLay->Frm().Left(); + nFrameTop = pLay->Frame().Left(); nPrtHeight = pLay->Prt().Width(); } else { - nFrmTop = pLay->Frm().Left() + pLay->Frm().Width(); + nFrameTop = pLay->Frame().Left() + pLay->Frame().Width(); nPrtHeight = pLay->Prt().Width(); } } else { - nFrmTop = pLay->Frm().Top(); + nFrameTop = pLay->Frame().Top(); nPrtHeight = pLay->Prt().Height(); } bSct = nullptr != pSect; @@ -827,20 +827,20 @@ static const SwFrm * lcl_CalcDownDist( SwDistance &rRet, } if ( pLay ) { - if ( pLay->Frm().IsInside( rPt ) ) + if ( pLay->Frame().IsInside( rPt ) ) { - SwTwips nDiff = pLay->IsVertical() ? ( pLay->IsVertLR() ? ( rPt.X() - nFrmTop ) : ( nFrmTop - rPt.X() ) ) - : ( rPt.Y() - nFrmTop ); + SwTwips nDiff = pLay->IsVertical() ? ( pLay->IsVertLR() ? ( rPt.X() - nFrameTop ) : ( nFrameTop - rPt.X() ) ) + : ( rPt.Y() - nFrameTop ); if( bSct || pSect ) rRet.nSub += nDiff; else rRet.nMain += nDiff; } - if ( pLay->IsFootnoteContFrm() && !static_cast<const SwLayoutFrm*>(pLay)->Lower() ) + if ( pLay->IsFootnoteContFrame() && !static_cast<const SwLayoutFrame*>(pLay)->Lower() ) { - SwFrm *pDel = const_cast<SwFrm*>(pLay); + SwFrame *pDel = const_cast<SwFrame*>(pLay); pDel->Cut(); - SwFrm::DestroyFrm(pDel); + SwFrame::DestroyFrame(pDel); return nullptr; } return pLay; @@ -852,8 +852,8 @@ static const SwFrm * lcl_CalcDownDist( SwDistance &rRet, return nullptr; } -static sal_uInt64 lcl_FindCntDiff( const Point &rPt, const SwLayoutFrm *pLay, - const SwContentFrm *& rpCnt, +static sal_uInt64 lcl_FindCntDiff( const Point &rPt, const SwLayoutFrame *pLay, + const SwContentFrame *& rpCnt, const bool bBody, const bool bFootnote ) { // Searches below pLay the nearest Cnt to the point. The reference point of @@ -863,28 +863,28 @@ static sal_uInt64 lcl_FindCntDiff( const Point &rPt, const SwLayoutFrm *pLay, rpCnt = nullptr; sal_uInt64 nDistance = SAL_MAX_UINT64; sal_uInt64 nNearest = SAL_MAX_UINT64; - const SwContentFrm *pCnt = pLay ? pLay->ContainsContent() : nullptr; + const SwContentFrame *pCnt = pLay ? pLay->ContainsContent() : nullptr; while ( pCnt && (bBody != pCnt->IsInDocBody() || bFootnote != pCnt->IsInFootnote())) { - pCnt = pCnt->GetNextContentFrm(); + pCnt = pCnt->GetNextContentFrame(); if ( !pLay->IsAnLower( pCnt ) ) pCnt = nullptr; } - const SwContentFrm *pNearest = pCnt; + const SwContentFrame *pNearest = pCnt; if ( pCnt ) { do { //Calculate the distance between those two points. //'delta' X^2 + 'delta' Y^2 = 'distance'^2 - sal_uInt64 dX = std::max( pCnt->Frm().Left(), rPt.X() ) - - std::min( pCnt->Frm().Left(), rPt.X() ), - dY = std::max( pCnt->Frm().Top(), rPt.Y() ) - - std::min( pCnt->Frm().Top(), rPt.Y() ); + sal_uInt64 dX = std::max( pCnt->Frame().Left(), rPt.X() ) - + std::min( pCnt->Frame().Left(), rPt.X() ), + dY = std::max( pCnt->Frame().Top(), rPt.Y() ) - + std::min( pCnt->Frame().Top(), rPt.Y() ); // square of the difference will do fine here const sal_uInt64 nDiff = (dX * dX) + (dY * dY); - if ( pCnt->Frm().Top() <= rPt.Y() ) + if ( pCnt->Frame().Top() <= rPt.Y() ) { if ( nDiff < nDistance ) { @@ -898,10 +898,10 @@ static sal_uInt64 lcl_FindCntDiff( const Point &rPt, const SwLayoutFrm *pLay, nNearest = nDiff; pNearest = pCnt; } - pCnt = pCnt->GetNextContentFrm(); + pCnt = pCnt->GetNextContentFrame(); while ( pCnt && (bBody != pCnt->IsInDocBody() || bFootnote != pCnt->IsInFootnote())) - pCnt = pCnt->GetNextContentFrm(); + pCnt = pCnt->GetNextContentFrame(); } while ( pCnt && pLay->IsAnLower( pCnt ) ); } @@ -912,19 +912,19 @@ static sal_uInt64 lcl_FindCntDiff( const Point &rPt, const SwLayoutFrm *pLay, return nDistance; } -static const SwContentFrm * lcl_FindCnt( const Point &rPt, const SwContentFrm *pCnt, +static const SwContentFrame * lcl_FindCnt( const Point &rPt, const SwContentFrame *pCnt, const bool bBody, const bool bFootnote ) { - //Starting from pCnt searches the ContentFrm whose left upper corner is the + //Starting from pCnt searches the ContentFrame whose left upper corner is the //nearest to the point. - //Always returns a ContentFrm. + //Always returns a ContentFrame. //First the nearest Content inside the page which contains the Content is //searched. Starting from this page the pages in both directions need to //be considered. If possible a Content is returned whose Y-position is //above the point. - const SwContentFrm *pRet, *pNew; - const SwLayoutFrm *pLay = pCnt->FindPageFrm(); + const SwContentFrame *pRet, *pNew; + const SwLayoutFrame *pLay = pCnt->FindPageFrame(); sal_uInt64 nDist; // not sure if a sal_Int32 would be enough? nDist = ::lcl_FindCntDiff( rPt, pLay, pNew, bBody, bFootnote ); @@ -934,20 +934,20 @@ static const SwContentFrm * lcl_FindCnt( const Point &rPt, const SwContentFrm *p { pRet = pCnt; nDist = SAL_MAX_UINT64; } - const SwContentFrm *pNearest = pRet; + const SwContentFrame *pNearest = pRet; sal_uInt64 nNearest = nDist; if ( pLay ) { - const SwLayoutFrm *pPge = pLay; + const SwLayoutFrame *pPge = pLay; sal_uInt64 nOldNew = SAL_MAX_UINT64; for ( int i = 0; pPge->GetPrev() && (i < 3); ++i ) { - pPge = static_cast<const SwLayoutFrm*>(pPge->GetPrev()); + pPge = static_cast<const SwLayoutFrame*>(pPge->GetPrev()); const sal_uInt64 nNew = ::lcl_FindCntDiff( rPt, pPge, pNew, bBody, bFootnote ); if ( nNew < nDist ) { - if ( pNew->Frm().Top() <= rPt.Y() ) + if ( pNew->Frame().Top() <= rPt.Y() ) { pRet = pNearest = pNew; nDist = nNearest = nNew; @@ -968,11 +968,11 @@ static const SwContentFrm * lcl_FindCnt( const Point &rPt, const SwContentFrm *p nOldNew = SAL_MAX_UINT64; for ( int j = 0; pPge->GetNext() && (j < 3); ++j ) { - pPge = static_cast<const SwLayoutFrm*>(pPge->GetNext()); + pPge = static_cast<const SwLayoutFrame*>(pPge->GetNext()); const sal_uInt64 nNew = ::lcl_FindCntDiff( rPt, pPge, pNew, bBody, bFootnote ); if ( nNew < nDist ) { - if ( pNew->Frm().Top() <= rPt.Y() ) + if ( pNew->Frame().Top() <= rPt.Y() ) { pRet = pNearest = pNew; nDist = nNearest = nNew; @@ -989,16 +989,16 @@ static const SwContentFrm * lcl_FindCnt( const Point &rPt, const SwContentFrm *p nOldNew = nNew; } } - if ( (pRet->Frm().Top() > rPt.Y()) ) + if ( (pRet->Frame().Top() > rPt.Y()) ) return pNearest; else return pRet; } -static void lcl_PointToPrt( Point &rPoint, const SwFrm *pFrm ) +static void lcl_PointToPrt( Point &rPoint, const SwFrame *pFrame ) { - SwRect aTmp( pFrm->Prt() ); - aTmp += pFrm->Frm().Pos(); + SwRect aTmp( pFrame->Prt() ); + aTmp += pFrame->Frame().Pos(); if ( rPoint.getX() < aTmp.Left() ) rPoint.setX(aTmp.Left()); else if ( rPoint.getX() > aTmp.Right() ) @@ -1015,24 +1015,24 @@ static void lcl_PointToPrt( Point &rPoint, const SwFrm *pFrm ) * This is used to show anchors as well as changing anchors * when dragging paragraph bound objects. */ -const SwContentFrm *FindAnchor( const SwFrm *pOldAnch, const Point &rNew, +const SwContentFrame *FindAnchor( const SwFrame *pOldAnch, const Point &rNew, const bool bBodyOnly ) { //Search the nearest Cnt around the given document position in the text - //flow. The given anchor is the starting Frm. - const SwContentFrm* pCnt; - if ( pOldAnch->IsContentFrm() ) + //flow. The given anchor is the starting Frame. + const SwContentFrame* pCnt; + if ( pOldAnch->IsContentFrame() ) { - pCnt = static_cast<const SwContentFrm*>(pOldAnch); + pCnt = static_cast<const SwContentFrame*>(pOldAnch); } else { Point aTmp( rNew ); - const SwLayoutFrm *pTmpLay = static_cast<const SwLayoutFrm*>(pOldAnch); - if( pTmpLay->IsRootFrm() ) + const SwLayoutFrame *pTmpLay = static_cast<const SwLayoutFrame*>(pOldAnch); + if( pTmpLay->IsRootFrame() ) { SwRect aTmpRect( aTmp, Size(0,0) ); - pTmpLay = static_cast<const SwLayoutFrm*>(::FindPage( aTmpRect, pTmpLay->Lower() )); + pTmpLay = static_cast<const SwLayoutFrame*>(::FindPage( aTmpRect, pTmpLay->Lower() )); } pCnt = pTmpLay->GetContentPos( aTmp, false, bBodyOnly ); } @@ -1046,23 +1046,23 @@ const SwContentFrm *FindAnchor( const SwFrm *pOldAnch, const Point &rNew, if ( bBody ) { //#38848 drag from page margin into the body. - const SwFrm *pPage = pCnt->FindPageFrm(); + const SwFrame *pPage = pCnt->FindPageFrame(); ::lcl_PointToPrt( aNew, pPage->GetUpper() ); SwRect aTmp( aNew, Size( 0, 0 ) ); pPage = ::FindPage( aTmp, pPage ); ::lcl_PointToPrt( aNew, pPage ); } - if ( pCnt->IsInDocBody() == bBody && pCnt->Frm().IsInside( aNew ) ) + if ( pCnt->IsInDocBody() == bBody && pCnt->Frame().IsInside( aNew ) ) return pCnt; - else if ( pOldAnch->IsInDocBody() || pOldAnch->IsPageFrm() ) + else if ( pOldAnch->IsInDocBody() || pOldAnch->IsPageFrame() ) { // Maybe the selected anchor is on the same page as the current anchor. // With this we won't run into problems with the columns. Point aTmp( aNew ); - const SwContentFrm *pTmp = pCnt->FindPageFrm()-> + const SwContentFrame *pTmp = pCnt->FindPageFrame()-> GetContentPos( aTmp, false, true ); - if ( pTmp && pTmp->Frm().IsInside( aNew ) ) + if ( pTmp && pTmp->Frame().IsInside( aNew ) ) return pTmp; } @@ -1070,83 +1070,83 @@ const SwContentFrm *FindAnchor( const SwFrm *pOldAnch, const Point &rNew, //the nearest one respectively. //Not the direct distance is relevant but the distance which needs to be //traveled through the text flow. - const SwContentFrm *pUpLst; - const SwContentFrm *pUpFrm = pCnt; + const SwContentFrame *pUpLst; + const SwContentFrame *pUpFrame = pCnt; SwDistance nUp, nUpLst; - ::lcl_CalcDownDist( nUp, aNew, pUpFrm ); + ::lcl_CalcDownDist( nUp, aNew, pUpFrame ); SwDistance nDown = nUp; bool bNegAllowed = true;// Make it possible to leave the negative section once. do { - pUpLst = pUpFrm; nUpLst = nUp; - pUpFrm = pUpLst->GetPrevContentFrm(); - while ( pUpFrm && - (bBody != pUpFrm->IsInDocBody() || bFootnote != pUpFrm->IsInFootnote())) - pUpFrm = pUpFrm->GetPrevContentFrm(); - if ( pUpFrm ) + pUpLst = pUpFrame; nUpLst = nUp; + pUpFrame = pUpLst->GetPrevContentFrame(); + while ( pUpFrame && + (bBody != pUpFrame->IsInDocBody() || bFootnote != pUpFrame->IsInFootnote())) + pUpFrame = pUpFrame->GetPrevContentFrame(); + if ( pUpFrame ) { - ::lcl_CalcDownDist( nUp, aNew, pUpFrm ); + ::lcl_CalcDownDist( nUp, aNew, pUpFrame ); //It makes sense to search further, if the distance grows inside //a table. - if ( pUpLst->IsInTab() && pUpFrm->IsInTab() ) + if ( pUpLst->IsInTab() && pUpFrame->IsInTab() ) { - while ( pUpFrm && ((nUpLst < nUp && pUpFrm->IsInTab()) || - bBody != pUpFrm->IsInDocBody()) ) + while ( pUpFrame && ((nUpLst < nUp && pUpFrame->IsInTab()) || + bBody != pUpFrame->IsInDocBody()) ) { - pUpFrm = pUpFrm->GetPrevContentFrm(); - if ( pUpFrm ) - ::lcl_CalcDownDist( nUp, aNew, pUpFrm ); + pUpFrame = pUpFrame->GetPrevContentFrame(); + if ( pUpFrame ) + ::lcl_CalcDownDist( nUp, aNew, pUpFrame ); } } } - if ( !pUpFrm ) + if ( !pUpFrame ) nUp.nMain = LONG_MAX; if ( nUp.nMain >= 0 && LONG_MAX != nUp.nMain ) { bNegAllowed = false; if ( nUpLst.nMain < 0 ) //don't take the wrong one, if the value //just changed from negative to positive. - { pUpLst = pUpFrm; + { pUpLst = pUpFrame; nUpLst = nUp; } } - } while ( pUpFrm && ( ( bNegAllowed && nUp.nMain < 0 ) || ( nUp <= nUpLst ) ) ); + } while ( pUpFrame && ( ( bNegAllowed && nUp.nMain < 0 ) || ( nUp <= nUpLst ) ) ); - const SwContentFrm *pDownLst; - const SwContentFrm *pDownFrm = pCnt; + const SwContentFrame *pDownLst; + const SwContentFrame *pDownFrame = pCnt; SwDistance nDownLst; if ( nDown.nMain < 0 ) nDown.nMain = LONG_MAX; do { - pDownLst = pDownFrm; nDownLst = nDown; - pDownFrm = pDownLst->GetNextContentFrm(); - while ( pDownFrm && - (bBody != pDownFrm->IsInDocBody() || bFootnote != pDownFrm->IsInFootnote())) - pDownFrm = pDownFrm->GetNextContentFrm(); - if ( pDownFrm ) + pDownLst = pDownFrame; nDownLst = nDown; + pDownFrame = pDownLst->GetNextContentFrame(); + while ( pDownFrame && + (bBody != pDownFrame->IsInDocBody() || bFootnote != pDownFrame->IsInFootnote())) + pDownFrame = pDownFrame->GetNextContentFrame(); + if ( pDownFrame ) { - ::lcl_CalcDownDist( nDown, aNew, pDownFrm ); + ::lcl_CalcDownDist( nDown, aNew, pDownFrame ); if ( nDown.nMain < 0 ) nDown.nMain = LONG_MAX; //It makes sense to search further, if the distance grows inside //a table. - if ( pDownLst->IsInTab() && pDownFrm->IsInTab() ) + if ( pDownLst->IsInTab() && pDownFrame->IsInTab() ) { - while ( pDownFrm && ( ( nDown.nMain != LONG_MAX && pDownFrm->IsInTab()) || bBody != pDownFrm->IsInDocBody() ) ) + while ( pDownFrame && ( ( nDown.nMain != LONG_MAX && pDownFrame->IsInTab()) || bBody != pDownFrame->IsInDocBody() ) ) { - pDownFrm = pDownFrm->GetNextContentFrm(); - if ( pDownFrm ) - ::lcl_CalcDownDist( nDown, aNew, pDownFrm ); + pDownFrame = pDownFrame->GetNextContentFrame(); + if ( pDownFrame ) + ::lcl_CalcDownDist( nDown, aNew, pDownFrame ); if ( nDown.nMain < 0 ) nDown.nMain = LONG_MAX; } } } - if ( !pDownFrm ) + if ( !pDownFrame ) nDown.nMain = LONG_MAX; - } while ( pDownFrm && nDown <= nDownLst && + } while ( pDownFrame && nDown <= nDownLst && nDown.nMain != LONG_MAX && nDownLst.nMain != LONG_MAX ); //If we couldn't find one in both directions, we'll search the Content whose @@ -1166,40 +1166,40 @@ const SwContentFrm *FindAnchor( const SwFrm *pOldAnch, const Point &rNew, return nDownLst < nUpLst ? pDownLst : pUpLst; } -void SwFlyAtCntFrm::SetAbsPos( const Point &rNew ) +void SwFlyAtContentFrame::SetAbsPos( const Point &rNew ) { - SwPageFrm *pOldPage = FindPageFrm(); + SwPageFrame *pOldPage = FindPageFrame(); const SwRect aOld( GetObjRectWithSpaces() ); Point aNew( rNew ); - if( ( GetAnchorFrm()->IsVertical() && !GetAnchorFrm()->IsVertLR() ) || GetAnchorFrm()->IsRightToLeft() ) - aNew.setX(aNew.getX() + Frm().Width()); - SwContentFrm *pCnt = const_cast<SwContentFrm*>(::FindAnchor( GetAnchorFrm(), aNew )); + if( ( GetAnchorFrame()->IsVertical() && !GetAnchorFrame()->IsVertLR() ) || GetAnchorFrame()->IsRightToLeft() ) + aNew.setX(aNew.getX() + Frame().Width()); + SwContentFrame *pCnt = const_cast<SwContentFrame*>(::FindAnchor( GetAnchorFrame(), aNew )); if( pCnt->IsProtected() ) - pCnt = const_cast<SwContentFrm*>(static_cast<const SwContentFrm*>(GetAnchorFrm())); + pCnt = const_cast<SwContentFrame*>(static_cast<const SwContentFrame*>(GetAnchorFrame())); - SwPageFrm *pTmpPage = nullptr; + SwPageFrame *pTmpPage = nullptr; const bool bVert = pCnt->IsVertical(); const bool bVertL2R = pCnt->IsVertLR(); const bool bRTL = pCnt->IsRightToLeft(); - if( ( !bVert != !GetAnchorFrm()->IsVertical() ) || - ( !bRTL != !GetAnchorFrm()->IsRightToLeft() ) ) + if( ( !bVert != !GetAnchorFrame()->IsVertical() ) || + ( !bRTL != !GetAnchorFrame()->IsRightToLeft() ) ) { if( bVert || bRTL ) - aNew.setX(aNew.getX() + Frm().Width()); + aNew.setX(aNew.getX() + Frame().Width()); else - aNew.setX(aNew.getX() - Frm().Width()); + aNew.setX(aNew.getX() - Frame().Width()); } if ( pCnt->IsInDocBody() ) { //#38848 drag from page margin into the body. - pTmpPage = pCnt->FindPageFrm(); + pTmpPage = pCnt->FindPageFrame(); ::lcl_PointToPrt( aNew, pTmpPage->GetUpper() ); SwRect aTmp( aNew, Size( 0, 0 ) ); - pTmpPage = const_cast<SwPageFrm*>(static_cast<const SwPageFrm*>(::FindPage( aTmp, pTmpPage ))); + pTmpPage = const_cast<SwPageFrame*>(static_cast<const SwPageFrame*>(::FindPage( aTmp, pTmpPage ))); ::lcl_PointToPrt( aNew, pTmpPage ); } @@ -1207,25 +1207,25 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew ) //rNew is an absolute position. We need to calculate the distance from rNew //to the anchor inside the text flow to correctly set RelPos. //!!!!!We can optimize here: FindAnchor could also return RelPos! - const SwFrm *pFrm = nullptr; + const SwFrame *pFrame = nullptr; SwTwips nY; - if ( pCnt->Frm().IsInside( aNew ) ) + if ( pCnt->Frame().IsInside( aNew ) ) { // #i70582# if ( bVert ) { - nY = pCnt->Frm().Left() - rNew.X(); + nY = pCnt->Frame().Left() - rNew.X(); if ( bVertL2R ) nY = -nY; - nY -= pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid(); + nY -= pCnt->GetUpperSpaceAmountConsideredForPrevFrameAndPageGrid(); } else - nY = rNew.Y() - pCnt->Frm().Top() + pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid(); + nY = rNew.Y() - pCnt->Frame().Top() + pCnt->GetUpperSpaceAmountConsideredForPrevFrameAndPageGrid(); } else { SwDistance aDist; - pFrm = ::lcl_CalcDownDist( aDist, aNew, pCnt ); + pFrame = ::lcl_CalcDownDist( aDist, aNew, pCnt ); nY = aDist.nMain + aDist.nSub; } @@ -1235,16 +1235,16 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew ) { // Flys are never attached to the follow but always to the master, // which we're going to search now. - const SwContentFrm *pOriginal = pCnt; - const SwContentFrm *pFollow = pCnt; + const SwContentFrame *pOriginal = pCnt; + const SwContentFrame *pFollow = pCnt; while ( pCnt->IsFollow() ) { do { - SwContentFrm* pPrev = pCnt->GetPrevContentFrm(); + SwContentFrame* pPrev = pCnt->GetPrevContentFrame(); if (!pPrev) { - SAL_WARN("sw.core", "very unexpected missing PrevContentFrm"); + SAL_WARN("sw.core", "very unexpected missing PrevContentFrame"); break; } pCnt = pPrev; @@ -1254,14 +1254,14 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew ) } SwTwips nDiff = 0; do - { const SwFrm *pUp = pFollow->GetUpper(); + { const SwFrame *pUp = pFollow->GetUpper(); if( pUp->IsVertical() ) { if ( pUp->IsVertLR() ) nDiff += pUp->Prt().Width() - pFollow->GetRelPos().getX(); else - nDiff += pFollow->Frm().Left() + pFollow->Frm().Width() - - pUp->Frm().Left() - pUp->Prt().Left(); + nDiff += pFollow->Frame().Left() + pFollow->Frame().Width() + - pUp->Frame().Left() - pUp->Prt().Left(); } else nDiff += pUp->Prt().Height() - pFollow->GetRelPos().Y(); @@ -1269,9 +1269,9 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew ) } while ( pFollow != pOriginal ); nY += nDiff; if( bVert ) - nX = pCnt->Frm().Top() - pOriginal->Frm().Top(); + nX = pCnt->Frame().Top() - pOriginal->Frame().Top(); else - nX = pCnt->Frm().Left() - pOriginal->Frm().Left(); + nX = pCnt->Frame().Left() - pOriginal->Frame().Left(); } if ( nY == LONG_MAX ) @@ -1295,41 +1295,41 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew ) if( bVert ) { - if( !pFrm ) - nX += rNew.Y() - pCnt->Frm().Top(); + if( !pFrame ) + nX += rNew.Y() - pCnt->Frame().Top(); else - nX = rNew.Y() - pFrm->Frm().Top(); + nX = rNew.Y() - pFrame->Frame().Top(); } else { - if( !pFrm ) + if( !pFrame ) { if ( pCnt->IsRightToLeft() ) - nX += pCnt->Frm().Right() - rNew.X() - Frm().Width(); + nX += pCnt->Frame().Right() - rNew.X() - Frame().Width(); else - nX += rNew.X() - pCnt->Frm().Left(); + nX += rNew.X() - pCnt->Frame().Left(); } else { - if ( pFrm->IsRightToLeft() ) - nX += pFrm->Frm().Right() - rNew.X() - Frm().Width(); + if ( pFrame->IsRightToLeft() ) + nX += pFrame->Frame().Right() - rNew.X() - Frame().Width(); else - nX = rNew.X() - pFrm->Frm().Left(); + nX = rNew.X() - pFrame->Frame().Left(); } } GetFormat()->GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr ); - if( pCnt != GetAnchorFrm() || ( IsAutoPos() && pCnt->IsTextFrm() && + if( pCnt != GetAnchorFrame() || ( IsAutoPos() && pCnt->IsTextFrame() && GetFormat()->getIDocumentSettingAccess().get(DocumentSettingId::HTML_MODE)) ) { //Set the anchor attribute according to the new Cnt. SwFormatAnchor aAnch( pFormat->GetAnchor() ); SwPosition pos = *aAnch.GetContentAnchor(); - if( IsAutoPos() && pCnt->IsTextFrm() ) + if( IsAutoPos() && pCnt->IsTextFrame() ) { - SwCrsrMoveState eTmpState( MV_SETONLYTEXT ); + SwCursorMoveState eTmpState( MV_SETONLYTEXT ); Point aPt( rNew ); - if( pCnt->GetCrsrOfst( &pos, aPt, &eTmpState ) + if( pCnt->GetCursorOfst( &pos, aPt, &eTmpState ) && pos.nNode == *pCnt->GetNode() ) { if ( pCnt->GetNode()->GetTextNode() != nullptr ) @@ -1369,8 +1369,8 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew ) pFormat->GetDoc()->SetAttr( aAnch, *pFormat ); } } - else if ( pTmpPage && pTmpPage != GetPageFrm() ) - GetPageFrm()->MoveFly( this, pTmpPage ); + else if ( pTmpPage && pTmpPage != GetPageFrame() ) + GetPageFrame()->MoveFly( this, pTmpPage ); const Point aRelPos = bVert ? Point( -nY, nX ) : Point( nX, nY ); @@ -1378,7 +1378,7 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew ) GetFormat()->GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr ); - if ( pOldPage != FindPageFrm() ) + if ( pOldPage != FindPageFrame() ) ::Notify_Background( GetVirtDrawObj(), pOldPage, aOld, PREP_FLY_LEAVE, false ); } @@ -1386,26 +1386,26 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew ) page frame #i28701# - takes over functionality of deleted method <SwFlyAtCntFrm::AssertPage()> + takes over functionality of deleted method <SwFlyAtContentFrame::AssertPage()> */ -void SwFlyAtCntFrm::RegisterAtCorrectPage() +void SwFlyAtContentFrame::RegisterAtCorrectPage() { - SwPageFrm* pPageFrm( nullptr ); - if ( GetVertPosOrientFrm() ) + SwPageFrame* pPageFrame( nullptr ); + if ( GetVertPosOrientFrame() ) { - pPageFrm = const_cast<SwPageFrm*>(GetVertPosOrientFrm()->FindPageFrm()); + pPageFrame = const_cast<SwPageFrame*>(GetVertPosOrientFrame()->FindPageFrame()); } - if ( pPageFrm && GetPageFrm() != pPageFrm ) + if ( pPageFrame && GetPageFrame() != pPageFrame ) { - if ( GetPageFrm() ) - GetPageFrm()->MoveFly( this, pPageFrm ); + if ( GetPageFrame() ) + GetPageFrame()->MoveFly( this, pPageFrame ); else - pPageFrm->AppendFlyToPage( this ); + pPageFrame->AppendFlyToPage( this ); } } // #i26791# -void SwFlyAtCntFrm::MakeObjPos() +void SwFlyAtContentFrame::MakeObjPos() { // if fly frame position is valid, nothing is to do. Thus, return if ( mbValidPos ) @@ -1420,8 +1420,8 @@ void SwFlyAtCntFrm::MakeObjPos() // anchored object is marked that it clears its environment and its // environment is already cleared. // before checking for cleared environment - // check, if member <mpVertPosOrientFrm> is set. - if ( GetVertPosOrientFrm() && + // check, if member <mpVertPosOrientFrame> is set. + if ( GetVertPosOrientFrame() && ClearedEnvironment() && HasClearedEnvironment() ) { return; @@ -1432,13 +1432,13 @@ void SwFlyAtCntFrm::MakeObjPos() aObjPositioning( *GetVirtDrawObj() ); aObjPositioning.CalcPosition(); - SetVertPosOrientFrm ( aObjPositioning.GetVertPosOrientFrm() ); + SetVertPosOrientFrame ( aObjPositioning.GetVertPosOrientFrame() ); } // #i28701# -bool SwFlyAtCntFrm::_InvalidationAllowed( const InvalidationType _nInvalid ) const +bool SwFlyAtContentFrame::_InvalidationAllowed( const InvalidationType _nInvalid ) const { - bool bAllowed( SwFlyFreeFrm::_InvalidationAllowed( _nInvalid ) ); + bool bAllowed( SwFlyFreeFrame::_InvalidationAllowed( _nInvalid ) ); // forbiddance of base instance can't be over ruled. if ( bAllowed ) diff --git a/sw/source/core/layout/flyincnt.cxx b/sw/source/core/layout/flyincnt.cxx index c0a41ec2fa8f..b900bd08c9f6 100644 --- a/sw/source/core/layout/flyincnt.cxx +++ b/sw/source/core/layout/flyincnt.cxx @@ -28,8 +28,8 @@ #include <IDocumentSettingAccess.hxx> #include <IDocumentDrawModelAccess.hxx> -SwFlyInCntFrm::SwFlyInCntFrm( SwFlyFrameFormat *pFormat, SwFrm* pSib, SwFrm *pAnch ) : - SwFlyFrm( pFormat, pSib, pAnch ) +SwFlyInContentFrame::SwFlyInContentFrame( SwFlyFrameFormat *pFormat, SwFrame* pSib, SwFrame *pAnch ) : + SwFlyFrame( pFormat, pSib, pAnch ) { m_bInCnt = bInvalidLayout = bInvalidContent = true; SwTwips nRel = pFormat->GetVertOrient().GetPos(); @@ -42,24 +42,24 @@ SwFlyInCntFrm::SwFlyInCntFrm( SwFlyFrameFormat *pFormat, SwFrm* pSib, SwFrm *pAn SetCurrRelPos( aRelPos ); } -void SwFlyInCntFrm::DestroyImpl() +void SwFlyInContentFrame::DestroyImpl() { - if ( !GetFormat()->GetDoc()->IsInDtor() && GetAnchorFrm() ) + if ( !GetFormat()->GetDoc()->IsInDtor() && GetAnchorFrame() ) { SwRect aTmp( GetObjRectWithSpaces() ); - SwFlyInCntFrm::NotifyBackground( FindPageFrm(), aTmp, PREP_FLY_LEAVE ); + SwFlyInContentFrame::NotifyBackground( FindPageFrame(), aTmp, PREP_FLY_LEAVE ); } - SwFlyFrm::DestroyImpl(); + SwFlyFrame::DestroyImpl(); } -SwFlyInCntFrm::~SwFlyInCntFrm() +SwFlyInContentFrame::~SwFlyInContentFrame() { } // #i28701# -void SwFlyInCntFrm::SetRefPoint( const Point& rPoint, +void SwFlyInContentFrame::SetRefPoint( const Point& rPoint, const Point& rRelAttr, const Point& rRelPos ) { @@ -72,8 +72,8 @@ void SwFlyInCntFrm::SetRefPoint( const Point& rPoint, pNotify = new SwFlyNotify( this ); aRef = rPoint; SetCurrRelPos( rRelAttr ); - SWRECTFN( GetAnchorFrm() ) - (Frm().*fnRect->fnSetPos)( rPoint + rRelPos ); + SWRECTFN( GetAnchorFrame() ) + (Frame().*fnRect->fnSetPos)( rPoint + rRelPos ); // #i68520# InvalidateObjRectWithSpaces(); if( pNotify ) @@ -81,12 +81,12 @@ void SwFlyInCntFrm::SetRefPoint( const Point& rPoint, InvalidatePage(); mbValidPos = false; m_bInvalid = true; - Calc(getRootFrm()->GetCurrShell()->GetOut()); + Calc(getRootFrame()->GetCurrShell()->GetOut()); delete pNotify; } } -void SwFlyInCntFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) +void SwFlyInContentFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) { bool bCallPrepare = false; const sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0; @@ -107,40 +107,40 @@ void SwFlyInCntFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) aNew.ClearItem( RES_FRMMACRO ); if( aNew.Count() ) { - SwFlyFrm::Modify( &aOld, &aNew ); + SwFlyFrame::Modify( &aOld, &aNew ); bCallPrepare = true; } } else if( static_cast<const SwAttrSetChg*>(pNew)->GetChgSet()->Count()) { - SwFlyFrm::Modify( pOld, pNew ); + SwFlyFrame::Modify( pOld, pNew ); bCallPrepare = true; } } else if( nWhich != RES_SURROUND && RES_FRMMACRO != nWhich ) { - SwFlyFrm::Modify( pOld, pNew ); + SwFlyFrame::Modify( pOld, pNew ); bCallPrepare = true; } - if ( bCallPrepare && GetAnchorFrm() ) - AnchorFrm()->Prepare( PREP_FLY_ATTR_CHG, GetFormat() ); + if ( bCallPrepare && GetAnchorFrame() ) + AnchorFrame()->Prepare( PREP_FLY_ATTR_CHG, GetFormat() ); } /// Here the content gets formatted initially. -void SwFlyInCntFrm::Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs ) +void SwFlyInContentFrame::Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs ) { - if ( !Frm().Height() ) + if ( !Frame().Height() ) { Lock(); //don't format the anchor on the crook. - SwContentFrm *pContent = ContainsContent(); + SwContentFrame *pContent = ContainsContent(); while ( pContent ) { pContent->Calc(pRenderContext); - pContent = pContent->GetNextContentFrm(); + pContent = pContent->GetNextContentFrame(); } Unlock(); } - SwFlyFrm::Format( pRenderContext, pAttrs ); + SwFlyFrame::Format( pRenderContext, pAttrs ); } /** Calculate object position @@ -148,7 +148,7 @@ void SwFlyInCntFrm::Format( vcl::RenderContext* pRenderContext, const SwBorderAt * @note: In contrast to other Frames, we only calculate the relative position * here. The absolute position is only calculated using SetAbsPos. **/ -void SwFlyInCntFrm::MakeObjPos() +void SwFlyInContentFrame::MakeObjPos() { if ( !mbValidPos ) { @@ -157,8 +157,8 @@ void SwFlyInCntFrm::MakeObjPos() const SwFormatVertOrient &rVert = pFormat->GetVertOrient(); //Update the current values in the format if needed, during this we of //course must not send any Modify. - const bool bVert = GetAnchorFrm()->IsVertical(); - const bool bRev = GetAnchorFrm()->IsReverse(); + const bool bVert = GetAnchorFrame()->IsVertical(); + const bool bRev = GetAnchorFrame()->IsReverse(); SwTwips nOld = rVert.GetPos(); SwTwips nAct = bVert ? -GetCurrRelPos().X() : GetCurrRelPos().Y(); if( bRev ) @@ -174,36 +174,36 @@ void SwFlyInCntFrm::MakeObjPos() } } -void SwFlyInCntFrm::_ActionOnInvalidation( const InvalidationType _nInvalid ) +void SwFlyInContentFrame::_ActionOnInvalidation( const InvalidationType _nInvalid ) { if ( INVALID_POS == _nInvalid || INVALID_ALL == _nInvalid ) - AnchorFrm()->Prepare( PREP_FLY_ATTR_CHG, &GetFrameFormat() ); + AnchorFrame()->Prepare( PREP_FLY_ATTR_CHG, &GetFrameFormat() ); } -void SwFlyInCntFrm::NotifyBackground( SwPageFrm *, const SwRect& rRect, +void SwFlyInContentFrame::NotifyBackground( SwPageFrame *, const SwRect& rRect, PrepareHint eHint) { if ( eHint == PREP_FLY_ATTR_CHG ) - AnchorFrm()->Prepare( PREP_FLY_ATTR_CHG ); + AnchorFrame()->Prepare( PREP_FLY_ATTR_CHG ); else - AnchorFrm()->Prepare( eHint, static_cast<void const *>(&rRect) ); + AnchorFrame()->Prepare( eHint, static_cast<void const *>(&rRect) ); } -const Point SwFlyInCntFrm::GetRelPos() const +const Point SwFlyInContentFrame::GetRelPos() const { - Calc(getRootFrm()->GetCurrShell()->GetOut()); + Calc(getRootFrame()->GetCurrShell()->GetOut()); return GetCurrRelPos(); } -/// @see SwRowFrm::RegistFlys() -void SwFlyInCntFrm::RegistFlys() +/// @see SwRowFrame::RegistFlys() +void SwFlyInContentFrame::RegistFlys() { - SwPageFrm *pPage = FindPageFrm(); + SwPageFrame *pPage = FindPageFrame(); OSL_ENSURE( pPage, "Register Flys without pages?" ); ::RegistFlys( pPage, this ); } -void SwFlyInCntFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) +void SwFlyInContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/) { // OD 2004-01-19 #110582# if ( !GetFormat()->GetDoc()->getIDocumentDrawModelAccess().IsVisibleLayerId( GetVirtDrawObj()->GetLayer() ) ) @@ -211,14 +211,14 @@ void SwFlyInCntFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) return; } - if ( !GetAnchorFrm() || IsLocked() || IsColLocked() || !FindPageFrm() ) + if ( !GetAnchorFrame() || IsLocked() || IsColLocked() || !FindPageFrame() ) return; Lock(); // The curtain falls //does the notification in the DTor const SwFlyNotify aNotify( this ); - SwBorderAttrAccess aAccess( SwFrm::GetCache(), this ); + SwBorderAttrAccess aAccess( SwFrame::GetCache(), this ); const SwBorderAttrs &rAttrs = *aAccess.Get(); if ( IsClipped() ) @@ -239,7 +239,7 @@ void SwFlyInCntFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) } if ( !mbValidSize ) - Format( getRootFrm()->GetCurrShell()->GetOut(), &rAttrs ); + Format( getRootFrame()->GetCurrShell()->GetOut(), &rAttrs ); if ( !mbValidPos ) { @@ -254,11 +254,11 @@ void SwFlyInCntFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) if ( mbValidPos && mbValidSize && GetFormat()->getIDocumentSettingAccess().get( DocumentSettingId::CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAME ) ) { - SwFrm* pFrm = AnchorFrm(); - if ( Frm().Left() == (pFrm->Frm().Left()+pFrm->Prt().Left()) && - Frm().Width() > pFrm->Prt().Width() ) + SwFrame* pFrame = AnchorFrame(); + if ( Frame().Left() == (pFrame->Frame().Left()+pFrame->Prt().Left()) && + Frame().Width() > pFrame->Prt().Width() ) { - Frm().Width( pFrm->Prt().Width() ); + Frame().Width( pFrame->Prt().Width() ); mbValidPrtArea = false; m_bWidthClipped = true; } diff --git a/sw/source/core/layout/flylay.cxx b/sw/source/core/layout/flylay.cxx index 951f5c8b29e3..9088d5601b08 100644 --- a/sw/source/core/layout/flylay.cxx +++ b/sw/source/core/layout/flylay.cxx @@ -43,79 +43,79 @@ using namespace ::com::sun::star; -SwFlyFreeFrm::SwFlyFreeFrm( SwFlyFrameFormat *pFormat, SwFrm* pSib, SwFrm *pAnch ) : - SwFlyFrm( pFormat, pSib, pAnch ), +SwFlyFreeFrame::SwFlyFreeFrame( SwFlyFrameFormat *pFormat, SwFrame* pSib, SwFrame *pAnch ) : + SwFlyFrame( pFormat, pSib, pAnch ), // #i34753# mbNoMakePos( false ), // #i37068# mbNoMoveOnCheckClip( false ), - maUnclippedFrm( ) + maUnclippedFrame( ) { } -void SwFlyFreeFrm::DestroyImpl() +void SwFlyFreeFrame::DestroyImpl() { - // #i28701# - use new method <GetPageFrm()> - if( GetPageFrm() ) + // #i28701# - use new method <GetPageFrame()> + if( GetPageFrame() ) { if( GetFormat()->GetDoc()->IsInDtor() ) { // #i29879# - remove also to-frame anchored Writer // fly frame from page. const bool bRemoveFromPage = - GetPageFrm()->GetSortedObjs() && - ( IsFlyAtCntFrm() || - ( GetAnchorFrm() && GetAnchorFrm()->IsFlyFrm() ) ); + GetPageFrame()->GetSortedObjs() && + ( IsFlyAtContentFrame() || + ( GetAnchorFrame() && GetAnchorFrame()->IsFlyFrame() ) ); if ( bRemoveFromPage ) { - GetPageFrm()->GetSortedObjs()->Remove( *this ); + GetPageFrame()->GetSortedObjs()->Remove( *this ); } } else { SwRect aTmp( GetObjRectWithSpaces() ); - SwFlyFreeFrm::NotifyBackground( GetPageFrm(), aTmp, PREP_FLY_LEAVE ); + SwFlyFreeFrame::NotifyBackground( GetPageFrame(), aTmp, PREP_FLY_LEAVE ); } } - SwFlyFrm::DestroyImpl(); + SwFlyFrame::DestroyImpl(); } -SwFlyFreeFrm::~SwFlyFreeFrm() +SwFlyFreeFrame::~SwFlyFreeFrame() { } // #i28701# -/** Notifies the background (all ContentFrms that currently are overlapping). +/** Notifies the background (all ContentFrames that currently are overlapping). * * Additionally, the window is also directly invalidated (especially where - * there are no overlapping ContentFrms). - * This also takes ContentFrms within other Flys into account. + * there are no overlapping ContentFrames). + * This also takes ContentFrames within other Flys into account. */ -void SwFlyFreeFrm::NotifyBackground( SwPageFrm *pPageFrm, +void SwFlyFreeFrame::NotifyBackground( SwPageFrame *pPageFrame, const SwRect& rRect, PrepareHint eHint ) { - ::Notify_Background( GetVirtDrawObj(), pPageFrm, rRect, eHint, true ); + ::Notify_Background( GetVirtDrawObj(), pPageFrame, rRect, eHint, true ); } -void SwFlyFreeFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) +void SwFlyFreeFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/) { if ( !GetFormat()->GetDoc()->getIDocumentDrawModelAccess().IsVisibleLayerId( GetVirtDrawObj()->GetLayer() ) ) { return; } - if ( !GetAnchorFrm() || IsLocked() || IsColLocked() ) + if ( !GetAnchorFrame() || IsLocked() || IsColLocked() ) return; - // #i28701# - use new method <GetPageFrm()> - if( !GetPageFrm() && GetAnchorFrm() && GetAnchorFrm()->IsInFly() ) + // #i28701# - use new method <GetPageFrame()> + if( !GetPageFrame() && GetAnchorFrame() && GetAnchorFrame()->IsInFly() ) { - SwFlyFrm* pFly = AnchorFrm()->FindFlyFrm(); - SwPageFrm *pPageFrm = pFly ? pFly->FindPageFrm() : nullptr; - if( pPageFrm ) - pPageFrm->AppendFlyToPage( this ); + SwFlyFrame* pFly = AnchorFrame()->FindFlyFrame(); + SwPageFrame *pPageFrame = pFly ? pFly->FindPageFrame() : nullptr; + if( pPageFrame ) + pPageFrame->AppendFlyToPage( this ); } - if( !GetPageFrm() ) + if( !GetPageFrame() ) return; Lock(); // The curtain drops @@ -133,7 +133,7 @@ void SwFlyFreeFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) // no invalidation of position, if no direct move is requested in <CheckClip(..)> if ( !IsNoMoveOnCheckClip() && !( PositionLocked() && - GetAnchorFrm()->IsInFly() && + GetAnchorFrame()->IsInFly() && GetFrameFormat().GetFollowTextFlow().GetValue() ) ) { mbValidPos = false; @@ -147,12 +147,12 @@ void SwFlyFreeFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) while ( !mbValidPos || !mbValidSize || !mbValidPrtArea || m_bFormatHeightOnly || !m_bValidContentPos ) { SWRECTFN( this ) - const SwFormatFrmSize *pSz; + const SwFormatFrameSize *pSz; { // Additional scope, so aAccess will be destroyed before the check! - SwBorderAttrAccess aAccess( SwFrm::GetCache(), this ); + SwBorderAttrAccess aAccess( SwFrame::GetCache(), this ); const SwBorderAttrs &rAttrs = *aAccess.Get(); - pSz = &rAttrs.GetAttrSet().GetFrmSize(); + pSz = &rAttrs.GetAttrSet().GetFrameSize(); // Only set when the flag is set! if ( !mbValidSize ) @@ -169,14 +169,14 @@ void SwFlyFreeFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) if ( !mbValidSize || m_bFormatHeightOnly ) { mbValidSize = false; - Format( getRootFrm()->GetCurrShell()->GetOut(), &rAttrs ); + Format( getRootFrame()->GetCurrShell()->GetOut(), &rAttrs ); m_bFormatHeightOnly = false; } } if ( !mbValidPos ) { - const Point aOldPos( (Frm().*fnRect->fnGetPos)() ); + const Point aOldPos( (Frame().*fnRect->fnGetPos)() ); // #i26791# - use new method <MakeObjPos()> // #i34753# - no positioning, if requested. if ( IsNoMakePos() ) @@ -184,10 +184,10 @@ void SwFlyFreeFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) else // #i26791# - use new method <MakeObjPos()> MakeObjPos(); - if( aOldPos == (Frm().*fnRect->fnGetPos)() ) + if( aOldPos == (Frame().*fnRect->fnGetPos)() ) { - if( !mbValidPos && GetAnchorFrm()->IsInSct() && - !GetAnchorFrm()->FindSctFrm()->IsValid() ) + if( !mbValidPos && GetAnchorFrame()->IsInSct() && + !GetAnchorFrame()->FindSctFrame()->IsValid() ) mbValidPos = true; } else @@ -196,7 +196,7 @@ void SwFlyFreeFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) if ( !m_bValidContentPos ) { - SwBorderAttrAccess aAccess( SwFrm::GetCache(), this ); + SwBorderAttrAccess aAccess( SwFrame::GetCache(), this ); const SwBorderAttrs &rAttrs = *aAccess.Get(); MakeContentPos( rAttrs ); } @@ -205,7 +205,7 @@ void SwFlyFreeFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) { ++nLoopControlRuns; - OSL_ENSURE( nLoopControlRuns < nLoopControlMax, "LoopControl in SwFlyFreeFrm::MakeAll" ); + OSL_ENSURE( nLoopControlRuns < nLoopControlMax, "LoopControl in SwFlyFreeFrame::MakeAll" ); if ( nLoopControlRuns < nLoopControlMax ) CheckClip( *pSz ); @@ -217,9 +217,9 @@ void SwFlyFreeFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) #if OSL_DEBUG_LEVEL > 0 SWRECTFN( this ) - OSL_ENSURE( m_bHeightClipped || ( (Frm().*fnRect->fnGetHeight)() > 0 && + OSL_ENSURE( m_bHeightClipped || ( (Frame().*fnRect->fnGetHeight)() > 0 && (Prt().*fnRect->fnGetHeight)() > 0), - "SwFlyFreeFrm::Format(), flipping Fly." ); + "SwFlyFreeFrame::Format(), flipping Fly." ); #endif } @@ -234,33 +234,33 @@ void SwFlyFreeFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) @return boolean indicating, that direct environment has 'auto' size */ -bool SwFlyFreeFrm::HasEnvironmentAutoSize() const +bool SwFlyFreeFrame::HasEnvironmentAutoSize() const { bool bRetVal = false; - const SwFrm* pToBeCheckedFrm = GetAnchorFrm(); - while ( pToBeCheckedFrm && - !pToBeCheckedFrm->IsPageFrm() ) + const SwFrame* pToBeCheckedFrame = GetAnchorFrame(); + while ( pToBeCheckedFrame && + !pToBeCheckedFrame->IsPageFrame() ) { - if ( pToBeCheckedFrm->IsHeaderFrm() || - pToBeCheckedFrm->IsFooterFrm() || - pToBeCheckedFrm->IsRowFrm() || - pToBeCheckedFrm->IsFlyFrm() ) + if ( pToBeCheckedFrame->IsHeaderFrame() || + pToBeCheckedFrame->IsFooterFrame() || + pToBeCheckedFrame->IsRowFrame() || + pToBeCheckedFrame->IsFlyFrame() ) { bRetVal = ATT_FIX_SIZE != - pToBeCheckedFrm->GetAttrSet()->GetFrmSize().GetHeightSizeType(); + pToBeCheckedFrame->GetAttrSet()->GetFrameSize().GetHeightSizeType(); break; } else { - pToBeCheckedFrm = pToBeCheckedFrm->GetUpper(); + pToBeCheckedFrame = pToBeCheckedFrame->GetUpper(); } } return bRetVal; } -void SwFlyFreeFrm::CheckClip( const SwFormatFrmSize &rSz ) +void SwFlyFreeFrame::CheckClip( const SwFormatFrameSize &rSz ) { // It's probably time now to take appropriate measures, if the Fly // doesn't fit into its surrounding. @@ -275,8 +275,8 @@ void SwFlyFreeFrm::CheckClip( const SwFormatFrmSize &rSz ) ::CalcClipRect( pObj, aTmpStretch, false ); aClip._Intersection( aTmpStretch ); - const long nBot = Frm().Top() + Frm().Height(); - const long nRig = Frm().Left() + Frm().Width(); + const long nBot = Frame().Top() + Frame().Height(); + const long nRig = Frame().Left() + Frame().Width(); const long nClipBot = aClip.Top() + aClip.Height(); const long nClipRig = aClip.Left() + aClip.Width(); @@ -287,33 +287,33 @@ void SwFlyFreeFrm::CheckClip( const SwFormatFrmSize &rSz ) bool bAgain = false; // #i37068# - no move, if it's requested if ( bBot && !IsNoMoveOnCheckClip() && - !GetDrawObjs() && !GetAnchorFrm()->IsInTab() ) + !GetDrawObjs() && !GetAnchorFrame()->IsInTab() ) { - SwFrm* pHeader = FindFooterOrHeader(); + SwFrame* pHeader = FindFooterOrHeader(); // In a header, correction of the position is no good idea. // If the fly moves, some paragraphs have to be formatted, this // could cause a change of the height of the headerframe, // now the flyframe can change its position and so on ... - if ( !pHeader || !pHeader->IsHeaderFrm() ) + if ( !pHeader || !pHeader->IsHeaderFrame() ) { - const long nOld = Frm().Top(); - Frm().Pos().Y() = std::max( aClip.Top(), nClipBot - Frm().Height() ); - if ( Frm().Top() != nOld ) + const long nOld = Frame().Top(); + Frame().Pos().Y() = std::max( aClip.Top(), nClipBot - Frame().Height() ); + if ( Frame().Top() != nOld ) bAgain = true; m_bHeightClipped = true; } } if ( bRig ) { - const long nOld = Frm().Left(); - Frm().Pos().X() = std::max( aClip.Left(), nClipRig - Frm().Width() ); - if ( Frm().Left() != nOld ) + const long nOld = Frame().Left(); + Frame().Pos().X() = std::max( aClip.Left(), nClipRig - Frame().Width() ); + if ( Frame().Left() != nOld ) { const SwFormatHoriOrient &rH = GetFormat()->GetHoriOrient(); // Left-aligned ones may not be moved to the left when they // are avoiding another one. if( rH.GetHoriOrient() == text::HoriOrientation::LEFT ) - Frm().Pos().X() = nOld; + Frame().Pos().X() = nOld; else bAgain = true; } @@ -323,31 +323,31 @@ void SwFlyFreeFrm::CheckClip( const SwFormatFrmSize &rSz ) mbValidSize = false; else { - // If we reach this branch, the Frm protrudes into forbidden + // If we reach this branch, the Frame protrudes into forbidden // areas, and correcting the position is not allowed or not // possible or not required. // For Flys with OLE objects as lower, we make sure that // we always resize proportionally - Size aOldSize( Frm().SSize() ); + Size aOldSize( Frame().SSize() ); - // First, setup the FrmRect, then transfer it to the Frm. - SwRect aFrmRect( Frm() ); + // First, setup the FrameRect, then transfer it to the Frame. + SwRect aFrameRect( Frame() ); if ( bBot ) { long nDiff = nClipBot; - nDiff -= aFrmRect.Top(); // nDiff represents the available distance - nDiff = aFrmRect.Height() - nDiff; - aFrmRect.Height( aFrmRect.Height() - nDiff ); + nDiff -= aFrameRect.Top(); // nDiff represents the available distance + nDiff = aFrameRect.Height() - nDiff; + aFrameRect.Height( aFrameRect.Height() - nDiff ); m_bHeightClipped = true; } if ( bRig ) { long nDiff = nClipRig; - nDiff -= aFrmRect.Left();// nDiff represents the available distance - nDiff = aFrmRect.Width() - nDiff; - aFrmRect.Width( aFrmRect.Width() - nDiff ); + nDiff -= aFrameRect.Left();// nDiff represents the available distance + nDiff = aFrameRect.Width() - nDiff; + aFrameRect.Width( aFrameRect.Width() - nDiff ); m_bWidthClipped = true; } @@ -361,33 +361,33 @@ void SwFlyFreeFrm::CheckClip( const SwFormatFrmSize &rSz ) // (3) fly frames with 'auto' size // Note: section frames seems to be not critical - didn't found // any critical layout situation so far. - if ( Lower() && Lower()->IsNoTextFrm() && - ( static_cast<SwContentFrm*>(Lower())->GetNode()->GetOLENode() || + if ( Lower() && Lower()->IsNoTextFrame() && + ( static_cast<SwContentFrame*>(Lower())->GetNode()->GetOLENode() || !HasEnvironmentAutoSize() ) ) { // If width and height got adjusted, then the bigger // change is relevant. - if ( aFrmRect.Width() != aOldSize.Width() && - aFrmRect.Height()!= aOldSize.Height() ) + if ( aFrameRect.Width() != aOldSize.Width() && + aFrameRect.Height()!= aOldSize.Height() ) { - if ( (aOldSize.Width() - aFrmRect.Width()) > - (aOldSize.Height()- aFrmRect.Height()) ) - aFrmRect.Height( aOldSize.Height() ); + if ( (aOldSize.Width() - aFrameRect.Width()) > + (aOldSize.Height()- aFrameRect.Height()) ) + aFrameRect.Height( aOldSize.Height() ); else - aFrmRect.Width( aOldSize.Width() ); + aFrameRect.Width( aOldSize.Width() ); } // Adjusted the width? change height proportionally - if( aFrmRect.Width() != aOldSize.Width() ) + if( aFrameRect.Width() != aOldSize.Width() ) { - aFrmRect.Height( aFrmRect.Width() * aOldSize.Height() / + aFrameRect.Height( aFrameRect.Width() * aOldSize.Height() / aOldSize.Width() ); m_bHeightClipped = true; } // Adjusted the height? change width proportionally - else if( aFrmRect.Height() != aOldSize.Height() ) + else if( aFrameRect.Height() != aOldSize.Height() ) { - aFrmRect.Width( aFrmRect.Height() * aOldSize.Width() / + aFrameRect.Width( aFrameRect.Height() * aOldSize.Width() / aOldSize.Height() ); m_bWidthClipped = true; } @@ -395,46 +395,46 @@ void SwFlyFreeFrm::CheckClip( const SwFormatFrmSize &rSz ) // #i17297# - reactivate change // of size attribute for fly frames containing an ole object. - // Added the aFrmRect.HasArea() hack, because + // Added the aFrameRect.HasArea() hack, because // the environment of the ole object does not have to be valid // at this moment, or even worse, it does not have to have a // reasonable size. In this case we do not want to change to // attributes permanentely. Maybe one day somebody dares to remove // this code. - if ( aFrmRect.HasArea() && - static_cast<SwContentFrm*>(Lower())->GetNode()->GetOLENode() && + if ( aFrameRect.HasArea() && + static_cast<SwContentFrame*>(Lower())->GetNode()->GetOLENode() && ( m_bWidthClipped || m_bHeightClipped ) ) { SwFlyFrameFormat *pFormat = GetFormat(); pFormat->LockModify(); - SwFormatFrmSize aFrmSize( rSz ); - aFrmSize.SetWidth( aFrmRect.Width() ); - aFrmSize.SetHeight( aFrmRect.Height() ); - pFormat->SetFormatAttr( aFrmSize ); + SwFormatFrameSize aFrameSize( rSz ); + aFrameSize.SetWidth( aFrameRect.Width() ); + aFrameSize.SetHeight( aFrameRect.Height() ); + pFormat->SetFormatAttr( aFrameSize ); pFormat->UnlockModify(); } } - // Now change the Frm; for columns, we put the new values into the attributes, + // Now change the Frame; for columns, we put the new values into the attributes, // otherwise we'll end up with unwanted side-effects/oscillations - const long nPrtHeightDiff = Frm().Height() - Prt().Height(); - const long nPrtWidthDiff = Frm().Width() - Prt().Width(); - maUnclippedFrm = SwRect( Frm() ); - Frm().Height( aFrmRect.Height() ); - Frm().Width ( std::max( long(MINLAY), aFrmRect.Width() ) ); - if ( Lower() && Lower()->IsColumnFrm() ) + const long nPrtHeightDiff = Frame().Height() - Prt().Height(); + const long nPrtWidthDiff = Frame().Width() - Prt().Width(); + maUnclippedFrame = SwRect( Frame() ); + Frame().Height( aFrameRect.Height() ); + Frame().Width ( std::max( long(MINLAY), aFrameRect.Width() ) ); + if ( Lower() && Lower()->IsColumnFrame() ) { ColLock(); //lock grow/shrink const Size aTmpOldSize( Prt().SSize() ); - Prt().Height( Frm().Height() - nPrtHeightDiff ); - Prt().Width ( Frm().Width() - nPrtWidthDiff ); + Prt().Height( Frame().Height() - nPrtHeightDiff ); + Prt().Width ( Frame().Width() - nPrtWidthDiff ); ChgLowersProp( aTmpOldSize ); - SwFrm *pLow = Lower(); + SwFrame *pLow = Lower(); do { - pLow->Calc(getRootFrm()->GetCurrShell()->GetOut()); - // also calculate the (Column)BodyFrm - static_cast<SwLayoutFrm*>(pLow)->Lower()->Calc(getRootFrm()->GetCurrShell()->GetOut()); + pLow->Calc(getRootFrame()->GetCurrShell()->GetOut()); + // also calculate the (Column)BodyFrame + static_cast<SwLayoutFrame*>(pLow)->Lower()->Calc(getRootFrame()->GetCurrShell()->GetOut()); pLow = pLow->GetNext(); } while ( pLow ); ::CalcContent( this ); @@ -444,36 +444,36 @@ void SwFlyFreeFrm::CheckClip( const SwFormatFrmSize &rSz ) } else { - Prt().Height( Frm().Height() - nPrtHeightDiff ); - Prt().Width ( Frm().Width() - nPrtWidthDiff ); + Prt().Height( Frame().Height() - nPrtHeightDiff ); + Prt().Width ( Frame().Width() - nPrtWidthDiff ); } } } // #i26945# - OSL_ENSURE( Frm().Height() >= 0, - "<SwFlyFreeFrm::CheckClip(..)> - fly frame has negative height now." ); + OSL_ENSURE( Frame().Height() >= 0, + "<SwFlyFreeFrame::CheckClip(..)> - fly frame has negative height now." ); } /** method to determine, if a <MakeAll()> on the Writer fly frame is possible #i43771# */ -bool SwFlyFreeFrm::IsFormatPossible() const +bool SwFlyFreeFrame::IsFormatPossible() const { - return SwFlyFrm::IsFormatPossible() && - ( GetPageFrm() || - ( GetAnchorFrm() && GetAnchorFrm()->IsInFly() ) ); + return SwFlyFrame::IsFormatPossible() && + ( GetPageFrame() || + ( GetAnchorFrame() && GetAnchorFrame()->IsInFly() ) ); } -SwFlyLayFrm::SwFlyLayFrm( SwFlyFrameFormat *pFormat, SwFrm* pSib, SwFrm *pAnch ) : - SwFlyFreeFrm( pFormat, pSib, pAnch ) +SwFlyLayFrame::SwFlyLayFrame( SwFlyFrameFormat *pFormat, SwFrame* pSib, SwFrame *pAnch ) : + SwFlyFreeFrame( pFormat, pSib, pAnch ) { m_bLayout = true; } // #i28701# -void SwFlyLayFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) +void SwFlyLayFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) { const sal_uInt16 nWhich = pNew ? pNew->Which() : 0; @@ -497,19 +497,19 @@ void SwFlyLayFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) GetFormat()->GetAnchor().GetAnchorId(), "8-) Invalid change of anchor type." ); - // Unregister, get hold of the page, attach to the corresponding LayoutFrm. + // Unregister, get hold of the page, attach to the corresponding LayoutFrame. SwRect aOld( GetObjRectWithSpaces() ); - // #i28701# - use new method <GetPageFrm()> - SwPageFrm *pOldPage = GetPageFrm(); - AnchorFrm()->RemoveFly( this ); + // #i28701# - use new method <GetPageFrame()> + SwPageFrame *pOldPage = GetPageFrame(); + AnchorFrame()->RemoveFly( this ); if ( FLY_AT_PAGE == pAnch->GetAnchorId() ) { sal_uInt16 nPgNum = pAnch->GetPageNum(); - SwRootFrm *pRoot = getRootFrm(); - SwPageFrm *pTmpPage = static_cast<SwPageFrm*>(pRoot->Lower()); + SwRootFrame *pRoot = getRootFrame(); + SwPageFrame *pTmpPage = static_cast<SwPageFrame*>(pRoot->Lower()); for ( sal_uInt16 i = 1; (i <= nPgNum) && pTmpPage; ++i, - pTmpPage = static_cast<SwPageFrm*>(pTmpPage->GetNext()) ) + pTmpPage = static_cast<SwPageFrame*>(pTmpPage->GetNext()) ) { if ( i == nPgNum ) { @@ -526,30 +526,30 @@ void SwFlyLayFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) else { SwNodeIndex aIdx( pAnch->GetContentAnchor()->nNode ); - SwContentFrm *pContent = GetFormat()->GetDoc()->GetNodes().GoNext( &aIdx )-> - GetContentNode()->getLayoutFrm( getRootFrm(), nullptr, nullptr, false ); + SwContentFrame *pContent = GetFormat()->GetDoc()->GetNodes().GoNext( &aIdx )-> + GetContentNode()->getLayoutFrame( getRootFrame(), nullptr, nullptr, false ); if( pContent ) { - SwFlyFrm *pTmp = pContent->FindFlyFrm(); + SwFlyFrame *pTmp = pContent->FindFlyFrame(); if( pTmp ) pTmp->AppendFly( this ); } } - // #i28701# - use new method <GetPageFrm()> - if ( pOldPage && pOldPage != GetPageFrm() ) + // #i28701# - use new method <GetPageFrame()> + if ( pOldPage && pOldPage != GetPageFrame() ) NotifyBackground( pOldPage, aOld, PREP_FLY_LEAVE ); SetCompletePaint(); InvalidateAll(); SetNotifyBack(); } else - SwFlyFrm::Modify( pOld, pNew ); + SwFlyFrame::Modify( pOld, pNew ); } -void SwPageFrm::AppendFlyToPage( SwFlyFrm *pNew ) +void SwPageFrame::AppendFlyToPage( SwFlyFrame *pNew ) { if ( !pNew->GetVirtDrawObj()->IsInserted() ) - getRootFrm()->GetDrawPage()->InsertObject( + getRootFrame()->GetDrawPage()->InsertObject( static_cast<SdrObject*>(pNew->GetVirtDrawObj()), pNew->GetVirtDrawObj()->GetReferencedObj().GetOrdNumDirect() ); @@ -560,13 +560,13 @@ void SwPageFrm::AppendFlyToPage( SwFlyFrm *pNew ) if ( GetUpper() ) { - static_cast<SwRootFrm*>(GetUpper())->SetIdleFlags(); - static_cast<SwRootFrm*>(GetUpper())->InvalidateBrowseWidth(); + static_cast<SwRootFrame*>(GetUpper())->SetIdleFlags(); + static_cast<SwRootFrame*>(GetUpper())->InvalidateBrowseWidth(); } SdrObject* pObj = pNew->GetVirtDrawObj(); - OSL_ENSURE( pNew->GetAnchorFrm(), "Fly without Anchor" ); - SwFlyFrm* pFly = const_cast<SwFlyFrm*>(pNew->GetAnchorFrm()->FindFlyFrm()); + OSL_ENSURE( pNew->GetAnchorFrame(), "Fly without Anchor" ); + SwFlyFrame* pFly = const_cast<SwFlyFrame*>(pNew->GetAnchorFrame()->FindFlyFrame()); if ( pFly && pObj->GetOrdNum() < pFly->GetVirtDrawObj()->GetOrdNum() ) { //#i119945# set pFly's OrdNum to _rNewObj's. So when pFly is removed by Undo, the original OrdNum will not be changed. @@ -578,7 +578,7 @@ void SwPageFrm::AppendFlyToPage( SwFlyFrm *pNew ) } // Don't look further at Flys that sit inside the Content. - if ( pNew->IsFlyInCntFrm() ) + if ( pNew->IsFlyInContentFrame() ) InvalidateFlyInCnt(); else { @@ -592,23 +592,23 @@ void SwPageFrm::AppendFlyToPage( SwFlyFrm *pNew ) (void) bSucessInserted; // #i87493# - OSL_ENSURE( pNew->GetPageFrm() == nullptr || pNew->GetPageFrm() == this, - "<SwPageFrm::AppendFlyToPage(..)> - anchored fly frame seems to be registered at another page frame. Serious defect." ); - // #i28701# - use new method <SetPageFrm(..)> - pNew->SetPageFrm( this ); + OSL_ENSURE( pNew->GetPageFrame() == nullptr || pNew->GetPageFrame() == this, + "<SwPageFrame::AppendFlyToPage(..)> - anchored fly frame seems to be registered at another page frame. Serious defect." ); + // #i28701# - use new method <SetPageFrame(..)> + pNew->SetPageFrame( this ); pNew->InvalidatePage( this ); // #i28701# pNew->UnlockPosition(); // Notify accessible layout. That's required at this place for // frames only where the anchor is moved. Creation of new frames - // is additionally handled by the SwFrmNotify class. + // is additionally handled by the SwFrameNotify class. if( GetUpper() && - static_cast< SwRootFrm * >( GetUpper() )->IsAnyShellAccessible() && - static_cast< SwRootFrm * >( GetUpper() )->GetCurrShell() ) + static_cast< SwRootFrame * >( GetUpper() )->IsAnyShellAccessible() && + static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell() ) { - static_cast< SwRootFrm * >( GetUpper() )->GetCurrShell()->Imp() - ->AddAccessibleFrm( pNew ); + static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell()->Imp() + ->AddAccessibleFrame( pNew ); } } @@ -619,21 +619,21 @@ void SwPageFrm::AppendFlyToPage( SwFlyFrm *pNew ) for ( size_t i = 0; i < rObjs.size(); ++i ) { SwAnchoredObject* pTmpObj = rObjs[i]; - if ( dynamic_cast<const SwFlyFrm*>( pTmpObj) != nullptr ) + if ( dynamic_cast<const SwFlyFrame*>( pTmpObj) != nullptr ) { - SwFlyFrm* pTmpFly = static_cast<SwFlyFrm*>(pTmpObj); - // #i28701# - use new method <GetPageFrm()> - if ( pTmpFly->IsFlyFreeFrm() && !pTmpFly->GetPageFrm() ) + SwFlyFrame* pTmpFly = static_cast<SwFlyFrame*>(pTmpObj); + // #i28701# - use new method <GetPageFrame()> + if ( pTmpFly->IsFlyFreeFrame() && !pTmpFly->GetPageFrame() ) AppendFlyToPage( pTmpFly ); } else if ( dynamic_cast<const SwAnchoredDrawObject*>( pTmpObj) != nullptr ) { // #i87493# - if ( pTmpObj->GetPageFrm() != this ) + if ( pTmpObj->GetPageFrame() != this ) { - if ( pTmpObj->GetPageFrm() != nullptr ) + if ( pTmpObj->GetPageFrame() != nullptr ) { - pTmpObj->GetPageFrm()->RemoveDrawObjFromPage( *pTmpObj ); + pTmpObj->GetPageFrame()->RemoveDrawObjFromPage( *pTmpObj ); } AppendDrawObjToPage( *pTmpObj ); } @@ -642,21 +642,21 @@ void SwPageFrm::AppendFlyToPage( SwFlyFrm *pNew ) } } -void SwPageFrm::RemoveFlyFromPage( SwFlyFrm *pToRemove ) +void SwPageFrame::RemoveFlyFromPage( SwFlyFrame *pToRemove ) { const sal_uInt32 nOrdNum = pToRemove->GetVirtDrawObj()->GetOrdNum(); - getRootFrm()->GetDrawPage()->RemoveObject( nOrdNum ); + getRootFrame()->GetDrawPage()->RemoveObject( nOrdNum ); pToRemove->GetVirtDrawObj()->ReferencedObj().SetOrdNum( nOrdNum ); if ( GetUpper() ) { - if ( !pToRemove->IsFlyInCntFrm() ) - static_cast<SwRootFrm*>(GetUpper())->SetSuperfluous(); - static_cast<SwRootFrm*>(GetUpper())->InvalidateBrowseWidth(); + if ( !pToRemove->IsFlyInContentFrame() ) + static_cast<SwRootFrame*>(GetUpper())->SetSuperfluous(); + static_cast<SwRootFrame*>(GetUpper())->InvalidateBrowseWidth(); } // Don't look further at Flys that sit inside the Content. - if ( pToRemove->IsFlyInCntFrm() ) + if ( pToRemove->IsFlyInContentFrame() ) return; // Don't delete collections just yet. This will happen at the end of the @@ -665,7 +665,7 @@ void SwPageFrm::RemoveFlyFromPage( SwFlyFrm *pToRemove ) // The FlyColl might be gone already, because the page's dtor is being // executed. // Remove it _before_ disposing accessible frames to avoid accesses to - // the Frm from event handlers. + // the Frame from event handlers. if (m_pSortedObjs) { m_pSortedObjs->Remove(*pToRemove); @@ -678,27 +678,27 @@ void SwPageFrm::RemoveFlyFromPage( SwFlyFrm *pToRemove ) // Notify accessible layout. That's required at this place for // frames only where the anchor is moved. Creation of new frames - // is additionally handled by the SwFrmNotify class. + // is additionally handled by the SwFrameNotify class. if( GetUpper() && - static_cast< SwRootFrm * >( GetUpper() )->IsAnyShellAccessible() && - static_cast< SwRootFrm * >( GetUpper() )->GetCurrShell() ) + static_cast< SwRootFrame * >( GetUpper() )->IsAnyShellAccessible() && + static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell() ) { - static_cast< SwRootFrm * >( GetUpper() )->GetCurrShell()->Imp() - ->DisposeAccessibleFrm( pToRemove, true ); + static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell()->Imp() + ->DisposeAccessibleFrame( pToRemove, true ); } - // #i28701# - use new method <SetPageFrm(..)> - pToRemove->SetPageFrm( nullptr ); + // #i28701# - use new method <SetPageFrame(..)> + pToRemove->SetPageFrame( nullptr ); } -void SwPageFrm::MoveFly( SwFlyFrm *pToMove, SwPageFrm *pDest ) +void SwPageFrame::MoveFly( SwFlyFrame *pToMove, SwPageFrame *pDest ) { // Invalidations if ( GetUpper() ) { - static_cast<SwRootFrm*>(GetUpper())->SetIdleFlags(); - if ( !pToMove->IsFlyInCntFrm() && pDest->GetPhyPageNum() < GetPhyPageNum() ) - static_cast<SwRootFrm*>(GetUpper())->SetSuperfluous(); + static_cast<SwRootFrame*>(GetUpper())->SetIdleFlags(); + if ( !pToMove->IsFlyInContentFrame() && pDest->GetPhyPageNum() < GetPhyPageNum() ) + static_cast<SwRootFrame*>(GetUpper())->SetSuperfluous(); } pDest->InvalidateSpelling(); @@ -706,7 +706,7 @@ void SwPageFrm::MoveFly( SwFlyFrm *pToMove, SwPageFrm *pDest ) pDest->InvalidateAutoCompleteWords(); pDest->InvalidateWordCount(); - if ( pToMove->IsFlyInCntFrm() ) + if ( pToMove->IsFlyInContentFrame() ) { pDest->InvalidateFlyInCnt(); return; @@ -714,13 +714,13 @@ void SwPageFrm::MoveFly( SwFlyFrm *pToMove, SwPageFrm *pDest ) // Notify accessible layout. That's required at this place for // frames only where the anchor is moved. Creation of new frames - // is additionally handled by the SwFrmNotify class. + // is additionally handled by the SwFrameNotify class. if( GetUpper() && - static_cast< SwRootFrm * >( GetUpper() )->IsAnyShellAccessible() && - static_cast< SwRootFrm * >( GetUpper() )->GetCurrShell() ) + static_cast< SwRootFrame * >( GetUpper() )->IsAnyShellAccessible() && + static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell() ) { - static_cast< SwRootFrm * >( GetUpper() )->GetCurrShell()->Imp() - ->DisposeAccessibleFrm( pToMove, true ); + static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell()->Imp() + ->DisposeAccessibleFrame( pToMove, true ); } // The FlyColl might be gone already, because the page's dtor is being executed. @@ -741,8 +741,8 @@ void SwPageFrm::MoveFly( SwFlyFrm *pToMove, SwPageFrm *pDest ) OSL_ENSURE( bSucessInserted, "Fly not inserted in Sorted." ); (void) bSucessInserted; - // #i28701# - use new method <SetPageFrm(..)> - pToMove->SetPageFrm( pDest ); + // #i28701# - use new method <SetPageFrame(..)> + pToMove->SetPageFrame( pDest ); pToMove->InvalidatePage( pDest ); pToMove->SetNotifyBack(); pDest->InvalidateFlyContent(); @@ -751,13 +751,13 @@ void SwPageFrm::MoveFly( SwFlyFrm *pToMove, SwPageFrm *pDest ) // Notify accessible layout. That's required at this place for // frames only where the anchor is moved. Creation of new frames - // is additionally handled by the SwFrmNotify class. + // is additionally handled by the SwFrameNotify class. if( GetUpper() && - static_cast< SwRootFrm * >( GetUpper() )->IsAnyShellAccessible() && - static_cast< SwRootFrm * >( GetUpper() )->GetCurrShell() ) + static_cast< SwRootFrame * >( GetUpper() )->IsAnyShellAccessible() && + static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell() ) { - static_cast< SwRootFrm * >( GetUpper() )->GetCurrShell()->Imp() - ->AddAccessibleFrm( pToMove ); + static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell()->Imp() + ->AddAccessibleFrame( pToMove ); } // #i28701# - correction: move lowers of Writer fly frame @@ -767,15 +767,15 @@ void SwPageFrm::MoveFly( SwFlyFrm *pToMove, SwPageFrm *pDest ) for ( size_t i = 0; i < rObjs.size(); ++i ) { SwAnchoredObject* pObj = rObjs[i]; - if ( dynamic_cast<const SwFlyFrm*>( pObj) != nullptr ) + if ( dynamic_cast<const SwFlyFrame*>( pObj) != nullptr ) { - SwFlyFrm* pFly = static_cast<SwFlyFrm*>(pObj); - if ( pFly->IsFlyFreeFrm() ) + SwFlyFrame* pFly = static_cast<SwFlyFrame*>(pObj); + if ( pFly->IsFlyFreeFrame() ) { - // #i28701# - use new method <GetPageFrm()> - SwPageFrm* pPageFrm = pFly->GetPageFrm(); - if ( pPageFrm ) - pPageFrm->MoveFly( pFly, pDest ); + // #i28701# - use new method <GetPageFrame()> + SwPageFrame* pPageFrame = pFly->GetPageFrame(); + if ( pPageFrame ) + pPageFrame->MoveFly( pFly, pDest ); else pDest->AppendFlyToPage( pFly ); } @@ -789,30 +789,30 @@ void SwPageFrm::MoveFly( SwFlyFrm *pToMove, SwPageFrm *pDest ) } } -void SwPageFrm::AppendDrawObjToPage( SwAnchoredObject& _rNewObj ) +void SwPageFrame::AppendDrawObjToPage( SwAnchoredObject& _rNewObj ) { if ( dynamic_cast<const SwAnchoredDrawObject*>( &_rNewObj) == nullptr ) { - OSL_FAIL( "SwPageFrm::AppendDrawObjToPage(..) - anchored object of unexpected type -> object not appended" ); + OSL_FAIL( "SwPageFrame::AppendDrawObjToPage(..) - anchored object of unexpected type -> object not appended" ); return; } if ( GetUpper() ) { - static_cast<SwRootFrm*>(GetUpper())->InvalidateBrowseWidth(); + static_cast<SwRootFrame*>(GetUpper())->InvalidateBrowseWidth(); } - OSL_ENSURE( _rNewObj.GetAnchorFrm(), "anchored draw object without anchor" ); - SwFlyFrm* pFlyFrm = const_cast<SwFlyFrm*>(_rNewObj.GetAnchorFrm()->FindFlyFrm()); - if ( pFlyFrm && - _rNewObj.GetDrawObj()->GetOrdNum() < pFlyFrm->GetVirtDrawObj()->GetOrdNum() ) + OSL_ENSURE( _rNewObj.GetAnchorFrame(), "anchored draw object without anchor" ); + SwFlyFrame* pFlyFrame = const_cast<SwFlyFrame*>(_rNewObj.GetAnchorFrame()->FindFlyFrame()); + if ( pFlyFrame && + _rNewObj.GetDrawObj()->GetOrdNum() < pFlyFrame->GetVirtDrawObj()->GetOrdNum() ) { //#i119945# set pFly's OrdNum to _rNewObj's. So when pFly is removed by Undo, the original OrdNum will not be changed. sal_uInt32 nNewNum = _rNewObj.GetDrawObj()->GetOrdNumDirect(); if ( _rNewObj.GetDrawObj()->GetPage() ) - _rNewObj.DrawObj()->GetPage()->SetObjectOrdNum( pFlyFrm->GetVirtDrawObj()->GetOrdNumDirect(), nNewNum ); + _rNewObj.DrawObj()->GetPage()->SetObjectOrdNum( pFlyFrame->GetVirtDrawObj()->GetOrdNumDirect(), nNewNum ); else - pFlyFrm->GetVirtDrawObj()->SetOrdNum( nNewNum ); + pFlyFrame->GetVirtDrawObj()->SetOrdNum( nNewNum ); } if ( FLY_AS_CHAR == _rNewObj.GetFrameFormat().GetAnchor().GetAnchorId() ) @@ -830,19 +830,19 @@ void SwPageFrm::AppendDrawObjToPage( SwAnchoredObject& _rNewObj ) "Drawing object not appended into list <pSortedObjs>." ); } // #i87493# - OSL_ENSURE( _rNewObj.GetPageFrm() == nullptr || _rNewObj.GetPageFrm() == this, - "<SwPageFrm::AppendDrawObjToPage(..)> - anchored draw object seems to be registered at another page frame. Serious defect." ); - _rNewObj.SetPageFrm( this ); + OSL_ENSURE( _rNewObj.GetPageFrame() == nullptr || _rNewObj.GetPageFrame() == this, + "<SwPageFrame::AppendDrawObjToPage(..)> - anchored draw object seems to be registered at another page frame. Serious defect." ); + _rNewObj.SetPageFrame( this ); // invalidate page in order to force a reformat of object layout of the page. InvalidateFlyLayout(); } -void SwPageFrm::RemoveDrawObjFromPage( SwAnchoredObject& _rToRemoveObj ) +void SwPageFrame::RemoveDrawObjFromPage( SwAnchoredObject& _rToRemoveObj ) { if ( dynamic_cast<const SwAnchoredDrawObject*>( &_rToRemoveObj) == nullptr ) { - OSL_FAIL( "SwPageFrm::RemoveDrawObjFromPage(..) - anchored object of unexpected type -> object not removed" ); + OSL_FAIL( "SwPageFrame::RemoveDrawObjFromPage(..) - anchored object of unexpected type -> object not removed" ); return; } @@ -858,25 +858,25 @@ void SwPageFrm::RemoveDrawObjFromPage( SwAnchoredObject& _rToRemoveObj ) if (FLY_AS_CHAR != _rToRemoveObj.GetFrameFormat().GetAnchor().GetAnchorId()) { - static_cast<SwRootFrm*>(GetUpper())->SetSuperfluous(); + static_cast<SwRootFrame*>(GetUpper())->SetSuperfluous(); InvalidatePage(); } - static_cast<SwRootFrm*>(GetUpper())->InvalidateBrowseWidth(); + static_cast<SwRootFrame*>(GetUpper())->InvalidateBrowseWidth(); } } - _rToRemoveObj.SetPageFrm( nullptr ); + _rToRemoveObj.SetPageFrame( nullptr ); } // #i50432# - adjust method description and synopsis. -void SwPageFrm::PlaceFly( SwFlyFrm* pFly, SwFlyFrameFormat* pFormat ) +void SwPageFrame::PlaceFly( SwFlyFrame* pFly, SwFlyFrameFormat* pFormat ) { // #i50432# - consider the case that page is an empty page: // In this case append the fly frame at the next page OSL_ENSURE( !IsEmptyPage() || GetNext(), - "<SwPageFrm::PlaceFly(..)> - empty page with no next page! -> fly frame appended at empty page" ); + "<SwPageFrame::PlaceFly(..)> - empty page with no next page! -> fly frame appended at empty page" ); if ( IsEmptyPage() && GetNext() ) { - static_cast<SwPageFrm*>(GetNext())->PlaceFly( pFly, pFormat ); + static_cast<SwPageFrame*>(GetNext())->PlaceFly( pFly, pFormat ); } else { @@ -887,7 +887,7 @@ void SwPageFrm::PlaceFly( SwFlyFrm* pFly, SwFlyFrameFormat* pFormat ) else { OSL_ENSURE( pFormat, ":-( No Format given for Fly." ); - pFly = new SwFlyLayFrm( pFormat, this, this ); + pFly = new SwFlyLayFrame( pFormat, this, this ); AppendFly( pFly ); ::RegistFlys( this, pFly ); } @@ -909,27 +909,27 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove ) bool bRet = true; if ( dynamic_cast<const SwVirtFlyDrawObj*>( pSdrObj) != nullptr ) { - const SwFlyFrm* pFly = static_cast<const SwVirtFlyDrawObj*>(pSdrObj)->GetFlyFrm(); + const SwFlyFrame* pFly = static_cast<const SwVirtFlyDrawObj*>(pSdrObj)->GetFlyFrame(); const bool bFollowTextFlow = pFly->GetFormat()->GetFollowTextFlow().GetValue(); // #i28701# const bool bConsiderWrapOnObjPos = pFly->GetFormat()->getIDocumentSettingAccess().get(DocumentSettingId::CONSIDER_WRAP_ON_OBJECT_POSITION); const SwFormatVertOrient &rV = pFly->GetFormat()->GetVertOrient(); - if( pFly->IsFlyLayFrm() ) + if( pFly->IsFlyLayFrame() ) { - const SwFrm* pClip; + const SwFrame* pClip; // #i22305# // #i28701# if ( !bFollowTextFlow || bConsiderWrapOnObjPos ) { - pClip = pFly->GetAnchorFrm()->FindPageFrm(); + pClip = pFly->GetAnchorFrame()->FindPageFrame(); } else { - pClip = pFly->GetAnchorFrm(); + pClip = pFly->GetAnchorFrame(); } - rRect = pClip->Frm(); + rRect = pClip->Frame(); SWRECTFN( pClip ) // vertical clipping: Top and Bottom, also to PrtArea if necessary @@ -948,49 +948,49 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove ) (rRect.*fnRect->fnSetRight)((pClip->*fnRect->fnGetPrtRight)()); } } - else if( pFly->IsFlyAtCntFrm() ) + else if( pFly->IsFlyAtContentFrame() ) { // #i18732# - consider following text flow or not // AND alignment at 'page areas' - const SwFrm* pVertPosOrientFrm = pFly->GetVertPosOrientFrm(); - if ( !pVertPosOrientFrm ) + const SwFrame* pVertPosOrientFrame = pFly->GetVertPosOrientFrame(); + if ( !pVertPosOrientFrame ) { OSL_FAIL( "::CalcClipRect(..) - frame, vertical position is oriented at, is missing ."); - pVertPosOrientFrm = pFly->GetAnchorFrm(); + pVertPosOrientFrame = pFly->GetAnchorFrame(); } if ( !bFollowTextFlow || bConsiderWrapOnObjPos ) { - const SwLayoutFrm* pClipFrm = pVertPosOrientFrm->FindPageFrm(); - if (!pClipFrm) + const SwLayoutFrame* pClipFrame = pVertPosOrientFrame->FindPageFrame(); + if (!pClipFrame) { - OSL_FAIL("!pClipFrm: " + OSL_FAIL("!pClipFrame: " "if you can reproduce this please file a bug"); return false; } - rRect = bMove ? pClipFrm->GetUpper()->Frm() - : pClipFrm->Frm(); + rRect = bMove ? pClipFrame->GetUpper()->Frame() + : pClipFrame->Frame(); // #i26945# - consider that a table, during // its format, can exceed its upper printing area bottom. // Thus, enlarge the clip rectangle, if such a case occurred - if ( pFly->GetAnchorFrm()->IsInTab() ) + if ( pFly->GetAnchorFrame()->IsInTab() ) { - const SwTabFrm* pTabFrm = const_cast<SwFlyFrm*>(pFly) - ->GetAnchorFrmContainingAnchPos()->FindTabFrm(); - SwRect aTmp( pTabFrm->Prt() ); - aTmp += pTabFrm->Frm().Pos(); + const SwTabFrame* pTabFrame = const_cast<SwFlyFrame*>(pFly) + ->GetAnchorFrameContainingAnchPos()->FindTabFrame(); + SwRect aTmp( pTabFrame->Prt() ); + aTmp += pTabFrame->Frame().Pos(); rRect.Union( aTmp ); // #i43913# - consider also the cell frame - const SwFrm* pCellFrm = const_cast<SwFlyFrm*>(pFly) - ->GetAnchorFrmContainingAnchPos()->GetUpper(); - while ( pCellFrm && !pCellFrm->IsCellFrm() ) + const SwFrame* pCellFrame = const_cast<SwFlyFrame*>(pFly) + ->GetAnchorFrameContainingAnchPos()->GetUpper(); + while ( pCellFrame && !pCellFrame->IsCellFrame() ) { - pCellFrm = pCellFrm->GetUpper(); + pCellFrame = pCellFrame->GetUpper(); } - if ( pCellFrm ) + if ( pCellFrame ) { - aTmp = pCellFrm->Prt(); - aTmp += pCellFrm->Frm().Pos(); + aTmp = pCellFrame->Prt(); + aTmp += pCellFrame->Frame().Pos(); rRect.Union( aTmp ); } } @@ -1001,54 +1001,54 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove ) // new class <SwEnvironmentOfAnchoredObject> objectpositioning::SwEnvironmentOfAnchoredObject aEnvOfObj( bFollowTextFlow ); - const SwLayoutFrm& rVertClipFrm = - aEnvOfObj.GetVertEnvironmentLayoutFrm( *pVertPosOrientFrm ); + const SwLayoutFrame& rVertClipFrame = + aEnvOfObj.GetVertEnvironmentLayoutFrame( *pVertPosOrientFrame ); if ( rV.GetRelationOrient() == text::RelOrientation::PAGE_FRAME ) { - rRect = rVertClipFrm.Frm(); + rRect = rVertClipFrame.Frame(); } else if ( rV.GetRelationOrient() == text::RelOrientation::PAGE_PRINT_AREA ) { - if ( rVertClipFrm.IsPageFrm() ) + if ( rVertClipFrame.IsPageFrame() ) { - rRect = static_cast<const SwPageFrm&>(rVertClipFrm).PrtWithoutHeaderAndFooter(); + rRect = static_cast<const SwPageFrame&>(rVertClipFrame).PrtWithoutHeaderAndFooter(); } else { - rRect = rVertClipFrm.Frm(); + rRect = rVertClipFrame.Frame(); } } - const SwLayoutFrm* pHoriClipFrm = - pFly->GetAnchorFrm()->FindPageFrm()->GetUpper(); - SWRECTFN( pFly->GetAnchorFrm() ) - (rRect.*fnRect->fnSetLeft)( (pHoriClipFrm->Frm().*fnRect->fnGetLeft)() ); - (rRect.*fnRect->fnSetRight)((pHoriClipFrm->Frm().*fnRect->fnGetRight)()); + const SwLayoutFrame* pHoriClipFrame = + pFly->GetAnchorFrame()->FindPageFrame()->GetUpper(); + SWRECTFN( pFly->GetAnchorFrame() ) + (rRect.*fnRect->fnSetLeft)( (pHoriClipFrame->Frame().*fnRect->fnGetLeft)() ); + (rRect.*fnRect->fnSetRight)((pHoriClipFrame->Frame().*fnRect->fnGetRight)()); } else { // #i26945# - const SwFrm *pClip = - const_cast<SwFlyFrm*>(pFly)->GetAnchorFrmContainingAnchPos(); + const SwFrame *pClip = + const_cast<SwFlyFrame*>(pFly)->GetAnchorFrameContainingAnchPos(); SWRECTFN( pClip ) - const SwLayoutFrm *pUp = pClip->GetUpper(); - const SwFrm *pCell = pUp->IsCellFrm() ? pUp : nullptr; + const SwLayoutFrame *pUp = pClip->GetUpper(); + const SwFrame *pCell = pUp->IsCellFrame() ? pUp : nullptr; const sal_uInt16 nType = bMove ? FRM_ROOT | FRM_FLY | FRM_HEADER | FRM_FOOTER | FRM_FTN : FRM_BODY | FRM_FLY | FRM_HEADER | FRM_FOOTER | FRM_CELL| FRM_FTN; - while ( !(pUp->GetType() & nType) || pUp->IsColBodyFrm() ) + while ( !(pUp->GetType() & nType) || pUp->IsColBodyFrame() ) { pUp = pUp->GetUpper(); - if ( !pCell && pUp->IsCellFrm() ) + if ( !pCell && pUp->IsCellFrame() ) pCell = pUp; } if ( bMove ) { - if ( pUp->IsRootFrm() ) + if ( pUp->IsRootFrame() ) { rRect = pUp->Prt(); - rRect += pUp->Frm().Pos(); + rRect += pUp->Frame().Pos(); pUp = nullptr; } } @@ -1056,12 +1056,12 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove ) { if ( pUp->GetType() & FRM_BODY ) { - const SwPageFrm *pPg; - if ( pUp->GetUpper() != (pPg = pFly->FindPageFrm()) ) + const SwPageFrame *pPg; + if ( pUp->GetUpper() != (pPg = pFly->FindPageFrame()) ) pUp = pPg->FindBodyCont(); if (pUp) { - rRect = pUp->GetUpper()->Frm(); + rRect = pUp->GetUpper()->Frame(); (rRect.*fnRect->fnSetTop)( (pUp->*fnRect->fnGetPrtTop)() ); (rRect.*fnRect->fnSetBottom)((pUp->*fnRect->fnGetPrtBottom)()); } @@ -1069,82 +1069,82 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove ) else { if( ( pUp->GetType() & (FRM_FLY | FRM_FTN ) ) && - !pUp->Frm().IsInside( pFly->Frm().Pos() ) ) + !pUp->Frame().IsInside( pFly->Frame().Pos() ) ) { - if( pUp->IsFlyFrm() ) + if( pUp->IsFlyFrame() ) { - const SwFlyFrm *pTmpFly = static_cast<const SwFlyFrm*>(pUp); + const SwFlyFrame *pTmpFly = static_cast<const SwFlyFrame*>(pUp); while( pTmpFly->GetNextLink() ) { pTmpFly = pTmpFly->GetNextLink(); - if( pTmpFly->Frm().IsInside( pFly->Frm().Pos() ) ) + if( pTmpFly->Frame().IsInside( pFly->Frame().Pos() ) ) break; } pUp = pTmpFly; } else if( pUp->IsInFootnote() ) { - const SwFootnoteFrm *pTmp = pUp->FindFootnoteFrm(); + const SwFootnoteFrame *pTmp = pUp->FindFootnoteFrame(); while( pTmp->GetFollow() ) { pTmp = pTmp->GetFollow(); - if( pTmp->Frm().IsInside( pFly->Frm().Pos() ) ) + if( pTmp->Frame().IsInside( pFly->Frame().Pos() ) ) break; } pUp = pTmp; } } rRect = pUp->Prt(); - rRect.Pos() += pUp->Frm().Pos(); + rRect.Pos() += pUp->Frame().Pos(); if ( pUp->GetType() & (FRM_HEADER | FRM_FOOTER) ) { - rRect.Left ( pUp->GetUpper()->Frm().Left() ); - rRect.Width( pUp->GetUpper()->Frm().Width()); + rRect.Left ( pUp->GetUpper()->Frame().Left() ); + rRect.Width( pUp->GetUpper()->Frame().Width()); } - else if ( pUp->IsCellFrm() ) //MA_FLY_HEIGHT + else if ( pUp->IsCellFrame() ) //MA_FLY_HEIGHT { - const SwFrm *pTab = pUp->FindTabFrm(); + const SwFrame *pTab = pUp->FindTabFrame(); (rRect.*fnRect->fnSetBottom)( (pTab->GetUpper()->*fnRect->fnGetPrtBottom)() ); // expand to left and right cell border - rRect.Left ( pUp->Frm().Left() ); - rRect.Width( pUp->Frm().Width() ); + rRect.Left ( pUp->Frame().Left() ); + rRect.Width( pUp->Frame().Width() ); } } } if ( pCell ) { - // CellFrms might also sit in unallowed areas. In this case, + // CellFrames might also sit in unallowed areas. In this case, // the Fly is allowed to do so as well SwRect aTmp( pCell->Prt() ); - aTmp += pCell->Frm().Pos(); + aTmp += pCell->Frame().Pos(); rRect.Union( aTmp ); } } } else { - const SwFrm *pUp = pFly->GetAnchorFrm()->GetUpper(); - SWRECTFN( pFly->GetAnchorFrm() ) - while( pUp->IsColumnFrm() || pUp->IsSctFrm() || pUp->IsColBodyFrm()) + const SwFrame *pUp = pFly->GetAnchorFrame()->GetUpper(); + SWRECTFN( pFly->GetAnchorFrame() ) + while( pUp->IsColumnFrame() || pUp->IsSctFrame() || pUp->IsColBodyFrame()) pUp = pUp->GetUpper(); - rRect = pUp->Frm(); - if( !pUp->IsBodyFrm() ) + rRect = pUp->Frame(); + if( !pUp->IsBodyFrame() ) { rRect += pUp->Prt().Pos(); rRect.SSize( pUp->Prt().SSize() ); - if ( pUp->IsCellFrm() ) + if ( pUp->IsCellFrame() ) { - const SwFrm *pTab = pUp->FindTabFrm(); + const SwFrame *pTab = pUp->FindTabFrame(); (rRect.*fnRect->fnSetBottom)( (pTab->GetUpper()->*fnRect->fnGetPrtBottom)() ); } } - else if ( pUp->GetUpper()->IsPageFrm() ) + else if ( pUp->GetUpper()->IsPageFrame() ) { // Objects anchored as character may exceed right margin // of body frame: - (rRect.*fnRect->fnSetRight)( (pUp->GetUpper()->Frm().*fnRect->fnGetRight)() ); + (rRect.*fnRect->fnSetRight)( (pUp->GetUpper()->Frame().*fnRect->fnGetRight)() ); } long nHeight = (9*(rRect.*fnRect->fnGetHeight)())/10; long nTop; @@ -1152,20 +1152,20 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove ) const SvxULSpaceItem &rUL = pFormat->GetULSpace(); if( bMove ) { - nTop = bVert ? static_cast<const SwFlyInCntFrm*>(pFly)->GetRefPoint().X() : - static_cast<const SwFlyInCntFrm*>(pFly)->GetRefPoint().Y(); + nTop = bVert ? static_cast<const SwFlyInContentFrame*>(pFly)->GetRefPoint().X() : + static_cast<const SwFlyInContentFrame*>(pFly)->GetRefPoint().Y(); nTop = (*fnRect->fnYInc)( nTop, -nHeight ); - long nWidth = (pFly->Frm().*fnRect->fnGetWidth)(); + long nWidth = (pFly->Frame().*fnRect->fnGetWidth)(); (rRect.*fnRect->fnSetLeftAndWidth)( bVert ? - static_cast<const SwFlyInCntFrm*>(pFly)->GetRefPoint().Y() : - static_cast<const SwFlyInCntFrm*>(pFly)->GetRefPoint().X(), nWidth ); + static_cast<const SwFlyInContentFrame*>(pFly)->GetRefPoint().Y() : + static_cast<const SwFlyInContentFrame*>(pFly)->GetRefPoint().X(), nWidth ); nHeight = 2*nHeight - rUL.GetLower() - rUL.GetUpper(); } else { - nTop = (*fnRect->fnYInc)( (pFly->Frm().*fnRect->fnGetBottom)(), + nTop = (*fnRect->fnYInc)( (pFly->Frame().*fnRect->fnGetBottom)(), rUL.GetLower() - nHeight ); - nHeight = 2*nHeight - (pFly->Frm().*fnRect->fnGetHeight)() + nHeight = 2*nHeight - (pFly->Frame().*fnRect->fnGetHeight)() - rUL.GetLower() - rUL.GetUpper(); } (rRect.*fnRect->fnSetTopAndHeight)( nTop, nHeight ); @@ -1178,17 +1178,17 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove ) const SwFormatAnchor &rAnch = pFormat->GetAnchor(); if ( FLY_AS_CHAR == rAnch.GetAnchorId() ) { - const SwFrm* pAnchorFrm = pC->GetAnchorFrm( pSdrObj ); - if( !pAnchorFrm ) + const SwFrame* pAnchorFrame = pC->GetAnchorFrame( pSdrObj ); + if( !pAnchorFrame ) { OSL_FAIL( "<::CalcClipRect(..)> - missing anchor frame." ); const_cast<SwDrawContact*>(pC)->ConnectToLayout(); - pAnchorFrm = pC->GetAnchorFrm(); + pAnchorFrame = pC->GetAnchorFrame(); } - const SwFrm* pUp = pAnchorFrm->GetUpper(); + const SwFrame* pUp = pAnchorFrame->GetUpper(); rRect = pUp->Prt(); - rRect += pUp->Frm().Pos(); - SWRECTFN( pAnchorFrm ) + rRect += pUp->Frame().Pos(); + SWRECTFN( pAnchorFrame ) long nHeight = (9*(rRect.*fnRect->fnGetHeight)())/10; long nTop; const SvxULSpaceItem &rUL = pFormat->GetULSpace(); @@ -1220,12 +1220,12 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove ) // restrict clip rectangle for drawing // objects in header/footer to the page frame. // #i26791# - const SwFrm* pAnchorFrm = pC->GetAnchorFrm( pSdrObj ); - if ( pAnchorFrm && pAnchorFrm->FindFooterOrHeader() ) + const SwFrame* pAnchorFrame = pC->GetAnchorFrame( pSdrObj ); + if ( pAnchorFrame && pAnchorFrame->FindFooterOrHeader() ) { // clip frame is the page frame the header/footer is on. - const SwFrm* pClipFrm = pAnchorFrm->FindPageFrm(); - rRect = pClipFrm->Frm(); + const SwFrame* pClipFrame = pAnchorFrame->FindPageFrame(); + rRect = pClipFrame->Frame(); } else { diff --git a/sw/source/core/layout/flypos.cxx b/sw/source/core/layout/flypos.cxx index 0582eaaceeb3..38ab540e451a 100644 --- a/sw/source/core/layout/flypos.cxx +++ b/sw/source/core/layout/flypos.cxx @@ -25,7 +25,7 @@ #include "dflyobj.hxx" #include <calbck.hxx> -bool SwPosFlyFrmCmp::operator()(const SwPosFlyFrmPtr& rA, const SwPosFlyFrmPtr& rB) const +bool SwPosFlyFrameCmp::operator()(const SwPosFlyFramePtr& rA, const SwPosFlyFramePtr& rB) const { if(rA->GetNdIndex() == rB->GetNdIndex()) { @@ -36,7 +36,7 @@ bool SwPosFlyFrmCmp::operator()(const SwPosFlyFrmPtr& rA, const SwPosFlyFrmPtr& return rA->GetNdIndex() < rB->GetNdIndex(); } -SwPosFlyFrm::SwPosFlyFrm( const SwNodeIndex& rIdx, const SwFrameFormat* pFormat, +SwPosFlyFrame::SwPosFlyFrame( const SwNodeIndex& rIdx, const SwFrameFormat* pFormat, sal_uInt16 nArrPos ) : m_pFrameFormat( pFormat ), m_pNodeIndex( const_cast<SwNodeIndex*>(&rIdx) ) { @@ -51,7 +51,7 @@ SwPosFlyFrm::SwPosFlyFrm( const SwNodeIndex& rIdx, const SwFrameFormat* pFormat, if( RES_FLYFRMFMT == pFormat->Which() ) { // Let's see if we have an SdrObject for this - SwFlyFrm* pFly = SwIterator<SwFlyFrm,SwFormat>(*pFormat).First(); + SwFlyFrame* pFly = SwIterator<SwFlyFrame,SwFormat>(*pFormat).First(); if( pFly ) { m_nOrdNum = pFly->GetVirtDrawObj()->GetOrdNum(); @@ -77,7 +77,7 @@ SwPosFlyFrm::SwPosFlyFrm( const SwNodeIndex& rIdx, const SwFrameFormat* pFormat, } } -SwPosFlyFrm::~SwPosFlyFrm() +SwPosFlyFrame::~SwPosFlyFrame() { const SwFormatAnchor& rAnchor = m_pFrameFormat->GetAnchor(); if (FLY_AT_PAGE == rAnchor.GetAnchorId()) diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index 5a679157a9c7..34b6af63b457 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -79,18 +79,18 @@ bool bSetCompletePaintOnInvalidate = false; sal_uInt8 StackHack::nCnt = 0; bool StackHack::bLocked = false; -SwFrmNotify::SwFrmNotify( SwFrm *pF ) : - mpFrm( pF ), - maFrm( pF->Frm() ), +SwFrameNotify::SwFrameNotify( SwFrame *pF ) : + mpFrame( pF ), + maFrame( pF->Frame() ), maPrt( pF->Prt() ), mbInvaKeep( false ), mbValidSize( pF->GetValidSizeFlag() ), - mbFrmDeleted( false ) // #i49383# + mbFrameDeleted( false ) // #i49383# { - if ( pF->IsTextFrm() ) + if ( pF->IsTextFrame() ) { - mnFlyAnchorOfst = static_cast<SwTextFrm*>(pF)->GetBaseOfstForFly( true ); - mnFlyAnchorOfstNoWrap = static_cast<SwTextFrm*>(pF)->GetBaseOfstForFly( false ); + mnFlyAnchorOfst = static_cast<SwTextFrame*>(pF)->GetBaseOfstForFly( true ); + mnFlyAnchorOfstNoWrap = static_cast<SwTextFrame*>(pF)->GetBaseOfstForFly( false ); } else { @@ -98,50 +98,50 @@ SwFrmNotify::SwFrmNotify( SwFrm *pF ) : mnFlyAnchorOfstNoWrap = 0; } - mbHadFollow = pF->IsContentFrm() && static_cast<SwContentFrm*>(pF)->GetFollow(); + mbHadFollow = pF->IsContentFrame() && static_cast<SwContentFrame*>(pF)->GetFollow(); } -SwFrmNotify::~SwFrmNotify() +SwFrameNotify::~SwFrameNotify() { // #i49383# - if ( mbFrmDeleted ) + if ( mbFrameDeleted ) { return; } - SWRECTFN( mpFrm ) - const bool bAbsP = POS_DIFF( maFrm, mpFrm->Frm() ); + SWRECTFN( mpFrame ) + const bool bAbsP = POS_DIFF( maFrame, mpFrame->Frame() ); const bool bChgWidth = - (maFrm.*fnRect->fnGetWidth)() != (mpFrm->Frm().*fnRect->fnGetWidth)(); + (maFrame.*fnRect->fnGetWidth)() != (mpFrame->Frame().*fnRect->fnGetWidth)(); const bool bChgHeight = - (maFrm.*fnRect->fnGetHeight)()!=(mpFrm->Frm().*fnRect->fnGetHeight)(); - const bool bChgFlyBasePos = mpFrm->IsTextFrm() && - ( ( mnFlyAnchorOfst != static_cast<SwTextFrm*>(mpFrm)->GetBaseOfstForFly( true ) ) || - ( mnFlyAnchorOfstNoWrap != static_cast<SwTextFrm*>(mpFrm)->GetBaseOfstForFly( false ) ) ); + (maFrame.*fnRect->fnGetHeight)()!=(mpFrame->Frame().*fnRect->fnGetHeight)(); + const bool bChgFlyBasePos = mpFrame->IsTextFrame() && + ( ( mnFlyAnchorOfst != static_cast<SwTextFrame*>(mpFrame)->GetBaseOfstForFly( true ) ) || + ( mnFlyAnchorOfstNoWrap != static_cast<SwTextFrame*>(mpFrame)->GetBaseOfstForFly( false ) ) ); - if ( mpFrm->IsFlowFrm() && !mpFrm->IsInFootnote() ) + if ( mpFrame->IsFlowFrame() && !mpFrame->IsInFootnote() ) { - SwFlowFrm *pFlow = SwFlowFrm::CastFlowFrm( mpFrm ); + SwFlowFrame *pFlow = SwFlowFrame::CastFlowFrame( mpFrame ); if ( !pFlow->IsFollow() ) { - if ( !mpFrm->GetIndPrev() ) + if ( !mpFrame->GetIndPrev() ) { if ( mbInvaKeep ) { - SwFrm *pPre = mpFrm->FindPrev(); - if ( pPre && pPre->IsFlowFrm() ) + SwFrame *pPre = mpFrame->FindPrev(); + if ( pPre && pPre->IsFlowFrame() ) { // 1. pPre wants to keep with me: - bool bInvalidPrePos = SwFlowFrm::CastFlowFrm( pPre )->IsKeep( *pPre->GetAttrSet() ) && pPre->GetIndPrev(); + bool bInvalidPrePos = SwFlowFrame::CastFlowFrame( pPre )->IsKeep( *pPre->GetAttrSet() ) && pPre->GetIndPrev(); // 2. pPre is a table and the last row wants to keep with me: - if ( !bInvalidPrePos && pPre->IsTabFrm() ) + if ( !bInvalidPrePos && pPre->IsTabFrame() ) { - SwTabFrm* pPreTab = static_cast<SwTabFrm*>(pPre); + SwTabFrame* pPreTab = static_cast<SwTabFrame*>(pPre); if ( pPreTab->GetFormat()->GetDoc()->GetDocumentSettingManager().get(DocumentSettingId::TABLE_ROW_KEEP) ) { - SwRowFrm* pLastRow = static_cast<SwRowFrm*>(pPreTab->GetLastLower()); + SwRowFrame* pLastRow = static_cast<SwRowFrame*>(pPreTab->GetLastLower()); if ( pLastRow && pLastRow->ShouldRowKeepWithNext() ) bInvalidPrePos = true; } @@ -154,8 +154,8 @@ SwFrmNotify::~SwFrmNotify() } else if ( !pFlow->HasFollow() ) { - long nOldHeight = (maFrm.*fnRect->fnGetHeight)(); - long nNewHeight = (mpFrm->Frm().*fnRect->fnGetHeight)(); + long nOldHeight = (maFrame.*fnRect->fnGetHeight)(); + long nNewHeight = (mpFrame->Frame().*fnRect->fnGetHeight)(); if( (nOldHeight > nNewHeight) || (!nOldHeight && nNewHeight) ) pFlow->CheckKeep(); } @@ -164,12 +164,12 @@ SwFrmNotify::~SwFrmNotify() if ( bAbsP ) { - mpFrm->SetCompletePaint(); + mpFrame->SetCompletePaint(); - SwFrm* pNxt = mpFrm->GetIndNext(); + SwFrame* pNxt = mpFrame->GetIndNext(); // #121888# - skip empty section frames while ( pNxt && - pNxt->IsSctFrm() && !static_cast<SwSectionFrm*>(pNxt)->GetSection() ) + pNxt->IsSctFrame() && !static_cast<SwSectionFrame*>(pNxt)->GetSection() ) { pNxt = pNxt->GetIndNext(); } @@ -180,49 +180,49 @@ SwFrmNotify::~SwFrmNotify() { // #104100# - correct condition for setting retouche // flag for vertical layout. - if( mpFrm->IsRetoucheFrm() && - (maFrm.*fnRect->fnTopDist)( (mpFrm->Frm().*fnRect->fnGetTop)() ) > 0 ) + if( mpFrame->IsRetoucheFrame() && + (maFrame.*fnRect->fnTopDist)( (mpFrame->Frame().*fnRect->fnGetTop)() ) > 0 ) { - mpFrm->SetRetouche(); + mpFrame->SetRetouche(); } // A fresh follow frame does not have to be invalidated, because // it is already formatted: - if ( mbHadFollow || !mpFrm->IsContentFrm() || !static_cast<SwContentFrm*>(mpFrm)->GetFollow() ) + if ( mbHadFollow || !mpFrame->IsContentFrame() || !static_cast<SwContentFrame*>(mpFrame)->GetFollow() ) { - if ( !mpFrm->IsTabFrm() || !static_cast<SwTabFrm*>(mpFrm)->GetFollow() ) - mpFrm->InvalidateNextPos(); + if ( !mpFrame->IsTabFrame() || !static_cast<SwTabFrame*>(mpFrame)->GetFollow() ) + mpFrame->InvalidateNextPos(); } } } //For each resize of the background graphics is a repaint necessary. const bool bPrtWidth = - (maPrt.*fnRect->fnGetWidth)() != (mpFrm->Prt().*fnRect->fnGetWidth)(); + (maPrt.*fnRect->fnGetWidth)() != (mpFrame->Prt().*fnRect->fnGetWidth)(); const bool bPrtHeight = - (maPrt.*fnRect->fnGetHeight)()!=(mpFrm->Prt().*fnRect->fnGetHeight)(); + (maPrt.*fnRect->fnGetHeight)()!=(mpFrame->Prt().*fnRect->fnGetHeight)(); if ( bPrtWidth || bPrtHeight ) { //UUUU bool bUseNewFillProperties(false); - if (mpFrm->supportsFullDrawingLayerFillAttributeSet()) + if (mpFrame->supportsFullDrawingLayerFillAttributeSet()) { - drawinglayer::attribute::SdrAllFillAttributesHelperPtr aFillAttributes(mpFrm->getSdrAllFillAttributesHelper()); + drawinglayer::attribute::SdrAllFillAttributesHelperPtr aFillAttributes(mpFrame->getSdrAllFillAttributesHelper()); if(aFillAttributes.get() && aFillAttributes->isUsed()) { bUseNewFillProperties = true; //UUUU use SetCompletePaint if needed if(aFillAttributes->needCompleteRepaint()) { - mpFrm->SetCompletePaint(); + mpFrame->SetCompletePaint(); } } } if (!bUseNewFillProperties) { - const SvxGraphicPosition ePos = mpFrm->GetAttrSet()->GetBackground().GetGraphicPos(); + const SvxGraphicPosition ePos = mpFrame->GetAttrSet()->GetBackground().GetGraphicPos(); if(GPOS_NONE != ePos && GPOS_TILED != ePos) - mpFrm->SetCompletePaint(); + mpFrame->SetCompletePaint(); } } else @@ -232,29 +232,29 @@ SwFrmNotify::~SwFrmNotify() // in order to force paint of the margin areas. if ( !bAbsP && (bChgWidth || bChgHeight) ) { - mpFrm->SetCompletePaint(); + mpFrame->SetCompletePaint(); } } - const bool bPrtP = POS_DIFF( maPrt, mpFrm->Prt() ); + const bool bPrtP = POS_DIFF( maPrt, mpFrame->Prt() ); if ( bAbsP || bPrtP || bChgWidth || bChgHeight || bPrtWidth || bPrtHeight || bChgFlyBasePos ) { - if( mpFrm->IsAccessibleFrm() ) + if( mpFrame->IsAccessibleFrame() ) { - SwRootFrm *pRootFrm = mpFrm->getRootFrm(); - if( pRootFrm && pRootFrm->IsAnyShellAccessible() && - pRootFrm->GetCurrShell() ) + SwRootFrame *pRootFrame = mpFrame->getRootFrame(); + if( pRootFrame && pRootFrame->IsAnyShellAccessible() && + pRootFrame->GetCurrShell() ) { - pRootFrm->GetCurrShell()->Imp()->MoveAccessibleFrm( mpFrm, maFrm ); + pRootFrame->GetCurrShell()->Imp()->MoveAccessibleFrame( mpFrame, maFrame ); } } // Notification of anchored objects - if ( mpFrm->GetDrawObjs() ) + if ( mpFrame->GetDrawObjs() ) { - const SwSortedObjs &rObjs = *mpFrm->GetDrawObjs(); - SwPageFrm* pPageFrm = nullptr; + const SwSortedObjs &rObjs = *mpFrame->GetDrawObjs(); + SwPageFrame* pPageFrame = nullptr; for ( size_t i = 0; i < rObjs.size(); ++i ) { // OD 2004-03-31 #i26791# - no general distinction between @@ -280,25 +280,25 @@ SwFrmNotify::~SwFrmNotify() // registered at the correct page frame, if frame // position has changed. if ( bAbsP && pContact->ObjAnchoredAtFly() && - dynamic_cast<const SwFlyFrm*>( pObj) != nullptr ) + dynamic_cast<const SwFlyFrame*>( pObj) != nullptr ) { // determine to-fly anchored Writer fly frame - SwFlyFrm* pFlyFrm = static_cast<SwFlyFrm*>(pObj); + SwFlyFrame* pFlyFrame = static_cast<SwFlyFrame*>(pObj); // determine page frame of to-fly anchored // Writer fly frame - SwPageFrm* pFlyPageFrm = pFlyFrm->FindPageFrm(); + SwPageFrame* pFlyPageFrame = pFlyFrame->FindPageFrame(); // determine page frame, if needed. - if ( !pPageFrm ) + if ( !pPageFrame ) { - pPageFrm = mpFrm->FindPageFrm(); + pPageFrame = mpFrame->FindPageFrame(); } - if ( pPageFrm != pFlyPageFrm ) + if ( pPageFrame != pFlyPageFrame ) { - OSL_ENSURE( pFlyPageFrm, "~SwFrmNotify: Fly from Nowhere" ); - if( pFlyPageFrm ) - pFlyPageFrm->MoveFly( pFlyFrm, pPageFrm ); + OSL_ENSURE( pFlyPageFrame, "~SwFrameNotify: Fly from Nowhere" ); + if( pFlyPageFrame ) + pFlyPageFrame->MoveFly( pFlyFrame, pPageFrame ); else - pPageFrm->AppendFlyToPage( pFlyFrm ); + pPageFrame->AppendFlyToPage( pFlyFrame ); } } } @@ -340,18 +340,18 @@ SwFrmNotify::~SwFrmNotify() // perform notification via the corresponding invalidations if ( bNotify ) { - if ( dynamic_cast<const SwFlyFrm*>( pObj) != nullptr ) + if ( dynamic_cast<const SwFlyFrame*>( pObj) != nullptr ) { - SwFlyFrm* pFlyFrm = static_cast<SwFlyFrm*>(pObj); + SwFlyFrame* pFlyFrame = static_cast<SwFlyFrame*>(pObj); if ( bNotifySize ) - pFlyFrm->_InvalidateSize(); + pFlyFrame->_InvalidateSize(); // #115759# - no invalidation of // position for as-character anchored objects. if ( !bAnchoredAsChar ) { - pFlyFrm->_InvalidatePos(); + pFlyFrame->_InvalidatePos(); } - pFlyFrm->_Invalidate(); + pFlyFrame->_Invalidate(); } else if ( dynamic_cast<const SwAnchoredDrawObject*>( pObj) != nullptr ) { @@ -370,42 +370,42 @@ SwFrmNotify::~SwFrmNotify() } } } - else if( mpFrm->IsTextFrm() && mbValidSize != mpFrm->GetValidSizeFlag() ) + else if( mpFrame->IsTextFrame() && mbValidSize != mpFrame->GetValidSizeFlag() ) { - SwRootFrm *pRootFrm = mpFrm->getRootFrm(); - if( pRootFrm && pRootFrm->IsAnyShellAccessible() && - pRootFrm->GetCurrShell() ) + SwRootFrame *pRootFrame = mpFrame->getRootFrame(); + if( pRootFrame && pRootFrame->IsAnyShellAccessible() && + pRootFrame->GetCurrShell() ) { - pRootFrm->GetCurrShell()->Imp()->InvalidateAccessibleFrmContent( mpFrm ); + pRootFrame->GetCurrShell()->Imp()->InvalidateAccessibleFrameContent( mpFrame ); } } // #i9046# Automatic frame width - SwFlyFrm* pFly = nullptr; - // #i35879# Do not trust the inf flags. pFrm does not + SwFlyFrame* pFly = nullptr; + // #i35879# Do not trust the inf flags. pFrame does not // necessarily have to have an upper! - if ( !mpFrm->IsFlyFrm() && nullptr != ( pFly = mpFrm->ImplFindFlyFrm() ) ) + if ( !mpFrame->IsFlyFrame() && nullptr != ( pFly = mpFrame->ImplFindFlyFrame() ) ) { // #i61999# // no invalidation of columned Writer fly frames, because automatic // width doesn't make sense for such Writer fly frames. - if ( pFly->Lower() && !pFly->Lower()->IsColumnFrm() ) + if ( pFly->Lower() && !pFly->Lower()->IsColumnFrame() ) { - const SwFormatFrmSize &rFrmSz = pFly->GetFormat()->GetFrmSize(); + const SwFormatFrameSize &rFrameSz = pFly->GetFormat()->GetFrameSize(); // This could be optimized. Basically the fly frame only has to - // be invalidated, if the first line of pFrm (if pFrm is a content + // be invalidated, if the first line of pFrame (if pFrame is a content // frame, for other frame types its the print area) has changed its - // size and pFrm was responsible for the current width of pFly. On + // size and pFrame was responsible for the current width of pFly. On // the other hand, this is only rarely used and re-calculation of // the fly frame does not cause too much trouble. So we keep it this // way: - if ( ATT_FIX_SIZE != rFrmSz.GetWidthSizeType() ) + if ( ATT_FIX_SIZE != rFrameSz.GetWidthSizeType() ) { // #i50668#, #i50998# - invalidation of position // of as-character anchored fly frames not needed and can cause // layout loops - if ( dynamic_cast<const SwFlyInCntFrm*>( pFly) == nullptr ) + if ( dynamic_cast<const SwFlyInContentFrame*>( pFly) == nullptr ) { pFly->InvalidatePos(); } @@ -415,8 +415,8 @@ SwFrmNotify::~SwFrmNotify() } } -SwLayNotify::SwLayNotify( SwLayoutFrm *pLayFrm ) : - SwFrmNotify( pLayFrm ), +SwLayNotify::SwLayNotify( SwLayoutFrame *pLayFrame ) : + SwFrameNotify( pLayFrame ), bLowersComplete( false ) { } @@ -424,41 +424,41 @@ SwLayNotify::SwLayNotify( SwLayoutFrm *pLayFrm ) : // OD 2004-05-11 #i28701# - local method to invalidate the position of all // frames inclusive its floating screen objects, which are lowers of the given // layout frame -static void lcl_InvalidatePosOfLowers( SwLayoutFrm& _rLayoutFrm ) +static void lcl_InvalidatePosOfLowers( SwLayoutFrame& _rLayoutFrame ) { - if( _rLayoutFrm.IsFlyFrm() && _rLayoutFrm.GetDrawObjs() ) + if( _rLayoutFrame.IsFlyFrame() && _rLayoutFrame.GetDrawObjs() ) { - _rLayoutFrm.InvalidateObjs( true, false ); + _rLayoutFrame.InvalidateObjs( true, false ); } - SwFrm* pLowerFrm = _rLayoutFrm.Lower(); - while ( pLowerFrm ) + SwFrame* pLowerFrame = _rLayoutFrame.Lower(); + while ( pLowerFrame ) { - pLowerFrm->InvalidatePos(); - if ( pLowerFrm->IsTextFrm() ) + pLowerFrame->InvalidatePos(); + if ( pLowerFrame->IsTextFrame() ) { - static_cast<SwTextFrm*>(pLowerFrm)->Prepare( PREP_POS_CHGD ); + static_cast<SwTextFrame*>(pLowerFrame)->Prepare( PREP_POS_CHGD ); } - else if ( pLowerFrm->IsTabFrm() ) + else if ( pLowerFrame->IsTabFrame() ) { - pLowerFrm->InvalidatePrt(); + pLowerFrame->InvalidatePrt(); } - pLowerFrm->InvalidateObjs( true, false ); + pLowerFrame->InvalidateObjs( true, false ); - pLowerFrm = pLowerFrm->GetNext(); + pLowerFrame = pLowerFrame->GetNext(); } } SwLayNotify::~SwLayNotify() { // #i49383# - if ( mbFrmDeleted ) + if ( mbFrameDeleted ) { return; } - SwLayoutFrm *pLay = GetLay(); + SwLayoutFrame *pLay = GetLay(); SWRECTFN( pLay ) bool bNotify = false; if ( pLay->Prt().SSize() != maPrt.SSize() ) @@ -467,15 +467,15 @@ SwLayNotify::~SwLayNotify() { bool bInvaPercent; - if ( pLay->IsRowFrm() ) + if ( pLay->IsRowFrame() ) { bInvaPercent = true; long nNew = (pLay->Prt().*fnRect->fnGetHeight)(); if( nNew != (maPrt.*fnRect->fnGetHeight)() ) - static_cast<SwRowFrm*>(pLay)->AdjustCells( nNew, true); + static_cast<SwRowFrame*>(pLay)->AdjustCells( nNew, true); if( (pLay->Prt().*fnRect->fnGetWidth)() != (maPrt.*fnRect->fnGetWidth)() ) - static_cast<SwRowFrm*>(pLay)->AdjustCells( 0, false ); + static_cast<SwRowFrame*>(pLay)->AdjustCells( 0, false ); } else { @@ -485,32 +485,32 @@ SwLayNotify::~SwLayNotify() //3. If the Fly has a fixed hight and the columns // are next to be. // Hoehe danebenliegen. - //4. Never at SectionFrms. + //4. Never at SectionFrames. bool bLow; - if( pLay->IsFlyFrm() ) + if( pLay->IsFlyFrame() ) { if ( pLay->Lower() ) { - bLow = !pLay->Lower()->IsColumnFrm() || - (pLay->Lower()->Frm().*fnRect->fnGetHeight)() + bLow = !pLay->Lower()->IsColumnFrame() || + (pLay->Lower()->Frame().*fnRect->fnGetHeight)() != (pLay->Prt().*fnRect->fnGetHeight)(); } else bLow = false; } - else if( pLay->IsSctFrm() ) + else if( pLay->IsSctFrame() ) { if ( pLay->Lower() ) { - if( pLay->Lower()->IsColumnFrm() && pLay->Lower()->GetNext() ) - bLow = pLay->Lower()->Frm().Height() != pLay->Prt().Height(); + if( pLay->Lower()->IsColumnFrame() && pLay->Lower()->GetNext() ) + bLow = pLay->Lower()->Frame().Height() != pLay->Prt().Height(); else bLow = pLay->Prt().Width() != maPrt.Width(); } else bLow = false; } - else if( pLay->IsFooterFrm() && !pLay->HasFixSize() ) + else if( pLay->IsFooterFrame() && !pLay->HasFixSize() ) bLow = pLay->Prt().Width() != maPrt.Width(); else bLow = true; @@ -525,14 +525,14 @@ SwLayNotify::~SwLayNotify() // A PrtArea has been extended if width or height are larger than before. if ( (pLay->Prt().Height() > maPrt.Height() || pLay->Prt().Width() > maPrt.Width()) && - (pLay->IsMoveable() || pLay->IsFlyFrm()) ) + (pLay->IsMoveable() || pLay->IsFlyFrame()) ) { - SwFrm *pTmpFrm = pLay->Lower(); - if ( pTmpFrm && pTmpFrm->IsFlowFrm() ) + SwFrame *pTmpFrame = pLay->Lower(); + if ( pTmpFrame && pTmpFrame->IsFlowFrame() ) { - while ( pTmpFrm->GetNext() ) - pTmpFrm = pTmpFrm->GetNext(); - pTmpFrm->InvalidateNextPos(); + while ( pTmpFrame->GetNext() ) + pTmpFrame = pTmpFrame->GetNext(); + pTmpFrame->InvalidateNextPos(); } } } @@ -541,12 +541,12 @@ SwLayNotify::~SwLayNotify() if( bInvaPercent ) pLay->InvaPercentLowers( pLay->Prt().Height() - maPrt.Height() ); } - if ( pLay->IsTabFrm() ) + if ( pLay->IsTabFrame() ) //So that _only_ the shadow is drawn while resizing. - static_cast<SwTabFrm*>(pLay)->SetComplete(); + static_cast<SwTabFrame*>(pLay)->SetComplete(); else { - const SwViewShell *pSh = pLay->getRootFrm()->GetCurrShell(); + const SwViewShell *pSh = pLay->getRootFrame()->GetCurrShell(); if( !( pSh && pSh->GetViewOptions()->getBrowseMode() ) || !(pLay->GetType() & (FRM_BODY | FRM_PAGE)) ) //Thereby the subordinates are retouched clean. @@ -557,8 +557,8 @@ SwLayNotify::~SwLayNotify() } //Notify Lower if the position has changed. const bool bPrtPos = POS_DIFF( maPrt, pLay->Prt() ); - const bool bPos = bPrtPos || POS_DIFF( maFrm, pLay->Frm() ); - const bool bSize = pLay->Frm().SSize() != maFrm.SSize(); + const bool bPos = bPrtPos || POS_DIFF( maFrame, pLay->Frame() ); + const bool bSize = pLay->Frame().SSize() != maFrame.SSize(); if ( bPos && pLay->Lower() && !IsLowersComplete() ) pLay->Lower()->InvalidatePos(); @@ -571,17 +571,17 @@ SwLayNotify::~SwLayNotify() { if( pLay->GetNext() ) { - if ( pLay->GetNext()->IsLayoutFrm() ) + if ( pLay->GetNext()->IsLayoutFrame() ) pLay->GetNext()->_InvalidatePos(); else pLay->GetNext()->InvalidatePos(); } - else if( pLay->IsSctFrm() ) + else if( pLay->IsSctFrame() ) pLay->InvalidateNextPos(); } if ( !IsLowersComplete() && !(pLay->GetType()&(FRM_FLY|FRM_SECTION) && - pLay->Lower() && pLay->Lower()->IsColumnFrm()) && + pLay->Lower() && pLay->Lower()->IsColumnFrame()) && (bPos || bNotify) && !(pLay->GetType() & (FRM_ROW|FRM_TAB|FRM_FTNCONT|FRM_PAGE|FRM_ROOT))) { @@ -592,73 +592,73 @@ SwLayNotify::~SwLayNotify() // #i47458# - force unlock of position of lower objects, // only if position of layout frame has changed. bool bUnlockPosOfObjs( bPos ); - if ( bUnlockPosOfObjs && pLay->IsCellFrm() ) + if ( bUnlockPosOfObjs && pLay->IsCellFrame() ) { - SwTabFrm* pTabFrm( pLay->FindTabFrm() ); - if ( pTabFrm && - ( pTabFrm->IsJoinLocked() || - ( pTabFrm->IsFollow() && - pTabFrm->FindMaster()->IsJoinLocked() ) ) ) + SwTabFrame* pTabFrame( pLay->FindTabFrame() ); + if ( pTabFrame && + ( pTabFrame->IsJoinLocked() || + ( pTabFrame->IsFollow() && + pTabFrame->FindMaster()->IsJoinLocked() ) ) ) { bUnlockPosOfObjs = false; } } // #i49383# - check for footnote frame, if unlock // of position of lower objects is allowed. - else if ( bUnlockPosOfObjs && pLay->IsFootnoteFrm() ) + else if ( bUnlockPosOfObjs && pLay->IsFootnoteFrame() ) { - bUnlockPosOfObjs = static_cast<SwFootnoteFrm*>(pLay)->IsUnlockPosOfLowerObjs(); + bUnlockPosOfObjs = static_cast<SwFootnoteFrame*>(pLay)->IsUnlockPosOfLowerObjs(); } // #i51303# - no unlock of object positions for sections - else if ( bUnlockPosOfObjs && pLay->IsSctFrm() ) + else if ( bUnlockPosOfObjs && pLay->IsSctFrame() ) { bUnlockPosOfObjs = false; } pLay->NotifyLowerObjs( bUnlockPosOfObjs ); } - if ( bPos && pLay->IsFootnoteFrm() && pLay->Lower() ) + if ( bPos && pLay->IsFootnoteFrame() && pLay->Lower() ) { // OD 2004-05-11 #i28701# ::lcl_InvalidatePosOfLowers( *pLay ); } - if( ( bPos || bSize ) && pLay->IsFlyFrm() && static_cast<SwFlyFrm*>(pLay)->GetAnchorFrm() - && static_cast<SwFlyFrm*>(pLay)->GetAnchorFrm()->IsFlyFrm() ) - static_cast<SwFlyFrm*>(pLay)->AnchorFrm()->InvalidateSize(); + if( ( bPos || bSize ) && pLay->IsFlyFrame() && static_cast<SwFlyFrame*>(pLay)->GetAnchorFrame() + && static_cast<SwFlyFrame*>(pLay)->GetAnchorFrame()->IsFlyFrame() ) + static_cast<SwFlyFrame*>(pLay)->AnchorFrame()->InvalidateSize(); } -SwFlyNotify::SwFlyNotify( SwFlyFrm *pFlyFrm ) : - SwLayNotify( pFlyFrm ), +SwFlyNotify::SwFlyNotify( SwFlyFrame *pFlyFrame ) : + SwLayNotify( pFlyFrame ), // #115759# - keep correct page frame - the page frame // the Writer fly frame is currently registered at. - pOldPage( pFlyFrm->GetPageFrm() ), - aFrmAndSpace( pFlyFrm->GetObjRectWithSpaces() ) + pOldPage( pFlyFrame->GetPageFrame() ), + aFrameAndSpace( pFlyFrame->GetObjRectWithSpaces() ) { } SwFlyNotify::~SwFlyNotify() { // #i49383# - if ( mbFrmDeleted ) + if ( mbFrameDeleted ) { return; } - SwFlyFrm *pFly = GetFly(); + SwFlyFrame *pFly = GetFly(); if ( pFly->IsNotifyBack() ) { - SwViewShell *pSh = pFly->getRootFrm()->GetCurrShell(); + SwViewShell *pSh = pFly->getRootFrame()->GetCurrShell(); SwViewShellImp *pImp = pSh ? pSh->Imp() : nullptr; if ( !pImp || !pImp->IsAction() || !pImp->GetLayAction().IsAgain() ) { //If in the LayAction the IsAgain is set it can be //that the old page is destroyed in the meantime! - ::Notify( pFly, pOldPage, aFrmAndSpace, &maPrt ); + ::Notify( pFly, pOldPage, aFrameAndSpace, &maPrt ); // #i35640# - additional notify anchor text frame, // if Writer fly frame has changed its page - if ( pFly->GetAnchorFrm()->IsTextFrm() && - pFly->GetPageFrm() != pOldPage ) + if ( pFly->GetAnchorFrame()->IsTextFrame() && + pFly->GetPageFrame() != pOldPage ) { - pFly->AnchorFrm()->Prepare( PREP_FLY_LEAVE ); + pFly->AnchorFrame()->Prepare( PREP_FLY_LEAVE ); } } pFly->ResetNotifyBack(); @@ -667,24 +667,24 @@ SwFlyNotify::~SwFlyNotify() //Have the size or the position changed, //so should the view know this. SWRECTFN( pFly ) - const bool bPosChgd = POS_DIFF( maFrm, pFly->Frm() ); - const bool bFrmChgd = pFly->Frm().SSize() != maFrm.SSize(); + const bool bPosChgd = POS_DIFF( maFrame, pFly->Frame() ); + const bool bFrameChgd = pFly->Frame().SSize() != maFrame.SSize(); const bool bPrtChgd = maPrt != pFly->Prt(); - if ( bPosChgd || bFrmChgd || bPrtChgd ) + if ( bPosChgd || bFrameChgd || bPrtChgd ) { pFly->NotifyDrawObj(); } - if ( bPosChgd && maFrm.Pos().X() != FAR_AWAY ) + if ( bPosChgd && maFrame.Pos().X() != FAR_AWAY ) { // OD 2004-05-10 #i28701# - no direct move of lower Writer fly frames. // reason: New positioning and alignment (e.g. to-paragraph anchored, // but aligned at page) are introduced. // <SwLayNotify::~SwLayNotify()> takes care of invalidation of lower - // floating screen objects by calling method <SwLayoutFrm::NotifyLowerObjs()>. + // floating screen objects by calling method <SwLayoutFrame::NotifyLowerObjs()>. - if ( pFly->IsFlyAtCntFrm() ) + if ( pFly->IsFlyAtContentFrame() ) { - SwFrm *pNxt = pFly->AnchorFrm()->FindNext(); + SwFrame *pNxt = pFly->AnchorFrame()->FindNext(); if ( pNxt ) { pNxt->InvalidatePos(); @@ -693,9 +693,9 @@ SwFlyNotify::~SwFlyNotify() // #i26945# - notify anchor. // Needed for negative positioned Writer fly frames - if ( pFly->GetAnchorFrm()->IsTextFrm() ) + if ( pFly->GetAnchorFrame()->IsTextFrame() ) { - pFly->AnchorFrm()->Prepare( PREP_FLY_LEAVE ); + pFly->AnchorFrame()->Prepare( PREP_FLY_LEAVE ); } } @@ -703,8 +703,8 @@ SwFlyNotify::~SwFlyNotify() // #i45180# - no adjustment of layout process flags and // further notifications/invalidations, if format is called by grow/shrink if ( pFly->ConsiderObjWrapInfluenceOnObjPos() && - ( dynamic_cast<const SwFlyFreeFrm*>( pFly) == nullptr || - !static_cast<SwFlyFreeFrm*>(pFly)->IsNoMoveOnCheckClip() ) ) + ( dynamic_cast<const SwFlyFreeFrame*>( pFly) == nullptr || + !static_cast<SwFlyFreeFrame*>(pFly)->IsNoMoveOnCheckClip() ) ) { // #i54138# - suppress restart of the layout process // on changed frame height. @@ -725,25 +725,25 @@ SwFlyNotify::~SwFlyNotify() pFly->SetConsiderForTextWrap( true ); // invalidate 'background' in order to allow its 'background' // to wrap around it. - pFly->NotifyBackground( pFly->GetPageFrm(), + pFly->NotifyBackground( pFly->GetPageFrame(), pFly->GetObjRectWithSpaces(), PREP_FLY_ARRIVE ); // invalidate position of anchor frame in order to force // a re-format of the anchor frame, which also causes a // re-format of the invalid previous frames of the anchor frame. - pFly->AnchorFrm()->InvalidatePos(); + pFly->AnchorFrame()->InvalidatePos(); } } } } -SwContentFrm *SwContentNotify::GetCnt() +SwContentFrame *SwContentNotify::GetCnt() { - return static_cast<SwContentFrm*>(mpFrm); + return static_cast<SwContentFrame*>(mpFrame); } -SwContentNotify::SwContentNotify( SwContentFrm *pContentFrm ) : - SwFrmNotify( pContentFrm ), +SwContentNotify::SwContentNotify( SwContentFrame *pContentFrame ) : + SwFrameNotify( pContentFrame ), // OD 08.01.2004 #i11859# mbChkHeightOfLastLine( false ), mnHeightOfLastLine( 0L ), @@ -752,17 +752,17 @@ SwContentNotify::SwContentNotify( SwContentFrm *pContentFrm ) : mbBordersJoinedWithPrev( false ) { // OD 08.01.2004 #i11859# - if ( pContentFrm->IsTextFrm() ) + if ( pContentFrame->IsTextFrame() ) { - SwTextFrm* pTextFrm = static_cast<SwTextFrm*>(pContentFrm); - if ( !pTextFrm->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::OLD_LINE_SPACING) ) + SwTextFrame* pTextFrame = static_cast<SwTextFrame*>(pContentFrame); + if ( !pTextFrame->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::OLD_LINE_SPACING) ) { - const SwAttrSet* pSet = pTextFrm->GetAttrSet(); + const SwAttrSet* pSet = pTextFrame->GetAttrSet(); const SvxLineSpacingItem &rSpace = pSet->GetLineSpacing(); if ( rSpace.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_PROP ) { mbChkHeightOfLastLine = true; - mnHeightOfLastLine = pTextFrm->GetHeightOfLastLine(); + mnHeightOfLastLine = pTextFrame->GetHeightOfLastLine(); } } } @@ -771,50 +771,50 @@ SwContentNotify::SwContentNotify( SwContentFrm *pContentFrm ) : SwContentNotify::~SwContentNotify() { // #i49383# - if ( mbFrmDeleted ) + if ( mbFrameDeleted ) { return; } - SwContentFrm *pCnt = GetCnt(); + SwContentFrame *pCnt = GetCnt(); if ( bSetCompletePaintOnInvalidate ) pCnt->SetCompletePaint(); SWRECTFN( pCnt ) - if ( pCnt->IsInTab() && ( POS_DIFF( pCnt->Frm(), maFrm ) || - pCnt->Frm().SSize() != maFrm.SSize())) + if ( pCnt->IsInTab() && ( POS_DIFF( pCnt->Frame(), maFrame ) || + pCnt->Frame().SSize() != maFrame.SSize())) { - SwLayoutFrm* pCell = pCnt->GetUpper(); - while( !pCell->IsCellFrm() && pCell->GetUpper() ) + SwLayoutFrame* pCell = pCnt->GetUpper(); + while( !pCell->IsCellFrame() && pCell->GetUpper() ) pCell = pCell->GetUpper(); - OSL_ENSURE( pCell->IsCellFrm(), "Where's my cell?" ); + OSL_ENSURE( pCell->IsCellFrame(), "Where's my cell?" ); if ( text::VertOrientation::NONE != pCell->GetFormat()->GetVertOrient().GetVertOrient() ) pCell->InvalidatePrt(); //for the vertical align. } // OD 2004-02-26 #i25029# if ( mbInvalidatePrevPrtArea && mbBordersJoinedWithPrev && - pCnt->IsTextFrm() && + pCnt->IsTextFrame() && !pCnt->IsFollow() && !pCnt->GetIndPrev() ) { // determine previous frame - SwFrm* pPrevFrm = pCnt->FindPrev(); + SwFrame* pPrevFrame = pCnt->FindPrev(); // skip empty section frames and hidden text frames { - while ( pPrevFrm && - ( ( pPrevFrm->IsSctFrm() && - !static_cast<SwSectionFrm*>(pPrevFrm)->GetSection() ) || - ( pPrevFrm->IsTextFrm() && - static_cast<SwTextFrm*>(pPrevFrm)->IsHiddenNow() ) ) ) + while ( pPrevFrame && + ( ( pPrevFrame->IsSctFrame() && + !static_cast<SwSectionFrame*>(pPrevFrame)->GetSection() ) || + ( pPrevFrame->IsTextFrame() && + static_cast<SwTextFrame*>(pPrevFrame)->IsHiddenNow() ) ) ) { - pPrevFrm = pPrevFrm->FindPrev(); + pPrevFrame = pPrevFrame->FindPrev(); } } // Invalidate printing area of found previous frame - if ( pPrevFrm ) + if ( pPrevFrame ) { - if ( pPrevFrm->IsSctFrm() ) + if ( pPrevFrame->IsSctFrame() ) { if ( pCnt->IsInSct() ) { @@ -824,28 +824,28 @@ SwContentNotify::~SwContentNotify() // <pCnt> had joined its borders/shadow with the // last content of the found section. // Invalidate printing area of last content in found section. - SwFrm* pLstContentOfSctFrm = - static_cast<SwSectionFrm*>(pPrevFrm)->FindLastContent(); - if ( pLstContentOfSctFrm ) + SwFrame* pLstContentOfSctFrame = + static_cast<SwSectionFrame*>(pPrevFrame)->FindLastContent(); + if ( pLstContentOfSctFrame ) { - pLstContentOfSctFrm->InvalidatePrt(); + pLstContentOfSctFrame->InvalidatePrt(); } } } else { - pPrevFrm->InvalidatePrt(); + pPrevFrame->InvalidatePrt(); } } } - const bool bFirst = (maFrm.*fnRect->fnGetWidth)() == 0; + const bool bFirst = (maFrame.*fnRect->fnGetWidth)() == 0; - if ( pCnt->IsNoTextFrm() ) + if ( pCnt->IsNoTextFrame() ) { //Active PlugIn's or OLE-Objects should know something of the change //thereby they move their window appropriate. - SwViewShell *pSh = pCnt->getRootFrm()->GetCurrShell(); + SwViewShell *pSh = pCnt->getRootFrame()->GetCurrShell(); if ( pSh ) { SwOLENode *pNd; @@ -853,23 +853,23 @@ SwContentNotify::~SwContentNotify() (pNd->GetOLEObj().IsOleRef() || pNd->IsOLESizeInvalid()) ) { - const bool bNoTextFrmPrtAreaChanged = + const bool bNoTextFramePrtAreaChanged = ( maPrt.SSize().Width() != 0 && maPrt.SSize().Height() != 0 ) && maPrt.SSize() != pCnt->Prt().SSize(); - OSL_ENSURE( pCnt->IsInFly(), "OLE not in FlyFrm" ); - SwFlyFrm *pFly = pCnt->FindFlyFrm(); + OSL_ENSURE( pCnt->IsInFly(), "OLE not in FlyFrame" ); + SwFlyFrame *pFly = pCnt->FindFlyFrame(); svt::EmbeddedObjectRef& xObj = pNd->GetOLEObj().GetObject(); SwFEShell *pFESh = nullptr; for(SwViewShell& rCurrentShell : pSh->GetRingContainer()) - { if ( dynamic_cast<const SwCrsrShell*>( &rCurrentShell) != nullptr ) + { if ( dynamic_cast<const SwCursorShell*>( &rCurrentShell) != nullptr ) { pFESh = static_cast<SwFEShell*>(&rCurrentShell); // #108369#: Here used to be the condition if (!bFirst). // I think this should mean "do not call CalcAndSetScale" // if the frame is formatted for the first time. // Unfortunately this is not valid anymore since the - // SwNoTextFrm already gets a width during CalcLowerPreps. + // SwNoTextFrame already gets a width during CalcLowerPreps. // Nevertheless, the indention of !bFirst seemed to be // to assure that the OLE objects have already been notified // if necessary before calling CalcAndSetScale. @@ -883,8 +883,8 @@ SwContentNotify::~SwContentNotify() if ( !pNd->IsOLESizeInvalid() && !pSh->GetDoc()->getIDocumentState().IsUpdateExpField() ) pFESh->CalcAndSetScale( xObj, - &pFly->Prt(), &pFly->Frm(), - bNoTextFrmPrtAreaChanged ); + &pFly->Prt(), &pFly->Frame(), + bNoTextFramePrtAreaChanged ); } } @@ -895,10 +895,10 @@ SwContentNotify::~SwContentNotify() } } //dito animated graphics - if ( Frm().HasArea() && static_cast<SwNoTextFrm*>(pCnt)->HasAnimation() ) + if ( Frame().HasArea() && static_cast<SwNoTextFrame*>(pCnt)->HasAnimation() ) { - static_cast<SwNoTextFrm*>(pCnt)->StopAnimation(); - pSh->InvalidateWindows( Frm() ); + static_cast<SwNoTextFrame*>(pCnt)->StopAnimation(); + pSh->InvalidateWindows( Frame() ); } } } @@ -919,7 +919,7 @@ SwContentNotify::~SwContentNotify() // When this content is formatted it is the time at which // the page is known. Thus, this data can be corrected now. - const SwPageFrm *pPage = nullptr; + const SwPageFrame *pPage = nullptr; SwNodeIndex *pIdx = nullptr; SwFrameFormats *pTable = pDoc->GetSpzFrameFormats(); @@ -942,7 +942,7 @@ SwContentNotify::~SwContentNotify() OSL_FAIL( "<SwContentNotify::~SwContentNotify()> - to page anchored object with content position." ); if ( !pPage ) { - pPage = pCnt->FindPageFrm(); + pPage = pCnt->FindPageFrame(); } SwFormatAnchor aAnch( rAnch ); aAnch.SetAnchor( nullptr ); @@ -950,7 +950,7 @@ SwContentNotify::~SwContentNotify() pFormat->SetFormatAttr( aAnch ); if ( RES_DRAWFRMFMT != pFormat->Which() ) { - pFormat->MakeFrms(); + pFormat->MakeFrames(); } } } @@ -960,39 +960,39 @@ SwContentNotify::~SwContentNotify() // OD 12.01.2004 #i11859# - invalidate printing area of following frame, // if height of last line has changed. - if ( pCnt->IsTextFrm() && mbChkHeightOfLastLine ) + if ( pCnt->IsTextFrame() && mbChkHeightOfLastLine ) { - if ( mnHeightOfLastLine != static_cast<SwTextFrm*>(pCnt)->GetHeightOfLastLine() ) + if ( mnHeightOfLastLine != static_cast<SwTextFrame*>(pCnt)->GetHeightOfLastLine() ) { pCnt->InvalidateNextPrtArea(); } } // #i44049# - if ( pCnt->IsTextFrm() && POS_DIFF( maFrm, pCnt->Frm() ) ) + if ( pCnt->IsTextFrame() && POS_DIFF( maFrame, pCnt->Frame() ) ) { pCnt->InvalidateObjs( true ); } // #i43255# - move code to invalidate at-character // anchored objects due to a change of its anchor character from - // method <SwTextFrm::Format(..)>. - if ( pCnt->IsTextFrm() ) + // method <SwTextFrame::Format(..)>. + if ( pCnt->IsTextFrame() ) { - SwTextFrm* pMasterFrm = pCnt->IsFollow() - ? static_cast<SwTextFrm*>(pCnt)->FindMaster() - : static_cast<SwTextFrm*>(pCnt); - if ( pMasterFrm && !pMasterFrm->IsFlyLock() && - pMasterFrm->GetDrawObjs() ) + SwTextFrame* pMasterFrame = pCnt->IsFollow() + ? static_cast<SwTextFrame*>(pCnt)->FindMaster() + : static_cast<SwTextFrame*>(pCnt); + if ( pMasterFrame && !pMasterFrame->IsFlyLock() && + pMasterFrame->GetDrawObjs() ) { - SwSortedObjs* pObjs = pMasterFrm->GetDrawObjs(); + SwSortedObjs* pObjs = pMasterFrame->GetDrawObjs(); for ( size_t i = 0; i < pObjs->size(); ++i ) { SwAnchoredObject* pAnchoredObj = (*pObjs)[i]; if ( pAnchoredObj->GetFrameFormat().GetAnchor().GetAnchorId() == FLY_AT_CHAR ) { - pAnchoredObj->CheckCharRectAndTopOfLine( !pMasterFrm->IsEmpty() ); + pAnchoredObj->CheckCharRectAndTopOfLine( !pMasterFrame->IsEmpty() ); } } } @@ -1000,7 +1000,7 @@ SwContentNotify::~SwContentNotify() } void AppendObjs( const SwFrameFormats *pTable, sal_uLong nIndex, - SwFrm *pFrm, SwPageFrm *pPage, SwDoc* doc ) + SwFrame *pFrame, SwPageFrame *pPage, SwDoc* doc ) { (void) pTable; #if OSL_DEBUG_LEVEL > 0 @@ -1063,18 +1063,18 @@ void AppendObjs( const SwFrameFormats *pTable, sal_uLong nIndex, SwDrawContact* pNew = static_cast<SwDrawContact*>(GetUserCall( pSdrObj )); - if ( !pNew->GetAnchorFrm() ) + if ( !pNew->GetAnchorFrame() ) { - pFrm->AppendDrawObj( *(pNew->GetAnchoredObj( nullptr )) ); + pFrame->AppendDrawObj( *(pNew->GetAnchoredObj( nullptr )) ); } // OD 19.06.2003 #108784# - add 'virtual' drawing object, // if necessary. But control objects have to be excluded. else if ( !::CheckControlLayer( pSdrObj ) && - pNew->GetAnchorFrm() != pFrm && - !pNew->GetDrawObjectByAnchorFrm( *pFrm ) ) + pNew->GetAnchorFrame() != pFrame && + !pNew->GetDrawObjectByAnchorFrame( *pFrame ) ) { SwDrawVirtObj* pDrawVirtObj = pNew->AddVirtObj(); - pFrm->AppendDrawObj( *(pNew->GetAnchoredObj( pDrawVirtObj )) ); + pFrame->AppendDrawObj( *(pNew->GetAnchoredObj( pDrawVirtObj )) ); pDrawVirtObj->ActionChanged(); } @@ -1082,13 +1082,13 @@ void AppendObjs( const SwFrameFormats *pTable, sal_uLong nIndex, } else { - SwFlyFrm *pFly; + SwFlyFrame *pFly; if( bFlyAtFly ) - pFly = new SwFlyLayFrm( static_cast<SwFlyFrameFormat*>(pFormat), pFrm, pFrm ); + pFly = new SwFlyLayFrame( static_cast<SwFlyFrameFormat*>(pFormat), pFrame, pFrame ); else - pFly = new SwFlyAtCntFrm( static_cast<SwFlyFrameFormat*>(pFormat), pFrm, pFrm ); + pFly = new SwFlyAtContentFrame( static_cast<SwFlyFrameFormat*>(pFormat), pFrame, pFrame ); pFly->Lock(); - pFrm->AppendFly( pFly ); + pFrame->AppendFly( pFly ); pFly->Unlock(); if ( pPage ) ::RegistFlys( pPage, pFly ); @@ -1102,16 +1102,16 @@ void AppendObjs( const SwFrameFormats *pTable, sal_uLong nIndex, #endif } -static bool lcl_ObjConnected( const SwFrameFormat *pFormat, const SwFrm* pSib ) +static bool lcl_ObjConnected( const SwFrameFormat *pFormat, const SwFrame* pSib ) { if ( RES_FLYFRMFMT == pFormat->Which() ) { - SwIterator<SwFlyFrm,SwFormat> aIter( *pFormat ); - const SwRootFrm* pRoot = pSib ? pSib->getRootFrm() : nullptr; - const SwFlyFrm* pTmpFrm; - for( pTmpFrm = aIter.First(); pTmpFrm; pTmpFrm = aIter.Next() ) + SwIterator<SwFlyFrame,SwFormat> aIter( *pFormat ); + const SwRootFrame* pRoot = pSib ? pSib->getRootFrame() : nullptr; + const SwFlyFrame* pTmpFrame; + for( pTmpFrame = aIter.First(); pTmpFrame; pTmpFrame = aIter.Next() ) { - if(! pRoot || pRoot == pTmpFrm->getRootFrm() ) + if(! pRoot || pRoot == pTmpFrame->getRootFrame() ) return true; } } @@ -1119,7 +1119,7 @@ static bool lcl_ObjConnected( const SwFrameFormat *pFormat, const SwFrm* pSib ) { SwDrawContact *pContact = SwIterator<SwDrawContact,SwFormat>(*pFormat).First(); if ( pContact ) - return pContact->GetAnchorFrm() != nullptr; + return pContact->GetAnchorFrame() != nullptr; } return false; } @@ -1143,7 +1143,7 @@ static bool lcl_InHeaderOrFooter( const SwFrameFormat& _rFormat ) return bRetVal; } -void AppendAllObjs( const SwFrameFormats *pTable, const SwFrm* pSib ) +void AppendAllObjs( const SwFrameFormats *pTable, const SwFrame* pSib ) { //Connecting of all Objects, which are described in the SpzTable with the //layout. @@ -1183,10 +1183,10 @@ void AppendAllObjs( const SwFrameFormats *pTable, const SwFrm* pSib ) // OD 23.06.2003 #108784# - correction: for objects in header // or footer create frames, in spite of the fact that an connected // objects already exists. - //Call for Flys and DrawObjs only a MakeFrms if nor + //Call for Flys and DrawObjs only a MakeFrames if nor //no dependent exists, otherwise, or if the MakeDrms creates no //dependents, remove. - pFormat->MakeFrms(); + pFormat->MakeFrames(); bRemove = ::lcl_ObjConnected( pFormat, pSib ); } } @@ -1206,25 +1206,25 @@ void AppendAllObjs( const SwFrameFormats *pTable, const SwFrm* pSib ) OD 12.08.2003 #i17969# */ -static void lcl_SetPos( SwFrm& _rNewFrm, - const SwLayoutFrm& _rLayFrm ) +static void lcl_SetPos( SwFrame& _rNewFrame, + const SwLayoutFrame& _rLayFrame ) { - SWRECTFN( (&_rLayFrm) ) - (_rNewFrm.Frm().*fnRect->fnSetPos)( (_rLayFrm.Frm().*fnRect->fnGetPos)() ); + SWRECTFN( (&_rLayFrame) ) + (_rNewFrame.Frame().*fnRect->fnSetPos)( (_rLayFrame.Frame().*fnRect->fnGetPos)() ); // move position by one SwTwip in text flow direction in order to get // notifications for a new calculated position after its formatting. if ( bVert ) - _rNewFrm.Frm().Pos().X() -= 1; + _rNewFrame.Frame().Pos().X() -= 1; else - _rNewFrm.Frm().Pos().Y() += 1; + _rNewFrame.Frame().Pos().Y() += 1; } -void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc, +void _InsertCnt( SwLayoutFrame *pLay, SwDoc *pDoc, sal_uLong nIndex, bool bPages, sal_uLong nEndIndex, - SwFrm *pPrv ) + SwFrame *pPrv ) { pDoc->getIDocumentTimerAccess().BlockIdling(); - SwRootFrm* pLayout = pLay->getRootFrm(); + SwRootFrame* pLayout = pLay->getRootFrame(); const bool bOldCallbackActionEnabled = pLayout && pLayout->IsCallbackActionEnabled(); if( bOldCallbackActionEnabled ) pLayout->SetCallbackActionEnabled( false ); @@ -1245,9 +1245,9 @@ void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc, //number of pages. const bool bStartPercent = bPages && !nEndIndex; - SwPageFrm *pPage = pLay->FindPageFrm(); + SwPageFrame *pPage = pLay->FindPageFrame(); const SwFrameFormats *pTable = pDoc->GetSpzFrameFormats(); - SwFrm *pFrm = nullptr; + SwFrame *pFrame = nullptr; SwActualSection *pActualSection = nullptr; SwLayHelper *pPageMaker; @@ -1259,7 +1259,7 @@ void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc, // Attention: the SwLayHelper class uses references to the content-, // page-, layout-frame etc. and may change them! bool bBreakAfter = false; - pPageMaker = new SwLayHelper( pDoc, pFrm, pPrv, pPage, pLay, + pPageMaker = new SwLayHelper( pDoc, pFrame, pPrv, pPage, pLay, pActualSection, bBreakAfter, nIndex, 0 == nEndIndex ); if( bStartPercent ) { @@ -1272,11 +1272,11 @@ void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc, pPageMaker = nullptr; if( pLay->IsInSct() && - ( pLay->IsSctFrm() || pLay->GetUpper() ) ) // Hereby will newbies + ( pLay->IsSctFrame() || pLay->GetUpper() ) ) // Hereby will newbies // be intercepted, of which flags could not determined yet, // for e.g. while inserting a table { - SwSectionFrm* pSct = pLay->FindSctFrm(); + SwSectionFrame* pSct = pLay->FindSctFrame(); // If content will be inserted in a footnote, which in an column area, // the column area it is not allowed to be broken up. // Only if in the inner of the footnote lies an area, is this a candidate @@ -1288,7 +1288,7 @@ void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc, ( !pLay->IsInTab() || pSct->IsInTab() ) ) { pActualSection = new SwActualSection( nullptr, pSct, nullptr ); - OSL_ENSURE( !pLay->Lower() || !pLay->Lower()->IsColumnFrm(), + OSL_ENSURE( !pLay->Lower() || !pLay->Lower()->IsColumnFrame(), "_InsertCnt: Wrong Call" ); } } @@ -1305,43 +1305,43 @@ void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc, if ( pNd->IsContentNode() ) { SwContentNode* pNode = static_cast<SwContentNode*>(pNd); - pFrm = pNode->MakeFrm(pLay); + pFrame = pNode->MakeFrame(pLay); if( pPageMaker ) pPageMaker->CheckInsert( nIndex ); - pFrm->InsertBehind( pLay, pPrv ); + pFrame->InsertBehind( pLay, pPrv ); // #i27138# // notify accessibility paragraphs objects about changed // CONTENT_FLOWS_FROM/_TO relation. // Relation CONTENT_FLOWS_FROM for next paragraph will change // and relation CONTENT_FLOWS_TO for previous paragraph will change. - if ( pFrm->IsTextFrm() ) + if ( pFrame->IsTextFrame() ) { - SwViewShell* pViewShell( pFrm->getRootFrm()->GetCurrShell() ); + SwViewShell* pViewShell( pFrame->getRootFrame()->GetCurrShell() ); // no notification, if <SwViewShell> is in construction if ( pViewShell && !pViewShell->IsInConstructor() && pViewShell->GetLayout() && pViewShell->GetLayout()->IsAnyShellAccessible() ) { pViewShell->InvalidateAccessibleParaFlowRelation( - dynamic_cast<SwTextFrm*>(pFrm->FindNextCnt( true )), - dynamic_cast<SwTextFrm*>(pFrm->FindPrevCnt( true )) ); + dynamic_cast<SwTextFrame*>(pFrame->FindNextCnt( true )), + dynamic_cast<SwTextFrame*>(pFrame->FindPrevCnt( true )) ); // #i68958# // The information flags of the text frame are validated // in methods <FindNextCnt(..)> and <FindPrevCnt(..)>. // The information flags have to be invalidated, because // it is possible, that the one of its upper frames // isn't inserted into the layout. - pFrm->InvalidateInfFlags(); + pFrame->InvalidateInfFlags(); } } // OD 12.08.2003 #i17969# - consider horizontal/vertical layout // for setting position at newly inserted frame - lcl_SetPos( *pFrm, *pLay ); - pPrv = pFrm; + lcl_SetPos( *pFrame, *pLay ); + pPrv = pFrame; if ( !pTable->empty() && bObjsDirect && !bDontCreateObjects ) - AppendObjs( pTable, nIndex, pFrm, pPage, pDoc ); + AppendObjs( pTable, nIndex, pFrame, pPage, pDoc ); } else if ( pNd->IsTableNode() ) { //Should we have encountered a table? @@ -1355,44 +1355,44 @@ void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc, pDoc->getIDocumentFieldsAccess().UpdateTableFields( &aMsgHint ); pTableNode->GetTable().GCLines(); - pFrm = pTableNode->MakeFrm( pLay ); + pFrame = pTableNode->MakeFrame( pLay ); if( pPageMaker ) pPageMaker->CheckInsert( nIndex ); - pFrm->InsertBehind( pLay, pPrv ); + pFrame->InsertBehind( pLay, pPrv ); // #i27138# // notify accessibility paragraphs objects about changed // CONTENT_FLOWS_FROM/_TO relation. // Relation CONTENT_FLOWS_FROM for next paragraph will change // and relation CONTENT_FLOWS_TO for previous paragraph will change. { - SwViewShell* pViewShell( pFrm->getRootFrm()->GetCurrShell() ); + SwViewShell* pViewShell( pFrame->getRootFrame()->GetCurrShell() ); // no notification, if <SwViewShell> is in construction if ( pViewShell && !pViewShell->IsInConstructor() && pViewShell->GetLayout() && pViewShell->GetLayout()->IsAnyShellAccessible() ) { pViewShell->InvalidateAccessibleParaFlowRelation( - dynamic_cast<SwTextFrm*>(pFrm->FindNextCnt( true )), - dynamic_cast<SwTextFrm*>(pFrm->FindPrevCnt( true )) ); + dynamic_cast<SwTextFrame*>(pFrame->FindNextCnt( true )), + dynamic_cast<SwTextFrame*>(pFrame->FindPrevCnt( true )) ); } } if ( bObjsDirect && !pTable->empty() ) - static_cast<SwTabFrm*>(pFrm)->RegistFlys(); + static_cast<SwTabFrame*>(pFrame)->RegistFlys(); // OD 12.08.2003 #i17969# - consider horizontal/vertical layout // for setting position at newly inserted frame - lcl_SetPos( *pFrm, *pLay ); + lcl_SetPos( *pFrame, *pLay ); - pPrv = pFrm; + pPrv = pFrame; //Set the index to the endnode of the table section. nIndex = pTableNode->EndOfSectionIndex(); - SwTabFrm* pTmpFrm = static_cast<SwTabFrm*>(pFrm); - while ( pTmpFrm ) + SwTabFrame* pTmpFrame = static_cast<SwTabFrame*>(pFrame); + while ( pTmpFrame ) { - pTmpFrm->CheckDirChange(); - pTmpFrm = pTmpFrm->IsFollow() ? pTmpFrm->FindMaster() : nullptr; + pTmpFrame->CheckDirChange(); + pTmpFrame = pTmpFrame->IsFollow() ? pTmpFrame->FindMaster() : nullptr; } } @@ -1404,36 +1404,36 @@ void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc, nIndex = pNode->EndOfSectionIndex(); else { - pFrm = pNode->MakeFrm( pLay ); + pFrame = pNode->MakeFrame( pLay ); pActualSection = new SwActualSection( pActualSection, - static_cast<SwSectionFrm*>(pFrm), pNode ); + static_cast<SwSectionFrame*>(pFrame), pNode ); if ( pActualSection->GetUpper() ) { //Insert behind the Upper, the "Follow" of the Upper will be //generated at the EndNode. - SwSectionFrm *pTmp = pActualSection->GetUpper()->GetSectionFrm(); - pFrm->InsertBehind( pTmp->GetUpper(), pTmp ); + SwSectionFrame *pTmp = pActualSection->GetUpper()->GetSectionFrame(); + pFrame->InsertBehind( pTmp->GetUpper(), pTmp ); // OD 25.03.2003 #108339# - direct initialization of section // after insertion in the layout - static_cast<SwSectionFrm*>(pFrm)->Init(); + static_cast<SwSectionFrame*>(pFrame)->Init(); } else { - pFrm->InsertBehind( pLay, pPrv ); + pFrame->InsertBehind( pLay, pPrv ); // OD 25.03.2003 #108339# - direct initialization of section // after insertion in the layout - static_cast<SwSectionFrm*>(pFrm)->Init(); + static_cast<SwSectionFrame*>(pFrame)->Init(); // #i33963# // Do not trust the IsInFootnote flag. If we are currently // building up a table, the upper of pPrv may be a cell // frame, but the cell frame does not have an upper yet. - if( pPrv && nullptr != pPrv->ImplFindFootnoteFrm() ) + if( pPrv && nullptr != pPrv->ImplFindFootnoteFrame() ) { - if( pPrv->IsSctFrm() ) - pPrv = static_cast<SwSectionFrm*>(pPrv)->ContainsContent(); - if( pPrv && pPrv->IsTextFrm() ) - static_cast<SwTextFrm*>(pPrv)->Prepare( PREP_QUOVADIS, nullptr, false ); + if( pPrv->IsSctFrame() ) + pPrv = static_cast<SwSectionFrame*>(pPrv)->ContainsContent(); + if( pPrv && pPrv->IsTextFrame() ) + static_cast<SwTextFrame*>(pPrv)->Prepare( PREP_QUOVADIS, nullptr, false ); } } // #i27138# @@ -1442,22 +1442,22 @@ void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc, // Relation CONTENT_FLOWS_FROM for next paragraph will change // and relation CONTENT_FLOWS_TO for previous paragraph will change. { - SwViewShell* pViewShell( pFrm->getRootFrm()->GetCurrShell() ); + SwViewShell* pViewShell( pFrame->getRootFrame()->GetCurrShell() ); // no notification, if <SwViewShell> is in construction if ( pViewShell && !pViewShell->IsInConstructor() && pViewShell->GetLayout() && pViewShell->GetLayout()->IsAnyShellAccessible() ) { pViewShell->InvalidateAccessibleParaFlowRelation( - dynamic_cast<SwTextFrm*>(pFrm->FindNextCnt( true )), - dynamic_cast<SwTextFrm*>(pFrm->FindPrevCnt( true )) ); + dynamic_cast<SwTextFrame*>(pFrame->FindNextCnt( true )), + dynamic_cast<SwTextFrame*>(pFrame->FindPrevCnt( true )) ); } } - pFrm->CheckDirChange(); + pFrame->CheckDirChange(); // OD 12.08.2003 #i17969# - consider horizontal/vertical layout // for setting position at newly inserted frame - lcl_SetPos( *pFrm, *pLay ); + lcl_SetPos( *pFrame, *pLay ); // OD 20.11.2002 #105405# - no page, no invalidate. if ( pPage ) @@ -1465,11 +1465,11 @@ void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc, // OD 18.09.2002 #100522# // invalidate page in order to force format and paint of // inserted section frame - pFrm->InvalidatePage( pPage ); + pFrame->InvalidatePage( pPage ); // FME 10.11.2003 #112243# // Invalidate fly content flag: - if ( pFrm->IsInFly() ) + if ( pFrame->IsInFly() ) pPage->InvalidateFlyContent(); // OD 14.11.2002 #104684# - invalidate page content in order to @@ -1477,8 +1477,8 @@ void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc, pPage->InvalidateContent(); } - pLay = static_cast<SwLayoutFrm*>(pFrm); - if ( pLay->Lower() && pLay->Lower()->IsLayoutFrm() ) + pLay = static_cast<SwLayoutFrame*>(pFrame); + if ( pLay->Lower() && pLay->Lower()->IsLayoutFrame() ) pLay = pLay->GetNextLayoutLeaf(); pPrv = nullptr; } @@ -1493,18 +1493,18 @@ void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc, //section again. SwActualSection *pTmp = pActualSection ? pActualSection->GetUpper() : nullptr; delete pActualSection; - pLay = pLay->FindSctFrm(); + pLay = pLay->FindSctFrame(); if ( nullptr != (pActualSection = pTmp) ) { - //Could be, that the last SectionFrm remains empty. + //Could be, that the last SectionFrame remains empty. //Then now is the time to remove them. if ( !pLay->ContainsContent() ) { - SwFrm *pTmpFrm = pLay; - pLay = pTmpFrm->GetUpper(); - pPrv = pTmpFrm->GetPrev(); - pTmpFrm->RemoveFromLayout(); - SwFrm::DestroyFrm(pTmpFrm); + SwFrame *pTmpFrame = pLay; + pLay = pTmpFrame->GetUpper(); + pPrv = pTmpFrame->GetPrev(); + pTmpFrame->RemoveFromLayout(); + SwFrame::DestroyFrame(pTmpFrame); } else { @@ -1513,36 +1513,36 @@ void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc, } // new section frame - pFrm = pActualSection->GetSectionNode()->MakeFrm( pLay ); - pFrm->InsertBehind( pLay, pPrv ); - static_cast<SwSectionFrm*>(pFrm)->Init(); + pFrame = pActualSection->GetSectionNode()->MakeFrame( pLay ); + pFrame->InsertBehind( pLay, pPrv ); + static_cast<SwSectionFrame*>(pFrame)->Init(); // OD 12.08.2003 #i17969# - consider horizontal/vertical layout // for setting position at newly inserted frame - lcl_SetPos( *pFrm, *pLay ); + lcl_SetPos( *pFrame, *pLay ); - SwSectionFrm* pOuterSectionFrm = pActualSection->GetSectionFrm(); + SwSectionFrame* pOuterSectionFrame = pActualSection->GetSectionFrame(); // a follow has to be appended to the new section frame - SwSectionFrm* pFollow = pOuterSectionFrm->GetFollow(); + SwSectionFrame* pFollow = pOuterSectionFrame->GetFollow(); if ( pFollow ) { - pOuterSectionFrm->SetFollow( nullptr ); - pOuterSectionFrm->InvalidateSize(); - static_cast<SwSectionFrm*>(pFrm)->SetFollow( pFollow ); + pOuterSectionFrame->SetFollow( nullptr ); + pOuterSectionFrame->InvalidateSize(); + static_cast<SwSectionFrame*>(pFrame)->SetFollow( pFollow ); } // We don't want to leave empty parts back. - if( ! pOuterSectionFrm->IsColLocked() && - ! pOuterSectionFrm->ContainsContent() ) + if( ! pOuterSectionFrame->IsColLocked() && + ! pOuterSectionFrame->ContainsContent() ) { - pOuterSectionFrm->DelEmpty( true ); - SwFrm::DestroyFrm(pOuterSectionFrm); + pOuterSectionFrame->DelEmpty( true ); + SwFrame::DestroyFrame(pOuterSectionFrame); } - pActualSection->SetSectionFrm( static_cast<SwSectionFrm*>(pFrm) ); + pActualSection->SetSectionFrame( static_cast<SwSectionFrame*>(pFrame) ); - pLay = static_cast<SwLayoutFrm*>(pFrm); - if ( pLay->Lower() && pLay->Lower()->IsLayoutFrm() ) + pLay = static_cast<SwLayoutFrame*>(pFrame); + if ( pLay->Lower() && pLay->Lower()->IsLayoutFrame() ) pLay = pLay->GetNextLayoutLeaf(); pPrv = nullptr; } @@ -1559,7 +1559,7 @@ void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc, { if ( !pTable->empty() && bObjsDirect && !bDontCreateObjects ) { - SwFlyFrm* pFly = pLay->FindFlyFrm(); + SwFlyFrame* pFly = pLay->FindFlyFrame(); if( pFly ) AppendObjs( pTable, nIndex, pFly, pPage, pDoc ); } @@ -1570,7 +1570,7 @@ void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc, break; ++nIndex; - // Do not consider the end node. The caller (section/MakeFrms()) has to ensure that the end + // Do not consider the end node. The caller (section/MakeFrames()) has to ensure that the end // of this area is positioned before EndIndex! if ( nEndIndex && nIndex >= nEndIndex ) break; @@ -1579,10 +1579,10 @@ void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc, if ( pActualSection ) { // Might happen that an empty (Follow-)Section is left over. - if ( !(pLay = pActualSection->GetSectionFrm())->ContainsContent() ) + if ( !(pLay = pActualSection->GetSectionFrame())->ContainsContent() ) { pLay->RemoveFromLayout(); - SwFrm::DestroyFrm(pLay); + SwFrame::DestroyFrame(pLay); } delete pActualSection; } @@ -1612,105 +1612,105 @@ void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc, pLayout->SetCallbackActionEnabled( bOldCallbackActionEnabled ); } -void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx, +void MakeFrames( SwDoc *pDoc, const SwNodeIndex &rSttIdx, const SwNodeIndex &rEndIdx ) { bObjsDirect = false; SwNodeIndex aTmp( rSttIdx ); sal_uLong nEndIdx = rEndIdx.GetIndex(); - SwNode* pNd = pDoc->GetNodes().FindPrvNxtFrmNode( aTmp, + SwNode* pNd = pDoc->GetNodes().FindPrvNxtFrameNode( aTmp, pDoc->GetNodes()[ nEndIdx-1 ]); if ( pNd ) { bool bApres = aTmp < rSttIdx; SwNode2Layout aNode2Layout( *pNd, rSttIdx.GetIndex() ); - SwFrm* pFrm; - while( nullptr != (pFrm = aNode2Layout.NextFrm()) ) + SwFrame* pFrame; + while( nullptr != (pFrame = aNode2Layout.NextFrame()) ) { - SwLayoutFrm *pUpper = pFrm->GetUpper(); - SwFootnoteFrm* pFootnoteFrm = pUpper->FindFootnoteFrm(); + SwLayoutFrame *pUpper = pFrame->GetUpper(); + SwFootnoteFrame* pFootnoteFrame = pUpper->FindFootnoteFrame(); bool bOldLock, bOldFootnote; - if( pFootnoteFrm ) + if( pFootnoteFrame ) { - bOldFootnote = pFootnoteFrm->IsColLocked(); - pFootnoteFrm->ColLock(); + bOldFootnote = pFootnoteFrame->IsColLocked(); + pFootnoteFrame->ColLock(); } else bOldFootnote = true; - SwSectionFrm* pSct = pUpper->FindSctFrm(); + SwSectionFrame* pSct = pUpper->FindSctFrame(); // Inside of footnotes only those areas are interesting that are inside of them. But // not the ones (e.g. column areas) in which are the footnote containers positioned. // #109767# Table frame is in section, insert section in cell frame. - if( pSct && ((pFootnoteFrm && !pSct->IsInFootnote()) || pUpper->IsCellFrm()) ) + if( pSct && ((pFootnoteFrame && !pSct->IsInFootnote()) || pUpper->IsCellFrame()) ) pSct = nullptr; if( pSct ) - { // to prevent pTmp->MoveFwd from destroying the SectionFrm + { // to prevent pTmp->MoveFwd from destroying the SectionFrame bOldLock = pSct->IsColLocked(); pSct->ColLock(); } else bOldLock = true; - // If pFrm cannot be moved, it is not possible to move it to the next page. This applies - // also for frames (in the first column of a frame pFrm is moveable) and column - // sections of tables (also here pFrm is moveable). + // If pFrame cannot be moved, it is not possible to move it to the next page. This applies + // also for frames (in the first column of a frame pFrame is moveable) and column + // sections of tables (also here pFrame is moveable). bool bMoveNext = nEndIdx - rSttIdx.GetIndex() > 120; - bool bAllowMove = !pFrm->IsInFly() && pFrm->IsMoveable() && - (!pFrm->IsInTab() || pFrm->IsTabFrm() ); + bool bAllowMove = !pFrame->IsInFly() && pFrame->IsMoveable() && + (!pFrame->IsInTab() || pFrame->IsTabFrame() ); if ( bMoveNext && bAllowMove ) { - SwFrm *pMove = pFrm; - SwFrm *pPrev = pFrm->GetPrev(); - SwFlowFrm *pTmp = SwFlowFrm::CastFlowFrm( pMove ); - OSL_ENSURE( pTmp, "Missing FlowFrm" ); + SwFrame *pMove = pFrame; + SwFrame *pPrev = pFrame->GetPrev(); + SwFlowFrame *pTmp = SwFlowFrame::CastFlowFrame( pMove ); + OSL_ENSURE( pTmp, "Missing FlowFrame" ); if ( bApres ) { // The rest of this page should be empty. Thus, the following one has to move to // the next page (it might also be located in the following column). OSL_ENSURE( !pTmp->HasFollow(), "Follows forbidden" ); - pPrev = pFrm; - // If the surrounding SectionFrm has a "next" one, + pPrev = pFrame; + // If the surrounding SectionFrame has a "next" one, // so this one needs to be moved as well. - pMove = pFrm->GetIndNext(); - SwColumnFrm* pCol = static_cast<SwColumnFrm*>(pFrm->FindColFrm()); + pMove = pFrame->GetIndNext(); + SwColumnFrame* pCol = static_cast<SwColumnFrame*>(pFrame->FindColFrame()); if( pCol ) - pCol = static_cast<SwColumnFrm*>(pCol->GetNext()); + pCol = static_cast<SwColumnFrame*>(pCol->GetNext()); do { if( pCol && !pMove ) { // No successor so far, look into the next column pMove = pCol->ContainsAny(); if( pCol->GetNext() ) - pCol = static_cast<SwColumnFrm*>(pCol->GetNext()); + pCol = static_cast<SwColumnFrame*>(pCol->GetNext()); else if( pCol->IsInSct() ) { // If there is no following column but we are in a column frame, // there might be (page) columns outside of it. - pCol = static_cast<SwColumnFrm*>(pCol->FindSctFrm()->FindColFrm()); + pCol = static_cast<SwColumnFrame*>(pCol->FindSctFrame()->FindColFrame()); if( pCol ) - pCol = static_cast<SwColumnFrm*>(pCol->GetNext()); + pCol = static_cast<SwColumnFrame*>(pCol->GetNext()); } else pCol = nullptr; } - // skip invalid SectionFrms - while( pMove && pMove->IsSctFrm() && - !static_cast<SwSectionFrm*>(pMove)->GetSection() ) + // skip invalid SectionFrames + while( pMove && pMove->IsSctFrame() && + !static_cast<SwSectionFrame*>(pMove)->GetSection() ) pMove = pMove->GetNext(); } while( !pMove && pCol ); if( pMove ) { - if ( pMove->IsContentFrm() ) - pTmp = static_cast<SwContentFrm*>(pMove); - else if ( pMove->IsTabFrm() ) - pTmp = static_cast<SwTabFrm*>(pMove); - else if ( pMove->IsSctFrm() ) + if ( pMove->IsContentFrame() ) + pTmp = static_cast<SwContentFrame*>(pMove); + else if ( pMove->IsTabFrame() ) + pTmp = static_cast<SwTabFrame*>(pMove); + else if ( pMove->IsSctFrame() ) { - pMove = static_cast<SwSectionFrm*>(pMove)->ContainsAny(); + pMove = static_cast<SwSectionFrame*>(pMove)->ContainsAny(); if( pMove ) - pTmp = SwFlowFrm::CastFlowFrm( pMove ); + pTmp = SwFlowFrame::CastFlowFrame( pMove ); else pTmp = nullptr; } @@ -1722,15 +1722,15 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx, { OSL_ENSURE( !pTmp->IsFollow(), "Follows really forbidden" ); // move the _content_ of a section frame - if( pMove->IsSctFrm() ) + if( pMove->IsSctFrame() ) { - while( pMove && pMove->IsSctFrm() && - !static_cast<SwSectionFrm*>(pMove)->GetSection() ) + while( pMove && pMove->IsSctFrame() && + !static_cast<SwSectionFrame*>(pMove)->GetSection() ) pMove = pMove->GetNext(); - if( pMove && pMove->IsSctFrm() ) - pMove = static_cast<SwSectionFrm*>(pMove)->ContainsAny(); + if( pMove && pMove->IsSctFrame() ) + pMove = static_cast<SwSectionFrame*>(pMove)->ContainsAny(); if( pMove ) - pTmp = SwFlowFrm::CastFlowFrm( pMove ); + pTmp = SwFlowFrame::CastFlowFrame( pMove ); else pTmp = nullptr; } @@ -1738,31 +1738,31 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx, if( pTmp ) { - SwFrm* pOldUp = pTmp->GetFrm().GetUpper(); + SwFrame* pOldUp = pTmp->GetFrame().GetUpper(); // MoveFwd==true means that we are still on the same page. // But since we want to move if possible! bool bTmpOldLock = pTmp->IsJoinLocked(); pTmp->LockJoin(); while( pTmp->MoveFwd( true, false, true ) ) { - if( pOldUp == pTmp->GetFrm().GetUpper() ) + if( pOldUp == pTmp->GetFrame().GetUpper() ) break; - pOldUp = pTmp->GetFrm().GetUpper(); + pOldUp = pTmp->GetFrame().GetUpper(); } if( !bTmpOldLock ) pTmp->UnlockJoin(); } ::_InsertCnt( pUpper, pDoc, rSttIdx.GetIndex(), - pFrm->IsInDocBody(), nEndIdx, pPrev ); + pFrame->IsInDocBody(), nEndIdx, pPrev ); } else { bool bSplit; - SwFrm* pPrv = bApres ? pFrm : pFrm->GetPrev(); + SwFrame* pPrv = bApres ? pFrame : pFrame->GetPrev(); // If the section frame is inserted into another one, it must be split. if( pSct && rSttIdx.GetNode().IsSectionNode() ) { - bSplit = pSct->SplitSect( pFrm, bApres ); + bSplit = pSct->SplitSect( pFrame, bApres ); if( !bSplit && !bApres ) { pUpper = pSct->GetUpper(); @@ -1785,18 +1785,18 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx, // If nothing was added (e.g. a hidden section), the split must be reversed. if( bSplit && pSct && pSct->GetNext() - && pSct->GetNext()->IsSctFrm() ) - pSct->MergeNext( static_cast<SwSectionFrm*>(pSct->GetNext()) ); - if( pFrm->IsInFly() ) - pFrm->FindFlyFrm()->_Invalidate(); - if( pFrm->IsInTab() ) - pFrm->InvalidateSize(); + && pSct->GetNext()->IsSctFrame() ) + pSct->MergeNext( static_cast<SwSectionFrame*>(pSct->GetNext()) ); + if( pFrame->IsInFly() ) + pFrame->FindFlyFrame()->_Invalidate(); + if( pFrame->IsInTab() ) + pFrame->InvalidateSize(); } - SwPageFrm *pPage = pUpper->FindPageFrm(); - SwFrm::CheckPageDescs( pPage, false ); + SwPageFrame *pPage = pUpper->FindPageFrame(); + SwFrame::CheckPageDescs( pPage, false ); if( !bOldFootnote ) - pFootnoteFrm->ColUnlock(); + pFootnoteFrame->ColUnlock(); if( !bOldLock ) { pSct->ColUnlock(); @@ -1805,8 +1805,8 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx, if( !pSct->ContainsContent() ) { pSct->DelEmpty( true ); - pUpper->getRootFrm()->RemoveFromList( pSct ); - SwFrm::DestroyFrm(pSct); + pUpper->getRootFrame()->RemoveFromList( pSct ); + SwFrame::DestroyFrame(pSct); } } } @@ -1815,18 +1815,18 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx, bObjsDirect = true; } -SwBorderAttrs::SwBorderAttrs(const SwModify *pMod, const SwFrm *pConstructor) +SwBorderAttrs::SwBorderAttrs(const SwModify *pMod, const SwFrame *pConstructor) : SwCacheObj(pMod) - , m_rAttrSet(pConstructor->IsContentFrm() - ? static_cast<const SwContentFrm*>(pConstructor)->GetNode()->GetSwAttrSet() - : static_cast<const SwLayoutFrm*>(pConstructor)->GetFormat()->GetAttrSet()) + , m_rAttrSet(pConstructor->IsContentFrame() + ? static_cast<const SwContentFrame*>(pConstructor)->GetNode()->GetSwAttrSet() + : static_cast<const SwLayoutFrame*>(pConstructor)->GetFormat()->GetAttrSet()) , m_rUL(m_rAttrSet.GetULSpace()) // #i96772# // LRSpaceItem is copied due to the possibility that it is adjusted - see below , m_rLR(m_rAttrSet.GetLRSpace()) , m_rBox(m_rAttrSet.GetBox()) , m_rShadow(m_rAttrSet.GetShadow()) - , m_aFrameSize(m_rAttrSet.GetFrmSize().GetSize()) + , m_aFrameSize(m_rAttrSet.GetFrameSize().GetSize()) , m_bIsLine(false) , m_bJoinedWithPrev(false) , m_bJoinedWithNext(false) @@ -1840,12 +1840,12 @@ SwBorderAttrs::SwBorderAttrs(const SwModify *pMod, const SwFrm *pConstructor) , m_nGetBottomLine(0) { // #i96772# - const SwTextFrm* pTextFrm = dynamic_cast<const SwTextFrm*>(pConstructor); - if ( pTextFrm ) + const SwTextFrame* pTextFrame = dynamic_cast<const SwTextFrame*>(pConstructor); + if ( pTextFrame ) { - pTextFrm->GetTextNode()->ClearLRSpaceItemDueToListLevelIndents( m_rLR ); + pTextFrame->GetTextNode()->ClearLRSpaceItemDueToListLevelIndents( m_rLR ); } - else if ( pConstructor->IsNoTextFrm() ) + else if ( pConstructor->IsNoTextFrame() ) { m_rLR = SvxLRSpaceItem ( RES_LR_SPACE ); } @@ -1887,47 +1887,47 @@ void SwBorderAttrs::_CalcBottom() m_bBottom = false; } -long SwBorderAttrs::CalcRight( const SwFrm* pCaller ) const +long SwBorderAttrs::CalcRight( const SwFrame* pCaller ) const { long nRight=0; - if (!pCaller->IsTextFrm() || !static_cast<const SwTextFrm*>(pCaller)->GetTextNode()->GetDoc()->GetDocumentSettingManager().get(DocumentSettingId::INVERT_BORDER_SPACING)) { + if (!pCaller->IsTextFrame() || !static_cast<const SwTextFrame*>(pCaller)->GetTextNode()->GetDoc()->GetDocumentSettingManager().get(DocumentSettingId::INVERT_BORDER_SPACING)) { // OD 23.01.2003 #106895# - for cell frame in R2L text direction the left // and right border are painted on the right respectively left. - if ( pCaller->IsCellFrm() && pCaller->IsRightToLeft() ) + if ( pCaller->IsCellFrame() && pCaller->IsRightToLeft() ) nRight = CalcLeftLine(); else nRight = CalcRightLine(); } // for paragraphs, "left" is "before text" and "right" is "after text" - if ( pCaller->IsTextFrm() && pCaller->IsRightToLeft() ) + if ( pCaller->IsTextFrame() && pCaller->IsRightToLeft() ) nRight += m_rLR.GetLeft(); else nRight += m_rLR.GetRight(); // correction: retrieve left margin for numbering in R2L-layout - if ( pCaller->IsTextFrm() && pCaller->IsRightToLeft() ) + if ( pCaller->IsTextFrame() && pCaller->IsRightToLeft() ) { - nRight += static_cast<const SwTextFrm*>(pCaller)->GetTextNode()->GetLeftMarginWithNum(); + nRight += static_cast<const SwTextFrame*>(pCaller)->GetTextNode()->GetLeftMarginWithNum(); } return nRight; } /// Tries to detect if this paragraph has a floating table attached. -static bool lcl_hasTabFrm(const SwTextFrm* pTextFrm) +static bool lcl_hasTabFrame(const SwTextFrame* pTextFrame) { - if (pTextFrm->GetDrawObjs()) + if (pTextFrame->GetDrawObjs()) { - const SwSortedObjs* pSortedObjs = pTextFrm->GetDrawObjs(); + const SwSortedObjs* pSortedObjs = pTextFrame->GetDrawObjs(); if (pSortedObjs->size() > 0) { SwAnchoredObject* pObject = (*pSortedObjs)[0]; - if (dynamic_cast<const SwFlyFrm*>(pObject) != nullptr) + if (dynamic_cast<const SwFlyFrame*>(pObject) != nullptr) { - SwFlyFrm* pFly = static_cast<SwFlyFrm*>(pObject); - if (pFly->Lower() && pFly->Lower()->IsTabFrm()) + SwFlyFrame* pFly = static_cast<SwFlyFrame*>(pObject); + if (pFly->Lower() && pFly->Lower()->IsTabFrame()) return true; } } @@ -1935,35 +1935,35 @@ static bool lcl_hasTabFrm(const SwTextFrm* pTextFrm) return false; } -long SwBorderAttrs::CalcLeft( const SwFrm *pCaller ) const +long SwBorderAttrs::CalcLeft( const SwFrame *pCaller ) const { long nLeft=0; - if (!pCaller->IsTextFrm() || !static_cast<const SwTextFrm*>(pCaller)->GetTextNode()->GetDoc()->GetDocumentSettingManager().get(DocumentSettingId::INVERT_BORDER_SPACING)) { + if (!pCaller->IsTextFrame() || !static_cast<const SwTextFrame*>(pCaller)->GetTextNode()->GetDoc()->GetDocumentSettingManager().get(DocumentSettingId::INVERT_BORDER_SPACING)) { // OD 23.01.2003 #106895# - for cell frame in R2L text direction the left // and right border are painted on the right respectively left. - if ( pCaller->IsCellFrm() && pCaller->IsRightToLeft() ) + if ( pCaller->IsCellFrame() && pCaller->IsRightToLeft() ) nLeft = CalcRightLine(); else nLeft = CalcLeftLine(); } // for paragraphs, "left" is "before text" and "right" is "after text" - if ( pCaller->IsTextFrm() && pCaller->IsRightToLeft() ) + if ( pCaller->IsTextFrame() && pCaller->IsRightToLeft() ) nLeft += m_rLR.GetRight(); else { bool bIgnoreMargin = false; - if (pCaller->IsTextFrm()) + if (pCaller->IsTextFrame()) { - const SwTextFrm* pTextFrm = static_cast<const SwTextFrm*>(pCaller); - if (pTextFrm->GetTextNode()->GetDoc()->GetDocumentSettingManager().get(DocumentSettingId::FLOATTABLE_NOMARGINS)) + const SwTextFrame* pTextFrame = static_cast<const SwTextFrame*>(pCaller); + if (pTextFrame->GetTextNode()->GetDoc()->GetDocumentSettingManager().get(DocumentSettingId::FLOATTABLE_NOMARGINS)) { // If this is explicitly requested, ignore the margins next to the floating table. - if (lcl_hasTabFrm(pTextFrm)) + if (lcl_hasTabFrame(pTextFrame)) bIgnoreMargin = true; // TODO here we only handle the first two paragraphs, would be nice to generalize this. - else if (pTextFrm->FindPrev() && pTextFrm->FindPrev()->IsTextFrm() && lcl_hasTabFrm(static_cast<const SwTextFrm*>(pTextFrm->FindPrev()))) + else if (pTextFrame->FindPrev() && pTextFrame->FindPrev()->IsTextFrame() && lcl_hasTabFrame(static_cast<const SwTextFrame*>(pTextFrame->FindPrev()))) bIgnoreMargin = true; } } @@ -1972,9 +1972,9 @@ long SwBorderAttrs::CalcLeft( const SwFrm *pCaller ) const } // correction: do not retrieve left margin for numbering in R2L-layout - if ( pCaller->IsTextFrm() && !pCaller->IsRightToLeft() ) + if ( pCaller->IsTextFrame() && !pCaller->IsRightToLeft() ) { - nLeft += static_cast<const SwTextFrm*>(pCaller)->GetTextNode()->GetLeftMarginWithNum(); + nLeft += static_cast<const SwTextFrame*>(pCaller)->GetTextNode()->GetLeftMarginWithNum(); } return nLeft; @@ -2048,8 +2048,8 @@ inline bool CmpLines( const editeng::SvxBorderLine *pL1, const editeng::SvxBorde // instead of only the right LR-spacing, because R2L-layout has to be // considered. bool SwBorderAttrs::CmpLeftRight( const SwBorderAttrs &rCmpAttrs, - const SwFrm *pCaller, - const SwFrm *pCmp ) const + const SwFrame *pCaller, + const SwFrame *pCmp ) const { return ( CmpLines( rCmpAttrs.GetBox().GetLeft(), GetBox().GetLeft() ) && CmpLines( rCmpAttrs.GetBox().GetRight(),GetBox().GetRight() ) && @@ -2058,17 +2058,17 @@ bool SwBorderAttrs::CmpLeftRight( const SwBorderAttrs &rCmpAttrs, CalcRight( pCaller ) == rCmpAttrs.CalcRight( pCmp ) ); } -bool SwBorderAttrs::_JoinWithCmp( const SwFrm& _rCallerFrm, - const SwFrm& _rCmpFrm ) const +bool SwBorderAttrs::_JoinWithCmp( const SwFrame& _rCallerFrame, + const SwFrame& _rCmpFrame ) const { bool bReturnVal = false; - SwBorderAttrAccess aCmpAccess( SwFrm::GetCache(), &_rCmpFrm ); + SwBorderAttrAccess aCmpAccess( SwFrame::GetCache(), &_rCmpFrame ); const SwBorderAttrs &rCmpAttrs = *aCmpAccess.Get(); if ( m_rShadow == rCmpAttrs.GetShadow() && CmpLines( m_rBox.GetTop(), rCmpAttrs.GetBox().GetTop() ) && CmpLines( m_rBox.GetBottom(), rCmpAttrs.GetBox().GetBottom() ) && - CmpLeftRight( rCmpAttrs, &_rCallerFrm, &_rCmpFrm ) + CmpLeftRight( rCmpAttrs, &_rCallerFrame, &_rCmpFrame ) ) { bReturnVal = true; @@ -2079,63 +2079,63 @@ bool SwBorderAttrs::_JoinWithCmp( const SwFrm& _rCallerFrm, // OD 21.05.2003 #108789# - method to determine, if borders are joined with // previous frame. Calculated value saved in cached value <m_bJoinedWithPrev> -// OD 2004-02-26 #i25029# - add 2nd parameter <_pPrevFrm> -void SwBorderAttrs::_CalcJoinedWithPrev( const SwFrm& _rFrm, - const SwFrm* _pPrevFrm ) +// OD 2004-02-26 #i25029# - add 2nd parameter <_pPrevFrame> +void SwBorderAttrs::_CalcJoinedWithPrev( const SwFrame& _rFrame, + const SwFrame* _pPrevFrame ) { // set default m_bJoinedWithPrev = false; - if ( _rFrm.IsTextFrm() ) + if ( _rFrame.IsTextFrame() ) { // text frame can potentially join with previous text frame, if // corresponding attribute set is set at previous text frame. - // OD 2004-02-26 #i25029# - If parameter <_pPrevFrm> is set, take this + // OD 2004-02-26 #i25029# - If parameter <_pPrevFrame> is set, take this // one as previous frame. - const SwFrm* pPrevFrm = _pPrevFrm ? _pPrevFrm : _rFrm.GetPrev(); + const SwFrame* pPrevFrame = _pPrevFrame ? _pPrevFrame : _rFrame.GetPrev(); // OD 2004-02-13 #i25029# - skip hidden text frames. - while ( pPrevFrm && pPrevFrm->IsTextFrm() && - static_cast<const SwTextFrm*>(pPrevFrm)->IsHiddenNow() ) + while ( pPrevFrame && pPrevFrame->IsTextFrame() && + static_cast<const SwTextFrame*>(pPrevFrame)->IsHiddenNow() ) { - pPrevFrm = pPrevFrm->GetPrev(); + pPrevFrame = pPrevFrame->GetPrev(); } - if ( pPrevFrm && pPrevFrm->IsTextFrm() && - pPrevFrm->GetAttrSet()->GetParaConnectBorder().GetValue() + if ( pPrevFrame && pPrevFrame->IsTextFrame() && + pPrevFrame->GetAttrSet()->GetParaConnectBorder().GetValue() ) { - m_bJoinedWithPrev = _JoinWithCmp( _rFrm, *(pPrevFrm) ); + m_bJoinedWithPrev = _JoinWithCmp( _rFrame, *(pPrevFrame) ); } } // valid cache status, if demanded - // OD 2004-02-26 #i25029# - Do not validate cache, if parameter <_pPrevFrm> + // OD 2004-02-26 #i25029# - Do not validate cache, if parameter <_pPrevFrame> // is set. - m_bCachedJoinedWithPrev = m_bCacheGetLine && !_pPrevFrm; + m_bCachedJoinedWithPrev = m_bCacheGetLine && !_pPrevFrame; } // OD 21.05.2003 #108789# - method to determine, if borders are joined with // next frame. Calculated value saved in cached value <m_bJoinedWithNext> -void SwBorderAttrs::_CalcJoinedWithNext( const SwFrm& _rFrm ) +void SwBorderAttrs::_CalcJoinedWithNext( const SwFrame& _rFrame ) { // set default m_bJoinedWithNext = false; - if ( _rFrm.IsTextFrm() ) + if ( _rFrame.IsTextFrame() ) { // text frame can potentially join with next text frame, if // corresponding attribute set is set at current text frame. // OD 2004-02-13 #i25029# - get next frame, but skip hidden text frames. - const SwFrm* pNextFrm = _rFrm.GetNext(); - while ( pNextFrm && pNextFrm->IsTextFrm() && - static_cast<const SwTextFrm*>(pNextFrm)->IsHiddenNow() ) + const SwFrame* pNextFrame = _rFrame.GetNext(); + while ( pNextFrame && pNextFrame->IsTextFrame() && + static_cast<const SwTextFrame*>(pNextFrame)->IsHiddenNow() ) { - pNextFrm = pNextFrm->GetNext(); + pNextFrame = pNextFrame->GetNext(); } - if ( pNextFrm && pNextFrm->IsTextFrm() && - _rFrm.GetAttrSet()->GetParaConnectBorder().GetValue() + if ( pNextFrame && pNextFrame->IsTextFrame() && + _rFrame.GetAttrSet()->GetParaConnectBorder().GetValue() ) { - m_bJoinedWithNext = _JoinWithCmp( _rFrm, *(pNextFrm) ); + m_bJoinedWithNext = _JoinWithCmp( _rFrame, *(pNextFrame) ); } } @@ -2144,40 +2144,40 @@ void SwBorderAttrs::_CalcJoinedWithNext( const SwFrm& _rFrm ) } // OD 21.05.2003 #108789# - accessor for cached values <m_bJoinedWithPrev> -// OD 2004-02-26 #i25029# - add 2nd parameter <_pPrevFrm>, which is passed to +// OD 2004-02-26 #i25029# - add 2nd parameter <_pPrevFrame>, which is passed to // method <_CalcJoindWithPrev(..)>. -bool SwBorderAttrs::JoinedWithPrev( const SwFrm& _rFrm, - const SwFrm* _pPrevFrm ) const +bool SwBorderAttrs::JoinedWithPrev( const SwFrame& _rFrame, + const SwFrame* _pPrevFrame ) const { - if ( !m_bCachedJoinedWithPrev || _pPrevFrm ) + if ( !m_bCachedJoinedWithPrev || _pPrevFrame ) { - // OD 2004-02-26 #i25029# - pass <_pPrevFrm> as 2nd parameter - const_cast<SwBorderAttrs*>(this)->_CalcJoinedWithPrev( _rFrm, _pPrevFrm ); + // OD 2004-02-26 #i25029# - pass <_pPrevFrame> as 2nd parameter + const_cast<SwBorderAttrs*>(this)->_CalcJoinedWithPrev( _rFrame, _pPrevFrame ); } return m_bJoinedWithPrev; } -bool SwBorderAttrs::JoinedWithNext( const SwFrm& _rFrm ) const +bool SwBorderAttrs::JoinedWithNext( const SwFrame& _rFrame ) const { if ( !m_bCachedJoinedWithNext ) { - const_cast<SwBorderAttrs*>(this)->_CalcJoinedWithNext( _rFrm ); + const_cast<SwBorderAttrs*>(this)->_CalcJoinedWithNext( _rFrame ); } return m_bJoinedWithNext; } -// OD 2004-02-26 #i25029# - added 2nd parameter <_pPrevFrm>, which is passed to +// OD 2004-02-26 #i25029# - added 2nd parameter <_pPrevFrame>, which is passed to // method <JoinedWithPrev> -void SwBorderAttrs::_GetTopLine( const SwFrm& _rFrm, - const SwFrm* _pPrevFrm ) +void SwBorderAttrs::_GetTopLine( const SwFrame& _rFrame, + const SwFrame* _pPrevFrame ) { sal_uInt16 nRet = CalcTopLine(); // OD 21.05.2003 #108789# - use new method <JoinWithPrev()> // OD 2004-02-26 #i25029# - add 2nd parameter - if ( JoinedWithPrev( _rFrm, _pPrevFrm ) ) + if ( JoinedWithPrev( _rFrame, _pPrevFrame ) ) { nRet = 0; } @@ -2187,12 +2187,12 @@ void SwBorderAttrs::_GetTopLine( const SwFrm& _rFrm, m_nGetTopLine = nRet; } -void SwBorderAttrs::_GetBottomLine( const SwFrm& _rFrm ) +void SwBorderAttrs::_GetBottomLine( const SwFrame& _rFrame ) { sal_uInt16 nRet = CalcBottomLine(); // OD 21.05.2003 #108789# - use new method <JoinWithPrev()> - if ( JoinedWithNext( _rFrm ) ) + if ( JoinedWithNext( _rFrame ) ) { nRet = 0; } @@ -2202,15 +2202,15 @@ void SwBorderAttrs::_GetBottomLine( const SwFrm& _rFrm ) m_nGetBottomLine = nRet; } -SwBorderAttrAccess::SwBorderAttrAccess( SwCache &rCach, const SwFrm *pFrm ) : +SwBorderAttrAccess::SwBorderAttrAccess( SwCache &rCach, const SwFrame *pFrame ) : SwCacheAccess( rCach, - (pFrm->IsContentFrm() ? - const_cast<void*>(static_cast<void const *>(static_cast<const SwContentFrm*>(pFrm)->GetNode())) : - const_cast<void*>(static_cast<void const *>(static_cast<const SwLayoutFrm*>(pFrm)->GetFormat()))), - (pFrm->IsContentFrm() ? - static_cast<SwModify const *>(static_cast<const SwContentFrm*>(pFrm)->GetNode())->IsInCache() : - static_cast<SwModify const *>(static_cast<const SwLayoutFrm*>(pFrm)->GetFormat())->IsInCache()) ), - pConstructor( pFrm ) + (pFrame->IsContentFrame() ? + const_cast<void*>(static_cast<void const *>(static_cast<const SwContentFrame*>(pFrame)->GetNode())) : + const_cast<void*>(static_cast<void const *>(static_cast<const SwLayoutFrame*>(pFrame)->GetFormat()))), + (pFrame->IsContentFrame() ? + static_cast<SwModify const *>(static_cast<const SwContentFrame*>(pFrame)->GetNode())->IsInCache() : + static_cast<SwModify const *>(static_cast<const SwLayoutFrame*>(pFrame)->GetFormat())->IsInCache()) ), + pConstructor( pFrame ) { } @@ -2225,7 +2225,7 @@ SwBorderAttrs *SwBorderAttrAccess::Get() return static_cast<SwBorderAttrs*>(SwCacheAccess::Get()); } -SwOrderIter::SwOrderIter( const SwPageFrm *pPg, bool bFlys ) : +SwOrderIter::SwOrderIter( const SwPageFrame *pPg, bool bFlys ) : m_pPage( pPg ), m_pCurrent( nullptr ), m_bFlysOnly( bFlys ) @@ -2352,42 +2352,42 @@ const SdrObject *SwOrderIter::Prev() // #115759# - 'remove' also drawing object from page and // at-fly anchored objects from page -static void lcl_RemoveObjsFromPage( SwFrm* _pFrm ) +static void lcl_RemoveObjsFromPage( SwFrame* _pFrame ) { - OSL_ENSURE( _pFrm->GetDrawObjs(), "no DrawObjs in lcl_RemoveObjsFromPage." ); - SwSortedObjs &rObjs = *_pFrm->GetDrawObjs(); + OSL_ENSURE( _pFrame->GetDrawObjs(), "no DrawObjs in lcl_RemoveObjsFromPage." ); + SwSortedObjs &rObjs = *_pFrame->GetDrawObjs(); for ( size_t i = 0; i < rObjs.size(); ++i ) { SwAnchoredObject* pObj = rObjs[i]; // #115759# - reset member, at which the anchored // object orients its vertical position - pObj->ClearVertPosOrientFrm(); + pObj->ClearVertPosOrientFrame(); // #i43913# pObj->ResetLayoutProcessBools(); // #115759# - remove also lower objects of as-character // anchored Writer fly frames from page - if ( dynamic_cast<const SwFlyFrm*>( pObj) != nullptr ) + if ( dynamic_cast<const SwFlyFrame*>( pObj) != nullptr ) { - SwFlyFrm* pFlyFrm = static_cast<SwFlyFrm*>(pObj); + SwFlyFrame* pFlyFrame = static_cast<SwFlyFrame*>(pObj); // #115759# - remove also direct lowers of Writer // fly frame from page - if ( pFlyFrm->GetDrawObjs() ) + if ( pFlyFrame->GetDrawObjs() ) { - ::lcl_RemoveObjsFromPage( pFlyFrm ); + ::lcl_RemoveObjsFromPage( pFlyFrame ); } - SwContentFrm* pCnt = pFlyFrm->ContainsContent(); + SwContentFrame* pCnt = pFlyFrame->ContainsContent(); while ( pCnt ) { if ( pCnt->GetDrawObjs() ) ::lcl_RemoveObjsFromPage( pCnt ); - pCnt = pCnt->GetNextContentFrm(); + pCnt = pCnt->GetNextContentFrame(); } - if ( pFlyFrm->IsFlyFreeFrm() ) + if ( pFlyFrame->IsFlyFreeFrame() ) { - // #i28701# - use new method <GetPageFrm()> - pFlyFrm->GetPageFrm()->RemoveFlyFromPage( pFlyFrm ); + // #i28701# - use new method <GetPageFrame()> + pFlyFrame->GetPageFrame()->RemoveFlyFromPage( pFlyFrame ); } } // #115759# - remove also drawing objects from page @@ -2395,19 +2395,19 @@ static void lcl_RemoveObjsFromPage( SwFrm* _pFrm ) { if (pObj->GetFrameFormat().GetAnchor().GetAnchorId() != FLY_AS_CHAR) { - pObj->GetPageFrm()->RemoveDrawObjFromPage( + pObj->GetPageFrame()->RemoveDrawObjFromPage( *(static_cast<SwAnchoredDrawObject*>(pObj)) ); } } } } -SwFrm *SaveContent( SwLayoutFrm *pLay, SwFrm *pStart ) +SwFrame *SaveContent( SwLayoutFrame *pLay, SwFrame *pStart ) { - if( pLay->IsSctFrm() && pLay->Lower() && pLay->Lower()->IsColumnFrm() ) - sw_RemoveFootnotes( static_cast<SwColumnFrm*>(pLay->Lower()), true, true ); + if( pLay->IsSctFrame() && pLay->Lower() && pLay->Lower()->IsColumnFrame() ) + sw_RemoveFootnotes( static_cast<SwColumnFrame*>(pLay->Lower()), true, true ); - SwFrm *pSav; + SwFrame *pSav; if ( nullptr == (pSav = pLay->ContainsAny()) ) return nullptr; @@ -2422,22 +2422,22 @@ SwFrm *SaveContent( SwLayoutFrm *pLay, SwFrm *pStart ) // Tables should be saved as a whole, expection: // The contents of a section or a cell inside a table should be saved - if ( pSav->IsInTab() && !( ( pLay->IsSctFrm() || pLay->IsCellFrm() ) && pLay->IsInTab() ) ) - while ( !pSav->IsTabFrm() ) + if ( pSav->IsInTab() && !( ( pLay->IsSctFrame() || pLay->IsCellFrame() ) && pLay->IsInTab() ) ) + while ( !pSav->IsTabFrame() ) pSav = pSav->GetUpper(); if( pSav->IsInSct() ) { // search the upmost section inside of pLay - SwFrm* pSect = pLay->FindSctFrm(); - SwFrm *pTmp = pSav; + SwFrame* pSect = pLay->FindSctFrame(); + SwFrame *pTmp = pSav; do { pSav = pTmp; - pTmp = (pSav && pSav->GetUpper()) ? pSav->GetUpper()->FindSctFrm() : nullptr; + pTmp = (pSav && pSav->GetUpper()) ? pSav->GetUpper()->FindSctFrame() : nullptr; } while ( pTmp != pSect ); } - SwFrm *pFloat = pSav; + SwFrame *pFloat = pSav; if( !pStart ) pStart = pSav; bool bGo = pStart == pSav; @@ -2451,21 +2451,21 @@ SwFrm *SaveContent( SwLayoutFrm *pLay, SwFrm *pStart ) { if( bGo ) { - if ( pFloat->IsContentFrm() ) + if ( pFloat->IsContentFrame() ) { if ( pFloat->GetDrawObjs() ) - ::lcl_RemoveObjsFromPage( static_cast<SwContentFrm*>(pFloat) ); + ::lcl_RemoveObjsFromPage( static_cast<SwContentFrame*>(pFloat) ); } - else if ( pFloat->IsTabFrm() || pFloat->IsSctFrm() ) + else if ( pFloat->IsTabFrame() || pFloat->IsSctFrame() ) { - SwContentFrm *pCnt = static_cast<SwLayoutFrm*>(pFloat)->ContainsContent(); + SwContentFrame *pCnt = static_cast<SwLayoutFrame*>(pFloat)->ContainsContent(); if( pCnt ) { do { if ( pCnt->GetDrawObjs() ) ::lcl_RemoveObjsFromPage( pCnt ); - pCnt = pCnt->GetNextContentFrm(); - } while ( pCnt && static_cast<SwLayoutFrm*>(pFloat)->IsAnLower( pCnt ) ); + pCnt = pCnt->GetNextContentFrame(); + } while ( pCnt && static_cast<SwLayoutFrame*>(pFloat)->IsAnLower( pCnt ) ); } } else { @@ -2490,7 +2490,7 @@ SwFrm *SaveContent( SwLayoutFrm *pLay, SwFrm *pStart ) } while ( pFloat ); // search next chain part and connect both chains - SwFrm *pTmp = pFloat->FindNext(); + SwFrame *pTmp = pFloat->FindNext(); if( bGo ) pFloat->mpUpper = nullptr; @@ -2515,10 +2515,10 @@ SwFrm *SaveContent( SwLayoutFrm *pLay, SwFrm *pStart ) // #115759# - add also drawing objects to page and at-fly // anchored objects to page -static void lcl_AddObjsToPage( SwFrm* _pFrm, SwPageFrm* _pPage ) +static void lcl_AddObjsToPage( SwFrame* _pFrame, SwPageFrame* _pPage ) { - OSL_ENSURE( _pFrm->GetDrawObjs(), "no DrawObjs in lcl_AddObjsToPage." ); - SwSortedObjs &rObjs = *_pFrm->GetDrawObjs(); + OSL_ENSURE( _pFrame->GetDrawObjs(), "no DrawObjs in lcl_AddObjsToPage." ); + SwSortedObjs &rObjs = *_pFrame->GetDrawObjs(); for ( size_t i = 0; i < rObjs.size(); ++i ) { SwAnchoredObject* pObj = rObjs[i]; @@ -2528,30 +2528,30 @@ static void lcl_AddObjsToPage( SwFrm* _pFrm, SwPageFrm* _pPage ) pObj->UnlockPosition(); // #115759# - add also lower objects of as-character // anchored Writer fly frames from page - if ( dynamic_cast<const SwFlyFrm*>( pObj) != nullptr ) + if ( dynamic_cast<const SwFlyFrame*>( pObj) != nullptr ) { - SwFlyFrm* pFlyFrm = static_cast<SwFlyFrm*>(pObj); - if ( dynamic_cast<const SwFlyFreeFrm*>( pObj) != nullptr ) + SwFlyFrame* pFlyFrame = static_cast<SwFlyFrame*>(pObj); + if ( dynamic_cast<const SwFlyFreeFrame*>( pObj) != nullptr ) { - _pPage->AppendFlyToPage( pFlyFrm ); + _pPage->AppendFlyToPage( pFlyFrame ); } - pFlyFrm->_InvalidatePos(); - pFlyFrm->_InvalidateSize(); - pFlyFrm->InvalidatePage( _pPage ); + pFlyFrame->_InvalidatePos(); + pFlyFrame->_InvalidateSize(); + pFlyFrame->InvalidatePage( _pPage ); // #115759# - add also at-fly anchored objects // to page - if ( pFlyFrm->GetDrawObjs() ) + if ( pFlyFrame->GetDrawObjs() ) { - ::lcl_AddObjsToPage( pFlyFrm, _pPage ); + ::lcl_AddObjsToPage( pFlyFrame, _pPage ); } - SwContentFrm *pCnt = pFlyFrm->ContainsContent(); + SwContentFrame *pCnt = pFlyFrame->ContainsContent(); while ( pCnt ) { if ( pCnt->GetDrawObjs() ) ::lcl_AddObjsToPage( pCnt, _pPage ); - pCnt = pCnt->GetNextContentFrm(); + pCnt = pCnt->GetNextContentFrame(); } } // #115759# - remove also drawing objects from page @@ -2567,31 +2567,31 @@ static void lcl_AddObjsToPage( SwFrm* _pFrm, SwPageFrm* _pPage ) } } -void RestoreContent( SwFrm *pSav, SwLayoutFrm *pParent, SwFrm *pSibling, bool bGrow ) +void RestoreContent( SwFrame *pSav, SwLayoutFrame *pParent, SwFrame *pSibling, bool bGrow ) { OSL_ENSURE( pSav && pParent, "no Save or Parent provided for RestoreContent." ); SWRECTFN( pParent ) - // If there are already FlowFrms below the new parent, so add the chain (starting with pSav) + // If there are already FlowFrames below the new parent, so add the chain (starting with pSav) // after the last one. The parts are inserted and invalidated if needed. - // On the way, the Flys of the ContentFrms are registered at the page. + // On the way, the Flys of the ContentFrames are registered at the page. - SwPageFrm *pPage = pParent->FindPageFrm(); + SwPageFrame *pPage = pParent->FindPageFrame(); if ( pPage ) pPage->InvalidatePage( pPage ); // determine predecessor and establish connection or initialize pSav->mpPrev = pSibling; - SwFrm* pNxt; + SwFrame* pNxt; if ( pSibling ) { pNxt = pSibling->mpNext; pSibling->mpNext = pSav; pSibling->_InvalidatePrt(); pSibling->InvalidatePage( pPage ); - SwFlowFrm *pFlowFrm = dynamic_cast<SwFlowFrm*>(pSibling); - if (pFlowFrm && pFlowFrm->GetFollow()) + SwFlowFrame *pFlowFrame = dynamic_cast<SwFlowFrame*>(pSibling); + if (pFlowFrame && pFlowFrame->GetFollow()) pSibling->Prepare( PREP_CLEAR, nullptr, false ); } else @@ -2599,11 +2599,11 @@ void RestoreContent( SwFrm *pSav, SwLayoutFrm *pParent, SwFrm *pSibling, bool bG pParent->m_pLower = pSav; pSav->mpUpper = pParent; // set here already, so that it is explicit when invalidating - if ( pSav->IsContentFrm() ) - static_cast<SwContentFrm*>(pSav)->InvalidatePage( pPage ); + if ( pSav->IsContentFrame() ) + static_cast<SwContentFrame*>(pSav)->InvalidatePage( pPage ); else - { // pSav might be an empty SectFrm - SwContentFrm* pCnt = pParent->ContainsContent(); + { // pSav might be an empty SectFrame + SwContentFrame* pCnt = pParent->ContainsContent(); if( pCnt ) pCnt->InvalidatePage( pPage ); } @@ -2611,34 +2611,34 @@ void RestoreContent( SwFrm *pSav, SwLayoutFrm *pParent, SwFrm *pSibling, bool bG // the parent needs to grow appropriately SwTwips nGrowVal = 0; - SwFrm* pLast; + SwFrame* pLast; do { pSav->mpUpper = pParent; - nGrowVal += (pSav->Frm().*fnRect->fnGetHeight)(); + nGrowVal += (pSav->Frame().*fnRect->fnGetHeight)(); pSav->_InvalidateAll(); - // register Flys, if TextFrms than also invalidate appropriately - if ( pSav->IsContentFrm() ) + // register Flys, if TextFrames than also invalidate appropriately + if ( pSav->IsContentFrame() ) { - if ( pSav->IsTextFrm() && - static_cast<SwTextFrm*>(pSav)->GetCacheIdx() != USHRT_MAX ) - static_cast<SwTextFrm*>(pSav)->Init(); // I am its friend + if ( pSav->IsTextFrame() && + static_cast<SwTextFrame*>(pSav)->GetCacheIdx() != USHRT_MAX ) + static_cast<SwTextFrame*>(pSav)->Init(); // I am its friend if ( pPage && pSav->GetDrawObjs() ) - ::lcl_AddObjsToPage( static_cast<SwContentFrm*>(pSav), pPage ); + ::lcl_AddObjsToPage( static_cast<SwContentFrame*>(pSav), pPage ); } else - { SwContentFrm *pBlub = static_cast<SwLayoutFrm*>(pSav)->ContainsContent(); + { SwContentFrame *pBlub = static_cast<SwLayoutFrame*>(pSav)->ContainsContent(); if( pBlub ) { do { if ( pPage && pBlub->GetDrawObjs() ) ::lcl_AddObjsToPage( pBlub, pPage ); - if( pBlub->IsTextFrm() && static_cast<SwTextFrm*>(pBlub)->HasFootnote() && - static_cast<SwTextFrm*>(pBlub)->GetCacheIdx() != USHRT_MAX ) - static_cast<SwTextFrm*>(pBlub)->Init(); // I am its friend - pBlub = pBlub->GetNextContentFrm(); - } while ( pBlub && static_cast<SwLayoutFrm*>(pSav)->IsAnLower( pBlub )); + if( pBlub->IsTextFrame() && static_cast<SwTextFrame*>(pBlub)->HasFootnote() && + static_cast<SwTextFrame*>(pBlub)->GetCacheIdx() != USHRT_MAX ) + static_cast<SwTextFrame*>(pBlub)->Init(); // I am its friend + pBlub = pBlub->GetNextContentFrame(); + } while ( pBlub && static_cast<SwLayoutFrame*>(pSav)->IsAnLower( pBlub )); } } pLast = pSav; @@ -2656,12 +2656,12 @@ void RestoreContent( SwFrm *pSav, SwLayoutFrm *pParent, SwFrm *pSibling, bool bG pParent->Grow( nGrowVal ); } -SwPageFrm * InsertNewPage( SwPageDesc &rDesc, SwFrm *pUpper, +SwPageFrame * InsertNewPage( SwPageDesc &rDesc, SwFrame *pUpper, bool bOdd, bool bFirst, bool bInsertEmpty, bool bFootnote, - SwFrm *pSibling ) + SwFrame *pSibling ) { - SwPageFrm *pRet; - SwDoc *pDoc = static_cast<SwLayoutFrm*>(pUpper)->GetFormat()->GetDoc(); + SwPageFrame *pRet; + SwDoc *pDoc = static_cast<SwLayoutFrame*>(pUpper)->GetFormat()->GetDoc(); if (bFirst) { if (rDesc.IsFirstShared()) @@ -2694,36 +2694,36 @@ SwPageFrm * InsertNewPage( SwPageDesc &rDesc, SwFrm *pUpper, if( bInsertEmpty ) { SwPageDesc *pTmpDesc = pSibling && pSibling->GetPrev() ? - static_cast<SwPageFrm*>(pSibling->GetPrev())->GetPageDesc() : &rDesc; - pRet = new SwPageFrm( pDoc->GetEmptyPageFormat(), pUpper, pTmpDesc ); + static_cast<SwPageFrame*>(pSibling->GetPrev())->GetPageDesc() : &rDesc; + pRet = new SwPageFrame( pDoc->GetEmptyPageFormat(), pUpper, pTmpDesc ); pRet->Paste( pUpper, pSibling ); pRet->PreparePage( bFootnote ); } - pRet = new SwPageFrm( pFormat, pUpper, &rDesc ); + pRet = new SwPageFrame( pFormat, pUpper, &rDesc ); pRet->Paste( pUpper, pSibling ); pRet->PreparePage( bFootnote ); if ( pRet->GetNext() ) - SwRootFrm::AssertPageFlys( pRet ); + SwRootFrame::AssertPageFlys( pRet ); return pRet; } /* The following two methods search the layout structure recursively and - * register all Flys at the page that have a Frm in this structure as an anchor. + * register all Flys at the page that have a Frame in this structure as an anchor. */ -static void lcl_Regist( SwPageFrm *pPage, const SwFrm *pAnch ) +static void lcl_Regist( SwPageFrame *pPage, const SwFrame *pAnch ) { SwSortedObjs *pObjs = const_cast<SwSortedObjs*>(pAnch->GetDrawObjs()); for ( size_t i = 0; i < pObjs->size(); ++i ) { SwAnchoredObject* pObj = (*pObjs)[i]; - if ( dynamic_cast<const SwFlyFrm*>( pObj) != nullptr ) + if ( dynamic_cast<const SwFlyFrame*>( pObj) != nullptr ) { - SwFlyFrm *pFly = static_cast<SwFlyFrm*>(pObj); + SwFlyFrame *pFly = static_cast<SwFlyFrame*>(pObj); // register (not if already known) - // #i28701# - use new method <GetPageFrm()> - SwPageFrm *pPg = pFly->IsFlyFreeFrm() - ? pFly->GetPageFrm() : pFly->FindPageFrm(); + // #i28701# - use new method <GetPageFrame()> + SwPageFrame *pPg = pFly->IsFlyFreeFrame() + ? pFly->GetPageFrame() : pFly->FindPageFrame(); if ( pPg != pPage ) { if ( pPg ) @@ -2735,16 +2735,16 @@ static void lcl_Regist( SwPageFrm *pPage, const SwFrm *pAnch ) else { // #i87493# - if ( pPage != pObj->GetPageFrm() ) + if ( pPage != pObj->GetPageFrame() ) { // #i28701# - if ( pObj->GetPageFrm() ) - pObj->GetPageFrm()->RemoveDrawObjFromPage( *pObj ); + if ( pObj->GetPageFrame() ) + pObj->GetPageFrame()->RemoveDrawObjFromPage( *pObj ); pPage->AppendDrawObjToPage( *pObj ); } } - const SwFlyFrm* pFly = pAnch->FindFlyFrm(); + const SwFlyFrame* pFly = pAnch->FindFlyFrame(); if ( pFly && pObj->GetDrawObj()->GetOrdNum() < pFly->GetVirtDrawObj()->GetOrdNum() && pObj->GetDrawObj()->GetPage() ) @@ -2756,83 +2756,83 @@ static void lcl_Regist( SwPageFrm *pPage, const SwFrm *pAnch ) } } -void RegistFlys( SwPageFrm *pPage, const SwLayoutFrm *pLay ) +void RegistFlys( SwPageFrame *pPage, const SwLayoutFrame *pLay ) { if ( pLay->GetDrawObjs() ) ::lcl_Regist( pPage, pLay ); - const SwFrm *pFrm = pLay->Lower(); - while ( pFrm ) + const SwFrame *pFrame = pLay->Lower(); + while ( pFrame ) { - if ( pFrm->IsLayoutFrm() ) - ::RegistFlys( pPage, static_cast<const SwLayoutFrm*>(pFrm) ); - else if ( pFrm->GetDrawObjs() ) - ::lcl_Regist( pPage, pFrm ); - pFrm = pFrm->GetNext(); + if ( pFrame->IsLayoutFrame() ) + ::RegistFlys( pPage, static_cast<const SwLayoutFrame*>(pFrame) ); + else if ( pFrame->GetDrawObjs() ) + ::lcl_Regist( pPage, pFrame ); + pFrame = pFrame->GetNext(); } } /// Notify the background based on the difference between old and new rectangle -void Notify( SwFlyFrm *pFly, SwPageFrm *pOld, const SwRect &rOld, +void Notify( SwFlyFrame *pFly, SwPageFrame *pOld, const SwRect &rOld, const SwRect* pOldPrt ) { - const SwRect aFrm( pFly->GetObjRectWithSpaces() ); - if ( rOld.Pos() != aFrm.Pos() ) + const SwRect aFrame( pFly->GetObjRectWithSpaces() ); + if ( rOld.Pos() != aFrame.Pos() ) { // changed position, invalidate old and new area if ( rOld.HasArea() && rOld.Left()+pFly->GetFormat()->GetLRSpace().GetLeft() < FAR_AWAY ) { pFly->NotifyBackground( pOld, rOld, PREP_FLY_LEAVE ); } - pFly->NotifyBackground( pFly->FindPageFrm(), aFrm, PREP_FLY_ARRIVE ); + pFly->NotifyBackground( pFly->FindPageFrame(), aFrame, PREP_FLY_ARRIVE ); } - else if ( rOld.SSize() != aFrm.SSize() ) + else if ( rOld.SSize() != aFrame.SSize() ) { // changed size, invalidate the area that was left or is now overlapped // For simplicity, we purposely invalidate a Twip even if not needed. - SwViewShell *pSh = pFly->getRootFrm()->GetCurrShell(); + SwViewShell *pSh = pFly->getRootFrame()->GetCurrShell(); if( pSh && rOld.HasArea() ) pSh->InvalidateWindows( rOld ); // #i51941# - consider case that fly frame isn't // registered at the old page <pOld> - SwPageFrm* pPageFrm = pFly->FindPageFrm(); - if ( pOld != pPageFrm ) + SwPageFrame* pPageFrame = pFly->FindPageFrame(); + if ( pOld != pPageFrame ) { - pFly->NotifyBackground( pPageFrm, aFrm, PREP_FLY_ARRIVE ); + pFly->NotifyBackground( pPageFrame, aFrame, PREP_FLY_ARRIVE ); } - if ( rOld.Left() != aFrm.Left() ) + if ( rOld.Left() != aFrame.Left() ) { SwRect aTmp( rOld ); - aTmp.Union( aFrm ); - aTmp.Left( std::min(aFrm.Left(), rOld.Left()) ); - aTmp.Right( std::max(aFrm.Left(), rOld.Left()) ); + aTmp.Union( aFrame ); + aTmp.Left( std::min(aFrame.Left(), rOld.Left()) ); + aTmp.Right( std::max(aFrame.Left(), rOld.Left()) ); pFly->NotifyBackground( pOld, aTmp, PREP_FLY_CHGD ); } SwTwips nOld = rOld.Right(); - SwTwips nNew = aFrm.Right(); + SwTwips nNew = aFrame.Right(); if ( nOld != nNew ) { SwRect aTmp( rOld ); - aTmp.Union( aFrm ); + aTmp.Union( aFrame ); aTmp.Left( std::min(nNew, nOld) ); aTmp.Right( std::max(nNew, nOld) ); pFly->NotifyBackground( pOld, aTmp, PREP_FLY_CHGD ); } - if ( rOld.Top() != aFrm.Top() ) + if ( rOld.Top() != aFrame.Top() ) { SwRect aTmp( rOld ); - aTmp.Union( aFrm ); - aTmp.Top( std::min(aFrm.Top(), rOld.Top()) ); - aTmp.Bottom( std::max(aFrm.Top(), rOld.Top()) ); + aTmp.Union( aFrame ); + aTmp.Top( std::min(aFrame.Top(), rOld.Top()) ); + aTmp.Bottom( std::max(aFrame.Top(), rOld.Top()) ); pFly->NotifyBackground( pOld, aTmp, PREP_FLY_CHGD ); } nOld = rOld.Bottom(); - nNew = aFrm.Bottom(); + nNew = aFrame.Bottom(); if ( nOld != nNew ) { SwRect aTmp( rOld ); - aTmp.Union( aFrm ); + aTmp.Union( aFrame ); aTmp.Top( std::min(nNew, nOld) ); aTmp.Bottom( std::max(nNew, nOld) ); pFly->NotifyBackground( pOld, aTmp, PREP_FLY_CHGD ); @@ -2842,38 +2842,38 @@ void Notify( SwFlyFrm *pFly, SwPageFrm *pOld, const SwRect &rOld, pFly->GetFormat()->GetSurround().IsContour() ) { // #i24097# - pFly->NotifyBackground( pFly->FindPageFrm(), aFrm, PREP_FLY_ARRIVE ); + pFly->NotifyBackground( pFly->FindPageFrame(), aFrame, PREP_FLY_ARRIVE ); } } -static void lcl_CheckFlowBack( SwFrm* pFrm, const SwRect &rRect ) +static void lcl_CheckFlowBack( SwFrame* pFrame, const SwRect &rRect ) { SwTwips nBottom = rRect.Bottom(); - while( pFrm ) + while( pFrame ) { - if( pFrm->IsLayoutFrm() ) + if( pFrame->IsLayoutFrame() ) { - if( rRect.IsOver( pFrm->Frm() ) ) - lcl_CheckFlowBack( static_cast<SwLayoutFrm*>(pFrm)->Lower(), rRect ); + if( rRect.IsOver( pFrame->Frame() ) ) + lcl_CheckFlowBack( static_cast<SwLayoutFrame*>(pFrame)->Lower(), rRect ); } - else if( !pFrm->GetNext() && nBottom > pFrm->Frm().Bottom() ) + else if( !pFrame->GetNext() && nBottom > pFrame->Frame().Bottom() ) { - if( pFrm->IsContentFrm() && static_cast<SwContentFrm*>(pFrm)->HasFollow() ) - pFrm->InvalidateSize(); + if( pFrame->IsContentFrame() && static_cast<SwContentFrame*>(pFrame)->HasFollow() ) + pFrame->InvalidateSize(); else - pFrm->InvalidateNextPos(); + pFrame->InvalidateNextPos(); } - pFrm = pFrm->GetNext(); + pFrame = pFrame->GetNext(); } } -static void lcl_NotifyContent( const SdrObject *pThis, SwContentFrm *pCnt, +static void lcl_NotifyContent( const SdrObject *pThis, SwContentFrame *pCnt, const SwRect &rRect, const PrepareHint eHint ) { - if ( pCnt->IsTextFrm() ) + if ( pCnt->IsTextFrame() ) { SwRect aCntPrt( pCnt->Prt() ); - aCntPrt.Pos() += pCnt->Frm().Pos(); + aCntPrt.Pos() += pCnt->Frame().Pos(); if ( eHint == PREP_FLY_ATTR_CHG ) { // #i35640# - use given rectangle <rRect> instead @@ -2891,16 +2891,16 @@ static void lcl_NotifyContent( const SdrObject *pThis, SwContentFrm *pCnt, for ( size_t i = 0; i < rObjs.size(); ++i ) { SwAnchoredObject* pObj = rObjs[i]; - if ( dynamic_cast<const SwFlyFrm*>( pObj) != nullptr ) + if ( dynamic_cast<const SwFlyFrame*>( pObj) != nullptr ) { - SwFlyFrm *pFly = static_cast<SwFlyFrm*>(pObj); - if ( pFly->IsFlyInCntFrm() ) + SwFlyFrame *pFly = static_cast<SwFlyFrame*>(pObj); + if ( pFly->IsFlyInContentFrame() ) { - SwContentFrm *pContent = pFly->ContainsContent(); + SwContentFrame *pContent = pFly->ContainsContent(); while ( pContent ) { ::lcl_NotifyContent( pThis, pContent, rRect, eHint ); - pContent = pContent->GetNextContentFrm(); + pContent = pContent->GetNextContentFrame(); } } } @@ -2910,7 +2910,7 @@ static void lcl_NotifyContent( const SdrObject *pThis, SwContentFrm *pCnt, } void Notify_Background( const SdrObject* pObj, - SwPageFrm* pPage, + SwPageFrame* pPage, const SwRect& rRect, const PrepareHint eHint, const bool bInva ) @@ -2919,25 +2919,25 @@ void Notify_Background( const SdrObject* pObj, if ( eHint == PREP_FLY_LEAVE && rRect.Top() == FAR_AWAY ) return; - SwLayoutFrm* pArea; - SwFlyFrm *pFlyFrm = nullptr; - SwFrm* pAnchor; + SwLayoutFrame* pArea; + SwFlyFrame *pFlyFrame = nullptr; + SwFrame* pAnchor; if( dynamic_cast<const SwVirtFlyDrawObj*>( pObj) != nullptr ) { - pFlyFrm = const_cast<SwVirtFlyDrawObj*>(static_cast<const SwVirtFlyDrawObj*>(pObj))->GetFlyFrm(); - pAnchor = pFlyFrm->AnchorFrm(); + pFlyFrame = const_cast<SwVirtFlyDrawObj*>(static_cast<const SwVirtFlyDrawObj*>(pObj))->GetFlyFrame(); + pAnchor = pFlyFrame->AnchorFrame(); } else { - pFlyFrm = nullptr; - pAnchor = const_cast<SwFrm*>( - GetUserCall(pObj)->GetAnchoredObj( pObj )->GetAnchorFrm() ); + pFlyFrame = nullptr; + pAnchor = const_cast<SwFrame*>( + GetUserCall(pObj)->GetAnchoredObj( pObj )->GetAnchorFrame() ); } if( PREP_FLY_LEAVE != eHint && pAnchor->IsInFly() ) - pArea = pAnchor->FindFlyFrm(); + pArea = pAnchor->FindFlyFrame(); else pArea = pPage; - SwContentFrm *pCnt = nullptr; + SwContentFrame *pCnt = nullptr; if ( pArea ) { if( PREP_FLY_ARRIVE != eHint ) @@ -2958,41 +2958,41 @@ void Notify_Background( const SdrObject* pObj, pCnt = pArea->ContainsContent(); } } - SwFrm *pLastTab = nullptr; + SwFrame *pLastTab = nullptr; while ( pCnt && pArea && pArea->IsAnLower( pCnt ) ) { ::lcl_NotifyContent( pObj, pCnt, rRect, eHint ); if ( pCnt->IsInTab() ) { - SwLayoutFrm* pCell = pCnt->GetUpper(); + SwLayoutFrame* pCell = pCnt->GetUpper(); // #i40606# - use <GetLastBoundRect()> // instead of <GetCurrentBoundRect()>, because a recalculation // of the bounding rectangle isn't intended here. - if ( pCell->IsCellFrm() && - ( pCell->Frm().IsOver( pObj->GetLastBoundRect() ) || - pCell->Frm().IsOver( rRect ) ) ) + if ( pCell->IsCellFrame() && + ( pCell->Frame().IsOver( pObj->GetLastBoundRect() ) || + pCell->Frame().IsOver( rRect ) ) ) { const SwFormatVertOrient &rOri = pCell->GetFormat()->GetVertOrient(); if ( text::VertOrientation::NONE != rOri.GetVertOrient() ) pCell->InvalidatePrt(); } - SwTabFrm *pTab = pCnt->FindTabFrm(); + SwTabFrame *pTab = pCnt->FindTabFrame(); if ( pTab != pLastTab ) { pLastTab = pTab; // #i40606# - use <GetLastBoundRect()> // instead of <GetCurrentBoundRect()>, because a recalculation // of the bounding rectangle isn't intended here. - if ( pTab->Frm().IsOver( pObj->GetLastBoundRect() ) || - pTab->Frm().IsOver( rRect ) ) + if ( pTab->Frame().IsOver( pObj->GetLastBoundRect() ) || + pTab->Frame().IsOver( rRect ) ) { - if ( !pFlyFrm || !pFlyFrm->IsLowerOf( pTab ) ) + if ( !pFlyFrame || !pFlyFrame->IsLowerOf( pTab ) ) pTab->InvalidatePrt(); } } } - pCnt = pCnt->GetNextContentFrm(); + pCnt = pCnt->GetNextContentFrame(); } // #128702# - make code robust if ( pPage && pPage->GetSortedObjs() ) @@ -3002,32 +3002,32 @@ void Notify_Background( const SdrObject* pObj, for ( size_t i = 0; i < rObjs.size(); ++i ) { SwAnchoredObject* pAnchoredObj = rObjs[i]; - if ( dynamic_cast<const SwFlyFrm*>( pAnchoredObj) != nullptr ) + if ( dynamic_cast<const SwFlyFrame*>( pAnchoredObj) != nullptr ) { if( pAnchoredObj->GetDrawObj() == pObj ) continue; - SwFlyFrm *pFly = static_cast<SwFlyFrm*>(pAnchoredObj); - if ( pFly->Frm().Top() == FAR_AWAY ) + SwFlyFrame *pFly = static_cast<SwFlyFrame*>(pAnchoredObj); + if ( pFly->Frame().Top() == FAR_AWAY ) continue; - if ( !pFlyFrm || - (!pFly->IsLowerOf( pFlyFrm ) && + if ( !pFlyFrame || + (!pFly->IsLowerOf( pFlyFrame ) && pFly->GetVirtDrawObj()->GetOrdNumDirect() < pObj->GetOrdNumDirect())) { pCnt = pFly->ContainsContent(); while ( pCnt ) { ::lcl_NotifyContent( pObj, pCnt, rRect, eHint ); - pCnt = pCnt->GetNextContentFrm(); + pCnt = pCnt->GetNextContentFrame(); } } - if( pFly->IsFlyLayFrm() ) + if( pFly->IsFlyLayFrame() ) { - if( pFly->Lower() && pFly->Lower()->IsColumnFrm() && - pFly->Frm().Bottom() >= rRect.Top() && - pFly->Frm().Top() <= rRect.Bottom() && - pFly->Frm().Right() >= rRect.Left() && - pFly->Frm().Left() <= rRect.Right() ) + if( pFly->Lower() && pFly->Lower()->IsColumnFrame() && + pFly->Frame().Bottom() >= rRect.Top() && + pFly->Frame().Top() <= rRect.Bottom() && + pFly->Frame().Right() >= rRect.Left() && + pFly->Frame().Left() <= rRect.Right() ) { pFly->InvalidateSize(); } @@ -3035,29 +3035,29 @@ void Notify_Background( const SdrObject* pObj, // Flys above myself might sidestep if they have an automatic // alignment. This happens independently of my attributes since // this might have been changed as well. - else if ( pFly->IsFlyAtCntFrm() && + else if ( pFly->IsFlyAtContentFrame() && pObj->GetOrdNumDirect() < pFly->GetVirtDrawObj()->GetOrdNumDirect() && - pFlyFrm && !pFly->IsLowerOf( pFlyFrm ) ) + pFlyFrame && !pFly->IsLowerOf( pFlyFrame ) ) { const SwFormatHoriOrient &rH = pFly->GetFormat()->GetHoriOrient(); if ( text::HoriOrientation::NONE != rH.GetHoriOrient() && text::HoriOrientation::CENTER != rH.GetHoriOrient() && ( !pFly->IsAutoPos() || text::RelOrientation::CHAR != rH.GetRelationOrient() ) && - (pFly->Frm().Bottom() >= rRect.Top() && - pFly->Frm().Top() <= rRect.Bottom()) ) + (pFly->Frame().Bottom() >= rRect.Top() && + pFly->Frame().Top() <= rRect.Bottom()) ) pFly->InvalidatePos(); } } } } - if ( pFlyFrm && pAnchor->GetUpper() && pAnchor->IsInTab() )//MA_FLY_HEIGHT + if ( pFlyFrame && pAnchor->GetUpper() && pAnchor->IsInTab() )//MA_FLY_HEIGHT pAnchor->GetUpper()->InvalidateSize(); // #i82258# - make code robust SwViewShell* pSh = nullptr; if ( bInva && pPage && - nullptr != (pSh = pPage->getRootFrm()->GetCurrShell()) ) + nullptr != (pSh = pPage->getRootFrame()->GetCurrShell()) ) { pSh->InvalidateWindows( rRect ); } @@ -3065,124 +3065,124 @@ void Notify_Background( const SdrObject* pObj, /// Provides the Upper of an anchor in paragraph-bound objects. If the latter /// is a chained border or a footnote, the "virtual" Upper might be returne. -const SwFrm* GetVirtualUpper( const SwFrm* pFrm, const Point& rPos ) +const SwFrame* GetVirtualUpper( const SwFrame* pFrame, const Point& rPos ) { - if( pFrm->IsTextFrm() ) + if( pFrame->IsTextFrame() ) { - pFrm = pFrm->GetUpper(); - if( !pFrm->Frm().IsInside( rPos ) ) + pFrame = pFrame->GetUpper(); + if( !pFrame->Frame().IsInside( rPos ) ) { - if( pFrm->IsFootnoteFrm() ) + if( pFrame->IsFootnoteFrame() ) { - const SwFootnoteFrm* pTmp = static_cast<const SwFootnoteFrm*>(pFrm)->GetFollow(); + const SwFootnoteFrame* pTmp = static_cast<const SwFootnoteFrame*>(pFrame)->GetFollow(); while( pTmp ) { - if( pTmp->Frm().IsInside( rPos ) ) + if( pTmp->Frame().IsInside( rPos ) ) return pTmp; pTmp = pTmp->GetFollow(); } } else { - SwFlyFrm* pTmp = const_cast<SwFlyFrm*>(pFrm->FindFlyFrm()); + SwFlyFrame* pTmp = const_cast<SwFlyFrame*>(pFrame->FindFlyFrame()); while( pTmp ) { - if( pTmp->Frm().IsInside( rPos ) ) + if( pTmp->Frame().IsInside( rPos ) ) return pTmp; pTmp = pTmp->GetNextLink(); } } } } - return pFrm; + return pFrame; } -bool Is_Lower_Of(const SwFrm *pCurrFrm, const SdrObject* pObj) +bool Is_Lower_Of(const SwFrame *pCurrFrame, const SdrObject* pObj) { Point aPos; - const SwFrm* pFrm; + const SwFrame* pFrame; if (const SwVirtFlyDrawObj *pFlyDrawObj = dynamic_cast<const SwVirtFlyDrawObj*>(pObj)) { - const SwFlyFrm* pFly = pFlyDrawObj->GetFlyFrm(); - pFrm = pFly->GetAnchorFrm(); - aPos = pFly->Frm().Pos(); + const SwFlyFrame* pFly = pFlyDrawObj->GetFlyFrame(); + pFrame = pFly->GetAnchorFrame(); + aPos = pFly->Frame().Pos(); } else { - pFrm = static_cast<SwDrawContact*>(GetUserCall(pObj))->GetAnchorFrm(pObj); + pFrame = static_cast<SwDrawContact*>(GetUserCall(pObj))->GetAnchorFrame(pObj); aPos = pObj->GetCurrentBoundRect().TopLeft(); } - OSL_ENSURE( pFrm, "8-( Fly is lost in Space." ); - pFrm = GetVirtualUpper( pFrm, aPos ); + OSL_ENSURE( pFrame, "8-( Fly is lost in Space." ); + pFrame = GetVirtualUpper( pFrame, aPos ); do - { if ( pFrm == pCurrFrm ) + { if ( pFrame == pCurrFrame ) return true; - if( pFrm->IsFlyFrm() ) + if( pFrame->IsFlyFrame() ) { - aPos = pFrm->Frm().Pos(); - pFrm = GetVirtualUpper( static_cast<const SwFlyFrm*>(pFrm)->GetAnchorFrm(), aPos ); + aPos = pFrame->Frame().Pos(); + pFrame = GetVirtualUpper( static_cast<const SwFlyFrame*>(pFrame)->GetAnchorFrame(), aPos ); } else - pFrm = pFrm->GetUpper(); - } while ( pFrm ); + pFrame = pFrame->GetUpper(); + } while ( pFrame ); return false; } /// provides the area of a frame in that no Fly from another area can overlap -const SwFrm *FindKontext( const SwFrm *pFrm, sal_uInt16 nAdditionalContextType ) +const SwFrame *FindKontext( const SwFrame *pFrame, sal_uInt16 nAdditionalContextType ) { const sal_uInt16 nTyp = FRM_ROOT | FRM_HEADER | FRM_FOOTER | FRM_FTNCONT | FRM_FTN | FRM_FLY | FRM_TAB | FRM_ROW | FRM_CELL | nAdditionalContextType; do - { if ( pFrm->GetType() & nTyp ) + { if ( pFrame->GetType() & nTyp ) break; - pFrm = pFrm->GetUpper(); - } while( pFrm ); - return pFrm; + pFrame = pFrame->GetUpper(); + } while( pFrame ); + return pFrame; } -bool IsFrmInSameKontext( const SwFrm *pInnerFrm, const SwFrm *pFrm ) +bool IsFrameInSameKontext( const SwFrame *pInnerFrame, const SwFrame *pFrame ) { - const SwFrm *pKontext = FindKontext( pInnerFrm, 0 ); + const SwFrame *pKontext = FindKontext( pInnerFrame, 0 ); const sal_uInt16 nTyp = FRM_ROOT | FRM_HEADER | FRM_FOOTER | FRM_FTNCONT | FRM_FTN | FRM_FLY | FRM_TAB | FRM_ROW | FRM_CELL; do - { if ( pFrm->GetType() & nTyp ) + { if ( pFrame->GetType() & nTyp ) { - if( pFrm == pKontext ) + if( pFrame == pKontext ) return true; - if( pFrm->IsCellFrm() ) + if( pFrame->IsCellFrame() ) return false; } - if( pFrm->IsFlyFrm() ) + if( pFrame->IsFlyFrame() ) { - Point aPos( pFrm->Frm().Pos() ); - pFrm = GetVirtualUpper( static_cast<const SwFlyFrm*>(pFrm)->GetAnchorFrm(), aPos ); + Point aPos( pFrame->Frame().Pos() ); + pFrame = GetVirtualUpper( static_cast<const SwFlyFrame*>(pFrame)->GetAnchorFrame(), aPos ); } else - pFrm = pFrm->GetUpper(); - } while( pFrm ); + pFrame = pFrame->GetUpper(); + } while( pFrame ); return false; } -static SwTwips lcl_CalcCellRstHeight( SwLayoutFrm *pCell ) +static SwTwips lcl_CalcCellRstHeight( SwLayoutFrame *pCell ) { - if ( pCell->Lower()->IsContentFrm() || pCell->Lower()->IsSctFrm() ) + if ( pCell->Lower()->IsContentFrame() || pCell->Lower()->IsSctFrame() ) { - SwFrm *pLow = pCell->Lower(); + SwFrame *pLow = pCell->Lower(); long nHeight = 0, nFlyAdd = 0; do { - long nLow = pLow->Frm().Height(); - if( pLow->IsTextFrm() && static_cast<SwTextFrm*>(pLow)->IsUndersized() ) - nLow += static_cast<SwTextFrm*>(pLow)->GetParHeight()-pLow->Prt().Height(); - else if( pLow->IsSctFrm() && static_cast<SwSectionFrm*>(pLow)->IsUndersized() ) - nLow += static_cast<SwSectionFrm*>(pLow)->Undersize(); + long nLow = pLow->Frame().Height(); + if( pLow->IsTextFrame() && static_cast<SwTextFrame*>(pLow)->IsUndersized() ) + nLow += static_cast<SwTextFrame*>(pLow)->GetParHeight()-pLow->Prt().Height(); + else if( pLow->IsSctFrame() && static_cast<SwSectionFrame*>(pLow)->IsUndersized() ) + nLow += static_cast<SwSectionFrame*>(pLow)->Undersize(); nFlyAdd = std::max( 0L, nFlyAdd - nLow ); nFlyAdd = std::max( nFlyAdd, ::CalcHeightWithFlys( pLow ) ); nHeight += nLow; @@ -3191,44 +3191,44 @@ static SwTwips lcl_CalcCellRstHeight( SwLayoutFrm *pCell ) if ( nFlyAdd ) nHeight += nFlyAdd; - // The border cannot be calculated based on PrtArea and Frm, since both can be invalid. - SwBorderAttrAccess aAccess( SwFrm::GetCache(), pCell ); + // The border cannot be calculated based on PrtArea and Frame, since both can be invalid. + SwBorderAttrAccess aAccess( SwFrame::GetCache(), pCell ); const SwBorderAttrs &rAttrs = *aAccess.Get(); nHeight += rAttrs.CalcTop() + rAttrs.CalcBottom(); - return pCell->Frm().Height() - nHeight; + return pCell->Frame().Height() - nHeight; } else { long nRstHeight = 0; - SwFrm *pLow = pCell->Lower(); - while (pLow && pLow->IsLayoutFrm()) + SwFrame *pLow = pCell->Lower(); + while (pLow && pLow->IsLayoutFrame()) { - nRstHeight += ::CalcRowRstHeight(static_cast<SwLayoutFrm*>(pLow)); + nRstHeight += ::CalcRowRstHeight(static_cast<SwLayoutFrame*>(pLow)); pLow = pLow->GetNext(); } return nRstHeight; } } -SwTwips CalcRowRstHeight( SwLayoutFrm *pRow ) +SwTwips CalcRowRstHeight( SwLayoutFrame *pRow ) { SwTwips nRstHeight = LONG_MAX; - SwFrm *pLow = pRow->Lower(); - while (pLow && pLow->IsLayoutFrm()) + SwFrame *pLow = pRow->Lower(); + while (pLow && pLow->IsLayoutFrame()) { - nRstHeight = std::min(nRstHeight, ::lcl_CalcCellRstHeight(static_cast<SwLayoutFrm*>(pLow))); + nRstHeight = std::min(nRstHeight, ::lcl_CalcCellRstHeight(static_cast<SwLayoutFrame*>(pLow))); pLow = pLow->GetNext(); } return nRstHeight; } -const SwFrm* FindPage( const SwRect &rRect, const SwFrm *pPage ) +const SwFrame* FindPage( const SwRect &rRect, const SwFrame *pPage ) { - if ( !rRect.IsOver( pPage->Frm() ) ) + if ( !rRect.IsOver( pPage->Frame() ) ) { - const SwRootFrm* pRootFrm = static_cast<const SwRootFrm*>(pPage->GetUpper()); - const SwFrm* pTmpPage = pRootFrm ? pRootFrm->GetPageAtPos( rRect.TopLeft(), &rRect.SSize(), true ) : nullptr; + const SwRootFrame* pRootFrame = static_cast<const SwRootFrame*>(pPage->GetUpper()); + const SwFrame* pTmpPage = pRootFrame ? pRootFrame->GetPageAtPos( rRect.TopLeft(), &rRect.SSize(), true ) : nullptr; if ( pTmpPage ) pPage = pTmpPage; } @@ -3236,92 +3236,92 @@ const SwFrm* FindPage( const SwRect &rRect, const SwFrm *pPage ) return pPage; } -class SwFrmHolder : private SfxListener +class SwFrameHolder : private SfxListener { - SwFrm* pFrm; + SwFrame* pFrame; bool bSet; virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override; public: - SwFrmHolder() : pFrm(nullptr), bSet(false) {} - void SetFrm( SwFrm* pHold ); - SwFrm* GetFrm() { return pFrm; } + SwFrameHolder() : pFrame(nullptr), bSet(false) {} + void SetFrame( SwFrame* pHold ); + SwFrame* GetFrame() { return pFrame; } void Reset(); bool IsSet() { return bSet; } }; -void SwFrmHolder::SetFrm( SwFrm* pHold ) +void SwFrameHolder::SetFrame( SwFrame* pHold ) { bSet = true; - pFrm = pHold; + pFrame = pHold; StartListening(*pHold); } -void SwFrmHolder::Reset() +void SwFrameHolder::Reset() { - if (pFrm) - EndListening(*pFrm); + if (pFrame) + EndListening(*pFrame); bSet = false; - pFrm = nullptr; + pFrame = nullptr; } -void SwFrmHolder::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) +void SwFrameHolder::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) { const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint); - if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING && &rBC == pFrm ) + if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING && &rBC == pFrame ) { - pFrm = nullptr; + pFrame = nullptr; } } -SwFrm* GetFrmOfModify( const SwRootFrm* pLayout, SwModify const& rMod, sal_uInt16 const nFrmType, - const Point* pPoint, const SwPosition *pPos, const bool bCalcFrm ) +SwFrame* GetFrameOfModify( const SwRootFrame* pLayout, SwModify const& rMod, sal_uInt16 const nFrameType, + const Point* pPoint, const SwPosition *pPos, const bool bCalcFrame ) { - SwFrm *pMinFrm = nullptr, *pTmpFrm; - SwFrmHolder aHolder; + SwFrame *pMinFrame = nullptr, *pTmpFrame; + SwFrameHolder aHolder; SwRect aCalcRect; bool bClientIterChanged = false; - SwIterator<SwFrm,SwModify> aIter( rMod ); + SwIterator<SwFrame,SwModify> aIter( rMod ); do { - pMinFrm = nullptr; + pMinFrame = nullptr; aHolder.Reset(); sal_uInt64 nMinDist = 0; bClientIterChanged = false; - for( pTmpFrm = aIter.First(); pTmpFrm; pTmpFrm = aIter.Next() ) + for( pTmpFrame = aIter.First(); pTmpFrame; pTmpFrame = aIter.Next() ) { - if( pTmpFrm->GetType() & nFrmType && - ( !pLayout || pLayout == pTmpFrm->getRootFrm() ) && - (!pTmpFrm->IsFlowFrm() || - !SwFlowFrm::CastFlowFrm( pTmpFrm )->IsFollow() )) + if( pTmpFrame->GetType() & nFrameType && + ( !pLayout || pLayout == pTmpFrame->getRootFrame() ) && + (!pTmpFrame->IsFlowFrame() || + !SwFlowFrame::CastFlowFrame( pTmpFrame )->IsFollow() )) { if( pPoint ) { - // watch for Frm being deleted - if ( pMinFrm ) - aHolder.SetFrm( pMinFrm ); + // watch for Frame being deleted + if ( pMinFrame ) + aHolder.SetFrame( pMinFrame ); else aHolder.Reset(); - if( bCalcFrm ) + if( bCalcFrame ) { // - format parent Writer // fly frame, if it isn't been formatted yet. // Note: The Writer fly frame could be the frame itself. - SwFlyFrm* pFlyFrm( pTmpFrm->FindFlyFrm() ); - if ( pFlyFrm && - pFlyFrm->Frm().Pos().X() == FAR_AWAY && - pFlyFrm->Frm().Pos().Y() == FAR_AWAY ) + SwFlyFrame* pFlyFrame( pTmpFrame->FindFlyFrame() ); + if ( pFlyFrame && + pFlyFrame->Frame().Pos().X() == FAR_AWAY && + pFlyFrame->Frame().Pos().Y() == FAR_AWAY ) { - SwObjectFormatter::FormatObj( *pFlyFrm ); + SwObjectFormatter::FormatObj( *pFlyFrame ); } - pTmpFrm->Calc(pLayout ? pLayout->GetCurrShell()->GetOut() : nullptr); + pTmpFrame->Calc(pLayout ? pLayout->GetCurrShell()->GetOut() : nullptr); } - // aIter.IsChanged checks if the current pTmpFrm has been deleted while + // aIter.IsChanged checks if the current pTmpFrame has been deleted while // it is the current iterator - // FrmHolder watches for deletion of the current pMinFrm - if( aIter.IsChanged() || ( aHolder.IsSet() && !aHolder.GetFrm() ) ) + // FrameHolder watches for deletion of the current pMinFrame + if( aIter.IsChanged() || ( aHolder.IsSet() && !aHolder.GetFrame() ) ) { // restart iteration bClientIterChanged = true; @@ -3329,17 +3329,17 @@ SwFrm* GetFrmOfModify( const SwRootFrm* pLayout, SwModify const& rMod, sal_uInt1 } // for Flys go via the parent if the Fly is not yet "formatted" - if( !bCalcFrm && pTmpFrm->GetType() & FRM_FLY && - static_cast<SwFlyFrm*>(pTmpFrm)->GetAnchorFrm() && - FAR_AWAY == pTmpFrm->Frm().Pos().getX() && - FAR_AWAY == pTmpFrm->Frm().Pos().getY() ) - aCalcRect = static_cast<SwFlyFrm*>(pTmpFrm)->GetAnchorFrm()->Frm(); + if( !bCalcFrame && pTmpFrame->GetType() & FRM_FLY && + static_cast<SwFlyFrame*>(pTmpFrame)->GetAnchorFrame() && + FAR_AWAY == pTmpFrame->Frame().Pos().getX() && + FAR_AWAY == pTmpFrame->Frame().Pos().getY() ) + aCalcRect = static_cast<SwFlyFrame*>(pTmpFrame)->GetAnchorFrame()->Frame(); else - aCalcRect = pTmpFrm->Frm(); + aCalcRect = pTmpFrame->Frame(); if ( aCalcRect.IsInside( *pPoint ) ) { - pMinFrm = pTmpFrm; + pMinFrame = pTmpFrame; break; } @@ -3347,26 +3347,26 @@ SwFrm* GetFrmOfModify( const SwRootFrm* pLayout, SwModify const& rMod, sal_uInt1 const Point aCalcRectCenter = aCalcRect.Center(); const Point aDiff = aCalcRectCenter - *pPoint; const sal_uInt64 nCurrentDist = sal_Int64(aDiff.getX()) * sal_Int64(aDiff.getX()) + sal_Int64(aDiff.getY()) * sal_Int64(aDiff.getY()); // opt: no sqrt - if ( !pMinFrm || nCurrentDist < nMinDist ) + if ( !pMinFrame || nCurrentDist < nMinDist ) { - pMinFrm = pTmpFrm; + pMinFrame = pTmpFrame; nMinDist = nCurrentDist; } } else { // if no pPoint is provided, take the first one - pMinFrm = pTmpFrm; + pMinFrame = pTmpFrame; break; } } } } while( bClientIterChanged ); - if( pPos && pMinFrm && pMinFrm->IsTextFrm() ) - return static_cast<SwTextFrm*>(pMinFrm)->GetFrmAtPos( *pPos ); + if( pPos && pMinFrame && pMinFrame->IsTextFrame() ) + return static_cast<SwTextFrame*>(pMinFrame)->GetFrameAtPos( *pPos ); - return pMinFrm; + return pMinFrame; } bool IsExtraData( const SwDoc *pDoc ) @@ -3379,28 +3379,28 @@ bool IsExtraData( const SwDoc *pDoc ) } // OD 22.09.2003 #110978# -const SwRect SwPageFrm::PrtWithoutHeaderAndFooter() const +const SwRect SwPageFrame::PrtWithoutHeaderAndFooter() const { SwRect aPrtWithoutHeaderFooter( Prt() ); - aPrtWithoutHeaderFooter.Pos() += Frm().Pos(); + aPrtWithoutHeaderFooter.Pos() += Frame().Pos(); - const SwFrm* pLowerFrm = Lower(); - while ( pLowerFrm ) + const SwFrame* pLowerFrame = Lower(); + while ( pLowerFrame ) { // Note: independent on text direction page header and page footer are // always at top respectively at bottom of the page frame. - if ( pLowerFrm->IsHeaderFrm() ) + if ( pLowerFrame->IsHeaderFrame() ) { aPrtWithoutHeaderFooter.Top( aPrtWithoutHeaderFooter.Top() + - pLowerFrm->Frm().Height() ); + pLowerFrame->Frame().Height() ); } - if ( pLowerFrm->IsFooterFrm() ) + if ( pLowerFrame->IsFooterFrame() ) { aPrtWithoutHeaderFooter.Bottom( aPrtWithoutHeaderFooter.Bottom() - - pLowerFrm->Frm().Height() ); + pLowerFrame->Frame().Height() ); } - pLowerFrm = pLowerFrm->GetNext(); + pLowerFrame = pLowerFrame->GetNext(); } return aPrtWithoutHeaderFooter; @@ -3412,45 +3412,45 @@ const SwRect SwPageFrm::PrtWithoutHeaderAndFooter() const OD 2009-08-28 #i102458# Add output parameter <obIsLineSpacingProportional> */ -void GetSpacingValuesOfFrm( const SwFrm& rFrm, +void GetSpacingValuesOfFrame( const SwFrame& rFrame, SwTwips& onLowerSpacing, SwTwips& onLineSpacing, bool& obIsLineSpacingProportional ) { - if ( !rFrm.IsFlowFrm() ) + if ( !rFrame.IsFlowFrame() ) { onLowerSpacing = 0; onLineSpacing = 0; } else { - const SvxULSpaceItem& rULSpace = rFrm.GetAttrSet()->GetULSpace(); + const SvxULSpaceItem& rULSpace = rFrame.GetAttrSet()->GetULSpace(); onLowerSpacing = rULSpace.GetLower(); onLineSpacing = 0; obIsLineSpacingProportional = false; - if ( rFrm.IsTextFrm() ) + if ( rFrame.IsTextFrame() ) { - onLineSpacing = static_cast<const SwTextFrm&>(rFrm).GetLineSpace(); + onLineSpacing = static_cast<const SwTextFrame&>(rFrame).GetLineSpace(); obIsLineSpacingProportional = onLineSpacing != 0 && - static_cast<const SwTextFrm&>(rFrm).GetLineSpace( true ) == 0; + static_cast<const SwTextFrame&>(rFrame).GetLineSpace( true ) == 0; } OSL_ENSURE( onLowerSpacing >= 0 && onLineSpacing >= 0, - "<GetSpacingValuesOfFrm(..)> - spacing values aren't positive!" ); + "<GetSpacingValuesOfFrame(..)> - spacing values aren't positive!" ); } } /// get the content of the table cell, skipping content from nested tables -const SwContentFrm* GetCellContent( const SwLayoutFrm& rCell ) +const SwContentFrame* GetCellContent( const SwLayoutFrame& rCell ) { - const SwContentFrm* pContent = rCell.ContainsContent(); - const SwTabFrm* pTab = rCell.FindTabFrm(); + const SwContentFrame* pContent = rCell.ContainsContent(); + const SwTabFrame* pTab = rCell.FindTabFrame(); while ( pContent && rCell.IsAnLower( pContent ) ) { - const SwTabFrm* pTmpTab = pContent->FindTabFrm(); + const SwTabFrame* pTmpTab = pContent->FindTabFrame(); if ( pTmpTab != pTab ) { pContent = pTmpTab->FindLastContent(); @@ -3468,14 +3468,14 @@ const SwContentFrm* GetCellContent( const SwLayoutFrm& rCell ) /// Can be used to check if a frame has been deleted bool SwDeletionChecker::HasBeenDeleted() { - if ( !mpFrm || !mpRegIn ) + if ( !mpFrame || !mpRegIn ) return false; - SwIterator<SwFrm,SwModify> aIter(*mpRegIn); - SwFrm* pLast = aIter.First(); + SwIterator<SwFrame,SwModify> aIter(*mpRegIn); + SwFrame* pLast = aIter.First(); while ( pLast ) { - if ( pLast == mpFrm ) + if ( pLast == mpFrame ) return false; pLast = aIter.Next(); } diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx index 9e9b019ba632..734367a39b02 100644 --- a/sw/source/core/layout/ftnfrm.cxx +++ b/sw/source/core/layout/ftnfrm.cxx @@ -55,43 +55,43 @@ static sal_uLong lcl_FindFootnotePos( const SwDoc *pDoc, const SwTextFootnote *p return 0; } -bool SwFootnoteFrm::operator<( const SwTextFootnote* pTextFootnote ) const +bool SwFootnoteFrame::operator<( const SwTextFootnote* pTextFootnote ) const { const SwDoc* pDoc = GetFormat()->GetDoc(); - OSL_ENSURE( pDoc, "SwFootnoteFrm: Missing doc!" ); + OSL_ENSURE( pDoc, "SwFootnoteFrame: Missing doc!" ); return lcl_FindFootnotePos( pDoc, GetAttr() ) < lcl_FindFootnotePos( pDoc, pTextFootnote ); } /* |* -|* bool lcl_NextFootnoteBoss( SwFootnoteBossFrm* pBoss, SwPageFrm* pPage) -|* sets pBoss on the next SwFootnoteBossFrm, which can either be a column +|* bool lcl_NextFootnoteBoss( SwFootnoteBossFrame* pBoss, SwPageFrame* pPage) +|* sets pBoss on the next SwFootnoteBossFrame, which can either be a column |* or a page (without columns). If the page changes meanwhile, |* pPage contains the new page and this function returns true. |* |*/ -static bool lcl_NextFootnoteBoss( SwFootnoteBossFrm* &rpBoss, SwPageFrm* &rpPage, +static bool lcl_NextFootnoteBoss( SwFootnoteBossFrame* &rpBoss, SwPageFrame* &rpPage, bool bDontLeave ) { - if( rpBoss->IsColumnFrm() ) + if( rpBoss->IsColumnFrame() ) { if( rpBoss->GetNext() ) { - rpBoss = static_cast<SwFootnoteBossFrm*>(rpBoss->GetNext()); //next column + rpBoss = static_cast<SwFootnoteBossFrame*>(rpBoss->GetNext()); //next column return false; } if( rpBoss->IsInSct() ) { - SwSectionFrm* pSct = rpBoss->FindSctFrm()->GetFollow(); + SwSectionFrame* pSct = rpBoss->FindSctFrame()->GetFollow(); if( pSct ) { - OSL_ENSURE( pSct->Lower() && pSct->Lower()->IsColumnFrm(), + OSL_ENSURE( pSct->Lower() && pSct->Lower()->IsColumnFrame(), "Where's the column?" ); - rpBoss = static_cast<SwColumnFrm*>(pSct->Lower()); - SwPageFrm* pOld = rpPage; - rpPage = pSct->FindPageFrm(); + rpBoss = static_cast<SwColumnFrame*>(pSct->Lower()); + SwPageFrame* pOld = rpPage; + rpPage = pSct->FindPageFrame(); return pOld != rpPage; } else if( bDontLeave ) @@ -102,27 +102,27 @@ static bool lcl_NextFootnoteBoss( SwFootnoteBossFrm* &rpBoss, SwPageFrm* &rpPage } } } - rpPage = static_cast<SwPageFrm*>(rpPage->GetNext()); // next page + rpPage = static_cast<SwPageFrame*>(rpPage->GetNext()); // next page rpBoss = rpPage; if( rpPage ) { - SwLayoutFrm* pBody = rpPage->FindBodyCont(); - if( pBody && pBody->Lower() && pBody->Lower()->IsColumnFrm() ) - rpBoss = static_cast<SwFootnoteBossFrm*>(pBody->Lower()); // first column + SwLayoutFrame* pBody = rpPage->FindBodyCont(); + if( pBody && pBody->Lower() && pBody->Lower()->IsColumnFrame() ) + rpBoss = static_cast<SwFootnoteBossFrame*>(pBody->Lower()); // first column } return true; } /// @returns column number if pBoss is a column, otherwise 0. -static sal_uInt16 lcl_ColumnNum( const SwFrm* pBoss ) +static sal_uInt16 lcl_ColumnNum( const SwFrame* pBoss ) { sal_uInt16 nRet = 0; - if( !pBoss->IsColumnFrm() ) + if( !pBoss->IsColumnFrame() ) return 0; - const SwFrm* pCol; + const SwFrame* pCol; if( pBoss->IsInSct() ) { - pCol = pBoss->GetUpper()->FindColFrm(); + pCol = pBoss->GetUpper()->FindColFrame(); if( pBoss->GetNext() || pBoss->GetPrev() ) { while( pBoss ) @@ -142,34 +142,34 @@ static sal_uInt16 lcl_ColumnNum( const SwFrm* pBoss ) return nRet; } -SwFootnoteContFrm::SwFootnoteContFrm( SwFrameFormat *pFormat, SwFrm* pSib ): - SwLayoutFrm( pFormat, pSib ) +SwFootnoteContFrame::SwFootnoteContFrame( SwFrameFormat *pFormat, SwFrame* pSib ): + SwLayoutFrame( pFormat, pSib ) { - mnFrmType = FRM_FTNCONT; + mnFrameType = FRM_FTNCONT; } -// lcl_Undersize(..) walks over a SwFrm and its contents -// and returns the sum of all requested TextFrm magnifications. +// lcl_Undersize(..) walks over a SwFrame and its contents +// and returns the sum of all requested TextFrame magnifications. -static long lcl_Undersize( const SwFrm* pFrm ) +static long lcl_Undersize( const SwFrame* pFrame ) { long nRet = 0; - SWRECTFN( pFrm ) - if( pFrm->IsTextFrm() ) + SWRECTFN( pFrame ) + if( pFrame->IsTextFrame() ) { - if( static_cast<const SwTextFrm*>(pFrm)->IsUndersized() ) + if( static_cast<const SwTextFrame*>(pFrame)->IsUndersized() ) { - // Does this TextFrm would like to be a little bit bigger? - nRet = static_cast<const SwTextFrm*>(pFrm)->GetParHeight() - - (pFrm->Prt().*fnRect->fnGetHeight)(); + // Does this TextFrame would like to be a little bit bigger? + nRet = static_cast<const SwTextFrame*>(pFrame)->GetParHeight() - + (pFrame->Prt().*fnRect->fnGetHeight)(); if( nRet < 0 ) nRet = 0; } } - else if( pFrm->IsLayoutFrm() ) + else if( pFrame->IsLayoutFrame() ) { - const SwFrm* pNxt = static_cast<const SwLayoutFrm*>(pFrm)->Lower(); + const SwFrame* pNxt = static_cast<const SwLayoutFrame*>(pFrame)->Lower(); while( pNxt ) { nRet += lcl_Undersize( pNxt ); @@ -180,10 +180,10 @@ static long lcl_Undersize( const SwFrm* pFrm ) } /// "format" the frame (Fixsize is not set here). -void SwFootnoteContFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttrs * ) +void SwFootnoteContFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttrs * ) { // calculate total border, only one distance to the top - const SwPageFrm* pPage = FindPageFrm(); + const SwPageFrame* pPage = FindPageFrame(); const SwPageFootnoteInfo &rInf = pPage->GetPageDesc()->GetFootnoteInfo(); const SwTwips nBorder = rInf.GetTopDist() + rInf.GetBottomDist() + rInf.GetLineWidth(); @@ -192,8 +192,8 @@ void SwFootnoteContFrm::Format( vcl::RenderContext* /*pRenderContext*/, const Sw { mbValidPrtArea = true; (Prt().*fnRect->fnSetTop)( nBorder ); - (Prt().*fnRect->fnSetWidth)( (Frm().*fnRect->fnGetWidth)() ); - (Prt().*fnRect->fnSetHeight)((Frm().*fnRect->fnGetHeight)() - nBorder ); + (Prt().*fnRect->fnSetWidth)( (Frame().*fnRect->fnGetWidth)() ); + (Prt().*fnRect->fnSetHeight)((Frame().*fnRect->fnGetHeight)() - nBorder ); if( (Prt().*fnRect->fnGetHeight)() < 0 && !pPage->IsFootnotePage() ) mbValidSize = false; } @@ -203,7 +203,7 @@ void SwFootnoteContFrm::Format( vcl::RenderContext* /*pRenderContext*/, const Sw bool bGrow = pPage->IsFootnotePage(); if( bGrow ) { - const SwViewShell *pSh = getRootFrm() ? getRootFrm()->GetCurrShell() : nullptr; + const SwViewShell *pSh = getRootFrame() ? getRootFrame()->GetCurrShell() : nullptr; if( pSh && pSh->GetViewOptions()->getBrowseMode() ) bGrow = false; } @@ -213,14 +213,14 @@ void SwFootnoteContFrm::Format( vcl::RenderContext* /*pRenderContext*/, const Sw { // VarSize is determined based on the content plus the borders SwTwips nRemaining = 0; - SwFrm *pFrm = m_pLower; - while ( pFrm ) - { // lcl_Undersize(..) respects (recursively) TextFrms, which + SwFrame *pFrame = m_pLower; + while ( pFrame ) + { // lcl_Undersize(..) respects (recursively) TextFrames, which // would like to be bigger. They are created especially in // columnized borders, if these do not have their maximum // size yet. - nRemaining += (pFrm->Frm().*fnRect->fnGetHeight)() + lcl_Undersize( pFrm ); - pFrm = pFrm->GetNext(); + nRemaining += (pFrame->Frame().*fnRect->fnGetHeight)() + lcl_Undersize( pFrame ); + pFrame = pFrame->GetNext(); } // add the own border nRemaining += nBorder; @@ -228,17 +228,17 @@ void SwFootnoteContFrm::Format( vcl::RenderContext* /*pRenderContext*/, const Sw SwTwips nDiff; if( IsInSct() ) { - nDiff = -(Frm().*fnRect->fnBottomDist)( + nDiff = -(Frame().*fnRect->fnBottomDist)( (GetUpper()->*fnRect->fnGetPrtBottom)() ); if( nDiff > 0 ) { - if( nDiff > (Frm().*fnRect->fnGetHeight)() ) - nDiff = (Frm().*fnRect->fnGetHeight)(); - (Frm().*fnRect->fnAddBottom)( -nDiff ); + if( nDiff > (Frame().*fnRect->fnGetHeight)() ) + nDiff = (Frame().*fnRect->fnGetHeight)(); + (Frame().*fnRect->fnAddBottom)( -nDiff ); (Prt().*fnRect->fnAddHeight)( -nDiff ); } } - nDiff = (Frm().*fnRect->fnGetHeight)() - nRemaining; + nDiff = (Frame().*fnRect->fnGetHeight)() - nRemaining; if ( nDiff > 0 ) Shrink( nDiff ); else if ( nDiff < 0 ) @@ -260,23 +260,23 @@ void SwFootnoteContFrm::Format( vcl::RenderContext* /*pRenderContext*/, const Sw } } -SwTwips SwFootnoteContFrm::GrowFrm( SwTwips nDist, bool bTst, bool ) +SwTwips SwFootnoteContFrame::GrowFrame( SwTwips nDist, bool bTst, bool ) { // No check if FixSize since FootnoteContainer are variable up to their max. height. // If the max. height is LONG_MAX, take as much space as needed. // If the page is a special footnote page, take also as much as possible. - assert(GetUpper() && GetUpper()->IsFootnoteBossFrm()); + assert(GetUpper() && GetUpper()->IsFootnoteBossFrame()); SWRECTFN( this ) - if( (Frm().*fnRect->fnGetHeight)() > 0 && - nDist > ( LONG_MAX - (Frm().*fnRect->fnGetHeight)() ) ) - nDist = LONG_MAX - (Frm().*fnRect->fnGetHeight)(); + if( (Frame().*fnRect->fnGetHeight)() > 0 && + nDist > ( LONG_MAX - (Frame().*fnRect->fnGetHeight)() ) ) + nDist = LONG_MAX - (Frame().*fnRect->fnGetHeight)(); - SwFootnoteBossFrm *pBoss = static_cast<SwFootnoteBossFrm*>(GetUpper()); + SwFootnoteBossFrame *pBoss = static_cast<SwFootnoteBossFrame*>(GetUpper()); if( IsInSct() ) { - SwSectionFrm* pSect = FindSctFrm(); - OSL_ENSURE( pSect, "GrowFrm: Missing SectFrm" ); + SwSectionFrame* pSect = FindSctFrame(); + OSL_ENSURE( pSect, "GrowFrame: Missing SectFrame" ); // In a section, which has to maximize, a footnotecontainer is allowed // to grow, when the section can't grow anymore. if( !bTst && !pSect->IsColLocked() && @@ -286,15 +286,15 @@ SwTwips SwFootnoteContFrm::GrowFrm( SwTwips nDist, bool bTst, bool ) return 0; } } - const SwViewShell *pSh = getRootFrm() ? getRootFrm()->GetCurrShell() : nullptr; + const SwViewShell *pSh = getRootFrame() ? getRootFrame()->GetCurrShell() : nullptr; const bool bBrowseMode = pSh && pSh->GetViewOptions()->getBrowseMode(); - SwPageFrm *pPage = pBoss->FindPageFrm(); + SwPageFrame *pPage = pBoss->FindPageFrame(); if ( bBrowseMode || !pPage->IsFootnotePage() ) { if ( pBoss->GetMaxFootnoteHeight() != LONG_MAX ) { nDist = std::min( nDist, pBoss->GetMaxFootnoteHeight() - - (Frm().*fnRect->fnGetHeight)() ); + - (Frame().*fnRect->fnGetHeight)() ); if ( nDist <= 0 ) return 0L; } @@ -308,17 +308,17 @@ SwTwips SwFootnoteContFrm::GrowFrm( SwTwips nDist, bool bTst, bool ) return 0L; } } - else if( nDist > (GetPrev()->Frm().*fnRect->fnGetHeight)() ) + else if( nDist > (GetPrev()->Frame().*fnRect->fnGetHeight)() ) // do not use more space than the body has - nDist = (GetPrev()->Frm().*fnRect->fnGetHeight)(); + nDist = (GetPrev()->Frame().*fnRect->fnGetHeight)(); long nAvail = 0; if ( bBrowseMode ) { nAvail = GetUpper()->Prt().Height(); - const SwFrm *pAvail = GetUpper()->Lower(); + const SwFrame *pAvail = GetUpper()->Lower(); do - { nAvail -= pAvail->Frm().Height(); + { nAvail -= pAvail->Frame().Height(); pAvail = pAvail->GetNext(); } while ( pAvail ); if ( nAvail > nDist ) @@ -327,10 +327,10 @@ SwTwips SwFootnoteContFrm::GrowFrm( SwTwips nDist, bool bTst, bool ) if ( !bTst ) { - (Frm().*fnRect->fnSetHeight)( (Frm().*fnRect->fnGetHeight)() + nDist ); + (Frame().*fnRect->fnSetHeight)( (Frame().*fnRect->fnGetHeight)() + nDist ); if( IsVertical() && !IsVertLR() && !IsReverse() ) - Frm().Pos().X() -= nDist; + Frame().Pos().X() -= nDist; } long nGrow = nDist - nAvail, nReal = 0; @@ -343,12 +343,12 @@ SwTwips SwFootnoteContFrm::GrowFrm( SwTwips nDist, bool bTst, bool ) { if( NA_GROW_ADJUST == nAdjust ) { - SwFrm* pFootnote = Lower(); + SwFrame* pFootnote = Lower(); if( pFootnote ) { while( pFootnote->GetNext() ) pFootnote = pFootnote->GetNext(); - if( static_cast<SwFootnoteFrm*>(pFootnote)->GetAttr()->GetFootnote().IsEndNote() ) + if( static_cast<SwFootnoteFrame*>(pFootnote)->GetAttr()->GetFootnote().IsEndNote() ) { nReal = AdjustNeighbourhood( nGrow, bTst ); nAdjust = NA_GROW_SHRINK; // no more AdjustNeighbourhood @@ -370,10 +370,10 @@ SwTwips SwFootnoteContFrm::GrowFrm( SwTwips nDist, bool bTst, bool ) { nDist -= nReal; // We can only respect the boundless wish so much - Frm().SSize().Height() -= nDist; + Frame().SSize().Height() -= nDist; if( IsVertical() && !IsVertLR() && !IsReverse() ) - Frm().Pos().X() += nDist; + Frame().Pos().X() += nDist; } // growing happens upwards, so successors to not need to be invalidated @@ -387,9 +387,9 @@ SwTwips SwFootnoteContFrm::GrowFrm( SwTwips nDist, bool bTst, bool ) return nReal; } -SwTwips SwFootnoteContFrm::ShrinkFrm( SwTwips nDiff, bool bTst, bool bInfo ) +SwTwips SwFootnoteContFrame::ShrinkFrame( SwTwips nDiff, bool bTst, bool bInfo ) { - SwPageFrm *pPage = FindPageFrm(); + SwPageFrame *pPage = FindPageFrame(); bool bShrink = false; if ( pPage ) { @@ -397,16 +397,16 @@ SwTwips SwFootnoteContFrm::ShrinkFrm( SwTwips nDiff, bool bTst, bool bInfo ) bShrink = true; else { - const SwViewShell *pSh = getRootFrm()->GetCurrShell(); + const SwViewShell *pSh = getRootFrame()->GetCurrShell(); if( pSh && pSh->GetViewOptions()->getBrowseMode() ) bShrink = true; } } if( bShrink ) { - SwTwips nRet = SwLayoutFrm::ShrinkFrm( nDiff, bTst, bInfo ); + SwTwips nRet = SwLayoutFrame::ShrinkFrame( nDiff, bTst, bInfo ); if( IsInSct() && !bTst ) - FindSctFrm()->InvalidateNextPos(); + FindSctFrame()->InvalidateNextPos(); if ( !bTst && nRet ) { _InvalidatePos(); @@ -417,8 +417,8 @@ SwTwips SwFootnoteContFrm::ShrinkFrm( SwTwips nDiff, bool bTst, bool bInfo ) return 0; } -SwFootnoteFrm::SwFootnoteFrm( SwFrameFormat *pFormat, SwFrm* pSib, SwContentFrm *pCnt, SwTextFootnote *pAt ): - SwLayoutFrm( pFormat, pSib ), +SwFootnoteFrame::SwFootnoteFrame( SwFrameFormat *pFormat, SwFrame* pSib, SwContentFrame *pCnt, SwTextFootnote *pAt ): + SwLayoutFrame( pFormat, pSib ), pFollow( nullptr ), pMaster( nullptr ), pRef( pCnt ), @@ -427,23 +427,23 @@ SwFootnoteFrm::SwFootnoteFrm( SwFrameFormat *pFormat, SwFrm* pSib, SwContentFrm // #i49383# mbUnlockPosOfLowerObjs( true ) { - mnFrmType = FRM_FTN; + mnFrameType = FRM_FTN; } -void SwFootnoteFrm::InvalidateNxtFootnoteCnts( SwPageFrm *pPage ) +void SwFootnoteFrame::InvalidateNxtFootnoteCnts( SwPageFrame *pPage ) { if ( GetNext() ) { - SwFrm *pCnt = static_cast<SwLayoutFrm*>(GetNext())->ContainsAny(); + SwFrame *pCnt = static_cast<SwLayoutFrame*>(GetNext())->ContainsAny(); if( pCnt ) { pCnt->InvalidatePage( pPage ); pCnt->_InvalidatePrt(); do { pCnt->_InvalidatePos(); - if( pCnt->IsSctFrm() ) + if( pCnt->IsSctFrame() ) { - SwFrm* pTmp = static_cast<SwSectionFrm*>(pCnt)->ContainsAny(); + SwFrame* pTmp = static_cast<SwSectionFrame*>(pCnt)->ContainsAny(); if( pTmp ) pTmp->_InvalidatePos(); } @@ -455,7 +455,7 @@ void SwFootnoteFrm::InvalidateNxtFootnoteCnts( SwPageFrm *pPage ) } #ifdef DBG_UTIL -SwTwips SwFootnoteFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo ) +SwTwips SwFootnoteFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo ) { static sal_uInt16 nNum = USHRT_MAX; SwTextFootnote* pTextFootnote = GetAttr(); @@ -465,10 +465,10 @@ SwTwips SwFootnoteFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo ) (void)bla; } - return SwLayoutFrm::GrowFrm( nDist, bTst, bInfo ); + return SwLayoutFrame::GrowFrame( nDist, bTst, bInfo ); } -SwTwips SwFootnoteFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo ) +SwTwips SwFootnoteFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo ) { static sal_uInt16 nNum = USHRT_MAX; if( nNum != USHRT_MAX ) @@ -480,11 +480,11 @@ SwTwips SwFootnoteFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo ) (void)bla; } } - return SwLayoutFrm::ShrinkFrm( nDist, bTst, bInfo ); + return SwLayoutFrame::ShrinkFrame( nDist, bTst, bInfo ); } #endif -void SwFootnoteFrm::Cut() +void SwFootnoteFrame::Cut() { if ( GetNext() ) GetNext()->InvalidatePos(); @@ -492,10 +492,10 @@ void SwFootnoteFrm::Cut() GetPrev()->SetRetouche(); // first move then shrink Upper - SwLayoutFrm *pUp = GetUpper(); + SwLayoutFrame *pUp = GetUpper(); // correct chaining - SwFootnoteFrm *pFootnote = this; + SwFootnoteFrame *pFootnote = this; if ( pFootnote->GetFollow() ) pFootnote->GetFollow()->SetMaster( pFootnote->GetMaster() ); if ( pFootnote->GetMaster() ) @@ -511,83 +511,83 @@ void SwFootnoteFrm::Cut() // The last footnote takes its container along if ( !pUp->Lower() ) { - SwPageFrm *pPage = pUp->FindPageFrm(); + SwPageFrame *pPage = pUp->FindPageFrame(); if ( pPage ) { - SwLayoutFrm *pBody = pPage->FindBodyCont(); + SwLayoutFrame *pBody = pPage->FindBodyCont(); if( pBody && !pBody->ContainsContent() ) - pPage->getRootFrm()->SetSuperfluous(); + pPage->getRootFrame()->SetSuperfluous(); } - SwSectionFrm* pSect = pUp->FindSctFrm(); + SwSectionFrame* pSect = pUp->FindSctFrame(); pUp->Cut(); - SwFrm::DestroyFrm(pUp); + SwFrame::DestroyFrame(pUp); // If the last footnote container was removed from a column // section without a Follow, then this section can be shrunk. if( pSect && !pSect->ToMaximize( false ) && !pSect->IsColLocked() ) pSect->_InvalidateSize(); } else - { if ( Frm().Height() ) - pUp->Shrink( Frm().Height() ); + { if ( Frame().Height() ) + pUp->Shrink( Frame().Height() ); pUp->SetCompletePaint(); pUp->InvalidatePage(); } } } -void SwFootnoteFrm::Paste( SwFrm* pParent, SwFrm* pSibling ) +void SwFootnoteFrame::Paste( SwFrame* pParent, SwFrame* pSibling ) { OSL_ENSURE( pParent, "no parent in Paste." ); - OSL_ENSURE( pParent->IsLayoutFrm(), "Parent is ContentFrm." ); + OSL_ENSURE( pParent->IsLayoutFrame(), "Parent is ContentFrame." ); OSL_ENSURE( pParent != this, "I am my own parent." ); OSL_ENSURE( pSibling != this, "I am my own sibling." ); OSL_ENSURE( !GetPrev() && !GetNext() && !GetUpper(), "I am still somewhere registered." ); // insert into tree structure - InsertBefore( static_cast<SwLayoutFrm*>(pParent), pSibling ); + InsertBefore( static_cast<SwLayoutFrame*>(pParent), pSibling ); SWRECTFN( this ) - if( (Frm().*fnRect->fnGetWidth)()!=(pParent->Prt().*fnRect->fnGetWidth)() ) + if( (Frame().*fnRect->fnGetWidth)()!=(pParent->Prt().*fnRect->fnGetWidth)() ) _InvalidateSize(); _InvalidatePos(); - SwPageFrm *pPage = FindPageFrm(); + SwPageFrame *pPage = FindPageFrame(); InvalidatePage( pPage ); if ( GetNext() ) GetNext()->_InvalidatePos(); - if( (Frm().*fnRect->fnGetHeight)() ) - pParent->Grow( (Frm().*fnRect->fnGetHeight)() ); + if( (Frame().*fnRect->fnGetHeight)() ) + pParent->Grow( (Frame().*fnRect->fnGetHeight)() ); // If the predecessor is the master and/or the successor is the Follow, // then take their content and destroy them. if ( GetPrev() && GetPrev() == GetMaster() ) - { OSL_ENSURE( SwFlowFrm::CastFlowFrm( GetPrev()->GetLower() ), + { OSL_ENSURE( SwFlowFrame::CastFlowFrame( GetPrev()->GetLower() ), "Footnote without content?" ); - (SwFlowFrm::CastFlowFrm( GetPrev()->GetLower()))-> + (SwFlowFrame::CastFlowFrame( GetPrev()->GetLower()))-> MoveSubTree( this, GetLower() ); - SwFrm *pDel = GetPrev(); + SwFrame *pDel = GetPrev(); pDel->Cut(); - SwFrm::DestroyFrm(pDel); + SwFrame::DestroyFrame(pDel); } if ( GetNext() && GetNext() == GetFollow() ) - { OSL_ENSURE( SwFlowFrm::CastFlowFrm( GetNext()->GetLower() ), + { OSL_ENSURE( SwFlowFrame::CastFlowFrame( GetNext()->GetLower() ), "Footnote without content?" ); - (SwFlowFrm::CastFlowFrm( GetNext()->GetLower()))->MoveSubTree( this ); - SwFrm *pDel = GetNext(); + (SwFlowFrame::CastFlowFrame( GetNext()->GetLower()))->MoveSubTree( this ); + SwFrame *pDel = GetNext(); pDel->Cut(); - SwFrm::DestroyFrm(pDel); + SwFrame::DestroyFrame(pDel); } #if OSL_DEBUG_LEVEL > 0 SwDoc *pDoc = GetFormat()->GetDoc(); if ( GetPrev() ) { - OSL_ENSURE( lcl_FindFootnotePos( pDoc, static_cast<SwFootnoteFrm*>(GetPrev())->GetAttr() ) <= + OSL_ENSURE( lcl_FindFootnotePos( pDoc, static_cast<SwFootnoteFrame*>(GetPrev())->GetAttr() ) <= lcl_FindFootnotePos( pDoc, GetAttr() ), "Prev is not FootnotePrev" ); } if ( GetNext() ) { OSL_ENSURE( lcl_FindFootnotePos( pDoc, GetAttr() ) <= - lcl_FindFootnotePos( pDoc, static_cast<SwFootnoteFrm*>(GetNext())->GetAttr() ), + lcl_FindFootnotePos( pDoc, static_cast<SwFootnoteFrame*>(GetNext())->GetAttr() ), "Next is not FootnoteNext" ); } #endif @@ -596,25 +596,25 @@ void SwFootnoteFrm::Paste( SwFrm* pParent, SwFrm* pSibling ) /// Return the next layout leaf in that the frame can be moved. /// New pages will only be created if specified by the parameter. -SwLayoutFrm *SwFrm::GetNextFootnoteLeaf( MakePageType eMakePage ) +SwLayoutFrame *SwFrame::GetNextFootnoteLeaf( MakePageType eMakePage ) { - SwFootnoteBossFrm *pOldBoss = FindFootnoteBossFrm(); - SwPageFrm* pOldPage = pOldBoss->FindPageFrm(); - SwPageFrm* pPage; - SwFootnoteBossFrm *pBoss = pOldBoss->IsColumnFrm() ? - static_cast<SwFootnoteBossFrm*>(pOldBoss->GetNext()) : nullptr; // next column, if existing + SwFootnoteBossFrame *pOldBoss = FindFootnoteBossFrame(); + SwPageFrame* pOldPage = pOldBoss->FindPageFrame(); + SwPageFrame* pPage; + SwFootnoteBossFrame *pBoss = pOldBoss->IsColumnFrame() ? + static_cast<SwFootnoteBossFrame*>(pOldBoss->GetNext()) : nullptr; // next column, if existing if( pBoss ) pPage = nullptr; else { - if( pOldBoss->GetUpper()->IsSctFrm() ) + if( pOldBoss->GetUpper()->IsSctFrame() ) { // this can only be in a column area - SwLayoutFrm* pNxt = pOldBoss->GetNextSctLeaf( eMakePage ); + SwLayoutFrame* pNxt = pOldBoss->GetNextSctLeaf( eMakePage ); if( pNxt ) { - OSL_ENSURE( pNxt->IsColBodyFrm(), "GetNextFootnoteLeaf: Funny Leaf" ); - pBoss = static_cast<SwFootnoteBossFrm*>(pNxt->GetUpper()); - pPage = pBoss->FindPageFrm(); + OSL_ENSURE( pNxt->IsColBodyFrame(), "GetNextFootnoteLeaf: Funny Leaf" ); + pBoss = static_cast<SwFootnoteBossFrame*>(pNxt->GetUpper()); + pPage = pBoss->FindPageFrame(); } else return nullptr; @@ -622,10 +622,10 @@ SwLayoutFrm *SwFrm::GetNextFootnoteLeaf( MakePageType eMakePage ) else { // next page - pPage = static_cast<SwPageFrm*>(pOldPage->GetNext()); + pPage = static_cast<SwPageFrame*>(pOldPage->GetNext()); // skip empty pages if( pPage && pPage->IsEmptyPage() ) - pPage = static_cast<SwPageFrm*>(pPage->GetNext()); + pPage = static_cast<SwPageFrame*>(pPage->GetNext()); pBoss = pPage; } } @@ -637,16 +637,16 @@ SwLayoutFrm *SwFrm::GetNextFootnoteLeaf( MakePageType eMakePage ) // If the footnote has already a Follow we do not need to search. // However, if there are unwanted empty columns/pages between Footnote and Follow, // create another Follow on the next best column/page and the rest will sort itself out. - SwFootnoteFrm *pFootnote = FindFootnoteFrm(); + SwFootnoteFrame *pFootnote = FindFootnoteFrame(); if ( pFootnote && pFootnote->GetFollow() ) { - SwFootnoteBossFrm* pTmpBoss = pFootnote->GetFollow()->FindFootnoteBossFrm(); + SwFootnoteBossFrame* pTmpBoss = pFootnote->GetFollow()->FindFootnoteBossFrame(); // Following cases will be handled: // 1. both "FootnoteBoss"es are neighboring columns/pages // 2. the new one is the first column of a neighboring page // 3. the new one is the first column in a section of the next page while( pTmpBoss != pBoss && pTmpBoss && !pTmpBoss->GetPrev() ) - pTmpBoss = pTmpBoss->GetUpper()->FindFootnoteBossFrm(); + pTmpBoss = pTmpBoss->GetUpper()->FindFootnoteBossFrame(); if( pTmpBoss == pBoss ) return pFootnote->GetFollow(); } @@ -657,20 +657,20 @@ SwLayoutFrm *SwFrm::GetNextFootnoteLeaf( MakePageType eMakePage ) if ( eMakePage == MAKEPAGE_APPEND || eMakePage == MAKEPAGE_INSERT ) { pBoss = InsertPage( pOldPage, pOldPage->IsFootnotePage() ); - static_cast<SwPageFrm*>(pBoss)->SetEndNotePage( pOldPage->IsEndNotePage() ); + static_cast<SwPageFrame*>(pBoss)->SetEndNotePage( pOldPage->IsEndNotePage() ); } else return nullptr; } - if( pBoss->IsPageFrm() ) + if( pBoss->IsPageFrame() ) { // If this page has columns, then go to the first one - SwLayoutFrm* pLay = pBoss->FindBodyCont(); - if( pLay && pLay->Lower() && pLay->Lower()->IsColumnFrm() ) - pBoss = static_cast<SwFootnoteBossFrm*>(pLay->Lower()); + SwLayoutFrame* pLay = pBoss->FindBodyCont(); + if( pLay && pLay->Lower() && pLay->Lower()->IsColumnFrame() ) + pBoss = static_cast<SwFootnoteBossFrame*>(pLay->Lower()); } // found column/page - add myself - SwFootnoteContFrm *pCont = pBoss->FindFootnoteCont(); + SwFootnoteContFrame *pCont = pBoss->FindFootnoteCont(); if ( !pCont && pBoss->GetMaxFootnoteHeight() && ( eMakePage == MAKEPAGE_APPEND || eMakePage == MAKEPAGE_INSERT ) ) pCont = pBoss->MakeFootnoteCont(); @@ -678,15 +678,15 @@ SwLayoutFrm *SwFrm::GetNextFootnoteLeaf( MakePageType eMakePage ) } /// Get the preceding layout leaf in that the frame can be moved. -SwLayoutFrm *SwFrm::GetPrevFootnoteLeaf( MakePageType eMakeFootnote ) +SwLayoutFrame *SwFrame::GetPrevFootnoteLeaf( MakePageType eMakeFootnote ) { // The predecessor of a footnote is (if possible) // the master of the chain of the footnote. - SwFootnoteFrm *pFootnote = FindFootnoteFrm(); - SwLayoutFrm *pRet = pFootnote->GetMaster(); + SwFootnoteFrame *pFootnote = FindFootnoteFrame(); + SwLayoutFrame *pRet = pFootnote->GetMaster(); - SwFootnoteBossFrm* pOldBoss = FindFootnoteBossFrm(); - SwPageFrm *pOldPage = pOldBoss->FindPageFrm(); + SwFootnoteBossFrame* pOldBoss = FindFootnoteBossFrame(); + SwPageFrame *pOldPage = pOldBoss->FindPageFrame(); if ( !pOldBoss->GetPrev() && !pOldPage->GetPrev() ) return pRet; // there is neither a predecessor column nor page @@ -694,16 +694,16 @@ SwLayoutFrm *SwFrm::GetPrevFootnoteLeaf( MakePageType eMakeFootnote ) if ( !pRet ) { bool bEndn = pFootnote->GetAttr()->GetFootnote().IsEndNote(); - SwFrm* pTmpRef = nullptr; + SwFrame* pTmpRef = nullptr; if( bEndn && pFootnote->IsInSct() ) { - SwSectionFrm* pSect = pFootnote->FindSctFrm(); + SwSectionFrame* pSect = pFootnote->FindSctFrame(); if( pSect->IsEndnAtEnd() ) pTmpRef = pSect->FindLastContent( FINDMODE_LASTCNT ); } if( !pTmpRef ) pTmpRef = pFootnote->GetRef(); - SwFootnoteBossFrm* pStop = pTmpRef->FindFootnoteBossFrm( !bEndn ); + SwFootnoteBossFrame* pStop = pTmpRef->FindFootnoteBossFrame( !bEndn ); const sal_uInt16 nNum = pStop->GetPhyPageNum(); @@ -711,17 +711,17 @@ SwLayoutFrm *SwFrm::GetPrevFootnoteLeaf( MakePageType eMakeFootnote ) // be shown at the document ending or the footnote is an endnote. const bool bEndNote = pOldPage->IsEndNotePage(); const bool bFootnoteEndDoc = pOldPage->IsFootnotePage(); - SwFootnoteBossFrm* pNxtBoss = pOldBoss; - SwSectionFrm *pSect = pNxtBoss->GetUpper()->IsSctFrm() ? - static_cast<SwSectionFrm*>(pNxtBoss->GetUpper()) : nullptr; + SwFootnoteBossFrame* pNxtBoss = pOldBoss; + SwSectionFrame *pSect = pNxtBoss->GetUpper()->IsSctFrame() ? + static_cast<SwSectionFrame*>(pNxtBoss->GetUpper()) : nullptr; do { - if( pNxtBoss->IsColumnFrm() && pNxtBoss->GetPrev() ) - pNxtBoss = static_cast<SwFootnoteBossFrm*>(pNxtBoss->GetPrev()); // one column backwards + if( pNxtBoss->IsColumnFrame() && pNxtBoss->GetPrev() ) + pNxtBoss = static_cast<SwFootnoteBossFrame*>(pNxtBoss->GetPrev()); // one column backwards else // one page backwards { - SwLayoutFrm* pBody = nullptr; + SwLayoutFrame* pBody = nullptr; if( pSect ) { if( pSect->IsFootnoteLock() ) @@ -735,15 +735,15 @@ SwLayoutFrm *SwFrm::GetPrevFootnoteLeaf( MakePageType eMakeFootnote ) pSect = pSect->FindMaster(); if( !pSect || !pSect->Lower() ) return nullptr; - OSL_ENSURE( pSect->Lower()->IsColumnFrm(), + OSL_ENSURE( pSect->Lower()->IsColumnFrame(), "GetPrevFootnoteLeaf: Where's the column?" ); - pNxtBoss = static_cast<SwFootnoteBossFrm*>(pSect->Lower()); + pNxtBoss = static_cast<SwFootnoteBossFrame*>(pSect->Lower()); pBody = pSect; } } else { - SwPageFrm* pPage = static_cast<SwPageFrm*>(pNxtBoss->FindPageFrm()->GetPrev()); + SwPageFrame* pPage = static_cast<SwPageFrame*>(pNxtBoss->FindPageFrame()->GetPrev()); if( !pPage || pPage->GetPhyPageNum() < nNum || bEndNote != pPage->IsEndNotePage() || bFootnoteEndDoc != pPage->IsFootnotePage() ) return nullptr; // no further pages found @@ -753,13 +753,13 @@ SwLayoutFrm *SwFrm::GetPrevFootnoteLeaf( MakePageType eMakeFootnote ) // We have the previous page, we might need to find the last column of it if( pBody ) { - if ( pBody->Lower() && pBody->Lower()->IsColumnFrm() ) + if ( pBody->Lower() && pBody->Lower()->IsColumnFrame() ) { - pNxtBoss = static_cast<SwFootnoteBossFrm*>(pBody->GetLastLower()); + pNxtBoss = static_cast<SwFootnoteBossFrame*>(pBody->GetLastLower()); } } } - SwFootnoteContFrm *pCont = pNxtBoss->FindFootnoteCont(); + SwFootnoteContFrame *pCont = pNxtBoss->FindFootnoteCont(); if ( pCont ) { pRet = pCont; @@ -777,28 +777,28 @@ SwLayoutFrm *SwFrm::GetPrevFootnoteLeaf( MakePageType eMakeFootnote ) } if ( pRet ) { - const SwFootnoteBossFrm* pNewBoss = pRet->FindFootnoteBossFrm(); + const SwFootnoteBossFrame* pNewBoss = pRet->FindFootnoteBossFrame(); bool bJump = false; - if( pOldBoss->IsColumnFrm() && pOldBoss->GetPrev() ) // a previous column exists - bJump = pOldBoss->GetPrev() != static_cast<SwFrm const *>(pNewBoss); // did we chose it? - else if( pNewBoss->IsColumnFrm() && pNewBoss->GetNext() ) + if( pOldBoss->IsColumnFrame() && pOldBoss->GetPrev() ) // a previous column exists + bJump = pOldBoss->GetPrev() != static_cast<SwFrame const *>(pNewBoss); // did we chose it? + else if( pNewBoss->IsColumnFrame() && pNewBoss->GetNext() ) bJump = true; // there is another column after the boss (not the old boss) else { // Will be reached only if old and new boss are both either pages or the last (new) // or first (old) column of a page. In this case, check if pages were skipped. - const sal_uInt16 nDiff = pOldPage->GetPhyPageNum() - pRet->FindPageFrm()->GetPhyPageNum(); + const sal_uInt16 nDiff = pOldPage->GetPhyPageNum() - pRet->FindPageFrame()->GetPhyPageNum(); if ( nDiff > 2 || - (nDiff > 1 && !static_cast<SwPageFrm*>(pOldPage->GetPrev())->IsEmptyPage()) ) + (nDiff > 1 && !static_cast<SwPageFrame*>(pOldPage->GetPrev())->IsEmptyPage()) ) bJump = true; } if( bJump ) - SwFlowFrm::SetMoveBwdJump( true ); + SwFlowFrame::SetMoveBwdJump( true ); } return pRet; } -bool SwFrm::IsFootnoteAllowed() const +bool SwFrame::IsFootnoteAllowed() const { if ( !IsInDocBody() ) return false; @@ -806,43 +806,43 @@ bool SwFrm::IsFootnoteAllowed() const if ( IsInTab() ) { // no footnotes in repeated headlines - const SwTabFrm *pTab = const_cast<SwFrm*>(this)->ImplFindTabFrm(); + const SwTabFrame *pTab = const_cast<SwFrame*>(this)->ImplFindTabFrame(); if ( pTab->IsFollow() ) return !pTab->IsInHeadline( *this ); } return true; } -void SwRootFrm::UpdateFootnoteNums() +void SwRootFrame::UpdateFootnoteNums() { // page numbering only if set at the document if ( GetFormat()->GetDoc()->GetFootnoteInfo().eNum == FTNNUM_PAGE ) { - SwPageFrm *pPage = static_cast<SwPageFrm*>(Lower()); + SwPageFrame *pPage = static_cast<SwPageFrame*>(Lower()); while ( pPage && !pPage->IsFootnotePage() ) { pPage->UpdateFootnoteNum(); - pPage = static_cast<SwPageFrm*>(pPage->GetNext()); + pPage = static_cast<SwPageFrame*>(pPage->GetNext()); } } } /// remove all footnotes (not the references) and all footnote pages -void sw_RemoveFootnotes( SwFootnoteBossFrm* pBoss, bool bPageOnly, bool bEndNotes ) +void sw_RemoveFootnotes( SwFootnoteBossFrame* pBoss, bool bPageOnly, bool bEndNotes ) { do { - SwFootnoteContFrm *pCont = pBoss->FindFootnoteCont(); + SwFootnoteContFrame *pCont = pBoss->FindFootnoteCont(); if ( pCont ) { - SwFootnoteFrm *pFootnote = static_cast<SwFootnoteFrm*>(pCont->Lower()); + SwFootnoteFrame *pFootnote = static_cast<SwFootnoteFrame*>(pCont->Lower()); OSL_ENSURE( pFootnote, "Footnote content without footnote." ); if ( bPageOnly ) while ( pFootnote->GetMaster() ) pFootnote = pFootnote->GetMaster(); do { - SwFootnoteFrm *pNxt = static_cast<SwFootnoteFrm*>(pFootnote->GetNext()); + SwFootnoteFrame *pNxt = static_cast<SwFootnoteFrame*>(pFootnote->GetNext()); if ( !pFootnote->GetAttr()->GetFootnote().IsEndNote() || bEndNotes ) { @@ -850,7 +850,7 @@ void sw_RemoveFootnotes( SwFootnoteBossFrm* pBoss, bool bPageOnly, bool bEndNote if ( bPageOnly && !pNxt ) pNxt = pFootnote->GetFollow(); pFootnote->Cut(); - SwFrm::DestroyFrm(pFootnote); + SwFrame::DestroyFrame(pFootnote); } pFootnote = pNxt; @@ -861,38 +861,38 @@ void sw_RemoveFootnotes( SwFootnoteBossFrm* pBoss, bool bPageOnly, bool bEndNote // A sectionframe with the Footnote/EndnAtEnd-flags may contain // foot/endnotes. If the last lower frame of the bodyframe is // a multicolumned sectionframe, it may contain footnotes, too. - SwLayoutFrm* pBody = pBoss->FindBodyCont(); + SwLayoutFrame* pBody = pBoss->FindBodyCont(); if( pBody && pBody->Lower() ) { - SwFrm* pLow = pBody->Lower(); + SwFrame* pLow = pBody->Lower(); while (pLow) { - if( pLow->IsSctFrm() && ( !pLow->GetNext() || - static_cast<SwSectionFrm*>(pLow)->IsAnyNoteAtEnd() ) && - static_cast<SwSectionFrm*>(pLow)->Lower() && - static_cast<SwSectionFrm*>(pLow)->Lower()->IsColumnFrm() ) - sw_RemoveFootnotes( static_cast<SwColumnFrm*>(static_cast<SwSectionFrm*>(pLow)->Lower()), + if( pLow->IsSctFrame() && ( !pLow->GetNext() || + static_cast<SwSectionFrame*>(pLow)->IsAnyNoteAtEnd() ) && + static_cast<SwSectionFrame*>(pLow)->Lower() && + static_cast<SwSectionFrame*>(pLow)->Lower()->IsColumnFrame() ) + sw_RemoveFootnotes( static_cast<SwColumnFrame*>(static_cast<SwSectionFrame*>(pLow)->Lower()), bPageOnly, bEndNotes ); pLow = pLow->GetNext(); } } } // is there another column? - pBoss = pBoss->IsColumnFrm() ? static_cast<SwColumnFrm*>(pBoss->GetNext()) : nullptr; + pBoss = pBoss->IsColumnFrame() ? static_cast<SwColumnFrame*>(pBoss->GetNext()) : nullptr; } while( pBoss ); } -void SwRootFrm::RemoveFootnotes( SwPageFrm *pPage, bool bPageOnly, bool bEndNotes ) +void SwRootFrame::RemoveFootnotes( SwPageFrame *pPage, bool bPageOnly, bool bEndNotes ) { if ( !pPage ) - pPage = static_cast<SwPageFrm*>(Lower()); + pPage = static_cast<SwPageFrame*>(Lower()); do { // On columned pages we have to clean up in all columns - SwFootnoteBossFrm* pBoss; - SwLayoutFrm* pBody = pPage->FindBodyCont(); - if( pBody && pBody->Lower() && pBody->Lower()->IsColumnFrm() ) - pBoss = static_cast<SwFootnoteBossFrm*>(pBody->Lower()); // the first column + SwFootnoteBossFrame* pBoss; + SwLayoutFrame* pBody = pPage->FindBodyCont(); + if( pBody && pBody->Lower() && pBody->Lower()->IsColumnFrame() ) + pBoss = static_cast<SwFootnoteBossFrame*>(pBody->Lower()); // the first column else pBoss = pPage; // no columns sw_RemoveFootnotes( pBoss, bPageOnly, bEndNotes ); @@ -901,13 +901,13 @@ void SwRootFrm::RemoveFootnotes( SwPageFrm *pPage, bool bPageOnly, bool bEndNote if ( pPage->IsFootnotePage() && (!pPage->IsEndNotePage() || bEndNotes) ) { - SwFrm *pDel = pPage; - pPage = static_cast<SwPageFrm*>(pPage->GetNext()); + SwFrame *pDel = pPage; + pPage = static_cast<SwPageFrame*>(pPage->GetNext()); pDel->Cut(); - SwFrm::DestroyFrm(pDel); + SwFrame::DestroyFrame(pDel); } else - pPage = static_cast<SwPageFrm*>(pPage->GetNext()); + pPage = static_cast<SwPageFrame*>(pPage->GetNext()); } else break; @@ -916,16 +916,16 @@ void SwRootFrm::RemoveFootnotes( SwPageFrm *pPage, bool bPageOnly, bool bEndNote } /// Change the page template of the footnote pages -void SwRootFrm::CheckFootnotePageDescs( bool bEndNote ) +void SwRootFrame::CheckFootnotePageDescs( bool bEndNote ) { - SwPageFrm *pPage = static_cast<SwPageFrm*>(Lower()); + SwPageFrame *pPage = static_cast<SwPageFrame*>(Lower()); while ( pPage && !pPage->IsFootnotePage() ) - pPage = static_cast<SwPageFrm*>(pPage->GetNext()); + pPage = static_cast<SwPageFrame*>(pPage->GetNext()); while ( pPage && pPage->IsEndNotePage() != bEndNote ) - pPage = static_cast<SwPageFrm*>(pPage->GetNext()); + pPage = static_cast<SwPageFrame*>(pPage->GetNext()); if ( pPage ) - SwFrm::CheckPageDescs( pPage, false ); + SwFrame::CheckPageDescs( pPage, false ); } /** Insert a footnote container @@ -936,49 +936,49 @@ void SwRootFrm::CheckFootnotePageDescs( bool bEndNote ) * * @return footnote container frame */ -SwFootnoteContFrm *SwFootnoteBossFrm::MakeFootnoteCont() +SwFootnoteContFrame *SwFootnoteBossFrame::MakeFootnoteCont() { SAL_WARN_IF(FindFootnoteCont(), "sw.core", "footnote container exists already"); - SwFootnoteContFrm *pNew = new SwFootnoteContFrm( GetFormat()->GetDoc()->GetDfltFrameFormat(), this ); - SwLayoutFrm *pLay = FindBodyCont(); + SwFootnoteContFrame *pNew = new SwFootnoteContFrame( GetFormat()->GetDoc()->GetDfltFrameFormat(), this ); + SwLayoutFrame *pLay = FindBodyCont(); pNew->Paste( this, pLay->GetNext() ); return pNew; } -SwFootnoteContFrm *SwFootnoteBossFrm::FindFootnoteCont() +SwFootnoteContFrame *SwFootnoteBossFrame::FindFootnoteCont() { - SwFrm *pFrm = Lower(); - while( pFrm && !pFrm->IsFootnoteContFrm() ) - pFrm = pFrm->GetNext(); + SwFrame *pFrame = Lower(); + while( pFrame && !pFrame->IsFootnoteContFrame() ) + pFrame = pFrame->GetNext(); #if OSL_DEBUG_LEVEL > 0 - if ( pFrm ) + if ( pFrame ) { - SwFrm *pFootnote = pFrm->GetLower(); + SwFrame *pFootnote = pFrame->GetLower(); OSL_ENSURE( pFootnote, "Content without footnote." ); while ( pFootnote ) { - OSL_ENSURE( pFootnote->IsFootnoteFrm(), "Neighbor of footnote is not a footnote." ); + OSL_ENSURE( pFootnote->IsFootnoteFrame(), "Neighbor of footnote is not a footnote." ); pFootnote = pFootnote->GetNext(); } } #endif - return static_cast<SwFootnoteContFrm*>(pFrm); + return static_cast<SwFootnoteContFrame*>(pFrame); } /// Search the next available footnote container. -SwFootnoteContFrm *SwFootnoteBossFrm::FindNearestFootnoteCont( bool bDontLeave ) +SwFootnoteContFrame *SwFootnoteBossFrame::FindNearestFootnoteCont( bool bDontLeave ) { - SwFootnoteContFrm *pCont = nullptr; + SwFootnoteContFrame *pCont = nullptr; if ( !GetFormat()->GetDoc()->GetFootnoteIdxs().empty() ) { pCont = FindFootnoteCont(); if ( !pCont ) { - SwPageFrm *pPage = FindPageFrm(); - SwFootnoteBossFrm* pBoss = this; + SwPageFrame *pPage = FindPageFrame(); + SwFootnoteBossFrame* pBoss = this; bool bEndNote = pPage->IsEndNotePage(); do { @@ -992,29 +992,29 @@ SwFootnoteContFrm *SwFootnoteBossFrm::FindNearestFootnoteCont( bool bDontLeave ) return pCont; } -SwFootnoteFrm *SwFootnoteBossFrm::FindFirstFootnote() +SwFootnoteFrame *SwFootnoteBossFrame::FindFirstFootnote() { // search for the nearest footnote container - SwFootnoteContFrm *pCont = FindNearestFootnoteCont(); + SwFootnoteContFrame *pCont = FindNearestFootnoteCont(); if ( !pCont ) return nullptr; // Starting from the first footnote, search the first // footnote that is referenced by the current column/page - SwFootnoteFrm *pRet = static_cast<SwFootnoteFrm*>(pCont->Lower()); - const sal_uInt16 nRefNum = FindPageFrm()->GetPhyPageNum(); + SwFootnoteFrame *pRet = static_cast<SwFootnoteFrame*>(pCont->Lower()); + const sal_uInt16 nRefNum = FindPageFrame()->GetPhyPageNum(); const sal_uInt16 nRefCol = lcl_ColumnNum( this ); sal_uInt16 nPgNum, nColNum; // page number, column number - SwFootnoteBossFrm* pBoss; - SwPageFrm* pPage; + SwFootnoteBossFrame* pBoss; + SwPageFrame* pPage; if( pRet ) { - pBoss = pRet->GetRef()->FindFootnoteBossFrm(); + pBoss = pRet->GetRef()->FindFootnoteBossFrame(); OSL_ENSURE( pBoss, "FindFirstFootnote: No boss found" ); if( !pBoss ) return nullptr; // ?There must be a bug, but no GPF - pPage = pBoss->FindPageFrm(); + pPage = pBoss->FindPageFrame(); nPgNum = pPage->GetPhyPageNum(); if ( nPgNum == nRefNum ) { @@ -1036,21 +1036,21 @@ SwFootnoteFrm *SwFootnoteBossFrm::FindFirstFootnote() while ( pRet->GetFollow() ) pRet = pRet->GetFollow(); - SwFootnoteFrm *pNxt = static_cast<SwFootnoteFrm*>(pRet->GetNext()); + SwFootnoteFrame *pNxt = static_cast<SwFootnoteFrame*>(pRet->GetNext()); if ( !pNxt ) { - pBoss = pRet->FindFootnoteBossFrm(); - pPage = pBoss->FindPageFrm(); + pBoss = pRet->FindFootnoteBossFrame(); + pPage = pBoss->FindPageFrame(); lcl_NextFootnoteBoss( pBoss, pPage, false ); // next FootnoteBoss pCont = pBoss ? pBoss->FindNearestFootnoteCont() : nullptr; if ( pCont ) - pNxt = static_cast<SwFootnoteFrm*>(pCont->Lower()); + pNxt = static_cast<SwFootnoteFrame*>(pCont->Lower()); } if ( pNxt ) { pRet = pNxt; - pBoss = pRet->GetRef()->FindFootnoteBossFrm(); - pPage = pBoss->FindPageFrm(); + pBoss = pRet->GetRef()->FindFootnoteBossFrame(); + pPage = pBoss->FindPageFrame(); nPgNum = pPage->GetPhyPageNum(); if ( nPgNum == nRefNum ) { @@ -1070,9 +1070,9 @@ SwFootnoteFrm *SwFootnoteBossFrm::FindFirstFootnote() } /// Get the first footnote of a given content -const SwFootnoteFrm *SwFootnoteBossFrm::FindFirstFootnote( SwContentFrm *pCnt ) const +const SwFootnoteFrame *SwFootnoteBossFrame::FindFirstFootnote( SwContentFrame *pCnt ) const { - const SwFootnoteFrm *pRet = const_cast<SwFootnoteBossFrm*>(this)->FindFirstFootnote(); + const SwFootnoteFrame *pRet = const_cast<SwFootnoteBossFrame*>(this)->FindFirstFootnote(); if ( pRet ) { const sal_uInt16 nColNum = lcl_ColumnNum( this ); @@ -1083,17 +1083,17 @@ const SwFootnoteFrm *SwFootnoteBossFrm::FindFirstFootnote( SwContentFrm *pCnt ) pRet = pRet->GetFollow(); if ( pRet->GetNext() ) - pRet = static_cast<const SwFootnoteFrm*>(pRet->GetNext()); + pRet = static_cast<const SwFootnoteFrame*>(pRet->GetNext()); else - { SwFootnoteBossFrm *pBoss = const_cast<SwFootnoteBossFrm*>(pRet->FindFootnoteBossFrm()); - SwPageFrm *pPage = pBoss->FindPageFrm(); + { SwFootnoteBossFrame *pBoss = const_cast<SwFootnoteBossFrame*>(pRet->FindFootnoteBossFrame()); + SwPageFrame *pPage = pBoss->FindPageFrame(); lcl_NextFootnoteBoss( pBoss, pPage, false ); // next FootnoteBoss - SwFootnoteContFrm *pCont = pBoss ? pBoss->FindNearestFootnoteCont() : nullptr; - pRet = pCont ? static_cast<SwFootnoteFrm*>(pCont->Lower()) : nullptr; + SwFootnoteContFrame *pCont = pBoss ? pBoss->FindNearestFootnoteCont() : nullptr; + pRet = pCont ? static_cast<SwFootnoteFrame*>(pCont->Lower()) : nullptr; } if ( pRet ) { - const SwFootnoteBossFrm* pBoss = pRet->GetRef()->FindFootnoteBossFrm(); + const SwFootnoteBossFrame* pBoss = pRet->GetRef()->FindFootnoteBossFrame(); if( pBoss->GetPhyPageNum() != nPageNum || nColNum != lcl_ColumnNum( pBoss ) ) pRet = nullptr; @@ -1103,7 +1103,7 @@ const SwFootnoteFrm *SwFootnoteBossFrm::FindFirstFootnote( SwContentFrm *pCnt ) return pRet; } -void SwFootnoteBossFrm::ResetFootnote( const SwFootnoteFrm *pCheck ) +void SwFootnoteBossFrame::ResetFootnote( const SwFootnoteFrame *pCheck ) { // Destroy the incarnations of footnotes to an attribute, if they don't // belong to pAssumed @@ -1114,36 +1114,36 @@ void SwFootnoteBossFrm::ResetFootnote( const SwFootnoteFrm *pCheck ) if ( !pNd ) pNd = pCheck->GetFormat()->GetDoc()-> GetNodes().GoNextSection( &aIdx, true, false ); - SwIterator<SwFrm,SwContentNode> aIter( *pNd ); - SwFrm* pFrm = aIter.First(); - while( pFrm ) + SwIterator<SwFrame,SwContentNode> aIter( *pNd ); + SwFrame* pFrame = aIter.First(); + while( pFrame ) { - if( pFrm->getRootFrm() == pCheck->getRootFrm() ) + if( pFrame->getRootFrame() == pCheck->getRootFrame() ) { - SwFrm *pTmp = pFrm->GetUpper(); - while ( pTmp && !pTmp->IsFootnoteFrm() ) + SwFrame *pTmp = pFrame->GetUpper(); + while ( pTmp && !pTmp->IsFootnoteFrame() ) pTmp = pTmp->GetUpper(); - SwFootnoteFrm *pFootnote = static_cast<SwFootnoteFrm*>(pTmp); + SwFootnoteFrame *pFootnote = static_cast<SwFootnoteFrame*>(pTmp); while ( pFootnote && pFootnote->GetMaster() ) pFootnote = pFootnote->GetMaster(); if ( pFootnote != pCheck ) { while ( pFootnote ) { - SwFootnoteFrm *pNxt = pFootnote->GetFollow(); + SwFootnoteFrame *pNxt = pFootnote->GetFollow(); pFootnote->Cut(); - SwFrm::DestroyFrm(pFootnote); + SwFrame::DestroyFrame(pFootnote); pFootnote = pNxt; } } } - pFrm = aIter.Next(); + pFrame = aIter.Next(); } } -void SwFootnoteBossFrm::InsertFootnote( SwFootnoteFrm* pNew ) +void SwFootnoteBossFrame::InsertFootnote( SwFootnoteFrame* pNew ) { // Place the footnote in front of the footnote whose attribute // is in front of the new one (get position via the Doc). @@ -1152,14 +1152,14 @@ void SwFootnoteBossFrm::InsertFootnote( SwFootnoteFrm* pNew ) // the footnote behind the last footnote of the closest previous column/page. ResetFootnote( pNew ); - SwFootnoteFrm *pSibling = FindFirstFootnote(); + SwFootnoteFrame *pSibling = FindFirstFootnote(); bool bDontLeave = false; // Ok, a sibling has been found, but is the sibling in an acceptable // environment? if( IsInSct() ) { - SwSectionFrm* pMySect = ImplFindSctFrm(); + SwSectionFrame* pMySect = ImplFindSctFrame(); bool bEndnt = pNew->GetAttr()->GetFootnote().IsEndNote(); if( bEndnt ) { @@ -1170,7 +1170,7 @@ void SwFootnoteBossFrm::InsertFootnote( SwFootnoteFrm* pNew ) if( pEndFormat ) { if( !pSibling->IsInSct() || - !pSibling->ImplFindSctFrm()->IsDescendantFrom( pEndFormat ) ) + !pSibling->ImplFindSctFrame()->IsDescendantFrom( pEndFormat ) ) pSibling = nullptr; } else if( pSibling->IsInSct() ) @@ -1185,7 +1185,7 @@ void SwFootnoteBossFrm::InsertFootnote( SwFootnoteFrm* pNew ) if( pMySect->IsFootnoteAtEnd() ) { if( !pSibling->IsInSct() || - !pMySect->IsAnFollow( pSibling->ImplFindSctFrm() ) ) + !pMySect->IsAnFollow( pSibling->ImplFindSctFrame() ) ) pSibling = nullptr; } else if( pSibling->IsInSct() ) @@ -1194,8 +1194,8 @@ void SwFootnoteBossFrm::InsertFootnote( SwFootnoteFrm* pNew ) } } - if( pSibling && pSibling->FindPageFrm()->IsEndNotePage() != - FindPageFrm()->IsEndNotePage() ) + if( pSibling && pSibling->FindPageFrame()->IsEndNotePage() != + FindPageFrame()->IsEndNotePage() ) pSibling = nullptr; // use the Doc to find out the position @@ -1204,7 +1204,7 @@ void SwFootnoteBossFrm::InsertFootnote( SwFootnoteFrm* pNew ) sal_uLong nCmpPos = 0; sal_uLong nLastPos = 0; - SwFootnoteContFrm *pParent = nullptr; + SwFootnoteContFrame *pParent = nullptr; if( pSibling ) { nCmpPos = ::lcl_FindFootnotePos( pDoc, pSibling->GetAttr() ); @@ -1222,7 +1222,7 @@ void SwFootnoteBossFrm::InsertFootnote( SwFootnoteFrm* pNew ) pParent = FindNearestFootnoteCont( bDontLeave ); if ( pParent ) { - SwFootnoteFrm *pFootnote = static_cast<SwFootnoteFrm*>(pParent->Lower()); + SwFootnoteFrame *pFootnote = static_cast<SwFootnoteFrame*>(pParent->Lower()); if ( pFootnote ) { @@ -1241,15 +1241,15 @@ void SwFootnoteBossFrm::InsertFootnote( SwFootnoteFrm* pNew ) { // Based on the first footnote below the Parent, search for the first footnote whose // index is after the index of the newly inserted, to place the new one correctly - pSibling = static_cast<SwFootnoteFrm*>(pParent->Lower()); + pSibling = static_cast<SwFootnoteFrame*>(pParent->Lower()); if ( !pSibling ) { OSL_ENSURE( false, "Could not find space for footnote."); return; } nCmpPos = ::lcl_FindFootnotePos( pDoc, pSibling->GetAttr() ); - SwFootnoteBossFrm *pNxtB; // remember the last one to not - SwFootnoteFrm *pLastSib = nullptr; // go too far. + SwFootnoteBossFrame *pNxtB; // remember the last one to not + SwFootnoteFrame *pLastSib = nullptr; // go too far. while ( pSibling && nCmpPos <= nStPos ) { @@ -1261,30 +1261,30 @@ void SwFootnoteBossFrm::InsertFootnote( SwFootnoteFrm* pNew ) if ( pSibling->GetNext() ) { - pSibling = static_cast<SwFootnoteFrm*>(pSibling->GetNext()); + pSibling = static_cast<SwFootnoteFrame*>(pSibling->GetNext()); OSL_ENSURE( !pSibling->GetMaster() || ( ENDNOTE > nStPos && pSibling->GetAttr()->GetFootnote().IsEndNote() ), "InsertFootnote: Master expected I" ); } else { - pNxtB = pSibling->FindFootnoteBossFrm(); - SwPageFrm *pSibPage = pNxtB->FindPageFrm(); + pNxtB = pSibling->FindFootnoteBossFrame(); + SwPageFrame *pSibPage = pNxtB->FindPageFrame(); bool bEndNote = pSibPage->IsEndNotePage(); bool bChgPage = lcl_NextFootnoteBoss( pNxtB, pSibPage, bDontLeave ); // When changing pages, also the endnote flag must match. - SwFootnoteContFrm *pCont = pNxtB && ( !bChgPage || + SwFootnoteContFrame *pCont = pNxtB && ( !bChgPage || pSibPage->IsEndNotePage() == bEndNote ) ? pNxtB->FindNearestFootnoteCont( bDontLeave ) : nullptr; if( pCont ) - pSibling = static_cast<SwFootnoteFrm*>(pCont->Lower()); + pSibling = static_cast<SwFootnoteFrame*>(pCont->Lower()); else // no further FootnoteContainer, insert after pSibling break; } if ( pSibling ) { nCmpPos = ::lcl_FindFootnotePos( pDoc, pSibling->GetAttr() ); - OSL_ENSURE( nCmpPos > nLastPos, "InsertFootnote: Order of FootnoteFrm's buggy" ); + OSL_ENSURE( nCmpPos > nLastPos, "InsertFootnote: Order of FootnoteFrame's buggy" ); } } // pLastSib is the last footnote before the new one and @@ -1311,12 +1311,12 @@ void SwFootnoteBossFrm::InsertFootnote( SwFootnoteFrm* pNew ) { // First footnote of the column/page found. Now search from there for the first one on the // same column/page whose index is after the given one. The last one found is the predecessor. - SwFootnoteBossFrm* pBoss = pNew->GetRef()->FindFootnoteBossFrm( + SwFootnoteBossFrame* pBoss = pNew->GetRef()->FindFootnoteBossFrame( !pNew->GetAttr()->GetFootnote().IsEndNote() ); sal_uInt16 nRefNum = pBoss->GetPhyPageNum(); // page number of the new footnote sal_uInt16 nRefCol = lcl_ColumnNum( pBoss ); // column number of the new footnote bool bEnd = false; - SwFootnoteFrm *pLastSib = nullptr; + SwFootnoteFrame *pLastSib = nullptr; while ( pSibling && !bEnd && (nCmpPos <= nStPos) ) { pLastSib = pSibling; @@ -1325,10 +1325,10 @@ void SwFootnoteBossFrm::InsertFootnote( SwFootnoteFrm* pNew ) while ( pSibling->GetFollow() ) pSibling = pSibling->GetFollow(); - SwFootnoteFrm *pFoll = static_cast<SwFootnoteFrm*>(pSibling->GetNext()); + SwFootnoteFrame *pFoll = static_cast<SwFootnoteFrame*>(pSibling->GetNext()); if ( pFoll ) { - pBoss = pSibling->GetRef()->FindFootnoteBossFrm( !pSibling-> + pBoss = pSibling->GetRef()->FindFootnoteBossFrame( !pSibling-> GetAttr()->GetFootnote().IsEndNote() ); sal_uInt16 nTmpRef; if( nStPos >= ENDNOTE || @@ -1340,16 +1340,16 @@ void SwFootnoteBossFrm::InsertFootnote( SwFootnoteFrm* pNew ) } else { - SwFootnoteBossFrm* pNxtB = pSibling->FindFootnoteBossFrm(); - SwPageFrm *pSibPage = pNxtB->FindPageFrm(); + SwFootnoteBossFrame* pNxtB = pSibling->FindFootnoteBossFrame(); + SwPageFrame *pSibPage = pNxtB->FindPageFrame(); bool bEndNote = pSibPage->IsEndNotePage(); bool bChgPage = lcl_NextFootnoteBoss( pNxtB, pSibPage, bDontLeave ); // When changing pages, also the endnote flag must match. - SwFootnoteContFrm *pCont = pNxtB && ( !bChgPage || + SwFootnoteContFrame *pCont = pNxtB && ( !bChgPage || pSibPage->IsEndNotePage() == bEndNote ) ? pNxtB->FindNearestFootnoteCont( bDontLeave ) : nullptr; if ( pCont ) - pSibling = static_cast<SwFootnoteFrm*>(pCont->Lower()); + pSibling = static_cast<SwFootnoteFrame*>(pCont->Lower()); else bEnd = true; } @@ -1373,8 +1373,8 @@ void SwFootnoteBossFrm::InsertFootnote( SwFootnoteFrm* pNew ) { while ( pSibling->GetFollow() ) pSibling = pSibling->GetFollow(); - pParent = static_cast<SwFootnoteContFrm*>(pSibling->GetUpper()); - pSibling = static_cast<SwFootnoteFrm*>(pSibling->GetNext()); + pParent = static_cast<SwFootnoteContFrame*>(pSibling->GetUpper()); + pSibling = static_cast<SwFootnoteFrame*>(pSibling->GetNext()); } else { @@ -1388,14 +1388,14 @@ void SwFootnoteBossFrm::InsertFootnote( SwFootnoteFrm* pNew ) while ( pSibling->GetMaster() ); } } - pParent = static_cast<SwFootnoteContFrm*>(pSibling->GetUpper()); + pParent = static_cast<SwFootnoteContFrame*>(pSibling->GetUpper()); } } OSL_ENSURE( pParent, "paste in space?" ); pNew->Paste( pParent, pSibling ); } -void SwFootnoteBossFrm::AppendFootnote( SwContentFrm *pRef, SwTextFootnote *pAttr ) +void SwFootnoteBossFrame::AppendFootnote( SwContentFrame *pRef, SwTextFootnote *pAttr ) { // If the footnote already exists, do nothing. if ( FindFootnote( pRef, pAttr ) ) @@ -1407,30 +1407,30 @@ void SwFootnoteBossFrm::AppendFootnote( SwContentFrm *pRef, SwTextFootnote *pAtt // If it is an Endnote, we need to search for or create an // Endnote page. SwDoc *pDoc = GetFormat()->GetDoc(); - SwFootnoteBossFrm *pBoss = this; - SwPageFrm *pPage = FindPageFrm(); - SwPageFrm *pMyPage = pPage; + SwFootnoteBossFrame *pBoss = this; + SwPageFrame *pPage = FindPageFrame(); + SwPageFrame *pMyPage = pPage; bool bChgPage = false; bool bEnd = false; if ( pAttr->GetFootnote().IsEndNote() ) { bEnd = true; - if( GetUpper()->IsSctFrm() && - static_cast<SwSectionFrm*>(GetUpper())->IsEndnAtEnd() ) + if( GetUpper()->IsSctFrame() && + static_cast<SwSectionFrame*>(GetUpper())->IsEndnAtEnd() ) { - SwFrm* pLast = - static_cast<SwSectionFrm*>(GetUpper())->FindLastContent( FINDMODE_ENDNOTE ); + SwFrame* pLast = + static_cast<SwSectionFrame*>(GetUpper())->FindLastContent( FINDMODE_ENDNOTE ); if( pLast ) { - pBoss = pLast->FindFootnoteBossFrm(); - pPage = pBoss->FindPageFrm(); + pBoss = pLast->FindFootnoteBossFrame(); + pPage = pBoss->FindPageFrame(); } } else { while ( pPage->GetNext() && !pPage->IsEndNotePage() ) { - pPage = static_cast<SwPageFrm*>(pPage->GetNext()); + pPage = static_cast<SwPageFrame*>(pPage->GetNext()); bChgPage = true; } if ( !pPage->IsEndNotePage() ) @@ -1446,19 +1446,19 @@ void SwFootnoteBossFrm::AppendFootnote( SwContentFrm *pRef, SwTextFootnote *pAtt // At least we can search the approximately correct page. // To ensure to be finished in finite time even if hundreds // of footnotes exist - SwPageFrm *pNxt = static_cast<SwPageFrm*>(pPage->GetNext()); + SwPageFrame *pNxt = static_cast<SwPageFrame*>(pPage->GetNext()); const sal_uLong nStPos = ::lcl_FindFootnotePos( pDoc, pAttr ); while ( pNxt && pNxt->IsEndNotePage() ) { - SwFootnoteContFrm *pCont = pNxt->FindFootnoteCont(); + SwFootnoteContFrame *pCont = pNxt->FindFootnoteCont(); if ( pCont && pCont->Lower() ) { - OSL_ENSURE( pCont->Lower()->IsFootnoteFrm(), "no footnote in the container" ); + OSL_ENSURE( pCont->Lower()->IsFootnoteFrame(), "no footnote in the container" ); if ( nStPos > ::lcl_FindFootnotePos( pDoc, - static_cast<SwFootnoteFrm*>(pCont->Lower())->GetAttr())) + static_cast<SwFootnoteFrame*>(pCont->Lower())->GetAttr())) { pPage = pNxt; - pNxt = static_cast<SwPageFrm*>(pPage->GetNext()); + pNxt = static_cast<SwPageFrame*>(pPage->GetNext()); continue; } } @@ -1468,12 +1468,12 @@ void SwFootnoteBossFrm::AppendFootnote( SwContentFrm *pRef, SwTextFootnote *pAtt } } else if( FTNPOS_CHAPTER == pDoc->GetFootnoteInfo().ePos && ( !GetUpper()-> - IsSctFrm() || !static_cast<SwSectionFrm*>(GetUpper())->IsFootnoteAtEnd() ) ) + IsSctFrame() || !static_cast<SwSectionFrame*>(GetUpper())->IsFootnoteAtEnd() ) ) { while ( pPage->GetNext() && !pPage->IsFootnotePage() && - !static_cast<SwPageFrm*>(pPage->GetNext())->IsEndNotePage() ) + !static_cast<SwPageFrame*>(pPage->GetNext())->IsEndNotePage() ) { - pPage = static_cast<SwPageFrm*>(pPage->GetNext()); + pPage = static_cast<SwPageFrame*>(pPage->GetNext()); bChgPage = true; } @@ -1489,19 +1489,19 @@ void SwFootnoteBossFrm::AppendFootnote( SwContentFrm *pRef, SwTextFootnote *pAtt // We can at least search the approximately correct page // to ensure that we will finish in finite time even if // hundreds of footnotes exist. - SwPageFrm *pNxt = static_cast<SwPageFrm*>(pPage->GetNext()); + SwPageFrame *pNxt = static_cast<SwPageFrame*>(pPage->GetNext()); const sal_uLong nStPos = ::lcl_FindFootnotePos( pDoc, pAttr ); while ( pNxt && pNxt->IsFootnotePage() && !pNxt->IsEndNotePage() ) { - SwFootnoteContFrm *pCont = pNxt->FindFootnoteCont(); + SwFootnoteContFrame *pCont = pNxt->FindFootnoteCont(); if ( pCont && pCont->Lower() ) { - OSL_ENSURE( pCont->Lower()->IsFootnoteFrm(), "no footnote in the container" ); + OSL_ENSURE( pCont->Lower()->IsFootnoteFrame(), "no footnote in the container" ); if ( nStPos > ::lcl_FindFootnotePos( pDoc, - static_cast<SwFootnoteFrm*>(pCont->Lower())->GetAttr())) + static_cast<SwFootnoteFrame*>(pCont->Lower())->GetAttr())) { pPage = pNxt; - pNxt = static_cast<SwPageFrm*>(pPage->GetNext()); + pNxt = static_cast<SwPageFrame*>(pPage->GetNext()); continue; } } @@ -1519,25 +1519,25 @@ void SwFootnoteBossFrm::AppendFootnote( SwContentFrm *pRef, SwTextFootnote *pAtt // If there is already a footnote content on the column/page, // another one cannot be created in a column area. - if( pBoss->IsInSct() && pBoss->IsColumnFrm() && !pPage->IsFootnotePage() ) + if( pBoss->IsInSct() && pBoss->IsColumnFrame() && !pPage->IsFootnotePage() ) { - SwSectionFrm* pSct = pBoss->FindSctFrm(); + SwSectionFrame* pSct = pBoss->FindSctFrame(); if( bEnd ? !pSct->IsEndnAtEnd() : !pSct->IsFootnoteAtEnd() ) { - SwFootnoteContFrm* pFootnoteCont = pSct->FindFootnoteBossFrm(!bEnd)->FindFootnoteCont(); + SwFootnoteContFrame* pFootnoteCont = pSct->FindFootnoteBossFrame(!bEnd)->FindFootnoteCont(); if( pFootnoteCont ) { - SwFootnoteFrm* pTmp = static_cast<SwFootnoteFrm*>(pFootnoteCont->Lower()); + SwFootnoteFrame* pTmp = static_cast<SwFootnoteFrame*>(pFootnoteCont->Lower()); if( bEnd ) while( pTmp && !pTmp->GetAttr()->GetFootnote().IsEndNote() ) - pTmp = static_cast<SwFootnoteFrm*>(pTmp->GetNext()); + pTmp = static_cast<SwFootnoteFrame*>(pTmp->GetNext()); if( pTmp && *pTmp < pAttr ) return; } } } - SwFootnoteFrm *pNew = new SwFootnoteFrm( pDoc->GetDfltFrameFormat(), this, pRef, pAttr ); + SwFootnoteFrame *pNew = new SwFootnoteFrame( pDoc->GetDfltFrameFormat(), this, pRef, pAttr ); { SwNodeIndex aIdx( *pAttr->GetStartNode(), 1 ); ::_InsertCnt( pNew, pDoc, aIdx.GetIndex() ); @@ -1546,18 +1546,18 @@ void SwFootnoteBossFrm::AppendFootnote( SwContentFrm *pRef, SwTextFootnote *pAtt // we need to place ourselves in the first column if( bChgPage ) { - SwLayoutFrm* pBody = pPage->FindBodyCont(); + SwLayoutFrame* pBody = pPage->FindBodyCont(); OSL_ENSURE( pBody, "AppendFootnote: NoPageBody?" ); - if( pBody->Lower() && pBody->Lower()->IsColumnFrm() ) - pBoss = static_cast<SwFootnoteBossFrm*>(pBody->Lower()); + if( pBody->Lower() && pBody->Lower()->IsColumnFrame() ) + pBoss = static_cast<SwFootnoteBossFrame*>(pBody->Lower()); else pBoss = pPage; // page if no columns exist } pBoss->InsertFootnote( pNew ); if ( pNew->GetUpper() ) // inserted or not? { - ::RegistFlys( pNew->FindPageFrm(), pNew ); - SwSectionFrm* pSect = FindSctFrm(); + ::RegistFlys( pNew->FindPageFrame(), pNew ); + SwSectionFrame* pSect = FindSctFrame(); // The content of a FootnoteContainer in a (column) section only need to be calculated // if the section stretches already to the bottom edge of the Upper. if( pSect && !pSect->IsJoinLocked() && ( bEnd ? !pSect->IsEndnAtEnd() : @@ -1567,19 +1567,19 @@ void SwFootnoteBossFrm::AppendFootnote( SwContentFrm *pRef, SwTextFootnote *pAtt { // #i49383# - disable unlock of position of // lower objects during format of footnote content. - const bool bOldFootnoteFrmLocked( pNew->IsColLocked() ); + const bool bOldFootnoteFrameLocked( pNew->IsColLocked() ); pNew->ColLock(); pNew->KeepLockPosOfLowerObjs(); // #i57914# - adjust fix #i49383# - SwContentFrm *pCnt = pNew->ContainsContent(); - while ( pCnt && pCnt->FindFootnoteFrm()->GetAttr() == pAttr ) + SwContentFrame *pCnt = pNew->ContainsContent(); + while ( pCnt && pCnt->FindFootnoteFrame()->GetAttr() == pAttr ) { - pCnt->Calc(getRootFrm()->GetCurrShell()->GetOut()); + pCnt->Calc(getRootFrame()->GetCurrShell()->GetOut()); // #i49383# - format anchored objects - if ( pCnt->IsTextFrm() && pCnt->IsValid() ) + if ( pCnt->IsTextFrame() && pCnt->IsValid() ) { - if ( !SwObjectFormatter::FormatObjsAtFrm( *pCnt, - *(pCnt->FindPageFrm()) ) ) + if ( !SwObjectFormatter::FormatObjsAtFrame( *pCnt, + *(pCnt->FindPageFrame()) ) ) { // restart format with first content pCnt = pNew->ContainsContent(); @@ -1589,29 +1589,29 @@ void SwFootnoteBossFrm::AppendFootnote( SwContentFrm *pRef, SwTextFootnote *pAtt pCnt = pCnt->FindNextCnt(); } // #i49383# - if ( !bOldFootnoteFrmLocked ) + if ( !bOldFootnoteFrameLocked ) { pNew->ColUnlock(); } // #i57914# - adjust fix #i49383# // enable lock of lower object position before format of footnote frame. pNew->UnlockPosOfLowerObjs(); - pNew->Calc(getRootFrm()->GetCurrShell()->GetOut()); + pNew->Calc(getRootFrame()->GetCurrShell()->GetOut()); // #i57914# - adjust fix #i49383# - if ( !bOldFootnoteFrmLocked && !pNew->GetLower() && + if ( !bOldFootnoteFrameLocked && !pNew->GetLower() && !pNew->IsColLocked() && !pNew->IsBackMoveLocked() ) { pNew->Cut(); - SwFrm::DestroyFrm(pNew); + SwFrame::DestroyFrame(pNew); } } pMyPage->UpdateFootnoteNum(); } else - SwFrm::DestroyFrm(pNew); + SwFrame::DestroyFrame(pNew); } -SwFootnoteFrm *SwFootnoteBossFrm::FindFootnote( const SwContentFrm *pRef, const SwTextFootnote *pAttr ) +SwFootnoteFrame *SwFootnoteBossFrame::FindFootnote( const SwContentFrame *pRef, const SwTextFootnote *pAttr ) { // the easiest and savest way goes via the attribute OSL_ENSURE( pAttr->GetStartNode(), "FootnoteAtr without StartNode." ); @@ -1622,17 +1622,17 @@ SwFootnoteFrm *SwFootnoteBossFrm::FindFootnote( const SwContentFrm *pRef, const GetNodes().GoNextSection( &aIdx, true, false ); if ( !pNd ) return nullptr; - SwIterator<SwFrm,SwContentNode> aIter( *pNd ); - SwFrm* pFrm = aIter.First(); - if( pFrm ) + SwIterator<SwFrame,SwContentNode> aIter( *pNd ); + SwFrame* pFrame = aIter.First(); + if( pFrame ) do { - pFrm = pFrm->GetUpper(); + pFrame = pFrame->GetUpper(); // #i28500#, #i27243# Due to the endnode collector, there are - // SwFootnoteFrms, which are not in the layout. Therefore the - // bInfFootnote flags are not set correctly, and a cell of FindFootnoteFrm - // would return 0. Therefore we better call ImplFindFootnoteFrm(). - SwFootnoteFrm *pFootnote = pFrm->ImplFindFootnoteFrm(); + // SwFootnoteFrames, which are not in the layout. Therefore the + // bInfFootnote flags are not set correctly, and a cell of FindFootnoteFrame + // would return 0. Therefore we better call ImplFindFootnoteFrame(). + SwFootnoteFrame *pFootnote = pFrame->ImplFindFootnoteFrame(); if ( pFootnote && pFootnote->GetRef() == pRef ) { // The following condition becomes true, if the whole @@ -1646,39 +1646,39 @@ SwFootnoteFrm *SwFootnoteBossFrm::FindFootnote( const SwContentFrm *pRef, const return pFootnote; } - } while ( nullptr != (pFrm = aIter.Next()) ); + } while ( nullptr != (pFrame = aIter.Next()) ); return nullptr; } -void SwFootnoteBossFrm::RemoveFootnote( const SwContentFrm *pRef, const SwTextFootnote *pAttr, +void SwFootnoteBossFrame::RemoveFootnote( const SwContentFrame *pRef, const SwTextFootnote *pAttr, bool bPrep ) { - SwFootnoteFrm *pFootnote = FindFootnote( pRef, pAttr ); + SwFootnoteFrame *pFootnote = FindFootnote( pRef, pAttr ); if( pFootnote ) { do { - SwFootnoteFrm *pFoll = pFootnote->GetFollow(); + SwFootnoteFrame *pFoll = pFootnote->GetFollow(); pFootnote->Cut(); - SwFrm::DestroyFrm(pFootnote); + SwFrame::DestroyFrame(pFootnote); pFootnote = pFoll; } while ( pFootnote ); if( bPrep && pRef->IsFollow() ) { - OSL_ENSURE( pRef->IsTextFrm(), "NoTextFrm has Footnote?" ); - SwTextFrm* pMaster = pRef->FindMaster(); + OSL_ENSURE( pRef->IsTextFrame(), "NoTextFrame has Footnote?" ); + SwTextFrame* pMaster = pRef->FindMaster(); if( !pMaster->IsLocked() ) pMaster->Prepare( PREP_FTN_GONE ); } } - FindPageFrm()->UpdateFootnoteNum(); + FindPageFrame()->UpdateFootnoteNum(); } -void SwFootnoteBossFrm::ChangeFootnoteRef( const SwContentFrm *pOld, const SwTextFootnote *pAttr, - SwContentFrm *pNew ) +void SwFootnoteBossFrame::ChangeFootnoteRef( const SwContentFrame *pOld, const SwTextFootnote *pAttr, + SwContentFrame *pNew ) { - SwFootnoteFrm *pFootnote = FindFootnote( pOld, pAttr ); + SwFootnoteFrame *pFootnote = FindFootnote( pOld, pAttr ); while ( pFootnote ) { pFootnote->SetRef( pNew ); @@ -1689,31 +1689,31 @@ void SwFootnoteBossFrm::ChangeFootnoteRef( const SwContentFrm *pOld, const SwTex /// OD 03.04.2003 #108446# - add parameter <_bCollectOnlyPreviousFootnotes> in /// order to control, if only footnotes, which are positioned before the /// footnote boss frame <this> have to be collected. -void SwFootnoteBossFrm::CollectFootnotes( const SwContentFrm* _pRef, - SwFootnoteBossFrm* _pOld, - SwFootnoteFrms& _rFootnoteArr, +void SwFootnoteBossFrame::CollectFootnotes( const SwContentFrame* _pRef, + SwFootnoteBossFrame* _pOld, + SwFootnoteFrames& _rFootnoteArr, const bool _bCollectOnlyPreviousFootnotes ) { - SwFootnoteFrm *pFootnote = _pOld->FindFirstFootnote(); + SwFootnoteFrame *pFootnote = _pOld->FindFirstFootnote(); while( !pFootnote ) { - if( _pOld->IsColumnFrm() ) + if( _pOld->IsColumnFrame() ) { // visit columns while ( !pFootnote && _pOld->GetPrev() ) { // Still no problem if no footnote was found yet. The loop is needed to pick up // following rows in tables. In all other cases it might correct bad contexts. - _pOld = static_cast<SwFootnoteBossFrm*>(_pOld->GetPrev()); + _pOld = static_cast<SwFootnoteBossFrame*>(_pOld->GetPrev()); pFootnote = _pOld->FindFirstFootnote(); } } if( !pFootnote ) { // previous page - SwPageFrm* pPg; - for ( SwFrm* pTmp = _pOld; - nullptr != ( pPg = static_cast<SwPageFrm*>(pTmp->FindPageFrm()->GetPrev())) + SwPageFrame* pPg; + for ( SwFrame* pTmp = _pOld; + nullptr != ( pPg = static_cast<SwPageFrame*>(pTmp->FindPageFrame()->GetPrev())) && pPg->IsEmptyPage() ; ) { @@ -1722,11 +1722,11 @@ void SwFootnoteBossFrm::CollectFootnotes( const SwContentFrm* _pRef, if( !pPg ) return; - SwLayoutFrm* pBody = pPg->FindBodyCont(); - if( pBody->Lower() && pBody->Lower()->IsColumnFrm() ) + SwLayoutFrame* pBody = pPg->FindBodyCont(); + if( pBody->Lower() && pBody->Lower()->IsColumnFrame() ) { // multiple columns on one page => search last column - _pOld = static_cast<SwFootnoteBossFrm*>(pBody->GetLastLower()); + _pOld = static_cast<SwFootnoteBossFrame*>(pBody->GetLastLower()); } else _pOld = pPg; // single column page @@ -1734,37 +1734,37 @@ void SwFootnoteBossFrm::CollectFootnotes( const SwContentFrm* _pRef, } } // OD 03.04.2003 #108446# - consider new parameter <_bCollectOnlyPreviousFootnotes> - SwFootnoteBossFrm* pRefBossFrm = nullptr; + SwFootnoteBossFrame* pRefBossFrame = nullptr; if ( _bCollectOnlyPreviousFootnotes ) { - pRefBossFrm = this; + pRefBossFrame = this; } - _CollectFootnotes( _pRef, pFootnote, _rFootnoteArr, _bCollectOnlyPreviousFootnotes, pRefBossFrm ); + _CollectFootnotes( _pRef, pFootnote, _rFootnoteArr, _bCollectOnlyPreviousFootnotes, pRefBossFrame ); } -inline void FootnoteInArr( SwFootnoteFrms& rFootnoteArr, SwFootnoteFrm* pFootnote ) +inline void FootnoteInArr( SwFootnoteFrames& rFootnoteArr, SwFootnoteFrame* pFootnote ) { if ( rFootnoteArr.end() == std::find( rFootnoteArr.begin(), rFootnoteArr.end(), pFootnote ) ) rFootnoteArr.push_back( pFootnote ); } /// OD 03.04.2003 #108446# - add parameters <_bCollectOnlyPreviousFootnotes> and -/// <_pRefFootnoteBossFrm> in order to control, if only footnotes, which are positioned +/// <_pRefFootnoteBossFrame> in order to control, if only footnotes, which are positioned /// before the given reference footnote boss frame have to be collected. /// Note: if parameter <_bCollectOnlyPreviousFootnotes> is true, then parameter -/// <_pRefFootnoteBossFrm> have to be referenced to an object. +/// <_pRefFootnoteBossFrame> have to be referenced to an object. /// Adjust parameter names. -void SwFootnoteBossFrm::_CollectFootnotes( const SwContentFrm* _pRef, - SwFootnoteFrm* _pFootnote, - SwFootnoteFrms& _rFootnoteArr, +void SwFootnoteBossFrame::_CollectFootnotes( const SwContentFrame* _pRef, + SwFootnoteFrame* _pFootnote, + SwFootnoteFrames& _rFootnoteArr, bool _bCollectOnlyPreviousFootnotes, - const SwFootnoteBossFrm* _pRefFootnoteBossFrm) + const SwFootnoteBossFrame* _pRefFootnoteBossFrame) { // OD 03.04.2003 #108446# - assert, that no reference footnote boss frame // is set, in spite of the order, that only previous footnotes has to be // collected. - OSL_ENSURE( !_bCollectOnlyPreviousFootnotes || _pRefFootnoteBossFrm, - "<SwFootnoteBossFrm::_CollectFootnotes(..)> - No reference footnote boss frame for collecting only previous footnotes set.\nCrash will be caused!" ); + OSL_ENSURE( !_bCollectOnlyPreviousFootnotes || _pRefFootnoteBossFrame, + "<SwFootnoteBossFrame::_CollectFootnotes(..)> - No reference footnote boss frame for collecting only previous footnotes set.\nCrash will be caused!" ); // Collect all footnotes referenced by pRef (attribute by attribute), combine them // (the content might be divided over multiple pages) and cut them. @@ -1772,7 +1772,7 @@ void SwFootnoteBossFrm::_CollectFootnotes( const SwContentFrm* _pRef, // For robustness, we do not log the corresponding footnotes here. If a footnote // is touched twice, there might be a crash. This allows this function here to // also handle corrupt layouts in some degrees (without loops or even crashes). - SwFootnoteFrms aNotFootnoteArr; + SwFootnoteFrames aNotFootnoteArr; // here we have a footnote placed in front of the first one of the reference OSL_ENSURE( !_pFootnote->GetMaster() || _pFootnote->GetRef() != _pRef, "move FollowFootnote?" ); @@ -1785,24 +1785,24 @@ void SwFootnoteBossFrm::_CollectFootnotes( const SwContentFrm* _pRef, { // Search for the next footnote in this column/page so that // we do not start from zero again after cutting one footnote. - SwFootnoteFrm *pNxtFootnote = _pFootnote; + SwFootnoteFrame *pNxtFootnote = _pFootnote; while ( pNxtFootnote->GetFollow() ) pNxtFootnote = pNxtFootnote->GetFollow(); - pNxtFootnote = static_cast<SwFootnoteFrm*>(pNxtFootnote->GetNext()); + pNxtFootnote = static_cast<SwFootnoteFrame*>(pNxtFootnote->GetNext()); if ( !pNxtFootnote ) { - SwFootnoteBossFrm* pBoss = _pFootnote->FindFootnoteBossFrm(); - SwPageFrm* pPage = pBoss->FindPageFrm(); + SwFootnoteBossFrame* pBoss = _pFootnote->FindFootnoteBossFrame(); + SwPageFrame* pPage = pBoss->FindPageFrame(); do { lcl_NextFootnoteBoss( pBoss, pPage, false ); if( pBoss ) { - SwLayoutFrm* pCont = pBoss->FindFootnoteCont(); + SwLayoutFrame* pCont = pBoss->FindFootnoteCont(); if( pCont ) { - pNxtFootnote = static_cast<SwFootnoteFrm*>(pCont->Lower()); + pNxtFootnote = static_cast<SwFootnoteFrame*>(pCont->Lower()); if( pNxtFootnote ) { while( pNxtFootnote->GetMaster() ) @@ -1831,11 +1831,11 @@ void SwFootnoteBossFrm::_CollectFootnotes( const SwContentFrm* _pRef, { if ( _bCollectOnlyPreviousFootnotes ) { - SwFootnoteBossFrm* pBossOfFoundFootnote = _pFootnote->FindFootnoteBossFrm( true ); + SwFootnoteBossFrame* pBossOfFoundFootnote = _pFootnote->FindFootnoteBossFrame( true ); OSL_ENSURE( pBossOfFoundFootnote, - "<SwFootnoteBossFrm::_CollectFootnotes(..)> - footnote boss frame of found footnote frame missing.\nWrong layout!" ); + "<SwFootnoteBossFrame::_CollectFootnotes(..)> - footnote boss frame of found footnote frame missing.\nWrong layout!" ); if ( !pBossOfFoundFootnote || // don't crash, if no footnote boss is found. - pBossOfFoundFootnote->IsBefore( _pRefFootnoteBossFrm ) + pBossOfFoundFootnote->IsBefore( _pRefFootnoteBossFrame ) ) { bCollectFoundFootnote = true; @@ -1850,15 +1850,15 @@ void SwFootnoteBossFrm::_CollectFootnotes( const SwContentFrm* _pRef, if ( bCollectFoundFootnote ) { OSL_ENSURE( !_pFootnote->GetMaster(), "move FollowFootnote?" ); - SwFootnoteFrm *pNxt = _pFootnote->GetFollow(); + SwFootnoteFrame *pNxt = _pFootnote->GetFollow(); while ( pNxt ) { - SwFrm *pCnt = pNxt->ContainsAny(); + SwFrame *pCnt = pNxt->ContainsAny(); if ( pCnt ) { // destroy the follow on the way as it is empty do - { SwFrm *pNxtCnt = pCnt->GetNext(); + { SwFrame *pNxtCnt = pCnt->GetNext(); pCnt->Cut(); pCnt->Paste( _pFootnote ); pCnt = pNxtCnt; @@ -1868,7 +1868,7 @@ void SwFootnoteBossFrm::_CollectFootnotes( const SwContentFrm* _pRef, { OSL_ENSURE( !pNxt, "footnote without content?" ); pNxt->Cut(); - SwFrm::DestroyFrm(pNxt); + SwFrame::DestroyFrame(pNxt); } pNxt = _pFootnote->GetFollow(); } @@ -1892,25 +1892,25 @@ void SwFootnoteBossFrm::_CollectFootnotes( const SwContentFrm* _pRef, while ( _pFootnote ); } -void SwFootnoteBossFrm::_MoveFootnotes( SwFootnoteFrms &rFootnoteArr, bool bCalc ) +void SwFootnoteBossFrame::_MoveFootnotes( SwFootnoteFrames &rFootnoteArr, bool bCalc ) { // All footnotes referenced by pRef need to be moved // to a new position (based on the new column/page) - const sal_uInt16 nMyNum = FindPageFrm()->GetPhyPageNum(); + const sal_uInt16 nMyNum = FindPageFrame()->GetPhyPageNum(); const sal_uInt16 nMyCol = lcl_ColumnNum( this ); SWRECTFN( this ) // #i21478# - keep last inserted footnote in order to // format the content of the following one. - SwFootnoteFrm* pLastInsertedFootnote = nullptr; + SwFootnoteFrame* pLastInsertedFootnote = nullptr; for ( size_t i = 0; i < rFootnoteArr.size(); ++i ) { - SwFootnoteFrm *pFootnote = rFootnoteArr[i]; + SwFootnoteFrame *pFootnote = rFootnoteArr[i]; - SwFootnoteBossFrm* pRefBoss = pFootnote->GetRef()->FindFootnoteBossFrm( true ); + SwFootnoteBossFrame* pRefBoss = pFootnote->GetRef()->FindFootnoteBossFrame( true ); if( pRefBoss != this ) { - const sal_uInt16 nRefNum = pRefBoss->FindPageFrm()->GetPhyPageNum(); + const sal_uInt16 nRefNum = pRefBoss->FindPageFrame()->GetPhyPageNum(); const sal_uInt16 nRefCol = lcl_ColumnNum( this ); if( nRefNum < nMyNum || ( nRefNum == nMyNum && nRefCol <= nMyCol ) ) pRefBoss = this; @@ -1922,30 +1922,30 @@ void SwFootnoteBossFrm::_MoveFootnotes( SwFootnoteFrms &rFootnoteArr, bool bCalc // First condense the content so that footnote frames that do not fit on the page // do not do too much harm (Loop 66312). So, the footnote content first grows as // soon as the content gets formatted and it is sure that it fits on the page. - SwFrm *pCnt = pFootnote->ContainsAny(); + SwFrame *pCnt = pFootnote->ContainsAny(); while( pCnt ) { - if( pCnt->IsLayoutFrm() ) + if( pCnt->IsLayoutFrame() ) { - SwFrm* pTmp = static_cast<SwLayoutFrm*>(pCnt)->ContainsAny(); - while( pTmp && static_cast<SwLayoutFrm*>(pCnt)->IsAnLower( pTmp ) ) + SwFrame* pTmp = static_cast<SwLayoutFrame*>(pCnt)->ContainsAny(); + while( pTmp && static_cast<SwLayoutFrame*>(pCnt)->IsAnLower( pTmp ) ) { pTmp->Prepare( PREP_MOVEFTN ); - (pTmp->Frm().*fnRect->fnSetHeight)(0); + (pTmp->Frame().*fnRect->fnSetHeight)(0); (pTmp->Prt().*fnRect->fnSetHeight)(0); pTmp = pTmp->FindNext(); } } else pCnt->Prepare( PREP_MOVEFTN ); - (pCnt->Frm().*fnRect->fnSetHeight)(0); + (pCnt->Frame().*fnRect->fnSetHeight)(0); (pCnt->Prt().*fnRect->fnSetHeight)(0); pCnt = pCnt->GetNext(); } - (pFootnote->Frm().*fnRect->fnSetHeight)(0); + (pFootnote->Frame().*fnRect->fnSetHeight)(0); (pFootnote->Prt().*fnRect->fnSetHeight)(0); - pFootnote->Calc(getRootFrm()->GetCurrShell()->GetOut()); - pFootnote->GetUpper()->Calc(getRootFrm()->GetCurrShell()->GetOut()); + pFootnote->Calc(getRootFrame()->GetCurrShell()->GetOut()); + pFootnote->GetUpper()->Calc(getRootFrame()->GetCurrShell()->GetOut()); if( bCalc ) { @@ -1959,25 +1959,25 @@ void SwFootnoteBossFrm::_MoveFootnotes( SwFootnoteFrms &rFootnoteArr, bool bCalc pFootnote->KeepLockPosOfLowerObjs(); // #i57914# - adjust fix #i49383# - while ( pCnt && pCnt->FindFootnoteFrm()->GetAttr() == pAttr ) + while ( pCnt && pCnt->FindFootnoteFrame()->GetAttr() == pAttr ) { pCnt->_InvalidatePos(); - pCnt->Calc(getRootFrm()->GetCurrShell()->GetOut()); + pCnt->Calc(getRootFrame()->GetCurrShell()->GetOut()); // #i49383# - format anchored objects - if ( pCnt->IsTextFrm() && pCnt->IsValid() ) + if ( pCnt->IsTextFrame() && pCnt->IsValid() ) { - if ( !SwObjectFormatter::FormatObjsAtFrm( *pCnt, - *(pCnt->FindPageFrm()) ) ) + if ( !SwObjectFormatter::FormatObjsAtFrame( *pCnt, + *(pCnt->FindPageFrame()) ) ) { // restart format with first content pCnt = pFootnote->ContainsAny(); continue; } } - if( pCnt->IsSctFrm() ) + if( pCnt->IsSctFrame() ) { // If the area is not empty, iterate also over the content - SwFrm* pTmp = static_cast<SwSectionFrm*>(pCnt)->ContainsAny(); + SwFrame* pTmp = static_cast<SwSectionFrame*>(pCnt)->ContainsAny(); if( pTmp ) pCnt = pTmp; else @@ -1992,7 +1992,7 @@ void SwFootnoteBossFrm::_MoveFootnotes( SwFootnoteFrms &rFootnoteArr, bool bCalc if( !pFootnote->ContainsAny() && !pFootnote->IsColLocked() ) { pFootnote->Cut(); - SwFrm::DestroyFrm(pFootnote); + SwFrame::DestroyFrame(pFootnote); // #i21478# pFootnote = nullptr; } @@ -2003,14 +2003,14 @@ void SwFootnoteBossFrm::_MoveFootnotes( SwFootnoteFrms &rFootnoteArr, bool bCalc // #i57914# - adjust fix #i49383# // enable lock of lower object position before format of footnote frame. pFootnote->UnlockPosOfLowerObjs(); - pFootnote->Calc(getRootFrm()->GetCurrShell()->GetOut()); + pFootnote->Calc(getRootFrame()->GetCurrShell()->GetOut()); } } } else { OSL_ENSURE( !pFootnote->GetMaster() && !pFootnote->GetFollow(), "DelFootnote and Master/Follow?" ); - SwFrm::DestroyFrm(pFootnote); + SwFrame::DestroyFrame(pFootnote); // #i21478# pFootnote = nullptr; } @@ -2028,9 +2028,9 @@ void SwFootnoteBossFrm::_MoveFootnotes( SwFootnoteFrms &rFootnoteArr, bool bCalc { if ( pLastInsertedFootnote->GetNext() ) { - SwFootnoteFrm* pNextFootnote = static_cast<SwFootnoteFrm*>(pLastInsertedFootnote->GetNext()); + SwFootnoteFrame* pNextFootnote = static_cast<SwFootnoteFrame*>(pLastInsertedFootnote->GetNext()); SwTextFootnote* pAttr = pNextFootnote->GetAttr(); - SwFrm* pCnt = pNextFootnote->ContainsAny(); + SwFrame* pCnt = pNextFootnote->ContainsAny(); bool bUnlock = !pNextFootnote->IsBackMoveLocked(); pNextFootnote->LockBackMove(); @@ -2039,25 +2039,25 @@ void SwFootnoteBossFrm::_MoveFootnotes( SwFootnoteFrms &rFootnoteArr, bool bCalc pNextFootnote->KeepLockPosOfLowerObjs(); // #i57914# - adjust fix #i49383# - while ( pCnt && pCnt->FindFootnoteFrm()->GetAttr() == pAttr ) + while ( pCnt && pCnt->FindFootnoteFrame()->GetAttr() == pAttr ) { pCnt->_InvalidatePos(); - pCnt->Calc(getRootFrm()->GetCurrShell()->GetOut()); + pCnt->Calc(getRootFrame()->GetCurrShell()->GetOut()); // #i49383# - format anchored objects - if ( pCnt->IsTextFrm() && pCnt->IsValid() ) + if ( pCnt->IsTextFrame() && pCnt->IsValid() ) { - if ( !SwObjectFormatter::FormatObjsAtFrm( *pCnt, - *(pCnt->FindPageFrm()) ) ) + if ( !SwObjectFormatter::FormatObjsAtFrame( *pCnt, + *(pCnt->FindPageFrame()) ) ) { // restart format with first content pCnt = pNextFootnote->ContainsAny(); continue; } } - if( pCnt->IsSctFrm() ) + if( pCnt->IsSctFrame() ) { // If the area is not empty, iterate also over the content - SwFrm* pTmp = static_cast<SwSectionFrm*>(pCnt)->ContainsAny(); + SwFrame* pTmp = static_cast<SwSectionFrame*>(pCnt)->ContainsAny(); if( pTmp ) pCnt = pTmp; else @@ -2074,37 +2074,37 @@ void SwFootnoteBossFrm::_MoveFootnotes( SwFootnoteFrms &rFootnoteArr, bool bCalc // #i57914# - adjust fix #i49383# // enable lock of lower object position before format of footnote frame. pNextFootnote->UnlockPosOfLowerObjs(); - pNextFootnote->Calc(getRootFrm()->GetCurrShell()->GetOut()); + pNextFootnote->Calc(getRootFrame()->GetCurrShell()->GetOut()); } } } -void SwFootnoteBossFrm::MoveFootnotes( const SwContentFrm *pSrc, SwContentFrm *pDest, +void SwFootnoteBossFrame::MoveFootnotes( const SwContentFrame *pSrc, SwContentFrame *pDest, SwTextFootnote *pAttr ) { if( ( GetFormat()->GetDoc()->GetFootnoteInfo().ePos == FTNPOS_CHAPTER && - (!GetUpper()->IsSctFrm() || !static_cast<SwSectionFrm*>(GetUpper())->IsFootnoteAtEnd())) + (!GetUpper()->IsSctFrame() || !static_cast<SwSectionFrame*>(GetUpper())->IsFootnoteAtEnd())) || pAttr->GetFootnote().IsEndNote() ) return; - OSL_ENSURE( this == pSrc->FindFootnoteBossFrm( true ), - "SwPageFrm::MoveFootnotes: source frame isn't on that FootnoteBoss" ); + OSL_ENSURE( this == pSrc->FindFootnoteBossFrame( true ), + "SwPageFrame::MoveFootnotes: source frame isn't on that FootnoteBoss" ); - SwFootnoteFrm *pFootnote = FindFirstFootnote(); + SwFootnoteFrame *pFootnote = FindFirstFootnote(); if( pFootnote ) { ChangeFootnoteRef( pSrc, pAttr, pDest ); - SwFootnoteBossFrm *pDestBoss = pDest->FindFootnoteBossFrm( true ); - OSL_ENSURE( pDestBoss, "+SwPageFrm::MoveFootnotes: no destination boss" ); + SwFootnoteBossFrame *pDestBoss = pDest->FindFootnoteBossFrame( true ); + OSL_ENSURE( pDestBoss, "+SwPageFrame::MoveFootnotes: no destination boss" ); if( pDestBoss ) // robust { - SwFootnoteFrms aFootnoteArr; - SwFootnoteBossFrm::_CollectFootnotes( pDest, pFootnote, aFootnoteArr ); + SwFootnoteFrames aFootnoteArr; + SwFootnoteBossFrame::_CollectFootnotes( pDest, pFootnote, aFootnoteArr ); if ( !aFootnoteArr.empty() ) { pDestBoss->_MoveFootnotes( aFootnoteArr, true ); - SwPageFrm* pSrcPage = FindPageFrm(); - SwPageFrm* pDestPage = pDestBoss->FindPageFrm(); + SwPageFrame* pSrcPage = FindPageFrame(); + SwPageFrame* pDestPage = pDestBoss->FindPageFrame(); // update FootnoteNum only at page change if( pSrcPage != pDestPage ) { @@ -2117,28 +2117,28 @@ void SwFootnoteBossFrm::MoveFootnotes( const SwContentFrm *pSrc, SwContentFrm *p } } -void SwFootnoteBossFrm::RearrangeFootnotes( const SwTwips nDeadLine, const bool bLock, +void SwFootnoteBossFrame::RearrangeFootnotes( const SwTwips nDeadLine, const bool bLock, const SwTextFootnote *pAttr ) { // Format all footnotes of a column/page so that they might change the column/page. SwSaveFootnoteHeight aSave( this, nDeadLine ); - SwFootnoteFrm *pFootnote = FindFirstFootnote(); + SwFootnoteFrame *pFootnote = FindFirstFootnote(); if( pFootnote && pFootnote->GetPrev() && bLock ) { - SwFootnoteFrm* pFirst = static_cast<SwFootnoteFrm*>(pFootnote->GetUpper()->Lower()); - SwFrm* pContent = pFirst->ContainsAny(); + SwFootnoteFrame* pFirst = static_cast<SwFootnoteFrame*>(pFootnote->GetUpper()->Lower()); + SwFrame* pContent = pFirst->ContainsAny(); if( pContent ) { bool bUnlock = !pFirst->IsBackMoveLocked(); pFirst->LockBackMove(); - pFirst->Calc(getRootFrm()->GetCurrShell()->GetOut()); - pContent->Calc(getRootFrm()->GetCurrShell()->GetOut()); + pFirst->Calc(getRootFrame()->GetCurrShell()->GetOut()); + pContent->Calc(getRootFrame()->GetCurrShell()->GetOut()); // #i49383# - format anchored objects - if ( pContent->IsTextFrm() && pContent->IsValid() ) + if ( pContent->IsTextFrame() && pContent->IsValid() ) { - SwObjectFormatter::FormatObjsAtFrm( *pContent, - *(pContent->FindPageFrm()) ); + SwObjectFormatter::FormatObjsAtFrame( *pContent, + *(pContent->FindPageFrame()) ); } if( bUnlock ) pFirst->UnlockBackMove(); @@ -2147,57 +2147,57 @@ void SwFootnoteBossFrm::RearrangeFootnotes( const SwTwips nDeadLine, const bool } SwDoc *pDoc = GetFormat()->GetDoc(); const sal_uLong nFootnotePos = pAttr ? ::lcl_FindFootnotePos( pDoc, pAttr ) : 0; - SwFrm *pCnt = pFootnote ? pFootnote->ContainsAny() : nullptr; + SwFrame *pCnt = pFootnote ? pFootnote->ContainsAny() : nullptr; if ( pCnt ) { bool bMore = true; bool bStart = pAttr == nullptr; // If no attribute is given, process all // #i49383# - disable unlock of position of // lower objects during format of footnote and footnote content. - SwFootnoteFrm* pLastFootnoteFrm( nullptr ); + SwFootnoteFrame* pLastFootnoteFrame( nullptr ); // footnote frame needs to be locked, if <bLock> isn't set. - bool bUnlockLastFootnoteFrm( false ); + bool bUnlockLastFootnoteFrame( false ); do { if( !bStart ) - bStart = ::lcl_FindFootnotePos( pDoc, pCnt->FindFootnoteFrm()->GetAttr() ) + bStart = ::lcl_FindFootnotePos( pDoc, pCnt->FindFootnoteFrame()->GetAttr() ) == nFootnotePos; if( bStart ) { pCnt->_InvalidatePos(); pCnt->_InvalidateSize(); pCnt->Prepare( PREP_ADJUST_FRM ); - SwFootnoteFrm* pFootnoteFrm = pCnt->FindFootnoteFrm(); + SwFootnoteFrame* pFootnoteFrame = pCnt->FindFootnoteFrame(); // #i49383# - if ( pFootnoteFrm != pLastFootnoteFrm ) + if ( pFootnoteFrame != pLastFootnoteFrame ) { - if ( pLastFootnoteFrm ) + if ( pLastFootnoteFrame ) { - if ( !bLock && bUnlockLastFootnoteFrm ) + if ( !bLock && bUnlockLastFootnoteFrame ) { - pLastFootnoteFrm->ColUnlock(); + pLastFootnoteFrame->ColUnlock(); } // #i57914# - adjust fix #i49383# // enable lock of lower object position before format of footnote frame. - pLastFootnoteFrm->UnlockPosOfLowerObjs(); - pLastFootnoteFrm->Calc(getRootFrm()->GetCurrShell()->GetOut()); - if ( !bLock && bUnlockLastFootnoteFrm && - !pLastFootnoteFrm->GetLower() && - !pLastFootnoteFrm->IsColLocked() && - !pLastFootnoteFrm->IsBackMoveLocked() ) + pLastFootnoteFrame->UnlockPosOfLowerObjs(); + pLastFootnoteFrame->Calc(getRootFrame()->GetCurrShell()->GetOut()); + if ( !bLock && bUnlockLastFootnoteFrame && + !pLastFootnoteFrame->GetLower() && + !pLastFootnoteFrame->IsColLocked() && + !pLastFootnoteFrame->IsBackMoveLocked() ) { - pLastFootnoteFrm->Cut(); - SwFrm::DestroyFrm(pLastFootnoteFrm); - pLastFootnoteFrm = nullptr; + pLastFootnoteFrame->Cut(); + SwFrame::DestroyFrame(pLastFootnoteFrame); + pLastFootnoteFrame = nullptr; } } if ( !bLock ) { - bUnlockLastFootnoteFrm = !pFootnoteFrm->IsColLocked(); - pFootnoteFrm->ColLock(); + bUnlockLastFootnoteFrame = !pFootnoteFrame->IsColLocked(); + pFootnoteFrame->ColLock(); } - pFootnoteFrm->KeepLockPosOfLowerObjs(); - pLastFootnoteFrm = pFootnoteFrm; + pFootnoteFrame->KeepLockPosOfLowerObjs(); + pLastFootnoteFrame = pFootnoteFrame; } // OD 30.10.2002 #97265# - invalidate position of footnote // frame, if it's below its footnote container, in order to @@ -2205,23 +2205,23 @@ void SwFootnoteBossFrm::RearrangeFootnotes( const SwTwips nDeadLine, const bool // footnote frames. { SWRECTFN( this ); - SwFrm* aFootnoteContFrm = pFootnoteFrm->GetUpper(); - if ( (pFootnoteFrm->Frm().*fnRect->fnTopDist)((aFootnoteContFrm->*fnRect->fnGetPrtBottom)()) > 0 ) + SwFrame* aFootnoteContFrame = pFootnoteFrame->GetUpper(); + if ( (pFootnoteFrame->Frame().*fnRect->fnTopDist)((aFootnoteContFrame->*fnRect->fnGetPrtBottom)()) > 0 ) { - pFootnoteFrm->_InvalidatePos(); + pFootnoteFrame->_InvalidatePos(); } } if ( bLock ) { - bool bUnlock = !pFootnoteFrm->IsBackMoveLocked(); - pFootnoteFrm->LockBackMove(); - pFootnoteFrm->Calc(getRootFrm()->GetCurrShell()->GetOut()); - pCnt->Calc(getRootFrm()->GetCurrShell()->GetOut()); + bool bUnlock = !pFootnoteFrame->IsBackMoveLocked(); + pFootnoteFrame->LockBackMove(); + pFootnoteFrame->Calc(getRootFrame()->GetCurrShell()->GetOut()); + pCnt->Calc(getRootFrame()->GetCurrShell()->GetOut()); // #i49383# - format anchored objects - if ( pCnt->IsTextFrm() && pCnt->IsValid() ) + if ( pCnt->IsTextFrame() && pCnt->IsValid() ) { - if ( !SwObjectFormatter::FormatObjsAtFrm( *pCnt, - *(pCnt->FindPageFrm()) ) ) + if ( !SwObjectFormatter::FormatObjsAtFrame( *pCnt, + *(pCnt->FindPageFrame()) ) ) { // restart format with first content pCnt = pFootnote->ContainsAny(); @@ -2230,28 +2230,28 @@ void SwFootnoteBossFrm::RearrangeFootnotes( const SwTwips nDeadLine, const bool } if( bUnlock ) { - pFootnoteFrm->UnlockBackMove(); - if( !pFootnoteFrm->Lower() && - !pFootnoteFrm->IsColLocked() ) + pFootnoteFrame->UnlockBackMove(); + if( !pFootnoteFrame->Lower() && + !pFootnoteFrame->IsColLocked() ) { // #i49383# - OSL_ENSURE( pLastFootnoteFrm == pFootnoteFrm, - "<SwFootnoteBossFrm::RearrangeFootnotes(..)> - <pLastFootnoteFrm> != <pFootnoteFrm>" ); - pLastFootnoteFrm = nullptr; - pFootnoteFrm->Cut(); - SwFrm::DestroyFrm(pFootnoteFrm); + OSL_ENSURE( pLastFootnoteFrame == pFootnoteFrame, + "<SwFootnoteBossFrame::RearrangeFootnotes(..)> - <pLastFootnoteFrame> != <pFootnoteFrame>" ); + pLastFootnoteFrame = nullptr; + pFootnoteFrame->Cut(); + SwFrame::DestroyFrame(pFootnoteFrame); } } } else { - pFootnoteFrm->Calc(getRootFrm()->GetCurrShell()->GetOut()); - pCnt->Calc(getRootFrm()->GetCurrShell()->GetOut()); + pFootnoteFrame->Calc(getRootFrame()->GetCurrShell()->GetOut()); + pCnt->Calc(getRootFrame()->GetCurrShell()->GetOut()); // #i49383# - format anchored objects - if ( pCnt->IsTextFrm() && pCnt->IsValid() ) + if ( pCnt->IsTextFrame() && pCnt->IsValid() ) { - if ( !SwObjectFormatter::FormatObjsAtFrm( *pCnt, - *(pCnt->FindPageFrm()) ) ) + if ( !SwObjectFormatter::FormatObjsAtFrame( *pCnt, + *(pCnt->FindPageFrame()) ) ) { // restart format with first content pCnt = pFootnote->ContainsAny(); @@ -2260,16 +2260,16 @@ void SwFootnoteBossFrm::RearrangeFootnotes( const SwTwips nDeadLine, const bool } } } - SwSectionFrm *pDel = nullptr; - if( pCnt->IsSctFrm() ) + SwSectionFrame *pDel = nullptr; + if( pCnt->IsSctFrame() ) { - SwFrm* pTmp = static_cast<SwSectionFrm*>(pCnt)->ContainsAny(); + SwFrame* pTmp = static_cast<SwSectionFrame*>(pCnt)->ContainsAny(); if( pTmp ) { pCnt = pTmp; continue; } - pDel = static_cast<SwSectionFrm*>(pCnt); + pDel = static_cast<SwSectionFrame*>(pCnt); } if ( pCnt->GetNext() ) pCnt = pCnt->GetNext(); @@ -2278,9 +2278,9 @@ void SwFootnoteBossFrm::RearrangeFootnotes( const SwTwips nDeadLine, const bool pCnt = pCnt->FindNext(); if ( pCnt ) { - SwFootnoteFrm* pFootnoteFrm = pCnt->FindFootnoteFrm(); - if( pFootnoteFrm->GetRef()->FindFootnoteBossFrm( - pFootnoteFrm->GetAttr()->GetFootnote().IsEndNote() ) != this ) + SwFootnoteFrame* pFootnoteFrame = pCnt->FindFootnoteFrame(); + if( pFootnoteFrame->GetRef()->FindFootnoteBossFrame( + pFootnoteFrame->GetAttr()->GetFootnote().IsEndNote() ) != this ) bMore = false; } else @@ -2288,70 +2288,70 @@ void SwFootnoteBossFrm::RearrangeFootnotes( const SwTwips nDeadLine, const bool } if( pDel ) { - bool bUnlockLastFootnoteFrmGuard = pLastFootnoteFrm && !pLastFootnoteFrm->IsColLocked(); - if (bUnlockLastFootnoteFrmGuard) - pLastFootnoteFrm->ColLock(); + bool bUnlockLastFootnoteFrameGuard = pLastFootnoteFrame && !pLastFootnoteFrame->IsColLocked(); + if (bUnlockLastFootnoteFrameGuard) + pLastFootnoteFrame->ColLock(); pDel->Cut(); - if (bUnlockLastFootnoteFrmGuard) - pLastFootnoteFrm->ColUnlock(); - SwFrm::DestroyFrm(pDel); + if (bUnlockLastFootnoteFrameGuard) + pLastFootnoteFrame->ColUnlock(); + SwFrame::DestroyFrame(pDel); } if ( bMore ) { // Go not further than to the provided footnote (if given) if ( pAttr && (::lcl_FindFootnotePos( pDoc, - pCnt->FindFootnoteFrm()->GetAttr()) > nFootnotePos ) ) + pCnt->FindFootnoteFrame()->GetAttr()) > nFootnotePos ) ) bMore = false; } } while ( bMore ); // #i49383# - if ( pLastFootnoteFrm ) + if ( pLastFootnoteFrame ) { - if ( !bLock && bUnlockLastFootnoteFrm ) + if ( !bLock && bUnlockLastFootnoteFrame ) { - pLastFootnoteFrm->ColUnlock(); + pLastFootnoteFrame->ColUnlock(); } // #i57914# - adjust fix #i49383# // enable lock of lower object position before format of footnote frame. - pLastFootnoteFrm->UnlockPosOfLowerObjs(); - pLastFootnoteFrm->Calc(getRootFrm()->GetCurrShell()->GetOut()); - if ( !bLock && bUnlockLastFootnoteFrm && - !pLastFootnoteFrm->GetLower() && - !pLastFootnoteFrm->IsColLocked() && - !pLastFootnoteFrm->IsBackMoveLocked() ) - { - pLastFootnoteFrm->Cut(); - SwFrm::DestroyFrm(pLastFootnoteFrm); + pLastFootnoteFrame->UnlockPosOfLowerObjs(); + pLastFootnoteFrame->Calc(getRootFrame()->GetCurrShell()->GetOut()); + if ( !bLock && bUnlockLastFootnoteFrame && + !pLastFootnoteFrame->GetLower() && + !pLastFootnoteFrame->IsColLocked() && + !pLastFootnoteFrame->IsBackMoveLocked() ) + { + pLastFootnoteFrame->Cut(); + SwFrame::DestroyFrame(pLastFootnoteFrame); } } } } -void SwPageFrm::UpdateFootnoteNum() +void SwPageFrame::UpdateFootnoteNum() { // page numbering only if set at the document if ( GetFormat()->GetDoc()->GetFootnoteInfo().eNum != FTNNUM_PAGE ) return; - SwLayoutFrm* pBody = FindBodyCont(); + SwLayoutFrame* pBody = FindBodyCont(); if( !pBody || !pBody->Lower() ) return; - SwContentFrm* pContent = pBody->ContainsContent(); + SwContentFrame* pContent = pBody->ContainsContent(); sal_uInt16 nNum = 0; - while( pContent && pContent->FindPageFrm() == this ) + while( pContent && pContent->FindPageFrame() == this ) { - if( static_cast<SwTextFrm*>(pContent)->HasFootnote() ) + if( static_cast<SwTextFrame*>(pContent)->HasFootnote() ) { - SwFootnoteBossFrm* pBoss = pContent->FindFootnoteBossFrm( true ); - if( pBoss->GetUpper()->IsSctFrm() && - static_cast<SwSectionFrm*>(pBoss->GetUpper())->IsOwnFootnoteNum() ) - pContent = static_cast<SwSectionFrm*>(pBoss->GetUpper())->FindLastContent(); + SwFootnoteBossFrame* pBoss = pContent->FindFootnoteBossFrame( true ); + if( pBoss->GetUpper()->IsSctFrame() && + static_cast<SwSectionFrame*>(pBoss->GetUpper())->IsOwnFootnoteNum() ) + pContent = static_cast<SwSectionFrame*>(pBoss->GetUpper())->FindLastContent(); else { - SwFootnoteFrm* pFootnote = const_cast<SwFootnoteFrm*>(pBoss->FindFirstFootnote( pContent )); + SwFootnoteFrame* pFootnote = const_cast<SwFootnoteFrame*>(pBoss->FindFirstFootnote( pContent )); while( pFootnote ) { SwTextFootnote* pTextFootnote = pFootnote->GetAttr(); @@ -2363,18 +2363,18 @@ void SwPageFrm::UpdateFootnoteNum() pTextFootnote->SetNumber( nNum, OUString() ); } if ( pFootnote->GetNext() ) - pFootnote = static_cast<SwFootnoteFrm*>(pFootnote->GetNext()); + pFootnote = static_cast<SwFootnoteFrame*>(pFootnote->GetNext()); else { - SwFootnoteBossFrm* pTmpBoss = pFootnote->FindFootnoteBossFrm( true ); + SwFootnoteBossFrame* pTmpBoss = pFootnote->FindFootnoteBossFrame( true ); if( pTmpBoss ) { - SwPageFrm* pPage = pTmpBoss->FindPageFrm(); + SwPageFrame* pPage = pTmpBoss->FindPageFrame(); pFootnote = nullptr; lcl_NextFootnoteBoss( pTmpBoss, pPage, false ); - SwFootnoteContFrm *pCont = pTmpBoss ? pTmpBoss->FindNearestFootnoteCont() : nullptr; + SwFootnoteContFrame *pCont = pTmpBoss ? pTmpBoss->FindNearestFootnoteCont() : nullptr; if ( pCont ) - pFootnote = static_cast<SwFootnoteFrm*>(pCont->Lower()); + pFootnote = static_cast<SwFootnoteFrame*>(pCont->Lower()); } } if( pFootnote && pFootnote->GetRef() != pContent ) @@ -2386,27 +2386,27 @@ void SwPageFrm::UpdateFootnoteNum() } } -void SwFootnoteBossFrm::SetFootnoteDeadLine( const SwTwips nDeadLine ) +void SwFootnoteBossFrame::SetFootnoteDeadLine( const SwTwips nDeadLine ) { - SwFrm *pBody = FindBodyCont(); - pBody->Calc(getRootFrm()->GetCurrShell()->GetOut()); + SwFrame *pBody = FindBodyCont(); + pBody->Calc(getRootFrame()->GetCurrShell()->GetOut()); - SwFrm *pCont = FindFootnoteCont(); + SwFrame *pCont = FindFootnoteCont(); const SwTwips nMax = nMaxFootnoteHeight;// current should exceed MaxHeight SWRECTFN( this ) if ( pCont ) { - pCont->Calc(getRootFrm()->GetCurrShell()->GetOut()); - nMaxFootnoteHeight = -(pCont->Frm().*fnRect->fnBottomDist)( nDeadLine ); + pCont->Calc(getRootFrame()->GetCurrShell()->GetOut()); + nMaxFootnoteHeight = -(pCont->Frame().*fnRect->fnBottomDist)( nDeadLine ); } else - nMaxFootnoteHeight = -(pBody->Frm().*fnRect->fnBottomDist)( nDeadLine ); + nMaxFootnoteHeight = -(pBody->Frame().*fnRect->fnBottomDist)( nDeadLine ); - const SwViewShell *pSh = getRootFrm() ? getRootFrm()->GetCurrShell() : nullptr; + const SwViewShell *pSh = getRootFrame() ? getRootFrame()->GetCurrShell() : nullptr; if( pSh && pSh->GetViewOptions()->getBrowseMode() ) nMaxFootnoteHeight += pBody->Grow( LONG_MAX, true ); if ( IsInSct() ) - nMaxFootnoteHeight += FindSctFrm()->Grow( LONG_MAX, true ); + nMaxFootnoteHeight += FindSctFrame()->Grow( LONG_MAX, true ); if ( nMaxFootnoteHeight < 0 ) nMaxFootnoteHeight = 0; @@ -2414,15 +2414,15 @@ void SwFootnoteBossFrm::SetFootnoteDeadLine( const SwTwips nDeadLine ) nMaxFootnoteHeight = nMax; } -SwTwips SwFootnoteBossFrm::GetVarSpace() const +SwTwips SwFootnoteBossFrame::GetVarSpace() const { // To not fall below 20% of the page height // (in contrast to MSOffice where footnotes can fill a whole column/page) - const SwPageFrm* pPg = FindPageFrm(); + const SwPageFrame* pPg = FindPageFrame(); OSL_ENSURE( pPg || IsInSct(), "Footnote lost page" ); - const SwFrm *pBody = FindBodyCont(); + const SwFrame *pBody = FindBodyCont(); SwTwips nRet; if( pBody ) { @@ -2431,35 +2431,35 @@ SwTwips SwFootnoteBossFrm::GetVarSpace() const { nRet = 0; SwTwips nTmp = (*fnRect->fnYDiff)( (pBody->*fnRect->fnGetPrtTop)(), - (Frm().*fnRect->fnGetTop)() ); - const SwSectionFrm* pSect = FindSctFrm(); + (Frame().*fnRect->fnGetTop)() ); + const SwSectionFrame* pSect = FindSctFrame(); // Endnotes in a ftncontainer causes a deadline: // the bottom of the last contentfrm if( pSect->IsEndnAtEnd() ) // endnotes allowed? { OSL_ENSURE( !Lower() || !Lower()->GetNext() || Lower()->GetNext()-> - IsFootnoteContFrm(), "FootnoteContainer expected" ); - const SwFootnoteContFrm* pCont = Lower() ? - static_cast<const SwFootnoteContFrm*>(Lower()->GetNext()) : nullptr; + IsFootnoteContFrame(), "FootnoteContainer expected" ); + const SwFootnoteContFrame* pCont = Lower() ? + static_cast<const SwFootnoteContFrame*>(Lower()->GetNext()) : nullptr; if( pCont ) { - const SwFootnoteFrm* pFootnote = static_cast<const SwFootnoteFrm*>(pCont->Lower()); + const SwFootnoteFrame* pFootnote = static_cast<const SwFootnoteFrame*>(pCont->Lower()); while( pFootnote) { if( pFootnote->GetAttr()->GetFootnote().IsEndNote() ) { // endnote found - const SwFrm* pFrm = static_cast<const SwLayoutFrm*>(Lower())->Lower(); - if( pFrm ) + const SwFrame* pFrame = static_cast<const SwLayoutFrame*>(Lower())->Lower(); + if( pFrame ) { - while( pFrm->GetNext() ) - pFrm = pFrm->GetNext(); // last cntntfrm + while( pFrame->GetNext() ) + pFrame = pFrame->GetNext(); // last cntntfrm nTmp += (*fnRect->fnYDiff)( - (Frm().*fnRect->fnGetTop)(), - (pFrm->Frm().*fnRect->fnGetBottom)() ); + (Frame().*fnRect->fnGetTop)(), + (pFrame->Frame().*fnRect->fnGetBottom)() ); } break; } - pFootnote = static_cast<const SwFootnoteFrm*>(pFootnote->GetNext()); + pFootnote = static_cast<const SwFootnoteFrame*>(pFootnote->GetNext()); } } } @@ -2468,22 +2468,22 @@ SwTwips SwFootnoteBossFrm::GetVarSpace() const } else nRet = - (pPg->Prt().*fnRect->fnGetHeight)()/5; - nRet += (pBody->Frm().*fnRect->fnGetHeight)(); + nRet += (pBody->Frame().*fnRect->fnGetHeight)(); if( nRet < 0 ) nRet = 0; } else nRet = 0; - if ( IsPageFrm() ) + if ( IsPageFrame() ) { - const SwViewShell *pSh = getRootFrm() ? getRootFrm()->GetCurrShell() : nullptr; + const SwViewShell *pSh = getRootFrame() ? getRootFrame()->GetCurrShell() : nullptr; if( pSh && pSh->GetViewOptions()->getBrowseMode() ) - nRet += BROWSE_HEIGHT - Frm().Height(); + nRet += BROWSE_HEIGHT - Frame().Height(); } return nRet; } -/** Obtain if pFrm's size adjustment should be processed +/** Obtain if pFrame's size adjustment should be processed * * For a page frame of columns directly below the page AdjustNeighbourhood() needs * to be called, or Grow()/ Shrink() for frame columns respectively. @@ -2495,28 +2495,28 @@ SwTwips SwFootnoteBossFrm::GetVarSpace() const * @see Grow() * @see Shrink() */ -sal_uInt8 SwFootnoteBossFrm::_NeighbourhoodAdjustment( const SwFrm* ) const +sal_uInt8 SwFootnoteBossFrame::_NeighbourhoodAdjustment( const SwFrame* ) const { sal_uInt8 nRet = NA_ONLY_ADJUST; - if( GetUpper() && !GetUpper()->IsPageBodyFrm() ) + if( GetUpper() && !GetUpper()->IsPageBodyFrame() ) { // column sections need grow/shrink - if( GetUpper()->IsFlyFrm() ) + if( GetUpper()->IsFlyFrame() ) nRet = NA_GROW_SHRINK; else { - OSL_ENSURE( GetUpper()->IsSctFrm(), "NeighbourhoodAdjustment: Unexpected Upper" ); + OSL_ENSURE( GetUpper()->IsSctFrame(), "NeighbourhoodAdjustment: Unexpected Upper" ); if( !GetNext() && !GetPrev() ) nRet = NA_GROW_ADJUST; // section with a single column (FootnoteAtEnd) else { - const SwFrm* pTmp = Lower(); + const SwFrame* pTmp = Lower(); OSL_ENSURE( pTmp, "NeighbourhoodAdjustment: Missing Lower()" ); if( !pTmp->GetNext() ) nRet = NA_GROW_SHRINK; else if( !GetUpper()->IsColLocked() ) nRet = NA_ADJUST_GROW; - OSL_ENSURE( !pTmp->GetNext() || pTmp->GetNext()->IsFootnoteContFrm(), + OSL_ENSURE( !pTmp->GetNext() || pTmp->GetNext()->IsFootnoteContFrame(), "NeighbourhoodAdjustment: Who's that guy?" ); } } @@ -2524,32 +2524,32 @@ sal_uInt8 SwFootnoteBossFrm::_NeighbourhoodAdjustment( const SwFrm* ) const return nRet; } -void SwPageFrm::SetColMaxFootnoteHeight() +void SwPageFrame::SetColMaxFootnoteHeight() { - SwLayoutFrm *pBody = FindBodyCont(); - if( pBody && pBody->Lower() && pBody->Lower()->IsColumnFrm() ) + SwLayoutFrame *pBody = FindBodyCont(); + if( pBody && pBody->Lower() && pBody->Lower()->IsColumnFrame() ) { - SwColumnFrm* pCol = static_cast<SwColumnFrm*>(pBody->Lower()); + SwColumnFrame* pCol = static_cast<SwColumnFrame*>(pBody->Lower()); do { pCol->SetMaxFootnoteHeight( GetMaxFootnoteHeight() ); - pCol = static_cast<SwColumnFrm*>(pCol->GetNext()); + pCol = static_cast<SwColumnFrame*>(pCol->GetNext()); } while ( pCol ); } } -bool SwLayoutFrm::MoveLowerFootnotes( SwContentFrm *pStart, SwFootnoteBossFrm *pOldBoss, - SwFootnoteBossFrm *pNewBoss, const bool bFootnoteNums ) +bool SwLayoutFrame::MoveLowerFootnotes( SwContentFrame *pStart, SwFootnoteBossFrame *pOldBoss, + SwFootnoteBossFrame *pNewBoss, const bool bFootnoteNums ) { SwDoc *pDoc = GetFormat()->GetDoc(); if ( pDoc->GetFootnoteIdxs().empty() ) return false; if( pDoc->GetFootnoteInfo().ePos == FTNPOS_CHAPTER && - ( !IsInSct() || !FindSctFrm()->IsFootnoteAtEnd() ) ) + ( !IsInSct() || !FindSctFrame()->IsFootnoteAtEnd() ) ) return true; if ( !pNewBoss ) - pNewBoss = FindFootnoteBossFrm( true ); + pNewBoss = FindFootnoteBossFrame( true ); if ( pNewBoss == pOldBoss ) return false; @@ -2557,47 +2557,47 @@ bool SwLayoutFrm::MoveLowerFootnotes( SwContentFrm *pStart, SwFootnoteBossFrm *p if( !pStart ) pStart = ContainsContent(); - SwFootnoteFrms aFootnoteArr; + SwFootnoteFrames aFootnoteArr; while ( IsAnLower( pStart ) ) { - if ( static_cast<SwTextFrm*>(pStart)->HasFootnote() ) + if ( static_cast<SwTextFrame*>(pStart)->HasFootnote() ) { // OD 03.04.2003 #108446# - To avoid unnecessary moves of footnotes // use new parameter <_bCollectOnlyPreviousFootnote> (4th parameter of - // method <SwFootnoteBossFrm::CollectFootnote(..)>) to control, that only + // method <SwFootnoteBossFrame::CollectFootnote(..)>) to control, that only // footnotes have to be collected, that are positioned before the // new dedicated footnote boss frame. pNewBoss->CollectFootnotes( pStart, pOldBoss, aFootnoteArr, true ); } - pStart = pStart->GetNextContentFrm(); + pStart = pStart->GetNextContentFrame(); } OSL_ENSURE( pOldBoss->IsInSct() == pNewBoss->IsInSct(), "MoveLowerFootnotes: Section confusion" ); - SwFootnoteFrms *pFootnoteArr; - SwLayoutFrm* pNewChief = nullptr; - SwLayoutFrm* pOldChief = nullptr; + SwFootnoteFrames *pFootnoteArr; + SwLayoutFrame* pNewChief = nullptr; + SwLayoutFrame* pOldChief = nullptr; bool bFoundCandidate = false; if (pStart && pOldBoss->IsInSct()) { - pOldChief = pOldBoss->FindSctFrm(); - pNewChief = pNewBoss->FindSctFrm(); + pOldChief = pOldBoss->FindSctFrame(); + pNewChief = pNewBoss->FindSctFrame(); bFoundCandidate = pOldChief != pNewChief; } if (bFoundCandidate) { - pFootnoteArr = new SwFootnoteFrms; - pOldChief = pOldBoss->FindFootnoteBossFrm( true ); - pNewChief = pNewBoss->FindFootnoteBossFrm( true ); + pFootnoteArr = new SwFootnoteFrames; + pOldChief = pOldBoss->FindFootnoteBossFrame( true ); + pNewChief = pNewBoss->FindFootnoteBossFrame( true ); while( pOldChief->IsAnLower( pStart ) ) { - if ( static_cast<SwTextFrm*>(pStart)->HasFootnote() ) - static_cast<SwFootnoteBossFrm*>(pNewChief)->CollectFootnotes( pStart, + if ( static_cast<SwTextFrame*>(pStart)->HasFootnote() ) + static_cast<SwFootnoteBossFrame*>(pNewChief)->CollectFootnotes( pStart, pOldBoss, *pFootnoteArr ); - pStart = pStart->GetNextContentFrm(); + pStart = pStart->GetNextContentFrame(); } if( pFootnoteArr->empty() ) { @@ -2614,7 +2614,7 @@ bool SwLayoutFrm::MoveLowerFootnotes( SwContentFrm *pStart, SwFootnoteBossFrm *p pNewBoss->_MoveFootnotes( aFootnoteArr, true ); if( pFootnoteArr ) { - static_cast<SwFootnoteBossFrm*>(pNewChief)->_MoveFootnotes( *pFootnoteArr, true ); + static_cast<SwFootnoteBossFrame*>(pNewChief)->_MoveFootnotes( *pFootnoteArr, true ); delete pFootnoteArr; } bMoved = true; @@ -2622,8 +2622,8 @@ bool SwLayoutFrm::MoveLowerFootnotes( SwContentFrm *pStart, SwFootnoteBossFrm *p // update FootnoteNum only at page change if ( bFootnoteNums ) { - SwPageFrm* pOldPage = pOldBoss->FindPageFrm(); - SwPageFrm* pNewPage =pNewBoss->FindPageFrm(); + SwPageFrame* pOldPage = pOldBoss->FindPageFrame(); + SwPageFrame* pNewPage =pNewBoss->FindPageFrame(); if( pOldPage != pNewPage ) { pOldPage->UpdateFootnoteNum(); @@ -2634,10 +2634,10 @@ bool SwLayoutFrm::MoveLowerFootnotes( SwContentFrm *pStart, SwFootnoteBossFrm *p return bMoved; } -bool SwContentFrm::MoveFootnoteCntFwd( bool bMakePage, SwFootnoteBossFrm *pOldBoss ) +bool SwContentFrame::MoveFootnoteCntFwd( bool bMakePage, SwFootnoteBossFrame *pOldBoss ) { OSL_ENSURE( IsInFootnote(), "no footnote." ); - SwLayoutFrm *pFootnote = FindFootnoteFrm(); + SwLayoutFrame *pFootnote = FindFootnoteFrame(); // The first paragraph in the first footnote in the first column in the // sectionfrm at the top of the page has not to move forward, if the @@ -2645,42 +2645,42 @@ bool SwContentFrm::MoveFootnoteCntFwd( bool bMakePage, SwFootnoteBossFrm *pOldBo if( pOldBoss->IsInSct() && !pOldBoss->GetIndPrev() && !GetIndPrev() && !pFootnote->GetPrev() ) { - SwLayoutFrm* pBody = pOldBoss->FindBodyCont(); + SwLayoutFrame* pBody = pOldBoss->FindBodyCont(); if( !pBody || !pBody->Lower() ) return true; } //fix(9538): if the footnote has neighbors behind itself, remove them temporarily - SwLayoutFrm *pNxt = static_cast<SwLayoutFrm*>(pFootnote->GetNext()); - SwLayoutFrm *pLst = nullptr; + SwLayoutFrame *pNxt = static_cast<SwLayoutFrame*>(pFootnote->GetNext()); + SwLayoutFrame *pLst = nullptr; while ( pNxt ) { while ( pNxt->GetNext() ) - pNxt = static_cast<SwLayoutFrm*>(pNxt->GetNext()); + pNxt = static_cast<SwLayoutFrame*>(pNxt->GetNext()); if ( pNxt == pLst ) pNxt = nullptr; else { pLst = pNxt; - SwContentFrm *pCnt = pNxt->ContainsContent(); + SwContentFrame *pCnt = pNxt->ContainsContent(); if( pCnt ) pCnt->MoveFootnoteCntFwd( true, pOldBoss ); - pNxt = static_cast<SwLayoutFrm*>(pFootnote->GetNext()); + pNxt = static_cast<SwLayoutFrame*>(pFootnote->GetNext()); } } bool bSamePage = true; - SwLayoutFrm *pNewUpper = + SwLayoutFrame *pNewUpper = GetLeaf( bMakePage ? MAKEPAGE_INSERT : MAKEPAGE_NONE, true ); if ( pNewUpper ) { bool bSameBoss = true; - SwFootnoteBossFrm * const pNewBoss = pNewUpper->FindFootnoteBossFrm(); + SwFootnoteBossFrame * const pNewBoss = pNewUpper->FindFootnoteBossFrame(); // Are we changing the column/page? if ( !( bSameBoss = (pNewBoss == pOldBoss) ) ) { - bSamePage = pOldBoss->FindPageFrm() == pNewBoss->FindPageFrm(); // page change? - pNewUpper->Calc(getRootFrm()->GetCurrShell()->GetOut()); + bSamePage = pOldBoss->FindPageFrame() == pNewBoss->FindPageFrame(); // page change? + pNewUpper->Calc(getRootFrame()->GetCurrShell()->GetOut()); } // The layout leaf of the footnote is either a footnote container or a footnote. @@ -2689,15 +2689,15 @@ bool SwContentFrm::MoveFootnoteCntFwd( bool bMakePage, SwFootnoteBossFrm *pOldBo // If it is a container or the reference differs, create a new footnote and add // it into the container. // Create also a SectionFrame if currently in a area inside a footnote. - SwFootnoteFrm* pTmpFootnote = pNewUpper->IsFootnoteFrm() ? static_cast<SwFootnoteFrm*>(pNewUpper) : nullptr; + SwFootnoteFrame* pTmpFootnote = pNewUpper->IsFootnoteFrame() ? static_cast<SwFootnoteFrame*>(pNewUpper) : nullptr; if( !pTmpFootnote ) { - OSL_ENSURE( pNewUpper->IsFootnoteContFrm(), "New Upper not a FootnoteCont."); - SwFootnoteContFrm *pCont = static_cast<SwFootnoteContFrm*>(pNewUpper); + OSL_ENSURE( pNewUpper->IsFootnoteContFrame(), "New Upper not a FootnoteCont."); + SwFootnoteContFrame *pCont = static_cast<SwFootnoteContFrame*>(pNewUpper); // create footnote - SwFootnoteFrm *pOld = FindFootnoteFrm(); - pTmpFootnote = new SwFootnoteFrm( pOld->GetFormat()->GetDoc()->GetDfltFrameFormat(), + SwFootnoteFrame *pOld = FindFootnoteFrame(); + pTmpFootnote = new SwFootnoteFrame( pOld->GetFormat()->GetDoc()->GetDfltFrameFormat(), pOld, pOld->GetRef(), pOld->GetAttr() ); // chaining of footnotes if ( pOld->GetFollow() ) @@ -2707,47 +2707,47 @@ bool SwContentFrm::MoveFootnoteCntFwd( bool bMakePage, SwFootnoteBossFrm *pOldBo } pOld->SetFollow( pTmpFootnote ); pTmpFootnote->SetMaster( pOld ); - SwFrm* pNx = pCont->Lower(); + SwFrame* pNx = pCont->Lower(); if( pNx && pTmpFootnote->GetAttr()->GetFootnote().IsEndNote() ) - while(pNx && !static_cast<SwFootnoteFrm*>(pNx)->GetAttr()->GetFootnote().IsEndNote()) + while(pNx && !static_cast<SwFootnoteFrame*>(pNx)->GetAttr()->GetFootnote().IsEndNote()) pNx = pNx->GetNext(); pTmpFootnote->Paste( pCont, pNx ); - pTmpFootnote->Calc(getRootFrm()->GetCurrShell()->GetOut()); + pTmpFootnote->Calc(getRootFrame()->GetCurrShell()->GetOut()); } - OSL_ENSURE( pTmpFootnote->GetAttr() == FindFootnoteFrm()->GetAttr(), "Wrong Footnote!" ); + OSL_ENSURE( pTmpFootnote->GetAttr() == FindFootnoteFrame()->GetAttr(), "Wrong Footnote!" ); // areas inside of footnotes get a special treatment - SwLayoutFrm *pNewUp = pTmpFootnote; + SwLayoutFrame *pNewUp = pTmpFootnote; if( IsInSct() ) { - SwSectionFrm* pSect = FindSctFrm(); + SwSectionFrame* pSect = FindSctFrame(); // area inside of a footnote (or only footnote in an area)? if( pSect->IsInFootnote() ) { - if( pTmpFootnote->Lower() && pTmpFootnote->Lower()->IsSctFrm() && - pSect->GetFollow() == static_cast<SwSectionFrm*>(pTmpFootnote->Lower()) ) - pNewUp = static_cast<SwSectionFrm*>(pTmpFootnote->Lower()); + if( pTmpFootnote->Lower() && pTmpFootnote->Lower()->IsSctFrame() && + pSect->GetFollow() == static_cast<SwSectionFrame*>(pTmpFootnote->Lower()) ) + pNewUp = static_cast<SwSectionFrame*>(pTmpFootnote->Lower()); else { - pNewUp = new SwSectionFrm( *pSect, false ); + pNewUp = new SwSectionFrame( *pSect, false ); pNewUp->InsertBefore( pTmpFootnote, pTmpFootnote->Lower() ); - static_cast<SwSectionFrm*>(pNewUp)->Init(); - pNewUp->Frm().Pos() = pTmpFootnote->Frm().Pos(); - pNewUp->Frm().Pos().Y() += 1; // for notifications + static_cast<SwSectionFrame*>(pNewUp)->Init(); + pNewUp->Frame().Pos() = pTmpFootnote->Frame().Pos(); + pNewUp->Frame().Pos().Y() += 1; // for notifications // If the section frame has a successor then the latter needs // to be moved behind the new Follow of the section frame. - SwFrm* pTmp = pSect->GetNext(); + SwFrame* pTmp = pSect->GetNext(); if( pTmp ) { - SwFlowFrm* pTmpNxt; - if( pTmp->IsContentFrm() ) - pTmpNxt = static_cast<SwContentFrm*>(pTmp); - else if( pTmp->IsSctFrm() ) - pTmpNxt = static_cast<SwSectionFrm*>(pTmp); + SwFlowFrame* pTmpNxt; + if( pTmp->IsContentFrame() ) + pTmpNxt = static_cast<SwContentFrame*>(pTmp); + else if( pTmp->IsSctFrame() ) + pTmpNxt = static_cast<SwSectionFrame*>(pTmp); else { - OSL_ENSURE( pTmp->IsTabFrm(), "GetNextSctLeaf: Wrong Type" ); - pTmpNxt = static_cast<SwTabFrm*>(pTmp); + OSL_ENSURE( pTmp->IsTabFrame(), "GetNextSctLeaf: Wrong Type" ); + pTmpNxt = static_cast<SwTabFrame*>(pTmp); } pTmpNxt->MoveSubTree( pTmpFootnote, pNewUp->GetNext() ); } @@ -2763,7 +2763,7 @@ bool SwContentFrm::MoveFootnoteCntFwd( bool bMakePage, SwFootnoteBossFrm *pOldBo return bSamePage; } -SwSaveFootnoteHeight::SwSaveFootnoteHeight( SwFootnoteBossFrm *pBs, const SwTwips nDeadLine ) : +SwSaveFootnoteHeight::SwSaveFootnoteHeight( SwFootnoteBossFrame *pBs, const SwTwips nDeadLine ) : pBoss( pBs ), nOldHeight( pBs->GetMaxFootnoteHeight() ) { @@ -2787,18 +2787,18 @@ SwSaveFootnoteHeight::~SwSaveFootnoteHeight() // but the GetRef() is called first, so we have to ignore a master/follow // mismatch. -const SwContentFrm* SwFootnoteFrm::GetRef() const +const SwContentFrame* SwFootnoteFrame::GetRef() const { - const SwContentFrm* pRefAttr = GetRefFromAttr(); + const SwContentFrame* pRefAttr = GetRefFromAttr(); SAL_WARN_IF( pRef != pRefAttr && !pRef->IsAnFollow( pRefAttr ) && !pRefAttr->IsAnFollow( pRef ), "sw", "access to deleted Frame? pRef != pAttr->GetRef()" ); return pRef; } -SwContentFrm* SwFootnoteFrm::GetRef() +SwContentFrame* SwFootnoteFrame::GetRef() { - const SwContentFrm* pRefAttr = GetRefFromAttr(); + const SwContentFrame* pRefAttr = GetRefFromAttr(); SAL_WARN_IF( pRef != pRefAttr && !pRef->IsAnFollow( pRefAttr ) && !pRefAttr->IsAnFollow( pRef ), "sw", "access to deleted Frame? pRef != pAttr->GetRef()" ); @@ -2806,63 +2806,63 @@ SwContentFrm* SwFootnoteFrm::GetRef() } #endif -const SwContentFrm* SwFootnoteFrm::GetRefFromAttr() const +const SwContentFrame* SwFootnoteFrame::GetRefFromAttr() const { - SwFootnoteFrm* pThis = const_cast<SwFootnoteFrm*>(this); + SwFootnoteFrame* pThis = const_cast<SwFootnoteFrame*>(this); return pThis->GetRefFromAttr(); } -SwContentFrm* SwFootnoteFrm::GetRefFromAttr() +SwContentFrame* SwFootnoteFrame::GetRefFromAttr() { assert(pAttr && "invalid Attribute"); SwTextNode& rTNd = (SwTextNode&)pAttr->GetTextNode(); SwPosition aPos( rTNd, SwIndex( &rTNd, pAttr->GetStart() )); - SwContentFrm* pCFrm = rTNd.getLayoutFrm( getRootFrm(), nullptr, &aPos, false ); - return pCFrm; + SwContentFrame* pCFrame = rTNd.getLayoutFrame( getRootFrame(), nullptr, &aPos, false ); + return pCFrame; } /** search for last content in the current footnote frame OD 2005-12-02 #i27138# */ -SwContentFrm* SwFootnoteFrm::FindLastContent() +SwContentFrame* SwFootnoteFrame::FindLastContent() { - SwContentFrm* pLastContentFrm( nullptr ); + SwContentFrame* pLastContentFrame( nullptr ); // find last lower, which is a content frame or contains content. // hidden text frames, empty sections and empty tables have to be skipped. - SwFrm* pLastLowerOfFootnote( GetLower() ); - SwFrm* pTmpLastLower( pLastLowerOfFootnote ); + SwFrame* pLastLowerOfFootnote( GetLower() ); + SwFrame* pTmpLastLower( pLastLowerOfFootnote ); while ( pTmpLastLower && pTmpLastLower->GetNext() ) { pTmpLastLower = pTmpLastLower->GetNext(); - if ( ( pTmpLastLower->IsTextFrm() && - !static_cast<SwTextFrm*>(pTmpLastLower)->IsHiddenNow() ) || - ( pTmpLastLower->IsSctFrm() && - static_cast<SwSectionFrm*>(pTmpLastLower)->GetSection() && - static_cast<SwSectionFrm*>(pTmpLastLower)->ContainsContent() ) || - ( pTmpLastLower->IsTabFrm() && - static_cast<SwTabFrm*>(pTmpLastLower)->ContainsContent() ) ) + if ( ( pTmpLastLower->IsTextFrame() && + !static_cast<SwTextFrame*>(pTmpLastLower)->IsHiddenNow() ) || + ( pTmpLastLower->IsSctFrame() && + static_cast<SwSectionFrame*>(pTmpLastLower)->GetSection() && + static_cast<SwSectionFrame*>(pTmpLastLower)->ContainsContent() ) || + ( pTmpLastLower->IsTabFrame() && + static_cast<SwTabFrame*>(pTmpLastLower)->ContainsContent() ) ) { pLastLowerOfFootnote = pTmpLastLower; } } // determine last content frame depending on type of found last lower. - if ( pLastLowerOfFootnote && pLastLowerOfFootnote->IsTabFrm() ) + if ( pLastLowerOfFootnote && pLastLowerOfFootnote->IsTabFrame() ) { - pLastContentFrm = static_cast<SwTabFrm*>(pLastLowerOfFootnote)->FindLastContent(); + pLastContentFrame = static_cast<SwTabFrame*>(pLastLowerOfFootnote)->FindLastContent(); } - else if ( pLastLowerOfFootnote && pLastLowerOfFootnote->IsSctFrm() ) + else if ( pLastLowerOfFootnote && pLastLowerOfFootnote->IsSctFrame() ) { - pLastContentFrm = static_cast<SwSectionFrm*>(pLastLowerOfFootnote)->FindLastContent(); + pLastContentFrame = static_cast<SwSectionFrame*>(pLastLowerOfFootnote)->FindLastContent(); } else { - pLastContentFrm = dynamic_cast<SwContentFrm*>(pLastLowerOfFootnote); + pLastContentFrame = dynamic_cast<SwContentFrame*>(pLastLowerOfFootnote); } - return pLastContentFrm; + return pLastContentFrame; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/layout/hffrm.cxx b/sw/source/core/layout/hffrm.cxx index fc2fd26b2419..55ab3914de47 100644 --- a/sw/source/core/layout/hffrm.cxx +++ b/sw/source/core/layout/hffrm.cxx @@ -35,9 +35,9 @@ extern bool bObjsDirect; //frmtool.cxx -static SwTwips lcl_GetFrmMinHeight(const SwLayoutFrm & rFrm) +static SwTwips lcl_GetFrameMinHeight(const SwLayoutFrame & rFrame) { - const SwFormatFrmSize &rSz = rFrm.GetFormat()->GetFrmSize(); + const SwFormatFrameSize &rSz = rFrame.GetFormat()->GetFrameSize(); SwTwips nMinHeight; switch (rSz.GetHeightSizeType()) @@ -54,50 +54,50 @@ static SwTwips lcl_GetFrmMinHeight(const SwLayoutFrm & rFrm) return nMinHeight; } -static SwTwips lcl_CalcContentHeight(SwLayoutFrm & frm) +static SwTwips lcl_CalcContentHeight(SwLayoutFrame & frm) { SwTwips nRemaining = 0; - SwFrm* pFrm = frm.Lower(); + SwFrame* pFrame = frm.Lower(); - while ( pFrm ) + while ( pFrame ) { SwTwips nTmp; - nTmp = pFrm->Frm().Height(); + nTmp = pFrame->Frame().Height(); nRemaining += nTmp; - if( pFrm->IsTextFrm() && static_cast<SwTextFrm*>(pFrm)->IsUndersized() ) + if( pFrame->IsTextFrame() && static_cast<SwTextFrame*>(pFrame)->IsUndersized() ) { - nTmp = static_cast<SwTextFrm*>(pFrm)->GetParHeight() - - pFrm->Prt().Height(); - // This TextFrm would like to be a bit bigger + nTmp = static_cast<SwTextFrame*>(pFrame)->GetParHeight() + - pFrame->Prt().Height(); + // This TextFrame would like to be a bit bigger nRemaining += nTmp; } - else if( pFrm->IsSctFrm() && static_cast<SwSectionFrm*>(pFrm)->IsUndersized() ) + else if( pFrame->IsSctFrame() && static_cast<SwSectionFrame*>(pFrame)->IsUndersized() ) { - nTmp = static_cast<SwSectionFrm*>(pFrm)->Undersize(); + nTmp = static_cast<SwSectionFrame*>(pFrame)->Undersize(); nRemaining += nTmp; } - pFrm = pFrm->GetNext(); + pFrame = pFrame->GetNext(); } return nRemaining; } -static void lcl_LayoutFrmEnsureMinHeight(SwLayoutFrm & rFrm, +static void lcl_LayoutFrameEnsureMinHeight(SwLayoutFrame & rFrame, const SwBorderAttrs * ) { - SwTwips nMinHeight = lcl_GetFrmMinHeight(rFrm); + SwTwips nMinHeight = lcl_GetFrameMinHeight(rFrame); - if (rFrm.Frm().Height() < nMinHeight) + if (rFrame.Frame().Height() < nMinHeight) { - rFrm.Grow(nMinHeight - rFrm.Frm().Height()); + rFrame.Grow(nMinHeight - rFrame.Frame().Height()); } } -SwHeadFootFrm::SwHeadFootFrm( SwFrameFormat * pFormat, SwFrm* pSib, sal_uInt16 nTypeIn) - : SwLayoutFrm( pFormat, pSib ) +SwHeadFootFrame::SwHeadFootFrame( SwFrameFormat * pFormat, SwFrame* pSib, sal_uInt16 nTypeIn) + : SwLayoutFrame( pFormat, pSib ) { - mnFrmType = nTypeIn; + mnFrameType = nTypeIn; SetDerivedVert( false ); const SwFormatContent &rCnt = pFormat->GetContent(); @@ -112,13 +112,13 @@ SwHeadFootFrm::SwHeadFootFrm( SwFrameFormat * pFormat, SwFrm* pSib, sal_uInt16 n bObjsDirect = bOld; } -void SwHeadFootFrm::FormatPrt(SwTwips & nUL, const SwBorderAttrs * pAttrs) +void SwHeadFootFrame::FormatPrt(SwTwips & nUL, const SwBorderAttrs * pAttrs) { if (GetEatSpacing()) { /* The minimal height of the print area is the minimal height of the frame without the height needed for borders and shadow. */ - SwTwips nMinHeight = lcl_GetFrmMinHeight(*this); + SwTwips nMinHeight = lcl_GetFrameMinHeight(*this); nMinHeight -= pAttrs->CalcTop(); nMinHeight -= pAttrs->CalcBottom(); @@ -147,7 +147,7 @@ void SwHeadFootFrm::FormatPrt(SwTwips & nUL, const SwBorderAttrs * pAttrs) /* calculate initial spacing/line space */ SwTwips nSpace, nLine; - if (IsHeaderFrm()) + if (IsHeaderFrame()) { nSpace = pAttrs->CalcBottom(); nLine = pAttrs->CalcBottomLine(); @@ -166,7 +166,7 @@ void SwHeadFootFrm::FormatPrt(SwTwips & nUL, const SwBorderAttrs * pAttrs) nSpace = nLine; /* calculate real vertical space between frame and print area */ - if (IsHeaderFrm()) + if (IsHeaderFrame()) nUL = pAttrs->CalcTop() + nSpace; else nUL = pAttrs->CalcBottom() + nSpace; @@ -177,17 +177,17 @@ void SwHeadFootFrm::FormatPrt(SwTwips & nUL, const SwBorderAttrs * pAttrs) maPrt.Left(pAttrs->CalcLeft(this)); - if (IsHeaderFrm()) + if (IsHeaderFrame()) maPrt.Top(pAttrs->CalcTop()); else maPrt.Top(nSpace); - maPrt.Width(maFrm.Width() - nLR); + maPrt.Width(maFrame.Width() - nLR); SwTwips nNewHeight; - if (nUL < maFrm.Height()) - nNewHeight = maFrm.Height() - nUL; + if (nUL < maFrame.Height()) + nNewHeight = maFrame.Height() - nUL; else nNewHeight = 0; @@ -199,19 +199,19 @@ void SwHeadFootFrm::FormatPrt(SwTwips & nUL, const SwBorderAttrs * pAttrs) maPrt.Left( pAttrs->CalcLeft( this ) ); maPrt.Top ( pAttrs->CalcTop() ); - // Set sizes - the sizes are given by the surrounding Frm, just + // Set sizes - the sizes are given by the surrounding Frame, just // subtract the borders. // OD 23.01.2003 #106895# - add first parameter to <SwBorderAttrs::CalcRight(..)> SwTwips nLR = pAttrs->CalcLeft( this ) + pAttrs->CalcRight( this ); - maPrt.Width ( maFrm.Width() - nLR ); - maPrt.Height( maFrm.Height()- nUL ); + maPrt.Width ( maFrame.Width() - nLR ); + maPrt.Height( maFrame.Height()- nUL ); } mbValidPrtArea = true; } -void SwHeadFootFrm::FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs) +void SwHeadFootFrame::FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs) { if ( !HasFixSize() ) { @@ -220,7 +220,7 @@ void SwHeadFootFrm::FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs) mbValidSize = mbValidPrtArea = true; const SwTwips nBorder = nUL; - SwTwips nMinHeight = lcl_GetFrmMinHeight(*this); + SwTwips nMinHeight = lcl_GetFrameMinHeight(*this); nMinHeight -= pAttrs->CalcTop(); nMinHeight -= pAttrs->CalcBottom(); @@ -239,60 +239,60 @@ void SwHeadFootFrm::FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs) do { nOldHeight = Prt().Height(); - SwFrm* pFrm = Lower(); + SwFrame* pFrame = Lower(); // #i64301# - if ( pFrm && - aOldFooterPrtPos != ( Frm().Pos() + Prt().Pos() ) ) + if ( pFrame && + aOldFooterPrtPos != ( Frame().Pos() + Prt().Pos() ) ) { - pFrm->_InvalidatePos(); - aOldFooterPrtPos = Frm().Pos() + Prt().Pos(); + pFrame->_InvalidatePos(); + aOldFooterPrtPos = Frame().Pos() + Prt().Pos(); } int nLoopControl = 0; - while( pFrm ) + while( pFrame ) { - pFrm->Calc(getRootFrm()->GetCurrShell()->GetOut()); + pFrame->Calc(getRootFrame()->GetCurrShell()->GetOut()); // #i43771# - format also object anchored // at the frame // #i46941# - frame has to be valid. // Note: frame could be invalid after calling its format, // if it's locked - OSL_ENSURE( StackHack::IsLocked() || !pFrm->IsTextFrm() || - pFrm->IsValid() || - static_cast<SwTextFrm*>(pFrm)->IsJoinLocked(), - "<SwHeadFootFrm::FormatSize(..)> - text frame invalid and not locked." ); - if ( pFrm->IsTextFrm() && pFrm->IsValid() ) + OSL_ENSURE( StackHack::IsLocked() || !pFrame->IsTextFrame() || + pFrame->IsValid() || + static_cast<SwTextFrame*>(pFrame)->IsJoinLocked(), + "<SwHeadFootFrame::FormatSize(..)> - text frame invalid and not locked." ); + if ( pFrame->IsTextFrame() && pFrame->IsValid() ) { - if ( !SwObjectFormatter::FormatObjsAtFrm( *pFrm, - *(pFrm->FindPageFrm()) ) ) + if ( !SwObjectFormatter::FormatObjsAtFrame( *pFrame, + *(pFrame->FindPageFrame()) ) ) { if (nLoopControl++ < 20) { // restart format with first content - pFrm = Lower(); + pFrame = Lower(); continue; } else - SAL_WARN("sw", "SwHeadFootFrm::FormatSize: loop detection triggered"); + SAL_WARN("sw", "SwHeadFootFrame::FormatSize: loop detection triggered"); } } - pFrm = pFrm->GetNext(); + pFrame = pFrame->GetNext(); } nRemaining = 0; - pFrm = Lower(); + pFrame = Lower(); - while ( pFrm ) + while ( pFrame ) { - nRemaining += pFrm->Frm().Height(); - - if( pFrm->IsTextFrm() && - static_cast<SwTextFrm*>(pFrm)->IsUndersized() ) - // This TextFrm would like to be a bit bigger - nRemaining += static_cast<SwTextFrm*>(pFrm)->GetParHeight() - - pFrm->Prt().Height(); - else if( pFrm->IsSctFrm() && - static_cast<SwSectionFrm*>(pFrm)->IsUndersized() ) - nRemaining += static_cast<SwSectionFrm*>(pFrm)->Undersize(); - pFrm = pFrm->GetNext(); + nRemaining += pFrame->Frame().Height(); + + if( pFrame->IsTextFrame() && + static_cast<SwTextFrame*>(pFrame)->IsUndersized() ) + // This TextFrame would like to be a bit bigger + nRemaining += static_cast<SwTextFrame*>(pFrame)->GetParHeight() + - pFrame->Prt().Height(); + else if( pFrame->IsSctFrame() && + static_cast<SwSectionFrame*>(pFrame)->IsUndersized() ) + nRemaining += static_cast<SwSectionFrame*>(pFrame)->Undersize(); + pFrame = pFrame->GetNext(); } if ( nRemaining < nMinHeight ) nRemaining = nMinHeight; @@ -326,32 +326,32 @@ void SwHeadFootFrm::FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs) { if ( Grow( nDiff ) ) { - pFrm = Lower(); + pFrame = Lower(); - while ( pFrm ) + while ( pFrame ) { - if( pFrm->IsTextFrm()) + if( pFrame->IsTextFrame()) { - SwTextFrm * pTmpFrm = static_cast<SwTextFrm*>(pFrm); - if (pTmpFrm->IsUndersized() ) + SwTextFrame * pTmpFrame = static_cast<SwTextFrame*>(pFrame); + if (pTmpFrame->IsUndersized() ) { - pTmpFrm->InvalidateSize(); - pTmpFrm->Prepare(PREP_ADJUST_FRM); + pTmpFrame->InvalidateSize(); + pTmpFrame->Prepare(PREP_ADJUST_FRM); } } /* #i3568# Undersized sections need to be invalidated too. */ - else if (pFrm->IsSctFrm()) + else if (pFrame->IsSctFrame()) { - SwSectionFrm * pTmpFrm = - static_cast<SwSectionFrm*>(pFrm); - if (pTmpFrm->IsUndersized() ) + SwSectionFrame * pTmpFrame = + static_cast<SwSectionFrame*>(pFrame); + if (pTmpFrame->IsUndersized() ) { - pTmpFrm->InvalidateSize(); - pTmpFrm->Prepare(PREP_ADJUST_FRM); + pTmpFrame->InvalidateSize(); + pTmpFrame->Prepare(PREP_ADJUST_FRM); } } - pFrm = pFrm->GetNext(); + pFrame = pFrame->GetNext(); } } } @@ -365,15 +365,15 @@ void SwHeadFootFrm::FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs) else break; // Don't overwrite the lower edge of the upper - if ( GetUpper() && Frm().Height() ) + if ( GetUpper() && Frame().Height() ) { - const SwTwips nDeadLine = GetUpper()->Frm().Top() + + const SwTwips nDeadLine = GetUpper()->Frame().Top() + GetUpper()->Prt().Bottom(); - const SwTwips nBot = Frm().Bottom(); + const SwTwips nBot = Frame().Bottom(); if ( nBot > nDeadLine ) { - Frm().Bottom( nDeadLine ); - Prt().SSize().Height() = Frm().Height() - nBorder; + Frame().Bottom( nDeadLine ); + Prt().SSize().Height() = Frame().Height() - nBorder; } } mbValidSize = mbValidPrtArea = true; @@ -386,28 +386,28 @@ void SwHeadFootFrm::FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs) { do { - if ( Frm().Height() != pAttrs->GetSize().Height() ) - ChgSize( Size( Frm().Width(), pAttrs->GetSize().Height())); + if ( Frame().Height() != pAttrs->GetSize().Height() ) + ChgSize( Size( Frame().Width(), pAttrs->GetSize().Height())); mbValidSize = true; MakePos(); } while ( !mbValidSize ); } } -void SwHeadFootFrm::Format(vcl::RenderContext* pRenderContext, const SwBorderAttrs * pAttrs) +void SwHeadFootFrame::Format(vcl::RenderContext* pRenderContext, const SwBorderAttrs * pAttrs) { - OSL_ENSURE( pAttrs, "SwFooterFrm::Format, pAttrs is 0." ); + OSL_ENSURE( pAttrs, "SwFooterFrame::Format, pAttrs is 0." ); if ( mbValidPrtArea && mbValidSize ) return; - if ( ! GetEatSpacing() && IsHeaderFrm()) + if ( ! GetEatSpacing() && IsHeaderFrame()) { - SwLayoutFrm::Format(pRenderContext, pAttrs); + SwLayoutFrame::Format(pRenderContext, pAttrs); } else { - lcl_LayoutFrmEnsureMinHeight(*this, pAttrs); + lcl_LayoutFrameEnsureMinHeight(*this, pAttrs); long nUL = pAttrs->CalcTop() + pAttrs->CalcBottom(); @@ -419,7 +419,7 @@ void SwHeadFootFrm::Format(vcl::RenderContext* pRenderContext, const SwBorderAtt } } -SwTwips SwHeadFootFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo ) +SwTwips SwHeadFootFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo ) { SwTwips nResult; @@ -429,13 +429,13 @@ SwTwips SwHeadFootFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo ) } else if (!GetEatSpacing()) { - nResult = SwLayoutFrm::GrowFrm(nDist, bTst, bInfo); + nResult = SwLayoutFrame::GrowFrame(nDist, bTst, bInfo); } else { nResult = 0; - auto pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrm::GetCache(), this); + auto pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrame::GetCache(), this); OSL_ENSURE(pAccess, "no border attributes"); SwBorderAttrs * pAttrs = pAccess->Get(); @@ -446,8 +446,8 @@ SwTwips SwHeadFootFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo ) SwTwips nMaxEat; /* calculate maximum eatable spacing */ - if (IsHeaderFrm()) - nMaxEat = maFrm.Height() - maPrt.Top() - maPrt.Height() - pAttrs->CalcBottomLine(); + if (IsHeaderFrame()) + nMaxEat = maFrame.Height() - maPrt.Top() - maPrt.Height() - pAttrs->CalcBottomLine(); else nMaxEat = maPrt.Top() - pAttrs->CalcTopLine(); @@ -456,8 +456,8 @@ SwTwips SwHeadFootFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo ) /* If the frame is too small, eat less spacing thus letting the frame grow more. */ - SwTwips nMinHeight = lcl_GetFrmMinHeight(*this); - SwTwips nFrameTooSmall = nMinHeight - Frm().Height(); + SwTwips nMinHeight = lcl_GetFrameMinHeight(*this); + SwTwips nFrameTooSmall = nMinHeight - Frame().Height(); if (nFrameTooSmall > 0) nEat -= nFrameTooSmall; @@ -476,7 +476,7 @@ SwTwips SwHeadFootFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo ) { if ( ! bTst) { - if (! IsHeaderFrm()) + if (! IsHeaderFrame()) { maPrt.Top(maPrt.Top() - nEat); maPrt.Height(maPrt.Height() - nEat); @@ -487,7 +487,7 @@ SwTwips SwHeadFootFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo ) nResult += nEat; // OD 14.04.2003 #108719# - trigger fly frame notify. - if ( IsHeaderFrm() ) + if ( IsHeaderFrame() ) { bNotifyFlys = true; } @@ -495,11 +495,11 @@ SwTwips SwHeadFootFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo ) if (nDist - nEat > 0) { - const SwTwips nFrmGrow = - SwLayoutFrm::GrowFrm( nDist - nEat, bTst, bInfo ); + const SwTwips nFrameGrow = + SwLayoutFrame::GrowFrame( nDist - nEat, bTst, bInfo ); - nResult += nFrmGrow; - if ( nFrmGrow > 0 ) + nResult += nFrameGrow; + if ( nFrameGrow > 0 ) { bNotifyFlys = false; } @@ -518,7 +518,7 @@ SwTwips SwHeadFootFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo ) return nResult; } -SwTwips SwHeadFootFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo ) +SwTwips SwHeadFootFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo ) { SwTwips nResult; @@ -528,14 +528,14 @@ SwTwips SwHeadFootFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo ) } else if (! GetEatSpacing()) { - nResult = SwLayoutFrm::ShrinkFrm(nDist, bTst, bInfo); + nResult = SwLayoutFrame::ShrinkFrame(nDist, bTst, bInfo); } else { nResult = 0; - SwTwips nMinHeight = lcl_GetFrmMinHeight(*this); - SwTwips nOldHeight = Frm().Height(); + SwTwips nMinHeight = lcl_GetFrameMinHeight(*this); + SwTwips nOldHeight = Frame().Height(); SwTwips nRest = 0; // Amount to shrink by spitting out spacing if ( nOldHeight >= nMinHeight ) @@ -564,7 +564,7 @@ SwTwips SwHeadFootFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo ) bool bNotifyFlys = false; if (nRest > 0) { - auto pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrm::GetCache(), this); + auto pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrame::GetCache(), this); OSL_ENSURE(pAccess, "no border attributes"); SwBorderAttrs * pAttrs = pAccess->Get(); @@ -592,7 +592,7 @@ SwTwips SwHeadFootFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo ) if (!bTst) { - if (! IsHeaderFrm() ) + if (! IsHeaderFrame() ) { maPrt.Top(maPrt.Top() + nShrink); maPrt.Height(maPrt.Height() - nShrink); @@ -602,7 +602,7 @@ SwTwips SwHeadFootFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo ) } nResult += nShrink; // OD 14.04.2003 #108719# - trigger fly frame notify. - if ( IsHeaderFrm() ) + if ( IsHeaderFrame() ) { bNotifyFlys = true; } @@ -612,7 +612,7 @@ SwTwips SwHeadFootFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo ) by the frame. */ if (nDist - nRest > 0) { - SwTwips nShrinkAmount = SwLayoutFrm::ShrinkFrm( nDist - nRest, bTst, bInfo ); + SwTwips nShrinkAmount = SwLayoutFrame::ShrinkFrame( nDist - nRest, bTst, bInfo ); nResult += nShrinkAmount; if ( nShrinkAmount > 0 ) { @@ -630,10 +630,10 @@ SwTwips SwHeadFootFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo ) return nResult; } -bool SwHeadFootFrm::GetEatSpacing() const +bool SwHeadFootFrame::GetEatSpacing() const { const SwFrameFormat * pFormat = GetFormat(); - OSL_ENSURE(pFormat, "SwHeadFootFrm: no format?"); + OSL_ENSURE(pFormat, "SwHeadFootFrame: no format?"); if (pFormat->GetHeaderAndFooterEatSpacing().GetValue()) return true; @@ -641,7 +641,7 @@ bool SwHeadFootFrm::GetEatSpacing() const return false; } -void DelFlys( SwLayoutFrm *pFrm, SwPageFrm *pPage ) +void DelFlys( SwLayoutFrame *pFrame, SwPageFrame *pPage ) { size_t i = 0; while ( pPage->GetSortedObjs() && @@ -649,12 +649,12 @@ void DelFlys( SwLayoutFrm *pFrm, SwPageFrm *pPage ) i < pPage->GetSortedObjs()->size() ) { SwAnchoredObject* pObj = (*pPage->GetSortedObjs())[i]; - if ( dynamic_cast< const SwFlyFrm *>( pObj ) != nullptr ) + if ( dynamic_cast< const SwFlyFrame *>( pObj ) != nullptr ) { - SwFlyFrm* pFlyFrm = static_cast<SwFlyFrm*>(pObj); - if ( pFrm->IsAnLower( pFlyFrm ) ) + SwFlyFrame* pFlyFrame = static_cast<SwFlyFrame*>(pObj); + if ( pFrame->IsAnLower( pFlyFrame ) ) { - SwFrm::DestroyFrm(pFlyFrm); + SwFrame::DestroyFrame(pFlyFrame); // Do not increment index, in this case continue; } @@ -664,15 +664,15 @@ void DelFlys( SwLayoutFrm *pFrm, SwPageFrm *pPage ) } /// Creates or removes headers -void SwPageFrm::PrepareHeader() +void SwPageFrame::PrepareHeader() { - SwLayoutFrm *pLay = static_cast<SwLayoutFrm*>(Lower()); + SwLayoutFrame *pLay = static_cast<SwLayoutFrame*>(Lower()); if ( !pLay ) return; const SwFormatHeader &rH = static_cast<SwFrameFormat*>(GetRegisteredIn())->GetHeader(); - const SwViewShell *pSh = getRootFrm()->GetCurrShell(); + const SwViewShell *pSh = getRootFrame()->GetCurrShell(); const bool bOn = !(pSh && (pSh->GetViewOptions()->getBrowseMode() || pSh->GetViewOptions()->IsWhitespaceHidden())); @@ -683,39 +683,39 @@ void SwPageFrm::PrepareHeader() if ( pLay->GetFormat() == rH.GetHeaderFormat() ) return; // Header is already the correct one. - if ( pLay->IsHeaderFrm() ) - { SwLayoutFrm *pDel = pLay; - pLay = static_cast<SwLayoutFrm*>(pLay->GetNext()); + if ( pLay->IsHeaderFrame() ) + { SwLayoutFrame *pDel = pLay; + pLay = static_cast<SwLayoutFrame*>(pLay->GetNext()); ::DelFlys( pDel, this ); pDel->Cut(); - SwFrm::DestroyFrm(pDel); + SwFrame::DestroyFrame(pDel); } OSL_ENSURE( pLay, "Where to with the Header?" ); - SwHeaderFrm *pH = new SwHeaderFrm( const_cast<SwFrameFormat*>(rH.GetHeaderFormat()), this ); + SwHeaderFrame *pH = new SwHeaderFrame( const_cast<SwFrameFormat*>(rH.GetHeaderFormat()), this ); pH->Paste( this, pLay ); if ( GetUpper() ) ::RegistFlys( this, pH ); } - else if ( pLay && pLay->IsHeaderFrm() ) + else if ( pLay && pLay->IsHeaderFrame() ) { // Remove header if present. ::DelFlys( pLay, this ); pLay->Cut(); - SwFrm::DestroyFrm(pLay); + SwFrame::DestroyFrame(pLay); } } /// Creates or removes footer -void SwPageFrm::PrepareFooter() +void SwPageFrame::PrepareFooter() { - SwLayoutFrm *pLay = static_cast<SwLayoutFrm*>(Lower()); + SwLayoutFrame *pLay = static_cast<SwLayoutFrame*>(Lower()); if ( !pLay ) return; const SwFormatFooter &rF = static_cast<SwFrameFormat*>(GetRegisteredIn())->GetFooter(); while ( pLay->GetNext() ) - pLay = static_cast<SwLayoutFrm*>(pLay->GetNext()); + pLay = static_cast<SwLayoutFrame*>(pLay->GetNext()); - const SwViewShell *pSh = getRootFrm()->GetCurrShell(); + const SwViewShell *pSh = getRootFrame()->GetCurrShell(); const bool bOn = !(pSh && (pSh->GetViewOptions()->getBrowseMode() || pSh->GetViewOptions()->IsWhitespaceHidden())); @@ -726,26 +726,26 @@ void SwPageFrm::PrepareFooter() if ( pLay->GetFormat() == rF.GetFooterFormat() ) return; // Footer is already the correct one. - if ( pLay->IsFooterFrm() ) + if ( pLay->IsFooterFrame() ) { ::DelFlys( pLay, this ); pLay->Cut(); - SwFrm::DestroyFrm(pLay); + SwFrame::DestroyFrame(pLay); } - SwFooterFrm *pF = new SwFooterFrm( const_cast<SwFrameFormat*>(rF.GetFooterFormat()), this ); + SwFooterFrame *pF = new SwFooterFrame( const_cast<SwFrameFormat*>(rF.GetFooterFormat()), this ); pF->Paste( this ); if ( GetUpper() ) ::RegistFlys( this, pF ); } - else if ( pLay->IsFooterFrm() ) + else if ( pLay->IsFooterFrame() ) { // Remove footer if already present ::DelFlys( pLay, this ); SwViewShell *pShell; - if ( pLay->GetPrev() && nullptr != (pShell = getRootFrm()->GetCurrShell()) && + if ( pLay->GetPrev() && nullptr != (pShell = getRootFrame()->GetCurrShell()) && pShell->VisArea().HasArea() ) pShell->InvalidateWindows( pShell->VisArea() ); pLay->Cut(); - SwFrm::DestroyFrm(pLay); + SwFrame::DestroyFrame(pLay); } } diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index 1e5677e98ac9..38f0f71384a6 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -82,7 +82,7 @@ } \ } -void SwLayAction::CheckWaitCrsr() +void SwLayAction::CheckWaitCursor() { RESCHEDULE if ( !IsWait() && IsWaitAllowed() && IsPaint() && @@ -110,12 +110,12 @@ void SwLayAction::SetStatBar( bool bNew ) m_nEndPage = USHRT_MAX; } -bool SwLayAction::PaintWithoutFlys( const SwRect &rRect, const SwContentFrm *pCnt, - const SwPageFrm *pPage ) +bool SwLayAction::PaintWithoutFlys( const SwRect &rRect, const SwContentFrame *pCnt, + const SwPageFrame *pPage ) { SwRegionRects aTmp( rRect ); const SwSortedObjs &rObjs = *pPage->GetSortedObjs(); - const SwFlyFrm *pSelfFly = pCnt->FindFlyFrm(); + const SwFlyFrame *pSelfFly = pCnt->FindFlyFrame(); for ( size_t i = 0; i < rObjs.size() && !aTmp.empty(); ++i ) { @@ -130,9 +130,9 @@ bool SwLayAction::PaintWithoutFlys( const SwRect &rRect, const SwContentFrm *pCn continue; } - SwFlyFrm *pFly = static_cast<SwVirtFlyDrawObj*>(pO)->GetFlyFrm(); + SwFlyFrame *pFly = static_cast<SwVirtFlyDrawObj*>(pO)->GetFlyFrame(); - if ( pFly == pSelfFly || !rRect.IsOver( pFly->Frm() ) ) + if ( pFly == pSelfFly || !rRect.IsOver( pFly->Frame() ) ) continue; if ( pSelfFly && pSelfFly->IsLowerOf( pFly ) ) @@ -165,8 +165,8 @@ bool SwLayAction::PaintWithoutFlys( const SwRect &rRect, const SwContentFrm *pCn // For checking, if fly frame contains transparent graphic or // has surrounded contour, assure that fly frame has a lower if ( pFly->Lower() && - pFly->Lower()->IsNoTextFrm() && - ( static_cast<SwNoTextFrm*>(pFly->Lower())->IsTransparent() || + pFly->Lower()->IsNoTextFrame() && + ( static_cast<SwNoTextFrame*>(pFly->Lower())->IsTransparent() || pFly->GetFormat()->GetSurround().IsContour() ) ) { @@ -181,7 +181,7 @@ bool SwLayAction::PaintWithoutFlys( const SwRect &rRect, const SwContentFrm *pCn continue; } - aTmp -= pFly->Frm(); + aTmp -= pFly->Frame(); } bool bRetPaint = false; @@ -190,8 +190,8 @@ bool SwLayAction::PaintWithoutFlys( const SwRect &rRect, const SwContentFrm *pCn return bRetPaint; } -inline bool SwLayAction::_PaintContent( const SwContentFrm *pContent, - const SwPageFrm *pPage, +inline bool SwLayAction::_PaintContent( const SwContentFrame *pContent, + const SwPageFrame *pPage, const SwRect &rRect ) { if ( rRect.HasArea() ) @@ -208,14 +208,14 @@ inline bool SwLayAction::_PaintContent( const SwContentFrm *pContent, * Depending of the type, the Content is output according to it's changes, or the area * to be outputted is registered with the region, respectively. */ -void SwLayAction::PaintContent( const SwContentFrm *pCnt, - const SwPageFrm *pPage, +void SwLayAction::PaintContent( const SwContentFrame *pCnt, + const SwPageFrame *pPage, const SwRect &rOldRect, long nOldBottom ) { SWRECTFN( pCnt ) - if ( pCnt->IsCompletePaint() || !pCnt->IsTextFrm() ) + if ( pCnt->IsCompletePaint() || !pCnt->IsTextFrame() ) { SwRect aPaint( pCnt->PaintArea() ); if ( !_PaintContent( pCnt, pPage, aPaint ) ) @@ -226,7 +226,7 @@ void SwLayAction::PaintContent( const SwContentFrm *pCnt, // paint the area between printing bottom and frame bottom and // the area left and right beside the frame, if its height changed. long nOldHeight = (rOldRect.*fnRect->fnGetHeight)(); - long nNewHeight = (pCnt->Frm().*fnRect->fnGetHeight)(); + long nNewHeight = (pCnt->Frame().*fnRect->fnGetHeight)(); const bool bHeightDiff = nOldHeight != nNewHeight; if( bHeightDiff ) { @@ -238,16 +238,16 @@ void SwLayAction::PaintContent( const SwContentFrm *pCnt, _PaintContent( pCnt, pPage, aDrawRect ); } // paint content area - SwRect aPaintRect = static_cast<SwTextFrm*>(const_cast<SwContentFrm*>(pCnt))->Paint(); + SwRect aPaintRect = static_cast<SwTextFrame*>(const_cast<SwContentFrame*>(pCnt))->Paint(); _PaintContent( pCnt, pPage, aPaintRect ); } if ( pCnt->IsRetouche() && !pCnt->GetNext() ) { - const SwFrm *pTmp = pCnt; + const SwFrame *pTmp = pCnt; if( pCnt->IsInSct() ) { - const SwSectionFrm* pSct = pCnt->FindSctFrm(); + const SwSectionFrame* pSct = pCnt->FindSctFrame(); if( pSct->IsRetouche() && !pSct->GetNext() ) pTmp = pSct; } @@ -258,7 +258,7 @@ void SwLayAction::PaintContent( const SwContentFrm *pCnt, } } -SwLayAction::SwLayAction( SwRootFrm *pRt, SwViewShellImp *pI ) : +SwLayAction::SwLayAction( SwRootFrame *pRt, SwViewShellImp *pI ) : m_pRoot( pRt ), m_pImp( pI ), m_pOptTab( nullptr ), @@ -305,19 +305,19 @@ bool SwLayAction::RemoveEmptyBrowserPages() const SwViewShell *pSh = m_pRoot->GetCurrShell(); if( pSh && pSh->GetViewOptions()->getBrowseMode() ) { - SwPageFrm *pPage = static_cast<SwPageFrm*>(m_pRoot->Lower()); + SwPageFrame *pPage = static_cast<SwPageFrame*>(m_pRoot->Lower()); do { if ( (pPage->GetSortedObjs() && pPage->GetSortedObjs()->size()) || pPage->ContainsContent() ) - pPage = static_cast<SwPageFrm*>(pPage->GetNext()); + pPage = static_cast<SwPageFrame*>(pPage->GetNext()); else { bRet = true; - SwPageFrm *pDel = pPage; - pPage = static_cast<SwPageFrm*>(pPage->GetNext()); + SwPageFrame *pDel = pPage; + pPage = static_cast<SwPageFrame*>(pPage->GetNext()); pDel->Cut(); - SwFrm::DestroyFrm(pDel); + SwFrame::DestroyFrame(pDel); } } while ( pPage ); } @@ -340,9 +340,9 @@ void SwLayAction::Action(OutputDevice* pRenderContext) else if ( m_pRoot->GetTurbo() ) { m_pRoot->DisallowTurbo(); - const SwFrm *pFrm = m_pRoot->GetTurbo(); + const SwFrame *pFrame = m_pRoot->GetTurbo(); m_pRoot->ResetTurbo(); - pFrm->InvalidatePage(); + pFrame->InvalidatePage(); } m_pRoot->DisallowTurbo(); @@ -370,38 +370,38 @@ void SwLayAction::Action(OutputDevice* pRenderContext) m_bActionInProgress = false; } -SwPageFrm* SwLayAction::CheckFirstVisPage( SwPageFrm *pPage ) +SwPageFrame* SwLayAction::CheckFirstVisPage( SwPageFrame *pPage ) { - SwContentFrm *pCnt = pPage->FindFirstBodyContent(); - SwContentFrm *pChk = pCnt; + SwContentFrame *pCnt = pPage->FindFirstBodyContent(); + SwContentFrame *pChk = pCnt; bool bPageChgd = false; while ( pCnt && pCnt->IsFollow() ) - pCnt = static_cast<SwContentFrm*>(pCnt)->FindMaster(); + pCnt = static_cast<SwContentFrame*>(pCnt)->FindMaster(); if ( pCnt && pChk != pCnt ) { bPageChgd = true; - pPage = pCnt->FindPageFrm(); + pPage = pCnt->FindPageFrame(); } if ( !pPage->GetFormat()->GetDoc()->GetFootnoteIdxs().empty() ) { - SwFootnoteContFrm *pCont = pPage->FindFootnoteCont(); + SwFootnoteContFrame *pCont = pPage->FindFootnoteCont(); if ( pCont ) { pCnt = pCont->ContainsContent(); pChk = pCnt; while ( pCnt && pCnt->IsFollow() ) - pCnt = static_cast<SwContentFrm*>(pCnt->FindPrev()); + pCnt = static_cast<SwContentFrame*>(pCnt->FindPrev()); if ( pCnt && pCnt != pChk ) { if ( bPageChgd ) { // Use the 'topmost' page - SwPageFrm *pTmp = pCnt->FindPageFrm(); + SwPageFrame *pTmp = pCnt->FindPageFrame(); if ( pPage->GetPhyPageNum() > pTmp->GetPhyPageNum() ) pPage = pTmp; } else - pPage = pCnt->FindPageFrm(); + pPage = pCnt->FindPageFrame(); } } } @@ -410,11 +410,11 @@ SwPageFrm* SwLayAction::CheckFirstVisPage( SwPageFrm *pPage ) // #114798# - unlock position on start and end of page // layout process. -static void unlockPositionOfObjects( SwPageFrm *pPageFrm ) +static void unlockPositionOfObjects( SwPageFrame *pPageFrame ) { - assert( pPageFrm ); + assert( pPageFrame ); - SwSortedObjs* pObjs = pPageFrm->GetSortedObjs(); + SwSortedObjs* pObjs = pPageFrame->GetSortedObjs(); if ( pObjs ) { for ( size_t i = 0; i < pObjs->size(); ++i ) @@ -427,7 +427,7 @@ static void unlockPositionOfObjects( SwPageFrm *pPageFrm ) void SwLayAction::InternalAction(OutputDevice* pRenderContext) { - OSL_ENSURE( m_pRoot->Lower()->IsPageFrm(), ":-( No page below the root."); + OSL_ENSURE( m_pRoot->Lower()->IsPageFrame(), ":-( No page below the root."); m_pRoot->Calc(pRenderContext); @@ -436,10 +436,10 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext) // However, the first page to be formatted might be the one having the // number 1. If we're doing a fake formatting, the number of the first // page is the number of the first visible page. - SwPageFrm *pPage = IsComplete() ? static_cast<SwPageFrm*>(m_pRoot->Lower()) : + SwPageFrame *pPage = IsComplete() ? static_cast<SwPageFrame*>(m_pRoot->Lower()) : m_pImp->GetFirstVisPage(pRenderContext); if ( !pPage ) - pPage = static_cast<SwPageFrm*>(m_pRoot->Lower()); + pPage = static_cast<SwPageFrame*>(m_pRoot->Lower()); // If there's a first-flow-Content in the first visible page that's also a Follow, // we switch the page back to the original master of that Content. @@ -448,7 +448,7 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext) sal_uInt16 nFirstPageNum = pPage->GetPhyPageNum(); while ( pPage && !pPage->IsInvalid() && !pPage->IsInvalidFly() ) - pPage = static_cast<SwPageFrm*>(pPage->GetNext()); + pPage = static_cast<SwPageFrame*>(pPage->GetNext()); IDocumentLayoutAccess& rLayoutAccess = m_pRoot->GetFormat()->getIDocumentLayoutAccess(); bool bNoLoop = pPage && SwLayouter::StartLoopControl( m_pRoot->GetFormat()->GetDoc(), pPage ); @@ -459,18 +459,18 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext) { if ( !pPage || pPage->GetPhyPageNum() > m_nCheckPageNum ) { - SwPageFrm *pPg = static_cast<SwPageFrm*>(m_pRoot->Lower()); + SwPageFrame *pPg = static_cast<SwPageFrame*>(m_pRoot->Lower()); while ( pPg && pPg->GetPhyPageNum() < m_nCheckPageNum ) - pPg = static_cast<SwPageFrm*>(pPg->GetNext()); + pPg = static_cast<SwPageFrame*>(pPg->GetNext()); if ( pPg ) pPage = pPg; if ( !pPage ) break; } - SwPageFrm *pTmp = pPage->GetPrev() ? - static_cast<SwPageFrm*>(pPage->GetPrev()) : pPage; + SwPageFrame *pTmp = pPage->GetPrev() ? + static_cast<SwPageFrame*>(pPage->GetPrev()) : pPage; SetCheckPages( true ); - SwFrm::CheckPageDescs( pPage, true, &pTmp ); + SwFrame::CheckPageDescs( pPage, true, &pTmp ); SetCheckPages( false ); m_nCheckPageNum = USHRT_MAX; pPage = pTmp; @@ -506,12 +506,12 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext) rLayoutAccess.GetLayouter()->EndLoopControl(); return; } - pPage = static_cast<SwPageFrm*>(m_pRoot->Lower()); + pPage = static_cast<SwPageFrame*>(m_pRoot->Lower()); while ( pPage && !pPage->IsInvalid() && !pPage->IsInvalidFly() ) - pPage = static_cast<SwPageFrm*>(pPage->GetNext()); + pPage = static_cast<SwPageFrame*>(pPage->GetNext()); while ( pPage && pPage->GetNext() && pPage->GetPhyPageNum() < nFirstPageNum ) - pPage = static_cast<SwPageFrm*>(pPage->GetNext()); + pPage = static_cast<SwPageFrame*>(pPage->GetNext()); continue; } break; @@ -527,7 +527,7 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext) unlockPositionOfObjects( pPage ); // #i28701# - SwObjectFormatter::FormatObjsAtFrm( *pPage, *pPage, this ); + SwObjectFormatter::FormatObjsAtFrame( *pPage, *pPage, this ); if ( !IS_FLYS ) { // If there are no (more) Flys, the flags are superfluous. @@ -605,7 +605,7 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext) if( !IsComplete() && m_nPreInvaPage + 2 < nFirstPageNum ) { m_pImp->SetFirstVisPageInvalid(); - SwPageFrm *pTmpPage = m_pImp->GetFirstVisPage(pRenderContext); + SwPageFrame *pTmpPage = m_pImp->GetFirstVisPage(pRenderContext); nFirstPageNum = pTmpPage->GetPhyPageNum(); if( m_nPreInvaPage < nFirstPageNum ) { @@ -614,25 +614,25 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext) } } while ( pPage->GetPrev() && pPage->GetPhyPageNum() > m_nPreInvaPage ) - pPage = static_cast<SwPageFrm*>(pPage->GetPrev()); + pPage = static_cast<SwPageFrame*>(pPage->GetPrev()); m_nPreInvaPage = USHRT_MAX; } while ( pPage->GetPrev() && - ( static_cast<SwPageFrm*>(pPage->GetPrev())->IsInvalid() || - ( static_cast<SwPageFrm*>(pPage->GetPrev())->GetSortedObjs() && - static_cast<SwPageFrm*>(pPage->GetPrev())->IsInvalidFly())) && - (static_cast<SwPageFrm*>(pPage->GetPrev())->GetPhyPageNum() >= + ( static_cast<SwPageFrame*>(pPage->GetPrev())->IsInvalid() || + ( static_cast<SwPageFrame*>(pPage->GetPrev())->GetSortedObjs() && + static_cast<SwPageFrame*>(pPage->GetPrev())->IsInvalidFly())) && + (static_cast<SwPageFrame*>(pPage->GetPrev())->GetPhyPageNum() >= nFirstPageNum) ) { - pPage = static_cast<SwPageFrm*>(pPage->GetPrev()); + pPage = static_cast<SwPageFrame*>(pPage->GetPrev()); } // Continue to the next invalid page while ( pPage && !pPage->IsInvalid() && (!IS_FLYS || !IS_INVAFLY) ) { - pPage = static_cast<SwPageFrm*>(pPage->GetNext()); + pPage = static_cast<SwPageFrame*>(pPage->GetNext()); } if( bNoLoop ) rLayoutAccess.GetLayouter()->LoopControl( pPage, LOOP_PAGE ); @@ -656,12 +656,12 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext) rLayoutAccess.GetLayouter()->EndLoopControl(); return; } - pPage = static_cast<SwPageFrm*>(m_pRoot->Lower()); + pPage = static_cast<SwPageFrame*>(m_pRoot->Lower()); while ( pPage && !pPage->IsInvalid() && !pPage->IsInvalidFly() ) - pPage = static_cast<SwPageFrm*>(pPage->GetNext()); + pPage = static_cast<SwPageFrame*>(pPage->GetNext()); while ( pPage && pPage->GetNext() && pPage->GetPhyPageNum() < nFirstPageNum ) - pPage = static_cast<SwPageFrm*>(pPage->GetNext()); + pPage = static_cast<SwPageFrame*>(pPage->GetNext()); } } if ( IsInterrupt() && pPage ) @@ -680,16 +680,16 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext) // already added itself, but the borders of the page haven't been painted // yet. // Oh well, with the inevitable following LayAction, the page doesn't - // register itself, because it's (LayoutFrm) flags have been reset + // register itself, because it's (LayoutFrame) flags have been reset // already - the border of the page will never be painted. - SwPageFrm *pPg = pPage; + SwPageFrame *pPg = pPage; XCHECKPAGE; const SwRect &rVis = m_pImp->GetShell()->VisArea(); - while( pPg && pPg->Frm().Bottom() < rVis.Top() ) - pPg = static_cast<SwPageFrm*>(pPg->GetNext()); + while( pPg && pPg->Frame().Bottom() < rVis.Top() ) + pPg = static_cast<SwPageFrame*>(pPg->GetNext()); if( pPg != pPage ) - pPg = pPg ? static_cast<SwPageFrm*>(pPg->GetPrev()) : pPage; + pPg = pPg ? static_cast<SwPageFrame*>(pPg->GetPrev()) : pPage; // set flag for interrupt content formatting mbFormatContentOnInterrupt = IsInput(); @@ -697,7 +697,7 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext) // #i42586# - format current page, if idle action is active // This is an optimization for the case that the interrupt is created by // the move of a form control object, which is represented by a window. - while ( pPg && ( pPg->Frm().Top() < nBottom || + while ( pPg && ( pPg->Frame().Top() < nBottom || ( IsIdle() && pPg == pPage ) ) ) { unlockPositionOfObjects( pPg ); @@ -719,7 +719,7 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext) { XCHECKPAGE; // #i50432# - format also at-page anchored objects - SwObjectFormatter::FormatObjsAtFrm( *pPg, *pPg, this ); + SwObjectFormatter::FormatObjsAtFrame( *pPg, *pPg, this ); if ( !pPg->GetSortedObjs() ) { pPg->ValidateFlyLayout(); @@ -778,7 +778,7 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext) } unlockPositionOfObjects( pPg ); - pPg = static_cast<SwPageFrm*>(pPg->GetNext()); + pPg = static_cast<SwPageFrame*>(pPg->GetNext()); } // reset flag for special interrupt content formatting. mbFormatContentOnInterrupt = false; @@ -788,37 +788,37 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext) rLayoutAccess.GetLayouter()->EndLoopControl(); } -bool SwLayAction::_TurboAction( const SwContentFrm *pCnt ) +bool SwLayAction::_TurboAction( const SwContentFrame *pCnt ) { - const SwPageFrm *pPage = nullptr; + const SwPageFrame *pPage = nullptr; if ( !pCnt->IsValid() || pCnt->IsCompletePaint() || pCnt->IsRetouche() ) { - const SwRect aOldRect( pCnt->UnionFrm( true ) ); - const long nOldBottom = pCnt->Frm().Top() + pCnt->Prt().Bottom(); + const SwRect aOldRect( pCnt->UnionFrame( true ) ); + const long nOldBottom = pCnt->Frame().Top() + pCnt->Prt().Bottom(); pCnt->Calc(m_pImp->GetShell()->GetOut()); - if ( pCnt->Frm().Bottom() < aOldRect.Bottom() ) + if ( pCnt->Frame().Bottom() < aOldRect.Bottom() ) pCnt->SetRetouche(); - pPage = pCnt->FindPageFrm(); + pPage = pCnt->FindPageFrame(); PaintContent( pCnt, pPage, aOldRect, nOldBottom ); - if ( !pCnt->GetValidLineNumFlag() && pCnt->IsTextFrm() ) + if ( !pCnt->GetValidLineNumFlag() && pCnt->IsTextFrame() ) { - const sal_uLong nAllLines = static_cast<const SwTextFrm*>(pCnt)->GetAllLines(); - const_cast<SwTextFrm*>(static_cast<const SwTextFrm*>(pCnt))->RecalcAllLines(); - if ( nAllLines != static_cast<const SwTextFrm*>(pCnt)->GetAllLines() ) + const sal_uLong nAllLines = static_cast<const SwTextFrame*>(pCnt)->GetAllLines(); + const_cast<SwTextFrame*>(static_cast<const SwTextFrame*>(pCnt))->RecalcAllLines(); + if ( nAllLines != static_cast<const SwTextFrame*>(pCnt)->GetAllLines() ) { if ( IsPaintExtraData() ) - m_pImp->GetShell()->AddPaintRect( pCnt->Frm() ); + m_pImp->GetShell()->AddPaintRect( pCnt->Frame() ); // This is to calculate the remaining LineNums on the page, // and we don't stop processing here. To perform this inside RecalcAllLines // would be expensive, because we would have to notify the page even // in unnecessary cases (normal actions). - const SwContentFrm *pNxt = pCnt->GetNextContentFrm(); + const SwContentFrame *pNxt = pCnt->GetNextContentFrame(); while ( pNxt && (pNxt->IsInTab() || pNxt->IsInDocBody() != pCnt->IsInDocBody()) ) - pNxt = pNxt->GetNextContentFrm(); + pNxt = pNxt->GetNextContentFrame(); if ( pNxt ) pNxt->InvalidatePage(); } @@ -829,11 +829,11 @@ bool SwLayAction::_TurboAction( const SwContentFrm *pCnt ) return false; } if ( !pPage ) - pPage = pCnt->FindPageFrm(); + pPage = pCnt->FindPageFrame(); // OD 2004-05-10 #i28701# - format floating screen objects at content frame. - if ( pCnt->IsTextFrm() && - !SwObjectFormatter::FormatObjsAtFrm( *(const_cast<SwContentFrm*>(pCnt)), + if ( pCnt->IsTextFrame() && + !SwObjectFormatter::FormatObjsAtFrame( *(const_cast<SwContentFrame*>(pCnt)), *pPage, this ) ) { return false; @@ -862,11 +862,11 @@ bool SwLayAction::TurboAction() return bRet; } -static bool lcl_IsInvaLay( const SwFrm *pFrm, long nBottom ) +static bool lcl_IsInvaLay( const SwFrame *pFrame, long nBottom ) { if ( - !pFrm->IsValid() || - (pFrm->IsCompletePaint() && ( pFrm->Frm().Top() < nBottom ) ) + !pFrame->IsValid() || + (pFrame->IsCompletePaint() && ( pFrame->Frame().Top() < nBottom ) ) ) { return true; @@ -874,38 +874,38 @@ static bool lcl_IsInvaLay( const SwFrm *pFrm, long nBottom ) return false; } -static const SwFrm *lcl_FindFirstInvaLay( const SwFrm *pFrm, long nBottom ) +static const SwFrame *lcl_FindFirstInvaLay( const SwFrame *pFrame, long nBottom ) { - OSL_ENSURE( pFrm->IsLayoutFrm(), "FindFirstInvaLay, no LayFrm" ); + OSL_ENSURE( pFrame->IsLayoutFrame(), "FindFirstInvaLay, no LayFrame" ); - if (lcl_IsInvaLay(pFrm, nBottom)) - return pFrm; - pFrm = static_cast<const SwLayoutFrm*>(pFrm)->Lower(); - while ( pFrm ) + if (lcl_IsInvaLay(pFrame, nBottom)) + return pFrame; + pFrame = static_cast<const SwLayoutFrame*>(pFrame)->Lower(); + while ( pFrame ) { - if ( pFrm->IsLayoutFrm() ) + if ( pFrame->IsLayoutFrame() ) { - if (lcl_IsInvaLay(pFrm, nBottom)) - return pFrm; - const SwFrm *pTmp; - if ( nullptr != (pTmp = lcl_FindFirstInvaLay( pFrm, nBottom )) ) + if (lcl_IsInvaLay(pFrame, nBottom)) + return pFrame; + const SwFrame *pTmp; + if ( nullptr != (pTmp = lcl_FindFirstInvaLay( pFrame, nBottom )) ) return pTmp; } - pFrm = pFrm->GetNext(); + pFrame = pFrame->GetNext(); } return nullptr; } -static const SwFrm *lcl_FindFirstInvaContent( const SwLayoutFrm *pLay, long nBottom, - const SwContentFrm *pFirst ) +static const SwFrame *lcl_FindFirstInvaContent( const SwLayoutFrame *pLay, long nBottom, + const SwContentFrame *pFirst ) { - const SwContentFrm *pCnt = pFirst ? pFirst->GetNextContentFrm() : + const SwContentFrame *pCnt = pFirst ? pFirst->GetNextContentFrame() : pLay->ContainsContent(); while ( pCnt ) { if ( !pCnt->IsValid() || pCnt->IsCompletePaint() ) { - if ( pCnt->Frm().Top() <= nBottom ) + if ( pCnt->Frame().Top() <= nBottom ) return pCnt; } @@ -915,27 +915,27 @@ static const SwFrm *lcl_FindFirstInvaContent( const SwLayoutFrm *pLay, long nBot for ( size_t i = 0; i < rObjs.size(); ++i ) { const SwAnchoredObject* pObj = rObjs[i]; - if ( dynamic_cast< const SwFlyFrm *>( pObj ) != nullptr ) + if ( dynamic_cast< const SwFlyFrame *>( pObj ) != nullptr ) { - const SwFlyFrm* pFly = static_cast<const SwFlyFrm*>(pObj); - if ( pFly->IsFlyInCntFrm() ) + const SwFlyFrame* pFly = static_cast<const SwFlyFrame*>(pObj); + if ( pFly->IsFlyInContentFrame() ) { - if ( static_cast<const SwFlyInCntFrm*>(pFly)->IsInvalid() || + if ( static_cast<const SwFlyInContentFrame*>(pFly)->IsInvalid() || pFly->IsCompletePaint() ) { - if ( pFly->Frm().Top() <= nBottom ) + if ( pFly->Frame().Top() <= nBottom ) return pFly; } - const SwFrm *pFrm = lcl_FindFirstInvaContent( pFly, nBottom, nullptr ); - if ( pFrm && pFrm->Frm().Bottom() <= nBottom ) - return pFrm; + const SwFrame *pFrame = lcl_FindFirstInvaContent( pFly, nBottom, nullptr ); + if ( pFrame && pFrame->Frame().Bottom() <= nBottom ) + return pFrame; } } } } - if ( pCnt->Frm().Top() > nBottom && !pCnt->IsInTab() ) + if ( pCnt->Frame().Top() > nBottom && !pCnt->IsInTab() ) return nullptr; - pCnt = pCnt->GetNextContentFrm(); + pCnt = pCnt->GetNextContentFrame(); if ( !pLay->IsAnLower( pCnt ) ) break; } @@ -943,7 +943,7 @@ static const SwFrm *lcl_FindFirstInvaContent( const SwLayoutFrm *pLay, long nBot } // #i37877# - consider drawing objects -static const SwAnchoredObject* lcl_FindFirstInvaObj( const SwPageFrm* _pPage, +static const SwAnchoredObject* lcl_FindFirstInvaObj( const SwPageFrame* _pPage, long _nBottom ) { OSL_ENSURE( _pPage->GetSortedObjs(), "FindFirstInvaObj, no Objs" ); @@ -951,17 +951,17 @@ static const SwAnchoredObject* lcl_FindFirstInvaObj( const SwPageFrm* _pPage, for ( size_t i = 0; i < _pPage->GetSortedObjs()->size(); ++i ) { const SwAnchoredObject* pObj = (*_pPage->GetSortedObjs())[i]; - if ( dynamic_cast< const SwFlyFrm *>( pObj ) != nullptr ) + if ( dynamic_cast< const SwFlyFrame *>( pObj ) != nullptr ) { - const SwFlyFrm* pFly = static_cast<const SwFlyFrm*>(pObj); - if ( pFly->Frm().Top() <= _nBottom ) + const SwFlyFrame* pFly = static_cast<const SwFlyFrame*>(pObj); + if ( pFly->Frame().Top() <= _nBottom ) { if ( pFly->IsInvalid() || pFly->IsCompletePaint() ) return pFly; - const SwFrm* pTmp; + const SwFrame* pTmp; if ( nullptr != (pTmp = lcl_FindFirstInvaContent( pFly, _nBottom, nullptr )) && - pTmp->Frm().Top() <= _nBottom ) + pTmp->Frame().Top() <= _nBottom ) return pFly; } } @@ -984,7 +984,7 @@ static const SwAnchoredObject* lcl_FindFirstInvaObj( const SwPageFrm* _pPage, * For BrowseMode, you may even activate the ShortCut if the invalid content * of the page lies below the visible area. */ -bool SwLayAction::IsShortCut( SwPageFrm *&prPage ) +bool SwLayAction::IsShortCut( SwPageFrame *&prPage ) { vcl::RenderContext* pRenderContext = m_pImp->GetShell()->GetOut(); bool bRet = false; @@ -1003,11 +1003,11 @@ bool SwLayAction::IsShortCut( SwPageFrm *&prPage ) // NOTE: In online layout (bBrowse == true) a page can contain // a header frame and/or a footer frame beside the body frame. prPage->Calc(pRenderContext); - SwFrm* pPageLowerFrm = prPage->Lower(); - while ( pPageLowerFrm ) + SwFrame* pPageLowerFrame = prPage->Lower(); + while ( pPageLowerFrame ) { - pPageLowerFrm->Calc(pRenderContext); - pPageLowerFrm = pPageLowerFrm->GetNext(); + pPageLowerFrame->Calc(pRenderContext); + pPageLowerFrame = pPageLowerFrame->GetNext(); } } else @@ -1017,36 +1017,36 @@ bool SwLayAction::IsShortCut( SwPageFrm *&prPage ) } const SwRect &rVis = m_pImp->GetShell()->VisArea(); - if ( (prPage->Frm().Top() >= rVis.Bottom()) || - (prPage->Frm().Left()>= rVis.Right()) ) + if ( (prPage->Frame().Top() >= rVis.Bottom()) || + (prPage->Frame().Left()>= rVis.Right()) ) { bRet = true; - // This is going to be a bit nasty: The first ContentFrm of this + // This is going to be a bit nasty: The first ContentFrame of this // page in the Body text needs formatting; if it changes the page during // that process, I need to start over a page further back, because we // have been processing a PageBreak. - // Even more uncomfortable: The next ContentFrm must be formatted, + // Even more uncomfortable: The next ContentFrame must be formatted, // because it's possible for empty pages to exist temporarily (for example // a paragraph across multiple pages gets deleted or reduced in size). // This is irrelevant for the browser, if the last Cnt above it // isn't visible anymore. - const SwPageFrm *p2ndPage = prPage; - const SwContentFrm *pContent; - const SwLayoutFrm* pBody = p2ndPage->FindBodyCont(); + const SwPageFrame *p2ndPage = prPage; + const SwContentFrame *pContent; + const SwLayoutFrame* pBody = p2ndPage->FindBodyCont(); if( p2ndPage->IsFootnotePage() && pBody ) - pBody = static_cast<const SwLayoutFrm*>(pBody->GetNext()); + pBody = static_cast<const SwLayoutFrame*>(pBody->GetNext()); pContent = pBody ? pBody->ContainsContent() : nullptr; while ( p2ndPage && !pContent ) { - p2ndPage = static_cast<const SwPageFrm*>(p2ndPage->GetNext()); + p2ndPage = static_cast<const SwPageFrame*>(p2ndPage->GetNext()); if( p2ndPage ) { pBody = p2ndPage->FindBodyCont(); if( p2ndPage->IsFootnotePage() && pBody ) - pBody = static_cast<const SwLayoutFrm*>(pBody->GetNext()); + pBody = static_cast<const SwLayoutFrame*>(pBody->GetNext()); pContent = pBody ? pBody->ContainsContent() : nullptr; } } @@ -1056,15 +1056,15 @@ bool SwLayAction::IsShortCut( SwPageFrm *&prPage ) if ( bBrowse ) { // Is the Cnt before already invisible? - const SwFrm *pLst = pContent; + const SwFrame *pLst = pContent; if ( pLst->IsInTab() ) - pLst = pContent->FindTabFrm(); + pLst = pContent->FindTabFrame(); if ( pLst->IsInSct() ) - pLst = pContent->FindSctFrm(); + pLst = pContent->FindSctFrame(); pLst = pLst->FindPrev(); if ( pLst && - (pLst->Frm().Top() >= rVis.Bottom() || - pLst->Frm().Left()>= rVis.Right()) ) + (pLst->Frame().Top() >= rVis.Bottom() || + pLst->Frame().Left()>= rVis.Right()) ) { bTstCnt = false; } @@ -1079,7 +1079,7 @@ bool SwLayAction::IsShortCut( SwPageFrm *&prPage ) if ( pContent->IsInSct() ) { - const SwSectionFrm *pSct = const_cast<SwFrm*>(static_cast<SwFrm const *>(pContent))->ImplFindSctFrm(); + const SwSectionFrame *pSct = const_cast<SwFrame*>(static_cast<SwFrame const *>(pContent))->ImplFindSctFrame(); if ( !pSct->IsValid() ) { pSct->Calc(pRenderContext); @@ -1087,7 +1087,7 @@ bool SwLayAction::IsShortCut( SwPageFrm *&prPage ) if ( IsAgain() ) return false; // #i27756# - bPageChg = pContent->FindPageFrm() != p2ndPage && + bPageChg = pContent->FindPageFrame() != p2ndPage && prPage->GetPrev(); } } @@ -1099,13 +1099,13 @@ bool SwLayAction::IsShortCut( SwPageFrm *&prPage ) if ( IsAgain() ) return false; // #i27756# - bPageChg = pContent->FindPageFrm() != p2ndPage && + bPageChg = pContent->FindPageFrame() != p2ndPage && prPage->GetPrev(); } if ( !bPageChg && pContent->IsInTab() ) { - const SwTabFrm *pTab = const_cast<SwFrm*>(static_cast<SwFrm const *>(pContent))->ImplFindTabFrm(); + const SwTabFrame *pTab = const_cast<SwFrame*>(static_cast<SwFrame const *>(pContent))->ImplFindTabFrame(); if ( !pTab->IsValid() ) { pTab->Calc(pRenderContext); @@ -1113,14 +1113,14 @@ bool SwLayAction::IsShortCut( SwPageFrm *&prPage ) if ( IsAgain() ) return false; // #i27756# - bPageChg = pContent->FindPageFrm() != p2ndPage && + bPageChg = pContent->FindPageFrame() != p2ndPage && prPage->GetPrev(); } } if ( !bPageChg && pContent->IsInSct() ) { - const SwSectionFrm *pSct = const_cast<SwFrm*>(static_cast<SwFrm const *>(pContent))->ImplFindSctFrm(); + const SwSectionFrame *pSct = const_cast<SwFrame*>(static_cast<SwFrame const *>(pContent))->ImplFindSctFrame(); if ( !pSct->IsValid() ) { pSct->Calc(pRenderContext); @@ -1128,7 +1128,7 @@ bool SwLayAction::IsShortCut( SwPageFrm *&prPage ) if ( IsAgain() ) return false; // #i27756# - bPageChg = pContent->FindPageFrm() != p2ndPage && + bPageChg = pContent->FindPageFrame() != p2ndPage && prPage->GetPrev(); } } @@ -1137,15 +1137,15 @@ bool SwLayAction::IsShortCut( SwPageFrm *&prPage ) if ( bPageChg ) { bRet = false; - const SwPageFrm* pTmp = pContent->FindPageFrm(); + const SwPageFrame* pTmp = pContent->FindPageFrame(); if ( pTmp->GetPhyPageNum() < prPage->GetPhyPageNum() && pTmp->IsInvalid() ) { - prPage = const_cast<SwPageFrm*>(pTmp); + prPage = const_cast<SwPageFrame*>(pTmp); } else { - prPage = static_cast<SwPageFrm*>(prPage->GetPrev()); + prPage = static_cast<SwPageFrame*>(prPage->GetPrev()); } } // #121980# - no shortcut, if at previous page @@ -1153,13 +1153,13 @@ bool SwLayAction::IsShortCut( SwPageFrm *&prPage ) else if ( prPage->GetPrev() ) { SwSortedObjs* pObjs = - static_cast<SwPageFrm*>(prPage->GetPrev())->GetSortedObjs(); + static_cast<SwPageFrame*>(prPage->GetPrev())->GetSortedObjs(); if ( pObjs ) { for ( size_t i = 0; i < pObjs->size(); ++i ) { SwAnchoredObject* pObj = (*pObjs)[i]; - if ( pObj->GetAnchorFrmContainingAnchPos() == pContent ) + if ( pObj->GetAnchorFrameContainingAnchPos() == pContent ) { bRet = false; break; @@ -1182,16 +1182,16 @@ bool SwLayAction::IsShortCut( SwPageFrm *&prPage ) { return false; } - const SwFrm* pFrm( nullptr ); + const SwFrame* pFrame( nullptr ); if ( prPage->IsInvalidLayout() && - nullptr != (pFrm = lcl_FindFirstInvaLay( prPage, nBottom )) && - pFrm->Frm().Top() <= nBottom ) + nullptr != (pFrame = lcl_FindFirstInvaLay( prPage, nBottom )) && + pFrame->Frame().Top() <= nBottom ) { return false; } if ( (prPage->IsInvalidContent() || prPage->IsInvalidFlyInCnt()) && - nullptr != (pFrm = lcl_FindFirstInvaContent( prPage, nBottom, nullptr )) && - pFrm->Frm().Top() <= nBottom ) + nullptr != (pFrame = lcl_FindFirstInvaContent( prPage, nBottom, nullptr )) && + pFrame->Frame().Top() <= nBottom ) { return false; } @@ -1201,7 +1201,7 @@ bool SwLayAction::IsShortCut( SwPageFrm *&prPage ) } // OD 15.11.2002 #105155# - introduce support for vertical layout -bool SwLayAction::FormatLayout( OutputDevice *pRenderContext, SwLayoutFrm *pLay, bool bAddRect ) +bool SwLayAction::FormatLayout( OutputDevice *pRenderContext, SwLayoutFrame *pLay, bool bAddRect ) { OSL_ENSURE( !IsAgain(), "Attention to the invalid page." ); if ( IsAgain() ) @@ -1210,55 +1210,55 @@ bool SwLayAction::FormatLayout( OutputDevice *pRenderContext, SwLayoutFrm *pLay, bool bChanged = false; bool bAlreadyPainted = false; // OD 11.11.2002 #104414# - remember frame at complete paint - SwRect aFrmAtCompletePaint; + SwRect aFrameAtCompletePaint; if ( !pLay->IsValid() || pLay->IsCompletePaint() ) { if ( pLay->GetPrev() && !pLay->GetPrev()->IsValid() ) pLay->GetPrev()->SetCompletePaint(); - SwRect aOldFrame( pLay->Frm() ); + SwRect aOldFrame( pLay->Frame() ); SwRect aOldRect( aOldFrame ); - if( pLay->IsPageFrm() ) + if( pLay->IsPageFrame() ) { - aOldRect = static_cast<SwPageFrm*>(pLay)->GetBoundRect(pRenderContext); + aOldRect = static_cast<SwPageFrame*>(pLay)->GetBoundRect(pRenderContext); } { - SwFrmDeleteGuard aDeleteGuard(pLay); + SwFrameDeleteGuard aDeleteGuard(pLay); pLay->Calc(pRenderContext); } - if ( aOldFrame != pLay->Frm() ) + if ( aOldFrame != pLay->Frame() ) bChanged = true; bool bNoPaint = false; - if ( pLay->IsPageBodyFrm() && - pLay->Frm().Pos() == aOldRect.Pos() && + if ( pLay->IsPageBodyFrame() && + pLay->Frame().Pos() == aOldRect.Pos() && pLay->Lower() ) { - const SwViewShell *pSh = pLay->getRootFrm()->GetCurrShell(); + const SwViewShell *pSh = pLay->getRootFrame()->GetCurrShell(); // Limitations because of headers / footers if( pSh && pSh->GetViewOptions()->getBrowseMode() && - !( pLay->IsCompletePaint() && pLay->FindPageFrm()->FindFootnoteCont() ) ) + !( pLay->IsCompletePaint() && pLay->FindPageFrame()->FindFootnoteCont() ) ) bNoPaint = true; } if ( !bNoPaint && IsPaint() && bAddRect && (pLay->IsCompletePaint() || bChanged) ) { - SwRect aPaint( pLay->Frm() ); + SwRect aPaint( pLay->Frame() ); // #i9719# - consider border and shadow for // page frames -> enlarge paint rectangle correspondingly. - if ( pLay->IsPageFrm() ) + if ( pLay->IsPageFrame() ) { - SwPageFrm* pPageFrm = static_cast<SwPageFrm*>(pLay); - aPaint = pPageFrm->GetBoundRect(pRenderContext); + SwPageFrame* pPageFrame = static_cast<SwPageFrame*>(pLay); + aPaint = pPageFrame->GetBoundRect(pRenderContext); } - bool bPageInBrowseMode = pLay->IsPageFrm(); + bool bPageInBrowseMode = pLay->IsPageFrame(); if( bPageInBrowseMode ) { - const SwViewShell *pSh = pLay->getRootFrm()->GetCurrShell(); + const SwViewShell *pSh = pLay->getRootFrame()->GetCurrShell(); if( !pSh || !pSh->GetViewOptions()->getBrowseMode() ) bPageInBrowseMode = false; } @@ -1290,28 +1290,28 @@ bool SwLayAction::FormatLayout( OutputDevice *pRenderContext, SwLayoutFrm *pLay, m_pImp->GetShell()->AddPaintRect( aPaint ); bAlreadyPainted = true; // OD 11.11.2002 #104414# - remember frame at complete paint - aFrmAtCompletePaint = pLay->Frm(); + aFrameAtCompletePaint = pLay->Frame(); } // #i9719# - provide paint of spacing // between pages (not only for in online mode). - if ( pLay->IsPageFrm() ) + if ( pLay->IsPageFrame() ) { - const SwViewShell *pSh = pLay->getRootFrm()->GetCurrShell(); + const SwViewShell *pSh = pLay->getRootFrame()->GetCurrShell(); const SwTwips nHalfDocBorder = pSh ? pSh->GetViewOptions()->GetGapBetweenPages() : SwViewOption::GetDefGapBetweenPages(); const bool bLeftToRightViewLayout = m_pRoot->IsLeftToRightViewLayout(); const bool bPrev = bLeftToRightViewLayout ? pLay->GetPrev() : pLay->GetNext(); const bool bNext = bLeftToRightViewLayout ? pLay->GetNext() : pLay->GetPrev(); - SwPageFrm* pPageFrm = static_cast<SwPageFrm*>(pLay); - SwRect aPageRect( pLay->Frm() ); + SwPageFrame* pPageFrame = static_cast<SwPageFrame*>(pLay); + SwRect aPageRect( pLay->Frame() ); if(pSh) { - SwPageFrm::GetBorderAndShadowBoundRect(aPageRect, pSh, + SwPageFrame::GetBorderAndShadowBoundRect(aPageRect, pSh, pRenderContext, - aPageRect, pPageFrm->IsLeftShadowNeeded(), pPageFrm->IsRightShadowNeeded(), - pPageFrm->SidebarPosition() == sw::sidebarwindows::SidebarPosition::RIGHT); + aPageRect, pPageFrame->IsLeftShadowNeeded(), pPageFrame->IsRightShadowNeeded(), + pPageFrame->SidebarPosition() == sw::sidebarwindows::SidebarPosition::RIGHT); } if ( bPrev ) @@ -1319,14 +1319,14 @@ bool SwLayAction::FormatLayout( OutputDevice *pRenderContext, SwLayoutFrm *pLay, // top SwRect aSpaceToPrevPage( aPageRect ); aSpaceToPrevPage.Top( aSpaceToPrevPage.Top() - nHalfDocBorder ); - aSpaceToPrevPage.Bottom( pLay->Frm().Top() ); + aSpaceToPrevPage.Bottom( pLay->Frame().Top() ); if(aSpaceToPrevPage.Height() > 0 && aSpaceToPrevPage.Width() > 0) m_pImp->GetShell()->AddPaintRect( aSpaceToPrevPage ); // left aSpaceToPrevPage = aPageRect; aSpaceToPrevPage.Left( aSpaceToPrevPage.Left() - nHalfDocBorder ); - aSpaceToPrevPage.Right( pLay->Frm().Left() ); + aSpaceToPrevPage.Right( pLay->Frame().Left() ); if(aSpaceToPrevPage.Height() > 0 && aSpaceToPrevPage.Width() > 0) m_pImp->GetShell()->AddPaintRect( aSpaceToPrevPage ); } @@ -1335,14 +1335,14 @@ bool SwLayAction::FormatLayout( OutputDevice *pRenderContext, SwLayoutFrm *pLay, // bottom SwRect aSpaceToNextPage( aPageRect ); aSpaceToNextPage.Bottom( aSpaceToNextPage.Bottom() + nHalfDocBorder ); - aSpaceToNextPage.Top( pLay->Frm().Bottom() ); + aSpaceToNextPage.Top( pLay->Frame().Bottom() ); if(aSpaceToNextPage.Height() > 0 && aSpaceToNextPage.Width() > 0) m_pImp->GetShell()->AddPaintRect( aSpaceToNextPage ); // right aSpaceToNextPage = aPageRect; aSpaceToNextPage.Right( aSpaceToNextPage.Right() + nHalfDocBorder ); - aSpaceToNextPage.Left( pLay->Frm().Right() ); + aSpaceToNextPage.Left( pLay->Frame().Right() ); if(aSpaceToNextPage.Height() > 0 && aSpaceToNextPage.Width() > 0) m_pImp->GetShell()->AddPaintRect( aSpaceToNextPage ); } @@ -1352,7 +1352,7 @@ bool SwLayAction::FormatLayout( OutputDevice *pRenderContext, SwLayoutFrm *pLay, } if ( IsPaint() && bAddRect && - !pLay->GetNext() && pLay->IsRetoucheFrm() && pLay->IsRetouche() ) + !pLay->GetNext() && pLay->IsRetoucheFrame() && pLay->IsRetouche() ) { // OD 15.11.2002 #105155# - vertical layout support SWRECTFN( pLay ); @@ -1365,27 +1365,27 @@ bool SwLayAction::FormatLayout( OutputDevice *pRenderContext, SwLayoutFrm *pLay, if( bAlreadyPainted ) bAddRect = false; - CheckWaitCrsr(); + CheckWaitCursor(); if ( IsAgain() ) return false; - // Now, deal with the lowers that are LayoutFrms + // Now, deal with the lowers that are LayoutFrames - if ( pLay->IsFootnoteFrm() ) // no LayFrms as Lower + if ( pLay->IsFootnoteFrame() ) // no LayFrames as Lower return bChanged; - SwFrm *pLow = pLay->Lower(); + SwFrame *pLow = pLay->Lower(); bool bTabChanged = false; while ( pLow && pLow->GetUpper() == pLay ) { - if ( pLow->IsLayoutFrm() ) + if ( pLow->IsLayoutFrame() ) { - if ( pLow->IsTabFrm() ) - bTabChanged |= FormatLayoutTab( static_cast<SwTabFrm*>(pLow), bAddRect ); + if ( pLow->IsTabFrame() ) + bTabChanged |= FormatLayoutTab( static_cast<SwTabFrame*>(pLow), bAddRect ); // Skip the ones already registered for deletion - else if( !pLow->IsSctFrm() || static_cast<SwSectionFrm*>(pLow)->GetSection() ) - bChanged |= FormatLayout( pRenderContext, static_cast<SwLayoutFrm*>(pLow), bAddRect ); + else if( !pLow->IsSctFrame() || static_cast<SwSectionFrame*>(pLow)->GetSection() ) + bChanged |= FormatLayout( pRenderContext, static_cast<SwLayoutFrame*>(pLow), bAddRect ); } else if ( m_pImp->GetShell()->IsPaintLocked() ) // Shortcut to minimize the cycles. With Lock, the @@ -1399,11 +1399,11 @@ bool SwLayAction::FormatLayout( OutputDevice *pRenderContext, SwLayoutFrm *pLay, // OD 11.11.2002 #104414# - add complete frame area as paint area, if frame // area has been already added and after formatting its lowers the frame area // is enlarged. - SwRect aBoundRect(pLay->IsPageFrm() ? static_cast<SwPageFrm*>(pLay)->GetBoundRect(pRenderContext) : pLay->Frm() ); + SwRect aBoundRect(pLay->IsPageFrame() ? static_cast<SwPageFrame*>(pLay)->GetBoundRect(pRenderContext) : pLay->Frame() ); if ( bAlreadyPainted && - ( aBoundRect.Width() > aFrmAtCompletePaint.Width() || - aBoundRect.Height() > aFrmAtCompletePaint.Height() ) + ( aBoundRect.Width() > aFrameAtCompletePaint.Width() || + aBoundRect.Height() > aFrameAtCompletePaint.Height() ) ) { m_pImp->GetShell()->AddPaintRect( aBoundRect ); @@ -1411,7 +1411,7 @@ bool SwLayAction::FormatLayout( OutputDevice *pRenderContext, SwLayoutFrm *pLay, return bChanged || bTabChanged; } -bool SwLayAction::FormatLayoutFly( SwFlyFrm* pFly ) +bool SwLayAction::FormatLayoutFly( SwFlyFrame* pFly ) { vcl::RenderContext* pRenderContext = m_pImp->GetShell()->GetOut(); OSL_ENSURE( !IsAgain(), "Attention to the invalid page." ); @@ -1424,13 +1424,13 @@ bool SwLayAction::FormatLayoutFly( SwFlyFrm* pFly ) if ( !pFly->IsValid() || pFly->IsCompletePaint() || pFly->IsInvalid() ) { // The Frame has changed, now it's getting formatted. - const SwRect aOldRect( pFly->Frm() ); + const SwRect aOldRect( pFly->Frame() ); pFly->Calc(pRenderContext); - bChanged = aOldRect != pFly->Frm(); + bChanged = aOldRect != pFly->Frame(); if ( IsPaint() && (pFly->IsCompletePaint() || bChanged) && - pFly->Frm().Top() > 0 && pFly->Frm().Left() > 0 ) - m_pImp->GetShell()->AddPaintRect( pFly->Frm() ); + pFly->Frame().Top() > 0 && pFly->Frame().Left() > 0 ) + m_pImp->GetShell()->AddPaintRect( pFly->Frame() ); if ( bChanged ) pFly->Invalidate(); @@ -1444,17 +1444,17 @@ bool SwLayAction::FormatLayoutFly( SwFlyFrm* pFly ) if ( IsAgain() ) return false; - // Now, deal with the lowers that are LayoutFrms + // Now, deal with the lowers that are LayoutFrames bool bTabChanged = false; - SwFrm *pLow = pFly->Lower(); + SwFrame *pLow = pFly->Lower(); while ( pLow ) { - if ( pLow->IsLayoutFrm() ) + if ( pLow->IsLayoutFrame() ) { - if ( pLow->IsTabFrm() ) - bTabChanged |= FormatLayoutTab( static_cast<SwTabFrm*>(pLow), bAddRect ); + if ( pLow->IsTabFrame() ) + bTabChanged |= FormatLayoutTab( static_cast<SwTabFrame*>(pLow), bAddRect ); else - bChanged |= FormatLayout( m_pImp->GetShell()->GetOut(), static_cast<SwLayoutFrm*>(pLow), bAddRect ); + bChanged |= FormatLayout( m_pImp->GetShell()->GetOut(), static_cast<SwLayoutFrame*>(pLow), bAddRect ); } pLow = pLow->GetNext(); } @@ -1463,7 +1463,7 @@ bool SwLayAction::FormatLayoutFly( SwFlyFrm* pFly ) // OD 31.10.2002 #104100# // Implement vertical layout support -bool SwLayAction::FormatLayoutTab( SwTabFrm *pTab, bool bAddRect ) +bool SwLayAction::FormatLayoutTab( SwTabFrame *pTab, bool bAddRect ) { OSL_ENSURE( !IsAgain(), "8-) Attention to the invalid page." ); if ( IsAgain() || !pTab->Lower() ) @@ -1476,7 +1476,7 @@ bool SwLayAction::FormatLayoutTab( SwTabFrm *pTab, bool bAddRect ) bool bChanged = false; bool bPainted = false; - const SwPageFrm *pOldPage = pTab->FindPageFrm(); + const SwPageFrame *pOldPage = pTab->FindPageFrame(); // OD 31.10.2002 #104100# - vertical layout support // use macro to declare and init <bool bVert>, <bool bRev> and @@ -1490,24 +1490,24 @@ bool SwLayAction::FormatLayoutTab( SwTabFrm *pTab, bool bAddRect ) pTab->GetPrev()->SetCompletePaint(); } - const SwRect aOldRect( pTab->Frm() ); + const SwRect aOldRect( pTab->Frame() ); pTab->SetLowersFormatted( false ); pTab->Calc(pRenderContext); - if ( aOldRect != pTab->Frm() ) + if ( aOldRect != pTab->Frame() ) { bChanged = true; } - const SwRect aPaintFrm = pTab->PaintArea(); + const SwRect aPaintFrame = pTab->PaintArea(); if ( IsPaint() && bAddRect ) { - // OD 01.11.2002 #104100# - add condition <pTab->Frm().HasArea()> + // OD 01.11.2002 #104100# - add condition <pTab->Frame().HasArea()> if ( !pTab->IsCompletePaint() && pTab->IsComplete() && - ( pTab->Frm().SSize() != pTab->Prt().SSize() || + ( pTab->Frame().SSize() != pTab->Prt().SSize() || // OD 31.10.2002 #104100# - vertical layout support (pTab->*fnRect->fnGetLeftMargin)() ) && - pTab->Frm().HasArea() + pTab->Frame().HasArea() ) { // OD 01.11.2002 #104100# - re-implement calculation of margin rectangles. @@ -1516,14 +1516,14 @@ bool SwLayAction::FormatLayoutTab( SwTabFrm *pTab, bool bAddRect ) SwTwips nLeftMargin = (pTab->*fnRect->fnGetLeftMargin)(); if ( nLeftMargin > 0) { - aMarginRect = pTab->Frm(); + aMarginRect = pTab->Frame(); (aMarginRect.*fnRect->fnSetWidth)( nLeftMargin ); m_pImp->GetShell()->AddPaintRect( aMarginRect ); } if ( (pTab->*fnRect->fnGetRightMargin)() > 0) { - aMarginRect = pTab->Frm(); + aMarginRect = pTab->Frame(); (aMarginRect.*fnRect->fnSetLeft)( (pTab->*fnRect->fnGetPrtRight)() ); m_pImp->GetShell()->AddPaintRect( aMarginRect ); } @@ -1531,21 +1531,21 @@ bool SwLayAction::FormatLayoutTab( SwTabFrm *pTab, bool bAddRect ) SwTwips nTopMargin = (pTab->*fnRect->fnGetTopMargin)(); if ( nTopMargin > 0) { - aMarginRect = pTab->Frm(); + aMarginRect = pTab->Frame(); (aMarginRect.*fnRect->fnSetHeight)( nTopMargin ); m_pImp->GetShell()->AddPaintRect( aMarginRect ); } if ( (pTab->*fnRect->fnGetBottomMargin)() > 0) { - aMarginRect = pTab->Frm(); + aMarginRect = pTab->Frame(); (aMarginRect.*fnRect->fnSetTop)( (pTab->*fnRect->fnGetPrtBottom)() ); m_pImp->GetShell()->AddPaintRect( aMarginRect ); } } else if ( pTab->IsCompletePaint() ) { - m_pImp->GetShell()->AddPaintRect( aPaintFrm ); + m_pImp->GetShell()->AddPaintRect( aPaintFrame ); bAddRect = false; bPainted = true; } @@ -1578,13 +1578,13 @@ bool SwLayAction::FormatLayoutTab( SwTabFrm *pTab, bool bAddRect ) pTab->ResetRetouche(); } - CheckWaitCrsr(); + CheckWaitCursor(); rTimerAccess.UnblockIdling(); // Ugly shortcut! if ( pTab->IsLowersFormatted() && - (bPainted || !m_pImp->GetShell()->VisArea().IsOver( pTab->Frm())) ) + (bPainted || !m_pImp->GetShell()->VisArea().IsOver( pTab->Frame())) ) return false; // Now, deal with the lowers @@ -1593,28 +1593,28 @@ bool SwLayAction::FormatLayoutTab( SwTabFrm *pTab, bool bAddRect ) // OD 20.10.2003 #112464# - for savety reasons: // check page number before formatting lowers. - if ( pOldPage->GetPhyPageNum() > (pTab->FindPageFrm()->GetPhyPageNum() + 1) ) + if ( pOldPage->GetPhyPageNum() > (pTab->FindPageFrame()->GetPhyPageNum() + 1) ) SetNextCycle( true ); // OD 20.10.2003 #112464# - format lowers, only if table frame is valid if ( pTab->IsValid() ) { - SwLayoutFrm *pLow = static_cast<SwLayoutFrm*>(pTab->Lower()); + SwLayoutFrame *pLow = static_cast<SwLayoutFrame*>(pTab->Lower()); while ( pLow ) { bChanged |= FormatLayout( m_pImp->GetShell()->GetOut(), pLow, bAddRect ); if ( IsAgain() ) return false; - pLow = static_cast<SwLayoutFrm*>(pLow->GetNext()); + pLow = static_cast<SwLayoutFrame*>(pLow->GetNext()); } } return bChanged; } -bool SwLayAction::FormatContent( const SwPageFrm *pPage ) +bool SwLayAction::FormatContent( const SwPageFrame *pPage ) { - const SwContentFrm *pContent = pPage->ContainsContent(); + const SwContentFrame *pContent = pPage->ContainsContent(); const SwViewShell *pSh = m_pRoot->GetCurrShell(); const bool bBrowse = pSh && pSh->GetViewOptions()->getBrowseMode(); @@ -1627,11 +1627,11 @@ bool SwLayAction::FormatContent( const SwPageFrm *pPage ) { // We do this so we don't have to search later on. const bool bNxtCnt = IsCalcLayout() && !pContent->GetFollow(); - const SwContentFrm *pContentNext = bNxtCnt ? pContent->GetNextContentFrm() : nullptr; - const SwContentFrm *pContentPrev = pContent->GetPrev() ? pContent->GetPrevContentFrm() : nullptr; + const SwContentFrame *pContentNext = bNxtCnt ? pContent->GetNextContentFrame() : nullptr; + const SwContentFrame *pContentPrev = pContent->GetPrev() ? pContent->GetPrevContentFrame() : nullptr; - const SwLayoutFrm*pOldUpper = pContent->GetUpper(); - const SwTabFrm *pTab = pContent->FindTabFrm(); + const SwLayoutFrame*pOldUpper = pContent->GetUpper(); + const SwTabFrame *pTab = pContent->FindTabFrame(); const bool bInValid = !pContent->IsValid() || pContent->IsCompletePaint(); const bool bOldPaint = IsPaint(); m_bPaint = bOldPaint && !(pTab && pTab == m_pOptTab); @@ -1647,20 +1647,20 @@ bool SwLayAction::FormatContent( const SwPageFrm *pPage ) // to the object formatter. if ( !IsAgain() && ( !IsInterrupt() || mbFormatContentOnInterrupt ) && - pContent->IsTextFrm() && - !SwObjectFormatter::FormatObjsAtFrm( *(const_cast<SwContentFrm*>(pContent)), - *(pContent->FindPageFrm()), this ) ) + pContent->IsTextFrame() && + !SwObjectFormatter::FormatObjsAtFrame( *(const_cast<SwContentFrame*>(pContent)), + *(pContent->FindPageFrame()), this ) ) { return false; } - if ( !pContent->GetValidLineNumFlag() && pContent->IsTextFrm() ) + if ( !pContent->GetValidLineNumFlag() && pContent->IsTextFrame() ) { - const sal_uLong nAllLines = static_cast<const SwTextFrm*>(pContent)->GetAllLines(); - const_cast<SwTextFrm*>(static_cast<const SwTextFrm*>(pContent))->RecalcAllLines(); + const sal_uLong nAllLines = static_cast<const SwTextFrame*>(pContent)->GetAllLines(); + const_cast<SwTextFrame*>(static_cast<const SwTextFrame*>(pContent))->RecalcAllLines(); if ( IsPaintExtraData() && IsPaint() && - nAllLines != static_cast<const SwTextFrm*>(pContent)->GetAllLines() ) - m_pImp->GetShell()->AddPaintRect( pContent->Frm() ); + nAllLines != static_cast<const SwTextFrame*>(pContent)->GetAllLines() ) + m_pImp->GetShell()->AddPaintRect( pContent->Frame() ); } if ( IsAgain() ) @@ -1684,11 +1684,11 @@ bool SwLayAction::FormatContent( const SwPageFrm *pPage ) } if ( pOldUpper != pContent->GetUpper() ) { - const sal_uInt16 nCurNum = pContent->FindPageFrm()->GetPhyPageNum(); + const sal_uInt16 nCurNum = pContent->FindPageFrame()->GetPhyPageNum(); if ( nCurNum < pPage->GetPhyPageNum() ) m_nPreInvaPage = nCurNum; - // If the Frm flowed backwards more than one page, we need to + // If the Frame flowed backwards more than one page, we need to // start over again from the beginning, so nothing gets left out. if ( !IsCalcLayout() && pPage->GetPhyPageNum() > nCurNum+1 ) { @@ -1710,7 +1710,7 @@ bool SwLayAction::FormatContent( const SwPageFrm *pPage ) if ( !pContentPrev->IsValid() && pPage->IsAnLower( pContentPrev ) ) pPage->InvalidateContent(); if ( pOldUpper != pContent->GetUpper() && - pPage->GetPhyPageNum() < pContent->FindPageFrm()->GetPhyPageNum() ) + pPage->GetPhyPageNum() < pContent->FindPageFrame()->GetPhyPageNum() ) { pContent = pContentPrev; bSetContent = false; @@ -1719,10 +1719,10 @@ bool SwLayAction::FormatContent( const SwPageFrm *pPage ) if ( bSetContent ) { if ( bBrowse && !IsIdle() && !IsCalcLayout() && !IsComplete() && - pContent->Frm().Top() > m_pImp->GetShell()->VisArea().Bottom()) + pContent->Frame().Top() > m_pImp->GetShell()->VisArea().Bottom()) { const long nBottom = m_pImp->GetShell()->VisArea().Bottom(); - const SwFrm *pTmp = lcl_FindFirstInvaContent( pPage, + const SwFrame *pTmp = lcl_FindFirstInvaContent( pPage, nBottom, pContent ); if ( !pTmp ) { @@ -1738,26 +1738,26 @@ bool SwLayAction::FormatContent( const SwPageFrm *pPage ) } } } - pContent = bNxtCnt ? pContentNext : pContent->GetNextContentFrm(); + pContent = bNxtCnt ? pContentNext : pContent->GetNextContentFrame(); } RESCHEDULE; } else { - if ( !pContent->GetValidLineNumFlag() && pContent->IsTextFrm() ) + if ( !pContent->GetValidLineNumFlag() && pContent->IsTextFrame() ) { - const sal_uLong nAllLines = static_cast<const SwTextFrm*>(pContent)->GetAllLines(); - const_cast<SwTextFrm*>(static_cast<const SwTextFrm*>(pContent))->RecalcAllLines(); + const sal_uLong nAllLines = static_cast<const SwTextFrame*>(pContent)->GetAllLines(); + const_cast<SwTextFrame*>(static_cast<const SwTextFrame*>(pContent))->RecalcAllLines(); if ( IsPaintExtraData() && IsPaint() && - nAllLines != static_cast<const SwTextFrm*>(pContent)->GetAllLines() ) - m_pImp->GetShell()->AddPaintRect( pContent->Frm() ); + nAllLines != static_cast<const SwTextFrame*>(pContent)->GetAllLines() ) + m_pImp->GetShell()->AddPaintRect( pContent->Frame() ); } - // Do this if the Frm has been formatted before. - if ( pContent->IsTextFrm() && static_cast<const SwTextFrm*>(pContent)->HasRepaint() && + // Do this if the Frame has been formatted before. + if ( pContent->IsTextFrame() && static_cast<const SwTextFrame*>(pContent)->HasRepaint() && IsPaint() ) - PaintContent( pContent, pPage, pContent->Frm(), pContent->Frm().Bottom()); + PaintContent( pContent, pPage, pContent->Frame(), pContent->Frame().Bottom()); if ( IsIdle() ) { CheckIdleEnd(); @@ -1766,10 +1766,10 @@ bool SwLayAction::FormatContent( const SwPageFrm *pPage ) return false; } if ( bBrowse && !IsIdle() && !IsCalcLayout() && !IsComplete() && - pContent->Frm().Top() > m_pImp->GetShell()->VisArea().Bottom()) + pContent->Frame().Top() > m_pImp->GetShell()->VisArea().Bottom()) { const long nBottom = m_pImp->GetShell()->VisArea().Bottom(); - const SwFrm *pTmp = lcl_FindFirstInvaContent( pPage, + const SwFrame *pTmp = lcl_FindFirstInvaContent( pPage, nBottom, pContent ); if ( !pTmp ) { @@ -1785,16 +1785,16 @@ bool SwLayAction::FormatContent( const SwPageFrm *pPage ) } } } - pContent = pContent->GetNextContentFrm(); + pContent = pContent->GetNextContentFrame(); } } - CheckWaitCrsr(); + CheckWaitCursor(); // OD 14.04.2003 #106346# - consider interrupt formatting. return !IsInterrupt() || mbFormatContentOnInterrupt; } -void SwLayAction::_FormatContent( const SwContentFrm *pContent, - const SwPageFrm *pPage ) +void SwLayAction::_FormatContent( const SwContentFrame *pContent, + const SwPageFrame *pPage ) { // We probably only ended up here because the Content holds DrawObjects. const bool bDrawObjsOnly = pContent->IsValid() && !pContent->IsCompletePaint() && @@ -1802,84 +1802,84 @@ void SwLayAction::_FormatContent( const SwContentFrm *pContent, SWRECTFN( pContent ) if ( !bDrawObjsOnly && IsPaint() ) { - const SwRect aOldRect( pContent->UnionFrm() ); + const SwRect aOldRect( pContent->UnionFrame() ); const long nOldBottom = (pContent->*fnRect->fnGetPrtBottom)(); pContent->OptCalc(); if( IsAgain() ) return; - if( (*fnRect->fnYDiff)( (pContent->Frm().*fnRect->fnGetBottom)(), + if( (*fnRect->fnYDiff)( (pContent->Frame().*fnRect->fnGetBottom)(), (aOldRect.*fnRect->fnGetBottom)() ) < 0 ) { pContent->SetRetouche(); } - PaintContent( pContent, pContent->FindPageFrm(), aOldRect, nOldBottom); + PaintContent( pContent, pContent->FindPageFrame(), aOldRect, nOldBottom); } else { - if ( IsPaint() && pContent->IsTextFrm() && static_cast<const SwTextFrm*>(pContent)->HasRepaint() ) - PaintContent( pContent, pPage, pContent->Frm(), - (pContent->Frm().*fnRect->fnGetBottom)() ); + if ( IsPaint() && pContent->IsTextFrame() && static_cast<const SwTextFrame*>(pContent)->HasRepaint() ) + PaintContent( pContent, pPage, pContent->Frame(), + (pContent->Frame().*fnRect->fnGetBottom)() ); pContent->OptCalc(); } } /// Returns true if all Contents of the Fly have been processed completely. /// Returns false if processing has been interrupted prematurely. -bool SwLayAction::_FormatFlyContent( const SwFlyFrm *pFly ) +bool SwLayAction::_FormatFlyContent( const SwFlyFrame *pFly ) { - const SwContentFrm *pContent = pFly->ContainsContent(); + const SwContentFrame *pContent = pFly->ContainsContent(); while ( pContent ) { // OD 2004-05-10 #i28701# - _FormatContent( pContent, pContent->FindPageFrm() ); + _FormatContent( pContent, pContent->FindPageFrame() ); // #i28701# - format floating screen objects // at content text frame // #i23129#, #i36347# - pass correct page frame // to the object formatter. - if ( pContent->IsTextFrm() && - !SwObjectFormatter::FormatObjsAtFrm( - *(const_cast<SwContentFrm*>(pContent)), - *(pContent->FindPageFrm()), this ) ) + if ( pContent->IsTextFrame() && + !SwObjectFormatter::FormatObjsAtFrame( + *(const_cast<SwContentFrame*>(pContent)), + *(pContent->FindPageFrame()), this ) ) { // restart format with first content pContent = pFly->ContainsContent(); continue; } - if ( !pContent->GetValidLineNumFlag() && pContent->IsTextFrm() ) + if ( !pContent->GetValidLineNumFlag() && pContent->IsTextFrame() ) { - const sal_uLong nAllLines = static_cast<const SwTextFrm*>(pContent)->GetAllLines(); - const_cast<SwTextFrm*>(static_cast<const SwTextFrm*>(pContent))->RecalcAllLines(); + const sal_uLong nAllLines = static_cast<const SwTextFrame*>(pContent)->GetAllLines(); + const_cast<SwTextFrame*>(static_cast<const SwTextFrame*>(pContent))->RecalcAllLines(); if ( IsPaintExtraData() && IsPaint() && - nAllLines != static_cast<const SwTextFrm*>(pContent)->GetAllLines() ) - m_pImp->GetShell()->AddPaintRect( pContent->Frm() ); + nAllLines != static_cast<const SwTextFrame*>(pContent)->GetAllLines() ) + m_pImp->GetShell()->AddPaintRect( pContent->Frame() ); } if ( IsAgain() ) return false; // If there's input, we interrupt processing. - if ( !pFly->IsFlyInCntFrm() ) + if ( !pFly->IsFlyInContentFrame() ) { CheckIdleEnd(); // OD 14.04.2003 #106346# - consider interrupt formatting. if ( IsInterrupt() && !mbFormatContentOnInterrupt ) return false; } - pContent = pContent->GetNextContentFrm(); + pContent = pContent->GetNextContentFrame(); } - CheckWaitCrsr(); + CheckWaitCursor(); // OD 14.04.2003 #106346# - consider interrupt formatting. return !(IsInterrupt() && !mbFormatContentOnInterrupt); } -bool SwLayIdle::_DoIdleJob( const SwContentFrm *pCnt, IdleJobType eJob ) +bool SwLayIdle::_DoIdleJob( const SwContentFrame *pCnt, IdleJobType eJob ) { - OSL_ENSURE( pCnt->IsTextFrm(), "NoText neighbour of Text" ); + OSL_ENSURE( pCnt->IsTextFrame(), "NoText neighbour of Text" ); // robust against misuse by e.g. #i52542# - if( !pCnt->IsTextFrm() ) + if( !pCnt->IsTextFrame() ) return false; const SwTextNode* pTextNode = pCnt->GetNode()->GetTextNode(); @@ -1903,13 +1903,13 @@ bool SwLayIdle::_DoIdleJob( const SwContentFrm *pCnt, IdleJobType eJob ) if( COMPLETE_STRING == nTextPos ) { --nTextPos; - if( dynamic_cast< const SwCrsrShell *>( pSh ) != nullptr && !static_cast<SwCrsrShell*>(pSh)->IsTableMode() ) + if( dynamic_cast< const SwCursorShell *>( pSh ) != nullptr && !static_cast<SwCursorShell*>(pSh)->IsTableMode() ) { - SwPaM *pCrsr = static_cast<SwCrsrShell*>(pSh)->GetCrsr(); - if( !pCrsr->HasMark() && !pCrsr->IsMultiSelection() ) + SwPaM *pCursor = static_cast<SwCursorShell*>(pSh)->GetCursor(); + if( !pCursor->HasMark() && !pCursor->IsMultiSelection() ) { - pContentNode = pCrsr->GetContentNode(); - nTextPos = pCrsr->GetPoint()->nContent.GetIndex(); + pContentNode = pCursor->GetContentNode(); + nTextPos = pCursor->GetPoint()->nContent.GetIndex(); } } } @@ -1918,7 +1918,7 @@ bool SwLayIdle::_DoIdleJob( const SwContentFrm *pCnt, IdleJobType eJob ) { case ONLINE_SPELLING : { - SwRect aRepaint( const_cast<SwTextFrm*>(static_cast<const SwTextFrm*>(pCnt))->_AutoSpell( pContentNode, nTextPos ) ); + SwRect aRepaint( const_cast<SwTextFrame*>(static_cast<const SwTextFrame*>(pCnt))->_AutoSpell( pContentNode, nTextPos ) ); // tdf#92036 PENDING should stop idle spell checking bPageValid = bPageValid && (SwTextNode::WrongState::TODO != pTextNode->GetWrongDirty()); if( !bPageValid ) @@ -1930,7 +1930,7 @@ bool SwLayIdle::_DoIdleJob( const SwContentFrm *pCnt, IdleJobType eJob ) break; } case AUTOCOMPLETE_WORDS : - const_cast<SwTextFrm*>(static_cast<const SwTextFrm*>(pCnt))->CollectAutoCmplWrds( pContentNode, nTextPos ); + const_cast<SwTextFrame*>(static_cast<const SwTextFrame*>(pCnt))->CollectAutoCmplWrds( pContentNode, nTextPos ); // note: bPageValid remains true here even if the cursor // position is skipped, so no PENDING state needed currently if (Application::AnyInput(VCL_INPUT_ANY & VclInputFlags(~VclInputFlags::TIMER))) @@ -1948,7 +1948,7 @@ bool SwLayIdle::_DoIdleJob( const SwContentFrm *pCnt, IdleJobType eJob ) case SMART_TAGS : { try { - const SwRect aRepaint( const_cast<SwTextFrm*>(static_cast<const SwTextFrm*>(pCnt))->SmartTagScan( pContentNode, nTextPos ) ); + const SwRect aRepaint( const_cast<SwTextFrame*>(static_cast<const SwTextFrame*>(pCnt))->SmartTagScan( pContentNode, nTextPos ) ); bPageValid = bPageValid && !pTextNode->IsSmartTagDirty(); if( !bPageValid ) bAllValid = false; @@ -1972,20 +1972,20 @@ bool SwLayIdle::_DoIdleJob( const SwContentFrm *pCnt, IdleJobType eJob ) for ( size_t i = 0; i < rObjs.size(); ++i ) { SwAnchoredObject* pObj = rObjs[i]; - if ( dynamic_cast< const SwFlyFrm *>( pObj ) != nullptr ) + if ( dynamic_cast< const SwFlyFrame *>( pObj ) != nullptr ) { - SwFlyFrm* pFly = static_cast<SwFlyFrm*>(pObj); - if ( pFly->IsFlyInCntFrm() ) + SwFlyFrame* pFly = static_cast<SwFlyFrame*>(pObj); + if ( pFly->IsFlyInContentFrame() ) { - const SwContentFrm *pC = pFly->ContainsContent(); + const SwContentFrame *pC = pFly->ContainsContent(); while( pC ) { - if ( pC->IsTextFrm() ) + if ( pC->IsTextFrame() ) { if ( _DoIdleJob( pC, eJob ) ) return true; } - pC = pC->GetNextContentFrm(); + pC = pC->GetNextContentFrame(); } } } @@ -2026,11 +2026,11 @@ bool SwLayIdle::DoIdleJob( IdleJobType eJob, bool bVisAreaOnly ) default: OSL_FAIL( "Unknown idle job type" ); } - SwPageFrm *pPage; + SwPageFrame *pPage; if ( bVisAreaOnly ) pPage = pImp->GetFirstVisPage(pViewShell->GetOut()); else - pPage = static_cast<SwPageFrm*>(pRoot->Lower()); + pPage = static_cast<SwPageFrame*>(pRoot->Lower()); pContentNode = nullptr; nTextPos = COMPLETE_STRING; @@ -2038,12 +2038,12 @@ bool SwLayIdle::DoIdleJob( IdleJobType eJob, bool bVisAreaOnly ) while ( pPage ) { bPageValid = true; - const SwContentFrm *pCnt = pPage->ContainsContent(); + const SwContentFrame *pCnt = pPage->ContainsContent(); while( pCnt && pPage->IsAnLower( pCnt ) ) { if ( _DoIdleJob( pCnt, eJob ) ) return true; - pCnt = pCnt->GetNextContentFrm(); + pCnt = pCnt->GetNextContentFrame(); } if ( pPage->GetSortedObjs() ) { @@ -2051,18 +2051,18 @@ bool SwLayIdle::DoIdleJob( IdleJobType eJob, bool bVisAreaOnly ) i < pPage->GetSortedObjs()->size(); ++i ) { const SwAnchoredObject* pObj = (*pPage->GetSortedObjs())[i]; - if ( dynamic_cast< const SwFlyFrm *>( pObj ) != nullptr ) + if ( dynamic_cast< const SwFlyFrame *>( pObj ) != nullptr ) { - const SwFlyFrm *pFly = static_cast<const SwFlyFrm*>(pObj); - const SwContentFrm *pC = pFly->ContainsContent(); + const SwFlyFrame *pFly = static_cast<const SwFlyFrame*>(pObj); + const SwContentFrame *pC = pFly->ContainsContent(); while( pC ) { - if ( pC->IsTextFrm() ) + if ( pC->IsTextFrame() ) { if ( _DoIdleJob( pC, eJob ) ) return true; } - pC = pC->GetNextContentFrm(); + pC = pC->GetNextContentFrame(); } } } @@ -2079,9 +2079,9 @@ bool SwLayIdle::DoIdleJob( IdleJobType eJob, bool bVisAreaOnly ) } } - pPage = static_cast<SwPageFrm*>(pPage->GetNext()); + pPage = static_cast<SwPageFrame*>(pPage->GetNext()); if ( pPage && bVisAreaOnly && - !pPage->Frm().IsOver( pImp->GetShell()->VisArea())) + !pPage->Frame().IsOver( pImp->GetShell()->VisArea())) break; } return false; @@ -2112,7 +2112,7 @@ void SwLayIdle::ShowIdle( ColorData eColorData ) #define SHOW_IDLE( ColorData ) #endif // DBG_UTIL -SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewShellImp *pI ) : +SwLayIdle::SwLayIdle( SwRootFrame *pRt, SwViewShellImp *pI ) : pRoot( pRt ), pImp( pI ) #ifdef DBG_UTIL @@ -2143,9 +2143,9 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewShellImp *pI ) : { ++rSh.mnStartAction; bool bVis = false; - if ( dynamic_cast<const SwCrsrShell*>( &rSh) != nullptr ) + if ( dynamic_cast<const SwCursorShell*>( &rSh) != nullptr ) { - bVis = static_cast<SwCrsrShell*>(&rSh)->GetCharRect().IsOver(rSh.VisArea()); + bVis = static_cast<SwCursorShell*>(&rSh)->GetCharRect().IsOver(rSh.VisArea()); } aBools.push_back( bVis ); } @@ -2177,15 +2177,15 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewShellImp *pI ) : // Are we supposed to crash if rSh isn't a cursor shell?! // bActions |= aTmp != rSh.VisArea() || - // aBools[nBoolIdx] != ((SwCrsrShell*)&rSh)->GetCharRect().IsOver( rSh.VisArea() ); + // aBools[nBoolIdx] != ((SwCursorShell*)&rSh)->GetCharRect().IsOver( rSh.VisArea() ); // aBools[ i ] is true, if the i-th shell is a cursor shell (!!!) // and the cursor is visible. bActions |= aTmp != rSh.VisArea(); - if ( aTmp == rSh.VisArea() && dynamic_cast<const SwCrsrShell*>( &rSh) != nullptr ) + if ( aTmp == rSh.VisArea() && dynamic_cast<const SwCursorShell*>( &rSh) != nullptr ) { bActions |= aBools[nBoolIdx] != - static_cast<SwCrsrShell*>(&rSh)->GetCharRect().IsOver( rSh.VisArea() ); + static_cast<SwCursorShell*>(&rSh)->GetCharRect().IsOver( rSh.VisArea() ); } } @@ -2194,17 +2194,17 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewShellImp *pI ) : if ( bActions ) { - // Prepare start/end actions via CrsrShell, so the cursor, selection + // Prepare start/end actions via CursorShell, so the cursor, selection // and VisArea can be set correctly. nBoolIdx = 0; for(SwViewShell& rSh : pImp->GetShell()->GetRingContainer()) { - SwCrsrShell* pCrsrShell = nullptr; - if(dynamic_cast<const SwCrsrShell*>( &rSh) != nullptr) - pCrsrShell = static_cast<SwCrsrShell*>(&rSh); + SwCursorShell* pCursorShell = nullptr; + if(dynamic_cast<const SwCursorShell*>( &rSh) != nullptr) + pCursorShell = static_cast<SwCursorShell*>(&rSh); - if ( pCrsrShell ) - pCrsrShell->SttCrsrMove(); + if ( pCursorShell ) + pCursorShell->SttCursorMove(); // If there are accrued paints, it's best to simply invalidate // the whole window. Otherwise there would arise paint problems whose @@ -2221,22 +2221,22 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewShellImp *pI ) : bUnlock = true; } - if ( pCrsrShell ) - // If the Crsr was visible, we need to make it visible again. - // Otherwise, EndCrsrMove with true for IdleEnd - pCrsrShell->EndCrsrMove( !aBools[nBoolIdx] ); + if ( pCursorShell ) + // If the Cursor was visible, we need to make it visible again. + // Otherwise, EndCursorMove with true for IdleEnd + pCursorShell->EndCursorMove( !aBools[nBoolIdx] ); if( bUnlock ) { - if( pCrsrShell ) + if( pCursorShell ) { // UnlockPaint overwrite the selection from the - // CrsrShell and calls the virtual method paint + // CursorShell and calls the virtual method paint // to fill the virtual device. This fill don't have // paint the selection! -> Set the focus flag at - // CrsrShell and it doesn't paint the selection. - pCrsrShell->ShLooseFcs(); - pCrsrShell->UnlockPaint( true ); - pCrsrShell->ShGetFcs( false ); + // CursorShell and it doesn't paint the selection. + pCursorShell->ShLooseFcs(); + pCursorShell->UnlockPaint( true ); + pCursorShell->ShGetFcs( false ); } else rSh.UnlockPaint( true ); @@ -2265,7 +2265,7 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewShellImp *pI ) : !pViewShell->GetDoc()->isXForms() && SwSmartTagMgr::Get().IsSmartTagsEnabled(); - SwPageFrm *pPg = static_cast<SwPageFrm*>(pRoot->Lower()); + SwPageFrame *pPg = static_cast<SwPageFrame*>(pRoot->Lower()); do { bInValid = pPg->IsInvalidContent() || pPg->IsInvalidLayout() || @@ -2276,7 +2276,7 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewShellImp *pI ) : (bWordCount && pPg->IsInvalidWordCount()) || (bSmartTags && pPg->IsInvalidSmartTags()); - pPg = static_cast<SwPageFrm*>(pPg->GetNext()); + pPg = static_cast<SwPageFrame*>(pPg->GetNext()); } while ( pPg && !bInValid ); diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx index b25f451f52e7..b5fa19ef6668 100644 --- a/sw/source/core/layout/laycache.cxx +++ b/sw/source/core/layout/laycache.cxx @@ -163,7 +163,7 @@ void SwLayoutCache::Write( SvStream &rStream, const SwDoc& rDoc ) sal_uLong nStartOfContent = rDoc.GetNodes().GetEndOfContent(). StartOfSectionNode()->GetIndex(); // The first page.. - SwPageFrm* pPage = const_cast<SwPageFrm*>(static_cast<const SwPageFrm*>(rDoc.getIDocumentLayoutAccess().GetCurrentLayout()->Lower())); + SwPageFrame* pPage = const_cast<SwPageFrame*>(static_cast<const SwPageFrame*>(rDoc.getIDocumentLayoutAccess().GetCurrentLayout()->Lower())); aIo.OpenRec( SW_LAYCACHE_IO_REC_PAGES ); aIo.OpenFlagRec( 0, 0 ); @@ -172,37 +172,37 @@ void SwLayoutCache::Write( SvStream &rStream, const SwDoc& rDoc ) { if( pPage->GetPrev() ) { - SwLayoutFrm* pLay = pPage->FindBodyCont(); - SwFrm* pTmp = pLay ? pLay->ContainsAny() : nullptr; + SwLayoutFrame* pLay = pPage->FindBodyCont(); + SwFrame* pTmp = pLay ? pLay->ContainsAny() : nullptr; // We are only interested in paragraph or table frames, // a section frames contains paragraphs/tables. - if( pTmp && pTmp->IsSctFrm() ) - pTmp = static_cast<SwSectionFrm*>(pTmp)->ContainsAny(); + if( pTmp && pTmp->IsSctFrame() ) + pTmp = static_cast<SwSectionFrame*>(pTmp)->ContainsAny(); if( pTmp ) // any content { - if( pTmp->IsTextFrm() ) + if( pTmp->IsTextFrame() ) { - sal_uLong nNdIdx = static_cast<SwTextFrm*>(pTmp)->GetNode()->GetIndex(); + sal_uLong nNdIdx = static_cast<SwTextFrame*>(pTmp)->GetNode()->GetIndex(); if( nNdIdx > nStartOfContent ) { /* Open Paragraph Record */ aIo.OpenRec( SW_LAYCACHE_IO_REC_PARA ); - bool bFollow = static_cast<SwTextFrm*>(pTmp)->IsFollow(); + bool bFollow = static_cast<SwTextFrame*>(pTmp)->IsFollow(); aIo.OpenFlagRec( bFollow ? 0x01 : 0x00, bFollow ? 8 : 4 ); nNdIdx -= nStartOfContent; aIo.GetStream().WriteUInt32( nNdIdx ); if( bFollow ) - aIo.GetStream().WriteUInt32( static_cast<SwTextFrm*>(pTmp)->GetOfst() ); + aIo.GetStream().WriteUInt32( static_cast<SwTextFrame*>(pTmp)->GetOfst() ); aIo.CloseFlagRec(); /* Close Paragraph Record */ aIo.CloseRec( SW_LAYCACHE_IO_REC_PARA ); } } - else if( pTmp->IsTabFrm() ) + else if( pTmp->IsTabFrame() ) { - SwTabFrm* pTab = static_cast<SwTabFrm*>(pTmp); + SwTabFrame* pTab = static_cast<SwTabFrame*>(pTmp); sal_uLong nOfst = COMPLETE_STRING; if( pTab->IsFollow() ) { @@ -213,7 +213,7 @@ void SwLayoutCache::Write( SvStream &rStream, const SwDoc& rDoc ) pTab = pTab->FindMaster( true ); while( pTab != pTmp ) { - SwFrm* pSub = pTab->Lower(); + SwFrame* pSub = pTab->Lower(); while( pSub ) { ++nOfst; @@ -248,14 +248,14 @@ void SwLayoutCache::Write( SvStream &rStream, const SwDoc& rDoc ) nOfst = 0; do { - SwFrm* pSub = pTab->Lower(); + SwFrame* pSub = pTab->Lower(); while( pSub ) { ++nOfst; pSub = pSub->GetNext(); } pTab = pTab->GetFollow(); - SwPageFrm *pTabPage = pTab->FindPageFrm(); + SwPageFrame *pTabPage = pTab->FindPageFrame(); if( pTabPage != pPage ) { OSL_ENSURE( pPage->GetPhyPageNum() < @@ -278,10 +278,10 @@ void SwLayoutCache::Write( SvStream &rStream, const SwDoc& rDoc ) for ( size_t i = 0; i < rObjs.size(); ++i ) { SwAnchoredObject* pAnchoredObj = rObjs[i]; - if (SwFlyFrm *pFly = dynamic_cast<SwFlyFrm*>(pAnchoredObj)) + if (SwFlyFrame *pFly = dynamic_cast<SwFlyFrame*>(pAnchoredObj)) { - if( pFly->Frm().Left() != FAR_AWAY && - !pFly->GetAnchorFrm()->FindFooterOrHeader() ) + if( pFly->Frame().Left() != FAR_AWAY && + !pFly->GetAnchorFrame()->FindFooterOrHeader() ) { const SwContact *pC = ::GetUserCall(pAnchoredObj->GetDrawObj()); @@ -293,9 +293,9 @@ void SwLayoutCache::Write( SvStream &rStream, const SwDoc& rDoc ) aIo.OpenRec( SW_LAYCACHE_IO_REC_FLY ); aIo.OpenFlagRec( 0, 0 ); aIo.CloseFlagRec(); - SwRect &rRct = pFly->Frm(); - sal_Int32 nX = rRct.Left() - pPage->Frm().Left(); - sal_Int32 nY = rRct.Top() - pPage->Frm().Top(); + SwRect &rRct = pFly->Frame(); + sal_Int32 nX = rRct.Left() - pPage->Frame().Left(); + sal_Int32 nY = rRct.Top() - pPage->Frame().Top(); aIo.GetStream().WriteUInt16( nPageNum ).WriteUInt32( nOrdNum ) .WriteInt32( nX ).WriteInt32( nY ) .WriteInt32( rRct.Width() ) @@ -307,7 +307,7 @@ void SwLayoutCache::Write( SvStream &rStream, const SwDoc& rDoc ) } } } - pPage = static_cast<SwPageFrm*>(pPage->GetNext()); + pPage = static_cast<SwPageFrame*>(pPage->GetNext()); } aIo.CloseRec( SW_LAYCACHE_IO_REC_PAGES ); } @@ -318,37 +318,37 @@ bool SwLayoutCache::CompareLayout( const SwDoc& rDoc ) const { if( !pImpl ) return true; - const SwRootFrm *pRootFrm = rDoc.getIDocumentLayoutAccess().GetCurrentLayout(); - if( pRootFrm ) + const SwRootFrame *pRootFrame = rDoc.getIDocumentLayoutAccess().GetCurrentLayout(); + if( pRootFrame ) { sal_uInt16 nIndex = 0; sal_uLong nStartOfContent = rDoc.GetNodes().GetEndOfContent(). StartOfSectionNode()->GetIndex(); - const SwPageFrm* pPage = static_cast<const SwPageFrm*>(pRootFrm->Lower()); + const SwPageFrame* pPage = static_cast<const SwPageFrame*>(pRootFrame->Lower()); if( pPage ) - pPage = static_cast<const SwPageFrm*>(pPage->GetNext()); + pPage = static_cast<const SwPageFrame*>(pPage->GetNext()); while( pPage ) { if( nIndex >= pImpl->size() ) return false; - const SwLayoutFrm* pLay = pPage->FindBodyCont(); - const SwFrm* pTmp = pLay ? pLay->ContainsAny() : nullptr; - if( pTmp && pTmp->IsSctFrm() ) - pTmp = static_cast<const SwSectionFrm*>(pTmp)->ContainsAny(); + const SwLayoutFrame* pLay = pPage->FindBodyCont(); + const SwFrame* pTmp = pLay ? pLay->ContainsAny() : nullptr; + if( pTmp && pTmp->IsSctFrame() ) + pTmp = static_cast<const SwSectionFrame*>(pTmp)->ContainsAny(); if( pTmp ) { - if( pTmp->IsTextFrm() ) + if( pTmp->IsTextFrame() ) { - sal_uLong nNdIdx = static_cast<const SwTextFrm*>(pTmp)->GetNode()->GetIndex(); + sal_uLong nNdIdx = static_cast<const SwTextFrame*>(pTmp)->GetNode()->GetIndex(); if( nNdIdx > nStartOfContent ) { - bool bFollow = static_cast<const SwTextFrm*>(pTmp)->IsFollow(); + bool bFollow = static_cast<const SwTextFrame*>(pTmp)->IsFollow(); nNdIdx -= nStartOfContent; if( pImpl->GetBreakIndex( nIndex ) != nNdIdx || SW_LAYCACHE_IO_REC_PARA != pImpl->GetBreakType( nIndex ) || - ( bFollow ? static_cast<const SwTextFrm*>(pTmp)->GetOfst() + ( bFollow ? static_cast<const SwTextFrame*>(pTmp)->GetOfst() : COMPLETE_STRING ) != pImpl->GetBreakOfst( nIndex ) ) { return false; @@ -356,9 +356,9 @@ bool SwLayoutCache::CompareLayout( const SwDoc& rDoc ) const ++nIndex; } } - else if( pTmp->IsTabFrm() ) + else if( pTmp->IsTabFrame() ) { - const SwTabFrm* pTab = static_cast<const SwTabFrm*>(pTmp); + const SwTabFrame* pTab = static_cast<const SwTabFrame*>(pTmp); sal_Int32 nOfst = COMPLETE_STRING; if( pTab->IsFollow() ) { @@ -367,7 +367,7 @@ bool SwLayoutCache::CompareLayout( const SwDoc& rDoc ) const pTab = pTab->FindMaster( true ); while( pTab != pTmp ) { - const SwFrm* pSub = pTab->Lower(); + const SwFrame* pSub = pTab->Lower(); while( pSub ) { ++nOfst; @@ -398,14 +398,14 @@ bool SwLayoutCache::CompareLayout( const SwDoc& rDoc ) const nOfst = 0; do { - const SwFrm* pSub = pTab->Lower(); + const SwFrame* pSub = pTab->Lower(); while( pSub ) { ++nOfst; pSub = pSub->GetNext(); } pTab = pTab->GetFollow(); - const SwPageFrm *pTabPage = pTab->FindPageFrm(); + const SwPageFrame *pTabPage = pTab->FindPageFrame(); if( pTabPage != pPage ) { pPage = pTabPage; @@ -418,7 +418,7 @@ bool SwLayoutCache::CompareLayout( const SwDoc& rDoc ) const } while( pTab ); } } - pPage = static_cast<const SwPageFrm*>(pPage->GetNext()); + pPage = static_cast<const SwPageFrame*>(pPage->GetNext()); } } return true; @@ -442,10 +442,10 @@ SwLayoutCache::~SwLayoutCache() /// helper class to create not nested section frames for nested sections. SwActualSection::SwActualSection( SwActualSection *pUp, - SwSectionFrm *pSect, + SwSectionFrame *pSect, SwSectionNode *pNd ) : pUpper( pUp ), - pSectFrm( pSect ), + pSectFrame( pSect ), pSectNode( pNd ) { if ( !pSectNode ) @@ -461,10 +461,10 @@ SwActualSection::SwActualSection( SwActualSection *pUp, * If there's no layout cache, the distibution to the pages is more * a guess, but a guess with statistical background. */ -SwLayHelper::SwLayHelper( SwDoc *pD, SwFrm* &rpF, SwFrm* &rpP, SwPageFrm* &rpPg, - SwLayoutFrm* &rpL, SwActualSection* &rpA, bool &rB, +SwLayHelper::SwLayHelper( SwDoc *pD, SwFrame* &rpF, SwFrame* &rpP, SwPageFrame* &rpPg, + SwLayoutFrame* &rpL, SwActualSection* &rpA, bool &rB, sal_uLong nNodeIndex, bool bCache ) - : rpFrm( rpF ) + : rpFrame( rpF ) , rpPrv( rpP ) , rpPage( rpPg ) , rpLay( rpL ) @@ -558,8 +558,8 @@ sal_uLong SwLayHelper::CalcPageCount() if ( nNdCount < 1000 ) nPgCount = 0;// no progress bar for small documents SwViewShell *pSh = nullptr; - if( rpLay && rpLay->getRootFrm() ) - pSh = rpLay->getRootFrm()->GetCurrShell(); + if( rpLay && rpLay->getRootFrame() ) + pSh = rpLay->getRootFrame()->GetCurrShell(); if( pSh && pSh->GetViewOptions()->getBrowseMode() ) nMaxParaPerPage *= 6; } @@ -579,13 +579,13 @@ sal_uLong SwLayHelper::CalcPageCount() bool SwLayHelper::CheckInsertPage() { bool bEnd = nullptr == rpPage->GetNext(); - const SwAttrSet* pAttr = rpFrm->GetAttrSet(); + const SwAttrSet* pAttr = rpFrame->GetAttrSet(); const SvxFormatBreakItem& rBrk = pAttr->GetBreak(); const SwFormatPageDesc& rDesc = pAttr->GetPageDesc(); // #118195# Do not evaluate page description if frame // is a follow frame! - const SwPageDesc* pDesc = rpFrm->IsFlowFrm() && - SwFlowFrm::CastFlowFrm( rpFrm )->IsFollow() ? + const SwPageDesc* pDesc = rpFrame->IsFlowFrame() && + SwFlowFrame::CastFlowFrame( rpFrame )->IsFollow() ? nullptr : rDesc.GetPageDesc(); @@ -606,13 +606,13 @@ bool SwLayHelper::CheckInsertPage() SwFormatPageDesc aFollowDesc( pDesc ); oPgNum = aFollowDesc.GetNumOffset(); if ( oPgNum ) - static_cast<SwRootFrm*>(rpPage->GetUpper())->SetVirtPageNum(true); + static_cast<SwRootFrame*>(rpPage->GetUpper())->SetVirtPageNum(true); } else { oPgNum = rDesc.GetNumOffset(); if ( oPgNum ) - static_cast<SwRootFrm*>(rpPage->GetUpper())->SetVirtPageNum(true); + static_cast<SwRootFrame*>(rpPage->GetUpper())->SetVirtPageNum(true); } bool bNextPageOdd = !rpPage->OnRightPage(); bool bInsertEmpty = false; @@ -629,22 +629,22 @@ bool SwLayHelper::CheckInsertPage() { OSL_ENSURE( rpPage->GetNext(), "No new page?" ); do - { rpPage = static_cast<SwPageFrm*>(rpPage->GetNext()); + { rpPage = static_cast<SwPageFrame*>(rpPage->GetNext()); } while ( rpPage->GetNext() ); } else { OSL_ENSURE( rpPage->GetNext(), "No new page?" ); - rpPage = static_cast<SwPageFrm*>(rpPage->GetNext()); + rpPage = static_cast<SwPageFrame*>(rpPage->GetNext()); if ( rpPage->IsEmptyPage() ) { OSL_ENSURE( rpPage->GetNext(), "No new page?" ); - rpPage = static_cast<SwPageFrm*>(rpPage->GetNext()); + rpPage = static_cast<SwPageFrame*>(rpPage->GetNext()); } } rpLay = rpPage->FindBodyCont(); while( rpLay->Lower() ) - rpLay = static_cast<SwLayoutFrm*>(rpLay->Lower()); + rpLay = static_cast<SwLayoutFrame*>(rpLay->Lower()); return true; } return false; @@ -664,10 +664,10 @@ bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex ) sal_uLong nMaxRowPerPage( 0 ); nNodeIndex -= nStartOfContent; sal_uInt16 nRows( 0 ); - if( rpFrm->IsTabFrm() ) + if( rpFrame->IsTabFrame() ) { //Inside a table counts every row as a paragraph - SwFrm *pLow = static_cast<SwTabFrm*>(rpFrm)->Lower(); + SwFrame *pLow = static_cast<SwTabFrame*>(rpFrame)->Lower(); nRows = 0; do { @@ -688,10 +688,10 @@ bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex ) } else { - SwFrm *pTmp = static_cast<SwTabFrm*>(rpFrm)->Lower(); + SwFrame *pTmp = static_cast<SwTabFrame*>(rpFrame)->Lower(); if( pTmp->GetNext() ) pTmp = pTmp->GetNext(); - pTmp = static_cast<SwRowFrm*>(pTmp)->Lower(); + pTmp = static_cast<SwRowFrame*>(pTmp)->Lower(); sal_uInt16 nCnt = 0; do { @@ -718,7 +718,7 @@ bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex ) #endif // OD 09.04.2003 #108698# - always split a big tables. if ( !bFirst || - ( rpFrm->IsTabFrm() && bLongTab ) + ( rpFrame->IsTabFrame() && bLongTab ) ) { sal_Int32 nRowCount = 0; @@ -756,45 +756,45 @@ bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex ) { bool bSplit = false; sal_uInt16 nRepeat( 0 ); - if( !bLongTab && rpFrm->IsTextFrm() && + if( !bLongTab && rpFrame->IsTextFrame() && SW_LAYCACHE_IO_REC_PARA == nType && - nOfst < static_cast<SwTextFrm*>(rpFrm)->GetTextNode()->GetText().getLength()) + nOfst < static_cast<SwTextFrame*>(rpFrame)->GetTextNode()->GetText().getLength()) bSplit = true; - else if( rpFrm->IsTabFrm() && nRowCount < nOfst && + else if( rpFrame->IsTabFrame() && nRowCount < nOfst && ( bLongTab || SW_LAYCACHE_IO_REC_TABLE == nType ) ) { - nRepeat = static_cast<SwTabFrm*>(rpFrm)-> + nRepeat = static_cast<SwTabFrame*>(rpFrame)-> GetTable()->GetRowsToRepeat(); bSplit = nOfst < nRows && nRowCount + nRepeat < nOfst; bLongTab = bLongTab && bSplit; } if( bSplit ) { - rpFrm->InsertBehind( rpLay, rpPrv ); - rpFrm->Frm().Pos() = rpLay->Frm().Pos(); - rpFrm->Frm().Pos().Y() += 1; - rpPrv = rpFrm; - if( rpFrm->IsTabFrm() ) + rpFrame->InsertBehind( rpLay, rpPrv ); + rpFrame->Frame().Pos() = rpLay->Frame().Pos(); + rpFrame->Frame().Pos().Y() += 1; + rpPrv = rpFrame; + if( rpFrame->IsTabFrame() ) { - SwTabFrm* pTab = static_cast<SwTabFrm*>(rpFrm); + SwTabFrame* pTab = static_cast<SwTabFrame*>(rpFrame); // #i33629#, #i29955# - ::RegistFlys( pTab->FindPageFrm(), pTab ); - SwFrm *pRow = pTab->Lower(); - SwTabFrm *pFoll = new SwTabFrm( *pTab ); + ::RegistFlys( pTab->FindPageFrame(), pTab ); + SwFrame *pRow = pTab->Lower(); + SwTabFrame *pFoll = new SwTabFrame( *pTab ); - SwFrm *pPrv; + SwFrame *pPrv; if( nRepeat > 0 ) { bDontCreateObjects = true; //frmtool // Insert new headlines: sal_uInt16 nRowIdx = 0; - SwRowFrm* pHeadline = nullptr; + SwRowFrame* pHeadline = nullptr; while( nRowIdx < nRepeat ) { OSL_ENSURE( pTab->GetTable()->GetTabLines()[ nRowIdx ], "Table ohne Zeilen?" ); pHeadline = - new SwRowFrm( *pTab->GetTable()->GetTabLines()[ nRowIdx ], pTab ); + new SwRowFrame( *pTab->GetTable()->GetTabLines()[ nRowIdx ], pTab ); pHeadline->SetRepeatedHeadline( true ); pHeadline->InsertBefore( pFoll, nullptr ); pHeadline->RegistFlys(); @@ -815,34 +815,34 @@ bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex ) } while ( pRow ) { - SwFrm* pNxt = pRow->GetNext(); + SwFrame* pNxt = pRow->GetNext(); pRow->RemoveFromLayout(); pRow->InsertBehind( pFoll, pPrv ); pPrv = pRow; pRow = pNxt; } - rpFrm = pFoll; + rpFrame = pFoll; } else { - SwTextFrm *const pNew = static_cast<SwTextFrm*>( - static_cast<SwTextFrm*>(rpFrm) - ->GetTextNode()->MakeFrm(rpFrm)); + SwTextFrame *const pNew = static_cast<SwTextFrame*>( + static_cast<SwTextFrame*>(rpFrame) + ->GetTextNode()->MakeFrame(rpFrame)); pNew->ManipOfst( nOfst ); - pNew->SetFollow( static_cast<SwTextFrm*>(rpFrm)->GetFollow() ); - static_cast<SwTextFrm*>(rpFrm)->SetFollow( pNew ); - rpFrm = pNew; + pNew->SetFollow( static_cast<SwTextFrame*>(rpFrame)->GetFollow() ); + static_cast<SwTextFrame*>(rpFrame)->SetFollow( pNew ); + rpFrame = pNew; } } } } - SwPageFrm* pLastPage = rpPage; + SwPageFrame* pLastPage = rpPage; if( CheckInsertPage() ) { _CheckFlyCache( pLastPage ); - if( rpPrv && rpPrv->IsTextFrm() && !rpPrv->GetValidSizeFlag() ) - rpPrv->Frm().Height( rpPrv->GetUpper()->Prt().Height() ); + if( rpPrv && rpPrv->IsTextFrame() && !rpPrv->GetValidSizeFlag() ) + rpPrv->Frame().Height( rpPrv->GetUpper()->Prt().Height() ); bRet = true; rpPrv = nullptr; @@ -850,31 +850,31 @@ bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex ) if ( rpActualSection ) { - //Did the SectionFrm even have a content? If not, we can + //Did the SectionFrame even have a content? If not, we can //directly put it somewhere else - SwSectionFrm *pSct; + SwSectionFrame *pSct; bool bInit = false; - if ( !rpActualSection->GetSectionFrm()->ContainsContent()) + if ( !rpActualSection->GetSectionFrame()->ContainsContent()) { - pSct = rpActualSection->GetSectionFrm(); + pSct = rpActualSection->GetSectionFrame(); pSct->RemoveFromLayout(); } else { - pSct = new SwSectionFrm( - *rpActualSection->GetSectionFrm(), false ); - rpActualSection->GetSectionFrm()->SimpleFormat(); + pSct = new SwSectionFrame( + *rpActualSection->GetSectionFrame(), false ); + rpActualSection->GetSectionFrame()->SimpleFormat(); bInit = true; } - rpActualSection->SetSectionFrm( pSct ); + rpActualSection->SetSectionFrame( pSct ); pSct->InsertBehind( rpLay, nullptr ); if( bInit ) pSct->Init(); - pSct->Frm().Pos() = rpLay->Frm().Pos(); - pSct->Frm().Pos().Y() += 1; //because of the notifications + pSct->Frame().Pos() = rpLay->Frame().Pos(); + pSct->Frame().Pos().Y() += 1; //because of the notifications rpLay = pSct; - if ( rpLay->Lower() && rpLay->Lower()->IsLayoutFrm() ) + if ( rpLay->Lower() && rpLay->Lower()->IsLayoutFrame() ) rpLay = rpLay->GetNextLayoutLeaf(); } } @@ -906,7 +906,7 @@ struct FlyCacheCompare * If there are text frames with default position, the fly cache * is checked, if these frames are stored in the cache. */ -void SwLayHelper::_CheckFlyCache( SwPageFrm* pPage ) +void SwLayHelper::_CheckFlyCache( SwPageFrame* pPage ) { if( !pImpl || !pPage ) return; @@ -942,10 +942,10 @@ void SwLayHelper::_CheckFlyCache( SwPageFrm* pPage ) for ( size_t i = 0; i < rObjs.size(); ++i ) { SwAnchoredObject* pAnchoredObj = rObjs[i]; - if (SwFlyFrm *pFly = dynamic_cast<SwFlyFrm*>(pAnchoredObj)) // a text frame? + if (SwFlyFrame *pFly = dynamic_cast<SwFlyFrame*>(pAnchoredObj)) // a text frame? { - if( pFly->GetAnchorFrm() && - !pFly->GetAnchorFrm()->FindFooterOrHeader() ) + if( pFly->GetAnchorFrame() && + !pFly->GetAnchorFrame()->FindFooterOrHeader() ) { const SwContact *pC = ::GetUserCall( pAnchoredObj->GetDrawObj() ); if( pC ) @@ -966,19 +966,19 @@ void SwLayHelper::_CheckFlyCache( SwPageFrm* pPage ) while ( aFlyCacheSetIt != aFlyCacheSet.end() ) { const SwFlyCache* pFlyCache = *aFlyCacheSetIt; - SwFlyFrm* pFly = const_cast<SwVirtFlyDrawObj*>(static_cast<const SwVirtFlyDrawObj*>(*aFlySetIt))->GetFlyFrm(); + SwFlyFrame* pFly = const_cast<SwVirtFlyDrawObj*>(static_cast<const SwVirtFlyDrawObj*>(*aFlySetIt))->GetFlyFrame(); - if ( pFly->Frm().Left() == FAR_AWAY ) + if ( pFly->Frame().Left() == FAR_AWAY ) { // we get the stored information - pFly->Frm().Pos().X() = pFlyCache->Left() + - pPage->Frm().Left(); - pFly->Frm().Pos().Y() = pFlyCache->Top() + - pPage->Frm().Top(); + pFly->Frame().Pos().X() = pFlyCache->Left() + + pPage->Frame().Left(); + pFly->Frame().Pos().Y() = pFlyCache->Top() + + pPage->Frame().Top(); if ( pImpl->IsUseFlyCache() ) { - pFly->Frm().Width( pFlyCache->Width() ); - pFly->Frm().Height( pFlyCache->Height() ); + pFly->Frame().Width( pFlyCache->Width() ); + pFly->Frame().Height( pFlyCache->Height() ); } } diff --git a/sw/source/core/layout/layhelp.hxx b/sw/source/core/layout/layhelp.hxx index 00d2762cf737..f3a56cef2ae1 100644 --- a/sw/source/core/layout/layhelp.hxx +++ b/sw/source/core/layout/layhelp.hxx @@ -26,11 +26,11 @@ #include <deque> class SwDoc; -class SwFrm; -class SwLayoutFrm; -class SwPageFrm; -class SwFlyFrm; -class SwSectionFrm; +class SwFrame; +class SwLayoutFrame; +class SwPageFrame; +class SwFlyFrame; +class SwSectionFrame; class SwSectionNode; class SvStream; @@ -81,15 +81,15 @@ public: class SwActualSection { SwActualSection *pUpper; - SwSectionFrm *pSectFrm; + SwSectionFrame *pSectFrame; SwSectionNode *pSectNode; public: SwActualSection( SwActualSection *pUpper, - SwSectionFrm *pSect, + SwSectionFrame *pSect, SwSectionNode *pNd ); - SwSectionFrm *GetSectionFrm() { return pSectFrm; } - void SetSectionFrm( SwSectionFrm *p ) { pSectFrm = p; } + SwSectionFrame *GetSectionFrame() { return pSectFrame; } + void SetSectionFrame( SwSectionFrame *p ) { pSectFrame = p; } SwSectionNode *GetSectionNode() { return pSectNode;} SwActualSection *GetUpper() { return pUpper; } }; @@ -98,10 +98,10 @@ public: // If there's a layoutcache available, this information is used. class SwLayHelper { - SwFrm* &rpFrm; - SwFrm* &rpPrv; - SwPageFrm* &rpPage; - SwLayoutFrm* &rpLay; + SwFrame* &rpFrame; + SwFrame* &rpPrv; + SwPageFrame* &rpPage; + SwLayoutFrame* &rpLay; SwActualSection* &rpActualSection; bool &rbBreakAfter; SwDoc* pDoc; @@ -112,10 +112,10 @@ class SwLayHelper sal_uInt16 nIndex; // the index in the page break array size_t nFlyIdx; // the index in the fly cache array bool bFirst : 1; - void _CheckFlyCache( SwPageFrm* pPage ); + void _CheckFlyCache( SwPageFrame* pPage ); public: - SwLayHelper( SwDoc *pD, SwFrm* &rpF, SwFrm* &rpP, SwPageFrm* &rpPg, - SwLayoutFrm* &rpL, SwActualSection* &rpA, bool &rBrk, + SwLayHelper( SwDoc *pD, SwFrame* &rpF, SwFrame* &rpP, SwPageFrame* &rpPg, + SwLayoutFrame* &rpL, SwActualSection* &rpA, bool &rBrk, sal_uLong nNodeIndex, bool bCache ); ~SwLayHelper(); sal_uLong CalcPageCount(); @@ -125,7 +125,7 @@ public: /// Look for fresh text frames at this (new) page and set them to the right /// position, if they are in the fly cache. - void CheckFlyCache( SwPageFrm* pPage ) + void CheckFlyCache( SwPageFrame* pPage ) { if( pImpl && nFlyIdx < pImpl->GetFlyCount() ) _CheckFlyCache( pPage ); } }; diff --git a/sw/source/core/layout/layouter.cxx b/sw/source/core/layout/layouter.cxx index 70e2fc8c0920..98c436dc008e 100644 --- a/sw/source/core/layout/layouter.cxx +++ b/sw/source/core/layout/layouter.cxx @@ -37,29 +37,29 @@ class SwLooping sal_uInt16 nCount; sal_uInt16 mnLoopControlStage; public: - explicit SwLooping( SwPageFrm* pPage ); - void Control( SwPageFrm* pPage ); - void Drastic( SwFrm* pFrm ); + explicit SwLooping( SwPageFrame* pPage ); + void Control( SwPageFrame* pPage ); + void Drastic( SwFrame* pFrame ); bool IsLoopingLouieLight() const { return nCount > LOOP_DETECT - 30; }; }; class SwEndnoter { SwLayouter* pMaster; - SwSectionFrm* pSect; - SwFootnoteFrms* pEndArr; + SwSectionFrame* pSect; + SwFootnoteFrames* pEndArr; public: explicit SwEndnoter( SwLayouter* pLay ) : pMaster( pLay ), pSect( nullptr ), pEndArr( nullptr ) {} ~SwEndnoter() { delete pEndArr; } - void CollectEndnotes( SwSectionFrm* pSct ); - void CollectEndnote( SwFootnoteFrm* pFootnote ); - const SwSectionFrm* GetSect() const { return pSect; } + void CollectEndnotes( SwSectionFrame* pSct ); + void CollectEndnote( SwFootnoteFrame* pFootnote ); + const SwSectionFrame* GetSect() const { return pSect; } void InsertEndnotes(); bool HasEndnotes() const { return pEndArr && !pEndArr->empty(); } }; -void SwEndnoter::CollectEndnotes( SwSectionFrm* pSct ) +void SwEndnoter::CollectEndnotes( SwSectionFrame* pSct ) { OSL_ENSURE( pSct, "CollectEndnotes: Which section?" ); if( !pSect ) @@ -69,7 +69,7 @@ void SwEndnoter::CollectEndnotes( SwSectionFrm* pSct ) pSect->CollectEndnotes( pMaster ); } -void SwEndnoter::CollectEndnote( SwFootnoteFrm* pFootnote ) +void SwEndnoter::CollectEndnote( SwFootnoteFrame* pFootnote ) { if( pEndArr && pEndArr->end() != std::find( pEndArr->begin(), pEndArr->end(), pFootnote ) ) return; @@ -77,24 +77,24 @@ void SwEndnoter::CollectEndnote( SwFootnoteFrm* pFootnote ) if( pFootnote->GetUpper() ) { // pFootnote is the master, he incorporates its follows - SwFootnoteFrm *pNxt = pFootnote->GetFollow(); + SwFootnoteFrame *pNxt = pFootnote->GetFollow(); while ( pNxt ) { - SwFrm *pCnt = pNxt->ContainsAny(); + SwFrame *pCnt = pNxt->ContainsAny(); if ( pCnt ) { do - { SwFrm *pNxtCnt = pCnt->GetNext(); + { SwFrame *pNxtCnt = pCnt->GetNext(); pCnt->Cut(); pCnt->Paste( pFootnote ); pCnt = pNxtCnt; } while ( pCnt ); } else - { OSL_ENSURE( pNxt->Lower() && pNxt->Lower()->IsSctFrm(), + { OSL_ENSURE( pNxt->Lower() && pNxt->Lower()->IsSctFrame(), "Endnote without content?" ); pNxt->Cut(); - SwFrm::DestroyFrm(pNxt); + SwFrame::DestroyFrame(pNxt); } pNxt = pFootnote->GetFollow(); } @@ -106,16 +106,16 @@ void SwEndnoter::CollectEndnote( SwFootnoteFrm* pFootnote ) { for ( size_t i = 0; i < pEndArr->size(); ++i ) { - SwFootnoteFrm *pEndFootnote = (*pEndArr)[i]; + SwFootnoteFrame *pEndFootnote = (*pEndArr)[i]; if( pEndFootnote->GetAttr() == pFootnote->GetAttr() ) { - SwFrm::DestroyFrm(pFootnote); + SwFrame::DestroyFrame(pFootnote); return; } } } if( !pEndArr ) - pEndArr = new SwFootnoteFrms; // deleted from the SwLayouter + pEndArr = new SwFootnoteFrames; // deleted from the SwLayouter pEndArr->push_back( pFootnote ); } @@ -128,18 +128,18 @@ void SwEndnoter::InsertEndnotes() pSect = nullptr; return; } - OSL_ENSURE( pSect->Lower() && pSect->Lower()->IsFootnoteBossFrm(), + OSL_ENSURE( pSect->Lower() && pSect->Lower()->IsFootnoteBossFrame(), "InsertEndnotes: Where's my column?" ); - SwFrm* pRef = pSect->FindLastContent( FINDMODE_MYLAST ); - SwFootnoteBossFrm *pBoss = pRef ? pRef->FindFootnoteBossFrm() - : static_cast<SwFootnoteBossFrm*>(pSect->Lower()); + SwFrame* pRef = pSect->FindLastContent( FINDMODE_MYLAST ); + SwFootnoteBossFrame *pBoss = pRef ? pRef->FindFootnoteBossFrame() + : static_cast<SwFootnoteBossFrame*>(pSect->Lower()); pBoss->_MoveFootnotes( *pEndArr ); delete pEndArr; pEndArr = nullptr; pSect = nullptr; } -SwLooping::SwLooping( SwPageFrm* pPage ) +SwLooping::SwLooping( SwPageFrame* pPage ) { OSL_ENSURE( pPage, "Where's my page?" ); nMinPage = pPage->GetPhyPageNum(); @@ -148,16 +148,16 @@ SwLooping::SwLooping( SwPageFrm* pPage ) mnLoopControlStage = 0; } -void SwLooping::Drastic( SwFrm* pFrm ) +void SwLooping::Drastic( SwFrame* pFrame ) { - while( pFrm ) + while( pFrame ) { - pFrm->ValidateThisAndAllLowers( mnLoopControlStage ); - pFrm = pFrm->GetNext(); + pFrame->ValidateThisAndAllLowers( mnLoopControlStage ); + pFrame = pFrame->GetNext(); } } -void SwLooping::Control( SwPageFrm* pPage ) +void SwLooping::Control( SwPageFrame* pPage ) { if( !pPage ) return; @@ -193,9 +193,9 @@ void SwLooping::Control( SwPageFrm* pPage ) Drastic( pPage->Lower() ); if( nNew > nMinPage && pPage->GetPrev() ) - Drastic( static_cast<SwPageFrm*>(pPage->GetPrev())->Lower() ); + Drastic( static_cast<SwPageFrame*>(pPage->GetPrev())->Lower() ); if( nNew < nMaxPage && pPage->GetNext() ) - Drastic( static_cast<SwPageFrm*>(pPage->GetNext())->Lower() ); + Drastic( static_cast<SwPageFrame*>(pPage->GetNext())->Lower() ); ++mnLoopControlStage; nCount = 0; @@ -206,7 +206,7 @@ SwLayouter::SwLayouter() : mpEndnoter( nullptr ), mpLooping( nullptr ), // #i28701# - mpMovedFwdFrms( nullptr ), + mpMovedFwdFrames( nullptr ), // #i35911# mpObjsTmpConsiderWrapInfl( nullptr ) { @@ -217,14 +217,14 @@ SwLayouter::~SwLayouter() delete mpEndnoter; delete mpLooping; // #i28701# - delete mpMovedFwdFrms; - mpMovedFwdFrms = nullptr; + delete mpMovedFwdFrames; + mpMovedFwdFrames = nullptr; // #i35911# delete mpObjsTmpConsiderWrapInfl; mpObjsTmpConsiderWrapInfl = nullptr; } -void SwLayouter::_CollectEndnotes( SwSectionFrm* pSect ) +void SwLayouter::_CollectEndnotes( SwSectionFrame* pSect ) { if( !mpEndnoter ) mpEndnoter = new SwEndnoter( this ); @@ -236,36 +236,36 @@ bool SwLayouter::HasEndnotes() const return mpEndnoter->HasEndnotes(); } -void SwLayouter::CollectEndnote( SwFootnoteFrm* pFootnote ) +void SwLayouter::CollectEndnote( SwFootnoteFrame* pFootnote ) { mpEndnoter->CollectEndnote( pFootnote ); } -void SwLayouter::InsertEndnotes( SwSectionFrm* pSect ) +void SwLayouter::InsertEndnotes( SwSectionFrame* pSect ) { if( !mpEndnoter || mpEndnoter->GetSect() != pSect ) return; mpEndnoter->InsertEndnotes(); } -void SwLayouter::LoopControl( SwPageFrm* pPage, sal_uInt8 ) +void SwLayouter::LoopControl( SwPageFrame* pPage, sal_uInt8 ) { OSL_ENSURE( mpLooping, "Looping: Lost control" ); mpLooping->Control( pPage ); } -void SwLayouter::LoopingLouieLight( const SwDoc& rDoc, const SwTextFrm& rFrm ) +void SwLayouter::LoopingLouieLight( const SwDoc& rDoc, const SwTextFrame& rFrame ) { if ( mpLooping && mpLooping->IsLoopingLouieLight() ) { #if OSL_DEBUG_LEVEL > 1 OSL_FAIL( "Looping Louie (Light): Fixating fractious frame" ); #endif - SwLayouter::InsertMovedFwdFrm( rDoc, rFrm, rFrm.FindPageFrm()->GetPhyPageNum() ); + SwLayouter::InsertMovedFwdFrame( rDoc, rFrame, rFrame.FindPageFrame()->GetPhyPageNum() ); } } -bool SwLayouter::StartLooping( SwPageFrm* pPage ) +bool SwLayouter::StartLooping( SwPageFrame* pPage ) { if( mpLooping ) return false; @@ -279,7 +279,7 @@ void SwLayouter::EndLoopControl() mpLooping = nullptr; } -void SwLayouter::CollectEndnotes( SwDoc* pDoc, SwSectionFrm* pSect ) +void SwLayouter::CollectEndnotes( SwDoc* pDoc, SwSectionFrame* pSect ) { assert(pDoc && "No doc, no fun"); if( !pDoc->getIDocumentLayoutAccess().GetLayouter() ) @@ -287,7 +287,7 @@ void SwLayouter::CollectEndnotes( SwDoc* pDoc, SwSectionFrm* pSect ) pDoc->getIDocumentLayoutAccess().GetLayouter()->_CollectEndnotes( pSect ); } -bool SwLayouter::Collecting( SwDoc* pDoc, SwSectionFrm* pSect, SwFootnoteFrm* pFootnote ) +bool SwLayouter::Collecting( SwDoc* pDoc, SwSectionFrame* pSect, SwFootnoteFrame* pFootnote ) { if( !pDoc->getIDocumentLayoutAccess().GetLayouter() ) return false; @@ -303,7 +303,7 @@ bool SwLayouter::Collecting( SwDoc* pDoc, SwSectionFrm* pSect, SwFootnoteFrm* pF return false; } -bool SwLayouter::StartLoopControl( SwDoc* pDoc, SwPageFrm *pPage ) +bool SwLayouter::StartLoopControl( SwDoc* pDoc, SwPageFrame *pPage ) { OSL_ENSURE( pDoc, "No doc, no fun" ); if( !pDoc->getIDocumentLayoutAccess().GetLayouter() ) @@ -315,17 +315,17 @@ bool SwLayouter::StartLoopControl( SwDoc* pDoc, SwPageFrm *pPage ) // #i28701# // methods to manage text frames, which are moved forward by the positioning // of its anchored objects -void SwLayouter::ClearMovedFwdFrms( const SwDoc& _rDoc ) +void SwLayouter::ClearMovedFwdFrames( const SwDoc& _rDoc ) { if ( _rDoc.getIDocumentLayoutAccess().GetLayouter() && - _rDoc.getIDocumentLayoutAccess().GetLayouter()->mpMovedFwdFrms ) + _rDoc.getIDocumentLayoutAccess().GetLayouter()->mpMovedFwdFrames ) { - _rDoc.getIDocumentLayoutAccess().GetLayouter()->mpMovedFwdFrms->Clear(); + _rDoc.getIDocumentLayoutAccess().GetLayouter()->mpMovedFwdFrames->Clear(); } } -void SwLayouter::InsertMovedFwdFrm( const SwDoc& _rDoc, - const SwTextFrm& _rMovedFwdFrmByObjPos, +void SwLayouter::InsertMovedFwdFrame( const SwDoc& _rDoc, + const SwTextFrame& _rMovedFwdFrameByObjPos, const sal_uInt32 _nToPageNum ) { if ( !_rDoc.getIDocumentLayoutAccess().GetLayouter() ) @@ -333,29 +333,29 @@ void SwLayouter::InsertMovedFwdFrm( const SwDoc& _rDoc, const_cast<SwDoc&>(_rDoc).getIDocumentLayoutAccess().SetLayouter( new SwLayouter() ); } - if ( !_rDoc.getIDocumentLayoutAccess().GetLayouter()->mpMovedFwdFrms ) + if ( !_rDoc.getIDocumentLayoutAccess().GetLayouter()->mpMovedFwdFrames ) { - const_cast<SwDoc&>(_rDoc).getIDocumentLayoutAccess().GetLayouter()->mpMovedFwdFrms = - new SwMovedFwdFrmsByObjPos(); + const_cast<SwDoc&>(_rDoc).getIDocumentLayoutAccess().GetLayouter()->mpMovedFwdFrames = + new SwMovedFwdFramesByObjPos(); } - _rDoc.getIDocumentLayoutAccess().GetLayouter()->mpMovedFwdFrms->Insert( _rMovedFwdFrmByObjPos, + _rDoc.getIDocumentLayoutAccess().GetLayouter()->mpMovedFwdFrames->Insert( _rMovedFwdFrameByObjPos, _nToPageNum ); } // #i40155# -void SwLayouter::RemoveMovedFwdFrm( const SwDoc& _rDoc, - const SwTextFrm& _rTextFrm ) +void SwLayouter::RemoveMovedFwdFrame( const SwDoc& _rDoc, + const SwTextFrame& _rTextFrame ) { sal_uInt32 nDummy; - if ( SwLayouter::FrmMovedFwdByObjPos( _rDoc, _rTextFrm, nDummy ) ) + if ( SwLayouter::FrameMovedFwdByObjPos( _rDoc, _rTextFrame, nDummy ) ) { - _rDoc.getIDocumentLayoutAccess().GetLayouter()->mpMovedFwdFrms->Remove( _rTextFrm ); + _rDoc.getIDocumentLayoutAccess().GetLayouter()->mpMovedFwdFrames->Remove( _rTextFrame ); } } -bool SwLayouter::FrmMovedFwdByObjPos( const SwDoc& _rDoc, - const SwTextFrm& _rTextFrm, +bool SwLayouter::FrameMovedFwdByObjPos( const SwDoc& _rDoc, + const SwTextFrame& _rTextFrame, sal_uInt32& _ornToPageNum ) { if ( !_rDoc.getIDocumentLayoutAccess().GetLayouter() ) @@ -363,34 +363,34 @@ bool SwLayouter::FrmMovedFwdByObjPos( const SwDoc& _rDoc, _ornToPageNum = 0; return false; } - else if ( !_rDoc.getIDocumentLayoutAccess().GetLayouter()->mpMovedFwdFrms ) + else if ( !_rDoc.getIDocumentLayoutAccess().GetLayouter()->mpMovedFwdFrames ) { _ornToPageNum = 0; return false; } else { - return _rDoc.getIDocumentLayoutAccess().GetLayouter()->mpMovedFwdFrms-> - FrmMovedFwdByObjPos( _rTextFrm, _ornToPageNum ); + return _rDoc.getIDocumentLayoutAccess().GetLayouter()->mpMovedFwdFrames-> + FrameMovedFwdByObjPos( _rTextFrame, _ornToPageNum ); } } // #i26945# -bool SwLayouter::DoesRowContainMovedFwdFrm( const SwDoc& _rDoc, - const SwRowFrm& _rRowFrm ) +bool SwLayouter::DoesRowContainMovedFwdFrame( const SwDoc& _rDoc, + const SwRowFrame& _rRowFrame ) { if ( !_rDoc.getIDocumentLayoutAccess().GetLayouter() ) { return false; } - else if ( !_rDoc.getIDocumentLayoutAccess().GetLayouter()->mpMovedFwdFrms ) + else if ( !_rDoc.getIDocumentLayoutAccess().GetLayouter()->mpMovedFwdFrames ) { return false; } else { return _rDoc.getIDocumentLayoutAccess().GetLayouter()-> - mpMovedFwdFrms->DoesRowContainMovedFwdFrm( _rRowFrm ); + mpMovedFwdFrames->DoesRowContainMovedFwdFrame( _rRowFrame ); } } @@ -421,22 +421,22 @@ void SwLayouter::InsertObjForTmpConsiderWrapInfluence( _rDoc.getIDocumentLayoutAccess().GetLayouter()->mpObjsTmpConsiderWrapInfl->Insert( _rAnchoredObj ); } -void LOOPING_LOUIE_LIGHT( bool bCondition, const SwTextFrm& rTextFrm ) +void LOOPING_LOUIE_LIGHT( bool bCondition, const SwTextFrame& rTextFrame ) { if ( bCondition ) { - const SwDoc& rDoc = *rTextFrm.GetAttrSet()->GetDoc(); + const SwDoc& rDoc = *rTextFrame.GetAttrSet()->GetDoc(); if ( rDoc.getIDocumentLayoutAccess().GetLayouter() ) { - const_cast<SwDoc&>(rDoc).getIDocumentLayoutAccess().GetLayouter()->LoopingLouieLight( rDoc, rTextFrm ); + const_cast<SwDoc&>(rDoc).getIDocumentLayoutAccess().GetLayouter()->LoopingLouieLight( rDoc, rTextFrame ); } } } // #i65250# bool SwLayouter::MoveBwdSuppressed( const SwDoc& p_rDoc, - const SwFlowFrm& p_rFlowFrm, - const SwLayoutFrm& p_rNewUpperFrm ) + const SwFlowFrame& p_rFlowFrame, + const SwLayoutFrame& p_rNewUpperFrame ) { bool bMoveBwdSuppressed( false ); @@ -447,21 +447,21 @@ bool SwLayouter::MoveBwdSuppressed( const SwDoc& p_rDoc, // create hash map key tMoveBwdLayoutInfoKey aMoveBwdLayoutInfo; - aMoveBwdLayoutInfo.mnFrmId = p_rFlowFrm.GetFrm().GetFrmId(); - aMoveBwdLayoutInfo.mnNewUpperPosX = p_rNewUpperFrm.Frm().Pos().X(); - aMoveBwdLayoutInfo.mnNewUpperPosY = p_rNewUpperFrm.Frm().Pos().Y(); - aMoveBwdLayoutInfo.mnNewUpperWidth = p_rNewUpperFrm.Frm().Width(); - aMoveBwdLayoutInfo.mnNewUpperHeight = p_rNewUpperFrm.Frm().Height(); - SWRECTFN( (&p_rNewUpperFrm) ) - const SwFrm* pLastLower( p_rNewUpperFrm.Lower() ); + aMoveBwdLayoutInfo.mnFrameId = p_rFlowFrame.GetFrame().GetFrameId(); + aMoveBwdLayoutInfo.mnNewUpperPosX = p_rNewUpperFrame.Frame().Pos().X(); + aMoveBwdLayoutInfo.mnNewUpperPosY = p_rNewUpperFrame.Frame().Pos().Y(); + aMoveBwdLayoutInfo.mnNewUpperWidth = p_rNewUpperFrame.Frame().Width(); + aMoveBwdLayoutInfo.mnNewUpperHeight = p_rNewUpperFrame.Frame().Height(); + SWRECTFN( (&p_rNewUpperFrame) ) + const SwFrame* pLastLower( p_rNewUpperFrame.Lower() ); while ( pLastLower && pLastLower->GetNext() ) { pLastLower = pLastLower->GetNext(); } aMoveBwdLayoutInfo.mnFreeSpaceInNewUpper = pLastLower - ? (pLastLower->Frm().*fnRect->fnBottomDist)( (p_rNewUpperFrm.*fnRect->fnGetPrtBottom)() ) - : (p_rNewUpperFrm.Frm().*fnRect->fnGetHeight)(); + ? (pLastLower->Frame().*fnRect->fnBottomDist)( (p_rNewUpperFrame.*fnRect->fnGetPrtBottom)() ) + : (p_rNewUpperFrame.Frame().*fnRect->fnGetHeight)(); // check for moving backward suppress threshold const sal_uInt16 cMoveBwdCountSuppressThreshold = 20; diff --git a/sw/source/core/layout/movedfwdfrmsbyobjpos.cxx b/sw/source/core/layout/movedfwdfrmsbyobjpos.cxx index a7c2bf8042c3..f238de1d8fb7 100644 --- a/sw/source/core/layout/movedfwdfrmsbyobjpos.cxx +++ b/sw/source/core/layout/movedfwdfrmsbyobjpos.cxx @@ -23,36 +23,36 @@ #include <pagefrm.hxx> #include <calbck.hxx> -SwMovedFwdFrmsByObjPos::SwMovedFwdFrmsByObjPos() +SwMovedFwdFramesByObjPos::SwMovedFwdFramesByObjPos() { } -SwMovedFwdFrmsByObjPos::~SwMovedFwdFrmsByObjPos() +SwMovedFwdFramesByObjPos::~SwMovedFwdFramesByObjPos() { Clear(); } -void SwMovedFwdFrmsByObjPos::Insert( const SwTextFrm& _rMovedFwdFrmByObjPos, +void SwMovedFwdFramesByObjPos::Insert( const SwTextFrame& _rMovedFwdFrameByObjPos, const sal_uInt32 _nToPageNum ) { - if ( maMovedFwdFrms.end() == - maMovedFwdFrms.find( _rMovedFwdFrmByObjPos.GetTextNode() ) ) + if ( maMovedFwdFrames.end() == + maMovedFwdFrames.find( _rMovedFwdFrameByObjPos.GetTextNode() ) ) { - const NodeMapEntry aEntry( _rMovedFwdFrmByObjPos.GetTextNode(), _nToPageNum ); - maMovedFwdFrms.insert( aEntry ); + const NodeMapEntry aEntry( _rMovedFwdFrameByObjPos.GetTextNode(), _nToPageNum ); + maMovedFwdFrames.insert( aEntry ); } } -void SwMovedFwdFrmsByObjPos::Remove( const SwTextFrm& _rTextFrm ) +void SwMovedFwdFramesByObjPos::Remove( const SwTextFrame& _rTextFrame ) { - maMovedFwdFrms.erase( _rTextFrm.GetTextNode() ); + maMovedFwdFrames.erase( _rTextFrame.GetTextNode() ); } -bool SwMovedFwdFrmsByObjPos::FrmMovedFwdByObjPos( const SwTextFrm& _rTextFrm, +bool SwMovedFwdFramesByObjPos::FrameMovedFwdByObjPos( const SwTextFrame& _rTextFrame, sal_uInt32& _ornToPageNum ) const { - NodeMapIter aIter = maMovedFwdFrms.find( _rTextFrm.GetTextNode() ); - if ( maMovedFwdFrms.end() != aIter ) + NodeMapIter aIter = maMovedFwdFrames.find( _rTextFrame.GetTextNode() ); + if ( maMovedFwdFrames.end() != aIter ) { _ornToPageNum = (*aIter).second; return true; @@ -62,33 +62,33 @@ bool SwMovedFwdFrmsByObjPos::FrmMovedFwdByObjPos( const SwTextFrm& _rTextFrm, } // #i26945# -bool SwMovedFwdFrmsByObjPos::DoesRowContainMovedFwdFrm( const SwRowFrm& _rRowFrm ) const +bool SwMovedFwdFramesByObjPos::DoesRowContainMovedFwdFrame( const SwRowFrame& _rRowFrame ) const { - bool bDoesRowContainMovedFwdFrm( false ); + bool bDoesRowContainMovedFwdFrame( false ); - const sal_uInt32 nPageNumOfRow = _rRowFrm.FindPageFrm()->GetPhyPageNum(); + const sal_uInt32 nPageNumOfRow = _rRowFrame.FindPageFrame()->GetPhyPageNum(); - NodeMapIter aIter = maMovedFwdFrms.begin(); - for ( ; aIter != maMovedFwdFrms.end(); ++aIter ) + NodeMapIter aIter = maMovedFwdFrames.begin(); + for ( ; aIter != maMovedFwdFrames.end(); ++aIter ) { const NodeMapEntry& rEntry = *(aIter); if ( rEntry.second >= nPageNumOfRow ) { - SwIterator<SwTextFrm,SwTextNode> aFrmIter( *rEntry.first ); - for( SwTextFrm* pTextFrm = aFrmIter.First(); pTextFrm; pTextFrm = aFrmIter.Next() ) + SwIterator<SwTextFrame,SwTextNode> aFrameIter( *rEntry.first ); + for( SwTextFrame* pTextFrame = aFrameIter.First(); pTextFrame; pTextFrame = aFrameIter.Next() ) { // #115759# - assure that found text frame // is the first one. - if ( _rRowFrm.IsAnLower( pTextFrm ) && !pTextFrm->GetIndPrev() ) + if ( _rRowFrame.IsAnLower( pTextFrame ) && !pTextFrame->GetIndPrev() ) { - bDoesRowContainMovedFwdFrm = true; + bDoesRowContainMovedFwdFrame = true; break; } } } } - return bDoesRowContainMovedFwdFrm; + return bDoesRowContainMovedFwdFrame; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx index aaa21b335598..9f377bb4456b 100644 --- a/sw/source/core/layout/newfrm.cxx +++ b/sw/source/core/layout/newfrm.cxx @@ -39,11 +39,11 @@ #include <IDocumentFieldsAccess.hxx> #include <DocumentLayoutManager.hxx> -SwLayVout *SwRootFrm::s_pVout = nullptr; -bool SwRootFrm::s_isInPaint = false; -bool SwRootFrm::s_isNoVirDev = false; +SwLayVout *SwRootFrame::s_pVout = nullptr; +bool SwRootFrame::s_isInPaint = false; +bool SwRootFrame::s_isNoVirDev = false; -SwCache *SwFrm::mpCache = nullptr; +SwCache *SwFrame::mpCache = nullptr; long FirstMinusSecond( long nFirst, long nSecond ) { return nFirst - nSecond; } @@ -82,25 +82,25 @@ static SwRectFnCollection aHorizontal = { &SwRect::SetPosX, &SwRect::SetPosY, - &SwFrm::GetTopMargin, - &SwFrm::GetBottomMargin, - &SwFrm::GetLeftMargin, - &SwFrm::GetRightMargin, - &SwFrm::SetLeftRightMargins, - &SwFrm::SetTopBottomMargins, - &SwFrm::GetPrtTop, - &SwFrm::GetPrtBottom, - &SwFrm::GetPrtLeft, - &SwFrm::GetPrtRight, + &SwFrame::GetTopMargin, + &SwFrame::GetBottomMargin, + &SwFrame::GetLeftMargin, + &SwFrame::GetRightMargin, + &SwFrame::SetLeftRightMargins, + &SwFrame::SetTopBottomMargins, + &SwFrame::GetPrtTop, + &SwFrame::GetPrtBottom, + &SwFrame::GetPrtLeft, + &SwFrame::GetPrtRight, &SwRect::GetTopDistance, &SwRect::GetBottomDistance, &SwRect::GetLeftDistance, &SwRect::GetRightDistance, - &SwFrm::SetMaxBottom, + &SwFrame::SetMaxBottom, &SwRect::OverStepBottom, &SwRect::SetUpperLeftCorner, - &SwFrm::MakeBelowPos, + &SwFrame::MakeBelowPos, &FirstMinusSecond, &FirstMinusSecond, &SwIncrement, @@ -137,25 +137,25 @@ static SwRectFnCollection aVertical = { &SwRect::SetPosY, &SwRect::SetPosX, - &SwFrm::GetRightMargin, - &SwFrm::GetLeftMargin, - &SwFrm::GetTopMargin, - &SwFrm::GetBottomMargin, - &SwFrm::SetTopBottomMargins, - &SwFrm::SetRightLeftMargins, - &SwFrm::GetPrtRight, - &SwFrm::GetPrtLeft, - &SwFrm::GetPrtTop, - &SwFrm::GetPrtBottom, + &SwFrame::GetRightMargin, + &SwFrame::GetLeftMargin, + &SwFrame::GetTopMargin, + &SwFrame::GetBottomMargin, + &SwFrame::SetTopBottomMargins, + &SwFrame::SetRightLeftMargins, + &SwFrame::GetPrtRight, + &SwFrame::GetPrtLeft, + &SwFrame::GetPrtTop, + &SwFrame::GetPrtBottom, &SwRect::GetRightDistance, &SwRect::GetLeftDistance, &SwRect::GetTopDistance, &SwRect::GetBottomDistance, - &SwFrm::SetMinLeft, + &SwFrame::SetMinLeft, &SwRect::OverStepLeft, &SwRect::SetUpperRightCorner, - &SwFrm::MakeLeftPos, + &SwFrame::MakeLeftPos, &FirstMinusSecond, &SecondMinusFirst, &SwIncrement, @@ -192,25 +192,25 @@ static SwRectFnCollection aBottomToTop = { &SwRect::SetPosX, &SwRect::SetPosY, - &SwFrm::GetBottomMargin, - &SwFrm::GetTopMargin, - &SwFrm::GetLeftMargin, - &SwFrm::GetRightMargin, - &SwFrm::SetLeftRightMargins, - &SwFrm::SetBottomTopMargins, - &SwFrm::GetPrtBottom, - &SwFrm::GetPrtTop, - &SwFrm::GetPrtLeft, - &SwFrm::GetPrtRight, + &SwFrame::GetBottomMargin, + &SwFrame::GetTopMargin, + &SwFrame::GetLeftMargin, + &SwFrame::GetRightMargin, + &SwFrame::SetLeftRightMargins, + &SwFrame::SetBottomTopMargins, + &SwFrame::GetPrtBottom, + &SwFrame::GetPrtTop, + &SwFrame::GetPrtLeft, + &SwFrame::GetPrtRight, &SwRect::GetBottomDistance, &SwRect::GetTopDistance, &SwRect::GetLeftDistance, &SwRect::GetRightDistance, - &SwFrm::SetMinTop, + &SwFrame::SetMinTop, &SwRect::OverStepTop, &SwRect::SetLowerLeftCorner, - &SwFrm::MakeUpperPos, + &SwFrame::MakeUpperPos, &FirstMinusSecond, &SecondMinusFirst, &SwIncrement, @@ -247,25 +247,25 @@ static SwRectFnCollection aVerticalRightToLeft = { &SwRect::SetPosY, &SwRect::SetPosX, - &SwFrm::GetLeftMargin, - &SwFrm::GetRightMargin, - &SwFrm::GetTopMargin, - &SwFrm::GetBottomMargin, - &SwFrm::SetTopBottomMargins, - &SwFrm::SetLeftRightMargins, - &SwFrm::GetPrtLeft, - &SwFrm::GetPrtRight, - &SwFrm::GetPrtBottom, - &SwFrm::GetPrtTop, + &SwFrame::GetLeftMargin, + &SwFrame::GetRightMargin, + &SwFrame::GetTopMargin, + &SwFrame::GetBottomMargin, + &SwFrame::SetTopBottomMargins, + &SwFrame::SetLeftRightMargins, + &SwFrame::GetPrtLeft, + &SwFrame::GetPrtRight, + &SwFrame::GetPrtBottom, + &SwFrame::GetPrtTop, &SwRect::GetLeftDistance, &SwRect::GetRightDistance, &SwRect::GetBottomDistance, &SwRect::GetTopDistance, - &SwFrm::SetMaxRight, + &SwFrame::SetMaxRight, &SwRect::OverStepRight, &SwRect::SetLowerLeftCorner, - &SwFrm::MakeRightPos, + &SwFrame::MakeRightPos, &FirstMinusSecond, &FirstMinusSecond, &SwDecrement, @@ -302,25 +302,25 @@ static SwRectFnCollection aVerticalLeftToRight = { &SwRect::SetPosY, &SwRect::SetPosX, - &SwFrm::GetLeftMargin, - &SwFrm::GetRightMargin, - &SwFrm::GetTopMargin, - &SwFrm::GetBottomMargin, - &SwFrm::SetTopBottomMargins, - &SwFrm::SetLeftRightMargins, - &SwFrm::GetPrtLeft, - &SwFrm::GetPrtRight, - &SwFrm::GetPrtTop, - &SwFrm::GetPrtBottom, + &SwFrame::GetLeftMargin, + &SwFrame::GetRightMargin, + &SwFrame::GetTopMargin, + &SwFrame::GetBottomMargin, + &SwFrame::SetTopBottomMargins, + &SwFrame::SetLeftRightMargins, + &SwFrame::GetPrtLeft, + &SwFrame::GetPrtRight, + &SwFrame::GetPrtTop, + &SwFrame::GetPrtBottom, &SwRect::GetLeftDistance, &SwRect::GetRightDistance, &SwRect::GetTopDistance, &SwRect::GetBottomDistance, - &SwFrm::SetMaxRight, + &SwFrame::SetMaxRight, &SwRect::OverStepRight, &SwRect::SetUpperLeftCorner, - &SwFrm::MakeRightPos, + &SwFrame::MakeRightPos, &FirstMinusSecond, &FirstMinusSecond, &SwIncrement, @@ -338,36 +338,36 @@ SwRectFn fnRectB2T = &aBottomToTop; SwRectFn fnRectVL2R = &aVerticalRightToLeft; // #i65250# -sal_uInt32 SwFrm::mnLastFrmId=0; +sal_uInt32 SwFrame::mnLastFrameId=0; -void _FrmInit() +void _FrameInit() { - SwRootFrm::s_pVout = new SwLayVout(); + SwRootFrame::s_pVout = new SwLayVout(); SwCache *pNew = new SwCache( 100 #ifdef DBG_UTIL , "static SwBorderAttrs::pCache" #endif ); - SwFrm::SetCache( pNew ); + SwFrame::SetCache( pNew ); } -void _FrmFinit() +void _FrameFinit() { #if OSL_DEBUG_LEVEL > 0 // The cache may only contain null pointers at this time. - for( size_t n = SwFrm::GetCachePtr()->size(); n; ) - if( (*SwFrm::GetCachePtr())[ --n ] ) + for( size_t n = SwFrame::GetCachePtr()->size(); n; ) + if( (*SwFrame::GetCachePtr())[ --n ] ) { - SwCacheObj* pObj = (*SwFrm::GetCachePtr())[ n ]; + SwCacheObj* pObj = (*SwFrame::GetCachePtr())[ n ]; OSL_ENSURE( !pObj, "Who didn't deregister?"); } #endif - delete SwRootFrm::s_pVout; - delete SwFrm::GetCachePtr(); + delete SwRootFrame::s_pVout; + delete SwFrame::GetCachePtr(); } -// RootFrm::Everything that belongs to CurrShell +// RootFrame::Everything that belongs to CurrShell class SwCurrShells : public std::set<CurrShell*> {}; @@ -402,14 +402,14 @@ CurrShell::~CurrShell() void SetShell( SwViewShell *pSh ) { - SwRootFrm *pRoot = pSh->GetLayout(); + SwRootFrame *pRoot = pSh->GetLayout(); if ( pRoot->mpCurrShells->empty() ) pRoot->mpCurrShell = pSh; else pRoot->mpWaitingCurrShell = pSh; } -void SwRootFrm::DeRegisterShell( SwViewShell *pSh ) +void SwRootFrame::DeRegisterShell( SwViewShell *pSh ) { // Activate some shell if possible if ( mpCurrShell == pSh ) @@ -438,18 +438,18 @@ void SwRootFrm::DeRegisterShell( SwViewShell *pSh ) } } -void InitCurrShells( SwRootFrm *pRoot ) +void InitCurrShells( SwRootFrame *pRoot ) { pRoot->mpCurrShells = new SwCurrShells; } /* -|* The RootFrm requests an own FrameFormat from the document, which it is +|* The RootFrame requests an own FrameFormat from the document, which it is |* going to delete again in the dtor. The own FrameFormat is derived from |* the passed FrameFormat. |*/ -SwRootFrm::SwRootFrm( SwFrameFormat *pFormat, SwViewShell * pSh ) : - SwLayoutFrm( pFormat->GetDoc()->MakeFrameFormat( +SwRootFrame::SwRootFrame( SwFrameFormat *pFormat, SwViewShell * pSh ) : + SwLayoutFrame( pFormat->GetDoc()->MakeFrameFormat( "Root", pFormat ), nullptr ), maPagesArea(), mnViewWidth( -1 ), @@ -477,11 +477,11 @@ SwRootFrm::SwRootFrm( SwFrameFormat *pFormat, SwViewShell * pSh ) : mnPhyPageNums( 0 ), mnAccessibleShells( 0 ) { - mnFrmType = FRM_ROOT; - setRootFrm( this ); + mnFrameType = FRM_ROOT; + setRootFrame( this ); } -void SwRootFrm::Init( SwFrameFormat* pFormat ) +void SwRootFrame::Init( SwFrameFormat* pFormat ) { InitCurrShells( this ); @@ -490,7 +490,7 @@ void SwRootFrm::Init( SwFrameFormat* pFormat ) IDocumentFieldsAccess& rFieldsAccess = pFormat->getIDocumentFieldsAccess(); const IDocumentSettingAccess& rSettingAccess = pFormat->getIDocumentSettingAccess(); rTimerAccess.StopIdling(); - // For creating the Flys by MakeFrms() + // For creating the Flys by MakeFrames() rLayoutAccess.SetCurrentViewShell( this->GetCurrShell() ); mbCallbackActionEnabled = false; // needs to be set to true before leaving! @@ -500,7 +500,7 @@ void SwRootFrm::Init( SwFrameFormat* pFormat ) // Disable "multiple layout" mpDrawPage = pMd->GetPage(0); - mpDrawPage->SetSize( Frm().SSize() ); + mpDrawPage->SetSize( Frame().SSize() ); } // Initialize the layout: create pages, link content with Content etc. @@ -543,12 +543,12 @@ void SwRootFrm::Init( SwFrameFormat* pFormat ) bool bFirst = !oPgNum || 1 == oPgNum.get(); // Create a page and put it in the layout - SwPageFrm *pPage = ::InsertNewPage( *pDesc, this, bOdd, bFirst, false, false, nullptr ); + SwPageFrame *pPage = ::InsertNewPage( *pDesc, this, bOdd, bFirst, false, false, nullptr ); // Find the first page in the Bodytext section. - SwLayoutFrm *pLay = pPage->FindBodyCont(); + SwLayoutFrame *pLay = pPage->FindBodyCont(); while( pLay->Lower() ) - pLay = static_cast<SwLayoutFrm*>(pLay->Lower()); + pLay = static_cast<SwLayoutFrame*>(pLay->Lower()); SwNodeIndex aTmp( *pDoc->GetNodes().GetEndOfContent().StartOfSectionNode(), 1 ); ::_InsertCnt( pLay, pDoc, aTmp.GetIndex(), true ); @@ -559,7 +559,7 @@ void SwRootFrm::Init( SwFrameFormat* pFormat ) //b6433357: Update page fields after loading if ( !mpCurrShell || !mpCurrShell->Imp()->IsUpdateExpFields() ) { - SwDocPosUpdate aMsgHint( pPage->Frm().Top() ); + SwDocPosUpdate aMsgHint( pPage->Frame().Top() ); rFieldsAccess.UpdatePageFields( &aMsgHint ); } @@ -571,23 +571,23 @@ void SwRootFrm::Init( SwFrameFormat* pFormat ) mbNeedGrammarCheck = pViewSh->GetViewOptions()->IsOnlineSpell(); } -void SwRootFrm::DestroyImpl() +void SwRootFrame::DestroyImpl() { mbTurboAllowed = false; mpTurbo = nullptr; // fdo#39510 crash on document close with footnotes // Object ownership in writer and esp. in layout are a mess: Before the - // document/layout split SwDoc and SwRootFrm were essentially one object + // document/layout split SwDoc and SwRootFrame were essentially one object // and magically/uncleanly worked around their common destruction by call // to SwDoc::IsInDtor() -- even from the layout. As of now destuction of - // the layout proceeds forward through the frames. Since SwTextFootnote::DelFrms + // the layout proceeds forward through the frames. Since SwTextFootnote::DelFrames // also searches backwards to find the master of footnotes, they must be - // considered to be owned by the SwRootFrm and also be destroyed here, + // considered to be owned by the SwRootFrame and also be destroyed here, // before tearing down the (now footnote free) rest of the layout. RemoveFootnotes(nullptr, false, true); if(pBlink) - pBlink->FrmDelete( this ); + pBlink->FrameDelete( this ); SwFrameFormat *pRegisteredInNonConst = static_cast<SwFrameFormat*>(GetRegisteredInNonConst()); if ( pRegisteredInNonConst ) { @@ -605,17 +605,17 @@ void SwRootFrm::DestroyImpl() delete mpCurrShells; mpCurrShells = nullptr; - // Some accessible shells are left => problems on second SwFrm::Destroy call + // Some accessible shells are left => problems on second SwFrame::Destroy call assert(0 == mnAccessibleShells); - SwLayoutFrm::DestroyImpl(); + SwLayoutFrame::DestroyImpl(); } -SwRootFrm::~SwRootFrm() +SwRootFrame::~SwRootFrame() { } -void SwRootFrm::RemoveMasterObjs( SdrPage *pPg ) +void SwRootFrame::RemoveMasterObjs( SdrPage *pPg ) { // Remove all master objects from the Page. But don't delete! for( size_t i = pPg ? pPg->GetObjCount() : 0; i; ) @@ -626,42 +626,42 @@ void SwRootFrm::RemoveMasterObjs( SdrPage *pPg ) } } -void SwRootFrm::AllCheckPageDescs() const +void SwRootFrame::AllCheckPageDescs() const { if ( !IsLayoutFreezed() ) - CheckPageDescs( const_cast<SwPageFrm*>(static_cast<const SwPageFrm*>(this->Lower())) ); + CheckPageDescs( const_cast<SwPageFrame*>(static_cast<const SwPageFrame*>(this->Lower())) ); } -void SwRootFrm::AllInvalidateAutoCompleteWords() const +void SwRootFrame::AllInvalidateAutoCompleteWords() const { - SwPageFrm *pPage = const_cast<SwPageFrm*>(static_cast<const SwPageFrm*>(this->Lower())); + SwPageFrame *pPage = const_cast<SwPageFrame*>(static_cast<const SwPageFrame*>(this->Lower())); while ( pPage ) { pPage->InvalidateAutoCompleteWords(); - pPage = static_cast<SwPageFrm*>(pPage->GetNext()); + pPage = static_cast<SwPageFrame*>(pPage->GetNext()); } } -void SwRootFrm::AllAddPaintRect() const +void SwRootFrame::AllAddPaintRect() const { - GetCurrShell()->AddPaintRect( this->Frm() ); + GetCurrShell()->AddPaintRect( this->Frame() ); } -void SwRootFrm::AllRemoveFootnotes() +void SwRootFrame::AllRemoveFootnotes() { RemoveFootnotes(); } -void SwRootFrm::AllInvalidateSmartTagsOrSpelling(bool bSmartTags) const +void SwRootFrame::AllInvalidateSmartTagsOrSpelling(bool bSmartTags) const { - SwPageFrm *pPage = const_cast<SwPageFrm*>(static_cast<const SwPageFrm*>(this->Lower())); + SwPageFrame *pPage = const_cast<SwPageFrame*>(static_cast<const SwPageFrame*>(this->Lower())); while ( pPage ) { if ( bSmartTags ) pPage->InvalidateSmartTags(); pPage->InvalidateSpelling(); - pPage = static_cast<SwPageFrm*>(pPage->GetNext()); + pPage = static_cast<SwPageFrame*>(pPage->GetNext()); } } diff --git a/sw/source/core/layout/objectformatter.cxx b/sw/source/core/layout/objectformatter.cxx index 1f292a551487..8a202d600625 100644 --- a/sw/source/core/layout/objectformatter.cxx +++ b/sw/source/core/layout/objectformatter.cxx @@ -64,23 +64,23 @@ class SwPageNumAndTypeOfAnchors { tEntry* pNewEntry = new tEntry(); pNewEntry->mpAnchoredObj = &_rAnchoredObj; - // #i33751#, #i34060# - method <GetPageFrmOfAnchor()> - // is replaced by method <FindPageFrmOfAnchor()>. It's return value + // #i33751#, #i34060# - method <GetPageFrameOfAnchor()> + // is replaced by method <FindPageFrameOfAnchor()>. It's return value // have to be checked. - SwPageFrm* pPageFrmOfAnchor = _rAnchoredObj.FindPageFrmOfAnchor(); - if ( pPageFrmOfAnchor ) + SwPageFrame* pPageFrameOfAnchor = _rAnchoredObj.FindPageFrameOfAnchor(); + if ( pPageFrameOfAnchor ) { - pNewEntry->mnPageNumOfAnchor = pPageFrmOfAnchor->GetPhyPageNum(); + pNewEntry->mnPageNumOfAnchor = pPageFrameOfAnchor->GetPhyPageNum(); } else { pNewEntry->mnPageNumOfAnchor = 0; } // --> #i26945# - collect type of anchor - SwTextFrm* pAnchorCharFrm = _rAnchoredObj.FindAnchorCharFrm(); - if ( pAnchorCharFrm ) + SwTextFrame* pAnchorCharFrame = _rAnchoredObj.FindAnchorCharFrame(); + if ( pAnchorCharFrame ) { - pNewEntry->mbAnchoredAtMaster = !pAnchorCharFrm->IsFollow(); + pNewEntry->mbAnchoredAtMaster = !pAnchorCharFrame->IsFollow(); } else { @@ -132,12 +132,12 @@ class SwPageNumAndTypeOfAnchors } }; -SwObjectFormatter::SwObjectFormatter( const SwPageFrm& _rPageFrm, +SwObjectFormatter::SwObjectFormatter( const SwPageFrame& _rPageFrame, SwLayAction* _pLayAction, const bool _bCollectPgNumOfAnchors ) - : mrPageFrm( _rPageFrm ), + : mrPageFrame( _rPageFrame ), mbFormatOnlyAsCharAnchored( false ), - mbConsiderWrapOnObjPos( _rPageFrm.GetFormat()->getIDocumentSettingAccess().get(DocumentSettingId::CONSIDER_WRAP_ON_OBJECT_POSITION) ), + mbConsiderWrapOnObjPos( _rPageFrame.GetFormat()->getIDocumentSettingAccess().get(DocumentSettingId::CONSIDER_WRAP_ON_OBJECT_POSITION) ), mpLayAction( _pLayAction ), // --> #i26945# mpPgNumAndTypeOfAnchors( _bCollectPgNumOfAnchors ? new SwPageNumAndTypeOfAnchors() : nullptr ) @@ -150,22 +150,22 @@ SwObjectFormatter::~SwObjectFormatter() } SwObjectFormatter* SwObjectFormatter::CreateObjFormatter( - SwFrm& _rAnchorFrm, - const SwPageFrm& _rPageFrm, + SwFrame& _rAnchorFrame, + const SwPageFrame& _rPageFrame, SwLayAction* _pLayAction ) { SwObjectFormatter* pObjFormatter = nullptr; - if ( _rAnchorFrm.IsTextFrm() ) + if ( _rAnchorFrame.IsTextFrame() ) { - pObjFormatter = SwObjectFormatterTextFrm::CreateObjFormatter( - static_cast<SwTextFrm&>(_rAnchorFrm), - _rPageFrm, _pLayAction ); + pObjFormatter = SwObjectFormatterTextFrame::CreateObjFormatter( + static_cast<SwTextFrame&>(_rAnchorFrame), + _rPageFrame, _pLayAction ); } - else if ( _rAnchorFrm.IsLayoutFrm() ) + else if ( _rAnchorFrame.IsLayoutFrame() ) { - pObjFormatter = SwObjectFormatterLayFrm::CreateObjFormatter( - static_cast<SwLayoutFrm&>(_rAnchorFrm), - _rPageFrm, _pLayAction ); + pObjFormatter = SwObjectFormatterLayFrame::CreateObjFormatter( + static_cast<SwLayoutFrame&>(_rAnchorFrame), + _rPageFrame, _pLayAction ); } else { @@ -177,15 +177,15 @@ SwObjectFormatter* SwObjectFormatter::CreateObjFormatter( /** method to format all floating screen objects at the given anchor frame */ -bool SwObjectFormatter::FormatObjsAtFrm( SwFrm& _rAnchorFrm, - const SwPageFrm& _rPageFrm, +bool SwObjectFormatter::FormatObjsAtFrame( SwFrame& _rAnchorFrame, + const SwPageFrame& _rPageFrame, SwLayAction* _pLayAction ) { bool bSuccess( true ); // create corresponding object formatter SwObjectFormatter* pObjFormatter = - SwObjectFormatter::CreateObjFormatter( _rAnchorFrm, _rPageFrm, _pLayAction ); + SwObjectFormatter::CreateObjFormatter( _rAnchorFrame, _rPageFrame, _pLayAction ); if ( pObjFormatter ) { @@ -200,23 +200,23 @@ bool SwObjectFormatter::FormatObjsAtFrm( SwFrm& _rAnchorFrm, /** method to format a given floating screen object */ bool SwObjectFormatter::FormatObj( SwAnchoredObject& _rAnchoredObj, - SwFrm* _pAnchorFrm, - const SwPageFrm* _pPageFrm, + SwFrame* _pAnchorFrame, + const SwPageFrame* _pPageFrame, SwLayAction* _pLayAction ) { bool bSuccess( true ); - OSL_ENSURE( _pAnchorFrm || _rAnchoredObj.GetAnchorFrm(), + OSL_ENSURE( _pAnchorFrame || _rAnchoredObj.GetAnchorFrame(), "<SwObjectFormatter::FormatObj(..)> - missing anchor frame" ); - SwFrm& rAnchorFrm = _pAnchorFrm ? *(_pAnchorFrm) : *(_rAnchoredObj.AnchorFrm()); + SwFrame& rAnchorFrame = _pAnchorFrame ? *(_pAnchorFrame) : *(_rAnchoredObj.AnchorFrame()); - OSL_ENSURE( _pPageFrm || rAnchorFrm.FindPageFrm(), + OSL_ENSURE( _pPageFrame || rAnchorFrame.FindPageFrame(), "<SwObjectFormatter::FormatObj(..)> - missing page frame" ); - const SwPageFrm& rPageFrm = _pPageFrm ? *(_pPageFrm) : *(rAnchorFrm.FindPageFrm()); + const SwPageFrame& rPageFrame = _pPageFrame ? *(_pPageFrame) : *(rAnchorFrame.FindPageFrame()); // create corresponding object formatter SwObjectFormatter* pObjFormatter = - SwObjectFormatter::CreateObjFormatter( rAnchorFrm, rPageFrm, _pLayAction ); + SwObjectFormatter::CreateObjFormatter( rAnchorFrame, rPageFrame, _pLayAction ); if ( pObjFormatter ) { @@ -238,18 +238,18 @@ bool SwObjectFormatter::FormatObj( SwAnchoredObject& _rAnchoredObj, <SwLayAction::FormatLayout(..)>. Thus, its code for the formatting have to be synchronised. */ -void SwObjectFormatter::_FormatLayout( SwLayoutFrm& _rLayoutFrm ) +void SwObjectFormatter::_FormatLayout( SwLayoutFrame& _rLayoutFrame ) { - _rLayoutFrm.Calc(_rLayoutFrm.getRootFrm()->GetCurrShell()->GetOut()); + _rLayoutFrame.Calc(_rLayoutFrame.getRootFrame()->GetCurrShell()->GetOut()); - SwFrm* pLowerFrm = _rLayoutFrm.Lower(); - while ( pLowerFrm ) + SwFrame* pLowerFrame = _rLayoutFrame.Lower(); + while ( pLowerFrame ) { - if ( pLowerFrm->IsLayoutFrm() ) + if ( pLowerFrame->IsLayoutFrame() ) { - _FormatLayout( *(static_cast<SwLayoutFrm*>(pLowerFrm)) ); + _FormatLayout( *(static_cast<SwLayoutFrame*>(pLowerFrame)) ); } - pLowerFrm = pLowerFrm->GetNext(); + pLowerFrame = pLowerFrame->GetNext(); } } @@ -260,14 +260,14 @@ void SwObjectFormatter::_FormatLayout( SwLayoutFrm& _rLayoutFrm ) */ void SwObjectFormatter::_FormatObjContent( SwAnchoredObject& _rAnchoredObj ) { - if ( dynamic_cast<const SwFlyFrm*>( &_rAnchoredObj) == nullptr ) + if ( dynamic_cast<const SwFlyFrame*>( &_rAnchoredObj) == nullptr ) { // only Writer fly frames have content return; } - SwFlyFrm& rFlyFrm = static_cast<SwFlyFrm&>(_rAnchoredObj); - SwContentFrm* pContent = rFlyFrm.ContainsContent(); + SwFlyFrame& rFlyFrame = static_cast<SwFlyFrame&>(_rAnchoredObj); + SwContentFrame* pContent = rFlyFrame.ContainsContent(); while ( pContent ) { @@ -277,18 +277,18 @@ void SwObjectFormatter::_FormatObjContent( SwAnchoredObject& _rAnchoredObj ) // format floating screen objects at content text frame // #i23129#, #i36347# - pass correct page frame to // the object formatter - if ( pContent->IsTextFrm() && - !SwObjectFormatter::FormatObjsAtFrm( *pContent, - *(pContent->FindPageFrm()), + if ( pContent->IsTextFrame() && + !SwObjectFormatter::FormatObjsAtFrame( *pContent, + *(pContent->FindPageFrame()), GetLayAction() ) ) { // restart format with first content - pContent = rFlyFrm.ContainsContent(); + pContent = rFlyFrame.ContainsContent(); continue; } // continue with next content - pContent = pContent->GetNextContentFrm(); + pContent = pContent->GetNextContentFrame(); } } @@ -312,13 +312,13 @@ void SwObjectFormatter::_FormatObj( SwAnchoredObject& _rAnchoredObj ) mpPgNumAndTypeOfAnchors->Collect( _rAnchoredObj ); } - if ( dynamic_cast<const SwFlyFrm*>( &_rAnchoredObj) != nullptr ) + if ( dynamic_cast<const SwFlyFrame*>( &_rAnchoredObj) != nullptr ) { - SwFlyFrm& rFlyFrm = static_cast<SwFlyFrm&>(_rAnchoredObj); + SwFlyFrame& rFlyFrame = static_cast<SwFlyFrame&>(_rAnchoredObj); // --> #i34753# - reset flag, which prevents a positioning - if ( rFlyFrm.IsFlyLayFrm() ) + if ( rFlyFrame.IsFlyLayFrame() ) { - static_cast<SwFlyLayFrm&>(rFlyFrm).SetNoMakePos( false ); + static_cast<SwFlyLayFrame&>(rFlyFrame).SetNoMakePos( false ); } // #i81146# new loop control @@ -328,7 +328,7 @@ void SwObjectFormatter::_FormatObj( SwAnchoredObject& _rAnchoredObj ) do { if ( mpLayAction ) { - mpLayAction->FormatLayoutFly( &rFlyFrm ); + mpLayAction->FormatLayoutFly( &rFlyFrame ); // --> consider, if the layout action // has to be restarted due to a delete of a page frame. if ( mpLayAction->IsAgain() ) @@ -338,22 +338,22 @@ void SwObjectFormatter::_FormatObj( SwAnchoredObject& _rAnchoredObj ) } else { - _FormatLayout( rFlyFrm ); + _FormatLayout( rFlyFrame ); } // --> #i34753# - prevent further positioning, if // to-page|to-fly anchored Writer fly frame is already clipped. - if ( rFlyFrm.IsFlyLayFrm() && rFlyFrm.IsClipped() ) + if ( rFlyFrame.IsFlyLayFrame() && rFlyFrame.IsClipped() ) { - static_cast<SwFlyLayFrm&>(rFlyFrm).SetNoMakePos( true ); + static_cast<SwFlyLayFrame&>(rFlyFrame).SetNoMakePos( true ); } // #i23129#, #i36347# - pass correct page frame // to the object formatter - SwObjectFormatter::FormatObjsAtFrm( rFlyFrm, - *(rFlyFrm.FindPageFrm()), + SwObjectFormatter::FormatObjsAtFrame( rFlyFrame, + *(rFlyFrame.FindPageFrame()), mpLayAction ); if ( mpLayAction ) { - mpLayAction->_FormatFlyContent( &rFlyFrm ); + mpLayAction->_FormatFlyContent( &rFlyFrame ); // --> consider, if the layout action // has to be restarted due to a delete of a page frame. if ( mpLayAction->IsAgain() ) @@ -363,21 +363,21 @@ void SwObjectFormatter::_FormatObj( SwAnchoredObject& _rAnchoredObj ) } else { - _FormatObjContent( rFlyFrm ); + _FormatObjContent( rFlyFrame ); } if ( ++nLoopControlRuns >= nLoopControlMax ) { OSL_FAIL( "LoopControl in SwObjectFormatter::_FormatObj: Stage 3!!!" ); - rFlyFrm.ValidateThisAndAllLowers( 2 ); + rFlyFrame.ValidateThisAndAllLowers( 2 ); nLoopControlRuns = 0; } // --> #i57917# // stop formatting of anchored object, if restart of layout process is requested. - } while ( !rFlyFrm.IsValid() && + } while ( !rFlyFrame.IsValid() && !_rAnchoredObj.RestartLayoutProcess() && - rFlyFrm.GetAnchorFrm() == &GetAnchorFrm() ); + rFlyFrame.GetAnchorFrame() == &GetAnchorFrame() ); } else if ( dynamic_cast<const SwAnchoredDrawObject*>( &_rAnchoredObj) != nullptr ) { @@ -394,21 +394,21 @@ void SwObjectFormatter::_FormatObj( SwAnchoredObject& _rAnchoredObj ) Thus, the objects, whose anchor character is inside the follow text frame can be formatted. */ -bool SwObjectFormatter::_FormatObjsAtFrm( SwTextFrm* _pMasterTextFrm ) +bool SwObjectFormatter::_FormatObjsAtFrame( SwTextFrame* _pMasterTextFrame ) { // --> #i26945# - SwFrm* pAnchorFrm( nullptr ); - if ( GetAnchorFrm().IsTextFrm() && - static_cast<SwTextFrm&>(GetAnchorFrm()).IsFollow() && - _pMasterTextFrm ) + SwFrame* pAnchorFrame( nullptr ); + if ( GetAnchorFrame().IsTextFrame() && + static_cast<SwTextFrame&>(GetAnchorFrame()).IsFollow() && + _pMasterTextFrame ) { - pAnchorFrm = _pMasterTextFrm; + pAnchorFrame = _pMasterTextFrame; } else { - pAnchorFrm = &GetAnchorFrm(); + pAnchorFrame = &GetAnchorFrame(); } - if ( !pAnchorFrm->GetDrawObjs() ) + if ( !pAnchorFrame->GetDrawObjs() ) { // nothing to do, if no floating screen object is registered at the anchor frame. return true; @@ -416,9 +416,9 @@ bool SwObjectFormatter::_FormatObjsAtFrm( SwTextFrm* _pMasterTextFrm ) bool bSuccess( true ); - for ( size_t i = 0; i < pAnchorFrm->GetDrawObjs()->size(); ++i ) + for ( size_t i = 0; i < pAnchorFrame->GetDrawObjs()->size(); ++i ) { - SwAnchoredObject* pAnchoredObj = (*pAnchorFrm->GetDrawObjs())[i]; + SwAnchoredObject* pAnchoredObj = (*pAnchorFrame->GetDrawObjs())[i]; // check, if object's anchor is on the given page frame or // object is registered at the given page frame. @@ -429,24 +429,24 @@ bool SwObjectFormatter::_FormatObjsAtFrm( SwTextFrm* _pMasterTextFrm ) // If the anchor follow text frame is in the same body as its 'master' // text frame, do not format the anchored object. // E.g., this situation can occur during the table row splitting algorithm. - SwTextFrm* pAnchorCharFrm = pAnchoredObj->FindAnchorCharFrm(); + SwTextFrame* pAnchorCharFrame = pAnchoredObj->FindAnchorCharFrame(); const bool bAnchoredAtFollowInSameBodyAsMaster = - pAnchorCharFrm && pAnchorCharFrm->IsFollow() && - pAnchorCharFrm != pAnchoredObj->GetAnchorFrm() && - pAnchorCharFrm->FindBodyFrm() == - static_cast<SwTextFrm*>(pAnchoredObj->AnchorFrm())->FindBodyFrm(); + pAnchorCharFrame && pAnchorCharFrame->IsFollow() && + pAnchorCharFrame != pAnchoredObj->GetAnchorFrame() && + pAnchorCharFrame->FindBodyFrame() == + static_cast<SwTextFrame*>(pAnchoredObj->AnchorFrame())->FindBodyFrame(); if ( bAnchoredAtFollowInSameBodyAsMaster ) { continue; } - // #i33751#, #i34060# - method <GetPageFrmOfAnchor()> - // is replaced by method <FindPageFrmOfAnchor()>. It's return value + // #i33751#, #i34060# - method <GetPageFrameOfAnchor()> + // is replaced by method <FindPageFrameOfAnchor()>. It's return value // have to be checked. - SwPageFrm* pPageFrmOfAnchor = pAnchoredObj->FindPageFrmOfAnchor(); - OSL_ENSURE( pPageFrmOfAnchor, - "<SwObjectFormatter::_FormatObjsAtFrm()> - missing page frame." ); + SwPageFrame* pPageFrameOfAnchor = pAnchoredObj->FindPageFrameOfAnchor(); + OSL_ENSURE( pPageFrameOfAnchor, + "<SwObjectFormatter::_FormatObjsAtFrame()> - missing page frame." ); // --> #i26945# - if ( pPageFrmOfAnchor && pPageFrmOfAnchor == &mrPageFrm ) + if ( pPageFrameOfAnchor && pPageFrameOfAnchor == &mrPageFrame ) { // if format of object fails, stop formatting and pass fail to // calling method via the return value. @@ -456,18 +456,18 @@ bool SwObjectFormatter::_FormatObjsAtFrm( SwTextFrm* _pMasterTextFrm ) break; } - // considering changes at <pAnchorFrm->GetDrawObjs()> during + // considering changes at <pAnchorFrame->GetDrawObjs()> during // format of the object. - if ( !pAnchorFrm->GetDrawObjs() || - i > pAnchorFrm->GetDrawObjs()->size() ) + if ( !pAnchorFrame->GetDrawObjs() || + i > pAnchorFrame->GetDrawObjs()->size() ) { break; } else { const size_t nActPosOfObj = - pAnchorFrm->GetDrawObjs()->ListPosOf( *pAnchoredObj ); - if ( nActPosOfObj == pAnchorFrm->GetDrawObjs()->size() || + pAnchorFrame->GetDrawObjs()->ListPosOf( *pAnchoredObj ); + if ( nActPosOfObj == pAnchorFrame->GetDrawObjs()->size() || nActPosOfObj > i ) { --i; @@ -478,7 +478,7 @@ bool SwObjectFormatter::_FormatObjsAtFrm( SwTextFrm* _pMasterTextFrm ) } } } - } // end of loop on <pAnchorFrm->.GetDrawObjs()> + } // end of loop on <pAnchorFrame->.GetDrawObjs()> return bSuccess; } diff --git a/sw/source/core/layout/objectformatterlayfrm.cxx b/sw/source/core/layout/objectformatterlayfrm.cxx index 10aca0df807f..76e6d1d9c64b 100644 --- a/sw/source/core/layout/objectformatterlayfrm.cxx +++ b/sw/source/core/layout/objectformatterlayfrm.cxx @@ -24,53 +24,53 @@ #include <layact.hxx> -SwObjectFormatterLayFrm::SwObjectFormatterLayFrm( SwLayoutFrm& _rAnchorLayFrm, - const SwPageFrm& _rPageFrm, +SwObjectFormatterLayFrame::SwObjectFormatterLayFrame( SwLayoutFrame& _rAnchorLayFrame, + const SwPageFrame& _rPageFrame, SwLayAction* _pLayAction ) - : SwObjectFormatter( _rPageFrm, _pLayAction ), - mrAnchorLayFrm( _rAnchorLayFrm ) + : SwObjectFormatter( _rPageFrame, _pLayAction ), + mrAnchorLayFrame( _rAnchorLayFrame ) { } -SwObjectFormatterLayFrm::~SwObjectFormatterLayFrm() +SwObjectFormatterLayFrame::~SwObjectFormatterLayFrame() { } -SwObjectFormatterLayFrm* SwObjectFormatterLayFrm::CreateObjFormatter( - SwLayoutFrm& _rAnchorLayFrm, - const SwPageFrm& _rPageFrm, +SwObjectFormatterLayFrame* SwObjectFormatterLayFrame::CreateObjFormatter( + SwLayoutFrame& _rAnchorLayFrame, + const SwPageFrame& _rPageFrame, SwLayAction* _pLayAction ) { - if ( !_rAnchorLayFrm.IsPageFrm() && - !_rAnchorLayFrm.IsFlyFrm() ) + if ( !_rAnchorLayFrame.IsPageFrame() && + !_rAnchorLayFrame.IsFlyFrame() ) { - OSL_FAIL( "<SwObjectFormatterLayFrm::CreateObjFormatter(..)> - unexpected type of anchor frame " ); + OSL_FAIL( "<SwObjectFormatterLayFrame::CreateObjFormatter(..)> - unexpected type of anchor frame " ); return nullptr; } - SwObjectFormatterLayFrm* pObjFormatter = nullptr; + SwObjectFormatterLayFrame* pObjFormatter = nullptr; // create object formatter, if floating screen objects are registered at // given anchor layout frame. - if ( _rAnchorLayFrm.GetDrawObjs() || - ( _rAnchorLayFrm.IsPageFrm() && - static_cast<SwPageFrm&>(_rAnchorLayFrm).GetSortedObjs() ) ) + if ( _rAnchorLayFrame.GetDrawObjs() || + ( _rAnchorLayFrame.IsPageFrame() && + static_cast<SwPageFrame&>(_rAnchorLayFrame).GetSortedObjs() ) ) { pObjFormatter = - new SwObjectFormatterLayFrm( _rAnchorLayFrm, _rPageFrm, _pLayAction ); + new SwObjectFormatterLayFrame( _rAnchorLayFrame, _rPageFrame, _pLayAction ); } return pObjFormatter; } -SwFrm& SwObjectFormatterLayFrm::GetAnchorFrm() +SwFrame& SwObjectFormatterLayFrame::GetAnchorFrame() { - return mrAnchorLayFrm; + return mrAnchorLayFrame; } // #i40147# - add parameter <_bCheckForMovedFwd>. // Not relevant for objects anchored at layout frame. -bool SwObjectFormatterLayFrm::DoFormatObj( SwAnchoredObject& _rAnchoredObj, +bool SwObjectFormatterLayFrame::DoFormatObj( SwAnchoredObject& _rAnchoredObj, const bool ) { _FormatObj( _rAnchoredObj ); @@ -80,13 +80,13 @@ bool SwObjectFormatterLayFrm::DoFormatObj( SwAnchoredObject& _rAnchoredObj, return GetLayAction() == nullptr || !GetLayAction()->IsAgain(); } -bool SwObjectFormatterLayFrm::DoFormatObjs() +bool SwObjectFormatterLayFrame::DoFormatObjs() { bool bSuccess( true ); - bSuccess = _FormatObjsAtFrm(); + bSuccess = _FormatObjsAtFrame(); - if ( bSuccess && GetAnchorFrm().IsPageFrm() ) + if ( bSuccess && GetAnchorFrame().IsPageFrame() ) { // anchor layout frame is a page frame. // Thus, format also all anchored objects, which are registered at @@ -104,11 +104,11 @@ bool SwObjectFormatterLayFrm::DoFormatObjs() OD 2004-07-02 #i28701# */ -bool SwObjectFormatterLayFrm::_AdditionalFormatObjsOnPage() +bool SwObjectFormatterLayFrame::_AdditionalFormatObjsOnPage() { - if ( !GetAnchorFrm().IsPageFrm() ) + if ( !GetAnchorFrame().IsPageFrame() ) { - OSL_FAIL( "<SwObjectFormatterLayFrm::_AdditionalFormatObjsOnPage()> - mis-usage of method, call only for anchor frames of type page frame" ); + OSL_FAIL( "<SwObjectFormatterLayFrame::_AdditionalFormatObjsOnPage()> - mis-usage of method, call only for anchor frames of type page frame" ); return true; } @@ -119,9 +119,9 @@ bool SwObjectFormatterLayFrm::_AdditionalFormatObjsOnPage() return false; } - SwPageFrm& rPageFrm = static_cast<SwPageFrm&>(GetAnchorFrm()); + SwPageFrame& rPageFrame = static_cast<SwPageFrame&>(GetAnchorFrame()); - if ( !rPageFrm.GetSortedObjs() ) + if ( !rPageFrame.GetSortedObjs() ) { // nothing to do, if no floating screen object is registered at the anchor frame. return true; @@ -129,27 +129,27 @@ bool SwObjectFormatterLayFrm::_AdditionalFormatObjsOnPage() bool bSuccess( true ); - for ( size_t i = 0; i < rPageFrm.GetSortedObjs()->size(); ++i ) + for ( size_t i = 0; i < rPageFrame.GetSortedObjs()->size(); ++i ) { - SwAnchoredObject* pAnchoredObj = (*rPageFrm.GetSortedObjs())[i]; + SwAnchoredObject* pAnchoredObj = (*rPageFrame.GetSortedObjs())[i]; // #i51941# - do not format object, which are anchored // inside or at fly frame. - if ( pAnchoredObj->GetAnchorFrm()->FindFlyFrm() ) + if ( pAnchoredObj->GetAnchorFrame()->FindFlyFrame() ) { continue; } - // #i33751#, #i34060# - method <GetPageFrmOfAnchor()> - // is replaced by method <FindPageFrmOfAnchor()>. It's return value + // #i33751#, #i34060# - method <GetPageFrameOfAnchor()> + // is replaced by method <FindPageFrameOfAnchor()>. It's return value // have to be checked. - SwPageFrm* pPageFrmOfAnchor = pAnchoredObj->FindPageFrmOfAnchor(); + SwPageFrame* pPageFrameOfAnchor = pAnchoredObj->FindPageFrameOfAnchor(); // #i26945# - check, if the page frame of the // object's anchor frame isn't the given page frame - OSL_ENSURE( pPageFrmOfAnchor, - "<SwObjectFormatterLayFrm::_AdditionalFormatObjsOnPage()> - missing page frame" ); - if ( pPageFrmOfAnchor && + OSL_ENSURE( pPageFrameOfAnchor, + "<SwObjectFormatterLayFrame::_AdditionalFormatObjsOnPage()> - missing page frame" ); + if ( pPageFrameOfAnchor && // #i35911# - pPageFrmOfAnchor->GetPhyPageNum() < rPageFrm.GetPhyPageNum() ) + pPageFrameOfAnchor->GetPhyPageNum() < rPageFrame.GetPhyPageNum() ) { // if format of object fails, stop formatting and pass fail to // calling method via the return value. @@ -159,18 +159,18 @@ bool SwObjectFormatterLayFrm::_AdditionalFormatObjsOnPage() break; } - // considering changes at <GetAnchorFrm().GetDrawObjs()> during + // considering changes at <GetAnchorFrame().GetDrawObjs()> during // format of the object. - if ( !rPageFrm.GetSortedObjs() || - i > rPageFrm.GetSortedObjs()->size() ) + if ( !rPageFrame.GetSortedObjs() || + i > rPageFrame.GetSortedObjs()->size() ) { break; } else { const size_t nActPosOfObj = - rPageFrm.GetSortedObjs()->ListPosOf( *pAnchoredObj ); - if ( nActPosOfObj == rPageFrm.GetSortedObjs()->size() || + rPageFrame.GetSortedObjs()->ListPosOf( *pAnchoredObj ); + if ( nActPosOfObj == rPageFrame.GetSortedObjs()->size() || nActPosOfObj > i ) { --i; @@ -181,7 +181,7 @@ bool SwObjectFormatterLayFrm::_AdditionalFormatObjsOnPage() } } } - } // end of loop on <rPageFrm.GetSortedObjs()> + } // end of loop on <rPageFrame.GetSortedObjs()> return bSuccess; } diff --git a/sw/source/core/layout/objectformatterlayfrm.hxx b/sw/source/core/layout/objectformatterlayfrm.hxx index ae86b9cbb5f4..4f0b54cb5a83 100644 --- a/sw/source/core/layout/objectformatterlayfrm.hxx +++ b/sw/source/core/layout/objectformatterlayfrm.hxx @@ -21,18 +21,18 @@ #include <objectformatter.hxx> -class SwLayoutFrm; +class SwLayoutFrame; // Format floating screen objects, which are anchored at a given anchor text frame // and registered at the given page frame. -class SwObjectFormatterLayFrm : public SwObjectFormatter +class SwObjectFormatterLayFrame : public SwObjectFormatter { private: // anchor layout frame - SwLayoutFrm& mrAnchorLayFrm; + SwLayoutFrame& mrAnchorLayFrame; - SwObjectFormatterLayFrm( SwLayoutFrm& _rAnchorLayFrm, - const SwPageFrm& _rPageFrm, + SwObjectFormatterLayFrame( SwLayoutFrame& _rAnchorLayFrame, + const SwPageFrame& _rPageFrame, SwLayAction* _pLayAction ); /** method to format all anchored objects, which are registered at @@ -48,10 +48,10 @@ class SwObjectFormatterLayFrm : public SwObjectFormatter protected: - virtual SwFrm& GetAnchorFrm() override; + virtual SwFrame& GetAnchorFrame() override; public: - virtual ~SwObjectFormatterLayFrm(); + virtual ~SwObjectFormatterLayFrame(); // #i40147# - add parameter <_bCheckForMovedFwd>. // Not relevant for objects anchored at layout frame. @@ -59,9 +59,9 @@ class SwObjectFormatterLayFrm : public SwObjectFormatter const bool _bCheckForMovedFwd = false ) override; virtual bool DoFormatObjs() override; - static SwObjectFormatterLayFrm* CreateObjFormatter( - SwLayoutFrm& _rAnchorLayFrm, - const SwPageFrm& _rPageFrm, + static SwObjectFormatterLayFrame* CreateObjFormatter( + SwLayoutFrame& _rAnchorLayFrame, + const SwPageFrame& _rPageFrame, SwLayAction* _pLayAction ); }; diff --git a/sw/source/core/layout/objectformattertxtfrm.cxx b/sw/source/core/layout/objectformattertxtfrm.cxx index 436cfcbc7bc8..0c5aa4aa6e10 100644 --- a/sw/source/core/layout/objectformattertxtfrm.cxx +++ b/sw/source/core/layout/objectformattertxtfrm.cxx @@ -36,78 +36,78 @@ using namespace ::com::sun::star; class SwForbidFollowFormat { private: - SwTextFrm& mrTextFrm; + SwTextFrame& mrTextFrame; const bool bOldFollowFormatAllowed; public: - explicit SwForbidFollowFormat( SwTextFrm& _rTextFrm ) - : mrTextFrm( _rTextFrm ), - bOldFollowFormatAllowed( _rTextFrm.FollowFormatAllowed() ) + explicit SwForbidFollowFormat( SwTextFrame& _rTextFrame ) + : mrTextFrame( _rTextFrame ), + bOldFollowFormatAllowed( _rTextFrame.FollowFormatAllowed() ) { - mrTextFrm.ForbidFollowFormat(); + mrTextFrame.ForbidFollowFormat(); } ~SwForbidFollowFormat() { if ( bOldFollowFormatAllowed ) { - mrTextFrm.AllowFollowFormat(); + mrTextFrame.AllowFollowFormat(); } } }; -SwObjectFormatterTextFrm::SwObjectFormatterTextFrm( SwTextFrm& _rAnchorTextFrm, - const SwPageFrm& _rPageFrm, - SwTextFrm* _pMasterAnchorTextFrm, +SwObjectFormatterTextFrame::SwObjectFormatterTextFrame( SwTextFrame& _rAnchorTextFrame, + const SwPageFrame& _rPageFrame, + SwTextFrame* _pMasterAnchorTextFrame, SwLayAction* _pLayAction ) - : SwObjectFormatter( _rPageFrm, _pLayAction, true ), - mrAnchorTextFrm( _rAnchorTextFrm ), - mpMasterAnchorTextFrm( _pMasterAnchorTextFrm ) + : SwObjectFormatter( _rPageFrame, _pLayAction, true ), + mrAnchorTextFrame( _rAnchorTextFrame ), + mpMasterAnchorTextFrame( _pMasterAnchorTextFrame ) { } -SwObjectFormatterTextFrm::~SwObjectFormatterTextFrm() +SwObjectFormatterTextFrame::~SwObjectFormatterTextFrame() { } -SwObjectFormatterTextFrm* SwObjectFormatterTextFrm::CreateObjFormatter( - SwTextFrm& _rAnchorTextFrm, - const SwPageFrm& _rPageFrm, +SwObjectFormatterTextFrame* SwObjectFormatterTextFrame::CreateObjFormatter( + SwTextFrame& _rAnchorTextFrame, + const SwPageFrame& _rPageFrame, SwLayAction* _pLayAction ) { - SwObjectFormatterTextFrm* pObjFormatter = nullptr; + SwObjectFormatterTextFrame* pObjFormatter = nullptr; - // determine 'master' of <_rAnchorTextFrm>, if anchor frame is a follow text frame. - SwTextFrm* pMasterOfAnchorFrm = nullptr; - if ( _rAnchorTextFrm.IsFollow() ) + // determine 'master' of <_rAnchorTextFrame>, if anchor frame is a follow text frame. + SwTextFrame* pMasterOfAnchorFrame = nullptr; + if ( _rAnchorTextFrame.IsFollow() ) { - pMasterOfAnchorFrm = _rAnchorTextFrm.FindMaster(); - while ( pMasterOfAnchorFrm && pMasterOfAnchorFrm->IsFollow() ) + pMasterOfAnchorFrame = _rAnchorTextFrame.FindMaster(); + while ( pMasterOfAnchorFrame && pMasterOfAnchorFrame->IsFollow() ) { - pMasterOfAnchorFrm = pMasterOfAnchorFrm->FindMaster(); + pMasterOfAnchorFrame = pMasterOfAnchorFrame->FindMaster(); } } // create object formatter, if floating screen objects are registered // at anchor frame (or at 'master' anchor frame) - if ( _rAnchorTextFrm.GetDrawObjs() || - ( pMasterOfAnchorFrm && pMasterOfAnchorFrm->GetDrawObjs() ) ) + if ( _rAnchorTextFrame.GetDrawObjs() || + ( pMasterOfAnchorFrame && pMasterOfAnchorFrame->GetDrawObjs() ) ) { pObjFormatter = - new SwObjectFormatterTextFrm( _rAnchorTextFrm, _rPageFrm, - pMasterOfAnchorFrm, _pLayAction ); + new SwObjectFormatterTextFrame( _rAnchorTextFrame, _rPageFrame, + pMasterOfAnchorFrame, _pLayAction ); } return pObjFormatter; } -SwFrm& SwObjectFormatterTextFrm::GetAnchorFrm() +SwFrame& SwObjectFormatterTextFrame::GetAnchorFrame() { - return mrAnchorTextFrm; + return mrAnchorTextFrame; } // #i40147# - add parameter <_bCheckForMovedFwd>. -bool SwObjectFormatterTextFrm::DoFormatObj( SwAnchoredObject& _rAnchoredObj, +bool SwObjectFormatterTextFrame::DoFormatObj( SwAnchoredObject& _rAnchoredObj, const bool _bCheckForMovedFwd ) { // check, if only as-character anchored object have to be formatted, and @@ -148,7 +148,7 @@ bool SwObjectFormatterTextFrm::DoFormatObj( SwAnchoredObject& _rAnchoredObj, const bool bRestart = _rAnchoredObj.RestartLayoutProcess() && !( _rAnchoredObj.PositionLocked() && - _rAnchoredObj.GetAnchorFrm()->IsInFly() && + _rAnchoredObj.GetAnchorFrame()->IsInFly() && _rAnchoredObj.GetFrameFormat().GetFollowTextFlow().GetValue() ); if ( bRestart ) { @@ -165,7 +165,7 @@ bool SwObjectFormatterTextFrm::DoFormatObj( SwAnchoredObject& _rAnchoredObj, // whose the check of a moved forward anchor frame is requested. // revise decision made for i3317: // anchored objects, whose wrapping style influence is temporarly considered, - // have to be considered in method <SwObjectFormatterTextFrm::DoFormatObjs()> + // have to be considered in method <SwObjectFormatterTextFrame::DoFormatObjs()> if ( bSuccess && _rAnchoredObj.ConsiderObjWrapInfluenceOnObjPos() && ( _bCheckForMovedFwd || @@ -178,11 +178,11 @@ bool SwObjectFormatterTextFrm::DoFormatObj( SwAnchoredObject& _rAnchoredObj, // #i26945# - check conditions for move forward of // anchor text frame // determine, if anchor text frame has previous frame - const bool bDoesAnchorHadPrev = ( mrAnchorTextFrm.GetIndPrev() != nullptr ); + const bool bDoesAnchorHadPrev = ( mrAnchorTextFrame.GetIndPrev() != nullptr ); // #i40141# - use new method - it also formats the // section the anchor frame is in. - _FormatAnchorFrmForCheckMoveFwd(); + _FormatAnchorFrameForCheckMoveFwd(); // #i35911# if ( _rAnchoredObj.HasClearedEnvironment() ) @@ -190,49 +190,49 @@ bool SwObjectFormatterTextFrm::DoFormatObj( SwAnchoredObject& _rAnchoredObj, _rAnchoredObj.SetClearedEnvironment( true ); // #i44049# - consider, that anchor frame // could already been marked to move forward. - SwPageFrm* pAnchorPageFrm( mrAnchorTextFrm.FindPageFrm() ); - if ( pAnchorPageFrm != _rAnchoredObj.GetPageFrm() ) + SwPageFrame* pAnchorPageFrame( mrAnchorTextFrame.FindPageFrame() ); + if ( pAnchorPageFrame != _rAnchoredObj.GetPageFrame() ) { bool bInsert( true ); sal_uInt32 nToPageNum( 0L ); - const SwDoc& rDoc = *(GetPageFrm().GetFormat()->GetDoc()); - if ( SwLayouter::FrmMovedFwdByObjPos( - rDoc, mrAnchorTextFrm, nToPageNum ) ) + const SwDoc& rDoc = *(GetPageFrame().GetFormat()->GetDoc()); + if ( SwLayouter::FrameMovedFwdByObjPos( + rDoc, mrAnchorTextFrame, nToPageNum ) ) { - if ( nToPageNum < pAnchorPageFrm->GetPhyPageNum() ) - SwLayouter::RemoveMovedFwdFrm( rDoc, mrAnchorTextFrm ); + if ( nToPageNum < pAnchorPageFrame->GetPhyPageNum() ) + SwLayouter::RemoveMovedFwdFrame( rDoc, mrAnchorTextFrame ); else bInsert = false; } if ( bInsert ) { - SwLayouter::InsertMovedFwdFrm( rDoc, mrAnchorTextFrm, - pAnchorPageFrm->GetPhyPageNum() ); - mrAnchorTextFrm.InvalidatePos(); + SwLayouter::InsertMovedFwdFrame( rDoc, mrAnchorTextFrame, + pAnchorPageFrame->GetPhyPageNum() ); + mrAnchorTextFrame.InvalidatePos(); bSuccess = false; _InvalidatePrevObjs( _rAnchoredObj ); _InvalidateFollowObjs( _rAnchoredObj, true ); } else { - OSL_FAIL( "<SwObjectFormatterTextFrm::DoFormatObj(..)> - anchor frame not marked to move forward" ); + OSL_FAIL( "<SwObjectFormatterTextFrame::DoFormatObj(..)> - anchor frame not marked to move forward" ); } } } - else if ( !mrAnchorTextFrm.IsFollow() && bDoesAnchorHadPrev ) + else if ( !mrAnchorTextFrame.IsFollow() && bDoesAnchorHadPrev ) { // index of anchored object in collection of page numbers and // anchor types sal_uInt32 nIdx( CountOfCollected() ); OSL_ENSURE( nIdx > 0, - "<SwObjectFormatterTextFrm::DoFormatObj(..)> - anchored object not collected!?" ); + "<SwObjectFormatterTextFrame::DoFormatObj(..)> - anchored object not collected!?" ); --nIdx; sal_uInt32 nToPageNum( 0L ); // #i43913# bool bDummy( false ); // #i58182# - consider new method signature - if ( SwObjectFormatterTextFrm::CheckMovedFwdCondition( *GetCollectedObj( nIdx ), + if ( SwObjectFormatterTextFrame::CheckMovedFwdCondition( *GetCollectedObj( nIdx ), GetPgNumOfCollected( nIdx ), IsCollectedAnchoredAtMaster( nIdx ), nToPageNum, bDummy ) ) @@ -241,12 +241,12 @@ bool SwObjectFormatterTextFrm::DoFormatObj( SwAnchoredObject& _rAnchoredObj, // could already been marked to move forward. bool bInsert( true ); sal_uInt32 nMovedFwdToPageNum( 0L ); - const SwDoc& rDoc = *(GetPageFrm().GetFormat()->GetDoc()); - if ( SwLayouter::FrmMovedFwdByObjPos( - rDoc, mrAnchorTextFrm, nMovedFwdToPageNum ) ) + const SwDoc& rDoc = *(GetPageFrame().GetFormat()->GetDoc()); + if ( SwLayouter::FrameMovedFwdByObjPos( + rDoc, mrAnchorTextFrame, nMovedFwdToPageNum ) ) { if ( nMovedFwdToPageNum < nToPageNum ) - SwLayouter::RemoveMovedFwdFrm( rDoc, mrAnchorTextFrm ); + SwLayouter::RemoveMovedFwdFrame( rDoc, mrAnchorTextFrame ); else bInsert = false; } @@ -254,9 +254,9 @@ bool SwObjectFormatterTextFrm::DoFormatObj( SwAnchoredObject& _rAnchoredObj, { // Indicate that anchor text frame has to move forward and // invalidate its position to force a re-format. - SwLayouter::InsertMovedFwdFrm( rDoc, mrAnchorTextFrm, + SwLayouter::InsertMovedFwdFrame( rDoc, mrAnchorTextFrame, nToPageNum ); - mrAnchorTextFrm.InvalidatePos(); + mrAnchorTextFrame.InvalidatePos(); // Indicate restart of the layout process bSuccess = false; @@ -271,19 +271,19 @@ bool SwObjectFormatterTextFrm::DoFormatObj( SwAnchoredObject& _rAnchoredObj, } else { - OSL_FAIL( "<SwObjectFormatterTextFrm::DoFormatObj(..)> - anchor frame not marked to move forward" ); + OSL_FAIL( "<SwObjectFormatterTextFrame::DoFormatObj(..)> - anchor frame not marked to move forward" ); } } } // i40155# - mark anchor frame not to wrap around // objects under the condition, that its follow contains all its text. - else if ( !mrAnchorTextFrm.IsFollow() && - mrAnchorTextFrm.GetFollow() && - mrAnchorTextFrm.GetFollow()->GetOfst() == 0 ) + else if ( !mrAnchorTextFrame.IsFollow() && + mrAnchorTextFrame.GetFollow() && + mrAnchorTextFrame.GetFollow()->GetOfst() == 0 ) { - SwLayouter::RemoveMovedFwdFrm( - *(mrAnchorTextFrm.FindPageFrm()->GetFormat()->GetDoc()), - mrAnchorTextFrm ); + SwLayouter::RemoveMovedFwdFrame( + *(mrAnchorTextFrame.FindPageFrame()->GetFormat()->GetDoc()), + mrAnchorTextFrame ); } } } @@ -291,12 +291,12 @@ bool SwObjectFormatterTextFrm::DoFormatObj( SwAnchoredObject& _rAnchoredObj, return bSuccess; } -bool SwObjectFormatterTextFrm::DoFormatObjs() +bool SwObjectFormatterTextFrame::DoFormatObjs() { - if ( !mrAnchorTextFrm.IsValid() ) + if ( !mrAnchorTextFrame.IsValid() ) { if ( GetLayAction() && - mrAnchorTextFrm.FindPageFrm() != &GetPageFrm() ) + mrAnchorTextFrame.FindPageFrame() != &GetPageFrame() ) { // notify layout action, thus is can restart the layout process on // a previous page. @@ -305,7 +305,7 @@ bool SwObjectFormatterTextFrm::DoFormatObjs() else { // the anchor text frame has to be valid, thus assert. - OSL_FAIL( "<SwObjectFormatterTextFrm::DoFormatObjs()> called for invalidate anchor text frame." ); + OSL_FAIL( "<SwObjectFormatterTextFrame::DoFormatObjs()> called for invalidate anchor text frame." ); } return false; @@ -313,37 +313,37 @@ bool SwObjectFormatterTextFrm::DoFormatObjs() bool bSuccess( true ); - if ( mrAnchorTextFrm.IsFollow() ) + if ( mrAnchorTextFrame.IsFollow() ) { // Only floating screen objects anchored as-character are directly // registered at a follow text frame. The other floating screen objects // are registered at the 'master' anchor text frame. // Thus, format the other floating screen objects through the 'master' // anchor text frame - OSL_ENSURE( mpMasterAnchorTextFrm, - "SwObjectFormatterTextFrm::DoFormatObjs() - missing 'master' anchor text frame" ); - bSuccess = _FormatObjsAtFrm( mpMasterAnchorTextFrm ); + OSL_ENSURE( mpMasterAnchorTextFrame, + "SwObjectFormatterTextFrame::DoFormatObjs() - missing 'master' anchor text frame" ); + bSuccess = _FormatObjsAtFrame( mpMasterAnchorTextFrame ); if ( bSuccess ) { // format of as-character anchored floating screen objects - no failure // excepted on the format of these objects. - bSuccess = _FormatObjsAtFrm(); + bSuccess = _FormatObjsAtFrame(); } } else { - bSuccess = _FormatObjsAtFrm(); + bSuccess = _FormatObjsAtFrame(); } // consider anchored objects, whose wrapping style influence are temporarly // considered. if ( bSuccess && ( ConsiderWrapOnObjPos() || - ( !mrAnchorTextFrm.IsFollow() && + ( !mrAnchorTextFrame.IsFollow() && _AtLeastOneObjIsTmpConsiderWrapInfluence() ) ) ) { - const bool bDoesAnchorHadPrev = ( mrAnchorTextFrm.GetIndPrev() != nullptr ); + const bool bDoesAnchorHadPrev = ( mrAnchorTextFrame.GetIndPrev() != nullptr ); // Format anchor text frame after its objects are formatted. // Note: The format of the anchor frame also formats the invalid @@ -352,13 +352,13 @@ bool SwObjectFormatterTextFrm::DoFormatObjs() // anchor frame for the following check for moved forward anchors // #i40141# - use new method - it also formats the // section the anchor frame is in. - _FormatAnchorFrmForCheckMoveFwd(); + _FormatAnchorFrameForCheckMoveFwd(); sal_uInt32 nToPageNum( 0L ); // #i43913# bool bInFollow( false ); SwAnchoredObject* pObj = nullptr; - if ( !mrAnchorTextFrm.IsFollow() ) + if ( !mrAnchorTextFrame.IsFollow() ) { pObj = _GetFirstObjWithMovedFwdAnchor( // #i35017# - constant name has changed @@ -371,35 +371,35 @@ bool SwObjectFormatterTextFrm::DoFormatObjs() pObj->SetClearedEnvironment( true ); // #i44049# - consider, that anchor frame // could already been marked to move forward. - SwPageFrm* pAnchorPageFrm( mrAnchorTextFrm.FindPageFrm() ); + SwPageFrame* pAnchorPageFrame( mrAnchorTextFrame.FindPageFrame() ); // #i43913# - consider, that anchor frame // is a follow or is in a follow row, which will move forward. - if ( pAnchorPageFrm != pObj->GetPageFrm() || + if ( pAnchorPageFrame != pObj->GetPageFrame() || bInFollow ) { bool bInsert( true ); sal_uInt32 nTmpToPageNum( 0L ); - const SwDoc& rDoc = *(GetPageFrm().GetFormat()->GetDoc()); - if ( SwLayouter::FrmMovedFwdByObjPos( - rDoc, mrAnchorTextFrm, nTmpToPageNum ) ) + const SwDoc& rDoc = *(GetPageFrame().GetFormat()->GetDoc()); + if ( SwLayouter::FrameMovedFwdByObjPos( + rDoc, mrAnchorTextFrame, nTmpToPageNum ) ) { - if ( nTmpToPageNum < pAnchorPageFrm->GetPhyPageNum() ) - SwLayouter::RemoveMovedFwdFrm( rDoc, mrAnchorTextFrm ); + if ( nTmpToPageNum < pAnchorPageFrame->GetPhyPageNum() ) + SwLayouter::RemoveMovedFwdFrame( rDoc, mrAnchorTextFrame ); else bInsert = false; } if ( bInsert ) { - SwLayouter::InsertMovedFwdFrm( rDoc, mrAnchorTextFrm, - pAnchorPageFrm->GetPhyPageNum() ); - mrAnchorTextFrm.InvalidatePos(); + SwLayouter::InsertMovedFwdFrame( rDoc, mrAnchorTextFrame, + pAnchorPageFrame->GetPhyPageNum() ); + mrAnchorTextFrame.InvalidatePos(); bSuccess = false; _InvalidatePrevObjs( *pObj ); _InvalidateFollowObjs( *pObj, true ); } else { - OSL_FAIL( "<SwObjectFormatterTextFrm::DoFormatObjs(..)> - anchor frame not marked to move forward" ); + OSL_FAIL( "<SwObjectFormatterTextFrame::DoFormatObjs(..)> - anchor frame not marked to move forward" ); } } } @@ -411,12 +411,12 @@ bool SwObjectFormatterTextFrm::DoFormatObjs() // could already been marked to move forward. bool bInsert( true ); sal_uInt32 nMovedFwdToPageNum( 0L ); - const SwDoc& rDoc = *(GetPageFrm().GetFormat()->GetDoc()); - if ( SwLayouter::FrmMovedFwdByObjPos( - rDoc, mrAnchorTextFrm, nMovedFwdToPageNum ) ) + const SwDoc& rDoc = *(GetPageFrame().GetFormat()->GetDoc()); + if ( SwLayouter::FrameMovedFwdByObjPos( + rDoc, mrAnchorTextFrame, nMovedFwdToPageNum ) ) { if ( nMovedFwdToPageNum < nToPageNum ) - SwLayouter::RemoveMovedFwdFrm( rDoc, mrAnchorTextFrm ); + SwLayouter::RemoveMovedFwdFrame( rDoc, mrAnchorTextFrame ); else bInsert = false; } @@ -424,8 +424,8 @@ bool SwObjectFormatterTextFrm::DoFormatObjs() { // Indicate that anchor text frame has to move forward and // invalidate its position to force a re-format. - SwLayouter::InsertMovedFwdFrm( rDoc, mrAnchorTextFrm, nToPageNum ); - mrAnchorTextFrm.InvalidatePos(); + SwLayouter::InsertMovedFwdFrame( rDoc, mrAnchorTextFrame, nToPageNum ); + mrAnchorTextFrame.InvalidatePos(); // Indicate restart of the layout process bSuccess = false; @@ -440,25 +440,25 @@ bool SwObjectFormatterTextFrm::DoFormatObjs() } else { - OSL_FAIL( "<SwObjectFormatterTextFrm::DoFormatObjs(..)> - anchor frame not marked to move forward" ); + OSL_FAIL( "<SwObjectFormatterTextFrame::DoFormatObjs(..)> - anchor frame not marked to move forward" ); } } // #i40155# - mark anchor frame not to wrap around // objects under the condition, that its follow contains all its text. - else if ( !mrAnchorTextFrm.IsFollow() && - mrAnchorTextFrm.GetFollow() && - mrAnchorTextFrm.GetFollow()->GetOfst() == 0 ) + else if ( !mrAnchorTextFrame.IsFollow() && + mrAnchorTextFrame.GetFollow() && + mrAnchorTextFrame.GetFollow()->GetOfst() == 0 ) { - SwLayouter::RemoveMovedFwdFrm( - *(mrAnchorTextFrm.FindPageFrm()->GetFormat()->GetDoc()), - mrAnchorTextFrm ); + SwLayouter::RemoveMovedFwdFrame( + *(mrAnchorTextFrame.FindPageFrame()->GetFormat()->GetDoc()), + mrAnchorTextFrame ); } } return bSuccess; } -void SwObjectFormatterTextFrm::_InvalidatePrevObjs( SwAnchoredObject& _rAnchoredObj ) +void SwObjectFormatterTextFrame::_InvalidatePrevObjs( SwAnchoredObject& _rAnchoredObj ) { // invalidate all previous objects, whose wrapping influence on the object // positioning is <NONE_CONCURRENT_POSITIONED>. @@ -469,7 +469,7 @@ void SwObjectFormatterTextFrm::_InvalidatePrevObjs( SwAnchoredObject& _rAnchored // #i35017# - constant name has changed text::WrapInfluenceOnPosition::ONCE_CONCURRENT ) { - const SwSortedObjs* pObjs = GetAnchorFrm().GetDrawObjs(); + const SwSortedObjs* pObjs = GetAnchorFrame().GetDrawObjs(); if ( pObjs ) { // determine start index @@ -491,7 +491,7 @@ void SwObjectFormatterTextFrm::_InvalidatePrevObjs( SwAnchoredObject& _rAnchored } } -void SwObjectFormatterTextFrm::_InvalidateFollowObjs( SwAnchoredObject& _rAnchoredObj, +void SwObjectFormatterTextFrame::_InvalidateFollowObjs( SwAnchoredObject& _rAnchoredObj, const bool _bInclObj ) { if ( _bInclObj ) @@ -499,7 +499,7 @@ void SwObjectFormatterTextFrm::_InvalidateFollowObjs( SwAnchoredObject& _rAnchor _rAnchoredObj.InvalidateObjPosForConsiderWrapInfluence( true ); } - const SwSortedObjs* pObjs = GetPageFrm().GetSortedObjs(); + const SwSortedObjs* pObjs = GetPageFrame().GetSortedObjs(); if ( pObjs ) { // determine start index @@ -511,7 +511,7 @@ void SwObjectFormatterTextFrm::_InvalidateFollowObjs( SwAnchoredObject& _rAnchor } } -SwAnchoredObject* SwObjectFormatterTextFrm::_GetFirstObjWithMovedFwdAnchor( +SwAnchoredObject* SwObjectFormatterTextFrame::_GetFirstObjWithMovedFwdAnchor( const sal_Int16 _nWrapInfluenceOnPosition, sal_uInt32& _noToPageNum, bool& _boInFollow ) @@ -519,7 +519,7 @@ SwAnchoredObject* SwObjectFormatterTextFrm::_GetFirstObjWithMovedFwdAnchor( // #i35017# - constant names have changed OSL_ENSURE( _nWrapInfluenceOnPosition == text::WrapInfluenceOnPosition::ONCE_SUCCESSIVE || _nWrapInfluenceOnPosition == text::WrapInfluenceOnPosition::ONCE_CONCURRENT, - "<SwObjectFormatterTextFrm::_GetFirstObjWithMovedFwdAnchor(..)> - invalid value for parameter <_nWrapInfluenceOnPosition>" ); + "<SwObjectFormatterTextFrame::_GetFirstObjWithMovedFwdAnchor(..)> - invalid value for parameter <_nWrapInfluenceOnPosition>" ); SwAnchoredObject* pRetAnchoredObj = nullptr; @@ -535,7 +535,7 @@ SwAnchoredObject* SwObjectFormatterTextFrm::_GetFirstObjWithMovedFwdAnchor( // #i26945# - use new method <_CheckMovedFwdCondition(..)> // #i43913# // #i58182# - consider new method signature - if ( SwObjectFormatterTextFrm::CheckMovedFwdCondition( *GetCollectedObj( i ), + if ( SwObjectFormatterTextFrame::CheckMovedFwdCondition( *GetCollectedObj( i ), GetPgNumOfCollected( i ), IsCollectedAnchoredAtMaster( i ), _noToPageNum, _boInFollow ) ) @@ -551,7 +551,7 @@ SwAnchoredObject* SwObjectFormatterTextFrm::_GetFirstObjWithMovedFwdAnchor( // #i58182# // - replace private method by corresponding static public method -bool SwObjectFormatterTextFrm::CheckMovedFwdCondition( +bool SwObjectFormatterTextFrame::CheckMovedFwdCondition( SwAnchoredObject& _rAnchoredObj, const sal_uInt32 _nFromPageNum, const bool _bAnchoredAtMasterBeforeFormatAnchor, @@ -560,10 +560,10 @@ bool SwObjectFormatterTextFrm::CheckMovedFwdCondition( { bool bAnchorIsMovedForward( false ); - SwPageFrm* pPageFrmOfAnchor = _rAnchoredObj.FindPageFrmOfAnchor(); - if ( pPageFrmOfAnchor ) + SwPageFrame* pPageFrameOfAnchor = _rAnchoredObj.FindPageFrameOfAnchor(); + if ( pPageFrameOfAnchor ) { - const sal_uInt32 nPageNum = pPageFrmOfAnchor->GetPhyPageNum(); + const sal_uInt32 nPageNum = pPageFrameOfAnchor->GetPhyPageNum(); if ( nPageNum > _nFromPageNum ) { _noToPageNum = nPageNum; @@ -575,9 +575,9 @@ bool SwObjectFormatterTextFrm::CheckMovedFwdCondition( // than 1. if ( _noToPageNum > (_nFromPageNum + 1) ) { - SwFrm* pAnchorFrm = _rAnchoredObj.GetAnchorFrmContainingAnchPos(); - if ( pAnchorFrm->IsInTab() && - pAnchorFrm->IsInFollowFlowRow() ) + SwFrame* pAnchorFrame = _rAnchoredObj.GetAnchorFrameContainingAnchPos(); + if ( pAnchorFrame->IsInTab() && + pAnchorFrame->IsInFollowFlowRow() ) { _noToPageNum = _nFromPageNum + 1; } @@ -595,20 +595,20 @@ bool SwObjectFormatterTextFrm::CheckMovedFwdCondition( ((_rAnchoredObj.GetFrameFormat().GetAnchor().GetAnchorId() == FLY_AT_CHAR) || (_rAnchoredObj.GetFrameFormat().GetAnchor().GetAnchorId() == FLY_AT_PARA))) { - SwFrm* pAnchorFrm = _rAnchoredObj.GetAnchorFrmContainingAnchPos(); - OSL_ENSURE( pAnchorFrm->IsTextFrm(), - "<SwObjectFormatterTextFrm::CheckMovedFwdCondition(..) - wrong type of anchor frame>" ); - SwTextFrm* pAnchorTextFrm = static_cast<SwTextFrm*>(pAnchorFrm); + SwFrame* pAnchorFrame = _rAnchoredObj.GetAnchorFrameContainingAnchPos(); + OSL_ENSURE( pAnchorFrame->IsTextFrame(), + "<SwObjectFormatterTextFrame::CheckMovedFwdCondition(..) - wrong type of anchor frame>" ); + SwTextFrame* pAnchorTextFrame = static_cast<SwTextFrame*>(pAnchorFrame); bool bCheck( false ); - if ( pAnchorTextFrm->IsFollow() ) + if ( pAnchorTextFrame->IsFollow() ) { bCheck = true; } - else if( pAnchorTextFrm->IsInTab() ) + else if( pAnchorTextFrame->IsInTab() ) { - const SwRowFrm* pMasterRow = pAnchorTextFrm->IsInFollowFlowRow(); + const SwRowFrame* pMasterRow = pAnchorTextFrame->IsInFollowFlowRow(); if ( pMasterRow && - pMasterRow->FindPageFrm() == pPageFrmOfAnchor ) + pMasterRow->FindPageFrame() == pPageFrameOfAnchor ) { bCheck = true; } @@ -617,12 +617,12 @@ bool SwObjectFormatterTextFrm::CheckMovedFwdCondition( { // check, if found text frame will be on the next page // by checking, if it's in a column, which has no next. - SwFrm* pColFrm = pAnchorTextFrm->FindColFrm(); - while ( pColFrm && !pColFrm->GetNext() ) + SwFrame* pColFrame = pAnchorTextFrame->FindColFrame(); + while ( pColFrame && !pColFrame->GetNext() ) { - pColFrm = pColFrm->FindColFrm(); + pColFrame = pColFrame->FindColFrame(); } - if ( !pColFrm || !pColFrm->GetNext() ) + if ( !pColFrame || !pColFrame->GetNext() ) { _noToPageNum = _nFromPageNum + 1; bAnchorIsMovedForward = true; @@ -636,26 +636,26 @@ bool SwObjectFormatterTextFrm::CheckMovedFwdCondition( } // #i40140# - helper method to format layout frames used by -// method <SwObjectFormatterTextFrm::_FormatAnchorFrmForCheckMoveFwd()> +// method <SwObjectFormatterTextFrame::_FormatAnchorFrameForCheckMoveFwd()> // #i44049# - format till a certain lower frame, if provided. -static void lcl_FormatContentOfLayoutFrm( SwLayoutFrm* pLayFrm, - SwFrm* pLastLowerFrm = nullptr ) +static void lcl_FormatContentOfLayoutFrame( SwLayoutFrame* pLayFrame, + SwFrame* pLastLowerFrame = nullptr ) { - SwFrm* pLowerFrm = pLayFrm->GetLower(); - while ( pLowerFrm ) + SwFrame* pLowerFrame = pLayFrame->GetLower(); + while ( pLowerFrame ) { // #i44049# - if ( pLastLowerFrm && pLowerFrm == pLastLowerFrm ) + if ( pLastLowerFrame && pLowerFrame == pLastLowerFrame ) { break; } - if ( pLowerFrm->IsLayoutFrm() ) - lcl_FormatContentOfLayoutFrm( static_cast<SwLayoutFrm*>(pLowerFrm), - pLastLowerFrm ); + if ( pLowerFrame->IsLayoutFrame() ) + lcl_FormatContentOfLayoutFrame( static_cast<SwLayoutFrame*>(pLowerFrame), + pLastLowerFrame ); else - pLowerFrm->Calc(pLowerFrm->getRootFrm()->GetCurrShell()->GetOut()); + pLowerFrame->Calc(pLowerFrame->getRootFrame()->GetCurrShell()->GetOut()); - pLowerFrm = pLowerFrm->GetNext(); + pLowerFrame = pLowerFrame->GetNext(); } } @@ -667,90 +667,90 @@ static void lcl_FormatContentOfLayoutFrm( SwLayoutFrm* pLayFrm, to format the frames, which have become invalid due to the anchored object formatting in the iterative object positioning algorithm */ -void SwObjectFormatterTextFrm::FormatAnchorFrmAndItsPrevs( SwTextFrm& _rAnchorTextFrm ) +void SwObjectFormatterTextFrame::FormatAnchorFrameAndItsPrevs( SwTextFrame& _rAnchorTextFrame ) { // #i47014# - no format of section and previous columns // for follow text frames. - if ( !_rAnchorTextFrm.IsFollow() ) + if ( !_rAnchorTextFrame.IsFollow() ) { // if anchor frame is directly inside a section, format this section and // its previous frames. // Note: It's a very simple format without formatting objects. - if ( _rAnchorTextFrm.IsInSct() ) + if ( _rAnchorTextFrame.IsInSct() ) { - SwFrm* pSectFrm = _rAnchorTextFrm.GetUpper(); - while ( pSectFrm ) + SwFrame* pSectFrame = _rAnchorTextFrame.GetUpper(); + while ( pSectFrame ) { - if ( pSectFrm->IsSctFrm() || pSectFrm->IsCellFrm() ) + if ( pSectFrame->IsSctFrame() || pSectFrame->IsCellFrame() ) { break; } - pSectFrm = pSectFrm->GetUpper(); + pSectFrame = pSectFrame->GetUpper(); } - if ( pSectFrm && pSectFrm->IsSctFrm() ) + if ( pSectFrame && pSectFrame->IsSctFrame() ) { // #i44049# - _rAnchorTextFrm.LockJoin(); - SwFrm* pFrm = pSectFrm->GetUpper()->GetLower(); + _rAnchorTextFrame.LockJoin(); + SwFrame* pFrame = pSectFrame->GetUpper()->GetLower(); // #i49605# - section frame could move forward // by the format of its previous frame. - // Thus, check for valid <pFrm>. - while ( pFrm && pFrm != pSectFrm ) + // Thus, check for valid <pFrame>. + while ( pFrame && pFrame != pSectFrame ) { - if ( pFrm->IsLayoutFrm() ) - lcl_FormatContentOfLayoutFrm( static_cast<SwLayoutFrm*>(pFrm) ); + if ( pFrame->IsLayoutFrame() ) + lcl_FormatContentOfLayoutFrame( static_cast<SwLayoutFrame*>(pFrame) ); else - pFrm->Calc(pFrm->getRootFrm()->GetCurrShell()->GetOut()); + pFrame->Calc(pFrame->getRootFrame()->GetCurrShell()->GetOut()); - pFrm = pFrm->GetNext(); + pFrame = pFrame->GetNext(); } - lcl_FormatContentOfLayoutFrm( static_cast<SwLayoutFrm*>(pSectFrm), - &_rAnchorTextFrm ); + lcl_FormatContentOfLayoutFrame( static_cast<SwLayoutFrame*>(pSectFrame), + &_rAnchorTextFrame ); // #i44049# - _rAnchorTextFrm.UnlockJoin(); + _rAnchorTextFrame.UnlockJoin(); } } // #i40140# - if anchor frame is inside a column, // format the content of the previous columns. // Note: It's a very simple format without formatting objects. - SwFrm* pColFrmOfAnchor = _rAnchorTextFrm.FindColFrm(); - if ( pColFrmOfAnchor ) + SwFrame* pColFrameOfAnchor = _rAnchorTextFrame.FindColFrame(); + if ( pColFrameOfAnchor ) { // #i44049# - _rAnchorTextFrm.LockJoin(); - SwFrm* pColFrm = pColFrmOfAnchor->GetUpper()->GetLower(); - while ( pColFrm != pColFrmOfAnchor ) + _rAnchorTextFrame.LockJoin(); + SwFrame* pColFrame = pColFrameOfAnchor->GetUpper()->GetLower(); + while ( pColFrame != pColFrameOfAnchor ) { - SwFrm* pFrm = pColFrm->GetLower(); - while ( pFrm ) + SwFrame* pFrame = pColFrame->GetLower(); + while ( pFrame ) { - if ( pFrm->IsLayoutFrm() ) - lcl_FormatContentOfLayoutFrm( static_cast<SwLayoutFrm*>(pFrm) ); + if ( pFrame->IsLayoutFrame() ) + lcl_FormatContentOfLayoutFrame( static_cast<SwLayoutFrame*>(pFrame) ); else - pFrm->Calc(pFrm->getRootFrm()->GetCurrShell()->GetOut()); + pFrame->Calc(pFrame->getRootFrame()->GetCurrShell()->GetOut()); - pFrm = pFrm->GetNext(); + pFrame = pFrame->GetNext(); } - pColFrm = pColFrm->GetNext(); + pColFrame = pColFrame->GetNext(); } // #i44049# - _rAnchorTextFrm.UnlockJoin(); + _rAnchorTextFrame.UnlockJoin(); } } // format anchor frame - format of its follow not needed // #i43255# - forbid follow format, only if anchor text // frame is in table - if ( _rAnchorTextFrm.IsInTab() ) + if ( _rAnchorTextFrame.IsInTab() ) { - SwForbidFollowFormat aForbidFollowFormat( _rAnchorTextFrm ); - _rAnchorTextFrm.Calc(_rAnchorTextFrm.getRootFrm()->GetCurrShell()->GetOut()); + SwForbidFollowFormat aForbidFollowFormat( _rAnchorTextFrame ); + _rAnchorTextFrame.Calc(_rAnchorTextFrame.getRootFrame()->GetCurrShell()->GetOut()); } else { - _rAnchorTextFrm.Calc(_rAnchorTextFrm.getRootFrm()->GetCurrShell()->GetOut()); + _rAnchorTextFrame.Calc(_rAnchorTextFrame.getRootFrame()->GetCurrShell()->GetOut()); } } @@ -758,19 +758,19 @@ void SwObjectFormatterTextFrm::FormatAnchorFrmAndItsPrevs( SwTextFrm& _rAnchorTe #i40141# */ -void SwObjectFormatterTextFrm::_FormatAnchorFrmForCheckMoveFwd() +void SwObjectFormatterTextFrame::_FormatAnchorFrameForCheckMoveFwd() { - SwObjectFormatterTextFrm::FormatAnchorFrmAndItsPrevs( mrAnchorTextFrm ); + SwObjectFormatterTextFrame::FormatAnchorFrameAndItsPrevs( mrAnchorTextFrame ); } /** method to determine if at least one anchored object has state <temporarly consider wrapping style influence> set. */ -bool SwObjectFormatterTextFrm::_AtLeastOneObjIsTmpConsiderWrapInfluence() +bool SwObjectFormatterTextFrame::_AtLeastOneObjIsTmpConsiderWrapInfluence() { bool bRet( false ); - const SwSortedObjs* pObjs = GetAnchorFrm().GetDrawObjs(); + const SwSortedObjs* pObjs = GetAnchorFrame().GetDrawObjs(); if ( pObjs && pObjs->size() > 1 ) { for ( size_t i = 0; i < pObjs->size(); ++i ) diff --git a/sw/source/core/layout/objectformattertxtfrm.hxx b/sw/source/core/layout/objectformattertxtfrm.hxx index 06d65f9e3db7..8220e60b92c3 100644 --- a/sw/source/core/layout/objectformattertxtfrm.hxx +++ b/sw/source/core/layout/objectformattertxtfrm.hxx @@ -22,23 +22,23 @@ #include <objectformatter.hxx> #include <sal/types.h> -class SwTextFrm; +class SwTextFrame; // #i28701# // Format floating screen objects, which are anchored at a given anchor text frame // and registered at the given page frame. -class SwObjectFormatterTextFrm : public SwObjectFormatter +class SwObjectFormatterTextFrame : public SwObjectFormatter { private: // anchor text frame - SwTextFrm& mrAnchorTextFrm; + SwTextFrame& mrAnchorTextFrame; // 'master' anchor text frame - SwTextFrm* mpMasterAnchorTextFrm; + SwTextFrame* mpMasterAnchorTextFrame; - SwObjectFormatterTextFrm( SwTextFrm& _rAnchorTextFrm, - const SwPageFrm& _rPageFrm, - SwTextFrm* _pMasterAnchorTextFrm, + SwObjectFormatterTextFrame( SwTextFrame& _rAnchorTextFrame, + const SwPageFrame& _rPageFrame, + SwTextFrame* _pMasterAnchorTextFrame, SwLayAction* _pLayAction ); /** method to invalidate objects, anchored previous to given object at @@ -107,7 +107,7 @@ class SwObjectFormatterTextFrm : public SwObjectFormatter #i40141# */ - void _FormatAnchorFrmForCheckMoveFwd(); + void _FormatAnchorFrameForCheckMoveFwd(); /** method to determine if at least one anchored object has state <temporarly consider wrapping style influence> set. @@ -116,22 +116,22 @@ class SwObjectFormatterTextFrm : public SwObjectFormatter protected: - virtual SwFrm& GetAnchorFrm() override; + virtual SwFrame& GetAnchorFrame() override; public: - virtual ~SwObjectFormatterTextFrm(); + virtual ~SwObjectFormatterTextFrame(); // #i40147# - add parameter <_bCheckForMovedFwd>. virtual bool DoFormatObj( SwAnchoredObject& _rAnchoredObj, const bool _bCheckForMovedFwd = false ) override; virtual bool DoFormatObjs() override; - /** method to create an instance of <SwObjectFormatterTextFrm> is + /** method to create an instance of <SwObjectFormatterTextFrame> is necessary. */ - static SwObjectFormatterTextFrm* CreateObjFormatter( - SwTextFrm& _rAnchorTextFrm, - const SwPageFrm& _rPageFrm, + static SwObjectFormatterTextFrame* CreateObjFormatter( + SwTextFrame& _rAnchorTextFrame, + const SwPageFrame& _rPageFrame, SwLayAction* _pLayAction ); /** method to format given anchor text frame and its previous frames @@ -142,11 +142,11 @@ class SwObjectFormatterTextFrm : public SwObjectFormatter to format the frames, which have become invalid due to the anchored object formatting in the iterative object positioning algorithm - @param _rAnchorTextFrm + @param _rAnchorTextFrame input parameter - reference to anchor text frame, which has to be formatted including its previous frames of the page. */ - static void FormatAnchorFrmAndItsPrevs( SwTextFrm& _rAnchorTextFrm ); + static void FormatAnchorFrameAndItsPrevs( SwTextFrame& _rAnchorTextFrame ); /** method to check the conditions, if 'anchor is moved forward' diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx index 60ad4dde4908..34adb7a7ea4f 100644 --- a/sw/source/core/layout/pagechg.cxx +++ b/sw/source/core/layout/pagechg.cxx @@ -60,13 +60,13 @@ using namespace ::com::sun::star; -SwBodyFrm::SwBodyFrm( SwFrameFormat *pFormat, SwFrm* pSib ): - SwLayoutFrm( pFormat, pSib ) +SwBodyFrame::SwBodyFrame( SwFrameFormat *pFormat, SwFrame* pSib ): + SwLayoutFrame( pFormat, pSib ) { - mnFrmType = FRM_BODY; + mnFrameType = FRM_BODY; } -void SwBodyFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttrs * ) +void SwBodyFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttrs * ) { // Formatting of the body is too simple, thus, it gets its own format method. // Borders etc. are not taken into account here. @@ -78,38 +78,38 @@ void SwBodyFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAt { SwTwips nHeight = GetUpper()->Prt().Height(); SwTwips nWidth = GetUpper()->Prt().Width(); - const SwFrm *pFrm = GetUpper()->Lower(); + const SwFrame *pFrame = GetUpper()->Lower(); do { - if ( pFrm != this ) + if ( pFrame != this ) { - if( pFrm->IsVertical() ) - nWidth -= pFrm->Frm().Width(); + if( pFrame->IsVertical() ) + nWidth -= pFrame->Frame().Width(); else - nHeight -= pFrm->Frm().Height(); + nHeight -= pFrame->Frame().Height(); } - pFrm = pFrm->GetNext(); - } while ( pFrm ); + pFrame = pFrame->GetNext(); + } while ( pFrame ); if ( nHeight < 0 ) nHeight = 0; - Frm().Height( nHeight ); + Frame().Height( nHeight ); - if( IsVertical() && !IsVertLR() && !IsReverse() && nWidth != Frm().Width() ) - Frm().Pos().setX(Frm().Pos().getX() + Frm().Width() - nWidth); - Frm().Width( nWidth ); + if( IsVertical() && !IsVertLR() && !IsReverse() && nWidth != Frame().Width() ) + Frame().Pos().setX(Frame().Pos().getX() + Frame().Width() - nWidth); + Frame().Width( nWidth ); } bool bNoGrid = true; - if( GetUpper()->IsPageFrm() && static_cast<SwPageFrm*>(GetUpper())->HasGrid() ) + if( GetUpper()->IsPageFrame() && static_cast<SwPageFrame*>(GetUpper())->HasGrid() ) { SwTextGridItem const*const pGrid( - GetGridItem(static_cast<SwPageFrm*>(GetUpper()))); + GetGridItem(static_cast<SwPageFrame*>(GetUpper()))); if( pGrid ) { bNoGrid = false; long nSum = pGrid->GetBaseHeight() + pGrid->GetRubyHeight(); SWRECTFN( this ) - long nSize = (Frm().*fnRect->fnGetWidth)(); + long nSize = (Frame().*fnRect->fnGetWidth)(); long nBorder = 0; if( GRID_LINES_CHARS == pGrid->GetGridType() ) { @@ -123,7 +123,7 @@ void SwBodyFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAt (Prt().*fnRect->fnSetWidth)( nSize ); // Height of body frame: - nBorder = (Frm().*fnRect->fnGetHeight)(); + nBorder = (Frame().*fnRect->fnGetHeight)(); // Number of possible lines in area of body frame: long nNumberOfLines = nBorder / nSum; @@ -136,7 +136,7 @@ void SwBodyFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAt nBorder /= 2; // #i21774# Footnotes and centering the grid does not work together: - const bool bAdjust = static_cast<SwPageFrm*>(GetUpper())->GetFormat()->GetDoc()-> + const bool bAdjust = static_cast<SwPageFrame*>(GetUpper())->GetFormat()->GetDoc()-> GetFootnoteIdxs().empty(); (Prt().*fnRect->fnSetPosY)( bAdjust ? nBorder : 0 ); @@ -147,14 +147,14 @@ void SwBodyFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAt { Prt().Pos().setX(0); Prt().Pos().setY(0); - Prt().Height( Frm().Height() ); - Prt().Width( Frm().Width() ); + Prt().Height( Frame().Height() ); + Prt().Width( Frame().Width() ); } mbValidSize = mbValidPrtArea = true; } -SwPageFrm::SwPageFrm( SwFrameFormat *pFormat, SwFrm* pSib, SwPageDesc *pPgDsc ) : - SwFootnoteBossFrm( pFormat, pSib ), +SwPageFrame::SwPageFrame( SwFrameFormat *pFormat, SwFrame* pSib, SwPageDesc *pPgDsc ) : + SwFootnoteBossFrame( pFormat, pSib ), m_pSortedObjs( nullptr ), m_pDesc( pPgDsc ), m_nPhyPageNum( 0 ) @@ -172,23 +172,23 @@ SwPageFrm::SwPageFrm( SwFrameFormat *pFormat, SwFrm* pSib, SwPageDesc *pPgDsc ) m_bHasGrid = false; SetMaxFootnoteHeight( pPgDsc->GetFootnoteInfo().GetHeight() ? pPgDsc->GetFootnoteInfo().GetHeight() : LONG_MAX ), - mnFrmType = FRM_PAGE; + mnFrameType = FRM_PAGE; m_bInvalidLayout = m_bInvalidContent = m_bInvalidSpelling = m_bInvalidSmartTags = m_bInvalidAutoCmplWrds = m_bInvalidWordCount = true; m_bInvalidFlyLayout = m_bInvalidFlyContent = m_bInvalidFlyInCnt = m_bFootnotePage = m_bEndNotePage = false; - SwViewShell *pSh = getRootFrm()->GetCurrShell(); + SwViewShell *pSh = getRootFrame()->GetCurrShell(); const bool bBrowseMode = pSh && pSh->GetViewOptions()->getBrowseMode(); vcl::RenderContext* pRenderContext = pSh ? pSh->GetOut() : nullptr; if ( bBrowseMode ) { - Frm().Height( 0 ); + Frame().Height( 0 ); long nWidth = pSh->VisArea().Width(); if ( !nWidth ) nWidth = 5000L; //aendert sich sowieso - Frm().Width ( nWidth ); + Frame().Width ( nWidth ); } else - Frm().SSize( pFormat->GetFrmSize().GetSize() ); + Frame().SSize( pFormat->GetFrameSize().GetSize() ); // create and insert body area if it is not a blank page SwDoc *pDoc = pFormat->GetDoc(); @@ -196,11 +196,11 @@ SwPageFrm::SwPageFrm( SwFrameFormat *pFormat, SwFrm* pSib, SwPageDesc *pPgDsc ) { m_bEmptyPage = false; Calc(pRenderContext); // so that the PrtArea is correct - SwBodyFrm *pBodyFrm = new SwBodyFrm( pDoc->GetDfltFrameFormat(), this ); - pBodyFrm->ChgSize( Prt().SSize() ); - pBodyFrm->Paste( this ); - pBodyFrm->Calc(pRenderContext); // so that the columns can be inserted correctly - pBodyFrm->InvalidatePos(); + SwBodyFrame *pBodyFrame = new SwBodyFrame( pDoc->GetDfltFrameFormat(), this ); + pBodyFrame->ChgSize( Prt().SSize() ); + pBodyFrame->Paste( this ); + pBodyFrame->Calc(pRenderContext); // so that the columns can be inserted correctly + pBodyFrame->InvalidatePos(); if ( bBrowseMode ) _InvalidateSize(); @@ -215,15 +215,15 @@ SwPageFrm::SwPageFrm( SwFrameFormat *pFormat, SwFrm* pSib, SwPageDesc *pPgDsc ) if ( rCol.GetNumCols() > 1 ) { const SwFormatCol aOld; //ChgColumns() needs an old value - pBodyFrm->ChgColumns( aOld, rCol ); + pBodyFrame->ChgColumns( aOld, rCol ); } } } -void SwPageFrm::DestroyImpl() +void SwPageFrame::DestroyImpl() { // Cleanup the header-footer controls in the SwEditWin - SwViewShell* pSh = getRootFrm()->GetCurrShell(); + SwViewShell* pSh = getRootFrame()->GetCurrShell(); SwWrtShell* pWrtSh = dynamic_cast< SwWrtShell* >( pSh ); if ( pWrtSh ) { @@ -231,7 +231,7 @@ void SwPageFrm::DestroyImpl() rEditWin.GetFrameControlsManager( ).RemoveControls( this ); } - // empty FlyContainer, deletion of the Flys is done by the anchor (in base class SwFrm) + // empty FlyContainer, deletion of the Flys is done by the anchor (in base class SwFrame) if ( m_pSortedObjs ) { // Objects can be anchored at pages that are before their anchors (why ever...). @@ -239,7 +239,7 @@ void SwPageFrm::DestroyImpl() for ( size_t i = 0; i < m_pSortedObjs->size(); ++i ) { SwAnchoredObject* pAnchoredObj = (*m_pSortedObjs)[i]; - pAnchoredObj->SetPageFrm( nullptr ); + pAnchoredObj->SetPageFrame( nullptr ); } delete m_pSortedObjs; m_pSortedObjs = nullptr; // reset to zero to prevent problems when detaching the Flys @@ -261,20 +261,20 @@ void SwPageFrm::DestroyImpl() // including border and shadow area. const bool bRightSidebar = (SidebarPosition() == sw::sidebarwindows::SidebarPosition::RIGHT); SwRect aRetoucheRect; - SwPageFrm::GetBorderAndShadowBoundRect( Frm(), pSh, pSh->GetOut(), aRetoucheRect, IsLeftShadowNeeded(), IsRightShadowNeeded(), bRightSidebar ); + SwPageFrame::GetBorderAndShadowBoundRect( Frame(), pSh, pSh->GetOut(), aRetoucheRect, IsLeftShadowNeeded(), IsRightShadowNeeded(), bRightSidebar ); pSh->AddPaintRect( aRetoucheRect ); } } } - SwFootnoteBossFrm::DestroyImpl(); + SwFootnoteBossFrame::DestroyImpl(); } -SwPageFrm::~SwPageFrm() +SwPageFrame::~SwPageFrame() { } -void SwPageFrm::CheckGrid( bool bInvalidate ) +void SwPageFrame::CheckGrid( bool bInvalidate ) { bool bOld = m_bHasGrid; m_bHasGrid = true; @@ -282,22 +282,22 @@ void SwPageFrm::CheckGrid( bool bInvalidate ) m_bHasGrid = nullptr != pGrid; if( bInvalidate || bOld != m_bHasGrid ) { - SwLayoutFrm* pBody = FindBodyCont(); + SwLayoutFrame* pBody = FindBodyCont(); if( pBody ) { pBody->InvalidatePrt(); - SwContentFrm* pFrm = pBody->ContainsContent(); - while( pBody->IsAnLower( pFrm ) ) + SwContentFrame* pFrame = pBody->ContainsContent(); + while( pBody->IsAnLower( pFrame ) ) { - static_cast<SwTextFrm*>(pFrm)->Prepare(); - pFrm = pFrm->GetNextContentFrm(); + static_cast<SwTextFrame*>(pFrame)->Prepare(); + pFrame = pFrame->GetNextContentFrame(); } } SetCompletePaint(); } } -void SwPageFrm::CheckDirection( bool bVert ) +void SwPageFrame::CheckDirection( bool bVert ) { sal_uInt16 nDir = static_cast<const SvxFrameDirectionItem&>(GetFormat()->GetFormatAttr( RES_FRAMEDIR )).GetValue(); @@ -310,7 +310,7 @@ void SwPageFrm::CheckDirection( bool bVert ) } else { - const SwViewShell *pSh = getRootFrm()->GetCurrShell(); + const SwViewShell *pSh = getRootFrame()->GetCurrShell(); if( pSh && pSh->GetViewOptions()->getBrowseMode() ) { mbVertLR = false; @@ -341,24 +341,24 @@ void SwPageFrm::CheckDirection( bool bVert ) } /// create specific Flys for this page and format generic content -static void lcl_FormatLay( SwLayoutFrm *pLay ) +static void lcl_FormatLay( SwLayoutFrame *pLay ) { - vcl::RenderContext* pRenderContext = pLay->getRootFrm()->GetCurrShell()->GetOut(); - // format all LayoutFrms - no tables, Flys etc. + vcl::RenderContext* pRenderContext = pLay->getRootFrame()->GetCurrShell()->GetOut(); + // format all LayoutFrames - no tables, Flys etc. - SwFrm *pTmp = pLay->Lower(); + SwFrame *pTmp = pLay->Lower(); // first the low-level ones while ( pTmp ) { if ( pTmp->GetType() & 0x00FF ) - ::lcl_FormatLay( static_cast<SwLayoutFrm*>(pTmp) ); + ::lcl_FormatLay( static_cast<SwLayoutFrame*>(pTmp) ); pTmp = pTmp->GetNext(); } pLay->Calc(pRenderContext); } /// Create Flys or register draw objects -static void lcl_MakeObjs( const SwFrameFormats &rTable, SwPageFrm *pPage ) +static void lcl_MakeObjs( const SwFrameFormats &rTable, SwPageFrame *pPage ) { // formats are in the special table of the document @@ -395,7 +395,7 @@ static void lcl_MakeObjs( const SwFrameFormats &rTable, SwPageFrm *pPage ) // object needs to be moved. // In some cases the object is already anchored to the correct page. // This will be handled here and does not need to be coded extra. - SwPageFrm *pPg = pPage->IsEmptyPage() ? static_cast<SwPageFrm*>(pPage->GetNext()) : pPage; + SwPageFrame *pPg = pPage->IsEmptyPage() ? static_cast<SwPageFrame*>(pPage->GetNext()) : pPage; if ( bSdrObj ) { // OD 23.06.2003 #108784# - consider 'virtual' drawing objects @@ -413,22 +413,22 @@ static void lcl_MakeObjs( const SwFrameFormats &rTable, SwPageFrm *pPage ) } else { - if ( pContact->GetAnchorFrm() ) + if ( pContact->GetAnchorFrame() ) pContact->DisconnectFromLayout( false ); pPg->AppendDrawObj( *(pContact->GetAnchoredObj( pSdrObj )) ); } } else { - SwIterator<SwFlyFrm,SwFormat> aIter( *pFormat ); - SwFlyFrm *pFly = aIter.First(); + SwIterator<SwFlyFrame,SwFormat> aIter( *pFormat ); + SwFlyFrame *pFly = aIter.First(); if ( pFly) { - if( pFly->GetAnchorFrm() ) - pFly->AnchorFrm()->RemoveFly( pFly ); + if( pFly->GetAnchorFrame() ) + pFly->AnchorFrame()->RemoveFly( pFly ); } else - pFly = new SwFlyLayFrm( static_cast<SwFlyFrameFormat*>(pFormat), pPg, pPg ); + pFly = new SwFlyLayFrame( static_cast<SwFlyFrameFormat*>(pFormat), pPg, pPg ); pPg->AppendFly( pFly ); ::RegistFlys( pPg, pFly ); } @@ -436,7 +436,7 @@ static void lcl_MakeObjs( const SwFrameFormats &rTable, SwPageFrm *pPage ) } } -void SwPageFrm::PreparePage( bool bFootnote ) +void SwPageFrame::PreparePage( bool bFootnote ) { SetFootnotePage( bFootnote ); @@ -444,7 +444,7 @@ void SwPageFrm::PreparePage( bool bFootnote ) // Due to made change on OOo 2.0 code line, method <::lcl_FormatLay(..)> has // the side effect, that the content of page header and footer are formatted. // For this formatting it is needed that the anchored objects are registered - // at the <SwPageFrm> instance. + // at the <SwPageFrame> instance. // Thus, first calling <::RegistFlys(..)>, then call <::lcl_FormatLay(..)> ::RegistFlys( this, this ); @@ -462,31 +462,31 @@ void SwPageFrm::PreparePage( bool bFootnote ) { SwDoc *pDoc = GetFormat()->GetDoc(); - if ( GetPrev() && static_cast<SwPageFrm*>(GetPrev())->IsEmptyPage() ) - lcl_MakeObjs( *pDoc->GetSpzFrameFormats(), static_cast<SwPageFrm*>(GetPrev()) ); + if ( GetPrev() && static_cast<SwPageFrame*>(GetPrev())->IsEmptyPage() ) + lcl_MakeObjs( *pDoc->GetSpzFrameFormats(), static_cast<SwPageFrame*>(GetPrev()) ); lcl_MakeObjs( *pDoc->GetSpzFrameFormats(), this ); // format footer/ header - SwLayoutFrm *pLow = static_cast<SwLayoutFrm*>(Lower()); + SwLayoutFrame *pLow = static_cast<SwLayoutFrame*>(Lower()); while ( pLow ) { if ( pLow->GetType() & (FRM_HEADER|FRM_FOOTER) ) { - SwContentFrm *pContent = pLow->ContainsContent(); + SwContentFrame *pContent = pLow->ContainsContent(); while ( pContent && pLow->IsAnLower( pContent ) ) { pContent->OptCalc(); // not the predecessors - pContent = pContent->GetNextContentFrm(); + pContent = pContent->GetNextContentFrame(); } } - pLow = static_cast<SwLayoutFrm*>(pLow->GetNext()); + pLow = static_cast<SwLayoutFrame*>(pLow->GetNext()); } } } -void SwPageFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) +void SwPageFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) { - SwViewShell *pSh = getRootFrm()->GetCurrShell(); + SwViewShell *pSh = getRootFrame()->GetCurrShell(); if ( pSh ) pSh->SetFirstVisPageInvalid(); sal_uInt8 nInvFlags = 0; @@ -508,7 +508,7 @@ void SwPageFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) aOIter.NextItem(); } if ( aOldSet.Count() || aNewSet.Count() ) - SwLayoutFrm::Modify( &aOldSet, &aNewSet ); + SwLayoutFrame::Modify( &aOldSet, &aNewSet ); } else _UpdateAttr( pOld, pNew, nInvFlags ); @@ -532,24 +532,24 @@ void SwPageFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) } -void SwPageFrm::SwClientNotify(const SwModify& rModify, const SfxHint& rHint) +void SwPageFrame::SwClientNotify(const SwModify& rModify, const SfxHint& rHint) { if(typeid(sw::PageFootnoteHint) == typeid(rHint)) { // currently the savest way: - static_cast<SwRootFrm*>(GetUpper())->SetSuperfluous(); + static_cast<SwRootFrame*>(GetUpper())->SetSuperfluous(); SetMaxFootnoteHeight(m_pDesc->GetFootnoteInfo().GetHeight()); if(!GetMaxFootnoteHeight()) SetMaxFootnoteHeight(LONG_MAX); SetColMaxFootnoteHeight(); // here, the page might be destroyed: - static_cast<SwRootFrm*>(GetUpper())->RemoveFootnotes(nullptr, false, true); + static_cast<SwRootFrame*>(GetUpper())->RemoveFootnotes(nullptr, false, true); } else SwClient::SwClientNotify(rModify, rHint); } -void SwPageFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew, +void SwPageFrame::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew, sal_uInt8 &rInvFlags, SwAttrSetChg *pOldSet, SwAttrSetChg *pNewSet ) { @@ -569,7 +569,7 @@ void SwPageFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew, const SwFormatCol &rNewCol = pNewFormat->GetCol(); if( rOldCol != rNewCol ) { - SwLayoutFrm *pB = FindBodyCont(); + SwLayoutFrame *pB = FindBodyCont(); assert(pB && "Page without Body."); pB->ChgColumns( rOldCol, rNewCol ); rInvFlags |= 0x20; @@ -590,47 +590,47 @@ void SwPageFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew, // no break case RES_FRM_SIZE: { - const SwRect aOldPageFrmRect( Frm() ); - SwViewShell *pSh = getRootFrm()->GetCurrShell(); + const SwRect aOldPageFrameRect( Frame() ); + SwViewShell *pSh = getRootFrame()->GetCurrShell(); if( pSh && pSh->GetViewOptions()->getBrowseMode() ) { mbValidSize = false; - // OD 28.10.2002 #97265# - Don't call <SwPageFrm::MakeAll()> + // OD 28.10.2002 #97265# - Don't call <SwPageFrame::MakeAll()> // Calculation of the page is not necessary, because its size is // invalidated here and further invalidation is done in the - // calling method <SwPageFrm::Modify(..)> and probably by calling - // <SwLayoutFrm::Modify(..)> at the end. + // calling method <SwPageFrame::Modify(..)> and probably by calling + // <SwLayoutFrame::Modify(..)> at the end. // It can also causes inconsistences, because the lowers are - // adjusted, but not calculated, and a <SwPageFrm::MakeAll()> of + // adjusted, but not calculated, and a <SwPageFrame::MakeAll()> of // a next page is called. This is performed on the switch to the // online layout. //MakeAll(); } else if (pNew) { - const SwFormatFrmSize &rSz = nWhich == RES_FMT_CHG ? - static_cast<const SwFormatChg*>(pNew)->pChangedFormat->GetFrmSize() : - static_cast<const SwFormatFrmSize&>(*pNew); + const SwFormatFrameSize &rSz = nWhich == RES_FMT_CHG ? + static_cast<const SwFormatChg*>(pNew)->pChangedFormat->GetFrameSize() : + static_cast<const SwFormatFrameSize&>(*pNew); - Frm().Height( std::max( rSz.GetHeight(), long(MINLAY) ) ); - Frm().Width ( std::max( rSz.GetWidth(), long(MINLAY) ) ); + Frame().Height( std::max( rSz.GetHeight(), long(MINLAY) ) ); + Frame().Width ( std::max( rSz.GetWidth(), long(MINLAY) ) ); if ( GetUpper() ) - static_cast<SwRootFrm*>(GetUpper())->CheckViewLayout( nullptr, nullptr ); + static_cast<SwRootFrame*>(GetUpper())->CheckViewLayout( nullptr, nullptr ); } // cleanup Window - if( pSh && pSh->GetWin() && aOldPageFrmRect.HasArea() ) + if( pSh && pSh->GetWin() && aOldPageFrameRect.HasArea() ) { // #i9719# - consider border and shadow of // page frame for determine 'old' rectangle - it's used for invalidating. const bool bRightSidebar = (SidebarPosition() == sw::sidebarwindows::SidebarPosition::RIGHT); SwRect aOldRectWithBorderAndShadow; - SwPageFrm::GetBorderAndShadowBoundRect( aOldPageFrmRect, pSh, pSh->GetOut(), aOldRectWithBorderAndShadow, + SwPageFrame::GetBorderAndShadowBoundRect( aOldPageFrameRect, pSh, pSh->GetOut(), aOldRectWithBorderAndShadow, IsLeftShadowNeeded(), IsRightShadowNeeded(), bRightSidebar ); pSh->InvalidateWindows( aOldRectWithBorderAndShadow ); } rInvFlags |= 0x03; - if ( aOldPageFrmRect.Height() != Frm().Height() ) + if ( aOldPageFrameRect.Height() != Frame().Height() ) rInvFlags |= 0x04; } break; @@ -639,7 +639,7 @@ void SwPageFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew, assert(pOld && pNew); //COL Missing Format if (pOld && pNew) { - SwLayoutFrm *pB = FindBodyCont(); + SwLayoutFrame *pB = FindBodyCont(); assert(pB); //page without body pB->ChgColumns( *static_cast<const SwFormatCol*>(pOld), *static_cast<const SwFormatCol*>(pNew) ); rInvFlags |= 0x22; @@ -673,12 +673,12 @@ void SwPageFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew, pNewSet->ClearItem( nWhich ); } else - SwLayoutFrm::Modify( pOld, pNew ); + SwLayoutFrame::Modify( pOld, pNew ); } } /// get information from Modify -bool SwPageFrm::GetInfo( SfxPoolItem & rInfo ) const +bool SwPageFrame::GetInfo( SfxPoolItem & rInfo ) const { if( RES_AUTOFMT_DOCNODE == rInfo.Which() ) { @@ -688,7 +688,7 @@ bool SwPageFrm::GetInfo( SfxPoolItem & rInfo ) const return true; // continue searching } -void SwPageFrm::SetPageDesc( SwPageDesc *pNew, SwFrameFormat *pFormat ) +void SwPageFrame::SetPageDesc( SwPageDesc *pNew, SwFrameFormat *pFormat ) { m_pDesc = pNew; if ( pFormat ) @@ -704,7 +704,7 @@ void SwPageFrm::SetPageDesc( SwPageDesc *pNew, SwFrameFormat *pFormat ) * 4. default PageDesc * 5. In BrowseMode use the first paragraph or default PageDesc. */ -SwPageDesc *SwPageFrm::FindPageDesc() +SwPageDesc *SwPageFrame::FindPageDesc() { // 0. if ( IsFootnotePage() ) @@ -719,17 +719,17 @@ SwPageDesc *SwPageFrm::FindPageDesc() SwPageDesc *pRet = nullptr; //5. - const SwViewShell *pSh = getRootFrm()->GetCurrShell(); + const SwViewShell *pSh = getRootFrame()->GetCurrShell(); if( pSh && pSh->GetViewOptions()->getBrowseMode() ) { - SwContentFrm *pFrm = GetUpper()->ContainsContent(); - while (pFrm && !pFrm->IsInDocBody()) - pFrm = pFrm->GetNextContentFrm(); - if (pFrm) + SwContentFrame *pFrame = GetUpper()->ContainsContent(); + while (pFrame && !pFrame->IsInDocBody()) + pFrame = pFrame->GetNextContentFrame(); + if (pFrame) { - SwFrm *pFlow = pFrm; + SwFrame *pFlow = pFrame; if ( pFlow->IsInTab() ) - pFlow = pFlow->FindTabFrm(); + pFlow = pFlow->FindTabFrame(); pRet = const_cast<SwPageDesc*>(pFlow->GetAttrSet()->GetPageDesc().GetPageDesc()); } if ( !pRet ) @@ -737,14 +737,14 @@ SwPageDesc *SwPageFrm::FindPageDesc() return pRet; } - SwFrm *pFlow = FindFirstBodyContent(); + SwFrame *pFlow = FindFirstBodyContent(); if ( pFlow && pFlow->IsInTab() ) - pFlow = pFlow->FindTabFrm(); + pFlow = pFlow->FindTabFrame(); //1. if ( pFlow ) { - SwFlowFrm *pTmp = SwFlowFrm::CastFlowFrm( pFlow ); + SwFlowFrame *pTmp = SwFlowFrame::CastFlowFrame( pFlow ); if ( !pTmp->IsFollow() ) pRet = const_cast<SwPageDesc*>(pFlow->GetAttrSet()->GetPageDesc().GetPageDesc()); } @@ -754,13 +754,13 @@ SwPageDesc *SwPageFrm::FindPageDesc() // FME 2008-03-03 #i81544# lijian/fme: an empty page should have // the same page description as its prev, just like after construction // of the empty page. - pRet = GetPrev() ? static_cast<SwPageFrm*>(GetPrev())->GetPageDesc() : - GetNext() ? static_cast<SwPageFrm*>(GetNext())->GetPageDesc() : nullptr; + pRet = GetPrev() ? static_cast<SwPageFrame*>(GetPrev())->GetPageDesc() : + GetNext() ? static_cast<SwPageFrame*>(GetNext())->GetPageDesc() : nullptr; //2. if ( !pRet ) pRet = GetPrev() ? - static_cast<SwPageFrm*>(GetPrev())->GetPageDesc()->GetFollow() : nullptr; + static_cast<SwPageFrame*>(GetPrev())->GetPageDesc()->GetFollow() : nullptr; //4. if ( !pRet ) @@ -770,8 +770,8 @@ SwPageDesc *SwPageFrm::FindPageDesc() return pRet; } -// Notify if the RootFrm changes its size -void AdjustSizeChgNotify( SwRootFrm *pRoot ) +// Notify if the RootFrame changes its size +void AdjustSizeChgNotify( SwRootFrame *pRoot ) { const bool bOld = pRoot->IsSuperfluous(); pRoot->mbCheckSuperfluous = false; @@ -783,21 +783,21 @@ void AdjustSizeChgNotify( SwRootFrm *pRoot ) { rSh.SizeChgNotify(); if ( rSh.Imp() ) - rSh.Imp()->NotifySizeChg( pRoot->Frm().SSize() ); + rSh.Imp()->NotifySizeChg( pRoot->Frame().SSize() ); } } } pRoot->mbCheckSuperfluous = bOld; } -inline void SetLastPage( SwPageFrm *pPage ) +inline void SetLastPage( SwPageFrame *pPage ) { - static_cast<SwRootFrm*>(pPage->GetUpper())->mpLastPage = pPage; + static_cast<SwRootFrame*>(pPage->GetUpper())->mpLastPage = pPage; } -void SwPageFrm::Cut() +void SwPageFrame::Cut() { - SwViewShell *pSh = getRootFrm()->GetCurrShell(); + SwViewShell *pSh = getRootFrame()->GetCurrShell(); if ( !IsEmptyPage() ) { if ( GetNext() ) @@ -812,11 +812,11 @@ void SwPageFrm::Cut() // #i28701# SwAnchoredObject* pAnchoredObj = (*GetSortedObjs())[i]; - if ( dynamic_cast< const SwFlyAtCntFrm *>( pAnchoredObj ) != nullptr ) + if ( dynamic_cast< const SwFlyAtContentFrame *>( pAnchoredObj ) != nullptr ) { - SwFlyFrm* pFly = static_cast<SwFlyAtCntFrm*>(pAnchoredObj); - SwPageFrm *pAnchPage = pFly->GetAnchorFrm() ? - pFly->AnchorFrm()->FindPageFrm() : nullptr; + SwFlyFrame* pFly = static_cast<SwFlyAtContentFrame*>(pAnchoredObj); + SwPageFrame *pAnchPage = pFly->GetAnchorFrame() ? + pFly->AnchorFrame()->FindPageFrame() : nullptr; if ( pAnchPage && (pAnchPage != this) ) { MoveFly( pFly, pAnchPage ); @@ -831,35 +831,35 @@ void SwPageFrm::Cut() } // cleanup Window if ( pSh && pSh->GetWin() ) - pSh->InvalidateWindows( Frm() ); + pSh->InvalidateWindows( Frame() ); } // decrease the root's page number - static_cast<SwRootFrm*>(GetUpper())->DecrPhyPageNums(); - SwPageFrm *pPg = static_cast<SwPageFrm*>(GetNext()); + static_cast<SwRootFrame*>(GetUpper())->DecrPhyPageNums(); + SwPageFrame *pPg = static_cast<SwPageFrame*>(GetNext()); if ( pPg ) { while ( pPg ) { pPg->DecrPhyPageNum(); //inline --nPhyPageNum - pPg = static_cast<SwPageFrm*>(pPg->GetNext()); + pPg = static_cast<SwPageFrame*>(pPg->GetNext()); } } else - ::SetLastPage( static_cast<SwPageFrm*>(GetPrev()) ); + ::SetLastPage( static_cast<SwPageFrame*>(GetPrev()) ); - SwFrm* pRootFrm = GetUpper(); + SwFrame* pRootFrame = GetUpper(); // cut all connections RemoveFromLayout(); - if ( pRootFrm ) - static_cast<SwRootFrm*>(pRootFrm)->CheckViewLayout( nullptr, nullptr ); + if ( pRootFrame ) + static_cast<SwRootFrame*>(pRootFrame)->CheckViewLayout( nullptr, nullptr ); } -void SwPageFrm::Paste( SwFrm* pParent, SwFrm* pSibling ) +void SwPageFrame::Paste( SwFrame* pParent, SwFrame* pSibling ) { - OSL_ENSURE( pParent->IsRootFrm(), "Parent is no Root." ); + OSL_ENSURE( pParent->IsRootFrame(), "Parent is no Root." ); OSL_ENSURE( pParent, "No parent for Paste()." ); OSL_ENSURE( pParent != this, "I'm my own parent." ); OSL_ENSURE( pSibling != this, "I'm my own neighbour." ); @@ -867,15 +867,15 @@ void SwPageFrm::Paste( SwFrm* pParent, SwFrm* pSibling ) "I am still registered somewhere." ); // insert into tree structure - InsertBefore( static_cast<SwLayoutFrm*>(pParent), pSibling ); + InsertBefore( static_cast<SwLayoutFrame*>(pParent), pSibling ); // increase the root's page number - static_cast<SwRootFrm*>(GetUpper())->IncrPhyPageNums(); + static_cast<SwRootFrame*>(GetUpper())->IncrPhyPageNums(); if( GetPrev() ) - SetPhyPageNum( static_cast<SwPageFrm*>(GetPrev())->GetPhyPageNum() + 1 ); + SetPhyPageNum( static_cast<SwPageFrame*>(GetPrev())->GetPhyPageNum() + 1 ); else SetPhyPageNum( 1 ); - SwPageFrm *pPg = static_cast<SwPageFrm*>(GetNext()); + SwPageFrame *pPg = static_cast<SwPageFrame*>(GetNext()); if ( pPg ) { while ( pPg ) @@ -883,55 +883,55 @@ void SwPageFrm::Paste( SwFrm* pParent, SwFrm* pSibling ) pPg->IncrPhyPageNum(); //inline ++nPhyPageNum pPg->_InvalidatePos(); pPg->InvalidateLayout(); - pPg = static_cast<SwPageFrm*>(pPg->GetNext()); + pPg = static_cast<SwPageFrame*>(pPg->GetNext()); } } else ::SetLastPage( this ); - if( Frm().Width() != pParent->Prt().Width() ) + if( Frame().Width() != pParent->Prt().Width() ) _InvalidateSize(); InvalidatePos(); - SwViewShell *pSh = getRootFrm()->GetCurrShell(); + SwViewShell *pSh = getRootFrame()->GetCurrShell(); if ( pSh ) pSh->SetFirstVisPageInvalid(); - getRootFrm()->CheckViewLayout( nullptr, nullptr ); + getRootFrame()->CheckViewLayout( nullptr, nullptr ); } -static void lcl_PrepFlyInCntRegister( SwContentFrm *pFrm ) +static void lcl_PrepFlyInCntRegister( SwContentFrame *pFrame ) { - pFrm->Prepare( PREP_REGISTER ); - if( pFrm->GetDrawObjs() ) + pFrame->Prepare( PREP_REGISTER ); + if( pFrame->GetDrawObjs() ) { - for( size_t i = 0; i < pFrm->GetDrawObjs()->size(); ++i ) + for( size_t i = 0; i < pFrame->GetDrawObjs()->size(); ++i ) { // #i28701# - SwAnchoredObject* pAnchoredObj = (*pFrm->GetDrawObjs())[i]; - if ( dynamic_cast< const SwFlyInCntFrm *>( pAnchoredObj ) != nullptr ) + SwAnchoredObject* pAnchoredObj = (*pFrame->GetDrawObjs())[i]; + if ( dynamic_cast< const SwFlyInContentFrame *>( pAnchoredObj ) != nullptr ) { - SwFlyFrm* pFly = static_cast<SwFlyInCntFrm*>(pAnchoredObj); - SwContentFrm *pCnt = pFly->ContainsContent(); + SwFlyFrame* pFly = static_cast<SwFlyInContentFrame*>(pAnchoredObj); + SwContentFrame *pCnt = pFly->ContainsContent(); while ( pCnt ) { lcl_PrepFlyInCntRegister( pCnt ); - pCnt = pCnt->GetNextContentFrm(); + pCnt = pCnt->GetNextContentFrame(); } } } } } -void SwPageFrm::PrepareRegisterChg() +void SwPageFrame::PrepareRegisterChg() { - SwContentFrm *pFrm = FindFirstBodyContent(); - while( pFrm ) + SwContentFrame *pFrame = FindFirstBodyContent(); + while( pFrame ) { - lcl_PrepFlyInCntRegister( pFrm ); - pFrm = pFrm->GetNextContentFrm(); - if( !IsAnLower( pFrm ) ) + lcl_PrepFlyInCntRegister( pFrame ); + pFrame = pFrame->GetNextContentFrame(); + if( !IsAnLower( pFrame ) ) break; } if( GetSortedObjs() ) @@ -940,14 +940,14 @@ void SwPageFrm::PrepareRegisterChg() { // #i28701# SwAnchoredObject* pAnchoredObj = (*GetSortedObjs())[i]; - if ( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) != nullptr ) + if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr ) { - SwFlyFrm *pFly = static_cast<SwFlyFrm*>(pAnchoredObj); - pFrm = pFly->ContainsContent(); - while ( pFrm ) + SwFlyFrame *pFly = static_cast<SwFlyFrame*>(pAnchoredObj); + pFrame = pFly->ContainsContent(); + while ( pFrame ) { - ::lcl_PrepFlyInCntRegister( pFrm ); - pFrm = pFrm->GetNextContentFrm(); + ::lcl_PrepFlyInCntRegister( pFrame ); + pFrame = pFrame->GetNextContentFrame(); } } } @@ -963,11 +963,11 @@ void SwPageFrm::PrepareRegisterChg() * @param bNotifyFields * @param ppPrev */ -void SwFrm::CheckPageDescs( SwPageFrm *pStart, bool bNotifyFields, SwPageFrm** ppPrev ) +void SwFrame::CheckPageDescs( SwPageFrame *pStart, bool bNotifyFields, SwPageFrame** ppPrev ) { assert(pStart && "no starting page."); - SwViewShell *pSh = pStart->getRootFrm()->GetCurrShell(); + SwViewShell *pSh = pStart->getRootFrame()->GetCurrShell(); SwViewShellImp *pImp = pSh ? pSh->Imp() : nullptr; if ( pImp && pImp->IsAction() && !pImp->GetLayAction().IsCheckPages() ) @@ -980,13 +980,13 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, bool bNotifyFields, SwPageFrm** p // the page position from where invalidation should start. SwTwips nDocPos = LONG_MAX; - SwRootFrm *pRoot = static_cast<SwRootFrm*>(pStart->GetUpper()); + SwRootFrame *pRoot = static_cast<SwRootFrame*>(pStart->GetUpper()); SwDoc* pDoc = pStart->GetFormat()->GetDoc(); const bool bFootnotes = !pDoc->GetFootnoteIdxs().empty(); - SwPageFrm *pPage = pStart; - if( pPage->GetPrev() && static_cast<SwPageFrm*>(pPage->GetPrev())->IsEmptyPage() ) - pPage = static_cast<SwPageFrm*>(pPage->GetPrev()); + SwPageFrame *pPage = pStart; + if( pPage->GetPrev() && static_cast<SwPageFrame*>(pPage->GetPrev())->IsEmptyPage() ) + pPage = static_cast<SwPageFrame*>(pPage->GetPrev()); while ( pPage ) { // obtain PageDesc and FrameFormat @@ -1005,14 +1005,14 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, bool bNotifyFields, SwPageFrm** p ) ) { - // Updating a page might take a while, so check the WaitCrsr + // Updating a page might take a while, so check the WaitCursor if( pImp ) - pImp->CheckWaitCrsr(); + pImp->CheckWaitCursor(); // invalidate the field, starting from here if ( nDocPos == LONG_MAX ) nDocPos = pPage->GetPrev() ? - pPage->GetPrev()->Frm().Top() : pPage->Frm().Top(); + pPage->GetPrev()->Frame().Top() : pPage->Frame().Top(); // Cases: // 1. Empty page should be "normal" page -> remove empty page and take next one @@ -1026,12 +1026,12 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, bool bNotifyFields, SwPageFrm** p if ( pPage->IsEmptyPage() && ( pFormatWish || //1. ( !bOdd && !pPage->GetPrev() ) ) ) { - SwPageFrm *pTmp = static_cast<SwPageFrm*>(pPage->GetNext()); + SwPageFrame *pTmp = static_cast<SwPageFrame*>(pPage->GetNext()); pPage->Cut(); bool bUpdatePrev = false; if (ppPrev && *ppPrev == pPage) bUpdatePrev = true; - SwFrm::DestroyFrm(pPage); + SwFrame::DestroyFrame(pPage); if ( pStart == pPage ) pStart = pTmp; pPage = pTmp; @@ -1048,13 +1048,13 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, bool bNotifyFields, SwPageFrm** p bActOdd != bOdd && ( ( !pPage->GetPrev() && !bOdd ) || ( pPage->GetPrev() && - !static_cast<SwPageFrm*>(pPage->GetPrev())->IsEmptyPage() ) + !static_cast<SwPageFrame*>(pPage->GetPrev())->IsEmptyPage() ) ) ) { if ( pPage->GetPrev() ) - pDesc = static_cast<SwPageFrm*>(pPage->GetPrev())->GetPageDesc(); - SwPageFrm *pTmp = new SwPageFrm( pDoc->GetEmptyPageFormat(),pRoot,pDesc); + pDesc = static_cast<SwPageFrame*>(pPage->GetPrev())->GetPageDesc(); + SwPageFrame *pTmp = new SwPageFrame( pDoc->GetEmptyPageFormat(),pRoot,pDesc); pTmp->Paste( pRoot, pPage ); pTmp->PreparePage( false ); pPage = pTmp; @@ -1069,7 +1069,7 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, bool bNotifyFields, SwPageFrm** p // We try to limit the damage... // If the page has no FootnoteCont it might be problematic. // Let's hope that invalidation is enough. - SwFootnoteContFrm *pCont = pPage->FindFootnoteCont(); + SwFootnoteContFrame *pCont = pPage->FindFootnoteCont(); if ( pCont && !(pOld->GetFootnoteInfo() == pDesc->GetFootnoteInfo()) ) pCont->_InvalidateAll(); } @@ -1098,16 +1098,16 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, bool bNotifyFields, SwPageFrm** p // It also might be that an empty page is not needed at all. // However, the algorithm above cannot determine that. It is not needed if the following // page can live without it. Do obtain that information, we need to dig deeper... - SwPageFrm *pPg = static_cast<SwPageFrm*>(pPage->GetNext()); + SwPageFrame *pPg = static_cast<SwPageFrame*>(pPage->GetNext()); if( !pPg || pPage->OnRightPage() == pPg->WannaRightPage() ) { // The following page can find a FrameFormat or has no successor -> empty page not needed - SwPageFrm *pTmp = static_cast<SwPageFrm*>(pPage->GetNext()); + SwPageFrame *pTmp = static_cast<SwPageFrame*>(pPage->GetNext()); pPage->Cut(); bool bUpdatePrev = false; if (ppPrev && *ppPrev == pPage) bUpdatePrev = true; - SwFrm::DestroyFrm(pPage); + SwFrame::DestroyFrame(pPage); if ( pStart == pPage ) pStart = pTmp; pPage = pTmp; @@ -1116,11 +1116,11 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, bool bNotifyFields, SwPageFrm** p continue; } } - pPage = static_cast<SwPageFrm*>(pPage->GetNext()); + pPage = static_cast<SwPageFrame*>(pPage->GetNext()); } pRoot->SetAssertFlyPages(); - SwRootFrm::AssertPageFlys( pStart ); + SwRootFrame::AssertPageFlys( pStart ); if ( bNotifyFields && (!pImp || !pImp->IsUpdateExpFields()) ) { @@ -1131,7 +1131,7 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, bool bNotifyFields, SwPageFrm** p #if OSL_DEBUG_LEVEL > 0 //1. check if two empty pages are behind one another bool bEmpty = false; - SwPageFrm *pPg = pStart; + SwPageFrame *pPg = pStart; while ( pPg ) { if ( pPg->IsEmptyPage() ) @@ -1146,25 +1146,25 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, bool bNotifyFields, SwPageFrm** p else bEmpty = false; - pPg = static_cast<SwPageFrm*>(pPg->GetNext()); + pPg = static_cast<SwPageFrame*>(pPg->GetNext()); } #endif } namespace { - bool isDeleteForbidden(const SwPageFrm *pDel) + bool isDeleteForbidden(const SwPageFrame *pDel) { - const SwLayoutFrm* pBody = pDel->FindBodyCont(); - const SwFrm* pBodyContent = pBody ? pBody->Lower() : nullptr; + const SwLayoutFrame* pBody = pDel->FindBodyCont(); + const SwFrame* pBodyContent = pBody ? pBody->Lower() : nullptr; return pBodyContent && pBodyContent->IsDeleteForbidden(); } } -SwPageFrm *SwFrm::InsertPage( SwPageFrm *pPrevPage, bool bFootnote ) +SwPageFrame *SwFrame::InsertPage( SwPageFrame *pPrevPage, bool bFootnote ) { - SwRootFrm *pRoot = static_cast<SwRootFrm*>(pPrevPage->GetUpper()); - SwPageFrm *pSibling = static_cast<SwPageFrm*>(pPrevPage->GetNext()); + SwRootFrame *pRoot = static_cast<SwRootFrame*>(pPrevPage->GetUpper()); + SwPageFrame *pSibling = static_cast<SwPageFrame*>(pPrevPage->GetNext()); SwPageDesc *pDesc = nullptr; // insert right (odd) or left (even) page? @@ -1172,9 +1172,9 @@ SwPageFrm *SwFrm::InsertPage( SwPageFrm *pPrevPage, bool bFootnote ) bool bWishedOdd = bNextOdd; // Which PageDesc is relevant? - // For ContentFrm take the one from format if provided, + // For ContentFrame take the one from format if provided, // otherwise from the Follow of the PrevPage - if ( IsFlowFrm() && !SwFlowFrm::CastFlowFrm( this )->IsFollow() ) + if ( IsFlowFrame() && !SwFlowFrame::CastFlowFrame( this )->IsFollow() ) { SwFormatPageDesc &rDesc = (SwFormatPageDesc&)GetAttrSet()->GetPageDesc(); pDesc = rDesc.GetPageDesc(); if ( rDesc.GetNumOffset() ) @@ -1200,19 +1200,19 @@ SwPageFrm *SwFrm::InsertPage( SwPageFrm *pPrevPage, bool bFootnote ) { SwFrameFormat *const pEmptyFormat = pDoc->GetEmptyPageFormat(); SwPageDesc *pTmpDesc = pPrevPage->GetPageDesc(); - SwPageFrm *pPage = new SwPageFrm(pEmptyFormat, pRoot, pTmpDesc); + SwPageFrame *pPage = new SwPageFrame(pEmptyFormat, pRoot, pTmpDesc); pPage->Paste( pRoot, pSibling ); pPage->PreparePage( bFootnote ); // If the sibling has no body text, destroy it as long as it is no footnote page. if ( pSibling && !pSibling->IsFootnotePage() && !pSibling->FindFirstBodyContent() ) { - SwPageFrm *pDel = pSibling; - pSibling = static_cast<SwPageFrm*>(pSibling->GetNext()); + SwPageFrame *pDel = pSibling; + pSibling = static_cast<SwPageFrame*>(pSibling->GetNext()); if ( !pDoc->GetFootnoteIdxs().empty() ) pRoot->RemoveFootnotes( pDel, true ); pDel->Cut(); - SwFrm::DestroyFrm(pDel); + SwFrame::DestroyFrame(pDel); } else bCheckPages = true; @@ -1221,19 +1221,19 @@ SwPageFrm *SwFrm::InsertPage( SwPageFrm *pPrevPage, bool bFootnote ) ? pDesc->GetRightFormat(bWishedFirst) : pDesc->GetLeftFormat(bWishedFirst) ); assert(pFormat); - SwPageFrm *pPage = new SwPageFrm( pFormat, pRoot, pDesc ); + SwPageFrame *pPage = new SwPageFrame( pFormat, pRoot, pDesc ); pPage->Paste( pRoot, pSibling ); pPage->PreparePage( bFootnote ); // If the sibling has no body text, destroy it as long as it is no footnote page. if ( pSibling && !pSibling->IsFootnotePage() && !pSibling->FindFirstBodyContent() && !isDeleteForbidden(pSibling) ) { - SwPageFrm *pDel = pSibling; - pSibling = static_cast<SwPageFrm*>(pSibling->GetNext()); + SwPageFrame *pDel = pSibling; + pSibling = static_cast<SwPageFrame*>(pSibling->GetNext()); if ( !pDoc->GetFootnoteIdxs().empty() ) pRoot->RemoveFootnotes( pDel, true ); pDel->Cut(); - SwFrm::DestroyFrm(pDel); + SwFrame::DestroyFrame(pDel); } else bCheckPages = true; @@ -1243,7 +1243,7 @@ SwPageFrm *SwFrm::InsertPage( SwPageFrm *pPrevPage, bool bFootnote ) if ( bCheckPages ) { CheckPageDescs( pSibling, false ); - SwViewShell *pSh = getRootFrm()->GetCurrShell(); + SwViewShell *pSh = getRootFrame()->GetCurrShell(); SwViewShellImp *pImp = pSh ? pSh->Imp() : nullptr; if ( pImp && pImp->IsAction() && !pImp->GetLayAction().IsCheckPages() ) { @@ -1255,30 +1255,30 @@ SwPageFrm *SwFrm::InsertPage( SwPageFrm *pPrevPage, bool bFootnote ) } } else - SwRootFrm::AssertPageFlys( pSibling ); + SwRootFrame::AssertPageFlys( pSibling ); } // For the update of page numbering fields, nDocPos provides // the page position from where invalidation should start. - SwViewShell *pSh = getRootFrm()->GetCurrShell(); + SwViewShell *pSh = getRootFrame()->GetCurrShell(); if ( !pSh || !pSh->Imp()->IsUpdateExpFields() ) { - SwDocPosUpdate aMsgHint( pPrevPage->Frm().Top() ); + SwDocPosUpdate aMsgHint( pPrevPage->Frame().Top() ); pDoc->getIDocumentFieldsAccess().UpdatePageFields( &aMsgHint ); } return pPage; } -sw::sidebarwindows::SidebarPosition SwPageFrm::SidebarPosition() const +sw::sidebarwindows::SidebarPosition SwPageFrame::SidebarPosition() const { - SwViewShell *pSh = getRootFrm()->GetCurrShell(); + SwViewShell *pSh = getRootFrame()->GetCurrShell(); if( !pSh || pSh->GetViewOptions()->getBrowseMode() ) { return sw::sidebarwindows::SidebarPosition::RIGHT; } else { - const bool bLTR = getRootFrm()->IsLeftToRightViewLayout(); + const bool bLTR = getRootFrame()->IsLeftToRightViewLayout(); const bool bBookMode = pSh->GetViewOptions()->IsViewLayoutBookMode(); const bool bRightSidebar = bLTR ? (!bBookMode || OnRightPage()) : (bBookMode && !OnRightPage()); @@ -1288,27 +1288,27 @@ sw::sidebarwindows::SidebarPosition SwPageFrm::SidebarPosition() const } } -SwTwips SwRootFrm::GrowFrm( SwTwips nDist, bool bTst, bool ) +SwTwips SwRootFrame::GrowFrame( SwTwips nDist, bool bTst, bool ) { if ( !bTst ) - Frm().SSize().Height() += nDist; + Frame().SSize().Height() += nDist; return nDist; } -SwTwips SwRootFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool ) +SwTwips SwRootFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool ) { OSL_ENSURE( nDist >= 0, "nDist < 0." ); - OSL_ENSURE( nDist <= Frm().Height(), "nDist > als aktuelle Groesse." ); + OSL_ENSURE( nDist <= Frame().Height(), "nDist > als aktuelle Groesse." ); if ( !bTst ) - Frm().SSize().Height() -= nDist; + Frame().SSize().Height() -= nDist; return nDist; } /// remove pages that are not needed at all -void SwRootFrm::RemoveSuperfluous() +void SwRootFrame::RemoveSuperfluous() { - // A page is empty if the body text area has no ContentFrm, but not if there + // A page is empty if the body text area has no ContentFrame, but not if there // is at least one Fly or one footnote attached to the page. Two runs are // needed: one for endnote pages and one for the pages of the body text. @@ -1316,7 +1316,7 @@ void SwRootFrm::RemoveSuperfluous() return; mbCheckSuperfluous = false; - SwPageFrm *pPage = GetLastPage(); + SwPageFrame *pPage = GetLastPage(); long nDocPos = LONG_MAX; // Check the corresponding last page if it is empty and stop loop at the last non-empty page. @@ -1338,7 +1338,7 @@ void SwRootFrm::RemoveSuperfluous() // OD 2004-01-19 #110582# - do not consider hidden objects if ( pPage->GetFormat()->GetDoc()->getIDocumentDrawModelAccess().IsVisibleLayerId( pAnchoredObj->GetDrawObj()->GetLayer() ) && - !pAnchoredObj->GetAnchorFrm()->FindFooterOrHeader() ) + !pAnchoredObj->GetAnchorFrame()->FindFooterOrHeader() ) { bOnlySuperfluosObjs = false; } @@ -1348,7 +1348,7 @@ void SwRootFrm::RemoveSuperfluous() // OD 19.06.2003 #108784# - optimization: check first, if essential objects // exists. - const SwLayoutFrm* pBody = nullptr; + const SwLayoutFrame* pBody = nullptr; if ( bExistEssentialObjs || pPage->FindFootnoteCont() || ( nullptr != ( pBody = pPage->FindBodyCont() ) && @@ -1359,13 +1359,13 @@ void SwRootFrm::RemoveSuperfluous() // instead of ContainsContent() to cover the empty-table-case, // but I'm not fully sure, since ContainsAny() also returns // SectionFrames. Therefore I prefer to do it the safe way: - ( pBody->Lower() && pBody->Lower()->IsTabFrm() ) ) ) ) + ( pBody->Lower() && pBody->Lower()->IsTabFrame() ) ) ) ) { if ( pPage->IsFootnotePage() ) { while ( pPage->IsFootnotePage() ) { - pPage = static_cast<SwPageFrm*>(pPage->GetPrev()); + pPage = static_cast<SwPageFrame*>(pPage->GetPrev()); OSL_ENSURE( pPage, "only endnote pages remain." ); } continue; @@ -1376,17 +1376,17 @@ void SwRootFrm::RemoveSuperfluous() if ( pPage ) { - SwPageFrm *pEmpty = pPage; - pPage = static_cast<SwPageFrm*>(pPage->GetPrev()); + SwPageFrame *pEmpty = pPage; + pPage = static_cast<SwPageFrame*>(pPage->GetPrev()); if ( !GetFormat()->GetDoc()->GetFootnoteIdxs().empty() ) RemoveFootnotes( pEmpty, true ); pEmpty->Cut(); - SwFrm::DestroyFrm(pEmpty); - nDocPos = pPage ? pPage->Frm().Top() : 0; + SwFrame::DestroyFrame(pEmpty); + nDocPos = pPage ? pPage->Frame().Top() : 0; } } while ( pPage ); - SwViewShell *pSh = getRootFrm()->GetCurrShell(); + SwViewShell *pSh = getRootFrame()->GetCurrShell(); if ( nDocPos != LONG_MAX && (!pSh || !pSh->Imp()->IsUpdateExpFields()) ) { @@ -1396,7 +1396,7 @@ void SwRootFrm::RemoveSuperfluous() } /// Ensures that enough pages exist, so that all page bound frames and draw objects can be placed -void SwRootFrm::AssertFlyPages() +void SwRootFrame::AssertFlyPages() { if ( !IsAssertFlyPages() ) return; @@ -1415,11 +1415,11 @@ void SwRootFrm::AssertFlyPages() nMaxPg = rAnch.GetPageNum(); } // How many pages exist at the moment? - SwPageFrm *pPage = static_cast<SwPageFrm*>(Lower()); + SwPageFrame *pPage = static_cast<SwPageFrame*>(Lower()); while ( pPage && pPage->GetNext() && - !static_cast<SwPageFrm*>(pPage->GetNext())->IsFootnotePage() ) + !static_cast<SwPageFrame*>(pPage->GetNext())->IsFootnotePage() ) { - pPage = static_cast<SwPageFrm*>(pPage->GetNext()); + pPage = static_cast<SwPageFrame*>(pPage->GetNext()); } if ( nMaxPg > pPage->GetPhyPageNum() ) @@ -1427,20 +1427,20 @@ void SwRootFrm::AssertFlyPages() // Continue pages based on the rules of the PageDesc after the last page. bool bOdd = (pPage->GetPhyPageNum() % 2) != 0; SwPageDesc *pDesc = pPage->GetPageDesc(); - SwFrm *pSibling = pPage->GetNext(); + SwFrame *pSibling = pPage->GetNext(); for ( sal_uInt16 i = pPage->GetPhyPageNum(); i < nMaxPg; ++i ) { if ( !(bOdd ? pDesc->GetRightFormat() : pDesc->GetLeftFormat()) ) { // Insert empty page (but Flys will be stored in the next page) - pPage = new SwPageFrm( pDoc->GetEmptyPageFormat(), this, pDesc ); + pPage = new SwPageFrame( pDoc->GetEmptyPageFormat(), this, pDesc ); pPage->Paste( this, pSibling ); pPage->PreparePage( false ); bOdd = !bOdd; ++i; } pPage = new - SwPageFrm( (bOdd ? pDesc->GetRightFormat() : + SwPageFrame( (bOdd ? pDesc->GetRightFormat() : pDesc->GetLeftFormat()), this, pDesc ); pPage->Paste( this, pSibling ); pPage->PreparePage( false ); @@ -1450,9 +1450,9 @@ void SwRootFrm::AssertFlyPages() // If the endnote pages are now corrupt, destroy them. if ( !pDoc->GetFootnoteIdxs().empty() ) { - pPage = static_cast<SwPageFrm*>(Lower()); + pPage = static_cast<SwPageFrame*>(Lower()); while ( pPage && !pPage->IsFootnotePage() ) - pPage = static_cast<SwPageFrm*>(pPage->GetNext()); + pPage = static_cast<SwPageFrame*>(pPage->GetNext()); if ( pPage ) { @@ -1467,7 +1467,7 @@ void SwRootFrm::AssertFlyPages() } /// Ensure that after the given page all page-bound objects are located on the correct page -void SwRootFrm::AssertPageFlys( SwPageFrm *pPage ) +void SwRootFrame::AssertPageFlys( SwPageFrame *pPage ) { while ( pPage ) { @@ -1485,7 +1485,7 @@ void SwRootFrm::AssertPageFlys( SwPageFrm *pPage ) { // If on the wrong page, check if previous page is empty if( nPg && !(pPage->GetPhyPageNum()-1 == nPg && - static_cast<SwPageFrm*>(pPage->GetPrev())->IsEmptyPage()) ) + static_cast<SwPageFrame*>(pPage->GetPrev())->IsEmptyPage()) ) { // It can move by itself. Just send a modify to its anchor attribute. #if OSL_DEBUG_LEVEL > 1 @@ -1504,40 +1504,40 @@ void SwRootFrm::AssertPageFlys( SwPageFrm *pPage ) ++i; } } - pPage = static_cast<SwPageFrm*>(pPage->GetNext()); + pPage = static_cast<SwPageFrame*>(pPage->GetNext()); } } -Size SwRootFrm::ChgSize( const Size& aNewSize ) +Size SwRootFrame::ChgSize( const Size& aNewSize ) { - Frm().SSize() = aNewSize; + Frame().SSize() = aNewSize; _InvalidatePrt(); mbFixSize = false; - return Frm().SSize(); + return Frame().SSize(); } -void SwRootFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) +void SwRootFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/) { if ( !mbValidPos ) { mbValidPos = true; - maFrm.Pos().setX(DOCUMENTBORDER); - maFrm.Pos().setY(DOCUMENTBORDER); + maFrame.Pos().setX(DOCUMENTBORDER); + maFrame.Pos().setY(DOCUMENTBORDER); } if ( !mbValidPrtArea ) { mbValidPrtArea = true; maPrt.Pos().setX(0); maPrt.Pos().setY(0); - maPrt.SSize( maFrm.SSize() ); + maPrt.SSize( maFrame.SSize() ); } if ( !mbValidSize ) // SSize is set by the pages (Cut/Paste). mbValidSize = true; } -void SwRootFrm::ImplInvalidateBrowseWidth() +void SwRootFrame::ImplInvalidateBrowseWidth() { mbBrowseWidthValid = false; - SwFrm *pPg = Lower(); + SwFrame *pPg = Lower(); while ( pPg ) { pPg->InvalidateSize(); @@ -1545,7 +1545,7 @@ void SwRootFrm::ImplInvalidateBrowseWidth() } } -void SwRootFrm::ImplCalcBrowseWidth() +void SwRootFrame::ImplCalcBrowseWidth() { OSL_ENSURE( GetCurrShell() && GetCurrShell()->GetViewOptions()->getBrowseMode(), "CalcBrowseWidth and not in BrowseView" ); @@ -1556,27 +1556,27 @@ void SwRootFrm::ImplCalcBrowseWidth() // Frames and paint objects inside other objects (frames, tables) do not count. // Borders and columns are not taken into account. - SwFrm *pFrm = ContainsContent(); - while ( pFrm && !pFrm->IsInDocBody() ) - pFrm = static_cast<SwContentFrm*>(pFrm)->GetNextContentFrm(); - if ( !pFrm ) + SwFrame *pFrame = ContainsContent(); + while ( pFrame && !pFrame->IsInDocBody() ) + pFrame = static_cast<SwContentFrame*>(pFrame)->GetNextContentFrame(); + if ( !pFrame ) return; mbBrowseWidthValid = true; - SwViewShell *pSh = getRootFrm()->GetCurrShell(); + SwViewShell *pSh = getRootFrame()->GetCurrShell(); mnBrowseWidth = pSh ? MINLAY + 2 * pSh->GetOut()-> PixelToLogic( pSh->GetBrowseBorder() ).Width() : 5000; do { - if ( pFrm->IsInTab() ) - pFrm = pFrm->FindTabFrm(); + if ( pFrame->IsInTab() ) + pFrame = pFrame->FindTabFrame(); - if ( pFrm->IsTabFrm() && - !static_cast<SwLayoutFrm*>(pFrm)->GetFormat()->GetFrmSize().GetWidthPercent() ) + if ( pFrame->IsTabFrame() && + !static_cast<SwLayoutFrame*>(pFrame)->GetFormat()->GetFrameSize().GetWidthPercent() ) { - SwBorderAttrAccess aAccess( SwFrm::GetCache(), pFrm ); + SwBorderAttrAccess aAccess( SwFrame::GetCache(), pFrame ); const SwBorderAttrs &rAttrs = *aAccess.Get(); const SwFormatHoriOrient &rHori = rAttrs.GetAttrSet().GetHoriOrient(); long nWidth = rAttrs.GetSize().Width(); @@ -1584,7 +1584,7 @@ void SwRootFrm::ImplCalcBrowseWidth() text::HoriOrientation::FULL != rHori.GetHoriOrient() ) { const SwHTMLTableLayout *pLayoutInfo = - static_cast<const SwTabFrm *>(pFrm)->GetTable() + static_cast<const SwTabFrame *>(pFrame)->GetTable() ->GetHTMLTableLayout(); if ( pLayoutInfo ) nWidth = std::min( nWidth, pLayoutInfo->GetBrowseWidthMin() ); @@ -1593,10 +1593,10 @@ void SwRootFrm::ImplCalcBrowseWidth() { case text::HoriOrientation::NONE: // OD 23.01.2003 #106895# - add 1st param to <SwBorderAttrs::CalcRight(..)> - nWidth += rAttrs.CalcLeft( pFrm ) + rAttrs.CalcRight( pFrm ); + nWidth += rAttrs.CalcLeft( pFrame ) + rAttrs.CalcRight( pFrame ); break; case text::HoriOrientation::LEFT_AND_WIDTH: - nWidth += rAttrs.CalcLeft( pFrm ); + nWidth += rAttrs.CalcLeft( pFrame ); break; default: break; @@ -1604,16 +1604,16 @@ void SwRootFrm::ImplCalcBrowseWidth() mnBrowseWidth = std::max( mnBrowseWidth, nWidth ); } } - else if ( pFrm->GetDrawObjs() ) + else if ( pFrame->GetDrawObjs() ) { - for ( size_t i = 0; i < pFrm->GetDrawObjs()->size(); ++i ) + for ( size_t i = 0; i < pFrame->GetDrawObjs()->size(); ++i ) { // #i28701# - SwAnchoredObject* pAnchoredObj = (*pFrm->GetDrawObjs())[i]; + SwAnchoredObject* pAnchoredObj = (*pFrame->GetDrawObjs())[i]; const SwFrameFormat& rFormat = pAnchoredObj->GetFrameFormat(); - const bool bFly = dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) != nullptr; + const bool bFly = dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr; if ((bFly && (FAR_AWAY == pAnchoredObj->GetObjRect().Width())) - || rFormat.GetFrmSize().GetWidthPercent()) + || rFormat.GetFrameSize().GetWidthPercent()) { continue; } @@ -1622,7 +1622,7 @@ void SwRootFrm::ImplCalcBrowseWidth() switch ( rFormat.GetAnchor().GetAnchorId() ) { case FLY_AS_CHAR: - nWidth = bFly ? rFormat.GetFrmSize().GetWidth() : + nWidth = bFly ? rFormat.GetFrameSize().GetWidth() : pAnchoredObj->GetObjRect().Width(); break; case FLY_AT_PARA: @@ -1634,7 +1634,7 @@ void SwRootFrm::ImplCalcBrowseWidth() // at position FAR_AWAY. if ( bFly ) { - nWidth = rFormat.GetFrmSize().GetWidth(); + nWidth = rFormat.GetFrameSize().GetWidth(); const SwFormatHoriOrient &rHori = rFormat.GetHoriOrient(); switch ( rHori.GetHoriOrient() ) { @@ -1644,7 +1644,7 @@ void SwRootFrm::ImplCalcBrowseWidth() case text::HoriOrientation::INSIDE: case text::HoriOrientation::LEFT: if ( text::RelOrientation::PRINT_AREA == rHori.GetRelationOrient() ) - nWidth += pFrm->Prt().Left(); + nWidth += pFrame->Prt().Left(); break; default: break; @@ -1662,33 +1662,33 @@ void SwRootFrm::ImplCalcBrowseWidth() mnBrowseWidth = std::max( mnBrowseWidth, nWidth ); } } - pFrm = pFrm->FindNextCnt(); - } while ( pFrm ); + pFrame = pFrame->FindNextCnt(); + } while ( pFrame ); } -void SwRootFrm::StartAllAction() +void SwRootFrame::StartAllAction() { if ( GetCurrShell() ) for(SwViewShell& rSh : GetCurrShell()->GetRingContainer()) { - if ( dynamic_cast<const SwCrsrShell*>( &rSh) != nullptr ) - static_cast<SwCrsrShell*>(&rSh)->StartAction(); + if ( dynamic_cast<const SwCursorShell*>( &rSh) != nullptr ) + static_cast<SwCursorShell*>(&rSh)->StartAction(); else rSh.StartAction(); } } -void SwRootFrm::EndAllAction( bool bVirDev ) +void SwRootFrame::EndAllAction( bool bVirDev ) { if ( GetCurrShell() ) for(SwViewShell& rSh : GetCurrShell()->GetRingContainer()) { const bool bOldEndActionByVirDev = rSh.IsEndActionByVirDev(); rSh.SetEndActionByVirDev( bVirDev ); - if ( dynamic_cast<const SwCrsrShell*>( &rSh) != nullptr ) + if ( dynamic_cast<const SwCursorShell*>( &rSh) != nullptr ) { - static_cast<SwCrsrShell*>(&rSh)->EndAction(); - static_cast<SwCrsrShell*>(&rSh)->CallChgLnk(); + static_cast<SwCursorShell*>(&rSh)->EndAction(); + static_cast<SwCursorShell*>(&rSh)->CallChgLnk(); if ( dynamic_cast<const SwFEShell*>( &rSh) != nullptr ) static_cast<SwFEShell*>(&rSh)->SetChainMarker(); } @@ -1698,7 +1698,7 @@ void SwRootFrm::EndAllAction( bool bVirDev ) } } -void SwRootFrm::UnoRemoveAllActions() +void SwRootFrame::UnoRemoveAllActions() { if ( GetCurrShell() ) for(SwViewShell& rSh : GetCurrShell()->GetRingContainer()) @@ -1709,15 +1709,15 @@ void SwRootFrm::UnoRemoveAllActions() if ( !rSh.IsInEndAction() ) { OSL_ENSURE(!rSh.GetRestoreActions(), "Restore action count is already set!"); - bool bCrsr = dynamic_cast<const SwCrsrShell*>( &rSh) != nullptr; + bool bCursor = dynamic_cast<const SwCursorShell*>( &rSh) != nullptr; bool bFE = dynamic_cast<const SwFEShell*>( &rSh) != nullptr; sal_uInt16 nRestore = 0; while( rSh.ActionCount() ) { - if( bCrsr ) + if( bCursor ) { - static_cast<SwCrsrShell*>(&rSh)->EndAction(); - static_cast<SwCrsrShell*>(&rSh)->CallChgLnk(); + static_cast<SwCursorShell*>(&rSh)->EndAction(); + static_cast<SwCursorShell*>(&rSh)->CallChgLnk(); if ( bFE ) static_cast<SwFEShell*>(&rSh)->SetChainMarker(); } @@ -1731,7 +1731,7 @@ void SwRootFrm::UnoRemoveAllActions() } } -void SwRootFrm::UnoRestoreAllActions() +void SwRootFrame::UnoRestoreAllActions() { if ( GetCurrShell() ) for(SwViewShell& rSh : GetCurrShell()->GetRingContainer()) @@ -1739,8 +1739,8 @@ void SwRootFrm::UnoRestoreAllActions() sal_uInt16 nActions = rSh.GetRestoreActions(); while( nActions-- ) { - if ( dynamic_cast<const SwCrsrShell*>( &rSh) != nullptr ) - static_cast<SwCrsrShell*>(&rSh)->StartAction(); + if ( dynamic_cast<const SwCursorShell*>( &rSh) != nullptr ) + static_cast<SwCursorShell*>(&rSh)->StartAction(); else rSh.StartAction(); } @@ -1749,15 +1749,15 @@ void SwRootFrm::UnoRestoreAllActions() } } -// Helper functions for SwRootFrm::CheckViewLayout -static void lcl_MoveAllLowers( SwFrm* pFrm, const Point& rOffset ); +// Helper functions for SwRootFrame::CheckViewLayout +static void lcl_MoveAllLowers( SwFrame* pFrame, const Point& rOffset ); -static void lcl_MoveAllLowerObjs( SwFrm* pFrm, const Point& rOffset ) +static void lcl_MoveAllLowerObjs( SwFrame* pFrame, const Point& rOffset ) { - const bool bPage = pFrm->IsPageFrm(); + const bool bPage = pFrame->IsPageFrame(); const SwSortedObjs* pSortedObj = bPage - ? static_cast<SwPageFrm*>(pFrm)->GetSortedObjs() - : pFrm->GetDrawObjs(); + ? static_cast<SwPageFrame*>(pFrame)->GetSortedObjs() + : pFrame->GetDrawObjs(); if (pSortedObj == nullptr) return; @@ -1773,23 +1773,23 @@ static void lcl_MoveAllLowerObjs( SwFrm* pFrm, const Point& rOffset ) SwObjPositioningInProgress aPosInProgress( *pAnchoredObj ); - if ( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) != nullptr ) + if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr ) { - SwFlyFrm* pFlyFrm( static_cast<SwFlyFrm*>(pAnchoredObj) ); - lcl_MoveAllLowers( pFlyFrm, rOffset ); - pFlyFrm->NotifyDrawObj(); + SwFlyFrame* pFlyFrame( static_cast<SwFlyFrame*>(pAnchoredObj) ); + lcl_MoveAllLowers( pFlyFrame, rOffset ); + pFlyFrame->NotifyDrawObj(); // --> let the active embedded object be moved - SwFrm* pLower = pFlyFrm->Lower(); + SwFrame* pLower = pFlyFrame->Lower(); if ( pLower ) { - if ( pLower->IsNoTextFrm() ) + if ( pLower->IsNoTextFrame() ) { - SwRootFrm* pRoot = pLower->getRootFrm(); + SwRootFrame* pRoot = pLower->getRootFrame(); SwViewShell *pSh = pRoot ? pRoot->GetCurrShell() : nullptr; if ( pSh ) { - SwContentFrm* pContentFrm = static_cast<SwContentFrm*>(pLower); - SwOLENode* pNode = pContentFrm->GetNode()->GetOLENode(); + SwContentFrame* pContentFrame = static_cast<SwContentFrame*>(pLower); + SwOLENode* pNode = pContentFrame->GetNode()->GetOLENode(); if ( pNode ) { svt::EmbeddedObjectRef& xObj = pNode->GetOLEObj().GetObject(); @@ -1830,54 +1830,54 @@ static void lcl_MoveAllLowerObjs( SwFrm* pFrm, const Point& rOffset ) } } -static void lcl_MoveAllLowers( SwFrm* pFrm, const Point& rOffset ) +static void lcl_MoveAllLowers( SwFrame* pFrame, const Point& rOffset ) { - const SwRect aFrm( pFrm->Frm() ); + const SwRect aFrame( pFrame->Frame() ); // first move the current frame - Point &rPoint = pFrm->Frm().Pos(); + Point &rPoint = pFrame->Frame().Pos(); if (rPoint.X() != FAR_AWAY) rPoint.X() += rOffset.X(); if (rPoint.Y() != FAR_AWAY) rPoint.Y() += rOffset.Y(); // Don't forget accessibility: - if( pFrm->IsAccessibleFrm() ) + if( pFrame->IsAccessibleFrame() ) { - SwRootFrm *pRootFrm = pFrm->getRootFrm(); - if( pRootFrm && pRootFrm->IsAnyShellAccessible() && - pRootFrm->GetCurrShell() ) + SwRootFrame *pRootFrame = pFrame->getRootFrame(); + if( pRootFrame && pRootFrame->IsAnyShellAccessible() && + pRootFrame->GetCurrShell() ) { - pRootFrm->GetCurrShell()->Imp()->MoveAccessibleFrm( pFrm, aFrm ); + pRootFrame->GetCurrShell()->Imp()->MoveAccessibleFrame( pFrame, aFrame ); } } // the move any objects - lcl_MoveAllLowerObjs( pFrm, rOffset ); + lcl_MoveAllLowerObjs( pFrame, rOffset ); // finally, for layout frames we have to call this function recursively: - if ( dynamic_cast< const SwLayoutFrm *>( pFrm ) != nullptr ) + if ( dynamic_cast< const SwLayoutFrame *>( pFrame ) != nullptr ) { - SwFrm* pLowerFrm = pFrm->GetLower(); - while ( pLowerFrm ) + SwFrame* pLowerFrame = pFrame->GetLower(); + while ( pLowerFrame ) { - lcl_MoveAllLowers( pLowerFrm, rOffset ); - pLowerFrm = pLowerFrm->GetNext(); + lcl_MoveAllLowers( pLowerFrame, rOffset ); + pLowerFrame = pLowerFrame->GetNext(); } } } // Calculate how the pages have to be positioned -void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVisArea ) +void SwRootFrame::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVisArea ) { SwViewShell* pSh = GetCurrShell(); vcl::RenderContext* pRenderContext = pSh ? pSh->GetOut() : nullptr; // #i91432# // No calculation of page positions, if only an empty page is present. - // This situation occurs when <SwRootFrm> instance is in construction + // This situation occurs when <SwRootFrame> instance is in construction // and the document contains only left pages. if ( Lower()->GetNext() == nullptr && - static_cast<SwPageFrm*>(Lower())->IsEmptyPage() ) + static_cast<SwPageFrame*>(Lower())->IsEmptyPage() ) { return; } @@ -1917,14 +1917,14 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi maPageRects.clear(); - const long nBorder = Frm().Pos().getX(); + const long nBorder = Frame().Pos().getX(); const long nVisWidth = mnViewWidth - 2 * nBorder; const long nGapBetweenPages = pViewOpt ? pViewOpt->GetGapBetweenPages() : (pSh ? pSh->GetViewOptions()->GetGapBetweenPages() : SwViewOption::GetDefGapBetweenPages()); // check how many pages fit into the first page layout row: - SwPageFrm* pPageFrm = static_cast<SwPageFrm*>(Lower()); + SwPageFrame* pPageFrame = static_cast<SwPageFrame*>(Lower()); // will contain the number of pages per row. 0 means that // the page does not fit. @@ -1940,23 +1940,23 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi long nSumRowHeight = 0; SwTwips nMinPageLeft = TWIPS_MAX; SwTwips nMaxPageRight = 0; - SwPageFrm* pStartOfRow = pPageFrm; + SwPageFrame* pStartOfRow = pPageFrame; sal_uInt16 nNumberOfPagesInRow = mbBookMode ? 1 : 0; // in book view, start with right page bool bFirstRow = true; bool bPageChanged = false; const bool bRTL = !IsLeftToRightViewLayout(); - const SwTwips nSidebarWidth = SwPageFrm::GetSidebarBorderWidth( pSh ); + const SwTwips nSidebarWidth = SwPageFrame::GetSidebarBorderWidth( pSh ); - while ( pPageFrm ) + while ( pPageFrame ) { // we consider the current page to be "start of row" if // 1. it is the first page in the current row or // 2. it is the second page in the row and the first page is an empty page in non-book view: - const bool bStartOfRow = pPageFrm == pStartOfRow || - ( pStartOfRow->IsEmptyPage() && pPageFrm == pStartOfRow->GetNext() && !mbBookMode ); + const bool bStartOfRow = pPageFrame == pStartOfRow || + ( pStartOfRow->IsEmptyPage() && pPageFrame == pStartOfRow->GetNext() && !mbBookMode ); - const bool bEmptyPage = pPageFrm->IsEmptyPage() && !mbBookMode; + const bool bEmptyPage = pPageFrame->IsEmptyPage() && !mbBookMode; // no half doc border space for first page in each row and long nPageWidth = 0; @@ -1964,17 +1964,17 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi if ( mbBookMode ) { - const SwFrm& rFormatPage = pPageFrm->GetFormatPage(); + const SwFrame& rFormatPage = pPageFrame->GetFormatPage(); - nPageWidth = rFormatPage.Frm().Width() + nSidebarWidth + ((bStartOfRow || 1 == (pPageFrm->GetPhyPageNum()%2)) ? 0 : nGapBetweenPages); - nPageHeight = rFormatPage.Frm().Height() + nGapBetweenPages; + nPageWidth = rFormatPage.Frame().Width() + nSidebarWidth + ((bStartOfRow || 1 == (pPageFrame->GetPhyPageNum()%2)) ? 0 : nGapBetweenPages); + nPageHeight = rFormatPage.Frame().Height() + nGapBetweenPages; } else { - if ( !pPageFrm->IsEmptyPage() ) + if ( !pPageFrame->IsEmptyPage() ) { - nPageWidth = pPageFrm->Frm().Width() + nSidebarWidth + (bStartOfRow ? 0 : nGapBetweenPages); - nPageHeight = pPageFrm->Frm().Height() + nGapBetweenPages; + nPageWidth = pPageFrame->Frame().Width() + nSidebarWidth + (bStartOfRow ? 0 : nGapBetweenPages); + nPageHeight = pPageFrame->Frame().Height() + nGapBetweenPages; } } @@ -1996,34 +1996,34 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi nCurrentRowWidth = nCurrentRowWidth + nPageWidth; nCurrentRowHeight = std::max( nCurrentRowHeight, nPageHeight ); - pPageFrm = static_cast<SwPageFrm*>(pPageFrm->GetNext()); + pPageFrame = static_cast<SwPageFrame*>(pPageFrame->GetNext()); - if ( !pPageFrm ) + if ( !pPageFrame ) bRowFinished = true; } if ( bRowFinished ) { - // pPageFrm now points to the first page in the new row or null + // pPageFrame now points to the first page in the new row or null // pStartOfRow points to the first page in the current row // special centering for last row. pretend to fill the last row with virtual copies of the last page before centering: - if ( !pPageFrm && nWidthRemain > 0 ) + if ( !pPageFrame && nWidthRemain > 0 ) { // find last page in current row: - const SwPageFrm* pLastPageInCurrentRow = pStartOfRow; + const SwPageFrame* pLastPageInCurrentRow = pStartOfRow; while( pLastPageInCurrentRow->GetNext() ) - pLastPageInCurrentRow = static_cast<const SwPageFrm*>(pLastPageInCurrentRow->GetNext()); + pLastPageInCurrentRow = static_cast<const SwPageFrame*>(pLastPageInCurrentRow->GetNext()); if ( pLastPageInCurrentRow->IsEmptyPage() ) - pLastPageInCurrentRow = static_cast<const SwPageFrm*>(pLastPageInCurrentRow->GetPrev()); + pLastPageInCurrentRow = static_cast<const SwPageFrame*>(pLastPageInCurrentRow->GetPrev()); // check how many times the last page would still fit into the remaining space: sal_uInt16 nNumberOfVirtualPages = 0; const sal_uInt16 nMaxNumberOfVirtualPages = mnColumns > 0 ? mnColumns - nNumberOfPagesInRow : USHRT_MAX; SwTwips nRemain = nWidthRemain; SwTwips nVirtualPagesWidth = 0; - SwTwips nLastPageWidth = pLastPageInCurrentRow->Frm().Width() + nSidebarWidth; + SwTwips nLastPageWidth = pLastPageInCurrentRow->Frame().Width() + nSidebarWidth; while ( ( mnColumns > 0 || nRemain > 0 ) && nNumberOfVirtualPages < nMaxNumberOfVirtualPages ) { @@ -2047,7 +2047,7 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi { // #i88036# nCurrentRowWidth += - pStartOfRow->GetFormatPage().Frm().Width() + nSidebarWidth; + pStartOfRow->GetFormatPage().Frame().Width() + nSidebarWidth; } // center page if possible @@ -2064,20 +2064,20 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi if ( bFirstRow && mbBookMode ) { // #i88036# - nX += pStartOfRow->GetFormatPage().Frm().Width() + nSidebarWidth; + nX += pStartOfRow->GetFormatPage().Frame().Width() + nSidebarWidth; } - SwPageFrm* pEndOfRow = pPageFrm; - SwPageFrm* pPageToAdjust = pStartOfRow; + SwPageFrame* pEndOfRow = pPageFrame; + SwPageFrame* pPageToAdjust = pStartOfRow; do { - const SwPageFrm* pFormatPage = pPageToAdjust; + const SwPageFrame* pFormatPage = pPageToAdjust; if ( mbBookMode ) pFormatPage = &pPageToAdjust->GetFormatPage(); - const SwTwips nCurrentPageWidth = pFormatPage->Frm().Width() + (pFormatPage->IsEmptyPage() ? 0 : nSidebarWidth); - const Point aOldPagePos = pPageToAdjust->Frm().Pos(); + const SwTwips nCurrentPageWidth = pFormatPage->Frame().Width() + (pFormatPage->IsEmptyPage() ? 0 : nSidebarWidth); + const Point aOldPagePos = pPageToAdjust->Frame().Pos(); const bool bLeftSidebar = pPageToAdjust->SidebarPosition() == sw::sidebarwindows::SidebarPosition::LEFT; const SwTwips nLeftPageAddOffset = bLeftSidebar ? nSidebarWidth : @@ -2114,7 +2114,7 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi // border of nGapBetweenPages around the current page: SwRect aPageRectWithBorders( aNewPagePos.getX() - nGapBetweenPages, aNewPagePos.getY(), - pPageToAdjust->Frm().SSize().Width() + nGapBetweenPages + nSidebarWidth, + pPageToAdjust->Frame().SSize().Width() + nGapBetweenPages + nSidebarWidth, nCurrentRowHeight ); static const long nOuterClickDiff = 1000000; @@ -2132,7 +2132,7 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi maPageRects.push_back( aPageRectWithBorders ); nX = nX + nCurrentPageWidth; - pPageToAdjust = static_cast<SwPageFrm*>(pPageToAdjust->GetNext()); + pPageToAdjust = static_cast<SwPageFrame*>(pPageToAdjust->GetNext()); // distance to next page if ( pPageToAdjust && pPageToAdjust != pEndOfRow ) @@ -2149,7 +2149,7 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi // 1. the last empty page in a row // 2. after an empty page const bool bDontAddGap = ( pPageToAdjust->IsEmptyPage() && pPageToAdjust->GetNext() == pEndOfRow ) || - ( static_cast<SwPageFrm*>(pPageToAdjust->GetPrev())->IsEmptyPage() ); + ( static_cast<SwPageFrame*>(pPageToAdjust->GetPrev())->IsEmptyPage() ); if ( !bDontAddGap ) nX = nX + nGapBetweenPages; @@ -2172,7 +2172,7 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi } // end while // set size of root frame: - const Size aOldSize( Frm().SSize() ); + const Size aOldSize( Frame().SSize() ); const Size aNewSize( nMaxPageRight - nBorder, nSumRowHeight - nGapBetweenPages ); if ( bPageChanged || aNewSize != aOldSize ) @@ -2192,7 +2192,7 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi } } - maPagesArea.Pos( Frm().Pos() ); + maPagesArea.Pos( Frame().Pos() ); maPagesArea.SSize( aNewSize ); if ( TWIPS_MAX != nMinPageLeft ) maPagesArea._Left( nMinPageLeft ); @@ -2200,22 +2200,22 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi SetCallbackActionEnabled( bOldCallbackActionEnabled ); } -bool SwRootFrm::IsLeftToRightViewLayout() const +bool SwRootFrame::IsLeftToRightViewLayout() const { // Layout direction determined by layout direction of the first page. // #i88036# // Only ask a non-empty page frame for its layout direction - const SwPageFrm& rPage = - dynamic_cast<const SwPageFrm&>(*Lower()).GetFormatPage(); + const SwPageFrame& rPage = + dynamic_cast<const SwPageFrame&>(*Lower()).GetFormatPage(); return !rPage.IsRightToLeft() && !rPage.IsVertical(); } -const SwPageFrm& SwPageFrm::GetFormatPage() const +const SwPageFrame& SwPageFrame::GetFormatPage() const { - const SwPageFrm* pRet = this; + const SwPageFrame* pRet = this; if ( IsEmptyPage() ) { - pRet = static_cast<const SwPageFrm*>( OnRightPage() ? GetNext() : GetPrev() ); + pRet = static_cast<const SwPageFrame*>( OnRightPage() ? GetNext() : GetPrev() ); // #i88035# // Typically a right empty page frame has a next non-empty page frame and // a left empty page frame has a previous non-empty page frame. @@ -2227,41 +2227,41 @@ const SwPageFrm& SwPageFrm::GetFormatPage() const { if ( OnRightPage() ) { - pRet = static_cast<const SwPageFrm*>( GetPrev() ); + pRet = static_cast<const SwPageFrame*>( GetPrev() ); } else { - pRet = static_cast<const SwPageFrm*>( GetNext() ); + pRet = static_cast<const SwPageFrame*>( GetNext() ); } } assert(pRet && - "<SwPageFrm::GetFormatPage()> - inconsistent layout: empty page without previous and next page frame --> crash."); + "<SwPageFrame::GetFormatPage()> - inconsistent layout: empty page without previous and next page frame --> crash."); } return *pRet; } -bool SwPageFrm::IsOverHeaderFooterArea( const Point& rPt, FrameControlType &rControl ) const +bool SwPageFrame::IsOverHeaderFooterArea( const Point& rPt, FrameControlType &rControl ) const { long nUpperLimit = 0; long nLowerLimit = 0; - const SwFrm* pFrm = Lower(); - while ( pFrm ) + const SwFrame* pFrame = Lower(); + while ( pFrame ) { - if ( pFrm->IsBodyFrm() ) + if ( pFrame->IsBodyFrame() ) { - nUpperLimit = pFrm->Frm().Top(); - nLowerLimit = pFrm->Frm().Bottom(); + nUpperLimit = pFrame->Frame().Top(); + nLowerLimit = pFrame->Frame().Bottom(); } - else if ( pFrm->IsFootnoteContFrm() ) - nLowerLimit = pFrm->Frm().Bottom(); + else if ( pFrame->IsFootnoteContFrame() ) + nLowerLimit = pFrame->Frame().Bottom(); - pFrm = pFrm->GetNext(); + pFrame = pFrame->GetNext(); } - SwRect aHeaderArea( Frm().TopLeft(), - Size( Frm().Width(), nUpperLimit - Frm().Top() ) ); + SwRect aHeaderArea( Frame().TopLeft(), + Size( Frame().Width(), nUpperLimit - Frame().Top() ) ); - SwViewShell* pViewShell = getRootFrm()->GetCurrShell(); + SwViewShell* pViewShell = getRootFrame()->GetCurrShell(); const bool bHideWhitespaceMode = pViewShell->GetViewOptions()->IsHideWhitespaceMode(); if ( aHeaderArea.IsInside( rPt ) ) { @@ -2273,8 +2273,8 @@ bool SwPageFrm::IsOverHeaderFooterArea( const Point& rPt, FrameControlType &rCon } else { - SwRect aFooterArea( Point( Frm().Left(), nLowerLimit ), - Size( Frm().Width(), Frm().Bottom() - nLowerLimit ) ); + SwRect aFooterArea( Point( Frame().Left(), nLowerLimit ), + Size( Frame().Width(), Frame().Bottom() - nLowerLimit ) ); if ( aFooterArea.IsInside( rPt ) && (!bHideWhitespaceMode || static_cast<const SwFrameFormat*>(GetRegisteredIn())->GetFooter().IsActive()) ) @@ -2287,7 +2287,7 @@ bool SwPageFrm::IsOverHeaderFooterArea( const Point& rPt, FrameControlType &rCon return false; } -SwTextGridItem const* GetGridItem(SwPageFrm const*const pPage) +SwTextGridItem const* GetGridItem(SwPageFrame const*const pPage) { if (pPage && pPage->HasGrid()) { diff --git a/sw/source/core/layout/pagedesc.cxx b/sw/source/core/layout/pagedesc.cxx index cbac1bccf9b5..e8f3ffe6713f 100644 --- a/sw/source/core/layout/pagedesc.cxx +++ b/sw/source/core/layout/pagedesc.cxx @@ -113,14 +113,14 @@ void SwPageDesc::Mirror() SfxItemSet aSet( *m_Master.GetAttrSet().GetPool(), m_Master.GetAttrSet().GetRanges() ); aSet.Put( aLR ); - aSet.Put( m_Master.GetFrmSize() ); + aSet.Put( m_Master.GetFrameSize() ); aSet.Put( m_Master.GetPaperBin() ); aSet.Put( m_Master.GetULSpace() ); aSet.Put( m_Master.GetBox() ); aSet.Put( m_Master.makeBackgroundBrushItem() ); aSet.Put( m_Master.GetShadow() ); aSet.Put( m_Master.GetCol() ); - aSet.Put( m_Master.GetFrmDir() ); + aSet.Put( m_Master.GetFrameDir() ); m_Left.SetFormatAttr( aSet ); } @@ -185,35 +185,35 @@ void SwPageDesc::RegisterChange() m_nRegHeight = 0; { - SwIterator<SwFrm,SwFormat> aIter( GetMaster() ); - for( SwFrm* pLast = aIter.First(); pLast; pLast = aIter.Next() ) + SwIterator<SwFrame,SwFormat> aIter( GetMaster() ); + for( SwFrame* pLast = aIter.First(); pLast; pLast = aIter.Next() ) { - if( pLast->IsPageFrm() ) - static_cast<SwPageFrm*>(pLast)->PrepareRegisterChg(); + if( pLast->IsPageFrame() ) + static_cast<SwPageFrame*>(pLast)->PrepareRegisterChg(); } } { - SwIterator<SwFrm,SwFormat> aIter( GetLeft() ); - for( SwFrm* pLast = aIter.First(); pLast; pLast = aIter.Next() ) + SwIterator<SwFrame,SwFormat> aIter( GetLeft() ); + for( SwFrame* pLast = aIter.First(); pLast; pLast = aIter.Next() ) { - if( pLast->IsPageFrm() ) - static_cast<SwPageFrm*>(pLast)->PrepareRegisterChg(); + if( pLast->IsPageFrame() ) + static_cast<SwPageFrame*>(pLast)->PrepareRegisterChg(); } } { - SwIterator<SwFrm,SwFormat> aIter( GetFirstMaster() ); - for( SwFrm* pLast = aIter.First(); pLast; pLast = aIter.Next() ) + SwIterator<SwFrame,SwFormat> aIter( GetFirstMaster() ); + for( SwFrame* pLast = aIter.First(); pLast; pLast = aIter.Next() ) { - if( pLast->IsPageFrm() ) - static_cast<SwPageFrm*>(pLast)->PrepareRegisterChg(); + if( pLast->IsPageFrame() ) + static_cast<SwPageFrame*>(pLast)->PrepareRegisterChg(); } } { - SwIterator<SwFrm,SwFormat> aIter( GetFirstLeft() ); - for( SwFrm* pLast = aIter.First(); pLast; pLast = aIter.Next() ) + SwIterator<SwFrame,SwFormat> aIter( GetFirstLeft() ); + for( SwFrame* pLast = aIter.First(); pLast; pLast = aIter.Next() ) { - if( pLast->IsPageFrm() ) - static_cast<SwPageFrm*>(pLast)->PrepareRegisterChg(); + if( pLast->IsPageFrame() ) + static_cast<SwPageFrame*>(pLast)->PrepareRegisterChg(); } } } @@ -231,10 +231,10 @@ void SwPageDesc::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) } } -static const SwFrm* lcl_GetFrmOfNode( const SwNode& rNd ) +static const SwFrame* lcl_GetFrameOfNode( const SwNode& rNd ) { const SwModify* pMod; - sal_uInt16 nFrmType = FRM_CNTNT; + sal_uInt16 nFrameType = FRM_CNTNT; if( rNd.IsContentNode() ) { @@ -243,22 +243,22 @@ static const SwFrm* lcl_GetFrmOfNode( const SwNode& rNd ) else if( rNd.IsTableNode() ) { pMod = static_cast<const SwTableNode&>(rNd).GetTable().GetFrameFormat(); - nFrmType = FRM_TAB; + nFrameType = FRM_TAB; } else pMod = nullptr; Point aNullPt; - return pMod ? ::GetFrmOfModify( nullptr, *pMod, nFrmType, &aNullPt ) + return pMod ? ::GetFrameOfModify( nullptr, *pMod, nFrameType, &aNullPt ) : nullptr; } const SwPageDesc* SwPageDesc::GetPageDescOfNode(const SwNode& rNd) { const SwPageDesc* pRet = nullptr; - const SwFrm* pChkFrm = lcl_GetFrmOfNode( rNd ); - if (pChkFrm && nullptr != (pChkFrm = pChkFrm->FindPageFrm())) - pRet = static_cast<const SwPageFrm*>(pChkFrm)->GetPageDesc(); + const SwFrame* pChkFrame = lcl_GetFrameOfNode( rNd ); + if (pChkFrame && nullptr != (pChkFrame = pChkFrame->FindPageFrame())) + pRet = static_cast<const SwPageFrame*>(pChkFrame)->GetPageDesc(); return pRet; } @@ -267,19 +267,19 @@ const SwFrameFormat* SwPageDesc::GetPageFormatOfNode( const SwNode& rNd, { // which PageDescFormat is valid for this node? const SwFrameFormat* pRet; - const SwFrm* pChkFrm = lcl_GetFrmOfNode( rNd ); + const SwFrame* pChkFrame = lcl_GetFrameOfNode( rNd ); - if( pChkFrm && nullptr != ( pChkFrm = pChkFrm->FindPageFrm() )) + if( pChkFrame && nullptr != ( pChkFrame = pChkFrame->FindPageFrame() )) { const SwPageDesc* pPd = bCheckForThisPgDc ? this : - static_cast<const SwPageFrm*>(pChkFrm)->GetPageDesc(); + static_cast<const SwPageFrame*>(pChkFrame)->GetPageDesc(); pRet = &pPd->GetMaster(); - OSL_ENSURE( static_cast<const SwPageFrm*>(pChkFrm)->GetPageDesc() == pPd, "Wrong node for detection of page format!" ); + OSL_ENSURE( static_cast<const SwPageFrame*>(pChkFrame)->GetPageDesc() == pPd, "Wrong node for detection of page format!" ); // this page is assigned to which format? - if( !pChkFrm->KnowsFormat(*pRet) ) + if( !pChkFrame->KnowsFormat(*pRet) ) { pRet = &pPd->GetLeft(); - OSL_ENSURE( pChkFrm->KnowsFormat(*pRet), "Wrong node for detection of page format!" ); + OSL_ENSURE( pChkFrame->KnowsFormat(*pRet), "Wrong node for detection of page format!" ); } } else @@ -292,11 +292,11 @@ bool SwPageDesc::IsFollowNextPageOfNode( const SwNode& rNd ) const bool bRet = false; if( GetFollow() && this != GetFollow() ) { - const SwFrm* pChkFrm = lcl_GetFrmOfNode( rNd ); - if( pChkFrm && nullptr != ( pChkFrm = pChkFrm->FindPageFrm() ) && - pChkFrm->IsPageFrm() && - ( !pChkFrm->GetNext() || GetFollow() == - static_cast<const SwPageFrm*>(pChkFrm->GetNext())->GetPageDesc() )) + const SwFrame* pChkFrame = lcl_GetFrameOfNode( rNd ); + if( pChkFrame && nullptr != ( pChkFrame = pChkFrame->FindPageFrame() ) && + pChkFrame->IsPageFrame() && + ( !pChkFrame->GetNext() || GetFollow() == + static_cast<const SwPageFrame*>(pChkFrame->GetNext())->GetPageDesc() )) // the page on which the follow points was found bRet = true; } diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 54d8a82b40db..683202a63037 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -139,17 +139,17 @@ class SwLineRect : public SwRect { Color aColor; SvxBorderStyle nStyle; - const SwTabFrm *pTab; + const SwTabFrame *pTab; sal_uInt8 nSubColor; //colorize subsidiary lines bool bPainted; //already painted? sal_uInt8 nLock; //To distinguish the line and the hell layer. public: SwLineRect( const SwRect &rRect, const Color *pCol, const SvxBorderStyle nStyle, - const SwTabFrm *pT , const sal_uInt8 nSCol ); + const SwTabFrame *pT , const sal_uInt8 nSCol ); const Color& GetColor() const { return aColor;} SvxBorderStyle GetStyle() const { return nStyle; } - const SwTabFrm *GetTab() const { return pTab; } + const SwTabFrame *GetTab() const { return pTab; } void SetPainted() { bPainted = true; } void Lock( bool bLock ) { if ( bLock ) ++nLock; @@ -192,7 +192,7 @@ public: #endif } void AddLineRect( const SwRect& rRect, const Color *pColor, const SvxBorderStyle nStyle, - const SwTabFrm *pTab, const sal_uInt8 nSCol, SwPaintProperties &properties ); + const SwTabFrame *pTab, const sal_uInt8 nSCol, SwPaintProperties &properties ); void ConnectEdges( OutputDevice *pOut, SwPaintProperties &properties ); void PaintLines ( OutputDevice *pOut, SwPaintProperties &properties ); void LockLines( bool bLock ); @@ -257,9 +257,9 @@ struct SwPaintProperties { // Retouch for transparent Flys is done by the background of the Flys. // The Fly itself should certainly not be spared out. See PaintBackground and // lcl_SubtractFlys() - SwFlyFrm *pSRetoucheFly; - SwFlyFrm *pSRetoucheFly2; - SwFlyFrm *pSFlyOnlyDraw; + SwFlyFrame *pSRetoucheFly; + SwFlyFrame *pSRetoucheFly2; + SwFlyFrame *pSFlyOnlyDraw; // The borders will be collected in pSLines during the Paint and later // possibly merge them. @@ -275,7 +275,7 @@ struct SwPaintProperties { SfxProgress *pSProgress; // Sizes of a pixel and the corresponding halves. Will be reset when - // entering SwRootFrm::Paint + // entering SwRootFrame::Paint long nSPixelSzW; long nSPixelSzH; long nSHalfPixelSzW; @@ -627,7 +627,7 @@ void BorderLines::AddBorderLine( } SwLineRect::SwLineRect( const SwRect &rRect, const Color *pCol, const SvxBorderStyle nStyl, - const SwTabFrm *pT, const sal_uInt8 nSCol ) : + const SwTabFrame *pT, const sal_uInt8 nSCol ) : SwRect( rRect ), nStyle( nStyl ), pTab( pT ), @@ -677,7 +677,7 @@ bool SwLineRect::MakeUnion( const SwRect &rRect, SwPaintProperties& properties) } void SwLineRects::AddLineRect( const SwRect &rRect, const Color *pCol, const SvxBorderStyle nStyle, - const SwTabFrm *pTab, const sal_uInt8 nSCol, SwPaintProperties& properties ) + const SwTabFrame *pTab, const sal_uInt8 nSCol, SwPaintProperties& properties ) { // Loop backwards because lines which can be combined, can usually be painted // in the same context @@ -1049,8 +1049,8 @@ void SwLineRects::PaintLines( OutputDevice *pOut, SwPaintProperties &properties // Vertical edge, overlapping with the table edge? SwTwips nLLeft = rLRect.Left() - 30, nLRight = rLRect.Right() + 30, - nTLeft = rLRect.GetTab()->Frm().Left() + rLRect.GetTab()->Prt().Left(), - nTRight = rLRect.GetTab()->Frm().Left() + rLRect.GetTab()->Prt().Right(); + nTLeft = rLRect.GetTab()->Frame().Left() + rLRect.GetTab()->Prt().Left(), + nTRight = rLRect.GetTab()->Frame().Left() + rLRect.GetTab()->Prt().Right(); if ( (nTLeft >= nLLeft && nTLeft <= nLRight) || (nTRight>= nLLeft && nTRight<= nLRight) ) bPaint = false; @@ -1060,8 +1060,8 @@ void SwLineRects::PaintLines( OutputDevice *pOut, SwPaintProperties &properties // Horizontal edge, overlapping with the table edge? SwTwips nLTop = rLRect.Top() - 30, nLBottom = rLRect.Bottom() + 30, - nTTop = rLRect.GetTab()->Frm().Top() + rLRect.GetTab()->Prt().Top(), - nTBottom = rLRect.GetTab()->Frm().Top() + rLRect.GetTab()->Prt().Bottom(); + nTTop = rLRect.GetTab()->Frame().Top() + rLRect.GetTab()->Prt().Top(), + nTBottom = rLRect.GetTab()->Frame().Top() + rLRect.GetTab()->Prt().Bottom(); if ( (nTTop >= nLTop && nTTop <= nLBottom) || (nTBottom >= nLTop && nTBottom <= nLBottom) ) bPaint = false; @@ -1427,7 +1427,7 @@ static long lcl_MinHeightDist( const long nDist, SwPaintProperties& properties ) /** * Calculate PrtArea plus surrounding plus shadow */ -static void lcl_CalcBorderRect( SwRect &rRect, const SwFrm *pFrm, +static void lcl_CalcBorderRect( SwRect &rRect, const SwFrame *pFrame, const SwBorderAttrs &rAttrs, const bool bShadow, SwPaintProperties& properties) @@ -1439,25 +1439,25 @@ static void lcl_CalcBorderRect( SwRect &rRect, const SwFrm *pFrm, // Notes: Borders of cell frames in R2L text direction will switch its side // - left border is painted on the right; right border on the left. // See <lcl_PaintLeftLine> and <lcl_PaintRightLine>. - if( pFrm->IsSctFrm() ) + if( pFrame->IsSctFrame() ) { - rRect = pFrm->Prt(); - rRect.Pos() += pFrm->Frm().Pos(); + rRect = pFrame->Prt(); + rRect.Pos() += pFrame->Frame().Pos(); } - else if ( pFrm->IsCellFrm() ) - rRect = pFrm->Frm(); + else if ( pFrame->IsCellFrame() ) + rRect = pFrame->Frame(); else { - rRect = pFrm->Prt(); - rRect.Pos() += pFrm->Frm().Pos(); + rRect = pFrame->Prt(); + rRect.Pos() += pFrame->Frame().Pos(); if ( rAttrs.IsLine() || rAttrs.IsBorderDist() || (bShadow && rAttrs.GetShadow().GetLocation() != SVX_SHADOW_NONE) ) { - SwRectFn fnRect = pFrm->IsVertical() ? ( pFrm->IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori; + SwRectFn fnRect = pFrame->IsVertical() ? ( pFrame->IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori; const SvxBoxItem &rBox = rAttrs.GetBox(); - const bool bTop = 0 != (pFrm->*fnRect->fnGetTopMargin)(); + const bool bTop = 0 != (pFrame->*fnRect->fnGetTopMargin)(); if ( bTop ) { SwTwips nDiff = rBox.GetTop() ? @@ -1469,17 +1469,17 @@ static void lcl_CalcBorderRect( SwRect &rRect, const SwFrm *pFrm, (rRect.*fnRect->fnSubTop)( nDiff ); } - const bool bBottom = 0 != (pFrm->*fnRect->fnGetBottomMargin)(); + const bool bBottom = 0 != (pFrame->*fnRect->fnGetBottomMargin)(); if ( bBottom ) { SwTwips nDiff = 0; // #i29550# - if ( pFrm->IsTabFrm() && - static_cast<const SwTabFrm*>(pFrm)->IsCollapsingBorders() ) + if ( pFrame->IsTabFrame() && + static_cast<const SwTabFrame*>(pFrame)->IsCollapsingBorders() ) { // For collapsing borders, we have to add the height of // the height of the last line - nDiff = static_cast<const SwTabFrm*>(pFrm)->GetBottomLineSize(); + nDiff = static_cast<const SwTabFrame*>(pFrame)->GetBottomLineSize(); } else { @@ -1527,27 +1527,27 @@ static void lcl_CalcBorderRect( SwRect &rRect, const SwFrm *pFrm, * top of next frame, if border/shadow is joined with previous/next frame */ static void lcl_ExtendLeftAndRight( SwRect& _rRect, - const SwFrm& _rFrm, + const SwFrame& _rFrame, const SwBorderAttrs& _rAttrs, const SwRectFn& _rRectFn ) { - if ( _rAttrs.JoinedWithPrev( _rFrm ) ) + if ( _rAttrs.JoinedWithPrev( _rFrame ) ) { - const SwFrm* pPrevFrm = _rFrm.GetPrev(); - (_rRect.*_rRectFn->fnSetTop)( (pPrevFrm->*_rRectFn->fnGetPrtBottom)() ); + const SwFrame* pPrevFrame = _rFrame.GetPrev(); + (_rRect.*_rRectFn->fnSetTop)( (pPrevFrame->*_rRectFn->fnGetPrtBottom)() ); } - if ( _rAttrs.JoinedWithNext( _rFrm ) ) + if ( _rAttrs.JoinedWithNext( _rFrame ) ) { - const SwFrm* pNextFrm = _rFrm.GetNext(); - (_rRect.*_rRectFn->fnSetBottom)( (pNextFrm->*_rRectFn->fnGetPrtTop)() ); + const SwFrame* pNextFrame = _rFrame.GetNext(); + (_rRect.*_rRectFn->fnSetBottom)( (pNextFrame->*_rRectFn->fnGetPrtTop)() ); } } -static void lcl_SubtractFlys( const SwFrm *pFrm, const SwPageFrm *pPage, +static void lcl_SubtractFlys( const SwFrame *pFrame, const SwPageFrame *pPage, const SwRect &rRect, SwRegionRects &rRegion, SwPaintProperties & rProperties) { const SwSortedObjs& rObjs = *pPage->GetSortedObjs(); - const SwFlyFrm* pSelfFly = pFrm->IsInFly() ? pFrm->FindFlyFrm() : gProp.pSRetoucheFly2; + const SwFlyFrame* pSelfFly = pFrame->IsInFly() ? pFrame->FindFlyFrame() : gProp.pSRetoucheFly2; if (!gProp.pSRetoucheFly) gProp.pSRetoucheFly = gProp.pSRetoucheFly2; @@ -1560,12 +1560,12 @@ static void lcl_SubtractFlys( const SwFrm *pFrm, const SwPageFrm *pPage, if (!pPage->GetFormat()->GetDoc()->getIDocumentDrawModelAccess().IsVisibleLayerId(pSdrObj->GetLayer())) continue; - if (dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) == nullptr) + if (dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) == nullptr) continue; - const SwFlyFrm *pFly = static_cast<const SwFlyFrm*>(pAnchoredObj); + const SwFlyFrame *pFly = static_cast<const SwFlyFrame*>(pAnchoredObj); - if (pSelfFly == pFly || gProp.pSRetoucheFly == pFly || !rRect.IsOver(pFly->Frm())) + if (pSelfFly == pFly || gProp.pSRetoucheFly == pFly || !rRect.IsOver(pFly->Frame())) continue; if (!pFly->GetFormat()->GetPrint().GetValue() && @@ -1591,7 +1591,7 @@ static void lcl_SubtractFlys( const SwFrm *pFrm, const SwPageFrm *pPage, //or be character bound. if (pSelfFly && bLowerOfSelf) { - OSL_ENSURE( pFly->IsFlyInCntFrm() || + OSL_ENSURE( pFly->IsFlyInContentFrame() || pSdrObj->GetOrdNumDirect() > pSelfFly->GetVirtDrawObj()->GetOrdNumDirect(), "Fly with wrong z-Order" ); } @@ -1641,11 +1641,11 @@ static void lcl_SubtractFlys( const SwFrm *pFrm, const SwPageFrm *pPage, bool bHell = pSdrObj->GetLayer() == rIDDMA.GetHellId(); if ( (bStopOnHell && bHell) || /// Change internal order of condition - /// first check "!bHell", then "..->Lower()" and "..->IsNoTextFrm()" + /// first check "!bHell", then "..->Lower()" and "..->IsNoTextFrame()" /// have not to be performed, if frame is in "Hell" - ( !bHell && pFly->Lower() && pFly->Lower()->IsNoTextFrm() && - (static_cast<SwNoTextFrm const*>(pFly->Lower())->IsTransparent() || - static_cast<SwNoTextFrm const*>(pFly->Lower())->HasAnimation() || + ( !bHell && pFly->Lower() && pFly->Lower()->IsNoTextFrame() && + (static_cast<SwNoTextFrame const*>(pFly->Lower())->IsTransparent() || + static_cast<SwNoTextFrame const*>(pFly->Lower())->HasAnimation() || pFly->GetFormat()->GetSurround().IsContour() ) ) @@ -1667,13 +1667,13 @@ static void lcl_SubtractFlys( const SwFrm *pFrm, const SwPageFrm *pPage, // avoids drawing of transparent areas more than once, if // a fly frame inherites a transparent background from its // parent fly frame. - if (pFrm->IsFlyFrm() && - (pFly->GetAnchorFrm()->FindFlyFrm() == pFrm) && + if (pFrame->IsFlyFrame() && + (pFly->GetAnchorFrame()->FindFlyFrame() == pFrame) && static_cast<const SwFlyFrameFormat*>(pFly->GetFormat())->IsBackgroundBrushInherited() ) { SwRect aRect; - SwBorderAttrAccess aAccess( SwFrm::GetCache(), static_cast<SwFrm const *>(pFly) ); + SwBorderAttrAccess aAccess( SwFrame::GetCache(), static_cast<SwFrame const *>(pFly) ); const SwBorderAttrs &rAttrs = *aAccess.Get(); ::lcl_CalcBorderRect( aRect, pFly, rAttrs, true, rProperties ); rRegion -= aRect; @@ -1685,12 +1685,12 @@ static void lcl_SubtractFlys( const SwFrm *pFrm, const SwPageFrm *pPage, } } - if (bHell && pFly->GetAnchorFrm()->IsInFly()) + if (bHell && pFly->GetAnchorFrame()->IsInFly()) { //So the border won't get dismantled by the background of the other //Fly. SwRect aRect; - SwBorderAttrAccess aAccess( SwFrm::GetCache(), static_cast<SwFrm const *>(pFly) ); + SwBorderAttrAccess aAccess( SwFrame::GetCache(), static_cast<SwFrame const *>(pFly) ); const SwBorderAttrs &rAttrs = *aAccess.Get(); ::lcl_CalcBorderRect( aRect, pFly, rAttrs, true, rProperties ); rRegion -= aRect; @@ -1698,7 +1698,7 @@ static void lcl_SubtractFlys( const SwFrm *pFrm, const SwPageFrm *pPage, else { SwRect aRect( pFly->Prt() ); - aRect += pFly->Frm().Pos(); + aRect += pFly->Frame().Pos(); rRegion -= aRect; } } @@ -2313,7 +2313,7 @@ void DrawGraphic( } /** - * Local helper for SwRootFrm::Paint(..) - Adjust given rectangle to pixel size + * Local helper for SwRootFrame::Paint(..) - Adjust given rectangle to pixel size * * By OD at 27.09.2002 for #103636# * In order to avoid paint errors caused by multiple alignments (e.g. ::SwAlignRect(..)) @@ -2501,15 +2501,15 @@ struct lt_SwLineEntry typedef std::set< SwLineEntry, lt_SwLineEntry > SwLineEntrySet; typedef std::map< SwTwips, SwLineEntrySet > SwLineEntryMap; -class SwTabFrmPainter +class SwTabFramePainter { SwLineEntryMap maVertLines; SwLineEntryMap maHoriLines; - const SwTabFrm& mrTabFrm; + const SwTabFrame& mrTabFrame; void Insert( SwLineEntry&, bool bHori ); - void Insert( const SwFrm& rFrm, const SvxBoxItem& rBoxItem ); - void HandleFrame( const SwLayoutFrm& rFrm ); + void Insert( const SwFrame& rFrame, const SvxBoxItem& rBoxItem ); + void HandleFrame( const SwLayoutFrame& rFrame ); void FindStylesForLine( const Point&, const Point&, svx::frame::Style*, @@ -2518,49 +2518,49 @@ class SwTabFrmPainter void AdjustTopLeftFrames(); public: - explicit SwTabFrmPainter( const SwTabFrm& rTabFrm ); + explicit SwTabFramePainter( const SwTabFrame& rTabFrame ); void PaintLines( OutputDevice& rDev, const SwRect& rRect ) const; }; -SwTabFrmPainter::SwTabFrmPainter( const SwTabFrm& rTabFrm ) - : mrTabFrm( rTabFrm ) +SwTabFramePainter::SwTabFramePainter( const SwTabFrame& rTabFrame ) + : mrTabFrame( rTabFrame ) { - HandleFrame( rTabFrm ); + HandleFrame( rTabFrame ); AdjustTopLeftFrames(); } -void SwTabFrmPainter::HandleFrame( const SwLayoutFrm& rLayoutFrm ) +void SwTabFramePainter::HandleFrame( const SwLayoutFrame& rLayoutFrame ) { // Add border lines of cell frames. Skip covered cells. Skip cells // in special row span row, which do not have a negative row span: - if ( rLayoutFrm.IsCellFrm() && !rLayoutFrm.IsCoveredCell() ) + if ( rLayoutFrame.IsCellFrame() && !rLayoutFrame.IsCoveredCell() ) { - const SwCellFrm* pThisCell = static_cast<const SwCellFrm*>(&rLayoutFrm); - const SwRowFrm* pRowFrm = static_cast<const SwRowFrm*>(pThisCell->GetUpper()); + const SwCellFrame* pThisCell = static_cast<const SwCellFrame*>(&rLayoutFrame); + const SwRowFrame* pRowFrame = static_cast<const SwRowFrame*>(pThisCell->GetUpper()); const long nRowSpan = pThisCell->GetTabBox()->getRowSpan(); - if ( !pRowFrm->IsRowSpanLine() || nRowSpan > 1 || nRowSpan < -1 ) + if ( !pRowFrame->IsRowSpanLine() || nRowSpan > 1 || nRowSpan < -1 ) { - SwBorderAttrAccess aAccess( SwFrm::GetCache(), &rLayoutFrm ); + SwBorderAttrAccess aAccess( SwFrame::GetCache(), &rLayoutFrame ); const SwBorderAttrs& rAttrs = *aAccess.Get(); const SvxBoxItem& rBox = rAttrs.GetBox(); - Insert( rLayoutFrm, rBox ); + Insert( rLayoutFrame, rBox ); } } // Recurse into lower layout frames, but do not recurse into lower tabframes. - const SwFrm* pLower = rLayoutFrm.Lower(); + const SwFrame* pLower = rLayoutFrame.Lower(); while ( pLower ) { - const SwLayoutFrm* pLowerLayFrm = dynamic_cast<const SwLayoutFrm*>(pLower); - if ( pLowerLayFrm && !pLowerLayFrm->IsTabFrm() ) - HandleFrame( *pLowerLayFrm ); + const SwLayoutFrame* pLowerLayFrame = dynamic_cast<const SwLayoutFrame*>(pLower); + if ( pLowerLayFrame && !pLowerLayFrame->IsTabFrame() ) + HandleFrame( *pLowerLayFrame ); pLower = pLower->GetNext(); } } -void SwTabFrmPainter::PaintLines(OutputDevice& rDev, const SwRect& rRect) const +void SwTabFramePainter::PaintLines(OutputDevice& rDev, const SwRect& rRect) const { // #i16816# tagged pdf support SwTaggedPDFHelper aTaggedPDFHelper( nullptr, nullptr, nullptr, rDev ); @@ -2582,9 +2582,9 @@ void SwTabFrmPainter::PaintLines(OutputDevice& rDev, const SwRect& rRect) const rDev.SetDrawMode( DrawModeFlags::Default ); } - const SwFrm* pUpper = mrTabFrm.GetUpper(); + const SwFrame* pUpper = mrTabFrame.GetUpper(); SwRect aUpper( pUpper->Prt() ); - aUpper.Pos() += pUpper->Frm().Pos(); + aUpper.Pos() += pUpper->Frame().Pos(); SwRect aUpperAligned( aUpper ); ::SwAlignRect( aUpperAligned, gProp.pSGlobalShell, &rDev ); @@ -2730,7 +2730,7 @@ void SwTabFrmPainter::PaintLines(OutputDevice& rDev, const SwRect& rRect) const // logically vertical lines are painted centered on the line, // logically horizontal lines are painted "below" the line - bool const isBelow((mrTabFrm.IsVertical()) ? !bHori : bHori); + bool const isBelow((mrTabFrame.IsVertical()) ? !bHori : bHori); double const offsetStart = (isBelow) ? aStyles[0].GetWidth() / 2.0 : std::max<double>(aStyles[1].GetWidth(), @@ -2739,7 +2739,7 @@ void SwTabFrmPainter::PaintLines(OutputDevice& rDev, const SwRect& rRect) const ? aStyles[0].GetWidth() / 2.0 : std::max<double>(aStyles[4].GetWidth(), aStyles[6].GetWidth()) / 2.0; - if (mrTabFrm.IsVertical()) + if (mrTabFrame.IsVertical()) { aPaintStart.X() -= static_cast<long>(offsetStart + 0.5); aPaintEnd.X() -= static_cast<long>(offsetEnd + 0.5); @@ -2752,7 +2752,7 @@ void SwTabFrmPainter::PaintLines(OutputDevice& rDev, const SwRect& rRect) const if (bHori) { - mrTabFrm.ProcessPrimitives( svx::frame::CreateBorderPrimitives( + mrTabFrame.ProcessPrimitives( svx::frame::CreateBorderPrimitives( aPaintStart, aPaintEnd, aStyles[ 0 ], // current style @@ -2767,7 +2767,7 @@ void SwTabFrmPainter::PaintLines(OutputDevice& rDev, const SwRect& rRect) const } else { - mrTabFrm.ProcessPrimitives( svx::frame::CreateBorderPrimitives( + mrTabFrame.ProcessPrimitives( svx::frame::CreateBorderPrimitives( aPaintEnd, aPaintStart, aStyles[ 0 ], // current style @@ -2794,7 +2794,7 @@ void SwTabFrmPainter::PaintLines(OutputDevice& rDev, const SwRect& rRect) const * StartPoint or Endpoint. The styles of these lines are required for DR's magic * line painting functions */ -void SwTabFrmPainter::FindStylesForLine( const Point& rStartPoint, +void SwTabFramePainter::FindStylesForLine( const Point& rStartPoint, const Point& rEndPoint, svx::frame::Style* pStyles, bool bHori ) const @@ -2938,7 +2938,7 @@ void calcOffsetForDoubleLine( SwLineEntryMap& rLines ) } -void SwTabFrmPainter::AdjustTopLeftFrames() +void SwTabFramePainter::AdjustTopLeftFrames() { calcOffsetForDoubleLine(maHoriLines); calcOffsetForDoubleLine(maVertLines); @@ -2949,37 +2949,37 @@ void SwTabFrmPainter::AdjustTopLeftFrames() * first line in follow table without repeated headlines */ static bool lcl_IsFirstRowInFollowTableWithoutRepeatedHeadlines( - SwTabFrm const& rTabFrm, SwFrm const& rFrm, SvxBoxItem const& rBoxItem) -{ - SwRowFrm const*const pThisRowFrm = - dynamic_cast<const SwRowFrm*>(rFrm.GetUpper()); - return (pThisRowFrm - && (pThisRowFrm->GetUpper() == &rTabFrm) - && rTabFrm.IsFollow() - && !rTabFrm.GetTable()->GetRowsToRepeat() - && ( !pThisRowFrm->GetPrev() - || static_cast<const SwRowFrm*>(pThisRowFrm->GetPrev()) + SwTabFrame const& rTabFrame, SwFrame const& rFrame, SvxBoxItem const& rBoxItem) +{ + SwRowFrame const*const pThisRowFrame = + dynamic_cast<const SwRowFrame*>(rFrame.GetUpper()); + return (pThisRowFrame + && (pThisRowFrame->GetUpper() == &rTabFrame) + && rTabFrame.IsFollow() + && !rTabFrame.GetTable()->GetRowsToRepeat() + && ( !pThisRowFrame->GetPrev() + || static_cast<const SwRowFrame*>(pThisRowFrame->GetPrev()) ->IsRowSpanLine()) && !rBoxItem.GetTop() && rBoxItem.GetBottom()); } -void SwTabFrmPainter::Insert( const SwFrm& rFrm, const SvxBoxItem& rBoxItem ) +void SwTabFramePainter::Insert( const SwFrame& rFrame, const SvxBoxItem& rBoxItem ) { // build 4 line entries for the 4 borders: - SwRect aBorderRect = rFrm.Frm(); - if ( rFrm.IsTabFrm() ) + SwRect aBorderRect = rFrame.Frame(); + if ( rFrame.IsTabFrame() ) { - aBorderRect = rFrm.Prt(); - aBorderRect.Pos() += rFrm.Frm().Pos(); + aBorderRect = rFrame.Prt(); + aBorderRect.Pos() += rFrame.Frame().Pos(); } bool const bBottomAsTop(lcl_IsFirstRowInFollowTableWithoutRepeatedHeadlines( - mrTabFrm, rFrm, rBoxItem)); - bool const bVert = mrTabFrm.IsVertical(); - bool const bR2L = mrTabFrm.IsRightToLeft(); + mrTabFrame, rFrame, rBoxItem)); + bool const bVert = mrTabFrame.IsVertical(); + bool const bR2L = mrTabFrame.IsRightToLeft(); - SwViewShell* pViewShell = mrTabFrm.getRootFrm()->GetCurrShell(); + SwViewShell* pViewShell = mrTabFrame.getRootFrame()->GetCurrShell(); OutputDevice* pOutDev = pViewShell->GetOut(); const MapMode& rMapMode = pOutDev->GetMapMode(); const Fraction& rFracX = rMapMode.GetScaleX(); @@ -3022,7 +3022,7 @@ void SwTabFrmPainter::Insert( const SwFrm& rFrm, const SvxBoxItem& rBoxItem ) Insert( aBottom, true ); } -void SwTabFrmPainter::Insert( SwLineEntry& rNew, bool bHori ) +void SwTabFramePainter::Insert( SwLineEntry& rNew, bool bHori ) { // get all lines from structure, that have key entry of pLE SwLineEntryMap* pLine2 = bHori ? &maHoriLines : &maVertLines; @@ -3147,7 +3147,7 @@ namespace SdrObject* pObj = rOriginal.GetViewContact().TryToGetSdrObject(); if ( pObj ) { - bPaint = SwFlyFrm::IsPaint( pObj, &mrViewShell ); + bPaint = SwFlyFrame::IsPaint( pObj, &mrViewShell ); } if ( !bPaint ) @@ -3172,9 +3172,9 @@ namespace * 3. Paint the document content (text) * 4. Paint the draw layer that is above the document |*/ -void SwRootFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, SwPrintData const*const pPrintData) const +void SwRootFrame::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, SwPrintData const*const pPrintData) const { - OSL_ENSURE( Lower() && Lower()->IsPageFrm(), "Lower of root is no page." ); + OSL_ENSURE( Lower() && Lower()->IsPageFrame(), "Lower of root is no page." ); PROTOCOL( this, PROT_FILE_INIT, 0, nullptr) @@ -3187,14 +3187,14 @@ void SwRootFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, S { return; } - if (SwRootFrm::s_isInPaint) + if (SwRootFrame::s_isInPaint) { SwPaintQueue::Add( pSh, rRect ); return; } } else - SwRootFrm::s_isInPaint = bResetRootPaint = true; + SwRootFrame::s_isInPaint = bResetRootPaint = true; SwSavePaintStatics *pStatics = nullptr; if ( gProp.pSGlobalShell ) @@ -3231,8 +3231,8 @@ void SwRootFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, S } if ( bPerformLayoutAction ) { - const_cast<SwRootFrm*>(this)->ResetTurbo(); - SwLayAction aAction( const_cast<SwRootFrm*>(this), pSh->Imp() ); + const_cast<SwRootFrame*>(this)->ResetTurbo(); + SwLayAction aAction( const_cast<SwRootFrame*>(this), pSh->Imp() ); aAction.SetPaint( false ); aAction.SetComplete( false ); aAction.SetReschedule( gProp.pSProgress != nullptr ); @@ -3254,13 +3254,13 @@ void SwRootFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, S // of the document. Dangerous! We better set this flag to // avoid the reformat. const bool bOldAction = IsCallbackActionEnabled(); - const_cast<SwRootFrm*>(this)->SetCallbackActionEnabled( false ); + const_cast<SwRootFrame*>(this)->SetCallbackActionEnabled( false ); - const SwPageFrm *pPage = pSh->Imp()->GetFirstVisPage(&rRenderContext); + const SwPageFrame *pPage = pSh->Imp()->GetFirstVisPage(&rRenderContext); const bool bBookMode = gProp.pSGlobalShell->GetViewOptions()->IsViewLayoutBookMode(); - if ( bBookMode && pPage->GetPrev() && static_cast<const SwPageFrm*>(pPage->GetPrev())->IsEmptyPage() ) - pPage = static_cast<const SwPageFrm*>(pPage->GetPrev()); + if ( bBookMode && pPage->GetPrev() && static_cast<const SwPageFrame*>(pPage->GetPrev())->IsEmptyPage() ) + pPage = static_cast<const SwPageFrame*>(pPage->GetPrev()); // #i68597# const bool bGridPainting(pSh->GetWin() && pSh->Imp()->HasDrawView() && pSh->Imp()->GetDrawView()->IsGridVisible()); @@ -3271,10 +3271,10 @@ void SwRootFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, S { SwEditWin& rEditWin = pWrtSh->GetView().GetEditWin(); SwFrameControlsManager& rMngr = rEditWin.GetFrameControlsManager(); - const SwPageFrm* pHiddenPage = pPage; + const SwPageFrame* pHiddenPage = pPage; while ( pHiddenPage->GetPrev() != nullptr ) { - pHiddenPage = static_cast< const SwPageFrm* >( pHiddenPage->GetPrev() ); + pHiddenPage = static_cast< const SwPageFrame* >( pHiddenPage->GetPrev() ); SwFrameControlPtr pControl = rMngr.GetControl( PageBreak, pHiddenPage ); if ( pControl.get() ) pControl->ShowAll( false ); @@ -3293,7 +3293,7 @@ void SwRootFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, S if ( !pPage->IsEmptyPage() ) { SwRect aPaintRect; - SwPageFrm::GetBorderAndShadowBoundRect( pPage->Frm(), pSh, &rRenderContext, aPaintRect, + SwPageFrame::GetBorderAndShadowBoundRect( pPage->Frame(), pSh, &rRenderContext, aPaintRect, bPaintLeftShadow, bPaintRightShadow, bRightSidebar ); if ( aRect.IsOver( aPaintRect ) ) @@ -3315,8 +3315,8 @@ void SwRootFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, S SWRECTFN( pPage ) SwRect aPageRectTemp( aPaintRect ); (aPageRectTemp.*fnRect->fnSetLeftAndWidth)( - (pPage->Frm().*fnRect->fnGetLeft)(), - (pPage->Frm().*fnRect->fnGetWidth)() ); + (pPage->Frame().*fnRect->fnGetLeft)(), + (pPage->Frame().*fnRect->fnGetWidth)() ); aPageRectTemp._Intersection( pSh->VisArea() ); vcl::Region aPageRectRegion( aPageRectTemp.SVRect() ); aPageRectRegion.Exclude( aPaintRect.SVRect() ); @@ -3368,7 +3368,7 @@ void SwRootFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, S const IDocumentDrawModelAccess& rIDDMA = pSh->getIDocumentDrawModelAccess(); pSh->Imp()->PaintLayer( rIDDMA.GetHellId(), pPrintData, - pPage->Frm(), + pPage->Frame(), &aPageBackgrdColor, pPage->IsRightToLeft(), &aSwRedirector ); @@ -3393,8 +3393,8 @@ void SwRootFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, S if( pSh->GetWin() && pSh->GetDoc()->GetDocShell() && !pSh->GetDoc()->GetDocShell()->IsInPlaceActive() ) { - SwPageFrm::PaintBorderAndShadow( pPage->Frm(), pSh, bPaintLeftShadow, bPaintRightShadow, bRightSidebar ); - SwPageFrm::PaintNotesSidebar( pPage->Frm(), pSh, pPage->GetPhyPageNum(), bRightSidebar); + SwPageFrame::PaintBorderAndShadow( pPage->Frame(), pSh, bPaintLeftShadow, bPaintRightShadow, bRightSidebar ); + SwPageFrame::PaintNotesSidebar( pPage->Frame(), pSh, pPage->GetPhyPageNum(), bRightSidebar); } gProp.pSLines->PaintLines( pSh->GetOut(), gProp ); @@ -3415,7 +3415,7 @@ void SwRootFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, S // OD 09.12.2002 #103045# - add 4th parameter for horizontal text direction. pSh->Imp()->PaintLayer( pSh->GetDoc()->getIDocumentDrawModelAccess().GetHeavenId(), pPrintData, - pPage->Frm(), + pPage->Frame(), &aPageBackgrdColor, pPage->IsRightToLeft(), &aSwRedirector ); @@ -3451,13 +3451,13 @@ void SwRootFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, S { // paint empty page SwRect aPaintRect; - SwRect aEmptyPageRect( pPage->Frm() ); + SwRect aEmptyPageRect( pPage->Frame() ); // code from vprint.cxx - const SwPageFrm& rFormatPage = pPage->GetFormatPage(); - aEmptyPageRect.SSize() = rFormatPage.Frm().SSize(); + const SwPageFrame& rFormatPage = pPage->GetFormatPage(); + aEmptyPageRect.SSize() = rFormatPage.Frame().SSize(); - SwPageFrm::GetBorderAndShadowBoundRect( aEmptyPageRect, pSh, &rRenderContext, aPaintRect, + SwPageFrame::GetBorderAndShadowBoundRect( aEmptyPageRect, pSh, &rRenderContext, aPaintRect, bPaintLeftShadow, bPaintRightShadow, bRightSidebar ); aPaintRect._Intersection( aRect ); @@ -3484,7 +3484,7 @@ void SwRootFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, S pSh->GetOut()->DrawRect( aEmptyPageRect.SVRect() ); // paint empty page text - const vcl::Font& rEmptyPageFont = SwPageFrm::GetEmptyPageFont(); + const vcl::Font& rEmptyPageFont = SwPageFrame::GetEmptyPageFont(); const vcl::Font aOldFont( pSh->GetOut()->GetFont() ); pSh->GetOut()->SetFont( rEmptyPageFont ); @@ -3497,8 +3497,8 @@ void SwRootFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, S // paint shadow and border for empty page // OD 19.02.2003 #107369# - use new method to paint page border and // shadow - SwPageFrm::PaintBorderAndShadow( aEmptyPageRect, pSh, bPaintLeftShadow, bPaintRightShadow, bRightSidebar ); - SwPageFrm::PaintNotesSidebar( aEmptyPageRect, pSh, pPage->GetPhyPageNum(), bRightSidebar); + SwPageFrame::PaintBorderAndShadow( aEmptyPageRect, pSh, bPaintLeftShadow, bPaintRightShadow, bRightSidebar ); + SwPageFrame::PaintNotesSidebar( aEmptyPageRect, pSh, pPage->GetPhyPageNum(), bRightSidebar); { pSh->DLPostPaint2(true); @@ -3506,15 +3506,15 @@ void SwRootFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, S } } - OSL_ENSURE( !pPage->GetNext() || pPage->GetNext()->IsPageFrm(), + OSL_ENSURE( !pPage->GetNext() || pPage->GetNext()->IsPageFrame(), "Neighbour of page is not a page." ); - pPage = static_cast<const SwPageFrm*>(pPage->GetNext()); + pPage = static_cast<const SwPageFrame*>(pPage->GetNext()); } DELETEZ( gProp.pSLines ); if ( bResetRootPaint ) - SwRootFrm::s_isInPaint = false; + SwRootFrame::s_isInPaint = false; if ( pStatics ) delete pStatics; else @@ -3523,19 +3523,19 @@ void SwRootFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, S gProp.pSGlobalShell = nullptr; } - const_cast<SwRootFrm*>(this)->SetCallbackActionEnabled( bOldAction ); + const_cast<SwRootFrame*>(this)->SetCallbackActionEnabled( bOldAction ); } -static void lcl_EmergencyFormatFootnoteCont( SwFootnoteContFrm *pCont ) +static void lcl_EmergencyFormatFootnoteCont( SwFootnoteContFrame *pCont ) { - vcl::RenderContext* pRenderContext = pCont->getRootFrm()->GetCurrShell()->GetOut(); + vcl::RenderContext* pRenderContext = pCont->getRootFrame()->GetCurrShell()->GetOut(); //It's possible that the Cont will get destroyed. - SwContentFrm *pCnt = pCont->ContainsContent(); + SwContentFrame *pCnt = pCont->ContainsContent(); while ( pCnt && pCnt->IsInFootnote() ) { pCnt->Calc(pRenderContext); - pCnt = pCnt->GetNextContentFrm(); + pCnt = pCnt->GetNextContentFrame(); } } @@ -3544,16 +3544,16 @@ class SwShortCut SwRectDist fnCheck; long nLimit; public: - SwShortCut( const SwFrm& rFrm, const SwRect& rRect ); + SwShortCut( const SwFrame& rFrame, const SwRect& rRect ); bool Stop( const SwRect& rRect ) const { return (rRect.*fnCheck)( nLimit ) > 0; } }; -SwShortCut::SwShortCut( const SwFrm& rFrm, const SwRect& rRect ) +SwShortCut::SwShortCut( const SwFrame& rFrame, const SwRect& rRect ) { - bool bVert = rFrm.IsVertical(); - bool bR2L = rFrm.IsRightToLeft(); - if( rFrm.IsNeighbourFrm() && bVert == bR2L ) + bool bVert = rFrame.IsVertical(); + bool bR2L = rFrame.IsRightToLeft(); + if( rFrame.IsNeighbourFrame() && bVert == bR2L ) { if( bVert ) { @@ -3566,14 +3566,14 @@ SwShortCut::SwShortCut( const SwFrm& rFrm, const SwRect& rRect ) nLimit = rRect.Left() + rRect.Width(); } } - else if( bVert == rFrm.IsNeighbourFrm() ) + else if( bVert == rFrame.IsNeighbourFrame() ) { fnCheck = &SwRect::GetTopDistance; nLimit = rRect.Top() + rRect.Height(); } else { - if ( rFrm.IsVertLR() ) + if ( rFrame.IsVertLR() ) { fnCheck = &SwRect::GetLeftDistance; nLimit = rRect.Right(); @@ -3586,33 +3586,33 @@ SwShortCut::SwShortCut( const SwFrm& rFrm, const SwRect& rRect ) } } -void SwLayoutFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, SwPrintData const*const) const +void SwLayoutFrame::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, SwPrintData const*const) const { // #i16816# tagged pdf support - Frm_Info aFrmInfo( *this ); - SwTaggedPDFHelper aTaggedPDFHelper( nullptr, &aFrmInfo, nullptr, rRenderContext ); + Frame_Info aFrameInfo( *this ); + SwTaggedPDFHelper aTaggedPDFHelper( nullptr, &aFrameInfo, nullptr, rRenderContext ); - const SwFrm *pFrm = Lower(); - if ( !pFrm ) + const SwFrame *pFrame = Lower(); + if ( !pFrame ) return; - SwShortCut aShortCut( *pFrm, rRect ); + SwShortCut aShortCut( *pFrame, rRect ); bool bCnt; - if ( (bCnt = pFrm->IsContentFrm()) ) - pFrm->Calc(&rRenderContext); + if ( (bCnt = pFrame->IsContentFrame()) ) + pFrame->Calc(&rRenderContext); - if ( pFrm->IsFootnoteContFrm() ) + if ( pFrame->IsFootnoteContFrame() ) { - ::lcl_EmergencyFormatFootnoteCont( const_cast<SwFootnoteContFrm*>(static_cast<const SwFootnoteContFrm*>(pFrm)) ); - pFrm = Lower(); + ::lcl_EmergencyFormatFootnoteCont( const_cast<SwFootnoteContFrame*>(static_cast<const SwFootnoteContFrame*>(pFrame)) ); + pFrame = Lower(); } - const SwPageFrm *pPage = nullptr; + const SwPageFrame *pPage = nullptr; const bool bWin = gProp.pSGlobalShell->GetWin() != nullptr; - while ( IsAnLower( pFrm ) ) + while ( IsAnLower( pFrame ) ) { - SwRect aPaintRect( pFrm->PaintArea() ); + SwRect aPaintRect( pFrame->PaintArea() ); if( aShortCut.Stop( aPaintRect ) ) break; if ( bCnt && gProp.pSProgress ) @@ -3620,19 +3620,19 @@ void SwLayoutFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, //We need to retouch if a frame explicitly requests it. //First do the retouch, because this could flatten the borders. - if ( pFrm->IsRetouche() ) + if ( pFrame->IsRetouche() ) { - if ( pFrm->IsRetoucheFrm() && bWin && !pFrm->GetNext() ) + if ( pFrame->IsRetoucheFrame() && bWin && !pFrame->GetNext() ) { if ( !pPage ) - pPage = FindPageFrm(); - pFrm->Retouche( pPage, rRect ); + pPage = FindPageFrame(); + pFrame->Retouche( pPage, rRect ); } - pFrm->ResetRetouche(); + pFrame->ResetRetouche(); } if ( rRect.IsOver( aPaintRect ) ) { - if ( bCnt && pFrm->IsCompletePaint() && + if ( bCnt && pFrame->IsCompletePaint() && !rRect.IsInside( aPaintRect ) && Application::AnyInput( VclInputFlags::KEYBOARD ) ) { //fix(8104): It may happen, that the processing wasn't complete @@ -3650,50 +3650,50 @@ void SwLayoutFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, if ( aPaintRect.Height() > 0 ) gProp.pSGlobalShell->InvalidateWindows(aPaintRect); aPaintRect.Top( rRect.Bottom() + 1 ); - aPaintRect.Bottom( pFrm->Frm().Bottom() ); + aPaintRect.Bottom( pFrame->Frame().Bottom() ); if ( aPaintRect.Height() > 0 ) gProp.pSGlobalShell->InvalidateWindows(aPaintRect); - aPaintRect.Top( pFrm->Frm().Top() ); - aPaintRect.Bottom( pFrm->Frm().Bottom() ); + aPaintRect.Top( pFrame->Frame().Top() ); + aPaintRect.Bottom( pFrame->Frame().Bottom() ); } else { gProp.pSGlobalShell->InvalidateWindows( aPaintRect ); - pFrm = pFrm->GetNext(); - if ( pFrm && (bCnt = pFrm->IsContentFrm()) ) - pFrm->Calc(&rRenderContext); + pFrame = pFrame->GetNext(); + if ( pFrame && (bCnt = pFrame->IsContentFrame()) ) + pFrame->Calc(&rRenderContext); continue; } } - pFrm->ResetCompletePaint(); + pFrame->ResetCompletePaint(); aPaintRect._Intersection( rRect ); - pFrm->Paint( rRenderContext, aPaintRect ); + pFrame->Paint( rRenderContext, aPaintRect ); - if ( Lower() && Lower()->IsColumnFrm() ) + if ( Lower() && Lower()->IsColumnFrame() ) { //Paint the column separator line if needed. The page is //responsible for the page frame - not the upper. - const SwFrameFormat *pFormat = GetUpper() && GetUpper()->IsPageFrm() + const SwFrameFormat *pFormat = GetUpper() && GetUpper()->IsPageFrame() ? GetUpper()->GetFormat() : GetFormat(); const SwFormatCol &rCol = pFormat->GetCol(); if ( rCol.GetLineAdj() != COLADJ_NONE ) { if ( !pPage ) - pPage = pFrm->FindPageFrm(); + pPage = pFrame->FindPageFrame(); PaintColLines( aPaintRect, rCol, pPage ); } } } - if ( !bCnt && pFrm->GetNext() && pFrm->GetNext()->IsFootnoteContFrm() ) - ::lcl_EmergencyFormatFootnoteCont( const_cast<SwFootnoteContFrm*>(static_cast<const SwFootnoteContFrm*>(pFrm->GetNext())) ); + if ( !bCnt && pFrame->GetNext() && pFrame->GetNext()->IsFootnoteContFrame() ) + ::lcl_EmergencyFormatFootnoteCont( const_cast<SwFootnoteContFrame*>(static_cast<const SwFootnoteContFrame*>(pFrame->GetNext())) ); - pFrm = pFrm->GetNext(); + pFrame = pFrame->GetNext(); - if ( pFrm && (bCnt = pFrm->IsContentFrm()) ) - pFrm->Calc(&rRenderContext); + if ( pFrame && (bCnt = pFrame->IsContentFrame()) ) + pFrame->Calc(&rRenderContext); } } @@ -3752,26 +3752,26 @@ static drawinglayer::primitive2d::Primitive2DSequence lcl_CreateDashedIndicatorP return aSeq; } -void SwPageFrm::PaintBreak( ) const +void SwPageFrame::PaintBreak( ) const { if ( gProp.pSGlobalShell->GetOut()->GetOutDevType() != OUTDEV_PRINTER && !gProp.pSGlobalShell->GetViewOptions()->IsPDFExport() && !gProp.pSGlobalShell->GetViewOptions()->IsReadonly() && !gProp.pSGlobalShell->IsPreview() ) { - const SwFrm* pBodyFrm = Lower(); - while ( pBodyFrm && !pBodyFrm->IsBodyFrm() ) - pBodyFrm = pBodyFrm->GetNext(); + const SwFrame* pBodyFrame = Lower(); + while ( pBodyFrame && !pBodyFrame->IsBodyFrame() ) + pBodyFrame = pBodyFrame->GetNext(); - if ( pBodyFrm ) + if ( pBodyFrame ) { - const SwLayoutFrm* pLayBody = static_cast< const SwLayoutFrm* >( pBodyFrm ); - const SwFlowFrm *pFlowFrm = pLayBody->ContainsContent(); + const SwLayoutFrame* pLayBody = static_cast< const SwLayoutFrame* >( pBodyFrame ); + const SwFlowFrame *pFlowFrame = pLayBody->ContainsContent(); // Test if the first node is a table - const SwFrm* pFirstFrm = pLayBody->Lower(); - if ( pFirstFrm && pFirstFrm->IsTabFrm() ) - pFlowFrm = static_cast< const SwTabFrm* >( pFirstFrm ); + const SwFrame* pFirstFrame = pLayBody->Lower(); + if ( pFirstFrame && pFirstFrame->IsTabFrame() ) + pFlowFrame = static_cast< const SwTabFrame* >( pFirstFrame ); SwWrtShell* pWrtSh = dynamic_cast< SwWrtShell* >( gProp.pSGlobalShell ); if ( pWrtSh ) @@ -3779,30 +3779,30 @@ void SwPageFrm::PaintBreak( ) const SwEditWin& rEditWin = pWrtSh->GetView().GetEditWin(); SwFrameControlsManager& rMngr = rEditWin.GetFrameControlsManager(); - if ( pFlowFrm && pFlowFrm->IsPageBreak( true ) ) + if ( pFlowFrame && pFlowFrame->IsPageBreak( true ) ) rMngr.SetPageBreakControl( this ); else rMngr.RemoveControlsByType( PageBreak, this ); } } - SwLayoutFrm::PaintBreak( ); + SwLayoutFrame::PaintBreak( ); } } -void SwColumnFrm::PaintBreak( ) const +void SwColumnFrame::PaintBreak( ) const { if ( gProp.pSGlobalShell->GetOut()->GetOutDevType() != OUTDEV_PRINTER && !gProp.pSGlobalShell->GetViewOptions()->IsPDFExport() && !gProp.pSGlobalShell->GetViewOptions()->IsReadonly() && !gProp.pSGlobalShell->IsPreview() ) { - const SwFrm* pBodyFrm = Lower(); - while ( pBodyFrm && !pBodyFrm->IsBodyFrm() ) - pBodyFrm = pBodyFrm->GetNext(); + const SwFrame* pBodyFrame = Lower(); + while ( pBodyFrame && !pBodyFrame->IsBodyFrame() ) + pBodyFrame = pBodyFrame->GetNext(); - if ( pBodyFrm ) + if ( pBodyFrame ) { - const SwContentFrm *pCnt = static_cast< const SwLayoutFrm* >( pBodyFrm )->ContainsContent(); + const SwContentFrame *pCnt = static_cast< const SwLayoutFrame* >( pBodyFrame )->ContainsContent(); if ( pCnt && pCnt->IsColBreak( true ) ) { // Paint the break only if: @@ -3814,7 +3814,7 @@ void SwColumnFrm::PaintBreak( ) const !gProp.pSGlobalShell->IsShowHeaderFooterSeparator( Footer ) ) { SwRect aRect( pCnt->Prt() ); - aRect.Pos() += pCnt->Frm().Pos(); + aRect.Pos() += pCnt->Frame().Pos(); // Draw the line basegfx::B2DPoint aStart( double( aRect.Left() ), aRect.Top() ); @@ -3875,28 +3875,28 @@ void SwColumnFrm::PaintBreak( ) const } } -void SwLayoutFrm::PaintBreak( ) const +void SwLayoutFrame::PaintBreak( ) const { - const SwFrm* pFrm = Lower(); - while ( pFrm ) + const SwFrame* pFrame = Lower(); + while ( pFrame ) { - if ( pFrm->IsLayoutFrm() ) - static_cast< const SwLayoutFrm*>( pFrm )->PaintBreak( ); - pFrm = pFrm->GetNext(); + if ( pFrame->IsLayoutFrame() ) + static_cast< const SwLayoutFrame*>( pFrame )->PaintBreak( ); + pFrame = pFrame->GetNext(); } } -void SwPageFrm::PaintDecorators( ) const +void SwPageFrame::PaintDecorators( ) const { SwWrtShell* pWrtSh = dynamic_cast< SwWrtShell* >( gProp.pSGlobalShell ); if ( pWrtSh ) { SwEditWin& rEditWin = pWrtSh->GetView().GetEditWin(); - const SwLayoutFrm* pBody = FindBodyCont(); + const SwLayoutFrame* pBody = FindBodyCont(); if ( pBody ) { - SwRect aBodyRect( pBody->Frm() ); + SwRect aBodyRect( pBody->Frame() ); if ( gProp.pSGlobalShell->GetOut()->GetOutDevType() != OUTDEV_PRINTER && !gProp.pSGlobalShell->GetViewOptions()->IsPDFExport() && @@ -3915,9 +3915,9 @@ void SwPageFrm::PaintDecorators( ) const // Header if ( gProp.pSGlobalShell->IsShowHeaderFooterSeparator( Header ) ) { - const SwFrm* pHeaderFrm = Lower(); - if ( !pHeaderFrm->IsHeaderFrm() ) - pHeaderFrm = nullptr; + const SwFrame* pHeaderFrame = Lower(); + if ( !pHeaderFrame->IsHeaderFrame() ) + pHeaderFrame = nullptr; long nHeaderYOff = aBodyRect.Top(); Point nOutputOff = rEditWin.LogicToPixel( Point( nXOff, nHeaderYOff ) ); @@ -3927,12 +3927,12 @@ void SwPageFrm::PaintDecorators( ) const // Footer if ( gProp.pSGlobalShell->IsShowHeaderFooterSeparator( Footer ) ) { - const SwFrm* pFootnoteContFrm = Lower(); - while ( pFootnoteContFrm ) + const SwFrame* pFootnoteContFrame = Lower(); + while ( pFootnoteContFrame ) { - if ( pFootnoteContFrm->IsFootnoteContFrm() ) - aBodyRect.AddBottom( pFootnoteContFrm->Frm().Bottom() - aBodyRect.Bottom() ); - pFootnoteContFrm = pFootnoteContFrm->GetNext(); + if ( pFootnoteContFrame->IsFootnoteContFrame() ) + aBodyRect.AddBottom( pFootnoteContFrame->Frame().Bottom() - aBodyRect.Bottom() ); + pFootnoteContFrame = pFootnoteContFrame->GetNext(); } long nFooterYOff = aBodyRect.Bottom(); @@ -3957,7 +3957,7 @@ void SwPageFrm::PaintDecorators( ) const * * @return true, if background is transparent drawn */ -bool SwFlyFrm::IsBackgroundTransparent() const +bool SwFlyFrame::IsBackgroundTransparent() const { bool bBackgroundTransparent = GetFormat()->IsBackgroundTransparent(); if ( !bBackgroundTransparent && @@ -4006,7 +4006,7 @@ bool SwFlyFrm::IsBackgroundTransparent() const return bBackgroundTransparent; }; -bool SwFlyFrm::IsPaint( SdrObject *pObj, const SwViewShell *pSh ) +bool SwFlyFrame::IsPaint( SdrObject *pObj, const SwViewShell *pSh ) { SdrObjUserCall *pUserCall; @@ -4022,14 +4022,14 @@ bool SwFlyFrm::IsPaint( SdrObject *pObj, const SwViewShell *pSh ) if ( bPaint ) { //The paint may be prevented by the superior Flys. - SwFrm *pAnch = nullptr; + SwFrame *pAnch = nullptr; if ( dynamic_cast< const SwFlyDrawObj *>( pObj ) != nullptr ) // i#117962# { bPaint = false; } if ( dynamic_cast< const SwVirtFlyDrawObj *>( pObj ) != nullptr ) { - SwFlyFrm *pFly = static_cast<SwVirtFlyDrawObj*>(pObj)->GetFlyFrm(); + SwFlyFrame *pFly = static_cast<SwVirtFlyDrawObj*>(pObj)->GetFlyFrame(); if ( gProp.pSFlyOnlyDraw && gProp.pSFlyOnlyDraw == pFly ) return true; @@ -4038,10 +4038,10 @@ bool SwFlyFrm::IsPaint( SdrObject *pObj, const SwViewShell *pSh ) //painted. //HACK: exception: printing of frames in tables, those can overlap //a page once in a while when dealing with oversized tables (HTML). - SwPageFrm *pPage = pFly->FindPageFrm(); - if ( pPage && pPage->Frm().IsOver( pFly->Frm() ) ) + SwPageFrame *pPage = pFly->FindPageFrame(); + if ( pPage && pPage->Frame().IsOver( pFly->Frame() ) ) { - pAnch = pFly->AnchorFrm(); + pAnch = pFly->AnchorFrame(); } } @@ -4050,7 +4050,7 @@ bool SwFlyFrm::IsPaint( SdrObject *pObj, const SwViewShell *pSh ) // OD 13.10.2003 #i19919# - consider 'virtual' drawing objects // OD 2004-03-29 #i26791# SwDrawContact* pDrawContact = dynamic_cast<SwDrawContact*>(pUserCall); - pAnch = pDrawContact ? pDrawContact->GetAnchorFrm(pObj) : nullptr; + pAnch = pDrawContact ? pDrawContact->GetAnchorFrame(pObj) : nullptr; if ( pAnch ) { if ( !pAnch->GetValidPosFlag() ) @@ -4062,8 +4062,8 @@ bool SwFlyFrm::IsPaint( SdrObject *pObj, const SwViewShell *pSh ) //The objects should get printed if the TableHack is active //right now. Afterwards they must not be printed if the //page over which they float position wise gets printed. - const SwPageFrm *pPage = pAnch->FindPageFrm(); - if ( !pPage->Frm().IsOver( pObj->GetCurrentBoundRect() ) ) + const SwPageFrame *pPage = pAnch->FindPageFrame(); + if ( !pPage->Frame().IsOver( pObj->GetCurrentBoundRect() ) ) pAnch = nullptr; } } @@ -4072,14 +4072,14 @@ bool SwFlyFrm::IsPaint( SdrObject *pObj, const SwViewShell *pSh ) // OD 02.07.2003 #108784# - debug assert if ( dynamic_cast< const SdrObjGroup *>( pObj ) == nullptr ) { - OSL_FAIL( "<SwFlyFrm::IsPaint(..)> - paint of drawing object without anchor frame!?" ); + OSL_FAIL( "<SwFlyFrame::IsPaint(..)> - paint of drawing object without anchor frame!?" ); } } } if ( pAnch ) { if ( pAnch->IsInFly() ) - bPaint = SwFlyFrm::IsPaint( pAnch->FindFlyFrm()->GetVirtDrawObj(), + bPaint = SwFlyFrame::IsPaint( pAnch->FindFlyFrame()->GetVirtDrawObj(), pSh ); else if ( gProp.pSFlyOnlyDraw ) bPaint = false; @@ -4090,10 +4090,10 @@ bool SwFlyFrm::IsPaint( SdrObject *pObj, const SwViewShell *pSh ) return bPaint; } -void SwCellFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, SwPrintData const*const) const +void SwCellFrame::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, SwPrintData const*const) const { if ( GetLayoutRowSpan() >= 1 ) - SwLayoutFrm::Paint( rRenderContext, rRect ); + SwLayoutFrame::Paint( rRenderContext, rRect ); } struct BorderLinesGuard @@ -4111,17 +4111,17 @@ private: BorderLines *const m_pBorderLines; }; -void SwFlyFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, SwPrintData const*const) const +void SwFlyFrame::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, SwPrintData const*const) const { //optimize thumbnail generation and store procedure to improve odt saving performance, #i120030# - SwViewShell *pShell = getRootFrm()->GetCurrShell(); + SwViewShell *pShell = getRootFrame()->GetCurrShell(); if (pShell && pShell->GetDoc() && pShell->GetDoc()->GetDocShell()) { bool bInGenerateThumbnail = pShell->GetDoc()->GetDocShell()->IsInGenerateAndStoreThumbnail(); if (bInGenerateThumbnail) { SwRect aVisRect = pShell->VisArea(); - if (!aVisRect.IsOver(Frm())) + if (!aVisRect.IsOver(Frame())) return; } } @@ -4133,14 +4133,14 @@ void SwFlyFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, Sw BorderLinesGuard blg; // this should not paint borders added from PaintBaBo SwRect aRect( rRect ); - aRect._Intersection( Frm() ); + aRect._Intersection( Frame() ); rRenderContext.Push( PushFlags::CLIPREGION ); rRenderContext.SetClipRegion(); - const SwPageFrm* pPage = FindPageFrm(); + const SwPageFrame* pPage = FindPageFrame(); - const SwNoTextFrm *pNoText = Lower() && Lower()->IsNoTextFrm() - ? static_cast<const SwNoTextFrm*>(Lower()) : nullptr; + const SwNoTextFrame *pNoText = Lower() && Lower()->IsNoTextFrame() + ? static_cast<const SwNoTextFrame*>(Lower()) : nullptr; bool bIsChart = false; //#i102950# don't paint additional borders for charts //check whether we have a chart @@ -4202,7 +4202,7 @@ void SwFlyFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, Sw } // paint of margin needed. const bool bPaintMarginOnly( !bPaintCompleteBack && - Prt().SSize() != Frm().SSize() ); + Prt().SSize() != Frame().SSize() ); // #i47804# - paint background of parent fly frame // for transparent graphics in layer Hell, if parent fly frame isn't @@ -4213,20 +4213,20 @@ void SwFlyFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, Sw if (bIsGraphicTransparent && GetFormat()->GetDoc()->getIDocumentSettingAccess().get(DocumentSettingId::SUBTRACT_FLYS) && GetVirtDrawObj()->GetLayer() == rIDDMA.GetHellId() && - GetAnchorFrm()->FindFlyFrm() ) + GetAnchorFrame()->FindFlyFrame() ) { - const SwFlyFrm* pParentFlyFrm = GetAnchorFrm()->FindFlyFrm(); - if ( pParentFlyFrm->GetDrawObj()->GetLayer() != + const SwFlyFrame* pParentFlyFrame = GetAnchorFrame()->FindFlyFrame(); + if ( pParentFlyFrame->GetDrawObj()->GetLayer() != rIDDMA.GetHellId() ) { - SwFlyFrm* pOldRet = gProp.pSRetoucheFly2; - gProp.pSRetoucheFly2 = const_cast<SwFlyFrm*>(this); + SwFlyFrame* pOldRet = gProp.pSRetoucheFly2; + gProp.pSRetoucheFly2 = const_cast<SwFlyFrame*>(this); - SwBorderAttrAccess aAccess( SwFrm::GetCache(), pParentFlyFrm ); + SwBorderAttrAccess aAccess( SwFrame::GetCache(), pParentFlyFrame ); const SwBorderAttrs &rAttrs = *aAccess.Get(); SwRect aPaintRect( aRect ); - aPaintRect._Intersection( pParentFlyFrm->Frm() ); - pParentFlyFrm->PaintBackground( aPaintRect, pPage, rAttrs ); + aPaintRect._Intersection( pParentFlyFrame->Frame() ); + pParentFlyFrame->PaintBackground( aPaintRect, pPage, rAttrs ); gProp.pSRetoucheFly2 = pOldRet; } @@ -4242,9 +4242,9 @@ void SwFlyFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, Sw rRenderContext.Push( PushFlags::FILLCOLOR|PushFlags::LINECOLOR ); rRenderContext.SetLineColor(); - pPage = FindPageFrm(); + pPage = FindPageFrame(); - SwBorderAttrAccess aAccess( SwFrm::GetCache(), static_cast<SwFrm const *>(this) ); + SwBorderAttrAccess aAccess( SwFrame::GetCache(), static_cast<SwFrame const *>(this) ); const SwBorderAttrs &rAttrs = *aAccess.Get(); // paint background @@ -4258,7 +4258,7 @@ void SwFlyFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, Sw { //What we actually want to paint is the small stripe between //PrtArea and outer border. - SwRect aTmp( Prt() ); aTmp += Frm().Pos(); + SwRect aTmp( Prt() ); aTmp += Frame().Pos(); aRegion -= aTmp; } if ( bContour ) @@ -4266,10 +4266,10 @@ void SwFlyFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, Sw rRenderContext.Push(); // #i80822# // apply clip region under the same conditions, which are - // used in <SwNoTextFrm::Paint(..)> to set the clip region + // used in <SwNoTextFrame::Paint(..)> to set the clip region // for painting the graphic/OLE. Thus, the clip region is // also applied for the PDF export. - SwViewShell *pSh = getRootFrm()->GetCurrShell(); + SwViewShell *pSh = getRootFrame()->GetCurrShell(); if ( !rRenderContext.GetConnectMetaFile() || !pSh || !pSh->GetWin() ) { rRenderContext.SetClipRegion(vcl::Region(aPoly)); @@ -4349,7 +4349,7 @@ void SwFlyFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, Sw } } - SwLayoutFrm::Paint( rRenderContext, aRect ); + SwLayoutFrame::Paint( rRenderContext, aRect ); Validate(); @@ -4366,7 +4366,7 @@ void SwFlyFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, Sw gProp.pSProgress->Reschedule(); } -void SwTabFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, SwPrintData const*const) const +void SwTabFrame::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, SwPrintData const*const) const { const SwViewOption* pViewOption = gProp.pSGlobalShell->GetViewOptions(); if (pViewOption->IsTable()) @@ -4374,7 +4374,7 @@ void SwTabFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, Sw // #i29550# if ( IsCollapsingBorders() ) { - SwBorderAttrAccess aAccess( SwFrm::GetCache(), static_cast<SwFrm const *>(this) ); + SwBorderAttrAccess aAccess( SwFrame::GetCache(), static_cast<SwFrame const *>(this) ); const SwBorderAttrs &rAttrs = *aAccess.Get(); // paint shadow @@ -4385,23 +4385,23 @@ void SwTabFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, Sw PaintShadow( rRect, aRect, rAttrs ); } - SwTabFrmPainter aHelper(*this); + SwTabFramePainter aHelper(*this); aHelper.PaintLines(rRenderContext, rRect); } - SwLayoutFrm::Paint( rRenderContext, rRect ); + SwLayoutFrame::Paint( rRenderContext, rRect ); } // OD 10.01.2003 #i6467# - no light grey rectangle for page preview else if ( gProp.pSGlobalShell->GetWin() && !gProp.pSGlobalShell->IsPreview() ) { // OD 10.01.2003 #i6467# - intersect output rectangle with table frame SwRect aTabRect( Prt() ); - aTabRect.Pos() += Frm().Pos(); + aTabRect.Pos() += Frame().Pos(); SwRect aTabOutRect( rRect ); aTabOutRect.Intersection( aTabRect ); SwViewOption::DrawRect( &rRenderContext, aTabOutRect, COL_LIGHTGRAY ); } - const_cast<SwTabFrm*>(this)->ResetComplete(); + const_cast<SwTabFrame*>(this)->ResetComplete(); } /** @@ -4627,12 +4627,12 @@ static void lcl_PaintShadow( const SwRect& rRect, SwRect& rOutRect, * * @note: draw full shadow rectangle for frames with transparent drawn backgrounds (OD 23.08.2002 #99657#) */ -void SwFrm::PaintShadow( const SwRect& rRect, SwRect& rOutRect, +void SwFrame::PaintShadow( const SwRect& rRect, SwRect& rOutRect, const SwBorderAttrs &rAttrs ) const { SvxShadowItem rShadow = rAttrs.GetShadow(); - const bool bCnt = IsContentFrm(); + const bool bCnt = IsContentFrame(); const bool bTop = !bCnt || rAttrs.GetTopLine ( *(this) ); const bool bBottom = !bCnt || rAttrs.GetBottomLine( *(this) ); @@ -4652,11 +4652,11 @@ void SwFrm::PaintShadow( const SwRect& rRect, SwRect& rOutRect, // be drawn or only two shadow rectangles beside the frame. // draw full shadow rectangle, if frame background is drawn transparent. // Status Quo: - // SwLayoutFrm can have transparent drawn backgrounds. Thus, + // SwLayoutFrame can have transparent drawn backgrounds. Thus, // "asked" their frame format. const bool bDrawFullShadowRectangle = - ( IsLayoutFrm() && - (static_cast<const SwLayoutFrm*>(this))->GetFormat()->IsBackgroundTransparent() + ( IsLayoutFrame() && + (static_cast<const SwLayoutFrame*>(this))->GetFormat()->IsBackgroundTransparent() ); SWRECTFN( this ); @@ -4665,9 +4665,9 @@ void SwFrm::PaintShadow( const SwRect& rRect, SwRect& rOutRect, lcl_PaintShadow(rRect, rOutRect, rShadow, bDrawFullShadowRectangle, bTop, bBottom, true, true, gProp); } -void SwFrm::PaintBorderLine( const SwRect& rRect, +void SwFrame::PaintBorderLine( const SwRect& rRect, const SwRect& rOutRect, - const SwPageFrm * pPage, + const SwPageFrame * pPage, const Color *pColor, const SvxBorderStyle nStyle ) const { @@ -4677,8 +4677,8 @@ void SwFrm::PaintBorderLine( const SwRect& rRect, SwRect aOut( rOutRect ); aOut._Intersection( rRect ); - const SwTabFrm *pTab = IsCellFrm() ? FindTabFrm() : nullptr; - sal_uInt8 nSubCol = ( IsCellFrm() || IsRowFrm() ) ? SUBCOL_TAB : + const SwTabFrame *pTab = IsCellFrame() ? FindTabFrame() : nullptr; + sal_uInt8 nSubCol = ( IsCellFrame() || IsRowFrame() ) ? SUBCOL_TAB : ( IsInSct() ? SUBCOL_SECT : ( IsInFly() ? SUBCOL_FLY : SUBCOL_PAGE ) ); if( pColor && gProp.pSGlobalShell->GetWin() && @@ -4712,14 +4712,14 @@ void SwFrm::PaintBorderLine( const SwRect& rRect, static void lcl_SubTopBottom( SwRect& _iorRect, const SvxBoxItem& _rBox, const SwBorderAttrs& _rAttrs, - const SwFrm& _rFrm, + const SwFrame& _rFrame, const SwRectFn& _rRectFn, const bool _bPrtOutputDev, SwPaintProperties& properties ) { - const bool bCnt = _rFrm.IsContentFrm(); + const bool bCnt = _rFrame.IsContentFrame(); if ( _rBox.GetTop() && _rBox.GetTop()->GetInWidth() && - ( !bCnt || _rAttrs.GetTopLine( _rFrm ) ) + ( !bCnt || _rAttrs.GetTopLine( _rFrame ) ) ) { // subtract distance between outer and inner line. @@ -4745,7 +4745,7 @@ static void lcl_SubTopBottom( SwRect& _iorRect, // is a hair line if ( bIsInnerTopLineHairline ) { - if ( _rFrm.IsVertical() ) + if ( _rFrame.IsVertical() ) { // right of border rectangle has to be checked and adjusted Point aCompPt( _iorRect.Right(), 0 ); @@ -4769,7 +4769,7 @@ static void lcl_SubTopBottom( SwRect& _iorRect, } if ( _rBox.GetBottom() && _rBox.GetBottom()->GetInWidth() && - ( !bCnt || _rAttrs.GetBottomLine( _rFrm ) ) + ( !bCnt || _rAttrs.GetBottomLine( _rFrame ) ) ) { // subtract distance between outer and inner line. @@ -4795,7 +4795,7 @@ static void lcl_SubTopBottom( SwRect& _iorRect, // bottom line is a hair line. if ( bIsInnerBottomLineHairline ) { - if ( _rFrm.IsVertical() ) + if ( _rFrame.IsVertical() ) { // left of border rectangle has to be checked and adjusted Point aCompPt( _iorRect.Left(), 0 ); @@ -4928,8 +4928,8 @@ static void lcl_MakeBorderLine(SwRect const& rRect, * into new method <lcl_PaintLeftRightLine(..)> */ static void lcl_PaintLeftRightLine( const bool _bLeft, - const SwFrm& _rFrm, - const SwPageFrm& /*_rPage*/, + const SwFrame& _rFrame, + const SwPageFrame& /*_rPage*/, const SwRect& _rOutRect, const SwRect& /*_rRect*/, const SwBorderAttrs& _rAttrs, @@ -4937,7 +4937,7 @@ static void lcl_PaintLeftRightLine( const bool _bLeft, SwPaintProperties& properties) { const SvxBoxItem& rBox = _rAttrs.GetBox(); - const bool bR2L = _rFrm.IsCellFrm() && _rFrm.IsRightToLeft(); + const bool bR2L = _rFrame.IsCellFrame() && _rFrame.IsRightToLeft(); const SvxBorderLine* pLeftRightBorder = nullptr; const SvxBorderLine* pTopBorder = rBox.GetTop(); const SvxBorderLine* pBottomBorder = rBox.GetBottom(); @@ -4978,13 +4978,13 @@ static void lcl_PaintLeftRightLine( const bool _bLeft, (aRect.*_rRectFn->fnGetWidth)() ); } - if ( _rFrm.IsContentFrm() ) + if ( _rFrame.IsContentFrame() ) { - ::lcl_ExtendLeftAndRight( aRect, _rFrm, _rAttrs, _rRectFn ); + ::lcl_ExtendLeftAndRight( aRect, _rFrame, _rAttrs, _rRectFn ); // No Top / bottom borders for joint borders - if ( _rAttrs.JoinedWithPrev( _rFrm ) ) pTopBorder = nullptr; - if ( _rAttrs.JoinedWithNext( _rFrm ) ) pBottomBorder = nullptr; + if ( _rAttrs.JoinedWithPrev( _rFrame ) ) pTopBorder = nullptr; + if ( _rAttrs.JoinedWithNext( _rFrame ) ) pBottomBorder = nullptr; } if ( !pLeftRightBorder->GetInWidth() ) @@ -4994,7 +4994,7 @@ static void lcl_PaintLeftRightLine( const bool _bLeft, ( OUTDEV_PRINTER == properties.pSGlobalShell->GetOut()->GetOutDevType() ); // OD 06.05.2003 #107169# - add 6th parameter - ::lcl_SubTopBottom( aRect, rBox, _rAttrs, _rFrm, _rRectFn, bPrtOutputDev, properties); + ::lcl_SubTopBottom( aRect, rBox, _rAttrs, _rFrame, _rRectFn, bPrtOutputDev, properties); } if ( lcl_GetLineWidth( pLeftRightBorder ) > 0 ) @@ -5010,8 +5010,8 @@ static void lcl_PaintLeftRightLine( const bool _bLeft, * into <lcl_PaintTopLine> */ static void lcl_PaintTopBottomLine( const bool _bTop, - const SwFrm& , - const SwPageFrm& /*_rPage*/, + const SwFrame& , + const SwPageFrame& /*_rPage*/, const SwRect& _rOutRect, const SwRect& /*_rRect*/, const SwBorderAttrs& _rAttrs, @@ -5208,20 +5208,20 @@ void PaintCharacterBorder( } /// #i15844# -static const SwFrm* lcl_HasNextCell( const SwFrm& rFrm ) +static const SwFrame* lcl_HasNextCell( const SwFrame& rFrame ) { - OSL_ENSURE( rFrm.IsCellFrm(), - "lcl_HasNextCell( const SwFrm& rFrm ) should be called with SwCellFrm" ); + OSL_ENSURE( rFrame.IsCellFrame(), + "lcl_HasNextCell( const SwFrame& rFrame ) should be called with SwCellFrame" ); - const SwFrm* pTmpFrm = &rFrm; + const SwFrame* pTmpFrame = &rFrame; do { - if ( pTmpFrm->GetNext() ) - return pTmpFrm->GetNext(); + if ( pTmpFrame->GetNext() ) + return pTmpFrame->GetNext(); - pTmpFrm = pTmpFrm->GetUpper()->GetUpper(); + pTmpFrame = pTmpFrame->GetUpper()->GetUpper(); } - while ( pTmpFrm->IsCellFrm() ); + while ( pTmpFrame->IsCellFrame() ); return nullptr; } @@ -5232,13 +5232,13 @@ static const SwFrm* lcl_HasNextCell( const SwFrm& rFrm ) * * OD 21.02.2003 #b4779636#, #107692# * - * @param _pCellFrm + * @param _pCellFrame * input parameter - constant pointer to cell frame for which the cell frame * for the border attributes has to be determined. * * @param _rCellBorderAttrs * input parameter - constant reference to the border attributes of cell frame - * <_pCellFrm>. + * <_pCellFrame>. * * @param _bTop * input parameter - boolean, that controls, if cell frame for top border or @@ -5247,83 +5247,83 @@ static const SwFrm* lcl_HasNextCell( const SwFrm& rFrm ) * @return constant pointer to cell frame, for which the border attributes has * to be used */ -static const SwFrm* lcl_GetCellFrmForBorderAttrs( const SwFrm* _pCellFrm, +static const SwFrame* lcl_GetCellFrameForBorderAttrs( const SwFrame* _pCellFrame, const SwBorderAttrs& _rCellBorderAttrs, const bool _bTop ) { - OSL_ENSURE( _pCellFrm, "No cell frame available, dying soon" ); + OSL_ENSURE( _pCellFrame, "No cell frame available, dying soon" ); // determine, if cell frame is at bottom/top border of a table frame and // the table frame has/is a follow. - const SwFrm* pTmpFrm = _pCellFrm; + const SwFrame* pTmpFrame = _pCellFrame; bool bCellAtBorder = true; - bool bCellAtLeftBorder = !_pCellFrm->GetPrev(); - bool bCellAtRightBorder = !_pCellFrm->GetNext(); - while( !pTmpFrm->IsRowFrm() || !pTmpFrm->GetUpper()->IsTabFrm() ) + bool bCellAtLeftBorder = !_pCellFrame->GetPrev(); + bool bCellAtRightBorder = !_pCellFrame->GetNext(); + while( !pTmpFrame->IsRowFrame() || !pTmpFrame->GetUpper()->IsTabFrame() ) { - pTmpFrm = pTmpFrm->GetUpper(); - if ( pTmpFrm->IsRowFrm() && - (_bTop ? pTmpFrm->GetPrev() : pTmpFrm->GetNext()) + pTmpFrame = pTmpFrame->GetUpper(); + if ( pTmpFrame->IsRowFrame() && + (_bTop ? pTmpFrame->GetPrev() : pTmpFrame->GetNext()) ) { bCellAtBorder = false; } - if ( pTmpFrm->IsCellFrm() ) + if ( pTmpFrame->IsCellFrame() ) { - if ( pTmpFrm->GetPrev() ) + if ( pTmpFrame->GetPrev() ) { bCellAtLeftBorder = false; } - if ( pTmpFrm->GetNext() ) + if ( pTmpFrame->GetNext() ) { bCellAtRightBorder = false; } } } - OSL_ENSURE( pTmpFrm && pTmpFrm->IsRowFrm(), "No RowFrm available" ); + OSL_ENSURE( pTmpFrame && pTmpFrame->IsRowFrame(), "No RowFrame available" ); - const SwLayoutFrm* pParentRowFrm = static_cast<const SwLayoutFrm*>(pTmpFrm); - const SwTabFrm* pParentTabFrm = - static_cast<const SwTabFrm*>(pParentRowFrm->GetUpper()); + const SwLayoutFrame* pParentRowFrame = static_cast<const SwLayoutFrame*>(pTmpFrame); + const SwTabFrame* pParentTabFrame = + static_cast<const SwTabFrame*>(pParentRowFrame->GetUpper()); const bool bCellNeedsAttribute = bCellAtBorder && ( _bTop ? // bCellInFirstRowWithMaster - ( !pParentRowFrm->GetPrev() && - pParentTabFrm->IsFollow() && - 0 == pParentTabFrm->GetTable()->GetRowsToRepeat() ) : + ( !pParentRowFrame->GetPrev() && + pParentTabFrame->IsFollow() && + 0 == pParentTabFrame->GetTable()->GetRowsToRepeat() ) : // bCellInLastRowWithFollow - ( !pParentRowFrm->GetNext() && - pParentTabFrm->GetFollow() ) + ( !pParentRowFrame->GetNext() && + pParentTabFrame->GetFollow() ) ); - const SwFrm* pRet = _pCellFrm; + const SwFrame* pRet = _pCellFrame; if ( bCellNeedsAttribute ) { // determine, if cell frame has no borders inside the table. - const SwFrm* pNextCell = nullptr; + const SwFrame* pNextCell = nullptr; bool bNoBordersInside = false; - if ( bCellAtLeftBorder && ( nullptr != ( pNextCell = lcl_HasNextCell( *_pCellFrm ) ) ) ) + if ( bCellAtLeftBorder && ( nullptr != ( pNextCell = lcl_HasNextCell( *_pCellFrame ) ) ) ) { - SwBorderAttrAccess aAccess( SwFrm::GetCache(), pNextCell ); + SwBorderAttrAccess aAccess( SwFrame::GetCache(), pNextCell ); const SwBorderAttrs &rBorderAttrs = *aAccess.Get(); const SvxBoxItem& rBorderBox = rBorderAttrs.GetBox(); bCellAtRightBorder = !lcl_HasNextCell( *pNextCell ); bNoBordersInside = - ( !rBorderBox.GetTop() || !pParentRowFrm->GetPrev() ) && + ( !rBorderBox.GetTop() || !pParentRowFrame->GetPrev() ) && !rBorderBox.GetLeft() && ( !rBorderBox.GetRight() || bCellAtRightBorder ) && - ( !rBorderBox.GetBottom() || !pParentRowFrm->GetNext() ); + ( !rBorderBox.GetBottom() || !pParentRowFrame->GetNext() ); } else { const SvxBoxItem& rBorderBox = _rCellBorderAttrs.GetBox(); bNoBordersInside = - ( !rBorderBox.GetTop() || !pParentRowFrm->GetPrev() ) && + ( !rBorderBox.GetTop() || !pParentRowFrame->GetPrev() ) && ( !rBorderBox.GetLeft() || bCellAtLeftBorder ) && ( !rBorderBox.GetRight() || bCellAtRightBorder ) && - ( !rBorderBox.GetBottom() || !pParentRowFrm->GetNext() ); + ( !rBorderBox.GetBottom() || !pParentRowFrame->GetNext() ); } if ( bNoBordersInside ) @@ -5335,18 +5335,18 @@ static const SwFrm* lcl_GetCellFrmForBorderAttrs( const SwFrm* _pCellFrm // it is at the top border of a table frame, which is a follow. // Thus, use border attributes of cell frame in first row of complete table. // First, determine first table frame of complete table. - SwTabFrm* pMasterTabFrm = pParentTabFrm->FindMaster( true ); + SwTabFrame* pMasterTabFrame = pParentTabFrame->FindMaster( true ); // determine first row of complete table. - const SwFrm* pFirstRow = pMasterTabFrm->GetLower(); + const SwFrame* pFirstRow = pMasterTabFrame->GetLower(); // return first cell in first row - SwFrm* pLowerCell = const_cast<SwFrm*>(pFirstRow->GetLower()); - while ( !pLowerCell->IsCellFrm() || - ( pLowerCell->GetLower() && pLowerCell->GetLower()->IsRowFrm() ) + SwFrame* pLowerCell = const_cast<SwFrame*>(pFirstRow->GetLower()); + while ( !pLowerCell->IsCellFrame() || + ( pLowerCell->GetLower() && pLowerCell->GetLower()->IsRowFrame() ) ) { pLowerCell = pLowerCell->GetLower(); } - OSL_ENSURE( pLowerCell && pLowerCell->IsCellFrm(), "No CellFrm available" ); + OSL_ENSURE( pLowerCell && pLowerCell->IsCellFrame(), "No CellFrame available" ); pRet = pLowerCell; } else if ( !_bTop && !_rCellBorderAttrs.GetBox().GetBottom() ) @@ -5356,20 +5356,20 @@ static const SwFrm* lcl_GetCellFrmForBorderAttrs( const SwFrm* _pCellFrm // but it is at the bottom border of a table frame, which has a follow. // Thus, use border attributes of cell frame in last row of complete table. // First, determine last table frame of complete table. - SwTabFrm* pLastTabFrm = const_cast<SwTabFrm*>(pParentTabFrm->GetFollow()); - while ( pLastTabFrm->GetFollow() ) + SwTabFrame* pLastTabFrame = const_cast<SwTabFrame*>(pParentTabFrame->GetFollow()); + while ( pLastTabFrame->GetFollow() ) { - pLastTabFrm = pLastTabFrm->GetFollow(); + pLastTabFrame = pLastTabFrame->GetFollow(); } // determine last row of complete table. - SwFrm* pLastRow = pLastTabFrm->GetLastLower(); + SwFrame* pLastRow = pLastTabFrame->GetLastLower(); // return first bottom border cell in last row - SwFrm* pLowerCell = pLastRow->GetLower(); - while ( !pLowerCell->IsCellFrm() || - ( pLowerCell->GetLower() && pLowerCell->GetLower()->IsRowFrm() ) + SwFrame* pLowerCell = pLastRow->GetLower(); + while ( !pLowerCell->IsCellFrame() || + ( pLowerCell->GetLower() && pLowerCell->GetLower()->IsRowFrame() ) ) { - if ( pLowerCell->IsRowFrm() ) + if ( pLowerCell->IsRowFrame() ) { while ( pLowerCell->GetNext() ) { @@ -5378,7 +5378,7 @@ static const SwFrm* lcl_GetCellFrmForBorderAttrs( const SwFrm* _pCellFrm } pLowerCell = pLowerCell->GetLower(); } - OSL_ENSURE( pLowerCell && pLowerCell->IsCellFrm(), "No CellFrm available" ); + OSL_ENSURE( pLowerCell && pLowerCell->IsCellFrame(), "No CellFrame available" ); pRet = pLowerCell; } } @@ -5387,25 +5387,25 @@ static const SwFrm* lcl_GetCellFrmForBorderAttrs( const SwFrm* _pCellFrm return pRet; } -drawinglayer::processor2d::BaseProcessor2D * SwFrm::CreateProcessor2D( ) const +drawinglayer::processor2d::BaseProcessor2D * SwFrame::CreateProcessor2D( ) const { basegfx::B2DRange aViewRange; - SdrPage *pDrawPage = getRootFrm()->GetCurrShell()->Imp()->GetPageView()->GetPage(); + SdrPage *pDrawPage = getRootFrame()->GetCurrShell()->Imp()->GetPageView()->GetPage(); const drawinglayer::geometry::ViewInformation2D aNewViewInfos( basegfx::B2DHomMatrix( ), - getRootFrm()->GetCurrShell()->GetOut()->GetViewTransformation(), + getRootFrame()->GetCurrShell()->GetOut()->GetViewTransformation(), aViewRange, GetXDrawPageForSdrPage( pDrawPage ), 0.0, uno::Sequence< beans::PropertyValue >() ); return drawinglayer::processor2d::createBaseProcessor2DFromOutputDevice( - *getRootFrm()->GetCurrShell()->GetOut(), + *getRootFrame()->GetCurrShell()->GetOut(), aNewViewInfos ); } -void SwFrm::ProcessPrimitives( const drawinglayer::primitive2d::Primitive2DSequence& rSequence ) const +void SwFrame::ProcessPrimitives( const drawinglayer::primitive2d::Primitive2DSequence& rSequence ) const { drawinglayer::processor2d::BaseProcessor2D * pProcessor2D = CreateProcessor2D(); @@ -5417,24 +5417,24 @@ void SwFrm::ProcessPrimitives( const drawinglayer::primitive2d::Primitive2DSeque } /// Paints shadows and borders -void SwFrm::PaintBorder( const SwRect& rRect, const SwPageFrm *pPage, +void SwFrame::PaintBorder( const SwRect& rRect, const SwPageFrame *pPage, const SwBorderAttrs &rAttrs ) const { // There's nothing (Row,Body,Footnote,Root,Column,NoText) need to do here if ((GetType() & (FRM_NOTXT|FRM_ROW|FRM_BODY|FRM_FTN|FRM_COLUMN|FRM_ROOT))) return; - if (IsCellFrm() && !gProp.pSGlobalShell->GetViewOptions()->IsTable()) + if (IsCellFrame() && !gProp.pSGlobalShell->GetViewOptions()->IsTable()) return; // #i29550# - if ( IsTabFrm() || IsCellFrm() || IsRowFrm() ) + if ( IsTabFrame() || IsCellFrame() || IsRowFrame() ) { - const SwTabFrm* pTabFrm = FindTabFrm(); - if ( pTabFrm->IsCollapsingBorders() ) + const SwTabFrame* pTabFrame = FindTabFrame(); + if ( pTabFrame->IsCollapsingBorders() ) return; - if ( pTabFrm->GetTable()->IsNewModel() && ( !IsCellFrm() || IsCoveredCell() ) ) + if ( pTabFrame->GetTable()->IsNewModel() && ( !IsCellFrame() || IsCoveredCell() ) ) return; } @@ -5445,16 +5445,16 @@ void SwFrm::PaintBorder( const SwRect& rRect, const SwPageFrm *pPage, //-hack has to be used. const bool bb4779636HackActive = true; - const SwFrm* pCellFrmForBottomBorderAttrs = nullptr; - const SwFrm* pCellFrmForTopBorderAttrs = nullptr; + const SwFrame* pCellFrameForBottomBorderAttrs = nullptr; + const SwFrame* pCellFrameForTopBorderAttrs = nullptr; bool bFoundCellForTopOrBorderAttrs = false; - if ( bb4779636HackActive && IsCellFrm() ) + if ( bb4779636HackActive && IsCellFrame() ) { - pCellFrmForBottomBorderAttrs = lcl_GetCellFrmForBorderAttrs( this, rAttrs, false ); - if ( pCellFrmForBottomBorderAttrs != this ) + pCellFrameForBottomBorderAttrs = lcl_GetCellFrameForBorderAttrs( this, rAttrs, false ); + if ( pCellFrameForBottomBorderAttrs != this ) bFoundCellForTopOrBorderAttrs = true; - pCellFrmForTopBorderAttrs = lcl_GetCellFrmForBorderAttrs( this, rAttrs, true ); - if ( pCellFrmForTopBorderAttrs != this ) + pCellFrameForTopBorderAttrs = lcl_GetCellFrameForBorderAttrs( this, rAttrs, true ); + if ( pCellFrameForTopBorderAttrs != this ) bFoundCellForTopOrBorderAttrs = true; } @@ -5467,7 +5467,7 @@ void SwFrm::PaintBorder( const SwRect& rRect, const SwPageFrm *pPage, //For the PrtArea the aligned value needs to be used, otherwise it could //happen, that some parts won't be processed. SwRect aRect( Prt() ); - aRect += Frm().Pos(); + aRect += Frame().Pos(); ::SwAlignRect( aRect, gProp.pSGlobalShell, gProp.pSGlobalShell->GetOut() ); // OD 27.09.2002 #103636# - new local boolean variable in order to // suspend border paint under special cases - see below. @@ -5484,8 +5484,8 @@ void SwFrm::PaintBorder( const SwRect& rRect, const SwPageFrm *pPage, // On transparent background, continue processing, but suspend // drawing of border by setting <bDrawOnlyShadowForTransparentFrame> // to true. - if ( IsLayoutFrm() && - static_cast<const SwLayoutFrm*>(this)->GetFormat()->IsBackgroundTransparent() ) + if ( IsLayoutFrame() && + static_cast<const SwLayoutFrame*>(this)->GetFormat()->IsBackgroundTransparent() ) { bDrawOnlyShadowForTransparentFrame = true; } @@ -5496,7 +5496,7 @@ void SwFrm::PaintBorder( const SwRect& rRect, const SwPageFrm *pPage, } if ( !pPage ) - pPage = FindPageFrm(); + pPage = FindPageFrame(); ::lcl_CalcBorderRect( aRect, this, rAttrs, true, gProp ); rAttrs.SetGetCacheLine( true ); @@ -5509,19 +5509,19 @@ void SwFrm::PaintBorder( const SwRect& rRect, const SwPageFrm *pPage, if ( ( bLine || bFoundCellForTopOrBorderAttrs ) && !bDrawOnlyShadowForTransparentFrame ) { - const SwFrm* pDirRefFrm = IsCellFrm() ? FindTabFrm() : this; - SWRECTFN( pDirRefFrm ) + const SwFrame* pDirRefFrame = IsCellFrame() ? FindTabFrame() : this; + SWRECTFN( pDirRefFrame ) ::lcl_PaintLeftRightLine ( true, *(this), *(pPage), aRect, rRect, rAttrs, fnRect, gProp); ::lcl_PaintLeftRightLine ( false, *(this), *(pPage), aRect, rRect, rAttrs, fnRect, gProp); - if ( !IsContentFrm() || rAttrs.GetTopLine( *(this) ) ) + if ( !IsContentFrame() || rAttrs.GetTopLine( *(this) ) ) { // - //-hack // paint is found, paint its top border. - if ( IsCellFrm() && pCellFrmForTopBorderAttrs != this ) + if ( IsCellFrame() && pCellFrameForTopBorderAttrs != this ) { - SwBorderAttrAccess aAccess( SwFrm::GetCache(), - pCellFrmForTopBorderAttrs ); + SwBorderAttrAccess aAccess( SwFrame::GetCache(), + pCellFrameForTopBorderAttrs ); const SwBorderAttrs &rTopAttrs = *aAccess.Get(); ::lcl_PaintTopBottomLine( true, *(this), *(pPage), aRect, rRect, rTopAttrs, fnRect, gProp); } @@ -5530,15 +5530,15 @@ void SwFrm::PaintBorder( const SwRect& rRect, const SwPageFrm *pPage, ::lcl_PaintTopBottomLine( true, *(this), *(pPage), aRect, rRect, rAttrs, fnRect, gProp ); } } - if ( !IsContentFrm() || rAttrs.GetBottomLine( *(this) ) ) + if ( !IsContentFrame() || rAttrs.GetBottomLine( *(this) ) ) { // - //-hack // paint is found, paint its bottom border. - if ( IsCellFrm() && pCellFrmForBottomBorderAttrs != this ) + if ( IsCellFrame() && pCellFrameForBottomBorderAttrs != this ) { - SwBorderAttrAccess aAccess( SwFrm::GetCache(), - pCellFrmForBottomBorderAttrs ); + SwBorderAttrAccess aAccess( SwFrame::GetCache(), + pCellFrameForBottomBorderAttrs ); const SwBorderAttrs &rBottomAttrs = *aAccess.Get(); ::lcl_PaintTopBottomLine(false, *(this), *(pPage), aRect, rRect, rBottomAttrs, fnRect, gProp); } @@ -5558,27 +5558,27 @@ void SwFrm::PaintBorder( const SwRect& rRect, const SwPageFrm *pPage, * Currently only the top frame needs to be taken into account * Other lines and shadows are set aside */ -void SwFootnoteContFrm::PaintBorder( const SwRect& rRect, const SwPageFrm *pPage, +void SwFootnoteContFrame::PaintBorder( const SwRect& rRect, const SwPageFrame *pPage, const SwBorderAttrs & ) const { //If the rectangle is completely inside the PrtArea, no border needs to //be painted. SwRect aRect( Prt() ); - aRect.Pos() += Frm().Pos(); + aRect.Pos() += Frame().Pos(); if ( !aRect.IsInside( rRect ) ) PaintLine( rRect, pPage ); } /// Paint footnote lines. -void SwFootnoteContFrm::PaintLine( const SwRect& rRect, - const SwPageFrm *pPage ) const +void SwFootnoteContFrame::PaintLine( const SwRect& rRect, + const SwPageFrame *pPage ) const { //The length of the line is derived from the percentual indication on the //PageDesc. The position is also stated on the PageDesc. //The pen can directly be taken from the PageDesc. if ( !pPage ) - pPage = FindPageFrm(); + pPage = FindPageFrame(); const SwPageFootnoteInfo &rInf = pPage->GetPageDesc()->GetFootnoteInfo(); SWRECTFN( this ) @@ -5600,9 +5600,9 @@ void SwFootnoteContFrm::PaintLine( const SwRect& rRect, } SwTwips nLineWidth = rInf.GetLineWidth(); const SwRect aLineRect = bVert ? - SwRect( Point(Frm().Left()+Frm().Width()-rInf.GetTopDist()-nLineWidth, + SwRect( Point(Frame().Left()+Frame().Width()-rInf.GetTopDist()-nLineWidth, nX), Size( nLineWidth, nWidth ) ) - : SwRect( Point( nX, Frm().Pos().Y() + rInf.GetTopDist() ), + : SwRect( Point( nX, Frame().Pos().Y() + rInf.GetTopDist() ), Size( nWidth, rInf.GetLineWidth())); if ( aLineRect.HasArea() ) PaintBorderLine( rRect, aLineRect , pPage, &rInf.GetLineColor(), @@ -5610,17 +5610,17 @@ void SwFootnoteContFrm::PaintLine( const SwRect& rRect, } /// Paints the separator line for inside columns -void SwLayoutFrm::PaintColLines( const SwRect &rRect, const SwFormatCol &rFormatCol, - const SwPageFrm *pPage ) const +void SwLayoutFrame::PaintColLines( const SwRect &rRect, const SwFormatCol &rFormatCol, + const SwPageFrame *pPage ) const { - const SwFrm *pCol = Lower(); - if ( !pCol || !pCol->IsColumnFrm() ) + const SwFrame *pCol = Lower(); + if ( !pCol || !pCol->IsColumnFrame() ) return; SwRectFn fnRect = pCol->IsVertical() ? ( pCol->IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori; SwRect aLineRect = Prt(); - aLineRect += Frm().Pos(); + aLineRect += Frame().Pos(); SwTwips nTop = ((aLineRect.*fnRect->fnGetHeight)()*rFormatCol.GetLineHeight()) / 100 - (aLineRect.*fnRect->fnGetHeight)(); @@ -5655,7 +5655,7 @@ void SwLayoutFrm::PaintColLines( const SwRect &rRect, const SwFormatCol &rFormat while ( pCol->GetNext() ) { (aLineRect.*fnRect->fnSetPosX) - ( (pCol->Frm().*fnGetX)() - nPenHalf ); + ( (pCol->Frame().*fnGetX)() - nPenHalf ); if ( aRect.IsOver( aLineRect ) ) PaintBorderLine( aRect, aLineRect , pPage, &rFormatCol.GetLineColor(), rFormatCol.GetLineStyle() ); @@ -5663,7 +5663,7 @@ void SwLayoutFrm::PaintColLines( const SwRect &rRect, const SwFormatCol &rFormat } } -void SwPageFrm::PaintGrid( OutputDevice* pOut, SwRect &rRect ) const +void SwPageFrame::PaintGrid( OutputDevice* pOut, SwRect &rRect ) const { if( !m_bHasGrid || gProp.pSRetoucheFly || gProp.pSRetoucheFly2 ) return; @@ -5671,11 +5671,11 @@ void SwPageFrm::PaintGrid( OutputDevice* pOut, SwRect &rRect ) const if( pGrid && ( OUTDEV_PRINTER != pOut->GetOutDevType() ? pGrid->GetDisplayGrid() : pGrid->GetPrintGrid() ) ) { - const SwLayoutFrm* pBody = FindBodyCont(); + const SwLayoutFrame* pBody = FindBodyCont(); if( pBody ) { SwRect aGrid( pBody->Prt() ); - aGrid += pBody->Frm().Pos(); + aGrid += pBody->Frame().Pos(); SwRect aInter( aGrid ); aInter.Intersection( rRect ); @@ -5973,13 +5973,13 @@ void SwPageFrm::PaintGrid( OutputDevice* pOut, SwRect &rRect ) const * input parameter - instance of the view shell, on which the output * has to be generated. */ -void SwPageFrm::PaintMarginArea( const SwRect& _rOutputRect, +void SwPageFrame::PaintMarginArea( const SwRect& _rOutputRect, SwViewShell* _pViewShell ) const { if ( _pViewShell->GetWin() && !_pViewShell->GetViewOptions()->getBrowseMode() ) { //UUUU Simplified paint with DrawingLayer FillStyle - SwRect aPgRect = Frm(); + SwRect aPgRect = Frame(); aPgRect._Intersection( _rOutputRect ); if(!aPgRect.IsEmpty()) @@ -5996,12 +5996,12 @@ void SwPageFrm::PaintMarginArea( const SwRect& _rOutputRect, } } -const sal_Int8 SwPageFrm::mnShadowPxWidth = 9; +const sal_Int8 SwPageFrame::mnShadowPxWidth = 9; -bool SwPageFrm::IsRightShadowNeeded() const +bool SwPageFrame::IsRightShadowNeeded() const { - const SwViewShell *pSh = getRootFrm()->GetCurrShell(); - const bool bIsLTR = getRootFrm()->IsLeftToRightViewLayout(); + const SwViewShell *pSh = getRootFrame()->GetCurrShell(); + const bool bIsLTR = getRootFrame()->IsLeftToRightViewLayout(); // We paint the right shadow if we're not in book mode // or if we've no sibling or are the last page of the "row" @@ -6011,10 +6011,10 @@ bool SwPageFrm::IsRightShadowNeeded() const } -bool SwPageFrm::IsLeftShadowNeeded() const +bool SwPageFrame::IsLeftShadowNeeded() const { - const SwViewShell *pSh = getRootFrm()->GetCurrShell(); - const bool bIsLTR = getRootFrm()->IsLeftToRightViewLayout(); + const SwViewShell *pSh = getRootFrame()->GetCurrShell(); + const bool bIsLTR = getRootFrame()->IsLeftToRightViewLayout(); // We paint the left shadow if we're not in book mode // or if we've no sibling or are the last page of the "row" @@ -6027,7 +6027,7 @@ bool SwPageFrm::IsLeftShadowNeeded() const * Determine rectangle for bottom page shadow * for #i9719# */ -/*static*/ void SwPageFrm::GetHorizontalShadowRect( const SwRect& _rPageRect, +/*static*/ void SwPageFrame::GetHorizontalShadowRect( const SwRect& _rPageRect, const SwViewShell* _pViewShell, OutputDevice* pRenderContext, SwRect& _orHorizontalShadowRect, @@ -6091,7 +6091,7 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& aPoin * for #i9719# * implement paint of page border and shadow */ -/*static*/ void SwPageFrm::PaintBorderAndShadow( const SwRect& _rPageRect, +/*static*/ void SwPageFrame::PaintBorderAndShadow( const SwRect& _rPageRect, const SwViewShell* _pViewShell, bool bPaintLeftShadow, bool bPaintRightShadow, @@ -6177,7 +6177,7 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& aPoin SwRect aPaintRect; OutputDevice *pOut = _pViewShell->GetOut(); - SwPageFrm::GetHorizontalShadowRect( _rPageRect, _pViewShell, pOut, aPaintRect, bPaintLeftShadow, bPaintRightShadow, bRightSidebar ); + SwPageFrame::GetHorizontalShadowRect( _rPageRect, _pViewShell, pOut, aPaintRect, bPaintLeftShadow, bPaintRightShadow, bRightSidebar ); // Right shadow & corners if ( bPaintRightShadow ) @@ -6247,7 +6247,7 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& aPoin * mod #i6193# paint sidebar for notes * IMPORTANT: if you change the rects here, also change SwPostItMgr::ScrollbarHit */ -/*static*/void SwPageFrm::PaintNotesSidebar(const SwRect& _rPageRect, SwViewShell* _pViewShell, sal_uInt16 nPageNum, bool bRight) +/*static*/void SwPageFrame::PaintNotesSidebar(const SwRect& _rPageRect, SwViewShell* _pViewShell, sal_uInt16 nPageNum, bool bRight) { //TODO: cut out scrollbar area and arrows out of sidepane rect, otherwise it could flicker when pressing arrow buttons if (!_pViewShell ) @@ -6343,7 +6343,7 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& aPoin } } -/*static*/ void SwPageFrm::PaintNotesSidebarArrows(const Point &aMiddleFirst, const Point &aMiddleSecond, SwViewShell* _pViewShell, const Color& rColorUp, const Color& rColorDown) +/*static*/ void SwPageFrame::PaintNotesSidebarArrows(const Point &aMiddleFirst, const Point &aMiddleSecond, SwViewShell* _pViewShell, const Color& rColorUp, const Color& rColorDown) { tools::Polygon aTriangleUp(3); tools::Polygon aTriangleDown(3); @@ -6367,7 +6367,7 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& aPoin * * for #i9719# */ -/*static*/ void SwPageFrm::GetBorderAndShadowBoundRect( const SwRect& _rPageRect, +/*static*/ void SwPageFrame::GetBorderAndShadowBoundRect( const SwRect& _rPageRect, const SwViewShell* _pViewShell, OutputDevice* pRenderContext, SwRect& _orBorderAndShadowBoundRect, @@ -6386,7 +6386,7 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& aPoin // Always ask for full shadow since we want a bounding rect // including at least the page frame - SwPageFrm::GetHorizontalShadowRect( _rPageRect, _pViewShell, pRenderContext, aTmpRect, false, false, bRightSidebar ); + SwPageFrame::GetHorizontalShadowRect( _rPageRect, _pViewShell, pRenderContext, aTmpRect, false, false, bRightSidebar ); if(bLeftShadow) aPagePxRect.Left( aTmpRect.Left() - mnShadowPxWidth - 1); if(bRightShadow) aPagePxRect.Right( aTmpRect.Right() + mnShadowPxWidth + 1); @@ -6394,33 +6394,33 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& aPoin _orBorderAndShadowBoundRect = pRenderContext->PixelToLogic( aPagePxRect.SVRect() ); } -SwRect SwPageFrm::GetBoundRect(OutputDevice* pOutputDevice) const +SwRect SwPageFrame::GetBoundRect(OutputDevice* pOutputDevice) const { - const SwViewShell *pSh = getRootFrm()->GetCurrShell(); - SwRect aPageRect( Frm() ); + const SwViewShell *pSh = getRootFrame()->GetCurrShell(); + SwRect aPageRect( Frame() ); SwRect aResult; if(!pSh) { return SwRect( Point(0, 0), Size(0, 0) ); } - SwPageFrm::GetBorderAndShadowBoundRect( aPageRect, pSh, pOutputDevice, aResult, + SwPageFrame::GetBorderAndShadowBoundRect( aPageRect, pSh, pOutputDevice, aResult, IsLeftShadowNeeded(), IsRightShadowNeeded(), SidebarPosition() == sw::sidebarwindows::SidebarPosition::RIGHT ); return aResult; } -/*static*/ SwTwips SwPageFrm::GetSidebarBorderWidth( const SwViewShell* _pViewShell ) +/*static*/ SwTwips SwPageFrame::GetSidebarBorderWidth( const SwViewShell* _pViewShell ) { const SwPostItMgr* pPostItMgr = _pViewShell ? _pViewShell->GetPostItMgr() : nullptr; const SwTwips nRet = pPostItMgr && pPostItMgr->HasNotes() && pPostItMgr->ShowNotes() ? pPostItMgr->GetSidebarWidth() + pPostItMgr->GetSidebarBorderWidth() : 0; return nRet; } -void SwFrm::PaintBaBo( const SwRect& rRect, const SwPageFrm *pPage, +void SwFrame::PaintBaBo( const SwRect& rRect, const SwPageFrame *pPage, const bool bLowerBorder, const bool bOnlyTextBackground ) const { if ( !pPage ) - pPage = FindPageFrm(); + pPage = FindPageFrame(); OutputDevice *pOut = gProp.pSGlobalShell->GetOut(); @@ -6431,15 +6431,15 @@ void SwFrm::PaintBaBo( const SwRect& rRect, const SwPageFrm *pPage, pOut->Push( PushFlags::FILLCOLOR|PushFlags::LINECOLOR ); pOut->SetLineColor(); - SwBorderAttrAccess aAccess( SwFrm::GetCache(), this ); + SwBorderAttrAccess aAccess( SwFrame::GetCache(), this ); const SwBorderAttrs &rAttrs = *aAccess.Get(); // OD 20.11.2002 #104598# - take care of page margin area - // Note: code move from <SwFrm::PaintBackground(..)> to new method - // <SwPageFrm::Paintmargin(..)>. - if ( IsPageFrm() && !bOnlyTextBackground) + // Note: code move from <SwFrame::PaintBackground(..)> to new method + // <SwPageFrame::Paintmargin(..)>. + if ( IsPageFrame() && !bOnlyTextBackground) { - static_cast<const SwPageFrm*>(this)->PaintMarginArea( rRect, gProp.pSGlobalShell ); + static_cast<const SwPageFrame*>(this)->PaintMarginArea( rRect, gProp.pSGlobalShell ); } // paint background @@ -6452,8 +6452,8 @@ void SwFrm::PaintBaBo( const SwRect& rRect, const SwPageFrm *pPage, if (!bOnlyTextBackground) { SwRect aRect( rRect ); - if( IsPageFrm() ) - static_cast<const SwPageFrm*>(this)->PaintGrid( pOut, aRect ); + if( IsPageFrame() ) + static_cast<const SwPageFrame*>(this)->PaintGrid( pOut, aRect ); PaintBorder( aRect, pPage, rAttrs ); } @@ -6472,7 +6472,7 @@ static bool lcl_compareFillAttributes(const drawinglayer::attribute::SdrAllFillA /// OD 05.09.2002 #102912# /// Do not paint background for fly frames without a background brush by /// calling <PaintBaBo> at the page or at the fly frame its anchored -void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage, +void SwFrame::PaintBackground( const SwRect &rRect, const SwPageFrame *pPage, const SwBorderAttrs & rAttrs, const bool bLowerMode, const bool bLowerBorder, @@ -6480,14 +6480,14 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage, { // OD 20.01.2003 #i1837# - no paint of table background, if corresponding // option is *not* set. - if( IsTabFrm() && + if( IsTabFrame() && !gProp.pSGlobalShell->GetViewOptions()->IsTable() ) { return; } // nothing to do for covered table cells: - if( IsCellFrm() && IsCoveredCell() ) + if( IsCellFrame() && IsCoveredCell() ) return; SwViewShell *pSh = gProp.pSGlobalShell; @@ -6501,7 +6501,7 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage, SvxBrushItem* pTmpBackBrush = nullptr; const Color* pCol; SwRect aOrigBackRect; - const bool bPageFrm = IsPageFrm(); + const bool bPageFrame = IsPageFrame(); bool bLowMode = true; //UUUU @@ -6509,7 +6509,7 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage, bool bBack = GetBackgroundBrush( aFillAttributes, pItem, pCol, aOrigBackRect, bLowerMode ); //- Output if a separate background is used. - bool bNoFlyBackground = !gProp.bSFlyMetafile && !bBack && IsFlyFrm(); + bool bNoFlyBackground = !gProp.bSFlyMetafile && !bBack && IsFlyFrame(); if ( bNoFlyBackground ) { // OD 05.09.2002 #102912# - Fly frame has no background. @@ -6552,31 +6552,31 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage, } } - SwRect aPaintRect( Frm() ); - if( IsTextFrm() || IsSctFrm() ) - aPaintRect = UnionFrm( true ); + SwRect aPaintRect( Frame() ); + if( IsTextFrame() || IsSctFrame() ) + aPaintRect = UnionFrame( true ); if ( aPaintRect.IsOver( rRect ) ) { - if ( bBack || bPageFrm || !bLowerMode ) + if ( bBack || bPageFrame || !bLowerMode ) { const bool bBrowse = pSh->GetViewOptions()->getBrowseMode(); SwRect aRect; - if ( (bPageFrm && bBrowse) || - (IsTextFrm() && Prt().SSize() == Frm().SSize()) ) + if ( (bPageFrame && bBrowse) || + (IsTextFrame() && Prt().SSize() == Frame().SSize()) ) { - aRect = Frm(); + aRect = Frame(); ::SwAlignRect( aRect, gProp.pSGlobalShell, gProp.pSGlobalShell->GetOut() ); } else { ::lcl_CalcBorderRect( aRect, this, rAttrs, false, gProp); - if ( (IsTextFrm() || IsTabFrm()) && GetPrev() ) + if ( (IsTextFrame() || IsTabFrame()) && GetPrev() ) { if ( GetPrev()->GetAttrSet()->GetBackground() == GetAttrSet()->GetBackground() && lcl_compareFillAttributes(GetPrev()->getSdrAllFillAttributesHelper(), getSdrAllFillAttributesHelper())) { - aRect.Top( Frm().Top() ); + aRect.Top( Frame().Top() ); } } } @@ -6608,7 +6608,7 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage, // have to be considered for drawing. // --> Status Quo: background transparency have to be // considered for fly frames - const bool bConsiderBackgroundTransparency = IsFlyFrm(); + const bool bConsiderBackgroundTransparency = IsFlyFrame(); bool bDone(false); // #i125189# We are also done when the new DrawingLayer FillAttributes are used @@ -6650,7 +6650,7 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage, // background transparency have to be considered // Set missing 5th parameter to the default value GRFNUM_NO // - see declaration in /core/inc/frmtool.hxx. - if (IsTextFrm() || !bOnlyTextBackground) + if (IsTextFrame() || !bOnlyTextBackground) ::DrawGraphic( pItem, pOut, @@ -6673,40 +6673,40 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage, delete pTmpBackBrush; //Now process lower and his neighbour. - //We end this as soon as a Frm leaves the chain and therefore is not a lower + //We end this as soon as a Frame leaves the chain and therefore is not a lower //of me anymore - const SwFrm *pFrm = GetLower(); - if ( pFrm ) + const SwFrame *pFrame = GetLower(); + if ( pFrame ) { - SwRect aFrmRect; + SwRect aFrameRect; SwRect aRect( PaintArea() ); aRect._Intersection( rRect ); SwRect aBorderRect( aRect ); - SwShortCut aShortCut( *pFrm, aBorderRect ); + SwShortCut aShortCut( *pFrame, aBorderRect ); do { if ( gProp.pSProgress ) gProp.pSProgress->Reschedule(); - aFrmRect = pFrm->PaintArea(); - if ( aFrmRect.IsOver( aBorderRect ) ) + aFrameRect = pFrame->PaintArea(); + if ( aFrameRect.IsOver( aBorderRect ) ) { - SwBorderAttrAccess aAccess( SwFrm::GetCache(), pFrm ); + SwBorderAttrAccess aAccess( SwFrame::GetCache(), pFrame ); const SwBorderAttrs &rTmpAttrs = *aAccess.Get(); - if ( ( pFrm->IsLayoutFrm() && bLowerBorder ) || - aFrmRect.IsOver( aRect ) ) - pFrm->PaintBackground( aRect, pPage, rTmpAttrs, bLowMode, + if ( ( pFrame->IsLayoutFrame() && bLowerBorder ) || + aFrameRect.IsOver( aRect ) ) + pFrame->PaintBackground( aRect, pPage, rTmpAttrs, bLowMode, bLowerBorder ); if ( bLowerBorder ) - pFrm->PaintBorder( aBorderRect, pPage, rTmpAttrs ); + pFrame->PaintBorder( aBorderRect, pPage, rTmpAttrs ); } - pFrm = pFrm->GetNext(); - } while ( pFrm && pFrm->GetUpper() == this && - !aShortCut.Stop( aFrmRect ) ); + pFrame = pFrame->GetNext(); + } while ( pFrame && pFrame->GetUpper() == this && + !aShortCut.Stop( aFrameRect ) ); } } /// Refreshes all subsidiary lines of a page. -void SwPageFrm::RefreshSubsidiary( const SwRect &rRect ) const +void SwPageFrame::RefreshSubsidiary( const SwRect &rRect ) const { if ( IS_SUBS || isTableBoundariesEnabled() || IS_SUBS_SECTION || IS_SUBS_FLYS ) { @@ -6740,23 +6740,23 @@ void SwPageFrm::RefreshSubsidiary( const SwRect &rRect ) const } } -void SwLayoutFrm::RefreshLaySubsidiary( const SwPageFrm *pPage, +void SwLayoutFrame::RefreshLaySubsidiary( const SwPageFrame *pPage, const SwRect &rRect ) const { const bool bSubsOpt = IS_SUBS; if ( bSubsOpt ) PaintSubsidiaryLines( pPage, rRect ); - const SwFrm *pLow = Lower(); + const SwFrame *pLow = Lower(); if( !pLow ) return; SwShortCut aShortCut( *pLow, rRect ); - while( pLow && !aShortCut.Stop( pLow->Frm() ) ) + while( pLow && !aShortCut.Stop( pLow->Frame() ) ) { - if ( pLow->Frm().IsOver( rRect ) && pLow->Frm().HasArea() ) + if ( pLow->Frame().IsOver( rRect ) && pLow->Frame().HasArea() ) { - if ( pLow->IsLayoutFrm() ) - static_cast<const SwLayoutFrm*>(pLow)->RefreshLaySubsidiary( pPage, rRect); + if ( pLow->IsLayoutFrame() ) + static_cast<const SwLayoutFrame*>(pLow)->RefreshLaySubsidiary( pPage, rRect); else if ( pLow->GetDrawObjs() ) { const SwSortedObjs& rObjs = *(pLow->GetDrawObjs()); @@ -6765,14 +6765,14 @@ void SwLayoutFrm::RefreshLaySubsidiary( const SwPageFrm *pPage, const SwAnchoredObject* pAnchoredObj = rObjs[i]; if ( pPage->GetFormat()->GetDoc()->getIDocumentDrawModelAccess().IsVisibleLayerId( pAnchoredObj->GetDrawObj()->GetLayer() ) && - dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) != nullptr ) + dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr ) { - const SwFlyFrm *pFly = - static_cast<const SwFlyFrm*>(pAnchoredObj); - if ( pFly->IsFlyInCntFrm() && pFly->Frm().IsOver( rRect ) ) + const SwFlyFrame *pFly = + static_cast<const SwFlyFrame*>(pAnchoredObj); + if ( pFly->IsFlyInContentFrame() && pFly->Frame().IsOver( rRect ) ) { - if ( !pFly->Lower() || !pFly->Lower()->IsNoTextFrm() || - !static_cast<const SwNoTextFrm*>(pFly->Lower())->HasAnimation()) + if ( !pFly->Lower() || !pFly->Lower()->IsNoTextFrame() || + !static_cast<const SwNoTextFrame*>(pFly->Lower())->HasAnimation()) pFly->RefreshLaySubsidiary( pPage, rRect ); } } @@ -6785,11 +6785,11 @@ void SwLayoutFrm::RefreshLaySubsidiary( const SwPageFrm *pPage, /** * Subsidiary lines to paint the PrtAreas - * Only the LayoutFrms which directly contain Content + * Only the LayoutFrames which directly contain Content * Paints the desired line and pays attention to not overpaint any flys */ -static void lcl_RefreshLine( const SwLayoutFrm *pLay, - const SwPageFrm *pPage, +static void lcl_RefreshLine( const SwLayoutFrame *pLay, + const SwPageFrame *pPage, const Point &rP1, const Point &rP2, const sal_uInt8 nSubColor, @@ -6823,11 +6823,11 @@ static void lcl_RefreshLine( const SwLayoutFrm *pLay, //Even if I'm inside a fly or inside a fly inside a fly a.s.o I won't //avoid any of those flys. SwOrderIter aIter( pPage ); - const SwFlyFrm *pMyFly = pLay->FindFlyFrm(); + const SwFlyFrame *pMyFly = pLay->FindFlyFrame(); if ( pMyFly ) { aIter.Current( pMyFly->GetVirtDrawObj() ); - while ( nullptr != (pMyFly = pMyFly->GetAnchorFrm()->FindFlyFrm()) ) + while ( nullptr != (pMyFly = pMyFly->GetAnchorFrame()->FindFlyFrame()) ) { if ( aIter()->GetOrdNum() > pMyFly->GetVirtDrawObj()->GetOrdNum() ) aIter.Current( pMyFly->GetVirtDrawObj() ); @@ -6839,7 +6839,7 @@ static void lcl_RefreshLine( const SwLayoutFrm *pLay, while ( aIter() ) { const SwVirtFlyDrawObj *pObj = static_cast<const SwVirtFlyDrawObj*>(aIter()); - const SwFlyFrm *pFly = pObj ? pObj->GetFlyFrm() : nullptr; + const SwFlyFrame *pFly = pObj ? pObj->GetFlyFrame() : nullptr; //I certainly won't avoid myself, even if I'm placed _inside_ the //fly I won't avoid it. @@ -6985,26 +6985,26 @@ static drawinglayer::primitive2d::Primitive2DSequence lcl_CreateColumnAreaDelimi return aSeq; } -void SwPageFrm::PaintSubsidiaryLines( const SwPageFrm *, +void SwPageFrame::PaintSubsidiaryLines( const SwPageFrame *, const SwRect & ) const { if ( !gProp.pSGlobalShell->IsHeaderFooterEdit() ) { - const SwFrm* pLay = Lower(); - const SwFrm* pFootnoteCont = nullptr; - const SwFrm* pPageBody = nullptr; + const SwFrame* pLay = Lower(); + const SwFrame* pFootnoteCont = nullptr; + const SwFrame* pPageBody = nullptr; while ( pLay && !( pFootnoteCont && pPageBody ) ) { - if ( pLay->IsFootnoteContFrm( ) ) + if ( pLay->IsFootnoteContFrame( ) ) pFootnoteCont = pLay; - if ( pLay->IsBodyFrm() ) + if ( pLay->IsBodyFrame() ) pPageBody = pLay; pLay = pLay->GetNext(); } - SwRect aArea( pPageBody->Frm() ); + SwRect aArea( pPageBody->Frame() ); if ( pFootnoteCont ) - aArea.AddBottom( pFootnoteCont->Frm().Bottom() - aArea.Bottom() ); + aArea.AddBottom( pFootnoteCont->Frame().Bottom() - aArea.Bottom() ); if ( !gProp.pSGlobalShell->GetViewOptions()->IsViewMetaChars( ) ) ProcessPrimitives( lcl_CreatePageAreaDelimiterPrimitives( aArea ) ); @@ -7013,36 +7013,36 @@ void SwPageFrm::PaintSubsidiaryLines( const SwPageFrm *, } } -void SwColumnFrm::PaintSubsidiaryLines( const SwPageFrm *, +void SwColumnFrame::PaintSubsidiaryLines( const SwPageFrame *, const SwRect & ) const { - const SwFrm* pLay = Lower(); - const SwFrm* pFootnoteCont = nullptr; - const SwFrm* pColBody = nullptr; + const SwFrame* pLay = Lower(); + const SwFrame* pFootnoteCont = nullptr; + const SwFrame* pColBody = nullptr; while ( pLay && !( pFootnoteCont && pColBody ) ) { - if ( pLay->IsFootnoteContFrm( ) ) + if ( pLay->IsFootnoteContFrame( ) ) pFootnoteCont = pLay; - if ( pLay->IsBodyFrm() ) + if ( pLay->IsBodyFrame() ) pColBody = pLay; pLay = pLay->GetNext(); } - SwRect aArea( pColBody->Frm() ); + SwRect aArea( pColBody->Frame() ); // #i3662# - enlarge top of column body frame's printing area // in sections to top of section frame. - const bool bColInSection = GetUpper()->IsSctFrm(); + const bool bColInSection = GetUpper()->IsSctFrame(); if ( bColInSection ) { if ( IsVertical() ) - aArea.Right( GetUpper()->Frm().Right() ); + aArea.Right( GetUpper()->Frame().Right() ); else - aArea.Top( GetUpper()->Frm().Top() ); + aArea.Top( GetUpper()->Frame().Top() ); } if ( pFootnoteCont ) - aArea.AddBottom( pFootnoteCont->Frm().Bottom() - aArea.Bottom() ); + aArea.AddBottom( pFootnoteCont->Frame().Bottom() - aArea.Bottom() ); ::SwAlignRect( aArea, gProp.pSGlobalShell, gProp.pSGlobalShell->GetOut() ); @@ -7052,31 +7052,31 @@ void SwColumnFrm::PaintSubsidiaryLines( const SwPageFrm *, ProcessPrimitives( lcl_CreateRectangleDelimiterPrimitives( aArea ) ); } -void SwSectionFrm::PaintSubsidiaryLines( const SwPageFrm * pPage, +void SwSectionFrame::PaintSubsidiaryLines( const SwPageFrame * pPage, const SwRect & rRect ) const { - const bool bNoLowerColumn = !Lower() || !Lower()->IsColumnFrm(); + const bool bNoLowerColumn = !Lower() || !Lower()->IsColumnFrame(); if ( bNoLowerColumn ) { - SwLayoutFrm::PaintSubsidiaryLines( pPage, rRect ); + SwLayoutFrame::PaintSubsidiaryLines( pPage, rRect ); } } /** - * The SwBodyFrm doesn't print any subsidiary line: it's bounds are painted + * The SwBodyFrame doesn't print any subsidiary line: it's bounds are painted * either by the parent page or the parent column frame. */ -void SwBodyFrm::PaintSubsidiaryLines( const SwPageFrm *, +void SwBodyFrame::PaintSubsidiaryLines( const SwPageFrame *, const SwRect & ) const { } -void SwHeadFootFrm::PaintSubsidiaryLines( const SwPageFrm *, const SwRect & ) const +void SwHeadFootFrame::PaintSubsidiaryLines( const SwPageFrame *, const SwRect & ) const { if ( gProp.pSGlobalShell->IsHeaderFooterEdit() ) { SwRect aArea( Prt() ); - aArea.Pos() += Frm().Pos(); + aArea.Pos() += Frame().Pos(); if ( !gProp.pSGlobalShell->GetViewOptions()->IsViewMetaChars( ) ) ProcessPrimitives( lcl_CreatePageAreaDelimiterPrimitives( aArea ) ); else @@ -7088,7 +7088,7 @@ void SwHeadFootFrm::PaintSubsidiaryLines( const SwPageFrm *, const SwRect & ) co * This method is overridden in order to have no subsidiary lines * around the footnotes. */ -void SwFootnoteFrm::PaintSubsidiaryLines( const SwPageFrm *, +void SwFootnoteFrame::PaintSubsidiaryLines( const SwPageFrame *, const SwRect & ) const { } @@ -7097,42 +7097,42 @@ void SwFootnoteFrm::PaintSubsidiaryLines( const SwPageFrm *, * This method is overridden in order to have no subsidiary lines * around the footnotes containers. */ -void SwFootnoteContFrm::PaintSubsidiaryLines( const SwPageFrm *, +void SwFootnoteContFrame::PaintSubsidiaryLines( const SwPageFrame *, const SwRect & ) const { } -void SwLayoutFrm::PaintSubsidiaryLines( const SwPageFrm *pPage, +void SwLayoutFrame::PaintSubsidiaryLines( const SwPageFrame *pPage, const SwRect &rRect ) const { bool bNewTableModel = false; // #i29550# - if ( IsTabFrm() || IsCellFrm() || IsRowFrm() ) + if ( IsTabFrame() || IsCellFrame() || IsRowFrame() ) { - const SwTabFrm* pTabFrm = FindTabFrm(); - if ( pTabFrm->IsCollapsingBorders() ) + const SwTabFrame* pTabFrame = FindTabFrame(); + if ( pTabFrame->IsCollapsingBorders() ) return; - bNewTableModel = pTabFrm->GetTable()->IsNewModel(); + bNewTableModel = pTabFrame->GetTable()->IsNewModel(); // in the new table model, we have an early return for all cell-related // frames, except from non-covered table cells if ( bNewTableModel ) - if ( IsTabFrm() || - IsRowFrm() || - ( IsCellFrm() && IsCoveredCell() ) ) + if ( IsTabFrame() || + IsRowFrame() || + ( IsCellFrame() && IsCoveredCell() ) ) return; } const bool bFlys = pPage->GetSortedObjs() != nullptr; - const bool bCell = IsCellFrm(); + const bool bCell = IsCellFrame(); // use frame area for cells // OD 13.02.2003 #i3662# - for section use also frame area - const bool bUseFrmArea = bCell || IsSctFrm(); - SwRect aOriginal( bUseFrmArea ? Frm() : Prt() ); - if ( !bUseFrmArea ) - aOriginal.Pos() += Frm().Pos(); + const bool bUseFrameArea = bCell || IsSctFrame(); + SwRect aOriginal( bUseFrameArea ? Frame() : Prt() ); + if ( !bUseFrameArea ) + aOriginal.Pos() += Frame().Pos(); ::SwAlignRect( aOriginal, gProp.pSGlobalShell, gProp.pSGlobalShell->GetOut() ); @@ -7149,14 +7149,14 @@ void SwLayoutFrm::PaintSubsidiaryLines( const SwPageFrm *pPage, const Point aRB( nRight, nBottom ); const Point aLB( aOut.Left(), nBottom ); - sal_uInt8 nSubColor = ( bCell || IsRowFrm() ) ? SUBCOL_TAB : + sal_uInt8 nSubColor = ( bCell || IsRowFrame() ) ? SUBCOL_TAB : ( IsInSct() ? SUBCOL_SECT : ( IsInFly() ? SUBCOL_FLY : SUBCOL_PAGE ) ); // OD 18.11.2002 #99672# - collect body, header, footer, footnote and section // sub-lines in <pSpecSubsLine> array. - const bool bSpecialSublines = IsBodyFrm() || IsHeaderFrm() || IsFooterFrm() || - IsFootnoteFrm() || IsSctFrm(); + const bool bSpecialSublines = IsBodyFrame() || IsHeaderFrame() || IsFooterFrame() || + IsFootnoteFrame() || IsSctFrame(); SwLineRects* pUsedSubsLines = bSpecialSublines ? gProp.pSSpecSubsLines : gProp.pSSubsLines; // NOTE: for cell frames only left and right (horizontal layout) respectively @@ -7229,7 +7229,7 @@ void SwLayoutFrm::PaintSubsidiaryLines( const SwPageFrm *pPage, * Refreshes all extra data (line breaks a.s.o) of the page. Basically only those objects * are considered which horizontally overlap the Rect. */ -void SwPageFrm::RefreshExtraData( const SwRect &rRect ) const +void SwPageFrame::RefreshExtraData( const SwRect &rRect ) const { const SwLineNumberInfo &rInfo = GetFormat()->GetDoc()->GetLineNumberInfo(); bool bLineInFly = (rInfo.IsPaintLineNumbers() && rInfo.IsCountInFlys()) @@ -7239,24 +7239,24 @@ void SwPageFrm::RefreshExtraData( const SwRect &rRect ) const ::SwAlignRect( aRect, gProp.pSGlobalShell, gProp.pSGlobalShell->GetOut() ); if ( aRect.HasArea() ) { - SwLayoutFrm::RefreshExtraData( aRect ); + SwLayoutFrame::RefreshExtraData( aRect ); if ( bLineInFly && GetSortedObjs() ) for ( size_t i = 0; i < GetSortedObjs()->size(); ++i ) { const SwAnchoredObject* pAnchoredObj = (*GetSortedObjs())[i]; - if ( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) != nullptr ) + if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr ) { - const SwFlyFrm *pFly = static_cast<const SwFlyFrm*>(pAnchoredObj); - if ( pFly->Frm().Top() <= aRect.Bottom() && - pFly->Frm().Bottom() >= aRect.Top() ) + const SwFlyFrame *pFly = static_cast<const SwFlyFrame*>(pAnchoredObj); + if ( pFly->Frame().Top() <= aRect.Bottom() && + pFly->Frame().Bottom() >= aRect.Top() ) pFly->RefreshExtraData( aRect ); } } } } -void SwLayoutFrm::RefreshExtraData( const SwRect &rRect ) const +void SwLayoutFrame::RefreshExtraData( const SwRect &rRect ) const { const SwLineNumberInfo &rInfo = GetFormat()->GetDoc()->GetLineNumberInfo(); @@ -7264,32 +7264,32 @@ void SwLayoutFrm::RefreshExtraData( const SwRect &rRect ) const bLineInFly = bLineInBody && rInfo.IsCountInFlys(), bRedLine = (sal_Int16)SW_MOD()->GetRedlineMarkPos()!=text::HoriOrientation::NONE; - const SwContentFrm *pCnt = ContainsContent(); + const SwContentFrame *pCnt = ContainsContent(); while ( pCnt && IsAnLower( pCnt ) ) { - if ( pCnt->IsTextFrm() && ( bRedLine || + if ( pCnt->IsTextFrame() && ( bRedLine || ( !pCnt->IsInTab() && ((bLineInBody && pCnt->IsInDocBody()) || (bLineInFly && pCnt->IsInFly())) ) ) && - pCnt->Frm().Top() <= rRect.Bottom() && - pCnt->Frm().Bottom() >= rRect.Top() ) + pCnt->Frame().Top() <= rRect.Bottom() && + pCnt->Frame().Bottom() >= rRect.Top() ) { - static_cast<const SwTextFrm*>(pCnt)->PaintExtraData( rRect ); + static_cast<const SwTextFrame*>(pCnt)->PaintExtraData( rRect ); } if ( bLineInFly && pCnt->GetDrawObjs() ) for ( size_t i = 0; i < pCnt->GetDrawObjs()->size(); ++i ) { const SwAnchoredObject* pAnchoredObj = (*pCnt->GetDrawObjs())[i]; - if ( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) != nullptr ) + if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr ) { - const SwFlyFrm *pFly = static_cast<const SwFlyFrm*>(pAnchoredObj); - if ( pFly->IsFlyInCntFrm() && - pFly->Frm().Top() <= rRect.Bottom() && - pFly->Frm().Bottom() >= rRect.Top() ) + const SwFlyFrame *pFly = static_cast<const SwFlyFrame*>(pAnchoredObj); + if ( pFly->IsFlyInContentFrame() && + pFly->Frame().Top() <= rRect.Bottom() && + pFly->Frame().Bottom() >= rRect.Top() ) pFly->RefreshExtraData( rRect ); } } - pCnt = pCnt->GetNextContentFrm(); + pCnt = pCnt->GetNextContentFrame(); } } @@ -7297,13 +7297,13 @@ void SwLayoutFrm::RefreshExtraData( const SwRect &rRect ) const * For #102450# * Determine the color, that is respectively will be drawn as background * for the page frame. - * Using existing method SwFrm::GetBackgroundBrush to determine the color + * Using existing method SwFrame::GetBackgroundBrush to determine the color * that is set at the page frame respectively is parent. If none is found * return the global retouche color * * @return Color */ -const Color SwPageFrm::GetDrawBackgrdColor() const +const Color SwPageFrame::GetDrawBackgrdColor() const { const SvxBrushItem* pBrushItem; const Color* pDummyColor; @@ -7322,7 +7322,7 @@ const Color SwPageFrm::GetDrawBackgrdColor() const else if(pBrushItem) { OUString referer; - SwViewShell * sh1 = getRootFrm()->GetCurrShell(); + SwViewShell * sh1 = getRootFrame()->GetCurrShell(); if (sh1 != nullptr) { SfxObjectShell * sh2 = sh1->GetDoc()->GetPersist(); if (sh2 != nullptr && sh2->HasName()) { @@ -7351,7 +7351,7 @@ const Color SwPageFrm::GetDrawBackgrdColor() const } /// create/return font used to paint the "empty page" string -const vcl::Font& SwPageFrm::GetEmptyPageFont() +const vcl::Font& SwPageFrame::GetEmptyPageFont() { static vcl::Font* pEmptyPgFont = nullptr; if ( nullptr == pEmptyPgFont ) @@ -7372,20 +7372,20 @@ const vcl::Font& SwPageFrm::GetEmptyPageFont() /** * Retouch for a section * - * Retouch will only be done, if the Frm is the last one in his chain. - * The whole area of the upper which is located below the Frm will be + * Retouch will only be done, if the Frame is the last one in his chain. + * The whole area of the upper which is located below the Frame will be * cleared using PaintBackground. */ -void SwFrm::Retouche( const SwPageFrm * pPage, const SwRect &rRect ) const +void SwFrame::Retouche( const SwPageFrame * pPage, const SwRect &rRect ) const { if ( gProp.bSFlyMetafile ) return; OSL_ENSURE( GetUpper(), "Retouche try without Upper." ); - OSL_ENSURE( getRootFrm()->GetCurrShell() && gProp.pSGlobalShell->GetWin(), "Retouche on a printer?" ); + OSL_ENSURE( getRootFrame()->GetCurrShell() && gProp.pSGlobalShell->GetWin(), "Retouche on a printer?" ); SwRect aRetouche( GetUpper()->PaintArea() ); - aRetouche.Top( Frm().Top() + Frm().Height() ); + aRetouche.Top( Frame().Top() + Frame().Height() ); aRetouche.Intersection( gProp.pSGlobalShell->VisArea() ); if ( aRetouche.HasArea() ) @@ -7394,7 +7394,7 @@ void SwFrm::Retouche( const SwPageFrm * pPage, const SwRect &rRect ) const //cut out. SwRegionRects aRegion( aRetouche ); aRegion -= rRect; - SwViewShell *pSh = getRootFrm()->GetCurrShell(); + SwViewShell *pSh = getRootFrame()->GetCurrShell(); // #i16816# tagged pdf support SwTaggedPDFHelper aTaggedPDFHelper( nullptr, nullptr, nullptr, *pSh->GetOut() ); @@ -7451,9 +7451,9 @@ void SwFrm::Retouche( const SwPageFrm * pPage, const SwRect &rRect ) const * of the frame transparency is considered and its color is not "no fill"/"auto fill" * * Old description in German: - * Returns the Backgroundbrush for the area of the Frm. - * The Brush is defined by the Frm or by an upper, the first Brush is - * used. If no Brush is defined for a Frm, false is returned. + * Returns the Backgroundbrush for the area of the Frame. + * The Brush is defined by the Frame or by an upper, the first Brush is + * used. If no Brush is defined for a Frame, false is returned. * * @param rpBrush * output parameter - constant reference pointer the found background brush @@ -7479,32 +7479,32 @@ void SwFrm::Retouche( const SwPageFrm * pPage, const SwRect &rRect ) const * * @return true, if a background brush for the frame is found */ -bool SwFrm::GetBackgroundBrush( +bool SwFrame::GetBackgroundBrush( drawinglayer::attribute::SdrAllFillAttributesHelperPtr& rFillAttributes, const SvxBrushItem* & rpBrush, const Color*& rpCol, SwRect &rOrigRect, bool bLowerMode ) const { - const SwFrm *pFrm = this; - SwViewShell *pSh = getRootFrm()->GetCurrShell(); + const SwFrame *pFrame = this; + SwViewShell *pSh = getRootFrame()->GetCurrShell(); const SwViewOption *pOpt = pSh->GetViewOptions(); rpBrush = nullptr; rpCol = nullptr; do - { if ( pFrm->IsPageFrm() && !pOpt->IsPageBack() ) + { if ( pFrame->IsPageFrame() && !pOpt->IsPageBack() ) return false; //UUUU - if (pFrm->supportsFullDrawingLayerFillAttributeSet()) - rFillAttributes = pFrm->getSdrAllFillAttributesHelper(); - const SvxBrushItem &rBack = pFrm->GetAttrSet()->GetBackground(); + if (pFrame->supportsFullDrawingLayerFillAttributeSet()) + rFillAttributes = pFrame->getSdrAllFillAttributesHelper(); + const SvxBrushItem &rBack = pFrame->GetAttrSet()->GetBackground(); - if( pFrm->IsSctFrm() ) + if( pFrame->IsSctFrame() ) { - const SwSection* pSection = static_cast<const SwSectionFrm*>(pFrm)->GetSection(); + const SwSection* pSection = static_cast<const SwSectionFrame*>(pFrame)->GetSection(); // OD 20.08.2002 #99657# #GetTransChg# - // Note: If frame <pFrm> is a section of the index and + // Note: If frame <pFrame> is a section of the index and // it its background color is "no fill"/"auto fill" and // it has no background graphic and // we are not in the page preview and @@ -7529,10 +7529,10 @@ bool SwFrm::GetBackgroundBrush( } // OD 20.08.2002 #99657# - // determine, if background draw of frame <pFrm> considers transparency + // determine, if background draw of frame <pFrame> considers transparency // --> Status Quo: background transparency have to be // considered for fly frames - const bool bConsiderBackgroundTransparency = pFrm->IsFlyFrm(); + const bool bConsiderBackgroundTransparency = pFrame->IsFlyFrame(); // #i125189# Do not base the decision for using the parent's fill style for this // frame when the new DrawingLayer FillAttributes are used on the SdrAllFillAttributesHelper @@ -7552,7 +7552,7 @@ bool SwFrm::GetBackgroundBrush( { // maybe optimized already when 100% transparency is used somewhere, need to test // XFillStyleItem directly from the model data - const drawing::FillStyle eFillStyle(static_cast< const XFillStyleItem& >(pFrm->GetAttrSet()->Get(XATTR_FILLSTYLE)).GetValue()); + const drawing::FillStyle eFillStyle(static_cast< const XFillStyleItem& >(pFrame->GetAttrSet()->Get(XATTR_FILLSTYLE)).GetValue()); if(drawing::FillStyle_NONE != eFillStyle) { @@ -7564,7 +7564,7 @@ bool SwFrm::GetBackgroundBrush( // OD 20.08.2002 #99657# // add condition: // If <bConsiderBackgroundTransparency> is set - see above -, - // return brush of frame <pFrm>, if its color is *not* "no fill"/"auto fill" + // return brush of frame <pFrame>, if its color is *not* "no fill"/"auto fill" if ( // #i125189# Done when the new DrawingLayer FillAttributes are used and // not drawing::FillStyle_NONE (see above) @@ -7581,22 +7581,22 @@ bool SwFrm::GetBackgroundBrush( ) { rpBrush = &rBack; - if ( pFrm->IsPageFrm() && pSh->GetViewOptions()->getBrowseMode() ) + if ( pFrame->IsPageFrame() && pSh->GetViewOptions()->getBrowseMode() ) { - rOrigRect = pFrm->Frm(); + rOrigRect = pFrame->Frame(); } else { - if ( pFrm->Frm().SSize() != pFrm->Prt().SSize() ) + if ( pFrame->Frame().SSize() != pFrame->Prt().SSize() ) { - SwBorderAttrAccess aAccess( SwFrm::GetCache(), pFrm ); + SwBorderAttrAccess aAccess( SwFrame::GetCache(), pFrame ); const SwBorderAttrs &rAttrs = *aAccess.Get(); - ::lcl_CalcBorderRect( rOrigRect, pFrm, rAttrs, false, gProp ); + ::lcl_CalcBorderRect( rOrigRect, pFrame, rAttrs, false, gProp ); } else { - rOrigRect = pFrm->Prt(); - rOrigRect += pFrm->Frm().Pos(); + rOrigRect = pFrame->Prt(); + rOrigRect += pFrame->Frame().Pos(); } } @@ -7610,16 +7610,16 @@ bool SwFrm::GetBackgroundBrush( } // get parent frame - anchor or upper - for next loop - if ( pFrm->IsFlyFrm() ) + if ( pFrame->IsFlyFrame() ) { // OD 20.08.2002 - use "static_cast" instead of "old C-cast" - pFrm = (static_cast<const SwFlyFrm*>(pFrm))->GetAnchorFrm(); + pFrame = (static_cast<const SwFlyFrame*>(pFrame))->GetAnchorFrame(); } else { - pFrm = pFrm->GetUpper(); + pFrame = pFrame->GetUpper(); } - } while ( pFrm ); + } while ( pFrame ); return false; } @@ -7641,10 +7641,10 @@ Graphic SwFlyFrameFormat::MakeGraphic( ImageMap* pMap ) { Graphic aRet; //search any Fly! - SwIterator<SwFrm,SwFormat> aIter( *this ); - SwFrm *pFirst = aIter.First(); + SwIterator<SwFrame,SwFormat> aIter( *this ); + SwFrame *pFirst = aIter.First(); SwViewShell *pSh; - if ( pFirst && nullptr != ( pSh = pFirst->getRootFrm()->GetCurrShell()) ) + if ( pFirst && nullptr != ( pSh = pFirst->getRootFrame()->GetCurrShell()) ) { SwViewShell *pOldGlobal = gProp.pSGlobalShell; gProp.pSGlobalShell = pSh; @@ -7656,7 +7656,7 @@ Graphic SwFlyFrameFormat::MakeGraphic( ImageMap* pMap ) OSL_ENSURE( !pNoteURL, "MakeGraphic: pNoteURL already used? " ); pNoteURL = new SwNoteURL; } - SwFlyFrm *pFly = static_cast<SwFlyFrm*>(pFirst); + SwFlyFrame *pFly = static_cast<SwFlyFrame*>(pFirst); OutputDevice *pOld = pSh->GetOut(); ScopedVclPtrInstance< VirtualDevice > pDev( *pOld ); @@ -7668,7 +7668,7 @@ Graphic SwFlyFrameFormat::MakeGraphic( ImageMap* pMap ) aMet.SetPrefMapMode( aMap ); ::SwCalcPixStatics( pSh->GetOut() ); - aMet.SetPrefSize( pFly->Frm().SSize() ); + aMet.SetPrefSize( pFly->Frame().SSize() ); aMet.Record( pDev.get() ); pDev->SetLineColor(); @@ -7676,8 +7676,8 @@ Graphic SwFlyFrameFormat::MakeGraphic( ImageMap* pMap ) pDev->SetFont( pOld->GetFont() ); //Enlarge the rectangle if needed, so the border is painted too. - SwRect aOut( pFly->Frm() ); - SwBorderAttrAccess aAccess( SwFrm::GetCache(), pFly ); + SwRect aOut( pFly->Frame() ); + SwBorderAttrAccess aAccess( SwFrame::GetCache(), pFly ); const SwBorderAttrs &rAttrs = *aAccess.Get(); if ( rAttrs.CalcRightLine() ) aOut.SSize().Width() += 2*gProp.nSPixelSzW; @@ -7699,7 +7699,7 @@ Graphic SwFlyFrameFormat::MakeGraphic( ImageMap* pMap ) gProp.pSLines = new SwLineRects; // OD 09.12.2002 #103045# - determine page, fly frame is on - const SwPageFrm* pFlyPage = pFly->FindPageFrm(); + const SwPageFrame* pFlyPage = pFly->FindPageFrame(); const Color aPageBackgrdColor(pFlyPage->GetDrawBackgrdColor()); const IDocumentDrawModelAccess& rIDDMA = pSh->getIDocumentDrawModelAccess(); // --> OD #i76669# @@ -7709,7 +7709,7 @@ Graphic SwFlyFrameFormat::MakeGraphic( ImageMap* pMap ) pFlyPage->IsRightToLeft(), &aSwRedirector ); gProp.pSLines->PaintLines( pDev, gProp ); - if ( pFly->IsFlyInCntFrm() ) + if ( pFly->IsFlyInContentFrame() ) pFly->Paint( *pDev, aOut ); gProp.pSLines->PaintLines( pDev, gProp ); // OD 30.08.2002 #102450# - add 3rd parameter @@ -7728,13 +7728,13 @@ Graphic SwFlyFrameFormat::MakeGraphic( ImageMap* pMap ) pSh->DLPostPaint2(true); aMet.Stop(); - aMet.Move( -pFly->Frm().Left(), -pFly->Frm().Top() ); + aMet.Move( -pFly->Frame().Left(), -pFly->Frame().Top() ); aRet = Graphic( aMet ); if( bNoteURL ) { OSL_ENSURE( pNoteURL, "MakeGraphic: Good Bye, NoteURL." ); - pNoteURL->FillImageMap( pMap, pFly->Frm().Pos(), aMap ); + pNoteURL->FillImageMap( pMap, pFly->Frame().Pos(), aMap ); delete pNoteURL; pNoteURL = nullptr; } diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx index 00ffaec8a6f5..c9bf7173e4b3 100644 --- a/sw/source/core/layout/sectfrm.cxx +++ b/sw/source/core/layout/sectfrm.cxx @@ -40,9 +40,9 @@ #include <flyfrms.hxx> #include <sortedobjs.hxx> -SwSectionFrm::SwSectionFrm( SwSection &rSect, SwFrm* pSib ) - : SwLayoutFrm( rSect.GetFormat(), pSib ) - , SwFlowFrm( static_cast<SwFrm&>(*this) ) +SwSectionFrame::SwSectionFrame( SwSection &rSect, SwFrame* pSib ) + : SwLayoutFrame( rSect.GetFormat(), pSib ) + , SwFlowFrame( static_cast<SwFrame&>(*this) ) , m_pSection( &rSect ) , m_bFootnoteAtEnd(false) , m_bEndnAtEnd(false) @@ -50,15 +50,15 @@ SwSectionFrm::SwSectionFrm( SwSection &rSect, SwFrm* pSib ) , m_bOwnFootnoteNum(false) , m_bFootnoteLock(false) { - mnFrmType = FRM_SECTION; + mnFrameType = FRM_SECTION; CalcFootnoteAtEndFlag(); CalcEndAtEndFlag(); } -SwSectionFrm::SwSectionFrm( SwSectionFrm &rSect, bool bMaster ) : - SwLayoutFrm( rSect.GetFormat(), rSect.getRootFrm() ), - SwFlowFrm( (SwFrm&)*this ), +SwSectionFrame::SwSectionFrame( SwSectionFrame &rSect, bool bMaster ) : + SwLayoutFrame( rSect.GetFormat(), rSect.getRootFrame() ), + SwFlowFrame( (SwFrame&)*this ), m_pSection( rSect.GetSection() ), m_bFootnoteAtEnd( rSect.IsFootnoteAtEnd() ), m_bEndnAtEnd( rSect.IsEndnAtEnd() ), @@ -66,7 +66,7 @@ SwSectionFrm::SwSectionFrm( SwSectionFrm &rSect, bool bMaster ) : m_bOwnFootnoteNum( false ), m_bFootnoteLock( false ) { - mnFrmType = FRM_SECTION; + mnFrameType = FRM_SECTION; PROTOCOL( this, PROT_SECTION, bMaster ? ACT_CREATE_MASTER : ACT_CREATE_FOLLOW, &rSect ) @@ -74,7 +74,7 @@ SwSectionFrm::SwSectionFrm( SwSectionFrm &rSect, bool bMaster ) : { if( rSect.IsFollow() ) { - SwSectionFrm* pMaster = rSect.FindMaster(); + SwSectionFrame* pMaster = rSect.FindMaster(); pMaster->SetFollow( this ); } SetFollow( &rSect ); @@ -90,15 +90,15 @@ SwSectionFrm::SwSectionFrm( SwSectionFrm &rSect, bool bMaster ) : } } -// NOTE: call <SwSectionFrm::Init()> directly after creation of a new section +// NOTE: call <SwSectionFrame::Init()> directly after creation of a new section // frame and its insert in the layout. -void SwSectionFrm::Init() +void SwSectionFrame::Init() { - OSL_ENSURE( GetUpper(), "SwSectionFrm::Init before insertion?!" ); + OSL_ENSURE( GetUpper(), "SwSectionFrame::Init before insertion?!" ); SWRECTFN( this ) long nWidth = (GetUpper()->Prt().*fnRect->fnGetWidth)(); - (Frm().*fnRect->fnSetWidth)( nWidth ); - (Frm().*fnRect->fnSetHeight)( 0 ); + (Frame().*fnRect->fnSetWidth)( nWidth ); + (Frame().*fnRect->fnSetHeight)( 0 ); // #109700# LRSpace for sections const SvxLRSpaceItem& rLRSpace = GetFormat()->GetLRSpace(); @@ -117,16 +117,16 @@ void SwSectionFrm::Init() } } -void SwSectionFrm::DestroyImpl() +void SwSectionFrame::DestroyImpl() { if( GetFormat() && !GetFormat()->GetDoc()->IsInDtor() ) { - SwRootFrm *pRootFrm = getRootFrm(); - if( pRootFrm ) - pRootFrm->RemoveFromList( this ); + SwRootFrame *pRootFrame = getRootFrame(); + if( pRootFrame ) + pRootFrame->RemoveFromList( this ); if( IsFollow() ) { - SwSectionFrm *pMaster = FindMaster(); + SwSectionFrame *pMaster = FindMaster(); if( pMaster ) { PROTOCOL( this, PROT_SECTION, ACT_DEL_FOLLOW, pMaster ) @@ -145,21 +145,21 @@ void SwSectionFrm::DestroyImpl() } } - SwLayoutFrm::DestroyImpl(); + SwLayoutFrame::DestroyImpl(); } -SwSectionFrm::~SwSectionFrm() +SwSectionFrame::~SwSectionFrame() { } -void SwSectionFrm::DelEmpty( bool bRemove ) +void SwSectionFrame::DelEmpty( bool bRemove ) { if( IsColLocked() ) { - OSL_ENSURE( !bRemove, "Don't delete locked SectionFrms" ); + OSL_ENSURE( !bRemove, "Don't delete locked SectionFrames" ); return; } - SwFrm* pUp = GetUpper(); + SwFrame* pUp = GetUpper(); if( pUp ) { // #i27138# @@ -168,18 +168,18 @@ void SwSectionFrm::DelEmpty( bool bRemove ) // Relation CONTENT_FLOWS_FROM for current next paragraph will change // and relation CONTENT_FLOWS_TO for current previous paragraph will change. { - SwViewShell* pViewShell( getRootFrm()->GetCurrShell() ); + SwViewShell* pViewShell( getRootFrame()->GetCurrShell() ); if ( pViewShell && pViewShell->GetLayout() && pViewShell->GetLayout()->IsAnyShellAccessible() ) { pViewShell->InvalidateAccessibleParaFlowRelation( - dynamic_cast<SwTextFrm*>(FindNextCnt( true )), - dynamic_cast<SwTextFrm*>(FindPrevCnt( true )) ); + dynamic_cast<SwTextFrame*>(FindNextCnt( true )), + dynamic_cast<SwTextFrame*>(FindPrevCnt( true )) ); } } _Cut( bRemove ); } - SwSectionFrm *pMaster = IsFollow() ? FindMaster() : nullptr; + SwSectionFrame *pMaster = IsFollow() ? FindMaster() : nullptr; if (pMaster) { pMaster->SetFollow( GetFollow() ); @@ -193,107 +193,107 @@ void SwSectionFrm::DelEmpty( bool bRemove ) SetFollow(nullptr); if( pUp ) { - Frm().Height( 0 ); + Frame().Height( 0 ); // If we are destroyed immediately anyway, we don't need // to put us into the list if( bRemove ) { // If we already were half dead before this DelEmpty, // we are likely in the list and have to remove us from // it - if( !m_pSection && getRootFrm() ) - getRootFrm()->RemoveFromList( this ); + if( !m_pSection && getRootFrame() ) + getRootFrame()->RemoveFromList( this ); } - else if( getRootFrm() ) - getRootFrm()->InsertEmptySct( this ); + else if( getRootFrame() ) + getRootFrame()->InsertEmptySct( this ); m_pSection = nullptr; // like this a reanimation is virtually impossible though } } -void SwSectionFrm::Cut() +void SwSectionFrame::Cut() { _Cut( true ); } -void SwSectionFrm::_Cut( bool bRemove ) +void SwSectionFrame::_Cut( bool bRemove ) { OSL_ENSURE( GetUpper(), "Cut ohne Upper()." ); PROTOCOL( this, PROT_CUT, 0, GetUpper() ) - SwPageFrm *pPage = FindPageFrm(); + SwPageFrame *pPage = FindPageFrame(); InvalidatePage( pPage ); - SwFrm *pFrm = GetNext(); - SwFrm* pPrepFrm = nullptr; - while( pFrm && pFrm->IsSctFrm() && !static_cast<SwSectionFrm*>(pFrm)->GetSection() ) - pFrm = pFrm->GetNext(); - if( pFrm ) + SwFrame *pFrame = GetNext(); + SwFrame* pPrepFrame = nullptr; + while( pFrame && pFrame->IsSctFrame() && !static_cast<SwSectionFrame*>(pFrame)->GetSection() ) + pFrame = pFrame->GetNext(); + if( pFrame ) { // The former successor might have calculated a gap to the predecessor // which is now obsolete since he becomes the first - pFrm->_InvalidatePrt(); - pFrm->_InvalidatePos(); - if( pFrm->IsSctFrm() ) - pFrm = static_cast<SwSectionFrm*>(pFrm)->ContainsAny(); - if ( pFrm && pFrm->IsContentFrm() ) + pFrame->_InvalidatePrt(); + pFrame->_InvalidatePos(); + if( pFrame->IsSctFrame() ) + pFrame = static_cast<SwSectionFrame*>(pFrame)->ContainsAny(); + if ( pFrame && pFrame->IsContentFrame() ) { - pFrm->InvalidatePage( pPage ); + pFrame->InvalidatePage( pPage ); if( IsInFootnote() && !GetIndPrev() ) - pPrepFrm = pFrm; + pPrepFrame = pFrame; } } else { InvalidateNextPos(); // Someone has to take over the retouching: predecessor or Upper - if ( nullptr != (pFrm = GetPrev()) ) - { pFrm->SetRetouche(); - pFrm->Prepare( PREP_WIDOWS_ORPHANS ); - if ( pFrm->IsContentFrm() ) - pFrm->InvalidatePage( pPage ); + if ( nullptr != (pFrame = GetPrev()) ) + { pFrame->SetRetouche(); + pFrame->Prepare( PREP_WIDOWS_ORPHANS ); + if ( pFrame->IsContentFrame() ) + pFrame->InvalidatePage( pPage ); } - // If I am (was) the only FlowFrm in my Upper, then he has to take over + // If I am (was) the only FlowFrame in my Upper, then he has to take over // the retouching. // Furthermore a blank page could have emerged else - { SwRootFrm *pRoot = static_cast<SwRootFrm*>(pPage->GetUpper()); + { SwRootFrame *pRoot = static_cast<SwRootFrame*>(pPage->GetUpper()); pRoot->SetSuperfluous(); GetUpper()->SetCompletePaint(); } } // First remove, then shrink Upper - SwLayoutFrm *pUp = GetUpper(); + SwLayoutFrame *pUp = GetUpper(); if( bRemove ) { RemoveFromLayout(); - if( pUp && !pUp->Lower() && pUp->IsFootnoteFrm() && !pUp->IsColLocked() && + if( pUp && !pUp->Lower() && pUp->IsFootnoteFrame() && !pUp->IsColLocked() && pUp->GetUpper() ) { pUp->Cut(); - SwFrm::DestroyFrm(pUp); + SwFrame::DestroyFrame(pUp); pUp = nullptr; } } - if( pPrepFrm ) - pPrepFrm->Prepare( PREP_FTN ); + if( pPrepFrame ) + pPrepFrame->Prepare( PREP_FTN ); if ( pUp ) { SWRECTFN( this ); - SwTwips nFrmHeight = (Frm().*fnRect->fnGetHeight)(); - if( nFrmHeight > 0 ) + SwTwips nFrameHeight = (Frame().*fnRect->fnGetHeight)(); + if( nFrameHeight > 0 ) { if( !bRemove ) { - (Frm().*fnRect->fnSetHeight)( 0 ); + (Frame().*fnRect->fnSetHeight)( 0 ); (Prt().*fnRect->fnSetHeight)( 0 ); } - pUp->Shrink( nFrmHeight ); + pUp->Shrink( nFrameHeight ); } } } -void SwSectionFrm::Paste( SwFrm* pParent, SwFrm* pSibling ) +void SwSectionFrame::Paste( SwFrame* pParent, SwFrame* pSibling ) { OSL_ENSURE( pParent, "No parent for Paste()." ); - OSL_ENSURE( pParent->IsLayoutFrm(), "Parent is ContentFrm." ); + OSL_ENSURE( pParent->IsLayoutFrame(), "Parent is ContentFrame." ); OSL_ENSURE( pParent != this, "I'm my own parent." ); OSL_ENSURE( pSibling != this, "I'm my own neighbour." ); OSL_ENSURE( !GetPrev() && !GetUpper(), @@ -302,13 +302,13 @@ void SwSectionFrm::Paste( SwFrm* pParent, SwFrm* pSibling ) PROTOCOL( this, PROT_PASTE, 0, GetUpper() ) // Add to the tree - SwSectionFrm* pSect = pParent->FindSctFrm(); + SwSectionFrame* pSect = pParent->FindSctFrame(); // Assure that parent is not inside a table frame, which is inside the found section frame. if ( pSect ) { - SwTabFrm* pTableFrm = pParent->FindTabFrm(); - if ( pTableFrm && - pSect->IsAnLower( pTableFrm ) ) + SwTabFrame* pTableFrame = pParent->FindTabFrame(); + if ( pTableFrame && + pSect->IsAnLower( pTableFrame ) ) { pSect = nullptr; } @@ -317,37 +317,37 @@ void SwSectionFrm::Paste( SwFrm* pParent, SwFrm* pSibling ) SWRECTFN( pParent ) if( pSect && HasToBreak( pSect ) ) { - if( pParent->IsColBodyFrm() ) // dealing with a single-column area + if( pParent->IsColBodyFrame() ) // dealing with a single-column area { // If we are coincidentally at the end of a column, pSibling // has to point to the first frame of the next column in order // for the content of the next column to be moved correctly to the // newly created pSect by the InsertGroup - SwColumnFrm *pCol = static_cast<SwColumnFrm*>(pParent->GetUpper()); - while( !pSibling && nullptr != ( pCol = static_cast<SwColumnFrm*>(pCol->GetNext()) ) ) - pSibling = static_cast<SwLayoutFrm*>(static_cast<SwColumnFrm*>(pCol)->Lower())->Lower(); + SwColumnFrame *pCol = static_cast<SwColumnFrame*>(pParent->GetUpper()); + while( !pSibling && nullptr != ( pCol = static_cast<SwColumnFrame*>(pCol->GetNext()) ) ) + pSibling = static_cast<SwLayoutFrame*>(static_cast<SwColumnFrame*>(pCol)->Lower())->Lower(); if( pSibling ) { // Even worse: every following column content has to // be attached to the pSibling-chain in order to be // taken along - SwFrm *pTmp = pSibling; - while ( nullptr != ( pCol = static_cast<SwColumnFrm*>(pCol->GetNext()) ) ) + SwFrame *pTmp = pSibling; + while ( nullptr != ( pCol = static_cast<SwColumnFrame*>(pCol->GetNext()) ) ) { while ( pTmp->GetNext() ) pTmp = pTmp->GetNext(); - SwFrm* pSave = ::SaveContent( pCol ); + SwFrame* pSave = ::SaveContent( pCol ); if (pSave) ::RestoreContent( pSave, pSibling->GetUpper(), pTmp, true ); } } } pParent = pSect; - pSect = new SwSectionFrm( *static_cast<SwSectionFrm*>(pParent)->GetSection(), pParent ); + pSect = new SwSectionFrame( *static_cast<SwSectionFrame*>(pParent)->GetSection(), pParent ); // if pParent is decomposed into two parts, its Follow has to be attached // to the new second part - pSect->SetFollow( static_cast<SwSectionFrm*>(pParent)->GetFollow() ); - static_cast<SwSectionFrm*>(pParent)->SetFollow( nullptr ); + pSect->SetFollow( static_cast<SwSectionFrame*>(pParent)->GetFollow() ); + static_cast<SwSectionFrame*>(pParent)->SetFollow( nullptr ); if( pSect->GetFollow() ) pParent->_InvalidateSize(); @@ -357,9 +357,9 @@ void SwSectionFrm::Paste( SwFrm* pParent, SwFrm* pSibling ) pSect->Init(); (pSect->*fnRect->fnMakePos)( pSect->GetUpper(), pSect->GetPrev(), true); } - if( !static_cast<SwLayoutFrm*>(pParent)->Lower() ) + if( !static_cast<SwLayoutFrame*>(pParent)->Lower() ) { - SwSectionFrm::MoveContentAndDelete( static_cast<SwSectionFrm*>(pParent), false ); + SwSectionFrame::MoveContentAndDelete( static_cast<SwSectionFrame*>(pParent), false ); pParent = this; } } @@ -367,46 +367,46 @@ void SwSectionFrm::Paste( SwFrm* pParent, SwFrm* pSibling ) InsertGroupBefore( pParent, pSibling, nullptr ); _InvalidateAll(); - SwPageFrm *pPage = FindPageFrm(); + SwPageFrame *pPage = FindPageFrame(); InvalidatePage( pPage ); if ( pSibling ) { pSibling->_InvalidatePos(); pSibling->_InvalidatePrt(); - if ( pSibling->IsContentFrm() ) + if ( pSibling->IsContentFrame() ) pSibling->InvalidatePage( pPage ); } - SwTwips nFrmHeight = (Frm().*fnRect->fnGetHeight)(); - if( nFrmHeight ) - pParent->Grow( nFrmHeight ); + SwTwips nFrameHeight = (Frame().*fnRect->fnGetHeight)(); + if( nFrameHeight ) + pParent->Grow( nFrameHeight ); if ( GetPrev() ) { if ( !IsFollow() ) { GetPrev()->InvalidateSize(); - if ( GetPrev()->IsContentFrm() ) + if ( GetPrev()->IsContentFrame() ) GetPrev()->InvalidatePage( pPage ); } } } /** -|* Here it's decided whether the this-SectionFrm should break up +|* Here it's decided whether the this-SectionFrame should break up |* the passed (Section)frm (or not). |* Initially, all superior sections are broken up. Later on that could |* be made configurable. |*/ -bool SwSectionFrm::HasToBreak( const SwFrm* pFrm ) const +bool SwSectionFrame::HasToBreak( const SwFrame* pFrame ) const { - if( !pFrm->IsSctFrm() ) + if( !pFrame->IsSctFrame() ) return false; const SwSectionFormat *pTmp = static_cast<const SwSectionFormat*>(GetFormat()); - const SwFrameFormat *pOtherFormat = static_cast<const SwSectionFrm*>(pFrm)->GetFormat(); + const SwFrameFormat *pOtherFormat = static_cast<const SwSectionFrame*>(pFrame)->GetFormat(); do { pTmp = pTmp->GetParent(); @@ -418,11 +418,11 @@ bool SwSectionFrm::HasToBreak( const SwFrm* pFrm ) const } /** -|* Merges two SectionFrms, in case it's about the same section. +|* Merges two SectionFrames, in case it's about the same section. |* This can be necessary when a (sub)section is deleted that had |* divided another part into two. |*/ -void SwSectionFrm::MergeNext( SwSectionFrm* pNxt ) +void SwSectionFrame::MergeNext( SwSectionFrame* pNxt ) { if (pNxt->IsDeleteForbidden()) return; @@ -431,18 +431,18 @@ void SwSectionFrm::MergeNext( SwSectionFrm* pNxt ) { PROTOCOL( this, PROT_SECTION, ACT_MERGE, pNxt ) - SwFrm* pTmp = ::SaveContent( pNxt ); + SwFrame* pTmp = ::SaveContent( pNxt ); if( pTmp ) { - SwFrm* pLast = Lower(); - SwLayoutFrm* pLay = this; + SwFrame* pLast = Lower(); + SwLayoutFrame* pLay = this; if( pLast ) { while( pLast->GetNext() ) pLast = pLast->GetNext(); - if( pLast->IsColumnFrm() ) - { // Columns now with BodyFrm - pLay = static_cast<SwLayoutFrm*>(static_cast<SwLayoutFrm*>(pLast)->Lower()); + if( pLast->IsColumnFrame() ) + { // Columns now with BodyFrame + pLay = static_cast<SwLayoutFrame*>(static_cast<SwLayoutFrame*>(pLast)->Lower()); pLast = pLay->Lower(); if( pLast ) while( pLast->GetNext() ) @@ -454,32 +454,32 @@ void SwSectionFrm::MergeNext( SwSectionFrm* pNxt ) SetFollow( pNxt->GetFollow() ); pNxt->SetFollow( nullptr ); pNxt->Cut(); - SwFrm::DestroyFrm(pNxt); + SwFrame::DestroyFrame(pNxt); InvalidateSize(); } } /** -|* Divides a SectionFrm into two parts. The second one starts with the +|* Divides a SectionFrame into two parts. The second one starts with the |* passed frame. |* This is required when inserting an inner section, because the MoveFwd |* cannot have the desired effect within a frame or a table cell. |*/ -bool SwSectionFrm::SplitSect( SwFrm* pFrm, bool bApres ) +bool SwSectionFrame::SplitSect( SwFrame* pFrame, bool bApres ) { - OSL_ENSURE( pFrm, "SplitSect: Why?" ); - SwFrm* pOther = bApres ? pFrm->FindNext() : pFrm->FindPrev(); + OSL_ENSURE( pFrame, "SplitSect: Why?" ); + SwFrame* pOther = bApres ? pFrame->FindNext() : pFrame->FindPrev(); if( !pOther ) return false; - SwSectionFrm* pSect = pOther->FindSctFrm(); + SwSectionFrame* pSect = pOther->FindSctFrame(); if( pSect != this ) return false; // Put the content aside - SwFrm* pSav = ::SaveContent( this, bApres ? pOther : pFrm ); + SwFrame* pSav = ::SaveContent( this, bApres ? pOther : pFrame ); OSL_ENSURE( pSav, "SplitSect: What's on?" ); if( pSav ) // be robust - { // Create a new SctFrm, not as a Follower/master - SwSectionFrm* pNew = new SwSectionFrm( *pSect->GetSection(), pSect ); + { // Create a new SctFrame, not as a Follower/master + SwSectionFrame* pNew = new SwSectionFrame( *pSect->GetSection(), pSect ); pNew->InsertBehind( pSect->GetUpper(), pSect ); pNew->Init(); SWRECTFN( this ) @@ -489,10 +489,10 @@ bool SwSectionFrm::SplitSect( SwFrm* pFrm, bool bApres ) // of the section frame. In the section initialization the columns are // created. { - SwLayoutFrm* pLay = pNew; + SwLayoutFrame* pLay = pNew; // Search for last layout frame, e.g. for columned sections. - while( pLay->Lower() && pLay->Lower()->IsLayoutFrm() ) - pLay = static_cast<SwLayoutFrm*>(pLay->Lower()); + while( pLay->Lower() && pLay->Lower()->IsLayoutFrame() ) + pLay = static_cast<SwLayoutFrame*>(pLay->Lower()); ::RestoreContent( pSav, pLay, nullptr, true ); } _InvalidateSize(); @@ -507,61 +507,61 @@ bool SwSectionFrm::SplitSect( SwFrm* pFrm, bool bApres ) } /** -|* MoveContent is called for destroying a SectionFrms, due to +|* MoveContent is called for destroying a SectionFrames, due to |* the cancellation or hiding of a section, to handle the content. -|* If the SectionFrm hasn't broken up another one, then the content +|* If the SectionFrame hasn't broken up another one, then the content |* is moved to the Upper. Otherwise the content is moved to another -|* SectionFrm, which has to be potentially merged. +|* SectionFrame, which has to be potentially merged. |*/ -// If a multi-column section is cancelled, the ContentFrms have to be +// If a multi-column section is cancelled, the ContentFrames have to be // invalidated -static void lcl_InvalidateInfFlags( SwFrm* pFrm, bool bInva ) +static void lcl_InvalidateInfFlags( SwFrame* pFrame, bool bInva ) { - while ( pFrm ) + while ( pFrame ) { - pFrm->InvalidateInfFlags(); + pFrame->InvalidateInfFlags(); if( bInva ) { - pFrm->_InvalidatePos(); - pFrm->_InvalidateSize(); - pFrm->_InvalidatePrt(); + pFrame->_InvalidatePos(); + pFrame->_InvalidateSize(); + pFrame->_InvalidatePrt(); } - if( pFrm->IsLayoutFrm() ) - lcl_InvalidateInfFlags( static_cast<SwLayoutFrm*>(pFrm)->GetLower(), false ); - pFrm = pFrm->GetNext(); + if( pFrame->IsLayoutFrame() ) + lcl_InvalidateInfFlags( static_cast<SwLayoutFrame*>(pFrame)->GetLower(), false ); + pFrame = pFrame->GetNext(); } } -// Works like SwContentFrm::ImplGetNextContentFrm, but starts with a LayoutFrm -static SwContentFrm* lcl_GetNextContentFrm( const SwLayoutFrm* pLay, bool bFwd ) +// Works like SwContentFrame::ImplGetNextContentFrame, but starts with a LayoutFrame +static SwContentFrame* lcl_GetNextContentFrame( const SwLayoutFrame* pLay, bool bFwd ) { if ( bFwd ) { - if ( pLay->GetNext() && pLay->GetNext()->IsContentFrm() ) - return const_cast<SwContentFrm*>(static_cast<const SwContentFrm*>(pLay->GetNext())); + if ( pLay->GetNext() && pLay->GetNext()->IsContentFrame() ) + return const_cast<SwContentFrame*>(static_cast<const SwContentFrame*>(pLay->GetNext())); } else { - if ( pLay->GetPrev() && pLay->GetPrev()->IsContentFrm() ) - return const_cast<SwContentFrm*>(static_cast<const SwContentFrm*>(pLay->GetPrev())); + if ( pLay->GetPrev() && pLay->GetPrev()->IsContentFrame() ) + return const_cast<SwContentFrame*>(static_cast<const SwContentFrame*>(pLay->GetPrev())); } - const SwFrm* pFrm = pLay; - SwContentFrm *pContentFrm = nullptr; + const SwFrame* pFrame = pLay; + SwContentFrame *pContentFrame = nullptr; bool bGoingUp = true; do { - const SwFrm *p = nullptr; + const SwFrame *p = nullptr; bool bGoingFwdOrBwd = false; - bool bGoingDown = !bGoingUp && ( nullptr != ( p = pFrm->IsLayoutFrm() ? static_cast<const SwLayoutFrm*>(pFrm)->Lower() : nullptr ) ); + bool bGoingDown = !bGoingUp && ( nullptr != ( p = pFrame->IsLayoutFrame() ? static_cast<const SwLayoutFrame*>(pFrame)->Lower() : nullptr ) ); if ( !bGoingDown ) { - bGoingFwdOrBwd = ( nullptr != ( p = pFrm->IsFlyFrm() ? - ( bFwd ? static_cast<const SwFlyFrm*>(pFrm)->GetNextLink() : static_cast<const SwFlyFrm*>(pFrm)->GetPrevLink() ) : - ( bFwd ? pFrm->GetNext() :pFrm->GetPrev() ) ) ); + bGoingFwdOrBwd = ( nullptr != ( p = pFrame->IsFlyFrame() ? + ( bFwd ? static_cast<const SwFlyFrame*>(pFrame)->GetNextLink() : static_cast<const SwFlyFrame*>(pFrame)->GetPrevLink() ) : + ( bFwd ? pFrame->GetNext() :pFrame->GetPrev() ) ) ); if ( !bGoingFwdOrBwd ) { - bGoingUp = (nullptr != (p = pFrm->GetUpper() ) ); + bGoingUp = (nullptr != (p = pFrame->GetUpper() ) ); if ( !bGoingUp ) return nullptr; } @@ -573,45 +573,45 @@ static SwContentFrm* lcl_GetNextContentFrm( const SwLayoutFrm* pLay, bool bFwd ) while ( p->GetNext() ) p = p->GetNext(); - pFrm = p; - } while ( nullptr == (pContentFrm = (pFrm->IsContentFrm() ? const_cast<SwContentFrm*>(static_cast<const SwContentFrm*>(pFrm)) : nullptr) )); + pFrame = p; + } while ( nullptr == (pContentFrame = (pFrame->IsContentFrame() ? const_cast<SwContentFrame*>(static_cast<const SwContentFrame*>(pFrame)) : nullptr) )); - return pContentFrm; + return pContentFrame; } -#define FIRSTLEAF( pLayFrm ) ( ( pLayFrm->Lower() && pLayFrm->Lower()->IsColumnFrm() )\ - ? pLayFrm->GetNextLayoutLeaf() \ - : pLayFrm ) +#define FIRSTLEAF( pLayFrame ) ( ( pLayFrame->Lower() && pLayFrame->Lower()->IsColumnFrame() )\ + ? pLayFrame->GetNextLayoutLeaf() \ + : pLayFrame ) -void SwSectionFrm::MoveContentAndDelete( SwSectionFrm* pDel, bool bSave ) +void SwSectionFrame::MoveContentAndDelete( SwSectionFrame* pDel, bool bSave ) { - bool bSize = pDel->Lower() && pDel->Lower()->IsColumnFrm(); - SwFrm* pPrv = pDel->GetPrev(); - SwLayoutFrm* pUp = pDel->GetUpper(); + bool bSize = pDel->Lower() && pDel->Lower()->IsColumnFrame(); + SwFrame* pPrv = pDel->GetPrev(); + SwLayoutFrame* pUp = pDel->GetUpper(); // OD 27.03.2003 #i12711# - initialize local pointer variables. - SwSectionFrm* pPrvSct = nullptr; - SwSectionFrm* pNxtSct = nullptr; + SwSectionFrame* pPrvSct = nullptr; + SwSectionFrame* pNxtSct = nullptr; SwSectionFormat* pParent = static_cast<SwSectionFormat*>(pDel->GetFormat())->GetParent(); if( pDel->IsInTab() && pParent ) { - SwTabFrm *pTab = pDel->FindTabFrm(); + SwTabFrame *pTab = pDel->FindTabFrame(); // If we are within a table, we can only have broken up sections that // are inside as well, but not a section that contains the whole table. - if( pTab->IsInSct() && pParent == pTab->FindSctFrm()->GetFormat() ) + if( pTab->IsInSct() && pParent == pTab->FindSctFrame()->GetFormat() ) pParent = nullptr; } // If our Format has a parent, we have probably broken up another - // SectionFrm, which has to be checked. To do so we first acquire the - // succeeding and the preceding ContentFrm, let's see if they - // lay in the SectionFrms. + // SectionFrame, which has to be checked. To do so we first acquire the + // succeeding and the preceding ContentFrame, let's see if they + // lay in the SectionFrames. // OD 27.03.2003 #i12711# - check, if previous and next section belonging // together and can be joined, *not* only if deleted section contains content. if ( pParent ) { - SwFrm* pPrvContent = lcl_GetNextContentFrm( pDel, false ); - pPrvSct = pPrvContent ? pPrvContent->FindSctFrm() : nullptr; - SwFrm* pNxtContent = lcl_GetNextContentFrm( pDel, true ); - pNxtSct = pNxtContent ? pNxtContent->FindSctFrm() : nullptr; + SwFrame* pPrvContent = lcl_GetNextContentFrame( pDel, false ); + pPrvSct = pPrvContent ? pPrvContent->FindSctFrame() : nullptr; + SwFrame* pNxtContent = lcl_GetNextContentFrame( pDel, true ); + pNxtSct = pNxtContent ? pNxtContent->FindSctFrame() : nullptr; } else { @@ -620,15 +620,15 @@ void SwSectionFrm::MoveContentAndDelete( SwSectionFrm* pDel, bool bSave ) } // Now the content is put aside and the frame is destroyed - SwFrm *pSave = bSave ? ::SaveContent( pDel ) : nullptr; + SwFrame *pSave = bSave ? ::SaveContent( pDel ) : nullptr; bool bOldFootnote = true; - if( pSave && pUp->IsFootnoteFrm() ) + if( pSave && pUp->IsFootnoteFrame() ) { - bOldFootnote = static_cast<SwFootnoteFrm*>(pUp)->IsColLocked(); - static_cast<SwFootnoteFrm*>(pUp)->ColLock(); + bOldFootnote = static_cast<SwFootnoteFrame*>(pUp)->IsColLocked(); + static_cast<SwFootnoteFrame*>(pUp)->ColLock(); } pDel->DelEmpty( true ); - SwFrm::DestroyFrm(pDel); + SwFrame::DestroyFrame(pDel); if( pParent ) { // Search for the appropriate insert position if( pNxtSct && pNxtSct->GetFormat() == pParent ) @@ -641,11 +641,11 @@ void SwSectionFrm::MoveContentAndDelete( SwSectionFrm* pDel, bool bSave ) else if( pPrvSct && pPrvSct->GetFormat() == pParent ) { // Wonderful, here we can insert ourselves at the end pUp = pPrvSct; - if( pUp->Lower() && pUp->Lower()->IsColumnFrm() ) + if( pUp->Lower() && pUp->Lower()->IsColumnFrame() ) { - pUp = static_cast<SwLayoutFrm*>(pUp->GetLastLower()); + pUp = static_cast<SwLayoutFrame*>(pUp->GetLastLower()); // The body of the last column - pUp = static_cast<SwLayoutFrm*>(pUp->Lower()); + pUp = static_cast<SwLayoutFrame*>(pUp->Lower()); } // In order to perform the insertion after the last one pPrv = pUp->GetLastLower(); @@ -660,7 +660,7 @@ void SwSectionFrm::MoveContentAndDelete( SwSectionFrm* pDel, bool bSave ) // that derives from the same Parent. // In that case, there's not (yet) a part of our parent available // that can store the content, so we create it here. - pPrvSct = new SwSectionFrm( *pParent->GetSection(), pUp ); + pPrvSct = new SwSectionFrame( *pParent->GetSection(), pUp ); pPrvSct->InsertBehind( pUp, pPrv ); pPrvSct->Init(); SWRECTFN( pUp ) @@ -676,9 +676,9 @@ void SwSectionFrm::MoveContentAndDelete( SwSectionFrm* pDel, bool bSave ) { lcl_InvalidateInfFlags( pSave, bSize ); ::RestoreContent( pSave, pUp, pPrv, true ); - pUp->FindPageFrm()->InvalidateContent(); + pUp->FindPageFrame()->InvalidateContent(); if( !bOldFootnote ) - static_cast<SwFootnoteFrm*>(pUp)->ColUnlock(); + static_cast<SwFootnoteFrame*>(pUp)->ColUnlock(); } // Now two parts of the superior section could possibly be merged if( pPrvSct && !pPrvSct->IsJoinLocked() ) @@ -688,14 +688,14 @@ void SwSectionFrm::MoveContentAndDelete( SwSectionFrm* pDel, bool bSave ) } } -void SwSectionFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) +void SwSectionFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/) { if ( IsJoinLocked() || IsColLocked() || StackHack::IsLocked() || StackHack::Count() > 50 ) return; if( !m_pSection ) // Via DelEmpty { #ifdef DBG_UTIL - OSL_ENSURE( getRootFrm()->IsInDelList( this ), "SectionFrm without Section" ); + OSL_ENSURE( getRootFrame()->IsInDelList( this ), "SectionFrame without Section" ); #endif if( !mbValidPos ) { @@ -712,21 +712,21 @@ void SwSectionFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) while( GetNext() && GetNext() == GetFollow() ) { - const SwFrm* pFoll = GetFollow(); - MergeNext( static_cast<SwSectionFrm*>(GetNext()) ); + const SwFrame* pFoll = GetFollow(); + MergeNext( static_cast<SwSectionFrame*>(GetNext()) ); if( pFoll == GetFollow() ) break; } // OD 2004-03-15 #116561# - In online layout join the follows, if section // can grow. - const SwViewShell *pSh = getRootFrm()->GetCurrShell(); + const SwViewShell *pSh = getRootFrame()->GetCurrShell(); if( pSh && pSh->GetViewOptions()->getBrowseMode() && ( Grow( LONG_MAX, true ) > 0 ) ) { while( GetFollow() ) { - const SwFrm* pFoll = GetFollow(); + const SwFrame* pFoll = GetFollow(); MergeNext( GetFollow() ); if( pFoll == GetFollow() ) break; @@ -742,19 +742,19 @@ void SwSectionFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/) const SwFormatCol &rCol = GetFormat()->GetCol(); (void)rCol; #endif - SwLayoutFrm::MakeAll(getRootFrm()->GetCurrShell()->GetOut()); + SwLayoutFrame::MakeAll(getRootFrame()->GetCurrShell()->GetOut()); UnlockJoin(); if( m_pSection && IsSuperfluous() ) DelEmpty( false ); } -bool SwSectionFrm::ShouldBwdMoved( SwLayoutFrm *, bool , bool & ) +bool SwSectionFrame::ShouldBwdMoved( SwLayoutFrame *, bool , bool & ) { OSL_FAIL( "Hups, wo ist meine Tarnkappe?" ); return false; } -const SwSectionFormat* SwSectionFrm::_GetEndSectFormat() const +const SwSectionFormat* SwSectionFrame::_GetEndSectFormat() const { const SwSectionFormat *pFormat = m_pSection->GetFormat(); while( !pFormat->GetEndAtTextEnd().IsAtEnd() ) @@ -767,41 +767,41 @@ const SwSectionFormat* SwSectionFrm::_GetEndSectFormat() const return pFormat; } -static void lcl_FindContentFrm( SwContentFrm* &rpContentFrm, SwFootnoteFrm* &rpFootnoteFrm, - SwFrm* pFrm, bool &rbChkFootnote ) +static void lcl_FindContentFrame( SwContentFrame* &rpContentFrame, SwFootnoteFrame* &rpFootnoteFrame, + SwFrame* pFrame, bool &rbChkFootnote ) { - if( pFrm ) + if( pFrame ) { - while( pFrm->GetNext() ) - pFrm = pFrm->GetNext(); - while( !rpContentFrm && pFrm ) + while( pFrame->GetNext() ) + pFrame = pFrame->GetNext(); + while( !rpContentFrame && pFrame ) { - if( pFrm->IsContentFrm() ) - rpContentFrm = static_cast<SwContentFrm*>(pFrm); - else if( pFrm->IsLayoutFrm() ) + if( pFrame->IsContentFrame() ) + rpContentFrame = static_cast<SwContentFrame*>(pFrame); + else if( pFrame->IsLayoutFrame() ) { - if( pFrm->IsFootnoteFrm() ) + if( pFrame->IsFootnoteFrame() ) { if( rbChkFootnote ) { - rpFootnoteFrm = static_cast<SwFootnoteFrm*>(pFrm); - rbChkFootnote = rpFootnoteFrm->GetAttr()->GetFootnote().IsEndNote(); + rpFootnoteFrame = static_cast<SwFootnoteFrame*>(pFrame); + rbChkFootnote = rpFootnoteFrame->GetAttr()->GetFootnote().IsEndNote(); } } else - lcl_FindContentFrm( rpContentFrm, rpFootnoteFrm, - static_cast<SwLayoutFrm*>(pFrm)->Lower(), rbChkFootnote ); + lcl_FindContentFrame( rpContentFrame, rpFootnoteFrame, + static_cast<SwLayoutFrame*>(pFrame)->Lower(), rbChkFootnote ); } - pFrm = pFrm->GetPrev(); + pFrame = pFrame->GetPrev(); } } } -SwContentFrm *SwSectionFrm::FindLastContent( sal_uInt8 nMode ) +SwContentFrame *SwSectionFrame::FindLastContent( sal_uInt8 nMode ) { - SwContentFrm *pRet = nullptr; - SwFootnoteFrm *pFootnoteFrm = nullptr; - SwSectionFrm *pSect = this; + SwContentFrame *pRet = nullptr; + SwFootnoteFrame *pFootnoteFrame = nullptr; + SwSectionFrame *pSect = this; if( nMode ) { const SwSectionFormat *pFormat = IsEndnAtEnd() ? GetEndSectFormat() : @@ -809,13 +809,13 @@ SwContentFrm *SwSectionFrm::FindLastContent( sal_uInt8 nMode ) do { while( pSect->HasFollow() ) pSect = pSect->GetFollow(); - SwFrm* pTmp = pSect->FindNext(); - while( pTmp && pTmp->IsSctFrm() && - !static_cast<SwSectionFrm*>(pTmp)->GetSection() ) + SwFrame* pTmp = pSect->FindNext(); + while( pTmp && pTmp->IsSctFrame() && + !static_cast<SwSectionFrame*>(pTmp)->GetSection() ) pTmp = pTmp->FindNext(); - if( pTmp && pTmp->IsSctFrm() && - static_cast<SwSectionFrm*>(pTmp)->IsDescendantFrom( pFormat ) ) - pSect = static_cast<SwSectionFrm*>(pTmp); + if( pTmp && pTmp->IsSctFrame() && + static_cast<SwSectionFrame*>(pTmp)->IsDescendantFrom( pFormat ) ) + pSect = static_cast<SwSectionFrame*>(pTmp); else break; } while( true ); @@ -823,24 +823,24 @@ SwContentFrm *SwSectionFrm::FindLastContent( sal_uInt8 nMode ) bool bFootnoteFound = nMode == FINDMODE_ENDNOTE; do { - lcl_FindContentFrm( pRet, pFootnoteFrm, pSect->Lower(), bFootnoteFound ); + lcl_FindContentFrame( pRet, pFootnoteFrame, pSect->Lower(), bFootnoteFound ); if( pRet || !pSect->IsFollow() || !nMode || ( FINDMODE_MYLAST == nMode && this == pSect ) ) break; pSect = pSect->FindMaster(); } while( pSect ); - if( ( nMode == FINDMODE_ENDNOTE ) && pFootnoteFrm ) - pRet = pFootnoteFrm->ContainsContent(); + if( ( nMode == FINDMODE_ENDNOTE ) && pFootnoteFrame ) + pRet = pFootnoteFrame->ContainsContent(); return pRet; } -bool SwSectionFrm::CalcMinDiff( SwTwips& rMinDiff ) const +bool SwSectionFrame::CalcMinDiff( SwTwips& rMinDiff ) const { if( ToMaximize( true ) ) { SWRECTFN( this ) rMinDiff = (GetUpper()->*fnRect->fnGetPrtBottom)(); - rMinDiff = (Frm().*fnRect->fnBottomDist)( rMinDiff ); + rMinDiff = (Frame().*fnRect->fnBottomDist)( rMinDiff ); return true; } return false; @@ -849,36 +849,36 @@ bool SwSectionFrm::CalcMinDiff( SwTwips& rMinDiff ) const /** * CollectEndnotes looks for endnotes in the sectionfrm and his follows, * the endnotes will cut off the layout and put into the array. - * If the first endnote is not a master-SwFootnoteFrm, the whole sectionfrm + * If the first endnote is not a master-SwFootnoteFrame, the whole sectionfrm * contains only endnotes and it is not necessary to collect them. */ -static SwFootnoteFrm* lcl_FindEndnote( SwSectionFrm* &rpSect, bool &rbEmpty, +static SwFootnoteFrame* lcl_FindEndnote( SwSectionFrame* &rpSect, bool &rbEmpty, SwLayouter *pLayouter ) { // if rEmpty is set, the rpSect is already searched - SwSectionFrm* pSect = rbEmpty ? rpSect->GetFollow() : rpSect; + SwSectionFrame* pSect = rbEmpty ? rpSect->GetFollow() : rpSect; while( pSect ) { - OSL_ENSURE( (pSect->Lower() && pSect->Lower()->IsColumnFrm()) || pSect->GetUpper()->IsFootnoteFrm(), + OSL_ENSURE( (pSect->Lower() && pSect->Lower()->IsColumnFrame()) || pSect->GetUpper()->IsFootnoteFrame(), "InsertEndnotes: Where's my column?" ); // i73332: Columned section in endnote - SwColumnFrm* pCol = nullptr; - if(pSect->Lower() && pSect->Lower()->IsColumnFrm()) - pCol = static_cast<SwColumnFrm*>(pSect->Lower()); + SwColumnFrame* pCol = nullptr; + if(pSect->Lower() && pSect->Lower()->IsColumnFrame()) + pCol = static_cast<SwColumnFrame*>(pSect->Lower()); while( pCol ) // check all columns { - SwFootnoteContFrm* pFootnoteCont = pCol->FindFootnoteCont(); + SwFootnoteContFrame* pFootnoteCont = pCol->FindFootnoteCont(); if( pFootnoteCont ) { - SwFootnoteFrm* pRet = static_cast<SwFootnoteFrm*>(pFootnoteCont->Lower()); + SwFootnoteFrame* pRet = static_cast<SwFootnoteFrame*>(pFootnoteCont->Lower()); while( pRet ) // look for endnotes { /* CollectEndNode can destroy pRet so we need to get the next early */ - SwFootnoteFrm* pRetNext = static_cast<SwFootnoteFrm*>(pRet->GetNext()); + SwFootnoteFrame* pRetNext = static_cast<SwFootnoteFrame*>(pRet->GetNext()); if( pRet->GetAttr()->GetFootnote().IsEndNote() ) { if( pRet->GetMaster() ) @@ -894,7 +894,7 @@ static SwFootnoteFrm* lcl_FindEndnote( SwSectionFrm* &rpSect, bool &rbEmpty, pRet = pRetNext; } } - pCol = static_cast<SwColumnFrm*>(pCol->GetNext()); + pCol = static_cast<SwColumnFrame*>(pCol->GetNext()); } rpSect = pSect; pSect = pLayouter ? pSect->GetFollow() : nullptr; @@ -903,23 +903,23 @@ static SwFootnoteFrm* lcl_FindEndnote( SwSectionFrm* &rpSect, bool &rbEmpty, return nullptr; } -static void lcl_ColumnRefresh( SwSectionFrm* pSect, bool bFollow ) +static void lcl_ColumnRefresh( SwSectionFrame* pSect, bool bFollow ) { - vcl::RenderContext* pRenderContext = pSect->getRootFrm()->GetCurrShell()->GetOut(); + vcl::RenderContext* pRenderContext = pSect->getRootFrame()->GetCurrShell()->GetOut(); while( pSect ) { bool bOldLock = pSect->IsColLocked(); pSect->ColLock(); - if( pSect->Lower() && pSect->Lower()->IsColumnFrm() ) + if( pSect->Lower() && pSect->Lower()->IsColumnFrame() ) { - SwColumnFrm *pCol = static_cast<SwColumnFrm*>(pSect->Lower()); + SwColumnFrame *pCol = static_cast<SwColumnFrame*>(pSect->Lower()); do { pCol->_InvalidateSize(); pCol->_InvalidatePos(); - static_cast<SwLayoutFrm*>(pCol)->Lower()->_InvalidateSize(); + static_cast<SwLayoutFrame*>(pCol)->Lower()->_InvalidateSize(); pCol->Calc(pRenderContext); // calculation of column and - static_cast<SwLayoutFrm*>(pCol)->Lower()->Calc(pRenderContext); // body - pCol = static_cast<SwColumnFrm*>(pCol->GetNext()); + static_cast<SwLayoutFrame*>(pCol)->Lower()->Calc(pRenderContext); // body + pCol = static_cast<SwColumnFrame*>(pCol->GetNext()); } while ( pCol ); } if( !bOldLock ) @@ -931,14 +931,14 @@ static void lcl_ColumnRefresh( SwSectionFrm* pSect, bool bFollow ) } } -void SwSectionFrm::CollectEndnotes( SwLayouter* pLayouter ) +void SwSectionFrame::CollectEndnotes( SwLayouter* pLayouter ) { OSL_ENSURE( IsColLocked(), "CollectEndnotes: You love the risk?" ); // i73332: Section in footnode does not have columns! - OSL_ENSURE( (Lower() && Lower()->IsColumnFrm()) || GetUpper()->IsFootnoteFrm(), "Where's my column?" ); + OSL_ENSURE( (Lower() && Lower()->IsColumnFrame()) || GetUpper()->IsFootnoteFrame(), "Where's my column?" ); - SwSectionFrm* pSect = this; - SwFootnoteFrm* pFootnote; + SwSectionFrame* pSect = this; + SwFootnoteFrame* pFootnote; bool bEmpty = false; // pSect is the last sectionfrm without endnotes or the this-pointer // the first sectionfrm with endnotes may be destroyed, when the endnotes @@ -959,15 +959,15 @@ void SwSectionFrm::CollectEndnotes( SwLayouter* pLayouter ) |* |* @note: perform calculation of content, only if height has changed (OD 18.09.2002 #100522#) |*/ -void SwSectionFrm::_CheckClipping( bool bGrow, bool bMaximize ) +void SwSectionFrame::_CheckClipping( bool bGrow, bool bMaximize ) { SWRECTFN( this ) long nDiff; SwTwips nDeadLine = (GetUpper()->*fnRect->fnGetPrtBottom)(); - if( bGrow && ( !IsInFly() || !GetUpper()->IsColBodyFrm() || - !FindFlyFrm()->IsLocked() ) ) + if( bGrow && ( !IsInFly() || !GetUpper()->IsColBodyFrame() || + !FindFlyFrame()->IsLocked() ) ) { - nDiff = -(Frm().*fnRect->fnBottomDist)( nDeadLine ); + nDiff = -(Frame().*fnRect->fnBottomDist)( nDeadLine ); if( !bMaximize ) nDiff += Undersize(); if( nDiff > 0 ) @@ -979,26 +979,26 @@ void SwSectionFrm::_CheckClipping( bool bGrow, bool bMaximize ) nDeadLine += nAdd; } } - nDiff = -(Frm().*fnRect->fnBottomDist)( nDeadLine ); + nDiff = -(Frame().*fnRect->fnBottomDist)( nDeadLine ); SetUndersized( !bMaximize && nDiff >= 0 ); const bool bCalc = ( IsUndersized() || bMaximize ) && ( nDiff || - (Prt().*fnRect->fnGetTop)() > (Frm().*fnRect->fnGetHeight)() ); + (Prt().*fnRect->fnGetTop)() > (Frame().*fnRect->fnGetHeight)() ); // OD 03.11.2003 #i19737# - introduce local variable <bExtraCalc> to indicate // that a calculation has to be done beside the value of <bCalc>. bool bExtraCalc = false; if( !bCalc && !bGrow && IsAnyNoteAtEnd() && !IsInFootnote() ) { - SwSectionFrm *pSect = this; + SwSectionFrame *pSect = this; bool bEmpty = false; - SwLayoutFrm* pFootnote = IsEndnAtEnd() ? + SwLayoutFrame* pFootnote = IsEndnAtEnd() ? lcl_FindEndnote( pSect, bEmpty, nullptr ) : nullptr; if( pFootnote ) { - pFootnote = pFootnote->FindFootnoteBossFrm(); - SwFrm* pTmp = FindLastContent( FINDMODE_LASTCNT ); - // OD 08.11.2002 #104840# - use <SwLayoutFrm::IsBefore(..)> - if ( pTmp && pFootnote->IsBefore( pTmp->FindFootnoteBossFrm() ) ) + pFootnote = pFootnote->FindFootnoteBossFrame(); + SwFrame* pTmp = FindLastContent( FINDMODE_LASTCNT ); + // OD 08.11.2002 #104840# - use <SwLayoutFrame::IsBefore(..)> + if ( pTmp && pFootnote->IsBefore( pTmp->FindFootnoteBossFrame() ) ) bExtraCalc = true; } else if( GetFollow() && !GetFollow()->ContainsAny() ) @@ -1006,13 +1006,13 @@ void SwSectionFrm::_CheckClipping( bool bGrow, bool bMaximize ) } if ( bCalc || bExtraCalc ) { - nDiff = (*fnRect->fnYDiff)( nDeadLine, (Frm().*fnRect->fnGetTop)() ); + nDiff = (*fnRect->fnYDiff)( nDeadLine, (Frame().*fnRect->fnGetTop)() ); if( nDiff < 0 ) - nDeadLine = (Frm().*fnRect->fnGetTop)(); + nDeadLine = (Frame().*fnRect->fnGetTop)(); const Size aOldSz( Prt().SSize() ); long nTop = (this->*fnRect->fnGetTopMargin)(); - (Frm().*fnRect->fnSetBottom)( nDeadLine ); - nDiff = (Frm().*fnRect->fnGetHeight)(); + (Frame().*fnRect->fnSetBottom)( nDeadLine ); + nDiff = (Frame().*fnRect->fnGetHeight)(); if( nTop > nDiff ) nTop = nDiff; (this->*fnRect->fnSetYMargins)( nTop, 0 ); @@ -1032,7 +1032,7 @@ void SwSectionFrm::_CheckClipping( bool bGrow, bool bMaximize ) // no content except footnotes/endnotes, the content has also been calculated. if ( ( bHeightChanged || bExtraCalc ) && Lower() ) { - if( Lower()->IsColumnFrm() ) + if( Lower()->IsColumnFrame() ) { lcl_ColumnRefresh( this, false ); ::CalcContent( this ); @@ -1047,7 +1047,7 @@ void SwSectionFrm::_CheckClipping( bool bGrow, bool bMaximize ) } } -void SwSectionFrm::SimpleFormat() +void SwSectionFrame::SimpleFormat() { if ( IsJoinLocked() || IsColLocked() ) return; @@ -1063,10 +1063,10 @@ void SwSectionFrm::SimpleFormat() SwTwips nDeadLine = (GetUpper()->*fnRect->fnGetPrtBottom)(); // OD 22.10.2002 #97265# - call always method <lcl_ColumnRefresh(..)>, in // order to get calculated lowers, not only if there space left in its upper. - if( (Frm().*fnRect->fnBottomDist)( nDeadLine ) >= 0 ) + if( (Frame().*fnRect->fnBottomDist)( nDeadLine ) >= 0 ) { - (Frm().*fnRect->fnSetBottom)( nDeadLine ); - long nHeight = (Frm().*fnRect->fnGetHeight)(); + (Frame().*fnRect->fnSetBottom)( nDeadLine ); + long nHeight = (Frame().*fnRect->fnGetHeight)(); long nTop = CalcUpperSpace(); if( nTop > nHeight ) nTop = nHeight; @@ -1081,12 +1081,12 @@ void SwSectionFrm::SimpleFormat() class ExtraFormatToPositionObjs { private: - SwSectionFrm* mpSectFrm; + SwSectionFrame* mpSectFrame; bool mbExtraFormatPerformed; public: - explicit ExtraFormatToPositionObjs( SwSectionFrm& _rSectFrm) - : mpSectFrm( &_rSectFrm ), + explicit ExtraFormatToPositionObjs( SwSectionFrame& _rSectFrame) + : mpSectFrame( &_rSectFrame ), mbExtraFormatPerformed( false ) {} @@ -1095,15 +1095,15 @@ class ExtraFormatToPositionObjs if ( mbExtraFormatPerformed ) { // release keep locked position of lower floating screen objects - SwPageFrm* pPageFrm = mpSectFrm->FindPageFrm(); - SwSortedObjs* pObjs = pPageFrm ? pPageFrm->GetSortedObjs() : nullptr; + SwPageFrame* pPageFrame = mpSectFrame->FindPageFrame(); + SwSortedObjs* pObjs = pPageFrame ? pPageFrame->GetSortedObjs() : nullptr; if ( pObjs ) { for ( size_t i = 0; i < pObjs->size(); ++i ) { SwAnchoredObject* pAnchoredObj = (*pObjs)[i]; - if ( mpSectFrm->IsAnLower( pAnchoredObj->GetAnchorFrm() ) ) + if ( mpSectFrame->IsAnLower( pAnchoredObj->GetAnchorFrame() ) ) { pAnchoredObj->SetKeepPosLocked( false ); } @@ -1113,9 +1113,9 @@ class ExtraFormatToPositionObjs } // #i81555# - void InitObjs( SwFrm& rFrm ) + void InitObjs( SwFrame& rFrame ) { - SwSortedObjs* pObjs = rFrm.GetDrawObjs(); + SwSortedObjs* pObjs = rFrame.GetDrawObjs(); if ( pObjs ) { for ( size_t i = 0; i < pObjs->size(); ++i ) @@ -1126,54 +1126,54 @@ class ExtraFormatToPositionObjs pAnchoredObj->SetClearedEnvironment( false ); } } - SwLayoutFrm* pLayoutFrm = dynamic_cast<SwLayoutFrm*>(&rFrm); - if ( pLayoutFrm != nullptr ) + SwLayoutFrame* pLayoutFrame = dynamic_cast<SwLayoutFrame*>(&rFrame); + if ( pLayoutFrame != nullptr ) { - SwFrm* pLowerFrm = pLayoutFrm->GetLower(); - while ( pLowerFrm != nullptr ) + SwFrame* pLowerFrame = pLayoutFrame->GetLower(); + while ( pLowerFrame != nullptr ) { - InitObjs( *pLowerFrm ); + InitObjs( *pLowerFrame ); - pLowerFrm = pLowerFrm->GetNext(); + pLowerFrame = pLowerFrame->GetNext(); } } } void FormatSectionToPositionObjs() { - vcl::RenderContext* pRenderContext = mpSectFrm->getRootFrm()->GetCurrShell()->GetOut(); + vcl::RenderContext* pRenderContext = mpSectFrame->getRootFrame()->GetCurrShell()->GetOut(); // perform extra format for multi-columned section. - if ( mpSectFrm->Lower() && mpSectFrm->Lower()->IsColumnFrm() && - mpSectFrm->Lower()->GetNext() ) + if ( mpSectFrame->Lower() && mpSectFrame->Lower()->IsColumnFrame() && + mpSectFrame->Lower()->GetNext() ) { // grow section till bottom of printing area of upper frame - SWRECTFN( mpSectFrm ); - SwTwips nTopMargin = (mpSectFrm->*fnRect->fnGetTopMargin)(); - Size aOldSectPrtSize( mpSectFrm->Prt().SSize() ); - SwTwips nDiff = (mpSectFrm->Frm().*fnRect->fnBottomDist)( - (mpSectFrm->GetUpper()->*fnRect->fnGetPrtBottom)() ); - (mpSectFrm->Frm().*fnRect->fnAddBottom)( nDiff ); - (mpSectFrm->*fnRect->fnSetYMargins)( nTopMargin, 0 ); + SWRECTFN( mpSectFrame ); + SwTwips nTopMargin = (mpSectFrame->*fnRect->fnGetTopMargin)(); + Size aOldSectPrtSize( mpSectFrame->Prt().SSize() ); + SwTwips nDiff = (mpSectFrame->Frame().*fnRect->fnBottomDist)( + (mpSectFrame->GetUpper()->*fnRect->fnGetPrtBottom)() ); + (mpSectFrame->Frame().*fnRect->fnAddBottom)( nDiff ); + (mpSectFrame->*fnRect->fnSetYMargins)( nTopMargin, 0 ); // #i59789# // suppress formatting, if printing area of section is too narrow - if ( (mpSectFrm->Prt().*fnRect->fnGetHeight)() <= 0 ) + if ( (mpSectFrame->Prt().*fnRect->fnGetHeight)() <= 0 ) { return; } - mpSectFrm->ChgLowersProp( aOldSectPrtSize ); + mpSectFrame->ChgLowersProp( aOldSectPrtSize ); // format column frames and its body and footnote container - SwColumnFrm* pColFrm = static_cast<SwColumnFrm*>(mpSectFrm->Lower()); - while ( pColFrm ) + SwColumnFrame* pColFrame = static_cast<SwColumnFrame*>(mpSectFrame->Lower()); + while ( pColFrame ) { - pColFrm->Calc(pRenderContext); - pColFrm->Lower()->Calc(pRenderContext); - if ( pColFrm->Lower()->GetNext() ) + pColFrame->Calc(pRenderContext); + pColFrame->Lower()->Calc(pRenderContext); + if ( pColFrame->Lower()->GetNext() ) { - pColFrm->Lower()->GetNext()->Calc(pRenderContext); + pColFrame->Lower()->GetNext()->Calc(pRenderContext); } - pColFrm = static_cast<SwColumnFrm*>(pColFrm->GetNext()); + pColFrame = static_cast<SwColumnFrame*>(pColFrame->GetNext()); } // unlock position of lower floating screen objects for the extra format @@ -1181,23 +1181,23 @@ class ExtraFormatToPositionObjs // Section frame can already have changed the page and its content // can still be on the former page. // Thus, initialize objects via lower-relationship - InitObjs( *mpSectFrm ); + InitObjs( *mpSectFrame ); // format content - first with collecting its foot-/endnotes before content // format, second without collecting its foot-/endnotes. - ::CalcContent( mpSectFrm ); - ::CalcContent( mpSectFrm, true ); + ::CalcContent( mpSectFrame ); + ::CalcContent( mpSectFrame, true ); // keep locked position of lower floating screen objects - SwPageFrm* pPageFrm = mpSectFrm->FindPageFrm(); - SwSortedObjs* pObjs = pPageFrm ? pPageFrm->GetSortedObjs() : nullptr; + SwPageFrame* pPageFrame = mpSectFrame->FindPageFrame(); + SwSortedObjs* pObjs = pPageFrame ? pPageFrame->GetSortedObjs() : nullptr; if ( pObjs ) { for ( size_t i = 0; i < pObjs->size(); ++i ) { SwAnchoredObject* pAnchoredObj = (*pObjs)[i]; - if ( mpSectFrm->IsAnLower( pAnchoredObj->GetAnchorFrm() ) ) + if ( mpSectFrame->IsAnLower( pAnchoredObj->GetAnchorFrame() ) ) { pAnchoredObj->SetKeepPosLocked( true ); } @@ -1209,13 +1209,13 @@ class ExtraFormatToPositionObjs } }; -/// "formats" the frame; Frm and PrtArea -void SwSectionFrm::Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttr ) +/// "formats" the frame; Frame and PrtArea +void SwSectionFrame::Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttr ) { if( !m_pSection ) // via DelEmpty { #ifdef DBG_UTIL - OSL_ENSURE( getRootFrm()->IsInDelList( this ), "SectionFrm without Section" ); + OSL_ENSURE( getRootFrame()->IsInDelList( this ), "SectionFrame without Section" ); #endif mbValidSize = mbValidPos = mbValidPrtArea = true; return; @@ -1234,7 +1234,7 @@ void SwSectionFrm::Format( vcl::RenderContext* pRenderContext, const SwBorderAtt if( nUpper != (this->*fnRect->fnGetTopMargin)() ) { mbValidSize = false; - SwFrm* pOwn = ContainsAny(); + SwFrame* pOwn = ContainsAny(); if( pOwn ) pOwn->_InvalidatePos(); } @@ -1244,13 +1244,13 @@ void SwSectionFrm::Format( vcl::RenderContext* pRenderContext, const SwBorderAtt if ( !mbValidSize ) { PROTOCOL_ENTER( this, PROT_SIZE, 0, nullptr ) - const long nOldHeight = (Frm().*fnRect->fnGetHeight)(); + const long nOldHeight = (Frame().*fnRect->fnGetHeight)(); bool bOldLock = IsColLocked(); ColLock(); mbValidSize = true; - // The size is only determined by the content, if the SectFrm does not have a + // The size is only determined by the content, if the SectFrame does not have a // Follow. Otherwise it fills (occupies) the Upper down to the lower edge. // It is not responsible for the text flow, but the content is. bool bMaximize = ToMaximize( false ); @@ -1273,14 +1273,14 @@ void SwSectionFrm::Format( vcl::RenderContext* pRenderContext, const SwBorderAtt // Column widths have to be adjusted before calling _CheckClipping. // _CheckClipping can cause the formatting of the lower frames // which still have a width of 0. - const bool bHasColumns = Lower() && Lower()->IsColumnFrm(); + const bool bHasColumns = Lower() && Lower()->IsColumnFrame(); if ( bHasColumns && Lower()->GetNext() ) AdjustColumns( nullptr, false ); if( GetUpper() ) { long nWidth = (GetUpper()->Prt().*fnRect->fnGetWidth)(); - (maFrm.*fnRect->fnSetWidth)( nWidth ); + (maFrame.*fnRect->fnSetWidth)( nWidth ); // #109700# LRSpace for sections const SvxLRSpaceItem& rLRSpace = GetFormat()->GetLRSpace(); @@ -1290,7 +1290,7 @@ void SwSectionFrm::Format( vcl::RenderContext* pRenderContext, const SwBorderAtt // OD 15.10.2002 #103517# - allow grow in online layout // Thus, set <..IsBrowseMode()> as parameter <bGrow> on calling // method <_CheckClipping(..)>. - const SwViewShell *pSh = getRootFrm()->GetCurrShell(); + const SwViewShell *pSh = getRootFrame()->GetCurrShell(); _CheckClipping( pSh && pSh->GetViewOptions()->getBrowseMode(), bMaximize ); bMaximize = ToMaximize( false ); mbValidSize = true; @@ -1298,19 +1298,19 @@ void SwSectionFrm::Format( vcl::RenderContext* pRenderContext, const SwBorderAtt // Check the width of the columns and adjust if necessary if ( bHasColumns && ! Lower()->GetNext() && bMaximize ) - static_cast<SwColumnFrm*>(Lower())->Lower()->Calc(pRenderContext); + static_cast<SwColumnFrame*>(Lower())->Lower()->Calc(pRenderContext); if ( !bMaximize ) { SwTwips nRemaining = (this->*fnRect->fnGetTopMargin)(); - SwFrm *pFrm = m_pLower; - if( pFrm ) + SwFrame *pFrame = m_pLower; + if( pFrame ) { - if( pFrm->IsColumnFrm() && pFrm->GetNext() ) + if( pFrame->IsColumnFrame() && pFrame->GetNext() ) { // #i61435# // suppress formatting, if upper frame has height <= 0 - if ( (GetUpper()->Frm().*fnRect->fnGetHeight)() > 0 ) + if ( (GetUpper()->Frame().*fnRect->fnGetHeight)() > 0 ) { FormatWidthCols( *pAttr, nRemaining, MINLAY ); } @@ -1319,40 +1319,40 @@ void SwSectionFrm::Format( vcl::RenderContext* pRenderContext, const SwBorderAtt while( HasFollow() && !GetFollow()->ContainsContent() && !GetFollow()->ContainsAny( true ) ) { - SwFrm* pOld = GetFollow(); + SwFrame* pOld = GetFollow(); GetFollow()->DelEmpty( false ); if( pOld == GetFollow() ) break; } bMaximize = ToMaximize( false ); - nRemaining += (pFrm->Frm().*fnRect->fnGetHeight)(); + nRemaining += (pFrame->Frame().*fnRect->fnGetHeight)(); } else { - if( pFrm->IsColumnFrm() ) + if( pFrame->IsColumnFrame() ) { - pFrm->Calc(pRenderContext); - pFrm = static_cast<SwColumnFrm*>(pFrm)->Lower(); - pFrm->Calc(pRenderContext); - pFrm = static_cast<SwLayoutFrm*>(pFrm)->Lower(); + pFrame->Calc(pRenderContext); + pFrame = static_cast<SwColumnFrame*>(pFrame)->Lower(); + pFrame->Calc(pRenderContext); + pFrame = static_cast<SwLayoutFrame*>(pFrame)->Lower(); CalcFootnoteContent(); } // If we are in a columned frame which calls a CalcContent // in the FormatWidthCols, the content might need calculating - if( pFrm && !pFrm->IsValid() && IsInFly() && - FindFlyFrm()->IsColLocked() ) + if( pFrame && !pFrame->IsValid() && IsInFly() && + FindFlyFrame()->IsColLocked() ) ::CalcContent( this ); nRemaining += InnerHeight(); bMaximize = HasFollow(); } } - SwTwips nDiff = (Frm().*fnRect->fnGetHeight)() - nRemaining; + SwTwips nDiff = (Frame().*fnRect->fnGetHeight)() - nRemaining; if( nDiff < 0) { SwTwips nDeadLine = (GetUpper()->*fnRect->fnGetPrtBottom)(); { - long nBottom = (Frm().*fnRect->fnGetBottom)(); + long nBottom = (Frame().*fnRect->fnGetBottom)(); nBottom = (*fnRect->fnYInc)( nBottom, -nDiff ); long nTmpDiff = (*fnRect->fnYDiff)( nBottom, nDeadLine ); if( nTmpDiff > 0 ) @@ -1369,36 +1369,36 @@ void SwSectionFrm::Format( vcl::RenderContext* pRenderContext, const SwBorderAtt } if( nDiff ) { - long nTmp = nRemaining - (Frm().*fnRect->fnGetHeight)(); + long nTmp = nRemaining - (Frame().*fnRect->fnGetHeight)(); long nTop = (this->*fnRect->fnGetTopMargin)(); - (Frm().*fnRect->fnAddBottom)( nTmp ); + (Frame().*fnRect->fnAddBottom)( nTmp ); (this->*fnRect->fnSetYMargins)( nTop, 0 ); InvalidateNextPos(); - if (m_pLower && (!m_pLower->IsColumnFrm() || !m_pLower->GetNext())) + if (m_pLower && (!m_pLower->IsColumnFrame() || !m_pLower->GetNext())) { // If a single-column section just created the space that // was requested by the "undersized" paragraphs, then they // have to be invalidated and calculated, so they fully cover it - pFrm = m_pLower; - if( pFrm->IsColumnFrm() ) + pFrame = m_pLower; + if( pFrame->IsColumnFrame() ) { - pFrm->_InvalidateSize(); - pFrm->_InvalidatePos(); - pFrm->Calc(pRenderContext); - pFrm = static_cast<SwColumnFrm*>(pFrm)->Lower(); - pFrm->Calc(pRenderContext); - pFrm = static_cast<SwLayoutFrm*>(pFrm)->Lower(); + pFrame->_InvalidateSize(); + pFrame->_InvalidatePos(); + pFrame->Calc(pRenderContext); + pFrame = static_cast<SwColumnFrame*>(pFrame)->Lower(); + pFrame->Calc(pRenderContext); + pFrame = static_cast<SwLayoutFrame*>(pFrame)->Lower(); CalcFootnoteContent(); } bool bUnderSz = false; - while( pFrm ) + while( pFrame ) { - if( pFrm->IsTextFrm() && static_cast<SwTextFrm*>(pFrm)->IsUndersized() ) + if( pFrame->IsTextFrame() && static_cast<SwTextFrame*>(pFrame)->IsUndersized() ) { - pFrm->Prepare( PREP_ADJUST_FRM ); + pFrame->Prepare( PREP_ADJUST_FRM ); bUnderSz = true; } - pFrm = pFrm->GetNext(); + pFrame = pFrame->GetNext(); } if( bUnderSz && !IsContentLocked() ) ::CalcContent( this ); @@ -1412,12 +1412,12 @@ void SwSectionFrm::Format( vcl::RenderContext* pRenderContext, const SwBorderAtt _CheckClipping( true, bMaximize ); if( !bOldLock ) ColUnlock(); - long nDiff = nOldHeight - (Frm().*fnRect->fnGetHeight)(); + long nDiff = nOldHeight - (Frame().*fnRect->fnGetHeight)(); if( nDiff > 0 ) { if( !GetNext() ) SetRetouche(); // Take over the retouching ourselves - if( GetUpper() && !GetUpper()->IsFooterFrm() ) + if( GetUpper() && !GetUpper()->IsFooterFrame() ) GetUpper()->Shrink( nDiff ); } if( IsUndersized() ) @@ -1427,26 +1427,26 @@ void SwSectionFrm::Format( vcl::RenderContext* pRenderContext, const SwBorderAtt /// Returns the next layout sheet where the frame can be moved in. /// New pages are created only if specified by the parameter. -SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage ) +SwLayoutFrame *SwFrame::GetNextSctLeaf( MakePageType eMakePage ) { // Attention: Nested sections are currently not supported - PROTOCOL_ENTER( this, PROT_LEAF, ACT_NEXT_SECT, GetUpper()->FindSctFrm() ) + PROTOCOL_ENTER( this, PROT_LEAF, ACT_NEXT_SECT, GetUpper()->FindSctFrame() ) // Shortcuts for "columned" sections, if we're not in the last column // Can we slide to the next column of the section? - if( IsColBodyFrm() && GetUpper()->GetNext() ) - return static_cast<SwLayoutFrm*>(static_cast<SwLayoutFrm*>(GetUpper()->GetNext())->Lower()); - if( GetUpper()->IsColBodyFrm() && GetUpper()->GetUpper()->GetNext() ) - return static_cast<SwLayoutFrm*>(static_cast<SwLayoutFrm*>(GetUpper()->GetUpper()->GetNext())->Lower()); + if( IsColBodyFrame() && GetUpper()->GetNext() ) + return static_cast<SwLayoutFrame*>(static_cast<SwLayoutFrame*>(GetUpper()->GetNext())->Lower()); + if( GetUpper()->IsColBodyFrame() && GetUpper()->GetUpper()->GetNext() ) + return static_cast<SwLayoutFrame*>(static_cast<SwLayoutFrame*>(GetUpper()->GetUpper()->GetNext())->Lower()); // Inside a section, in tables, or sections of headers/footers, there can be only // one column shift be made, one of the above shortcuts should have applied! if( GetUpper()->IsInTab() || FindFooterOrHeader() ) return nullptr; - SwSectionFrm *pSect = FindSctFrm(); + SwSectionFrame *pSect = FindSctFrame(); bool bWrongPage = false; - OSL_ENSURE( pSect, "GetNextSctLeaf: Missing SectionFrm" ); + OSL_ENSURE( pSect, "GetNextSctLeaf: Missing SectionFrame" ); // Shortcut for sections with Follows. That's ok, // if no columns or pages (except dummy pages) lie in between. @@ -1456,7 +1456,7 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage ) { if( pSect->GetFollow() == pSect->GetNext() ) { - SwPageFrm *pPg = pSect->GetFollow()->FindPageFrm(); + SwPageFrame *pPg = pSect->GetFollow()->FindPageFrame(); if( WrongPageDesc( pPg ) ) bWrongPage = true; else @@ -1464,27 +1464,27 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage ) } else { - SwFrm* pTmp; - if( !pSect->GetUpper()->IsColBodyFrm() || + SwFrame* pTmp; + if( !pSect->GetUpper()->IsColBodyFrame() || nullptr == ( pTmp = pSect->GetUpper()->GetUpper()->GetNext() ) ) - pTmp = pSect->FindPageFrm()->GetNext(); + pTmp = pSect->FindPageFrame()->GetNext(); if( pTmp ) // is now the next column or page { - SwFrm* pTmpX = pTmp; - if( pTmp->IsPageFrm() && static_cast<SwPageFrm*>(pTmp)->IsEmptyPage() ) + SwFrame* pTmpX = pTmp; + if( pTmp->IsPageFrame() && static_cast<SwPageFrame*>(pTmp)->IsEmptyPage() ) pTmp = pTmp->GetNext(); // skip dummy pages - SwFrm *pUp = pSect->GetFollow()->GetUpper(); + SwFrame *pUp = pSect->GetFollow()->GetUpper(); // pUp becomes the next column if the Follow lies in a column // that is not a "not first" one, otherwise the page - if( !pUp->IsColBodyFrm() || + if( !pUp->IsColBodyFrame() || !( pUp = pUp->GetUpper() )->GetPrev() ) - pUp = pUp->FindPageFrm(); + pUp = pUp->FindPageFrame(); // Now pUp and pTmp have to be the same page/column, otherwise // pages or columns lie between Master and Follow if( pUp == pTmp || pUp->GetNext() == pTmpX ) { - SwPageFrm* pNxtPg = pUp->IsPageFrm() ? - static_cast<SwPageFrm*>(pUp) : pUp->FindPageFrm(); + SwPageFrame* pNxtPg = pUp->IsPageFrame() ? + static_cast<SwPageFrame*>(pUp) : pUp->FindPageFrame(); if( WrongPageDesc( pNxtPg ) ) bWrongPage = true; else @@ -1496,28 +1496,28 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage ) // Always end up in the same section: Body again inside Body etc. const bool bBody = IsInDocBody(); - const bool bFootnotePage = FindPageFrm()->IsFootnotePage(); + const bool bFootnotePage = FindPageFrame()->IsFootnotePage(); - SwLayoutFrm *pLayLeaf; - // A shortcut for TabFrms such that not all cells need to be visited + SwLayoutFrame *pLayLeaf; + // A shortcut for TabFrames such that not all cells need to be visited if( bWrongPage ) pLayLeaf = nullptr; - else if( IsTabFrm() ) + else if( IsTabFrame() ) { - SwContentFrm* pTmpCnt = static_cast<SwTabFrm*>(this)->FindLastContent(); + SwContentFrame* pTmpCnt = static_cast<SwTabFrame*>(this)->FindLastContent(); pLayLeaf = pTmpCnt ? pTmpCnt->GetUpper() : nullptr; } else { pLayLeaf = GetNextLayoutLeaf(); - if( IsColumnFrm() ) + if( IsColumnFrame() ) { - while( pLayLeaf && static_cast<SwColumnFrm*>(this)->IsAnLower( pLayLeaf ) ) + while( pLayLeaf && static_cast<SwColumnFrame*>(this)->IsAnLower( pLayLeaf ) ) pLayLeaf = pLayLeaf->GetNextLayoutLeaf(); } } - SwLayoutFrm *pOldLayLeaf = nullptr; // Such that in case of newly + SwLayoutFrame *pOldLayLeaf = nullptr; // Such that in case of newly // created pages, the search is // not started over at the beginning @@ -1526,9 +1526,9 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage ) if( pLayLeaf ) { // A layout leaf was found, let's see whether it can store me or - // another SectionFrm can be inserted here, or we have to continue + // another SectionFrame can be inserted here, or we have to continue // searching - SwPageFrm* pNxtPg = pLayLeaf->FindPageFrm(); + SwPageFrame* pNxtPg = pLayLeaf->FindPageFrame(); if ( !bFootnotePage && pNxtPg->IsFootnotePage() ) { // If I reached the end note pages it's over pLayLeaf = nullptr; @@ -1539,7 +1539,7 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage ) (IsInFootnote() != pLayLeaf->IsInFootnote() ) || pLayLeaf->IsInTab() || ( pLayLeaf->IsInSct() && ( !pSect->HasFollow() - || pSect->GetFollow() != pLayLeaf->FindSctFrm() ) ) ) + || pSect->GetFollow() != pLayLeaf->FindSctFrame() ) ) ) { // Rejected - try again. pOldLayLeaf = pLayLeaf; @@ -1556,12 +1556,12 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage ) continue; } } - // There is no further LayoutFrm that fits, so a new page + // There is no further LayoutFrame that fits, so a new page // has to be created, although new pages are worthless within a frame else if( !pSect->IsInFly() && ( eMakePage == MAKEPAGE_APPEND || eMakePage == MAKEPAGE_INSERT ) ) { - InsertPage(pOldLayLeaf ? pOldLayLeaf->FindPageFrm() : FindPageFrm(), + InsertPage(pOldLayLeaf ? pOldLayLeaf->FindPageFrame() : FindPageFrame(), false ); // and again the whole thing pLayLeaf = pOldLayLeaf ? pOldLayLeaf : GetNextLayoutLeaf(); @@ -1575,20 +1575,20 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage ) // We have found the suitable layout sheet. If there (in the sheet) is // already a Follow of our section, we take its first layout sheet, // otherwise it is time to create a section follow - SwSectionFrm* pNew; + SwSectionFrame* pNew; // This can be omitted if existing Follows were cut short - SwFrm* pFirst = pLayLeaf->Lower(); - // Here SectionFrms that are to be deleted must be ignored - while( pFirst && pFirst->IsSctFrm() && !static_cast<SwSectionFrm*>(pFirst)->GetSection() ) + SwFrame* pFirst = pLayLeaf->Lower(); + // Here SectionFrames that are to be deleted must be ignored + while( pFirst && pFirst->IsSctFrame() && !static_cast<SwSectionFrame*>(pFirst)->GetSection() ) pFirst = pFirst->GetNext(); - if( pFirst && pFirst->IsSctFrm() && pSect->GetFollow() == pFirst ) + if( pFirst && pFirst->IsSctFrame() && pSect->GetFollow() == pFirst ) pNew = pSect->GetFollow(); else if( MAKEPAGE_NOSECTION == eMakePage ) return pLayLeaf; else { - pNew = new SwSectionFrm( *pSect, false ); + pNew = new SwSectionFrame( *pSect, false ); pNew->InsertBefore( pLayLeaf, pLayLeaf->Lower() ); pNew->Init(); SWRECTFN( pNew ) @@ -1596,43 +1596,43 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage ) // If our section frame has a successor then that has to be // moved behind the new Follow of the section frames - SwFrm* pTmp = pSect->GetNext(); + SwFrame* pTmp = pSect->GetNext(); if( pTmp && pTmp != pSect->GetFollow() ) { - SwFlowFrm* pNxt; - SwContentFrm* pNxtContent = nullptr; - if( pTmp->IsContentFrm() ) + SwFlowFrame* pNxt; + SwContentFrame* pNxtContent = nullptr; + if( pTmp->IsContentFrame() ) { - pNxt = static_cast<SwContentFrm*>(pTmp); - pNxtContent = static_cast<SwContentFrm*>(pTmp); + pNxt = static_cast<SwContentFrame*>(pTmp); + pNxtContent = static_cast<SwContentFrame*>(pTmp); } else { - pNxtContent = static_cast<SwLayoutFrm*>(pTmp)->ContainsContent(); - if( pTmp->IsSctFrm() ) - pNxt = static_cast<SwSectionFrm*>(pTmp); + pNxtContent = static_cast<SwLayoutFrame*>(pTmp)->ContainsContent(); + if( pTmp->IsSctFrame() ) + pNxt = static_cast<SwSectionFrame*>(pTmp); else { - OSL_ENSURE( pTmp->IsTabFrm(), "GetNextSctLeaf: Wrong Type" ); - pNxt = static_cast<SwTabFrm*>(pTmp); + OSL_ENSURE( pTmp->IsTabFrame(), "GetNextSctLeaf: Wrong Type" ); + pNxt = static_cast<SwTabFrame*>(pTmp); } while( !pNxtContent && nullptr != ( pTmp = pTmp->GetNext() ) ) { - if( pTmp->IsContentFrm() ) - pNxtContent = static_cast<SwContentFrm*>(pTmp); + if( pTmp->IsContentFrame() ) + pNxtContent = static_cast<SwContentFrame*>(pTmp); else - pNxtContent = static_cast<SwLayoutFrm*>(pTmp)->ContainsContent(); + pNxtContent = static_cast<SwLayoutFrame*>(pTmp)->ContainsContent(); } } if( pNxtContent ) { - SwFootnoteBossFrm* pOldBoss = pSect->FindFootnoteBossFrm( true ); - if( pOldBoss == pNxtContent->FindFootnoteBossFrm( true ) ) + SwFootnoteBossFrame* pOldBoss = pSect->FindFootnoteBossFrame( true ); + if( pOldBoss == pNxtContent->FindFootnoteBossFrame( true ) ) { SwSaveFootnoteHeight aHeight( pOldBoss, - pOldBoss->Frm().Top() + pOldBoss->Frm().Height() ); + pOldBoss->Frame().Top() + pOldBoss->Frame().Height() ); pSect->GetUpper()->MoveLowerFootnotes( pNxtContent, pOldBoss, - pLayLeaf->FindFootnoteBossFrm( true ), false ); + pLayLeaf->FindFootnoteBossFrame( true ), false ); } } pNxt->MoveSubTree( pLayLeaf, pNew->GetNext() ); @@ -1640,22 +1640,22 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage ) if( pNew->GetFollow() ) pNew->SimpleFormat(); } - // The wanted layout sheet is now the first of the determined SctFrms: + // The wanted layout sheet is now the first of the determined SctFrames: pLayLeaf = FIRSTLEAF( pNew ); } return pLayLeaf; } /// Returns the preceding layout sheet where the frame can be moved into -SwLayoutFrm *SwFrm::GetPrevSctLeaf( MakePageType ) +SwLayoutFrame *SwFrame::GetPrevSctLeaf( MakePageType ) { - PROTOCOL_ENTER( this, PROT_LEAF, ACT_PREV_SECT, GetUpper()->FindSctFrm() ) + PROTOCOL_ENTER( this, PROT_LEAF, ACT_PREV_SECT, GetUpper()->FindSctFrame() ) - SwLayoutFrm* pCol; - // ColumnFrm always contain a BodyFrm now - if( IsColBodyFrm() ) + SwLayoutFrame* pCol; + // ColumnFrame always contain a BodyFrame now + if( IsColBodyFrame() ) pCol = GetUpper(); - else if( GetUpper()->IsColBodyFrm() ) + else if( GetUpper()->IsColBodyFrame() ) pCol = GetUpper()->GetUpper(); else pCol = nullptr; @@ -1666,58 +1666,58 @@ SwLayoutFrm *SwFrm::GetPrevSctLeaf( MakePageType ) { do { - pCol = static_cast<SwLayoutFrm*>(pCol->GetPrev()); + pCol = static_cast<SwLayoutFrame*>(pCol->GetPrev()); // Is there any content? - if( static_cast<SwLayoutFrm*>(pCol->Lower())->Lower() ) + if( static_cast<SwLayoutFrame*>(pCol->Lower())->Lower() ) { if( bJump ) // Did we skip a blank page? - SwFlowFrm::SetMoveBwdJump( true ); - return static_cast<SwLayoutFrm*>(pCol->Lower()); // The columnm body + SwFlowFrame::SetMoveBwdJump( true ); + return static_cast<SwLayoutFrame*>(pCol->Lower()); // The columnm body } bJump = true; } while( pCol->GetPrev() ); // We get here when all columns are empty, pCol is now the // first column, we need the body though - pCol = static_cast<SwLayoutFrm*>(pCol->Lower()); + pCol = static_cast<SwLayoutFrame*>(pCol->Lower()); } else pCol = nullptr; } if( bJump ) // Did we skip a blank page? - SwFlowFrm::SetMoveBwdJump( true ); + SwFlowFrame::SetMoveBwdJump( true ); // Within sections in tables or section in headers/footers there can // be only one column change be made, one of the above shortcuts should // have applied, also when the section has a pPrev. // Now we even consider an empty column... - OSL_ENSURE( FindSctFrm(), "GetNextSctLeaf: Missing SectionFrm" ); - if( ( IsInTab() && !IsTabFrm() ) || FindFooterOrHeader() ) + OSL_ENSURE( FindSctFrame(), "GetNextSctLeaf: Missing SectionFrame" ); + if( ( IsInTab() && !IsTabFrame() ) || FindFooterOrHeader() ) return pCol; // === IMPORTANT === // Precondition, which needs to be hold, is that the <this> frame can be // inside a table, but then the found section frame <pSect> is also inside // this table. - SwSectionFrm *pSect = FindSctFrm(); + SwSectionFrame *pSect = FindSctFrame(); // #i95698# // A table cell containing directly a section does not break - see lcl_FindSectionsInRow(..) // Thus, a table inside a section, which is inside another table can only // flow backward in the columns of its section. // Note: The table cell, which contains the section, can not have a master table cell. - if ( IsTabFrm() && pSect->IsInTab() ) + if ( IsTabFrame() && pSect->IsInTab() ) { return pCol; } { - SwFrm *pPrv; + SwFrame *pPrv; if( nullptr != ( pPrv = pSect->GetIndPrev() ) ) { - // Mooching, half dead SectionFrms shouldn't confuse us - while( pPrv && pPrv->IsSctFrm() && !static_cast<SwSectionFrm*>(pPrv)->GetSection() ) + // Mooching, half dead SectionFrames shouldn't confuse us + while( pPrv && pPrv->IsSctFrame() && !static_cast<SwSectionFrame*>(pPrv)->GetSection() ) pPrv = pPrv->GetPrev(); if( pPrv ) return pCol; @@ -1727,8 +1727,8 @@ SwLayoutFrm *SwFrm::GetPrevSctLeaf( MakePageType ) const bool bBody = IsInDocBody(); const bool bFly = IsInFly(); - SwLayoutFrm *pLayLeaf = GetPrevLayoutLeaf(); - SwLayoutFrm *pPrevLeaf = nullptr; + SwLayoutFrame *pLayLeaf = GetPrevLayoutLeaf(); + SwLayoutFrame *pPrevLeaf = nullptr; while ( pLayLeaf ) { @@ -1741,20 +1741,20 @@ SwLayoutFrm *SwFrm::GetPrevSctLeaf( MakePageType ) { // If there is a pLayLeaf has a lower pLayLeaf is the frame we are looking for. // Exception: pLayLeaf->Lower() is a zombie section frame - const SwFrm* pTmp = pLayLeaf->Lower(); + const SwFrame* pTmp = pLayLeaf->Lower(); // OD 11.04.2003 #108824# - consider, that the zombie section frame // can have frame below it in the found layout leaf. // Thus, skipping zombie section frame, if possible. - while ( pTmp && pTmp->IsSctFrm() && - !( static_cast<const SwSectionFrm*>(pTmp)->GetSection() ) && + while ( pTmp && pTmp->IsSctFrame() && + !( static_cast<const SwSectionFrame*>(pTmp)->GetSection() ) && pTmp->GetNext() ) { pTmp = pTmp->GetNext(); } if ( pTmp && - ( !pTmp->IsSctFrm() || - ( static_cast<const SwSectionFrm*>(pTmp)->GetSection() ) + ( !pTmp->IsSctFrame() || + ( static_cast<const SwSectionFrame*>(pTmp)->GetSection() ) ) ) { @@ -1763,7 +1763,7 @@ SwLayoutFrm *SwFrm::GetPrevSctLeaf( MakePageType ) pPrevLeaf = pLayLeaf; pLayLeaf = pLayLeaf->GetPrevLayoutLeaf(); if ( pLayLeaf ) - SwFlowFrm::SetMoveBwdJump( true ); + SwFlowFrame::SetMoveBwdJump( true ); } else if ( bFly ) break; // Contents in Flys every layout sheet should be right. Why? @@ -1777,26 +1777,26 @@ SwLayoutFrm *SwFrm::GetPrevSctLeaf( MakePageType ) pLayLeaf = pPrevLeaf; } - SwSectionFrm* pNew = nullptr; + SwSectionFrame* pNew = nullptr; // At first go to the end of the layout sheet - SwFrm *pTmp = pLayLeaf->Lower(); + SwFrame *pTmp = pLayLeaf->Lower(); if( pTmp ) { while( pTmp->GetNext() ) pTmp = pTmp->GetNext(); - if( pTmp->IsSctFrm() ) + if( pTmp->IsSctFrame() ) { // Half dead ones only interfere here - while( !static_cast<SwSectionFrm*>(pTmp)->GetSection() && pTmp->GetPrev() && - pTmp->GetPrev()->IsSctFrm() ) + while( !static_cast<SwSectionFrame*>(pTmp)->GetSection() && pTmp->GetPrev() && + pTmp->GetPrev()->IsSctFrame() ) pTmp = pTmp->GetPrev(); - if( static_cast<SwSectionFrm*>(pTmp)->GetFollow() == pSect ) - pNew = static_cast<SwSectionFrm*>(pTmp); + if( static_cast<SwSectionFrame*>(pTmp)->GetFollow() == pSect ) + pNew = static_cast<SwSectionFrame*>(pTmp); } } if( !pNew ) { - pNew = new SwSectionFrm( *pSect, true ); + pNew = new SwSectionFrame( *pSect, true ); pNew->InsertBefore( pLayLeaf, nullptr ); pNew->Init(); SWRECTFN( pNew ) @@ -1806,7 +1806,7 @@ SwLayoutFrm *SwFrm::GetPrevSctLeaf( MakePageType ) if( !pNew->Lower() ) // Format single column sections { pNew->MakePos(); - pLayLeaf->Format(getRootFrm()->GetCurrShell()->GetOut()); // In order that the PrtArea is correct for the MoveBwd + pLayLeaf->Format(getRootFrame()->GetCurrShell()->GetOut()); // In order that the PrtArea is correct for the MoveBwd } else pNew->SimpleFormat(); @@ -1814,14 +1814,14 @@ SwLayoutFrm *SwFrm::GetPrevSctLeaf( MakePageType ) else { pLayLeaf = FIRSTLEAF( pNew ); - if( pLayLeaf->IsColBodyFrm() ) + if( pLayLeaf->IsColBodyFrame() ) { // In existent section columns we're looking for the last not empty // column. - SwLayoutFrm *pTmpLay = pLayLeaf; + SwLayoutFrame *pTmpLay = pLayLeaf; while( pLayLeaf->GetUpper()->GetNext() ) { - pLayLeaf = static_cast<SwLayoutFrm*>(static_cast<SwLayoutFrm*>(pLayLeaf->GetUpper()->GetNext())->Lower()); + pLayLeaf = static_cast<SwLayoutFrame*>(static_cast<SwLayoutFrame*>(pLayLeaf->GetUpper()->GetNext())->Lower()); if( pLayLeaf->Lower() ) pTmpLay = pLayLeaf; } @@ -1829,61 +1829,61 @@ SwLayoutFrm *SwFrm::GetPrevSctLeaf( MakePageType ) if( pLayLeaf != pTmpLay ) { pLayLeaf = pTmpLay; - SwFlowFrm::SetMoveBwdJump( true ); + SwFlowFrame::SetMoveBwdJump( true ); } } } return pLayLeaf; } -static SwTwips lcl_DeadLine( const SwFrm* pFrm ) +static SwTwips lcl_DeadLine( const SwFrame* pFrame ) { - const SwLayoutFrm* pUp = pFrm->GetUpper(); + const SwLayoutFrame* pUp = pFrame->GetUpper(); while( pUp && pUp->IsInSct() ) { - if( pUp->IsSctFrm() ) + if( pUp->IsSctFrame() ) pUp = pUp->GetUpper(); - // Columns now with BodyFrm - else if( pUp->IsColBodyFrm() && pUp->GetUpper()->GetUpper()->IsSctFrm() ) + // Columns now with BodyFrame + else if( pUp->IsColBodyFrame() && pUp->GetUpper()->GetUpper()->IsSctFrame() ) pUp = pUp->GetUpper()->GetUpper(); else break; } - SWRECTFN( pFrm ) + SWRECTFN( pFrame ) return pUp ? (pUp->*fnRect->fnGetPrtBottom)() : - (pFrm->Frm().*fnRect->fnGetBottom)(); + (pFrame->Frame().*fnRect->fnGetBottom)(); } -/// checks whether the SectionFrm is still able to grow, as case may be the environment has to be asked -bool SwSectionFrm::Growable() const +/// checks whether the SectionFrame is still able to grow, as case may be the environment has to be asked +bool SwSectionFrame::Growable() const { SWRECTFN( this ) if( (*fnRect->fnYDiff)( lcl_DeadLine( this ), - (Frm().*fnRect->fnGetBottom)() ) > 0 ) + (Frame().*fnRect->fnGetBottom)() ) > 0 ) return true; - return ( GetUpper() && const_cast<SwFrm*>(static_cast<SwFrm const *>(GetUpper()))->Grow( LONG_MAX, true ) ); + return ( GetUpper() && const_cast<SwFrame*>(static_cast<SwFrame const *>(GetUpper()))->Grow( LONG_MAX, true ) ); } -SwTwips SwSectionFrm::_Grow( SwTwips nDist, bool bTst ) +SwTwips SwSectionFrame::_Grow( SwTwips nDist, bool bTst ) { if ( !IsColLocked() && !HasFixSize() ) { SWRECTFN( this ) - long nFrmHeight = (Frm().*fnRect->fnGetHeight)(); - if( nFrmHeight > 0 && nDist > (LONG_MAX - nFrmHeight) ) - nDist = LONG_MAX - nFrmHeight; + long nFrameHeight = (Frame().*fnRect->fnGetHeight)(); + if( nFrameHeight > 0 && nDist > (LONG_MAX - nFrameHeight) ) + nDist = LONG_MAX - nFrameHeight; if ( nDist <= 0L ) return 0L; - bool bInCalcContent = GetUpper() && IsInFly() && FindFlyFrm()->IsLocked(); + bool bInCalcContent = GetUpper() && IsInFly() && FindFlyFrame()->IsLocked(); // OD 2004-03-15 #116561# - allow grow in online layout - bool bGrow = !Lower() || !Lower()->IsColumnFrm() || !Lower()->GetNext() || + bool bGrow = !Lower() || !Lower()->IsColumnFrame() || !Lower()->GetNext() || GetSection()->GetFormat()->GetBalancedColumns().GetValue(); if( !bGrow ) { - const SwViewShell *pSh = getRootFrm()->GetCurrShell(); + const SwViewShell *pSh = getRootFrame()->GetCurrShell(); bGrow = pSh && pSh->GetViewOptions()->getBrowseMode(); } if( bGrow ) @@ -1895,7 +1895,7 @@ SwTwips SwSectionFrm::_Grow( SwTwips nDist, bool bTst ) { nGrow = lcl_DeadLine( this ); nGrow = (*fnRect->fnYDiff)( nGrow, - (Frm().*fnRect->fnGetBottom)() ); + (Frame().*fnRect->fnGetBottom)() ); } SwTwips nSpace = nGrow; if( !bInCalcContent && nGrow < nDist && GetUpper() ) @@ -1930,16 +1930,16 @@ SwTwips SwSectionFrm::_Grow( SwTwips nDist, bool bTst ) SetCompletePaint(); InvalidatePage(); } - if( GetUpper() && GetUpper()->IsHeaderFrm() ) + if( GetUpper() && GetUpper()->IsHeaderFrame() ) GetUpper()->InvalidateSize(); } - (Frm().*fnRect->fnAddBottom)( nGrow ); + (Frame().*fnRect->fnAddBottom)( nGrow ); long nPrtHeight = (Prt().*fnRect->fnGetHeight)() + nGrow; (Prt().*fnRect->fnSetHeight)( nPrtHeight ); - if( Lower() && Lower()->IsColumnFrm() && Lower()->GetNext() ) + if( Lower() && Lower()->IsColumnFrame() && Lower()->GetNext() ) { - SwFrm* pTmp = Lower(); + SwFrame* pTmp = Lower(); do { pTmp->_InvalidateSize(); @@ -1949,15 +1949,15 @@ SwTwips SwSectionFrm::_Grow( SwTwips nDist, bool bTst ) } if( GetNext() ) { - SwFrm *pFrm = GetNext(); - while( pFrm && pFrm->IsSctFrm() && !static_cast<SwSectionFrm*>(pFrm)->GetSection() ) - pFrm = pFrm->GetNext(); - if( pFrm ) + SwFrame *pFrame = GetNext(); + while( pFrame && pFrame->IsSctFrame() && !static_cast<SwSectionFrame*>(pFrame)->GetSection() ) + pFrame = pFrame->GetNext(); + if( pFrame ) { if( bInCalcContent ) - pFrm->_InvalidatePos(); + pFrame->_InvalidatePos(); else - pFrm->InvalidatePos(); + pFrame->InvalidatePos(); } } // #i28701# - Due to the new object positioning @@ -1983,7 +1983,7 @@ SwTwips SwSectionFrm::_Grow( SwTwips nDist, bool bTst ) return 0L; } -SwTwips SwSectionFrm::_Shrink( SwTwips nDist, bool bTst ) +SwTwips SwSectionFrame::_Shrink( SwTwips nDist, bool bTst ) { if ( Lower() && !IsColLocked() && !HasFixSize() ) { @@ -1995,11 +1995,11 @@ SwTwips SwSectionFrm::_Shrink( SwTwips nDist, bool bTst ) else { SWRECTFN( this ) - long nFrmHeight = (Frm().*fnRect->fnGetHeight)(); - if ( nDist > nFrmHeight ) - nDist = nFrmHeight; + long nFrameHeight = (Frame().*fnRect->fnGetHeight)(); + if ( nDist > nFrameHeight ) + nDist = nFrameHeight; - if ( Lower()->IsColumnFrm() && Lower()->GetNext() && // FootnoteAtEnd + if ( Lower()->IsColumnFrame() && Lower()->GetNext() && // FootnoteAtEnd !GetSection()->GetFormat()->GetBalancedColumns().GetValue() ) { // With column bases the format takes over the control of the // growth (because of the balance) @@ -2016,7 +2016,7 @@ SwTwips SwSectionFrm::_Shrink( SwTwips nDist, bool bTst ) SetCompletePaint(); InvalidatePage(); } - (Frm().*fnRect->fnAddBottom)( -nDist ); + (Frame().*fnRect->fnAddBottom)( -nDist ); long nPrtHeight = (Prt().*fnRect->fnGetHeight)() - nDist; (Prt().*fnRect->fnSetHeight)( nPrtHeight ); @@ -2034,12 +2034,12 @@ SwTwips SwSectionFrm::_Shrink( SwTwips nDist, bool bTst ) // the footer. This may not happen, because shrinking the footer // would cause the top of the section frame to overlap with the // fly frame again, this would result in a perfect loop. - if( GetUpper() && !GetUpper()->IsFooterFrm() ) + if( GetUpper() && !GetUpper()->IsFooterFrame() ) GetUpper()->Shrink( nDist, bTst ); - if( Lower() && Lower()->IsColumnFrm() && Lower()->GetNext() ) + if( Lower() && Lower()->IsColumnFrame() && Lower()->GetNext() ) { - SwFrm* pTmp = Lower(); + SwFrame* pTmp = Lower(); do { pTmp->_InvalidateSize(); @@ -2048,11 +2048,11 @@ SwTwips SwSectionFrm::_Shrink( SwTwips nDist, bool bTst ) } if( GetNext() ) { - SwFrm* pFrm = GetNext(); - while( pFrm && pFrm->IsSctFrm() && !static_cast<SwSectionFrm*>(pFrm)->GetSection() ) - pFrm = pFrm->GetNext(); - if( pFrm ) - pFrm->InvalidatePos(); + SwFrame* pFrame = GetNext(); + while( pFrame && pFrame->IsSctFrame() && !static_cast<SwSectionFrame*>(pFrame)->GetSection() ) + pFrame = pFrame->GetNext(); + if( pFrame ) + pFrame->InvalidatePos(); else SetRetouche(); } @@ -2066,11 +2066,11 @@ SwTwips SwSectionFrm::_Shrink( SwTwips nDist, bool bTst ) } /* -|* When are Frms within a SectionFrms moveable? -|* If they are not in the last column of a SectionFrms yet, +|* When are Frames within a SectionFrames moveable? +|* If they are not in the last column of a SectionFrames yet, |* if there is no Follow, -|* if the SectionFrm cannot grow anymore, then it gets more complicated, -|* in that case it depends on whether the SectionFrm can find a next +|* if the SectionFrame cannot grow anymore, then it gets more complicated, +|* in that case it depends on whether the SectionFrame can find a next |* layout sheet. In (column based/chained) Flys this is checked via |* GetNextLayout, in tables and headers/footers there is none, however in the |* DocBody and in foot notes there is always one. @@ -2078,13 +2078,13 @@ SwTwips SwSectionFrm::_Shrink( SwTwips nDist, bool bTst ) |* This routine is used in the TextFormatter to decided whether it's allowed to |* create a (paragraph-)Follow or whether the paragraph has to stick together |*/ -bool SwSectionFrm::MoveAllowed( const SwFrm* pFrm) const +bool SwSectionFrame::MoveAllowed( const SwFrame* pFrame) const { // Is there a Follow or is the Frame not in the last column? - if( HasFollow() || ( pFrm->GetUpper()->IsColBodyFrm() && - pFrm->GetUpper()->GetUpper()->GetNext() ) ) + if( HasFollow() || ( pFrame->GetUpper()->IsColBodyFrame() && + pFrame->GetUpper()->GetUpper()->GetNext() ) ) return true; - if( pFrm->IsInFootnote() ) + if( pFrame->IsInFootnote() ) { if( IsInFootnote() ) { @@ -2092,26 +2092,26 @@ bool SwSectionFrm::MoveAllowed( const SwFrm* pFrm) const { if( Growable() ) return false; - return GetUpper()->FindSctFrm()->MoveAllowed( this ); + return GetUpper()->FindSctFrame()->MoveAllowed( this ); } else return true; } // The content of footnote inside a columned sectionfrm is moveable // except in the last column - const SwLayoutFrm *pLay = pFrm->FindFootnoteFrm()->GetUpper()->GetUpper(); - if( pLay->IsColumnFrm() && pLay->GetNext() ) + const SwLayoutFrame *pLay = pFrame->FindFootnoteFrame()->GetUpper()->GetUpper(); + if( pLay->IsColumnFrame() && pLay->GetNext() ) { // The first paragraph in the first footnote in the first column // in the sectionfrm at the top of the page is not moveable, // if the columnbody is empty. bool bRet = false; - if( pLay->GetIndPrev() || pFrm->GetIndPrev() || - pFrm->FindFootnoteFrm()->GetPrev() ) + if( pLay->GetIndPrev() || pFrame->GetIndPrev() || + pFrame->FindFootnoteFrame()->GetPrev() ) bRet = true; else { - const SwLayoutFrm* pBody = static_cast<const SwColumnFrm*>(pLay)->FindBodyCont(); + const SwLayoutFrame* pBody = static_cast<const SwColumnFrame*>(pLay)->FindBodyCont(); if( pBody && pBody->Lower() ) bRet = true; } @@ -2127,7 +2127,7 @@ bool SwSectionFrm::MoveAllowed( const SwFrm* pFrm) const if( IsInTab() || ( !IsInDocBody() && FindFooterOrHeader() ) ) return false; // It doesn't work in tables/headers/footers if( IsInFly() ) // In column based or chained frames - return nullptr != const_cast<SwFrm*>(static_cast<SwFrm const *>(GetUpper()))->GetNextLeaf( MAKEPAGE_NONE ); + return nullptr != const_cast<SwFrame*>(static_cast<SwFrame const *>(GetUpper()))->GetNextLeaf( MAKEPAGE_NONE ); return true; } @@ -2138,31 +2138,31 @@ bool SwSectionFrm::MoveAllowed( const SwFrm* pFrm) const Note: For a frame inside a table frame, which is inside a section frame, NULL is returned. */ -SwFrm* SwFrm::_GetIndPrev() const +SwFrame* SwFrame::_GetIndPrev() const { - SwFrm *pRet = nullptr; + SwFrame *pRet = nullptr; // #i79774# // Do not assert, if the frame has a direct previous frame, because it // could be an empty section frame. The caller has to assure, that the // frame has no direct previous frame or only empty section frames as // previous frames. OSL_ENSURE( /*!pPrev &&*/ IsInSct(), "Why?" ); - const SwFrm* pSct = GetUpper(); + const SwFrame* pSct = GetUpper(); if( !pSct ) return nullptr; - if( pSct->IsSctFrm() ) + if( pSct->IsSctFrame() ) pRet = pSct->GetIndPrev(); - else if( pSct->IsColBodyFrm() && (pSct = pSct->GetUpper()->GetUpper())->IsSctFrm() ) + else if( pSct->IsColBodyFrame() && (pSct = pSct->GetUpper()->GetUpper())->IsSctFrame() ) { // Do not return the previous frame of the outer section, if in one // of the previous columns is content. - const SwFrm* pCol = GetUpper()->GetUpper()->GetPrev(); + const SwFrame* pCol = GetUpper()->GetUpper()->GetPrev(); while( pCol ) { - OSL_ENSURE( pCol->IsColumnFrm(), "GetIndPrev(): ColumnFrm expected" ); - OSL_ENSURE( pCol->GetLower() && pCol->GetLower()->IsBodyFrm(), + OSL_ENSURE( pCol->IsColumnFrame(), "GetIndPrev(): ColumnFrame expected" ); + OSL_ENSURE( pCol->GetLower() && pCol->GetLower()->IsBodyFrame(), "GetIndPrev(): Where's the body?"); - if( static_cast<const SwLayoutFrm*>(static_cast<const SwLayoutFrm*>(pCol)->Lower())->Lower() ) + if( static_cast<const SwLayoutFrame*>(static_cast<const SwLayoutFrame*>(pCol)->Lower())->Lower() ) return nullptr; pCol = pCol->GetPrev(); } @@ -2170,29 +2170,29 @@ SwFrm* SwFrm::_GetIndPrev() const } // skip empty section frames - while( pRet && pRet->IsSctFrm() && !static_cast<SwSectionFrm*>(pRet)->GetSection() ) + while( pRet && pRet->IsSctFrame() && !static_cast<SwSectionFrame*>(pRet)->GetSection() ) pRet = pRet->GetIndPrev(); return pRet; } -SwFrm* SwFrm::_GetIndNext() +SwFrame* SwFrame::_GetIndNext() { OSL_ENSURE( !mpNext && IsInSct(), "Why?" ); - SwFrm* pSct = GetUpper(); + SwFrame* pSct = GetUpper(); if( !pSct ) return nullptr; - if( pSct->IsSctFrm() ) + if( pSct->IsSctFrame() ) return pSct->GetIndNext(); - if( pSct->IsColBodyFrm() && (pSct = pSct->GetUpper()->GetUpper())->IsSctFrm() ) - { // We can only return the successor of the SectionFrms if there is no + if( pSct->IsColBodyFrame() && (pSct = pSct->GetUpper()->GetUpper())->IsSctFrame() ) + { // We can only return the successor of the SectionFrames if there is no // content in the successing columns - SwFrm* pCol = GetUpper()->GetUpper()->GetNext(); + SwFrame* pCol = GetUpper()->GetUpper()->GetNext(); while( pCol ) { - OSL_ENSURE( pCol->IsColumnFrm(), "GetIndNext(): ColumnFrm expected" ); - OSL_ENSURE( pCol->GetLower() && pCol->GetLower()->IsBodyFrm(), + OSL_ENSURE( pCol->IsColumnFrame(), "GetIndNext(): ColumnFrame expected" ); + OSL_ENSURE( pCol->GetLower() && pCol->GetLower()->IsBodyFrame(), "GetIndNext(): Where's the body?"); - if( static_cast<SwLayoutFrm*>(static_cast<SwLayoutFrm*>(pCol)->Lower())->Lower() ) + if( static_cast<SwLayoutFrame*>(static_cast<SwLayoutFrame*>(pCol)->Lower())->Lower() ) return nullptr; pCol = pCol->GetNext(); } @@ -2201,7 +2201,7 @@ SwFrm* SwFrm::_GetIndNext() return nullptr; } -bool SwSectionFrm::IsDescendantFrom( const SwSectionFormat* pFormat ) const +bool SwSectionFrame::IsDescendantFrom( const SwSectionFormat* pFormat ) const { if( !m_pSection || !pFormat ) return false; @@ -2216,7 +2216,7 @@ bool SwSectionFrm::IsDescendantFrom( const SwSectionFormat* pFormat ) const return true; } -void SwSectionFrm::CalcFootnoteAtEndFlag() +void SwSectionFrame::CalcFootnoteAtEndFlag() { SwSectionFormat *pFormat = GetSection()->GetFormat(); sal_uInt16 nVal = pFormat->GetFootnoteAtTextEnd( false ).GetValue(); @@ -2239,12 +2239,12 @@ void SwSectionFrm::CalcFootnoteAtEndFlag() } } -bool SwSectionFrm::IsEndnoteAtMyEnd() const +bool SwSectionFrame::IsEndnoteAtMyEnd() const { return m_pSection->GetFormat()->GetEndAtTextEnd( false ).IsAtEnd(); } -void SwSectionFrm::CalcEndAtEndFlag() +void SwSectionFrame::CalcEndAtEndFlag() { SwSectionFormat *pFormat = GetSection()->GetFormat(); m_bEndnAtEnd = pFormat->GetEndAtTextEnd( false ).IsAtEnd(); @@ -2258,7 +2258,7 @@ void SwSectionFrm::CalcEndAtEndFlag() } } -void SwSectionFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) +void SwSectionFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) { sal_uInt8 nInvFlags = 0; @@ -2279,7 +2279,7 @@ void SwSectionFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) aOIter.NextItem(); } if ( aOldSet.Count() || aNewSet.Count() ) - SwLayoutFrm::Modify( &aOldSet, &aNewSet ); + SwLayoutFrame::Modify( &aOldSet, &aNewSet ); } else _UpdateAttr( pOld, pNew, nInvFlags ); @@ -2293,19 +2293,19 @@ void SwSectionFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) } } -void SwSectionFrm::SwClientNotify( const SwModify& rMod, const SfxHint& rHint ) +void SwSectionFrame::SwClientNotify( const SwModify& rMod, const SfxHint& rHint ) { SwClient::SwClientNotify(rMod, rHint); // #i117863# - const SwSectionFrmMoveAndDeleteHint* pHint = - dynamic_cast<const SwSectionFrmMoveAndDeleteHint*>(&rHint); + const SwSectionFrameMoveAndDeleteHint* pHint = + dynamic_cast<const SwSectionFrameMoveAndDeleteHint*>(&rHint); if ( pHint && pHint->GetId() == SFX_HINT_DYING && &rMod == GetRegisteredIn() ) { - SwSectionFrm::MoveContentAndDelete( this, pHint->IsSaveContent() ); + SwSectionFrame::MoveContentAndDelete( this, pHint->IsSaveContent() ); } } -void SwSectionFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew, +void SwSectionFrame::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew, sal_uInt8 &rInvFlags, SwAttrSetChg *pOldSet, SwAttrSetChg *pNewSet ) { @@ -2322,10 +2322,10 @@ void SwSectionFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew // on the old column attribute. We're left with creating a // temporary attribute here. SwFormatCol aCol; - if ( Lower() && Lower()->IsColumnFrm() ) + if ( Lower() && Lower()->IsColumnFrame() ) { sal_uInt16 nCol = 0; - SwFrm *pTmp = Lower(); + SwFrame *pTmp = Lower(); do { ++nCol; pTmp = pTmp->GetNext(); @@ -2399,7 +2399,7 @@ void SwSectionFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew case RES_PROTECT: { - SwViewShell *pSh = getRootFrm()->GetCurrShell(); + SwViewShell *pSh = getRootFrame()->GetCurrShell(); if( pSh && pSh->GetLayout()->IsAnyShellAccessible() ) pSh->Imp()->InvalidateAccessibleEditableState( true, this ); } @@ -2418,18 +2418,18 @@ void SwSectionFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew pNewSet->ClearItem( nWhich ); } else - SwLayoutFrm::Modify( pOld, pNew ); + SwLayoutFrame::Modify( pOld, pNew ); } } /// A follow or a ftncontainer at the end of the page causes a maximal Size of the sectionframe. -bool SwSectionFrm::ToMaximize( bool bCheckFollow ) const +bool SwSectionFrame::ToMaximize( bool bCheckFollow ) const { if( HasFollow() ) { if( !bCheckFollow ) // Don't check superfluous follows return true; - const SwSectionFrm* pFoll = GetFollow(); + const SwSectionFrame* pFoll = GetFollow(); while( pFoll && pFoll->IsSuperfluous() ) pFoll = pFoll->GetFollow(); if( pFoll ) @@ -2437,7 +2437,7 @@ bool SwSectionFrm::ToMaximize( bool bCheckFollow ) const } if( IsFootnoteAtEnd() ) return false; - const SwFootnoteContFrm* pCont = ContainsFootnoteCont(); + const SwFootnoteContFrame* pCont = ContainsFootnoteCont(); if( !IsEndnAtEnd() ) return nullptr != pCont; bool bRet = false; @@ -2451,157 +2451,157 @@ bool SwSectionFrm::ToMaximize( bool bCheckFollow ) const return bRet; } -/// Check every Column for FootnoteContFrms. -SwFootnoteContFrm* SwSectionFrm::ContainsFootnoteCont( const SwFootnoteContFrm* pCont ) const +/// Check every Column for FootnoteContFrames. +SwFootnoteContFrame* SwSectionFrame::ContainsFootnoteCont( const SwFootnoteContFrame* pCont ) const { - SwFootnoteContFrm* pRet = nullptr; - const SwLayoutFrm* pLay; + SwFootnoteContFrame* pRet = nullptr; + const SwLayoutFrame* pLay; if( pCont ) { - pLay = pCont->FindFootnoteBossFrm(); + pLay = pCont->FindFootnoteBossFrame(); OSL_ENSURE( IsAnLower( pLay ), "ConatainsFootnoteCont: Wrong FootnoteContainer" ); - pLay = static_cast<const SwLayoutFrm*>(pLay->GetNext()); + pLay = static_cast<const SwLayoutFrame*>(pLay->GetNext()); } - else if( Lower() && Lower()->IsColumnFrm() ) - pLay = static_cast<const SwLayoutFrm*>(Lower()); + else if( Lower() && Lower()->IsColumnFrame() ) + pLay = static_cast<const SwLayoutFrame*>(Lower()); else pLay = nullptr; while ( !pRet && pLay ) { if( pLay->Lower() && pLay->Lower()->GetNext() ) { - OSL_ENSURE( pLay->Lower()->GetNext()->IsFootnoteContFrm(), + OSL_ENSURE( pLay->Lower()->GetNext()->IsFootnoteContFrame(), "ToMaximize: Unexpected Frame" ); - pRet = const_cast<SwFootnoteContFrm*>(static_cast<const SwFootnoteContFrm*>(pLay->Lower()->GetNext())); + pRet = const_cast<SwFootnoteContFrame*>(static_cast<const SwFootnoteContFrame*>(pLay->Lower()->GetNext())); } - OSL_ENSURE( !pLay->GetNext() || pLay->GetNext()->IsLayoutFrm(), - "ToMaximize: ColFrm expected" ); - pLay = static_cast<const SwLayoutFrm*>(pLay->GetNext()); + OSL_ENSURE( !pLay->GetNext() || pLay->GetNext()->IsLayoutFrame(), + "ToMaximize: ColFrame expected" ); + pLay = static_cast<const SwLayoutFrame*>(pLay->GetNext()); } return pRet; } -void SwSectionFrm::InvalidateFootnotePos() +void SwSectionFrame::InvalidateFootnotePos() { - SwFootnoteContFrm* pCont = ContainsFootnoteCont(); + SwFootnoteContFrame* pCont = ContainsFootnoteCont(); if( pCont ) { - SwFrm *pTmp = pCont->ContainsContent(); + SwFrame *pTmp = pCont->ContainsContent(); if( pTmp ) pTmp->_InvalidatePos(); } } -SwTwips SwSectionFrm::CalcUndersize() const +SwTwips SwSectionFrame::CalcUndersize() const { SWRECTFN(this); return InnerHeight() - (Prt().*fnRect->fnGetHeight)(); } -SwTwips SwSectionFrm::Undersize(bool bOverSize) +SwTwips SwSectionFrame::Undersize(bool bOverSize) { const auto nRet = CalcUndersize(); m_bUndersized = (nRet > 0); return (nRet <= 0 && !bOverSize) ? 0 : nRet; } -void SwSectionFrm::CalcFootnoteContent() +void SwSectionFrame::CalcFootnoteContent() { - vcl::RenderContext* pRenderContext = getRootFrm()->GetCurrShell()->GetOut(); - SwFootnoteContFrm* pCont = ContainsFootnoteCont(); + vcl::RenderContext* pRenderContext = getRootFrame()->GetCurrShell()->GetOut(); + SwFootnoteContFrame* pCont = ContainsFootnoteCont(); if( pCont ) { - SwFrm* pFrm = pCont->ContainsAny(); - if( pFrm ) + SwFrame* pFrame = pCont->ContainsAny(); + if( pFrame ) pCont->Calc(pRenderContext); - while( pFrm && IsAnLower( pFrm ) ) + while( pFrame && IsAnLower( pFrame ) ) { - SwFootnoteFrm* pFootnote = pFrm->FindFootnoteFrm(); + SwFootnoteFrame* pFootnote = pFrame->FindFootnoteFrame(); if( pFootnote ) pFootnote->Calc(pRenderContext); - pFrm->Calc(pRenderContext); - if( pFrm->IsSctFrm() ) + pFrame->Calc(pRenderContext); + if( pFrame->IsSctFrame() ) { - SwFrm *pTmp = static_cast<SwSectionFrm*>(pFrm)->ContainsAny(); + SwFrame *pTmp = static_cast<SwSectionFrame*>(pFrame)->ContainsAny(); if( pTmp ) { - pFrm = pTmp; + pFrame = pTmp; continue; } } - pFrm = pFrm->FindNext(); + pFrame = pFrame->FindNext(); } } } /* - * If a SectionFrm gets empty, e.g. because its content changes the page/column, + * If a SectionFrame gets empty, e.g. because its content changes the page/column, * it is not destroyed immediately (there could be a pointer left to it on the - * stack), instead it puts itself in a list at the RootFrm, which is processed + * stack), instead it puts itself in a list at the RootFrame, which is processed * later on (in Layaction::Action among others). Its size is set to Null and - * the pointer to its page as well. Such SectionFrms that are to be deleted + * the pointer to its page as well. Such SectionFrames that are to be deleted * must be ignored by the layout/during formatting. * - * With InsertEmptySct the RootFrm stores a SectionFrm in the list, + * With InsertEmptySct the RootFrame stores a SectionFrame in the list, * with RemoveFromList it can be removed from the list (Dtor), - * with DeleteEmptySct the list is processed and the SectionFrms are destroyed. + * with DeleteEmptySct the list is processed and the SectionFrames are destroyed. */ -void SwRootFrm::InsertEmptySct( SwSectionFrm* pDel ) +void SwRootFrame::InsertEmptySct( SwSectionFrame* pDel ) { if( !mpDestroy ) mpDestroy = new SwDestroyList; mpDestroy->insert( pDel ); } -void SwRootFrm::_DeleteEmptySct() +void SwRootFrame::_DeleteEmptySct() { OSL_ENSURE( mpDestroy, "Keine Liste, keine Kekse" ); while( !mpDestroy->empty() ) { - SwSectionFrm* pSect = *mpDestroy->begin(); + SwSectionFrame* pSect = *mpDestroy->begin(); mpDestroy->erase( mpDestroy->begin() ); OSL_ENSURE( !pSect->IsColLocked() && !pSect->IsJoinLocked(), - "DeleteEmptySct: Locked SectionFrm" ); - if( !pSect->Frm().HasArea() && !pSect->ContainsContent() ) + "DeleteEmptySct: Locked SectionFrame" ); + if( !pSect->Frame().HasArea() && !pSect->ContainsContent() ) { - SwLayoutFrm* pUp = pSect->GetUpper(); + SwLayoutFrame* pUp = pSect->GetUpper(); pSect->RemoveFromLayout(); - SwFrm::DestroyFrm(pSect); + SwFrame::DestroyFrame(pSect); if( pUp && !pUp->Lower() ) { - if( pUp->IsPageBodyFrm() ) - pUp->getRootFrm()->SetSuperfluous(); - else if( pUp->IsFootnoteFrm() && !pUp->IsColLocked() && + if( pUp->IsPageBodyFrame() ) + pUp->getRootFrame()->SetSuperfluous(); + else if( pUp->IsFootnoteFrame() && !pUp->IsColLocked() && pUp->GetUpper() ) { pUp->Cut(); - SwFrm::DestroyFrm(pUp); + SwFrame::DestroyFrame(pUp); } } } else { - OSL_ENSURE( pSect->GetSection(), "DeleteEmptySct: Halbtoter SectionFrm?!" ); + OSL_ENSURE( pSect->GetSection(), "DeleteEmptySct: Halbtoter SectionFrame?!" ); } } } -void SwRootFrm::_RemoveFromList( SwSectionFrm* pSct ) +void SwRootFrame::_RemoveFromList( SwSectionFrame* pSct ) { OSL_ENSURE( mpDestroy, "Where's my list?" ); mpDestroy->erase( pSct ); } #ifdef DBG_UTIL -bool SwRootFrm::IsInDelList( SwSectionFrm* pSct ) const +bool SwRootFrame::IsInDelList( SwSectionFrame* pSct ) const { return mpDestroy && mpDestroy->find( pSct ) != mpDestroy->end(); } #endif -bool SwSectionFrm::IsBalancedSection() const +bool SwSectionFrame::IsBalancedSection() const { bool bRet = false; - if ( GetSection() && Lower() && Lower()->IsColumnFrm() && Lower()->GetNext() ) + if ( GetSection() && Lower() && Lower()->IsColumnFrame() && Lower()->GetNext() ) { bRet = !GetSection()->GetFormat()->GetBalancedColumns().GetValue(); } diff --git a/sw/source/core/layout/softpagebreak.cxx b/sw/source/core/layout/softpagebreak.cxx index ca1ad036e209..ce792711641d 100644 --- a/sw/source/core/layout/softpagebreak.cxx +++ b/sw/source/core/layout/softpagebreak.cxx @@ -27,41 +27,41 @@ void SwTextNode::fillSoftPageBreakList( SwSoftPageBreakList& rBreak ) const { - SwIterator<SwTextFrm,SwTextNode> aIter( *this ); - for( const SwTextFrm *pFrm = aIter.First(); pFrm; pFrm = aIter.Next() ) + SwIterator<SwTextFrame,SwTextNode> aIter( *this ); + for( const SwTextFrame *pFrame = aIter.First(); pFrame; pFrame = aIter.Next() ) { // No soft page break in header or footer - if( pFrm->FindFooterOrHeader() || pFrm->IsInFly() ) + if( pFrame->FindFooterOrHeader() || pFrame->IsInFly() ) return; // No soft page break if I'm not the first frame in my layout frame - if( pFrm->GetIndPrev() ) + if( pFrame->GetIndPrev() ) continue; - const SwPageFrm* pPage = pFrm->FindPageFrm(); + const SwPageFrame* pPage = pFrame->FindPageFrame(); // No soft page break at the first page if( pPage && pPage->GetPrev() ) { - const SwContentFrm* pFirst2 = pPage->FindFirstBodyContent(); + const SwContentFrame* pFirst2 = pPage->FindFirstBodyContent(); // Special handling for content frame in table frames - if( pFrm->IsInTab() ) + if( pFrame->IsInTab() ) { // No soft page break if I'm in a table but the first content frame // at my page is not in a table if( !pFirst2 || !pFirst2->IsInTab() ) continue; - const SwLayoutFrm *pRow = pFrm->GetUpper(); + const SwLayoutFrame *pRow = pFrame->GetUpper(); // Looking for the "most upper" row frame, // skipping sub tables and/or table in table - while( !pRow->IsRowFrm() || !pRow->GetUpper()->IsTabFrm() || + while( !pRow->IsRowFrame() || !pRow->GetUpper()->IsTabFrame() || pRow->GetUpper()->GetUpper()->IsInTab() ) pRow = pRow->GetUpper(); - const SwTabFrm *pTab = pRow->FindTabFrm(); + const SwTabFrame *pTab = pRow->FindTabFrame(); // For master tables the soft page break will exported at the table row, // not at the content frame. // If the first content is outside my table frame, no soft page break. if( !pTab->IsFollow() || !pTab->IsAnLower( pFirst2 ) ) continue; // Only content of non-heading-rows can get a soft page break - const SwFrm* pFirstRow = pTab->GetFirstNonHeadlineRow(); + const SwFrame* pFirstRow = pTab->GetFirstNonHeadlineRow(); // If there's no follow flow line, the soft page break will be // exported at the row, not at the content. if( pRow == pFirstRow && @@ -72,14 +72,14 @@ void SwTextNode::fillSoftPageBreakList( SwSoftPageBreakList& rBreak ) const // the soft page break itself. // Every first content frame of every cell frame in this row // will get the soft page break - const SwFrm* pCell = pRow->Lower(); + const SwFrame* pCell = pRow->Lower(); while( pCell ) { - pFirst2 = static_cast<const SwLayoutFrm*>(pCell)->ContainsContent(); - if( pFirst2 == pFrm ) + pFirst2 = static_cast<const SwLayoutFrame*>(pCell)->ContainsContent(); + if( pFirst2 == pFrame ) { // Here we are: a first content inside a cell // inside the splitted row => soft page break - rBreak.insert( pFrm->GetOfst() ); + rBreak.insert( pFrame->GetOfst() ); break; } pCell = pCell->GetNext(); @@ -87,8 +87,8 @@ void SwTextNode::fillSoftPageBreakList( SwSoftPageBreakList& rBreak ) const } } else // No soft page break if there's a "hard" page break attribute - if( pFirst2 == pFrm && !pFrm->IsPageBreak( true ) ) - rBreak.insert( pFrm->GetOfst() ); + if( pFirst2 == pFrame && !pFrame->IsPageBreak( true ) ) + rBreak.insert( pFrame->GetOfst() ); } } } @@ -98,12 +98,12 @@ bool SwTableLine::hasSoftPageBreak() const // No soft page break for sub tables if( GetUpper() || !GetFrameFormat() ) return false; - SwIterator<SwRowFrm,SwFormat> aIter( *GetFrameFormat() ); - for( SwRowFrm* pLast = aIter.First(); pLast; pLast = aIter.Next() ) + SwIterator<SwRowFrame,SwFormat> aIter( *GetFrameFormat() ); + for( SwRowFrame* pLast = aIter.First(); pLast; pLast = aIter.Next() ) { if( pLast->GetTabLine() == this ) { - const SwTabFrm* pTab = pLast->FindTabFrm(); + const SwTabFrame* pTab = pLast->FindTabFrame(); // No soft page break for // tables with prevs, i.e. if the frame is not the first in its layout frame // tables in footer or header @@ -114,19 +114,19 @@ bool SwTableLine::hasSoftPageBreak() const || pTab->IsInFly() || pTab->GetUpper()->IsInTab() || ( !pTab->IsFollow() && pTab->IsPageBreak( true ) ) ) return false; - const SwPageFrm* pPage = pTab->FindPageFrm(); + const SwPageFrame* pPage = pTab->FindPageFrame(); // No soft page break at the first page of the document if( pPage && !pPage->GetPrev() ) return false; - const SwContentFrm* pFirst = pPage ? pPage->FindFirstBodyContent() : nullptr; + const SwContentFrame* pFirst = pPage ? pPage->FindFirstBodyContent() : nullptr; // No soft page break for // tables which does not contain the first body content of the page - if( !pFirst || !pTab->IsAnLower( pFirst->FindTabFrm() ) ) + if( !pFirst || !pTab->IsAnLower( pFirst->FindTabFrame() ) ) return false; // The row which could get a soft page break must be either the first // row of a master table frame or the first "non-headline-row" of a // follow table frame... - const SwFrm* pRow = pTab->IsFollow() ? + const SwFrame* pRow = pTab->IsFollow() ? pTab->GetFirstNonHeadlineRow() : pTab->Lower(); if( pRow == pLast ) { diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx index 1e1db225397d..b20fadb93cbd 100644 --- a/sw/source/core/layout/ssfrm.cxx +++ b/sw/source/core/layout/ssfrm.cxx @@ -33,163 +33,163 @@ #include <hints.hxx> // No inline cause we need the function pointers -long SwFrm::GetTopMargin() const +long SwFrame::GetTopMargin() const { return Prt().Top(); } -long SwFrm::GetBottomMargin() const - { return Frm().Height() -Prt().Height() -Prt().Top(); } -long SwFrm::GetLeftMargin() const +long SwFrame::GetBottomMargin() const + { return Frame().Height() -Prt().Height() -Prt().Top(); } +long SwFrame::GetLeftMargin() const { return Prt().Left(); } -long SwFrm::GetRightMargin() const - { return Frm().Width() - Prt().Width() - Prt().Left(); } -long SwFrm::GetPrtLeft() const - { return Frm().Left() + Prt().Left(); } -long SwFrm::GetPrtBottom() const - { return Frm().Top() + Prt().Height() + Prt().Top(); } -long SwFrm::GetPrtRight() const - { return Frm().Left() + Prt().Width() + Prt().Left(); } -long SwFrm::GetPrtTop() const - { return Frm().Top() + Prt().Top(); } - -bool SwFrm::SetMinLeft( long nDeadline ) +long SwFrame::GetRightMargin() const + { return Frame().Width() - Prt().Width() - Prt().Left(); } +long SwFrame::GetPrtLeft() const + { return Frame().Left() + Prt().Left(); } +long SwFrame::GetPrtBottom() const + { return Frame().Top() + Prt().Height() + Prt().Top(); } +long SwFrame::GetPrtRight() const + { return Frame().Left() + Prt().Width() + Prt().Left(); } +long SwFrame::GetPrtTop() const + { return Frame().Top() + Prt().Top(); } + +bool SwFrame::SetMinLeft( long nDeadline ) { - SwTwips nDiff = nDeadline - Frm().Left(); + SwTwips nDiff = nDeadline - Frame().Left(); if( nDiff > 0 ) { - Frm().Left( nDeadline ); + Frame().Left( nDeadline ); Prt().Width( Prt().Width() - nDiff ); return true; } return false; } -bool SwFrm::SetMaxBottom( long nDeadline ) +bool SwFrame::SetMaxBottom( long nDeadline ) { - SwTwips nDiff = Frm().Top() + Frm().Height() - nDeadline; + SwTwips nDiff = Frame().Top() + Frame().Height() - nDeadline; if( nDiff > 0 ) { - Frm().Height( Frm().Height() - nDiff ); + Frame().Height( Frame().Height() - nDiff ); Prt().Height( Prt().Height() - nDiff ); return true; } return false; } -bool SwFrm::SetMinTop( long nDeadline ) +bool SwFrame::SetMinTop( long nDeadline ) { - SwTwips nDiff = nDeadline - Frm().Top(); + SwTwips nDiff = nDeadline - Frame().Top(); if( nDiff > 0 ) { - Frm().Top( nDeadline ); + Frame().Top( nDeadline ); Prt().Height( Prt().Height() - nDiff ); return true; } return false; } -bool SwFrm::SetMaxRight( long nDeadline ) +bool SwFrame::SetMaxRight( long nDeadline ) { - SwTwips nDiff = Frm().Left() + Frm().Width() - nDeadline; + SwTwips nDiff = Frame().Left() + Frame().Width() - nDeadline; if( nDiff > 0 ) { - Frm().Width( Frm().Width() - nDiff ); + Frame().Width( Frame().Width() - nDiff ); Prt().Width( Prt().Width() - nDiff ); return true; } return false; } -void SwFrm::MakeBelowPos( const SwFrm* pUp, const SwFrm* pPrv, bool bNotify ) +void SwFrame::MakeBelowPos( const SwFrame* pUp, const SwFrame* pPrv, bool bNotify ) { if( pPrv ) { - maFrm.Pos( pPrv->Frm().Pos() ); - maFrm.Pos().Y() += pPrv->Frm().Height(); + maFrame.Pos( pPrv->Frame().Pos() ); + maFrame.Pos().Y() += pPrv->Frame().Height(); } else { - maFrm.Pos( pUp->Frm().Pos() ); - maFrm.Pos() += pUp->Prt().Pos(); + maFrame.Pos( pUp->Frame().Pos() ); + maFrame.Pos() += pUp->Prt().Pos(); } if( bNotify ) - maFrm.Pos().Y() += 1; + maFrame.Pos().Y() += 1; } -void SwFrm::MakeUpperPos( const SwFrm* pUp, const SwFrm* pPrv, bool bNotify ) +void SwFrame::MakeUpperPos( const SwFrame* pUp, const SwFrame* pPrv, bool bNotify ) { if( pPrv ) { - maFrm.Pos( pPrv->Frm().Pos() ); - maFrm.Pos().Y() -= Frm().Height(); + maFrame.Pos( pPrv->Frame().Pos() ); + maFrame.Pos().Y() -= Frame().Height(); } else { - maFrm.Pos( pUp->Frm().Pos() ); - maFrm.Pos() += pUp->Prt().Pos(); - maFrm.Pos().Y() += pUp->Prt().Height() - maFrm.Height(); + maFrame.Pos( pUp->Frame().Pos() ); + maFrame.Pos() += pUp->Prt().Pos(); + maFrame.Pos().Y() += pUp->Prt().Height() - maFrame.Height(); } if( bNotify ) - maFrm.Pos().Y() -= 1; + maFrame.Pos().Y() -= 1; } -void SwFrm::MakeLeftPos( const SwFrm* pUp, const SwFrm* pPrv, bool bNotify ) +void SwFrame::MakeLeftPos( const SwFrame* pUp, const SwFrame* pPrv, bool bNotify ) { if( pPrv ) { - maFrm.Pos( pPrv->Frm().Pos() ); - maFrm.Pos().X() -= Frm().Width(); + maFrame.Pos( pPrv->Frame().Pos() ); + maFrame.Pos().X() -= Frame().Width(); } else { - maFrm.Pos( pUp->Frm().Pos() ); - maFrm.Pos() += pUp->Prt().Pos(); - maFrm.Pos().X() += pUp->Prt().Width() - maFrm.Width(); + maFrame.Pos( pUp->Frame().Pos() ); + maFrame.Pos() += pUp->Prt().Pos(); + maFrame.Pos().X() += pUp->Prt().Width() - maFrame.Width(); } if( bNotify ) - maFrm.Pos().X() -= 1; + maFrame.Pos().X() -= 1; } -void SwFrm::MakeRightPos( const SwFrm* pUp, const SwFrm* pPrv, bool bNotify ) +void SwFrame::MakeRightPos( const SwFrame* pUp, const SwFrame* pPrv, bool bNotify ) { if( pPrv ) { - maFrm.Pos( pPrv->Frm().Pos() ); - maFrm.Pos().X() += pPrv->Frm().Width(); + maFrame.Pos( pPrv->Frame().Pos() ); + maFrame.Pos().X() += pPrv->Frame().Width(); } else { - maFrm.Pos( pUp->Frm().Pos() ); - maFrm.Pos() += pUp->Prt().Pos(); + maFrame.Pos( pUp->Frame().Pos() ); + maFrame.Pos() += pUp->Prt().Pos(); } if( bNotify ) - maFrm.Pos().X() += 1; + maFrame.Pos().X() += 1; } -void SwFrm::SetTopBottomMargins( long nTop, long nBot ) +void SwFrame::SetTopBottomMargins( long nTop, long nBot ) { Prt().Top( nTop ); - Prt().Height( Frm().Height() - nTop - nBot ); + Prt().Height( Frame().Height() - nTop - nBot ); } -void SwFrm::SetBottomTopMargins( long nBot, long nTop ) +void SwFrame::SetBottomTopMargins( long nBot, long nTop ) { Prt().Top( nTop ); - Prt().Height( Frm().Height() - nTop - nBot ); + Prt().Height( Frame().Height() - nTop - nBot ); } -void SwFrm::SetLeftRightMargins( long nLeft, long nRight) +void SwFrame::SetLeftRightMargins( long nLeft, long nRight) { Prt().Left( nLeft ); - Prt().Width( Frm().Width() - nLeft - nRight ); + Prt().Width( Frame().Width() - nLeft - nRight ); } -void SwFrm::SetRightLeftMargins( long nRight, long nLeft) +void SwFrame::SetRightLeftMargins( long nRight, long nLeft) { Prt().Left( nLeft ); - Prt().Width( Frm().Width() - nLeft - nRight ); + Prt().Width( Frame().Width() - nLeft - nRight ); } /// checks the layout direction and invalidates the lower frames recursively, if necessary. -void SwFrm::CheckDirChange() +void SwFrame::CheckDirChange() { bool bOldVert = GetVerticalFlag(); bool bOldRev = IsReverse(); @@ -201,21 +201,21 @@ void SwFrm::CheckDirChange() if( ( IsVertical() != bOldVert ) || bChg || IsReverse() != bOldRev || bOldVertL2R != IsVertLR() ) { InvalidateAll(); - if( IsLayoutFrm() ) + if( IsLayoutFrame() ) { // set minimum row height for vertical cells in horizontal table: - if ( IsCellFrm() && GetUpper() ) + if ( IsCellFrame() && GetUpper() ) { if ( IsVertical() != GetUpper()->IsVertical() && - static_cast<SwCellFrm*>(this)->GetTabBox()->getRowSpan() == 1 ) + static_cast<SwCellFrame*>(this)->GetTabBox()->getRowSpan() == 1 ) { enum { MIN_VERT_CELL_HEIGHT = 1135 }; - SwTableLine* pLine = const_cast<SwTableLine*>(static_cast<SwCellFrm*>(this)->GetTabBox()->GetUpper()); + SwTableLine* pLine = const_cast<SwTableLine*>(static_cast<SwCellFrame*>(this)->GetTabBox()->GetUpper()); SwFrameFormat* pFrameFormat = pLine->GetFrameFormat(); - SwFormatFrmSize aNew( pFrameFormat->GetFrmSize() ); + SwFormatFrameSize aNew( pFrameFormat->GetFrameSize() ); if ( ATT_FIX_SIZE != aNew.GetHeightSizeType() ) aNew.SetHeightSizeType( ATT_MIN_SIZE ); if ( aNew.GetHeight() < MIN_VERT_CELL_HEIGHT ) @@ -225,37 +225,37 @@ void SwFrm::CheckDirChange() } } - SwFrm* pFrm = static_cast<SwLayoutFrm*>(this)->Lower(); + SwFrame* pFrame = static_cast<SwLayoutFrame*>(this)->Lower(); const SwFormatCol* pCol = nullptr; - SwLayoutFrm* pBody = nullptr; - if( pFrm ) + SwLayoutFrame* pBody = nullptr; + if( pFrame ) { - if( IsPageFrm() ) + if( IsPageFrame() ) { // If we're a page frame and we change our layout direction, // we have to look for columns and rearrange them. - pBody = static_cast<SwPageFrm*>(this)->FindBodyCont(); - if(pBody && pBody->Lower() && pBody->Lower()->IsColumnFrm()) - pCol = &static_cast<SwPageFrm*>(this)->GetFormat()->GetCol(); + pBody = static_cast<SwPageFrame*>(this)->FindBodyCont(); + if(pBody && pBody->Lower() && pBody->Lower()->IsColumnFrame()) + pCol = &static_cast<SwPageFrame*>(this)->GetFormat()->GetCol(); } - else if( pFrm->IsColumnFrm() ) + else if( pFrame->IsColumnFrame() ) { - pBody = static_cast<SwLayoutFrm*>(this); + pBody = static_cast<SwLayoutFrame*>(this); const SwFrameFormat *pFormat = pBody->GetFormat(); if( pFormat ) pCol = &pFormat->GetCol(); } } - while( pFrm ) + while( pFrame ) { - pFrm->CheckDirChange(); - pFrm = pFrm->GetNext(); + pFrame->CheckDirChange(); + pFrame = pFrame->GetNext(); } if( pCol ) pBody->AdjustColumns( pCol, true ); } - else if( IsTextFrm() ) - static_cast<SwTextFrm*>(this)->Prepare(); + else if( IsTextFrame() ) + static_cast<SwTextFrame*>(this)->Prepare(); // #i31698# - notify anchored objects also for page frames. // Remove code above for special handling of page frames @@ -266,8 +266,8 @@ void SwFrm::CheckDirChange() for ( size_t i = 0; i < nCnt; ++i ) { SwAnchoredObject* pAnchoredObj = (*pObjs)[i]; - if( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) != nullptr ) - static_cast<SwFlyFrm*>(pAnchoredObj)->CheckDirChange(); + if( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr ) + static_cast<SwFlyFrame*>(pAnchoredObj)->CheckDirChange(); else { // OD 2004-04-06 #i26791# - direct object @@ -278,7 +278,7 @@ void SwFrm::CheckDirChange() // #i31698# - update layout direction of // anchored object { - ::setContextWritingMode( pAnchoredObj->DrawObj(), pAnchoredObj->GetAnchorFrmContainingAnchPos() ); + ::setContextWritingMode( pAnchoredObj->DrawObj(), pAnchoredObj->GetAnchorFrameContainingAnchPos() ); pAnchoredObj->UpdateLayoutDir(); } } @@ -289,17 +289,17 @@ void SwFrm::CheckDirChange() /// returns the position for anchors based on frame direction // OD 2004-03-10 #i11860# - consider lower space and line spacing of // previous frame according to new option 'Use former object positioning' -Point SwFrm::GetFrmAnchorPos( bool bIgnoreFlysAnchoredAtThisFrame ) const +Point SwFrame::GetFrameAnchorPos( bool bIgnoreFlysAnchoredAtThisFrame ) const { - Point aAnchor = Frm().Pos(); + Point aAnchor = Frame().Pos(); if ( ( IsVertical() && !IsVertLR() ) || IsRightToLeft() ) - aAnchor.X() += Frm().Width(); + aAnchor.X() += Frame().Width(); - if ( IsTextFrm() ) + if ( IsTextFrame() ) { SwTwips nBaseOfstForFly = - static_cast<const SwTextFrm*>(this)->GetBaseOfstForFly( bIgnoreFlysAnchoredAtThisFrame ); + static_cast<const SwTextFrame*>(this)->GetBaseOfstForFly( bIgnoreFlysAnchoredAtThisFrame ); if ( IsVertical() ) aAnchor.Y() += nBaseOfstForFly; else @@ -308,38 +308,38 @@ Point SwFrm::GetFrmAnchorPos( bool bIgnoreFlysAnchoredAtThisFrame ) const // OD 2004-03-10 #i11860# - if option 'Use former object positioning' // is OFF, consider the lower space and the line spacing of the // previous frame and the spacing considered for the page grid - const SwTextFrm* pThisTextFrm = static_cast<const SwTextFrm*>(this); - const SwTwips nUpperSpaceAmountConsideredForPrevFrmAndPageGrid = - pThisTextFrm->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid(); + const SwTextFrame* pThisTextFrame = static_cast<const SwTextFrame*>(this); + const SwTwips nUpperSpaceAmountConsideredForPrevFrameAndPageGrid = + pThisTextFrame->GetUpperSpaceAmountConsideredForPrevFrameAndPageGrid(); if ( IsVertical() ) { - aAnchor.X() -= nUpperSpaceAmountConsideredForPrevFrmAndPageGrid; + aAnchor.X() -= nUpperSpaceAmountConsideredForPrevFrameAndPageGrid; } else { - aAnchor.Y() += nUpperSpaceAmountConsideredForPrevFrmAndPageGrid; + aAnchor.Y() += nUpperSpaceAmountConsideredForPrevFrameAndPageGrid; } } return aAnchor; } -void SwFrm::DestroyImpl() +void SwFrame::DestroyImpl() { mbInDtor = true; // accessible objects for fly and cell frames have been already disposed // by the destructors of the derived classes. - if( IsAccessibleFrm() && !(IsFlyFrm() || IsCellFrm()) && GetDep() ) + if( IsAccessibleFrame() && !(IsFlyFrame() || IsCellFrame()) && GetDep() ) { - SwRootFrm *pRootFrm = getRootFrm(); - if( pRootFrm && pRootFrm->IsAnyShellAccessible() ) + SwRootFrame *pRootFrame = getRootFrame(); + if( pRootFrame && pRootFrame->IsAnyShellAccessible() ) { - SwViewShell *pVSh = pRootFrm->GetCurrShell(); + SwViewShell *pVSh = pRootFrame->GetCurrShell(); if( pVSh && pVSh->Imp() ) { OSL_ENSURE( !GetLower(), "Lowers should be dispose already!" ); - pVSh->Imp()->DisposeAccessibleFrm( this ); + pVSh->Imp()->DisposeAccessibleFrame( this ); } } } @@ -349,9 +349,9 @@ void SwFrm::DestroyImpl() for ( size_t i = mpDrawObjs->size(); i; ) { SwAnchoredObject* pAnchoredObj = (*mpDrawObjs)[--i]; - if ( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) != nullptr ) + if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr ) { - SwFrm::DestroyFrm(static_cast<SwFlyFrm*>(pAnchoredObj)); + SwFrame::DestroyFrame(static_cast<SwFlyFrame*>(pAnchoredObj)); } else { @@ -359,7 +359,7 @@ void SwFrm::DestroyImpl() SwDrawContact* pContact = static_cast<SwDrawContact*>(pSdrObj->GetUserCall()); OSL_ENSURE( pContact, - "<SwFrm::~SwFrm> - missing contact for drawing object" ); + "<SwFrame::~SwFrame> - missing contact for drawing object" ); if ( pContact ) { pContact->DisconnectObjFromLayout( pSdrObj ); @@ -371,9 +371,9 @@ void SwFrm::DestroyImpl() } } -SwFrm::~SwFrm() +SwFrame::~SwFrame() { - assert(m_isInDestroy); // check that only DestroySwFrm does "delete" + assert(m_isInDestroy); // check that only DestroySwFrame does "delete" assert(!IsDeleteForbidden()); // check that its not deleted while deletes are forbidden #if OSL_DEBUG_LEVEL > 0 // JP 15.10.2001: for detection of access to deleted frames @@ -381,28 +381,28 @@ SwFrm::~SwFrm() #endif } -void SwFrm::DestroyFrm(SwFrm *const pFrm) +void SwFrame::DestroyFrame(SwFrame *const pFrame) { - if (pFrm) + if (pFrame) { - pFrm->m_isInDestroy = true; - pFrm->DestroyImpl(); - assert(pFrm->mbInDtor); // check that nobody forgot to call base class - delete pFrm; + pFrame->m_isInDestroy = true; + pFrame->DestroyImpl(); + assert(pFrame->mbInDtor); // check that nobody forgot to call base class + delete pFrame; } } -const SwFrameFormat * SwLayoutFrm::GetFormat() const +const SwFrameFormat * SwLayoutFrame::GetFormat() const { return static_cast< const SwFrameFormat * >( GetDep() ); } -SwFrameFormat * SwLayoutFrm::GetFormat() +SwFrameFormat * SwLayoutFrame::GetFormat() { return static_cast< SwFrameFormat * >( GetDep() ); } -void SwLayoutFrm::SetFrameFormat( SwFrameFormat *pNew ) +void SwLayoutFrame::SetFrameFormat( SwFrameFormat *pNew ) { if ( pNew != GetFormat() ) { @@ -413,20 +413,20 @@ void SwLayoutFrm::SetFrameFormat( SwFrameFormat *pNew ) } } -SwContentFrm::SwContentFrm( SwContentNode * const pContent, SwFrm* pSib ) : - SwFrm( pContent, pSib ), - SwFlowFrm( (SwFrm&)*this ) +SwContentFrame::SwContentFrame( SwContentNode * const pContent, SwFrame* pSib ) : + SwFrame( pContent, pSib ), + SwFlowFrame( (SwFrame&)*this ) { } -void SwContentFrm::DestroyImpl() +void SwContentFrame::DestroyImpl() { const SwContentNode* pCNd; if( nullptr != ( pCNd = dynamic_cast<SwContentNode*>( GetRegisteredIn() ) ) && !pCNd->GetDoc()->IsInDtor() ) { //Unregister from root if I'm still in turbo there. - SwRootFrm *pRoot = getRootFrm(); + SwRootFrame *pRoot = getRootFrame(); if( pRoot && pRoot->GetTurbo() == this ) { pRoot->DisallowTurbo(); @@ -434,48 +434,48 @@ void SwContentFrm::DestroyImpl() } } - SwFrm::DestroyImpl(); + SwFrame::DestroyImpl(); } -SwContentFrm::~SwContentFrm() +SwContentFrame::~SwContentFrame() { } -void SwContentFrm::RegisterToNode( SwContentNode& rNode ) +void SwContentFrame::RegisterToNode( SwContentNode& rNode ) { rNode.Add( this ); } -void SwLayoutFrm::DestroyImpl() +void SwLayoutFrame::DestroyImpl() { - while (!m_VertPosOrientFrmsFor.empty()) + while (!m_VertPosOrientFramesFor.empty()) { - SwAnchoredObject *pObj = *m_VertPosOrientFrmsFor.begin(); - pObj->ClearVertPosOrientFrm(); + SwAnchoredObject *pObj = *m_VertPosOrientFramesFor.begin(); + pObj->ClearVertPosOrientFrame(); } - assert(m_VertPosOrientFrmsFor.empty()); + assert(m_VertPosOrientFramesFor.empty()); - SwFrm *pFrm = m_pLower; + SwFrame *pFrame = m_pLower; if( GetFormat() && !GetFormat()->GetDoc()->IsInDtor() ) { - while ( pFrm ) + while ( pFrame ) { - //First delete the Objs of the Frm because they can't unregister + //First delete the Objs of the Frame because they can't unregister //from the page after remove. //We don't want to create an endless loop only because one couldn't //unregister. - while ( pFrm->GetDrawObjs() && pFrm->GetDrawObjs()->size() ) + while ( pFrame->GetDrawObjs() && pFrame->GetDrawObjs()->size() ) { - const size_t nCnt = pFrm->GetDrawObjs()->size(); + const size_t nCnt = pFrame->GetDrawObjs()->size(); // #i28701# - SwAnchoredObject* pAnchoredObj = (*pFrm->GetDrawObjs())[0]; - if ( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) != nullptr ) + SwAnchoredObject* pAnchoredObj = (*pFrame->GetDrawObjs())[0]; + if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr ) { - SwFrm::DestroyFrm(static_cast<SwFlyFrm*>(pAnchoredObj)); - assert(!pFrm->GetDrawObjs() || nCnt > pFrm->GetDrawObjs()->size()); + SwFrame::DestroyFrame(static_cast<SwFlyFrame*>(pAnchoredObj)); + assert(!pFrame->GetDrawObjs() || nCnt > pFrame->GetDrawObjs()->size()); } else { @@ -483,22 +483,22 @@ void SwLayoutFrm::DestroyImpl() SwDrawContact* pContact = static_cast<SwDrawContact*>(pSdrObj->GetUserCall()); OSL_ENSURE( pContact, - "<SwFrm::~SwFrm> - missing contact for drawing object" ); + "<SwFrame::~SwFrame> - missing contact for drawing object" ); if ( pContact ) { pContact->DisconnectObjFromLayout( pSdrObj ); } - if ( pFrm->GetDrawObjs() && - nCnt == pFrm->GetDrawObjs()->size() ) + if ( pFrame->GetDrawObjs() && + nCnt == pFrame->GetDrawObjs()->size() ) { - pFrm->GetDrawObjs()->Remove( *pAnchoredObj ); + pFrame->GetDrawObjs()->Remove( *pAnchoredObj ); } } } - pFrm->RemoveFromLayout(); - SwFrm::DestroyFrm(pFrm); - pFrm = m_pLower; + pFrame->RemoveFromLayout(); + SwFrame::DestroyFrame(pFrame); + pFrame = m_pLower; } //Delete the Flys, the last one also deletes the array. while ( GetDrawObjs() && GetDrawObjs()->size() ) @@ -507,9 +507,9 @@ void SwLayoutFrm::DestroyImpl() // #i28701# SwAnchoredObject* pAnchoredObj = (*GetDrawObjs())[0]; - if ( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) != nullptr ) + if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr ) { - SwFrm::DestroyFrm(static_cast<SwFlyFrm*>(pAnchoredObj)); + SwFrame::DestroyFrame(static_cast<SwFlyFrame*>(pAnchoredObj)); assert(!GetDrawObjs() || nCnt > GetDrawObjs()->size()); } else @@ -518,7 +518,7 @@ void SwLayoutFrm::DestroyImpl() SwDrawContact* pContact = static_cast<SwDrawContact*>(pSdrObj->GetUserCall()); OSL_ENSURE( pContact, - "<SwFrm::~SwFrm> - missing contact for drawing object" ); + "<SwFrame::~SwFrame> - missing contact for drawing object" ); if ( pContact ) { pContact->DisconnectObjFromLayout( pSdrObj ); @@ -533,18 +533,18 @@ void SwLayoutFrm::DestroyImpl() } else { - while( pFrm ) + while( pFrame ) { - SwFrm *pNxt = pFrm->GetNext(); - SwFrm::DestroyFrm(pFrm); - pFrm = pNxt; + SwFrame *pNxt = pFrame->GetNext(); + SwFrame::DestroyFrame(pFrame); + pFrame = pNxt; } } - SwFrm::DestroyImpl(); + SwFrame::DestroyImpl(); } -SwLayoutFrm::~SwLayoutFrm() +SwLayoutFrame::~SwLayoutFrame() { } @@ -553,51 +553,51 @@ SwLayoutFrm::~SwLayoutFrm() |* to be displayed. This region could be larger than the printarea (Prt()) |* of the upper, it includes e.g. often the margin of the page. |*/ -const SwRect SwFrm::PaintArea() const +const SwRect SwFrame::PaintArea() const { // NEW TABLES // Cell frames may not leave their upper: - SwRect aRect = IsRowFrm() ? GetUpper()->Frm() : Frm(); + SwRect aRect = IsRowFrame() ? GetUpper()->Frame() : Frame(); const bool bVert = IsVertical(); SwRectFn fnRect = bVert ? ( IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori; long nRight = (aRect.*fnRect->fnGetRight)(); long nLeft = (aRect.*fnRect->fnGetLeft)(); - const SwFrm* pTmp = this; + const SwFrame* pTmp = this; bool bLeft = true; bool bRight = true; long nRowSpan = 0; while( pTmp ) { - if( pTmp->IsCellFrm() && pTmp->GetUpper() && + if( pTmp->IsCellFrame() && pTmp->GetUpper() && pTmp->GetUpper()->IsVertical() != pTmp->IsVertical() ) - nRowSpan = static_cast<const SwCellFrm*>(pTmp)->GetTabBox()->getRowSpan(); - long nTmpRight = (pTmp->Frm().*fnRect->fnGetRight)(); - long nTmpLeft = (pTmp->Frm().*fnRect->fnGetLeft)(); - if( pTmp->IsRowFrm() && nRowSpan > 1 ) + nRowSpan = static_cast<const SwCellFrame*>(pTmp)->GetTabBox()->getRowSpan(); + long nTmpRight = (pTmp->Frame().*fnRect->fnGetRight)(); + long nTmpLeft = (pTmp->Frame().*fnRect->fnGetLeft)(); + if( pTmp->IsRowFrame() && nRowSpan > 1 ) { - const SwFrm* pNxt = pTmp; + const SwFrame* pNxt = pTmp; while( --nRowSpan > 0 && pNxt->GetNext() ) pNxt = pNxt->GetNext(); if( pTmp->IsVertical() ) - nTmpLeft = (pNxt->Frm().*fnRect->fnGetLeft)(); + nTmpLeft = (pNxt->Frame().*fnRect->fnGetLeft)(); else - nTmpRight = (pNxt->Frm().*fnRect->fnGetRight)(); + nTmpRight = (pNxt->Frame().*fnRect->fnGetRight)(); } OSL_ENSURE( pTmp, "PaintArea lost in time and space" ); - if( pTmp->IsPageFrm() || pTmp->IsFlyFrm() || - pTmp->IsCellFrm() || pTmp->IsRowFrm() || //nobody leaves a table! - pTmp->IsRootFrm() ) + if( pTmp->IsPageFrame() || pTmp->IsFlyFrame() || + pTmp->IsCellFrame() || pTmp->IsRowFrame() || //nobody leaves a table! + pTmp->IsRootFrame() ) { if( bLeft || nLeft < nTmpLeft ) nLeft = nTmpLeft; if( bRight || nTmpRight < nRight ) nRight = nTmpRight; - if( pTmp->IsPageFrm() || pTmp->IsFlyFrm() || pTmp->IsRootFrm() ) + if( pTmp->IsPageFrame() || pTmp->IsFlyFrame() || pTmp->IsRootFrame() ) break; bLeft = false; bRight = false; } - else if( pTmp->IsColumnFrm() ) // nobody enters neightbour columns + else if( pTmp->IsColumnFrame() ) // nobody enters neightbour columns { bool bR2L = pTmp->IsRightToLeft(); // the first column has _no_ influence to the left range @@ -615,7 +615,7 @@ const SwRect SwFrm::PaintArea() const bRight = false; } } - else if( bVert && pTmp->IsBodyFrm() ) + else if( bVert && pTmp->IsBodyFrame() ) { // Header and footer frames have always horizontal direction and // limit the body frame. @@ -629,7 +629,7 @@ const SwRect SwFrm::PaintArea() const bLeft = false; } if( pTmp->GetNext() && - ( pTmp->GetNext()->IsFooterFrm() || pTmp->GetNext()->GetNext() ) + ( pTmp->GetNext()->IsFooterFrame() || pTmp->GetNext()->GetNext() ) && ( bRight || nTmpRight < nRight ) ) { nRight = nTmpRight; @@ -644,15 +644,15 @@ const SwRect SwFrm::PaintArea() const } /** -|* The unionframe is the framearea (Frm()) of a frame expanded by the +|* The unionframe is the framearea (Frame()) of a frame expanded by the |* printarea, if there's a negative margin at the left or right side. |*/ -const SwRect SwFrm::UnionFrm( bool bBorder ) const +const SwRect SwFrame::UnionFrame( bool bBorder ) const { bool bVert = IsVertical(); SwRectFn fnRect = bVert ? ( IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori; - long nLeft = (Frm().*fnRect->fnGetLeft)(); - long nWidth = (Frm().*fnRect->fnGetWidth)(); + long nLeft = (Frame().*fnRect->fnGetLeft)(); + long nWidth = (Frame().*fnRect->fnGetWidth)(); long nPrtLeft = (Prt().*fnRect->fnGetLeft)(); long nPrtWidth = (Prt().*fnRect->fnGetWidth)(); if( nPrtLeft + nPrtWidth > nWidth ) @@ -666,7 +666,7 @@ const SwRect SwFrm::UnionFrm( bool bBorder ) const long nAdd = 0; if( bBorder ) { - SwBorderAttrAccess aAccess( SwFrm::GetCache(), this ); + SwBorderAttrAccess aAccess( SwFrame::GetCache(), this ); const SwBorderAttrs &rAttrs = *aAccess.Get(); const SvxBoxItem &rBox = rAttrs.GetBox(); if ( rBox.GetLeft() ) @@ -684,14 +684,14 @@ const SwRect SwFrm::UnionFrm( bool bBorder ) const nAdd += rShadow.CalcShadowSpace( SvxShadowItemSide::RIGHT ); } } - if( IsTextFrm() && static_cast<const SwTextFrm*>(this)->HasPara() ) + if( IsTextFrame() && static_cast<const SwTextFrame*>(this)->HasPara() ) { - long nTmp = static_cast<const SwTextFrm*>(this)->HangingMargin(); + long nTmp = static_cast<const SwTextFrame*>(this)->HangingMargin(); if( nTmp > nAdd ) nAdd = nTmp; } nWidth = nRight + nAdd - nLeft; - SwRect aRet( Frm() ); + SwRect aRet( Frame() ); (aRet.*fnRect->fnSetPosX)( nLeft ); (aRet.*fnRect->fnSetWidth)( nWidth ); return aRet; diff --git a/sw/source/core/layout/swselectionlist.cxx b/sw/source/core/layout/swselectionlist.cxx index ac71d89c2841..23f6de0e9b4e 100644 --- a/sw/source/core/layout/swselectionlist.cxx +++ b/sw/source/core/layout/swselectionlist.cxx @@ -30,49 +30,49 @@ namespace { A context is the environment where text is allowed to flow. The context is represented by - - the SwRootFrm if the frame is part of a page body - - the SwHeaderFrm if the frame is part of a page header - - the SwFooterFrm if the frame is part of a page footer - - the (master) SwFootnoteFrm if the frame is part of footnote - - the (first) SwFlyFrm if the frame is part of a (linked) fly frame + - the SwRootFrame if the frame is part of a page body + - the SwHeaderFrame if the frame is part of a page header + - the SwFooterFrame if the frame is part of a page footer + - the (master) SwFootnoteFrame if the frame is part of footnote + - the (first) SwFlyFrame if the frame is part of a (linked) fly frame - @param pFrm + @param pFrame the given frame - @return the context of the frame, represented by a SwFrm* + @return the context of the frame, represented by a SwFrame* */ - const SwFrm* getContext( const SwFrm* pFrm ) + const SwFrame* getContext( const SwFrame* pFrame ) { - while( pFrm ) + while( pFrame ) { - if( pFrm->IsRootFrm() || pFrm->IsHeaderFrm() || pFrm->IsFooterFrm() ) + if( pFrame->IsRootFrame() || pFrame->IsHeaderFrame() || pFrame->IsFooterFrame() ) break; - if( pFrm->IsFlyFrm() ) + if( pFrame->IsFlyFrame() ) { - const SwFlyFrm* pFly = static_cast<const SwFlyFrm*>( pFrm ); + const SwFlyFrame* pFly = static_cast<const SwFlyFrame*>( pFrame ); while( pFly->GetPrevLink() ) pFly = pFly->GetPrevLink(); break; } - if( pFrm->IsFootnoteFrm() ) + if( pFrame->IsFootnoteFrame() ) { - const SwFootnoteFrm* pFootnote = static_cast<const SwFootnoteFrm*>( pFrm ); + const SwFootnoteFrame* pFootnote = static_cast<const SwFootnoteFrame*>( pFrame ); while( pFootnote->GetMaster() ) pFootnote = pFootnote->GetMaster(); break; } - pFrm = pFrm->GetUpper(); + pFrame = pFrame->GetUpper(); } - return pFrm; + return pFrame; } } -SwSelectionList::SwSelectionList( const SwFrm* pInitCxt ) : +SwSelectionList::SwSelectionList( const SwFrame* pInitCxt ) : pContext( getContext( pInitCxt ) ) { } -bool SwSelectionList::checkContext( const SwFrm* pCheck ) +bool SwSelectionList::checkContext( const SwFrame* pCheck ) { pCheck = getContext( pCheck ); if( !pContext ) diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index 495dab2e64f9..cea182f6360c 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -59,9 +59,9 @@ using namespace ::com::sun::star; -SwTabFrm::SwTabFrm( SwTable &rTab, SwFrm* pSib ) - : SwLayoutFrm( rTab.GetFrameFormat(), pSib ) - , SwFlowFrm( static_cast<SwFrm&>(*this) ) +SwTabFrame::SwTabFrame( SwTable &rTab, SwFrame* pSib ) + : SwLayoutFrame( rTab.GetFrameFormat(), pSib ) + , SwFlowFrame( static_cast<SwFrame&>(*this) ) , m_pTable( &rTab ) , m_bComplete(false) , m_bCalcLowers(false) @@ -78,28 +78,28 @@ SwTabFrm::SwTabFrm( SwTable &rTab, SwFrm* pSib ) , m_bInRecalcLowerRow(false) { mbFixSize = false; //Don't fall for import filter again. - mnFrmType = FRM_TAB; + mnFrameType = FRM_TAB; //Create the lines and insert them. const SwTableLines &rLines = rTab.GetTabLines(); - SwFrm *pTmpPrev = nullptr; + SwFrame *pTmpPrev = nullptr; for ( size_t i = 0; i < rLines.size(); ++i ) { - SwRowFrm *pNew = new SwRowFrm( *rLines[i], this ); + SwRowFrame *pNew = new SwRowFrame( *rLines[i], this ); if( pNew->Lower() ) { pNew->InsertBehind( this, pTmpPrev ); pTmpPrev = pNew; } else - SwFrm::DestroyFrm(pNew); + SwFrame::DestroyFrame(pNew); } - OSL_ENSURE( Lower() && Lower()->IsRowFrm(), "SwTabFrm::SwTabFrm: No rows." ); + OSL_ENSURE( Lower() && Lower()->IsRowFrame(), "SwTabFrame::SwTabFrame: No rows." ); } -SwTabFrm::SwTabFrm( SwTabFrm &rTab ) - : SwLayoutFrm( rTab.GetFormat(), &rTab ) - , SwFlowFrm( static_cast<SwFrm&>(*this) ) +SwTabFrame::SwTabFrame( SwTabFrame &rTab ) + : SwLayoutFrame( rTab.GetFormat(), &rTab ) + , SwFlowFrame( static_cast<SwFrame&>(*this) ) , m_pTable( rTab.GetTable() ) , m_bComplete(false) , m_bCalcLowers(false) @@ -116,105 +116,105 @@ SwTabFrm::SwTabFrm( SwTabFrm &rTab ) , m_bInRecalcLowerRow(false) { mbFixSize = false; //Don't fall for import filter again. - mnFrmType = FRM_TAB; + mnFrameType = FRM_TAB; SetFollow( rTab.GetFollow() ); rTab.SetFollow( this ); } extern const SwTable *g_pColumnCacheLastTable; -extern const SwTabFrm *g_pColumnCacheLastTabFrm; -extern const SwFrm *g_pColumnCacheLastCellFrm; +extern const SwTabFrame *g_pColumnCacheLastTabFrame; +extern const SwFrame *g_pColumnCacheLastCellFrame; extern const SwTable *g_pRowCacheLastTable; -extern const SwTabFrm *g_pRowCacheLastTabFrm; -extern const SwFrm *g_pRowCacheLastCellFrm; +extern const SwTabFrame *g_pRowCacheLastTabFrame; +extern const SwFrame *g_pRowCacheLastCellFrame; -//return the SwTabFrm (if any) that this SwTabFrm is a follow flow line for -SwTabFrm* SwTabFrm::GetFollowFlowLineFor() +//return the SwTabFrame (if any) that this SwTabFrame is a follow flow line for +SwTabFrame* SwTabFrame::GetFollowFlowLineFor() { - SwFlowFrm *pPrec = GetPrecede(); - if (pPrec && pPrec->GetFrm().IsTabFrm()) + SwFlowFrame *pPrec = GetPrecede(); + if (pPrec && pPrec->GetFrame().IsTabFrame()) { - SwTabFrm *pPrevTabFrm = static_cast<SwTabFrm*>(pPrec); - assert(this == pPrevTabFrm->GetFollow()); - if (pPrevTabFrm->HasFollowFlowLine() && pPrevTabFrm->GetFollow() == this) - return pPrevTabFrm; + SwTabFrame *pPrevTabFrame = static_cast<SwTabFrame*>(pPrec); + assert(this == pPrevTabFrame->GetFollow()); + if (pPrevTabFrame->HasFollowFlowLine() && pPrevTabFrame->GetFollow() == this) + return pPrevTabFrame; } return nullptr; } -void SwTabFrm::DestroyImpl() +void SwTabFrame::DestroyImpl() { //rhbz#907933, we are a follow flow line for something and have been //deleted, remove ourself as a follow flowline - SwTabFrm* pFlowFrameFor = GetFollowFlowLineFor(); + SwTabFrame* pFlowFrameFor = GetFollowFlowLineFor(); if (pFlowFrameFor) pFlowFrameFor->RemoveFollowFlowLine(); // There is some terrible code in fetab.cxx, that // makes use of these global pointers. Obviously - // this code did not consider that a TabFrm can be + // this code did not consider that a TabFrame can be // deleted. - if (this == g_pColumnCacheLastTabFrm) + if (this == g_pColumnCacheLastTabFrame) { g_pColumnCacheLastTable = nullptr; - g_pColumnCacheLastTabFrm = nullptr; - g_pColumnCacheLastCellFrm = nullptr; + g_pColumnCacheLastTabFrame = nullptr; + g_pColumnCacheLastCellFrame = nullptr; g_pRowCacheLastTable = nullptr; - g_pRowCacheLastTabFrm = nullptr; - g_pRowCacheLastCellFrm = nullptr; + g_pRowCacheLastTabFrame = nullptr; + g_pRowCacheLastCellFrame = nullptr; } - SwLayoutFrm::DestroyImpl(); + SwLayoutFrame::DestroyImpl(); } -SwTabFrm::~SwTabFrm() +SwTabFrame::~SwTabFrame() { } -void SwTabFrm::JoinAndDelFollows() +void SwTabFrame::JoinAndDelFollows() { - SwTabFrm *pFoll = GetFollow(); + SwTabFrame *pFoll = GetFollow(); if ( pFoll->HasFollow() ) pFoll->JoinAndDelFollows(); pFoll->Cut(); SetFollow( pFoll->GetFollow() ); - SwFrm::DestroyFrm(pFoll); + SwFrame::DestroyFrame(pFoll); } -void SwTabFrm::RegistFlys() +void SwTabFrame::RegistFlys() { - OSL_ENSURE( Lower() && Lower()->IsRowFrm(), "No rows." ); + OSL_ENSURE( Lower() && Lower()->IsRowFrame(), "No rows." ); - SwPageFrm *pPage = FindPageFrm(); + SwPageFrame *pPage = FindPageFrame(); if ( pPage ) { - SwRowFrm *pRow = static_cast<SwRowFrm*>(Lower()); + SwRowFrame *pRow = static_cast<SwRowFrame*>(Lower()); do { pRow->RegistFlys( pPage ); - pRow = static_cast<SwRowFrm*>(pRow->GetNext()); + pRow = static_cast<SwRowFrame*>(pRow->GetNext()); } while ( pRow ); } } -void SwInvalidateAll( SwFrm *pFrm, long nBottom ); -static void lcl_RecalcRow( SwRowFrm& rRow, long nBottom ); -static bool lcl_ArrangeLowers( SwLayoutFrm *pLay, long lYStart, bool bInva ); +void SwInvalidateAll( SwFrame *pFrame, long nBottom ); +static void lcl_RecalcRow( SwRowFrame& rRow, long nBottom ); +static bool lcl_ArrangeLowers( SwLayoutFrame *pLay, long lYStart, bool bInva ); // #i26945# - add parameter <_bOnlyRowsAndCells> to control // that only row and cell frames are formatted. -static bool lcl_InnerCalcLayout( SwFrm *pFrm, +static bool lcl_InnerCalcLayout( SwFrame *pFrame, long nBottom, bool _bOnlyRowsAndCells = false ); // OD 2004-02-18 #106629# - correct type of 1st parameter // #i26945# - add parameter <_bConsiderObjs> in order to // control, if floating screen objects have to be considered for the minimal // cell height. -static SwTwips lcl_CalcMinRowHeight( const SwRowFrm *pRow, +static SwTwips lcl_CalcMinRowHeight( const SwRowFrame *pRow, const bool _bConsiderObjs ); -static SwTwips lcl_CalcTopAndBottomMargin( const SwLayoutFrm&, const SwBorderAttrs& ); +static SwTwips lcl_CalcTopAndBottomMargin( const SwLayoutFrame&, const SwBorderAttrs& ); -static SwTwips lcl_GetHeightOfRows( const SwFrm* pStart, long nCount ) +static SwTwips lcl_GetHeightOfRows( const SwFrame* pStart, long nCount ) { if ( !nCount || !pStart) return 0; @@ -223,7 +223,7 @@ static SwTwips lcl_GetHeightOfRows( const SwFrm* pStart, long nCount ) SWRECTFN( pStart ) while ( pStart && nCount > 0 ) { - nRet += (pStart->Frm().*fnRect->fnGetHeight)(); + nRet += (pStart->Frame().*fnRect->fnGetHeight)(); pStart = pStart->GetNext(); --nCount; } @@ -232,15 +232,15 @@ static SwTwips lcl_GetHeightOfRows( const SwFrm* pStart, long nCount ) } // Local helper function to insert a new follow flow line -static SwRowFrm* lcl_InsertNewFollowFlowLine( SwTabFrm& rTab, const SwFrm& rTmpRow, bool bRowSpanLine ) +static SwRowFrame* lcl_InsertNewFollowFlowLine( SwTabFrame& rTab, const SwFrame& rTmpRow, bool bRowSpanLine ) { - OSL_ENSURE( rTmpRow.IsRowFrm(), "No row frame to copy for FollowFlowLine" ); - const SwRowFrm& rRow = static_cast<const SwRowFrm&>(rTmpRow); + OSL_ENSURE( rTmpRow.IsRowFrame(), "No row frame to copy for FollowFlowLine" ); + const SwRowFrame& rRow = static_cast<const SwRowFrame&>(rTmpRow); rTab.SetFollowFlowLine( true ); - SwRowFrm *pFollowFlowLine = new SwRowFrm(*rRow.GetTabLine(), &rTab, false ); + SwRowFrame *pFollowFlowLine = new SwRowFrame(*rRow.GetTabLine(), &rTab, false ); pFollowFlowLine->SetRowSpanLine( bRowSpanLine ); - SwFrm* pFirstRow = rTab.GetFollow()->GetFirstNonHeadlineRow(); + SwFrame* pFirstRow = rTab.GetFollow()->GetFirstNonHeadlineRow(); pFollowFlowLine->InsertBefore( rTab.GetFollow(), pFirstRow ); return pFollowFlowLine; } @@ -248,36 +248,36 @@ static SwRowFrm* lcl_InsertNewFollowFlowLine( SwTabFrm& rTab, const SwFrm& rTmpR // #i26945# - local helper function to invalidate all lower // objects. By parameter <_bMoveObjsOutOfRange> it can be controlled, if // additionally the objects are moved 'out of range'. -static void lcl_InvalidateLowerObjs( SwLayoutFrm& _rLayoutFrm, +static void lcl_InvalidateLowerObjs( SwLayoutFrame& _rLayoutFrame, const bool _bMoveObjsOutOfRange = false, - SwPageFrm* _pPageFrm = nullptr ) + SwPageFrame* _pPageFrame = nullptr ) { // determine page frame, if needed - if ( !_pPageFrm ) + if ( !_pPageFrame ) { - _pPageFrm = _rLayoutFrm.FindPageFrm(); - OSL_ENSURE( _pPageFrm, + _pPageFrame = _rLayoutFrame.FindPageFrame(); + OSL_ENSURE( _pPageFrame, "<lcl_InvalidateLowerObjs(..)> - missing page frame -> no move of lower objects out of range" ); - if ( !_pPageFrm ) + if ( !_pPageFrame ) { return; } } // loop on lower frames - SwFrm* pLowerFrm = _rLayoutFrm.Lower(); - while ( pLowerFrm ) + SwFrame* pLowerFrame = _rLayoutFrame.Lower(); + while ( pLowerFrame ) { - if ( pLowerFrm->IsLayoutFrm() ) + if ( pLowerFrame->IsLayoutFrame() ) { - ::lcl_InvalidateLowerObjs( *(static_cast<SwLayoutFrm*>(pLowerFrm)), - _bMoveObjsOutOfRange, _pPageFrm ); + ::lcl_InvalidateLowerObjs( *(static_cast<SwLayoutFrame*>(pLowerFrame)), + _bMoveObjsOutOfRange, _pPageFrame ); } - if ( pLowerFrm->GetDrawObjs() ) + if ( pLowerFrame->GetDrawObjs() ) { - for ( size_t i = 0; i < pLowerFrm->GetDrawObjs()->size(); ++i ) + for ( size_t i = 0; i < pLowerFrame->GetDrawObjs()->size(); ++i ) { - SwAnchoredObject* pAnchoredObj = (*pLowerFrm->GetDrawObjs())[i]; + SwAnchoredObject* pAnchoredObj = (*pLowerFrame->GetDrawObjs())[i]; // invalidate position of anchored object pAnchoredObj->SetTmpConsiderWrapInfluence( false ); @@ -292,7 +292,7 @@ static void lcl_InvalidateLowerObjs( SwLayoutFrm& _rLayoutFrm, // modification of the anchored object resp. its attributes // due to the movement SwObjPositioningInProgress aObjPosInProgress( *pAnchoredObj ); - pAnchoredObj->SetObjLeft( _pPageFrm->Frm().Right() ); + pAnchoredObj->SetObjLeft( _pPageFrame->Frame().Right() ); // #115759# - reset character rectangle, // top of line and relative position in order to assure, // that anchored object is correctly positioned. @@ -301,41 +301,41 @@ static void lcl_InvalidateLowerObjs( SwLayoutFrm& _rLayoutFrm, if ( pAnchoredObj->GetFrameFormat().GetAnchor().GetAnchorId() == FLY_AS_CHAR ) { - pAnchoredObj->AnchorFrm() + pAnchoredObj->AnchorFrame() ->Prepare( PREP_FLY_ATTR_CHG, &(pAnchoredObj->GetFrameFormat()) ); } - if ( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) != nullptr ) + if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr ) { - SwFlyFrm *pFly = static_cast<SwFlyFrm*>(pAnchoredObj); + SwFlyFrame *pFly = static_cast<SwFlyFrame*>(pAnchoredObj); pFly->GetVirtDrawObj()->SetRectsDirty(); pFly->GetVirtDrawObj()->SetChanged(); } } // If anchored object is a fly frame, invalidate its lower objects - if ( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) != nullptr ) + if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr ) { - SwFlyFrm *pFly = static_cast<SwFlyFrm*>(pAnchoredObj); - ::lcl_InvalidateLowerObjs( *pFly, _bMoveObjsOutOfRange, _pPageFrm ); + SwFlyFrame *pFly = static_cast<SwFlyFrame*>(pAnchoredObj); + ::lcl_InvalidateLowerObjs( *pFly, _bMoveObjsOutOfRange, _pPageFrame ); } } } - pLowerFrm = pLowerFrm->GetNext(); + pLowerFrame = pLowerFrame->GetNext(); } } // Local helper function to shrink all lowers of rRow to 0 height -static void lcl_ShrinkCellsAndAllContent( SwRowFrm& rRow ) +static void lcl_ShrinkCellsAndAllContent( SwRowFrame& rRow ) { - SwCellFrm* pCurrMasterCell = static_cast<SwCellFrm*>(rRow.Lower()); + SwCellFrame* pCurrMasterCell = static_cast<SwCellFrame*>(rRow.Lower()); SWRECTFN( pCurrMasterCell ) while ( pCurrMasterCell ) { // NEW TABLES - SwCellFrm& rToAdjust = pCurrMasterCell->GetTabBox()->getRowSpan() < 1 ? - const_cast<SwCellFrm&>(pCurrMasterCell->FindStartEndOfRowSpanCell( true, true )) : + SwCellFrame& rToAdjust = pCurrMasterCell->GetTabBox()->getRowSpan() < 1 ? + const_cast<SwCellFrame&>(pCurrMasterCell->FindStartEndOfRowSpanCell( true, true )) : *pCurrMasterCell; // #i26945# @@ -346,11 +346,11 @@ static void lcl_ShrinkCellsAndAllContent( SwRowFrm& rRow ) // TODO: Optimize number of frames which are set to 0 height // we have to start with the last lower frame, otherwise // the shrink will not shrink the current cell - SwFrm* pTmp = rToAdjust.GetLastLower(); + SwFrame* pTmp = rToAdjust.GetLastLower(); - if ( pTmp && pTmp->IsRowFrm() ) + if ( pTmp && pTmp->IsRowFrame() ) { - SwRowFrm* pTmpRow = static_cast<SwRowFrm*>(pTmp); + SwRowFrame* pTmpRow = static_cast<SwRowFrame*>(pTmp); lcl_ShrinkCellsAndAllContent( *pTmpRow ); } else @@ -359,18 +359,18 @@ static void lcl_ShrinkCellsAndAllContent( SwRowFrm& rRow ) while ( pTmp ) { // the frames have to be shrunk - if ( pTmp->IsTabFrm() ) + if ( pTmp->IsTabFrame() ) { - SwRowFrm* pTmpRow = static_cast<SwRowFrm*>(static_cast<SwTabFrm*>(pTmp)->Lower()); + SwRowFrame* pTmpRow = static_cast<SwRowFrame*>(static_cast<SwTabFrame*>(pTmp)->Lower()); while ( pTmpRow ) { lcl_ShrinkCellsAndAllContent( *pTmpRow ); - pTmpRow = static_cast<SwRowFrm*>(pTmpRow->GetNext()); + pTmpRow = static_cast<SwRowFrame*>(pTmpRow->GetNext()); } } else { - pTmp->Shrink( (pTmp->Frm().*fnRect->fnGetHeight)() ); + pTmp->Shrink( (pTmp->Frame().*fnRect->fnGetHeight)() ); (pTmp->Prt().*fnRect->fnSetTop)( 0 ); (pTmp->Prt().*fnRect->fnSetHeight)( 0 ); } @@ -384,44 +384,44 @@ static void lcl_ShrinkCellsAndAllContent( SwRowFrm& rRow ) false ); } - pCurrMasterCell = static_cast<SwCellFrm*>(pCurrMasterCell->GetNext()); + pCurrMasterCell = static_cast<SwCellFrame*>(pCurrMasterCell->GetNext()); } } // Local helper function to move the content from rSourceLine to rDestLine // The content is inserted behind the last content in the corresponding // cell in rDestLine. -static void lcl_MoveRowContent( SwRowFrm& rSourceLine, SwRowFrm& rDestLine ) +static void lcl_MoveRowContent( SwRowFrame& rSourceLine, SwRowFrame& rDestLine ) { - SwCellFrm* pCurrDestCell = static_cast<SwCellFrm*>(rDestLine.Lower()); - SwCellFrm* pCurrSourceCell = static_cast<SwCellFrm*>(rSourceLine.Lower()); + SwCellFrame* pCurrDestCell = static_cast<SwCellFrame*>(rDestLine.Lower()); + SwCellFrame* pCurrSourceCell = static_cast<SwCellFrame*>(rSourceLine.Lower()); // Move content of follow cells into master cells while ( pCurrSourceCell ) { - if ( pCurrSourceCell->Lower() && pCurrSourceCell->Lower()->IsRowFrm() ) + if ( pCurrSourceCell->Lower() && pCurrSourceCell->Lower()->IsRowFrame() ) { - SwRowFrm* pTmpSourceRow = static_cast<SwRowFrm*>(pCurrSourceCell->Lower()); + SwRowFrame* pTmpSourceRow = static_cast<SwRowFrame*>(pCurrSourceCell->Lower()); while ( pTmpSourceRow ) { // #125926# Achtung! It is possible, // that pTmpSourceRow->IsFollowFlowRow() but pTmpDestRow // cannot be found. In this case, we have to move the complete // row. - SwRowFrm* pTmpDestRow = static_cast<SwRowFrm*>(pCurrDestCell->Lower()); + SwRowFrame* pTmpDestRow = static_cast<SwRowFrame*>(pCurrDestCell->Lower()); if ( pTmpSourceRow->IsFollowFlowRow() && pTmpDestRow ) { // move content from follow flow row to pTmpDestRow: while ( pTmpDestRow->GetNext() ) - pTmpDestRow = static_cast<SwRowFrm*>(pTmpDestRow->GetNext()); + pTmpDestRow = static_cast<SwRowFrame*>(pTmpDestRow->GetNext()); OSL_ENSURE( pTmpDestRow->GetFollowRow() == pTmpSourceRow, "Table contains node" ); lcl_MoveRowContent( *pTmpSourceRow, *pTmpDestRow ); pTmpDestRow->SetFollowRow( pTmpSourceRow->GetFollowRow() ); pTmpSourceRow->RemoveFromLayout(); - SwFrm::DestroyFrm(pTmpSourceRow); + SwFrame::DestroyFrame(pTmpSourceRow); } else { @@ -430,57 +430,57 @@ static void lcl_MoveRowContent( SwRowFrm& rSourceLine, SwRowFrm& rDestLine ) pTmpSourceRow->InsertBefore( pCurrDestCell, nullptr ); } - pTmpSourceRow = static_cast<SwRowFrm*>(pCurrSourceCell->Lower()); + pTmpSourceRow = static_cast<SwRowFrame*>(pCurrSourceCell->Lower()); } } else { - SwFrm *pTmp = ::SaveContent( pCurrSourceCell ); + SwFrame *pTmp = ::SaveContent( pCurrSourceCell ); if ( pTmp ) { // NEW TABLES - SwCellFrm* pDestCell = static_cast<SwCellFrm*>(pCurrDestCell); + SwCellFrame* pDestCell = static_cast<SwCellFrame*>(pCurrDestCell); if ( pDestCell->GetTabBox()->getRowSpan() < 1 ) - pDestCell = & const_cast<SwCellFrm&>(pDestCell->FindStartEndOfRowSpanCell( true, true )); + pDestCell = & const_cast<SwCellFrame&>(pDestCell->FindStartEndOfRowSpanCell( true, true )); // Find last content - SwFrm* pFrm = pDestCell->GetLastLower(); - ::RestoreContent( pTmp, pDestCell, pFrm, true ); + SwFrame* pFrame = pDestCell->GetLastLower(); + ::RestoreContent( pTmp, pDestCell, pFrame, true ); } } - pCurrDestCell = static_cast<SwCellFrm*>(pCurrDestCell->GetNext()); - pCurrSourceCell = static_cast<SwCellFrm*>(pCurrSourceCell->GetNext()); + pCurrDestCell = static_cast<SwCellFrame*>(pCurrDestCell->GetNext()); + pCurrSourceCell = static_cast<SwCellFrame*>(pCurrSourceCell->GetNext()); } } -// Local helper function to move all footnotes in rRowFrm from +// Local helper function to move all footnotes in rRowFrame from // the footnote boss of rSource to the footnote boss of rDest. -static void lcl_MoveFootnotes( SwTabFrm& rSource, SwTabFrm& rDest, SwLayoutFrm& rRowFrm ) +static void lcl_MoveFootnotes( SwTabFrame& rSource, SwTabFrame& rDest, SwLayoutFrame& rRowFrame ) { if ( !rSource.GetFormat()->GetDoc()->GetFootnoteIdxs().empty() ) { - SwFootnoteBossFrm* pOldBoss = rSource.FindFootnoteBossFrm( true ); - SwFootnoteBossFrm* pNewBoss = rDest.FindFootnoteBossFrm( true ); - rRowFrm.MoveLowerFootnotes( nullptr, pOldBoss, pNewBoss, true ); + SwFootnoteBossFrame* pOldBoss = rSource.FindFootnoteBossFrame( true ); + SwFootnoteBossFrame* pNewBoss = rDest.FindFootnoteBossFrame( true ); + rRowFrame.MoveLowerFootnotes( nullptr, pOldBoss, pNewBoss, true ); } } // Local helper function to handle nested table cells before the split process -static void lcl_PreprocessRowsInCells( SwTabFrm& rTab, SwRowFrm& rLastLine, - SwRowFrm& rFollowFlowLine, SwTwips nRemain ) +static void lcl_PreprocessRowsInCells( SwTabFrame& rTab, SwRowFrame& rLastLine, + SwRowFrame& rFollowFlowLine, SwTwips nRemain ) { - SwCellFrm* pCurrLastLineCell = static_cast<SwCellFrm*>(rLastLine.Lower()); - SwCellFrm* pCurrFollowFlowLineCell = static_cast<SwCellFrm*>(rFollowFlowLine.Lower()); + SwCellFrame* pCurrLastLineCell = static_cast<SwCellFrame*>(rLastLine.Lower()); + SwCellFrame* pCurrFollowFlowLineCell = static_cast<SwCellFrame*>(rFollowFlowLine.Lower()); SWRECTFN( pCurrLastLineCell ) // Move content of follow cells into master cells while ( pCurrLastLineCell ) { - if ( pCurrLastLineCell->Lower() && pCurrLastLineCell->Lower()->IsRowFrm() ) + if ( pCurrLastLineCell->Lower() && pCurrLastLineCell->Lower()->IsRowFrame() ) { SwTwips nTmpCut = nRemain; - SwRowFrm* pTmpLastLineRow = static_cast<SwRowFrm*>(pCurrLastLineCell->Lower()); + SwRowFrame* pTmpLastLineRow = static_cast<SwRowFrame*>(pCurrLastLineCell->Lower()); // #i26945# SwTwips nCurrentHeight = @@ -489,7 +489,7 @@ static void lcl_PreprocessRowsInCells( SwTabFrm& rTab, SwRowFrm& rLastLine, while ( pTmpLastLineRow->GetNext() && nTmpCut > nCurrentHeight ) { nTmpCut -= nCurrentHeight; - pTmpLastLineRow = static_cast<SwRowFrm*>(pTmpLastLineRow->GetNext()); + pTmpLastLineRow = static_cast<SwRowFrame*>(pTmpLastLineRow->GetNext()); // #i26945# nCurrentHeight = lcl_CalcMinRowHeight( pTmpLastLineRow, @@ -499,7 +499,7 @@ static void lcl_PreprocessRowsInCells( SwTabFrm& rTab, SwRowFrm& rLastLine, // pTmpLastLineRow does not fit to the line or it is the last line // Check if we can move pTmpLastLineRow to the follow table, // or if we have to split the line: - SwFrm* pCell = pTmpLastLineRow->Lower(); + SwFrame* pCell = pTmpLastLineRow->Lower(); bool bTableLayoutToComplex = false; long nMinHeight = 0; @@ -508,25 +508,25 @@ static void lcl_PreprocessRowsInCells( SwTabFrm& rTab, SwRowFrm& rLastLine, // 2. The borders of the cells inside the row // 3. The minimum height of the row if ( pTmpLastLineRow->HasFixSize() ) - nMinHeight = (pTmpLastLineRow->Frm().*fnRect->fnGetHeight)(); + nMinHeight = (pTmpLastLineRow->Frame().*fnRect->fnGetHeight)(); else { while ( pCell ) { - if ( static_cast<SwCellFrm*>(pCell)->Lower() && - static_cast<SwCellFrm*>(pCell)->Lower()->IsRowFrm() ) + if ( static_cast<SwCellFrame*>(pCell)->Lower() && + static_cast<SwCellFrame*>(pCell)->Lower()->IsRowFrame() ) { bTableLayoutToComplex = true; break; } - SwBorderAttrAccess aAccess( SwFrm::GetCache(), pCell ); + SwBorderAttrAccess aAccess( SwFrame::GetCache(), pCell ); const SwBorderAttrs &rAttrs = *aAccess.Get(); - nMinHeight = std::max( nMinHeight, lcl_CalcTopAndBottomMargin( *static_cast<SwLayoutFrm*>(pCell), rAttrs ) ); + nMinHeight = std::max( nMinHeight, lcl_CalcTopAndBottomMargin( *static_cast<SwLayoutFrame*>(pCell), rAttrs ) ); pCell = pCell->GetNext(); } - const SwFormatFrmSize &rSz = pTmpLastLineRow->GetFormat()->GetFrmSize(); + const SwFormatFrameSize &rSz = pTmpLastLineRow->GetFormat()->GetFrameSize(); if ( rSz.GetHeightSizeType() == ATT_MIN_SIZE ) nMinHeight = std::max( nMinHeight, rSz.GetHeight() ); } @@ -544,75 +544,75 @@ static void lcl_PreprocessRowsInCells( SwTabFrm& rTab, SwRowFrm& rLastLine, !bTableLayoutToComplex && nMinHeight < nTmpCut ) ) { // The line has to be split: - SwRowFrm* pNewRow = new SwRowFrm( *pTmpLastLineRow->GetTabLine(), &rTab, false ); + SwRowFrame* pNewRow = new SwRowFrame( *pTmpLastLineRow->GetTabLine(), &rTab, false ); pNewRow->SetFollowFlowRow( true ); pNewRow->SetFollowRow( pTmpLastLineRow->GetFollowRow() ); pTmpLastLineRow->SetFollowRow( pNewRow ); pNewRow->InsertBehind( pCurrFollowFlowLineCell, nullptr ); - pTmpLastLineRow = static_cast<SwRowFrm*>(pTmpLastLineRow->GetNext()); + pTmpLastLineRow = static_cast<SwRowFrame*>(pTmpLastLineRow->GetNext()); } // The following lines have to be moved: while ( pTmpLastLineRow ) { - SwRowFrm* pTmp = static_cast<SwRowFrm*>(pTmpLastLineRow->GetNext()); + SwRowFrame* pTmp = static_cast<SwRowFrame*>(pTmpLastLineRow->GetNext()); lcl_MoveFootnotes( rTab, *rTab.GetFollow(), *pTmpLastLineRow ); pTmpLastLineRow->RemoveFromLayout(); pTmpLastLineRow->InsertBefore( pCurrFollowFlowLineCell, nullptr ); - pTmpLastLineRow->Shrink( ( pTmpLastLineRow->Frm().*fnRect->fnGetHeight)() ); - pCurrFollowFlowLineCell->Grow( ( pTmpLastLineRow->Frm().*fnRect->fnGetHeight)() ); + pTmpLastLineRow->Shrink( ( pTmpLastLineRow->Frame().*fnRect->fnGetHeight)() ); + pCurrFollowFlowLineCell->Grow( ( pTmpLastLineRow->Frame().*fnRect->fnGetHeight)() ); pTmpLastLineRow = pTmp; } } - pCurrLastLineCell = static_cast<SwCellFrm*>(pCurrLastLineCell->GetNext()); - pCurrFollowFlowLineCell = static_cast<SwCellFrm*>(pCurrFollowFlowLineCell->GetNext()); + pCurrLastLineCell = static_cast<SwCellFrame*>(pCurrLastLineCell->GetNext()); + pCurrFollowFlowLineCell = static_cast<SwCellFrame*>(pCurrFollowFlowLineCell->GetNext()); } } // Local helper function to handle nested table cells after the split process -static void lcl_PostprocessRowsInCells( SwTabFrm& rTab, SwRowFrm& rLastLine ) +static void lcl_PostprocessRowsInCells( SwTabFrame& rTab, SwRowFrame& rLastLine ) { - SwCellFrm* pCurrMasterCell = static_cast<SwCellFrm*>(rLastLine.Lower()); + SwCellFrame* pCurrMasterCell = static_cast<SwCellFrame*>(rLastLine.Lower()); while ( pCurrMasterCell ) { if ( pCurrMasterCell->Lower() && - pCurrMasterCell->Lower()->IsRowFrm() ) + pCurrMasterCell->Lower()->IsRowFrame() ) { - SwRowFrm* pRowFrm = static_cast<SwRowFrm*>(pCurrMasterCell->GetLastLower()); + SwRowFrame* pRowFrame = static_cast<SwRowFrame*>(pCurrMasterCell->GetLastLower()); - if ( nullptr != pRowFrm->GetPrev() && !pRowFrm->ContainsContent() ) + if ( nullptr != pRowFrame->GetPrev() && !pRowFrame->ContainsContent() ) { - OSL_ENSURE( pRowFrm->GetFollowRow(), "Deleting row frame without follow" ); + OSL_ENSURE( pRowFrame->GetFollowRow(), "Deleting row frame without follow" ); // The footnotes have to be moved: - lcl_MoveFootnotes( rTab, *rTab.GetFollow(), *pRowFrm ); - pRowFrm->Cut(); - SwRowFrm* pFollowRow = pRowFrm->GetFollowRow(); - pRowFrm->Paste( pFollowRow->GetUpper(), pFollowRow ); - pRowFrm->SetFollowRow( pFollowRow->GetFollowRow() ); - lcl_MoveRowContent( *pFollowRow, *pRowFrm ); + lcl_MoveFootnotes( rTab, *rTab.GetFollow(), *pRowFrame ); + pRowFrame->Cut(); + SwRowFrame* pFollowRow = pRowFrame->GetFollowRow(); + pRowFrame->Paste( pFollowRow->GetUpper(), pFollowRow ); + pRowFrame->SetFollowRow( pFollowRow->GetFollowRow() ); + lcl_MoveRowContent( *pFollowRow, *pRowFrame ); pFollowRow->Cut(); - SwFrm::DestroyFrm(pFollowRow); + SwFrame::DestroyFrame(pFollowRow); ::SwInvalidateAll( pCurrMasterCell, LONG_MAX ); } } - pCurrMasterCell = static_cast<SwCellFrm*>(pCurrMasterCell->GetNext()); + pCurrMasterCell = static_cast<SwCellFrame*>(pCurrMasterCell->GetNext()); } } // Local helper function to re-calculate the split line. -inline void TableSplitRecalcLock( SwFlowFrm *pTab ) { pTab->LockJoin(); } -inline void TableSplitRecalcUnlock( SwFlowFrm *pTab ) { pTab->UnlockJoin(); } +inline void TableSplitRecalcLock( SwFlowFrame *pTab ) { pTab->LockJoin(); } +inline void TableSplitRecalcUnlock( SwFlowFrame *pTab ) { pTab->UnlockJoin(); } -static bool lcl_RecalcSplitLine( SwRowFrm& rLastLine, SwRowFrm& rFollowLine, +static bool lcl_RecalcSplitLine( SwRowFrame& rLastLine, SwRowFrame& rFollowLine, SwTwips nRemainingSpaceForLastRow ) { bool bRet = true; - vcl::RenderContext* pRenderContext = rLastLine.getRootFrm()->GetCurrShell()->GetOut(); - SwTabFrm& rTab = static_cast<SwTabFrm&>(*rLastLine.GetUpper()); + vcl::RenderContext* pRenderContext = rLastLine.getRootFrame()->GetCurrShell()->GetOut(); + SwTabFrame& rTab = static_cast<SwTabFrame&>(*rLastLine.GetUpper()); // If there are nested cells in rLastLine, the recalculation of the last // line needs some preprocessing. @@ -642,7 +642,7 @@ static bool lcl_RecalcSplitLine( SwRowFrm& rLastLine, SwRowFrm& rFollowLine, // Lock this tab frame and its follow bool bUnlockMaster = false; bool bUnlockFollow = false; - SwTabFrm* pMaster = rTab.IsFollow() ? rTab.FindMaster() : nullptr; + SwTabFrame* pMaster = rTab.IsFollow() ? rTab.FindMaster() : nullptr; if ( pMaster && !pMaster->IsJoinLocked() ) { bUnlockMaster = true; @@ -680,7 +680,7 @@ static bool lcl_RecalcSplitLine( SwRowFrm& rLastLine, SwRowFrm& rFollowLine, // 1. Check if table fits to its upper. // #i26945# - include check, if objects fit const SwTwips nDistanceToUpperPrtBottom = - (rTab.Frm().*fnRect->fnBottomDist)( (rTab.GetUpper()->*fnRect->fnGetPrtBottom)()); + (rTab.Frame().*fnRect->fnBottomDist)( (rTab.GetUpper()->*fnRect->fnGetPrtBottom)()); if ( nDistanceToUpperPrtBottom < 0 || !rTab.DoesObjsFit() ) bRet = false; @@ -691,7 +691,7 @@ static bool lcl_RecalcSplitLine( SwRowFrm& rLastLine, SwRowFrm& rFollowLine, { if ( !rLastLine.IsInFollowFlowRow() ) { - SwCellFrm* pCurrMasterCell = static_cast<SwCellFrm*>(rLastLine.Lower()); + SwCellFrame* pCurrMasterCell = static_cast<SwCellFrame*>(rLastLine.Lower()); while ( pCurrMasterCell ) { if ( !pCurrMasterCell->ContainsContent() && pCurrMasterCell->GetTabBox()->getRowSpan() >= 1 ) @@ -699,7 +699,7 @@ static bool lcl_RecalcSplitLine( SwRowFrm& rLastLine, SwRowFrm& rFollowLine, bRet = false; break; } - pCurrMasterCell = static_cast<SwCellFrm*>(pCurrMasterCell->GetNext()); + pCurrMasterCell = static_cast<SwCellFrame*>(pCurrMasterCell->GetNext()); } } } @@ -744,39 +744,39 @@ static bool lcl_RecalcSplitLine( SwRowFrm& rLastLine, SwRowFrm& rFollowLine, } // Sets the correct height for all spanned cells -static void lcl_AdjustRowSpanCells( SwRowFrm* pRow ) +static void lcl_AdjustRowSpanCells( SwRowFrame* pRow ) { SWRECTFN( pRow ) - SwCellFrm* pCellFrm = static_cast<SwCellFrm*>(pRow->GetLower()); - while ( pCellFrm ) + SwCellFrame* pCellFrame = static_cast<SwCellFrame*>(pRow->GetLower()); + while ( pCellFrame ) { - const long nLayoutRowSpan = pCellFrm->GetLayoutRowSpan(); + const long nLayoutRowSpan = pCellFrame->GetLayoutRowSpan(); if ( nLayoutRowSpan > 1 ) { // calculate height of cell: const long nNewCellHeight = lcl_GetHeightOfRows( pRow, nLayoutRowSpan ); - const long nDiff = nNewCellHeight - (pCellFrm->Frm().*fnRect->fnGetHeight)(); + const long nDiff = nNewCellHeight - (pCellFrame->Frame().*fnRect->fnGetHeight)(); if ( nDiff ) - (pCellFrm->Frm().*fnRect->fnAddBottom)( nDiff ); + (pCellFrame->Frame().*fnRect->fnAddBottom)( nDiff ); } - pCellFrm = static_cast<SwCellFrm*>(pCellFrm->GetNext()); + pCellFrame = static_cast<SwCellFrame*>(pCellFrame->GetNext()); } } // Returns the maximum layout row span of the row // Looking for the next row that contains no covered cells: -static long lcl_GetMaximumLayoutRowSpan( const SwRowFrm& rRow ) +static long lcl_GetMaximumLayoutRowSpan( const SwRowFrame& rRow ) { long nRet = 1; - const SwRowFrm* pCurrentRowFrm = static_cast<const SwRowFrm*>(rRow.GetNext()); + const SwRowFrame* pCurrentRowFrame = static_cast<const SwRowFrame*>(rRow.GetNext()); bool bNextRow = false; - while ( pCurrentRowFrm ) + while ( pCurrentRowFrame ) { // if there is any covered cell, we proceed to the next row frame - const SwCellFrm* pLower = static_cast<const SwCellFrm*>( pCurrentRowFrm->Lower()); + const SwCellFrame* pLower = static_cast<const SwCellFrame*>( pCurrentRowFrame->Lower()); while ( pLower ) { if ( pLower->GetTabBox()->getRowSpan() < 0 ) @@ -785,10 +785,10 @@ static long lcl_GetMaximumLayoutRowSpan( const SwRowFrm& rRow ) bNextRow = true; break; } - pLower = static_cast<const SwCellFrm*>(pLower->GetNext()); + pLower = static_cast<const SwCellFrame*>(pLower->GetNext()); } - pCurrentRowFrm = bNextRow ? - static_cast<const SwRowFrm*>(pCurrentRowFrm->GetNext() ) : + pCurrentRowFrame = bNextRow ? + static_cast<const SwRowFrame*>(pCurrentRowFrame->GetNext() ) : nullptr; } @@ -798,20 +798,20 @@ static long lcl_GetMaximumLayoutRowSpan( const SwRowFrm& rRow ) // Function to remove the FollowFlowLine of rTab. // The content of the FollowFlowLine is moved to the associated line in the // master table. -bool SwTabFrm::RemoveFollowFlowLine() +bool SwTabFrame::RemoveFollowFlowLine() { // find FollowFlowLine - SwRowFrm* pFollowFlowLine = static_cast<SwRowFrm*>(GetFollow()->GetFirstNonHeadlineRow()); + SwRowFrame* pFollowFlowLine = static_cast<SwRowFrame*>(GetFollow()->GetFirstNonHeadlineRow()); // find last row in master - SwFrm* pLastLine = GetLastLower(); + SwFrame* pLastLine = GetLastLower(); OSL_ENSURE( HasFollowFlowLine() && pFollowFlowLine && pLastLine, "There should be a flowline in the follow" ); // We have to reset the flag here, because lcl_MoveRowContent - // calls a GrowFrm(), which has a different bahavior if + // calls a GrowFrame(), which has a different bahavior if // this flag is set. SetFollowFlowLine( false ); @@ -820,7 +820,7 @@ bool SwTabFrm::RemoveFollowFlowLine() return true; // Move content - lcl_MoveRowContent( *pFollowFlowLine, *static_cast<SwRowFrm*>(pLastLine) ); + lcl_MoveRowContent( *pFollowFlowLine, *static_cast<SwRowFrame*>(pLastLine) ); // NEW TABLES // If a row span follow flow line is removed, we want to move the whole span @@ -830,17 +830,17 @@ bool SwTabFrm::RemoveFollowFlowLine() if ( nRowsToMove > 1 ) { SWRECTFN( this ) - SwFrm* pRow = pFollowFlowLine->GetNext(); - SwFrm* pInsertBehind = GetLastLower(); + SwFrame* pRow = pFollowFlowLine->GetNext(); + SwFrame* pInsertBehind = GetLastLower(); SwTwips nGrow = 0; while ( pRow && nRowsToMove-- > 1 ) { - SwFrm* pNxt = pRow->GetNext(); - nGrow += (pRow->Frm().*fnRect->fnGetHeight)(); + SwFrame* pNxt = pRow->GetNext(); + nGrow += (pRow->Frame().*fnRect->fnGetHeight)(); // The footnotes have to be moved: - lcl_MoveFootnotes( *GetFollow(), *this, static_cast<SwRowFrm&>(*pRow) ); + lcl_MoveFootnotes( *GetFollow(), *this, static_cast<SwRowFrame&>(*pRow) ); pRow->RemoveFromLayout(); pRow->InsertBehind( this, pInsertBehind ); @@ -850,10 +850,10 @@ bool SwTabFrm::RemoveFollowFlowLine() pRow = pNxt; } - SwFrm* pFirstRow = Lower(); + SwFrame* pFirstRow = Lower(); while ( pFirstRow ) { - lcl_AdjustRowSpanCells( static_cast<SwRowFrm*>(pFirstRow) ); + lcl_AdjustRowSpanCells( static_cast<SwRowFrame*>(pFirstRow) ); pFirstRow = pFirstRow->GetNext(); } @@ -863,45 +863,45 @@ bool SwTabFrm::RemoveFollowFlowLine() bool bJoin = !pFollowFlowLine->GetNext(); pFollowFlowLine->Cut(); - SwFrm::DestroyFrm(pFollowFlowLine); + SwFrame::DestroyFrame(pFollowFlowLine); return bJoin; } // #i26945# - Floating screen objects are no longer searched. -static bool lcl_FindSectionsInRow( const SwRowFrm& rRow ) +static bool lcl_FindSectionsInRow( const SwRowFrame& rRow ) { bool bRet = false; - const SwCellFrm* pLower = static_cast<const SwCellFrm*>(rRow.Lower()); + const SwCellFrame* pLower = static_cast<const SwCellFrame*>(rRow.Lower()); while ( pLower ) { if ( pLower->IsVertical() != rRow.IsVertical() ) return true; - const SwFrm* pTmpFrm = pLower->Lower(); - while ( pTmpFrm ) + const SwFrame* pTmpFrame = pLower->Lower(); + while ( pTmpFrame ) { - if ( pTmpFrm->IsRowFrm() ) + if ( pTmpFrame->IsRowFrame() ) { - bRet = lcl_FindSectionsInRow( *static_cast<const SwRowFrm*>(pTmpFrm) ); + bRet = lcl_FindSectionsInRow( *static_cast<const SwRowFrame*>(pTmpFrame) ); } else { // #i26945# - search only for sections - bRet = pTmpFrm->IsSctFrm(); + bRet = pTmpFrame->IsSctFrame(); } if ( bRet ) return true; - pTmpFrm = pTmpFrm->GetNext(); + pTmpFrame = pTmpFrame->GetNext(); } - pLower = static_cast<const SwCellFrm*>(pLower->GetNext()); + pLower = static_cast<const SwCellFrame*>(pLower->GetNext()); } return bRet; } -bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKeep ) +bool SwTabFrame::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKeep ) { bool bRet = true; @@ -918,7 +918,7 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee //In order to be able to compare the positions of the cells whit CutPos, //they have to be calculated consecutively starting from the table. //They can definitely be invalid because of position changes of the table. - SwRowFrm *pRow = static_cast<SwRowFrm*>(Lower()); + SwRowFrame *pRow = static_cast<SwRowFrame*>(Lower()); if( !pRow ) return bRet; @@ -926,21 +926,21 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee sal_uInt16 nRowCount = 0; // pRow currently points to the first row SwTwips nRemainingSpaceForLastRow = - (*fnRect->fnYDiff)( nCutPos, (Frm().*fnRect->fnGetTop)() ); + (*fnRect->fnYDiff)( nCutPos, (Frame().*fnRect->fnGetTop)() ); nRemainingSpaceForLastRow -= (this->*fnRect->fnGetTopMargin)(); // Make pRow point to the line that does not fit anymore: while( pRow->GetNext() && - nRemainingSpaceForLastRow >= ( (pRow->Frm().*fnRect->fnGetHeight)() + + nRemainingSpaceForLastRow >= ( (pRow->Frame().*fnRect->fnGetHeight)() + (IsCollapsingBorders() ? pRow->GetBottomLineSize() : 0 ) ) ) { if( bTryToSplit || !pRow->IsRowSpanLine() || - 0 != (pRow->Frm().*fnRect->fnGetHeight)() ) + 0 != (pRow->Frame().*fnRect->fnGetHeight)() ) ++nRowCount; - nRemainingSpaceForLastRow -= (pRow->Frm().*fnRect->fnGetHeight)(); - pRow = static_cast<SwRowFrm*>(pRow->GetNext()); + nRemainingSpaceForLastRow -= (pRow->Frame().*fnRect->fnGetHeight)(); + pRow = static_cast<SwRowFrame*>(pRow->GetNext()); } // bSplitRowAllowed: Row may be split according to its attributes. @@ -984,21 +984,21 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee { // Check if there are (first) rows inside this row, // which are not allowed to be split. - SwCellFrm* pLowerCell = static_cast<SwCellFrm*>(pRow->Lower()); + SwCellFrame* pLowerCell = static_cast<SwCellFrame*>(pRow->Lower()); while ( pLowerCell ) { - if ( pLowerCell->Lower() && pLowerCell->Lower()->IsRowFrm() ) + if ( pLowerCell->Lower() && pLowerCell->Lower()->IsRowFrame() ) { - const SwRowFrm* pLowerRow = static_cast<SwRowFrm*>(pLowerCell->Lower()); + const SwRowFrame* pLowerRow = static_cast<SwRowFrame*>(pLowerCell->Lower()); if ( !pLowerRow->IsRowSplitAllowed() && - (pLowerRow->Frm().*fnRect->fnGetHeight)() > + (pLowerRow->Frame().*fnRect->fnGetHeight)() > nRemainingSpaceForLastRow ) { bKeepNextRow = true; break; } } - pLowerCell = static_cast<SwCellFrm*>(pLowerCell->GetNext()); + pLowerCell = static_cast<SwCellFrame*>(pLowerCell->GetNext()); } } else @@ -1009,11 +1009,11 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee if ( bKeepNextRow ) { pRow = GetFirstNonHeadlineRow(); - if( pRow && pRow->IsRowSpanLine() && 0 == (pRow->Frm().*fnRect->fnGetHeight)() ) - pRow = static_cast<SwRowFrm*>(pRow->GetNext()); + if( pRow && pRow->IsRowSpanLine() && 0 == (pRow->Frame().*fnRect->fnGetHeight)() ) + pRow = static_cast<SwRowFrame*>(pRow->GetNext()); if ( pRow ) { - pRow = static_cast<SwRowFrm*>(pRow->GetNext()); + pRow = static_cast<SwRowFrame*>(pRow->GetNext()); ++nRowCount; } } @@ -1033,14 +1033,14 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee // Adjust pRow according to the keep-with-next attribute: if ( !bSplitRowAllowed && bTableRowKeep ) { - SwRowFrm* pTmpRow = static_cast<SwRowFrm*>(pRow->GetPrev()); - SwRowFrm* pOldRow = pRow; + SwRowFrame* pTmpRow = static_cast<SwRowFrame*>(pRow->GetPrev()); + SwRowFrame* pOldRow = pRow; while ( pTmpRow && pTmpRow->ShouldRowKeepWithNext() && nRowCount > nRepeat ) { pRow = pTmpRow; --nRowCount; - pTmpRow = static_cast<SwRowFrm*>(pTmpRow->GetPrev()); + pTmpRow = static_cast<SwRowFrame*>(pTmpRow->GetPrev()); } // loop prevention @@ -1055,16 +1055,16 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee // false, indicating an error if ( !bSplitRowAllowed ) { - SwRowFrm* pFirstNonHeadlineRow = GetFirstNonHeadlineRow(); + SwRowFrame* pFirstNonHeadlineRow = GetFirstNonHeadlineRow(); if ( pRow == pFirstNonHeadlineRow ) return false; // #i91764# // Ignore row span lines - SwRowFrm* pTmpRow = pFirstNonHeadlineRow; + SwRowFrame* pTmpRow = pFirstNonHeadlineRow; while ( pTmpRow && pTmpRow->IsRowSpanLine() ) { - pTmpRow = static_cast<SwRowFrm*>(pTmpRow->GetNext()); + pTmpRow = static_cast<SwRowFrame*>(pTmpRow->GetNext()); } if ( !pTmpRow || pRow == pTmpRow ) { @@ -1074,7 +1074,7 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee // Build follow table if not already done: bool bNewFollow; - SwTabFrm *pFoll; + SwTabFrame *pFoll; if ( GetFollow() ) { pFoll = GetFollow(); @@ -1083,12 +1083,12 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee else { bNewFollow = true; - pFoll = new SwTabFrm( *this ); + pFoll = new SwTabFrame( *this ); // We give the follow table an initial width. - (pFoll->Frm().*fnRect->fnAddWidth)( (Frm().*fnRect->fnGetWidth)() ); + (pFoll->Frame().*fnRect->fnAddWidth)( (Frame().*fnRect->fnGetWidth)() ); (pFoll->Prt().*fnRect->fnAddWidth)( (Prt().*fnRect->fnGetWidth)() ); - (pFoll->Frm().*fnRect->fnSetLeft)( (Frm().*fnRect->fnGetLeft)() ); + (pFoll->Frame().*fnRect->fnSetLeft)( (Frame().*fnRect->fnGetLeft)() ); // Insert the new follow table pFoll->InsertBehind( GetUpper(), this ); @@ -1098,32 +1098,32 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee { // Insert new headlines: bDontCreateObjects = true; //frmtool - SwRowFrm* pHeadline = new SwRowFrm( + SwRowFrame* pHeadline = new SwRowFrame( *GetTable()->GetTabLines()[ nRowCount ], this ); pHeadline->SetRepeatedHeadline( true ); bDontCreateObjects = false; pHeadline->InsertBefore( pFoll, nullptr ); - SwPageFrm *pPage = pHeadline->FindPageFrm(); + SwPageFrame *pPage = pHeadline->FindPageFrame(); const SwFrameFormats *pTable = GetFormat()->GetDoc()->GetSpzFrameFormats(); if( !pTable->empty() ) { sal_uLong nIndex; - SwContentFrm* pFrm = pHeadline->ContainsContent(); - while( pFrm ) + SwContentFrame* pFrame = pHeadline->ContainsContent(); + while( pFrame ) { - nIndex = pFrm->GetNode()->GetIndex(); - AppendObjs( pTable, nIndex, pFrm, pPage, GetFormat()->GetDoc()); - pFrm = pFrm->GetNextContentFrm(); - if( !pHeadline->IsAnLower( pFrm ) ) + nIndex = pFrame->GetNode()->GetIndex(); + AppendObjs( pTable, nIndex, pFrame, pPage, GetFormat()->GetDoc()); + pFrame = pFrame->GetNextContentFrame(); + if( !pHeadline->IsAnLower( pFrame ) ) break; } } } } - SwRowFrm* pLastRow = nullptr; // will point to the last remaining line in master - SwRowFrm* pFollowRow = nullptr; // points to either the follow flow line of the + SwRowFrame* pLastRow = nullptr; // will point to the last remaining line in master + SwRowFrame* pFollowRow = nullptr; // points to either the follow flow line of the // first regular line in the follow if ( bSplitRowAllowed ) @@ -1131,7 +1131,7 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee // If the row that does not fit anymore is allowed // to be split, the next row has to be moved to the follow table. pLastRow = pRow; - pRow = static_cast<SwRowFrm*>(pRow->GetNext()); + pRow = static_cast<SwRowFrame*>(pRow->GetNext()); // new follow flow line for last row of master table pFollowRow = lcl_InsertNewFollowFlowLine( *this, *pLastRow, false ); @@ -1143,16 +1143,16 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee // NEW TABLES // check if we will break a row span by moving pFollowRow to the follow: // In this case we want to reformat the last line. - const SwCellFrm* pCellFrm = static_cast<const SwCellFrm*>(pFollowRow->GetLower()); - while ( pCellFrm ) + const SwCellFrame* pCellFrame = static_cast<const SwCellFrame*>(pFollowRow->GetLower()); + while ( pCellFrame ) { - if ( pCellFrm->GetTabBox()->getRowSpan() < 1 ) + if ( pCellFrame->GetTabBox()->getRowSpan() < 1 ) { - pLastRow = static_cast<SwRowFrm*>(pRow->GetPrev()); + pLastRow = static_cast<SwRowFrame*>(pRow->GetPrev()); break; } - pCellFrm = static_cast<const SwCellFrm*>(pCellFrm->GetNext()); + pCellFrame = static_cast<const SwCellFrame*>(pCellFrame->GetNext()); } // new follow flow line for last row of master table @@ -1167,31 +1167,31 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee //such situations). if ( bNewFollow ) { - SwFrm* pInsertBehind = pFoll->GetLastLower(); + SwFrame* pInsertBehind = pFoll->GetLastLower(); while ( pRow ) { - SwFrm* pNxt = pRow->GetNext(); - nRet += (pRow->Frm().*fnRect->fnGetHeight)(); + SwFrame* pNxt = pRow->GetNext(); + nRet += (pRow->Frame().*fnRect->fnGetHeight)(); // The footnotes do not have to be moved, this is done in the // MoveFwd of the follow table!!! pRow->RemoveFromLayout(); pRow->InsertBehind( pFoll, pInsertBehind ); pRow->_InvalidateAll(); pInsertBehind = pRow; - pRow = static_cast<SwRowFrm*>(pNxt); + pRow = static_cast<SwRowFrame*>(pNxt); } } else { - SwFrm* pPasteBefore = HasFollowFlowLine() ? + SwFrame* pPasteBefore = HasFollowFlowLine() ? pFollowRow->GetNext() : pFoll->GetFirstNonHeadlineRow(); while ( pRow ) { - SwFrm* pNxt = pRow->GetNext(); - nRet += (pRow->Frm().*fnRect->fnGetHeight)(); + SwFrame* pNxt = pRow->GetNext(); + nRet += (pRow->Frame().*fnRect->fnGetHeight)(); // The footnotes have to be moved: lcl_MoveFootnotes( *this, *GetFollow(), *pRow ); @@ -1200,7 +1200,7 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee pRow->Paste( pFoll, pPasteBefore ); pRow->CheckDirChange(); - pRow = static_cast<SwRowFrm*>(pNxt); + pRow = static_cast<SwRowFrame*>(pNxt); } } @@ -1227,28 +1227,28 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee return bRet; } -bool SwTabFrm::Join() +bool SwTabFrame::Join() { OSL_ENSURE( !HasFollowFlowLine(), "Joining follow flow line" ); - SwTabFrm *pFoll = GetFollow(); + SwTabFrame *pFoll = GetFollow(); if ( !pFoll->IsJoinLocked() ) { SWRECTFN( this ) pFoll->Cut(); //Cut out first to avoid unnecessary notifications. - SwFrm *pRow = pFoll->GetFirstNonHeadlineRow(), + SwFrame *pRow = pFoll->GetFirstNonHeadlineRow(), *pNxt; - SwFrm* pPrv = GetLastLower(); + SwFrame* pPrv = GetLastLower(); SwTwips nHeight = 0; //Total height of the inserted rows as return value. while ( pRow ) { pNxt = pRow->GetNext(); - nHeight += (pRow->Frm().*fnRect->fnGetHeight)(); + nHeight += (pRow->Frame().*fnRect->fnGetHeight)(); pRow->RemoveFromLayout(); pRow->_InvalidateAll(); pRow->InsertBehind( this, pPrv ); @@ -1259,7 +1259,7 @@ bool SwTabFrm::Join() SetFollow( pFoll->GetFollow() ); SetFollowFlowLine( pFoll->HasFollowFlowLine() ); - SwFrm::DestroyFrm(pFoll); + SwFrame::DestroyFrame(pFoll); Grow( nHeight ); } @@ -1267,49 +1267,49 @@ bool SwTabFrm::Join() return true; } -void SwInvalidatePositions( SwFrm *pFrm, long nBottom ) +void SwInvalidatePositions( SwFrame *pFrame, long nBottom ) { // LONG_MAX == nBottom means we have to calculate all bool bAll = LONG_MAX == nBottom; - SWRECTFN( pFrm ) + SWRECTFN( pFrame ) do - { pFrm->_InvalidatePos(); - pFrm->_InvalidateSize(); - if( pFrm->IsLayoutFrm() ) + { pFrame->_InvalidatePos(); + pFrame->_InvalidateSize(); + if( pFrame->IsLayoutFrame() ) { - if ( static_cast<SwLayoutFrm*>(pFrm)->Lower() ) + if ( static_cast<SwLayoutFrame*>(pFrame)->Lower() ) { - ::SwInvalidatePositions( static_cast<SwLayoutFrm*>(pFrm)->Lower(), nBottom); + ::SwInvalidatePositions( static_cast<SwLayoutFrame*>(pFrame)->Lower(), nBottom); // #i26945# - ::lcl_InvalidateLowerObjs( *(static_cast<SwLayoutFrm*>(pFrm)) ); + ::lcl_InvalidateLowerObjs( *(static_cast<SwLayoutFrame*>(pFrame)) ); } } else - pFrm->Prepare( PREP_ADJUST_FRM ); - pFrm = pFrm->GetNext(); - } while ( pFrm && + pFrame->Prepare( PREP_ADJUST_FRM ); + pFrame = pFrame->GetNext(); + } while ( pFrame && ( bAll || - (*fnRect->fnYDiff)( (pFrm->Frm().*fnRect->fnGetTop)(), nBottom ) < 0 ) ); + (*fnRect->fnYDiff)( (pFrame->Frame().*fnRect->fnGetTop)(), nBottom ) < 0 ) ); } -void SwInvalidateAll( SwFrm *pFrm, long nBottom ) +void SwInvalidateAll( SwFrame *pFrame, long nBottom ) { // LONG_MAX == nBottom means we have to calculate all bool bAll = LONG_MAX == nBottom; - SWRECTFN( pFrm ) + SWRECTFN( pFrame ) do { - pFrm->_InvalidatePos(); - pFrm->_InvalidateSize(); - pFrm->_InvalidatePrt(); - if( pFrm->IsLayoutFrm() ) + pFrame->_InvalidatePos(); + pFrame->_InvalidateSize(); + pFrame->_InvalidatePrt(); + if( pFrame->IsLayoutFrame() ) { // NEW TABLES - SwLayoutFrm* pToInvalidate = static_cast<SwLayoutFrm*>(pFrm); - SwCellFrm* pThisCell = dynamic_cast<SwCellFrm*>(pFrm); + SwLayoutFrame* pToInvalidate = static_cast<SwLayoutFrame*>(pFrame); + SwCellFrame* pThisCell = dynamic_cast<SwCellFrame*>(pFrame); if ( pThisCell && pThisCell->GetTabBox()->getRowSpan() < 1 ) { - pToInvalidate = & const_cast<SwCellFrm&>(pThisCell->FindStartEndOfRowSpanCell( true, true )); + pToInvalidate = & const_cast<SwCellFrame&>(pThisCell->FindStartEndOfRowSpanCell( true, true )); pToInvalidate->_InvalidatePos(); pToInvalidate->_InvalidateSize(); pToInvalidate->_InvalidatePrt(); @@ -1319,49 +1319,49 @@ void SwInvalidateAll( SwFrm *pFrm, long nBottom ) ::SwInvalidateAll( pToInvalidate->Lower(), nBottom); } else - pFrm->Prepare(); + pFrame->Prepare(); - pFrm = pFrm->GetNext(); - } while ( pFrm && + pFrame = pFrame->GetNext(); + } while ( pFrame && ( bAll || - (*fnRect->fnYDiff)( (pFrm->Frm().*fnRect->fnGetTop)(), nBottom ) < 0 ) ); + (*fnRect->fnYDiff)( (pFrame->Frame().*fnRect->fnGetTop)(), nBottom ) < 0 ) ); } // #i29550# -static void lcl_InvalidateAllLowersPrt( SwLayoutFrm* pLayFrm ) +static void lcl_InvalidateAllLowersPrt( SwLayoutFrame* pLayFrame ) { - pLayFrm->_InvalidatePrt(); - pLayFrm->_InvalidateSize(); - pLayFrm->SetCompletePaint(); + pLayFrame->_InvalidatePrt(); + pLayFrame->_InvalidateSize(); + pLayFrame->SetCompletePaint(); - SwFrm* pFrm = pLayFrm->Lower(); + SwFrame* pFrame = pLayFrame->Lower(); - while ( pFrm ) + while ( pFrame ) { - if ( pFrm->IsLayoutFrm() ) - lcl_InvalidateAllLowersPrt( static_cast<SwLayoutFrm*>(pFrm) ); + if ( pFrame->IsLayoutFrame() ) + lcl_InvalidateAllLowersPrt( static_cast<SwLayoutFrame*>(pFrame) ); else { - pFrm->_InvalidatePrt(); - pFrm->_InvalidateSize(); - pFrm->SetCompletePaint(); + pFrame->_InvalidatePrt(); + pFrame->_InvalidateSize(); + pFrame->SetCompletePaint(); } - pFrm = pFrm->GetNext(); + pFrame = pFrame->GetNext(); } } -bool SwContentFrm::CalcLowers( SwLayoutFrm* pLay, const SwLayoutFrm* pDontLeave, +bool SwContentFrame::CalcLowers( SwLayoutFrame* pLay, const SwLayoutFrame* pDontLeave, long nBottom, bool bSkipRowSpanCells ) { if ( !pLay ) return true; - vcl::RenderContext* pRenderContext = pLay->getRootFrm()->GetCurrShell()->GetOut(); + vcl::RenderContext* pRenderContext = pLay->getRootFrame()->GetCurrShell()->GetOut(); // LONG_MAX == nBottom means we have to calculate all bool bAll = LONG_MAX == nBottom; bool bRet = false; - SwContentFrm *pCnt = pLay->ContainsContent(); + SwContentFrame *pCnt = pLay->ContainsContent(); SWRECTFN( pLay ) // FME 2007-08-30 #i81146# new loop control @@ -1373,20 +1373,20 @@ bool SwContentFrm::CalcLowers( SwLayoutFrm* pLay, const SwLayoutFrm* pDontLeave, { // #115759# - check, if a format of content frame is // possible. Thus, 'copy' conditions, found at the beginning of - // <SwContentFrm::MakeAll(..)>, and check these. + // <SwContentFrame::MakeAll(..)>, and check these. const bool bFormatPossible = !pCnt->IsJoinLocked() && - ( !pCnt->IsTextFrm() || - !static_cast<SwTextFrm*>(pCnt)->IsLocked() ) && + ( !pCnt->IsTextFrame() || + !static_cast<SwTextFrame*>(pCnt)->IsLocked() ) && ( pCnt->IsFollow() || !StackHack::IsLocked() ); // NEW TABLES bool bSkipContent = false; if ( bSkipRowSpanCells && pCnt->IsInTab() ) { - const SwFrm* pCell = pCnt->GetUpper(); - while ( pCell && !pCell->IsCellFrm() ) + const SwFrame* pCell = pCnt->GetUpper(); + while ( pCell && !pCell->IsCellFrame() ) pCell = pCell->GetUpper(); - if ( pCell && 1 != static_cast<const SwCellFrm*>( pCell )->GetLayoutRowSpan() ) + if ( pCell && 1 != static_cast<const SwCellFrame*>( pCell )->GetLayoutRowSpan() ) bSkipContent = true; } @@ -1395,22 +1395,22 @@ bool SwContentFrm::CalcLowers( SwLayoutFrm* pLay, const SwLayoutFrm* pDontLeave, bRet |= !pCnt->IsValid(); // #i26945# - no extra invalidation of floating // screen objects needed. - // Thus, delete call of method <SwFrm::InvalidateObjs( true )> + // Thus, delete call of method <SwFrame::InvalidateObjs( true )> pCnt->Calc(pRenderContext); - // OD 2004-05-11 #i28701# - usage of new method <::FormatObjsAtFrm(..)> + // OD 2004-05-11 #i28701# - usage of new method <::FormatObjsAtFrame(..)> // to format the floating screen objects // #i46941# - frame has to be valid // Note: frame could be invalid after calling its format, if it's locked. - OSL_ENSURE( !pCnt->IsTextFrm() || + OSL_ENSURE( !pCnt->IsTextFrame() || pCnt->IsValid() || - static_cast<SwTextFrm*>(pCnt)->IsJoinLocked(), - "<SwContentFrm::CalcLowers(..)> - text frame invalid and not locked." ); - if ( pCnt->IsTextFrm() && pCnt->IsValid() ) + static_cast<SwTextFrame*>(pCnt)->IsJoinLocked(), + "<SwContentFrame::CalcLowers(..)> - text frame invalid and not locked." ); + if ( pCnt->IsTextFrame() && pCnt->IsValid() ) { // #i23129#, #i36347# - pass correct page frame to // the object formatter - if ( !SwObjectFormatter::FormatObjsAtFrm( *pCnt, - *(pCnt->FindPageFrm()) ) ) + if ( !SwObjectFormatter::FormatObjsAtFrame( *pCnt, + *(pCnt->FindPageFrame()) ) ) { if ( pCnt->GetRegisteredIn() == pLoopControlCond ) ++nLoopControlRuns; @@ -1428,66 +1428,66 @@ bool SwContentFrm::CalcLowers( SwLayoutFrm* pLay, const SwLayoutFrm* pDontLeave, } #if OSL_DEBUG_LEVEL > 1 - OSL_FAIL( "LoopControl in SwContentFrm::CalcLowers" ); + OSL_FAIL( "LoopControl in SwContentFrame::CalcLowers" ); #endif } } pCnt->GetUpper()->Calc(pRenderContext); } - if( ! bAll && (*fnRect->fnYDiff)((pCnt->Frm().*fnRect->fnGetTop)(), nBottom) > 0 ) + if( ! bAll && (*fnRect->fnYDiff)((pCnt->Frame().*fnRect->fnGetTop)(), nBottom) > 0 ) break; - pCnt = pCnt->GetNextContentFrm(); + pCnt = pCnt->GetNextContentFrame(); } return bRet; } // #i26945# - add parameter <_bOnlyRowsAndCells> to control // that only row and cell frames are formatted. -static bool lcl_InnerCalcLayout( SwFrm *pFrm, +static bool lcl_InnerCalcLayout( SwFrame *pFrame, long nBottom, bool _bOnlyRowsAndCells ) { - vcl::RenderContext* pRenderContext = pFrm->getRootFrm()->GetCurrShell() ? pFrm->getRootFrm()->GetCurrShell()->GetOut() : nullptr; + vcl::RenderContext* pRenderContext = pFrame->getRootFrame()->GetCurrShell() ? pFrame->getRootFrame()->GetCurrShell()->GetOut() : nullptr; // LONG_MAX == nBottom means we have to calculate all bool bAll = LONG_MAX == nBottom; bool bRet = false; - const SwFrm* pOldUp = pFrm->GetUpper(); - SWRECTFN( pFrm ) + const SwFrame* pOldUp = pFrame->GetUpper(); + SWRECTFN( pFrame ) do { // #i26945# - parameter <_bOnlyRowsAndCells> controls, // if only row and cell frames are formatted. - if ( pFrm->IsLayoutFrm() && - ( !_bOnlyRowsAndCells || pFrm->IsRowFrm() || pFrm->IsCellFrm() ) ) + if ( pFrame->IsLayoutFrame() && + ( !_bOnlyRowsAndCells || pFrame->IsRowFrame() || pFrame->IsCellFrame() ) ) { // #130744# An invalid locked table frame will // not be calculated => It will not become valid => // Loop in lcl_RecalcRow(). Therefore we do not consider them for bRet. - bRet |= !pFrm->IsValid() && ( !pFrm->IsTabFrm() || !static_cast<SwTabFrm*>(pFrm)->IsJoinLocked() ); - pFrm->Calc(pRenderContext); - if( static_cast<SwLayoutFrm*>(pFrm)->Lower() ) - bRet |= lcl_InnerCalcLayout( static_cast<SwLayoutFrm*>(pFrm)->Lower(), nBottom); + bRet |= !pFrame->IsValid() && ( !pFrame->IsTabFrame() || !static_cast<SwTabFrame*>(pFrame)->IsJoinLocked() ); + pFrame->Calc(pRenderContext); + if( static_cast<SwLayoutFrame*>(pFrame)->Lower() ) + bRet |= lcl_InnerCalcLayout( static_cast<SwLayoutFrame*>(pFrame)->Lower(), nBottom); // NEW TABLES - SwCellFrm* pThisCell = dynamic_cast<SwCellFrm*>(pFrm); + SwCellFrame* pThisCell = dynamic_cast<SwCellFrame*>(pFrame); if ( pThisCell && pThisCell->GetTabBox()->getRowSpan() < 1 ) { - SwCellFrm& rToCalc = const_cast<SwCellFrm&>(pThisCell->FindStartEndOfRowSpanCell( true, true )); + SwCellFrame& rToCalc = const_cast<SwCellFrame&>(pThisCell->FindStartEndOfRowSpanCell( true, true )); bRet |= !rToCalc.IsValid(); rToCalc.Calc(pRenderContext); if ( rToCalc.Lower() ) bRet |= lcl_InnerCalcLayout( rToCalc.Lower(), nBottom); } } - pFrm = pFrm->GetNext(); - } while( pFrm && + pFrame = pFrame->GetNext(); + } while( pFrame && ( bAll || - (*fnRect->fnYDiff)((pFrm->Frm().*fnRect->fnGetTop)(), nBottom) < 0 ) - && pFrm->GetUpper() == pOldUp ); + (*fnRect->fnYDiff)((pFrame->Frame().*fnRect->fnGetTop)(), nBottom) < 0 ) + && pFrame->GetUpper() == pOldUp ); return bRet; } -static void lcl_RecalcRow( SwRowFrm& rRow, long nBottom ) +static void lcl_RecalcRow( SwRowFrame& rRow, long nBottom ) { // FME 2007-08-30 #i81146# new loop control int nLoopControlRuns_1 = 0; @@ -1523,29 +1523,29 @@ static void lcl_RecalcRow( SwRowFrm& rRow, long nBottom ) { // #115759# - force another format of the // lowers, if at least one of it was invalid. - bCheck = SwContentFrm::CalcLowers( &rRow, rRow.GetUpper(), nBottom, true ); + bCheck = SwContentFrame::CalcLowers( &rRow, rRow.GetUpper(), nBottom, true ); // NEW TABLES // First we calculate the cells with row span of < 1, afterwards // all cells with row span of > 1: for ( int i = 0; i < 2; ++i ) { - SwCellFrm* pCellFrm = static_cast<SwCellFrm*>(rRow.Lower()); - while ( pCellFrm ) + SwCellFrame* pCellFrame = static_cast<SwCellFrame*>(rRow.Lower()); + while ( pCellFrame ) { const bool bCalc = 0 == i ? - pCellFrm->GetLayoutRowSpan() < 1 : - pCellFrm->GetLayoutRowSpan() > 1; + pCellFrame->GetLayoutRowSpan() < 1 : + pCellFrame->GetLayoutRowSpan() > 1; if ( bCalc ) { - SwCellFrm& rToRecalc = 0 == i ? - const_cast<SwCellFrm&>(pCellFrm->FindStartEndOfRowSpanCell( true, true )) : - *pCellFrm; - bCheck |= SwContentFrm::CalcLowers( &rToRecalc, &rToRecalc, nBottom, false ); + SwCellFrame& rToRecalc = 0 == i ? + const_cast<SwCellFrame&>(pCellFrame->FindStartEndOfRowSpanCell( true, true )) : + *pCellFrame; + bCheck |= SwContentFrame::CalcLowers( &rToRecalc, &rToRecalc, nBottom, false ); } - pCellFrm = static_cast<SwCellFrm*>(pCellFrm->GetNext()); + pCellFrame = static_cast<SwCellFrame*>(pCellFrame->GetNext()); } } @@ -1571,37 +1571,37 @@ static void lcl_RecalcRow( SwRowFrm& rRow, long nBottom ) } while( true ); } -static void lcl_RecalcTable( SwTabFrm& rTab, - SwLayoutFrm *pFirstRow, +static void lcl_RecalcTable( SwTabFrame& rTab, + SwLayoutFrame *pFirstRow, SwLayNotify &rNotify ) { if ( rTab.Lower() ) { if ( !pFirstRow ) { - pFirstRow = static_cast<SwLayoutFrm*>(rTab.Lower()); + pFirstRow = static_cast<SwLayoutFrame*>(rTab.Lower()); rNotify.SetLowersComplete( true ); } ::SwInvalidatePositions( pFirstRow, LONG_MAX ); - lcl_RecalcRow( static_cast<SwRowFrm&>(*pFirstRow), LONG_MAX ); + lcl_RecalcRow( static_cast<SwRowFrame&>(*pFirstRow), LONG_MAX ); } } // This is a new function to check the first condition whether // a tab frame may move backward. It replaces the formerly used // GetIndPrev(), which did not work correctly for #i5947# -static bool lcl_NoPrev( const SwFrm& rFrm ) +static bool lcl_NoPrev( const SwFrame& rFrame ) { // #i79774# // skip empty sections on investigation of direct previous frame. // use information, that at least one empty section is skipped in the following code. bool bSkippedDirectPrevEmptySection( false ); - if ( rFrm.GetPrev() ) + if ( rFrame.GetPrev() ) { - const SwFrm* pPrev( rFrm.GetPrev() ); + const SwFrame* pPrev( rFrame.GetPrev() ); while ( pPrev && - pPrev->IsSctFrm() && - !dynamic_cast<const SwSectionFrm&>(*pPrev).GetSection() ) + pPrev->IsSctFrame() && + !dynamic_cast<const SwSectionFrame&>(*pPrev).GetSection() ) { pPrev = pPrev->GetPrev(); bSkippedDirectPrevEmptySection = true; @@ -1612,9 +1612,9 @@ static bool lcl_NoPrev( const SwFrm& rFrm ) } } - if ( ( !bSkippedDirectPrevEmptySection && !rFrm.GetIndPrev() ) || + if ( ( !bSkippedDirectPrevEmptySection && !rFrame.GetIndPrev() ) || ( bSkippedDirectPrevEmptySection && - ( !rFrm.IsInSct() || !rFrm._GetIndPrev() ) ) ) + ( !rFrame.IsInSct() || !rFrame._GetIndPrev() ) ) ) { return true; } @@ -1622,13 +1622,13 @@ static bool lcl_NoPrev( const SwFrm& rFrm ) // I do not have a direct prev, but I have an indirect prev. // In section frames I have to check if I'm located inside // the first column: - if ( rFrm.IsInSct() ) + if ( rFrame.IsInSct() ) { - const SwFrm* pSct = rFrm.GetUpper(); - if ( pSct && pSct->IsColBodyFrm() && - pSct->GetUpper()->GetUpper()->IsSctFrm() ) + const SwFrame* pSct = rFrame.GetUpper(); + if ( pSct && pSct->IsColBodyFrame() && + pSct->GetUpper()->GetUpper()->IsSctFrame() ) { - const SwFrm* pPrevCol = rFrm.GetUpper()->GetUpper()->GetPrev(); + const SwFrame* pPrevCol = rFrame.GetUpper()->GetUpper()->GetPrev(); if ( pPrevCol ) // I'm not inside the first column and do not have a direct // prev. I can try to go backward. @@ -1645,32 +1645,32 @@ static bool lcl_NoPrev( const SwFrm& rFrm ) // a table frame and format it to assure keep attribute. // method return true, if a next content frame is formatted. // Precondition: The given table frame hasn't a follow and isn't a follow. -SwFrm* sw_FormatNextContentForKeep( SwTabFrm* pTabFrm ) +SwFrame* sw_FormatNextContentForKeep( SwTabFrame* pTabFrame ) { - vcl::RenderContext* pRenderContext = pTabFrm->getRootFrm()->GetCurrShell()->GetOut(); + vcl::RenderContext* pRenderContext = pTabFrame->getRootFrame()->GetCurrShell()->GetOut(); // find next content, table or section - SwFrm* pNxt = pTabFrm->FindNext(); + SwFrame* pNxt = pTabFrame->FindNext(); // skip empty sections - while ( pNxt && pNxt->IsSctFrm() && - !static_cast<SwSectionFrm*>(pNxt)->GetSection() ) + while ( pNxt && pNxt->IsSctFrame() && + !static_cast<SwSectionFrame*>(pNxt)->GetSection() ) { pNxt = pNxt->FindNext(); } // if found next frame is a section, get its first content. - if ( pNxt && pNxt->IsSctFrm() ) + if ( pNxt && pNxt->IsSctFrame() ) { - pNxt = static_cast<SwSectionFrm*>(pNxt)->ContainsAny(); + pNxt = static_cast<SwSectionFrame*>(pNxt)->ContainsAny(); } // format found next frame. - // if table frame is inside another table, method <SwFrm::MakeAll()> is + // if table frame is inside another table, method <SwFrame::MakeAll()> is // called to avoid that the superior table frame is formatted. if ( pNxt ) { - if ( pTabFrm->GetUpper()->IsInTab() ) - pNxt->MakeAll(pNxt->getRootFrm()->GetCurrShell()->GetOut()); + if ( pTabFrame->GetUpper()->IsInTab() ) + pNxt->MakeAll(pNxt->getRootFrame()->GetCurrShell()->GetOut()); else pNxt->Calc(pRenderContext); } @@ -1679,32 +1679,32 @@ SwFrm* sw_FormatNextContentForKeep( SwTabFrm* pTabFrm ) } namespace { - bool AreAllRowsKeepWithNext( const SwRowFrm* pFirstRowFrm ) + bool AreAllRowsKeepWithNext( const SwRowFrame* pFirstRowFrame ) { - bool bRet = pFirstRowFrm != nullptr && - pFirstRowFrm->ShouldRowKeepWithNext(); + bool bRet = pFirstRowFrame != nullptr && + pFirstRowFrame->ShouldRowKeepWithNext(); - while ( bRet && pFirstRowFrm->GetNext() != nullptr ) + while ( bRet && pFirstRowFrame->GetNext() != nullptr ) { - pFirstRowFrm = dynamic_cast<const SwRowFrm*>(pFirstRowFrm->GetNext()); - bRet = pFirstRowFrm != nullptr && - pFirstRowFrm->ShouldRowKeepWithNext(); + pFirstRowFrame = dynamic_cast<const SwRowFrame*>(pFirstRowFrame->GetNext()); + bRet = pFirstRowFrame != nullptr && + pFirstRowFrame->ShouldRowKeepWithNext(); } return bRet; } } -void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext) +void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext) { if ( IsJoinLocked() || StackHack::IsLocked() || StackHack::Count() > 50 ) return; if ( HasFollow() ) { - SwTabFrm* pFollowFrm = GetFollow(); - OSL_ENSURE( !pFollowFrm->IsJoinLocked() || !pFollowFrm->IsRebuildLastLine(), - "SwTabFrm::MakeAll for master while follow is in RebuildLastLine()" ); - if ( pFollowFrm->IsJoinLocked() && pFollowFrm->IsRebuildLastLine() ) + SwTabFrame* pFollowFrame = GetFollow(); + OSL_ENSURE( !pFollowFrame->IsJoinLocked() || !pFollowFrame->IsRebuildLastLine(), + "SwTabFrame::MakeAll for master while follow is in RebuildLastLine()" ); + if ( pFollowFrame->IsJoinLocked() && pFollowFrame->IsRebuildLastLine() ) return; } @@ -1746,22 +1746,22 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext) SwHTMLTableLayout *pLayout = GetTable()->GetHTMLTableLayout(); if ( pLayout ) m_bCalcLowers = pLayout->Resize( - pLayout->GetBrowseWidthByTabFrm( *this ) ); + pLayout->GetBrowseWidthByTabFrame( *this ) ); } // as long as bMakePage is true, a new page can be created (exactly once) bool bMakePage = true; // bMovedBwd gets set to true when the frame flows backwards bool bMovedBwd = false; - // as long as bMovedFwd is false, the Frm may flow backwards (until + // as long as bMovedFwd is false, the Frame may flow backwards (until // it has been moved forward once) bool bMovedFwd = false; - // gets set to true when the Frm is split + // gets set to true when the Frame is split bool bSplit = false; const bool bFootnotesInDoc = !GetFormat()->GetDoc()->GetFootnoteIdxs().empty(); const bool bFly = IsInFly(); - auto pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrm::GetCache(), this); + auto pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrame::GetCache(), this); const SwBorderAttrs *pAttrs = pAccess->Get(); // The beloved keep attribute @@ -1819,7 +1819,7 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext) // Join follow table, if last row of this table should keep: if ( bTableRowKeep && GetFollow() && !GetFollow()->IsJoinLocked() ) { - const SwRowFrm* pTmpRow = static_cast<const SwRowFrm*>(GetLastLower()); + const SwRowFrame* pTmpRow = static_cast<const SwRowFrame*>(GetLastLower()); if ( pTmpRow && pTmpRow->ShouldRowKeepWithNext() ) { if ( HasFollowFlowLine() ) @@ -1829,10 +1829,10 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext) } // a new one is moved forwards immediately - if ( !Frm().Top() && IsFollow() ) + if ( !Frame().Top() && IsFollow() ) { - SwFrm *pPre = GetPrev(); - if ( pPre && pPre->IsTabFrm() && static_cast<SwTabFrm*>(pPre)->GetFollow() == this) + SwFrame *pPre = GetPrev(); + if ( pPre && pPre->IsTabFrame() && static_cast<SwTabFrame*>(pPre)->GetFollow() == this) { if ( !MoveFwd( bMakePage, false ) ) bMakePage = false; @@ -1857,27 +1857,27 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext) bSplit = false; } - Point aOldPos( (Frm().*fnRect->fnGetPos)() ); + Point aOldPos( (Frame().*fnRect->fnGetPos)() ); MakePos(); - if ( aOldPos != (Frm().*fnRect->fnGetPos)() ) + if ( aOldPos != (Frame().*fnRect->fnGetPos)() ) { - if ( aOldPos.Y() != (Frm().*fnRect->fnGetTop)() ) + if ( aOldPos.Y() != (Frame().*fnRect->fnGetTop)() ) { SwHTMLTableLayout *pLayout = GetTable()->GetHTMLTableLayout(); if( pLayout ) { pAccess.reset(); m_bCalcLowers |= pLayout->Resize( - pLayout->GetBrowseWidthByTabFrm( *this ) ); - pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrm::GetCache(), this); + pLayout->GetBrowseWidthByTabFrame( *this ) ); + pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrame::GetCache(), this); pAttrs = pAccess->Get(); } mbValidPrtArea = false; aNotify.SetLowersComplete( false ); } - SwFrm *pPre; + SwFrame *pPre; if ( bKeep || (nullptr != (pPre = FindPrev()) && pPre->GetAttrSet()->GetKeep().GetValue()) ) { @@ -1894,27 +1894,27 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext) long n1StLineHeight = 0; if ( IsFollow() ) { - SwFrm* pFrm = GetFirstNonHeadlineRow(); - if ( pFrm ) - n1StLineHeight = (pFrm->Frm().*fnRect->fnGetHeight)(); + SwFrame* pFrame = GetFirstNonHeadlineRow(); + if ( pFrame ) + n1StLineHeight = (pFrame->Frame().*fnRect->fnGetHeight)(); } if ( !mbValidSize || !mbValidPrtArea ) { const long nOldPrtWidth = (Prt().*fnRect->fnGetWidth)(); - const long nOldFrmWidth = (Frm().*fnRect->fnGetWidth)(); + const long nOldFrameWidth = (Frame().*fnRect->fnGetWidth)(); const Point aOldPrtPos = (Prt().*fnRect->fnGetPos)(); - Format( getRootFrm()->GetCurrShell()->GetOut(), pAttrs ); + Format( getRootFrame()->GetCurrShell()->GetOut(), pAttrs ); SwHTMLTableLayout *pLayout = GetTable()->GetHTMLTableLayout(); if ( pLayout && ((Prt().*fnRect->fnGetWidth)() != nOldPrtWidth || - (Frm().*fnRect->fnGetWidth)() != nOldFrmWidth) ) + (Frame().*fnRect->fnGetWidth)() != nOldFrameWidth) ) { pAccess.reset(); m_bCalcLowers |= pLayout->Resize( - pLayout->GetBrowseWidthByTabFrm( *this ) ); - pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrm::GetCache(), this); + pLayout->GetBrowseWidthByTabFrame( *this ) ); + pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrame::GetCache(), this); pAttrs = pAccess->Get(); } if ( aOldPrtPos != (Prt().*fnRect->fnGetPos)() ) @@ -1932,16 +1932,16 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext) if ( IsFollow() ) { // Only if the height of the first line got smaller. - SwFrm *pFrm = GetFirstNonHeadlineRow(); - if( pFrm && n1StLineHeight >(pFrm->Frm().*fnRect->fnGetHeight )() ) + SwFrame *pFrame = GetFirstNonHeadlineRow(); + if( pFrame && n1StLineHeight >(pFrame->Frame().*fnRect->fnGetHeight )() ) { - SwTabFrm *pMaster = FindMaster(); + SwTabFrame *pMaster = FindMaster(); bool bDummy; if ( ShouldBwdMoved( pMaster->GetUpper(), false, bDummy ) ) pMaster->InvalidatePos(); } } - SwFootnoteBossFrm *pOldBoss = bFootnotesInDoc ? FindFootnoteBossFrm( true ) : nullptr; + SwFootnoteBossFrame *pOldBoss = bFootnotesInDoc ? FindFootnoteBossFrame( true ) : nullptr; bool bReformat; if ( MoveBwd( bReformat ) ) { @@ -1952,9 +1952,9 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext) MoveLowerFootnotes( nullptr, pOldBoss, nullptr, true ); if ( bReformat || bKeep ) { - long nOldTop = (Frm().*fnRect->fnGetTop)(); + long nOldTop = (Frame().*fnRect->fnGetTop)(); MakePos(); - if( nOldTop != (Frm().*fnRect->fnGetTop)() ) + if( nOldTop != (Frame().*fnRect->fnGetTop)() ) { SwHTMLTableLayout *pHTMLLayout = GetTable()->GetHTMLTableLayout(); @@ -1962,14 +1962,14 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext) { pAccess.reset(); m_bCalcLowers |= pHTMLLayout->Resize( - pHTMLLayout->GetBrowseWidthByTabFrm( *this ) ); + pHTMLLayout->GetBrowseWidthByTabFrame( *this ) ); - pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrm::GetCache(), this); + pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrame::GetCache(), this); pAttrs = pAccess->Get(); } mbValidPrtArea = false; - Format( getRootFrm()->GetCurrShell()->GetOut(), pAttrs ); + Format( getRootFrame()->GetCurrShell()->GetOut(), pAttrs ); } lcl_RecalcTable( *this, nullptr, aNotify ); m_bLowersFormatted = true; @@ -2002,17 +2002,17 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext) // table frame bottom to the bottom of the upper printing area. // Note: negative values denotes the situation that table frame doesn't fit in its upper. SwTwips nDistanceToUpperPrtBottom = - (Frm().*fnRect->fnBottomDist)( (GetUpper()->*fnRect->fnGetPrtBottom)()); + (Frame().*fnRect->fnBottomDist)( (GetUpper()->*fnRect->fnGetPrtBottom)()); /// In online layout try to grow upper of table frame, if table frame doesn't fit in its upper. - const SwViewShell *pSh = getRootFrm()->GetCurrShell(); + const SwViewShell *pSh = getRootFrame()->GetCurrShell(); const bool bBrowseMode = pSh && pSh->GetViewOptions()->getBrowseMode(); if ( nDistanceToUpperPrtBottom < 0 && bBrowseMode ) { if ( GetUpper()->Grow( -nDistanceToUpperPrtBottom ) ) { // upper is grown --> recalculate <nDistanceToUpperPrtBottom> - nDistanceToUpperPrtBottom = (Frm().*fnRect->fnBottomDist)( (GetUpper()->*fnRect->fnGetPrtBottom)()); + nDistanceToUpperPrtBottom = (Frame().*fnRect->fnBottomDist)( (GetUpper()->*fnRect->fnGetPrtBottom)()); } } @@ -2029,27 +2029,27 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext) bool bDummy; if ( GetFollow()->ShouldBwdMoved( GetUpper(), false, bDummy ) ) { - SwFrm *pTmp = GetUpper(); + SwFrame *pTmp = GetUpper(); SwTwips nDeadLine = (pTmp->*fnRect->fnGetPrtBottom)(); if ( bBrowseMode ) nDeadLine += pTmp->Grow( LONG_MAX, true ); - if( (Frm().*fnRect->fnBottomDist)( nDeadLine ) > 0 ) + if( (Frame().*fnRect->fnBottomDist)( nDeadLine ) > 0 ) { // First, we remove an existing follow flow line. if ( HasFollowFlowLine() ) { - SwFrm* pLastLine = GetLastLower(); + SwFrame* pLastLine = GetLastLower(); RemoveFollowFlowLine(); // invalidate and rebuild last row if ( pLastLine ) { ::SwInvalidateAll( pLastLine, LONG_MAX ); SetRebuildLastLine( true ); - lcl_RecalcRow( static_cast<SwRowFrm&>(*pLastLine), LONG_MAX ); + lcl_RecalcRow( static_cast<SwRowFrame&>(*pLastLine), LONG_MAX ); SetRebuildLastLine( false ); } - SwFrm* pRow = GetFollow()->GetFirstNonHeadlineRow(); + SwFrame* pRow = GetFollow()->GetFirstNonHeadlineRow(); if ( !pRow || !pRow->GetNext() ) //The follow becomes empty and invalid for this reason. @@ -2060,7 +2060,7 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext) // If there is no follow flow line, we move the first // row in the follow table to the master table. - SwRowFrm *pRow = GetFollow()->GetFirstNonHeadlineRow(); + SwRowFrame *pRow = GetFollow()->GetFirstNonHeadlineRow(); //The follow becomes empty and invalid for this reason. if ( !pRow ) @@ -2069,19 +2069,19 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext) continue; } - const SwTwips nOld = (Frm().*fnRect->fnGetHeight)(); + const SwTwips nOld = (Frame().*fnRect->fnGetHeight)(); long nRowsToMove = lcl_GetMaximumLayoutRowSpan( *pRow ); - SwFrm* pRowToMove = pRow; + SwFrame* pRowToMove = pRow; while ( pRowToMove && nRowsToMove-- > 0 ) { const bool bMoveFootnotes = bFootnotesInDoc && !GetFollow()->IsJoinLocked(); - SwFootnoteBossFrm *pOldBoss = nullptr; + SwFootnoteBossFrame *pOldBoss = nullptr; if ( bMoveFootnotes ) - pOldBoss = pRowToMove->FindFootnoteBossFrm( true ); + pOldBoss = pRowToMove->FindFootnoteBossFrame( true ); - SwFrm* pNextRow = pRowToMove->GetNext(); + SwFrame* pNextRow = pRowToMove->GetNext(); if ( !pNextRow ) { @@ -2096,14 +2096,14 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext) //Displace the footnotes! if ( bMoveFootnotes ) - if ( static_cast<SwLayoutFrm*>(pRowToMove)->MoveLowerFootnotes( nullptr, pOldBoss, FindFootnoteBossFrm( true ), true ) ) + if ( static_cast<SwLayoutFrame*>(pRowToMove)->MoveLowerFootnotes( nullptr, pOldBoss, FindFootnoteBossFrame( true ), true ) ) GetUpper()->Calc(pRenderContext); pRowToMove = pNextRow; } - if ( nOld != (Frm().*fnRect->fnGetHeight)() ) - lcl_RecalcTable( *this, static_cast<SwLayoutFrm*>(pRow), aNotify ); + if ( nOld != (Frame().*fnRect->fnGetHeight)() ) + lcl_RecalcTable( *this, static_cast<SwLayoutFrame*>(pRow), aNotify ); continue; } @@ -2128,7 +2128,7 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext) // 5. There is no break before attribute set behind the table // 6. There is no section change behind the table (see IsKeep) // 7. The last table row wants to keep with its next. - const SwRowFrm* pLastRow = static_cast<const SwRowFrm*>(GetLastLower()); + const SwRowFrame* pLastRow = static_cast<const SwRowFrame*>(GetLastLower()); if ( pLastRow && IsKeep( pAttrs->GetAttrSet(), true ) && pLastRow->ShouldRowKeepWithNext() ) bFormat = true; @@ -2142,9 +2142,9 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext) // it has to be avoided, that superior table is formatted. // Thus, find next content, table or section and, if a section // is found, get its first content. - const SwFrm* pTmpNxt = sw_FormatNextContentForKeep( this ); + const SwFrame* pTmpNxt = sw_FormatNextContentForKeep( this ); - pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrm::GetCache(), this); + pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrame::GetCache(), this); pAttrs = pAccess->Get(); // The last row wants to keep with the frame behind the table. @@ -2168,7 +2168,7 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext) } else if (m_bONECalcLowers) { - lcl_RecalcRow( static_cast<SwRowFrm&>(*Lower()), LONG_MAX ); + lcl_RecalcRow( static_cast<SwRowFrame&>(*Lower()), LONG_MAX ); m_bONECalcLowers = false; } } @@ -2178,7 +2178,7 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext) //I don't fit in the higher-ranked element anymore, therefore it's the //right moment to do some preferably constructive changes. - //If I'm NOT allowed to leave the parent Frm, I've got a problem. + //If I'm NOT allowed to leave the parent Frame, I've got a problem. // Following Arthur Dent, we do the only thing that you can do with // an unsolvable problem: We ignore it with all our power. if ( !bMoveable ) @@ -2191,7 +2191,7 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext) } else if (m_bONECalcLowers) { - lcl_RecalcRow( static_cast<SwRowFrm&>(*Lower()), LONG_MAX ); + lcl_RecalcRow( static_cast<SwRowFrame&>(*Lower()), LONG_MAX ); m_bONECalcLowers = false; } @@ -2215,8 +2215,8 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext) // 1. We have at least one non headline row // 2. If this row wants to keep, we need an additional row // 3. The table is allowed to split or we do not have an pIndPrev: - SwFrm* pIndPrev = GetIndPrev(); - const SwRowFrm* pFirstNonHeadlineRow = GetFirstNonHeadlineRow(); + SwFrame* pIndPrev = GetIndPrev(); + const SwRowFrame* pFirstNonHeadlineRow = GetFirstNonHeadlineRow(); // #i120016# if this row wants to keep, allow split in case that all rows want to keep with next, // the table can not move forward as it is the first one and a split is in general allowed. const bool bAllowSplitOfRow = ( bTableRowKeep && @@ -2234,8 +2234,8 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext) // section which has a height of 0, because this is not growable and thus // all kinds of unexpected things could happen. if ( IsInSct() && - (FindSctFrm())->Lower()->IsColumnFrm() && - 0 == (GetUpper()->Frm().*fnRect->fnGetHeight)() ) + (FindSctFrame())->Lower()->IsColumnFrame() && + 0 == (GetUpper()->Frame().*fnRect->fnGetHeight)() ) { bTryToSplit = false; } @@ -2251,7 +2251,7 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext) { SetInRecalcLowerRow( true ); - ::lcl_RecalcRow( static_cast<SwRowFrm&>(*Lower()), nDeadLine ); + ::lcl_RecalcRow( static_cast<SwRowFrame&>(*Lower()), nDeadLine ); SetInRecalcLowerRow( false ); } m_bLowersFormatted = true; @@ -2260,7 +2260,7 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext) // One more check if its really necessary to split the table. // 1. The table either has to exceed the deadline or // 2. We explicitly want to cut off the last row. - if( (Frm().*fnRect->fnBottomDist)( nDeadLine ) > 0 && !bLastRowHasToMoveToFollow ) + if( (Frame().*fnRect->fnBottomDist)( nDeadLine ) > 0 && !bLastRowHasToMoveToFollow ) { continue; } @@ -2274,10 +2274,10 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext) // to split, we do not try to split: if ( GetUpper()->IsInTab() ) { - const SwFrm* pTmpRow = GetUpper(); - while ( pTmpRow && !pTmpRow->IsRowFrm() ) + const SwFrame* pTmpRow = GetUpper(); + while ( pTmpRow && !pTmpRow->IsRowFrame() ) pTmpRow = pTmpRow->GetUpper(); - if ( pTmpRow && !static_cast<const SwRowFrm*>(pTmpRow)->IsRowSplitAllowed() ) + if ( pTmpRow && !static_cast<const SwRowFrame*>(pTmpRow)->IsRowSplitAllowed() ) continue; } @@ -2285,11 +2285,11 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext) if ( bTableRowKeep ) { - const SwRowFrm* pTmpRow = pFirstNonHeadlineRow; + const SwRowFrame* pTmpRow = pFirstNonHeadlineRow; while ( pTmpRow && pTmpRow->ShouldRowKeepWithNext() ) { ++nMinNumOfLines; - pTmpRow = static_cast<const SwRowFrm*>(pTmpRow->GetNext()); + pTmpRow = static_cast<const SwRowFrame*>(pTmpRow->GetNext()); } } @@ -2297,7 +2297,7 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext) ++nMinNumOfLines; const SwTwips nBreakLine = (*fnRect->fnYInc)( - (Frm().*fnRect->fnGetTop)(), + (Frame().*fnRect->fnGetTop)(), (this->*fnRect->fnGetTopMargin)() + lcl_GetHeightOfRows( GetLower(), nMinNumOfLines ) ); @@ -2347,7 +2347,7 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext) // to nDeadLine may not be enough. if ( bSplitError && bTryToSplit ) // no restart if we did not try to split: i72847, i79426 { - lcl_RecalcRow( static_cast<SwRowFrm&>(*Lower()), LONG_MAX ); + lcl_RecalcRow( static_cast<SwRowFrame&>(*Lower()), LONG_MAX ); mbValidPos = false; bTryToSplit = false; continue; @@ -2379,7 +2379,7 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext) GetFollow()->MakeAll(pRenderContext); - pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrm::GetCache(), this); + pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrame::GetCache(), this); pAttrs = pAccess->Get(); GetFollow()->SetLowersFormatted(false); @@ -2388,8 +2388,8 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext) // its content. const bool bOldJoinLock = GetFollow()->IsJoinLocked(); GetFollow()->LockJoin(); - ::lcl_RecalcRow( static_cast<SwRowFrm&>(*GetFollow()->Lower()), - (GetFollow()->GetUpper()->Frm().*fnRectX->fnGetBottom)() ); + ::lcl_RecalcRow( static_cast<SwRowFrame&>(*GetFollow()->Lower()), + (GetFollow()->GetUpper()->Frame().*fnRectX->fnGetBottom)() ); // #i43913# // #i63632# Do not unlock the // follow if it wasn't locked before. @@ -2398,7 +2398,7 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext) if ( !GetFollow()->GetFollow() ) { - SwFrm* pNxt = static_cast<SwFrm*>(GetFollow())->FindNext(); + SwFrame* pNxt = static_cast<SwFrame*>(GetFollow())->FindNext(); if ( pNxt ) { // #i18103# - no formatting of found next @@ -2406,9 +2406,9 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext) // 'ColLocked' section, the follow table is // in. bool bCalcNxt = true; - if ( GetFollow()->IsInSct() && pNxt->IsSctFrm() ) + if ( GetFollow()->IsInSct() && pNxt->IsSctFrame() ) { - SwSectionFrm* pSct = GetFollow()->FindSctFrm(); + SwSectionFrame* pSct = GetFollow()->FindSctFrame(); if ( pSct->IsColLocked() && pSct->GetFollow() == pNxt ) { @@ -2434,16 +2434,16 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext) // Set to false again as early as possible. bLastRowHasToMoveToFollow = false; - if( IsInSct() && bMovedFwd && bMakePage && GetUpper()->IsColBodyFrm() && - GetUpper()->GetUpper()->GetUpper()->IsSctFrm() && + if( IsInSct() && bMovedFwd && bMakePage && GetUpper()->IsColBodyFrame() && + GetUpper()->GetUpper()->GetUpper()->IsSctFrame() && ( GetUpper()->GetUpper()->GetPrev() || GetIndPrev() ) && - static_cast<SwSectionFrm*>(GetUpper()->GetUpper()->GetUpper())->MoveAllowed(this) ) + static_cast<SwSectionFrame*>(GetUpper()->GetUpper()->GetUpper())->MoveAllowed(this) ) { bMovedFwd = false; } // #i29771# Reset bTryToSplit flag on change of upper - const SwFrm* pOldUpper = GetUpper(); + const SwFrame* pOldUpper = GetUpper(); //Let's see if we find some place anywhere... if ( !bMovedFwd && !MoveFwd( bMakePage, false ) ) @@ -2463,7 +2463,7 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext) if ( IsFollow() ) { //To avoid oscillations now invalid master should drop behind. - SwTabFrm *pTab = FindMaster(); + SwTabFrame *pTab = FindMaster(); if ( pTab->GetUpper() ) pTab->GetUpper()->Calc(pRenderContext); pTab->Calc(pRenderContext); @@ -2492,7 +2492,7 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext) // and can cause layout loops, if table doesn't fit and isn't // allowed to split. SwTwips nDistToUpperPrtBottom = - (Frm().*fnRect->fnBottomDist)( (GetUpper()->*fnRect->fnGetPrtBottom)()); + (Frame().*fnRect->fnBottomDist)( (GetUpper()->*fnRect->fnGetPrtBottom)()); if ( nDistToUpperPrtBottom >= 0 || bTryToSplit ) { lcl_RecalcTable( *this, nullptr, aNotify ); @@ -2502,7 +2502,7 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext) #if OSL_DEBUG_LEVEL > 0 else { - OSL_FAIL( "debug assertion: <SwTabFrm::MakeAll()> - format of table lowers suppressed by fix i44910" ); + OSL_FAIL( "debug assertion: <SwTabFrame::MakeAll()> - format of table lowers suppressed by fix i44910" ); } #endif } @@ -2513,8 +2513,8 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext) //next best opportunity. if ( IsFollow() ) { - SwFrm *pPre = GetPrev(); - if ( pPre && pPre->IsTabFrm() && static_cast<SwTabFrm*>(pPre)->GetFollow() == this) + SwFrame *pPre = GetPrev(); + if ( pPre && pPre->IsTabFrame() && static_cast<SwTabFrame*>(pPre)->GetFollow() == this) pPre->InvalidatePos(); } @@ -2526,13 +2526,13 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext) } /// Calculate the offsets arising because of FlyFrames -bool SwTabFrm::CalcFlyOffsets( SwTwips& rUpper, +bool SwTabFrame::CalcFlyOffsets( SwTwips& rUpper, long& rLeftOffset, long& rRightOffset ) const { bool bInvalidatePrtArea = false; - const SwPageFrm *pPage = FindPageFrm(); - const SwFlyFrm* pMyFly = FindFlyFrm(); + const SwPageFrame *pPage = FindPageFrame(); + const SwFlyFrame* pMyFly = FindFlyFrame(); // --> #108724# Page header/footer content doesn't have to wrap around // floating screen objects @@ -2545,18 +2545,18 @@ bool SwTabFrm::CalcFlyOffsets( SwTwips& rUpper, { SWRECTFN( this ) const bool bConsiderWrapOnObjPos = rIDSA.get(DocumentSettingId::CONSIDER_WRAP_ON_OBJECT_POSITION); - long nPrtPos = (Frm().*fnRect->fnGetTop)(); + long nPrtPos = (Frame().*fnRect->fnGetTop)(); nPrtPos = (*fnRect->fnYInc)( nPrtPos, rUpper ); - SwRect aRect( Frm() ); + SwRect aRect( Frame() ); long nYDiff = (*fnRect->fnYDiff)( (Prt().*fnRect->fnGetTop)(), rUpper ); if( nYDiff > 0 ) (aRect.*fnRect->fnAddBottom)( -nYDiff ); for ( size_t i = 0; i < pPage->GetSortedObjs()->size(); ++i ) { SwAnchoredObject* pAnchoredObj = (*pPage->GetSortedObjs())[i]; - if ( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) != nullptr ) + if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr ) { - SwFlyFrm *pFly = static_cast<SwFlyFrm*>(pAnchoredObj); + SwFlyFrame *pFly = static_cast<SwFlyFrame*>(pAnchoredObj); const SwRect aFlyRect = pFly->GetObjRectWithSpaces(); // #i26945# - correction of conditions, // if Writer fly frame has to be considered: @@ -2574,19 +2574,19 @@ bool SwTabFrm::CalcFlyOffsets( SwTwips& rUpper, // E.g., it could happen, that the fly frame is still registered // at the page frame, the table is on, but it's anchor character // text frame has already changed its page. - const SwTextFrm* pAnchorCharFrm = pFly->FindAnchorCharFrm(); + const SwTextFrame* pAnchorCharFrame = pFly->FindAnchorCharFrame(); bool bConsiderFly = // #i46807# - do not consider invalid // Writer fly frames. pFly->IsValid() && // fly anchored at character - pFly->IsFlyAtCntFrm() && + pFly->IsFlyAtContentFrame() && // fly overlaps with corresponding table rectangle aFlyRect.IsOver( aRect ) && // fly isn't lower of table and // anchor character frame of fly isn't lower of table ( !IsAnLower( pFly ) && - ( !pAnchorCharFrm || !IsAnLower( pAnchorCharFrm ) ) ) && + ( !pAnchorCharFrame || !IsAnLower( pAnchorCharFrame ) ) ) && // table isn't lower of fly !pFly->IsAnLower( this ) && // fly is lower of fly, the table is in @@ -2596,25 +2596,25 @@ bool SwTabFrm::CalcFlyOffsets( SwTwips& rUpper, // which is inside a frame. ( ( !pMyFly || pMyFly->IsAnLower( pFly ) ) && - pMyFly == pFly->GetAnchorFrmContainingAnchPos()->FindFlyFrm() ) && + pMyFly == pFly->GetAnchorFrameContainingAnchPos()->FindFlyFrame() ) && // anchor frame not on following page pPage->GetPhyPageNum() >= - pFly->GetAnchorFrm()->FindPageFrm()->GetPhyPageNum() && + pFly->GetAnchorFrame()->FindPageFrame()->GetPhyPageNum() && // anchor character text frame on same page - ( !pAnchorCharFrm || - pAnchorCharFrm->FindPageFrm()->GetPhyPageNum() == + ( !pAnchorCharFrame || + pAnchorCharFrame->FindPageFrame()->GetPhyPageNum() == pPage->GetPhyPageNum() ); if ( bConsiderFly ) { - const SwFrm* pFlyHeaderFooterFrm = pFly->GetAnchorFrm()->FindFooterOrHeader(); - const SwFrm* pThisHeaderFooterFrm = FindFooterOrHeader(); + const SwFrame* pFlyHeaderFooterFrame = pFly->GetAnchorFrame()->FindFooterOrHeader(); + const SwFrame* pThisHeaderFooterFrame = FindFooterOrHeader(); - if ( pFlyHeaderFooterFrm != pThisHeaderFooterFrm && + if ( pFlyHeaderFooterFrame != pThisHeaderFooterFrame && // #148493# If bConsiderWrapOnObjPos is set, // we want to consider the fly if it is located in the header and // the table is located in the body: - ( !bConsiderWrapOnObjPos || nullptr != pThisHeaderFooterFrm || !pFlyHeaderFooterFrm->IsHeaderFrm() ) ) + ( !bConsiderWrapOnObjPos || nullptr != pThisHeaderFooterFrame || !pFlyHeaderFooterFrame->IsHeaderFrame() ) ) bConsiderFly = false; } @@ -2635,7 +2635,7 @@ bool SwTabFrm::CalcFlyOffsets( SwTwips& rUpper, { const long nWidth = (*fnRect->fnXDiff)( (aFlyRect.*fnRect->fnGetRight)(), - (pFly->GetAnchorFrm()->Frm().*fnRect->fnGetLeft)() ); + (pFly->GetAnchorFrame()->Frame().*fnRect->fnGetLeft)() ); rLeftOffset = std::max( rLeftOffset, nWidth ); bInvalidatePrtArea = true; } @@ -2644,7 +2644,7 @@ bool SwTabFrm::CalcFlyOffsets( SwTwips& rUpper, text::HoriOrientation::RIGHT == rHori.GetHoriOrient() ) { const long nWidth = (*fnRect->fnXDiff)( - (pFly->GetAnchorFrm()->Frm().*fnRect->fnGetRight)(), + (pFly->GetAnchorFrame()->Frame().*fnRect->fnGetRight)(), (aFlyRect.*fnRect->fnGetLeft)() ); rRightOffset = std::max( rRightOffset, nWidth ); bInvalidatePrtArea = true; @@ -2652,25 +2652,25 @@ bool SwTabFrm::CalcFlyOffsets( SwTwips& rUpper, } } } - rUpper = (*fnRect->fnYDiff)( nPrtPos, (Frm().*fnRect->fnGetTop)() ); + rUpper = (*fnRect->fnYDiff)( nPrtPos, (Frame().*fnRect->fnGetTop)() ); } return bInvalidatePrtArea; } -/// "Formats" the frame; Frm and PrtArea. +/// "Formats" the frame; Frame and PrtArea. /// The fixed size is not adjusted here. -void SwTabFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttrs *pAttrs ) +void SwTabFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttrs *pAttrs ) { - OSL_ENSURE( pAttrs, "TabFrm::Format, pAttrs ist 0." ); + OSL_ENSURE( pAttrs, "TabFrame::Format, pAttrs ist 0." ); SWRECTFN( this ) if ( !mbValidSize ) { long nDiff = (GetUpper()->Prt().*fnRect->fnGetWidth)() - - (Frm().*fnRect->fnGetWidth)(); + (Frame().*fnRect->fnGetWidth)(); if( nDiff ) - (maFrm.*fnRect->fnAddRight)( nDiff ); + (maFrame.*fnRect->fnAddRight)( nDiff ); } //VarSize is always the height. @@ -2700,13 +2700,13 @@ void SwTabFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAtt //The width of the PrtArea is given by the FrameFormat, the borders have to //be set accordingly. //Minimum borders are determined depending on margins and shadows. - //The borders are adjusted so that the PrtArea is aligned into the Frm + //The borders are adjusted so that the PrtArea is aligned into the Frame //according to the adjustment. //If the adjustment is 0, the borders are set according to the border //attributes. const SwTwips nOldHeight = (Prt().*fnRect->fnGetHeight)(); - const SwTwips nMax = (maFrm.*fnRect->fnGetWidth)(); + const SwTwips nMax = (maFrame.*fnRect->fnGetWidth)(); // OD 14.03.2003 #i9040# - adjust variable names. const SwTwips nLeftLine = pAttrs->CalcLeftLine(); @@ -2715,7 +2715,7 @@ void SwTabFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAtt //The width possibly is a percentage value. If the table is inside //something else, the value applies to the surrounding. If it's the body //the value applies to the screen width in the BrowseView. - const SwFormatFrmSize &rSz = GetFormat()->GetFrmSize(); + const SwFormatFrameSize &rSz = GetFormat()->GetFrameSize(); // OD 14.03.2003 #i9040# - adjust variable name. const SwTwips nWishedTableWidth = CalcRel( rSz, true ); @@ -2876,15 +2876,15 @@ void SwTabFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAtt else (this->*fnRect->fnSetXMargins)( nLeftSpacing, nRightSpacing ); - SwViewShell *pSh = getRootFrm()->GetCurrShell(); + SwViewShell *pSh = getRootFrame()->GetCurrShell(); if ( bCheckBrowseWidth && pSh && pSh->GetViewOptions()->getBrowseMode() && - GetUpper()->IsPageBodyFrm() && // only PageBodyFrms and not ColBodyFrms + GetUpper()->IsPageBodyFrame() && // only PageBodyFrames and not ColBodyFrames pSh->VisArea().Width() ) { //Don't overlap the edge of the visible area. //The page width can be bigger because objects with - //"over-size" are possible (RootFrm::ImplCalcBrowseWidth()) + //"over-size" are possible (RootFrame::ImplCalcBrowseWidth()) long nWidth = pSh->GetBrowseWidth(); nWidth -= Prt().Left(); nWidth -= pAttrs->CalcRightLine(); @@ -2901,16 +2901,16 @@ void SwTabFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAtt //The size is defined by the content plus the borders. SwTwips nRemaining = 0, nDiff; - SwFrm *pFrm = m_pLower; - while ( pFrm ) + SwFrame *pFrame = m_pLower; + while ( pFrame ) { - nRemaining += (pFrm->Frm().*fnRect->fnGetHeight)(); - pFrm = pFrm->GetNext(); + nRemaining += (pFrame->Frame().*fnRect->fnGetHeight)(); + pFrame = pFrame->GetNext(); } //And now add the borders nRemaining += nUpper + nLower; - nDiff = (Frm().*fnRect->fnGetHeight)() - nRemaining; + nDiff = (Frame().*fnRect->fnGetHeight)() - nRemaining; if ( nDiff > 0 ) Shrink( nDiff ); else if ( nDiff < 0 ) @@ -2918,10 +2918,10 @@ void SwTabFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAtt } } -SwTwips SwTabFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo ) +SwTwips SwTabFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo ) { SWRECTFN( this ) - SwTwips nHeight =(Frm().*fnRect->fnGetHeight)(); + SwTwips nHeight =(Frame().*fnRect->fnGetHeight)(); if( nHeight > 0 && nDist > ( LONG_MAX - nHeight ) ) nDist = LONG_MAX - nHeight; @@ -2930,16 +2930,16 @@ SwTwips SwTabFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo ) if ( GetUpper() ) { - SwRect aOldFrm( Frm() ); + SwRect aOldFrame( Frame() ); //The upper only grows as far as needed. nReal provides the distance //which is already available. SwTwips nReal = (GetUpper()->Prt().*fnRect->fnGetHeight)(); - SwFrm *pFrm = GetUpper()->Lower(); - while ( pFrm && GetFollow() != pFrm ) + SwFrame *pFrame = GetUpper()->Lower(); + while ( pFrame && GetFollow() != pFrame ) { - nReal -= (pFrm->Frm().*fnRect->fnGetHeight)(); - pFrm = pFrm->GetNext(); + nReal -= (pFrame->Frame().*fnRect->fnGetHeight)(); + pFrame = pFrame->GetNext(); } if ( nReal < nDist ) @@ -2955,24 +2955,24 @@ SwTwips SwTabFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo ) if ( !bTst ) { - (Frm().*fnRect->fnAddBottom)( nDist ); + (Frame().*fnRect->fnAddBottom)( nDist ); - SwRootFrm *pRootFrm = getRootFrm(); - if( pRootFrm && pRootFrm->IsAnyShellAccessible() && - pRootFrm->GetCurrShell() ) + SwRootFrame *pRootFrame = getRootFrame(); + if( pRootFrame && pRootFrame->IsAnyShellAccessible() && + pRootFrame->GetCurrShell() ) { - pRootFrm->GetCurrShell()->Imp()->MoveAccessibleFrm( this, aOldFrm ); + pRootFrame->GetCurrShell()->Imp()->MoveAccessibleFrame( this, aOldFrame ); } } } if ( !bTst && ( nDist || IsRestrictTableGrowth() ) ) { - SwPageFrm *pPage = FindPageFrm(); + SwPageFrame *pPage = FindPageFrame(); if ( GetNext() ) { GetNext()->_InvalidatePos(); - if ( GetNext()->IsContentFrm() ) + if ( GetNext()->IsContentFrame() ) GetNext()->InvalidatePage( pPage ); } // #i28701# - Due to the new object positioning the @@ -2997,7 +2997,7 @@ SwTwips SwTabFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo ) return nDist; } -void SwTabFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) +void SwTabFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) { sal_uInt8 nInvFlags = 0; bool bAttrSetChg = pNew && RES_ATTRSET_CHG == pNew->Which(); @@ -3019,26 +3019,26 @@ void SwTabFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) aOIter.NextItem(); } if ( aOldSet.Count() || aNewSet.Count() ) - SwLayoutFrm::Modify( &aOldSet, &aNewSet ); + SwLayoutFrame::Modify( &aOldSet, &aNewSet ); } else _UpdateAttr( pOld, pNew, nInvFlags ); if ( nInvFlags != 0 ) { - SwPageFrm *pPage = FindPageFrm(); + SwPageFrame *pPage = FindPageFrame(); InvalidatePage( pPage ); if ( nInvFlags & 0x02 ) _InvalidatePrt(); if ( nInvFlags & 0x40 ) _InvalidatePos(); - SwFrm *pTmp; + SwFrame *pTmp; if ( nullptr != (pTmp = GetIndNext()) ) { if ( nInvFlags & 0x04 ) { pTmp->_InvalidatePrt(); - if ( pTmp->IsContentFrm() ) + if ( pTmp->IsContentFrame() ) pTmp->InvalidatePage( pPage ); } if ( nInvFlags & 0x10 ) @@ -3047,20 +3047,20 @@ void SwTabFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) if ( nInvFlags & 0x08 && nullptr != (pTmp = GetPrev()) ) { pTmp->_InvalidatePrt(); - if ( pTmp->IsContentFrm() ) + if ( pTmp->IsContentFrame() ) pTmp->InvalidatePage( pPage ); } if ( nInvFlags & 0x20 ) { if ( pPage && pPage->GetUpper() && !IsFollow() ) - static_cast<SwRootFrm*>(pPage->GetUpper())->InvalidateBrowseWidth(); + static_cast<SwRootFrame*>(pPage->GetUpper())->InvalidateBrowseWidth(); } if ( nInvFlags & 0x80 ) InvalidateNextPos(); } } -void SwTabFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew, +void SwTabFrame::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew, sal_uInt8 &rInvFlags, SwAttrSetChg *pOldSet, SwAttrSetChg *pNewSet ) { @@ -3072,11 +3072,11 @@ void SwTabFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew, if ( IsFollow() ) { // Delete remaining headlines: - SwRowFrm* pLowerRow = nullptr; - while ( nullptr != ( pLowerRow = static_cast<SwRowFrm*>(Lower()) ) && pLowerRow->IsRepeatedHeadline() ) + SwRowFrame* pLowerRow = nullptr; + while ( nullptr != ( pLowerRow = static_cast<SwRowFrame*>(Lower()) ) && pLowerRow->IsRepeatedHeadline() ) { pLowerRow->Cut(); - SwFrm::DestroyFrm(pLowerRow); + SwFrame::DestroyFrame(pLowerRow); } // insert new headlines @@ -3084,7 +3084,7 @@ void SwTabFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew, for ( sal_uInt16 nIdx = 0; nIdx < nNewRepeat; ++nIdx ) { bDontCreateObjects = true; //frmtool - SwRowFrm* pHeadline = new SwRowFrm( *GetTable()->GetTabLines()[ nIdx ], this ); + SwRowFrame* pHeadline = new SwRowFrame( *GetTable()->GetTabLines()[ nIdx ], this ); pHeadline->SetRepeatedHeadline( true ); bDontCreateObjects = false; pHeadline->Paste( this, pLowerRow ); @@ -3102,14 +3102,14 @@ void SwTabFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew, if ( IsInDocBody() ) { rInvFlags |= 0x40; - SwPageFrm *pPage = FindPageFrm(); + SwPageFrame *pPage = FindPageFrame(); if (pPage) { if ( !GetPrev() ) CheckPageDescs( pPage ); if (GetFormat()->GetPageDesc().GetNumOffset()) - static_cast<SwRootFrm*>(pPage->GetUpper())->SetVirtPageNum( true ); - SwDocPosUpdate aMsgHint( pPage->Frm().Top() ); + static_cast<SwRootFrame*>(pPage->GetUpper())->SetVirtPageNum( true ); + SwDocPosUpdate aMsgHint( pPage->Frame().Top() ); GetFormat()->GetDoc()->getIDocumentFieldsAccess().UpdatePageFields( &aMsgHint ); } } @@ -3148,16 +3148,16 @@ void SwTabFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew, pNewSet->ClearItem( nWhich ); } else - SwLayoutFrm::Modify( pOld, pNew ); + SwLayoutFrame::Modify( pOld, pNew ); } } -bool SwTabFrm::GetInfo( SfxPoolItem &rHint ) const +bool SwTabFrame::GetInfo( SfxPoolItem &rHint ) const { if ( RES_VIRTPAGENUM_INFO == rHint.Which() && IsInDocBody() && !IsFollow() ) { SwVirtPageNumInfo &rInfo = static_cast<SwVirtPageNumInfo&>(rHint); - const SwPageFrm *pPage = FindPageFrm(); + const SwPageFrame *pPage = FindPageFrame(); if ( pPage ) { if ( pPage == rInfo.GetOrigPage() && !GetPrev() ) @@ -3178,19 +3178,19 @@ bool SwTabFrm::GetInfo( SfxPoolItem &rHint ) const return true; } -SwContentFrm *SwTabFrm::FindLastContent() +SwContentFrame *SwTabFrame::FindLastContent() { - SwFrm *pRet = m_pLower; + SwFrame *pRet = m_pLower; - while ( pRet && !pRet->IsContentFrm() ) + while ( pRet && !pRet->IsContentFrame() ) { - SwFrm *pOld = pRet; + SwFrame *pOld = pRet; - SwFrm *pTmp = pRet; // To skip empty section frames + SwFrame *pTmp = pRet; // To skip empty section frames while ( pRet->GetNext() ) { pRet = pRet->GetNext(); - if( !pRet->IsSctFrm() || static_cast<SwSectionFrm*>(pRet)->GetSection() ) + if( !pRet->IsSctFrame() || static_cast<SwSectionFrame*>(pRet)->GetSection() ) pTmp = pRet; } pRet = pTmp; @@ -3201,31 +3201,31 @@ SwContentFrm *SwTabFrm::FindLastContent() { // Check all other columns if there is a column based section with // an empty last column at the end of the last line - this is done - // by SwSectionFrm::FindLastContent - if( pRet->IsColBodyFrm() ) + // by SwSectionFrame::FindLastContent + if( pRet->IsColBodyFrame() ) { #if OSL_DEBUG_LEVEL > 0 - SwSectionFrm* pSect = pRet->FindSctFrm(); + SwSectionFrame* pSect = pRet->FindSctFrame(); OSL_ENSURE( pSect, "Where does this column come fron?"); OSL_ENSURE( IsAnLower( pSect ), "Splited cell?" ); #endif - return pRet->FindSctFrm()->FindLastContent(); + return pRet->FindSctFrame()->FindLastContent(); } // pRet may be a cell frame without a lower (cell has been split). // We have to find the last content the hard way: - OSL_ENSURE( pRet->IsCellFrm(), "SwTabFrm::FindLastContent failed" ); - const SwFrm* pRow = pRet->GetUpper(); - while ( pRow && !pRow->GetUpper()->IsTabFrm() ) + OSL_ENSURE( pRet->IsCellFrame(), "SwTabFrame::FindLastContent failed" ); + const SwFrame* pRow = pRet->GetUpper(); + while ( pRow && !pRow->GetUpper()->IsTabFrame() ) pRow = pRow->GetUpper(); - const SwContentFrm* pContentFrm = pRow ? static_cast<const SwLayoutFrm*>(pRow)->ContainsContent() : nullptr; + const SwContentFrame* pContentFrame = pRow ? static_cast<const SwLayoutFrame*>(pRow)->ContainsContent() : nullptr; pRet = nullptr; - while ( pContentFrm && static_cast<const SwLayoutFrm*>(pRow)->IsAnLower( pContentFrm ) ) + while ( pContentFrame && static_cast<const SwLayoutFrame*>(pRow)->IsAnLower( pContentFrame ) ) { - pRet = const_cast<SwContentFrm*>(pContentFrm); - pContentFrm = pContentFrm->GetNextContentFrm(); + pRet = const_cast<SwContentFrame*>(pContentFrame); + pContentFrame = pContentFrame->GetNextContentFrame(); } } } @@ -3240,40 +3240,40 @@ SwContentFrm *SwTabFrm::FindLastContent() while ( pRet->GetNext() ) pRet = pRet->GetNext(); - if( pRet->IsSctFrm() ) - pRet = static_cast<SwSectionFrm*>(pRet)->FindLastContent(); + if( pRet->IsSctFrame() ) + pRet = static_cast<SwSectionFrame*>(pRet)->FindLastContent(); } - return static_cast<SwContentFrm*>(pRet); + return static_cast<SwContentFrame*>(pRet); } /// Return value defines if the frm needs to be relocated -bool SwTabFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, bool, bool &rReformat ) +bool SwTabFrame::ShouldBwdMoved( SwLayoutFrame *pNewUpper, bool, bool &rReformat ) { rReformat = false; - if ( (SwFlowFrm::IsMoveBwdJump() || !IsPrevObjMove()) ) + if ( (SwFlowFrame::IsMoveBwdJump() || !IsPrevObjMove()) ) { - //Floating back Frm's is quite time consuming unfortunately. - //Most often the location where the Frm wants to float to has the same - //FixSize as the Frm itself. In such a situation it's easy to check if - //the Frm will find enough space for its VarSize, if this is not the + //Floating back Frame's is quite time consuming unfortunately. + //Most often the location where the Frame wants to float to has the same + //FixSize as the Frame itself. In such a situation it's easy to check if + //the Frame will find enough space for its VarSize, if this is not the //case, the relocation can be skipped. - //Checking if the Frm will find enough space is done by the Frm itself, - //this also takes the possibility of splitting the Frm into account. + //Checking if the Frame will find enough space is done by the Frame itself, + //this also takes the possibility of splitting the Frame into account. //If the FixSize is different or Flys are involved (at the old or the - //new position) the whole checks don't make sense at all, the Frm then + //new position) the whole checks don't make sense at all, the Frame then //needs to be relocated tentatively (if a bit of space is available). //The FixSize of the surrounding which contain tables is always the //width. - SwPageFrm *pOldPage = FindPageFrm(), - *pNewPage = pNewUpper->FindPageFrm(); + SwPageFrame *pOldPage = FindPageFrame(), + *pNewPage = pNewUpper->FindPageFrame(); bool bMoveAnyway = false; SwTwips nSpace = 0; SWRECTFN( this ) - if ( !SwFlowFrm::IsMoveBwdJump() ) + if ( !SwFlowFrame::IsMoveBwdJump() ) { long nOldWidth = (GetUpper()->Prt().*fnRect->fnGetWidth)(); @@ -3281,16 +3281,16 @@ bool SwTabFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, bool, bool &rReformat ) long nNewWidth = (pNewUpper->Prt().*fnRectX->fnGetWidth)(); if( std::abs( nNewWidth - nOldWidth ) < 2 ) { - if( !( bMoveAnyway = (BwdMoveNecessary( pOldPage, Frm() ) > 1) ) ) + if( !( bMoveAnyway = (BwdMoveNecessary( pOldPage, Frame() ) > 1) ) ) { SwRect aRect( pNewUpper->Prt() ); - aRect.Pos() += pNewUpper->Frm().Pos(); - const SwFrm *pPrevFrm = pNewUpper->Lower(); - while ( pPrevFrm && pPrevFrm != this ) + aRect.Pos() += pNewUpper->Frame().Pos(); + const SwFrame *pPrevFrame = pNewUpper->Lower(); + while ( pPrevFrame && pPrevFrame != this ) { - (aRect.*fnRectX->fnSetTop)( (pPrevFrm->Frm().*fnRectX-> + (aRect.*fnRectX->fnSetTop)( (pPrevFrame->Frame().*fnRectX-> fnGetBottom)() ); - pPrevFrm = pPrevFrm->GetNext(); + pPrevFrame = pPrevFrame->GetNext(); } bMoveAnyway = BwdMoveNecessary( pNewPage, aRect) > 1; @@ -3305,7 +3305,7 @@ bool SwTabFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, bool, bool &rReformat ) if ( (pNewUpper->Prt().*fnRectX->fnGetHeight)() > 0 || nTmpSpace <= 0 ) nSpace = nTmpSpace; - const SwViewShell *pSh = getRootFrm()->GetCurrShell(); + const SwViewShell *pSh = getRootFrame()->GetCurrShell(); if( pSh && pSh->GetViewOptions()->getBrowseMode() ) nSpace += pNewUpper->Grow( LONG_MAX, true ); } @@ -3326,9 +3326,9 @@ bool SwTabFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, bool, bool &rReformat ) // #i26945# - check, if follow flow line // contains frame, which are moved forward due to its object // positioning. - SwRowFrm* pFirstRow = GetFirstNonHeadlineRow(); + SwRowFrame* pFirstRow = GetFirstNonHeadlineRow(); if ( pFirstRow && pFirstRow->IsInFollowFlowRow() && - SwLayouter::DoesRowContainMovedFwdFrm( + SwLayouter::DoesRowContainMovedFwdFrame( *(pFirstRow->GetFormat()->GetDoc()), *(pFirstRow) ) ) { @@ -3346,24 +3346,24 @@ bool SwTabFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, bool, bool &rReformat ) return false; } -void SwTabFrm::Cut() +void SwTabFrame::Cut() { OSL_ENSURE( GetUpper(), "Cut ohne Upper()." ); - SwPageFrm *pPage = FindPageFrm(); + SwPageFrame *pPage = FindPageFrame(); InvalidatePage( pPage ); - SwFrm *pFrm = GetNext(); - if( pFrm ) + SwFrame *pFrame = GetNext(); + if( pFrame ) { //The old follower eventually calculated a margin to the predecessor //which is obsolete now as it became the first one - pFrm->_InvalidatePrt(); - pFrm->_InvalidatePos(); - if ( pFrm->IsContentFrm() ) - pFrm->InvalidatePage( pPage ); + pFrame->_InvalidatePrt(); + pFrame->_InvalidatePos(); + if ( pFrame->IsContentFrame() ) + pFrame->InvalidatePage( pPage ); if( IsInSct() && !GetPrev() ) { - SwSectionFrm* pSct = FindSctFrm(); + SwSectionFrame* pSct = FindSctFrame(); if( !pSct->IsFollow() ) { pSct->_InvalidatePrt(); @@ -3375,22 +3375,22 @@ void SwTabFrm::Cut() { InvalidateNextPos(); //Someone has to do the retouch: predecessor or upper - if ( nullptr != (pFrm = GetPrev()) ) - { pFrm->SetRetouche(); - pFrm->Prepare( PREP_WIDOWS_ORPHANS ); - pFrm->_InvalidatePos(); - if ( pFrm->IsContentFrm() ) - pFrm->InvalidatePage( pPage ); - } - //If I am (was) the only FlowFrm in my own upper, it has to do + if ( nullptr != (pFrame = GetPrev()) ) + { pFrame->SetRetouche(); + pFrame->Prepare( PREP_WIDOWS_ORPHANS ); + pFrame->_InvalidatePos(); + if ( pFrame->IsContentFrame() ) + pFrame->InvalidatePage( pPage ); + } + //If I am (was) the only FlowFrame in my own upper, it has to do //the retouch. Moreover it has to do the retouch. else - { SwRootFrm *pRoot = static_cast<SwRootFrm*>(pPage->GetUpper()); + { SwRootFrame *pRoot = static_cast<SwRootFrame*>(pPage->GetUpper()); pRoot->SetSuperfluous(); GetUpper()->SetCompletePaint(); if( IsInSct() ) { - SwSectionFrm* pSct = FindSctFrm(); + SwSectionFrame* pSct = FindSctFrame(); if( !pSct->IsFollow() ) { pSct->_InvalidatePrt(); @@ -3401,17 +3401,17 @@ void SwTabFrm::Cut() } //First remove, then shrink the upper. - SwLayoutFrm *pUp = GetUpper(); + SwLayoutFrame *pUp = GetUpper(); SWRECTFN( this ) RemoveFromLayout(); if ( pUp ) { - OSL_ENSURE( !pUp->IsFootnoteFrm(), "Table in Footnote." ); - SwSectionFrm *pSct = nullptr; + OSL_ENSURE( !pUp->IsFootnoteFrame(), "Table in Footnote." ); + SwSectionFrame *pSct = nullptr; // #126020# - adjust check for empty section // #130797# - correct fix #126020# if ( !pUp->Lower() && pUp->IsInSct() && - !(pSct = pUp->FindSctFrm())->ContainsContent() && + !(pSct = pUp->FindSctFrame())->ContainsContent() && !pSct->ContainsAny( true ) ) { if ( pUp->GetUpper() ) @@ -3420,59 +3420,59 @@ void SwTabFrm::Cut() pSct->_InvalidateSize(); } } - else if( (Frm().*fnRect->fnGetHeight)() ) + else if( (Frame().*fnRect->fnGetHeight)() ) { // OD 26.08.2003 #i18103# - *no* 'ColUnlock' of section - // undo changes of fix for #104992# - pUp->Shrink( Frm().Height() ); + pUp->Shrink( Frame().Height() ); } } if ( pPage && !IsFollow() && pPage->GetUpper() ) - static_cast<SwRootFrm*>(pPage->GetUpper())->InvalidateBrowseWidth(); + static_cast<SwRootFrame*>(pPage->GetUpper())->InvalidateBrowseWidth(); } -void SwTabFrm::Paste( SwFrm* pParent, SwFrm* pSibling ) +void SwTabFrame::Paste( SwFrame* pParent, SwFrame* pSibling ) { OSL_ENSURE( pParent, "No parent for pasting." ); - OSL_ENSURE( pParent->IsLayoutFrm(), "Parent is ContentFrm." ); + OSL_ENSURE( pParent->IsLayoutFrame(), "Parent is ContentFrame." ); OSL_ENSURE( pParent != this, "I'm the parent myself." ); OSL_ENSURE( pSibling != this, "I'm my own neighbour." ); OSL_ENSURE( !GetPrev() && !GetNext() && !GetUpper(), "I'm still registred somewhere." ); //Insert in the tree. - InsertBefore( static_cast<SwLayoutFrm*>(pParent), pSibling ); + InsertBefore( static_cast<SwLayoutFrame*>(pParent), pSibling ); _InvalidateAll(); - SwPageFrm *pPage = FindPageFrm(); + SwPageFrame *pPage = FindPageFrame(); InvalidatePage( pPage ); if ( GetNext() ) { GetNext()->_InvalidatePos(); GetNext()->_InvalidatePrt(); - if ( GetNext()->IsContentFrm() ) + if ( GetNext()->IsContentFrame() ) GetNext()->InvalidatePage( pPage ); } SWRECTFN( this ) - if( (Frm().*fnRect->fnGetHeight)() ) - pParent->Grow( (Frm().*fnRect->fnGetHeight)() ); + if( (Frame().*fnRect->fnGetHeight)() ) + pParent->Grow( (Frame().*fnRect->fnGetHeight)() ); - if( (Frm().*fnRect->fnGetWidth)() != (pParent->Prt().*fnRect->fnGetWidth)() ) + if( (Frame().*fnRect->fnGetWidth)() != (pParent->Prt().*fnRect->fnGetWidth)() ) Prepare( PREP_FIXSIZE_CHG ); if ( GetPrev() ) { if ( !IsFollow() ) { GetPrev()->InvalidateSize(); - if ( GetPrev()->IsContentFrm() ) + if ( GetPrev()->IsContentFrame() ) GetPrev()->InvalidatePage( pPage ); } } else if ( GetNext() ) - //Take the marging into account when dealing with ContentFrm's. There are + //Take the marging into account when dealing with ContentFrame's. There are //two situations (both always happen at once): //a) The Content becomes the first in a chain //b) The new follower was the first in a chain before @@ -3481,7 +3481,7 @@ void SwTabFrm::Paste( SwFrm* pParent, SwFrm* pSibling ) if ( pPage && !IsFollow() ) { if ( pPage->GetUpper() ) - static_cast<SwRootFrm*>(pPage->GetUpper())->InvalidateBrowseWidth(); + static_cast<SwRootFrame*>(pPage->GetUpper())->InvalidateBrowseWidth(); if ( !GetPrev() )//At least needed for HTML with a table at the beginning. { @@ -3493,15 +3493,15 @@ void SwTabFrm::Paste( SwFrm* pParent, SwFrm* pSibling ) } } -bool SwTabFrm::Prepare( const PrepareHint eHint, const void *, bool ) +bool SwTabFrame::Prepare( const PrepareHint eHint, const void *, bool ) { if( PREP_BOSS_CHGD == eHint ) CheckDirChange(); return false; } -SwRowFrm::SwRowFrm(const SwTableLine &rLine, SwFrm* pSib, bool bInsertContent) - : SwLayoutFrm( rLine.GetFrameFormat(), pSib ) +SwRowFrame::SwRowFrame(const SwTableLine &rLine, SwFrame* pSib, bool bInsertContent) + : SwLayoutFrame( rLine.GetFrameFormat(), pSib ) , m_pTabLine( &rLine ) , m_pFollowRow( nullptr ) // #i29550# @@ -3514,20 +3514,20 @@ SwRowFrm::SwRowFrm(const SwTableLine &rLine, SwFrm* pSib, bool bInsertContent) , m_bIsRepeatedHeadline( false ) , m_bIsRowSpanLine( false ) { - mnFrmType = FRM_ROW; + mnFrameType = FRM_ROW; //Create the boxes and insert them. const SwTableBoxes &rBoxes = rLine.GetTabBoxes(); - SwFrm *pTmpPrev = nullptr; + SwFrame *pTmpPrev = nullptr; for ( size_t i = 0; i < rBoxes.size(); ++i ) { - SwCellFrm *pNew = new SwCellFrm( *rBoxes[i], this, bInsertContent ); + SwCellFrame *pNew = new SwCellFrame( *rBoxes[i], this, bInsertContent ); pNew->InsertBehind( this, pTmpPrev ); pTmpPrev = pNew; } } -void SwRowFrm::DestroyImpl() +void SwRowFrame::DestroyImpl() { SwModify* pMod = GetFormat(); if( pMod ) @@ -3537,19 +3537,19 @@ void SwRowFrm::DestroyImpl() delete pMod; // and delete } - SwLayoutFrm::DestroyImpl(); + SwLayoutFrame::DestroyImpl(); } -SwRowFrm::~SwRowFrm() +SwRowFrame::~SwRowFrame() { } -void SwRowFrm::RegistFlys( SwPageFrm *pPage ) +void SwRowFrame::RegistFlys( SwPageFrame *pPage ) { - ::RegistFlys( pPage ? pPage : FindPageFrm(), this ); + ::RegistFlys( pPage ? pPage : FindPageFrame(), this ); } -void SwRowFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) +void SwRowFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) { bool bAttrSetChg = pNew && RES_ATTRSET_CHG == pNew->Which(); const SfxPoolItem *pItem = nullptr; @@ -3566,7 +3566,7 @@ void SwRowFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) if ( pItem ) { - SwTabFrm *pTab = FindTabFrm(); + SwTabFrame *pTab = FindTabFrame(); if ( pTab ) { const bool bInFirstNonHeadlineRow = pTab->IsFollow() && @@ -3582,44 +3582,44 @@ void SwRowFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) } } - SwLayoutFrm::Modify( pOld, pNew ); + SwLayoutFrame::Modify( pOld, pNew ); } -void SwRowFrm::MakeAll(vcl::RenderContext* pRenderContext) +void SwRowFrame::MakeAll(vcl::RenderContext* pRenderContext) { if ( !GetNext() ) mbValidSize = false; - SwLayoutFrm::MakeAll(pRenderContext); + SwLayoutFrame::MakeAll(pRenderContext); } -long CalcHeightWithFlys( const SwFrm *pFrm ) +long CalcHeightWithFlys( const SwFrame *pFrame ) { - SWRECTFN( pFrm ) + SWRECTFN( pFrame ) long nHeight = 0; - const SwFrm* pTmp = pFrm->IsSctFrm() ? - static_cast<const SwSectionFrm*>(pFrm)->ContainsContent() : pFrm; + const SwFrame* pTmp = pFrame->IsSctFrame() ? + static_cast<const SwSectionFrame*>(pFrame)->ContainsContent() : pFrame; while( pTmp ) { // #i26945# - consider follow text frames const SwSortedObjs* pObjs( nullptr ); bool bIsFollow( false ); - if ( pTmp->IsTextFrm() && static_cast<const SwTextFrm*>(pTmp)->IsFollow() ) + if ( pTmp->IsTextFrame() && static_cast<const SwTextFrame*>(pTmp)->IsFollow() ) { - const SwFrm* pMaster; + const SwFrame* pMaster; // #i46450# Master does not necessarily have - // to exist if this function is called from JoinFrm() -> + // to exist if this function is called from JoinFrame() -> // Cut() -> Shrink() - const SwTextFrm* pTmpFrm = static_cast<const SwTextFrm*>(pTmp); - if ( pTmpFrm->GetPrev() && pTmpFrm->GetPrev()->IsTextFrm() && - static_cast<const SwTextFrm*>(pTmpFrm->GetPrev())->GetFollow() && - static_cast<const SwTextFrm*>(pTmpFrm->GetPrev())->GetFollow() != pTmp ) + const SwTextFrame* pTmpFrame = static_cast<const SwTextFrame*>(pTmp); + if ( pTmpFrame->GetPrev() && pTmpFrame->GetPrev()->IsTextFrame() && + static_cast<const SwTextFrame*>(pTmpFrame->GetPrev())->GetFollow() && + static_cast<const SwTextFrame*>(pTmpFrame->GetPrev())->GetFollow() != pTmp ) pMaster = nullptr; else - pMaster = pTmpFrm->FindMaster(); + pMaster = pTmpFrame->FindMaster(); if ( pMaster ) { - pObjs = static_cast<const SwTextFrm*>(pTmp)->FindMaster()->GetDrawObjs(); + pObjs = static_cast<const SwTextFrame*>(pTmp)->FindMaster()->GetDrawObjs(); bIsFollow = true; } } @@ -3635,7 +3635,7 @@ long CalcHeightWithFlys( const SwFrm *pFrm ) // #i26945# - if <pTmp> is follow, the // anchor character frame has to be <pTmp>. if ( bIsFollow && - const_cast<SwAnchoredObject*>(pAnchoredObj)->FindAnchorCharFrm() != pTmp ) + const_cast<SwAnchoredObject*>(pAnchoredObj)->FindAnchorCharFrame() != pTmp ) { continue; } @@ -3648,10 +3648,10 @@ long CalcHeightWithFlys( const SwFrm *pFrm ) (rFrameFormat.GetAnchor().GetAnchorId() != FLY_AS_CHAR) && pAnchoredObj->GetObjRect().Top() != FAR_AWAY && rFrameFormat.GetFollowTextFlow().GetValue() && - pAnchoredObj->GetPageFrm() == pTmp->FindPageFrm(); + pAnchoredObj->GetPageFrame() == pTmp->FindPageFrame(); if ( bConsiderObj ) { - const SwFormatFrmSize &rSz = rFrameFormat.GetFrmSize(); + const SwFormatFrameSize &rSz = rFrameFormat.GetFrameSize(); if( !rSz.GetHeightPercent() ) { const SwTwips nDistOfFlyBottomToAnchorTop = @@ -3660,24 +3660,24 @@ long CalcHeightWithFlys( const SwFrm *pFrm ) pAnchoredObj->GetCurrRelPos().X() : pAnchoredObj->GetCurrRelPos().Y() ); - const SwTwips nFrmDiff = + const SwTwips nFrameDiff = (*fnRect->fnYDiff)( - (pTmp->Frm().*fnRect->fnGetTop)(), - (pFrm->Frm().*fnRect->fnGetTop)() ); + (pTmp->Frame().*fnRect->fnGetTop)(), + (pFrame->Frame().*fnRect->fnGetTop)() ); - nHeight = std::max( nHeight, nDistOfFlyBottomToAnchorTop + nFrmDiff - - (pFrm->Frm().*fnRect->fnGetHeight)() ); + nHeight = std::max( nHeight, nDistOfFlyBottomToAnchorTop + nFrameDiff - + (pFrame->Frame().*fnRect->fnGetHeight)() ); // #i56115# The first height calculation - // gives wrong results if pFrm->Prt().Y() > 0. We do + // gives wrong results if pFrame->Prt().Y() > 0. We do // a second calculation based on the actual rectangles of - // pFrm and pAnchoredObj, and use the maximum of the results. + // pFrame and pAnchoredObj, and use the maximum of the results. // I do not want to remove the first calculation because // if clipping has been applied, using the GetCurrRelPos // might be the better option to calculate nHeight. const SwTwips nDistOfFlyBottomToAnchorTop2 = (*fnRect->fnYDiff)( (pAnchoredObj->GetObjRect().*fnRect->fnGetBottom)(), - (pFrm->Frm().*fnRect->fnGetBottom)() ); + (pFrame->Frame().*fnRect->fnGetBottom)() ); nHeight = std::max( nHeight, nDistOfFlyBottomToAnchorTop2 ); } @@ -3685,26 +3685,26 @@ long CalcHeightWithFlys( const SwFrm *pFrm ) } } } - if( !pFrm->IsSctFrm() ) + if( !pFrame->IsSctFrame() ) break; pTmp = pTmp->FindNextCnt(); - if( !static_cast<const SwSectionFrm*>(pFrm)->IsAnLower( pTmp ) ) + if( !static_cast<const SwSectionFrame*>(pFrame)->IsAnLower( pTmp ) ) break; } return nHeight; } -static SwTwips lcl_CalcTopAndBottomMargin( const SwLayoutFrm& rCell, const SwBorderAttrs& rAttrs ) +static SwTwips lcl_CalcTopAndBottomMargin( const SwLayoutFrame& rCell, const SwBorderAttrs& rAttrs ) { - const SwTabFrm* pTab = rCell.FindTabFrm(); + const SwTabFrame* pTab = rCell.FindTabFrame(); SwTwips nTopSpace = 0; SwTwips nBottomSpace = 0; // #i29550# - if ( pTab->IsCollapsingBorders() && rCell.Lower() && !rCell.Lower()->IsRowFrm() ) + if ( pTab->IsCollapsingBorders() && rCell.Lower() && !rCell.Lower()->IsRowFrame() ) { - nTopSpace = static_cast<const SwRowFrm*>(rCell.GetUpper())->GetTopMarginForLowers(); - nBottomSpace = static_cast<const SwRowFrm*>(rCell.GetUpper())->GetBottomMarginForLowers(); + nTopSpace = static_cast<const SwRowFrame*>(rCell.GetUpper())->GetTopMarginForLowers(); + nBottomSpace = static_cast<const SwRowFrame*>(rCell.GetUpper())->GetBottomMarginForLowers(); } else { @@ -3726,13 +3726,13 @@ static SwTwips lcl_CalcTopAndBottomMargin( const SwLayoutFrm& rCell, const SwBor // #i26945# - add parameter <_bConsiderObjs> in order to // control, if floating screen objects have to be considered for the minimal // cell height. -static SwTwips lcl_CalcMinCellHeight( const SwLayoutFrm *_pCell, +static SwTwips lcl_CalcMinCellHeight( const SwLayoutFrame *_pCell, const bool _bConsiderObjs, const SwBorderAttrs *pAttrs = nullptr ) { SWRECTFN( _pCell ) SwTwips nHeight = 0; - const SwFrm* pLow = _pCell->Lower(); + const SwFrame* pLow = _pCell->Lower(); if ( pLow ) { long nFlyAdd = 0; @@ -3740,15 +3740,15 @@ static SwTwips lcl_CalcMinCellHeight( const SwLayoutFrm *_pCell, { // OD 2004-02-18 #106629# - change condition and switch then-body // and else-body - if ( pLow->IsRowFrm() ) + if ( pLow->IsRowFrame() ) { // #i26945# - nHeight += ::lcl_CalcMinRowHeight( static_cast<const SwRowFrm*>(pLow), + nHeight += ::lcl_CalcMinRowHeight( static_cast<const SwRowFrame*>(pLow), _bConsiderObjs ); } else { - long nLowHeight = (pLow->Frm().*fnRect->fnGetHeight)(); + long nLowHeight = (pLow->Frame().*fnRect->fnGetHeight)(); nHeight += nLowHeight; // #i26945# if ( _bConsiderObjs ) @@ -3764,7 +3764,7 @@ static SwTwips lcl_CalcMinCellHeight( const SwLayoutFrm *_pCell, nHeight += nFlyAdd; } //The border needs to be considered too, unfortunately it can't be - //calculated using PrtArea and Frm because those can be invalid in arbitrary + //calculated using PrtArea and Frame because those can be invalid in arbitrary //combinations. if ( _pCell->Lower() ) { @@ -3772,7 +3772,7 @@ static SwTwips lcl_CalcMinCellHeight( const SwLayoutFrm *_pCell, nHeight += lcl_CalcTopAndBottomMargin( *_pCell, *pAttrs ); else { - SwBorderAttrAccess aAccess( SwFrm::GetCache(), _pCell ); + SwBorderAttrAccess aAccess( SwFrame::GetCache(), _pCell ); const SwBorderAttrs &rAttrs = *aAccess.Get(); nHeight += lcl_CalcTopAndBottomMargin( *_pCell, rAttrs ); } @@ -3783,12 +3783,12 @@ static SwTwips lcl_CalcMinCellHeight( const SwLayoutFrm *_pCell, // OD 2004-02-18 #106629# - correct type of 1st parameter // #i26945# - add parameter <_bConsiderObjs> in order to control, // if floating screen objects have to be considered for the minimal cell height -static SwTwips lcl_CalcMinRowHeight( const SwRowFrm* _pRow, +static SwTwips lcl_CalcMinRowHeight( const SwRowFrame* _pRow, const bool _bConsiderObjs ) { SWRECTFN( _pRow ) - const SwFormatFrmSize &rSz = _pRow->GetFormat()->GetFrmSize(); + const SwFormatFrameSize &rSz = _pRow->GetFormat()->GetFrameSize(); if ( _pRow->HasFixSize() && !_pRow->IsRowSpanLine() ) { @@ -3797,7 +3797,7 @@ static SwTwips lcl_CalcMinRowHeight( const SwRowFrm* _pRow, } SwTwips nHeight = 0; - const SwCellFrm* pLow = static_cast<const SwCellFrm*>(_pRow->Lower()); + const SwCellFrame* pLow = static_cast<const SwCellFrame*>(_pRow->Lower()); while ( pLow ) { SwTwips nTmp = 0; @@ -3816,12 +3816,12 @@ static SwTwips lcl_CalcMinRowHeight( const SwRowFrm* _pRow, // Height of the last cell of a row span is height of master cell // minus the height of the other rows which are covered by the master // cell: - const SwCellFrm& rMaster = pLow->FindStartEndOfRowSpanCell( true, true ); + const SwCellFrame& rMaster = pLow->FindStartEndOfRowSpanCell( true, true ); nTmp = ::lcl_CalcMinCellHeight( &rMaster, _bConsiderObjs ); - const SwFrm* pMasterRow = rMaster.GetUpper(); + const SwFrame* pMasterRow = rMaster.GetUpper(); while ( pMasterRow && pMasterRow != _pRow ) { - nTmp -= (pMasterRow->Frm().*fnRect->fnGetHeight)(); + nTmp -= (pMasterRow->Frame().*fnRect->fnGetHeight)(); pMasterRow = pMasterRow->GetNext(); } } @@ -3831,7 +3831,7 @@ static SwTwips lcl_CalcMinRowHeight( const SwRowFrm* _pRow, if ( pLow->IsVertical() == bVert && nTmp > nHeight ) nHeight = nTmp; - pLow = static_cast<const SwCellFrm*>(pLow->GetNext()); + pLow = static_cast<const SwCellFrame*>(pLow->GetNext()); } if ( rSz.GetHeightSizeType() == ATT_MIN_SIZE && !_pRow->IsRowSpanLine() ) nHeight = std::max( nHeight, rSz.GetHeight() ); @@ -3841,18 +3841,18 @@ static SwTwips lcl_CalcMinRowHeight( const SwRowFrm* _pRow, // #i29550# // Calculate the maximum of (TopLineSize + TopLineDist) over all lowers: -static sal_uInt16 lcl_GetTopSpace( const SwRowFrm& rRow ) +static sal_uInt16 lcl_GetTopSpace( const SwRowFrame& rRow ) { sal_uInt16 nTopSpace = 0; - for ( const SwCellFrm* pCurrLower = static_cast<const SwCellFrm*>(rRow.Lower()); pCurrLower; - pCurrLower = static_cast<const SwCellFrm*>(pCurrLower->GetNext()) ) + for ( const SwCellFrame* pCurrLower = static_cast<const SwCellFrame*>(rRow.Lower()); pCurrLower; + pCurrLower = static_cast<const SwCellFrame*>(pCurrLower->GetNext()) ) { sal_uInt16 nTmpTopSpace = 0; - if ( pCurrLower->Lower() && pCurrLower->Lower()->IsRowFrm() ) - nTmpTopSpace = lcl_GetTopSpace( *static_cast<const SwRowFrm*>(pCurrLower->Lower()) ); + if ( pCurrLower->Lower() && pCurrLower->Lower()->IsRowFrame() ) + nTmpTopSpace = lcl_GetTopSpace( *static_cast<const SwRowFrame*>(pCurrLower->Lower()) ); else { - const SwAttrSet& rSet = const_cast<SwCellFrm*>(pCurrLower)->GetFormat()->GetAttrSet(); + const SwAttrSet& rSet = const_cast<SwCellFrame*>(pCurrLower)->GetFormat()->GetAttrSet(); const SvxBoxItem& rBoxItem = rSet.GetBox(); nTmpTopSpace = rBoxItem.CalcLineSpace( SvxBoxItemLine::TOP, true ); } @@ -3862,18 +3862,18 @@ static sal_uInt16 lcl_GetTopSpace( const SwRowFrm& rRow ) } // Calculate the maximum of TopLineDist over all lowers: -static sal_uInt16 lcl_GetTopLineDist( const SwRowFrm& rRow ) +static sal_uInt16 lcl_GetTopLineDist( const SwRowFrame& rRow ) { sal_uInt16 nTopLineDist = 0; - for ( const SwCellFrm* pCurrLower = static_cast<const SwCellFrm*>(rRow.Lower()); pCurrLower; - pCurrLower = static_cast<const SwCellFrm*>(pCurrLower->GetNext()) ) + for ( const SwCellFrame* pCurrLower = static_cast<const SwCellFrame*>(rRow.Lower()); pCurrLower; + pCurrLower = static_cast<const SwCellFrame*>(pCurrLower->GetNext()) ) { sal_uInt16 nTmpTopLineDist = 0; - if ( pCurrLower->Lower() && pCurrLower->Lower()->IsRowFrm() ) - nTmpTopLineDist = lcl_GetTopLineDist( *static_cast<const SwRowFrm*>(pCurrLower->Lower()) ); + if ( pCurrLower->Lower() && pCurrLower->Lower()->IsRowFrame() ) + nTmpTopLineDist = lcl_GetTopLineDist( *static_cast<const SwRowFrame*>(pCurrLower->Lower()) ); else { - const SwAttrSet& rSet = const_cast<SwCellFrm*>(pCurrLower)->GetFormat()->GetAttrSet(); + const SwAttrSet& rSet = const_cast<SwCellFrame*>(pCurrLower)->GetFormat()->GetAttrSet(); const SvxBoxItem& rBoxItem = rSet.GetBox(); nTmpTopLineDist = rBoxItem.GetDistance( SvxBoxItemLine::TOP ); } @@ -3883,21 +3883,21 @@ static sal_uInt16 lcl_GetTopLineDist( const SwRowFrm& rRow ) } // Calculate the maximum of BottomLineSize over all lowers: -static sal_uInt16 lcl_GetBottomLineSize( const SwRowFrm& rRow ) +static sal_uInt16 lcl_GetBottomLineSize( const SwRowFrame& rRow ) { sal_uInt16 nBottomLineSize = 0; - for ( const SwCellFrm* pCurrLower = static_cast<const SwCellFrm*>(rRow.Lower()); pCurrLower; - pCurrLower = static_cast<const SwCellFrm*>(pCurrLower->GetNext()) ) + for ( const SwCellFrame* pCurrLower = static_cast<const SwCellFrame*>(rRow.Lower()); pCurrLower; + pCurrLower = static_cast<const SwCellFrame*>(pCurrLower->GetNext()) ) { sal_uInt16 nTmpBottomLineSize = 0; - if ( pCurrLower->Lower() && pCurrLower->Lower()->IsRowFrm() ) + if ( pCurrLower->Lower() && pCurrLower->Lower()->IsRowFrame() ) { - const SwFrm* pRow = pCurrLower->GetLastLower(); - nTmpBottomLineSize = lcl_GetBottomLineSize( *static_cast<const SwRowFrm*>(pRow) ); + const SwFrame* pRow = pCurrLower->GetLastLower(); + nTmpBottomLineSize = lcl_GetBottomLineSize( *static_cast<const SwRowFrame*>(pRow) ); } else { - const SwAttrSet& rSet = const_cast<SwCellFrm*>(pCurrLower)->GetFormat()->GetAttrSet(); + const SwAttrSet& rSet = const_cast<SwCellFrame*>(pCurrLower)->GetFormat()->GetAttrSet(); const SvxBoxItem& rBoxItem = rSet.GetBox(); nTmpBottomLineSize = rBoxItem.CalcLineSpace( SvxBoxItemLine::BOTTOM, true ) - rBoxItem.GetDistance( SvxBoxItemLine::BOTTOM ); @@ -3908,21 +3908,21 @@ static sal_uInt16 lcl_GetBottomLineSize( const SwRowFrm& rRow ) } // Calculate the maximum of BottomLineDist over all lowers: -static sal_uInt16 lcl_GetBottomLineDist( const SwRowFrm& rRow ) +static sal_uInt16 lcl_GetBottomLineDist( const SwRowFrame& rRow ) { sal_uInt16 nBottomLineDist = 0; - for ( const SwCellFrm* pCurrLower = static_cast<const SwCellFrm*>(rRow.Lower()); pCurrLower; - pCurrLower = static_cast<const SwCellFrm*>(pCurrLower->GetNext()) ) + for ( const SwCellFrame* pCurrLower = static_cast<const SwCellFrame*>(rRow.Lower()); pCurrLower; + pCurrLower = static_cast<const SwCellFrame*>(pCurrLower->GetNext()) ) { sal_uInt16 nTmpBottomLineDist = 0; - if ( pCurrLower->Lower() && pCurrLower->Lower()->IsRowFrm() ) + if ( pCurrLower->Lower() && pCurrLower->Lower()->IsRowFrame() ) { - const SwFrm* pRow = pCurrLower->GetLastLower(); - nTmpBottomLineDist = lcl_GetBottomLineDist( *static_cast<const SwRowFrm*>(pRow) ); + const SwFrame* pRow = pCurrLower->GetLastLower(); + nTmpBottomLineDist = lcl_GetBottomLineDist( *static_cast<const SwRowFrame*>(pRow) ); } else { - const SwAttrSet& rSet = const_cast<SwCellFrm*>(pCurrLower)->GetFormat()->GetAttrSet(); + const SwAttrSet& rSet = const_cast<SwCellFrame*>(pCurrLower)->GetFormat()->GetAttrSet(); const SvxBoxItem& rBoxItem = rSet.GetBox(); nTmpBottomLineDist = rBoxItem.GetDistance( SvxBoxItemLine::BOTTOM ); } @@ -3931,34 +3931,34 @@ static sal_uInt16 lcl_GetBottomLineDist( const SwRowFrm& rRow ) return nBottomLineDist; } -void SwRowFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttrs *pAttrs ) +void SwRowFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttrs *pAttrs ) { SWRECTFN( this ) - OSL_ENSURE( pAttrs, "SwRowFrm::Format without Attrs." ); + OSL_ENSURE( pAttrs, "SwRowFrame::Format without Attrs." ); const bool bFix = mbFixSize; if ( !mbValidPrtArea ) { - //RowFrms don't have borders and so on therefore the PrtArea always - //matches the Frm. + //RowFrames don't have borders and so on therefore the PrtArea always + //matches the Frame. mbValidPrtArea = true; maPrt.Left( 0 ); maPrt.Top( 0 ); - maPrt.Width ( maFrm.Width() ); - maPrt.Height( maFrm.Height() ); + maPrt.Width ( maFrame.Width() ); + maPrt.Height( maFrame.Height() ); // #i29550# // Here we calculate the top-printing area for the lower cell frames - SwTabFrm* pTabFrm = FindTabFrm(); - if ( pTabFrm->IsCollapsingBorders() ) + SwTabFrame* pTabFrame = FindTabFrame(); + if ( pTabFrame->IsCollapsingBorders() ) { const sal_uInt16 nTopSpace = lcl_GetTopSpace( *this ); const sal_uInt16 nTopLineDist = lcl_GetTopLineDist( *this ); const sal_uInt16 nBottomLineSize = lcl_GetBottomLineSize( *this ); const sal_uInt16 nBottomLineDist = lcl_GetBottomLineDist( *this ); - const SwRowFrm* pPreviousRow = nullptr; + const SwRowFrame* pPreviousRow = nullptr; // #i32456# // In order to calculate the top printing area for the lower cell @@ -3966,9 +3966,9 @@ void SwRowFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAtt // the bottom values of the 'previous' row with the 'top' values // of this row. The best way to find the 'previous' row is to // use the table structure: - const SwTable* pTable = pTabFrm->GetTable(); + const SwTable* pTable = pTabFrame->GetTable(); const SwTableLine* pPrevTabLine = nullptr; - const SwRowFrm* pTmpRow = this; + const SwRowFrame* pTmpRow = this; while ( pTmpRow && !pPrevTabLine ) { @@ -3990,8 +3990,8 @@ void SwRowFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAtt // pTmpRow is a first row in the table structure. // We go up in the table structure: pTmpRow = pTmpRow->GetUpper()->GetUpper() && - pTmpRow->GetUpper()->GetUpper()->IsRowFrm() ? - static_cast<const SwRowFrm*>( pTmpRow->GetUpper()->GetUpper() ) : + pTmpRow->GetUpper()->GetUpper()->IsRowFrame() ? + static_cast<const SwRowFrame*>( pTmpRow->GetUpper()->GetUpper() ) : nullptr; } } @@ -3999,8 +3999,8 @@ void SwRowFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAtt // If we found a 'previous' row, we look for the appropriate row frame: if ( pPrevTabLine ) { - SwIterator<SwRowFrm,SwFormat> aIter( *pPrevTabLine->GetFrameFormat() ); - for ( SwRowFrm* pRow = aIter.First(); pRow; pRow = aIter.Next() ) + SwIterator<SwRowFrame,SwFormat> aIter( *pPrevTabLine->GetFrameFormat() ); + for ( SwRowFrame* pRow = aIter.First(); pRow; pRow = aIter.Next() ) { // #115759# - do *not* take repeated // headlines, because during split of table it can be @@ -4025,7 +4025,7 @@ void SwRowFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAtt // table has to be notified if it has to change its lower // margin due to changes of nBottomLineSize: if ( !GetNext() && nBottomLineSize != GetBottomLineSize() ) - pTabFrm->_InvalidatePrt(); + pTabFrame->_InvalidatePrt(); // If there are rows nested inside this row, the nested rows // may not have been calculated yet. Therefore the @@ -4036,7 +4036,7 @@ void SwRowFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAtt // Note: If any further invalidations should be necessary, we // should consider moving the invalidation stuff to the // appropriate SwNotify object. - if ( GetUpper()->GetUpper()->IsRowFrm() && + if ( GetUpper()->GetUpper()->IsRowFrame() && ( nBottomLineDist != GetBottomMarginForLowers() || nTopPrtMargin != GetTopMarginForLowers() ) ) GetUpper()->GetUpper()->_InvalidateSize(); @@ -4055,16 +4055,16 @@ void SwRowFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAtt #if OSL_DEBUG_LEVEL > 0 if ( HasFixSize() ) { - const SwFormatFrmSize &rFrmSize = GetFormat()->GetFrmSize(); - OSL_ENSURE( rFrmSize.GetSize().Height() > 0, "Hat ihn" ); + const SwFormatFrameSize &rFrameSize = GetFormat()->GetFrameSize(); + OSL_ENSURE( rFrameSize.GetSize().Height() > 0, "Hat ihn" ); } #endif - const SwTwips nDiff = (Frm().*fnRect->fnGetHeight)() - + const SwTwips nDiff = (Frame().*fnRect->fnGetHeight)() - ( HasFixSize() && !IsRowSpanLine() ? pAttrs->GetSize().Height() // #i26945# : ::lcl_CalcMinRowHeight( this, - FindTabFrm()->IsConsiderObjsForMinCellHeight() ) ); + FindTabFrame()->IsConsiderObjsForMinCellHeight() ) ); if ( nDiff ) { mbFixSize = false; @@ -4081,9 +4081,9 @@ void SwRowFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAtt { //The last fills the remaining space in the upper. SwTwips nDiff = (GetUpper()->Prt().*fnRect->fnGetHeight)(); - SwFrm *pSibling = GetUpper()->Lower(); + SwFrame *pSibling = GetUpper()->Lower(); do - { nDiff -= (pSibling->Frm().*fnRect->fnGetHeight)(); + { nDiff -= (pSibling->Frame().*fnRect->fnGetHeight)(); pSibling = pSibling->GetNext(); } while ( pSibling ); if ( nDiff > 0 ) @@ -4096,20 +4096,20 @@ void SwRowFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAtt } } -void SwRowFrm::AdjustCells( const SwTwips nHeight, const bool bHeight ) +void SwRowFrame::AdjustCells( const SwTwips nHeight, const bool bHeight ) { - SwFrm *pFrm = Lower(); + SwFrame *pFrame = Lower(); if ( bHeight ) { - SwRootFrm *pRootFrm = getRootFrm(); + SwRootFrame *pRootFrame = getRootFrame(); SWRECTFN( this ) - SwRect aOldFrm; + SwRect aOldFrame; - while ( pFrm ) + while ( pFrame ) { - SwFrm* pNotify = nullptr; + SwFrame* pNotify = nullptr; - SwCellFrm* pCellFrm = static_cast<SwCellFrm*>(pFrm); + SwCellFrame* pCellFrame = static_cast<SwCellFrame*>(pFrame); // NEW TABLES // Which cells need to be adjusted if the current row changes @@ -4117,30 +4117,30 @@ void SwRowFrm::AdjustCells( const SwTwips nHeight, const bool bHeight ) // Current frame is a covered frame: // Set new height for covered cell and adjust master cell: - if ( pCellFrm->GetTabBox()->getRowSpan() < 1 ) + if ( pCellFrame->GetTabBox()->getRowSpan() < 1 ) { // Set height of current (covered) cell to new line height. - const long nDiff = nHeight - (pCellFrm->Frm().*fnRect->fnGetHeight)(); + const long nDiff = nHeight - (pCellFrame->Frame().*fnRect->fnGetHeight)(); if ( nDiff ) { - (pCellFrm->Frm().*fnRect->fnAddBottom)( nDiff ); - pCellFrm->_InvalidatePrt(); + (pCellFrame->Frame().*fnRect->fnAddBottom)( nDiff ); + pCellFrame->_InvalidatePrt(); } } - SwCellFrm* pToAdjust = nullptr; - SwFrm* pToAdjustRow = nullptr; + SwCellFrame* pToAdjust = nullptr; + SwFrame* pToAdjustRow = nullptr; // If current frame is covered frame, we still want to adjust the // height of the cell starting the row span - if ( pCellFrm->GetLayoutRowSpan() < 1 ) + if ( pCellFrame->GetLayoutRowSpan() < 1 ) { - pToAdjust = const_cast< SwCellFrm*>(&pCellFrm->FindStartEndOfRowSpanCell( true, true )); + pToAdjust = const_cast< SwCellFrame*>(&pCellFrame->FindStartEndOfRowSpanCell( true, true )); pToAdjustRow = pToAdjust->GetUpper(); } else { - pToAdjust = pCellFrm; + pToAdjust = pCellFrame; pToAdjustRow = this; } @@ -4152,7 +4152,7 @@ void SwRowFrm::AdjustCells( const SwTwips nHeight, const bool bHeight ) // Use new height for the current row: nSumRowHeight += pToAdjustRow == this ? nHeight : - (pToAdjustRow->Frm().*fnRect->fnGetHeight)(); + (pToAdjustRow->Frame().*fnRect->fnGetHeight)(); if ( nRowSpan-- == 1 ) break; @@ -4163,77 +4163,77 @@ void SwRowFrm::AdjustCells( const SwTwips nHeight, const bool bHeight ) if ( pToAdjustRow && pToAdjustRow != this ) pToAdjustRow->_InvalidateSize(); - const long nDiff = nSumRowHeight - (pToAdjust->Frm().*fnRect->fnGetHeight)(); + const long nDiff = nSumRowHeight - (pToAdjust->Frame().*fnRect->fnGetHeight)(); if ( nDiff ) { - aOldFrm = pToAdjust->Frm(); - (pToAdjust->Frm().*fnRect->fnAddBottom)( nDiff ); + aOldFrame = pToAdjust->Frame(); + (pToAdjust->Frame().*fnRect->fnAddBottom)( nDiff ); pNotify = pToAdjust; } if ( pNotify ) { - if( pRootFrm && pRootFrm->IsAnyShellAccessible() && pRootFrm->GetCurrShell() ) - pRootFrm->GetCurrShell()->Imp()->MoveAccessibleFrm( pNotify, aOldFrm ); + if( pRootFrame && pRootFrame->IsAnyShellAccessible() && pRootFrame->GetCurrShell() ) + pRootFrame->GetCurrShell()->Imp()->MoveAccessibleFrame( pNotify, aOldFrame ); pNotify->_InvalidatePrt(); } - pFrm = pFrm->GetNext(); + pFrame = pFrame->GetNext(); } } else - { while ( pFrm ) + { while ( pFrame ) { - pFrm->_InvalidateAll(); - pFrm = pFrm->GetNext(); + pFrame->_InvalidateAll(); + pFrame = pFrame->GetNext(); } } InvalidatePage(); } -void SwRowFrm::Cut() +void SwRowFrame::Cut() { - SwTabFrm *pTab = FindTabFrm(); + SwTabFrame *pTab = FindTabFrame(); if ( pTab && pTab->IsFollow() && this == pTab->GetFirstNonHeadlineRow() ) { pTab->FindMaster()->InvalidatePos(); } - SwLayoutFrm::Cut(); + SwLayoutFrame::Cut(); } -SwTwips SwRowFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo ) +SwTwips SwRowFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo ) { SwTwips nReal = 0; - SwTabFrm* pTab = FindTabFrm(); + SwTabFrame* pTab = FindTabFrame(); SWRECTFN( pTab ) bool bRestrictTableGrowth; bool bHasFollowFlowLine = pTab->HasFollowFlowLine(); - if ( GetUpper()->IsTabFrm() ) + if ( GetUpper()->IsTabFrame() ) { - const SwRowFrm* pFollowFlowRow = IsInSplitTableRow(); + const SwRowFrame* pFollowFlowRow = IsInSplitTableRow(); bRestrictTableGrowth = pFollowFlowRow && !pFollowFlowRow->IsRowSpanLine(); } else { - OSL_ENSURE( GetUpper()->IsCellFrm(), "RowFrm->GetUpper neither table nor cell" ); + OSL_ENSURE( GetUpper()->IsCellFrame(), "RowFrame->GetUpper neither table nor cell" ); bRestrictTableGrowth = GetFollowRow() && bHasFollowFlowLine; OSL_ENSURE( !bRestrictTableGrowth || !GetNext(), "GetFollowRow for row frame that has a Next" ); // There may still be some space left in my direct upper: const SwTwips nAdditionalSpace = - (Frm().*fnRect->fnBottomDist)( (GetUpper()->GetUpper()->*fnRect->fnGetPrtBottom)() ); + (Frame().*fnRect->fnBottomDist)( (GetUpper()->GetUpper()->*fnRect->fnGetPrtBottom)() ); if ( bRestrictTableGrowth && nAdditionalSpace > 0 ) { nReal = std::min( nAdditionalSpace, nDist ); nDist -= nReal; if ( !bTst ) - (Frm().*fnRect->fnAddBottom)( nReal ); + (Frame().*fnRect->fnAddBottom)( nReal ); } } @@ -4245,12 +4245,12 @@ SwTwips SwRowFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo ) // If the current row frame is inside another cell frame, // and the current row frame has no follow, it should not // be allowed to grow. In fact, setting bRestrictTableGrowth - // to 'false' does not work, because the surrounding RowFrm + // to 'false' does not work, because the surrounding RowFrame // would set this to 'true'. pTab->SetFollowFlowLine( false ); } - nReal += SwLayoutFrm::GrowFrm( nDist, bTst, bInfo); + nReal += SwLayoutFrame::GrowFrame( nDist, bTst, bInfo); pTab->SetRestrictTableGrowth( false ); pTab->SetFollowFlowLine( bHasFollowFlowLine ); @@ -4267,7 +4267,7 @@ SwTwips SwRowFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo ) return nReal; } -SwTwips SwRowFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo ) +SwTwips SwRowFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo ) { SWRECTFN( this ) if( HasFixSize() ) @@ -4276,14 +4276,14 @@ SwTwips SwRowFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo ) return 0L; } - // bInfo may be set to true by SwRowFrm::Format; we need to hangle this + // bInfo may be set to true by SwRowFrame::Format; we need to hangle this // here accordingly const bool bShrinkAnyway = bInfo; //Only shrink as much as the content of the biggest cell allows. SwTwips nRealDist = nDist; { - const SwFormatFrmSize &rSz = GetFormat()->GetFrmSize(); + const SwFormatFrameSize &rSz = GetFormat()->GetFrameSize(); SwTwips nMinHeight = rSz.GetHeightSizeType() == ATT_MIN_SIZE ? rSz.GetHeight() : 0; @@ -4291,16 +4291,16 @@ SwTwips SwRowFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo ) // Only necessary to calculate minimal row height if height // of pRow is at least nMinHeight. Otherwise nMinHeight is the // minimum height. - if( nMinHeight < (Frm().*fnRect->fnGetHeight)() ) + if( nMinHeight < (Frame().*fnRect->fnGetHeight)() ) { // #i26945# - OSL_ENSURE( FindTabFrm(), "<SwRowFrm::ShrinkFrm(..)> - no table frame -> crash." ); - const bool bConsiderObjs( FindTabFrm()->IsConsiderObjsForMinCellHeight() ); + OSL_ENSURE( FindTabFrame(), "<SwRowFrame::ShrinkFrame(..)> - no table frame -> crash." ); + const bool bConsiderObjs( FindTabFrame()->IsConsiderObjsForMinCellHeight() ); nMinHeight = lcl_CalcMinRowHeight( this, bConsiderObjs ); } - if ( ((Frm().*fnRect->fnGetHeight)() - nRealDist) < nMinHeight ) - nRealDist = (Frm().*fnRect->fnGetHeight)() - nMinHeight; + if ( ((Frame().*fnRect->fnGetHeight)() - nRealDist) < nMinHeight ) + nRealDist = (Frame().*fnRect->fnGetHeight)() - nMinHeight; } if ( nRealDist < 0 ) nRealDist = 0; @@ -4310,11 +4310,11 @@ SwTwips SwRowFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo ) { if ( !bTst ) { - SwTwips nHeight = (Frm().*fnRect->fnGetHeight)(); - (Frm().*fnRect->fnSetHeight)( nHeight - nReal ); + SwTwips nHeight = (Frame().*fnRect->fnGetHeight)(); + (Frame().*fnRect->fnSetHeight)( nHeight - nReal ); if( IsVertical() && !IsVertLR() && !bRev ) - Frm().Pos().X() += nReal; + Frame().Pos().X() += nReal; } SwTwips nTmp = GetUpper()->Shrink( nReal, bTst ); @@ -4325,11 +4325,11 @@ SwTwips SwRowFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo ) if ( !bTst ) { nReal -= nTmp; - SwTwips nHeight = (Frm().*fnRect->fnGetHeight)(); - (Frm().*fnRect->fnSetHeight)( nHeight + nReal ); + SwTwips nHeight = (Frame().*fnRect->fnGetHeight)(); + (Frame().*fnRect->fnSetHeight)( nHeight + nReal ); if( IsVertical() && !IsVertLR() && !bRev ) - Frm().Pos().X() -= nReal; + Frame().Pos().X() -= nReal; } nReal = nTmp; } @@ -4345,13 +4345,13 @@ SwTwips SwRowFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo ) _InvalidateAll(); SetCompletePaint(); - SwTabFrm *pTab = FindTabFrm(); + SwTabFrame *pTab = FindTabFrame(); if ( !pTab->IsRebuildLastLine() && pTab->IsFollow() && this == pTab->GetFirstNonHeadlineRow() && !pTab->IsInRecalcLowerRow() ) { - SwTabFrm* pMasterTab = pTab->FindMaster(); + SwTabFrame* pMasterTab = pTab->FindMaster(); pMasterTab->InvalidatePos(); } } @@ -4360,19 +4360,19 @@ SwTwips SwRowFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo ) return nReal; } -bool SwRowFrm::IsRowSplitAllowed() const +bool SwRowFrame::IsRowSplitAllowed() const { // Fixed size rows are never allowed to split: if ( HasFixSize() ) { - OSL_ENSURE( ATT_FIX_SIZE == GetFormat()->GetFrmSize().GetHeightSizeType(), "pRow claims to have fixed size" ); + OSL_ENSURE( ATT_FIX_SIZE == GetFormat()->GetFrameSize().GetHeightSizeType(), "pRow claims to have fixed size" ); return false; } // Repeated headlines are never allowed to split: - const SwTabFrm* pTabFrm = FindTabFrm(); - if ( pTabFrm->GetTable()->GetRowsToRepeat() > 0 && - pTabFrm->IsInHeadline( *this ) ) + const SwTabFrame* pTabFrame = FindTabFrame(); + if ( pTabFrame->GetTable()->GetRowsToRepeat() > 0 && + pTabFrame->IsInHeadline( *this ) ) return false; const SwTableLineFormat* pFrameFormat = static_cast<SwTableLineFormat*>(GetTabLine()->GetFrameFormat()); @@ -4380,29 +4380,29 @@ bool SwRowFrm::IsRowSplitAllowed() const return rLP.GetValue(); } -bool SwRowFrm::ShouldRowKeepWithNext() const +bool SwRowFrame::ShouldRowKeepWithNext() const { // No KeepWithNext if nested in another table - if ( GetUpper()->GetUpper()->IsCellFrm() ) + if ( GetUpper()->GetUpper()->IsCellFrame() ) return false; - const SwCellFrm* pCell = static_cast<const SwCellFrm*>(Lower()); - const SwFrm* pText = pCell->Lower(); + const SwCellFrame* pCell = static_cast<const SwCellFrame*>(Lower()); + const SwFrame* pText = pCell->Lower(); - return pText && pText->IsTextFrm() && - static_cast<const SwTextFrm*>(pText)->GetTextNode()->GetSwAttrSet().GetKeep().GetValue(); + return pText && pText->IsTextFrame() && + static_cast<const SwTextFrame*>(pText)->GetTextNode()->GetSwAttrSet().GetKeep().GetValue(); } -SwCellFrm::SwCellFrm(const SwTableBox &rBox, SwFrm* pSib, bool bInsertContent) - : SwLayoutFrm( rBox.GetFrameFormat(), pSib ) +SwCellFrame::SwCellFrame(const SwTableBox &rBox, SwFrame* pSib, bool bInsertContent) + : SwLayoutFrame( rBox.GetFrameFormat(), pSib ) , m_pTabBox( &rBox ) { - mnFrmType = FRM_CELL; + mnFrameType = FRM_CELL; if ( !bInsertContent ) return; - //If a StartIdx is available, ContentFrms are added in the cell, otherwise + //If a StartIdx is available, ContentFrames are added in the cell, otherwise //Rows have to be present and those are added. if ( rBox.GetSttIdx() ) { @@ -4412,28 +4412,28 @@ SwCellFrm::SwCellFrm(const SwTableBox &rBox, SwFrm* pSib, bool bInsertContent) else { const SwTableLines &rLines = rBox.GetTabLines(); - SwFrm *pTmpPrev = nullptr; + SwFrame *pTmpPrev = nullptr; for ( size_t i = 0; i < rLines.size(); ++i ) { - SwRowFrm *pNew = new SwRowFrm( *rLines[i], this, bInsertContent ); + SwRowFrame *pNew = new SwRowFrame( *rLines[i], this, bInsertContent ); pNew->InsertBehind( this, pTmpPrev ); pTmpPrev = pNew; } } } -void SwCellFrm::DestroyImpl() +void SwCellFrame::DestroyImpl() { SwModify* pMod = GetFormat(); if( pMod ) { // At this stage the lower frames aren't destroyed already, // therefore we have to do a recursive dispose. - SwRootFrm *pRootFrm = getRootFrm(); - if( pRootFrm && pRootFrm->IsAnyShellAccessible() && - pRootFrm->GetCurrShell() ) + SwRootFrame *pRootFrame = getRootFrame(); + if( pRootFrame && pRootFrame->IsAnyShellAccessible() && + pRootFrame->GetCurrShell() ) { - pRootFrm->GetCurrShell()->Imp()->DisposeAccessibleFrm( this, true ); + pRootFrame->GetCurrShell()->Imp()->DisposeAccessibleFrame( this, true ); } pMod->Remove( this ); // remove, @@ -4441,47 +4441,47 @@ void SwCellFrm::DestroyImpl() delete pMod; // and delete } - SwLayoutFrm::DestroyImpl(); + SwLayoutFrame::DestroyImpl(); } -SwCellFrm::~SwCellFrm() +SwCellFrame::~SwCellFrame() { } -static bool lcl_ArrangeLowers( SwLayoutFrm *pLay, long lYStart, bool bInva ) +static bool lcl_ArrangeLowers( SwLayoutFrame *pLay, long lYStart, bool bInva ) { bool bRet = false; - SwFrm *pFrm = pLay->Lower(); + SwFrame *pFrame = pLay->Lower(); SWRECTFN( pLay ) - while ( pFrm ) + while ( pFrame ) { - long nFrmTop = (pFrm->Frm().*fnRect->fnGetTop)(); - if( nFrmTop != lYStart ) + long nFrameTop = (pFrame->Frame().*fnRect->fnGetTop)(); + if( nFrameTop != lYStart ) { bRet = true; - const long lDiff = (*fnRect->fnYDiff)( lYStart, nFrmTop ); - const long lDiffX = lYStart - nFrmTop; - (pFrm->Frm().*fnRect->fnSubTop)( -lDiff ); - (pFrm->Frm().*fnRect->fnAddBottom)( lDiff ); - pFrm->SetCompletePaint(); - if ( !pFrm->GetNext() ) - pFrm->SetRetouche(); + const long lDiff = (*fnRect->fnYDiff)( lYStart, nFrameTop ); + const long lDiffX = lYStart - nFrameTop; + (pFrame->Frame().*fnRect->fnSubTop)( -lDiff ); + (pFrame->Frame().*fnRect->fnAddBottom)( lDiff ); + pFrame->SetCompletePaint(); + if ( !pFrame->GetNext() ) + pFrame->SetRetouche(); if( bInva ) - pFrm->Prepare( PREP_POS_CHGD ); - if ( pFrm->IsLayoutFrm() && static_cast<SwLayoutFrm*>(pFrm)->Lower() ) - lcl_ArrangeLowers( static_cast<SwLayoutFrm*>(pFrm), - (static_cast<SwLayoutFrm*>(pFrm)->Lower()->Frm().*fnRect->fnGetTop)() + pFrame->Prepare( PREP_POS_CHGD ); + if ( pFrame->IsLayoutFrame() && static_cast<SwLayoutFrame*>(pFrame)->Lower() ) + lcl_ArrangeLowers( static_cast<SwLayoutFrame*>(pFrame), + (static_cast<SwLayoutFrame*>(pFrame)->Lower()->Frame().*fnRect->fnGetTop)() + lDiffX, bInva ); - if ( pFrm->GetDrawObjs() ) + if ( pFrame->GetDrawObjs() ) { - for ( size_t i = 0; i < pFrm->GetDrawObjs()->size(); ++i ) + for ( size_t i = 0; i < pFrame->GetDrawObjs()->size(); ++i ) { - SwAnchoredObject* pAnchoredObj = (*pFrm->GetDrawObjs())[i]; + SwAnchoredObject* pAnchoredObj = (*pFrame->GetDrawObjs())[i]; // #i26945# - check, if anchored object // is lower of layout frame by checking, if the anchor // frame, which contains the anchor position, is a lower // of the layout frame. - if ( !pLay->IsAnLower( pAnchoredObj->GetAnchorFrmContainingAnchPos() ) ) + if ( !pLay->IsAnLower( pAnchoredObj->GetAnchorFrameContainingAnchPos() ) ) { continue; } @@ -4501,9 +4501,9 @@ static bool lcl_ArrangeLowers( SwLayoutFrm *pLay, long lYStart, bool bInva ) default: break; } } - if ( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) != nullptr ) + if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr ) { - SwFlyFrm *pFly = static_cast<SwFlyFrm*>(pAnchoredObj); + SwFlyFrame *pFly = static_cast<SwFlyFrame*>(pAnchoredObj); // OD 2004-05-18 #i28701# - no direct move of objects, // which are anchored to-paragraph/to-character, if @@ -4512,13 +4512,13 @@ static bool lcl_ArrangeLowers( SwLayoutFrm *pLay, long lYStart, bool bInva ) // #i52904# - no direct move of objects, // whose vertical position doesn't depend on anchor frame. const bool bDirectMove = - FAR_AWAY != pFly->Frm().Top() && + FAR_AWAY != pFly->Frame().Top() && bVertPosDepOnAnchor && !pFly->ConsiderObjWrapInfluenceOnObjPos(); if ( bDirectMove ) { - (pFly->Frm().*fnRect->fnSubTop)( -lDiff ); - (pFly->Frm().*fnRect->fnAddBottom)( lDiff ); + (pFly->Frame().*fnRect->fnSubTop)( -lDiff ); + (pFly->Frame().*fnRect->fnAddBottom)( lDiff ); pFly->GetVirtDrawObj()->SetRectsDirty(); // --> OD 2004-08-17 - also notify view of <SdrObject> // instance, which represents the Writer fly frame in @@ -4528,9 +4528,9 @@ static bool lcl_ArrangeLowers( SwLayoutFrm *pLay, long lYStart, bool bInva ) pFly->InvalidateObjRectWithSpaces(); } - if ( pFly->IsFlyInCntFrm() ) + if ( pFly->IsFlyInContentFrame() ) { - static_cast<SwFlyInCntFrm*>(pFly)->AddRefOfst( lDiff ); + static_cast<SwFlyInContentFrame*>(pFly)->AddRefOfst( lDiff ); // #115759# - reset current relative // position to get re-positioned, if not directly moved. if ( !bDirectMove ) @@ -4549,20 +4549,20 @@ static bool lcl_ArrangeLowers( SwLayoutFrm *pLay, long lYStart, bool bInva ) // page frame of anchor frame, if table frame isn't // a follow table and table frame isn't in its // rebuild of last line. - const SwTabFrm* pTabFrm = pLay->FindTabFrm(); + const SwTabFrame* pTabFrame = pLay->FindTabFrame(); // - save: check, if table frame is found. - if ( pTabFrm && - !( pTabFrm->IsFollow() && - pTabFrm->FindMaster()->IsRebuildLastLine() ) && - pFly->IsFlyFreeFrm() ) + if ( pTabFrame && + !( pTabFrame->IsFollow() && + pTabFrame->FindMaster()->IsRebuildLastLine() ) && + pFly->IsFlyFreeFrame() ) { - SwPageFrm* pPageFrm = pFly->GetPageFrm(); - SwPageFrm* pPageOfAnchor = pFrm->FindPageFrm(); - if ( pPageFrm != pPageOfAnchor ) + SwPageFrame* pPageFrame = pFly->GetPageFrame(); + SwPageFrame* pPageOfAnchor = pFrame->FindPageFrame(); + if ( pPageFrame != pPageOfAnchor ) { pFly->InvalidatePos(); - if ( pPageFrm ) - pPageFrm->MoveFly( pFly, pPageOfAnchor ); + if ( pPageFrame ) + pPageFrame->MoveFly( pFly, pPageOfAnchor ); else pPageOfAnchor->AppendFlyToPage( pFly ); } @@ -4587,21 +4587,21 @@ static bool lcl_ArrangeLowers( SwLayoutFrm *pLay, long lYStart, bool bInva ) else if ( dynamic_cast< const SwAnchoredDrawObject *>( pAnchoredObj ) != nullptr ) { // #i26945# - const SwTabFrm* pTabFrm = pLay->FindTabFrm(); - if ( pTabFrm && - !( pTabFrm->IsFollow() && - pTabFrm->FindMaster()->IsRebuildLastLine() ) && + const SwTabFrame* pTabFrame = pLay->FindTabFrame(); + if ( pTabFrame && + !( pTabFrame->IsFollow() && + pTabFrame->FindMaster()->IsRebuildLastLine() ) && (pAnchoredObj->GetFrameFormat().GetAnchor().GetAnchorId() != FLY_AS_CHAR)) { - SwPageFrm* pPageFrm = pAnchoredObj->GetPageFrm(); - SwPageFrm* pPageOfAnchor = pFrm->FindPageFrm(); - if ( pPageFrm != pPageOfAnchor ) + SwPageFrame* pPageFrame = pAnchoredObj->GetPageFrame(); + SwPageFrame* pPageOfAnchor = pFrame->FindPageFrame(); + if ( pPageFrame != pPageOfAnchor ) { pAnchoredObj->InvalidateObjPos(); - if ( pPageFrm ) + if ( pPageFrame ) { - pPageFrm->RemoveDrawObjFromPage( *pAnchoredObj ); + pPageFrame->RemoveDrawObjFromPage( *pAnchoredObj ); } pPageOfAnchor->AppendDrawObjToPage( *pAnchoredObj ); } @@ -4640,9 +4640,9 @@ static bool lcl_ArrangeLowers( SwLayoutFrm *pLay, long lYStart, bool bInva ) } } // Columns and cells are ordered horizontal, not vertical - if( !pFrm->IsColumnFrm() && !pFrm->IsCellFrm() ) + if( !pFrame->IsColumnFrame() && !pFrame->IsCellFrame() ) lYStart = (*fnRect->fnYInc)( lYStart, - (pFrm->Frm().*fnRect->fnGetHeight)() ); + (pFrame->Frame().*fnRect->fnGetHeight)() ); // Nowadays, the content inside a cell can flow into the follow table. // Thus, the cell may only grow up to the end of the environment. @@ -4650,28 +4650,28 @@ static bool lcl_ArrangeLowers( SwLayoutFrm *pLay, long lYStart, bool bInva ) // Therefore we have to trigger a formatting for the frames, which do // not fit into the cell anymore: SwTwips nDistanceToUpperPrtBottom = - (pFrm->Frm().*fnRect->fnBottomDist)( (pLay->*fnRect->fnGetPrtBottom)()); + (pFrame->Frame().*fnRect->fnBottomDist)( (pLay->*fnRect->fnGetPrtBottom)()); // #i56146# - Revise fix of issue #i26945# // do *not* consider content inside fly frames, if it's an undersized paragraph. // #i26945# - consider content inside fly frames if ( nDistanceToUpperPrtBottom < 0 && - ( ( pFrm->IsInFly() && - ( !pFrm->IsTextFrm() || - !static_cast<SwTextFrm*>(pFrm)->IsUndersized() ) ) || - pFrm->IsInSplitTableRow() ) ) + ( ( pFrame->IsInFly() && + ( !pFrame->IsTextFrame() || + !static_cast<SwTextFrame*>(pFrame)->IsUndersized() ) ) || + pFrame->IsInSplitTableRow() ) ) { - pFrm->InvalidatePos(); + pFrame->InvalidatePos(); } - pFrm = pFrm->GetNext(); + pFrame = pFrame->GetNext(); } return bRet; } -void SwCellFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttrs *pAttrs ) +void SwCellFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttrs *pAttrs ) { - OSL_ENSURE( pAttrs, "CellFrm::Format, pAttrs ist 0." ); - const SwTabFrm* pTab = FindTabFrm(); + OSL_ENSURE( pAttrs, "CellFrame::Format, pAttrs ist 0." ); + const SwTabFrame* pTab = FindTabFrame(); SWRECTFN( pTab ) if ( !mbValidPrtArea ) @@ -4683,13 +4683,13 @@ void SwCellFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAt { SwTwips nTopSpace, nBottomSpace, nLeftSpace, nRightSpace; // #i29550# - if ( pTab->IsCollapsingBorders() && !Lower()->IsRowFrm() ) + if ( pTab->IsCollapsingBorders() && !Lower()->IsRowFrame() ) { const SvxBoxItem& rBoxItem = pAttrs->GetBox(); nLeftSpace = rBoxItem.GetDistance( SvxBoxItemLine::LEFT ); nRightSpace = rBoxItem.GetDistance( SvxBoxItemLine::RIGHT ); - nTopSpace = static_cast<SwRowFrm*>(GetUpper())->GetTopMarginForLowers(); - nBottomSpace = static_cast<SwRowFrm*>(GetUpper())->GetBottomMarginForLowers(); + nTopSpace = static_cast<SwRowFrame*>(GetUpper())->GetTopMarginForLowers(); + nBottomSpace = static_cast<SwRowFrame*>(GetUpper())->GetBottomMarginForLowers(); } else { @@ -4711,18 +4711,18 @@ void SwCellFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAt { mbValidSize = true; - //The VarSize of the CellFrms is always the width. + //The VarSize of the CellFrames is always the width. //The width is not variable though, it is defined by the format. //This predefined value however does not necessary match the actual //width. The width is calculated based on the attribute, the value in - //the attribute matches the desired value of the TabFrm. Changes which + //the attribute matches the desired value of the TabFrame. Changes which //were done there are taken into account here proportionately. //If the cell doesn't have a neighbour anymore, it does not take the //attribute into account and takes the rest of the upper instead. SwTwips nWidth; if ( GetNext() ) { - const SwTwips nWish = pTab->GetFormat()->GetFrmSize().GetWidth(); + const SwTwips nWish = pTab->GetFormat()->GetFrameSize().GetWidth(); nWidth = pAttrs->GetSize().Width(); OSL_ENSURE( nWish, "Table without width?" ); @@ -4745,7 +4745,7 @@ void SwCellFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAt do { pTmpBox = rBoxes[ i++ ]; - nSumWidth += pTmpBox->GetFrameFormat()->GetFrmSize().GetWidth(); + nSumWidth += pTmpBox->GetFrameFormat()->GetFrameSize().GetWidth(); } while ( pTmpBox != GetTabBox() ); @@ -4756,11 +4756,11 @@ void SwCellFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAt nWidth = (SwTwips)nTmpWidth; // 3. calculate frame widths of cells up to this one: - const SwFrm* pTmpCell = static_cast<const SwLayoutFrm*>(GetUpper())->Lower(); + const SwFrame* pTmpCell = static_cast<const SwLayoutFrame*>(GetUpper())->Lower(); SwTwips nSumFrameWidths = 0; while ( pTmpCell != this ) { - nSumFrameWidths += (pTmpCell->Frm().*fnRect->fnGetWidth)(); + nSumFrameWidths += (pTmpCell->Frame().*fnRect->fnGetWidth)(); pTmpCell = pTmpCell->GetNext(); } @@ -4781,22 +4781,22 @@ void SwCellFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAt { OSL_ENSURE( pAttrs->GetSize().Width() > 0, "Box without width" ); nWidth = (GetUpper()->Prt().*fnRect->fnGetWidth)(); - SwFrm *pPre = GetUpper()->Lower(); + SwFrame *pPre = GetUpper()->Lower(); while ( pPre != this ) { - nWidth -= (pPre->Frm().*fnRect->fnGetWidth)(); + nWidth -= (pPre->Frame().*fnRect->fnGetWidth)(); pPre = pPre->GetNext(); } } - const long nDiff = nWidth - (Frm().*fnRect->fnGetWidth)(); - if( IsNeighbourFrm() && IsRightToLeft() ) - (Frm().*fnRect->fnSubLeft)( nDiff ); + const long nDiff = nWidth - (Frame().*fnRect->fnGetWidth)(); + if( IsNeighbourFrame() && IsRightToLeft() ) + (Frame().*fnRect->fnSubLeft)( nDiff ); else - (Frm().*fnRect->fnAddRight)( nDiff ); + (Frame().*fnRect->fnAddRight)( nDiff ); (Prt().*fnRect->fnAddRight)( nDiff ); //Adjust the height, it's defined through the content and the border. - const long nDiffHeight = nRemaining - (Frm().*fnRect->fnGetHeight)(); + const long nDiffHeight = nRemaining - (Frame().*fnRect->fnGetHeight)(); if ( nDiffHeight ) { if ( nDiffHeight > 0 ) @@ -4823,13 +4823,13 @@ void SwCellFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAt // From now on, all operations are related to the table cell. SWREFRESHFN( this ) - SwPageFrm* pPg = nullptr; - if ( !FindTabFrm()->IsRebuildLastLine() && text::VertOrientation::NONE != rOri.GetVertOrient() && + SwPageFrame* pPg = nullptr; + if ( !FindTabFrame()->IsRebuildLastLine() && text::VertOrientation::NONE != rOri.GetVertOrient() && // #158225# no vertical alignment of covered cells !IsCoveredCell() && - (pPg = FindPageFrm())!=nullptr ) + (pPg = FindPageFrame())!=nullptr ) { - if ( !Lower()->IsContentFrm() && !Lower()->IsSctFrm() && !Lower()->IsTabFrm() ) + if ( !Lower()->IsContentFrame() && !Lower()->IsSctFrame() && !Lower()->IsTabFrame() ) { // OSL_ENSURE(for HTML-import! OSL_ENSURE( false, "VAlign to cell without content" ); @@ -4843,7 +4843,7 @@ void SwCellFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAt //No alignment if border with flow overlaps the cell. if ( pPg->GetSortedObjs() ) { - SwRect aRect( Prt() ); aRect += Frm().Pos(); + SwRect aRect( Prt() ); aRect += Frame().Pos(); for ( size_t i = 0; i < pPg->GetSortedObjs()->size(); ++i ) { const SwAnchoredObject* pAnchoredObj = (*pPg->GetSortedObjs())[i]; @@ -4856,15 +4856,15 @@ void SwCellFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAt if ( SURROUND_THROUGHT != rSur.GetSurround() ) { // frames, which the cell is a lower of, aren't relevant - if ( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) != nullptr ) + if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr ) { - const SwFlyFrm *pFly = - static_cast<const SwFlyFrm*>(pAnchoredObj); + const SwFlyFrame *pFly = + static_cast<const SwFlyFrame*>(pAnchoredObj); if ( pFly->IsAnLower( this ) ) continue; } - const SwFrm* pAnch = pAnchoredObj->GetAnchorFrm(); + const SwFrame* pAnch = pAnchoredObj->GetAnchorFrame(); // #i43913# // #i52904# - no vertical alignment, // if object, anchored inside cell, has temporarly @@ -4886,7 +4886,7 @@ void SwCellFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAt long nPrtHeight = (Prt().*fnRect->fnGetHeight)(); if( ( bVertDir && ( nRemaining -= lcl_CalcTopAndBottomMargin( *this, *pAttrs ) ) < nPrtHeight ) || - (Lower()->Frm().*fnRect->fnGetTop)() != (this->*fnRect->fnGetPrtTop)() ) + (Lower()->Frame().*fnRect->fnGetTop)() != (this->*fnRect->fnGetPrtTop)() ) { long nDiff = (Prt().*fnRect->fnGetHeight)() - nRemaining; if ( nDiff >= 0 ) @@ -4911,7 +4911,7 @@ void SwCellFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAt else { //Was an old alignment taken into account? - if ( Lower()->IsContentFrm() ) + if ( Lower()->IsContentFrame() ) { const long lYStart = (this->*fnRect->fnGetPrtTop)(); lcl_ArrangeLowers( this, lYStart, true ); @@ -4919,7 +4919,7 @@ void SwCellFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAt } } -void SwCellFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) +void SwCellFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) { bool bAttrSetChg = pNew && RES_ATTRSET_CHG == pNew->Which(); const SfxPoolItem *pItem = nullptr; @@ -4934,7 +4934,7 @@ void SwCellFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) bool bInva = true; if ( text::VertOrientation::NONE == static_cast<const SwFormatVertOrient*>(pItem)->GetVertOrient() && // OD 04.11.2003 #112910# - Lower() && Lower()->IsContentFrm() ) + Lower() && Lower()->IsContentFrame() ) { SWRECTFN( this ) const long lYStart = (this->*fnRect->fnGetPrtTop)(); @@ -4951,7 +4951,7 @@ void SwCellFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) SfxItemState::SET == static_cast<const SwAttrSetChg*>(pNew)->GetChgSet()->GetItemState( RES_PROTECT, false ) ) || ( pNew && RES_PROTECT == pNew->Which()) ) { - SwViewShell *pSh = getRootFrm()->GetCurrShell(); + SwViewShell *pSh = getRootFrame()->GetCurrShell(); if( pSh && pSh->GetLayout()->IsAnyShellAccessible() ) pSh->Imp()->InvalidateAccessibleEditableState( true, this ); } @@ -4967,33 +4967,33 @@ void SwCellFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) if ( bAttrSetChg && pNew && SfxItemState::SET == static_cast<const SwAttrSetChg*>(pNew)->GetChgSet()->GetItemState( RES_BOX, false, &pItem ) ) { - SwFrm* pTmpUpper = GetUpper(); - while ( pTmpUpper->GetUpper() && !pTmpUpper->GetUpper()->IsTabFrm() ) + SwFrame* pTmpUpper = GetUpper(); + while ( pTmpUpper->GetUpper() && !pTmpUpper->GetUpper()->IsTabFrame() ) pTmpUpper = pTmpUpper->GetUpper(); - SwTabFrm* pTabFrm = static_cast<SwTabFrm*>(pTmpUpper->GetUpper()); - if ( pTabFrm->IsCollapsingBorders() ) + SwTabFrame* pTabFrame = static_cast<SwTabFrame*>(pTmpUpper->GetUpper()); + if ( pTabFrame->IsCollapsingBorders() ) { // Invalidate lowers of this and next row: - lcl_InvalidateAllLowersPrt( static_cast<SwRowFrm*>(pTmpUpper) ); + lcl_InvalidateAllLowersPrt( static_cast<SwRowFrame*>(pTmpUpper) ); pTmpUpper = pTmpUpper->GetNext(); if ( pTmpUpper ) - lcl_InvalidateAllLowersPrt( static_cast<SwRowFrm*>(pTmpUpper) ); + lcl_InvalidateAllLowersPrt( static_cast<SwRowFrame*>(pTmpUpper) ); else - pTabFrm->InvalidatePrt(); + pTabFrame->InvalidatePrt(); } } - SwLayoutFrm::Modify( pOld, pNew ); + SwLayoutFrame::Modify( pOld, pNew ); } -long SwCellFrm::GetLayoutRowSpan() const +long SwCellFrame::GetLayoutRowSpan() const { long nRet = GetTabBox()->getRowSpan(); if ( nRet < 1 ) { - const SwFrm* pRow = GetUpper(); - const SwTabFrm* pTab = pRow ? static_cast<const SwTabFrm*>(pRow->GetUpper()) : nullptr; + const SwFrame* pRow = GetUpper(); + const SwTabFrame* pTab = pRow ? static_cast<const SwTabFrame*>(pRow->GetUpper()) : nullptr; if ( pTab && pTab->IsFollow() && pRow == pTab->GetFirstNonHeadlineRow() ) nRet = -nRet; @@ -5002,36 +5002,36 @@ long SwCellFrm::GetLayoutRowSpan() const } // #i103961# -void SwCellFrm::Cut() +void SwCellFrame::Cut() { // notification for accessibility { - SwRootFrm *pRootFrm = getRootFrm(); - if( pRootFrm && pRootFrm->IsAnyShellAccessible() ) + SwRootFrame *pRootFrame = getRootFrame(); + if( pRootFrame && pRootFrame->IsAnyShellAccessible() ) { - SwViewShell* pVSh = pRootFrm->GetCurrShell(); + SwViewShell* pVSh = pRootFrame->GetCurrShell(); if ( pVSh && pVSh->Imp() ) { - pVSh->Imp()->DisposeAccessibleFrm( this ); + pVSh->Imp()->DisposeAccessibleFrame( this ); } } } - SwLayoutFrm::Cut(); + SwLayoutFrame::Cut(); } // Helper functions for repeated headlines: -bool SwTabFrm::IsInHeadline( const SwFrm& rFrm ) const +bool SwTabFrame::IsInHeadline( const SwFrame& rFrame ) const { - OSL_ENSURE( IsAnLower( &rFrm ) && rFrm.IsInTab(), - "SwTabFrm::IsInHeadline called for frame not lower of table" ); + OSL_ENSURE( IsAnLower( &rFrame ) && rFrame.IsInTab(), + "SwTabFrame::IsInHeadline called for frame not lower of table" ); - const SwFrm* pTmp = &rFrm; - while ( !pTmp->GetUpper()->IsTabFrm() ) + const SwFrame* pTmp = &rFrame; + while ( !pTmp->GetUpper()->IsTabFrame() ) pTmp = pTmp->GetUpper(); - return GetTable()->IsHeadline( *static_cast<const SwRowFrm*>(pTmp)->GetTabLine() ); + return GetTable()->IsHeadline( *static_cast<const SwRowFrame*>(pTmp)->GetTabLine() ); } /* @@ -5041,22 +5041,22 @@ bool SwTabFrm::IsInHeadline( const SwFrm& rFrm ) const * layout, e.g., during deletion of rows, which makes it necessary to find * the first non-headline row by evaluating the headline flag at the row frame. */ -SwRowFrm* SwTabFrm::GetFirstNonHeadlineRow() const +SwRowFrame* SwTabFrame::GetFirstNonHeadlineRow() const { - SwRowFrm* pRet = const_cast<SwRowFrm*>(static_cast<const SwRowFrm*>(Lower())); + SwRowFrame* pRet = const_cast<SwRowFrame*>(static_cast<const SwRowFrame*>(Lower())); if ( pRet ) { if ( IsFollow() ) { while ( pRet && pRet->IsRepeatedHeadline() ) - pRet = static_cast<SwRowFrm*>(pRet->GetNext()); + pRet = static_cast<SwRowFrame*>(pRet->GetNext()); } else { sal_uInt16 nRepeat = GetTable()->GetRowsToRepeat(); while ( pRet && nRepeat > 0 ) { - pRet = static_cast<SwRowFrm*>(pRet->GetNext()); + pRet = static_cast<SwRowFrame*>(pRet->GetNext()); --nRepeat; } } @@ -5074,40 +5074,40 @@ bool SwTable::IsHeadline( const SwTableLine& rLine ) const return false; } -bool SwTabFrm::IsLayoutSplitAllowed() const +bool SwTabFrame::IsLayoutSplitAllowed() const { return GetFormat()->GetLayoutSplit().GetValue(); } // #i29550# -sal_uInt16 SwTabFrm::GetBottomLineSize() const +sal_uInt16 SwTabFrame::GetBottomLineSize() const { OSL_ENSURE( IsCollapsingBorders(), "BottomLineSize only required for collapsing borders" ); OSL_ENSURE( Lower(), "Warning! Trying to prevent a crash" ); - const SwFrm* pTmp = GetLastLower(); + const SwFrame* pTmp = GetLastLower(); // #124755# Try to make code robust if ( !pTmp ) return 0; - return static_cast<const SwRowFrm*>(pTmp)->GetBottomLineSize(); + return static_cast<const SwRowFrame*>(pTmp)->GetBottomLineSize(); } -bool SwTabFrm::IsCollapsingBorders() const +bool SwTabFrame::IsCollapsingBorders() const { return static_cast<const SfxBoolItem&>(GetFormat()->GetAttrSet().Get( RES_COLLAPSING_BORDERS )).GetValue(); } /// Local helper function to calculate height of first text row -static SwTwips lcl_CalcHeightOfFirstContentLine( const SwRowFrm& rSourceLine ) +static SwTwips lcl_CalcHeightOfFirstContentLine( const SwRowFrame& rSourceLine ) { // Find corresponding split line in master table - const SwTabFrm* pTab = rSourceLine.FindTabFrm(); + const SwTabFrame* pTab = rSourceLine.FindTabFrame(); SWRECTFN( pTab ) - const SwCellFrm* pCurrSourceCell = static_cast<const SwCellFrm*>(rSourceLine.Lower()); + const SwCellFrame* pCurrSourceCell = static_cast<const SwCellFrame*>(rSourceLine.Lower()); // 1. Case: rSourceLine is a follow flow line. // In this case we have to return the minimum of the heights @@ -5126,78 +5126,78 @@ static SwTwips lcl_CalcHeightOfFirstContentLine( const SwRowFrm& rSourceLine ) // the follow flow line: if ( bIsInFollowFlowLine && pCurrSourceCell->GetLayoutRowSpan() > 1 ) { - pCurrSourceCell = static_cast<const SwCellFrm*>(pCurrSourceCell->GetNext()); + pCurrSourceCell = static_cast<const SwCellFrame*>(pCurrSourceCell->GetNext()); continue; } - const SwFrm *pTmp = pCurrSourceCell->Lower(); + const SwFrame *pTmp = pCurrSourceCell->Lower(); if ( pTmp ) { SwTwips nTmpHeight = USHRT_MAX; // #i32456# Consider lower row frames - if ( pTmp->IsRowFrm() ) + if ( pTmp->IsRowFrame() ) { - const SwRowFrm* pTmpSourceRow = static_cast<const SwRowFrm*>(pCurrSourceCell->Lower()); + const SwRowFrame* pTmpSourceRow = static_cast<const SwRowFrame*>(pCurrSourceCell->Lower()); nTmpHeight = lcl_CalcHeightOfFirstContentLine( *pTmpSourceRow ); } - if ( pTmp->IsTabFrm() ) + if ( pTmp->IsTabFrame() ) { - nTmpHeight = static_cast<const SwTabFrm*>(pTmp)->CalcHeightOfFirstContentLine(); + nTmpHeight = static_cast<const SwTabFrame*>(pTmp)->CalcHeightOfFirstContentLine(); } - else if ( pTmp->IsTextFrm() ) + else if ( pTmp->IsTextFrame() ) { - SwTextFrm* pTextFrm = const_cast<SwTextFrm*>(static_cast<const SwTextFrm*>(pTmp)); - pTextFrm->GetFormatted(); - nTmpHeight = pTextFrm->FirstLineHeight(); + SwTextFrame* pTextFrame = const_cast<SwTextFrame*>(static_cast<const SwTextFrame*>(pTmp)); + pTextFrame->GetFormatted(); + nTmpHeight = pTextFrame->FirstLineHeight(); } if ( USHRT_MAX != nTmpHeight ) { - const SwCellFrm* pPrevCell = pCurrSourceCell->GetPreviousCell(); + const SwCellFrame* pPrevCell = pCurrSourceCell->GetPreviousCell(); if ( pPrevCell ) { // If we are in a split row, there may be some space // left in the cell frame of the master row. // We look for the minimum of all first line heights; SwTwips nReal = (pPrevCell->Prt().*fnRect->fnGetHeight)(); - const SwFrm* pFrm = pPrevCell->Lower(); - const SwFrm* pLast = pFrm; - while ( pFrm ) + const SwFrame* pFrame = pPrevCell->Lower(); + const SwFrame* pLast = pFrame; + while ( pFrame ) { - nReal -= (pFrm->Frm().*fnRect->fnGetHeight)(); - pLast = pFrm; - pFrm = pFrm->GetNext(); + nReal -= (pFrame->Frame().*fnRect->fnGetHeight)(); + pLast = pFrame; + pFrame = pFrame->GetNext(); } // #i26831#, #i26520# // The additional lower space of the current last. // #115759# - do *not* consider the // additional lower space for 'master' text frames - if ( pLast && pLast->IsFlowFrm() && - ( !pLast->IsTextFrm() || - !static_cast<const SwTextFrm*>(pLast)->GetFollow() ) ) + if ( pLast && pLast->IsFlowFrame() && + ( !pLast->IsTextFrame() || + !static_cast<const SwTextFrame*>(pLast)->GetFollow() ) ) { - nReal += SwFlowFrm::CastFlowFrm(pLast)->CalcAddLowerSpaceAsLastInTableCell(); + nReal += SwFlowFrame::CastFlowFrame(pLast)->CalcAddLowerSpaceAsLastInTableCell(); } // Don't forget the upper space and lower space, // #115759# - do *not* consider the upper // and the lower space for follow text frames. - if ( pTmp->IsFlowFrm() && - ( !pTmp->IsTextFrm() || - !static_cast<const SwTextFrm*>(pTmp)->IsFollow() ) ) + if ( pTmp->IsFlowFrame() && + ( !pTmp->IsTextFrame() || + !static_cast<const SwTextFrame*>(pTmp)->IsFollow() ) ) { - nTmpHeight += SwFlowFrm::CastFlowFrm(pTmp)->CalcUpperSpace( nullptr, pLast); - nTmpHeight += SwFlowFrm::CastFlowFrm(pTmp)->CalcLowerSpace(); + nTmpHeight += SwFlowFrame::CastFlowFrame(pTmp)->CalcUpperSpace( nullptr, pLast); + nTmpHeight += SwFlowFrame::CastFlowFrame(pTmp)->CalcLowerSpace(); } // #115759# - consider additional lower // space of <pTmp>, if contains only one line. // In this case it would be the new last text frame, which // would have no follow and thus would add this space. - if ( pTmp->IsTextFrm() && - const_cast<SwTextFrm*>(static_cast<const SwTextFrm*>(pTmp)) + if ( pTmp->IsTextFrame() && + const_cast<SwTextFrame*>(static_cast<const SwTextFrame*>(pTmp)) ->GetLineCount( COMPLETE_STRING ) == 1 ) { - nTmpHeight += SwFlowFrm::CastFlowFrm(pTmp) + nTmpHeight += SwFlowFrame::CastFlowFrame(pTmp) ->CalcAddLowerSpaceAsLastInTableCell(); } if ( nReal > 0 ) @@ -5207,15 +5207,15 @@ static SwTwips lcl_CalcHeightOfFirstContentLine( const SwRowFrm& rSourceLine ) { // pFirstRow is not a FollowFlowRow. In this case, // we look for the maximum of all first line heights: - SwBorderAttrAccess aAccess( SwFrm::GetCache(), pCurrSourceCell ); + SwBorderAttrAccess aAccess( SwFrame::GetCache(), pCurrSourceCell ); const SwBorderAttrs &rAttrs = *aAccess.Get(); nTmpHeight += rAttrs.CalcTop() + rAttrs.CalcBottom(); // #i26250# // Don't forget the upper space and lower space, - if ( pTmp->IsFlowFrm() ) + if ( pTmp->IsFlowFrame() ) { - nTmpHeight += SwFlowFrm::CastFlowFrm(pTmp)->CalcUpperSpace(); - nTmpHeight += SwFlowFrm::CastFlowFrm(pTmp)->CalcLowerSpace(); + nTmpHeight += SwFlowFrame::CastFlowFrame(pTmp)->CalcUpperSpace(); + nTmpHeight += SwFlowFrame::CastFlowFrame(pTmp)->CalcLowerSpace(); } } } @@ -5234,14 +5234,14 @@ static SwTwips lcl_CalcHeightOfFirstContentLine( const SwRowFrm& rSourceLine ) } } - pCurrSourceCell = static_cast<const SwCellFrm*>(pCurrSourceCell->GetNext()); + pCurrSourceCell = static_cast<const SwCellFrame*>(pCurrSourceCell->GetNext()); } return ( LONG_MAX == nHeight ) ? 0 : nHeight; } /// Function to calculate height of first text row -SwTwips SwTabFrm::CalcHeightOfFirstContentLine() const +SwTwips SwTabFrame::CalcHeightOfFirstContentLine() const { SWRECTFN( this ) @@ -5250,17 +5250,17 @@ SwTwips SwTabFrm::CalcHeightOfFirstContentLine() const if ( bDontSplit ) { // Table is not allowed to split: Take the whole height, that's all - return (Frm().*fnRect->fnGetHeight)(); + return (Frame().*fnRect->fnGetHeight)(); } SwTwips nTmpHeight = 0; - SwRowFrm* pFirstRow = GetFirstNonHeadlineRow(); + SwRowFrame* pFirstRow = GetFirstNonHeadlineRow(); OSL_ENSURE( !IsFollow() || pFirstRow, "FollowTable without Lower" ); // NEW TABLES if ( pFirstRow && pFirstRow->IsRowSpanLine() && pFirstRow->GetNext() ) - pFirstRow = static_cast<SwRowFrm*>(pFirstRow->GetNext()); + pFirstRow = static_cast<SwRowFrame*>(pFirstRow->GetNext()); // Calculate the height of the headlines: const sal_uInt16 nRepeat = GetTable()->GetRowsToRepeat(); @@ -5277,7 +5277,7 @@ SwTwips SwTabFrm::CalcHeightOfFirstContentLine() const while ( pFirstRow && pFirstRow->ShouldRowKeepWithNext() ) { ++nKeepRows; - pFirstRow = static_cast<SwRowFrm*>(pFirstRow->GetNext()); + pFirstRow = static_cast<SwRowFrame*>(pFirstRow->GetNext()); } if ( nKeepRows > nRepeat ) @@ -5301,7 +5301,7 @@ SwTwips SwTabFrm::CalcHeightOfFirstContentLine() const if ( pFirstRow ) { const bool bSplittable = pFirstRow->IsRowSplitAllowed(); - const SwTwips nFirstLineHeight = (pFirstRow->Frm().*fnRect->fnGetHeight)(); + const SwTwips nFirstLineHeight = (pFirstRow->Frame().*fnRect->fnGetHeight)(); if ( !bSplittable ) { @@ -5311,11 +5311,11 @@ SwTwips SwTabFrm::CalcHeightOfFirstContentLine() const // line as it would be on the last page. Since this is quite complicated to calculate, // we only calculate the height of the first line. if ( pFirstRow->GetPrev() && - static_cast<SwRowFrm*>(pFirstRow->GetPrev())->IsRowSpanLine() ) + static_cast<SwRowFrame*>(pFirstRow->GetPrev())->IsRowSpanLine() ) { // Calculate maximum height of all cells with rowspan = 1: SwTwips nMaxHeight = 0; - const SwCellFrm* pLower2 = static_cast<const SwCellFrm*>(pFirstRow->Lower()); + const SwCellFrame* pLower2 = static_cast<const SwCellFrame*>(pFirstRow->Lower()); while ( pLower2 ) { if ( 1 == pLower2->GetTabBox()->getRowSpan() ) @@ -5323,7 +5323,7 @@ SwTwips SwTabFrm::CalcHeightOfFirstContentLine() const const SwTwips nCellHeight = lcl_CalcMinCellHeight( pLower2, true ); nMaxHeight = std::max( nCellHeight, nMaxHeight ); } - pLower2 = static_cast<const SwCellFrm*>(pLower2->GetNext()); + pLower2 = static_cast<const SwCellFrame*>(pLower2->GetNext()); } nTmpHeight += nMaxHeight; } @@ -5339,18 +5339,18 @@ SwTwips SwTabFrm::CalcHeightOfFirstContentLine() const else if ( 0 != nFirstLineHeight ) { const bool bOldJoinLock = IsJoinLocked(); - const_cast<SwTabFrm*>(this)->LockJoin(); + const_cast<SwTabFrame*>(this)->LockJoin(); const SwTwips nHeightOfFirstContentLine = lcl_CalcHeightOfFirstContentLine( *pFirstRow ); // Consider minimum row height: - const SwFormatFrmSize &rSz = static_cast<const SwRowFrm*>(pFirstRow)->GetFormat()->GetFrmSize(); + const SwFormatFrameSize &rSz = static_cast<const SwRowFrame*>(pFirstRow)->GetFormat()->GetFrameSize(); const SwTwips nMinRowHeight = rSz.GetHeightSizeType() == ATT_MIN_SIZE ? rSz.GetHeight() : 0; nTmpHeight += std::max( nHeightOfFirstContentLine, nMinRowHeight ); if ( !bOldJoinLock ) - const_cast<SwTabFrm*>(this)->UnlockJoin(); + const_cast<SwTabFrame*>(this)->UnlockJoin(); } } @@ -5358,26 +5358,26 @@ SwTwips SwTabFrm::CalcHeightOfFirstContentLine() const } // Some more functions for covered/covering cells. This way inclusion of -// SwCellFrm can be avoided +// SwCellFrame can be avoided -bool SwFrm::IsLeaveUpperAllowed() const +bool SwFrame::IsLeaveUpperAllowed() const { - const SwCellFrm* pThisCell = dynamic_cast<const SwCellFrm*>(this); + const SwCellFrame* pThisCell = dynamic_cast<const SwCellFrame*>(this); return pThisCell && pThisCell->GetLayoutRowSpan() > 1; } -bool SwFrm::IsCoveredCell() const +bool SwFrame::IsCoveredCell() const { - const SwCellFrm* pThisCell = dynamic_cast<const SwCellFrm*>(this); + const SwCellFrame* pThisCell = dynamic_cast<const SwCellFrame*>(this); return pThisCell && pThisCell->GetLayoutRowSpan() < 1; } -bool SwFrm::IsInCoveredCell() const +bool SwFrame::IsInCoveredCell() const { bool bRet = false; - const SwFrm* pThis = this; - while ( pThis && !pThis->IsCellFrm() ) + const SwFrame* pThis = this; + while ( pThis && !pThis->IsCellFrame() ) pThis = pThis->GetUpper(); if ( pThis ) diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx index ce7182388964..aa8673225901 100644 --- a/sw/source/core/layout/trvlfrm.cxx +++ b/sw/source/core/layout/trvlfrm.cxx @@ -49,12 +49,12 @@ #include <swselectionlist.hxx> namespace { - bool lcl_GetCrsrOfst_Objects( const SwPageFrm* pPageFrm, bool bSearchBackground, - SwPosition *pPos, Point& rPoint, SwCrsrMoveState* pCMS ) + bool lcl_GetCursorOfst_Objects( const SwPageFrame* pPageFrame, bool bSearchBackground, + SwPosition *pPos, Point& rPoint, SwCursorMoveState* pCMS ) { bool bRet = false; Point aPoint( rPoint ); - SwOrderIter aIter( pPageFrm ); + SwOrderIter aIter( pPageFrame ); aIter.Top(); while ( aIter() ) { @@ -68,11 +68,11 @@ namespace { bool bBackgroundMatches = ( bInBackground && bSearchBackground ) || ( !bInBackground && !bSearchBackground ); - const SwFlyFrm* pFly = pObj ? pObj->GetFlyFrm() : nullptr; + const SwFlyFrame* pFly = pObj ? pObj->GetFlyFrame() : nullptr; if ( pFly && bBackgroundMatches && ( ( pCMS && pCMS->m_bSetInReadOnly ) || !pFly->IsProtected() ) && - pFly->GetCrsrOfst( pPos, aPoint, pCMS ) ) + pFly->GetCursorOfst( pPos, aPoint, pCMS ) ) { bRet = true; break; @@ -101,65 +101,65 @@ namespace { } } -//For SwFlyFrm::GetCrsrOfst -class SwCrsrOszControl +//For SwFlyFrame::GetCursorOfst +class SwCursorOszControl { public: // So the compiler can initialize the class already. No DTOR and member // as public members - const SwFlyFrm *pEntry; - const SwFlyFrm *pStk1; - const SwFlyFrm *pStk2; + const SwFlyFrame *pEntry; + const SwFlyFrame *pStack1; + const SwFlyFrame *pStack2; - bool ChkOsz( const SwFlyFrm *pFly ) + bool ChkOsz( const SwFlyFrame *pFly ) { bool bRet = true; - if ( pFly != pStk1 && pFly != pStk2 ) + if ( pFly != pStack1 && pFly != pStack2 ) { - pStk1 = pStk2; - pStk2 = pFly; + pStack1 = pStack2; + pStack2 = pFly; bRet = false; } return bRet; } - void Entry( const SwFlyFrm *pFly ) + void Entry( const SwFlyFrame *pFly ) { if ( !pEntry ) - pEntry = pStk1 = pFly; + pEntry = pStack1 = pFly; } - void Exit( const SwFlyFrm *pFly ) + void Exit( const SwFlyFrame *pFly ) { if ( pFly == pEntry ) - pEntry = pStk1 = pStk2 = nullptr; + pEntry = pStack1 = pStack2 = nullptr; } }; -static SwCrsrOszControl g_OszCtrl = { nullptr, nullptr, nullptr }; +static SwCursorOszControl g_OszCtrl = { nullptr, nullptr, nullptr }; -/** Searches the ContentFrm owning the PrtArea containing the point. */ -bool SwLayoutFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint, - SwCrsrMoveState* pCMS, bool ) const +/** Searches the ContentFrame owning the PrtArea containing the point. */ +bool SwLayoutFrame::GetCursorOfst( SwPosition *pPos, Point &rPoint, + SwCursorMoveState* pCMS, bool ) const { - vcl::RenderContext* pRenderContext = getRootFrm()->GetCurrShell()->GetOut(); + vcl::RenderContext* pRenderContext = getRootFrame()->GetCurrShell()->GetOut(); bool bRet = false; - const SwFrm *pFrm = Lower(); - while ( !bRet && pFrm ) + const SwFrame *pFrame = Lower(); + while ( !bRet && pFrame ) { - pFrm->Calc(pRenderContext); + pFrame->Calc(pRenderContext); // #i43742# New function - const bool bContentCheck = pFrm->IsTextFrm() && pCMS && pCMS->m_bContentCheck; + const bool bContentCheck = pFrame->IsTextFrame() && pCMS && pCMS->m_bContentCheck; const SwRect aPaintRect( bContentCheck ? - pFrm->UnionFrm() : - pFrm->PaintArea() ); + pFrame->UnionFrame() : + pFrame->PaintArea() ); if ( aPaintRect.IsInside( rPoint ) && - ( bContentCheck || pFrm->GetCrsrOfst( pPos, rPoint, pCMS ) ) ) + ( bContentCheck || pFrame->GetCursorOfst( pPos, rPoint, pCMS ) ) ) bRet = true; else - pFrm = pFrm->GetNext(); + pFrame = pFrame->GetNext(); if ( pCMS && pCMS->m_bStop ) return false; } @@ -168,30 +168,30 @@ bool SwLayoutFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint, /** Searches the page containing the searched point. */ -bool SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint, - SwCrsrMoveState* pCMS, bool bTestBackground ) const +bool SwPageFrame::GetCursorOfst( SwPosition *pPos, Point &rPoint, + SwCursorMoveState* pCMS, bool bTestBackground ) const { bool bRet = false; Point aPoint( rPoint ); // check, if we have to adjust the point - if ( !Frm().IsInside( aPoint ) ) + if ( !Frame().IsInside( aPoint ) ) { - aPoint.X() = std::max( aPoint.X(), Frm().Left() ); - aPoint.X() = std::min( aPoint.X(), Frm().Right() ); - aPoint.Y() = std::max( aPoint.Y(), Frm().Top() ); - aPoint.Y() = std::min( aPoint.Y(), Frm().Bottom() ); + aPoint.X() = std::max( aPoint.X(), Frame().Left() ); + aPoint.X() = std::min( aPoint.X(), Frame().Right() ); + aPoint.Y() = std::max( aPoint.Y(), Frame().Top() ); + aPoint.Y() = std::min( aPoint.Y(), Frame().Bottom() ); } bool bTextRet = false; bool bBackRet = false; //Could it be a free flying one? - //If his content should be protected, we can't set the Crsr in it, thus + //If his content should be protected, we can't set the Cursor in it, thus //all changes should be impossible. if ( GetSortedObjs() ) { - bRet = lcl_GetCrsrOfst_Objects( this, false, pPos, rPoint, pCMS ); + bRet = lcl_GetCursorOfst_Objects( this, false, pPos, rPoint, pCMS ); } if ( !bRet ) @@ -202,7 +202,7 @@ bool SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint, //We fix the StartPoint if no Content below the page 'answers' and then //start all over again one page before the current one. //However we can't use Flys in such a case. - if ( SwLayoutFrm::GetCrsrOfst( &aTextPos, aPoint, pCMS ) ) + if ( SwLayoutFrame::GetCursorOfst( &aTextPos, aPoint, pCMS ) ) { bTextRet = true; } @@ -210,18 +210,18 @@ bool SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint, { if ( pCMS && (pCMS->m_bStop || pCMS->m_bExactOnly) ) { - static_cast<SwCrsrMoveState*>(pCMS)->m_bStop = true; + static_cast<SwCursorMoveState*>(pCMS)->m_bStop = true; return false; } - const SwContentFrm *pCnt = GetContentPos( aPoint, false, false, false, pCMS, false ); + const SwContentFrame *pCnt = GetContentPos( aPoint, false, false, false, pCMS, false ); if ( pCMS && pCMS->m_bStop ) return false; - OSL_ENSURE( pCnt, "Crsr is gone to a Black hole" ); - if( pCMS && pCMS->m_pFill && pCnt->IsTextFrm() ) - bTextRet = pCnt->GetCrsrOfst( &aTextPos, rPoint, pCMS ); + OSL_ENSURE( pCnt, "Cursor is gone to a Black hole" ); + if( pCMS && pCMS->m_pFill && pCnt->IsTextFrame() ) + bTextRet = pCnt->GetCursorOfst( &aTextPos, rPoint, pCMS ); else - bTextRet = pCnt->GetCrsrOfst( &aTextPos, aPoint, pCMS ); + bTextRet = pCnt->GetCursorOfst( &aTextPos, aPoint, pCMS ); if ( !bTextRet ) { @@ -250,7 +250,7 @@ bool SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint, // Check objects in the background if nothing else matched if ( GetSortedObjs() ) { - bBackRet = lcl_GetCrsrOfst_Objects( this, true, &aBackPos, rPoint, pCMS ); + bBackRet = lcl_GetCursorOfst_Objects( this, true, &aBackPos, rPoint, pCMS ); } if ( ( bConsiderBackground && bTestBackground && bBackRet ) || !bTextRet ) @@ -273,18 +273,18 @@ bool SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint, bool bValidTextDistance = false; if (pContentNode) { - SwContentFrm* pTextFrm = pContentNode->getLayoutFrm( getRootFrm( ) ); + SwContentFrame* pTextFrame = pContentNode->getLayoutFrame( getRootFrame( ) ); // try this again but prefer the "previous" position - SwCrsrMoveState aMoveState; - SwCrsrMoveState *const pState((pCMS) ? pCMS : &aMoveState); + SwCursorMoveState aMoveState; + SwCursorMoveState *const pState((pCMS) ? pCMS : &aMoveState); comphelper::FlagRestorationGuard g( pState->m_bPosMatchesBounds, true); SwPosition prevTextPos(*pPos); - SwLayoutFrm::GetCrsrOfst(&prevTextPos, aPoint, pState); + SwLayoutFrame::GetCursorOfst(&prevTextPos, aPoint, pState); SwRect aTextRect; - pTextFrm->GetCharRect(aTextRect, prevTextPos); + pTextFrame->GetCharRect(aTextRect, prevTextPos); if (prevTextPos.nContent < pContentNode->Len()) { @@ -295,8 +295,8 @@ bool SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint, SwPosition const nextTextPos(prevTextPos.nNode, SwIndex(prevTextPos.nContent, +1)); SwRect nextTextRect; - pTextFrm->GetCharRect(nextTextRect, nextTextPos); - SWRECTFN(pTextFrm); + pTextFrame->GetCharRect(nextTextRect, nextTextPos); + SWRECTFN(pTextFrame); if ((aTextRect.*fnRect->fnGetTop)() == (nextTextRect.*fnRect->fnGetTop)()) // same line? { @@ -325,11 +325,11 @@ bool SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint, if ( pBackNd && bConsiderBackground) { // FIXME There are still cases were we don't have the proper node here. - SwContentFrm* pBackFrm = pBackNd->getLayoutFrm( getRootFrm( ) ); + SwContentFrame* pBackFrame = pBackNd->getLayoutFrame( getRootFrame( ) ); SwRect rBackRect; - if (pBackFrm) + if (pBackFrame) { - pBackFrm->GetCharRect( rBackRect, aBackPos ); + pBackFrame->GetCharRect( rBackRect, aBackPos ); nBackDistance = lcl_getDistance( rBackRect, rPoint ); bValidBackDistance = true; @@ -355,36 +355,36 @@ bool SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint, return bRet; } -bool SwLayoutFrm::FillSelection( SwSelectionList& rList, const SwRect& rRect ) const +bool SwLayoutFrame::FillSelection( SwSelectionList& rList, const SwRect& rRect ) const { bool bRet = false; if( rRect.IsOver(PaintArea()) ) { - const SwFrm* pFrm = Lower(); - while( pFrm ) + const SwFrame* pFrame = Lower(); + while( pFrame ) { - pFrm->FillSelection( rList, rRect ); - pFrm = pFrm->GetNext(); + pFrame->FillSelection( rList, rRect ); + pFrame = pFrame->GetNext(); } } return bRet; } -bool SwPageFrm::FillSelection( SwSelectionList& rList, const SwRect& rRect ) const +bool SwPageFrame::FillSelection( SwSelectionList& rList, const SwRect& rRect ) const { bool bRet = false; if( rRect.IsOver(PaintArea()) ) { - bRet = SwLayoutFrm::FillSelection( rList, rRect ); + bRet = SwLayoutFrame::FillSelection( rList, rRect ); if( GetSortedObjs() ) { const SwSortedObjs &rObjs = *GetSortedObjs(); for ( size_t i = 0; i < rObjs.size(); ++i ) { const SwAnchoredObject* pAnchoredObj = rObjs[i]; - if( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) == nullptr ) + if( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) == nullptr ) continue; - const SwFlyFrm* pFly = static_cast<const SwFlyFrm*>(pAnchoredObj); + const SwFlyFrame* pFly = static_cast<const SwFlyFrame*>(pAnchoredObj); if( pFly->FillSelection( rList, rRect ) ) bRet = true; } @@ -393,15 +393,15 @@ bool SwPageFrm::FillSelection( SwSelectionList& rList, const SwRect& rRect ) con return bRet; } -bool SwRootFrm::FillSelection( SwSelectionList& aSelList, const SwRect& rRect) const +bool SwRootFrame::FillSelection( SwSelectionList& aSelList, const SwRect& rRect) const { - const SwFrm *pPage = Lower(); + const SwFrame *pPage = Lower(); const long nBottom = rRect.Bottom(); while( pPage ) { - if( pPage->Frm().Top() < nBottom ) + if( pPage->Frame().Top() < nBottom ) { - if( pPage->Frm().Bottom() > rRect.Top() ) + if( pPage->Frame().Bottom() > rRect.Top() ) pPage->FillSelection( aSelList, rRect ); pPage = pPage->GetNext(); } @@ -415,37 +415,37 @@ bool SwRootFrm::FillSelection( SwSelectionList& aSelList, const SwRect& rRect) c * * @return false, if the passed Point gets changed */ -bool SwRootFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint, - SwCrsrMoveState* pCMS, bool bTestBackground ) const +bool SwRootFrame::GetCursorOfst( SwPosition *pPos, Point &rPoint, + SwCursorMoveState* pCMS, bool bTestBackground ) const { const bool bOldAction = IsCallbackActionEnabled(); - const_cast<SwRootFrm*>(this)->SetCallbackActionEnabled( false ); - OSL_ENSURE( (Lower() && Lower()->IsPageFrm()), "No PageFrm found." ); + const_cast<SwRootFrame*>(this)->SetCallbackActionEnabled( false ); + OSL_ENSURE( (Lower() && Lower()->IsPageFrame()), "No PageFrame found." ); if( pCMS && pCMS->m_pFill ) - static_cast<SwCrsrMoveState*>(pCMS)->m_bFillRet = false; + static_cast<SwCursorMoveState*>(pCMS)->m_bFillRet = false; Point aOldPoint = rPoint; // search for page containing rPoint. The borders around the pages are considered - const SwPageFrm* pPage = GetPageAtPos( rPoint, nullptr, true ); + const SwPageFrame* pPage = GetPageAtPos( rPoint, nullptr, true ); // #i95626# // special handling for <rPoint> beyond root frames area if ( !pPage && - rPoint.X() > Frm().Right() && - rPoint.Y() > Frm().Bottom() ) + rPoint.X() > Frame().Right() && + rPoint.Y() > Frame().Bottom() ) { - pPage = dynamic_cast<const SwPageFrm*>(Lower()); + pPage = dynamic_cast<const SwPageFrame*>(Lower()); while ( pPage && pPage->GetNext() ) { - pPage = dynamic_cast<const SwPageFrm*>(pPage->GetNext()); + pPage = dynamic_cast<const SwPageFrame*>(pPage->GetNext()); } } if ( pPage ) { - pPage->SwPageFrm::GetCrsrOfst( pPos, rPoint, pCMS, bTestBackground ); + pPage->SwPageFrame::GetCursorOfst( pPos, rPoint, pCMS, bTestBackground ); } - const_cast<SwRootFrm*>(this)->SetCallbackActionEnabled( bOldAction ); + const_cast<SwRootFrame*>(this)->SetCallbackActionEnabled( bOldAction ); if( pCMS ) { if( pCMS->m_bStop ) @@ -457,15 +457,15 @@ bool SwRootFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint, } /** - * If this is about a Content-carrying cell the Crsr will be force inserted into one of the ContentFrms + * If this is about a Content-carrying cell the Cursor will be force inserted into one of the ContentFrames * if there are no other options. * * There is no entry for protected cells. */ -bool SwCellFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint, - SwCrsrMoveState* pCMS, bool ) const +bool SwCellFrame::GetCursorOfst( SwPosition *pPos, Point &rPoint, + SwCursorMoveState* pCMS, bool ) const { - vcl::RenderContext* pRenderContext = getRootFrm()->GetCurrShell()->GetOut(); + vcl::RenderContext* pRenderContext = getRootFrame()->GetCurrShell()->GetOut(); // cell frame does not necessarily have a lower (split table cell) if ( !Lower() ) return false; @@ -476,45 +476,45 @@ bool SwCellFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint, if ( pCMS && pCMS->m_eState == MV_TBLSEL ) { - const SwTabFrm *pTab = FindTabFrm(); + const SwTabFrame *pTab = FindTabFrame(); if ( pTab->IsFollow() && pTab->IsInHeadline( *this ) ) { - static_cast<SwCrsrMoveState*>(pCMS)->m_bStop = true; + static_cast<SwCursorMoveState*>(pCMS)->m_bStop = true; return false; } } if ( Lower() ) { - if ( Lower()->IsLayoutFrm() ) - return SwLayoutFrm::GetCrsrOfst( pPos, rPoint, pCMS ); + if ( Lower()->IsLayoutFrame() ) + return SwLayoutFrame::GetCursorOfst( pPos, rPoint, pCMS ); else { Calc(pRenderContext); bool bRet = false; - const SwFrm *pFrm = Lower(); - while ( pFrm && !bRet ) + const SwFrame *pFrame = Lower(); + while ( pFrame && !bRet ) { - pFrm->Calc(pRenderContext); - if ( pFrm->Frm().IsInside( rPoint ) ) + pFrame->Calc(pRenderContext); + if ( pFrame->Frame().IsInside( rPoint ) ) { - bRet = pFrm->GetCrsrOfst( pPos, rPoint, pCMS ); + bRet = pFrame->GetCursorOfst( pPos, rPoint, pCMS ); if ( pCMS && pCMS->m_bStop ) return false; } - pFrm = pFrm->GetNext(); + pFrame = pFrame->GetNext(); } if ( !bRet ) { const bool bFill = pCMS && pCMS->m_pFill; Point aPoint( rPoint ); - const SwContentFrm *pCnt = GetContentPos( rPoint, true ); - if( bFill && pCnt->IsTextFrm() ) + const SwContentFrame *pCnt = GetContentPos( rPoint, true ); + if( bFill && pCnt->IsTextFrame() ) { rPoint = aPoint; } - pCnt->GetCrsrOfst( pPos, rPoint, pCMS ); + pCnt->GetCursorOfst( pPos, rPoint, pCMS ); } return true; } @@ -528,28 +528,28 @@ bool SwCellFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint, //Because we recursively check if a Point doesn't randomly lie inside an other //fly which lies completely inside the current Fly we could trigger an endless //loop with the mentioned situation above. -//Using the helper class SwCrsrOszControl we prevent the recursion. During -//a recursion GetCrsrOfst picks the one which lies on top. -bool SwFlyFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint, - SwCrsrMoveState* pCMS, bool ) const +//Using the helper class SwCursorOszControl we prevent the recursion. During +//a recursion GetCursorOfst picks the one which lies on top. +bool SwFlyFrame::GetCursorOfst( SwPosition *pPos, Point &rPoint, + SwCursorMoveState* pCMS, bool ) const { - vcl::RenderContext* pRenderContext = getRootFrm()->GetCurrShell()->GetOut(); + vcl::RenderContext* pRenderContext = getRootFrame()->GetCurrShell()->GetOut(); g_OszCtrl.Entry( this ); - //If the Points lies inside the Fly, we try hard to set the Crsr inside it. + //If the Points lies inside the Fly, we try hard to set the Cursor inside it. //However if the Point sits inside a Fly which is completely located inside - //the current one, we call GetCrsrOfst for it. + //the current one, we call GetCursorOfst for it. Calc(pRenderContext); - bool bInside = Frm().IsInside( rPoint ) && Lower(); + bool bInside = Frame().IsInside( rPoint ) && Lower(); bool bRet = false; - //If an Frm contains a graphic, but only text was requested, it basically - //won't accept the Crsr. + //If an Frame contains a graphic, but only text was requested, it basically + //won't accept the Cursor. if ( bInside && pCMS && pCMS->m_eState == MV_SETONLYTEXT && - (!Lower() || Lower()->IsNoTextFrm()) ) + (!Lower() || Lower()->IsNoTextFrame()) ) bInside = false; - const SwPageFrm *pPage = FindPageFrm(); + const SwPageFrame *pPage = FindPageFrame(); if ( bInside && pPage && pPage->GetSortedObjs() ) { SwOrderIter aIter( pPage ); @@ -557,13 +557,13 @@ bool SwFlyFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint, while ( aIter() && !bRet ) { const SwVirtFlyDrawObj* pObj = static_cast<const SwVirtFlyDrawObj*>(aIter()); - const SwFlyFrm* pFly = pObj ? pObj->GetFlyFrm() : nullptr; - if ( pFly && pFly->Frm().IsInside( rPoint ) && - Frm().IsInside( pFly->Frm() ) ) + const SwFlyFrame* pFly = pObj ? pObj->GetFlyFrame() : nullptr; + if ( pFly && pFly->Frame().IsInside( rPoint ) && + Frame().IsInside( pFly->Frame() ) ) { if (g_OszCtrl.ChkOsz(pFly)) break; - bRet = pFly->GetCrsrOfst( pPos, rPoint, pCMS ); + bRet = pFly->GetCursorOfst( pPos, rPoint, pCMS ); if ( bRet ) break; if ( pCMS && pCMS->m_bStop ) @@ -575,30 +575,30 @@ bool SwFlyFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint, while ( bInside && !bRet ) { - const SwFrm *pFrm = Lower(); - while ( pFrm && !bRet ) + const SwFrame *pFrame = Lower(); + while ( pFrame && !bRet ) { - pFrm->Calc(pRenderContext); - if ( pFrm->Frm().IsInside( rPoint ) ) + pFrame->Calc(pRenderContext); + if ( pFrame->Frame().IsInside( rPoint ) ) { - bRet = pFrm->GetCrsrOfst( pPos, rPoint, pCMS ); + bRet = pFrame->GetCursorOfst( pPos, rPoint, pCMS ); if ( pCMS && pCMS->m_bStop ) return false; } - pFrm = pFrm->GetNext(); + pFrame = pFrame->GetNext(); } if ( !bRet ) { const bool bFill = pCMS && pCMS->m_pFill; Point aPoint( rPoint ); - const SwContentFrm *pCnt = GetContentPos( rPoint, true, false, false, pCMS ); + const SwContentFrame *pCnt = GetContentPos( rPoint, true, false, false, pCMS ); if ( pCMS && pCMS->m_bStop ) return false; - if( bFill && pCnt->IsTextFrm() ) + if( bFill && pCnt->IsTextFrame() ) { rPoint = aPoint; } - pCnt->GetCrsrOfst( pPos, rPoint, pCMS ); + pCnt->GetCursorOfst( pPos, rPoint, pCMS ); bRet = true; } } @@ -607,7 +607,7 @@ bool SwFlyFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint, } /** Layout dependent cursor travelling */ -bool SwContentFrm::LeftMargin(SwPaM *pPam) const +bool SwContentFrame::LeftMargin(SwPaM *pPam) const { if( &pPam->GetNode() != GetNode() ) return false; @@ -616,7 +616,7 @@ bool SwContentFrm::LeftMargin(SwPaM *pPam) const return true; } -bool SwContentFrm::RightMargin(SwPaM *pPam, bool) const +bool SwContentFrame::RightMargin(SwPaM *pPam, bool) const { if( &pPam->GetNode() != GetNode() ) return false; @@ -625,32 +625,32 @@ bool SwContentFrm::RightMargin(SwPaM *pPam, bool) const return true; } -static const SwContentFrm *lcl_GetNxtCnt( const SwContentFrm* pCnt ) +static const SwContentFrame *lcl_GetNxtCnt( const SwContentFrame* pCnt ) { - return pCnt->GetNextContentFrm(); + return pCnt->GetNextContentFrame(); } -static const SwContentFrm *lcl_GetPrvCnt( const SwContentFrm* pCnt ) +static const SwContentFrame *lcl_GetPrvCnt( const SwContentFrame* pCnt ) { - return pCnt->GetPrevContentFrm(); + return pCnt->GetPrevContentFrame(); } -typedef const SwContentFrm *(*GetNxtPrvCnt)( const SwContentFrm* ); +typedef const SwContentFrame *(*GetNxtPrvCnt)( const SwContentFrame* ); /// Frame in repeated headline? -static bool lcl_IsInRepeatedHeadline( const SwFrm *pFrm, - const SwTabFrm** ppTFrm = nullptr ) +static bool lcl_IsInRepeatedHeadline( const SwFrame *pFrame, + const SwTabFrame** ppTFrame = nullptr ) { - const SwTabFrm *pTab = pFrm->FindTabFrm(); - if( ppTFrm ) - *ppTFrm = pTab; - return pTab && pTab->IsFollow() && pTab->IsInHeadline( *pFrm ); + const SwTabFrame *pTab = pFrame->FindTabFrame(); + if( ppTFrame ) + *ppTFrame = pTab; + return pTab && pTab->IsFollow() && pTab->IsInHeadline( *pFrame ); } /// Skip protected table cells. Optionally also skip repeated headlines. //MA 1998-01-26: Chg also skip other protected areas //FME: Skip follow flow cells -static const SwContentFrm * lcl_MissProtectedFrames( const SwContentFrm *pCnt, +static const SwContentFrame * lcl_MissProtectedFrames( const SwContentFrame *pCnt, GetNxtPrvCnt fnNxtPrv, bool bMissHeadline, bool bInReadOnly, @@ -661,8 +661,8 @@ static const SwContentFrm * lcl_MissProtectedFrames( const SwContentFrm *pCnt, bool bProtect = true; while ( pCnt && bProtect ) { - const SwLayoutFrm *pCell = pCnt->GetUpper(); - while ( pCell && !pCell->IsCellFrm() ) + const SwLayoutFrame *pCell = pCnt->GetUpper(); + while ( pCell && !pCell->IsCellFrame() ) pCell = pCell->GetUpper(); if ( !pCell || (( ( bInReadOnly || !pCell->GetFormat()->GetProtect().IsContentProtected() ) && @@ -681,13 +681,13 @@ static const SwContentFrm * lcl_MissProtectedFrames( const SwContentFrm *pCnt, return pCnt; } -static bool lcl_UpDown( SwPaM *pPam, const SwContentFrm *pStart, +static bool lcl_UpDown( SwPaM *pPam, const SwContentFrame *pStart, GetNxtPrvCnt fnNxtPrv, bool bInReadOnly ) { OSL_ENSURE( &pPam->GetNode() == pStart->GetNode(), "lcl_UpDown doesn't work for others." ); - const SwContentFrm *pCnt = nullptr; + const SwContentFrame *pCnt = nullptr; //We have to cheat a little bit during a table selection: Go to the //beginning of the cell while going up and go to the end of the cell while @@ -698,25 +698,25 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrm *pStart, pPam->GetNode( false ).StartOfSectionNode() ) { bTableSel = true; - const SwLayoutFrm *pCell = pStart->GetUpper(); - while ( !pCell->IsCellFrm() ) + const SwLayoutFrame *pCell = pStart->GetUpper(); + while ( !pCell->IsCellFrame() ) pCell = pCell->GetUpper(); // Check, if cell has a Prev/Follow cell: const bool bFwd = ( fnNxtPrv == lcl_GetNxtCnt ); - const SwLayoutFrm* pTmpCell = bFwd ? - static_cast<const SwCellFrm*>(pCell)->GetFollowCell() : - static_cast<const SwCellFrm*>(pCell)->GetPreviousCell(); + const SwLayoutFrame* pTmpCell = bFwd ? + static_cast<const SwCellFrame*>(pCell)->GetFollowCell() : + static_cast<const SwCellFrame*>(pCell)->GetPreviousCell(); - const SwContentFrm* pTmpStart = pStart; + const SwContentFrame* pTmpStart = pStart; while ( pTmpCell && nullptr != ( pTmpStart = pTmpCell->ContainsContent() ) ) { pCell = pTmpCell; pTmpCell = bFwd ? - static_cast<const SwCellFrm*>(pCell)->GetFollowCell() : - static_cast<const SwCellFrm*>(pCell)->GetPreviousCell(); + static_cast<const SwCellFrame*>(pCell)->GetFollowCell() : + static_cast<const SwCellFrame*>(pCell)->GetPreviousCell(); } - const SwContentFrm *pNxt = pCnt = pTmpStart; + const SwContentFrame *pNxt = pCnt = pTmpStart; while ( pCell->IsAnLower( pNxt ) ) { @@ -728,26 +728,26 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrm *pStart, pCnt = (*fnNxtPrv)( pCnt ? pCnt : pStart ); pCnt = ::lcl_MissProtectedFrames( pCnt, fnNxtPrv, true, bInReadOnly, bTableSel ); - const SwTabFrm *pStTab = pStart->FindTabFrm(); - const SwTabFrm *pTable = nullptr; + const SwTabFrame *pStTab = pStart->FindTabFrame(); + const SwTabFrame *pTable = nullptr; const bool bTab = pStTab || (pCnt && pCnt->IsInTab()); bool bEnd = !bTab; - const SwFrm* pVertRefFrm = pStart; + const SwFrame* pVertRefFrame = pStart; if ( bTableSel && pStTab ) - pVertRefFrm = pStTab; - SWRECTFN( pVertRefFrm ) + pVertRefFrame = pStTab; + SWRECTFN( pVertRefFrame ) SwTwips nX = 0; if ( bTab ) { // pStart or pCnt is inside a table. nX will be used for travelling: - SwRect aRect( pStart->Frm() ); + SwRect aRect( pStart->Frame() ); pStart->GetCharRect( aRect, *pPam->GetPoint() ); Point aCenter = aRect.Center(); nX = bVert ? aCenter.Y() : aCenter.X(); - pTable = pCnt ? pCnt->FindTabFrm() : nullptr; + pTable = pCnt ? pCnt->FindTabFrame() : nullptr; if ( !pTable ) pTable = pStTab; @@ -755,20 +755,20 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrm *pStart, !pStTab->GetUpper()->IsInTab() && !pTable->GetUpper()->IsInTab() ) { - const SwFrm *pCell = pStart->GetUpper(); - while ( pCell && !pCell->IsCellFrm() ) + const SwFrame *pCell = pStart->GetUpper(); + while ( pCell && !pCell->IsCellFrame() ) pCell = pCell->GetUpper(); OSL_ENSURE( pCell, "could not find the cell" ); - nX = (pCell->Frm().*fnRect->fnGetLeft)() + - (pCell->Frm().*fnRect->fnGetWidth)() / 2; + nX = (pCell->Frame().*fnRect->fnGetLeft)() + + (pCell->Frame().*fnRect->fnGetWidth)() / 2; //The flow leads from one table to the next. The X-value needs to be //corrected based on the middle of the starting cell by the amount //of the offset of the tables. if ( pStTab != pTable ) { - nX += (pTable->Frm().*fnRect->fnGetLeft)() - - (pStTab->Frm().*fnRect->fnGetLeft)(); + nX += (pTable->Frame().*fnRect->fnGetLeft)() - + (pStTab->Frame().*fnRect->fnGetLeft)(); } } @@ -799,7 +799,7 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrm *pStart, if ( pStart->IsInDocBody() ) { while ( pCnt && (!pCnt->IsInDocBody() || - (pCnt->IsTextFrm() && static_cast<const SwTextFrm*>(pCnt)->IsHiddenNow()))) + (pCnt->IsTextFrame() && static_cast<const SwTextFrame*>(pCnt)->IsHiddenNow()))) { pCnt = (*fnNxtPrv)( pCnt ); pCnt = ::lcl_MissProtectedFrames( pCnt, fnNxtPrv, true, bInReadOnly, bTableSel ); @@ -811,7 +811,7 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrm *pStart, else if ( pStart->IsInFootnote() ) { while ( pCnt && (!pCnt->IsInFootnote() || - (pCnt->IsTextFrm() && static_cast<const SwTextFrm*>(pCnt)->IsHiddenNow()))) + (pCnt->IsTextFrame() && static_cast<const SwTextFrame*>(pCnt)->IsHiddenNow()))) { pCnt = (*fnNxtPrv)( pCnt ); pCnt = ::lcl_MissProtectedFrames( pCnt, fnNxtPrv, true, bInReadOnly, bTableSel ); @@ -821,7 +821,7 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrm *pStart, //In Flys we can go ahead blindly as long as we find a Content. else if ( pStart->IsInFly() ) { - if ( pCnt && pCnt->IsTextFrm() && static_cast<const SwTextFrm*>(pCnt)->IsHiddenNow() ) + if ( pCnt && pCnt->IsTextFrame() && static_cast<const SwTextFrame*>(pCnt)->IsHiddenNow() ) { pCnt = (*fnNxtPrv)( pCnt ); pCnt = ::lcl_MissProtectedFrames( pCnt, fnNxtPrv, true, bInReadOnly, bTableSel ); @@ -831,11 +831,11 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrm *pStart, //Otherwise I'll just refuse to leave to current area. else if ( pCnt ) { - const SwFrm *pUp = pStart->GetUpper(); + const SwFrame *pUp = pStart->GetUpper(); while (pUp && pUp->GetUpper() && !(pUp->GetType() & FRM_HEADFOOT)) pUp = pUp->GetUpper(); bool bSame = false; - const SwFrm *pCntUp = pCnt->GetUpper(); + const SwFrame *pCntUp = pCnt->GetUpper(); while ( pCntUp && !bSame ) { if ( pUp == pCntUp ) @@ -845,7 +845,7 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrm *pStart, } if ( !bSame ) pCnt = nullptr; - else if ( pCnt && pCnt->IsTextFrm() && static_cast<const SwTextFrm*>(pCnt)->IsHiddenNow() ) // i73332 + else if ( pCnt && pCnt->IsTextFrame() && static_cast<const SwTextFrame*>(pCnt)->IsHiddenNow() ) // i73332 { pCnt = (*fnNxtPrv)( pCnt ); pCnt = ::lcl_MissProtectedFrames( pCnt, fnNxtPrv, true, bInReadOnly, bTableSel ); @@ -858,7 +858,7 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrm *pStart, bEnd = true; else { - const SwTabFrm *pTab = pCnt->FindTabFrm(); + const SwTabFrame *pTab = pCnt->FindTabFrame(); if( !pTab ) bEnd = true; else @@ -871,18 +871,18 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrm *pStart, if ( pTable && !pTab->GetUpper()->IsInTab() && !pTable->GetUpper()->IsInTab() ) - nX += pTab->Frm().Left() - pTable->Frm().Left(); + nX += pTab->Frame().Left() - pTable->Frame().Left(); pTable = pTab; } - const SwLayoutFrm *pCell = pCnt->GetUpper(); - while ( pCell && !pCell->IsCellFrm() ) + const SwLayoutFrame *pCell = pCnt->GetUpper(); + while ( pCell && !pCell->IsCellFrame() ) pCell = pCell->GetUpper(); Point aInsideCell; Point aInsideCnt; if ( pCell ) { - long nTmpTop = (pCell->Frm().*fnRect->fnGetTop)(); + long nTmpTop = (pCell->Frame().*fnRect->fnGetTop)(); if ( bVert ) { if ( nTmpTop ) @@ -894,7 +894,7 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrm *pStart, aInsideCell = Point( nX, nTmpTop ); } - long nTmpTop = (pCnt->Frm().*fnRect->fnGetTop)(); + long nTmpTop = (pCnt->Frame().*fnRect->fnGetTop)(); if ( bVert ) { if ( nTmpTop ) @@ -905,19 +905,19 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrm *pStart, else aInsideCnt = Point( nX, nTmpTop ); - if ( pCell && pCell->Frm().IsInside( aInsideCell ) ) + if ( pCell && pCell->Frame().IsInside( aInsideCell ) ) { bEnd = true; //Get the right Content out of the cell. - if ( !pCnt->Frm().IsInside( aInsideCnt ) ) + if ( !pCnt->Frame().IsInside( aInsideCnt ) ) { pCnt = pCell->ContainsContent(); if ( fnNxtPrv == lcl_GetPrvCnt ) - while ( pCell->IsAnLower(pCnt->GetNextContentFrm()) ) - pCnt = pCnt->GetNextContentFrm(); + while ( pCell->IsAnLower(pCnt->GetNextContentFrame()) ) + pCnt = pCnt->GetNextContentFrame(); } } - else if ( pCnt->Frm().IsInside( aInsideCnt ) ) + else if ( pCnt->Frame().IsInside( aInsideCnt ) ) bEnd = true; } } @@ -929,7 +929,7 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrm *pStart, } } while ( !bEnd || - (pCnt && pCnt->IsTextFrm() && static_cast<const SwTextFrm*>(pCnt)->IsHiddenNow())); + (pCnt && pCnt->IsTextFrame() && static_cast<const SwTextFrame*>(pCnt)->IsHiddenNow())); if( pCnt ) { // set the Point on the Content-Node @@ -944,12 +944,12 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrm *pStart, return false; } -bool SwContentFrm::UnitUp( SwPaM* pPam, const SwTwips, bool bInReadOnly ) const +bool SwContentFrame::UnitUp( SwPaM* pPam, const SwTwips, bool bInReadOnly ) const { return ::lcl_UpDown( pPam, this, lcl_GetPrvCnt, bInReadOnly ); } -bool SwContentFrm::UnitDown( SwPaM* pPam, const SwTwips, bool bInReadOnly ) const +bool SwContentFrame::UnitDown( SwPaM* pPam, const SwTwips, bool bInReadOnly ) const { return ::lcl_UpDown( pPam, this, lcl_GetNxtCnt, bInReadOnly ); } @@ -959,14 +959,14 @@ bool SwContentFrm::UnitDown( SwPaM* pPam, const SwTwips, bool bInReadOnly ) cons * If the method gets a PaM then the current page is the one in which the PaM sits. Otherwise the * current page is the first one inside the VisibleArea. We only work on available pages! */ -sal_uInt16 SwRootFrm::GetCurrPage( const SwPaM *pActualCrsr ) const +sal_uInt16 SwRootFrame::GetCurrPage( const SwPaM *pActualCursor ) const { - OSL_ENSURE( pActualCrsr, "got no page cursor" ); - SwFrm const*const pActFrm = pActualCrsr->GetPoint()->nNode.GetNode(). - GetContentNode()->getLayoutFrm( this, nullptr, - pActualCrsr->GetPoint(), + OSL_ENSURE( pActualCursor, "got no page cursor" ); + SwFrame const*const pActFrame = pActualCursor->GetPoint()->nNode.GetNode(). + GetContentNode()->getLayoutFrame( this, nullptr, + pActualCursor->GetPoint(), false ); - return pActFrm->FindPageFrm()->GetPhyPageNum(); + return pActFrame->FindPageFrame()->GetPhyPageNum(); } /** Returns a PaM which sits at the beginning of the requested page. @@ -976,54 +976,54 @@ sal_uInt16 SwRootFrm::GetCurrPage( const SwPaM *pActualCrsr ) const * * @return Null, if the operation was not possible. */ -sal_uInt16 SwRootFrm::SetCurrPage( SwCursor* pToSet, sal_uInt16 nPageNum ) +sal_uInt16 SwRootFrame::SetCurrPage( SwCursor* pToSet, sal_uInt16 nPageNum ) { vcl::RenderContext* pRenderContext = GetCurrShell() ? GetCurrShell()->GetOut() : nullptr; - OSL_ENSURE( Lower() && Lower()->IsPageFrm(), "No page available." ); + OSL_ENSURE( Lower() && Lower()->IsPageFrame(), "No page available." ); - SwPageFrm *pPage = static_cast<SwPageFrm*>(Lower()); + SwPageFrame *pPage = static_cast<SwPageFrame*>(Lower()); bool bEnd =false; while ( !bEnd && pPage->GetPhyPageNum() != nPageNum ) { if ( pPage->GetNext() ) - pPage = static_cast<SwPageFrm*>(pPage->GetNext()); + pPage = static_cast<SwPageFrame*>(pPage->GetNext()); else - { //Search the first ContentFrm and format until a new page is started - //or until the ContentFrm are all done. - const SwContentFrm *pContent = pPage->ContainsContent(); + { //Search the first ContentFrame and format until a new page is started + //or until the ContentFrame are all done. + const SwContentFrame *pContent = pPage->ContainsContent(); while ( pContent && pPage->IsAnLower( pContent ) ) { pContent->Calc(pRenderContext); - pContent = pContent->GetNextContentFrm(); + pContent = pContent->GetNextContentFrame(); } //Either this is a new page or we found the last page. if ( pPage->GetNext() ) - pPage = static_cast<SwPageFrm*>(pPage->GetNext()); + pPage = static_cast<SwPageFrame*>(pPage->GetNext()); else bEnd = true; } } //pPage now points to the 'requested' page. Now we have to create the PaM - //on the beginning of the first ContentFrm in the body-text. + //on the beginning of the first ContentFrame in the body-text. //If this is a footnote-page, the PaM will be set in the first footnote. - const SwContentFrm *pContent = pPage->ContainsContent(); + const SwContentFrame *pContent = pPage->ContainsContent(); if ( pPage->IsFootnotePage() ) while ( pContent && !pContent->IsInFootnote() ) - pContent = pContent->GetNextContentFrm(); + pContent = pContent->GetNextContentFrame(); else while ( pContent && !pContent->IsInDocBody() ) - pContent = pContent->GetNextContentFrm(); + pContent = pContent->GetNextContentFrame(); if ( pContent ) { SwContentNode* pCNd = const_cast<SwContentNode*>(pContent->GetNode()); pToSet->GetPoint()->nNode = *pCNd; pCNd->MakeStartIndex( &pToSet->GetPoint()->nContent ); - pToSet->GetPoint()->nContent = static_cast<const SwTextFrm*>(pContent)->GetOfst(); + pToSet->GetPoint()->nContent = static_cast<const SwTextFrame*>(pContent)->GetOfst(); - SwShellCrsr* pSCrsr = dynamic_cast<SwShellCrsr*>(pToSet); - if( pSCrsr ) + SwShellCursor* pSCursor = dynamic_cast<SwShellCursor*>(pToSet); + if( pSCursor ) { - Point &rPt = pSCrsr->GetPtPos(); - rPt = pContent->Frm().Pos(); + Point &rPt = pSCursor->GetPtPos(); + rPt = pContent->Frame().Pos(); rPt += pContent->Prt().Pos(); } return pPage->GetPhyPageNum(); @@ -1031,42 +1031,42 @@ sal_uInt16 SwRootFrm::SetCurrPage( SwCursor* pToSet, sal_uInt16 nPageNum ) return 0; } -SwContentFrm *GetFirstSub( const SwLayoutFrm *pLayout ) +SwContentFrame *GetFirstSub( const SwLayoutFrame *pLayout ) { - return const_cast<SwPageFrm*>(static_cast<const SwPageFrm*>(pLayout))->FindFirstBodyContent(); + return const_cast<SwPageFrame*>(static_cast<const SwPageFrame*>(pLayout))->FindFirstBodyContent(); } -SwContentFrm *GetLastSub( const SwLayoutFrm *pLayout ) +SwContentFrame *GetLastSub( const SwLayoutFrame *pLayout ) { - return const_cast<SwPageFrm*>(static_cast<const SwPageFrm*>(pLayout))->FindLastBodyContent(); + return const_cast<SwPageFrame*>(static_cast<const SwPageFrame*>(pLayout))->FindLastBodyContent(); } -SwLayoutFrm *GetNextFrm( const SwLayoutFrm *pFrm ) +SwLayoutFrame *GetNextFrame( const SwLayoutFrame *pFrame ) { - SwLayoutFrm *pNext = - (pFrm->GetNext() && pFrm->GetNext()->IsLayoutFrm()) ? - const_cast<SwLayoutFrm*>(static_cast<const SwLayoutFrm*>(pFrm->GetNext())) : nullptr; + SwLayoutFrame *pNext = + (pFrame->GetNext() && pFrame->GetNext()->IsLayoutFrame()) ? + const_cast<SwLayoutFrame*>(static_cast<const SwLayoutFrame*>(pFrame->GetNext())) : nullptr; // #i39402# in case of an empty page if(pNext && !pNext->ContainsContent()) - pNext = (pNext->GetNext() && pNext->GetNext()->IsLayoutFrm()) ? - static_cast<SwLayoutFrm*>(pNext->GetNext()) : nullptr; + pNext = (pNext->GetNext() && pNext->GetNext()->IsLayoutFrame()) ? + static_cast<SwLayoutFrame*>(pNext->GetNext()) : nullptr; return pNext; } -SwLayoutFrm *GetThisFrm( const SwLayoutFrm *pFrm ) +SwLayoutFrame *GetThisFrame( const SwLayoutFrame *pFrame ) { - return const_cast<SwLayoutFrm*>(pFrm); + return const_cast<SwLayoutFrame*>(pFrame); } -SwLayoutFrm *GetPrevFrm( const SwLayoutFrm *pFrm ) +SwLayoutFrame *GetPrevFrame( const SwLayoutFrame *pFrame ) { - SwLayoutFrm *pPrev = - (pFrm->GetPrev() && pFrm->GetPrev()->IsLayoutFrm()) ? - const_cast<SwLayoutFrm*>(static_cast<const SwLayoutFrm*>(pFrm->GetPrev())) : nullptr; + SwLayoutFrame *pPrev = + (pFrame->GetPrev() && pFrame->GetPrev()->IsLayoutFrame()) ? + const_cast<SwLayoutFrame*>(static_cast<const SwLayoutFrame*>(pFrame->GetPrev())) : nullptr; // #i39402# in case of an empty page if(pPrev && !pPrev->ContainsContent()) - pPrev = (pPrev->GetPrev() && pPrev->GetPrev()->IsLayoutFrm()) ? - static_cast<SwLayoutFrm*>(pPrev->GetPrev()) : nullptr; + pPrev = (pPrev->GetPrev() && pPrev->GetPrev()->IsLayoutFrame()) ? + static_cast<SwLayoutFrame*>(pPrev->GetPrev()) : nullptr; return pPrev; } @@ -1074,37 +1074,37 @@ SwLayoutFrm *GetPrevFrm( const SwLayoutFrm *pFrm ) //they are declared in cshtyp.hxx SwPosPage fnPageStart = GetFirstSub; SwPosPage fnPageEnd = GetLastSub; -SwWhichPage fnPagePrev = GetPrevFrm; -SwWhichPage fnPageCurr = GetThisFrm; -SwWhichPage fnPageNext = GetNextFrm; +SwWhichPage fnPagePrev = GetPrevFrame; +SwWhichPage fnPageCurr = GetThisFrame; +SwWhichPage fnPageNext = GetNextFrame; /** * Returns the first/last Contentframe (controlled using the parameter fnPosPage) * of the current/previous/next page (controlled using the parameter fnWhichPage). */ -bool GetFrmInPage( const SwContentFrm *pCnt, SwWhichPage fnWhichPage, +bool GetFrameInPage( const SwContentFrame *pCnt, SwWhichPage fnWhichPage, SwPosPage fnPosPage, SwPaM *pPam ) { //First find the requested page, at first the current, then the one which //was requests through fnWichPage. - const SwLayoutFrm *pLayoutFrm = pCnt->FindPageFrm(); - if ( !pLayoutFrm || (nullptr == (pLayoutFrm = (*fnWhichPage)(pLayoutFrm))) ) + const SwLayoutFrame *pLayoutFrame = pCnt->FindPageFrame(); + if ( !pLayoutFrame || (nullptr == (pLayoutFrame = (*fnWhichPage)(pLayoutFrame))) ) return false; - //Now the desired ContentFrm below the page - if( nullptr == (pCnt = (*fnPosPage)(pLayoutFrm)) ) + //Now the desired ContentFrame below the page + if( nullptr == (pCnt = (*fnPosPage)(pLayoutFrame)) ) return false; else { // repeated headlines in tables if ( pCnt->IsInTab() && fnPosPage == GetFirstSub ) { - const SwTabFrm* pTab = pCnt->FindTabFrm(); + const SwTabFrame* pTab = pCnt->FindTabFrame(); if ( pTab->IsFollow() ) { if ( pTab->IsInHeadline( *pCnt ) ) { - SwLayoutFrm* pRow = pTab->GetFirstNonHeadlineRow(); + SwLayoutFrame* pRow = pTab->GetFirstNonHeadlineRow(); if ( pRow ) { // We are in the first line of a follow table @@ -1123,10 +1123,10 @@ bool GetFrmInPage( const SwContentFrm *pCnt, SwWhichPage fnWhichPage, pPam->GetPoint()->nNode = *pCNd; sal_Int32 nIdx; if( fnPosPage == GetFirstSub ) - nIdx = static_cast<const SwTextFrm*>(pCnt)->GetOfst(); + nIdx = static_cast<const SwTextFrame*>(pCnt)->GetOfst(); else nIdx = pCnt->GetFollow() ? - static_cast<const SwTextFrm*>(pCnt)->GetFollow()->GetOfst()-1 : pCNd->Len(); + static_cast<const SwTextFrame*>(pCnt)->GetFollow()->GetOfst()-1 : pCNd->Len(); pPam->GetPoint()->nContent.Assign( pCNd, nIdx ); return true; } @@ -1146,22 +1146,22 @@ static sal_uInt64 CalcDiff(const Point &rPt1, const Point &rPt2) /** Check if the point lies inside the page part in which also the ContentFrame lies. * * In this context header, page body, footer and footnote-container count as page part. - * This will suit the purpose that the ContentFrm which lies in the "right" page part will be + * This will suit the purpose that the ContentFrame which lies in the "right" page part will be * accepted instead of one which doesn't lie there although his distance to the point is shorter. */ -static const SwLayoutFrm* lcl_Inside( const SwContentFrm *pCnt, Point& rPt ) +static const SwLayoutFrame* lcl_Inside( const SwContentFrame *pCnt, Point& rPt ) { - const SwLayoutFrm* pUp = pCnt->GetUpper(); + const SwLayoutFrame* pUp = pCnt->GetUpper(); while( pUp ) { - if( pUp->IsPageBodyFrm() || pUp->IsFooterFrm() || pUp->IsHeaderFrm() ) + if( pUp->IsPageBodyFrame() || pUp->IsFooterFrame() || pUp->IsHeaderFrame() ) { - if( rPt.Y() >= pUp->Frm().Top() && rPt.Y() <= pUp->Frm().Bottom() ) + if( rPt.Y() >= pUp->Frame().Top() && rPt.Y() <= pUp->Frame().Bottom() ) return pUp; return nullptr; } - if( pUp->IsFootnoteContFrm() ) - return pUp->Frm().IsInside( rPt ) ? pUp : nullptr; + if( pUp->IsFootnoteContFrame() ) + return pUp->Frame().IsInside( rPt ) ? pUp : nullptr; pUp = pUp->GetUpper(); } return nullptr; @@ -1172,30 +1172,30 @@ static const SwLayoutFrm* lcl_Inside( const SwContentFrm *pCnt, Point& rPt ) * Considers the previous, the current and the next page. * If no content is found, the area gets expanded until one is found. * - * @return The 'semantically correct' position inside the PrtArea of the found ContentFrm. + * @return The 'semantically correct' position inside the PrtArea of the found ContentFrame. */ -const SwContentFrm *SwLayoutFrm::GetContentPos( Point& rPoint, +const SwContentFrame *SwLayoutFrame::GetContentPos( Point& rPoint, const bool bDontLeave, const bool bBodyOnly, const bool bCalc, - const SwCrsrMoveState *pCMS, + const SwCursorMoveState *pCMS, const bool bDefaultExpand ) const { - vcl::RenderContext* pRenderContext = getRootFrm()->GetCurrShell()->GetOut(); - //Determine the first ContentFrm. - const SwLayoutFrm *pStart = (!bDontLeave && bDefaultExpand && GetPrev()) ? - static_cast<const SwLayoutFrm*>(GetPrev()) : this; - const SwContentFrm *pContent = pStart->ContainsContent(); + vcl::RenderContext* pRenderContext = getRootFrame()->GetCurrShell()->GetOut(); + //Determine the first ContentFrame. + const SwLayoutFrame *pStart = (!bDontLeave && bDefaultExpand && GetPrev()) ? + static_cast<const SwLayoutFrame*>(GetPrev()) : this; + const SwContentFrame *pContent = pStart->ContainsContent(); if ( !pContent && (GetPrev() && !bDontLeave) ) pContent = ContainsContent(); if ( bBodyOnly && pContent && !pContent->IsInDocBody() ) while ( pContent && !pContent->IsInDocBody() ) - pContent = pContent->GetNextContentFrm(); + pContent = pContent->GetNextContentFrame(); - const SwContentFrm *pActual= pContent; - const SwLayoutFrm *pInside = nullptr; + const SwContentFrame *pActual= pContent; + const SwLayoutFrame *pInside = nullptr; sal_uInt16 nMaxPage = GetPhyPageNum() + (bDefaultExpand ? 1 : 0); Point aPoint = rPoint; sal_uInt64 nDistance = SAL_MAX_UINT64; @@ -1206,24 +1206,24 @@ const SwContentFrm *SwLayoutFrm::GetContentPos( Point& rPoint, ((!bDontLeave || IsAnLower( pContent )) && (pContent->GetPhyPageNum() <= nMaxPage)) ) { - if ( ( bCalc || pContent->Frm().Width() ) && + if ( ( bCalc || pContent->Frame().Width() ) && ( !bBodyOnly || pContent->IsInDocBody() ) ) { //If the Content lies in a protected area (cell, Footnote, section), //we search the next Content which is not protected. - const SwContentFrm *pComp = pContent; + const SwContentFrame *pComp = pContent; pContent = ::lcl_MissProtectedFrames( pContent, lcl_GetNxtCnt, false, pCMS && pCMS->m_bSetInReadOnly, false ); if ( pComp != pContent ) continue; - if ( !pContent->IsTextFrm() || !static_cast<const SwTextFrm*>(pContent)->IsHiddenNow() ) + if ( !pContent->IsTextFrame() || !static_cast<const SwTextFrame*>(pContent)->IsHiddenNow() ) { if ( bCalc ) pContent->Calc(pRenderContext); - SwRect aCntFrm( pContent->UnionFrm() ); - if ( aCntFrm.IsInside( rPoint ) ) + SwRect aContentFrame( pContent->UnionFrame() ); + if ( aContentFrame.IsInside( rPoint ) ) { pActual = pContent; aPoint = rPoint; @@ -1234,22 +1234,22 @@ const SwContentFrm *SwLayoutFrm::GetContentPos( Point& rPoint, Point aContentPoint( rPoint ); //First set the vertical position - if ( aCntFrm.Top() > aContentPoint.Y() ) - aContentPoint.Y() = aCntFrm.Top(); - else if ( aCntFrm.Bottom() < aContentPoint.Y() ) - aContentPoint.Y() = aCntFrm.Bottom(); + if ( aContentFrame.Top() > aContentPoint.Y() ) + aContentPoint.Y() = aContentFrame.Top(); + else if ( aContentFrame.Bottom() < aContentPoint.Y() ) + aContentPoint.Y() = aContentFrame.Bottom(); //Now the horizontal position - if ( aCntFrm.Left() > aContentPoint.X() ) - aContentPoint.X() = aCntFrm.Left(); - else if ( aCntFrm.Right() < aContentPoint.X() ) - aContentPoint.X() = aCntFrm.Right(); + if ( aContentFrame.Left() > aContentPoint.X() ) + aContentPoint.X() = aContentFrame.Left(); + else if ( aContentFrame.Right() < aContentPoint.X() ) + aContentPoint.X() = aContentFrame.Right(); // pInside is a page area in which the point lies. As soon // as pInside != 0 only frames are accepted which are // placed inside. if( !pInside || ( pInside->IsAnLower( pContent ) && - ( !pContent->IsInFootnote() || pInside->IsFootnoteContFrm() ) ) ) + ( !pContent->IsInFootnote() || pInside->IsFootnoteContFrame() ) ) ) { const sal_uInt64 nDiff = ::CalcDiff(aContentPoint, rPoint); bool bBetter = nDiff < nDistance; // This one is nearer @@ -1268,10 +1268,10 @@ const SwContentFrm *SwLayoutFrm::GetContentPos( Point& rPoint, } } } - pContent = pContent->GetNextContentFrm(); + pContent = pContent->GetNextContentFrame(); if ( bBodyOnly ) while ( pContent && !pContent->IsInDocBody() ) - pContent = pContent->GetNextContentFrm(); + pContent = pContent->GetNextContentFrame(); } if ( !pActual ) { //If we not yet found one we have to expand the searched @@ -1283,18 +1283,18 @@ const SwContentFrm *SwLayoutFrm::GetContentPos( Point& rPoint, while ( !pContent && pStart->GetPrev() ) { ++nMaxPage; - if( !pStart->GetPrev()->IsLayoutFrm() ) + if( !pStart->GetPrev()->IsLayoutFrame() ) return nullptr; - pStart = static_cast<const SwLayoutFrm*>(pStart->GetPrev()); + pStart = static_cast<const SwLayoutFrame*>(pStart->GetPrev()); pContent = pStart->IsInDocBody() ? pStart->ContainsContent() - : pStart->FindPageFrm()->FindFirstBodyContent(); + : pStart->FindPageFrame()->FindFirstBodyContent(); } if ( !pContent ) // Somewhere down the road we have to start with one! { - pContent = pStart->FindPageFrm()->GetUpper()->ContainsContent(); + pContent = pStart->FindPageFrame()->GetUpper()->ContainsContent(); while ( pContent && !pContent->IsInDocBody() ) - pContent = pContent->GetNextContentFrm(); + pContent = pContent->GetNextContentFrame(); if ( !pContent ) return nullptr; // There is no document content yet! } @@ -1304,13 +1304,13 @@ const SwContentFrm *SwLayoutFrm::GetContentPos( Point& rPoint, ++nMaxPage; if ( pStart->GetPrev() ) { - if( !pStart->GetPrev()->IsLayoutFrm() ) + if( !pStart->GetPrev()->IsLayoutFrame() ) return nullptr; - pStart = static_cast<const SwLayoutFrm*>(pStart->GetPrev()); + pStart = static_cast<const SwLayoutFrame*>(pStart->GetPrev()); pContent = pStart->ContainsContent(); } else // Somewhere down the road we have to start with one! - pContent = pStart->FindPageFrm()->GetUpper()->ContainsContent(); + pContent = pStart->FindPageFrame()->GetUpper()->ContainsContent(); } pActual = pContent; } @@ -1324,10 +1324,10 @@ const SwContentFrm *SwLayoutFrm::GetContentPos( Point& rPoint, //Special case for selecting tables not in repeated TableHeadlines. if ( pActual->IsInTab() && pCMS && pCMS->m_eState == MV_TBLSEL ) { - const SwTabFrm *pTab = pActual->FindTabFrm(); + const SwTabFrame *pTab = pActual->FindTabFrame(); if ( pTab->IsFollow() && pTab->IsInHeadline( *pActual ) ) { - const_cast<SwCrsrMoveState*>(pCMS)->m_bStop = true; + const_cast<SwCursorMoveState*>(pCMS)->m_bStop = true; return nullptr; } } @@ -1342,8 +1342,8 @@ const SwContentFrm *SwLayoutFrm::GetContentPos( Point& rPoint, (*fnRect->fnYDiff)( (pActual->*fnRect->fnGetPrtTop)(), bVert ? rPoint.X() : rPoint.Y() ) > 0 ) { - aPoint.Y() = pActual->Frm().Top() + pActual->Prt().Top(); - aPoint.X() = pActual->Frm().Left() + + aPoint.Y() = pActual->Frame().Top() + pActual->Prt().Top(); + aPoint.X() = pActual->Frame().Left() + ( pActual->IsRightToLeft() || bVert ? pActual->Prt().Right() : pActual->Prt().Left() ); @@ -1352,8 +1352,8 @@ const SwContentFrm *SwLayoutFrm::GetContentPos( Point& rPoint, (*fnRect->fnYDiff)( (pActual->*fnRect->fnGetPrtBottom)(), bVert ? rPoint.X() : rPoint.Y() ) < 0 ) { - aPoint.Y() = pActual->Frm().Top() + pActual->Prt().Bottom(); - aPoint.X() = pActual->Frm().Left() + + aPoint.Y() = pActual->Frame().Top() + pActual->Prt().Bottom(); + aPoint.X() = pActual->Frame().Left() + ( pActual->IsRightToLeft() || bVert ? pActual->Prt().Left() : pActual->Prt().Right() ); @@ -1362,7 +1362,7 @@ const SwContentFrm *SwLayoutFrm::GetContentPos( Point& rPoint, //Bring the Point in to the PrtArea if ( bCalc ) pActual->Calc(pRenderContext); - const SwRect aRect( pActual->Frm().Pos() + pActual->Prt().Pos(), + const SwRect aRect( pActual->Frame().Pos() + pActual->Prt().Pos(), aActualSize ); if ( aPoint.Y() < aRect.Top() ) aPoint.Y() = aRect.Top(); @@ -1376,31 +1376,31 @@ const SwContentFrm *SwLayoutFrm::GetContentPos( Point& rPoint, return pActual; } -/** Same as SwLayoutFrm::GetContentPos(). Specialized for fields and border. */ -void SwPageFrm::GetContentPosition( const Point &rPt, SwPosition &rPos ) const +/** Same as SwLayoutFrame::GetContentPos(). Specialized for fields and border. */ +void SwPageFrame::GetContentPosition( const Point &rPt, SwPosition &rPos ) const { - //Determine the first ContentFrm. - const SwContentFrm *pContent = ContainsContent(); + //Determine the first ContentFrame. + const SwContentFrame *pContent = ContainsContent(); if ( pContent ) { //Look back one more (if possible). - const SwContentFrm *pTmp = pContent->GetPrevContentFrm(); + const SwContentFrame *pTmp = pContent->GetPrevContentFrame(); while ( pTmp && !pTmp->IsInDocBody() ) - pTmp = pTmp->GetPrevContentFrm(); + pTmp = pTmp->GetPrevContentFrame(); if ( pTmp ) pContent = pTmp; } else pContent = GetUpper()->ContainsContent(); - const SwContentFrm *pAct = pContent; + const SwContentFrame *pAct = pContent; Point aAct = rPt; sal_uInt64 nDist = SAL_MAX_UINT64; while ( pContent ) { - SwRect aCntFrm( pContent->UnionFrm() ); - if ( aCntFrm.IsInside( rPt ) ) + SwRect aContentFrame( pContent->UnionFrame() ); + if ( aContentFrame.IsInside( rPt ) ) { //This is the nearest one. pAct = pContent; @@ -1411,16 +1411,16 @@ void SwPageFrm::GetContentPosition( const Point &rPt, SwPosition &rPos ) const Point aPoint( rPt ); //Calculate the vertical position first - if ( aCntFrm.Top() > rPt.Y() ) - aPoint.Y() = aCntFrm.Top(); - else if ( aCntFrm.Bottom() < rPt.Y() ) - aPoint.Y() = aCntFrm.Bottom(); + if ( aContentFrame.Top() > rPt.Y() ) + aPoint.Y() = aContentFrame.Top(); + else if ( aContentFrame.Bottom() < rPt.Y() ) + aPoint.Y() = aContentFrame.Bottom(); //And now the horizontal position - if ( aCntFrm.Left() > rPt.X() ) - aPoint.X() = aCntFrm.Left(); - else if ( aCntFrm.Right() < rPt.X() ) - aPoint.X() = aCntFrm.Right(); + if ( aContentFrame.Left() > rPt.X() ) + aPoint.X() = aContentFrame.Left(); + else if ( aContentFrame.Right() < rPt.X() ) + aPoint.X() = aContentFrame.Right(); const sal_uInt64 nDiff = ::CalcDiff( aPoint, rPt ); if ( nDiff < nDist ) @@ -1429,17 +1429,17 @@ void SwPageFrm::GetContentPosition( const Point &rPt, SwPosition &rPos ) const nDist = nDiff; pAct = pContent; } - else if ( aCntFrm.Top() > Frm().Bottom() ) + else if ( aContentFrame.Top() > Frame().Bottom() ) //In terms of fields, it's not possible to be closer any more! break; - pContent = pContent->GetNextContentFrm(); + pContent = pContent->GetNextContentFrame(); while ( pContent && !pContent->IsInDocBody() ) - pContent = pContent->GetNextContentFrm(); + pContent = pContent->GetNextContentFrame(); } //Bring the point into the PrtArea. - const SwRect aRect( pAct->Frm().Pos() + pAct->Prt().Pos(), pAct->Prt().SSize() ); + const SwRect aRect( pAct->Frame().Pos() + pAct->Prt().Pos(), pAct->Prt().SSize() ); if ( aAct.Y() < aRect.Top() ) aAct.Y() = aRect.Top(); else if ( aAct.Y() > aRect.Bottom() ) @@ -1451,7 +1451,7 @@ void SwPageFrm::GetContentPosition( const Point &rPt, SwPosition &rPos ) const if( !pAct->IsValid() ) { - // ContentFrm not formatted -> always on node-beginning + // ContentFrame not formatted -> always on node-beginning SwContentNode* pCNd = const_cast<SwContentNode*>(pAct->GetNode()); OSL_ENSURE( pCNd, "Where is my ContentNode?" ); rPos.nNode = *pCNd; @@ -1459,8 +1459,8 @@ void SwPageFrm::GetContentPosition( const Point &rPt, SwPosition &rPos ) const } else { - SwCrsrMoveState aTmpState( MV_SETONLYTEXT ); - pAct->GetCrsrOfst( &rPos, aAct, &aTmpState ); + SwCursorMoveState aTmpState( MV_SETONLYTEXT ); + pAct->GetCursorOfst( &rPos, aAct, &aTmpState ); } } @@ -1469,20 +1469,20 @@ void SwPageFrm::GetContentPosition( const Point &rPt, SwPosition &rPos ) const class DisableCallbackAction { private: - SwRootFrm& mrRootFrm; + SwRootFrame& mrRootFrame; bool mbOldCallbackActionState; public: - explicit DisableCallbackAction( const SwRootFrm& _rRootFrm ) : - mrRootFrm( const_cast<SwRootFrm&>(_rRootFrm) ), - mbOldCallbackActionState( _rRootFrm.IsCallbackActionEnabled() ) + explicit DisableCallbackAction( const SwRootFrame& _rRootFrame ) : + mrRootFrame( const_cast<SwRootFrame&>(_rRootFrame) ), + mbOldCallbackActionState( _rRootFrame.IsCallbackActionEnabled() ) { - mrRootFrm.SetCallbackActionEnabled( false ); + mrRootFrame.SetCallbackActionEnabled( false ); } ~DisableCallbackAction() { - mrRootFrm.SetCallbackActionEnabled( mbOldCallbackActionState ); + mrRootFrame.SetCallbackActionEnabled( mbOldCallbackActionState ); } }; @@ -1492,24 +1492,24 @@ class DisableCallbackAction * @note Only the nearest vertically one will be searched. * @note JP 11.10.2001: only in tables we try to find the right column - Bug 72294 */ -Point SwRootFrm::GetNextPrevContentPos( const Point& rPoint, bool bNext ) const +Point SwRootFrame::GetNextPrevContentPos( const Point& rPoint, bool bNext ) const { vcl::RenderContext* pRenderContext = GetCurrShell() ? GetCurrShell()->GetOut() : nullptr; // #123110# - disable creation of an action by a callback // event during processing of this method. Needed because formatting is // triggered by this method. DisableCallbackAction aDisableCallbackAction( *this ); - //Search the first ContentFrm and his successor in the body area. + //Search the first ContentFrame and his successor in the body area. //To be efficient (and not formatting too much) we'll start at the correct //page. - const SwLayoutFrm *pPage = static_cast<const SwLayoutFrm*>(Lower()); + const SwLayoutFrame *pPage = static_cast<const SwLayoutFrame*>(Lower()); if( pPage ) - while( pPage->GetNext() && pPage->Frm().Bottom() < rPoint.Y() ) - pPage = static_cast<const SwLayoutFrm*>(pPage->GetNext()); + while( pPage->GetNext() && pPage->Frame().Bottom() < rPoint.Y() ) + pPage = static_cast<const SwLayoutFrame*>(pPage->GetNext()); - const SwContentFrm *pCnt = pPage ? pPage->ContainsContent() : ContainsContent(); + const SwContentFrame *pCnt = pPage ? pPage->ContainsContent() : ContainsContent(); while ( pCnt && !pCnt->IsInDocBody() ) - pCnt = pCnt->GetNextContentFrm(); + pCnt = pCnt->GetNextContentFrame(); if ( !pCnt ) return Point( 0, 0 ); @@ -1517,65 +1517,65 @@ Point SwRootFrm::GetNextPrevContentPos( const Point& rPoint, bool bNext ) const pCnt->Calc(pRenderContext); if( !bNext ) { - // As long as the point lies before the first ContentFrm and there are + // As long as the point lies before the first ContentFrame and there are // still precedent pages I'll go to the next page. - while ( rPoint.Y() < pCnt->Frm().Top() && pPage->GetPrev() ) + while ( rPoint.Y() < pCnt->Frame().Top() && pPage->GetPrev() ) { - pPage = static_cast<const SwLayoutFrm*>(pPage->GetPrev()); + pPage = static_cast<const SwLayoutFrame*>(pPage->GetPrev()); pCnt = pPage->ContainsContent(); while ( !pCnt ) { - pPage = static_cast<const SwLayoutFrm*>(pPage->GetPrev()); + pPage = static_cast<const SwLayoutFrame*>(pPage->GetPrev()); if ( pPage ) pCnt = pPage->ContainsContent(); else - return ContainsContent()->UnionFrm().Pos(); + return ContainsContent()->UnionFrame().Pos(); } pCnt->Calc(pRenderContext); } } - //Does the point lie above the first ContentFrm? - if ( rPoint.Y() < pCnt->Frm().Top() && !lcl_IsInRepeatedHeadline( pCnt ) ) - return pCnt->UnionFrm().Pos(); + //Does the point lie above the first ContentFrame? + if ( rPoint.Y() < pCnt->Frame().Top() && !lcl_IsInRepeatedHeadline( pCnt ) ) + return pCnt->UnionFrame().Pos(); Point aRet(0, 0); do { - //Does the point lie in the current ContentFrm? - SwRect aCntFrm( pCnt->UnionFrm() ); - if ( aCntFrm.IsInside( rPoint ) && !lcl_IsInRepeatedHeadline( pCnt )) + //Does the point lie in the current ContentFrame? + SwRect aContentFrame( pCnt->UnionFrame() ); + if ( aContentFrame.IsInside( rPoint ) && !lcl_IsInRepeatedHeadline( pCnt )) { aRet = rPoint; break; } - //Is the current one the last ContentFrm? - //If the next ContentFrm lies behind the point, then the current on is the + //Is the current one the last ContentFrame? + //If the next ContentFrame lies behind the point, then the current on is the //one we searched. - const SwContentFrm *pNxt = pCnt->GetNextContentFrm(); + const SwContentFrame *pNxt = pCnt->GetNextContentFrame(); while ( pNxt && !pNxt->IsInDocBody() ) - pNxt = pNxt->GetNextContentFrm(); + pNxt = pNxt->GetNextContentFrame(); - //Does the point lie behind the last ContentFrm? + //Does the point lie behind the last ContentFrame? if ( !pNxt ) { - aRet = Point( aCntFrm.Right(), aCntFrm.Bottom() ); + aRet = Point( aContentFrame.Right(), aContentFrame.Bottom() ); break; } - //If the next ContentFrm lies behind the point then it is the one we + //If the next ContentFrame lies behind the point then it is the one we //searched. - const SwTabFrm* pTFrm; + const SwTabFrame* pTFrame; pNxt->Calc(pRenderContext); - if( pNxt->Frm().Top() > rPoint.Y() && - !lcl_IsInRepeatedHeadline( pCnt, &pTFrm ) && - ( !pTFrm || pNxt->Frm().Left() > rPoint.X() )) + if( pNxt->Frame().Top() > rPoint.Y() && + !lcl_IsInRepeatedHeadline( pCnt, &pTFrame ) && + ( !pTFrame || pNxt->Frame().Left() > rPoint.X() )) { if (bNext) - aRet = pNxt->Frm().Pos(); + aRet = pNxt->Frame().Pos(); else - aRet = Point( aCntFrm.Right(), aCntFrm.Bottom() ); + aRet = Point( aContentFrame.Right(), aContentFrame.Bottom() ); break; } pCnt = pNxt; @@ -1591,35 +1591,35 @@ Point SwRootFrm::GetNextPrevContentPos( const Point& rPoint, bool bNext ) const * * @return Null, if the operation failed. */ -Point SwRootFrm::GetPagePos( sal_uInt16 nPageNum ) const +Point SwRootFrame::GetPagePos( sal_uInt16 nPageNum ) const { - OSL_ENSURE( Lower() && Lower()->IsPageFrm(), "No page available." ); + OSL_ENSURE( Lower() && Lower()->IsPageFrame(), "No page available." ); - const SwPageFrm *pPage = static_cast<const SwPageFrm*>(Lower()); + const SwPageFrame *pPage = static_cast<const SwPageFrame*>(Lower()); while ( true ) { if ( pPage->GetPhyPageNum() >= nPageNum || !pPage->GetNext() ) break; - pPage = static_cast<const SwPageFrm*>(pPage->GetNext()); + pPage = static_cast<const SwPageFrame*>(pPage->GetNext()); } - return pPage->Frm().Pos(); + return pPage->Frame().Pos(); } /** get page frame by phyiscal page number * * @return pointer to the page frame with the given physical page number */ -SwPageFrm* SwRootFrm::GetPageByPageNum( sal_uInt16 _nPageNum ) const +SwPageFrame* SwRootFrame::GetPageByPageNum( sal_uInt16 _nPageNum ) const { - const SwPageFrm* pPageFrm = static_cast<const SwPageFrm*>( Lower() ); - while ( pPageFrm && pPageFrm->GetPhyPageNum() < _nPageNum ) + const SwPageFrame* pPageFrame = static_cast<const SwPageFrame*>( Lower() ); + while ( pPageFrame && pPageFrame->GetPhyPageNum() < _nPageNum ) { - pPageFrm = static_cast<const SwPageFrm*>( pPageFrm->GetNext() ); + pPageFrame = static_cast<const SwPageFrame*>( pPageFrame->GetNext() ); } - if ( pPageFrm && pPageFrm->GetPhyPageNum() == _nPageNum ) + if ( pPageFrame && pPageFrame->GetPhyPageNum() == _nPageNum ) { - return const_cast<SwPageFrm*>( pPageFrm ); + return const_cast<SwPageFrame*>( pPageFrame ); } else { @@ -1630,81 +1630,81 @@ SwPageFrm* SwRootFrm::GetPageByPageNum( sal_uInt16 _nPageNum ) const /** * @return true, when the given physical pagenumber does't exist or this page is an empty page. */ -bool SwRootFrm::IsDummyPage( sal_uInt16 nPageNum ) const +bool SwRootFrame::IsDummyPage( sal_uInt16 nPageNum ) const { if( !Lower() || !nPageNum || nPageNum > GetPageNum() ) return true; - const SwPageFrm *pPage = static_cast<const SwPageFrm*>(Lower()); + const SwPageFrame *pPage = static_cast<const SwPageFrame*>(Lower()); while( pPage && nPageNum < pPage->GetPhyPageNum() ) - pPage = static_cast<const SwPageFrm*>(pPage->GetNext()); + pPage = static_cast<const SwPageFrame*>(pPage->GetNext()); return !pPage || pPage->IsEmptyPage(); } -/** Is the Frm or rather the Section in which it lies protected? +/** Is the Frame or rather the Section in which it lies protected? * * Also Fly in Fly in ... and Footnotes */ -bool SwFrm::IsProtected() const +bool SwFrame::IsProtected() const { - if (this->IsContentFrm() && static_cast<const SwContentFrm*>(this)->GetNode()) + if (this->IsContentFrame() && static_cast<const SwContentFrame*>(this)->GetNode()) { - const SwDoc *pDoc=static_cast<const SwContentFrm*>(this)->GetNode()->GetDoc(); + const SwDoc *pDoc=static_cast<const SwContentFrame*>(this)->GetNode()->GetDoc(); bool isFormProtected=pDoc->GetDocumentSettingManager().get(DocumentSettingId::PROTECT_FORM ); if (isFormProtected) { return false; // TODO a hack for now, well deal with it later, I we return true here we have a "double" locking } } - //The Frm can be protected in borders, cells or sections. - //Also goes up FlyFrms recursive and from footnote to anchor. - const SwFrm *pFrm = this; + //The Frame can be protected in borders, cells or sections. + //Also goes up FlyFrames recursive and from footnote to anchor. + const SwFrame *pFrame = this; do { - if ( pFrm->IsContentFrm() ) + if ( pFrame->IsContentFrame() ) { - if ( static_cast<const SwContentFrm*>(pFrm)->GetNode() && - static_cast<const SwContentFrm*>(pFrm)->GetNode()->IsInProtectSect() ) + if ( static_cast<const SwContentFrame*>(pFrame)->GetNode() && + static_cast<const SwContentFrame*>(pFrame)->GetNode()->IsInProtectSect() ) return true; } else { - if ( static_cast<const SwLayoutFrm*>(pFrm)->GetFormat() && - static_cast<const SwLayoutFrm*>(pFrm)->GetFormat()-> + if ( static_cast<const SwLayoutFrame*>(pFrame)->GetFormat() && + static_cast<const SwLayoutFrame*>(pFrame)->GetFormat()-> GetProtect().IsContentProtected() ) return true; - if ( pFrm->IsCoveredCell() ) + if ( pFrame->IsCoveredCell() ) return true; } - if ( pFrm->IsFlyFrm() ) + if ( pFrame->IsFlyFrame() ) { //In a chain the protection of the content can be specified by the //master of the chain. - if ( static_cast<const SwFlyFrm*>(pFrm)->GetPrevLink() ) + if ( static_cast<const SwFlyFrame*>(pFrame)->GetPrevLink() ) { - const SwFlyFrm *pMaster = static_cast<const SwFlyFrm*>(pFrm); + const SwFlyFrame *pMaster = static_cast<const SwFlyFrame*>(pFrame); do { pMaster = pMaster->GetPrevLink(); } while ( pMaster->GetPrevLink() ); if ( pMaster->IsProtected() ) return true; } - pFrm = static_cast<const SwFlyFrm*>(pFrm)->GetAnchorFrm(); + pFrame = static_cast<const SwFlyFrame*>(pFrame)->GetAnchorFrame(); } - else if ( pFrm->IsFootnoteFrm() ) - pFrm = static_cast<const SwFootnoteFrm*>(pFrm)->GetRef(); + else if ( pFrame->IsFootnoteFrame() ) + pFrame = static_cast<const SwFootnoteFrame*>(pFrame)->GetRef(); else - pFrm = pFrm->GetUpper(); + pFrame = pFrame->GetUpper(); - } while ( pFrm ); + } while ( pFrame ); return false; } /** @return the physical page number */ -sal_uInt16 SwFrm::GetPhyPageNum() const +sal_uInt16 SwFrame::GetPhyPageNum() const { - const SwPageFrm *pPage = FindPageFrm(); + const SwPageFrame *pPage = FindPageFrame(); return pPage ? pPage->GetPhyPageNum() : 0; } @@ -1719,20 +1719,20 @@ sal_uInt16 SwFrm::GetPhyPageNum() const * If there is no number offset, we take the physical page number instead, * but a previous empty page don't count. */ -bool SwFrm::WannaRightPage() const +bool SwFrame::WannaRightPage() const { - const SwPageFrm *pPage = FindPageFrm(); + const SwPageFrame *pPage = FindPageFrame(); if ( !pPage || !pPage->GetUpper() ) return true; - const SwFrm *pFlow = pPage->FindFirstBodyContent(); + const SwFrame *pFlow = pPage->FindFirstBodyContent(); const SwPageDesc *pDesc = nullptr; ::boost::optional<sal_uInt16> oPgNum; if ( pFlow ) { if ( pFlow->IsInTab() ) - pFlow = pFlow->FindTabFrm(); - const SwFlowFrm *pTmp = SwFlowFrm::CastFlowFrm( pFlow ); + pFlow = pFlow->FindTabFrame(); + const SwFlowFrame *pTmp = SwFlowFrame::CastFlowFrame( pFlow ); if ( !pTmp->IsFollow() ) { const SwFormatPageDesc& rPgDesc = pFlow->GetAttrSet()->GetPageDesc(); @@ -1742,9 +1742,9 @@ bool SwFrm::WannaRightPage() const } if ( !pDesc ) { - SwPageFrm *pPrv = const_cast<SwPageFrm*>(static_cast<const SwPageFrm*>(pPage->GetPrev())); + SwPageFrame *pPrv = const_cast<SwPageFrame*>(static_cast<const SwPageFrame*>(pPage->GetPrev())); if( pPrv && pPrv->IsEmptyPage() ) - pPrv = static_cast<SwPageFrm*>(pPrv->GetPrev()); + pPrv = static_cast<SwPageFrame*>(pPrv->GetPrev()); if( pPrv ) pDesc = pPrv->GetPageDesc()->GetFollow(); else @@ -1760,7 +1760,7 @@ bool SwFrm::WannaRightPage() const else { bOdd = pPage->OnRightPage(); - if( pPage->GetPrev() && static_cast<const SwPageFrm*>(pPage->GetPrev())->IsEmptyPage() ) + if( pPage->GetPrev() && static_cast<const SwPageFrame*>(pPage->GetPrev())->IsEmptyPage() ) bOdd = !bOdd; } if( !pPage->IsEmptyPage() ) @@ -1773,18 +1773,18 @@ bool SwFrm::WannaRightPage() const return bOdd; } -bool SwFrm::OnFirstPage() const +bool SwFrame::OnFirstPage() const { bool bRet = false; - const SwPageFrm *pPage = FindPageFrm(); + const SwPageFrame *pPage = FindPageFrame(); if (pPage) { - const SwPageFrm* pPrevFrm = dynamic_cast<const SwPageFrm*>(pPage->GetPrev()); - if (pPrevFrm) + const SwPageFrame* pPrevFrame = dynamic_cast<const SwPageFrame*>(pPage->GetPrev()); + if (pPrevFrame) { const SwPageDesc* pDesc = pPage->GetPageDesc(); - bRet = pPrevFrm->GetPageDesc() != pDesc; + bRet = pPrevFrame->GetPageDesc() != pDesc; } else bRet = true; @@ -1792,38 +1792,38 @@ bool SwFrm::OnFirstPage() const return bRet; } -void SwFrm::Calc(vcl::RenderContext* pRenderContext) const +void SwFrame::Calc(vcl::RenderContext* pRenderContext) const { if ( !mbValidPos || !mbValidPrtArea || !mbValidSize ) - const_cast<SwFrm*>(this)->PrepareMake(pRenderContext); + const_cast<SwFrame*>(this)->PrepareMake(pRenderContext); } -Point SwFrm::GetRelPos() const +Point SwFrame::GetRelPos() const { - Point aRet( maFrm.Pos() ); - // here we cast since SwLayoutFrm is declared only as forwarded + Point aRet( maFrame.Pos() ); + // here we cast since SwLayoutFrame is declared only as forwarded aRet -= GetUpper()->Prt().Pos(); - aRet -= GetUpper()->Frm().Pos(); + aRet -= GetUpper()->Frame().Pos(); return aRet; } /** @return the virtual page number with the offset. */ -sal_uInt16 SwFrm::GetVirtPageNum() const +sal_uInt16 SwFrame::GetVirtPageNum() const { - const SwPageFrm *pPage = FindPageFrm(); + const SwPageFrame *pPage = FindPageFrame(); if ( !pPage || !pPage->GetUpper() ) return 0; sal_uInt16 nPhyPage = pPage->GetPhyPageNum(); - if ( !(static_cast<const SwRootFrm*>(pPage->GetUpper()))->IsVirtPageNum() ) + if ( !(static_cast<const SwRootFrame*>(pPage->GetUpper()))->IsVirtPageNum() ) return nPhyPage; //Search the nearest section using the virtual page number. //Because searching backwards needs a lot of time we search specific using //the dependencies. From the PageDescs we get the attributes and from the //attributes we get the sections. - const SwPageFrm *pVirtPage = nullptr; - const SwFrm *pFrm = nullptr; + const SwPageFrame *pVirtPage = nullptr; + const SwFrame *pFrame = nullptr; const SfxItemPool &rPool = pPage->GetFormat()->GetDoc()->GetAttrPool(); sal_uInt32 nMaxItems = rPool.GetItemCount2( RES_PAGEDESC ); for( sal_uInt32 n = 0; n < nMaxItems; ++n ) @@ -1843,61 +1843,61 @@ sal_uInt16 SwFrm::GetVirtPageNum() const if( !pVirtPage || aInfo.GetPage()->GetPhyPageNum() > pVirtPage->GetPhyPageNum() ) { pVirtPage = aInfo.GetPage(); - pFrm = aInfo.GetFrm(); + pFrame = aInfo.GetFrame(); } } } } - if ( pFrm ) + if ( pFrame ) { - ::boost::optional<sal_uInt16> oNumOffset = pFrm->GetAttrSet()->GetPageDesc().GetNumOffset(); + ::boost::optional<sal_uInt16> oNumOffset = pFrame->GetAttrSet()->GetPageDesc().GetNumOffset(); if (oNumOffset) { - return nPhyPage - pFrm->GetPhyPageNum() + oNumOffset.get(); + return nPhyPage - pFrame->GetPhyPageNum() + oNumOffset.get(); } else { - return nPhyPage - pFrm->GetPhyPageNum(); + return nPhyPage - pFrame->GetPhyPageNum(); } } return nPhyPage; } /** Determines and sets those cells which are enclosed by the selection. */ -bool SwRootFrm::MakeTableCrsrs( SwTableCursor& rTableCrsr ) +bool SwRootFrame::MakeTableCursors( SwTableCursor& rTableCursor ) { //Find Union-Rects and tables (Follows) of the selection. - OSL_ENSURE( rTableCrsr.GetContentNode() && rTableCrsr.GetContentNode( false ), + OSL_ENSURE( rTableCursor.GetContentNode() && rTableCursor.GetContentNode( false ), "Tabselection nicht auf Cnt." ); bool bRet = false; // For new table models there's no need to ask the layout.. - if( rTableCrsr.NewTableSelection() ) + if( rTableCursor.NewTableSelection() ) return true; Point aPtPt, aMkPt; { - SwShellCrsr* pShCrsr = dynamic_cast<SwShellCrsr*>(&rTableCrsr); + SwShellCursor* pShCursor = dynamic_cast<SwShellCursor*>(&rTableCursor); - if( pShCrsr ) + if( pShCursor ) { - aPtPt = pShCrsr->GetPtPos(); - aMkPt = pShCrsr->GetMkPos(); + aPtPt = pShCursor->GetPtPos(); + aMkPt = pShCursor->GetMkPos(); } } // #151012# Made code robust here - const SwContentNode* pTmpStartNode = rTableCrsr.GetContentNode(); - const SwContentNode* pTmpEndNode = rTableCrsr.GetContentNode(false); + const SwContentNode* pTmpStartNode = rTableCursor.GetContentNode(); + const SwContentNode* pTmpEndNode = rTableCursor.GetContentNode(false); - const SwFrm* pTmpStartFrm = pTmpStartNode ? pTmpStartNode->getLayoutFrm( this, &aPtPt, nullptr, false ) : nullptr; - const SwFrm* pTmpEndFrm = pTmpEndNode ? pTmpEndNode->getLayoutFrm( this, &aMkPt, nullptr, false ) : nullptr; + const SwFrame* pTmpStartFrame = pTmpStartNode ? pTmpStartNode->getLayoutFrame( this, &aPtPt, nullptr, false ) : nullptr; + const SwFrame* pTmpEndFrame = pTmpEndNode ? pTmpEndNode->getLayoutFrame( this, &aMkPt, nullptr, false ) : nullptr; - const SwLayoutFrm* pStart = pTmpStartFrm ? pTmpStartFrm->GetUpper() : nullptr; - const SwLayoutFrm* pEnd = pTmpEndFrm ? pTmpEndFrm->GetUpper() : nullptr; + const SwLayoutFrame* pStart = pTmpStartFrame ? pTmpStartFrame->GetUpper() : nullptr; + const SwLayoutFrame* pEnd = pTmpEndFrame ? pTmpEndFrame->GetUpper() : nullptr; - OSL_ENSURE( pStart && pEnd, "MakeTableCrsrs: Good to have the code robust here!" ); + OSL_ENSURE( pStart && pEnd, "MakeTableCursors: Good to have the code robust here!" ); /* #109590# Only change table boxes if the frames are valid. Needed because otherwise the table cursor after moving @@ -1909,44 +1909,44 @@ bool SwRootFrm::MakeTableCrsrs( SwTableCursor& rTableCrsr ) SwSelBoxes aNew; - const bool bReadOnlyAvailable = rTableCrsr.IsReadOnlyAvailable(); + const bool bReadOnlyAvailable = rTableCursor.IsReadOnlyAvailable(); for ( size_t i = 0; i < aUnions.size(); ++i ) { SwSelUnion *pUnion = &aUnions[i]; - const SwTabFrm *pTable = pUnion->GetTable(); + const SwTabFrame *pTable = pUnion->GetTable(); // Skip any repeated headlines in the follow: - SwLayoutFrm* pRow = pTable->IsFollow() ? + SwLayoutFrame* pRow = pTable->IsFollow() ? pTable->GetFirstNonHeadlineRow() : - const_cast<SwLayoutFrm*>(static_cast<const SwLayoutFrm*>(pTable->Lower())); + const_cast<SwLayoutFrame*>(static_cast<const SwLayoutFrame*>(pTable->Lower())); while ( pRow ) { - if ( pRow->Frm().IsOver( pUnion->GetUnion() ) ) + if ( pRow->Frame().IsOver( pUnion->GetUnion() ) ) { - const SwLayoutFrm *pCell = pRow->FirstCell(); + const SwLayoutFrame *pCell = pRow->FirstCell(); while ( pCell && pRow->IsAnLower( pCell ) ) { - OSL_ENSURE( pCell->IsCellFrm(), "Frame without cell" ); - if( IsFrmInTableSel( pUnion->GetUnion(), pCell ) && + OSL_ENSURE( pCell->IsCellFrame(), "Frame without cell" ); + if( IsFrameInTableSel( pUnion->GetUnion(), pCell ) && (bReadOnlyAvailable || !pCell->GetFormat()->GetProtect().IsContentProtected())) { SwTableBox* pInsBox = const_cast<SwTableBox*>( - static_cast<const SwCellFrm*>(pCell)->GetTabBox()); + static_cast<const SwCellFrame*>(pCell)->GetTabBox()); aNew.insert( pInsBox ); } if ( pCell->GetNext() ) { - pCell = static_cast<const SwLayoutFrm*>(pCell->GetNext()); - if ( pCell->Lower() && pCell->Lower()->IsRowFrm() ) + pCell = static_cast<const SwLayoutFrame*>(pCell->GetNext()); + if ( pCell->Lower() && pCell->Lower()->IsRowFrame() ) pCell = pCell->FirstCell(); } else { - const SwLayoutFrm* pLastCell = pCell; + const SwLayoutFrame* pLastCell = pCell; do { pCell = pCell->GetNextLayoutLeaf(); @@ -1954,7 +1954,7 @@ bool SwRootFrm::MakeTableCrsrs( SwTableCursor& rTableCrsr ) // For sections with columns if( pCell && pCell->IsInTab() ) { - while( !pCell->IsCellFrm() ) + while( !pCell->IsCellFrame() ) { pCell = pCell->GetUpper(); OSL_ENSURE( pCell, "Where's my cell?" ); @@ -1963,11 +1963,11 @@ bool SwRootFrm::MakeTableCrsrs( SwTableCursor& rTableCrsr ) } } } - pRow = static_cast<SwLayoutFrm*>(pRow->GetNext()); + pRow = static_cast<SwLayoutFrame*>(pRow->GetNext()); } } - rTableCrsr.ActualizeSelection( aNew ); + rTableCursor.ActualizeSelection( aNew ); bRet = true; } @@ -2000,7 +2000,7 @@ inline void Add( SwRegionRects& rRegion, const SwRect& rRect ) * and if more than two frames are involved add the PrtArea of all * frames which lie in between * - * Big reorganization because of the FlyFrm - those need to be locked out. + * Big reorganization because of the FlyFrame - those need to be locked out. * Exceptions: - The Fly in which the selection took place (if it took place * in a Fly) * - The Flys which are underrun by the text @@ -2011,10 +2011,10 @@ inline void Add( SwRegionRects& rRegion, const SwRect& rRect ) * inverted rectangles are available. * In the end the Flys are cut out of the section. */ -void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr) +void SwRootFrame::CalcFrameRects(SwShellCursor &rCursor) { - SwPosition *pStartPos = rCrsr.Start(), - *pEndPos = rCrsr.GetPoint() == pStartPos ? rCrsr.GetMark() : rCrsr.GetPoint(); + SwPosition *pStartPos = rCursor.Start(), + *pEndPos = rCursor.GetPoint() == pStartPos ? rCursor.GetMark() : rCursor.GetPoint(); SwViewShell *pSh = GetCurrShell(); @@ -2025,35 +2025,35 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr) // #i12836# enhanced pdf SwRegionRects aRegion( !bIgnoreVisArea ? pSh->VisArea() : - Frm() ); + Frame() ); if( !pStartPos->nNode.GetNode().IsContentNode() || - !pStartPos->nNode.GetNode().GetContentNode()->getLayoutFrm(this) || + !pStartPos->nNode.GetNode().GetContentNode()->getLayoutFrame(this) || ( pStartPos->nNode != pEndPos->nNode && ( !pEndPos->nNode.GetNode().IsContentNode() || - !pEndPos->nNode.GetNode().GetContentNode()->getLayoutFrm(this) ) ) ) + !pEndPos->nNode.GetNode().GetContentNode()->getLayoutFrame(this) ) ) ) { return; } - //First obtain the ContentFrms for the start and the end - those are needed + //First obtain the ContentFrames for the start and the end - those are needed //anyway. - SwContentFrm const* pStartFrm = pStartPos->nNode.GetNode(). - GetContentNode()->getLayoutFrm( this, &rCrsr.GetSttPos(), pStartPos ); + SwContentFrame const* pStartFrame = pStartPos->nNode.GetNode(). + GetContentNode()->getLayoutFrame( this, &rCursor.GetSttPos(), pStartPos ); - SwContentFrm const* pEndFrm = pEndPos->nNode.GetNode(). - GetContentNode()->getLayoutFrm( this, &rCrsr.GetEndPos(), pEndPos ); + SwContentFrame const* pEndFrame = pEndPos->nNode.GetNode(). + GetContentNode()->getLayoutFrame( this, &rCursor.GetEndPos(), pEndPos ); - OSL_ENSURE( (pStartFrm && pEndFrm), "Keine ContentFrms gefunden." ); + OSL_ENSURE( (pStartFrame && pEndFrame), "Keine ContentFrames gefunden." ); - //Do not subtract the FlyFrms in which selected Frames lie. + //Do not subtract the FlyFrames in which selected Frames lie. SwSortedObjs aSortObjs; - if ( pStartFrm->IsInFly() ) + if ( pStartFrame->IsInFly() ) { - const SwAnchoredObject* pObj = pStartFrm->FindFlyFrm(); + const SwAnchoredObject* pObj = pStartFrame->FindFlyFrame(); OSL_ENSURE( pObj, "No Start Object." ); if (pObj) aSortObjs.Insert( *(const_cast<SwAnchoredObject*>(pObj)) ); - const SwAnchoredObject* pObj2 = pEndFrm->FindFlyFrm(); - OSL_ENSURE( pObj2, "SwRootFrm::CalcFrmRects(..) - FlyFrame missing - looks like an invalid selection" ); + const SwAnchoredObject* pObj2 = pEndFrame->FindFlyFrame(); + OSL_ENSURE( pObj2, "SwRootFrame::CalcFrameRects(..) - FlyFrame missing - looks like an invalid selection" ); if ( pObj2 != nullptr && pObj2 != pObj ) { aSortObjs.Insert( *(const_cast<SwAnchoredObject*>(pObj2)) ); @@ -2063,83 +2063,83 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr) // if a selection which is not allowed exists, we correct what is not // allowed (header/footer/table-headline) for two pages. do { // middle check loop - const SwLayoutFrm* pSttLFrm = pStartFrm->GetUpper(); + const SwLayoutFrame* pSttLFrame = pStartFrame->GetUpper(); const sal_uInt16 cHdFtTableHd = FRM_HEADER | FRM_FOOTER | FRM_TAB; - while( pSttLFrm && - ! (cHdFtTableHd & pSttLFrm->GetType() )) - pSttLFrm = pSttLFrm->GetUpper(); - if( !pSttLFrm ) + while( pSttLFrame && + ! (cHdFtTableHd & pSttLFrame->GetType() )) + pSttLFrame = pSttLFrame->GetUpper(); + if( !pSttLFrame ) break; - const SwLayoutFrm* pEndLFrm = pEndFrm->GetUpper(); - while( pEndLFrm && - ! (cHdFtTableHd & pEndLFrm->GetType() )) - pEndLFrm = pEndLFrm->GetUpper(); - if( !pEndLFrm ) + const SwLayoutFrame* pEndLFrame = pEndFrame->GetUpper(); + while( pEndLFrame && + ! (cHdFtTableHd & pEndLFrame->GetType() )) + pEndLFrame = pEndLFrame->GetUpper(); + if( !pEndLFrame ) break; - OSL_ENSURE( pEndLFrm->GetType() == pSttLFrm->GetType(), + OSL_ENSURE( pEndLFrame->GetType() == pSttLFrame->GetType(), "Selection over different content" ); - switch( pSttLFrm->GetType() ) + switch( pSttLFrame->GetType() ) { case FRM_HEADER: case FRM_FOOTER: // On different pages? Then always on the start-page - if( pEndLFrm->FindPageFrm() != pSttLFrm->FindPageFrm() ) + if( pEndLFrame->FindPageFrame() != pSttLFrame->FindPageFrame() ) { // Set end- to the start-ContentFrame - if( pStartPos == rCrsr.GetPoint() ) - pEndFrm = pStartFrm; + if( pStartPos == rCursor.GetPoint() ) + pEndFrame = pStartFrame; else - pStartFrm = pEndFrm; + pStartFrame = pEndFrame; } break; case FRM_TAB: // On different pages? Then check for table-headline { - const SwTabFrm* pTabFrm = static_cast<const SwTabFrm*>(pSttLFrm); - if( ( pTabFrm->GetFollow() || - static_cast<const SwTabFrm*>(pEndLFrm)->GetFollow() ) && - pTabFrm->GetTable()->GetRowsToRepeat() > 0 && - pTabFrm->GetLower() != static_cast<const SwTabFrm*>(pEndLFrm)->GetLower() && - ( lcl_IsInRepeatedHeadline( pStartFrm ) || - lcl_IsInRepeatedHeadline( pEndFrm ) ) ) + const SwTabFrame* pTabFrame = static_cast<const SwTabFrame*>(pSttLFrame); + if( ( pTabFrame->GetFollow() || + static_cast<const SwTabFrame*>(pEndLFrame)->GetFollow() ) && + pTabFrame->GetTable()->GetRowsToRepeat() > 0 && + pTabFrame->GetLower() != static_cast<const SwTabFrame*>(pEndLFrame)->GetLower() && + ( lcl_IsInRepeatedHeadline( pStartFrame ) || + lcl_IsInRepeatedHeadline( pEndFrame ) ) ) { // Set end- to the start-ContentFrame - if( pStartPos == rCrsr.GetPoint() ) - pEndFrm = pStartFrm; + if( pStartPos == rCursor.GetPoint() ) + pEndFrame = pStartFrame; else - pStartFrm = pEndFrm; + pStartFrame = pEndFrame; } } break; } } while( false ); - SwCrsrMoveState aTmpState( MV_NONE ); + SwCursorMoveState aTmpState( MV_NONE ); aTmpState.m_b2Lines = true; aTmpState.m_bNoScroll = true; - aTmpState.m_nCursorBidiLevel = pStartFrm->IsRightToLeft() ? 1 : 0; + aTmpState.m_nCursorBidiLevel = pStartFrame->IsRightToLeft() ? 1 : 0; - //ContentRects to Start- and EndFrms. + //ContentRects to Start- and EndFrames. SwRect aStRect, aEndRect; - pStartFrm->GetCharRect( aStRect, *pStartPos, &aTmpState ); + pStartFrame->GetCharRect( aStRect, *pStartPos, &aTmpState ); Sw2LinesPos *pSt2Pos = aTmpState.m_p2Lines; aTmpState.m_p2Lines = nullptr; - aTmpState.m_nCursorBidiLevel = pEndFrm->IsRightToLeft() ? 1 : 0; + aTmpState.m_nCursorBidiLevel = pEndFrame->IsRightToLeft() ? 1 : 0; - pEndFrm->GetCharRect( aEndRect, *pEndPos, &aTmpState ); + pEndFrame->GetCharRect( aEndRect, *pEndPos, &aTmpState ); Sw2LinesPos *pEnd2Pos = aTmpState.m_p2Lines; - SwRect aStFrm ( pStartFrm->UnionFrm( true ) ); - aStFrm.Intersection( pStartFrm->PaintArea() ); - SwRect aEndFrm( pStartFrm == pEndFrm ? aStFrm : pEndFrm->UnionFrm( true ) ); - if( pStartFrm != pEndFrm ) + SwRect aStFrame ( pStartFrame->UnionFrame( true ) ); + aStFrame.Intersection( pStartFrame->PaintArea() ); + SwRect aEndFrame( pStartFrame == pEndFrame ? aStFrame : pEndFrame->UnionFrame( true ) ); + if( pStartFrame != pEndFrame ) { - aEndFrm.Intersection( pEndFrm->PaintArea() ); + aEndFrame.Intersection( pEndFrame->PaintArea() ); } - SWRECTFN( pStartFrm ) - const bool bR2L = pStartFrm->IsRightToLeft(); - const bool bEndR2L = pEndFrm->IsRightToLeft(); + SWRECTFN( pStartFrame ) + const bool bR2L = pStartFrame->IsRightToLeft(); + const bool bEndR2L = pEndFrame->IsRightToLeft(); // If there's no doubleline portion involved or start and end are both // in the same doubleline portion, all works fine, but otherwise @@ -2174,7 +2174,7 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr) { SwRect aTmp2( pSt2Pos->aPortion ); (aTmp2.*fnRect->fnSetRight)( nLeftAbs ); - aTmp2.Intersection( aEndFrm ); + aTmp2.Intersection( aEndFrame ); Sub( aRegion, aTmp2 ); } } @@ -2196,7 +2196,7 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr) (pSt2Pos->aLine.*fnRect->fnGetTop)() ); } - aTmp.Intersection( aStFrm ); + aTmp.Intersection( aStFrame ); Sub( aRegion, aTmp ); SwTwips nTmp = (pSt2Pos->aLine.*fnRect->fnGetBottom)(); @@ -2215,7 +2215,7 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr) (aTmp.*fnRect->fnSetLeft)( (pSt2Pos->aPortion.*fnRect->fnGetLeft)() ); } - aTmp.Intersection( aStFrm ); + aTmp.Intersection( aStFrame ); Sub( aRegion, aTmp ); } @@ -2228,7 +2228,7 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr) if( pEnd2Pos ) { - SWRECTFNX( pEndFrm ) + SWRECTFNX( pEndFrame ) SwRect aTmp( aEndRect ); // BiDi-Portions are swimming against the current. @@ -2250,7 +2250,7 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr) { SwRect aTmp2( pEnd2Pos->aPortion ); (aTmp2.*fnRectX->fnSetLeft)( nRightAbs ); - aTmp2.Intersection( aEndFrm ); + aTmp2.Intersection( aEndFrame ); Sub( aRegion, aTmp2 ); } } @@ -2272,7 +2272,7 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr) (pEnd2Pos->aLine.*fnRectX->fnGetBottom)() ); } - aTmp.Intersection( aEndFrm ); + aTmp.Intersection( aEndFrame ); Sub( aRegion, aTmp ); // The next statement means neither ruby nor rotate(90): @@ -2294,7 +2294,7 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr) (aTmp.*fnRectX->fnSetRight)( (pEnd2Pos->aPortion.*fnRectX->fnGetRight)() ); } - aTmp.Intersection( aEndFrm ); + aTmp.Intersection( aEndFrame ); Sub( aRegion, aTmp ); } } @@ -2324,7 +2324,7 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr) long nLeftAbs = nRightAbs - (pSt2Pos->aPortion2.*fnRect->fnGetWidth)(); (aTmp.*fnRect->fnSetRight)( nRightAbs ); - aTmp.Intersection( aStFrm ); + aTmp.Intersection( aStFrame ); Sub( aRegion, aTmp ); aStRect = pSt2Pos->aLine; @@ -2332,7 +2332,7 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr) (aStRect.*fnRect->fnSetWidth)( 1 ); } - SWRECTFNX( pEndFrm ) + SWRECTFNX( pEndFrame ) if ( (pEnd2Pos->aPortion2.*fnRectX->fnGetWidth)() ) { SwRect aTmp( aEndRect ); @@ -2341,7 +2341,7 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr) long nLeftAbs = nRightAbs - (pEnd2Pos->aPortion2.*fnRectX->fnGetWidth)(); (aTmp.*fnRectX->fnSetLeft)( nLeftAbs ); - aTmp.Intersection( aEndFrm ); + aTmp.Intersection( aEndFrame ); Sub( aRegion, aTmp ); aEndRect = pEnd2Pos->aLine; @@ -2352,26 +2352,26 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr) // The charrect may be outside the paintarea (for cursortravelling) // but the selection has to be restricted to the paintarea - if( aStRect.Left() < aStFrm.Left() ) - aStRect.Left( aStFrm.Left() ); - else if( aStRect.Left() > aStFrm.Right() ) - aStRect.Left( aStFrm.Right() ); + if( aStRect.Left() < aStFrame.Left() ) + aStRect.Left( aStFrame.Left() ); + else if( aStRect.Left() > aStFrame.Right() ) + aStRect.Left( aStFrame.Right() ); SwTwips nTmp = aStRect.Right(); - if( nTmp < aStFrm.Left() ) - aStRect.Right( aStFrm.Left() ); - else if( nTmp > aStFrm.Right() ) - aStRect.Right( aStFrm.Right() ); - if( aEndRect.Left() < aEndFrm.Left() ) - aEndRect.Left( aEndFrm.Left() ); - else if( aEndRect.Left() > aEndFrm.Right() ) - aEndRect.Left( aEndFrm.Right() ); + if( nTmp < aStFrame.Left() ) + aStRect.Right( aStFrame.Left() ); + else if( nTmp > aStFrame.Right() ) + aStRect.Right( aStFrame.Right() ); + if( aEndRect.Left() < aEndFrame.Left() ) + aEndRect.Left( aEndFrame.Left() ); + else if( aEndRect.Left() > aEndFrame.Right() ) + aEndRect.Left( aEndFrame.Right() ); nTmp = aEndRect.Right(); - if( nTmp < aEndFrm.Left() ) - aEndRect.Right( aEndFrm.Left() ); - else if( nTmp > aEndFrm.Right() ) - aEndRect.Right( aEndFrm.Right() ); + if( nTmp < aEndFrame.Left() ) + aEndRect.Right( aEndFrame.Left() ); + else if( nTmp > aEndFrame.Right() ) + aEndRect.Right( aEndFrame.Right() ); - if( pStartFrm == pEndFrm ) + if( pStartFrame == pEndFrame ) { bool bSameRotatedOrBidi = pSt2Pos && pEnd2Pos && ( MultiPortionType::BIDI == pSt2Pos->nMultiType ) && @@ -2401,18 +2401,18 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr) SwRect aTmp = SwRect( aTmpSt, aTmpEnd ); // Bug 34888: If content is selected which doesn't take space // away (i.e. PostIts, RefMarks, TOXMarks), then at - // least set the width of the Crsr. + // least set the width of the Cursor. if( 1 == (aTmp.*fnRect->fnGetWidth)() && pStartPos->nContent.GetIndex() != pEndPos->nContent.GetIndex() ) { OutputDevice* pOut = pSh->GetOut(); - long nCrsrWidth = pOut->GetSettings().GetStyleSettings(). + long nCursorWidth = pOut->GetSettings().GetStyleSettings(). GetCursorSize(); (aTmp.*fnRect->fnSetWidth)( pOut->PixelToLogic( - Size( nCrsrWidth, 0 ) ).Width() ); + Size( nCursorWidth, 0 ) ).Width() ); } - aTmp.Intersection( aStFrm ); + aTmp.Intersection( aStFrame ); Sub( aRegion, aTmp ); } //case 2: (Same frame, but not the same line) @@ -2426,14 +2426,14 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr) } else { - lLeft = (pStartFrm->Frm().*fnRect->fnGetLeft)() + - (pStartFrm->Prt().*fnRect->fnGetLeft)(); - lRight = (aEndFrm.*fnRect->fnGetRight)(); + lLeft = (pStartFrame->Frame().*fnRect->fnGetLeft)() + + (pStartFrame->Prt().*fnRect->fnGetLeft)(); + lRight = (aEndFrame.*fnRect->fnGetRight)(); } - if( lLeft < (aStFrm.*fnRect->fnGetLeft)() ) - lLeft = (aStFrm.*fnRect->fnGetLeft)(); - if( lRight > (aStFrm.*fnRect->fnGetRight)() ) - lRight = (aStFrm.*fnRect->fnGetRight)(); + if( lLeft < (aStFrame.*fnRect->fnGetLeft)() ) + lLeft = (aStFrame.*fnRect->fnGetLeft)(); + if( lRight > (aStFrame.*fnRect->fnGetRight)() ) + lRight = (aStFrame.*fnRect->fnGetRight)(); SwRect aSubRect( aStRect ); //First line if( bR2L ) @@ -2469,49 +2469,49 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr) //The startframe first... SwRect aSubRect( aStRect ); if( bR2L ) - (aSubRect.*fnRect->fnSetLeft)( (aStFrm.*fnRect->fnGetLeft)()); + (aSubRect.*fnRect->fnSetLeft)( (aStFrame.*fnRect->fnGetLeft)()); else - (aSubRect.*fnRect->fnSetRight)( (aStFrm.*fnRect->fnGetRight)()); + (aSubRect.*fnRect->fnSetRight)( (aStFrame.*fnRect->fnGetRight)()); Sub( aRegion, aSubRect ); SwTwips nTmpTwips = (aStRect.*fnRect->fnGetBottom)(); - if( (aStFrm.*fnRect->fnGetBottom)() != nTmpTwips ) + if( (aStFrame.*fnRect->fnGetBottom)() != nTmpTwips ) { - aSubRect = aStFrm; + aSubRect = aStFrame; (aSubRect.*fnRect->fnSetTop)( nTmpTwips ); Sub( aRegion, aSubRect ); } //Now the frames between, if there are any - bool const bBody = pStartFrm->IsInDocBody(); - const SwTableBox* pCellBox = pStartFrm->GetUpper()->IsCellFrm() ? - static_cast<const SwCellFrm*>(pStartFrm->GetUpper())->GetTabBox() : nullptr; + bool const bBody = pStartFrame->IsInDocBody(); + const SwTableBox* pCellBox = pStartFrame->GetUpper()->IsCellFrame() ? + static_cast<const SwCellFrame*>(pStartFrame->GetUpper())->GetTabBox() : nullptr; if (pSh->IsSelectAll()) pCellBox = nullptr; - const SwContentFrm *pContent = pStartFrm->GetNextContentFrm(); + const SwContentFrame *pContent = pStartFrame->GetNextContentFrame(); SwRect aPrvRect; OSL_ENSURE( pContent, - "<SwRootFrm::CalcFrmRects(..)> - no content frame. This is a serious defect" ); - while ( pContent && pContent != pEndFrm ) + "<SwRootFrame::CalcFrameRects(..)> - no content frame. This is a serious defect" ); + while ( pContent && pContent != pEndFrame ) { if ( pContent->IsInFly() ) { - const SwAnchoredObject* pObj = pContent->FindFlyFrm(); + const SwAnchoredObject* pObj = pContent->FindFlyFrame(); aSortObjs.Insert( *(const_cast<SwAnchoredObject*>(pObj)) ); } - // Consider only frames which have the same IsInDocBody value like pStartFrm - // If pStartFrm is inside a SwCellFrm, consider only frames which are inside the + // Consider only frames which have the same IsInDocBody value like pStartFrame + // If pStartFrame is inside a SwCellFrame, consider only frames which are inside the // same cell frame (or its follow cell) - const SwTableBox* pTmpCellBox = pContent->GetUpper()->IsCellFrm() ? - static_cast<const SwCellFrm*>(pContent->GetUpper())->GetTabBox() : nullptr; + const SwTableBox* pTmpCellBox = pContent->GetUpper()->IsCellFrame() ? + static_cast<const SwCellFrame*>(pContent->GetUpper())->GetTabBox() : nullptr; if (pSh->IsSelectAll()) pTmpCellBox = nullptr; if ( bBody == pContent->IsInDocBody() && ( !pCellBox || pCellBox == pTmpCellBox ) ) { - SwRect aCRect( pContent->UnionFrm( true ) ); + SwRect aCRect( pContent->UnionFrame( true ) ); aCRect.Intersection( pContent->PaintArea() ); if( aCRect.IsOver( aRegion.GetOrigin() )) { @@ -2531,30 +2531,30 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr) } } } - pContent = pContent->GetNextContentFrm(); + pContent = pContent->GetNextContentFrame(); OSL_ENSURE( pContent, - "<SwRootFrm::CalcFrmRects(..)> - no content frame. This is a serious defect!" ); + "<SwRootFrame::CalcFrameRects(..)> - no content frame. This is a serious defect!" ); } if ( aPrvRect.HasArea() ) Sub( aRegion, aPrvRect ); //At least the endframe... - bVert = pEndFrm->IsVertical(); - bRev = pEndFrm->IsReverse(); - fnRect = bVert ? ( bRev ? fnRectVL2R : ( pEndFrm->IsVertLR() ? fnRectVertL2R : fnRectVert ) ) : + bVert = pEndFrame->IsVertical(); + bRev = pEndFrame->IsReverse(); + fnRect = bVert ? ( bRev ? fnRectVL2R : ( pEndFrame->IsVertLR() ? fnRectVertL2R : fnRectVert ) ) : ( bRev ? fnRectB2T : fnRectHori ); nTmpTwips = (aEndRect.*fnRect->fnGetTop)(); - if( (aEndFrm.*fnRect->fnGetTop)() != nTmpTwips ) + if( (aEndFrame.*fnRect->fnGetTop)() != nTmpTwips ) { - aSubRect = aEndFrm; + aSubRect = aEndFrame; (aSubRect.*fnRect->fnSetBottom)( nTmpTwips ); Sub( aRegion, aSubRect ); } aSubRect = aEndRect; if( bEndR2L ) - (aSubRect.*fnRect->fnSetRight)((aEndFrm.*fnRect->fnGetRight)()); + (aSubRect.*fnRect->fnSetRight)((aEndFrame.*fnRect->fnGetRight)()); else - (aSubRect.*fnRect->fnSetLeft)( (aEndFrm.*fnRect->fnGetLeft)() ); + (aSubRect.*fnRect->fnSetLeft)( (aEndFrame.*fnRect->fnGetLeft)() ); Sub( aRegion, aSubRect ); } @@ -2563,13 +2563,13 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr) delete pEnd2Pos; // Cut out Flys during loop. We don't cut out Flys when: - // - the Lower is StartFrm/EndFrm (FlyInCnt and all other Flys which again + // - the Lower is StartFrame/EndFrame (FlyInCnt and all other Flys which again // sit in it) - // - if in the Z-order we have Flys above those in which the StartFrm is + // - if in the Z-order we have Flys above those in which the StartFrame is // placed // - if they are anchored to inside the selection and thus part of it - const SwPageFrm *pPage = pStartFrm->FindPageFrm(); - const SwPageFrm *pEndPage = pEndFrm->FindPageFrm(); + const SwPageFrame *pPage = pStartFrame->FindPageFrame(); + const SwPageFrame *pEndPage = pEndFrame->FindPageFrame(); while ( pPage ) { @@ -2579,9 +2579,9 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr) for ( size_t i = 0; i < rObjs.size(); ++i ) { SwAnchoredObject* pAnchoredObj = rObjs[i]; - if ( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) == nullptr ) + if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) == nullptr ) continue; - const SwFlyFrm* pFly = static_cast<const SwFlyFrm*>(pAnchoredObj); + const SwFlyFrame* pFly = static_cast<const SwFlyFrame*>(pAnchoredObj); const SwVirtFlyDrawObj* pObj = pFly->GetVirtDrawObj(); const SwFormatSurround &rSur = pFly->GetFormat()->GetSurround(); const SwPosition* anchoredAt = pAnchoredObj->GetFrameFormat().GetAnchor().GetContentAnchor(); @@ -2599,8 +2599,8 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr) } } if( inSelection ) - Add( aRegion, pFly->Frm() ); - else if ( !pFly->IsAnLower( pStartFrm ) && + Add( aRegion, pFly->Frame() ); + else if ( !pFly->IsAnLower( pStartFrame ) && (rSur.GetSurround() != SURROUND_THROUGHT && !rSur.IsContour()) ) { @@ -2611,9 +2611,9 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr) const sal_uInt32 nPos = pObj->GetOrdNum(); for ( size_t k = 0; bSub && k < aSortObjs.size(); ++k ) { - OSL_ENSURE( dynamic_cast< const SwFlyFrm *>( aSortObjs[k] ) != nullptr, - "<SwRootFrm::CalcFrmRects(..)> - object in <aSortObjs> of unexpected type" ); - const SwFlyFrm* pTmp = static_cast<SwFlyFrm*>(aSortObjs[k]); + OSL_ENSURE( dynamic_cast< const SwFlyFrame *>( aSortObjs[k] ) != nullptr, + "<SwRootFrame::CalcFrameRects(..)> - object in <aSortObjs> of unexpected type" ); + const SwFlyFrame* pTmp = static_cast<SwFlyFrame*>(aSortObjs[k]); do { if ( nPos < pTmp->GetVirtDrawObj()->GetOrdNumDirect() ) @@ -2622,35 +2622,35 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr) } else { - pTmp = pTmp->GetAnchorFrm()->FindFlyFrm(); + pTmp = pTmp->GetAnchorFrame()->FindFlyFrame(); } } while ( bSub && pTmp ); } if ( bSub ) - Sub( aRegion, pFly->Frm() ); + Sub( aRegion, pFly->Frame() ); } } } if ( pPage == pEndPage ) break; else - pPage = static_cast<const SwPageFrm*>(pPage->GetNext()); + pPage = static_cast<const SwPageFrame*>(pPage->GetNext()); } //Because it looks better, we close the DropCaps. SwRect aDropRect; - if ( pStartFrm->IsTextFrm() ) + if ( pStartFrame->IsTextFrame() ) { - if ( static_cast<const SwTextFrm*>(pStartFrm)->GetDropRect( aDropRect ) ) + if ( static_cast<const SwTextFrame*>(pStartFrame)->GetDropRect( aDropRect ) ) Sub( aRegion, aDropRect ); } - if ( pEndFrm != pStartFrm && pEndFrm->IsTextFrm() ) + if ( pEndFrame != pStartFrame && pEndFrame->IsTextFrame() ) { - if ( static_cast<const SwTextFrm*>(pEndFrm)->GetDropRect( aDropRect ) ) + if ( static_cast<const SwTextFrame*>(pEndFrame)->GetDropRect( aDropRect ) ) Sub( aRegion, aDropRect ); } - rCrsr.assign( aRegion.begin(), aRegion.end() ); + rCursor.assign( aRegion.begin(), aRegion.end() ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/layout/unusedf.cxx b/sw/source/core/layout/unusedf.cxx index 11e8ca6aa3c6..c6b328a2bab9 100644 --- a/sw/source/core/layout/unusedf.cxx +++ b/sw/source/core/layout/unusedf.cxx @@ -21,55 +21,55 @@ #include "cntfrm.hxx" #include "flyfrm.hxx" -void SwFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttrs * ) +void SwFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttrs * ) { OSL_FAIL( "Format() of the base class called." ); } -void SwFrm::Paint(vcl::RenderContext&, SwRect const&, SwPrintData const*const) const +void SwFrame::Paint(vcl::RenderContext&, SwRect const&, SwPrintData const*const) const { OSL_FAIL( "Paint() of the base class called." ); } -bool SwContentFrm::WouldFit( SwTwips &, bool&, bool ) +bool SwContentFrame::WouldFit( SwTwips &, bool&, bool ) { - OSL_FAIL( "WouldFit of ContentFrm called." ); + OSL_FAIL( "WouldFit of ContentFrame called." ); return false; } -bool SwFrm::FillSelection( SwSelectionList& , const SwRect& ) const +bool SwFrame::FillSelection( SwSelectionList& , const SwRect& ) const { OSL_FAIL( "Don't call this function at the base class!" ); return false; } -bool SwFrm::GetCrsrOfst( SwPosition *, Point&, SwCrsrMoveState*, bool ) const +bool SwFrame::GetCursorOfst( SwPosition *, Point&, SwCursorMoveState*, bool ) const { - OSL_FAIL( "GetCrsrOfst of the base class, hi!" ); + OSL_FAIL( "GetCursorOfst of the base class, hi!" ); return false; } #ifdef DBG_UTIL -void SwRootFrm::Cut() +void SwRootFrame::Cut() { - OSL_FAIL( "Cut() of RootFrm called." ); + OSL_FAIL( "Cut() of RootFrame called." ); } -void SwRootFrm::Paste( SwFrm *, SwFrm * ) +void SwRootFrame::Paste( SwFrame *, SwFrame * ) { - OSL_FAIL( "Paste() of RootFrm called." ); + OSL_FAIL( "Paste() of RootFrame called." ); } -void SwFlyFrm::Paste( SwFrm *, SwFrm * ) +void SwFlyFrame::Paste( SwFrame *, SwFrame * ) { - OSL_FAIL( "Paste() of FlyFrm called." ); + OSL_FAIL( "Paste() of FlyFrame called." ); } #endif -bool SwFrm::GetCharRect( SwRect&, const SwPosition&, - SwCrsrMoveState* ) const +bool SwFrame::GetCharRect( SwRect&, const SwPosition&, + SwCursorMoveState* ) const { OSL_FAIL( "GetCharRect() of the base called." ); return false; diff --git a/sw/source/core/layout/virtoutp.cxx b/sw/source/core/layout/virtoutp.cxx index 36beac8d2e3c..6097773116d6 100644 --- a/sw/source/core/layout/virtoutp.cxx +++ b/sw/source/core/layout/virtoutp.cxx @@ -48,24 +48,24 @@ inline DbgRect::DbgRect( OutputDevice *pOutDev, const Rectangle &rRect, #endif /* The SWLayVout class manages the virtual output devices. - * RootFrm has a static member of this class which is created in _FrmInit - * and destroyed in _FrmFinit. + * RootFrame has a static member of this class which is created in _FrameInit + * and destroyed in _FrameFinit. * */ -bool SwRootFrm::FlushVout() +bool SwRootFrame::FlushVout() { - if (SwRootFrm::s_pVout->IsFlushable()) + if (SwRootFrame::s_pVout->IsFlushable()) { - SwRootFrm::s_pVout->_Flush(); + SwRootFrame::s_pVout->_Flush(); return true; } return false; } -bool SwRootFrm::HasSameRect( const SwRect& rRect ) +bool SwRootFrame::HasSameRect( const SwRect& rRect ) { - if (SwRootFrm::s_pVout->IsFlushable()) - return ( rRect == SwRootFrm::s_pVout->GetOrgRect() ); + if (SwRootFrame::s_pVout->IsFlushable()) + return ( rRect == SwRootFrame::s_pVout->GetOrgRect() ); return false; } diff --git a/sw/source/core/layout/virtoutp.hxx b/sw/source/core/layout/virtoutp.hxx index 1b00c40208e3..93821891ccee 100644 --- a/sw/source/core/layout/virtoutp.hxx +++ b/sw/source/core/layout/virtoutp.hxx @@ -29,7 +29,7 @@ class SwViewShell; class SwLayVout { - friend void _FrmFinit(); //deletes Vout + friend void _FrameFinit(); //deletes Vout private: SwViewShell* pSh; VclPtr<OutputDevice> pOut; diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx index ac3d1c849712..edd660df2471 100644 --- a/sw/source/core/layout/wsfrm.cxx +++ b/sw/source/core/layout/wsfrm.cxx @@ -53,17 +53,17 @@ using namespace ::com::sun::star; -SwFrm::SwFrm( SwModify *pMod, SwFrm* pSib ) : +SwFrame::SwFrame( SwModify *pMod, SwFrame* pSib ) : SwClient( pMod ), mbIfAccTableShouldDisposing( false ), //A member to identify if the acc table should dispose mbInDtor(false), - mnFrmId( SwFrm::mnLastFrmId++ ), - mpRoot( pSib ? pSib->getRootFrm() : nullptr ), + mnFrameId( SwFrame::mnLastFrameId++ ), + mpRoot( pSib ? pSib->getRootFrame() : nullptr ), mpUpper(nullptr), mpNext(nullptr), mpPrev(nullptr), mpDrawObjs(nullptr), - mnFrmType(0), + mnFrameType(0), mbInfBody( false ), mbInfTab ( false ), mbInfFly ( false ), @@ -81,22 +81,22 @@ SwFrm::SwFrm( SwModify *pMod, SwFrm* pSib ) : mbForbidDelete = false; } -const IDocumentDrawModelAccess& SwFrm::getIDocumentDrawModelAccess() +const IDocumentDrawModelAccess& SwFrame::getIDocumentDrawModelAccess() { return GetUpper()->GetFormat()->getIDocumentDrawModelAccess(); } -bool SwFrm::KnowsFormat( const SwFormat& rFormat ) const +bool SwFrame::KnowsFormat( const SwFormat& rFormat ) const { return GetRegisteredIn() == &rFormat; } -void SwFrm::RegisterToFormat( SwFormat& rFormat ) +void SwFrame::RegisterToFormat( SwFormat& rFormat ) { rFormat.Add( this ); } -void SwFrm::CheckDir( sal_uInt16 nDir, bool bVert, bool bOnlyBiDi, bool bBrowse ) +void SwFrame::CheckDir( sal_uInt16 nDir, bool bVert, bool bOnlyBiDi, bool bBrowse ) { if( FRMDIR_ENVIRONMENT == nDir || ( bVert && bOnlyBiDi ) ) { @@ -133,11 +133,11 @@ void SwFrm::CheckDir( sal_uInt16 nDir, bool bVert, bool bOnlyBiDi, bool bBrowse } } -void SwFrm::CheckDirection( bool bVert ) +void SwFrame::CheckDirection( bool bVert ) { if( bVert ) { - if( !IsHeaderFrm() && !IsFooterFrm() ) + if( !IsHeaderFrame() && !IsFooterFrame() ) { mbDerivedVert = true; SetDirFlags( bVert ); @@ -150,49 +150,49 @@ void SwFrm::CheckDirection( bool bVert ) } } -void SwSectionFrm::CheckDirection( bool bVert ) +void SwSectionFrame::CheckDirection( bool bVert ) { const SwFrameFormat* pFormat = GetFormat(); if( pFormat ) { - const SwViewShell *pSh = getRootFrm()->GetCurrShell(); + const SwViewShell *pSh = getRootFrame()->GetCurrShell(); const bool bBrowseMode = pSh && pSh->GetViewOptions()->getBrowseMode(); CheckDir(static_cast<const SvxFrameDirectionItem&>(pFormat->GetFormatAttr(RES_FRAMEDIR)).GetValue(), bVert, true, bBrowseMode ); } else - SwFrm::CheckDirection( bVert ); + SwFrame::CheckDirection( bVert ); } -void SwFlyFrm::CheckDirection( bool bVert ) +void SwFlyFrame::CheckDirection( bool bVert ) { const SwFrameFormat* pFormat = GetFormat(); if( pFormat ) { - const SwViewShell *pSh = getRootFrm()->GetCurrShell(); + const SwViewShell *pSh = getRootFrame()->GetCurrShell(); const bool bBrowseMode = pSh && pSh->GetViewOptions()->getBrowseMode(); CheckDir(static_cast<const SvxFrameDirectionItem&>(pFormat->GetFormatAttr(RES_FRAMEDIR)).GetValue(), bVert, false, bBrowseMode ); } else - SwFrm::CheckDirection( bVert ); + SwFrame::CheckDirection( bVert ); } -void SwTabFrm::CheckDirection( bool bVert ) +void SwTabFrame::CheckDirection( bool bVert ) { const SwFrameFormat* pFormat = GetFormat(); if( pFormat ) { - const SwViewShell *pSh = getRootFrm()->GetCurrShell(); + const SwViewShell *pSh = getRootFrame()->GetCurrShell(); const bool bBrowseMode = pSh && pSh->GetViewOptions()->getBrowseMode(); CheckDir(static_cast<const SvxFrameDirectionItem&>(pFormat->GetFormatAttr(RES_FRAMEDIR)).GetValue(), bVert, true, bBrowseMode ); } else - SwFrm::CheckDirection( bVert ); + SwFrame::CheckDirection( bVert ); } -void SwCellFrm::CheckDirection( bool bVert ) +void SwCellFrame::CheckDirection( bool bVert ) { const SwFrameFormat* pFormat = GetFormat(); const SfxPoolItem* pItem; @@ -201,24 +201,24 @@ void SwCellFrm::CheckDirection( bool bVert ) // to LTR in case of OOo 1.0 documents. if( pFormat && SfxItemState::SET == pFormat->GetItemState( RES_FRAMEDIR, true, &pItem ) ) { - const SvxFrameDirectionItem* pFrmDirItem = static_cast<const SvxFrameDirectionItem*>(pItem); - const SwViewShell *pSh = getRootFrm()->GetCurrShell(); + const SvxFrameDirectionItem* pFrameDirItem = static_cast<const SvxFrameDirectionItem*>(pItem); + const SwViewShell *pSh = getRootFrame()->GetCurrShell(); const bool bBrowseMode = pSh && pSh->GetViewOptions()->getBrowseMode(); - CheckDir( pFrmDirItem->GetValue(), bVert, false, bBrowseMode ); + CheckDir( pFrameDirItem->GetValue(), bVert, false, bBrowseMode ); } else - SwFrm::CheckDirection( bVert ); + SwFrame::CheckDirection( bVert ); } -void SwTextFrm::CheckDirection( bool bVert ) +void SwTextFrame::CheckDirection( bool bVert ) { - const SwViewShell *pSh = getRootFrm()->GetCurrShell(); + const SwViewShell *pSh = getRootFrame()->GetCurrShell(); const bool bBrowseMode = pSh && pSh->GetViewOptions()->getBrowseMode(); - CheckDir( GetNode()->GetSwAttrSet().GetFrmDir().GetValue(), bVert, + CheckDir( GetNode()->GetSwAttrSet().GetFrameDir().GetValue(), bVert, true, bBrowseMode ); } -void SwFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) +void SwFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) { sal_uInt8 nInvFlags = 0; @@ -228,7 +228,7 @@ void SwFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) SfxItemIter aOIter( *static_cast<const SwAttrSetChg*>(pOld)->GetChgSet() ); while( true ) { - _UpdateAttrFrm( aOIter.GetCurItem(), + _UpdateAttrFrame( aOIter.GetCurItem(), aNIter.GetCurItem(), nInvFlags ); if( aNIter.IsAtEnd() ) break; @@ -237,17 +237,17 @@ void SwFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) } } else - _UpdateAttrFrm( pOld, pNew, nInvFlags ); + _UpdateAttrFrame( pOld, pNew, nInvFlags ); if ( nInvFlags != 0 ) { - SwPageFrm *pPage = FindPageFrm(); + SwPageFrame *pPage = FindPageFrame(); InvalidatePage( pPage ); if ( nInvFlags & 0x01 ) { _InvalidatePrt(); - if( !GetPrev() && IsTabFrm() && IsInSct() ) - FindSctFrm()->_InvalidatePrt(); + if( !GetPrev() && IsTabFrame() && IsInSct() ) + FindSctFrame()->_InvalidatePrt(); } if ( nInvFlags & 0x02 ) _InvalidateSize(); @@ -255,7 +255,7 @@ void SwFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) _InvalidatePos(); if ( nInvFlags & 0x08 ) SetCompletePaint(); - SwFrm *pNxt; + SwFrame *pNxt; if ( nInvFlags & 0x30 && nullptr != (pNxt = GetNext()) ) { pNxt->InvalidatePage( pPage ); @@ -267,7 +267,7 @@ void SwFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) } } -void SwFrm::_UpdateAttrFrm( const SfxPoolItem *pOld, const SfxPoolItem *pNew, +void SwFrame::_UpdateAttrFrame( const SfxPoolItem *pOld, const SfxPoolItem *pNew, sal_uInt8 &rInvFlags ) { sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0; @@ -295,7 +295,7 @@ void SwFrm::_UpdateAttrFrm( const SfxPoolItem *pOld, const SfxPoolItem *pNew, break; case RES_FRM_SIZE: - ReinitializeFrmSizeAttrFlags(); + ReinitializeFrameSizeAttrFlags(); rInvFlags |= 0x13; break; @@ -305,12 +305,12 @@ void SwFrm::_UpdateAttrFrm( const SfxPoolItem *pOld, const SfxPoolItem *pNew, case RES_ROW_SPLIT: { - if ( IsRowFrm() ) + if ( IsRowFrame() ) { bool bInFollowFlowRow = nullptr != IsInFollowFlowRow(); if ( bInFollowFlowRow || nullptr != IsInSplitTableRow() ) { - SwTabFrm* pTab = FindTabFrm(); + SwTabFrame* pTab = FindTabFrame(); if ( bInFollowFlowRow ) pTab = pTab->FindMaster(); pTab->SetRemoveFollowFlowLinePending( true ); @@ -319,7 +319,7 @@ void SwFrm::_UpdateAttrFrm( const SfxPoolItem *pOld, const SfxPoolItem *pNew, break; } case RES_COL: - OSL_FAIL( "Columns for new FrmTyp?" ); + OSL_FAIL( "Columns for new FrameTyp?" ); break; default: @@ -332,37 +332,37 @@ void SwFrm::_UpdateAttrFrm( const SfxPoolItem *pOld, const SfxPoolItem *pNew, } } -bool SwFrm::Prepare( const PrepareHint, const void *, bool ) +bool SwFrame::Prepare( const PrepareHint, const void *, bool ) { /* Do nothing */ return false; } /** - * Invalidates the page in which the Frm is currently placed. - * The page is invalidated depending on the type (Layout, Content, FlyFrm) + * Invalidates the page in which the Frame is currently placed. + * The page is invalidated depending on the type (Layout, Content, FlyFrame) */ -void SwFrm::InvalidatePage( const SwPageFrm *pPage ) const +void SwFrame::InvalidatePage( const SwPageFrame *pPage ) const { if ( !pPage ) { - pPage = FindPageFrm(); + pPage = FindPageFrame(); // #i28701# - for at-character and as-character // anchored Writer fly frames additionally invalidate also page frame // its 'anchor character' is on. - if ( pPage && pPage->GetUpper() && IsFlyFrm() ) + if ( pPage && pPage->GetUpper() && IsFlyFrame() ) { - const SwFlyFrm* pFlyFrm = static_cast<const SwFlyFrm*>(this); - if ( pFlyFrm->IsAutoPos() || pFlyFrm->IsFlyInCntFrm() ) + const SwFlyFrame* pFlyFrame = static_cast<const SwFlyFrame*>(this); + if ( pFlyFrame->IsAutoPos() || pFlyFrame->IsFlyInContentFrame() ) { - // #i33751#, #i34060# - method <GetPageFrmOfAnchor()> - // is replaced by method <FindPageFrmOfAnchor()>. It's return value + // #i33751#, #i34060# - method <GetPageFrameOfAnchor()> + // is replaced by method <FindPageFrameOfAnchor()>. It's return value // have to be checked. - SwPageFrm* pPageFrmOfAnchor = - const_cast<SwFlyFrm*>(pFlyFrm)->FindPageFrmOfAnchor(); - if ( pPageFrmOfAnchor && pPageFrmOfAnchor != pPage ) + SwPageFrame* pPageFrameOfAnchor = + const_cast<SwFlyFrame*>(pFlyFrame)->FindPageFrameOfAnchor(); + if ( pPageFrameOfAnchor && pPageFrameOfAnchor != pPage ) { - InvalidatePage( pPageFrmOfAnchor ); + InvalidatePage( pPageFrameOfAnchor ); } } } @@ -373,21 +373,21 @@ void SwFrm::InvalidatePage( const SwPageFrm *pPage ) const if ( pPage->GetFormat()->GetDoc()->IsInDtor() ) return; - SwRootFrm *pRoot = const_cast<SwRootFrm*>(static_cast<const SwRootFrm*>(pPage->GetUpper())); - const SwFlyFrm *pFly = FindFlyFrm(); - if ( IsContentFrm() ) + SwRootFrame *pRoot = const_cast<SwRootFrame*>(static_cast<const SwRootFrame*>(pPage->GetUpper())); + const SwFlyFrame *pFly = FindFlyFrame(); + if ( IsContentFrame() ) { if ( pRoot->IsTurboAllowed() ) { // If a ContentFrame wants to register for a second time, make it a TurboAction. if ( !pRoot->GetTurbo() || this == pRoot->GetTurbo() ) - pRoot->SetTurbo( static_cast<const SwContentFrm*>(this) ); + pRoot->SetTurbo( static_cast<const SwContentFrame*>(this) ); else { pRoot->DisallowTurbo(); //The page of the Turbo could be a different one then mine, //therefore we have to invalidate it. - const SwFrm *pTmp = pRoot->GetTurbo(); + const SwFrame *pTmp = pRoot->GetTurbo(); pRoot->ResetTurbo(); pTmp->InvalidatePage(); } @@ -397,10 +397,10 @@ void SwFrm::InvalidatePage( const SwPageFrm *pPage ) const if ( pFly ) { if( !pFly->IsLocked() ) { - if ( pFly->IsFlyInCntFrm() ) + if ( pFly->IsFlyInContentFrame() ) { pPage->InvalidateFlyInCnt(); - static_cast<const SwFlyInCntFrm*>(pFly)->InvalidateContent(); - pFly->GetAnchorFrm()->InvalidatePage(); + static_cast<const SwFlyInContentFrame*>(pFly)->InvalidateContent(); + pFly->GetAnchorFrame()->InvalidatePage(); } else pPage->InvalidateFlyContent(); @@ -417,11 +417,11 @@ void SwFrm::InvalidatePage( const SwPageFrm *pPage ) const { if ( !pFly->IsLocked() ) { - if ( pFly->IsFlyInCntFrm() ) + if ( pFly->IsFlyInContentFrame() ) { pPage->InvalidateFlyInCnt(); - static_cast<const SwFlyInCntFrm*>(pFly)->InvalidateLayout(); - pFly->GetAnchorFrm()->InvalidatePage(); + static_cast<const SwFlyInContentFrame*>(pFly)->InvalidateLayout(); + pFly->GetAnchorFrame()->InvalidatePage(); } else pPage->InvalidateFlyLayout(); @@ -431,7 +431,7 @@ void SwFrm::InvalidatePage( const SwPageFrm *pPage ) const pPage->InvalidateLayout(); if ( pRoot->GetTurbo() ) - { const SwFrm *pTmp = pRoot->GetTurbo(); + { const SwFrame *pTmp = pRoot->GetTurbo(); pRoot->ResetTurbo(); pTmp->InvalidatePage(); } @@ -444,10 +444,10 @@ void SwFrm::InvalidatePage( const SwPageFrm *pPage ) const } } -Size SwFrm::ChgSize( const Size& aNewSize ) +Size SwFrame::ChgSize( const Size& aNewSize ) { mbFixSize = true; - const Size aOldSize( Frm().SSize() ); + const Size aOldSize( Frame().SSize() ); if ( aNewSize == aOldSize ) return aOldSize; @@ -455,19 +455,19 @@ Size SwFrm::ChgSize( const Size& aNewSize ) { SWRECTFN2( this ) SwRect aNew( Point(0,0), aNewSize ); - (maFrm.*fnRect->fnSetWidth)( (aNew.*fnRect->fnGetWidth)() ); + (maFrame.*fnRect->fnSetWidth)( (aNew.*fnRect->fnGetWidth)() ); long nNew = (aNew.*fnRect->fnGetHeight)(); - long nDiff = nNew - (maFrm.*fnRect->fnGetHeight)(); + long nDiff = nNew - (maFrame.*fnRect->fnGetHeight)(); if( nDiff ) { - if ( GetUpper()->IsFootnoteBossFrm() && HasFixSize() && + if ( GetUpper()->IsFootnoteBossFrame() && HasFixSize() && NA_GROW_SHRINK != - static_cast<SwFootnoteBossFrm*>(GetUpper())->NeighbourhoodAdjustment( this ) ) + static_cast<SwFootnoteBossFrame*>(GetUpper())->NeighbourhoodAdjustment( this ) ) { - (maFrm.*fnRect->fnSetHeight)( nNew ); - SwTwips nReal = static_cast<SwLayoutFrm*>(this)->AdjustNeighbourhood(nDiff); + (maFrame.*fnRect->fnSetHeight)( nNew ); + SwTwips nReal = static_cast<SwLayoutFrame*>(this)->AdjustNeighbourhood(nDiff); if ( nReal != nDiff ) - (maFrm.*fnRect->fnSetHeight)( nNew - nDiff + nReal ); + (maFrame.*fnRect->fnSetHeight)( nNew - nDiff + nReal ); } else { @@ -480,49 +480,49 @@ Size SwFrm::ChgSize( const Size& aNewSize ) else Shrink( -nDiff ); - if ( GetUpper() && (maFrm.*fnRect->fnGetHeight)() != nNew ) + if ( GetUpper() && (maFrame.*fnRect->fnGetHeight)() != nNew ) GetUpper()->_InvalidateSize(); } // Even if grow/shrink did not yet set the desired width, for // example when called by ChgColumns to set the column width, we // set the right width now. - (maFrm.*fnRect->fnSetHeight)( nNew ); + (maFrame.*fnRect->fnSetHeight)( nNew ); } } } else - maFrm.SSize( aNewSize ); + maFrame.SSize( aNewSize ); - if ( Frm().SSize() != aOldSize ) + if ( Frame().SSize() != aOldSize ) { - SwPageFrm *pPage = FindPageFrm(); + SwPageFrame *pPage = FindPageFrame(); if ( GetNext() ) { GetNext()->_InvalidatePos(); GetNext()->InvalidatePage( pPage ); } - if( IsLayoutFrm() ) + if( IsLayoutFrame() ) { if( IsRightToLeft() ) _InvalidatePos(); - if( static_cast<SwLayoutFrm*>(this)->Lower() ) - static_cast<SwLayoutFrm*>(this)->Lower()->_InvalidateSize(); + if( static_cast<SwLayoutFrame*>(this)->Lower() ) + static_cast<SwLayoutFrame*>(this)->Lower()->_InvalidateSize(); } _InvalidatePrt(); _InvalidateSize(); InvalidatePage( pPage ); } - return maFrm.SSize(); + return maFrame.SSize(); } -/** Insert SwFrm into existing structure. +/** Insert SwFrame into existing structure. * * Insertion is done below the parent either before pBehind or * at the end of the chain if pBehind is empty. */ -void SwFrm::InsertBefore( SwLayoutFrm* pParent, SwFrm* pBehind ) +void SwFrame::InsertBefore( SwLayoutFrame* pParent, SwFrame* pBehind ) { OSL_ENSURE( pParent, "No parent for insert." ); OSL_ENSURE( (!pBehind || pParent == pBehind->GetUpper()), @@ -552,12 +552,12 @@ void SwFrm::InsertBefore( SwLayoutFrm* pParent, SwFrm* pBehind ) } } -/** Insert SwFrm into existing structure. +/** Insert SwFrame into existing structure. * * Insertion is done below the parent either after pBehind or * at the beginning of the chain if pBehind is empty. */ -void SwFrm::InsertBehind( SwLayoutFrm *pParent, SwFrm *pBefore ) +void SwFrame::InsertBehind( SwLayoutFrame *pParent, SwFrame *pBefore ) { OSL_ENSURE( pParent, "No Parent for Insert." ); OSL_ENSURE( (!pBefore || pParent == pBefore->GetUpper()), @@ -582,29 +582,29 @@ void SwFrm::InsertBehind( SwLayoutFrm *pParent, SwFrm *pBefore ) } } -/** Insert a chain of SwFrms into an existing struction +/** Insert a chain of SwFrames into an existing struction * * Currently, this method is used to insert a SectionFrame (which may have some siblings) into an * existing structure. If the third parameter is NULL, this method is (besides handling the - * siblings) equal to SwFrm::InsertBefore(..). + * siblings) equal to SwFrame::InsertBefore(..). * * If the third parameter is passed, the following happens: * - this becomes mpNext of pParent * - pSct becomes mpNext of the last one in the this-chain * - pBehind is reconnected from pParent to pSct - * The purpose is: a SectionFrm (this) won't become a child of another SectionFrm (pParent), but + * The purpose is: a SectionFrame (this) won't become a child of another SectionFrame (pParent), but * pParent gets split into two siblings (pParent+pSect) and this is inserted between. */ -bool SwFrm::InsertGroupBefore( SwFrm* pParent, SwFrm* pBehind, SwFrm* pSct ) +bool SwFrame::InsertGroupBefore( SwFrame* pParent, SwFrame* pBehind, SwFrame* pSct ) { OSL_ENSURE( pParent, "No parent for insert." ); OSL_ENSURE( (!pBehind || ( (pBehind && (pParent == pBehind->GetUpper())) - || ((pParent->IsSctFrm() && pBehind->GetUpper()->IsColBodyFrm())) ) ), + || ((pParent->IsSctFrame() && pBehind->GetUpper()->IsColBodyFrame())) ) ), "Frame tree inconsistent." ); if( pSct ) { mpUpper = pParent->GetUpper(); - SwFrm *pLast = this; + SwFrame *pLast = this; while( pLast->GetNext() ) { pLast = pLast->GetNext(); @@ -638,11 +638,11 @@ bool SwFrm::InsertGroupBefore( SwFrm* pParent, SwFrm* pBehind, SwFrm* pSct ) else pBehind->GetUpper()->m_pLower = nullptr; pBehind->mpPrev = nullptr; - SwLayoutFrm* pTmp = static_cast<SwLayoutFrm*>(pSct); + SwLayoutFrame* pTmp = static_cast<SwLayoutFrame*>(pSct); if( pTmp->Lower() ) { - OSL_ENSURE( pTmp->Lower()->IsColumnFrm(), "InsertGrp: Used SectionFrm" ); - pTmp = static_cast<SwLayoutFrm*>(static_cast<SwLayoutFrm*>(pTmp->Lower())->Lower()); + OSL_ENSURE( pTmp->Lower()->IsColumnFrame(), "InsertGrp: Used SectionFrame" ); + pTmp = static_cast<SwLayoutFrame*>(static_cast<SwLayoutFrame*>(pTmp->Lower())->Lower()); OSL_ENSURE( pTmp, "InsertGrp: Missing ColBody" ); } pBehind->mpUpper = pTmp; @@ -656,15 +656,15 @@ bool SwFrm::InsertGroupBefore( SwFrm* pParent, SwFrm* pBehind, SwFrm* pSct ) } else { - OSL_ENSURE( pSct->IsSctFrm(), "InsertGroup: For SectionFrms only" ); - SwFrm::DestroyFrm(pSct); + OSL_ENSURE( pSct->IsSctFrame(), "InsertGroup: For SectionFrames only" ); + SwFrame::DestroyFrame(pSct); return false; } } else { - mpUpper = static_cast<SwLayoutFrm*>(pParent); - SwFrm *pLast = this; + mpUpper = static_cast<SwLayoutFrame*>(pParent); + SwFrame *pLast = this; while( pLast->GetNext() ) { pLast = pLast->GetNext(); @@ -696,7 +696,7 @@ bool SwFrm::InsertGroupBefore( SwFrm* pParent, SwFrm* pBehind, SwFrm* pSct ) return true; } -void SwFrm::RemoveFromLayout() +void SwFrame::RemoveFromLayout() { OSL_ENSURE( mpUpper, "Remove without upper?" ); @@ -716,21 +716,21 @@ void SwFrm::RemoveFromLayout() mpUpper = nullptr; } -void SwContentFrm::Paste( SwFrm* pParent, SwFrm* pSibling) +void SwContentFrame::Paste( SwFrame* pParent, SwFrame* pSibling) { OSL_ENSURE( pParent, "No parent for pasting." ); - OSL_ENSURE( pParent->IsLayoutFrm(), "Parent is ContentFrm." ); + OSL_ENSURE( pParent->IsLayoutFrame(), "Parent is ContentFrame." ); OSL_ENSURE( pParent != this, "I'm the parent." ); OSL_ENSURE( pSibling != this, "I'm my own neighbour." ); OSL_ENSURE( !GetPrev() && !GetNext() && !GetUpper(), "I'm still registered somewhere" ); - OSL_ENSURE( !pSibling || pSibling->IsFlowFrm(), - "<SwContentFrm::Paste(..)> - sibling not of expected type." ); + OSL_ENSURE( !pSibling || pSibling->IsFlowFrame(), + "<SwContentFrame::Paste(..)> - sibling not of expected type." ); //Insert in the tree. - InsertBefore( static_cast<SwLayoutFrm*>(pParent), pSibling ); + InsertBefore( static_cast<SwLayoutFrame*>(pParent), pSibling ); - SwPageFrm *pPage = FindPageFrm(); + SwPageFrame *pPage = FindPageFrame(); _InvalidateAll(); InvalidatePage( pPage ); @@ -744,30 +744,30 @@ void SwContentFrm::Paste( SwFrm* pParent, SwFrm* pSibling) if ( GetNext() ) { - SwFrm* pNxt = GetNext(); + SwFrame* pNxt = GetNext(); pNxt->_InvalidatePrt(); pNxt->_InvalidatePos(); pNxt->InvalidatePage( pPage ); - if( pNxt->IsSctFrm() ) - pNxt = static_cast<SwSectionFrm*>(pNxt)->ContainsContent(); - if( pNxt && pNxt->IsTextFrm() && pNxt->IsInFootnote() ) + if( pNxt->IsSctFrame() ) + pNxt = static_cast<SwSectionFrame*>(pNxt)->ContainsContent(); + if( pNxt && pNxt->IsTextFrame() && pNxt->IsInFootnote() ) pNxt->Prepare( PREP_FTN, nullptr, false ); } - if ( Frm().Height() ) - pParent->Grow( Frm().Height() ); + if ( Frame().Height() ) + pParent->Grow( Frame().Height() ); - if ( Frm().Width() != pParent->Prt().Width() ) + if ( Frame().Width() != pParent->Prt().Width() ) Prepare( PREP_FIXSIZE_CHG ); if ( GetPrev() ) { if ( IsFollow() ) //I'm a direct follower of my master now - static_cast<SwContentFrm*>(GetPrev())->Prepare( PREP_FOLLOW_FOLLOWS ); + static_cast<SwContentFrame*>(GetPrev())->Prepare( PREP_FOLLOW_FOLLOWS ); else { - if ( GetPrev()->Frm().Height() != + if ( GetPrev()->Frame().Height() != GetPrev()->Prt().Height() + GetPrev()->Prt().Top() ) { // Take the border into account? @@ -776,7 +776,7 @@ void SwContentFrm::Paste( SwFrm* pParent, SwFrm* pSibling) // OD 18.02.2003 #104989# - force complete paint of previous frame, // if frame is inserted at the end of a section frame, in order to // get subsidiary lines repainted for the section. - if ( pParent->IsSctFrm() && !GetNext() ) + if ( pParent->IsSctFrame() && !GetNext() ) { // force complete paint of previous frame, if new inserted frame // in the section is the last one. @@ -787,26 +787,26 @@ void SwContentFrm::Paste( SwFrm* pParent, SwFrm* pSibling) } if ( IsInFootnote() ) { - SwFrm* pFrm = GetIndPrev(); - if( pFrm && pFrm->IsSctFrm() ) - pFrm = static_cast<SwSectionFrm*>(pFrm)->ContainsAny(); - if( pFrm ) - pFrm->Prepare( PREP_QUOVADIS, nullptr, false ); + SwFrame* pFrame = GetIndPrev(); + if( pFrame && pFrame->IsSctFrame() ) + pFrame = static_cast<SwSectionFrame*>(pFrame)->ContainsAny(); + if( pFrame ) + pFrame->Prepare( PREP_QUOVADIS, nullptr, false ); if( !GetNext() ) { - pFrm = FindFootnoteFrm()->GetNext(); - if( pFrm && nullptr != (pFrm=static_cast<SwLayoutFrm*>(pFrm)->ContainsAny()) ) - pFrm->_InvalidatePrt(); + pFrame = FindFootnoteFrame()->GetNext(); + if( pFrame && nullptr != (pFrame=static_cast<SwLayoutFrame*>(pFrame)->ContainsAny()) ) + pFrame->_InvalidatePrt(); } } _InvalidateLineNum(); - SwFrm *pNxt = FindNextCnt(); + SwFrame *pNxt = FindNextCnt(); if ( pNxt ) { while ( pNxt && pNxt->IsInTab() ) { - if( nullptr != (pNxt = pNxt->FindTabFrm()) ) + if( nullptr != (pNxt = pNxt->FindTabFrame()) ) pNxt = pNxt->FindNextCnt(); } if ( pNxt ) @@ -818,37 +818,37 @@ void SwContentFrm::Paste( SwFrm* pParent, SwFrm* pSibling) } } -void SwContentFrm::Cut() +void SwContentFrame::Cut() { OSL_ENSURE( GetUpper(), "Cut without Upper()." ); - SwPageFrm *pPage = FindPageFrm(); + SwPageFrame *pPage = FindPageFrame(); InvalidatePage( pPage ); - SwFrm *pFrm = GetIndPrev(); - if( pFrm ) + SwFrame *pFrame = GetIndPrev(); + if( pFrame ) { - if( pFrm->IsSctFrm() ) - pFrm = static_cast<SwSectionFrm*>(pFrm)->ContainsAny(); - if ( pFrm && pFrm->IsContentFrm() ) + if( pFrame->IsSctFrame() ) + pFrame = static_cast<SwSectionFrame*>(pFrame)->ContainsAny(); + if ( pFrame && pFrame->IsContentFrame() ) { - pFrm->_InvalidatePrt(); + pFrame->_InvalidatePrt(); if( IsInFootnote() ) - pFrm->Prepare( PREP_QUOVADIS, nullptr, false ); + pFrame->Prepare( PREP_QUOVADIS, nullptr, false ); } // #i26250# - invalidate printing area of previous // table frame. - else if ( pFrm && pFrm->IsTabFrm() ) + else if ( pFrame && pFrame->IsTabFrame() ) { - pFrm->InvalidatePrt(); + pFrame->InvalidatePrt(); } } - SwFrm *pNxt = FindNextCnt(); + SwFrame *pNxt = FindNextCnt(); if ( pNxt ) { while ( pNxt && pNxt->IsInTab() ) { - if( nullptr != (pNxt = pNxt->FindTabFrm()) ) + if( nullptr != (pNxt = pNxt->FindTabFrame()) ) pNxt = pNxt->FindNextCnt(); } if ( pNxt ) @@ -859,28 +859,28 @@ void SwContentFrm::Cut() } } - if( nullptr != (pFrm = GetIndNext()) ) + if( nullptr != (pFrame = GetIndNext()) ) { // The old follow may have calculated a gap to the predecessor which // now becomes obsolete or different as it becomes the first one itself - pFrm->_InvalidatePrt(); - pFrm->_InvalidatePos(); - pFrm->InvalidatePage( pPage ); - if( pFrm->IsSctFrm() ) + pFrame->_InvalidatePrt(); + pFrame->_InvalidatePos(); + pFrame->InvalidatePage( pPage ); + if( pFrame->IsSctFrame() ) { - pFrm = static_cast<SwSectionFrm*>(pFrm)->ContainsAny(); - if( pFrm ) + pFrame = static_cast<SwSectionFrame*>(pFrame)->ContainsAny(); + if( pFrame ) { - pFrm->_InvalidatePrt(); - pFrm->_InvalidatePos(); - pFrm->InvalidatePage( pPage ); + pFrame->_InvalidatePrt(); + pFrame->_InvalidatePos(); + pFrame->InvalidatePage( pPage ); } } - if( pFrm && IsInFootnote() ) - pFrm->Prepare( PREP_ERGOSUM, nullptr, false ); + if( pFrame && IsInFootnote() ) + pFrame->Prepare( PREP_ERGOSUM, nullptr, false ); if( IsInSct() && !GetPrev() ) { - SwSectionFrm* pSct = FindSctFrm(); + SwSectionFrame* pSct = FindSctFrame(); if( !pSct->IsFollow() ) { pSct->_InvalidatePrt(); @@ -892,16 +892,16 @@ void SwContentFrm::Cut() { InvalidateNextPos(); //Someone needs to do the retouching: predecessor or upper - if ( nullptr != (pFrm = GetPrev()) ) - { pFrm->SetRetouche(); - pFrm->Prepare( PREP_WIDOWS_ORPHANS ); - pFrm->_InvalidatePos(); - pFrm->InvalidatePage( pPage ); + if ( nullptr != (pFrame = GetPrev()) ) + { pFrame->SetRetouche(); + pFrame->Prepare( PREP_WIDOWS_ORPHANS ); + pFrame->_InvalidatePos(); + pFrame->InvalidatePage( pPage ); } - // If I'm (was) the only ContentFrm in my upper, it has to do the + // If I'm (was) the only ContentFrame in my upper, it has to do the // retouching. Also, perhaps a page became empty. else - { SwRootFrm *pRoot = getRootFrm(); + { SwRootFrame *pRoot = getRootFrame(); if ( pRoot ) { pRoot->SetSuperfluous(); @@ -910,7 +910,7 @@ void SwContentFrm::Cut() } if( IsInSct() ) { - SwSectionFrm* pSct = FindSctFrm(); + SwSectionFrame* pSct = FindSctFrame(); if( !pSct->IsFollow() ) { pSct->_InvalidatePrt(); @@ -921,8 +921,8 @@ void SwContentFrm::Cut() // of removing the follow flow line. if ( IsInTab() ) { - SwTabFrm* pThisTab = FindTabFrm(); - SwTabFrm* pMasterTab = pThisTab && pThisTab->IsFollow() ? pThisTab->FindMaster() : nullptr; + SwTabFrame* pThisTab = FindTabFrame(); + SwTabFrame* pMasterTab = pThisTab && pThisTab->IsFollow() ? pThisTab->FindMaster() : nullptr; if ( pMasterTab ) { pMasterTab->_InvalidatePos(); @@ -932,44 +932,44 @@ void SwContentFrm::Cut() } } //Remove first, then shrink the upper. - SwLayoutFrm *pUp = GetUpper(); + SwLayoutFrame *pUp = GetUpper(); RemoveFromLayout(); if ( pUp ) { - SwSectionFrm *pSct = nullptr; + SwSectionFrame *pSct = nullptr; if ( !pUp->Lower() && - ( ( pUp->IsFootnoteFrm() && !pUp->IsColLocked() ) || + ( ( pUp->IsFootnoteFrame() && !pUp->IsColLocked() ) || ( pUp->IsInSct() && // #i29438# // We have to consider the case that the section may be "empty" // except from a temporary empty table frame. // This can happen due to the new cell split feature. - !pUp->IsCellFrm() && + !pUp->IsCellFrame() && // #126020# - adjust check for empty section // #130797# - correct fix #126020# - !(pSct = pUp->FindSctFrm())->ContainsContent() && + !(pSct = pUp->FindSctFrame())->ContainsContent() && !pSct->ContainsAny( true ) ) ) ) { if ( pUp->GetUpper() ) { // prevent delete of <ColLocked> footnote frame - if ( pUp->IsFootnoteFrm() && !pUp->IsColLocked()) + if ( pUp->IsFootnoteFrame() && !pUp->IsColLocked()) { if( pUp->GetNext() && !pUp->GetPrev() ) { - SwFrm* pTmp = static_cast<SwLayoutFrm*>(pUp->GetNext())->ContainsAny(); + SwFrame* pTmp = static_cast<SwLayoutFrame*>(pUp->GetNext())->ContainsAny(); if( pTmp ) pTmp->_InvalidatePrt(); } pUp->Cut(); - SwFrm::DestroyFrm(pUp); + SwFrame::DestroyFrame(pUp); } else { if ( pSct->IsColLocked() || !pSct->IsInFootnote() || - ( pUp->IsFootnoteFrm() && pUp->IsColLocked() ) ) + ( pUp->IsFootnoteFrame() && pUp->IsColLocked() ) ) { pSct->DelEmpty( false ); // If a locked section may not be deleted then at least @@ -980,7 +980,7 @@ void SwContentFrm::Cut() else { pSct->DelEmpty( true ); - SwFrm::DestroyFrm(pSct); + SwFrame::DestroyFrame(pSct); } } } @@ -988,24 +988,24 @@ void SwContentFrm::Cut() else { SWRECTFN( this ) - long nFrmHeight = (Frm().*fnRect->fnGetHeight)(); - if( nFrmHeight ) - pUp->Shrink( nFrmHeight ); + long nFrameHeight = (Frame().*fnRect->fnGetHeight)(); + if( nFrameHeight ) + pUp->Shrink( nFrameHeight ); } } } -void SwLayoutFrm::Paste( SwFrm* pParent, SwFrm* pSibling) +void SwLayoutFrame::Paste( SwFrame* pParent, SwFrame* pSibling) { OSL_ENSURE( pParent, "No parent for pasting." ); - OSL_ENSURE( pParent->IsLayoutFrm(), "Parent is ContentFrm." ); + OSL_ENSURE( pParent->IsLayoutFrame(), "Parent is ContentFrame." ); OSL_ENSURE( pParent != this, "I'm the parent oneself." ); OSL_ENSURE( pSibling != this, "I'm my own neighbour." ); OSL_ENSURE( !GetPrev() && !GetNext() && !GetUpper(), "I'm still registered somewhere." ); //Insert in the tree. - InsertBefore( static_cast<SwLayoutFrm*>(pParent), pSibling ); + InsertBefore( static_cast<SwLayoutFrame*>(pParent), pSibling ); // OD 24.10.2002 #103517# - correct setting of variable <fnRect> // <fnRect> is used for the following: @@ -1034,49 +1034,49 @@ void SwLayoutFrm::Paste( SwFrm* pParent, SwFrm* pSibling) // --> <fnRect> = fnRectHori //SwRectFn fnRect = IsVertical() ? fnRectHori : fnRectVert; SwRectFn fnRect; - if ( IsHeaderFrm() || IsFooterFrm() ) + if ( IsHeaderFrame() || IsFooterFrame() ) fnRect = fnRectHori; - else if ( IsCellFrm() || IsColumnFrm() ) + else if ( IsCellFrame() || IsColumnFrame() ) fnRect = GetUpper()->IsVertical() ? fnRectHori : ( GetUpper()->IsVertLR() ? fnRectVertL2R : fnRectVert ); else fnRect = GetUpper()->IsVertical() ? ( GetUpper()->IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori; - if( (Frm().*fnRect->fnGetWidth)() != (pParent->Prt().*fnRect->fnGetWidth)()) + if( (Frame().*fnRect->fnGetWidth)() != (pParent->Prt().*fnRect->fnGetWidth)()) _InvalidateSize(); _InvalidatePos(); - const SwPageFrm *pPage = FindPageFrm(); + const SwPageFrame *pPage = FindPageFrame(); InvalidatePage( pPage ); - if( !IsColumnFrm() ) + if( !IsColumnFrame() ) { - SwFrm *pFrm = GetIndNext(); - if( nullptr != pFrm ) + SwFrame *pFrame = GetIndNext(); + if( nullptr != pFrame ) { - pFrm->_InvalidatePos(); + pFrame->_InvalidatePos(); if( IsInFootnote() ) { - if( pFrm->IsSctFrm() ) - pFrm = static_cast<SwSectionFrm*>(pFrm)->ContainsAny(); - if( pFrm ) - pFrm->Prepare( PREP_ERGOSUM, nullptr, false ); + if( pFrame->IsSctFrame() ) + pFrame = static_cast<SwSectionFrame*>(pFrame)->ContainsAny(); + if( pFrame ) + pFrame->Prepare( PREP_ERGOSUM, nullptr, false ); } } - if ( IsInFootnote() && nullptr != ( pFrm = GetIndPrev() ) ) + if ( IsInFootnote() && nullptr != ( pFrame = GetIndPrev() ) ) { - if( pFrm->IsSctFrm() ) - pFrm = static_cast<SwSectionFrm*>(pFrm)->ContainsAny(); - if( pFrm ) - pFrm->Prepare( PREP_QUOVADIS, nullptr, false ); + if( pFrame->IsSctFrame() ) + pFrame = static_cast<SwSectionFrame*>(pFrame)->ContainsAny(); + if( pFrame ) + pFrame->Prepare( PREP_QUOVADIS, nullptr, false ); } } - if( (Frm().*fnRect->fnGetHeight)() ) + if( (Frame().*fnRect->fnGetHeight)() ) { // AdjustNeighbourhood is now also called in columns which are not // placed inside a frame - sal_uInt8 nAdjust = GetUpper()->IsFootnoteBossFrm() ? - static_cast<SwFootnoteBossFrm*>(GetUpper())->NeighbourhoodAdjustment( this ) + sal_uInt8 nAdjust = GetUpper()->IsFootnoteBossFrame() ? + static_cast<SwFootnoteBossFrame*>(GetUpper())->NeighbourhoodAdjustment( this ) : NA_GROW_SHRINK; - SwTwips nGrow = (Frm().*fnRect->fnGetHeight)(); + SwTwips nGrow = (Frame().*fnRect->fnGetHeight)(); if( NA_ONLY_ADJUST == nAdjust ) AdjustNeighbourhood( nGrow ); else @@ -1092,16 +1092,16 @@ void SwLayoutFrm::Paste( SwFrm* pParent, SwFrm* pSibling) } } -void SwLayoutFrm::Cut() +void SwLayoutFrame::Cut() { if ( GetNext() ) GetNext()->_InvalidatePos(); SWRECTFN( this ) - SwTwips nShrink = (Frm().*fnRect->fnGetHeight)(); + SwTwips nShrink = (Frame().*fnRect->fnGetHeight)(); // Remove first, then shrink upper. - SwLayoutFrm *pUp = GetUpper(); + SwLayoutFrame *pUp = GetUpper(); // AdjustNeighbourhood is now also called in columns which are not // placed inside a frame. @@ -1111,9 +1111,9 @@ void SwLayoutFrm::Cut() // of its content. if ( pUp && nShrink ) { - if( pUp->IsFootnoteBossFrm() ) + if( pUp->IsFootnoteBossFrame() ) { - sal_uInt8 nAdjust= static_cast<SwFootnoteBossFrm*>(pUp)->NeighbourhoodAdjustment( this ); + sal_uInt8 nAdjust= static_cast<SwFootnoteBossFrame*>(pUp)->NeighbourhoodAdjustment( this ); if( NA_ONLY_ADJUST == nAdjust ) AdjustNeighbourhood( -nShrink ); else @@ -1123,10 +1123,10 @@ void SwLayoutFrm::Cut() nReal = -AdjustNeighbourhood( -nShrink ); if( nReal < nShrink ) { - SwTwips nOldHeight = (Frm().*fnRect->fnGetHeight)(); - (Frm().*fnRect->fnSetHeight)( 0 ); + SwTwips nOldHeight = (Frame().*fnRect->fnGetHeight)(); + (Frame().*fnRect->fnSetHeight)( 0 ); nReal += pUp->Shrink( nShrink - nReal ); - (Frm().*fnRect->fnSetHeight)( nOldHeight ); + (Frame().*fnRect->fnSetHeight)( nOldHeight ); } if( NA_GROW_ADJUST == nAdjust && nReal < nShrink ) AdjustNeighbourhood( nReal - nShrink ); @@ -1149,7 +1149,7 @@ void SwLayoutFrm::Cut() } } -SwTwips SwFrm::Grow( SwTwips nDist, bool bTst, bool bInfo ) +SwTwips SwFrame::Grow( SwTwips nDist, bool bTst, bool bInfo ) { OSL_ENSURE( nDist >= 0, "Negative growth?" ); @@ -1163,16 +1163,16 @@ SwTwips SwFrm::Grow( SwTwips nDist, bool bTst, bool bInfo ) if( nPrtHeight > 0 && nDist > (LONG_MAX - nPrtHeight) ) nDist = LONG_MAX - nPrtHeight; - if ( IsFlyFrm() ) - return static_cast<SwFlyFrm*>(this)->_Grow( nDist, bTst ); - else if( IsSctFrm() ) - return static_cast<SwSectionFrm*>(this)->_Grow( nDist, bTst ); + if ( IsFlyFrame() ) + return static_cast<SwFlyFrame*>(this)->_Grow( nDist, bTst ); + else if( IsSctFrame() ) + return static_cast<SwSectionFrame*>(this)->_Grow( nDist, bTst ); else { - const SwCellFrm* pThisCell = dynamic_cast<const SwCellFrm*>(this); + const SwCellFrame* pThisCell = dynamic_cast<const SwCellFrame*>(this); if ( pThisCell ) { - const SwTabFrm* pTab = FindTabFrm(); + const SwTabFrame* pTab = FindTabFrame(); // NEW TABLES if ( pTab->IsVertical() != IsVertical() || @@ -1180,12 +1180,12 @@ SwTwips SwFrm::Grow( SwTwips nDist, bool bTst, bool bInfo ) return 0; } - const SwTwips nReal = GrowFrm( nDist, bTst, bInfo ); + const SwTwips nReal = GrowFrame( nDist, bTst, bInfo ); if( !bTst ) { nPrtHeight = (Prt().*fnRect->fnGetHeight)(); (Prt().*fnRect->fnSetHeight)( nPrtHeight + - ( IsContentFrm() ? nDist : nReal ) ); + ( IsContentFrame() ? nDist : nReal ) ); } return nReal; } @@ -1193,7 +1193,7 @@ SwTwips SwFrm::Grow( SwTwips nDist, bool bTst, bool bInfo ) return 0L; } -SwTwips SwFrm::Shrink( SwTwips nDist, bool bTst, bool bInfo ) +SwTwips SwFrame::Shrink( SwTwips nDist, bool bTst, bool bInfo ) { OSL_ENSURE( nDist >= 0, "Negative reduction?" ); @@ -1201,16 +1201,16 @@ SwTwips SwFrm::Shrink( SwTwips nDist, bool bTst, bool bInfo ) if ( nDist ) { - if ( IsFlyFrm() ) - return static_cast<SwFlyFrm*>(this)->_Shrink( nDist, bTst ); - else if( IsSctFrm() ) - return static_cast<SwSectionFrm*>(this)->_Shrink( nDist, bTst ); + if ( IsFlyFrame() ) + return static_cast<SwFlyFrame*>(this)->_Shrink( nDist, bTst ); + else if( IsSctFrame() ) + return static_cast<SwSectionFrame*>(this)->_Shrink( nDist, bTst ); else { - const SwCellFrm* pThisCell = dynamic_cast<const SwCellFrm*>(this); + const SwCellFrame* pThisCell = dynamic_cast<const SwCellFrame*>(this); if ( pThisCell ) { - const SwTabFrm* pTab = FindTabFrm(); + const SwTabFrame* pTab = FindTabFrame(); // NEW TABLES if ( pTab->IsVertical() != IsVertical() || @@ -1219,14 +1219,14 @@ SwTwips SwFrm::Shrink( SwTwips nDist, bool bTst, bool bInfo ) } SWRECTFN( this ) - SwTwips nReal = (Frm().*fnRect->fnGetHeight)(); - ShrinkFrm( nDist, bTst, bInfo ); - nReal -= (Frm().*fnRect->fnGetHeight)(); + SwTwips nReal = (Frame().*fnRect->fnGetHeight)(); + ShrinkFrame( nDist, bTst, bInfo ); + nReal -= (Frame().*fnRect->fnGetHeight)(); if( !bTst ) { const SwTwips nPrtHeight = (Prt().*fnRect->fnGetHeight)(); (Prt().*fnRect->fnSetHeight)( nPrtHeight - - ( IsContentFrm() ? nDist : nReal ) ); + ( IsContentFrame() ? nDist : nReal ) ); } return nReal; } @@ -1236,14 +1236,14 @@ SwTwips SwFrm::Shrink( SwTwips nDist, bool bTst, bool bInfo ) /** Adjust surrounding neighbourhood after insertion * - * A Frm needs "normalization" if it is directly placed below a footnote boss (page/column) and its + * A Frame needs "normalization" if it is directly placed below a footnote boss (page/column) and its * size changes. There is always a frame that takes the maximum possible space (the frame that * contains the Body text) and zero or more frames which only take the space needed (header/footer * area, footnote container). If one of these frames changes, the body-text-frame has to grow or * shrink accordingly, even tough it's fixed. * * !! Is it possible to do this in a generic way and not restrict it to the page and a distinct - * frame which takes the maximum space (controlled using the FrmSize attribute)? + * frame which takes the maximum space (controlled using the FrameSize attribute)? * Problems: * - What if multiple frames taking the maximum space are placed next to each other? * - How is the maximum space calculated? @@ -1254,33 +1254,33 @@ SwTwips SwFrm::Shrink( SwTwips nDist, bool bTst, bool bInfo ) * * @param nDiff the value around which the space has to be allocated */ -SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, bool bTst ) +SwTwips SwFrame::AdjustNeighbourhood( SwTwips nDiff, bool bTst ) { PROTOCOL_ENTER( this, PROT_ADJUSTN, 0, &nDiff ); - if ( !nDiff || !GetUpper()->IsFootnoteBossFrm() ) // only inside pages/columns + if ( !nDiff || !GetUpper()->IsFootnoteBossFrame() ) // only inside pages/columns return 0L; - const SwViewShell *pSh = getRootFrm()->GetCurrShell(); + const SwViewShell *pSh = getRootFrame()->GetCurrShell(); const bool bBrowse = pSh && pSh->GetViewOptions()->getBrowseMode(); //The (Page-)Body only changes in BrowseMode, but only if it does not //contain columns. - if ( IsPageBodyFrm() && (!bBrowse || - (static_cast<SwLayoutFrm*>(this)->Lower() && - static_cast<SwLayoutFrm*>(this)->Lower()->IsColumnFrm())) ) + if ( IsPageBodyFrame() && (!bBrowse || + (static_cast<SwLayoutFrame*>(this)->Lower() && + static_cast<SwLayoutFrame*>(this)->Lower()->IsColumnFrame())) ) return 0L; - //In BrowseView mode the PageFrm can handle some of the requests. + //In BrowseView mode the PageFrame can handle some of the requests. long nBrowseAdd = 0; - if ( bBrowse && GetUpper()->IsPageFrm() ) // only (Page-)BodyFrms + if ( bBrowse && GetUpper()->IsPageFrame() ) // only (Page-)BodyFrames { - SwViewShell *pViewShell = getRootFrm()->GetCurrShell(); - SwLayoutFrm *pUp = GetUpper(); + SwViewShell *pViewShell = getRootFrame()->GetCurrShell(); + SwLayoutFrame *pUp = GetUpper(); long nChg; - const long nUpPrtBottom = pUp->Frm().Height() - + const long nUpPrtBottom = pUp->Frame().Height() - pUp->Prt().Height() - pUp->Prt().Top(); - SwRect aInva( pUp->Frm() ); + SwRect aInva( pUp->Frame() ); if ( pViewShell ) { aInva.Pos().X() = pViewShell->VisArea().Left(); @@ -1288,25 +1288,25 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, bool bTst ) } if ( nDiff > 0 ) { - nChg = BROWSE_HEIGHT - pUp->Frm().Height(); + nChg = BROWSE_HEIGHT - pUp->Frame().Height(); nChg = std::min( nDiff, nChg ); - if ( !IsBodyFrm() ) + if ( !IsBodyFrame() ) { SetCompletePaint(); - if ( !pViewShell || pViewShell->VisArea().Height() >= pUp->Frm().Height() ) + if ( !pViewShell || pViewShell->VisArea().Height() >= pUp->Frame().Height() ) { //First minimize Body, it will grow again later. - SwFrm *pBody = static_cast<SwFootnoteBossFrm*>(pUp)->FindBodyCont(); + SwFrame *pBody = static_cast<SwFootnoteBossFrame*>(pUp)->FindBodyCont(); const long nTmp = nChg - pBody->Prt().Height(); if ( !bTst ) { - pBody->Frm().Height(std::max( 0L, pBody->Frm().Height() - nChg )); + pBody->Frame().Height(std::max( 0L, pBody->Frame().Height() - nChg )); pBody->_InvalidatePrt(); pBody->_InvalidateSize(); if ( pBody->GetNext() ) pBody->GetNext()->_InvalidatePos(); - if ( !IsHeaderFrm() ) + if ( !IsHeaderFrame() ) pBody->SetCompletePaint(); } nChg = nTmp <= 0 ? 0 : nTmp; @@ -1324,10 +1324,10 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, bool bTst ) nChg = nDiff; long nInvaAdd = 0; if ( pViewShell && !pUp->GetPrev() && - pUp->Frm().Height() + nDiff < pViewShell->VisArea().Height() ) + pUp->Frame().Height() + nDiff < pViewShell->VisArea().Height() ) { // This means that we have to invalidate adequately. - nChg = pViewShell->VisArea().Height() - pUp->Frm().Height(); + nChg = pViewShell->VisArea().Height() - pUp->Frame().Height(); nInvaAdd = -(nDiff - nChg); } @@ -1335,11 +1335,11 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, bool bTst ) long nBorder = nUpPrtBottom + 20; nBorder -= nChg; aInva.Top( aInva.Bottom() - (nBorder+nInvaAdd) ); - if ( !IsBodyFrm() ) + if ( !IsBodyFrame() ) { SetCompletePaint(); - if ( !IsHeaderFrm() ) - static_cast<SwFootnoteBossFrm*>(pUp)->FindBodyCont()->SetCompletePaint(); + if ( !IsHeaderFrame() ) + static_cast<SwFootnoteBossFrame*>(pUp)->FindBodyCont()->SetCompletePaint(); } //Invalidate the page because of the frames. Thereby the page becomes //the right size again if a frame didn't fit. This only works @@ -1354,7 +1354,7 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, bool bTst ) } if ( !bTst && nChg ) { - pUp->Frm().SSize().Height() += nChg; + pUp->Frame().SSize().Height() += nChg; pUp->Prt().SSize().Height() += nChg; if ( pViewShell ) pViewShell->Imp()->SetFirstVisPageInvalid(); @@ -1366,7 +1366,7 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, bool bTst ) SvxBrushItem aBack(pUp->GetFormat()->makeBackgroundBrushItem()); const SvxGraphicPosition ePos = aBack.GetGraphicPos(); if ( ePos != GPOS_NONE && ePos != GPOS_TILED ) - pViewShell->InvalidateWindows( pUp->Frm() ); + pViewShell->InvalidateWindows( pUp->Frame() ); if ( pUp->GetUpper() ) { @@ -1375,25 +1375,25 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, bool bTst ) //Sad but true: during notify on ViewImp a Calc on the page and //its Lower may be called. The values should not be changed - //because the caller takes care of the adjustment of Frm and + //because the caller takes care of the adjustment of Frame and //Prt. - const long nOldFrmHeight = Frm().Height(); + const long nOldFrameHeight = Frame().Height(); const long nOldPrtHeight = Prt().Height(); const bool bOldComplete = IsCompletePaint(); - if ( IsBodyFrm() ) - Prt().SSize().Height() = nOldFrmHeight; + if ( IsBodyFrame() ) + Prt().SSize().Height() = nOldFrameHeight; if ( pUp->GetUpper() ) - static_cast<SwRootFrm*>(pUp->GetUpper())->CheckViewLayout( nullptr, nullptr ); - //static_cast<SwPageFrm*>(pUp)->AdjustRootSize( CHG_CHGPAGE, &aOldRect ); + static_cast<SwRootFrame*>(pUp->GetUpper())->CheckViewLayout( nullptr, nullptr ); + //static_cast<SwPageFrame*>(pUp)->AdjustRootSize( CHG_CHGPAGE, &aOldRect ); - Frm().SSize().Height() = nOldFrmHeight; + Frame().SSize().Height() = nOldFrameHeight; Prt().SSize().Height() = nOldPrtHeight; mbCompletePaint = bOldComplete; } - if ( !IsBodyFrm() ) + if ( !IsBodyFrame() ) pUp->_InvalidateSize(); - InvalidatePage( static_cast<SwPageFrm*>(pUp) ); + InvalidatePage( static_cast<SwPageFrame*>(pUp) ); } nDiff -= nChg; if ( !nDiff ) @@ -1402,63 +1402,63 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, bool bTst ) nBrowseAdd = nChg; } - const SwFootnoteBossFrm *pBoss = static_cast<SwFootnoteBossFrm*>(GetUpper()); + const SwFootnoteBossFrame *pBoss = static_cast<SwFootnoteBossFrame*>(GetUpper()); SwTwips nReal = 0, nAdd = 0; - SwFrm *pFrm = nullptr; + SwFrame *pFrame = nullptr; SWRECTFN( this ) - if( IsBodyFrm() ) + if( IsBodyFrame() ) { if( IsInSct() ) { - SwSectionFrm *pSect = FindSctFrm(); + SwSectionFrame *pSect = FindSctFrame(); if( nDiff > 0 && pSect->IsEndnAtEnd() && GetNext() && - GetNext()->IsFootnoteContFrm() ) + GetNext()->IsFootnoteContFrame() ) { - SwFootnoteContFrm* pCont = static_cast<SwFootnoteContFrm*>(GetNext()); + SwFootnoteContFrame* pCont = static_cast<SwFootnoteContFrame*>(GetNext()); SwTwips nMinH = 0; - SwFootnoteFrm* pFootnote = static_cast<SwFootnoteFrm*>(pCont->Lower()); + SwFootnoteFrame* pFootnote = static_cast<SwFootnoteFrame*>(pCont->Lower()); bool bFootnote = false; while( pFootnote ) { if( !pFootnote->GetAttr()->GetFootnote().IsEndNote() ) { - nMinH += (pFootnote->Frm().*fnRect->fnGetHeight)(); + nMinH += (pFootnote->Frame().*fnRect->fnGetHeight)(); bFootnote = true; } - pFootnote = static_cast<SwFootnoteFrm*>(pFootnote->GetNext()); + pFootnote = static_cast<SwFootnoteFrame*>(pFootnote->GetNext()); } if( bFootnote ) nMinH += (pCont->Prt().*fnRect->fnGetTop)(); - nReal = (pCont->Frm().*fnRect->fnGetHeight)() - nMinH; + nReal = (pCont->Frame().*fnRect->fnGetHeight)() - nMinH; if( nReal > nDiff ) nReal = nDiff; if( nReal > 0 ) - pFrm = GetNext(); + pFrame = GetNext(); else nReal = 0; } if( !bTst && !pSect->IsColLocked() ) pSect->InvalidateSize(); } - if( !pFrm ) + if( !pFrame ) return nBrowseAdd; } else { - const bool bFootnotePage = pBoss->IsPageFrm() && static_cast<const SwPageFrm*>(pBoss)->IsFootnotePage(); - if ( bFootnotePage && !IsFootnoteContFrm() ) - pFrm = const_cast<SwFrm*>(static_cast<SwFrm const *>(pBoss->FindFootnoteCont())); - if ( !pFrm ) - pFrm = const_cast<SwFrm*>(static_cast<SwFrm const *>(pBoss->FindBodyCont())); + const bool bFootnotePage = pBoss->IsPageFrame() && static_cast<const SwPageFrame*>(pBoss)->IsFootnotePage(); + if ( bFootnotePage && !IsFootnoteContFrame() ) + pFrame = const_cast<SwFrame*>(static_cast<SwFrame const *>(pBoss->FindFootnoteCont())); + if ( !pFrame ) + pFrame = const_cast<SwFrame*>(static_cast<SwFrame const *>(pBoss->FindBodyCont())); - if ( !pFrm ) + if ( !pFrame ) return 0; //If not one is found, everything else is solved. - nReal = (pFrm->Frm().*fnRect->fnGetHeight)(); + nReal = (pFrame->Frame().*fnRect->fnGetHeight)(); if( nReal > nDiff ) nReal = nDiff; if( !bFootnotePage ) @@ -1470,26 +1470,26 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, bool bTst ) if ( nReal > nMax ) nReal = nMax; } - if( !IsFootnoteContFrm() && nDiff > nReal && - pFrm->GetNext() && pFrm->GetNext()->IsFootnoteContFrm() - && ( pFrm->GetNext()->IsVertical() == IsVertical() ) + if( !IsFootnoteContFrame() && nDiff > nReal && + pFrame->GetNext() && pFrame->GetNext()->IsFootnoteContFrame() + && ( pFrame->GetNext()->IsVertical() == IsVertical() ) ) { //If the Body doesn't return enough, we look for a footnote, if //there is one, we steal there accordingly. - const SwTwips nAddMax = (pFrm->GetNext()->Frm().*fnRect-> + const SwTwips nAddMax = (pFrame->GetNext()->Frame().*fnRect-> fnGetHeight)(); nAdd = nDiff - nReal; if ( nAdd > nAddMax ) nAdd = nAddMax; if ( !bTst ) { - (pFrm->GetNext()->Frm().*fnRect->fnSetHeight)(nAddMax-nAdd); + (pFrame->GetNext()->Frame().*fnRect->fnSetHeight)(nAddMax-nAdd); if( bVert && !bVertL2R && !bRev ) - pFrm->GetNext()->Frm().Pos().X() += nAdd; - pFrm->GetNext()->InvalidatePrt(); - if ( pFrm->GetNext()->GetNext() ) - pFrm->GetNext()->GetNext()->_InvalidatePos(); + pFrame->GetNext()->Frame().Pos().X() += nAdd; + pFrame->GetNext()->InvalidatePrt(); + if ( pFrame->GetNext()->GetNext() ) + pFrame->GetNext()->GetNext()->_InvalidatePos(); } } } @@ -1497,31 +1497,31 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, bool bTst ) if ( !bTst && nReal ) { - SwTwips nTmp = (pFrm->Frm().*fnRect->fnGetHeight)(); - (pFrm->Frm().*fnRect->fnSetHeight)( nTmp - nReal ); + SwTwips nTmp = (pFrame->Frame().*fnRect->fnGetHeight)(); + (pFrame->Frame().*fnRect->fnSetHeight)( nTmp - nReal ); if( bVert && !bVertL2R && !bRev ) - pFrm->Frm().Pos().X() += nReal; - pFrm->InvalidatePrt(); - if ( pFrm->GetNext() ) - pFrm->GetNext()->_InvalidatePos(); - if( nReal < 0 && pFrm->IsInSct() ) - { - SwLayoutFrm* pUp = pFrm->GetUpper(); - if( pUp && nullptr != ( pUp = pUp->GetUpper() ) && pUp->IsSctFrm() && + pFrame->Frame().Pos().X() += nReal; + pFrame->InvalidatePrt(); + if ( pFrame->GetNext() ) + pFrame->GetNext()->_InvalidatePos(); + if( nReal < 0 && pFrame->IsInSct() ) + { + SwLayoutFrame* pUp = pFrame->GetUpper(); + if( pUp && nullptr != ( pUp = pUp->GetUpper() ) && pUp->IsSctFrame() && !pUp->IsColLocked() ) pUp->InvalidateSize(); } - if( ( IsHeaderFrm() || IsFooterFrm() ) && pBoss->GetDrawObjs() ) + if( ( IsHeaderFrame() || IsFooterFrame() ) && pBoss->GetDrawObjs() ) { const SwSortedObjs &rObjs = *pBoss->GetDrawObjs(); - OSL_ENSURE( pBoss->IsPageFrm(), "Header/Footer out of page?" ); + OSL_ENSURE( pBoss->IsPageFrame(), "Header/Footer out of page?" ); for ( size_t i = 0; i < rObjs.size(); ++i ) { SwAnchoredObject* pAnchoredObj = rObjs[i]; - if ( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) != nullptr ) + if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr ) { - SwFlyFrm* pFly = static_cast<SwFlyFrm*>(pAnchoredObj); - OSL_ENSURE( !pFly->IsFlyInCntFrm(), "FlyInCnt at Page?" ); + SwFlyFrame* pFly = static_cast<SwFlyFrame*>(pAnchoredObj); + OSL_ENSURE( !pFly->IsFlyInContentFrame(), "FlyInCnt at Page?" ); const SwFormatVertOrient &rVert = pFly->GetFormat()->GetVertOrient(); // When do we have to invalidate? @@ -1532,8 +1532,8 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, bool bTst ) // position. if( ( rVert.GetRelationOrient() == text::RelOrientation::PRINT_AREA || rVert.GetRelationOrient() == text::RelOrientation::PAGE_PRINT_AREA ) && - ((IsHeaderFrm() && rVert.GetVertOrient()!=text::VertOrientation::BOTTOM) || - (IsFooterFrm() && rVert.GetVertOrient()!=text::VertOrientation::NONE && + ((IsHeaderFrame() && rVert.GetVertOrient()!=text::VertOrientation::BOTTOM) || + (IsFooterFrame() && rVert.GetVertOrient()!=text::VertOrientation::NONE && rVert.GetVertOrient() != text::VertOrientation::TOP)) ) { pFly->_InvalidatePos(); @@ -1547,25 +1547,25 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, bool bTst ) } /** method to perform additional actions on an invalidation (2004-05-19 #i28701#) */ -void SwFrm::_ActionOnInvalidation( const InvalidationType ) +void SwFrame::_ActionOnInvalidation( const InvalidationType ) { // default behaviour is to perform no additional action } /** method to determine, if an invalidation is allowed (2004-05-19 #i28701#) */ -bool SwFrm::_InvalidationAllowed( const InvalidationType ) const +bool SwFrame::_InvalidationAllowed( const InvalidationType ) const { // default behaviour is to allow invalidation return true; } -void SwFrm::ImplInvalidateSize() +void SwFrame::ImplInvalidateSize() { if ( _InvalidationAllowed( INVALID_SIZE ) ) { mbValidSize = false; - if ( IsFlyFrm() ) - static_cast<SwFlyFrm*>(this)->_Invalidate(); + if ( IsFlyFrame() ) + static_cast<SwFlyFrame*>(this)->_Invalidate(); else InvalidatePage(); @@ -1574,13 +1574,13 @@ void SwFrm::ImplInvalidateSize() } } -void SwFrm::ImplInvalidatePrt() +void SwFrame::ImplInvalidatePrt() { if ( _InvalidationAllowed( INVALID_PRTAREA ) ) { mbValidPrtArea = false; - if ( IsFlyFrm() ) - static_cast<SwFlyFrm*>(this)->_Invalidate(); + if ( IsFlyFrame() ) + static_cast<SwFlyFrame*>(this)->_Invalidate(); else InvalidatePage(); @@ -1589,14 +1589,14 @@ void SwFrm::ImplInvalidatePrt() } } -void SwFrm::ImplInvalidatePos() +void SwFrame::ImplInvalidatePos() { if ( _InvalidationAllowed( INVALID_POS ) ) { mbValidPos = false; - if ( IsFlyFrm() ) + if ( IsFlyFrame() ) { - static_cast<SwFlyFrm*>(this)->_Invalidate(); + static_cast<SwFlyFrame*>(this)->_Invalidate(); } else { @@ -1608,12 +1608,12 @@ void SwFrm::ImplInvalidatePos() } } -void SwFrm::ImplInvalidateLineNum() +void SwFrame::ImplInvalidateLineNum() { if ( _InvalidationAllowed( INVALID_LINENUM ) ) { mbValidLineNum = false; - OSL_ENSURE( IsTextFrm(), "line numbers are implemented for text only" ); + OSL_ENSURE( IsTextFrame(), "line numbers are implemented for text only" ); InvalidatePage(); // OD 2004-05-19 #i28701# @@ -1621,22 +1621,22 @@ void SwFrm::ImplInvalidateLineNum() } } -void SwFrm::ReinitializeFrmSizeAttrFlags() +void SwFrame::ReinitializeFrameSizeAttrFlags() { - const SwFormatFrmSize &rFormatSize = GetAttrSet()->GetFrmSize(); + const SwFormatFrameSize &rFormatSize = GetAttrSet()->GetFrameSize(); if ( ATT_VAR_SIZE == rFormatSize.GetHeightSizeType() || ATT_MIN_SIZE == rFormatSize.GetHeightSizeType()) { mbFixSize = false; if ( GetType() & (FRM_HEADER | FRM_FOOTER | FRM_ROW) ) { - SwFrm *pFrm = static_cast<SwLayoutFrm*>(this)->Lower(); - while ( pFrm ) - { pFrm->_InvalidateSize(); - pFrm->_InvalidatePrt(); - pFrm = pFrm->GetNext(); + SwFrame *pFrame = static_cast<SwLayoutFrame*>(this)->Lower(); + while ( pFrame ) + { pFrame->_InvalidateSize(); + pFrame->_InvalidatePrt(); + pFrame = pFrame->GetNext(); } - SwContentFrm *pCnt = static_cast<SwLayoutFrm*>(this)->ContainsContent(); + SwContentFrame *pCnt = static_cast<SwLayoutFrame*>(this)->ContainsContent(); // #i36991# - be save. // E.g., a row can contain *no* content. if ( pCnt ) @@ -1646,21 +1646,21 @@ void SwFrm::ReinitializeFrmSizeAttrFlags() { pCnt->Prepare( PREP_ADJUST_FRM ); pCnt->_InvalidateSize(); - pCnt = pCnt->GetNextContentFrm(); - } while ( static_cast<SwLayoutFrm*>(this)->IsAnLower( pCnt ) ); + pCnt = pCnt->GetNextContentFrame(); + } while ( static_cast<SwLayoutFrame*>(this)->IsAnLower( pCnt ) ); } } } else if ( rFormatSize.GetHeightSizeType() == ATT_FIX_SIZE ) { if( IsVertical() ) - ChgSize( Size( rFormatSize.GetWidth(), Frm().Height())); + ChgSize( Size( rFormatSize.GetWidth(), Frame().Height())); else - ChgSize( Size( Frm().Width(), rFormatSize.GetHeight())); + ChgSize( Size( Frame().Width(), rFormatSize.GetHeight())); } } -void SwFrm::ValidateThisAndAllLowers( const sal_uInt16 nStage ) +void SwFrame::ValidateThisAndAllLowers( const sal_uInt16 nStage ) { // Stage 0: Only validate frames. Do not process any objects. // Stage 1: Only validate fly frames and all of their contents. @@ -1669,7 +1669,7 @@ void SwFrm::ValidateThisAndAllLowers( const sal_uInt16 nStage ) const bool bOnlyObject = 1 == nStage; const bool bIncludeObjects = 1 <= nStage; - if ( !bOnlyObject || dynamic_cast< const SwFlyFrm *>( this ) != nullptr ) + if ( !bOnlyObject || dynamic_cast< const SwFlyFrame *>( this ) != nullptr ) { mbValidSize = true; mbValidPrtArea = true; @@ -1685,17 +1685,17 @@ void SwFrm::ValidateThisAndAllLowers( const sal_uInt16 nStage ) for ( size_t i = 0; i < nCnt; ++i ) { SwAnchoredObject* pAnchObj = (*pObjs)[i]; - if ( dynamic_cast< const SwFlyFrm *>( pAnchObj ) != nullptr ) - static_cast<SwFlyFrm*>(pAnchObj)->ValidateThisAndAllLowers( 2 ); + if ( dynamic_cast< const SwFlyFrame *>( pAnchObj ) != nullptr ) + static_cast<SwFlyFrame*>(pAnchObj)->ValidateThisAndAllLowers( 2 ); else if ( dynamic_cast< const SwAnchoredDrawObject *>( pAnchObj ) != nullptr ) static_cast<SwAnchoredDrawObject*>(pAnchObj)->ValidateThis(); } } } - if ( IsLayoutFrm() ) + if ( IsLayoutFrame() ) { - SwFrm* pLower = static_cast<SwLayoutFrm*>(this)->Lower(); + SwFrame* pLower = static_cast<SwLayoutFrame*>(this)->Lower(); while ( pLower ) { pLower->ValidateThisAndAllLowers( nStage ); @@ -1704,25 +1704,25 @@ void SwFrm::ValidateThisAndAllLowers( const sal_uInt16 nStage ) } } -SwTwips SwContentFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo ) +SwTwips SwContentFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo ) { SWRECTFN( this ) - SwTwips nFrmHeight = (Frm().*fnRect->fnGetHeight)(); - if( nFrmHeight > 0 && - nDist > (LONG_MAX - nFrmHeight ) ) - nDist = LONG_MAX - nFrmHeight; + SwTwips nFrameHeight = (Frame().*fnRect->fnGetHeight)(); + if( nFrameHeight > 0 && + nDist > (LONG_MAX - nFrameHeight ) ) + nDist = LONG_MAX - nFrameHeight; - const SwViewShell *pSh = getRootFrm()->GetCurrShell(); + const SwViewShell *pSh = getRootFrame()->GetCurrShell(); const bool bBrowse = pSh && pSh->GetViewOptions()->getBrowseMode(); const sal_uInt16 nTmpType = bBrowse ? 0x2084: 0x2004; //Row+Cell, Browse with Body if( !(GetUpper()->GetType() & nTmpType) && GetUpper()->HasFixSize() ) { if ( !bTst ) { - (Frm().*fnRect->fnSetHeight)( nFrmHeight + nDist ); + (Frame().*fnRect->fnSetHeight)( nFrameHeight + nDist ); if( IsVertical() && !IsVertLR() && !IsReverse() ) - Frm().Pos().X() -= nDist; + Frame().Pos().X() -= nDist; if ( GetNext() ) { GetNext()->InvalidatePos(); @@ -1741,20 +1741,20 @@ SwTwips SwContentFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo ) } SwTwips nReal = (GetUpper()->Prt().*fnRect->fnGetHeight)(); - SwFrm *pFrm = GetUpper()->Lower(); - while( pFrm && nReal > 0 ) - { nReal -= (pFrm->Frm().*fnRect->fnGetHeight)(); - pFrm = pFrm->GetNext(); + SwFrame *pFrame = GetUpper()->Lower(); + while( pFrame && nReal > 0 ) + { nReal -= (pFrame->Frame().*fnRect->fnGetHeight)(); + pFrame = pFrame->GetNext(); } if ( !bTst ) { //Contents are always resized to the wished value. - long nOld = (Frm().*fnRect->fnGetHeight)(); - (Frm().*fnRect->fnSetHeight)( nOld + nDist ); + long nOld = (Frame().*fnRect->fnGetHeight)(); + (Frame().*fnRect->fnSetHeight)( nOld + nDist ); if( IsVertical()&& !IsVertLR() && !IsReverse() ) - Frm().Pos().X() -= nDist; - SwTabFrm *pTab = (nOld && IsInTab()) ? FindTabFrm() : nullptr; + Frame().Pos().X() -= nDist; + SwTabFrame *pTab = (nOld && IsInTab()) ? FindTabFrame() : nullptr; if (pTab) { if ( pTab->GetTable()->GetHTMLTableLayout() && @@ -1772,7 +1772,7 @@ SwTwips SwContentFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo ) { if( GetUpper() ) { - if( bTst || !GetUpper()->IsFooterFrm() ) + if( bTst || !GetUpper()->IsFooterFrame() ) nReal = GetUpper()->Grow( nDist - (nReal > 0 ? nReal : 0), bTst, bInfo ); else @@ -1807,30 +1807,30 @@ SwTwips SwContentFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo ) return nReal; } -SwTwips SwContentFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo ) +SwTwips SwContentFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo ) { SWRECTFN( this ) OSL_ENSURE( nDist >= 0, "nDist < 0" ); - OSL_ENSURE( nDist <= (Frm().*fnRect->fnGetHeight)(), + OSL_ENSURE( nDist <= (Frame().*fnRect->fnGetHeight)(), "nDist > than current size." ); if ( !bTst ) { SwTwips nRstHeight; if( GetUpper() ) - nRstHeight = (Frm().*fnRect->fnBottomDist) + nRstHeight = (Frame().*fnRect->fnBottomDist) ( (GetUpper()->*fnRect->fnGetPrtBottom)() ); else nRstHeight = 0; if( nRstHeight < 0 ) { SwTwips nNextHeight = 0; - if( GetUpper()->IsSctFrm() && nDist > LONG_MAX/2 ) + if( GetUpper()->IsSctFrame() && nDist > LONG_MAX/2 ) { - SwFrm *pNxt = GetNext(); + SwFrame *pNxt = GetNext(); while( pNxt ) { - nNextHeight += (pNxt->Frm().*fnRect->fnGetHeight)(); + nNextHeight += (pNxt->Frame().*fnRect->fnGetHeight)(); pNxt = pNxt->GetNext(); } } @@ -1838,11 +1838,11 @@ SwTwips SwContentFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo ) } else nRstHeight = nDist; - (Frm().*fnRect->fnSetHeight)( (Frm().*fnRect->fnGetHeight)() - nDist ); + (Frame().*fnRect->fnSetHeight)( (Frame().*fnRect->fnGetHeight)() - nDist ); if( IsVertical() && !IsVertLR() ) - Frm().Pos().X() += nDist; + Frame().Pos().X() += nDist; nDist = nRstHeight; - SwTabFrm *pTab = IsInTab() ? FindTabFrm() : nullptr; + SwTabFrame *pTab = IsInTab() ? FindTabFrame() : nullptr; if (pTab) { if ( pTab->GetTable()->GetHTMLTableLayout() && @@ -1858,7 +1858,7 @@ SwTwips SwContentFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo ) SwTwips nReal; if( GetUpper() && nDist > 0 ) { - if( bTst || !GetUpper()->IsFooterFrm() ) + if( bTst || !GetUpper()->IsFooterFrame() ) nReal = GetUpper()->Shrink( nDist, bTst, bInfo ); else { @@ -1872,8 +1872,8 @@ SwTwips SwContentFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo ) // #109722# : The fix for #108745# was too strict. bool bInvalidate = true; - const SwRect aRect( Frm() ); - const SwPageFrm* pPage = FindPageFrm(); + const SwRect aRect( Frame() ); + const SwPageFrame* pPage = FindPageFrame(); const SwSortedObjs* pSorted = pPage ? pPage->GetSortedObjs() : nullptr; if( pSorted ) { @@ -1890,7 +1890,7 @@ SwTwips SwContentFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo ) const SwFrameFormat& rFormat = pAnchoredObj->GetFrameFormat(); if( SURROUND_THROUGHT != rFormat.GetSurround().GetSurround() ) { - const SwFrm* pAnchor = pAnchoredObj->GetAnchorFrm(); + const SwFrame* pAnchor = pAnchoredObj->GetAnchorFrame(); if ( pAnchor && pAnchor->FindFooterOrHeader() == GetUpper() ) { bInvalidate = false; @@ -1910,7 +1910,7 @@ SwTwips SwContentFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo ) if ( !bTst ) { - //The position of the next Frm changes for sure. + //The position of the next Frame changes for sure. InvalidateNextPos(); //If I don't have a successor I have to do the retouch by myself. @@ -1920,7 +1920,7 @@ SwTwips SwContentFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo ) return nReal; } -void SwContentFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) +void SwContentFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) { sal_uInt8 nInvFlags = 0; @@ -1941,14 +1941,14 @@ void SwContentFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) aOIter.NextItem(); } if ( aOldSet.Count() || aNewSet.Count() ) - SwFrm::Modify( &aOldSet, &aNewSet ); + SwFrame::Modify( &aOldSet, &aNewSet ); } else _UpdateAttr( pOld, pNew, nInvFlags ); if ( nInvFlags != 0 ) { - SwPageFrm *pPage = FindPageFrm(); + SwPageFrame *pPage = FindPageFrame(); InvalidatePage( pPage ); if ( nInvFlags & 0x01 ) SetCompletePaint(); @@ -1960,7 +1960,7 @@ void SwContentFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) { if( IsInSct() && !GetPrev() ) { - SwSectionFrm *pSect = FindSctFrm(); + SwSectionFrame *pSect = FindSctFrame(); if( pSect->ContainsAny() == this ) { pSect->_InvalidatePrt(); @@ -1969,23 +1969,23 @@ void SwContentFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) } _InvalidatePrt(); } - SwFrm* mpNextFrm = GetIndNext(); - if ( mpNextFrm && nInvFlags & 0x10) + SwFrame* mpNextFrame = GetIndNext(); + if ( mpNextFrame && nInvFlags & 0x10) { - mpNextFrm->_InvalidatePrt(); - mpNextFrm->InvalidatePage( pPage ); + mpNextFrame->_InvalidatePrt(); + mpNextFrame->InvalidatePage( pPage ); } - if ( mpNextFrm && nInvFlags & 0x80 ) + if ( mpNextFrame && nInvFlags & 0x80 ) { - mpNextFrm->SetCompletePaint(); + mpNextFrame->SetCompletePaint(); } if ( nInvFlags & 0x20 ) { - SwFrm* pPrevFrm = GetPrev(); - if ( pPrevFrm ) + SwFrame* pPrevFrame = GetPrev(); + if ( pPrevFrame ) { - pPrevFrm->_InvalidatePrt(); - pPrevFrm->InvalidatePage( pPage ); + pPrevFrame->_InvalidatePrt(); + pPrevFrame->InvalidatePage( pPage ); } } if ( nInvFlags & 0x40 ) @@ -1993,7 +1993,7 @@ void SwContentFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) } } -void SwContentFrm::_UpdateAttr( const SfxPoolItem* pOld, const SfxPoolItem* pNew, +void SwContentFrame::_UpdateAttr( const SfxPoolItem* pOld, const SfxPoolItem* pNew, sal_uInt8 &rInvFlags, SwAttrSetChg *pOldSet, SwAttrSetChg *pNewSet ) { @@ -2009,12 +2009,12 @@ void SwContentFrm::_UpdateAttr( const SfxPoolItem* pOld, const SfxPoolItem* pNew if ( IsInDocBody() && !IsInTab() ) { rInvFlags |= 0x02; - SwPageFrm *pPage = FindPageFrm(); + SwPageFrame *pPage = FindPageFrame(); if ( !GetPrev() ) CheckPageDescs( pPage ); if ( GetAttrSet()->GetPageDesc().GetNumOffset() ) - static_cast<SwRootFrm*>(pPage->GetUpper())->SetVirtPageNum( true ); - SwDocPosUpdate aMsgHint( pPage->Frm().Top() ); + static_cast<SwRootFrame*>(pPage->GetUpper())->SetVirtPageNum( true ); + SwDocPosUpdate aMsgHint( pPage->Frame().Top() ); pPage->GetFormat()->GetDoc()->getIDocumentFieldsAccess().UpdatePageFields( &aMsgHint ); } break; @@ -2026,15 +2026,15 @@ void SwContentFrm::_UpdateAttr( const SfxPoolItem* pOld, const SfxPoolItem* pNew // for footnote content. if ( !GetIndNext() ) { - SwFrm* pNxt = FindNext(); + SwFrame* pNxt = FindNext(); if ( pNxt ) { - SwPageFrm* pPg = pNxt->FindPageFrm(); + SwPageFrame* pPg = pNxt->FindPageFrame(); pNxt->InvalidatePage( pPg ); pNxt->_InvalidatePrt(); - if( pNxt->IsSctFrm() ) + if( pNxt->IsSctFrame() ) { - SwFrm* pCnt = static_cast<SwSectionFrm*>(pNxt)->ContainsAny(); + SwFrame* pCnt = static_cast<SwSectionFrame*>(pNxt)->ContainsAny(); if( pCnt ) { pCnt->_InvalidatePrt(); @@ -2051,7 +2051,7 @@ void SwContentFrm::_UpdateAttr( const SfxPoolItem* pOld, const SfxPoolItem* pNew // OD 2004-07-01 #i28701# - use new method <InvalidateObjs(..)> GetIndNext()->InvalidateObjs( true ); } - Prepare( PREP_UL_SPACE ); //TextFrm has to correct line spacing. + Prepare( PREP_UL_SPACE ); //TextFrame has to correct line spacing. rInvFlags |= 0x80; /* no break here */ } @@ -2059,7 +2059,7 @@ void SwContentFrm::_UpdateAttr( const SfxPoolItem* pOld, const SfxPoolItem* pNew case RES_BOX: case RES_SHADOW: Prepare( PREP_FIXSIZE_CHG ); - SwFrm::Modify( pOld, pNew ); + SwFrame::Modify( pOld, pNew ); rInvFlags |= 0x30; break; @@ -2071,15 +2071,15 @@ void SwContentFrm::_UpdateAttr( const SfxPoolItem* pOld, const SfxPoolItem* pNew rIDSA.get(DocumentSettingId::PARA_SPACE_MAX_AT_PAGES) ) { rInvFlags |= 0x1; - SwFrm* pNxt = FindNext(); + SwFrame* pNxt = FindNext(); if( pNxt ) { - SwPageFrm* pPg = pNxt->FindPageFrm(); + SwPageFrame* pPg = pNxt->FindPageFrame(); pNxt->InvalidatePage( pPg ); pNxt->_InvalidatePrt(); - if( pNxt->IsSctFrm() ) + if( pNxt->IsSctFrame() ) { - SwFrm* pCnt = static_cast<SwSectionFrm*>(pNxt)->ContainsAny(); + SwFrame* pCnt = static_cast<SwSectionFrame*>(pNxt)->ContainsAny(); if( pCnt ) { pCnt->_InvalidatePrt(); @@ -2096,13 +2096,13 @@ void SwContentFrm::_UpdateAttr( const SfxPoolItem* pOld, const SfxPoolItem* pNew case RES_PARATR_CONNECT_BORDER: { rInvFlags |= 0x01; - if ( IsTextFrm() ) + if ( IsTextFrame() ) { InvalidateNextPrtArea(); } if ( !GetIndNext() && IsInTab() && IsInSplitTableRow() ) { - FindTabFrm()->InvalidateSize(); + FindTabFrame()->InvalidateSize(); } } break; @@ -2139,36 +2139,36 @@ void SwContentFrm::_UpdateAttr( const SfxPoolItem* pOld, const SfxPoolItem* pNew pNewSet->ClearItem( nWhich ); } else - SwFrm::Modify( pOld, pNew ); + SwFrame::Modify( pOld, pNew ); } } -SwLayoutFrm::SwLayoutFrm(SwFrameFormat *const pFormat, SwFrm *const pSib) - : SwFrm(pFormat, pSib) +SwLayoutFrame::SwLayoutFrame(SwFrameFormat *const pFormat, SwFrame *const pSib) + : SwFrame(pFormat, pSib) , m_pLower(nullptr) { - const SwFormatFrmSize &rFormatSize = pFormat->GetFrmSize(); + const SwFormatFrameSize &rFormatSize = pFormat->GetFrameSize(); if ( rFormatSize.GetHeightSizeType() == ATT_FIX_SIZE ) mbFixSize = true; } // #i28701# -SwTwips SwLayoutFrm::InnerHeight() const +SwTwips SwLayoutFrame::InnerHeight() const { - const SwFrm* pCnt = Lower(); + const SwFrame* pCnt = Lower(); if (!pCnt) return 0; SWRECTFN( this ) SwTwips nRet = 0; - if( pCnt->IsColumnFrm() || pCnt->IsCellFrm() ) + if( pCnt->IsColumnFrame() || pCnt->IsCellFrame() ) { do { - SwTwips nTmp = static_cast<const SwLayoutFrm*>(pCnt)->InnerHeight(); + SwTwips nTmp = static_cast<const SwLayoutFrame*>(pCnt)->InnerHeight(); if( pCnt->GetValidPrtAreaFlag() ) - nTmp += (pCnt->Frm().*fnRect->fnGetHeight)() - + nTmp += (pCnt->Frame().*fnRect->fnGetHeight)() - (pCnt->Prt().*fnRect->fnGetHeight)(); if( nRet < nTmp ) nRet = nTmp; @@ -2179,12 +2179,12 @@ SwTwips SwLayoutFrm::InnerHeight() const { do { - nRet += (pCnt->Frm().*fnRect->fnGetHeight)(); - if( pCnt->IsContentFrm() && static_cast<const SwTextFrm*>(pCnt)->IsUndersized() ) - nRet += static_cast<const SwTextFrm*>(pCnt)->GetParHeight() - + nRet += (pCnt->Frame().*fnRect->fnGetHeight)(); + if( pCnt->IsContentFrame() && static_cast<const SwTextFrame*>(pCnt)->IsUndersized() ) + nRet += static_cast<const SwTextFrame*>(pCnt)->GetParHeight() - (pCnt->Prt().*fnRect->fnGetHeight)(); - if( pCnt->IsLayoutFrm() && !pCnt->IsTabFrm() ) - nRet += static_cast<const SwLayoutFrm*>(pCnt)->InnerHeight() - + if( pCnt->IsLayoutFrame() && !pCnt->IsTabFrame() ) + nRet += static_cast<const SwLayoutFrame*>(pCnt)->InnerHeight() - (pCnt->Prt().*fnRect->fnGetHeight)(); pCnt = pCnt->GetNext(); } while( pCnt ); @@ -2193,44 +2193,44 @@ SwTwips SwLayoutFrm::InnerHeight() const return nRet; } -SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo ) +SwTwips SwLayoutFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo ) { - const SwViewShell *pSh = getRootFrm()->GetCurrShell(); + const SwViewShell *pSh = getRootFrame()->GetCurrShell(); const bool bBrowse = pSh && pSh->GetViewOptions()->getBrowseMode(); const sal_uInt16 nTmpType = bBrowse ? 0x2084: 0x2004; //Row+Cell, Browse with Body if( !(GetType() & nTmpType) && HasFixSize() ) return 0; SWRECTFN( this ) - const SwTwips nFrmHeight = (Frm().*fnRect->fnGetHeight)(); - const SwTwips nFrmPos = Frm().Pos().X(); + const SwTwips nFrameHeight = (Frame().*fnRect->fnGetHeight)(); + const SwTwips nFramePos = Frame().Pos().X(); - if ( nFrmHeight > 0 && nDist > (LONG_MAX - nFrmHeight) ) - nDist = LONG_MAX - nFrmHeight; + if ( nFrameHeight > 0 && nDist > (LONG_MAX - nFrameHeight) ) + nDist = LONG_MAX - nFrameHeight; SwTwips nMin = 0; - if ( GetUpper() && !IsCellFrm() ) + if ( GetUpper() && !IsCellFrame() ) { - SwFrm *pFrm = GetUpper()->Lower(); - while( pFrm ) - { nMin += (pFrm->Frm().*fnRect->fnGetHeight)(); - pFrm = pFrm->GetNext(); + SwFrame *pFrame = GetUpper()->Lower(); + while( pFrame ) + { nMin += (pFrame->Frame().*fnRect->fnGetHeight)(); + pFrame = pFrame->GetNext(); } nMin = (GetUpper()->Prt().*fnRect->fnGetHeight)() - nMin; if ( nMin < 0 ) nMin = 0; } - SwRect aOldFrm( Frm() ); - bool bMoveAccFrm = false; + SwRect aOldFrame( Frame() ); + bool bMoveAccFrame = false; bool bChgPos = IsVertical() && !IsReverse(); if ( !bTst ) { - (Frm().*fnRect->fnSetHeight)( nFrmHeight + nDist ); + (Frame().*fnRect->fnSetHeight)( nFrameHeight + nDist ); if( bChgPos && !IsVertLR() ) - Frm().Pos().X() -= nDist; - bMoveAccFrm = true; + Frame().Pos().X() -= nDist; + bMoveAccFrame = true; } SwTwips nReal = nDist - nMin; @@ -2238,8 +2238,8 @@ SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo ) { if ( GetUpper() ) { // AdjustNeighbourhood now only for the columns (but not in frames) - sal_uInt8 nAdjust = GetUpper()->IsFootnoteBossFrm() ? - static_cast<SwFootnoteBossFrm*>(GetUpper())->NeighbourhoodAdjustment( this ) + sal_uInt8 nAdjust = GetUpper()->IsFootnoteBossFrame() ? + static_cast<SwFootnoteBossFrame*>(GetUpper())->NeighbourhoodAdjustment( this ) : NA_GROW_SHRINK; if( NA_ONLY_ADJUST == nAdjust ) nReal = AdjustNeighbourhood( nReal, bTst ); @@ -2251,15 +2251,15 @@ SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo ) SwTwips nGrow = 0; if( 0 < nReal ) { - SwFrm* pToGrow = GetUpper(); + SwFrame* pToGrow = GetUpper(); // NEW TABLES // A cell with a row span of > 1 is allowed to grow the // line containing the end of the row span if it is // located in the same table frame: - const SwCellFrm* pThisCell = dynamic_cast<const SwCellFrm*>(this); + const SwCellFrame* pThisCell = dynamic_cast<const SwCellFrame*>(this); if ( pThisCell && pThisCell->GetLayoutRowSpan() > 1 ) { - SwCellFrm& rEndCell = const_cast<SwCellFrm&>(pThisCell->FindStartEndOfRowSpanCell( false, true )); + SwCellFrame& rEndCell = const_cast<SwCellFrame&>(pThisCell->FindStartEndOfRowSpanCell( false, true )); if ( -1 == rEndCell.GetTabBox()->getRowSpan() ) pToGrow = rEndCell.GetUpper(); else @@ -2272,15 +2272,15 @@ SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo ) if( NA_GROW_ADJUST == nAdjust && nGrow < nReal ) nReal += AdjustNeighbourhood( nReal - nGrow, bTst ); - if ( IsFootnoteFrm() && (nGrow != nReal) && GetNext() ) + if ( IsFootnoteFrame() && (nGrow != nReal) && GetNext() ) { //Footnotes can replace their successor. SwTwips nSpace = bTst ? 0 : -nDist; - const SwFrm *pFrm = GetUpper()->Lower(); + const SwFrame *pFrame = GetUpper()->Lower(); do - { nSpace += (pFrm->Frm().*fnRect->fnGetHeight)(); - pFrm = pFrm->GetNext(); - } while ( pFrm != GetNext() ); + { nSpace += (pFrame->Frame().*fnRect->fnGetHeight)(); + pFrame = pFrame->GetNext(); + } while ( pFrame != GetNext() ); nSpace = (GetUpper()->Prt().*fnRect->fnGetHeight)() -nSpace; if ( nSpace < 0 ) nSpace = 0; @@ -2288,7 +2288,7 @@ SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo ) if ( nReal > nSpace ) nReal = nSpace; if ( nReal && !bTst ) - static_cast<SwFootnoteFrm*>(this)->InvalidateNxtFootnoteCnts( FindPageFrm() ); + static_cast<SwFootnoteFrame*>(this)->InvalidateNxtFootnoteCnts( FindPageFrame() ); } else nReal = nGrow; @@ -2306,24 +2306,24 @@ SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo ) { if( nReal != nDist && // NEW TABLES - ( !IsCellFrm() || static_cast<SwCellFrm*>(this)->GetLayoutRowSpan() > 1 ) ) + ( !IsCellFrame() || static_cast<SwCellFrame*>(this)->GetLayoutRowSpan() > 1 ) ) { - (Frm().*fnRect->fnSetHeight)( nFrmHeight + nReal ); + (Frame().*fnRect->fnSetHeight)( nFrameHeight + nReal ); if( bChgPos && !IsVertLR() ) - Frm().Pos().X() = nFrmPos - nReal; - bMoveAccFrm = true; + Frame().Pos().X() = nFramePos - nReal; + bMoveAccFrame = true; } if ( nReal ) { - SwPageFrm *pPage = FindPageFrm(); + SwPageFrame *pPage = FindPageFrame(); if ( GetNext() ) { GetNext()->_InvalidatePos(); - if ( GetNext()->IsContentFrm() ) + if ( GetNext()->IsContentFrame() ) GetNext()->InvalidatePage( pPage ); } - if ( !IsPageBodyFrm() ) + if ( !IsPageBodyFrame() ) { _InvalidateAll(); InvalidatePage( pPage ); @@ -2331,7 +2331,7 @@ SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo ) if (!(GetType() & (FRM_ROW|FRM_TAB|FRM_FTNCONT|FRM_PAGE|FRM_ROOT))) NotifyLowerObjs(); - if( IsCellFrm() ) + if( IsCellFrame() ) InvaPercentLowers( nReal ); SvxBrushItem aBack(GetFormat()->makeBackgroundBrushItem()); @@ -2341,21 +2341,21 @@ SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo ) } } - if( bMoveAccFrm && IsAccessibleFrm() ) + if( bMoveAccFrame && IsAccessibleFrame() ) { - SwRootFrm *pRootFrm = getRootFrm(); - if( pRootFrm && pRootFrm->IsAnyShellAccessible() && - pRootFrm->GetCurrShell() ) + SwRootFrame *pRootFrame = getRootFrame(); + if( pRootFrame && pRootFrame->IsAnyShellAccessible() && + pRootFrame->GetCurrShell() ) { - pRootFrm->GetCurrShell()->Imp()->MoveAccessibleFrm( this, aOldFrm ); + pRootFrame->GetCurrShell()->Imp()->MoveAccessibleFrame( this, aOldFrame ); } } return nReal; } -SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo ) +SwTwips SwLayoutFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo ) { - const SwViewShell *pSh = getRootFrm()->GetCurrShell(); + const SwViewShell *pSh = getRootFrame()->GetCurrShell(); const bool bBrowse = pSh && pSh->GetViewOptions()->getBrowseMode(); const sal_uInt16 nTmpType = bBrowse ? 0x2084: 0x2004; //Row+Cell, Browse by Body. if( !(GetType() & nTmpType) && HasFixSize() ) @@ -2363,20 +2363,20 @@ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo ) OSL_ENSURE( nDist >= 0, "nDist < 0" ); SWRECTFN( this ) - SwTwips nFrmHeight = (Frm().*fnRect->fnGetHeight)(); - if ( nDist > nFrmHeight ) - nDist = nFrmHeight; + SwTwips nFrameHeight = (Frame().*fnRect->fnGetHeight)(); + if ( nDist > nFrameHeight ) + nDist = nFrameHeight; SwTwips nMin = 0; bool bChgPos = IsVertical() && !IsReverse(); if ( Lower() ) { - if( !Lower()->IsNeighbourFrm() ) - { const SwFrm *pFrm = Lower(); + if( !Lower()->IsNeighbourFrame() ) + { const SwFrame *pFrame = Lower(); const long nTmp = (Prt().*fnRect->fnGetHeight)(); - while( pFrm && nMin < nTmp ) - { nMin += (pFrm->Frm().*fnRect->fnGetHeight)(); - pFrm = pFrm->GetNext(); + while( pFrame && nMin < nTmp ) + { nMin += (pFrame->Frame().*fnRect->fnGetHeight)(); + pFrame = pFrame->GetNext(); } } } @@ -2387,62 +2387,62 @@ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo ) if( nReal <= 0 ) return nDist; - SwRect aOldFrm( Frm() ); - bool bMoveAccFrm = false; + SwRect aOldFrame( Frame() ); + bool bMoveAccFrame = false; SwTwips nRealDist = nReal; if ( !bTst ) { - (Frm().*fnRect->fnSetHeight)( nFrmHeight - nReal ); + (Frame().*fnRect->fnSetHeight)( nFrameHeight - nReal ); if( bChgPos && !IsVertLR() ) - Frm().Pos().X() += nReal; - bMoveAccFrm = true; + Frame().Pos().X() += nReal; + bMoveAccFrame = true; } - sal_uInt8 nAdjust = GetUpper() && GetUpper()->IsFootnoteBossFrm() ? - static_cast<SwFootnoteBossFrm*>(GetUpper())->NeighbourhoodAdjustment( this ) + sal_uInt8 nAdjust = GetUpper() && GetUpper()->IsFootnoteBossFrame() ? + static_cast<SwFootnoteBossFrame*>(GetUpper())->NeighbourhoodAdjustment( this ) : NA_GROW_SHRINK; // AdjustNeighbourhood also in columns (but not in frames) if( NA_ONLY_ADJUST == nAdjust ) { - if ( IsPageBodyFrm() && !bBrowse ) + if ( IsPageBodyFrame() && !bBrowse ) nReal = nDist; else { nReal = AdjustNeighbourhood( -nReal, bTst ); nReal *= -1; - if ( !bTst && IsBodyFrm() && nReal < nRealDist ) + if ( !bTst && IsBodyFrame() && nReal < nRealDist ) { - (Frm().*fnRect->fnSetHeight)( (Frm().*fnRect->fnGetHeight)() + (Frame().*fnRect->fnSetHeight)( (Frame().*fnRect->fnGetHeight)() + nRealDist - nReal ); if( bChgPos && !IsVertLR() ) - Frm().Pos().X() += nRealDist - nReal; - OSL_ENSURE( !IsAccessibleFrm(), "bMoveAccFrm has to be set!" ); + Frame().Pos().X() += nRealDist - nReal; + OSL_ENSURE( !IsAccessibleFrame(), "bMoveAccFrame has to be set!" ); } } } - else if( IsColumnFrm() || IsColBodyFrm() ) + else if( IsColumnFrame() || IsColBodyFrame() ) { SwTwips nTmp = GetUpper()->Shrink( nReal, bTst, bInfo ); if ( nTmp != nReal ) { - (Frm().*fnRect->fnSetHeight)( (Frm().*fnRect->fnGetHeight)() + (Frame().*fnRect->fnSetHeight)( (Frame().*fnRect->fnGetHeight)() + nReal - nTmp ); if( bChgPos && !IsVertLR() ) - Frm().Pos().X() += nTmp - nReal; - OSL_ENSURE( !IsAccessibleFrm(), "bMoveAccFrm has to be set!" ); + Frame().Pos().X() += nTmp - nReal; + OSL_ENSURE( !IsAccessibleFrame(), "bMoveAccFrame has to be set!" ); nReal = nTmp; } } else { SwTwips nShrink = nReal; - SwFrm* pToShrink = GetUpper(); - const SwCellFrm* pThisCell = dynamic_cast<const SwCellFrm*>(this); + SwFrame* pToShrink = GetUpper(); + const SwCellFrame* pThisCell = dynamic_cast<const SwCellFrame*>(this); // NEW TABLES if ( pThisCell && pThisCell->GetLayoutRowSpan() > 1 ) { - SwCellFrm& rEndCell = const_cast<SwCellFrm&>(pThisCell->FindStartEndOfRowSpanCell( false, true )); + SwCellFrame& rEndCell = const_cast<SwCellFrame&>(pThisCell->FindStartEndOfRowSpanCell( false, true )); pToShrink = rEndCell.GetUpper(); } @@ -2452,38 +2452,38 @@ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo ) AdjustNeighbourhood( nReal - nShrink ); } - if( bMoveAccFrm && IsAccessibleFrm() ) + if( bMoveAccFrame && IsAccessibleFrame() ) { - SwRootFrm *pRootFrm = getRootFrm(); - if( pRootFrm && pRootFrm->IsAnyShellAccessible() && - pRootFrm->GetCurrShell() ) + SwRootFrame *pRootFrame = getRootFrame(); + if( pRootFrame && pRootFrame->IsAnyShellAccessible() && + pRootFrame->GetCurrShell() ) { - pRootFrm->GetCurrShell()->Imp()->MoveAccessibleFrm( this, aOldFrm ); + pRootFrame->GetCurrShell()->Imp()->MoveAccessibleFrame( this, aOldFrame ); } } - if ( !bTst && (IsCellFrm() || IsColumnFrm() ? nReal : nRealDist) ) + if ( !bTst && (IsCellFrame() || IsColumnFrame() ? nReal : nRealDist) ) { - SwPageFrm *pPage = FindPageFrm(); + SwPageFrame *pPage = FindPageFrame(); if ( GetNext() ) { GetNext()->_InvalidatePos(); - if ( GetNext()->IsContentFrm() ) + if ( GetNext()->IsContentFrame() ) GetNext()->InvalidatePage( pPage ); - if ( IsTabFrm() ) - static_cast<SwTabFrm*>(this)->SetComplete(); + if ( IsTabFrame() ) + static_cast<SwTabFrame*>(this)->SetComplete(); } else - { if ( IsRetoucheFrm() ) + { if ( IsRetoucheFrame() ) SetRetouche(); - if ( IsTabFrm() ) + if ( IsTabFrame() ) { - if( IsTabFrm() ) - static_cast<SwTabFrm*>(this)->SetComplete(); + if( IsTabFrame() ) + static_cast<SwTabFrame*>(this)->SetComplete(); if ( Lower() ) // Can also be in the Join and be empty! InvalidateNextPos(); } } - if ( !IsBodyFrm() ) + if ( !IsBodyFrame() ) { _InvalidateAll(); InvalidatePage( pPage ); @@ -2503,20 +2503,20 @@ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo ) if (!(GetType() & (FRM_ROW|FRM_TAB|FRM_FTNCONT|FRM_PAGE|FRM_ROOT))) NotifyLowerObjs(); - if( IsCellFrm() ) + if( IsCellFrame() ) InvaPercentLowers( nReal ); - SwContentFrm *pCnt; - if( IsFootnoteFrm() && !static_cast<SwFootnoteFrm*>(this)->GetAttr()->GetFootnote().IsEndNote() && + SwContentFrame *pCnt; + if( IsFootnoteFrame() && !static_cast<SwFootnoteFrame*>(this)->GetAttr()->GetFootnote().IsEndNote() && ( GetFormat()->GetDoc()->GetFootnoteInfo().ePos != FTNPOS_CHAPTER || - ( IsInSct() && FindSctFrm()->IsFootnoteAtEnd() ) ) && - nullptr != (pCnt = static_cast<SwFootnoteFrm*>(this)->GetRefFromAttr() ) ) + ( IsInSct() && FindSctFrame()->IsFootnoteAtEnd() ) ) && + nullptr != (pCnt = static_cast<SwFootnoteFrame*>(this)->GetRefFromAttr() ) ) { if ( pCnt->IsFollow() ) { // If we are in an other column/page than the frame with the // reference, we don't need to invalidate its master. - SwFrm *pTmp = pCnt->FindFootnoteBossFrm(true) == FindFootnoteBossFrm(true) - ? &pCnt->FindMaster()->GetFrm() : pCnt; + SwFrame *pTmp = pCnt->FindFootnoteBossFrame(true) == FindFootnoteBossFrame(true) + ? &pCnt->FindMaster()->GetFrame() : pCnt; pTmp->Prepare( PREP_ADJUST_FRM ); pTmp->InvalidateSize(); } @@ -2528,19 +2528,19 @@ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo ) } /** - * Changes the size of the directly subsidiary Frm's that have a fixed size, proportionally to the - * size change of the PrtArea of the Frm's. + * Changes the size of the directly subsidiary Frame's that have a fixed size, proportionally to the + * size change of the PrtArea of the Frame's. * - * The variable Frms are also proportionally adapted; they will grow/shrink again by themselves. + * The variable Frames are also proportionally adapted; they will grow/shrink again by themselves. */ -void SwLayoutFrm::ChgLowersProp( const Size& rOldSize ) +void SwLayoutFrame::ChgLowersProp( const Size& rOldSize ) { // no change of lower properties for root frame or if no lower exists. - if ( IsRootFrm() || !Lower() ) + if ( IsRootFrame() || !Lower() ) return; - // declare and init <SwFrm* pLowerFrm> with first lower - SwFrm *pLowerFrm = Lower(); + // declare and init <SwFrame* pLowerFrame> with first lower + SwFrame *pLowerFrame = Lower(); // declare and init const booleans <bHeightChgd> and <bWidthChg> const bool bHeightChgd = rOldSize.Height() != Prt().Height(); @@ -2553,60 +2553,60 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize ) // are affected by the size change. Otherwise much more lower frames // are invalidated. if ( !( bVert ? bHeightChgd : bWidthChgd ) && - ! Lower()->IsColumnFrm() && - ( ( IsBodyFrm() && IsInDocBody() && ( !IsInSct() || !FindSctFrm()->IsColLocked() ) ) || + ! Lower()->IsColumnFrame() && + ( ( IsBodyFrame() && IsInDocBody() && ( !IsInSct() || !FindSctFrame()->IsColLocked() ) ) || // #i10826# Section frames without columns should not // invalidate all lowers! - IsSctFrm() ) ) + IsSctFrame() ) ) { // Determine page frame the body frame resp. the section frame belongs to. - SwPageFrm *pPage = FindPageFrm(); + SwPageFrame *pPage = FindPageFrame(); // Determine last lower by traveling through them using <GetNext()>. // During travel check each section frame, if it will be sized to // maximum. If Yes, invalidate size of section frame and set // corresponding flags at the page. do { - if( pLowerFrm->IsSctFrm() && static_cast<SwSectionFrm*>(pLowerFrm)->_ToMaximize() ) + if( pLowerFrame->IsSctFrame() && static_cast<SwSectionFrame*>(pLowerFrame)->_ToMaximize() ) { - pLowerFrm->_InvalidateSize(); - pLowerFrm->InvalidatePage( pPage ); + pLowerFrame->_InvalidateSize(); + pLowerFrame->InvalidatePage( pPage ); } - if( pLowerFrm->GetNext() ) - pLowerFrm = pLowerFrm->GetNext(); + if( pLowerFrame->GetNext() ) + pLowerFrame = pLowerFrame->GetNext(); else break; } while( true ); // If found last lower is a section frame containing no section // (section frame isn't valid and will be deleted in the future), // travel backwards. - while( pLowerFrm->IsSctFrm() && !static_cast<SwSectionFrm*>(pLowerFrm)->GetSection() && - pLowerFrm->GetPrev() ) - pLowerFrm = pLowerFrm->GetPrev(); - // If found last lower is a section frame, set <pLowerFrm> to its last + while( pLowerFrame->IsSctFrame() && !static_cast<SwSectionFrame*>(pLowerFrame)->GetSection() && + pLowerFrame->GetPrev() ) + pLowerFrame = pLowerFrame->GetPrev(); + // If found last lower is a section frame, set <pLowerFrame> to its last // content, if the section frame is valid and is not sized to maximum. - // Otherwise set <pLowerFrm> to NULL - In this case body frame only + // Otherwise set <pLowerFrame> to NULL - In this case body frame only // contains invalid section frames. - if( pLowerFrm->IsSctFrm() ) - pLowerFrm = static_cast<SwSectionFrm*>(pLowerFrm)->GetSection() && - !static_cast<SwSectionFrm*>(pLowerFrm)->ToMaximize( false ) ? - static_cast<SwSectionFrm*>(pLowerFrm)->FindLastContent() : nullptr; + if( pLowerFrame->IsSctFrame() ) + pLowerFrame = static_cast<SwSectionFrame*>(pLowerFrame)->GetSection() && + !static_cast<SwSectionFrame*>(pLowerFrame)->ToMaximize( false ) ? + static_cast<SwSectionFrame*>(pLowerFrame)->FindLastContent() : nullptr; // continue with found last lower, probably the last content of a section - if ( pLowerFrm ) + if ( pLowerFrame ) { - // If <pLowerFrm> is in a table frame, set <pLowerFrm> to this table + // If <pLowerFrame> is in a table frame, set <pLowerFrame> to this table // frame and continue. - if ( pLowerFrm->IsInTab() ) + if ( pLowerFrame->IsInTab() ) { - // OD 28.10.2002 #97265# - safeguard for setting <pLowerFrm> to + // OD 28.10.2002 #97265# - safeguard for setting <pLowerFrame> to // its table frame - check, if the table frame is also a lower - // of the body frame, in order to assure that <pLowerFrm> is not + // of the body frame, in order to assure that <pLowerFrame> is not // set to a frame, which is an *upper* of the body frame. - SwFrm* pTableFrm = pLowerFrm->FindTabFrm(); - if ( IsAnLower( pTableFrm ) ) + SwFrame* pTableFrame = pLowerFrame->FindTabFrame(); + if ( IsAnLower( pTableFrame ) ) { - pLowerFrm = pTableFrm; + pLowerFrame = pTableFrame; } } // Check, if variable size of body frame resp. section frame has grown @@ -2616,13 +2616,13 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize ) { // If variable size of body|section frame has grown, only found // last lower and the position of the its next have to be invalidated. - pLowerFrm->_InvalidateAll(); - pLowerFrm->InvalidatePage( pPage ); - if( !pLowerFrm->IsFlowFrm() || - !SwFlowFrm::CastFlowFrm( pLowerFrm )->HasFollow() ) - pLowerFrm->InvalidateNextPos( true ); - if ( pLowerFrm->IsTextFrm() ) - static_cast<SwContentFrm*>(pLowerFrm)->Prepare( PREP_ADJUST_FRM ); + pLowerFrame->_InvalidateAll(); + pLowerFrame->InvalidatePage( pPage ); + if( !pLowerFrame->IsFlowFrame() || + !SwFlowFrame::CastFlowFrame( pLowerFrame )->HasFollow() ) + pLowerFrame->InvalidateNextPos( true ); + if ( pLowerFrame->IsTextFrame() ) + static_cast<SwContentFrame*>(pLowerFrame)->Prepare( PREP_ADJUST_FRM ); } else { @@ -2631,44 +2631,44 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize ) // and the dedicated new last lower. if( bVert ) { - SwTwips nBot = Frm().Left() + Prt().Left(); - while ( pLowerFrm && pLowerFrm->GetPrev() && pLowerFrm->Frm().Left() < nBot ) + SwTwips nBot = Frame().Left() + Prt().Left(); + while ( pLowerFrame && pLowerFrame->GetPrev() && pLowerFrame->Frame().Left() < nBot ) { - pLowerFrm->_InvalidateAll(); - pLowerFrm->InvalidatePage( pPage ); - pLowerFrm = pLowerFrm->GetPrev(); + pLowerFrame->_InvalidateAll(); + pLowerFrame->InvalidatePage( pPage ); + pLowerFrame = pLowerFrame->GetPrev(); } } else { - SwTwips nBot = Frm().Top() + Prt().Bottom(); - while ( pLowerFrm && pLowerFrm->GetPrev() && pLowerFrm->Frm().Top() > nBot ) + SwTwips nBot = Frame().Top() + Prt().Bottom(); + while ( pLowerFrame && pLowerFrame->GetPrev() && pLowerFrame->Frame().Top() > nBot ) { - pLowerFrm->_InvalidateAll(); - pLowerFrm->InvalidatePage( pPage ); - pLowerFrm = pLowerFrm->GetPrev(); + pLowerFrame->_InvalidateAll(); + pLowerFrame->InvalidatePage( pPage ); + pLowerFrame = pLowerFrame->GetPrev(); } } - if ( pLowerFrm ) + if ( pLowerFrame ) { - pLowerFrm->_InvalidateSize(); - pLowerFrm->InvalidatePage( pPage ); - if ( pLowerFrm->IsTextFrm() ) - static_cast<SwContentFrm*>(pLowerFrm)->Prepare( PREP_ADJUST_FRM ); + pLowerFrame->_InvalidateSize(); + pLowerFrame->InvalidatePage( pPage ); + if ( pLowerFrame->IsTextFrame() ) + static_cast<SwContentFrame*>(pLowerFrame)->Prepare( PREP_ADJUST_FRM ); } } // #i41694# - improvement by removing duplicates - if ( pLowerFrm ) + if ( pLowerFrame ) { - if ( pLowerFrm->IsInSct() ) + if ( pLowerFrame->IsInSct() ) { // #i41694# - follow-up of issue #i10826# // No invalidation of section frame, if it's the this. - SwFrm* pSectFrm = pLowerFrm->FindSctFrm(); - if( pSectFrm != this && IsAnLower( pSectFrm ) ) + SwFrame* pSectFrame = pLowerFrame->FindSctFrame(); + if( pSectFrame != this && IsAnLower( pSectFrame ) ) { - pSectFrm->_InvalidateSize(); - pSectFrm->InvalidatePage( pPage ); + pSectFrame->_InvalidateSize(); + pSectFrame->InvalidatePage( pPage ); } } } @@ -2682,7 +2682,7 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize ) // Declare booleans <bFixChgd> and <bVarChgd>, indicating for text frame // adjustment, if fixed/variable size has changed. bool bFixChgd, bVarChgd; - if( bVert == pLowerFrm->IsNeighbourFrm() ) + if( bVert == pLowerFrame->IsNeighbourFrame() ) { bFixChgd = bWidthChgd; bVarChgd = bHeightChgd; @@ -2710,21 +2710,21 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize ) : FRM_NEIGHBOUR; // Travel through all lowers using <GetNext()> - while ( pLowerFrm ) + while ( pLowerFrame ) { - if ( pLowerFrm->IsTextFrm() ) + if ( pLowerFrame->IsTextFrame() ) { // Text frames will only be invalidated - prepare invalidation if ( bFixChgd ) - static_cast<SwContentFrm*>(pLowerFrm)->Prepare( PREP_FIXSIZE_CHG ); + static_cast<SwContentFrame*>(pLowerFrame)->Prepare( PREP_FIXSIZE_CHG ); if ( bVarChgd ) - static_cast<SwContentFrm*>(pLowerFrm)->Prepare( PREP_ADJUST_FRM ); + static_cast<SwContentFrame*>(pLowerFrame)->Prepare( PREP_ADJUST_FRM ); } else { // If lower isn't a table, row, cell or section frame, adjust its // frame size. - const sal_uInt16 nLowerType = pLowerFrm->GetType(); + const sal_uInt16 nLowerType = pLowerFrame->GetType(); if ( !(nLowerType & (FRM_TAB|FRM_ROW|FRM_CELL|FRM_SECTION)) ) { if ( bWidthChgd ) @@ -2737,9 +2737,9 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize ) // In horizontal layout set width of header, footer, // foot note container, foot note, body and no-text // frames to its upper width. - pLowerFrm->Frm().Width( Prt().Width() ); + pLowerFrame->Frame().Width( Prt().Width() ); } - else if( rOldSize.Width() && !pLowerFrm->IsFootnoteFrm() ) + else if( rOldSize.Width() && !pLowerFrame->IsFootnoteFrame() ) { // Adjust frame width proportional, if lower isn't a // foot note frame and condition <nLowerType & nFixWidth> @@ -2752,11 +2752,11 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize ) // Perform <double> calculation of new width, if // one of the coefficients is greater than 50000 SwTwips nNewWidth; - if ( (pLowerFrm->Frm().Width() > 50000) || + if ( (pLowerFrame->Frame().Width() > 50000) || (Prt().Width() > 50000) ) { double nNewWidthTmp = - ( double(pLowerFrm->Frm().Width()) + ( double(pLowerFrame->Frame().Width()) * double(Prt().Width()) ) / double(rOldSize.Width()); nNewWidth = SwTwips(nNewWidthTmp); @@ -2764,9 +2764,9 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize ) else { nNewWidth = - (pLowerFrm->Frm().Width() * Prt().Width()) / rOldSize.Width(); + (pLowerFrame->Frame().Width() * Prt().Width()) / rOldSize.Width(); } - pLowerFrm->Frm().Width( nNewWidth ); + pLowerFrame->Frame().Width( nNewWidth ); } } if ( bHeightChgd ) @@ -2778,17 +2778,17 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize ) // no-text frames to its upper height. // In horizontal layout set height of column frames // to its upper height. - pLowerFrm->Frm().Height( Prt().Height() ); + pLowerFrame->Frame().Height( Prt().Height() ); } // OD 01.10.2002 #102211# - // add conditions <!pLowerFrm->IsHeaderFrm()> and - // <!pLowerFrm->IsFooterFrm()> in order to avoid that + // add conditions <!pLowerFrame->IsHeaderFrame()> and + // <!pLowerFrame->IsFooterFrame()> in order to avoid that // the <Grow> of header or footer are overwritten. // NOTE: Height of header/footer frame is determined by contents. else if ( rOldSize.Height() && - !pLowerFrm->IsFootnoteFrm() && - !pLowerFrm->IsHeaderFrm() && - !pLowerFrm->IsFooterFrm() + !pLowerFrame->IsFootnoteFrame() && + !pLowerFrame->IsHeaderFrame() && + !pLowerFrame->IsFooterFrame() ) { // Adjust frame height proportional, if lower isn't a @@ -2812,29 +2812,29 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize ) // determined by its content. // OD 31.03.2003 #108446# - apply special case for page // lowers - see description above - also for section columns. - if ( IsPageFrm() || - ( IsColumnFrm() && IsInSct() ) + if ( IsPageFrame() || + ( IsColumnFrame() && IsInSct() ) ) { - OSL_ENSURE( pLowerFrm->IsBodyFrm() || pLowerFrm->IsFootnoteContFrm(), + OSL_ENSURE( pLowerFrame->IsBodyFrame() || pLowerFrame->IsFootnoteContFrame(), "ChgLowersProp - only for body or foot note container" ); - if ( pLowerFrm->IsBodyFrm() || pLowerFrm->IsFootnoteContFrm() ) + if ( pLowerFrame->IsBodyFrame() || pLowerFrame->IsFootnoteContFrame() ) { - if ( IsVertical() || pLowerFrm->IsBodyFrm() ) + if ( IsVertical() || pLowerFrame->IsBodyFrame() ) { SwTwips nNewHeight = - pLowerFrm->Frm().Height() + + pLowerFrame->Frame().Height() + ( Prt().Height() - rOldSize.Height() ); if ( nNewHeight < 0) { // OD 01.04.2003 #108446# - adjust assertion condition and text - OSL_ENSURE( !( IsPageFrm() && - (pLowerFrm->Frm().Height()>0) && - (pLowerFrm->IsValid()) ), + OSL_ENSURE( !( IsPageFrame() && + (pLowerFrame->Frame().Height()>0) && + (pLowerFrame->IsValid()) ), "ChgLowersProg - negative height for lower."); nNewHeight = 0; } - pLowerFrm->Frm().Height( nNewHeight ); + pLowerFrame->Frame().Height( nNewHeight ); } } } @@ -2844,75 +2844,75 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize ) // OD 24.10.2002 #97265# - <double> calculation // Perform <double> calculation of new height, if // one of the coefficients is greater than 50000 - if ( (pLowerFrm->Frm().Height() > 50000) || + if ( (pLowerFrame->Frame().Height() > 50000) || (Prt().Height() > 50000) ) { double nNewHeightTmp = - ( double(pLowerFrm->Frm().Height()) + ( double(pLowerFrame->Frame().Height()) * double(Prt().Height()) ) / double(rOldSize.Height()); nNewHeight = SwTwips(nNewHeightTmp); } else { - nNewHeight = ( pLowerFrm->Frm().Height() + nNewHeight = ( pLowerFrame->Frame().Height() * Prt().Height() ) / rOldSize.Height(); } - if( !pLowerFrm->GetNext() ) + if( !pLowerFrame->GetNext() ) { SwTwips nSum = Prt().Height(); - SwFrm* pTmp = Lower(); + SwFrame* pTmp = Lower(); while( pTmp->GetNext() ) { - if( !pTmp->IsFootnoteContFrm() || !pTmp->IsVertical() ) - nSum -= pTmp->Frm().Height(); + if( !pTmp->IsFootnoteContFrame() || !pTmp->IsVertical() ) + nSum -= pTmp->Frame().Height(); pTmp = pTmp->GetNext(); } if( nSum - nNewHeight == 1 && - nSum == pLowerFrm->Frm().Height() ) + nSum == pLowerFrame->Frame().Height() ) nNewHeight = nSum; } - pLowerFrm->Frm().Height( nNewHeight ); + pLowerFrame->Frame().Height( nNewHeight ); } } } } } // end of else { NOT text frame } - pLowerFrm->_InvalidateAll(); - if ( bInvaPageForContent && pLowerFrm->IsContentFrm() ) + pLowerFrame->_InvalidateAll(); + if ( bInvaPageForContent && pLowerFrame->IsContentFrame() ) { - pLowerFrm->InvalidatePage(); + pLowerFrame->InvalidatePage(); bInvaPageForContent = false; } - if ( !pLowerFrm->GetNext() && pLowerFrm->IsRetoucheFrm() ) + if ( !pLowerFrame->GetNext() && pLowerFrame->IsRetoucheFrame() ) { //If a growth took place and the subordinate elements can retouch //itself (currently Tabs, Sections and Content) we trigger it. if ( rOldSize.Height() < Prt().SSize().Height() || rOldSize.Width() < Prt().SSize().Width() ) - pLowerFrm->SetRetouche(); + pLowerFrame->SetRetouche(); } - pLowerFrm = pLowerFrm->GetNext(); + pLowerFrame = pLowerFrame->GetNext(); } // Finally adjust the columns if width is set to auto // Possible optimization: execute this code earlier in this function and // return??? if ( ( (bVert && bHeightChgd) || (! bVert && bWidthChgd) ) && - Lower()->IsColumnFrm() ) + Lower()->IsColumnFrame() ) { // get column attribute const SwFormatCol* pColAttr = nullptr; - if ( IsPageBodyFrm() ) + if ( IsPageBodyFrame() ) { - OSL_ENSURE( GetUpper()->IsPageFrm(), "Upper is not page frame" ); + OSL_ENSURE( GetUpper()->IsPageFrame(), "Upper is not page frame" ); pColAttr = &GetUpper()->GetFormat()->GetCol(); } else { - OSL_ENSURE( IsFlyFrm() || IsSctFrm(), "Columns not in fly or section" ); + OSL_ENSURE( IsFlyFrame() || IsSctFrame(), "Columns not in fly or section" ); pColAttr = &GetFormat()->GetCol(); } @@ -2921,13 +2921,13 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize ) } } -/** "Formats" the Frame; Frm and PrtArea. +/** "Formats" the Frame; Frame and PrtArea. * * The Fixsize is not set here. */ -void SwLayoutFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttrs *pAttrs ) +void SwLayoutFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttrs *pAttrs ) { - OSL_ENSURE( pAttrs, "LayoutFrm::Format, pAttrs is 0." ); + OSL_ENSURE( pAttrs, "LayoutFrame::Format, pAttrs is 0." ); if ( mbValidPrtArea && mbValidSize ) return; @@ -2938,7 +2938,7 @@ void SwLayoutFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorder const sal_uInt16 nRight = (sal_uInt16)pAttrs->CalcRight(this); const sal_uInt16 nLower = pAttrs->CalcBottom(); - const bool bVert = IsVertical() && !IsPageFrm(); + const bool bVert = IsVertical() && !IsPageFrame(); SwRectFn fnRect = bVert ? ( IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori; if ( !mbValidPrtArea ) { @@ -2952,7 +2952,7 @@ void SwLayoutFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorder if ( !HasFixSize() ) { const SwTwips nBorder = nUpper + nLower; - const SwFormatFrmSize &rSz = GetFormat()->GetFrmSize(); + const SwFormatFrameSize &rSz = GetFormat()->GetFrameSize(); SwTwips nMinHeight = rSz.GetHeightSizeType() == ATT_MIN_SIZE ? rSz.GetHeight() : 0; do { mbValidSize = true; @@ -2960,22 +2960,22 @@ void SwLayoutFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorder //The size in VarSize is calculated using the content plus the // borders. SwTwips nRemaining = 0; - SwFrm *pFrm = Lower(); - while ( pFrm ) - { nRemaining += (pFrm->Frm().*fnRect->fnGetHeight)(); - if( pFrm->IsTextFrm() && static_cast<SwTextFrm*>(pFrm)->IsUndersized() ) - // This TextFrm would like to be a bit bigger - nRemaining += static_cast<SwTextFrm*>(pFrm)->GetParHeight() - - (pFrm->Prt().*fnRect->fnGetHeight)(); - else if( pFrm->IsSctFrm() && static_cast<SwSectionFrm*>(pFrm)->IsUndersized() ) - nRemaining += static_cast<SwSectionFrm*>(pFrm)->Undersize(); - pFrm = pFrm->GetNext(); + SwFrame *pFrame = Lower(); + while ( pFrame ) + { nRemaining += (pFrame->Frame().*fnRect->fnGetHeight)(); + if( pFrame->IsTextFrame() && static_cast<SwTextFrame*>(pFrame)->IsUndersized() ) + // This TextFrame would like to be a bit bigger + nRemaining += static_cast<SwTextFrame*>(pFrame)->GetParHeight() + - (pFrame->Prt().*fnRect->fnGetHeight)(); + else if( pFrame->IsSctFrame() && static_cast<SwSectionFrame*>(pFrame)->IsUndersized() ) + nRemaining += static_cast<SwSectionFrame*>(pFrame)->Undersize(); + pFrame = pFrame->GetNext(); } nRemaining += nBorder; nRemaining = std::max( nRemaining, nMinHeight ); - const SwTwips nDiff = nRemaining-(Frm().*fnRect->fnGetHeight)(); - const long nOldLeft = (Frm().*fnRect->fnGetLeft)(); - const long nOldTop = (Frm().*fnRect->fnGetTop)(); + const SwTwips nDiff = nRemaining-(Frame().*fnRect->fnGetHeight)(); + const long nOldLeft = (Frame().*fnRect->fnGetLeft)(); + const long nOldTop = (Frame().*fnRect->fnGetTop)(); if ( nDiff ) { if ( nDiff > 0 ) @@ -2986,12 +2986,12 @@ void SwLayoutFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorder MakePos(); } //Don't exceed the bottom edge of the Upper. - if ( GetUpper() && (Frm().*fnRect->fnGetHeight)() ) + if ( GetUpper() && (Frame().*fnRect->fnGetHeight)() ) { const SwTwips nLimit = (GetUpper()->*fnRect->fnGetPrtBottom)(); if( (this->*fnRect->fnSetLimit)( nLimit ) && - nOldLeft == (Frm().*fnRect->fnGetLeft)() && - nOldTop == (Frm().*fnRect->fnGetTop)() ) + nOldLeft == (Frame().*fnRect->fnGetLeft)() && + nOldTop == (Frame().*fnRect->fnGetTop)() ) mbValidSize = mbValidPrtArea = true; } } while ( !mbValidSize ); @@ -2999,8 +2999,8 @@ void SwLayoutFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorder else if (GetType() & FRM_HEADFOOT) { do - { if ( Frm().Height() != pAttrs->GetSize().Height() ) - ChgSize( Size( Frm().Width(), pAttrs->GetSize().Height())); + { if ( Frame().Height() != pAttrs->GetSize().Height() ) + ChgSize( Size( Frame().Width(), pAttrs->GetSize().Height())); mbValidSize = true; MakePos(); } while ( !mbValidSize ); @@ -3018,30 +3018,30 @@ void SwLayoutFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorder } } -static void InvaPercentFlys( SwFrm *pFrm, SwTwips nDiff ) +static void InvaPercentFlys( SwFrame *pFrame, SwTwips nDiff ) { - OSL_ENSURE( pFrm->GetDrawObjs(), "Can't find any Objects" ); - for ( size_t i = 0; i < pFrm->GetDrawObjs()->size(); ++i ) + OSL_ENSURE( pFrame->GetDrawObjs(), "Can't find any Objects" ); + for ( size_t i = 0; i < pFrame->GetDrawObjs()->size(); ++i ) { - SwAnchoredObject* pAnchoredObj = (*pFrm->GetDrawObjs())[i]; - if ( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) != nullptr ) + SwAnchoredObject* pAnchoredObj = (*pFrame->GetDrawObjs())[i]; + if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr ) { - SwFlyFrm *pFly = static_cast<SwFlyFrm*>(pAnchoredObj); - const SwFormatFrmSize &rSz = pFly->GetFormat()->GetFrmSize(); + SwFlyFrame *pFly = static_cast<SwFlyFrame*>(pAnchoredObj); + const SwFormatFrameSize &rSz = pFly->GetFormat()->GetFrameSize(); if ( rSz.GetWidthPercent() || rSz.GetHeightPercent() ) { bool bNotify = true; // If we've a fly with more than 90% relative height... - if( rSz.GetHeightPercent() > 90 && pFly->GetAnchorFrm() && - rSz.GetHeightPercent() != SwFormatFrmSize::SYNCED && nDiff ) + if( rSz.GetHeightPercent() > 90 && pFly->GetAnchorFrame() && + rSz.GetHeightPercent() != SwFormatFrameSize::SYNCED && nDiff ) { - const SwFrm *pRel = pFly->IsFlyLayFrm() ? pFly->GetAnchorFrm(): - pFly->GetAnchorFrm()->GetUpper(); + const SwFrame *pRel = pFly->IsFlyLayFrame() ? pFly->GetAnchorFrame(): + pFly->GetAnchorFrame()->GetUpper(); // ... and we have already more than 90% height and we // not allow the text to go through... // then a notifycation could cause an endless loop, e.g. // 100% height and no text wrap inside a cell of a table. - if( pFly->Frm().Height()*10 > + if( pFly->Frame().Height()*10 > ( nDiff + pRel->Prt().Height() )*9 && pFly->GetFormat()->GetSurround().GetSurround() != SURROUND_THROUGHT ) @@ -3054,47 +3054,47 @@ static void InvaPercentFlys( SwFrm *pFrm, SwTwips nDiff ) } } -void SwLayoutFrm::InvaPercentLowers( SwTwips nDiff ) +void SwLayoutFrame::InvaPercentLowers( SwTwips nDiff ) { if ( GetDrawObjs() ) ::InvaPercentFlys( this, nDiff ); - SwFrm *pFrm = ContainsContent(); - if ( pFrm ) + SwFrame *pFrame = ContainsContent(); + if ( pFrame ) do { - if ( pFrm->IsInTab() && !IsTabFrm() ) + if ( pFrame->IsInTab() && !IsTabFrame() ) { - SwFrm *pTmp = pFrm->FindTabFrm(); - OSL_ENSURE( pTmp, "Where's my TabFrm?" ); + SwFrame *pTmp = pFrame->FindTabFrame(); + OSL_ENSURE( pTmp, "Where's my TabFrame?" ); if( IsAnLower( pTmp ) ) - pFrm = pTmp; + pFrame = pTmp; } - if ( pFrm->IsTabFrm() ) + if ( pFrame->IsTabFrame() ) { - const SwFormatFrmSize &rSz = static_cast<SwLayoutFrm*>(pFrm)->GetFormat()->GetFrmSize(); + const SwFormatFrameSize &rSz = static_cast<SwLayoutFrame*>(pFrame)->GetFormat()->GetFrameSize(); if ( rSz.GetWidthPercent() || rSz.GetHeightPercent() ) - pFrm->InvalidatePrt(); + pFrame->InvalidatePrt(); } - else if ( pFrm->GetDrawObjs() ) - ::InvaPercentFlys( pFrm, nDiff ); - pFrm = pFrm->FindNextCnt(); - } while ( pFrm && IsAnLower( pFrm ) ) ; + else if ( pFrame->GetDrawObjs() ) + ::InvaPercentFlys( pFrame, nDiff ); + pFrame = pFrame->FindNextCnt(); + } while ( pFrame && IsAnLower( pFrame ) ) ; } -long SwLayoutFrm::CalcRel( const SwFormatFrmSize &rSz, bool ) const +long SwLayoutFrame::CalcRel( const SwFormatFrameSize &rSz, bool ) const { long nRet = rSz.GetWidth(), nPercent = rSz.GetWidthPercent(); if ( nPercent ) { - const SwFrm *pRel = GetUpper(); + const SwFrame *pRel = GetUpper(); long nRel = LONG_MAX; - const SwViewShell *pSh = getRootFrm()->GetCurrShell(); + const SwViewShell *pSh = getRootFrame()->GetCurrShell(); const bool bBrowseMode = pSh && pSh->GetViewOptions()->getBrowseMode(); - if( pRel->IsPageBodyFrm() && pSh && bBrowseMode && pSh->VisArea().Width() ) + if( pRel->IsPageBodyFrame() && pSh && bBrowseMode && pSh->VisArea().Width() ) { nRel = pSh->GetBrowseWidth(); long nDiff = nRel - pRel->Prt().Width(); @@ -3107,68 +3107,68 @@ long SwLayoutFrm::CalcRel( const SwFormatFrmSize &rSz, bool ) const return nRet; } -// Local helpers for SwLayoutFrm::FormatWidthCols() +// Local helpers for SwLayoutFrame::FormatWidthCols() -static long lcl_CalcMinColDiff( SwLayoutFrm *pLayFrm ) +static long lcl_CalcMinColDiff( SwLayoutFrame *pLayFrame ) { long nDiff = 0, nFirstDiff = 0; - SwLayoutFrm *pCol = static_cast<SwLayoutFrm*>(pLayFrm->Lower()); + SwLayoutFrame *pCol = static_cast<SwLayoutFrame*>(pLayFrame->Lower()); OSL_ENSURE( pCol, "Where's the columnframe?" ); - SwFrm *pFrm = pCol->Lower(); + SwFrame *pFrame = pCol->Lower(); do { - if( pFrm && pFrm->IsBodyFrm() ) - pFrm = static_cast<SwBodyFrm*>(pFrm)->Lower(); - if ( pFrm && pFrm->IsTextFrm() ) + if( pFrame && pFrame->IsBodyFrame() ) + pFrame = static_cast<SwBodyFrame*>(pFrame)->Lower(); + if ( pFrame && pFrame->IsTextFrame() ) { - const long nTmp = static_cast<SwTextFrm*>(pFrm)->FirstLineHeight(); + const long nTmp = static_cast<SwTextFrame*>(pFrame)->FirstLineHeight(); if ( nTmp != USHRT_MAX ) { - if ( pCol == pLayFrm->Lower() ) + if ( pCol == pLayFrame->Lower() ) nFirstDiff = nTmp; else nDiff = nDiff ? std::min( nDiff, nTmp ) : nTmp; } } //Skip empty columns! - pCol = static_cast<SwLayoutFrm*>(pCol->GetNext()); - while ( pCol && nullptr == (pFrm = pCol->Lower()) ) - pCol = static_cast<SwLayoutFrm*>(pCol->GetNext()); + pCol = static_cast<SwLayoutFrame*>(pCol->GetNext()); + while ( pCol && nullptr == (pFrame = pCol->Lower()) ) + pCol = static_cast<SwLayoutFrame*>(pCol->GetNext()); - } while ( pFrm && pCol ); + } while ( pFrame && pCol ); return nDiff ? nDiff : nFirstDiff ? nFirstDiff : 240; } -static bool lcl_IsFlyHeightClipped( SwLayoutFrm *pLay ) +static bool lcl_IsFlyHeightClipped( SwLayoutFrame *pLay ) { - SwFrm *pFrm = pLay->ContainsContent(); - while ( pFrm ) + SwFrame *pFrame = pLay->ContainsContent(); + while ( pFrame ) { - if ( pFrm->IsInTab() ) - pFrm = pFrm->FindTabFrm(); + if ( pFrame->IsInTab() ) + pFrame = pFrame->FindTabFrame(); - if ( pFrm->GetDrawObjs() ) + if ( pFrame->GetDrawObjs() ) { - const size_t nCnt = pFrm->GetDrawObjs()->size(); + const size_t nCnt = pFrame->GetDrawObjs()->size(); for ( size_t i = 0; i < nCnt; ++i ) { - SwAnchoredObject* pAnchoredObj = (*pFrm->GetDrawObjs())[i]; - if ( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) != nullptr ) + SwAnchoredObject* pAnchoredObj = (*pFrame->GetDrawObjs())[i]; + if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr ) { - SwFlyFrm* pFly = static_cast<SwFlyFrm*>(pAnchoredObj); + SwFlyFrame* pFly = static_cast<SwFlyFrame*>(pAnchoredObj); if ( pFly->IsHeightClipped() && - ( !pFly->IsFlyFreeFrm() || pFly->GetPageFrm() ) ) + ( !pFly->IsFlyFreeFrame() || pFly->GetPageFrame() ) ) return true; } } } - pFrm = pFrm->FindNextCnt(); + pFrame = pFrame->FindNextCnt(); } return false; } -void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs, +void SwLayoutFrame::FormatWidthCols( const SwBorderAttrs &rAttrs, const SwTwips nBorder, const SwTwips nMinHeight ) { //If there are columns involved, the size is adjusted using the last column. @@ -3187,7 +3187,7 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs, bool bEnd = false; bool bBackLock = false; - SwViewShell *pSh = getRootFrm()->GetCurrShell(); + SwViewShell *pSh = getRootFrame()->GetCurrShell(); SwViewShellImp *pImp = pSh ? pSh->Imp() : nullptr; vcl::RenderContext* pRenderContext = pSh ? pSh->GetOut() : nullptr; { @@ -3223,10 +3223,10 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs, long nMaximum; bool bNoBalance = false; SWRECTFN( this ) - if( IsSctFrm() ) + if( IsSctFrame() ) { - nMaximum = (Frm().*fnRect->fnGetHeight)() - nBorder + - (Frm().*fnRect->fnBottomDist)( + nMaximum = (Frame().*fnRect->fnGetHeight)() - nBorder + + (Frame().*fnRect->fnBottomDist)( (GetUpper()->*fnRect->fnGetPrtBottom)() ); nMaximum += GetUpper()->Grow( LONG_MAX, true ); if( nMaximum < nMinimum ) @@ -3239,31 +3239,31 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs, if( nMaximum > BROWSE_HEIGHT ) nMaximum = BROWSE_HEIGHT; - bNoBalance = static_cast<SwSectionFrm*>(this)->GetSection()->GetFormat()-> + bNoBalance = static_cast<SwSectionFrame*>(this)->GetSection()->GetFormat()-> GetBalancedColumns().GetValue(); - SwFrm* pAny = ContainsAny(); + SwFrame* pAny = ContainsAny(); if( bNoBalance || - ( !(Frm().*fnRect->fnGetHeight)() && pAny ) ) + ( !(Frame().*fnRect->fnGetHeight)() && pAny ) ) { long nTop = (this->*fnRect->fnGetTopMargin)(); // #i23129# - correction // to the calculated maximum height. - (Frm().*fnRect->fnAddBottom)( nMaximum - - (Frm().*fnRect->fnGetHeight)() ); + (Frame().*fnRect->fnAddBottom)( nMaximum - + (Frame().*fnRect->fnGetHeight)() ); if( nTop > nMaximum ) nTop = nMaximum; (this->*fnRect->fnSetYMargins)( nTop, 0 ); } - if( !pAny && !static_cast<SwSectionFrm*>(this)->IsFootnoteLock() ) + if( !pAny && !static_cast<SwSectionFrame*>(this)->IsFootnoteLock() ) { - SwFootnoteContFrm* pFootnoteCont = static_cast<SwSectionFrm*>(this)->ContainsFootnoteCont(); + SwFootnoteContFrame* pFootnoteCont = static_cast<SwSectionFrame*>(this)->ContainsFootnoteCont(); if( pFootnoteCont ) { - SwFrm* pFootnoteAny = pFootnoteCont->ContainsAny(); + SwFrame* pFootnoteAny = pFootnoteCont->ContainsAny(); if( pFootnoteAny && pFootnoteAny->IsValid() ) { bBackLock = true; - static_cast<SwSectionFrm*>(this)->SetFootnoteLock( true ); + static_cast<SwSectionFrame*>(this)->SetFootnoteLock( true ); } } } @@ -3273,15 +3273,15 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs, // #i3317# - reset temporarly consideration // of wrapping style influence - SwPageFrm* pPageFrm = FindPageFrm(); - SwSortedObjs* pObjs = pPageFrm ? pPageFrm->GetSortedObjs() : nullptr; + SwPageFrame* pPageFrame = FindPageFrame(); + SwSortedObjs* pObjs = pPageFrame ? pPageFrame->GetSortedObjs() : nullptr; if ( pObjs ) { for ( size_t i = 0; i < pObjs->size(); ++i ) { SwAnchoredObject* pAnchoredObj = (*pObjs)[i]; - if ( IsAnLower( pAnchoredObj->GetAnchorFrm() ) ) + if ( IsAnLower( pAnchoredObj->GetAnchorFrame() ) ) { pAnchoredObj->SetTmpConsiderWrapInfluence( false ); } @@ -3291,13 +3291,13 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs, { //Could take a while therefore check for Waitcrsr here. if ( pImp ) - pImp->CheckWaitCrsr(); + pImp->CheckWaitCursor(); mbValidSize = true; //First format the column as this will relieve the stack a bit. //Also set width and height of the column (if they are wrong) //while we are at it. - SwLayoutFrm *pCol = static_cast<SwLayoutFrm*>(Lower()); + SwLayoutFrame *pCol = static_cast<SwLayoutFrame*>(Lower()); // #i27399# // Simply setting the column width based on the values returned by @@ -3307,16 +3307,16 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs, for ( sal_uInt16 i = 0; i < nNumCols; ++i ) { pCol->Calc(pRenderContext); - // ColumnFrms have a BodyFrm now, which needs to be calculated + // ColumnFrames have a BodyFrame now, which needs to be calculated pCol->Lower()->Calc(pRenderContext); if( pCol->Lower()->GetNext() ) pCol->Lower()->GetNext()->Calc(pRenderContext); // SwFootnoteCont - pCol = static_cast<SwLayoutFrm*>(pCol->GetNext()); + pCol = static_cast<SwLayoutFrame*>(pCol->GetNext()); } ::CalcContent( this ); - pCol = static_cast<SwLayoutFrm*>(Lower()); + pCol = static_cast<SwLayoutFrame*>(Lower()); OSL_ENSURE( pCol && pCol->GetNext(), ":-( column making holidays?"); // set bMinDiff if no empty columns exist bool bMinDiff = true; @@ -3324,9 +3324,9 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs, while ( bMinDiff && pCol ) { bMinDiff = nullptr != pCol->ContainsContent(); - pCol = static_cast<SwLayoutFrm*>(pCol->GetNext()); + pCol = static_cast<SwLayoutFrame*>(pCol->GetNext()); } - pCol = static_cast<SwLayoutFrm*>(Lower()); + pCol = static_cast<SwLayoutFrame*>(Lower()); // OD 28.03.2003 #108446# - initialize local variable SwTwips nDiff = 0; SwTwips nMaxFree = 0; @@ -3335,8 +3335,8 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs, bool bFoundLower = false; while( pCol ) { - SwLayoutFrm* pLay = static_cast<SwLayoutFrm*>(pCol->Lower()); - SwTwips nInnerHeight = (pLay->Frm().*fnRect->fnGetHeight)() - + SwLayoutFrame* pLay = static_cast<SwLayoutFrame*>(pCol->Lower()); + SwTwips nInnerHeight = (pLay->Frame().*fnRect->fnGetHeight)() - (pLay->Prt().*fnRect->fnGetHeight)(); if( pLay->Lower() ) { @@ -3349,10 +3349,10 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs, if( pLay->GetNext() ) { bFoundLower = true; - pLay = static_cast<SwLayoutFrm*>(pLay->GetNext()); - OSL_ENSURE( pLay->IsFootnoteContFrm(),"FootnoteContainer expected" ); + pLay = static_cast<SwLayoutFrame*>(pLay->GetNext()); + OSL_ENSURE( pLay->IsFootnoteContFrame(),"FootnoteContainer expected" ); nInnerHeight += pLay->InnerHeight(); - nInnerHeight += (pLay->Frm().*fnRect->fnGetHeight)() - + nInnerHeight += (pLay->Frame().*fnRect->fnGetHeight)() - (pLay->Prt().*fnRect->fnGetHeight)(); } nInnerHeight -= (pCol->Prt().*fnRect->fnGetHeight)(); @@ -3368,10 +3368,10 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs, if( nAllFree > -nInnerHeight ) nAllFree = -nInnerHeight; } - pCol = static_cast<SwLayoutFrm*>(pCol->GetNext()); + pCol = static_cast<SwLayoutFrame*>(pCol->GetNext()); } - if ( bFoundLower || ( IsSctFrm() && static_cast<SwSectionFrm*>(this)->HasFollow() ) ) + if ( bFoundLower || ( IsSctFrame() && static_cast<SwSectionFrame*>(this)->HasFollow() ) ) { SwTwips nMinDiff = ::lcl_CalcMinColDiff( this ); // Here we decide if growing is needed - this is the case, if @@ -3379,7 +3379,7 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs, // In sections with columns we take into account to set the size // when having a non-empty Follow. if ( nDiff || ::lcl_IsFlyHeightClipped( this ) || - ( IsSctFrm() && static_cast<SwSectionFrm*>(this)->CalcMinDiff( nMinDiff ) ) ) + ( IsSctFrame() && static_cast<SwSectionFrame*>(this)->CalcMinDiff( nMinDiff ) ) ) { long nPrtHeight = (Prt().*fnRect->fnGetHeight)(); // The minimum must not be smaller than our PrtHeight as @@ -3400,11 +3400,11 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs, if ( bMinDiff ) { // If no empty column exists, we want to grow at least // by nMinDiff. Special case: If we are smaller than the - // minimal FrmHeight and PrtHeight is smaller than + // minimal FrameHeight and PrtHeight is smaller than // nMindiff we grow in a way that PrtHeight is exactly // nMinDiff afterwards. - long nFrmHeight = (Frm().*fnRect->fnGetHeight)(); - if ( nFrmHeight > nMinHeight || nPrtHeight >= nMinDiff ) + long nFrameHeight = (Frame().*fnRect->fnGetHeight)(); + if ( nFrameHeight > nMinHeight || nPrtHeight >= nMinDiff ) nDiff = std::max( nDiff, nMinDiff ); else if( nDiff < nMinDiff ) nDiff = nMinDiff - nPrtHeight + 1; @@ -3455,13 +3455,13 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs, Size aOldSz( Prt().SSize() ); long nTop = (this->*fnRect->fnGetTopMargin)(); nDiff = (Prt().*fnRect->fnGetHeight)() + nDiff + nBorder - - (Frm().*fnRect->fnGetHeight)(); - (Frm().*fnRect->fnAddBottom)( nDiff ); + (Frame().*fnRect->fnGetHeight)(); + (Frame().*fnRect->fnAddBottom)( nDiff ); // #i68520# - SwFlyFrm *pFlyFrm = dynamic_cast<SwFlyFrm*>(this); - if (pFlyFrm) + SwFlyFrame *pFlyFrame = dynamic_cast<SwFlyFrame*>(this); + if (pFlyFrame) { - pFlyFrm->InvalidateObjRectWithSpaces(); + pFlyFrame->InvalidateObjRectWithSpaces(); } (this->*fnRect->fnSetYMargins)( nTop, nBorder - nTop ); ChgLowersProp( aOldSz ); @@ -3469,37 +3469,37 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs, // #i3317# - reset temporarly consideration // of wrapping style influence - SwPageFrm* pTmpPageFrm = FindPageFrm(); - SwSortedObjs* pTmpObjs = pTmpPageFrm ? pTmpPageFrm->GetSortedObjs() : nullptr; + SwPageFrame* pTmpPageFrame = FindPageFrame(); + SwSortedObjs* pTmpObjs = pTmpPageFrame ? pTmpPageFrame->GetSortedObjs() : nullptr; if ( pTmpObjs ) { for ( size_t i = 0; i < pTmpObjs->size(); ++i ) { SwAnchoredObject* pAnchoredObj = (*pTmpObjs)[i]; - if ( IsAnLower( pAnchoredObj->GetAnchorFrm() ) ) + if ( IsAnLower( pAnchoredObj->GetAnchorFrame() ) ) { pAnchoredObj->SetTmpConsiderWrapInfluence( false ); } } } - //Invalidate suitable to nicely balance the Frms. + //Invalidate suitable to nicely balance the Frames. //- Every first one after the second column gets a // InvalidatePos(); - pCol = static_cast<SwLayoutFrm*>(Lower()->GetNext()); + pCol = static_cast<SwLayoutFrame*>(Lower()->GetNext()); while ( pCol ) { - SwFrm *pLow = pCol->Lower(); + SwFrame *pLow = pCol->Lower(); if ( pLow ) pLow->_InvalidatePos(); - pCol = static_cast<SwLayoutFrm*>(pCol->GetNext()); + pCol = static_cast<SwLayoutFrame*>(pCol->GetNext()); } - if( IsSctFrm() && static_cast<SwSectionFrm*>(this)->HasFollow() ) + if( IsSctFrame() && static_cast<SwSectionFrame*>(this)->HasFollow() ) { // If we created a Follow, we need to give its content // the opportunity to flow back inside the CalcContent - SwContentFrm* pTmpContent = - static_cast<SwSectionFrm*>(this)->GetFollow()->ContainsContent(); + SwContentFrame* pTmpContent = + static_cast<SwSectionFrame*>(this)->GetFollow()->ContainsContent(); if( pTmpContent ) pTmpContent->_InvalidatePos(); } @@ -3515,23 +3515,23 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs, // OD 01.04.2003 #108446# - Don't collect endnotes for sections. Thus, set // 2nd parameter to <true>. ::CalcContent( this, true ); - if( IsSctFrm() ) + if( IsSctFrame() ) { // OD 14.03.2003 #i11760# - adjust 2nd parameter - sal_True --> true ::CalcContent( this, true ); if( bBackLock ) - static_cast<SwSectionFrm*>(this)->SetFootnoteLock( false ); + static_cast<SwSectionFrame*>(this)->SetFootnoteLock( false ); } } -static SwContentFrm* lcl_InvalidateSection( SwFrm *pCnt, sal_uInt8 nInv ) +static SwContentFrame* lcl_InvalidateSection( SwFrame *pCnt, sal_uInt8 nInv ) { - SwSectionFrm* pSect = pCnt->FindSctFrm(); - // If our ContentFrm is placed inside a table or a footnote, only sections + SwSectionFrame* pSect = pCnt->FindSctFrame(); + // If our ContentFrame is placed inside a table or a footnote, only sections // which are also placed inside are meant. // Exception: If a table is directly passed. if( ( ( pCnt->IsInTab() && !pSect->IsInTab() ) || - ( pCnt->IsInFootnote() && !pSect->IsInFootnote() ) ) && !pCnt->IsTabFrm() ) + ( pCnt->IsInFootnote() && !pSect->IsInFootnote() ) ) && !pCnt->IsTabFrame() ) return nullptr; if( nInv & INV_SIZE ) pSect->_InvalidateSize(); @@ -3539,15 +3539,15 @@ static SwContentFrm* lcl_InvalidateSection( SwFrm *pCnt, sal_uInt8 nInv ) pSect->_InvalidatePos(); if( nInv & INV_PRTAREA ) pSect->_InvalidatePrt(); - SwFlowFrm *pFoll = pSect->GetFollow(); + SwFlowFrame *pFoll = pSect->GetFollow(); // Temporary separation from follow pSect->SetFollow( nullptr ); - SwContentFrm* pRet = pSect->FindLastContent(); + SwContentFrame* pRet = pSect->FindLastContent(); pSect->SetFollow( pFoll ); return pRet; } -static SwContentFrm* lcl_InvalidateTable( SwTabFrm *pTable, sal_uInt8 nInv ) +static SwContentFrame* lcl_InvalidateTable( SwTabFrame *pTable, sal_uInt8 nInv ) { if( ( nInv & INV_SECTION ) && pTable->IsInSct() ) lcl_InvalidateSection( pTable, nInv ); @@ -3560,12 +3560,12 @@ static SwContentFrm* lcl_InvalidateTable( SwTabFrm *pTable, sal_uInt8 nInv ) return pTable->FindLastContent(); } -static void lcl_InvalidateAllContent( SwContentFrm *pCnt, sal_uInt8 nInv ); +static void lcl_InvalidateAllContent( SwContentFrame *pCnt, sal_uInt8 nInv ); -static void lcl_InvalidateContent( SwContentFrm *pCnt, sal_uInt8 nInv ) +static void lcl_InvalidateContent( SwContentFrame *pCnt, sal_uInt8 nInv ) { - SwContentFrm *pLastTabCnt = nullptr; - SwContentFrm *pLastSctCnt = nullptr; + SwContentFrame *pLastTabCnt = nullptr; + SwContentFrame *pLastSctCnt = nullptr; while ( pCnt ) { if( nInv & INV_SECTION ) @@ -3587,8 +3587,8 @@ static void lcl_InvalidateContent( SwContentFrm *pCnt, sal_uInt8 nInv ) { if( pCnt->IsInTab() ) { - // To not call FindTabFrm() for each ContentFrm of a table and - // then invalidate the table, we remember the last ContentFrm of + // To not call FindTabFrame() for each ContentFrame of a table and + // then invalidate the table, we remember the last ContentFrame of // the table and ignore IsInTab() until we are past it. // When entering the table, LastSctCnt is set to null, so // sections inside the table are correctly invalidated. @@ -3596,7 +3596,7 @@ static void lcl_InvalidateContent( SwContentFrm *pCnt, sal_uInt8 nInv ) // invalidation is done three times, which is acceptable. if( !pLastTabCnt ) { - pLastTabCnt = lcl_InvalidateTable( pCnt->FindTabFrm(), nInv ); + pLastTabCnt = lcl_InvalidateTable( pCnt->FindTabFrame(), nInv ); pLastSctCnt = nullptr; } if( pLastTabCnt == pCnt ) @@ -3621,20 +3621,20 @@ static void lcl_InvalidateContent( SwContentFrm *pCnt, sal_uInt8 nInv ) pCnt->InvalidateLineNum(); if ( pCnt->GetDrawObjs() ) lcl_InvalidateAllContent( pCnt, nInv ); - pCnt = pCnt->GetNextContentFrm(); + pCnt = pCnt->GetNextContentFrame(); } } -static void lcl_InvalidateAllContent( SwContentFrm *pCnt, sal_uInt8 nInv ) +static void lcl_InvalidateAllContent( SwContentFrame *pCnt, sal_uInt8 nInv ) { SwSortedObjs &rObjs = *pCnt->GetDrawObjs(); for ( size_t i = 0; i < rObjs.size(); ++i ) { SwAnchoredObject* pAnchoredObj = rObjs[i]; - if ( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) != nullptr ) + if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr ) { - SwFlyFrm *pFly = static_cast<SwFlyFrm*>(pAnchoredObj); - if ( pFly->IsFlyInCntFrm() ) + SwFlyFrame *pFly = static_cast<SwFlyFrame*>(pAnchoredObj); + if ( pFly->IsFlyInContentFrame() ) { ::lcl_InvalidateContent( pFly->ContainsContent(), nInv ); if( nInv & INV_DIRECTION ) @@ -3644,10 +3644,10 @@ static void lcl_InvalidateAllContent( SwContentFrm *pCnt, sal_uInt8 nInv ) } } -void SwRootFrm::InvalidateAllContent( sal_uInt8 nInv ) +void SwRootFrame::InvalidateAllContent( sal_uInt8 nInv ) { - // First process all page bound FlyFrms. - SwPageFrm *pPage = static_cast<SwPageFrm*>(Lower()); + // First process all page bound FlyFrames. + SwPageFrame *pPage = static_cast<SwPageFrame*>(Lower()); while( pPage ) { pPage->InvalidateFlyLayout(); @@ -3663,9 +3663,9 @@ void SwRootFrm::InvalidateAllContent( sal_uInt8 nInv ) for ( size_t i = 0; i < rObjs.size(); ++i ) { SwAnchoredObject* pAnchoredObj = rObjs[i]; - if ( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) != nullptr ) + if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr ) { - SwFlyFrm* pFly = static_cast<SwFlyFrm*>(pAnchoredObj); + SwFlyFrame* pFly = static_cast<SwFlyFrame*>(pAnchoredObj); ::lcl_InvalidateContent( pFly->ContainsContent(), nInv ); if ( nInv & INV_DIRECTION ) pFly->CheckDirChange(); @@ -3674,7 +3674,7 @@ void SwRootFrm::InvalidateAllContent( sal_uInt8 nInv ) } if( nInv & INV_DIRECTION ) pPage->CheckDirChange(); - pPage = static_cast<SwPageFrm*>(pPage->GetNext()); + pPage = static_cast<SwPageFrame*>(pPage->GetNext()); } //Invalidate the whole document content and the character bound Flys here. @@ -3682,9 +3682,9 @@ void SwRootFrm::InvalidateAllContent( sal_uInt8 nInv ) if( nInv & INV_PRTAREA ) { - SwViewShell *pSh = getRootFrm()->GetCurrShell(); + SwViewShell *pSh = getRootFrame()->GetCurrShell(); if( pSh ) - pSh->InvalidateWindows( Frm() ); + pSh->InvalidateWindows( Frame() ); } } @@ -3692,16 +3692,16 @@ void SwRootFrm::InvalidateAllContent( sal_uInt8 nInv ) * Invalidate/re-calculate the position of all floating screen objects (Writer fly frames and * drawing objects), that are anchored to paragraph or to character. (2004-03-16 #i11860#) */ -void SwRootFrm::InvalidateAllObjPos() +void SwRootFrame::InvalidateAllObjPos() { - const SwPageFrm* pPageFrm = static_cast<const SwPageFrm*>(Lower()); - while( pPageFrm ) + const SwPageFrame* pPageFrame = static_cast<const SwPageFrame*>(Lower()); + while( pPageFrame ) { - pPageFrm->InvalidateFlyLayout(); + pPageFrame->InvalidateFlyLayout(); - if ( pPageFrm->GetSortedObjs() ) + if ( pPageFrame->GetSortedObjs() ) { - const SwSortedObjs& rObjs = *(pPageFrm->GetSortedObjs()); + const SwSortedObjs& rObjs = *(pPageFrame->GetSortedObjs()); for ( size_t i = 0; i < rObjs.size(); ++i ) { SwAnchoredObject* pAnchoredObj = rObjs[i]; @@ -3721,7 +3721,7 @@ void SwRootFrm::InvalidateAllObjPos() } } - pPageFrm = static_cast<const SwPageFrm*>(pPageFrm->GetNext()); + pPageFrame = static_cast<const SwPageFrame*>(pPageFrame->GetNext()); } } diff --git a/sw/source/core/objectpositioning/anchoredobjectposition.cxx b/sw/source/core/objectpositioning/anchoredobjectposition.cxx index 099c6cfabcd8..4e2958c6ffd3 100644 --- a/sw/source/core/objectpositioning/anchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/anchoredobjectposition.cxx @@ -45,7 +45,7 @@ SwAnchoredObjectPosition::SwAnchoredObjectPosition( SdrObject& _rDrawObj ) : mrDrawObj( _rDrawObj ), mbIsObjFly( false ), mpAnchoredObj( nullptr ), - mpAnchorFrm( nullptr ), + mpAnchorFrame( nullptr ), mpContact( nullptr ), // #i62875# mbFollowTextFlow( false ), @@ -68,7 +68,7 @@ SwAnchoredObjectPosition::SwAnchoredObjectPosition( SdrObject& _rDrawObj ) /** determine information about object - members <mbIsObjFly>, <mpFrmOfObj>, <mpAnchorFrm>, <mpContact>, + members <mbIsObjFly>, <mpFrameOfObj>, <mpAnchorFrame>, <mpContact>, <mbFollowTextFlow> and <mbDoNotCaptureAnchoredObj> are set */ void SwAnchoredObjectPosition::_GetInfoAboutObj() @@ -96,8 +96,8 @@ void SwAnchoredObjectPosition::_GetInfoAboutObj() // determine frame, the object is anchored at { // #i26791# - mpAnchorFrm = mpAnchoredObj->AnchorFrm(); - OSL_ENSURE( mpAnchorFrm, + mpAnchorFrame = mpAnchoredObj->AnchorFrame(); + OSL_ENSURE( mpAnchorFrame, "SwAnchoredObjectPosition::_GetInfoAboutObj() - missing anchor frame." ); } @@ -133,7 +133,7 @@ bool SwAnchoredObjectPosition::IsAnchoredToChar() const return false; } -const SwFrm* SwAnchoredObjectPosition::ToCharOrientFrm() const +const SwFrame* SwAnchoredObjectPosition::ToCharOrientFrame() const { return nullptr; } @@ -154,120 +154,120 @@ SwTwips SwAnchoredObjectPosition::ToCharTopOfLine() const #i11860# */ -SwTwips SwAnchoredObjectPosition::_GetTopForObjPos( const SwFrm& _rFrm, +SwTwips SwAnchoredObjectPosition::_GetTopForObjPos( const SwFrame& _rFrame, const SwRectFn& _fnRect, const bool _bVert ) { - SwTwips nTopOfFrmForObjPos = (_rFrm.Frm().*_fnRect->fnGetTop)(); + SwTwips nTopOfFrameForObjPos = (_rFrame.Frame().*_fnRect->fnGetTop)(); - if ( _rFrm.IsTextFrm() ) + if ( _rFrame.IsTextFrame() ) { - const SwTextFrm& rTextFrm = static_cast<const SwTextFrm&>(_rFrm); + const SwTextFrame& rTextFrame = static_cast<const SwTextFrame&>(_rFrame); if ( _bVert ) { - nTopOfFrmForObjPos -= - rTextFrm.GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid(); + nTopOfFrameForObjPos -= + rTextFrame.GetUpperSpaceAmountConsideredForPrevFrameAndPageGrid(); } else { - nTopOfFrmForObjPos += - rTextFrm.GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid(); + nTopOfFrameForObjPos += + rTextFrame.GetUpperSpaceAmountConsideredForPrevFrameAndPageGrid(); } } - return nTopOfFrmForObjPos; + return nTopOfFrameForObjPos; } void SwAnchoredObjectPosition::_GetVertAlignmentValues( - const SwFrm& _rVertOrientFrm, - const SwFrm& _rPageAlignLayFrm, + const SwFrame& _rVertOrientFrame, + const SwFrame& _rPageAlignLayFrame, const sal_Int16 _eRelOrient, SwTwips& _orAlignAreaHeight, SwTwips& _orAlignAreaOffset ) const { SwTwips nHeight = 0; SwTwips nOffset = 0; - SWRECTFN( (&_rVertOrientFrm) ) - // #i11860# - top of <_rVertOrientFrm> for object positioning - const SwTwips nVertOrientTop = _GetTopForObjPos( _rVertOrientFrm, fnRect, bVert ); - // #i11860# - upper space amount of <_rVertOrientFrm> considered + SWRECTFN( (&_rVertOrientFrame) ) + // #i11860# - top of <_rVertOrientFrame> for object positioning + const SwTwips nVertOrientTop = _GetTopForObjPos( _rVertOrientFrame, fnRect, bVert ); + // #i11860# - upper space amount of <_rVertOrientFrame> considered // for previous frame - const SwTwips nVertOrientUpperSpaceForPrevFrmAndPageGrid = - _rVertOrientFrm.IsTextFrm() - ? static_cast<const SwTextFrm&>(_rVertOrientFrm). - GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() + const SwTwips nVertOrientUpperSpaceForPrevFrameAndPageGrid = + _rVertOrientFrame.IsTextFrame() + ? static_cast<const SwTextFrame&>(_rVertOrientFrame). + GetUpperSpaceAmountConsideredForPrevFrameAndPageGrid() : 0; switch ( _eRelOrient ) { case text::RelOrientation::FRAME: { // #i11860# - consider upper space of previous frame - nHeight = (_rVertOrientFrm.Frm().*fnRect->fnGetHeight)() - - nVertOrientUpperSpaceForPrevFrmAndPageGrid; + nHeight = (_rVertOrientFrame.Frame().*fnRect->fnGetHeight)() - + nVertOrientUpperSpaceForPrevFrameAndPageGrid; nOffset = 0; } break; case text::RelOrientation::PRINT_AREA: { - nHeight = (_rVertOrientFrm.Prt().*fnRect->fnGetHeight)(); + nHeight = (_rVertOrientFrame.Prt().*fnRect->fnGetHeight)(); // #i11860# - consider upper space of previous frame - nOffset = (_rVertOrientFrm.*fnRect->fnGetTopMargin)() - - nVertOrientUpperSpaceForPrevFrmAndPageGrid; + nOffset = (_rVertOrientFrame.*fnRect->fnGetTopMargin)() - + nVertOrientUpperSpaceForPrevFrameAndPageGrid; // if aligned to page in horizontal layout, consider header and // footer frame height appropriately. - if( _rVertOrientFrm.IsPageFrm() && !bVert ) + if( _rVertOrientFrame.IsPageFrame() && !bVert ) { - const SwFrm* pPrtFrm = - static_cast<const SwPageFrm&>(_rVertOrientFrm).Lower(); - while( pPrtFrm ) + const SwFrame* pPrtFrame = + static_cast<const SwPageFrame&>(_rVertOrientFrame).Lower(); + while( pPrtFrame ) { - if( pPrtFrm->IsHeaderFrm() ) + if( pPrtFrame->IsHeaderFrame() ) { - nHeight -= pPrtFrm->Frm().Height(); - nOffset += pPrtFrm->Frm().Height(); + nHeight -= pPrtFrame->Frame().Height(); + nOffset += pPrtFrame->Frame().Height(); } - else if( pPrtFrm->IsFooterFrm() ) + else if( pPrtFrame->IsFooterFrame() ) { - nHeight -= pPrtFrm->Frm().Height(); + nHeight -= pPrtFrame->Frame().Height(); } - pPrtFrm = pPrtFrm->GetNext(); + pPrtFrame = pPrtFrame->GetNext(); } } } break; case text::RelOrientation::PAGE_FRAME: { - nHeight = (_rPageAlignLayFrm.Frm().*fnRect->fnGetHeight)(); + nHeight = (_rPageAlignLayFrame.Frame().*fnRect->fnGetHeight)(); nOffset = (*fnRect->fnYDiff)( - (_rPageAlignLayFrm.Frm().*fnRect->fnGetTop)(), + (_rPageAlignLayFrame.Frame().*fnRect->fnGetTop)(), nVertOrientTop ); } break; case text::RelOrientation::PAGE_PRINT_AREA: { - nHeight = (_rPageAlignLayFrm.Prt().*fnRect->fnGetHeight)(); - nOffset = (_rPageAlignLayFrm.*fnRect->fnGetTopMargin)() + + nHeight = (_rPageAlignLayFrame.Prt().*fnRect->fnGetHeight)(); + nOffset = (_rPageAlignLayFrame.*fnRect->fnGetTopMargin)() + (*fnRect->fnYDiff)( - (_rPageAlignLayFrm.Frm().*fnRect->fnGetTop)(), + (_rPageAlignLayFrame.Frame().*fnRect->fnGetTop)(), nVertOrientTop ); // if aligned to page in horizontal layout, consider header and // footer frame height appropriately. - if( _rPageAlignLayFrm.IsPageFrm() && !bVert ) + if( _rPageAlignLayFrame.IsPageFrame() && !bVert ) { - const SwFrm* pPrtFrm = - static_cast<const SwPageFrm&>(_rPageAlignLayFrm).Lower(); - while( pPrtFrm ) + const SwFrame* pPrtFrame = + static_cast<const SwPageFrame&>(_rPageAlignLayFrame).Lower(); + while( pPrtFrame ) { - if( pPrtFrm->IsHeaderFrm() ) + if( pPrtFrame->IsHeaderFrame() ) { - nHeight -= pPrtFrm->Frm().Height(); - nOffset += pPrtFrm->Frm().Height(); + nHeight -= pPrtFrame->Frame().Height(); + nOffset += pPrtFrame->Frame().Height(); } - else if( pPrtFrm->IsFooterFrm() ) + else if( pPrtFrame->IsFooterFrame() ) { - nHeight -= pPrtFrm->Frm().Height(); + nHeight -= pPrtFrame->Frame().Height(); } - pPrtFrm = pPrtFrm->GetNext(); + pPrtFrame = pPrtFrame->GetNext(); } } } @@ -311,23 +311,23 @@ void SwAnchoredObjectPosition::_GetVertAlignmentValues( _orAlignAreaOffset = nOffset; } -// #i26791# - add output parameter <_roVertOffsetToFrmAnchorPos> +// #i26791# - add output parameter <_roVertOffsetToFrameAnchorPos> SwTwips SwAnchoredObjectPosition::_GetVertRelPos( - const SwFrm& _rVertOrientFrm, - const SwFrm& _rPageAlignLayFrm, + const SwFrame& _rVertOrientFrame, + const SwFrame& _rPageAlignLayFrame, const sal_Int16 _eVertOrient, const sal_Int16 _eRelOrient, const SwTwips _nVertPos, const SvxLRSpaceItem& _rLRSpacing, const SvxULSpaceItem& _rULSpacing, - SwTwips& _roVertOffsetToFrmAnchorPos ) const + SwTwips& _roVertOffsetToFrameAnchorPos ) const { SwTwips nRelPosY = 0; - SWRECTFN( (&_rVertOrientFrm) ); + SWRECTFN( (&_rVertOrientFrame) ); SwTwips nAlignAreaHeight; SwTwips nAlignAreaOffset; - _GetVertAlignmentValues( _rVertOrientFrm, _rPageAlignLayFrm, + _GetVertAlignmentValues( _rVertOrientFrame, _rPageAlignLayFrame, _eRelOrient, nAlignAreaHeight, nAlignAreaOffset ); nRelPosY = nAlignAreaOffset; @@ -373,7 +373,7 @@ SwTwips SwAnchoredObjectPosition::_GetVertRelPos( } // #i26791# - _roVertOffsetToFrmAnchorPos = nAlignAreaOffset; + _roVertOffsetToFrameAnchorPos = nAlignAreaOffset; return nRelPosY; } @@ -390,7 +390,7 @@ SwTwips SwAnchoredObjectPosition::_GetVertRelPos( SwTwips SwAnchoredObjectPosition::_ImplAdjustVertRelPos( const SwTwips nTopOfAnch, const bool bVert, const bool bVertL2R, - const SwFrm& rPageAlignLayFrm, + const SwFrame& rPageAlignLayFrame, const SwTwips nProposedRelPosY, const bool bFollowTextFlow, const bool bCheckBottom ) const @@ -413,13 +413,13 @@ SwTwips SwAnchoredObjectPosition::_ImplAdjustVertRelPos( const SwTwips nTopOfAnc // object's attribute follow text flow is set and its inside a table if ( GetFrameFormat().getIDocumentSettingAccess().get(DocumentSettingId::CONSIDER_WRAP_ON_OBJECT_POSITION) && ( !bFollowTextFlow || - !GetAnchoredObj().GetAnchorFrm()->IsInTab() ) ) + !GetAnchoredObj().GetAnchorFrame()->IsInTab() ) ) { - aPgAlignArea = rPageAlignLayFrm.FindPageFrm()->Frm(); + aPgAlignArea = rPageAlignLayFrame.FindPageFrame()->Frame(); } else { - aPgAlignArea = rPageAlignLayFrm.Frm(); + aPgAlignArea = rPageAlignLayFrame.Frame(); } } @@ -482,7 +482,7 @@ SwTwips SwAnchoredObjectPosition::_ImplAdjustVertRelPos( const SwTwips nTopOfAnc { // shrink textboxes to extend beyond the page bottom SwFrameFormat* pFrameFormat = ::FindFrameFormat(&GetObject()); - SwFormatFrmSize aSize(pFormat->GetFrmSize()); + SwFormatFrameSize aSize(pFormat->GetFrameSize()); SwTwips nShrinked = aSize.GetHeight() - (nProposedRelPosY - nAdjustedRelPosY); if (nShrinked >= 0) { aSize.SetHeight( nShrinked ); @@ -503,46 +503,46 @@ SwTwips SwAnchoredObjectPosition::_ImplAdjustVertRelPos( const SwTwips nTopOfAnc #i62875# - method now private and renamed. */ SwTwips SwAnchoredObjectPosition::_ImplAdjustHoriRelPos( - const SwFrm& _rPageAlignLayFrm, + const SwFrame& _rPageAlignLayFrame, const SwTwips _nProposedRelPosX ) const { SwTwips nAdjustedRelPosX = _nProposedRelPosX; - const SwFrm& rAnchorFrm = GetAnchorFrm(); - const bool bVert = rAnchorFrm.IsVertical(); + const SwFrame& rAnchorFrame = GetAnchorFrame(); + const bool bVert = rAnchorFrame.IsVertical(); const Size aObjSize( GetAnchoredObj().GetObjRect().SSize() ); if( bVert ) { - if ( rAnchorFrm.Frm().Top() + nAdjustedRelPosX + aObjSize.Height() > - _rPageAlignLayFrm.Frm().Bottom() ) + if ( rAnchorFrame.Frame().Top() + nAdjustedRelPosX + aObjSize.Height() > + _rPageAlignLayFrame.Frame().Bottom() ) { - nAdjustedRelPosX = _rPageAlignLayFrm.Frm().Bottom() - - rAnchorFrm.Frm().Top() - + nAdjustedRelPosX = _rPageAlignLayFrame.Frame().Bottom() - + rAnchorFrame.Frame().Top() - aObjSize.Height(); } - if ( rAnchorFrm.Frm().Top() + nAdjustedRelPosX < - _rPageAlignLayFrm.Frm().Top() ) + if ( rAnchorFrame.Frame().Top() + nAdjustedRelPosX < + _rPageAlignLayFrame.Frame().Top() ) { - nAdjustedRelPosX = _rPageAlignLayFrm.Frm().Top() - - rAnchorFrm.Frm().Top(); + nAdjustedRelPosX = _rPageAlignLayFrame.Frame().Top() - + rAnchorFrame.Frame().Top(); } } else { - if ( rAnchorFrm.Frm().Left() + nAdjustedRelPosX + aObjSize.Width() > - _rPageAlignLayFrm.Frm().Right() ) + if ( rAnchorFrame.Frame().Left() + nAdjustedRelPosX + aObjSize.Width() > + _rPageAlignLayFrame.Frame().Right() ) { - nAdjustedRelPosX = _rPageAlignLayFrm.Frm().Right() - - rAnchorFrm.Frm().Left() - + nAdjustedRelPosX = _rPageAlignLayFrame.Frame().Right() - + rAnchorFrame.Frame().Left() - aObjSize.Width(); } - if ( rAnchorFrm.Frm().Left() + nAdjustedRelPosX < - _rPageAlignLayFrm.Frm().Left() ) + if ( rAnchorFrame.Frame().Left() + nAdjustedRelPosX < + _rPageAlignLayFrame.Frame().Left() ) { - nAdjustedRelPosX = _rPageAlignLayFrm.Frm().Left() - - rAnchorFrm.Frm().Left(); + nAdjustedRelPosX = _rPageAlignLayFrame.Frame().Left() - + rAnchorFrame.Frame().Left(); } } @@ -550,8 +550,8 @@ SwTwips SwAnchoredObjectPosition::_ImplAdjustHoriRelPos( } /** determine alignment value for horizontal position of object */ -void SwAnchoredObjectPosition::_GetHoriAlignmentValues( const SwFrm& _rHoriOrientFrm, - const SwFrm& _rPageAlignLayFrm, +void SwAnchoredObjectPosition::_GetHoriAlignmentValues( const SwFrame& _rHoriOrientFrame, + const SwFrame& _rPageAlignLayFrame, const sal_Int16 _eRelOrient, const bool _bObjWrapThrough, SwTwips& _orAlignAreaWidth, @@ -560,36 +560,36 @@ void SwAnchoredObjectPosition::_GetHoriAlignmentValues( const SwFrm& _rHoriOrie { SwTwips nWidth = 0; SwTwips nOffset = 0; - SWRECTFN( (&_rHoriOrientFrm) ) + SWRECTFN( (&_rHoriOrientFrame) ) switch ( _eRelOrient ) { case text::RelOrientation::PRINT_AREA: { - nWidth = (_rHoriOrientFrm.Prt().*fnRect->fnGetWidth)(); - nOffset = (_rHoriOrientFrm.*fnRect->fnGetLeftMargin)(); - if ( _rHoriOrientFrm.IsTextFrm() ) + nWidth = (_rHoriOrientFrame.Prt().*fnRect->fnGetWidth)(); + nOffset = (_rHoriOrientFrame.*fnRect->fnGetLeftMargin)(); + if ( _rHoriOrientFrame.IsTextFrame() ) { // consider movement of text frame left - nOffset += static_cast<const SwTextFrm&>(_rHoriOrientFrm).GetBaseOfstForFly( !_bObjWrapThrough ); + nOffset += static_cast<const SwTextFrame&>(_rHoriOrientFrame).GetBaseOfstForFly( !_bObjWrapThrough ); } - else if ( _rHoriOrientFrm.IsPageFrm() && bVert ) + else if ( _rHoriOrientFrame.IsPageFrame() && bVert ) { // for to-page anchored objects, consider header/footer frame // in vertical layout - const SwFrm* pPrtFrm = - static_cast<const SwPageFrm&>(_rHoriOrientFrm).Lower(); - while( pPrtFrm ) + const SwFrame* pPrtFrame = + static_cast<const SwPageFrame&>(_rHoriOrientFrame).Lower(); + while( pPrtFrame ) { - if( pPrtFrm->IsHeaderFrm() ) + if( pPrtFrame->IsHeaderFrame() ) { - nWidth -= pPrtFrm->Frm().Height(); - nOffset += pPrtFrm->Frm().Height(); + nWidth -= pPrtFrame->Frame().Height(); + nOffset += pPrtFrame->Frame().Height(); } - else if( pPrtFrm->IsFooterFrm() ) + else if( pPrtFrame->IsFooterFrame() ) { - nWidth -= pPrtFrm->Frm().Height(); + nWidth -= pPrtFrame->Frame().Height(); } - pPrtFrm = pPrtFrm->GetNext(); + pPrtFrame = pPrtFrame->GetNext(); } } break; @@ -597,27 +597,27 @@ void SwAnchoredObjectPosition::_GetHoriAlignmentValues( const SwFrm& _rHoriOrie case text::RelOrientation::PAGE_LEFT: { // align at left border of page frame/fly frame/cell frame - nWidth = (_rPageAlignLayFrm.*fnRect->fnGetLeftMargin)(); + nWidth = (_rPageAlignLayFrame.*fnRect->fnGetLeftMargin)(); nOffset = (*fnRect->fnXDiff)( - (_rPageAlignLayFrm.Frm().*fnRect->fnGetLeft)(), - (_rHoriOrientFrm.Frm().*fnRect->fnGetLeft)() ); + (_rPageAlignLayFrame.Frame().*fnRect->fnGetLeft)(), + (_rHoriOrientFrame.Frame().*fnRect->fnGetLeft)() ); _obAlignedRelToPage = true; } break; case text::RelOrientation::PAGE_RIGHT: { // align at right border of page frame/fly frame/cell frame - nWidth = (_rPageAlignLayFrm.*fnRect->fnGetRightMargin)(); + nWidth = (_rPageAlignLayFrame.*fnRect->fnGetRightMargin)(); nOffset = (*fnRect->fnXDiff)( - (_rPageAlignLayFrm.*fnRect->fnGetPrtRight)(), - (_rHoriOrientFrm.Frm().*fnRect->fnGetLeft)() ); + (_rPageAlignLayFrame.*fnRect->fnGetPrtRight)(), + (_rHoriOrientFrame.Frame().*fnRect->fnGetLeft)() ); _obAlignedRelToPage = true; } break; case text::RelOrientation::FRAME_LEFT: { // align at left border of anchor frame - nWidth = (_rHoriOrientFrm.*fnRect->fnGetLeftMargin)(); + nWidth = (_rHoriOrientFrame.*fnRect->fnGetLeftMargin)(); nOffset = 0; } break; @@ -625,8 +625,8 @@ void SwAnchoredObjectPosition::_GetHoriAlignmentValues( const SwFrm& _rHoriOrie { // align at right border of anchor frame // Unify and simplify - nWidth = (_rHoriOrientFrm.*fnRect->fnGetRightMargin)(); - nOffset = (_rHoriOrientFrm.Prt().*fnRect->fnGetRight)(); + nWidth = (_rHoriOrientFrame.*fnRect->fnGetRightMargin)(); + nOffset = (_rHoriOrientFrame.Prt().*fnRect->fnGetRight)(); } break; case text::RelOrientation::CHAR: @@ -638,35 +638,35 @@ void SwAnchoredObjectPosition::_GetHoriAlignmentValues( const SwFrm& _rHoriOrie nWidth = 0; nOffset = (*fnRect->fnXDiff)( (ToCharRect()->*fnRect->fnGetLeft)(), - (ToCharOrientFrm()->Frm().*fnRect->fnGetLeft)() ); + (ToCharOrientFrame()->Frame().*fnRect->fnGetLeft)() ); break; } // no break! } case text::RelOrientation::PAGE_PRINT_AREA: { - nWidth = (_rPageAlignLayFrm.Prt().*fnRect->fnGetWidth)(); + nWidth = (_rPageAlignLayFrame.Prt().*fnRect->fnGetWidth)(); nOffset = (*fnRect->fnXDiff)( - (_rPageAlignLayFrm.*fnRect->fnGetPrtLeft)(), - (_rHoriOrientFrm.Frm().*fnRect->fnGetLeft)() ); - if ( _rHoriOrientFrm.IsPageFrm() && bVert ) + (_rPageAlignLayFrame.*fnRect->fnGetPrtLeft)(), + (_rHoriOrientFrame.Frame().*fnRect->fnGetLeft)() ); + if ( _rHoriOrientFrame.IsPageFrame() && bVert ) { // for to-page anchored objects, consider header/footer frame // in vertical layout - const SwFrm* pPrtFrm = - static_cast<const SwPageFrm&>(_rHoriOrientFrm).Lower(); - while( pPrtFrm ) + const SwFrame* pPrtFrame = + static_cast<const SwPageFrame&>(_rHoriOrientFrame).Lower(); + while( pPrtFrame ) { - if( pPrtFrm->IsHeaderFrm() ) + if( pPrtFrame->IsHeaderFrame() ) { - nWidth -= pPrtFrm->Frm().Height(); - nOffset += pPrtFrm->Frm().Height(); + nWidth -= pPrtFrame->Frame().Height(); + nOffset += pPrtFrame->Frame().Height(); } - else if( pPrtFrm->IsFooterFrm() ) + else if( pPrtFrame->IsFooterFrame() ) { - nWidth -= pPrtFrm->Frm().Height(); + nWidth -= pPrtFrame->Frame().Height(); } - pPrtFrm = pPrtFrm->GetNext(); + pPrtFrame = pPrtFrame->GetNext(); } } _obAlignedRelToPage = true; @@ -674,23 +674,23 @@ void SwAnchoredObjectPosition::_GetHoriAlignmentValues( const SwFrm& _rHoriOrie } case text::RelOrientation::PAGE_FRAME: { - nWidth = (_rPageAlignLayFrm.Frm().*fnRect->fnGetWidth)(); + nWidth = (_rPageAlignLayFrame.Frame().*fnRect->fnGetWidth)(); nOffset = (*fnRect->fnXDiff)( - (_rPageAlignLayFrm.Frm().*fnRect->fnGetLeft)(), - (_rHoriOrientFrm.Frm().*fnRect->fnGetLeft)() ); + (_rPageAlignLayFrame.Frame().*fnRect->fnGetLeft)(), + (_rHoriOrientFrame.Frame().*fnRect->fnGetLeft)() ); _obAlignedRelToPage = true; break; } default: { - nWidth = (_rHoriOrientFrm.Frm().*fnRect->fnGetWidth)(); + nWidth = (_rHoriOrientFrame.Frame().*fnRect->fnGetWidth)(); // When positioning TextBoxes, always ignore flys anchored at the // text frame, as we do want to have the textbox overlap with its // draw shape. bool bIgnoreFlysAnchoredAtFrame = !_bObjWrapThrough || SwTextBoxHelper::isTextBox(&GetObject()); - nOffset = _rHoriOrientFrm.IsTextFrm() ? - static_cast<const SwTextFrm&>(_rHoriOrientFrm).GetBaseOfstForFly( bIgnoreFlysAnchoredAtFrame ) : + nOffset = _rHoriOrientFrame.IsTextFrame() ? + static_cast<const SwTextFrame&>(_rHoriOrientFrame).GetBaseOfstForFly( bIgnoreFlysAnchoredAtFrame ) : 0; break; } @@ -757,21 +757,21 @@ void SwAnchoredObjectPosition::_ToggleHoriOrientAndAlign( /** calculate relative horizontal position */ SwTwips SwAnchoredObjectPosition::_CalcRelPosX( - const SwFrm& _rHoriOrientFrm, + const SwFrame& _rHoriOrientFrame, const SwEnvironmentOfAnchoredObject& _rEnvOfObj, const SwFormatHoriOrient& _rHoriOrient, const SvxLRSpaceItem& _rLRSpacing, const SvxULSpaceItem& _rULSpacing, const bool _bObjWrapThrough, const SwTwips _nRelPosY, - SwTwips& _roHoriOffsetToFrmAnchorPos + SwTwips& _roHoriOffsetToFrameAnchorPos ) const { // determine 'page' alignment layout frame - const SwFrm& rPageAlignLayFrm = - _rEnvOfObj.GetHoriEnvironmentLayoutFrm( _rHoriOrientFrm ); + const SwFrame& rPageAlignLayFrame = + _rEnvOfObj.GetHoriEnvironmentLayoutFrame( _rHoriOrientFrame ); - const bool bEvenPage = !rPageAlignLayFrm.OnRightPage(); + const bool bEvenPage = !rPageAlignLayFrame.OnRightPage(); const bool bToggle = _rHoriOrient.IsPosToggle() && bEvenPage; // determine orientation and relative alignment @@ -786,18 +786,18 @@ SwTwips SwAnchoredObjectPosition::_CalcRelPosX( SwTwips nWidth = 0; SwTwips nOffset = 0; bool bAlignedRelToPage = false; - _GetHoriAlignmentValues( _rHoriOrientFrm, rPageAlignLayFrm, + _GetHoriAlignmentValues( _rHoriOrientFrame, rPageAlignLayFrame, eRelOrient, _bObjWrapThrough, nWidth, nOffset, bAlignedRelToPage ); - const SwFrm& rAnchorFrm = GetAnchorFrm(); - SWRECTFN( (&_rHoriOrientFrm) ) + const SwFrame& rAnchorFrame = GetAnchorFrame(); + SWRECTFN( (&_rHoriOrientFrame) ) SwTwips nObjWidth = (GetAnchoredObj().GetObjRect().*fnRect->fnGetWidth)(); SwTwips nRelPosX = nOffset; if ( _rHoriOrient.GetHoriOrient() == text::HoriOrientation::NONE ) { // 'manual' horizonal position - const bool bR2L = rAnchorFrm.IsRightToLeft(); + const bool bR2L = rAnchorFrame.IsRightToLeft(); if( IsAnchoredToChar() && text::RelOrientation::CHAR == eRelOrient ) { if( bR2L ) @@ -827,29 +827,29 @@ SwTwips SwAnchoredObjectPosition::_CalcRelPosX( // adjust relative position by distance between anchor frame and // the frame, the object is oriented at. - if ( &rAnchorFrm != &_rHoriOrientFrm ) + if ( &rAnchorFrame != &_rHoriOrientFrame ) { - SwTwips nLeftOrient = (_rHoriOrientFrm.Frm().*fnRect->fnGetLeft)(); - SwTwips nLeftAnchor = (rAnchorFrm.Frm().*fnRect->fnGetLeft)(); + SwTwips nLeftOrient = (_rHoriOrientFrame.Frame().*fnRect->fnGetLeft)(); + SwTwips nLeftAnchor = (rAnchorFrame.Frame().*fnRect->fnGetLeft)(); nRelPosX += (*fnRect->fnXDiff)( nLeftOrient, nLeftAnchor ); } // adjust calculated relative horizontal position, in order to // keep object inside 'page' alignment layout frame - const SwFrm& rEnvironmentLayFrm = - _rEnvOfObj.GetHoriEnvironmentLayoutFrm( _rHoriOrientFrm ); - nRelPosX = _AdjustHoriRelPos( rEnvironmentLayFrm, nRelPosX ); + const SwFrame& rEnvironmentLayFrame = + _rEnvOfObj.GetHoriEnvironmentLayoutFrame( _rHoriOrientFrame ); + nRelPosX = _AdjustHoriRelPos( rEnvironmentLayFrame, nRelPosX ); // if object is a Writer fly frame and it's anchored to a content and // it is horizontal positioned left or right, but not relative to character, // it has to be drawn aside another object, which have the same horizontal // position and lay below it. - if ( dynamic_cast<const SwFlyFrm*>( &GetAnchoredObj() ) != nullptr && + if ( dynamic_cast<const SwFlyFrame*>( &GetAnchoredObj() ) != nullptr && ( GetContact().ObjAnchoredAtPara() || GetContact().ObjAnchoredAtChar() ) && ( eHoriOrient == text::HoriOrientation::LEFT || eHoriOrient == text::HoriOrientation::RIGHT ) && eRelOrient != text::RelOrientation::CHAR ) { - nRelPosX = _AdjustHoriRelPosForDrawAside( _rHoriOrientFrm, + nRelPosX = _AdjustHoriRelPosForDrawAside( _rHoriOrientFrame, nRelPosX, _nRelPosY, eHoriOrient, eRelOrient, _rLRSpacing, _rULSpacing, @@ -857,7 +857,7 @@ SwTwips SwAnchoredObjectPosition::_CalcRelPosX( } // #i26791# - _roHoriOffsetToFrmAnchorPos = nOffset; + _roHoriOffsetToFrameAnchorPos = nOffset; return nRelPosX; } @@ -868,7 +868,7 @@ SwTwips SwAnchoredObjectPosition::_CalcRelPosX( aside other objects with same positioning */ SwTwips SwAnchoredObjectPosition::_AdjustHoriRelPosForDrawAside( - const SwFrm& _rHoriOrientFrm, + const SwFrame& _rHoriOrientFrame, const SwTwips _nProposedRelPosX, const SwTwips _nRelPosY, const sal_Int16 _eHoriOrient, @@ -879,24 +879,24 @@ SwTwips SwAnchoredObjectPosition::_AdjustHoriRelPosForDrawAside( ) const { // #i26791# - if ( dynamic_cast<const SwTextFrm*>( &GetAnchorFrm() ) == nullptr || - dynamic_cast<const SwFlyAtCntFrm*>( &GetAnchoredObj() ) == nullptr ) + if ( dynamic_cast<const SwTextFrame*>( &GetAnchorFrame() ) == nullptr || + dynamic_cast<const SwFlyAtContentFrame*>( &GetAnchoredObj() ) == nullptr ) { OSL_FAIL( "<SwAnchoredObjectPosition::_AdjustHoriRelPosForDrawAside(..) - usage for wrong anchor type" ); return _nProposedRelPosX; } - const SwTextFrm& rAnchorTextFrm = static_cast<const SwTextFrm&>(GetAnchorFrm()); + const SwTextFrame& rAnchorTextFrame = static_cast<const SwTextFrame&>(GetAnchorFrame()); // #i26791# - const SwFlyAtCntFrm& rFlyAtCntFrm = - static_cast<const SwFlyAtCntFrm&>(GetAnchoredObj()); + const SwFlyAtContentFrame& rFlyAtContentFrame = + static_cast<const SwFlyAtContentFrame&>(GetAnchoredObj()); const SwRect aObjBoundRect( GetAnchoredObj().GetObjRect() ); - SWRECTFN( (&_rHoriOrientFrm) ) + SWRECTFN( (&_rHoriOrientFrame) ) SwTwips nAdjustedRelPosX = _nProposedRelPosX; // determine proposed object bound rectangle - Point aTmpPos = (rAnchorTextFrm.Frm().*fnRect->fnGetPos)(); + Point aTmpPos = (rAnchorTextFrame.Frame().*fnRect->fnGetPos)(); if( bVert ) { aTmpPos.X() -= _nRelPosY + aObjBoundRect.Width(); @@ -910,11 +910,11 @@ SwTwips SwAnchoredObjectPosition::_AdjustHoriRelPosForDrawAside( SwRect aTmpObjRect( aTmpPos, aObjBoundRect.SSize() ); const sal_uInt32 nObjOrdNum = GetObject().GetOrdNum(); - const SwPageFrm* pObjPage = rFlyAtCntFrm.FindPageFrm(); - const SwFrm* pObjContext = ::FindKontext( &rAnchorTextFrm, FRM_COLUMN ); - sal_uLong nObjIndex = rAnchorTextFrm.GetTextNode()->GetIndex(); + const SwPageFrame* pObjPage = rFlyAtContentFrame.FindPageFrame(); + const SwFrame* pObjContext = ::FindKontext( &rAnchorTextFrame, FRM_COLUMN ); + sal_uLong nObjIndex = rAnchorTextFrame.GetTextNode()->GetIndex(); SwOrderIter aIter( pObjPage, true ); - const SwFlyFrm* pFly = static_cast<const SwVirtFlyDrawObj*>(aIter.Bottom())->GetFlyFrm(); + const SwFlyFrame* pFly = static_cast<const SwVirtFlyDrawObj*>(aIter.Bottom())->GetFlyFrame(); while ( pFly && nObjOrdNum > pFly->GetVirtDrawObj()->GetOrdNumDirect() ) { if ( _DrawAsideFly( pFly, aTmpObjRect, pObjContext, nObjIndex, @@ -923,19 +923,19 @@ SwTwips SwAnchoredObjectPosition::_AdjustHoriRelPosForDrawAside( if( bVert ) { const SvxULSpaceItem& rOtherUL = pFly->GetFormat()->GetULSpace(); - const SwTwips nOtherTop = pFly->Frm().Top() - rOtherUL.GetUpper(); - const SwTwips nOtherBot = pFly->Frm().Bottom() + rOtherUL.GetLower(); + const SwTwips nOtherTop = pFly->Frame().Top() - rOtherUL.GetUpper(); + const SwTwips nOtherBot = pFly->Frame().Bottom() + rOtherUL.GetLower(); if ( nOtherTop <= aTmpObjRect.Bottom() + _rULSpacing.GetLower() && nOtherBot >= aTmpObjRect.Top() - _rULSpacing.GetUpper() ) { if ( _eHoriOrient == text::HoriOrientation::LEFT ) { SwTwips nTmp = nOtherBot + 1 + _rULSpacing.GetUpper() - - rAnchorTextFrm.Frm().Top(); + rAnchorTextFrame.Frame().Top(); if ( nTmp > nAdjustedRelPosX && - rAnchorTextFrm.Frm().Top() + nTmp + + rAnchorTextFrame.Frame().Top() + nTmp + aObjBoundRect.Height() + _rULSpacing.GetLower() - <= pObjPage->Frm().Height() + pObjPage->Frm().Top() ) + <= pObjPage->Frame().Height() + pObjPage->Frame().Top() ) { nAdjustedRelPosX = nTmp; } @@ -944,34 +944,34 @@ SwTwips SwAnchoredObjectPosition::_AdjustHoriRelPosForDrawAside( { SwTwips nTmp = nOtherTop - 1 - _rULSpacing.GetLower() - aObjBoundRect.Height() - - rAnchorTextFrm.Frm().Top(); + rAnchorTextFrame.Frame().Top(); if ( nTmp < nAdjustedRelPosX && - rAnchorTextFrm.Frm().Top() + nTmp - _rULSpacing.GetUpper() - >= pObjPage->Frm().Top() ) + rAnchorTextFrame.Frame().Top() + nTmp - _rULSpacing.GetUpper() + >= pObjPage->Frame().Top() ) { nAdjustedRelPosX = nTmp; } } - aTmpObjRect.Pos().Y() = rAnchorTextFrm.Frm().Top() + + aTmpObjRect.Pos().Y() = rAnchorTextFrame.Frame().Top() + nAdjustedRelPosX; } } else { const SvxLRSpaceItem& rOtherLR = pFly->GetFormat()->GetLRSpace(); - const SwTwips nOtherLeft = pFly->Frm().Left() - rOtherLR.GetLeft(); - const SwTwips nOtherRight = pFly->Frm().Right() + rOtherLR.GetRight(); + const SwTwips nOtherLeft = pFly->Frame().Left() - rOtherLR.GetLeft(); + const SwTwips nOtherRight = pFly->Frame().Right() + rOtherLR.GetRight(); if( nOtherLeft <= aTmpObjRect.Right() + _rLRSpacing.GetRight() && nOtherRight >= aTmpObjRect.Left() - _rLRSpacing.GetLeft() ) { if ( _eHoriOrient == text::HoriOrientation::LEFT ) { SwTwips nTmp = nOtherRight + 1 + _rLRSpacing.GetLeft() - - rAnchorTextFrm.Frm().Left(); + rAnchorTextFrame.Frame().Left(); if ( nTmp > nAdjustedRelPosX && - rAnchorTextFrm.Frm().Left() + nTmp + + rAnchorTextFrame.Frame().Left() + nTmp + aObjBoundRect.Width() + _rLRSpacing.GetRight() - <= pObjPage->Frm().Width() + pObjPage->Frm().Left() ) + <= pObjPage->Frame().Width() + pObjPage->Frame().Left() ) { nAdjustedRelPosX = nTmp; } @@ -980,21 +980,21 @@ SwTwips SwAnchoredObjectPosition::_AdjustHoriRelPosForDrawAside( { SwTwips nTmp = nOtherLeft - 1 - _rLRSpacing.GetRight() - aObjBoundRect.Width() - - rAnchorTextFrm.Frm().Left(); + rAnchorTextFrame.Frame().Left(); if ( nTmp < nAdjustedRelPosX && - rAnchorTextFrm.Frm().Left() + nTmp - _rLRSpacing.GetLeft() - >= pObjPage->Frm().Left() ) + rAnchorTextFrame.Frame().Left() + nTmp - _rLRSpacing.GetLeft() + >= pObjPage->Frame().Left() ) { nAdjustedRelPosX = nTmp; } } - aTmpObjRect.Pos().X() = rAnchorTextFrm.Frm().Left() + + aTmpObjRect.Pos().X() = rAnchorTextFrame.Frame().Left() + nAdjustedRelPosX; } } // end of <if (bVert)> } // end of <if _DrawAsideFly(..)> - pFly = static_cast<const SwVirtFlyDrawObj*>(aIter.Next())->GetFlyFrm(); + pFly = static_cast<const SwVirtFlyDrawObj*>(aIter.Next())->GetFlyFrame(); } // end of <loop on fly frames return nAdjustedRelPosX; @@ -1004,9 +1004,9 @@ SwTwips SwAnchoredObjectPosition::_AdjustHoriRelPosForDrawAside( method used by <_AdjustHoriRelPosForDrawAside(..)> */ -bool SwAnchoredObjectPosition::_DrawAsideFly( const SwFlyFrm* _pFly, +bool SwAnchoredObjectPosition::_DrawAsideFly( const SwFlyFrame* _pFly, const SwRect& _rObjRect, - const SwFrm* _pObjContext, + const SwFrame* _pObjContext, const sal_uLong _nObjIndex, const bool _bEvenPage, const sal_Int16 _eHoriOrient, @@ -1015,15 +1015,15 @@ bool SwAnchoredObjectPosition::_DrawAsideFly( const SwFlyFrm* _pFly, { bool bRetVal = false; - SWRECTFN( (&GetAnchorFrm()) ) + SWRECTFN( (&GetAnchorFrame()) ) - if ( _pFly->IsFlyAtCntFrm() && - (_pFly->Frm().*fnRect->fnBottomDist)( (_rObjRect.*fnRect->fnGetTop)() ) < 0 && - (_rObjRect.*fnRect->fnBottomDist)( (_pFly->Frm().*fnRect->fnGetTop)() ) < 0 && - ::FindKontext( _pFly->GetAnchorFrm(), FRM_COLUMN ) == _pObjContext ) + if ( _pFly->IsFlyAtContentFrame() && + (_pFly->Frame().*fnRect->fnBottomDist)( (_rObjRect.*fnRect->fnGetTop)() ) < 0 && + (_rObjRect.*fnRect->fnBottomDist)( (_pFly->Frame().*fnRect->fnGetTop)() ) < 0 && + ::FindKontext( _pFly->GetAnchorFrame(), FRM_COLUMN ) == _pObjContext ) { sal_uLong nOtherIndex = - static_cast<const SwTextFrm*>(_pFly->GetAnchorFrm())->GetTextNode()->GetIndex(); + static_cast<const SwTextFrame*>(_pFly->GetAnchorFrame())->GetTextNode()->GetIndex(); if( _nObjIndex >= nOtherIndex ) { const SwFormatHoriOrient& rHori = _pFly->GetFormat()->GetHoriOrient(); diff --git a/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx b/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx index 6685a8a1d54e..3082bb50e8e5 100644 --- a/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx @@ -60,13 +60,13 @@ SwAsCharAnchoredObjectPosition::SwAsCharAnchoredObjectPosition( SwAsCharAnchoredObjectPosition::~SwAsCharAnchoredObjectPosition() {} -/** method to cast <SwAnchoredObjectPosition::GetAnchorFrm()> to needed type */ -const SwTextFrm& SwAsCharAnchoredObjectPosition::GetAnchorTextFrm() const +/** method to cast <SwAnchoredObjectPosition::GetAnchorFrame()> to needed type */ +const SwTextFrame& SwAsCharAnchoredObjectPosition::GetAnchorTextFrame() const { - OSL_ENSURE( dynamic_cast<const SwTextFrm*>( &GetAnchorFrm() ) != nullptr, - "SwAsCharAnchoredObjectPosition::GetAnchorTextFrm() - wrong anchor frame type" ); + OSL_ENSURE( dynamic_cast<const SwTextFrame*>( &GetAnchorFrame() ) != nullptr, + "SwAsCharAnchoredObjectPosition::GetAnchorTextFrame() - wrong anchor frame type" ); - return static_cast<const SwTextFrm&>(GetAnchorFrm()); + return static_cast<const SwTextFrame&>(GetAnchorFrame()); } /** calculate position for object @@ -78,11 +78,11 @@ const SwTextFrm& SwAsCharAnchoredObjectPosition::GetAnchorTextFrm() const */ void SwAsCharAnchoredObjectPosition::CalcPosition() { - const SwTextFrm& rAnchorFrm = GetAnchorTextFrm(); + const SwTextFrame& rAnchorFrame = GetAnchorTextFrame(); // swap anchor frame, if swapped. Note: destructor takes care of the 'undo' - SwFrmSwapper aFrmSwapper( &rAnchorFrm, false ); + SwFrameSwapper aFrameSwapper( &rAnchorFrame, false ); - SWRECTFN( ( &rAnchorFrm ) ) + SWRECTFN( ( &rAnchorFrame ) ) Point aAnchorPos( mrProposedAnchorPos ); @@ -96,12 +96,12 @@ void SwAsCharAnchoredObjectPosition::CalcPosition() const SvxULSpaceItem& rULSpace = rFrameFormat.GetULSpace(); SwTwips nLRSpaceLeft, nLRSpaceRight, nULSpaceUpper, nULSpaceLower; { - if ( rAnchorFrm.IsVertical() ) + if ( rAnchorFrame.IsVertical() ) { // Seems to be easier to do it all the horizontal way // So, from now on think horizontal. - rAnchorFrm.SwitchVerticalToHorizontal( aObjBoundRect ); - rAnchorFrm.SwitchVerticalToHorizontal( aAnchorPos ); + rAnchorFrame.SwitchVerticalToHorizontal( aObjBoundRect ); + rAnchorFrame.SwitchVerticalToHorizontal( aAnchorPos ); // convert the spacing values nLRSpaceLeft = rULSpace.GetUpper(); @@ -111,7 +111,7 @@ void SwAsCharAnchoredObjectPosition::CalcPosition() } else { - if ( rAnchorFrm.IsRightToLeft() ) + if ( rAnchorFrame.IsRightToLeft() ) { nLRSpaceLeft = rLRSpace.GetRight(); nLRSpaceRight = rLRSpace.GetLeft(); @@ -141,9 +141,9 @@ void SwAsCharAnchoredObjectPosition::CalcPosition() if( !IsObjFly() ) { SwRect aSnapRect = GetObject().GetSnapRect(); - if ( rAnchorFrm.IsVertical() ) + if ( rAnchorFrame.IsVertical() ) { - rAnchorFrm.SwitchVerticalToHorizontal( aSnapRect ); + rAnchorFrame.SwitchVerticalToHorizontal( aSnapRect ); } if( mnFlags & AS_CHAR_ULSPACE ) @@ -222,13 +222,13 @@ void SwAsCharAnchoredObjectPosition::CalcPosition() // Note: Use copy of <aAnchorPos>, because it's needed for // setting relative position. Point aAbsAnchorPos( aAnchorPos ); - if ( rAnchorFrm.IsRightToLeft() ) + if ( rAnchorFrame.IsRightToLeft() ) { - rAnchorFrm.SwitchLTRtoRTL( aAbsAnchorPos ); + rAnchorFrame.SwitchLTRtoRTL( aAbsAnchorPos ); aAbsAnchorPos.X() -= nObjWidth; } - if ( rAnchorFrm.IsVertical() ) - rAnchorFrm.SwitchHorizontalToVertical( aAbsAnchorPos ); + if ( rAnchorFrame.IsVertical() ) + rAnchorFrame.SwitchHorizontalToVertical( aAbsAnchorPos ); // set proposed anchor position at the drawing object. // OD 2004-04-06 #i26791# - distinction between 'master' drawing @@ -238,16 +238,16 @@ void SwAsCharAnchoredObjectPosition::CalcPosition() // move drawing object to set its correct relative position. { SwRect aSnapRect = GetObject().GetSnapRect(); - if ( rAnchorFrm.IsVertical() ) - rAnchorFrm.SwitchVerticalToHorizontal( aSnapRect ); + if ( rAnchorFrame.IsVertical() ) + rAnchorFrame.SwitchVerticalToHorizontal( aSnapRect ); Point aDiff; - if ( rAnchorFrm.IsRightToLeft() ) + if ( rAnchorFrame.IsRightToLeft() ) aDiff = aRelPos + aAbsAnchorPos - aSnapRect.TopLeft(); else aDiff = aRelPos + aAnchorPos - aSnapRect.TopLeft(); - if ( rAnchorFrm.IsVertical() ) + if ( rAnchorFrame.IsVertical() ) aDiff = Point( -aDiff.Y(), aDiff.X() ); // OD 2004-04-06 #i26791# - distinction between 'master' drawing @@ -257,13 +257,13 @@ void SwAsCharAnchoredObjectPosition::CalcPosition() } // switch horizontal, LTR anchor position to absolute values. - if ( rAnchorFrm.IsRightToLeft() ) + if ( rAnchorFrame.IsRightToLeft() ) { - rAnchorFrm.SwitchLTRtoRTL( aAnchorPos ); + rAnchorFrame.SwitchLTRtoRTL( aAnchorPos ); aAnchorPos.X() -= nObjWidth; } - if ( rAnchorFrm.IsVertical() ) - rAnchorFrm.SwitchHorizontalToVertical( aAnchorPos ); + if ( rAnchorFrame.IsVertical() ) + rAnchorFrame.SwitchHorizontalToVertical( aAnchorPos ); // #i44347# - keep last object rectangle at anchored object OSL_ENSURE( dynamic_cast<const SwAnchoredDrawObject*>( &GetAnchoredObj() ) != nullptr, @@ -278,14 +278,14 @@ void SwAsCharAnchoredObjectPosition::CalcPosition() // relative position and its relative position attribute. // Note: The relative position contains the spacing values. Point aRelAttr; - if ( rAnchorFrm.IsRightToLeft() ) + if ( rAnchorFrame.IsRightToLeft() ) { - rAnchorFrm.SwitchLTRtoRTL( aAnchorPos ); + rAnchorFrame.SwitchLTRtoRTL( aAnchorPos ); aAnchorPos.X() -= nObjWidth; } - if ( rAnchorFrm.IsVertical() ) + if ( rAnchorFrame.IsVertical() ) { - rAnchorFrm.SwitchHorizontalToVertical( aAnchorPos ); + rAnchorFrame.SwitchHorizontalToVertical( aAnchorPos ); aRelAttr = Point( -nRelPos, 0 ); aRelPos = Point( -aRelPos.Y(), aRelPos.X() ); } @@ -293,18 +293,18 @@ void SwAsCharAnchoredObjectPosition::CalcPosition() aRelAttr = Point( 0, nRelPos ); // OD 2004-03-23 #i26791# - OSL_ENSURE( dynamic_cast<const SwFlyInCntFrm*>( &GetAnchoredObj()) != nullptr, + OSL_ENSURE( dynamic_cast<const SwFlyInContentFrame*>( &GetAnchoredObj()) != nullptr, "<SwAsCharAnchoredObjectPosition::CalcPosition()> - wrong anchored object." ); - const SwFlyInCntFrm& rFlyInCntFrm = - static_cast<const SwFlyInCntFrm&>(GetAnchoredObj()); + const SwFlyInContentFrame& rFlyInContentFrame = + static_cast<const SwFlyInContentFrame&>(GetAnchoredObj()); if ( !(mnFlags & AS_CHAR_QUICK) && - ( aAnchorPos != rFlyInCntFrm.GetRefPoint() || - aRelAttr != rFlyInCntFrm.GetCurrRelPos() ) ) + ( aAnchorPos != rFlyInContentFrame.GetRefPoint() || + aRelAttr != rFlyInContentFrame.GetCurrRelPos() ) ) { // set new anchor position and relative position - SwFlyInCntFrm* pFlyInCntFrm = &(const_cast<SwFlyInCntFrm&>(rFlyInCntFrm)); - pFlyInCntFrm->SetRefPoint( aAnchorPos, aRelAttr, aRelPos ); - if( nObjWidth != (pFlyInCntFrm->Frm().*fnRect->fnGetWidth)() ) + SwFlyInContentFrame* pFlyInContentFrame = &(const_cast<SwFlyInContentFrame&>(rFlyInContentFrame)); + pFlyInContentFrame->SetRefPoint( aAnchorPos, aRelAttr, aRelPos ); + if( nObjWidth != (pFlyInContentFrame->Frame().*fnRect->fnGetWidth)() ) { // recalculate object bound rectangle, if object width has changed. aObjBoundRect = GetAnchoredObj().GetObjRect(); @@ -314,7 +314,7 @@ void SwAsCharAnchoredObjectPosition::CalcPosition() aObjBoundRect.Height( aObjBoundRect.Height() + rULSpace.GetLower() ); } } - OSL_ENSURE( (rFlyInCntFrm.Frm().*fnRect->fnGetHeight)(), + OSL_ENSURE( (rFlyInContentFrame.Frame().*fnRect->fnGetHeight)(), "SwAnchoredObjectPosition::CalcPosition(..) - fly frame has an invalid height" ); } diff --git a/sw/source/core/objectpositioning/environmentofanchoredobject.cxx b/sw/source/core/objectpositioning/environmentofanchoredobject.cxx index 46c4818f0319..8e00bf3c592e 100644 --- a/sw/source/core/objectpositioning/environmentofanchoredobject.cxx +++ b/sw/source/core/objectpositioning/environmentofanchoredobject.cxx @@ -33,67 +33,67 @@ SwEnvironmentOfAnchoredObject::~SwEnvironmentOfAnchoredObject() {} /** determine environment layout frame for possible horizontal object positions */ -const SwLayoutFrm& SwEnvironmentOfAnchoredObject::GetHoriEnvironmentLayoutFrm( - const SwFrm& _rHoriOrientFrm ) const +const SwLayoutFrame& SwEnvironmentOfAnchoredObject::GetHoriEnvironmentLayoutFrame( + const SwFrame& _rHoriOrientFrame ) const { - const SwFrm* pHoriEnvironmentLayFrm = &_rHoriOrientFrm; + const SwFrame* pHoriEnvironmentLayFrame = &_rHoriOrientFrame; if ( !mbFollowTextFlow ) { // No exception any more for page alignment. // the page frame determines the horizontal layout environment. - pHoriEnvironmentLayFrm = _rHoriOrientFrm.FindPageFrm(); + pHoriEnvironmentLayFrame = _rHoriOrientFrame.FindPageFrame(); } else { - while ( !pHoriEnvironmentLayFrm->IsCellFrm() && - !pHoriEnvironmentLayFrm->IsFlyFrm() && - !pHoriEnvironmentLayFrm->IsPageFrm() ) + while ( !pHoriEnvironmentLayFrame->IsCellFrame() && + !pHoriEnvironmentLayFrame->IsFlyFrame() && + !pHoriEnvironmentLayFrame->IsPageFrame() ) { - pHoriEnvironmentLayFrm = pHoriEnvironmentLayFrm->GetUpper(); - OSL_ENSURE( pHoriEnvironmentLayFrm, - "SwEnvironmentOfAnchoredObject::GetHoriEnvironmentLayoutFrm(..) - no page|fly|cell frame found" ); + pHoriEnvironmentLayFrame = pHoriEnvironmentLayFrame->GetUpper(); + OSL_ENSURE( pHoriEnvironmentLayFrame, + "SwEnvironmentOfAnchoredObject::GetHoriEnvironmentLayoutFrame(..) - no page|fly|cell frame found" ); } } - OSL_ENSURE( dynamic_cast< const SwLayoutFrm *>( pHoriEnvironmentLayFrm ) != nullptr, - "SwEnvironmentOfAnchoredObject::GetHoriEnvironmentLayoutFrm(..) - found frame isn't a layout frame" ); + OSL_ENSURE( dynamic_cast< const SwLayoutFrame *>( pHoriEnvironmentLayFrame ) != nullptr, + "SwEnvironmentOfAnchoredObject::GetHoriEnvironmentLayoutFrame(..) - found frame isn't a layout frame" ); - return static_cast<const SwLayoutFrm&>(*pHoriEnvironmentLayFrm); + return static_cast<const SwLayoutFrame&>(*pHoriEnvironmentLayFrame); } /** determine environment layout frame for possible vertical object positions */ -const SwLayoutFrm& SwEnvironmentOfAnchoredObject::GetVertEnvironmentLayoutFrm( - const SwFrm& _rVertOrientFrm ) const +const SwLayoutFrame& SwEnvironmentOfAnchoredObject::GetVertEnvironmentLayoutFrame( + const SwFrame& _rVertOrientFrame ) const { - const SwFrm* pVertEnvironmentLayFrm = &_rVertOrientFrm; + const SwFrame* pVertEnvironmentLayFrame = &_rVertOrientFrame; if ( !mbFollowTextFlow ) { // No exception any more for page alignment. // the page frame determines the vertical layout environment. - pVertEnvironmentLayFrm = _rVertOrientFrm.FindPageFrm(); + pVertEnvironmentLayFrame = _rVertOrientFrame.FindPageFrame(); } else { - while ( !pVertEnvironmentLayFrm->IsCellFrm() && - !pVertEnvironmentLayFrm->IsFlyFrm() && - !pVertEnvironmentLayFrm->IsHeaderFrm() && - !pVertEnvironmentLayFrm->IsFooterFrm() && - !pVertEnvironmentLayFrm->IsFootnoteFrm() && - !pVertEnvironmentLayFrm->IsPageBodyFrm() && - !pVertEnvironmentLayFrm->IsPageFrm() ) + while ( !pVertEnvironmentLayFrame->IsCellFrame() && + !pVertEnvironmentLayFrame->IsFlyFrame() && + !pVertEnvironmentLayFrame->IsHeaderFrame() && + !pVertEnvironmentLayFrame->IsFooterFrame() && + !pVertEnvironmentLayFrame->IsFootnoteFrame() && + !pVertEnvironmentLayFrame->IsPageBodyFrame() && + !pVertEnvironmentLayFrame->IsPageFrame() ) { - pVertEnvironmentLayFrm = pVertEnvironmentLayFrm->GetUpper(); - OSL_ENSURE( pVertEnvironmentLayFrm, - "SwEnvironmentOfAnchoredObject::GetVertEnvironmentLayoutFrm(..) - proposed frame not found" ); + pVertEnvironmentLayFrame = pVertEnvironmentLayFrame->GetUpper(); + OSL_ENSURE( pVertEnvironmentLayFrame, + "SwEnvironmentOfAnchoredObject::GetVertEnvironmentLayoutFrame(..) - proposed frame not found" ); } } - OSL_ENSURE( dynamic_cast< const SwLayoutFrm *>( pVertEnvironmentLayFrm ) != nullptr, - "SwEnvironmentOfAnchoredObject::GetVertEnvironmentLayoutFrm(..) - found frame isn't a layout frame" ); + OSL_ENSURE( dynamic_cast< const SwLayoutFrame *>( pVertEnvironmentLayFrame ) != nullptr, + "SwEnvironmentOfAnchoredObject::GetVertEnvironmentLayoutFrame(..) - found frame isn't a layout frame" ); - return static_cast<const SwLayoutFrm&>(*pVertEnvironmentLayFrm); + return static_cast<const SwLayoutFrame&>(*pVertEnvironmentLayFrame); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx index a99c16c022f1..f51d0612dad6 100644 --- a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx @@ -47,11 +47,11 @@ using namespace ::com::sun::star; SwToContentAnchoredObjectPosition::SwToContentAnchoredObjectPosition( SdrObject& _rDrawObj ) : SwAnchoredObjectPosition ( _rDrawObj ), - mpVertPosOrientFrm( nullptr ), + mpVertPosOrientFrame( nullptr ), // #i26791# - maOffsetToFrmAnchorPos( Point() ), + maOffsetToFrameAnchorPos( Point() ), mbAnchorToChar ( false ), - mpToCharOrientFrm( nullptr ), + mpToCharOrientFrame( nullptr ), mpToCharRect( nullptr ), // #i22341# mnToCharTopOfLine( 0 ) @@ -65,9 +65,9 @@ bool SwToContentAnchoredObjectPosition::IsAnchoredToChar() const return mbAnchorToChar; } -const SwFrm* SwToContentAnchoredObjectPosition::ToCharOrientFrm() const +const SwFrame* SwToContentAnchoredObjectPosition::ToCharOrientFrame() const { - return mpToCharOrientFrm; + return mpToCharOrientFrame; } const SwRect* SwToContentAnchoredObjectPosition::ToCharRect() const @@ -81,21 +81,21 @@ SwTwips SwToContentAnchoredObjectPosition::ToCharTopOfLine() const return mnToCharTopOfLine; } -SwTextFrm& SwToContentAnchoredObjectPosition::GetAnchorTextFrm() const +SwTextFrame& SwToContentAnchoredObjectPosition::GetAnchorTextFrame() const { - OSL_ENSURE( dynamic_cast<const SwTextFrm*>( &GetAnchorFrm()) != nullptr , - "SwToContentAnchoredObjectPosition::GetAnchorTextFrm() - wrong anchor frame type" ); + OSL_ENSURE( dynamic_cast<const SwTextFrame*>( &GetAnchorFrame()) != nullptr , + "SwToContentAnchoredObjectPosition::GetAnchorTextFrame() - wrong anchor frame type" ); - return static_cast<SwTextFrm&>(GetAnchorFrm()); + return static_cast<SwTextFrame&>(GetAnchorFrame()); } // #i23512# static bool lcl_DoesVertPosFits( const SwTwips _nRelPosY, const SwTwips _nAvail, - const SwLayoutFrm* _pUpperOfOrientFrm, + const SwLayoutFrame* _pUpperOfOrientFrame, const bool _bBrowse, const bool _bGrowInTable, - SwLayoutFrm*& _orpLayoutFrmToGrow ) + SwLayoutFrame*& _orpLayoutFrameToGrow ) { bool bVertPosFits = false; @@ -105,30 +105,30 @@ static bool lcl_DoesVertPosFits( const SwTwips _nRelPosY, } else if ( _bBrowse ) { - if ( _pUpperOfOrientFrm->IsInSct() ) + if ( _pUpperOfOrientFrame->IsInSct() ) { - SwSectionFrm* pSctFrm = - const_cast<SwSectionFrm*>(_pUpperOfOrientFrm->FindSctFrm()); - bVertPosFits = pSctFrm->GetUpper()->Grow( _nRelPosY - _nAvail, true ) > 0; + SwSectionFrame* pSctFrame = + const_cast<SwSectionFrame*>(_pUpperOfOrientFrame->FindSctFrame()); + bVertPosFits = pSctFrame->GetUpper()->Grow( _nRelPosY - _nAvail, true ) > 0; // Note: do not provide a layout frame for a grow. } else { - bVertPosFits = const_cast<SwLayoutFrm*>(_pUpperOfOrientFrm)-> + bVertPosFits = const_cast<SwLayoutFrame*>(_pUpperOfOrientFrame)-> Grow( _nRelPosY - _nAvail, true ) > 0; if ( bVertPosFits ) - _orpLayoutFrmToGrow = const_cast<SwLayoutFrm*>(_pUpperOfOrientFrm); + _orpLayoutFrameToGrow = const_cast<SwLayoutFrame*>(_pUpperOfOrientFrame); } } - else if ( _pUpperOfOrientFrm->IsInTab() && _bGrowInTable ) + else if ( _pUpperOfOrientFrame->IsInTab() && _bGrowInTable ) { // #i45085# - check, if upper frame would grow the // excepted amount of twips. - const SwTwips nTwipsGrown = const_cast<SwLayoutFrm*>(_pUpperOfOrientFrm)-> + const SwTwips nTwipsGrown = const_cast<SwLayoutFrame*>(_pUpperOfOrientFrame)-> Grow( _nRelPosY - _nAvail, true ); bVertPosFits = ( nTwipsGrown == ( _nRelPosY - _nAvail ) ); if ( bVertPosFits ) - _orpLayoutFrmToGrow = const_cast<SwLayoutFrm*>(_pUpperOfOrientFrm); + _orpLayoutFrameToGrow = const_cast<SwLayoutFrame*>(_pUpperOfOrientFrame); } return bVertPosFits; @@ -141,16 +141,16 @@ void SwToContentAnchoredObjectPosition::CalcPosition() // declare and set <pFooter> to footer frame, if object is anchored // at a frame belonging to the footer. - const SwFrm* pFooter = GetAnchorFrm().FindFooterOrHeader(); - if ( pFooter && !pFooter->IsFooterFrm() ) + const SwFrame* pFooter = GetAnchorFrame().FindFooterOrHeader(); + if ( pFooter && !pFooter->IsFooterFrame() ) pFooter = nullptr; // declare and set <bBrowse> to true, if document is in browser mode and // object is anchored at the body, but not at frame belonging to a table. - bool bBrowse = GetAnchorFrm().IsInDocBody() && !GetAnchorFrm().IsInTab(); + bool bBrowse = GetAnchorFrame().IsInDocBody() && !GetAnchorFrame().IsInTab(); if( bBrowse ) { - const SwViewShell *pSh = GetAnchorFrm().getRootFrm()->GetCurrShell(); + const SwViewShell *pSh = GetAnchorFrame().getRootFrame()->GetCurrShell(); if( !pSh || !pSh->GetViewOptions()->getBrowseMode() ) bBrowse = false; } @@ -169,12 +169,12 @@ void SwToContentAnchoredObjectPosition::CalcPosition() // #i18732# - grow only, if object has to follow the text flow const bool bGrow = DoesObjFollowsTextFlow() && - ( !GetAnchorFrm().IsInTab() || - !rFrameFormat.GetFrmSize().GetHeightPercent() ); + ( !GetAnchorFrame().IsInTab() || + !rFrameFormat.GetFrameSize().GetHeightPercent() ); // get text frame the object is anchored at - const SwTextFrm& rAnchorTextFrm = GetAnchorTextFrm(); - SWRECTFN( (&rAnchorTextFrm) ) + const SwTextFrame& rAnchorTextFrame = GetAnchorTextFrame(); + SWRECTFN( (&rAnchorTextFrame) ) const SwRect aObjBoundRect( GetAnchoredObj().GetObjRect() ); @@ -185,11 +185,11 @@ void SwToContentAnchoredObjectPosition::CalcPosition() SwTwips nRelDiff = 0; - bool bMoveable = rAnchorTextFrm.IsMoveable(); + bool bMoveable = rAnchorTextFrame.IsMoveable(); // determine frame the object position has to be oriented at. - const SwTextFrm* pOrientFrm = &rAnchorTextFrm; - const SwTextFrm* pAnchorFrmForVertPos = &rAnchorTextFrm; + const SwTextFrame* pOrientFrame = &rAnchorTextFrame; + const SwTextFrame* pAnchorFrameForVertPos = &rAnchorTextFrame; { // if object is at-character anchored, determine character-rectangle // and frame, position has to be oriented at. @@ -211,10 +211,10 @@ void SwToContentAnchoredObjectPosition::CalcPosition() !GetAnchoredObj().GetLastCharRect().Width() ) || !GetAnchoredObj().GetLastTopOfLine() ) { - // Get default for <mpVertPosOrientFrm>, if it's not set. - if ( !mpVertPosOrientFrm ) + // Get default for <mpVertPosOrientFrame>, if it's not set. + if ( !mpVertPosOrientFrame ) { - mpVertPosOrientFrm = rAnchorTextFrm.GetUpper(); + mpVertPosOrientFrame = rAnchorTextFrame.GetUpper(); } return; } @@ -222,12 +222,12 @@ void SwToContentAnchoredObjectPosition::CalcPosition() mpToCharRect = &(GetAnchoredObj().GetLastCharRect()); // #i22341# - get top of line, in which the anchor character is. mnToCharTopOfLine = GetAnchoredObj().GetLastTopOfLine(); - pOrientFrm = &(const_cast<SwTextFrm&>(rAnchorTextFrm).GetFrmAtOfst( + pOrientFrame = &(const_cast<SwTextFrame&>(rAnchorTextFrame).GetFrameAtOfst( rAnch.GetContentAnchor()->nContent.GetIndex() ) ); - mpToCharOrientFrm = pOrientFrm; + mpToCharOrientFrame = pOrientFrame; } } - SWREFRESHFN( pOrientFrm ) + SWREFRESHFN( pOrientFrame ) // determine vertical position { @@ -237,8 +237,8 @@ void SwToContentAnchoredObjectPosition::CalcPosition() // #i18732# - determine layout frame for vertical // positions aligned to 'page areas'. - const SwLayoutFrm& rPageAlignLayFrm = - aEnvOfObj.GetVertEnvironmentLayoutFrm( *pOrientFrm ); + const SwLayoutFrame& rPageAlignLayFrame = + aEnvOfObj.GetVertEnvironmentLayoutFrame( *pOrientFrame ); if ( aVert.GetVertOrient() != text::VertOrientation::NONE ) { @@ -246,7 +246,7 @@ void SwToContentAnchoredObjectPosition::CalcPosition() // AND vertical alignment at 'page areas'. SwTwips nAlignAreaHeight; SwTwips nAlignAreaOffset; - _GetVertAlignmentValues( *pOrientFrm, rPageAlignLayFrm, + _GetVertAlignmentValues( *pOrientFrame, rPageAlignLayFrame, aVert.GetRelationOrient(), nAlignAreaHeight, nAlignAreaOffset ); @@ -376,26 +376,26 @@ void SwToContentAnchoredObjectPosition::CalcPosition() // the frame, the object is oriented at. // #i28701# - correction: adjust relative position, // only if the floating screen object has to follow the text flow. - if ( DoesObjFollowsTextFlow() && pOrientFrm != &rAnchorTextFrm ) + if ( DoesObjFollowsTextFlow() && pOrientFrame != &rAnchorTextFrame ) { // #i11860# - use new method <_GetTopForObjPos> // to get top of frame for object positioning. - const SwTwips nTopOfOrient = _GetTopForObjPos( *pOrientFrm, fnRect, bVert ); + const SwTwips nTopOfOrient = _GetTopForObjPos( *pOrientFrame, fnRect, bVert ); nRelPosY += (*fnRect->fnYDiff)( nTopOfOrient, - _GetTopForObjPos( rAnchorTextFrm, fnRect, bVert ) ); + _GetTopForObjPos( rAnchorTextFrame, fnRect, bVert ) ); } // #i42124# - capture object inside vertical // layout environment. { const SwTwips nTopOfAnch = - _GetTopForObjPos( *pOrientFrm, fnRect, bVert ); - const SwLayoutFrm& rVertEnvironLayFrm = - aEnvOfObj.GetVertEnvironmentLayoutFrm( - *(pOrientFrm->GetUpper()) ); + _GetTopForObjPos( *pOrientFrame, fnRect, bVert ); + const SwLayoutFrame& rVertEnvironLayFrame = + aEnvOfObj.GetVertEnvironmentLayoutFrame( + *(pOrientFrame->GetUpper()) ); const bool bCheckBottom = !DoesObjFollowsTextFlow(); nRelPosY = _AdjustVertRelPos( nTopOfAnch, bVert, bVertL2R, - rVertEnvironLayFrm, nRelPosY, + rVertEnvironLayFrame, nRelPosY, DoesObjFollowsTextFlow(), bCheckBottom ); } @@ -421,52 +421,52 @@ void SwToContentAnchoredObjectPosition::CalcPosition() if ( bVert ) { aRelPos.X() = nRelPosY; - maOffsetToFrmAnchorPos.X() = nAlignAreaOffset; + maOffsetToFrameAnchorPos.X() = nAlignAreaOffset; } else { aRelPos.Y() = nRelPosY; - maOffsetToFrmAnchorPos.Y() = nAlignAreaOffset; + maOffsetToFrameAnchorPos.Y() = nAlignAreaOffset; } } // Determine upper of frame vertical position is oriented at. // #i28701# - determine 'virtual' anchor frame. // This frame is used in the following instead of the 'real' anchor - // frame <rAnchorTextFrm> for the 'vertical' position in all cases. - const SwLayoutFrm* pUpperOfOrientFrm = nullptr; + // frame <rAnchorTextFrame> for the 'vertical' position in all cases. + const SwLayoutFrame* pUpperOfOrientFrame = nullptr; { // #i28701# - As long as the anchor frame is on the - // same page as <pOrientFrm> and the vertical position isn't aligned + // same page as <pOrientFrame> and the vertical position isn't aligned // automatic at the anchor character or the top of the line of the // anchor character, the anchor frame determines the vertical position. - if ( &rAnchorTextFrm == pOrientFrm || - ( rAnchorTextFrm.FindPageFrm() == pOrientFrm->FindPageFrm() && + if ( &rAnchorTextFrame == pOrientFrame || + ( rAnchorTextFrame.FindPageFrame() == pOrientFrame->FindPageFrame() && aVert.GetVertOrient() == text::VertOrientation::NONE && aVert.GetRelationOrient() != text::RelOrientation::CHAR && aVert.GetRelationOrient() != text::RelOrientation::TEXT_LINE ) ) { - pUpperOfOrientFrm = rAnchorTextFrm.GetUpper(); - pAnchorFrmForVertPos = &rAnchorTextFrm; + pUpperOfOrientFrame = rAnchorTextFrame.GetUpper(); + pAnchorFrameForVertPos = &rAnchorTextFrame; } else { - pUpperOfOrientFrm = pOrientFrm->GetUpper(); - pAnchorFrmForVertPos = pOrientFrm; + pUpperOfOrientFrame = pOrientFrame->GetUpper(); + pAnchorFrameForVertPos = pOrientFrame; } } // ignore one-column sections. // #i23512# - correction: also ignore one-columned // sections with footnotes/endnotes - if ( pUpperOfOrientFrm->IsInSct() ) + if ( pUpperOfOrientFrame->IsInSct() ) { - const SwSectionFrm* pSctFrm = pUpperOfOrientFrm->FindSctFrm(); - const bool bIgnoreSection = pUpperOfOrientFrm->IsSctFrm() || - ( pSctFrm->Lower()->IsColumnFrm() && - !pSctFrm->Lower()->GetNext() ); + const SwSectionFrame* pSctFrame = pUpperOfOrientFrame->FindSctFrame(); + const bool bIgnoreSection = pUpperOfOrientFrame->IsSctFrame() || + ( pSctFrame->Lower()->IsColumnFrame() && + !pSctFrame->Lower()->GetNext() ); if ( bIgnoreSection ) - pUpperOfOrientFrm = pSctFrm->GetUpper(); + pUpperOfOrientFrame = pSctFrame->GetUpper(); } if ( aVert.GetVertOrient() == text::VertOrientation::NONE ) @@ -474,10 +474,10 @@ void SwToContentAnchoredObjectPosition::CalcPosition() // local variable <nRelPosY> for calculation of relative vertical // distance to anchor. SwTwips nRelPosY = 0; - // #i26791# - local variable <nVertOffsetToFrmAnchorPos> + // #i26791# - local variable <nVertOffsetToFrameAnchorPos> // for determination of the 'vertical' offset to the frame anchor // position - SwTwips nVertOffsetToFrmAnchorPos( 0L ); + SwTwips nVertOffsetToFrameAnchorPos( 0L ); // #i22341# - add special case for vertical alignment // at top of line. if ( mbAnchorToChar && @@ -486,68 +486,68 @@ void SwToContentAnchoredObjectPosition::CalcPosition() { // #i11860# - use new method <_GetTopForObjPos> // to get top of frame for object positioning. - SwTwips nTopOfOrient = _GetTopForObjPos( *pOrientFrm, fnRect, bVert ); + SwTwips nTopOfOrient = _GetTopForObjPos( *pOrientFrame, fnRect, bVert ); if ( aVert.GetRelationOrient() == text::RelOrientation::CHAR ) { - nVertOffsetToFrmAnchorPos = (*fnRect->fnYDiff)( + nVertOffsetToFrameAnchorPos = (*fnRect->fnYDiff)( (ToCharRect()->*fnRect->fnGetBottom)(), nTopOfOrient ); } else { - nVertOffsetToFrmAnchorPos = (*fnRect->fnYDiff)( ToCharTopOfLine(), + nVertOffsetToFrameAnchorPos = (*fnRect->fnYDiff)( ToCharTopOfLine(), nTopOfOrient ); } - nRelPosY = nVertOffsetToFrmAnchorPos - aVert.GetPos(); + nRelPosY = nVertOffsetToFrameAnchorPos - aVert.GetPos(); } else { - // #i28701# - correction: use <pAnchorFrmForVertPos> - // instead of <pOrientFrm> and do not adjust relative position + // #i28701# - correction: use <pAnchorFrameForVertPos> + // instead of <pOrientFrame> and do not adjust relative position // to get correct vertical position. - nVertOffsetToFrmAnchorPos = 0L; + nVertOffsetToFrameAnchorPos = 0L; // #i11860# - use new method <_GetTopForObjPos> // to get top of frame for object positioning. const SwTwips nTopOfOrient = - _GetTopForObjPos( *pAnchorFrmForVertPos, fnRect, bVert ); + _GetTopForObjPos( *pAnchorFrameForVertPos, fnRect, bVert ); // Increase <nRelPosY> by margin height, // if position is vertical aligned to "paragraph text area" if ( aVert.GetRelationOrient() == text::RelOrientation::PRINT_AREA ) { // #i11860# - consider upper space amount of previous frame - SwTwips nTopMargin = (pAnchorFrmForVertPos->*fnRect->fnGetTopMargin)(); - if ( pAnchorFrmForVertPos->IsTextFrm() ) + SwTwips nTopMargin = (pAnchorFrameForVertPos->*fnRect->fnGetTopMargin)(); + if ( pAnchorFrameForVertPos->IsTextFrame() ) { - nTopMargin -= static_cast<const SwTextFrm*>(pAnchorFrmForVertPos)-> - GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid(); + nTopMargin -= static_cast<const SwTextFrame*>(pAnchorFrameForVertPos)-> + GetUpperSpaceAmountConsideredForPrevFrameAndPageGrid(); } - nVertOffsetToFrmAnchorPos += nTopMargin; + nVertOffsetToFrameAnchorPos += nTopMargin; } // #i18732# - adjust <nRelPosY> by difference // between 'page area' and 'anchor' frame, if position is // vertical aligned to 'page areas' else if ( aVert.GetRelationOrient() == text::RelOrientation::PAGE_FRAME ) { - nVertOffsetToFrmAnchorPos += (*fnRect->fnYDiff)( - (rPageAlignLayFrm.Frm().*fnRect->fnGetTop)(), + nVertOffsetToFrameAnchorPos += (*fnRect->fnYDiff)( + (rPageAlignLayFrame.Frame().*fnRect->fnGetTop)(), nTopOfOrient ); } else if ( aVert.GetRelationOrient() == text::RelOrientation::PAGE_PRINT_AREA ) { - SwRect aPgPrtRect( rPageAlignLayFrm.Frm() ); - if ( rPageAlignLayFrm.IsPageFrm() ) + SwRect aPgPrtRect( rPageAlignLayFrame.Frame() ); + if ( rPageAlignLayFrame.IsPageFrame() ) { aPgPrtRect = - static_cast<const SwPageFrm&>(rPageAlignLayFrm).PrtWithoutHeaderAndFooter(); + static_cast<const SwPageFrame&>(rPageAlignLayFrame).PrtWithoutHeaderAndFooter(); } - nVertOffsetToFrmAnchorPos += (*fnRect->fnYDiff)( + nVertOffsetToFrameAnchorPos += (*fnRect->fnYDiff)( (aPgPrtRect.*fnRect->fnGetTop)(), nTopOfOrient ); } - nRelPosY = nVertOffsetToFrmAnchorPos + aVert.GetPos(); + nRelPosY = nVertOffsetToFrameAnchorPos + aVert.GetPos(); } - // <pUpperOfOrientFrm>: layout frame, at which the position has to + // <pUpperOfOrientFrame>: layout frame, at which the position has to // is oriented at // <nRelPosY>: rest of the relative distance in the current // layout frame @@ -557,24 +557,24 @@ void SwToContentAnchoredObjectPosition::CalcPosition() // #i26791# - determine offset to 'vertical' // frame anchor position, depending on layout-direction if ( bVert ) - maOffsetToFrmAnchorPos.X() = nVertOffsetToFrmAnchorPos; + maOffsetToFrameAnchorPos.X() = nVertOffsetToFrameAnchorPos; else - maOffsetToFrmAnchorPos.Y() = nVertOffsetToFrmAnchorPos; + maOffsetToFrameAnchorPos.Y() = nVertOffsetToFrameAnchorPos; // #i11860# - use new method <_GetTopForObjPos> // to get top of frame for object positioning. - const SwTwips nTopOfAnch = _GetTopForObjPos( *pAnchorFrmForVertPos, fnRect, bVert ); + const SwTwips nTopOfAnch = _GetTopForObjPos( *pAnchorFrameForVertPos, fnRect, bVert ); if( nRelPosY <= 0 ) { // Allow negative position, but keep it // inside environment layout frame. - const SwLayoutFrm& rVertEnvironLayFrm = - aEnvOfObj.GetVertEnvironmentLayoutFrm( *pUpperOfOrientFrm ); + const SwLayoutFrame& rVertEnvironLayFrame = + aEnvOfObj.GetVertEnvironmentLayoutFrame( *pUpperOfOrientFrame ); // #i31805# - do not check, if bottom of // anchored object would fit into environment layout frame, if // anchored object has to follow the text flow. const bool bCheckBottom = !DoesObjFollowsTextFlow(); nRelPosY = _AdjustVertRelPos( nTopOfAnch, bVert, bVertL2R, - rVertEnvironLayFrm, nRelPosY, + rVertEnvironLayFrame, nRelPosY, DoesObjFollowsTextFlow(), bCheckBottom ); if ( bVert ) @@ -584,37 +584,37 @@ void SwToContentAnchoredObjectPosition::CalcPosition() } else { - SWREFRESHFN( pAnchorFrmForVertPos ) + SWREFRESHFN( pAnchorFrameForVertPos ) SwTwips nAvail = - (*fnRect->fnYDiff)( (pUpperOfOrientFrm->*fnRect->fnGetPrtBottom)(), + (*fnRect->fnYDiff)( (pUpperOfOrientFrame->*fnRect->fnGetPrtBottom)(), nTopOfAnch ); - const bool bInFootnote = pAnchorFrmForVertPos->IsInFootnote(); + const bool bInFootnote = pAnchorFrameForVertPos->IsInFootnote(); while ( nRelPosY ) { // #i23512# - correction: // consider section frame for grow in online layout. // use new local method <lcl_DoesVertPosFits(..)> - SwLayoutFrm* pLayoutFrmToGrow = nullptr; + SwLayoutFrame* pLayoutFrameToGrow = nullptr; const bool bDoesVertPosFits = lcl_DoesVertPosFits( - nRelPosY, nAvail, pUpperOfOrientFrm, bBrowse, - bGrow, pLayoutFrmToGrow ); + nRelPosY, nAvail, pUpperOfOrientFrame, bBrowse, + bGrow, pLayoutFrameToGrow ); if ( bDoesVertPosFits ) { SwTwips nTmpRelPosY = - (*fnRect->fnYDiff)( (pUpperOfOrientFrm->*fnRect->fnGetPrtBottom)(), + (*fnRect->fnYDiff)( (pUpperOfOrientFrame->*fnRect->fnGetPrtBottom)(), nTopOfAnch ) - nAvail + nRelPosY; // #i28701# - adjust calculated // relative vertical position to object's environment. - const SwFrm& rVertEnvironLayFrm = - aEnvOfObj.GetVertEnvironmentLayoutFrm( *pUpperOfOrientFrm ); + const SwFrame& rVertEnvironLayFrame = + aEnvOfObj.GetVertEnvironmentLayoutFrame( *pUpperOfOrientFrame ); // Do not check, if bottom of // anchored object would fit into environment layout // frame, if anchored object has to follow the text flow. const bool bCheckBottom = !DoesObjFollowsTextFlow(); nTmpRelPosY = _AdjustVertRelPos( nTopOfAnch, bVert, bVertL2R, - rVertEnvironLayFrm, + rVertEnvironLayFrame, nTmpRelPosY, DoesObjFollowsTextFlow(), bCheckBottom ); @@ -624,11 +624,11 @@ void SwToContentAnchoredObjectPosition::CalcPosition() aRelPos.Y() = nTmpRelPosY; // #i23512# - use local variable - // <pLayoutFrmToGrow> provided by new method + // <pLayoutFrameToGrow> provided by new method // <lcl_DoesVertPosFits(..)>. - if ( pLayoutFrmToGrow ) + if ( pLayoutFrameToGrow ) { - pLayoutFrmToGrow->Grow( nRelPosY - nAvail ); + pLayoutFrameToGrow->Grow( nRelPosY - nAvail ); } nRelPosY = 0; } @@ -640,7 +640,7 @@ void SwToContentAnchoredObjectPosition::CalcPosition() if ( DoesObjFollowsTextFlow() && !( aVert.GetRelationOrient() == text::RelOrientation::PAGE_FRAME || aVert.GetRelationOrient() == text::RelOrientation::PAGE_PRINT_AREA ) && - !GetAnchorFrm().IsInTab() ) + !GetAnchorFrame().IsInTab() ) { if ( bMoveable ) { @@ -648,20 +648,20 @@ void SwToContentAnchoredObjectPosition::CalcPosition() nRelPosY -= nAvail; MakePageType eMakePage = bInFootnote ? MAKEPAGE_NONE : MAKEPAGE_APPEND; - const bool bInSct = pUpperOfOrientFrm->IsInSct(); + const bool bInSct = pUpperOfOrientFrame->IsInSct(); if( bInSct ) eMakePage = MAKEPAGE_NOSECTION; - const SwLayoutFrm* pTmp = - pUpperOfOrientFrm->GetLeaf( eMakePage, true, &rAnchorTextFrm ); + const SwLayoutFrame* pTmp = + pUpperOfOrientFrame->GetLeaf( eMakePage, true, &rAnchorTextFrame ); if ( pTmp && ( !bInSct || - pUpperOfOrientFrm->FindSctFrm()->IsAnFollow( pTmp->FindSctFrm() ) ) ) + pUpperOfOrientFrame->FindSctFrame()->IsAnFollow( pTmp->FindSctFrame() ) ) ) { - pUpperOfOrientFrm = pTmp; - bMoveable = rAnchorTextFrm.IsMoveable( pUpperOfOrientFrm ); - SWREFRESHFN( pUpperOfOrientFrm ) - nAvail = (pUpperOfOrientFrm->Prt().*fnRect->fnGetHeight)(); + pUpperOfOrientFrame = pTmp; + bMoveable = rAnchorTextFrame.IsMoveable( pUpperOfOrientFrame ); + SWREFRESHFN( pUpperOfOrientFrame ) + nAvail = (pUpperOfOrientFrame->Prt().*fnRect->fnGetHeight)(); } else { @@ -672,10 +672,10 @@ void SwToContentAnchoredObjectPosition::CalcPosition() // new pages can be created. if( bInSct ) { - const SwFrm* pSct = pUpperOfOrientFrm->FindSctFrm(); - pUpperOfOrientFrm = pSct->GetUpper(); + const SwFrame* pSct = pUpperOfOrientFrame->FindSctFrame(); + pUpperOfOrientFrame = pSct->GetUpper(); nAvail = (*fnRect->fnYDiff)( - (pUpperOfOrientFrm->*fnRect->fnGetPrtBottom)(), + (pUpperOfOrientFrame->*fnRect->fnGetPrtBottom)(), (pSct->*fnRect->fnGetPrtBottom)() ); } else @@ -697,10 +697,10 @@ void SwToContentAnchoredObjectPosition::CalcPosition() { // #i18732# - do not follow text flow respectively // align at 'page areas', but stay inside given environment - const SwFrm& rVertEnvironLayFrm = - aEnvOfObj.GetVertEnvironmentLayoutFrm( *pUpperOfOrientFrm ); + const SwFrame& rVertEnvironLayFrame = + aEnvOfObj.GetVertEnvironmentLayoutFrame( *pUpperOfOrientFrame ); nRelPosY = _AdjustVertRelPos( nTopOfAnch, bVert, bVertL2R, - rVertEnvironLayFrm, + rVertEnvironLayFrame, nRelPosY, DoesObjFollowsTextFlow() ); if( bVert ) @@ -717,7 +717,7 @@ void SwToContentAnchoredObjectPosition::CalcPosition() // We need to calculate the part's absolute position, in order for // it to be put onto the right page and to be pulled into the // LayLeaf's PrtArea - const SwTwips nTopOfAnch = _GetTopForObjPos( *pAnchorFrmForVertPos, fnRect, bVert ); + const SwTwips nTopOfAnch = _GetTopForObjPos( *pAnchorFrameForVertPos, fnRect, bVert ); if( bVert ) { // --> OD 2009-08-31 #monglianlayout# @@ -743,49 +743,49 @@ void SwToContentAnchoredObjectPosition::CalcPosition() // ignore one-column sections. // #i23512# - correction: also ignore one-columned // sections with footnotes/endnotes - if ( pUpperOfOrientFrm->IsInSct() ) + if ( pUpperOfOrientFrame->IsInSct() ) { - const SwSectionFrm* pSctFrm = pUpperOfOrientFrm->FindSctFrm(); - const bool bIgnoreSection = pUpperOfOrientFrm->IsSctFrm() || - ( pSctFrm->Lower()->IsColumnFrm() && - !pSctFrm->Lower()->GetNext() ); + const SwSectionFrame* pSctFrame = pUpperOfOrientFrame->FindSctFrame(); + const bool bIgnoreSection = pUpperOfOrientFrame->IsSctFrame() || + ( pSctFrame->Lower()->IsColumnFrame() && + !pSctFrame->Lower()->GetNext() ); if ( bIgnoreSection ) - pUpperOfOrientFrm = pSctFrm->GetUpper(); + pUpperOfOrientFrame = pSctFrame->GetUpper(); } SwTwips nDist = (GetAnchoredObj().GetObjRect().*fnRect->fnBottomDist)( - (pUpperOfOrientFrm->*fnRect->fnGetPrtBottom)() ); + (pUpperOfOrientFrame->*fnRect->fnGetPrtBottom)() ); if( nDist < 0 ) { // #i23512# - correction: // consider section frame for grow in online layout and // consider page alignment for grow in table. - SwLayoutFrm* pLayoutFrmToGrow = nullptr; - if ( bBrowse && rAnchorTextFrm.IsMoveable() ) + SwLayoutFrame* pLayoutFrameToGrow = nullptr; + if ( bBrowse && rAnchorTextFrame.IsMoveable() ) { - if ( pUpperOfOrientFrm->IsInSct() ) + if ( pUpperOfOrientFrame->IsInSct() ) { - pLayoutFrmToGrow = const_cast<SwLayoutFrm*>( - pUpperOfOrientFrm->FindSctFrm()->GetUpper()); + pLayoutFrameToGrow = const_cast<SwLayoutFrame*>( + pUpperOfOrientFrame->FindSctFrame()->GetUpper()); nDist = (GetAnchoredObj().GetObjRect().*fnRect->fnBottomDist)( - (pLayoutFrmToGrow->*fnRect->fnGetPrtBottom)() ); + (pLayoutFrameToGrow->*fnRect->fnGetPrtBottom)() ); if ( nDist >= 0 ) { - pLayoutFrmToGrow = nullptr; + pLayoutFrameToGrow = nullptr; } } else { - pLayoutFrmToGrow = - const_cast<SwLayoutFrm*>(pUpperOfOrientFrm); + pLayoutFrameToGrow = + const_cast<SwLayoutFrame*>(pUpperOfOrientFrame); } } - else if ( rAnchorTextFrm.IsInTab() && bGrow ) + else if ( rAnchorTextFrame.IsInTab() && bGrow ) { - pLayoutFrmToGrow = const_cast<SwLayoutFrm*>(pUpperOfOrientFrm); + pLayoutFrameToGrow = const_cast<SwLayoutFrame*>(pUpperOfOrientFrame); } - if ( pLayoutFrmToGrow ) + if ( pLayoutFrameToGrow ) { - pLayoutFrmToGrow->Grow( -nDist ); + pLayoutFrameToGrow->Grow( -nDist ); } } @@ -795,21 +795,21 @@ void SwToContentAnchoredObjectPosition::CalcPosition() { nDist = (GetAnchoredObj().GetObjRect().*fnRect->fnBottomDist)( - (pUpperOfOrientFrm->*fnRect->fnGetPrtBottom)() ); + (pUpperOfOrientFrame->*fnRect->fnGetPrtBottom)() ); // #i26945# - floating screen objects, which are // anchored inside a table, doesn't follow the text flow. But, they // have to stay inside its layout environment. - if ( nDist < 0 && pOrientFrm->IsInTab() ) + if ( nDist < 0 && pOrientFrame->IsInTab() ) { // If the anchor frame is the first content of the table cell // and has no follow, the table frame is notified, // that the object doesn't fit into the table cell. // Adjustment of position isn't needed in this case. - if ( pOrientFrm == &rAnchorTextFrm && - !pOrientFrm->GetFollow() && - !pOrientFrm->GetIndPrev() ) + if ( pOrientFrame == &rAnchorTextFrame && + !pOrientFrame->GetFollow() && + !pOrientFrame->GetIndPrev() ) { - const_cast<SwTabFrm*>(pOrientFrm->FindTabFrm()) + const_cast<SwTabFrame*>(pOrientFrame->FindTabFrame()) ->SetDoesObjsFit( false ); } else @@ -819,10 +819,10 @@ void SwToContentAnchoredObjectPosition::CalcPosition() nTmpRelPosY = aRelPos.X() - nDist; else nTmpRelPosY = aRelPos.Y() + nDist; - const SwLayoutFrm& rVertEnvironLayFrm = - aEnvOfObj.GetVertEnvironmentLayoutFrm( *pUpperOfOrientFrm ); + const SwLayoutFrame& rVertEnvironLayFrame = + aEnvOfObj.GetVertEnvironmentLayoutFrame( *pUpperOfOrientFrame ); nTmpRelPosY = _AdjustVertRelPos( nTopOfAnch, bVert, bVertL2R, - rVertEnvironLayFrm, + rVertEnvironLayFrame, nTmpRelPosY, DoesObjFollowsTextFlow(), false ); @@ -850,11 +850,11 @@ void SwToContentAnchoredObjectPosition::CalcPosition() // and the object still doesn't fit, the table frame is notified, // that the object doesn't fit into the table cell. nDist = (GetAnchoredObj().GetObjRect().*fnRect->fnBottomDist)( - (pUpperOfOrientFrm->*fnRect->fnGetPrtBottom)() ); + (pUpperOfOrientFrame->*fnRect->fnGetPrtBottom)() ); if ( nDist < 0 && - pOrientFrm == &rAnchorTextFrm && !pOrientFrm->GetIndPrev() ) + pOrientFrame == &rAnchorTextFrame && !pOrientFrame->GetIndPrev() ) { - const_cast<SwTabFrm*>(pOrientFrm->FindTabFrm()) + const_cast<SwTabFrame*>(pOrientFrame->FindTabFrame()) ->SetDoesObjsFit( false ); } } @@ -862,13 +862,13 @@ void SwToContentAnchoredObjectPosition::CalcPosition() else { // follow text flow - const bool bInFootnote = rAnchorTextFrm.IsInFootnote(); + const bool bInFootnote = rAnchorTextFrame.IsInFootnote(); while( bMoveable && nDist < 0 ) { - bool bInSct = pUpperOfOrientFrm->IsInSct(); + bool bInSct = pUpperOfOrientFrame->IsInSct(); if ( bInSct ) { - const SwLayoutFrm* pTmp = pUpperOfOrientFrm->FindSctFrm()->GetUpper(); + const SwLayoutFrame* pTmp = pUpperOfOrientFrame->FindSctFrame()->GetUpper(); nDist = (GetAnchoredObj().GetObjRect().*fnRect->fnBottomDist)( (pTmp->*fnRect->fnGetPrtBottom)() ); // #i23129# - Try to flow into next @@ -883,19 +883,19 @@ void SwToContentAnchoredObjectPosition::CalcPosition() } if ( !bInSct && (GetAnchoredObj().GetObjRect().*fnRect->fnGetTop)() == - (pUpperOfOrientFrm->*fnRect->fnGetPrtTop)() ) + (pUpperOfOrientFrame->*fnRect->fnGetPrtTop)() ) // It doesn't fit, moving it would not help either anymore break; - const SwLayoutFrm* pNextLay = pUpperOfOrientFrm->GetLeaf( + const SwLayoutFrame* pNextLay = pUpperOfOrientFrame->GetLeaf( ( bInSct ? MAKEPAGE_NOSECTION : ( bInFootnote ? MAKEPAGE_NONE : MAKEPAGE_APPEND ) ), - true, &rAnchorTextFrm ); + true, &rAnchorTextFrame ); // correction: // If anchor is in footnote and proposed next layout environment // isn't a footnote frame, object can't follow the text flow - if ( bInFootnote && pNextLay && !pNextLay->IsFootnoteFrm() ) + if ( bInFootnote && pNextLay && !pNextLay->IsFootnoteFrame() ) { pNextLay = nullptr; } @@ -903,7 +903,7 @@ void SwToContentAnchoredObjectPosition::CalcPosition() { SWRECTFNX( pNextLay ) if ( !bInSct || - ( pUpperOfOrientFrm->FindSctFrm()->IsAnFollow( pNextLay->FindSctFrm() ) && + ( pUpperOfOrientFrame->FindSctFrame()->IsAnFollow( pNextLay->FindSctFrame() ) && (pNextLay->Prt().*fnRectX->fnGetHeight)() ) ) { SwTwips nTmpRelPosY = @@ -913,9 +913,9 @@ void SwToContentAnchoredObjectPosition::CalcPosition() aRelPos.X() = nTmpRelPosY; else aRelPos.Y() = nTmpRelPosY; - pUpperOfOrientFrm = pNextLay; - SWREFRESHFN( pUpperOfOrientFrm ) - bMoveable = rAnchorTextFrm.IsMoveable( pUpperOfOrientFrm ); + pUpperOfOrientFrame = pNextLay; + SWREFRESHFN( pUpperOfOrientFrame ) + bMoveable = rAnchorTextFrame.IsMoveable( pUpperOfOrientFrame ); if( bVertX ) { // --> OD 2009-08-31 #mongolianlayout# @@ -935,16 +935,16 @@ void SwToContentAnchoredObjectPosition::CalcPosition() GetAnchoredObj().SetObjTop( nTopOfAnch + aRelPos.Y() ); nDist = (GetAnchoredObj().GetObjRect().*fnRect->fnBottomDist)( - (pUpperOfOrientFrm->*fnRect->fnGetPrtBottom)() ); + (pUpperOfOrientFrame->*fnRect->fnGetPrtBottom)() ); } // #i23129# - leave section area else if ( bInSct ) { - const SwLayoutFrm* pTmp = pUpperOfOrientFrm->FindSctFrm()->GetUpper(); + const SwLayoutFrame* pTmp = pUpperOfOrientFrame->FindSctFrame()->GetUpper(); nDist = (GetAnchoredObj().GetObjRect().*fnRect->fnBottomDist)( (pTmp->*fnRect->fnGetPrtBottom)() ); if( nDist < 0 ) - pUpperOfOrientFrm = pTmp; + pUpperOfOrientFrame = pTmp; else break; } @@ -953,11 +953,11 @@ void SwToContentAnchoredObjectPosition::CalcPosition() { // If we don't have enough room within the Area, we take a look at // the Page - const SwLayoutFrm* pTmp = pUpperOfOrientFrm->FindSctFrm()->GetUpper(); + const SwLayoutFrame* pTmp = pUpperOfOrientFrame->FindSctFrame()->GetUpper(); nDist = (GetAnchoredObj().GetObjRect().*fnRect->fnBottomDist)( (pTmp->*fnRect->fnGetPrtBottom)() ); if( nDist < 0 ) - pUpperOfOrientFrm = pTmp; + pUpperOfOrientFrame = pTmp; else break; } @@ -968,7 +968,7 @@ void SwToContentAnchoredObjectPosition::CalcPosition() } // keep layout frame vertical position is oriented at. - mpVertPosOrientFrm = pUpperOfOrientFrm; + mpVertPosOrientFrame = pUpperOfOrientFrame; } @@ -979,7 +979,7 @@ void SwToContentAnchoredObjectPosition::CalcPosition() // set calculated vertical position in order to determine correct // frame, the horizontal position is oriented at. - const SwTwips nTopOfAnch = _GetTopForObjPos( *pAnchorFrmForVertPos, fnRect, bVert ); + const SwTwips nTopOfAnch = _GetTopForObjPos( *pAnchorFrameForVertPos, fnRect, bVert ); if( bVert ) { // --> OD 2009-08-31 #mongolianlayout# @@ -998,35 +998,35 @@ void SwToContentAnchoredObjectPosition::CalcPosition() // determine frame, horizontal position is oriented at. // #i28701# - If floating screen object doesn't follow - // the text flow, its horizontal position is oriented at <pOrientFrm>. - const SwFrm* pHoriOrientFrm = DoesObjFollowsTextFlow() - ? &_GetHoriVirtualAnchor( *mpVertPosOrientFrm ) - : pOrientFrm; + // the text flow, its horizontal position is oriented at <pOrientFrame>. + const SwFrame* pHoriOrientFrame = DoesObjFollowsTextFlow() + ? &_GetHoriVirtualAnchor( *mpVertPosOrientFrame ) + : pOrientFrame; // #i26791# - get 'horizontal' offset to frame anchor position. - SwTwips nHoriOffsetToFrmAnchorPos( 0L ); - SwTwips nRelPosX = _CalcRelPosX( *pHoriOrientFrm, aEnvOfObj, + SwTwips nHoriOffsetToFrameAnchorPos( 0L ); + SwTwips nRelPosX = _CalcRelPosX( *pHoriOrientFrame, aEnvOfObj, aHori, rLR, rUL, bWrapThrough, ( bVert ? aRelPos.X() : aRelPos.Y() ), - nHoriOffsetToFrmAnchorPos ); + nHoriOffsetToFrameAnchorPos ); // #i26791# - determine offset to 'horizontal' frame // anchor position, depending on layout-direction if ( bVert ) { aRelPos.Y() = nRelPosX; - maOffsetToFrmAnchorPos.Y() = nHoriOffsetToFrmAnchorPos; + maOffsetToFrameAnchorPos.Y() = nHoriOffsetToFrameAnchorPos; } else { aRelPos.X() = nRelPosX; - maOffsetToFrmAnchorPos.X() = nHoriOffsetToFrmAnchorPos; + maOffsetToFrameAnchorPos.X() = nHoriOffsetToFrameAnchorPos; } // save calculated horizontal position - needed for filters // (including the xml-filter) { - SwTwips nAttrRelPosX = nRelPosX - nHoriOffsetToFrmAnchorPos; + SwTwips nAttrRelPosX = nRelPosX - nHoriOffsetToFrameAnchorPos; if ( aHori.GetHoriOrient() != text::HoriOrientation::NONE && aHori.GetPos() != nAttrRelPosX ) { @@ -1039,7 +1039,7 @@ void SwToContentAnchoredObjectPosition::CalcPosition() } // set absolute position at object - const SwTwips nTopOfAnch = _GetTopForObjPos( *pAnchorFrmForVertPos, fnRect, bVert ); + const SwTwips nTopOfAnch = _GetTopForObjPos( *pAnchorFrameForVertPos, fnRect, bVert ); if( bVert ) { // --> OD 2009-08-31 #mongolianlayout# @@ -1052,12 +1052,12 @@ void SwToContentAnchoredObjectPosition::CalcPosition() { GetAnchoredObj().SetObjLeft( nTopOfAnch + aRelPos.X() ); } - GetAnchoredObj().SetObjTop( rAnchorTextFrm.Frm().Top() + + GetAnchoredObj().SetObjTop( rAnchorTextFrame.Frame().Top() + aRelPos.Y() ); } else { - GetAnchoredObj().SetObjLeft( rAnchorTextFrm.Frm().Left() + + GetAnchoredObj().SetObjLeft( rAnchorTextFrame.Frame().Left() + aRelPos.X() ); GetAnchoredObj().SetObjTop( nTopOfAnch + aRelPos.Y() ); } @@ -1069,27 +1069,27 @@ void SwToContentAnchoredObjectPosition::CalcPosition() /** * Determine frame for horizontal position */ -const SwFrm& SwToContentAnchoredObjectPosition::_GetHoriVirtualAnchor( - const SwLayoutFrm& _rProposedFrm ) const +const SwFrame& SwToContentAnchoredObjectPosition::_GetHoriVirtualAnchor( + const SwLayoutFrame& _rProposedFrame ) const { - const SwFrm* pHoriVirtAnchFrm = &_rProposedFrm; + const SwFrame* pHoriVirtAnchFrame = &_rProposedFrame; // Search for first lower content frame, which is the anchor or a follow // of the anchor (Note: <Anchor.IsAnFollow( Anchor )> is true) - // If none found, <_rProposedFrm> is returned. - const SwFrm* pFrm = _rProposedFrm.Lower(); - while ( pFrm ) + // If none found, <_rProposedFrame> is returned. + const SwFrame* pFrame = _rProposedFrame.Lower(); + while ( pFrame ) { - if ( pFrm->IsContentFrm() && - GetAnchorTextFrm().IsAnFollow( static_cast<const SwContentFrm*>(pFrm) ) ) + if ( pFrame->IsContentFrame() && + GetAnchorTextFrame().IsAnFollow( static_cast<const SwContentFrame*>(pFrame) ) ) { - pHoriVirtAnchFrm = pFrm; + pHoriVirtAnchFrame = pFrame; break; } - pFrm = pFrm->GetNext(); + pFrame = pFrame->GetNext(); } - return *pHoriVirtAnchFrm; + return *pHoriVirtAnchFrame; } diff --git a/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx index 923346a299a4..45d8f09762d6 100644 --- a/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx @@ -41,7 +41,7 @@ SwToLayoutAnchoredObjectPosition::SwToLayoutAnchoredObjectPosition( SdrObject& _ : SwAnchoredObjectPosition( _rDrawObj ), maRelPos( Point() ), // #i26791# - maOffsetToFrmAnchorPos( Point() ) + maOffsetToFrameAnchorPos( Point() ) {} SwToLayoutAnchoredObjectPosition::~SwToLayoutAnchoredObjectPosition() @@ -52,7 +52,7 @@ void SwToLayoutAnchoredObjectPosition::CalcPosition() { const SwRect aObjBoundRect( GetAnchoredObj().GetObjRect() ); - SWRECTFN( (&GetAnchorFrm()) ); + SWRECTFN( (&GetAnchorFrame()) ); const SwFrameFormat& rFrameFormat = GetFrameFormat(); const SvxLRSpaceItem &rLR = rFrameFormat.GetLRSpace(); @@ -75,21 +75,21 @@ void SwToLayoutAnchoredObjectPosition::CalcPosition() ( eVertOrient == text::VertOrientation::CENTER || eVertOrient == text::VertOrientation::BOTTOM ) && SURROUND_THROUGHT != rFrameFormat.GetSurround().GetSurround() && - !GetAnchorFrm().HasFixSize() ) ) + !GetAnchorFrame().HasFixSize() ) ) { eVertOrient = text::VertOrientation::TOP; } // #i26791# - get vertical offset to frame anchor position. - SwTwips nVertOffsetToFrmAnchorPos( 0L ); + SwTwips nVertOffsetToFrameAnchorPos( 0L ); SwTwips nRelPosY = - _GetVertRelPos( GetAnchorFrm(), GetAnchorFrm(), eVertOrient, + _GetVertRelPos( GetAnchorFrame(), GetAnchorFrame(), eVertOrient, aVert.GetRelationOrient(), aVert.GetPos(), - rLR, rUL, nVertOffsetToFrmAnchorPos ); + rLR, rUL, nVertOffsetToFrameAnchorPos ); // keep the calculated relative vertical position - needed for filters // (including the xml-filter) { - SwTwips nAttrRelPosY = nRelPosY - nVertOffsetToFrmAnchorPos; + SwTwips nAttrRelPosY = nRelPosY - nVertOffsetToFrameAnchorPos; if ( aVert.GetVertOrient() != text::VertOrientation::NONE && aVert.GetPos() != nAttrRelPosY ) { @@ -111,26 +111,26 @@ void SwToLayoutAnchoredObjectPosition::CalcPosition() aRelPos.X() = nRelPosY; else aRelPos.X() = -nRelPosY - aObjBoundRect.Width(); - maOffsetToFrmAnchorPos.X() = nVertOffsetToFrmAnchorPos; + maOffsetToFrameAnchorPos.X() = nVertOffsetToFrameAnchorPos; } else { aRelPos.Y() = nRelPosY; - maOffsetToFrmAnchorPos.Y() = nVertOffsetToFrmAnchorPos; + maOffsetToFrameAnchorPos.Y() = nVertOffsetToFrameAnchorPos; } // if in online-layout the bottom of to-page anchored object is beyond // the page bottom, the page frame has to grow by growing its body frame. - const SwViewShell *pSh = GetAnchorFrm().getRootFrm()->GetCurrShell(); - if ( !bFlyAtFly && GetAnchorFrm().IsPageFrm() && + const SwViewShell *pSh = GetAnchorFrame().getRootFrame()->GetCurrShell(); + if ( !bFlyAtFly && GetAnchorFrame().IsPageFrame() && pSh && pSh->GetViewOptions()->getBrowseMode() ) { - const long nAnchorBottom = GetAnchorFrm().Frm().Bottom(); - const long nBottom = GetAnchorFrm().Frm().Top() + + const long nAnchorBottom = GetAnchorFrame().Frame().Bottom(); + const long nBottom = GetAnchorFrame().Frame().Top() + aRelPos.Y() + aObjBoundRect.Height(); if ( nAnchorBottom < nBottom ) { - static_cast<SwPageFrm&>(GetAnchorFrm()). + static_cast<SwPageFrame&>(GetAnchorFrame()). FindBodyCont()->Grow( nBottom - nAnchorBottom ); } } @@ -141,7 +141,7 @@ void SwToLayoutAnchoredObjectPosition::CalcPosition() { // consider toggle of horizontal position for even pages. const bool bToggle = aHori.IsPosToggle() && - !GetAnchorFrm().FindPageFrm()->OnRightPage(); + !GetAnchorFrame().FindPageFrame()->OnRightPage(); sal_Int16 eHoriOrient = aHori.GetHoriOrient(); sal_Int16 eRelOrient = aHori.GetRelationOrient(); // toggle orientation @@ -154,7 +154,7 @@ void SwToLayoutAnchoredObjectPosition::CalcPosition() SwTwips nWidth, nOffset; { bool bDummy; // in this context irrelevant output parameter - _GetHoriAlignmentValues( GetAnchorFrm(), GetAnchorFrm(), + _GetHoriAlignmentValues( GetAnchorFrame(), GetAnchorFrame(), eRelOrient, false, nWidth, nOffset, bDummy ); } @@ -166,7 +166,7 @@ void SwToLayoutAnchoredObjectPosition::CalcPosition() if ( text::HoriOrientation::NONE == eHoriOrient ) { if( bToggle || - ( !aHori.IsPosToggle() && GetAnchorFrm().IsRightToLeft() ) ) + ( !aHori.IsPosToggle() && GetAnchorFrame().IsRightToLeft() ) ) { nRelPosX = nWidth - nObjWidth - aHori.GetPos(); } @@ -199,12 +199,12 @@ void SwToLayoutAnchoredObjectPosition::CalcPosition() { aRelPos.Y() = nRelPosX; - maOffsetToFrmAnchorPos.Y() = nOffset; + maOffsetToFrameAnchorPos.Y() = nOffset; } else { aRelPos.X() = nRelPosX; - maOffsetToFrmAnchorPos.X() = nOffset; + maOffsetToFrameAnchorPos.X() = nOffset; } // keep the calculated relative horizontal position - needed for filters diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx index 579caab46067..8facbeec776b 100644 --- a/sw/source/core/ole/ndole.cxx +++ b/sw/source/core/ole/ndole.cxx @@ -326,9 +326,9 @@ bool SwOLENode::SavePersistentData() the chart again. Then chart core function will call the class ExplicitCategoryProvider to create data source. In this step, when SW data source provider create the data source, an UnoActionRemoveContext - will mess with the layout and create a new SwFlyFrm. + will mess with the layout and create a new SwFlyFrame. But later in SwUndoFlyBase::DelFly, it will clear anchor related attributes - of SwFlyFrm. Then finally null pointer occur. + of SwFlyFrame. Then finally null pointer occur. Resolution: In pCnt->RemoveEmbeddedObject in SaveSection process of table chart, only remove the object from the object container, without removing it's @@ -780,10 +780,10 @@ const uno::Reference < embed::XEmbeddedObject > SwOLEObj::GetOleRef() { // We could not load this part (probably broken) Rectangle aArea; - SwFrm *pFrm = pOLENd->getLayoutFrm(nullptr); - if ( pFrm ) + SwFrame *pFrame = pOLENd->getLayoutFrame(nullptr); + if ( pFrame ) { - Size aSz( pFrm->Frm().SSize() ); + Size aSz( pFrame->Frame().SSize() ); const MapMode aSrc ( MAP_TWIP ); const MapMode aDest( MAP_100TH_MM ); aSz = OutputDevice::LogicToLogic( aSz, aSrc, aDest ); diff --git a/sw/source/core/table/swnewtable.cxx b/sw/source/core/table/swnewtable.cxx index 150fbc0acbdb..83a6a82cb9ca 100644 --- a/sw/source/core/table/swnewtable.cxx +++ b/sw/source/core/table/swnewtable.cxx @@ -131,7 +131,7 @@ static void lcl_CheckMinMax( long& rMin, long& rMax, const SwTableLine& rLine, s { SwTableBox* pBox = rLine.GetTabBoxes()[nCurrBox]; OSL_ENSURE( pBox, "Missing table box" ); - nWidth = pBox->GetFrameFormat()->GetFrmSize().GetWidth(); + nWidth = pBox->GetFrameFormat()->GetFrameSize().GetWidth(); nNew += nWidth; } // nNew is the right border of the wished box @@ -167,7 +167,7 @@ static long lcl_Box2LeftBorder( const SwTableBox& rBox ) OSL_ENSURE( pBox, "Missing table box" ); if( pBox == &rBox ) return nLeft; - nLeft += pBox->GetFrameFormat()->GetFrmSize().GetWidth(); + nLeft += pBox->GetFrameFormat()->GetFrameSize().GetWidth(); } OSL_FAIL( "Box not found in own upper?" ); return nLeft; @@ -199,7 +199,7 @@ static SwTableBox* lcl_LeftBorder2Box( long nLeft, const SwTableLine* pLine ) { SwTableBox* pBox = pLine->GetTabBoxes()[nCurrBox]; OSL_ENSURE( pBox, "Missing table box" ); - if( pBox->GetFrameFormat()->GetFrmSize().GetWidth() ) + if( pBox->GetFrameFormat()->GetFrameSize().GetWidth() ) { if( nCurrLeft == nLeft ) return pBox; @@ -214,7 +214,7 @@ static SwTableBox* lcl_LeftBorder2Box( long nLeft, const SwTableLine* pLine ) return pBox; } } - nCurrLeft += pBox->GetFrameFormat()->GetFrmSize().GetWidth(); + nCurrLeft += pBox->GetFrameFormat()->GetFrameSize().GetWidth(); } OSL_FAIL( "Didn't found wished box" ); return nullptr; @@ -388,7 +388,7 @@ SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& rPam ) const SwTableBox* pBox = pLine->GetTabBoxes()[nCurrBox]; OSL_ENSURE( pBox, "Missing table box" ); long nLeft = nRight; - nRight += pBox->GetFrameFormat()->GetFrmSize().GetWidth(); + nRight += pBox->GetFrameFormat()->GetFrameSize().GetWidth(); long nRowSpan = pBox->getRowSpan(); if( nRight <= nMin ) { @@ -569,8 +569,8 @@ SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& rPam ) const while( pCurr != aNewWidthList.end() ) { SwFrameFormat* pFormat = pCurr->first->ClaimFrameFormat(); - long nNewWidth = pFormat->GetFrmSize().GetWidth() + pCurr->second; - pFormat->SetFormatAttr( SwFormatFrmSize( ATT_VAR_SIZE, nNewWidth, 0 ) ); + long nNewWidth = pFormat->GetFrameSize().GetWidth() + pCurr->second; + pFormat->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, nNewWidth, 0 ) ); ++pCurr; } } @@ -582,19 +582,19 @@ SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& rPam ) const return pRet; } -/** lcl_InvalidateCellFrm(..) invalidates all layout representations of a given cell +/** lcl_InvalidateCellFrame(..) invalidates all layout representations of a given cell to initiate a reformatting */ -static void lcl_InvalidateCellFrm( const SwTableBox& rBox ) +static void lcl_InvalidateCellFrame( const SwTableBox& rBox ) { - SwIterator<SwCellFrm,SwFormat> aIter( *rBox.GetFrameFormat() ); - for( SwCellFrm* pCell = aIter.First(); pCell; pCell = aIter.Next() ) + SwIterator<SwCellFrame,SwFormat> aIter( *rBox.GetFrameFormat() ); + for( SwCellFrame* pCell = aIter.First(); pCell; pCell = aIter.Next() ) { if( pCell->GetTabBox() == &rBox ) { pCell->InvalidateSize(); - SwFrm* pLower = pCell->GetLower(); + SwFrame* pLower = pCell->GetLower(); if( pLower ) pLower->_InvalidateSize(); } @@ -614,7 +614,7 @@ static long lcl_InsertPosition( SwTable &rTable, std::vector<sal_uInt16>& rInsPo { SwTableBox *pBox = rBoxes[j]; SwTableLine* pLine = pBox->GetUpper(); - long nWidth = rBoxes[j]->GetFrameFormat()->GetFrmSize().GetWidth(); + long nWidth = rBoxes[j]->GetFrameFormat()->GetFrameSize().GetWidth(); nAddWidth += nWidth; sal_uInt16 nCurrBox = pLine->GetTabBoxes().GetPos( pBox ); sal_uInt16 nCurrLine = rTable.GetTabLines().GetPos( pLine ); @@ -662,7 +662,7 @@ bool SwTable::NewInsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, { // Calculation of the insert positions and the width of the new boxes sal_uInt64 nTableWidth = 0; for( size_t i = 0; i < m_aLines[0]->GetTabBoxes().size(); ++i ) - nTableWidth += m_aLines[0]->GetTabBoxes()[i]->GetFrameFormat()->GetFrmSize().GetWidth(); + nTableWidth += m_aLines[0]->GetTabBoxes()[i]->GetFrameFormat()->GetFrameSize().GetWidth(); // Fill the vector of insert positions and the (average) width to insert sal_uInt64 nAddWidth = lcl_InsertPosition( *this, aInsPos, rBoxes, bBehind ); @@ -687,7 +687,7 @@ bool SwTable::NewInsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, _FndBox aFndBox( nullptr, nullptr ); aFndBox.SetTableLines( rBoxes, *this ); - aFndBox.DelFrms( *this ); + aFndBox.DelFrames( *this ); SwTableNode* pTableNd = GetTableNode(); std::vector<SwTableBoxFormat*> aInsFormat( nCnt, nullptr ); @@ -749,9 +749,9 @@ bool SwTable::NewInsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, { pCurrBox->setRowSpan( nLastRowSpan ); SwFrameFormat* pFrameFormat = pCurrBox->ClaimFrameFormat(); - SwFormatFrmSize aFrmSz( pFrameFormat->GetFrmSize() ); - aFrmSz.SetWidth( nNewBoxWidth ); - pFrameFormat->SetFormatAttr( aFrmSz ); + SwFormatFrameSize aFrameSz( pFrameFormat->GetFrameSize() ); + aFrameSz.SetWidth( nNewBoxWidth ); + pFrameFormat->SetFormatAttr( aFrameSz ); if( pNoRightBorder && ( !bBehind || j+1 < nCnt ) ) pFrameFormat->SetFormatAttr( *pNoRightBorder ); aInsFormat[j] = static_cast<SwTableBoxFormat*>(pFrameFormat); @@ -767,13 +767,13 @@ bool SwTable::NewInsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, delete pNoRightBorder; } - aFndBox.MakeFrms( *this ); + aFndBox.MakeFrames( *this ); #if OSL_DEBUG_LEVEL > 0 { const SwTableBoxes &rTabBoxes = m_aLines[0]->GetTabBoxes(); long nNewWidth = 0; for( size_t i = 0; i < rTabBoxes.size(); ++i ) - nNewWidth += rTabBoxes[i]->GetFrameFormat()->GetFrmSize().GetWidth(); + nNewWidth += rTabBoxes[i]->GetFrameFormat()->GetFrameSize().GetWidth(); OSL_ENSURE( nNewWidth > 0, "Very small" ); } #endif @@ -924,7 +924,7 @@ bool SwTable::PrepareMerge( const SwPaM& rPam, SwSelBoxes& rBoxes, _FindSuperfluousRows( rBoxes, pFirstLn, pLastLn ); // pNewFormat will be set to the new master box and the overlapped cells SwFrameFormat* pNewFormat = pMergeBox->ClaimFrameFormat(); - pNewFormat->SetFormatAttr( SwFormatFrmSize( ATT_VAR_SIZE, pSel->mnMergeWidth, 0 ) ); + pNewFormat->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, pSel->mnMergeWidth, 0 ) ); for( size_t nCurrLine = 0; nCurrLine < nLineCount; ++nCurrLine ) { const SwSelBoxes* pBoxes = pSel->aBoxes[ nCurrLine ]; @@ -937,7 +937,7 @@ bool SwTable::PrepareMerge( const SwPaM& rPam, SwSelBoxes& rBoxes, // Even this box will be deleted soon, // we have to correct the width to avoid side effects SwFrameFormat* pFormat = pBox->ClaimFrameFormat(); - pFormat->SetFormatAttr( SwFormatFrmSize( ATT_VAR_SIZE, 0, 0 ) ); + pFormat->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, 0, 0 ) ); } else pBox->ChgFrameFormat( static_cast<SwTableBoxFormat*>(pNewFormat) ); @@ -1104,7 +1104,7 @@ static void lcl_UnMerge( const SwTable& rTable, SwTableBox& rBox, size_t nCnt, { SwTableLine* pLine = aBoxes[ i ]->GetUpper(); SwFrameFormat *pRowFormat = pLine->GetFrameFormat(); - pHeights[ i ] = pRowFormat->GetFrmSize().GetHeight(); + pHeights[ i ] = pRowFormat->GetFrameSize().GetHeight(); nHeight += pHeights[ i ]; } SwTwips nSumH = 0; @@ -1129,7 +1129,7 @@ static void lcl_UnMerge( const SwTable& rTable, SwTableBox& rBox, size_t nCnt, { size_t nNextIdx = pSplitIdx[ i ]; aBoxes[ nIdx ]->setRowSpan( nNextIdx - nIdx ); - lcl_InvalidateCellFrm( *aBoxes[ nIdx ] ); + lcl_InvalidateCellFrame( *aBoxes[ nIdx ] ); while( ++nIdx < nNextIdx ) aBoxes[ nIdx ]->setRowSpan( nIdx - nNextIdx ); } @@ -1156,7 +1156,7 @@ void SwTable::InsertSpannedRow( SwDoc* pDoc, sal_uInt16 nRowIdx, sal_uInt16 nCnt SwSelBoxes aBoxes; SwTableLine& rLine = *GetTabLines()[ nRowIdx ]; lcl_FillSelBoxes( aBoxes, rLine ); - SwFormatFrmSize aFSz( rLine.GetFrameFormat()->GetFrmSize() ); + SwFormatFrameSize aFSz( rLine.GetFrameFormat()->GetFrameSize() ); if( ATT_VAR_SIZE != aFSz.GetHeightSizeType() ) { SwFrameFormat* pFrameFormat = rLine.ClaimFrameFormat(); @@ -1408,7 +1408,7 @@ bool SwTable::NewSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCn SwSplitLines aSplitLines; sal_uInt16 nFirst = lcl_CalculateSplitLineHeights( aRowLines, aSplitLines, *this, rBoxes, nCnt ); - aFndBox.DelFrms( *this ); + aFndBox.DelFrames( *this ); SwTwips nLast = 0; SwSplitLines::iterator pSplit = aSplitLines.begin(); SwSplitLines::iterator pCurr = aRowLines.begin(); @@ -1419,7 +1419,7 @@ bool SwTable::NewSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCn InsertSpannedRow( pDoc, nFirst, 1 ); SwTableLine* pRow = GetTabLines()[ nFirst ]; SwFrameFormat* pRowFormat = pRow->ClaimFrameFormat(); - SwFormatFrmSize aFSz( pRowFormat->GetFrmSize() ); + SwFormatFrameSize aFSz( pRowFormat->GetFrameSize() ); aFSz.SetHeightSizeType( ATT_MIN_SIZE ); aFSz.SetHeight( *pSplit - nLast ); pRowFormat->SetFormatAttr( aFSz ); @@ -1431,7 +1431,7 @@ bool SwTable::NewSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCn ++pSplit; SwTableLine* pRow = GetTabLines()[ nFirst ]; SwFrameFormat* pRowFormat = pRow->ClaimFrameFormat(); - SwFormatFrmSize aFSz( pRowFormat->GetFrmSize() ); + SwFormatFrameSize aFSz( pRowFormat->GetFrameSize() ); aFSz.SetHeightSizeType( ATT_MIN_SIZE ); aFSz.SetHeight( *pCurr - nLast ); pRowFormat->SetFormatAttr( aFSz ); @@ -1442,7 +1442,7 @@ bool SwTable::NewSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCn } else { - aFndBox.DelFrms( *this ); + aFndBox.DelFrames( *this ); bSameHeight = false; } if( !bSameHeight ) @@ -1471,7 +1471,7 @@ bool SwTable::NewSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCn CHECK_TABLE( *this ) //Layout updaten - aFndBox.MakeFrms( *this ); + aFndBox.MakeFrames( *this ); return true; } @@ -1492,7 +1492,7 @@ bool SwTable::InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, { _FndBox aFndBox( nullptr, nullptr ); aFndBox.SetTableLines( rBoxes, *this ); - aFndBox.DelFrms( *this ); + aFndBox.DelFrames( *this ); bRet = true; SwTableLine *pLine = GetTabLines()[ nRowIdx ]; @@ -1529,7 +1529,7 @@ bool SwTable::InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, if( nRowIdx ) lcl_ChangeRowSpan( *this, nCnt, --nRowIdx, true ); //Layout update - aFndBox.MakeFrms( *this ); + aFndBox.MakeFrames( *this ); } CHECK_TABLE( *this ) } @@ -1550,7 +1550,7 @@ void SwTable::PrepareDelBoxes( const SwSelBoxes& rBoxes ) { SwTableBox* pBox = rBoxes[i]; long nRowSpan = pBox->getRowSpan(); - if( nRowSpan != 1 && pBox->GetFrameFormat()->GetFrmSize().GetWidth() ) + if( nRowSpan != 1 && pBox->GetFrameFormat()->GetFrameSize().GetWidth() ) { long nLeft = lcl_Box2LeftBorder( *pBox ); SwTableLine *pLine = pBox->GetUpper(); @@ -1579,7 +1579,7 @@ void SwTable::PrepareDelBoxes( const SwSelBoxes& rBoxes ) nRowSpan = pBox->getRowSpan(); if( nRowSpan > 1 ) { - lcl_InvalidateCellFrm( *pBox ); + lcl_InvalidateCellFrame( *pBox ); --nRowSpan; } else @@ -1611,7 +1611,7 @@ static void lcl_SearchSelBox( const SwTable &rTable, SwSelBoxes& rBoxes, long nM { SwTableBox* pBox = rLine.GetTabBoxes()[nCurrBox]; OSL_ENSURE( pBox, "Missing table box" ); - long nWidth = pBox->GetFrameFormat()->GetFrmSize().GetWidth(); + long nWidth = pBox->GetFrameFormat()->GetFrameSize().GetWidth(); nRight += nWidth; if( nRight > nMin ) { @@ -1830,7 +1830,7 @@ void SwTable::ExpandColumnSelection( SwSelBoxes& rBoxes, long &rMin, long &rMax { long nLeft = nRight; SwTableBox* pBox = pLine->GetTabBoxes()[nCurrBox]; - nRight += pBox->GetFrameFormat()->GetFrmSize().GetWidth(); + nRight += pBox->GetFrameFormat()->GetFrameSize().GetWidth(); if( nLeft >= rMin && nRight <= rMax ) rBoxes.insert( pBox ); } @@ -1846,7 +1846,7 @@ void SwTable::PrepareDeleteCol( long nMin, long nMax ) if( m_aLines.empty() || nMax < nMin ) return; long nMid = nMin ? ( nMin + nMax ) / 2 : 0; - const SwTwips nTabSize = GetFrameFormat()->GetFrmSize().GetWidth(); + const SwTwips nTabSize = GetFrameFormat()->GetFrameSize().GetWidth(); if( nTabSize == nMax ) nMid = nMax; const size_t nLineCnt = m_aLines.size(); @@ -1859,7 +1859,7 @@ void SwTable::PrepareDeleteCol( long nMin, long nMax ) { long nLeft = nRight; SwTableBox* pBox = pLine->GetTabBoxes()[nCurrBox]; - nRight += pBox->GetFrameFormat()->GetFrmSize().GetWidth(); + nRight += pBox->GetFrameFormat()->GetFrameSize().GetWidth(); if( nRight < nMin ) continue; if( nLeft > nMax ) @@ -1877,9 +1877,9 @@ void SwTable::PrepareDeleteCol( long nMin, long nMax ) if( nNewWidth >= 0 ) { SwFrameFormat* pFrameFormat = pBox->ClaimFrameFormat(); - SwFormatFrmSize aFrmSz( pFrameFormat->GetFrmSize() ); - aFrmSz.SetWidth( nNewWidth ); - pFrameFormat->SetFormatAttr( aFrmSz ); + SwFormatFrameSize aFrameSz( pFrameFormat->GetFrameSize() ); + aFrameSz.SetWidth( nNewWidth ); + pFrameFormat->SetFormatAttr( aFrameSz ); } } } @@ -2102,7 +2102,7 @@ void SwTable::CheckConsistency() const if( !IsNewModel() ) return; const size_t nLineCount = GetTabLines().size(); - const SwTwips nTabSize = GetFrameFormat()->GetFrmSize().GetWidth(); + const SwTwips nTabSize = GetFrameFormat()->GetFrameSize().GetWidth(); SwTwips nLineWidth = 0; std::list< RowSpanCheck > aRowSpanCells; std::list< RowSpanCheck >::iterator aIter = aRowSpanCells.end(); @@ -2117,7 +2117,7 @@ void SwTable::CheckConsistency() const { SwTableBox* pBox = pLine->GetTabBoxes()[nCurrCol]; SAL_WARN_IF( !pBox, "sw.core", "Missing Table Box" ); - SwTwips nNewWidth = pBox->GetFrameFormat()->GetFrmSize().GetWidth() + nWidth; + SwTwips nNewWidth = pBox->GetFrameFormat()->GetFrameSize().GetWidth() + nWidth; long nRowSp = pBox->getRowSpan(); if( nRowSp < 0 ) { diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx index b0363a4725f2..bfd91b614bd9 100644 --- a/sw/source/core/table/swtable.cxx +++ b/sw/source/core/table/swtable.cxx @@ -296,8 +296,8 @@ static void lcl_ModifyLines( SwTableLines &rLines, const long nOld, for( size_t i = 0; i < rFormatArr.size(); ++i ) { SwFormat* pFormat = rFormatArr[i]; - const SwTwips nBox = lcl_MulDiv64<SwTwips>(pFormat->GetFrmSize().GetWidth(), nNew, nOld); - SwFormatFrmSize aNewBox( ATT_VAR_SIZE, nBox, 0 ); + const SwTwips nBox = lcl_MulDiv64<SwTwips>(pFormat->GetFrameSize().GetWidth(), nNew, nOld); + SwFormatFrameSize aNewBox( ATT_VAR_SIZE, nBox, 0 ); pFormat->LockModify(); pFormat->SetFormatAttr( aNewBox ); pFormat->UnlockModify(); @@ -320,7 +320,7 @@ static void lcl_ModifyBoxes( SwTableBoxes &rBoxes, const long nOld, } // Adjust the box SwFrameFormat *pFormat = rBox.GetFrameFormat(); - sal_uInt64 nBox = pFormat->GetFrmSize().GetWidth(); + sal_uInt64 nBox = pFormat->GetFrameSize().GetWidth(); nOriginalSum += nBox; nBox *= nNew; nBox /= nOld; @@ -333,7 +333,7 @@ static void lcl_ModifyBoxes( SwTableBoxes &rBoxes, const long nOld, { nBox = nWishedSum; pFormat = rBox.ClaimFrameFormat(); - SwFormatFrmSize aNewBox( ATT_VAR_SIZE, static_cast< SwTwips >(nBox), 0 ); + SwFormatFrameSize aNewBox( ATT_VAR_SIZE, static_cast< SwTwips >(nBox), 0 ); pFormat->LockModify(); pFormat->SetFormatAttr( aNewBox ); pFormat->UnlockModify(); @@ -350,20 +350,20 @@ void SwTable::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) { // catch SSize changes, to adjust the lines/boxes const sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0 ; - const SwFormatFrmSize* pNewSize = nullptr, *pOldSize = nullptr; + const SwFormatFrameSize* pNewSize = nullptr, *pOldSize = nullptr; if( RES_ATTRSET_CHG == nWhich ) { if (pOld && pNew && SfxItemState::SET == static_cast<const SwAttrSetChg*>(pNew)->GetChgSet()->GetItemState( RES_FRM_SIZE, false, reinterpret_cast<const SfxPoolItem**>(&pNewSize))) { - pOldSize = &static_cast<const SwAttrSetChg*>(pOld)->GetChgSet()->GetFrmSize(); + pOldSize = &static_cast<const SwAttrSetChg*>(pOld)->GetChgSet()->GetFrameSize(); } } else if( RES_FRM_SIZE == nWhich ) { - pOldSize = static_cast<const SwFormatFrmSize*>(pOld); - pNewSize = static_cast<const SwFormatFrmSize*>(pNew); + pOldSize = static_cast<const SwFormatFrameSize*>(pOld); + pNewSize = static_cast<const SwFormatFrameSize*>(pNew); } else CheckRegistration( pOld, pNew ); @@ -395,7 +395,7 @@ static void lcl_SortedTabColInsert( SwTabCols &rToFill, const SwTableBox *pBox, const SwFrameFormat *pTabFormat, const bool bHidden, const bool bRefreshHidden ) { - const long nWish = pTabFormat->GetFrmSize().GetWidth(); + const long nWish = pTabFormat->GetFrameSize().GetWidth(); OSL_ENSURE(nWish, "weird <= 0 width frmfrm"); // The value for the left edge of the box is calculated from the @@ -415,7 +415,7 @@ static void lcl_SortedTabColInsert( SwTabCols &rToFill, const SwTableBox *pBox, const SwTableBoxes &rBoxes = pLine->GetTabBoxes(); for ( size_t i = 0; i < rBoxes.size(); ++i ) { - const SwTwips nWidth = rBoxes[i]->GetFrameFormat()->GetFrmSize().GetWidth(); + const SwTwips nWidth = rBoxes[i]->GetFrameFormat()->GetFrameSize().GetWidth(); nSum += nWidth; const long nTmp = lcl_MulDiv64<long>(nSum, nAct, nWish); @@ -674,7 +674,7 @@ static void lcl_ProcessBoxSet( SwTableBox *pBox, Parm &rParm ) for ( size_t i = 0; (i < rBoxes.size()) && (rBoxes[i] != pCur); ++i) { nLeft += lcl_MulDiv64<long>( - rBoxes[i]->GetFrameFormat()->GetFrmSize().GetWidth(), + rBoxes[i]->GetFrameFormat()->GetFrameSize().GetWidth(), nOldAct, rParm.nOldWish); } pCur = pLine->GetUpper(); @@ -686,7 +686,7 @@ static void lcl_ProcessBoxSet( SwTableBox *pBox, Parm &rParm ) { // Right edge is left edge plus width. const long nWidth = lcl_MulDiv64<long>( - pBox->GetFrameFormat()->GetFrmSize().GetWidth(), + pBox->GetFrameFormat()->GetFrameSize().GetWidth(), nOldAct, rParm.nOldWish); const long nRight = nLeft + nWidth; size_t nLeftPos = 0; @@ -720,7 +720,7 @@ static void lcl_ProcessBoxSet( SwTableBox *pBox, Parm &rParm ) { // Calculate the difference to the edge touching the first box. const long nWidth = lcl_MulDiv64<long>( - pBox->GetFrameFormat()->GetFrmSize().GetWidth(), + pBox->GetFrameFormat()->GetFrameSize().GetWidth(), nOldAct, rParm.nOldWish); const long nTmp = nWidth + rParm.rOld.GetLeft(); for ( size_t i = 0; i < rParm.rOld.Count(); ++i ) @@ -764,11 +764,11 @@ static void lcl_ProcessBoxSet( SwTableBox *pBox, Parm &rParm ) // Adjust the box and all superiors by the difference amount. while ( pBox ) { - SwFormatFrmSize aFormatFrmSize( pBox->GetFrameFormat()->GetFrmSize() ); - aFormatFrmSize.SetWidth( aFormatFrmSize.GetWidth() + nDiff ); - if ( aFormatFrmSize.GetWidth() < 0 ) - aFormatFrmSize.SetWidth( -aFormatFrmSize.GetWidth() ); - rParm.aShareFormats.SetSize( *pBox, aFormatFrmSize ); + SwFormatFrameSize aFormatFrameSize( pBox->GetFrameFormat()->GetFrameSize() ); + aFormatFrameSize.SetWidth( aFormatFrameSize.GetWidth() + nDiff ); + if ( aFormatFrameSize.GetWidth() < 0 ) + aFormatFrameSize.SetWidth( -aFormatFrameSize.GetWidth() ); + rParm.aShareFormats.SetSize( *pBox, aFormatFrameSize ); // The outer cells of the last row are responsible to adjust a surrounding cell. // Last line check: @@ -830,10 +830,10 @@ static void lcl_AdjustBox( SwTableBox *pBox, const long nDiff, Parm &rParm ) ::lcl_AdjustLines( pBox->GetTabLines(), nDiff, rParm ); // Adjust the size of the box. - SwFormatFrmSize aFormatFrmSize( pBox->GetFrameFormat()->GetFrmSize() ); - aFormatFrmSize.SetWidth( aFormatFrmSize.GetWidth() + nDiff ); + SwFormatFrameSize aFormatFrameSize( pBox->GetFrameFormat()->GetFrameSize() ); + aFormatFrameSize.SetWidth( aFormatFrameSize.GetWidth() + nDiff ); - rParm.aShareFormats.SetSize( *pBox, aFormatFrmSize ); + rParm.aShareFormats.SetSize( *pBox, aFormatFrameSize ); } void SwTable::SetTabCols( const SwTabCols &rNew, const SwTabCols &rOld, @@ -855,7 +855,7 @@ void SwTable::SetTabCols( const SwTabCols &rNew, const SwTabCols &rOld, // For the size adjustment, we must not make use of the Modify, since that'd // adjust all boxes, which we really don't want. SwFrameFormat *pFormat = GetFrameFormat(); - aParm.nOldWish = aParm.nNewWish = pFormat->GetFrmSize().GetWidth(); + aParm.nOldWish = aParm.nNewWish = pFormat->GetFrameSize().GetWidth(); if ( (rOld.GetLeft() != rNew.GetLeft()) || (rOld.GetRight()!= rNew.GetRight()) ) { @@ -915,7 +915,7 @@ void SwTable::SetTabCols( const SwTabCols &rNew, const SwTabCols &rOld, aParm.nNewWish += nTabDiff; if ( aParm.nNewWish < 0 ) aParm.nNewWish = USHRT_MAX; // Oops! Have to roll back. - SwFormatFrmSize aSz( pFormat->GetFrmSize() ); + SwFormatFrameSize aSz( pFormat->GetFrameSize() ); if ( aSz.GetWidth() != aParm.nNewWish ) { aSz.SetWidth( aParm.nNewWish ); @@ -984,7 +984,7 @@ void SwTable::SetTabCols( const SwTabCols &rNew, const SwTabCols &rOld, #ifdef DBG_UTIL { // do some checking for correct table widths - SwTwips nSize = GetFrameFormat()->GetFrmSize().GetWidth(); + SwTwips nSize = GetFrameFormat()->GetFrameSize().GetWidth(); for (size_t n = 0; n < m_aLines.size(); ++n) { _CheckBoxWidth( *m_aLines[ n ], nSize ); @@ -1008,7 +1008,7 @@ static void lcl_AdjustWidthsInLine( SwTableLine* pLine, ChangeList& rOldNew, for( size_t i = 0; i < nCount; ++i ) { SwTableBox* pBox = pLine->GetTabBoxes()[i]; - SwTwips nWidth = pBox->GetFrameFormat()->GetFrmSize().GetWidth(); + SwTwips nWidth = pBox->GetFrameFormat()->GetFrameSize().GetWidth(); SwTwips nNewWidth = nWidth - nRest; nRest = 0; nBorder += nWidth; @@ -1038,9 +1038,9 @@ static void lcl_AdjustWidthsInLine( SwTableLine* pLine, ChangeList& rOldNew, nRest += 1 - nNewWidth; nNewWidth = 1; } - SwFormatFrmSize aFormatFrmSize( pBox->GetFrameFormat()->GetFrmSize() ); - aFormatFrmSize.SetWidth( nNewWidth ); - rParm.aShareFormats.SetSize( *pBox, aFormatFrmSize ); + SwFormatFrameSize aFormatFrameSize( pBox->GetFrameFormat()->GetFrameSize() ); + aFormatFrameSize.SetWidth( nNewWidth ); + rParm.aShareFormats.SetSize( *pBox, aFormatFrameSize ); } } } @@ -1071,7 +1071,7 @@ static void lcl_CalcNewWidths( std::list<sal_uInt16> &rSpanPos, ChangeList& rCha for( size_t nCurrBox = 0; nCurrBox < nCount; ++nCurrBox ) { SwTableBox* pBox = pLine->GetTabBoxes()[nCurrBox]; - SwTwips nCurrWidth = pBox->GetFrameFormat()->GetFrmSize().GetWidth(); + SwTwips nCurrWidth = pBox->GetFrameFormat()->GetFrameSize().GetWidth(); const long nRowSpan = pBox->getRowSpan(); const bool bCurrRowSpan = bTop ? nRowSpan < 0 : ( nRowSpan > 1 || nRowSpan < -1 ); @@ -1431,11 +1431,11 @@ SwTableBox* SwTable::GetTableBox( sal_uLong nSttIdx ) if ( pTableNd && pTableNd->GetTable().GetFrameFormat() ) pModify = pTableNd->GetTable().GetFrameFormat(); - SwFrm* pFrm = pModify ? SwIterator<SwFrm,SwModify>(*pModify).First() : nullptr; - while ( pFrm && !pFrm->IsCellFrm() ) - pFrm = pFrm->GetUpper(); - if ( pFrm ) - pRet = const_cast<SwTableBox*>(static_cast<SwCellFrm*>(pFrm)->GetTabBox()); + SwFrame* pFrame = pModify ? SwIterator<SwFrame,SwModify>(*pModify).First() : nullptr; + while ( pFrame && !pFrame->IsCellFrame() ) + pFrame = pFrame->GetUpper(); + if ( pFrame ) + pRet = const_cast<SwTableBox*>(static_cast<SwCellFrame*>(pFrame)->GetTabBox()); } // In case the layout doesn't exist yet or anything else goes wrong. @@ -1506,11 +1506,11 @@ SwFrameFormat* SwTableLine::ClaimFrameFormat() SwTableLineFormat *pNewFormat = pRet->GetDoc()->MakeTableLineFormat(); *pNewFormat = *pRet; - // register SwRowFrms that know me as clients at the new Format - SwIterator<SwRowFrm,SwFormat> aFrmIter( *pRet ); - for( SwRowFrm* pFrm = aFrmIter.First(); pFrm; pFrm = aFrmIter.Next() ) - if( pFrm->GetTabLine() == this ) - pFrm->RegisterToFormat( *pNewFormat ); + // register SwRowFrames that know me as clients at the new Format + SwIterator<SwRowFrame,SwFormat> aFrameIter( *pRet ); + for( SwRowFrame* pFrame = aFrameIter.First(); pFrame; pFrame = aFrameIter.Next() ) + if( pFrame->GetTabLine() == this ) + pFrame->RegisterToFormat( *pNewFormat ); // register myself pNewFormat->Add( this ); @@ -1525,10 +1525,10 @@ SwFrameFormat* SwTableLine::ClaimFrameFormat() void SwTableLine::ChgFrameFormat( SwTableLineFormat *pNewFormat ) { SwFrameFormat *pOld = GetFrameFormat(); - SwIterator<SwRowFrm,SwFormat> aIter( *pOld ); + SwIterator<SwRowFrame,SwFormat> aIter( *pOld ); - // First, re-register the Frms. - for( SwRowFrm* pRow = aIter.First(); pRow; pRow = aIter.Next() ) + // First, re-register the Frames. + for( SwRowFrame* pRow = aIter.First(); pRow; pRow = aIter.Next() ) { if( pRow->GetTabLine() == this ) { @@ -1537,11 +1537,11 @@ void SwTableLine::ChgFrameFormat( SwTableLineFormat *pNewFormat ) pRow->InvalidateSize(); pRow->_InvalidatePrt(); pRow->SetCompletePaint(); - pRow->ReinitializeFrmSizeAttrFlags(); + pRow->ReinitializeFrameSizeAttrFlags(); // #i35063# // consider 'split row allowed' attribute - SwTabFrm* pTab = pRow->FindTabFrm(); + SwTabFrame* pTab = pRow->FindTabFrame(); bool bInFollowFlowRow = false; const bool bInFirstNonHeadlineRow = pTab->IsFollow() && pRow == pTab->GetFirstNonHeadlineRow(); @@ -1570,18 +1570,18 @@ SwTwips SwTableLine::GetTableLineHeight( bool& bLayoutAvailable ) const { SwTwips nRet = 0; bLayoutAvailable = false; - SwIterator<SwRowFrm,SwFormat> aIter( *GetFrameFormat() ); + SwIterator<SwRowFrame,SwFormat> aIter( *GetFrameFormat() ); // A row could appear several times in headers/footers so only one chain of master/follow tables // will be accepted... - const SwTabFrm* pChain = nullptr; // My chain - for( SwRowFrm* pLast = aIter.First(); pLast; pLast = aIter.Next() ) + const SwTabFrame* pChain = nullptr; // My chain + for( SwRowFrame* pLast = aIter.First(); pLast; pLast = aIter.Next() ) { if( pLast->GetTabLine() == this ) { - const SwTabFrm* pTab = pLast->FindTabFrm(); + const SwTabFrame* pTab = pLast->FindTabFrame(); bLayoutAvailable = ( pTab && pTab->IsVertical() ) ? - ( 0 < pTab->Frm().Height() ) : - ( 0 < pTab->Frm().Width() ); + ( 0 < pTab->Frame().Height() ) : + ( 0 < pTab->Frame().Width() ); // The first one defines the chain, if a chain is defined, only members of the chain // will be added. @@ -1589,9 +1589,9 @@ SwTwips SwTableLine::GetTableLineHeight( bool& bLayoutAvailable ) const { pChain = pTab; // defines my chain (even it is already) if( pTab->IsVertical() ) - nRet += pLast->Frm().Width(); + nRet += pLast->Frame().Width(); else - nRet += pLast->Frm().Height(); + nRet += pLast->Frame().Height(); // Optimization, if there are no master/follows in my chain, nothing more to add if( !pTab->HasFollow() && !pTab->IsFollow() ) break; @@ -1743,9 +1743,9 @@ SwFrameFormat* SwTableBox::ClaimFrameFormat() pNewFormat->ResetFormatAttr( RES_BOXATR_FORMULA, RES_BOXATR_VALUE ); pNewFormat->UnlockModify(); - // re-register SwCellFrm objects that know me - SwIterator<SwCellFrm,SwFormat> aFrmIter( *pRet ); - for( SwCellFrm* pCell = aFrmIter.First(); pCell; pCell = aFrmIter.Next() ) + // re-register SwCellFrame objects that know me + SwIterator<SwCellFrame,SwFormat> aFrameIter( *pRet ); + for( SwCellFrame* pCell = aFrameIter.First(); pCell; pCell = aFrameIter.Next() ) if( pCell->GetTabBox() == this ) pCell->RegisterToFormat( *pNewFormat ); @@ -1761,10 +1761,10 @@ SwFrameFormat* SwTableBox::ClaimFrameFormat() void SwTableBox::ChgFrameFormat( SwTableBoxFormat* pNewFormat ) { SwFrameFormat *pOld = GetFrameFormat(); - SwIterator<SwCellFrm,SwFormat> aIter( *pOld ); + SwIterator<SwCellFrame,SwFormat> aIter( *pOld ); - // First, re-register the Frms. - for( SwCellFrm* pCell = aIter.First(); pCell; pCell = aIter.Next() ) + // First, re-register the Frames. + for( SwCellFrame* pCell = aIter.First(); pCell; pCell = aIter.Next() ) { if( pCell->GetTabBox() == this ) { @@ -1779,10 +1779,10 @@ void SwTableBox::ChgFrameFormat( SwTableBoxFormat* pNewFormat ) // make sure that the row will be formatted, in order // to have the correct Get(Top|Bottom)MarginForLowers values // set at the row. - const SwTabFrm* pTab = pCell->FindTabFrm(); + const SwTabFrame* pTab = pCell->FindTabFrame(); if ( pTab && pTab->IsCollapsingBorders() ) { - SwFrm* pRow = pCell->GetUpper(); + SwFrame* pRow = pCell->GetUpper(); pRow->_InvalidateSize(); pRow->_InvalidatePrt(); } @@ -1927,7 +1927,7 @@ bool SwTable::GetInfo( SfxPoolItem& rInfo ) const break; case RES_CONTENT_VISIBLE: - static_cast<SwPtrMsgPoolItem&>(rInfo).pObject = SwIterator<SwFrm,SwFormat>( *GetFrameFormat() ).First(); + static_cast<SwPtrMsgPoolItem&>(rInfo).pObject = SwIterator<SwFrame,SwFormat>( *GetFrameFormat() ).First(); return false; } return true; @@ -2566,14 +2566,14 @@ void SwTableBox::ActualiseValueBox() struct SwTableCellInfo::Impl { const SwTable * m_pTable; - const SwCellFrm * m_pCellFrm; - const SwTabFrm * m_pTabFrm; + const SwCellFrame * m_pCellFrame; + const SwTabFrame * m_pTabFrame; typedef ::std::set<const SwTableBox *> TableBoxes_t; TableBoxes_t m_HandledTableBoxes; public: Impl() - : m_pTable(nullptr), m_pCellFrm(nullptr), m_pTabFrm(nullptr) + : m_pTable(nullptr), m_pCellFrame(nullptr), m_pTabFrame(nullptr) { } @@ -2583,42 +2583,42 @@ public: { m_pTable = pTable; SwFrameFormat * pFrameFormat = m_pTable->GetFrameFormat(); - m_pTabFrm = SwIterator<SwTabFrm,SwFormat>(*pFrameFormat).First(); - if (m_pTabFrm && m_pTabFrm->IsFollow()) - m_pTabFrm = m_pTabFrm->FindMaster(true); + m_pTabFrame = SwIterator<SwTabFrame,SwFormat>(*pFrameFormat).First(); + if (m_pTabFrame && m_pTabFrame->IsFollow()) + m_pTabFrame = m_pTabFrame->FindMaster(true); } - const SwCellFrm * getCellFrm() const { return m_pCellFrm; } + const SwCellFrame * getCellFrame() const { return m_pCellFrame; } - const SwFrm * getNextFrmInTable(const SwFrm * pFrm); - const SwCellFrm * getNextCellFrm(const SwFrm * pFrm); - const SwCellFrm * getNextTableBoxsCellFrm(const SwFrm * pFrm); + const SwFrame * getNextFrameInTable(const SwFrame * pFrame); + const SwCellFrame * getNextCellFrame(const SwFrame * pFrame); + const SwCellFrame * getNextTableBoxsCellFrame(const SwFrame * pFrame); bool getNext(); }; -const SwFrm * SwTableCellInfo::Impl::getNextFrmInTable(const SwFrm * pFrm) +const SwFrame * SwTableCellInfo::Impl::getNextFrameInTable(const SwFrame * pFrame) { - const SwFrm * pResult = nullptr; + const SwFrame * pResult = nullptr; - if (((! pFrm->IsTabFrm()) || pFrm == m_pTabFrm) && pFrm->GetLower()) - pResult = pFrm->GetLower(); - else if (pFrm->GetNext()) - pResult = pFrm->GetNext(); + if (((! pFrame->IsTabFrame()) || pFrame == m_pTabFrame) && pFrame->GetLower()) + pResult = pFrame->GetLower(); + else if (pFrame->GetNext()) + pResult = pFrame->GetNext(); else { - while (pFrm->GetUpper() != nullptr) + while (pFrame->GetUpper() != nullptr) { - pFrm = pFrm->GetUpper(); + pFrame = pFrame->GetUpper(); - if (pFrm->IsTabFrm()) + if (pFrame->IsTabFrame()) { - m_pTabFrm = static_cast<const SwTabFrm *>(pFrm)->GetFollow(); - pResult = m_pTabFrm; + m_pTabFrame = static_cast<const SwTabFrame *>(pFrame)->GetFollow(); + pResult = m_pTabFrame; break; } - else if (pFrm->GetNext()) + else if (pFrame->GetNext()) { - pResult = pFrm->GetNext(); + pResult = pFrame->GetNext(); break; } } @@ -2627,15 +2627,15 @@ const SwFrm * SwTableCellInfo::Impl::getNextFrmInTable(const SwFrm * pFrm) return pResult; } -const SwCellFrm * SwTableCellInfo::Impl::getNextCellFrm(const SwFrm * pFrm) +const SwCellFrame * SwTableCellInfo::Impl::getNextCellFrame(const SwFrame * pFrame) { - const SwCellFrm * pResult = nullptr; + const SwCellFrame * pResult = nullptr; - while ((pFrm = getNextFrmInTable(pFrm)) != nullptr) + while ((pFrame = getNextFrameInTable(pFrame)) != nullptr) { - if (pFrm->IsCellFrm()) + if (pFrame->IsCellFrame()) { - pResult = static_cast<const SwCellFrm *>(pFrm); + pResult = static_cast<const SwCellFrame *>(pFrame); break; } } @@ -2643,19 +2643,19 @@ const SwCellFrm * SwTableCellInfo::Impl::getNextCellFrm(const SwFrm * pFrm) return pResult; } -const SwCellFrm * SwTableCellInfo::Impl::getNextTableBoxsCellFrm(const SwFrm * pFrm) +const SwCellFrame * SwTableCellInfo::Impl::getNextTableBoxsCellFrame(const SwFrame * pFrame) { - const SwCellFrm * pResult = nullptr; + const SwCellFrame * pResult = nullptr; - while ((pFrm = getNextCellFrm(pFrm)) != nullptr) + while ((pFrame = getNextCellFrame(pFrame)) != nullptr) { - const SwCellFrm * pCellFrm = static_cast<const SwCellFrm *>(pFrm); - const SwTableBox * pTabBox = pCellFrm->GetTabBox(); + const SwCellFrame * pCellFrame = static_cast<const SwCellFrame *>(pFrame); + const SwTableBox * pTabBox = pCellFrame->GetTabBox(); TableBoxes_t::const_iterator aIt = m_HandledTableBoxes.find(pTabBox); if (aIt == m_HandledTableBoxes.end()) { - pResult = pCellFrm; + pResult = pCellFrame; m_HandledTableBoxes.insert(pTabBox); break; } @@ -2664,22 +2664,22 @@ const SwCellFrm * SwTableCellInfo::Impl::getNextTableBoxsCellFrm(const SwFrm * p return pResult; } -const SwCellFrm * SwTableCellInfo::getCellFrm() const +const SwCellFrame * SwTableCellInfo::getCellFrame() const { - return m_pImpl->getCellFrm(); + return m_pImpl->getCellFrame(); } bool SwTableCellInfo::Impl::getNext() { - if (m_pCellFrm == nullptr) + if (m_pCellFrame == nullptr) { - if (m_pTabFrm != nullptr) - m_pCellFrm = Impl::getNextTableBoxsCellFrm(m_pTabFrm); + if (m_pTabFrame != nullptr) + m_pCellFrame = Impl::getNextTableBoxsCellFrame(m_pTabFrame); } else - m_pCellFrm = Impl::getNextTableBoxsCellFrm(m_pCellFrm); + m_pCellFrame = Impl::getNextTableBoxsCellFrame(m_pCellFrame); - return m_pCellFrm != nullptr; + return m_pCellFrame != nullptr; } SwTableCellInfo::SwTableCellInfo(const SwTable * pTable) @@ -2701,8 +2701,8 @@ SwRect SwTableCellInfo::getRect() const { SwRect aRet; - if (getCellFrm() != nullptr) - aRet = getCellFrm()->Frm(); + if (getCellFrame() != nullptr) + aRet = getCellFrame()->Frame(); return aRet; } @@ -2711,8 +2711,8 @@ const SwTableBox * SwTableCellInfo::getTableBox() const { const SwTableBox * pRet = nullptr; - if (getCellFrm() != nullptr) - pRet = getCellFrm()->GetTabBox(); + if (getCellFrame() != nullptr) + pRet = getCellFrame()->GetTabBox(); return pRet; } @@ -2726,7 +2726,7 @@ bool SwTable::HasLayout() const { const SwFrameFormat* pFrameFormat = GetFrameFormat(); //a table in a clipboard document doesn't have any layout information - return pFrameFormat && SwIterator<SwTabFrm,SwFormat>(*pFrameFormat).First(); + return pFrameFormat && SwIterator<SwTabFrame,SwFormat>(*pFrameFormat).First(); } void SwTableLine::RegisterToFormat( SwFormat& rFormat ) diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx index f5db518de93c..a3a18bf6e687 100644 --- a/sw/source/core/text/EnhancedPDFExportHelper.cxx +++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx @@ -85,7 +85,7 @@ TableColumnsMap SwEnhancedPDFExportHelper::aTableColumnsMap; LinkIdMap SwEnhancedPDFExportHelper::aLinkIdMap; NumListIdMap SwEnhancedPDFExportHelper::aNumListIdMap; NumListBodyIdMap SwEnhancedPDFExportHelper::aNumListBodyIdMap; -FrmTagIdMap SwEnhancedPDFExportHelper::aFrmTagIdMap; +FrameTagIdMap SwEnhancedPDFExportHelper::aFrameTagIdMap; LanguageType SwEnhancedPDFExportHelper::eLanguageDefault = 0; @@ -162,14 +162,14 @@ const char aLinkString[] = "Link"; const char aNoteString[] = "Note"; // returns true if first paragraph in cell frame has 'table heading' style -bool lcl_IsHeadlineCell( const SwCellFrm& rCellFrm ) +bool lcl_IsHeadlineCell( const SwCellFrame& rCellFrame ) { bool bRet = false; - const SwContentFrm *pCnt = rCellFrm.ContainsContent(); - if ( pCnt && pCnt->IsTextFrm() ) + const SwContentFrame *pCnt = rCellFrame.ContainsContent(); + if ( pCnt && pCnt->IsTextFrame() ) { - const SwTextNode* pTextNode = static_cast<const SwTextFrm*>(pCnt)->GetTextNode(); + const SwTextNode* pTextNode = static_cast<const SwTextFrame*>(pCnt)->GetTextNode(); const SwFormat* pTextFormat = pTextNode->GetFormatColl(); OUString sStyleName; @@ -181,20 +181,20 @@ bool lcl_IsHeadlineCell( const SwCellFrm& rCellFrm ) } // List all frames for which the NonStructElement tag is set: -bool lcl_IsInNonStructEnv( const SwFrm& rFrm ) +bool lcl_IsInNonStructEnv( const SwFrame& rFrame ) { bool bRet = false; - if ( nullptr != rFrm.FindFooterOrHeader() && - !rFrm.IsHeaderFrm() && !rFrm.IsFooterFrm() ) + if ( nullptr != rFrame.FindFooterOrHeader() && + !rFrame.IsHeaderFrame() && !rFrame.IsFooterFrame() ) { bRet = true; } - else if ( rFrm.IsInTab() && !rFrm.IsTabFrm() ) + else if ( rFrame.IsInTab() && !rFrame.IsTabFrame() ) { - const SwTabFrm* pTabFrm = rFrm.FindTabFrm(); - if ( rFrm.GetUpper() != pTabFrm && - pTabFrm->IsFollow() && pTabFrm->IsInHeadline( rFrm ) ) + const SwTabFrame* pTabFrame = rFrame.FindTabFrame(); + if ( rFrame.GetUpper() != pTabFrame && + pTabFrame->IsFollow() && pTabFrame->IsInHeadline( rFrame ) ) bRet = true; } @@ -202,25 +202,25 @@ bool lcl_IsInNonStructEnv( const SwFrm& rFrm ) } // Generate key from frame for reopening tags: -void* lcl_GetKeyFromFrame( const SwFrm& rFrm ) +void* lcl_GetKeyFromFrame( const SwFrame& rFrame ) { void* pKey = nullptr; - if ( rFrm.IsPageFrm() ) - pKey = const_cast<void*>(static_cast<void const *>(&(static_cast<const SwPageFrm&>(rFrm).GetFormat()->getIDocumentSettingAccess()))); - else if ( rFrm.IsTextFrm() ) - pKey = const_cast<void*>(static_cast<void const *>(static_cast<const SwTextFrm&>(rFrm).GetTextNode())); - else if ( rFrm.IsSctFrm() ) - pKey = const_cast<void*>(static_cast<void const *>(static_cast<const SwSectionFrm&>(rFrm).GetSection())); - else if ( rFrm.IsTabFrm() ) - pKey = const_cast<void*>(static_cast<void const *>(static_cast<const SwTabFrm&>(rFrm).GetTable())); - else if ( rFrm.IsRowFrm() ) - pKey = const_cast<void*>(static_cast<void const *>(static_cast<const SwRowFrm&>(rFrm).GetTabLine())); - else if ( rFrm.IsCellFrm() ) + if ( rFrame.IsPageFrame() ) + pKey = const_cast<void*>(static_cast<void const *>(&(static_cast<const SwPageFrame&>(rFrame).GetFormat()->getIDocumentSettingAccess()))); + else if ( rFrame.IsTextFrame() ) + pKey = const_cast<void*>(static_cast<void const *>(static_cast<const SwTextFrame&>(rFrame).GetTextNode())); + else if ( rFrame.IsSctFrame() ) + pKey = const_cast<void*>(static_cast<void const *>(static_cast<const SwSectionFrame&>(rFrame).GetSection())); + else if ( rFrame.IsTabFrame() ) + pKey = const_cast<void*>(static_cast<void const *>(static_cast<const SwTabFrame&>(rFrame).GetTable())); + else if ( rFrame.IsRowFrame() ) + pKey = const_cast<void*>(static_cast<void const *>(static_cast<const SwRowFrame&>(rFrame).GetTabLine())); + else if ( rFrame.IsCellFrame() ) { - const SwTabFrm* pTabFrm = rFrm.FindTabFrm(); - const SwTable* pTable = pTabFrm->GetTable(); - pKey = const_cast<void*>(static_cast<void const *>(& static_cast<const SwCellFrm&>(rFrm).GetTabBox()->FindStartOfRowSpan( *pTable ))); + const SwTabFrame* pTabFrame = rFrame.FindTabFrame(); + const SwTable* pTable = pTabFrame->GetTable(); + pKey = const_cast<void*>(static_cast<void const *>(& static_cast<const SwCellFrame&>(rFrame).GetTabBox()->FindStartOfRowSpan( *pTable ))); } return pKey; @@ -261,13 +261,13 @@ bool lcl_HasPreviousParaSameNumRule( const SwTextNode& rNode ) } // end namespace SwTaggedPDFHelper::SwTaggedPDFHelper( const Num_Info* pNumInfo, - const Frm_Info* pFrmInfo, + const Frame_Info* pFrameInfo, const Por_Info* pPorInfo, OutputDevice& rOut ) : nEndStructureElement( 0 ), nRestoreCurrentTag( -1 ), mpNumInfo( pNumInfo ), - mpFrmInfo( pFrmInfo ), + mpFrameInfo( pFrameInfo ), mpPorInfo( pPorInfo ) { mpPDFExtOutDevData = @@ -281,7 +281,7 @@ SwTaggedPDFHelper::SwTaggedPDFHelper( const Num_Info* pNumInfo, #endif if ( mpNumInfo ) BeginNumberedListStructureElements(); - else if ( mpFrmInfo ) + else if ( mpFrameInfo ) BeginBlockStructureElements(); else if ( mpPorInfo ) BeginInlineStructureElements(); @@ -321,47 +321,47 @@ bool SwTaggedPDFHelper::CheckReopenTag() sal_Int32 nReopenTag = -1; bool bContinue = false; // in some cases we just have to reopen a tag without early returning - if ( mpFrmInfo ) + if ( mpFrameInfo ) { - const SwFrm& rFrm = mpFrmInfo->mrFrm; - const SwFrm* pKeyFrm = nullptr; + const SwFrame& rFrame = mpFrameInfo->mrFrame; + const SwFrame* pKeyFrame = nullptr; // Reopen an existing structure element if - // - rFrm is not the first page frame (reopen Document tag) - // - rFrm is a follow frame (reopen Master tag) - // - rFrm is a fly frame anchored at content (reopen Anchor paragraph tag) - // - rFrm is a fly frame anchored at page (reopen Document tag) - // - rFrm is a follow flow row (reopen TableRow tag) - // - rFrm is a cell frame in a follow flow row (reopen TableData tag) - if ( ( rFrm.IsPageFrm() && static_cast<const SwPageFrm&>(rFrm).GetPrev() ) || - ( rFrm.IsFlowFrm() && SwFlowFrm::CastFlowFrm(&rFrm)->IsFollow() ) || - ( rFrm.IsRowFrm() && rFrm.IsInFollowFlowRow() ) || - ( rFrm.IsCellFrm() && const_cast<SwFrm&>(rFrm).GetPrevCellLeaf( MAKEPAGE_NONE ) ) ) + // - rFrame is not the first page frame (reopen Document tag) + // - rFrame is a follow frame (reopen Master tag) + // - rFrame is a fly frame anchored at content (reopen Anchor paragraph tag) + // - rFrame is a fly frame anchored at page (reopen Document tag) + // - rFrame is a follow flow row (reopen TableRow tag) + // - rFrame is a cell frame in a follow flow row (reopen TableData tag) + if ( ( rFrame.IsPageFrame() && static_cast<const SwPageFrame&>(rFrame).GetPrev() ) || + ( rFrame.IsFlowFrame() && SwFlowFrame::CastFlowFrame(&rFrame)->IsFollow() ) || + ( rFrame.IsRowFrame() && rFrame.IsInFollowFlowRow() ) || + ( rFrame.IsCellFrame() && const_cast<SwFrame&>(rFrame).GetPrevCellLeaf( MAKEPAGE_NONE ) ) ) { - pKeyFrm = &rFrm; + pKeyFrame = &rFrame; } - else if ( rFrm.IsFlyFrm() ) + else if ( rFrame.IsFlyFrame() ) { const SwFormatAnchor& rAnchor = - static_cast<const SwFlyFrm*>(&rFrm)->GetFormat()->GetAnchor(); + static_cast<const SwFlyFrame*>(&rFrame)->GetFormat()->GetAnchor(); if ((FLY_AT_PARA == rAnchor.GetAnchorId()) || (FLY_AT_CHAR == rAnchor.GetAnchorId()) || (FLY_AT_PAGE == rAnchor.GetAnchorId())) { - pKeyFrm = static_cast<const SwFlyFrm&>(rFrm).GetAnchorFrm(); + pKeyFrame = static_cast<const SwFlyFrame&>(rFrame).GetAnchorFrame(); bContinue = true; } } - if ( pKeyFrm ) + if ( pKeyFrame ) { - void* pKey = lcl_GetKeyFromFrame( *pKeyFrm ); + void* pKey = lcl_GetKeyFromFrame( *pKeyFrame ); if ( pKey ) { - FrmTagIdMap& rFrmTagIdMap = SwEnhancedPDFExportHelper::GetFrmTagIdMap(); - const FrmTagIdMap::const_iterator aIter = rFrmTagIdMap.find( pKey ); - if ( aIter != rFrmTagIdMap.end() ) + FrameTagIdMap& rFrameTagIdMap = SwEnhancedPDFExportHelper::GetFrameTagIdMap(); + const FrameTagIdMap::const_iterator aIter = rFrameTagIdMap.find( pKey ); + if ( aIter != rFrameTagIdMap.end() ) nReopenTag = (*aIter).second; } } @@ -415,15 +415,15 @@ void SwTaggedPDFHelper::BeginTag( vcl::PDFWriter::StructElement eType, const OUS // Store the id of the current structure element if // - it is a list structure element // - it is a list body element with children - // - rFrm is the first page frame - // - rFrm is a master frame - // - rFrm has objects anchored to it - // - rFrm is a row frame or cell frame in a split table row + // - rFrame is the first page frame + // - rFrame is a master frame + // - rFrame has objects anchored to it + // - rFrame is a row frame or cell frame in a split table row if ( mpNumInfo ) { - const SwTextFrm& rTextFrm = static_cast<const SwTextFrm&>(mpNumInfo->mrFrm); - const SwTextNode* pTextNd = rTextFrm.GetTextNode(); + const SwTextFrame& rTextFrame = static_cast<const SwTextFrame&>(mpNumInfo->mrFrame); + const SwTextNode* pTextNd = rTextFrame.GetTextNode(); const SwNodeNum* pNodeNum = pTextNd->GetNum(); if ( vcl::PDFWriter::List == eType ) @@ -437,22 +437,22 @@ void SwTaggedPDFHelper::BeginTag( vcl::PDFWriter::StructElement eType, const OUS rNumListBodyIdMap[ pNodeNum ] = nId; } } - else if ( mpFrmInfo ) + else if ( mpFrameInfo ) { - const SwFrm& rFrm = mpFrmInfo->mrFrm; + const SwFrame& rFrame = mpFrameInfo->mrFrame; - if ( ( rFrm.IsPageFrm() && !static_cast<const SwPageFrm&>(rFrm).GetPrev() ) || - ( rFrm.IsFlowFrm() && !SwFlowFrm::CastFlowFrm(&rFrm)->IsFollow() && SwFlowFrm::CastFlowFrm(&rFrm)->HasFollow() ) || - ( rFrm.IsTextFrm() && rFrm.GetDrawObjs() ) || - ( rFrm.IsRowFrm() && rFrm.IsInSplitTableRow() ) || - ( rFrm.IsCellFrm() && const_cast<SwFrm&>(rFrm).GetNextCellLeaf( MAKEPAGE_NONE ) ) ) + if ( ( rFrame.IsPageFrame() && !static_cast<const SwPageFrame&>(rFrame).GetPrev() ) || + ( rFrame.IsFlowFrame() && !SwFlowFrame::CastFlowFrame(&rFrame)->IsFollow() && SwFlowFrame::CastFlowFrame(&rFrame)->HasFollow() ) || + ( rFrame.IsTextFrame() && rFrame.GetDrawObjs() ) || + ( rFrame.IsRowFrame() && rFrame.IsInSplitTableRow() ) || + ( rFrame.IsCellFrame() && const_cast<SwFrame&>(rFrame).GetNextCellLeaf( MAKEPAGE_NONE ) ) ) { - const void* pKey = lcl_GetKeyFromFrame( rFrm ); + const void* pKey = lcl_GetKeyFromFrame( rFrame ); if ( pKey ) { - FrmTagIdMap& rFrmTagIdMap = SwEnhancedPDFExportHelper::GetFrmTagIdMap(); - rFrmTagIdMap[ pKey ] = nId; + FrameTagIdMap& rFrameTagIdMap = SwEnhancedPDFExportHelper::GetFrameTagIdMap(); + rFrameTagIdMap[ pKey ] = nId; } } } @@ -478,10 +478,10 @@ void SwTaggedPDFHelper::SetAttributes( vcl::PDFWriter::StructElement eType ) /* * ATTRIBUTES FOR BLSE */ - if ( mpFrmInfo ) + if ( mpFrameInfo ) { - const SwFrm* pFrm = &mpFrmInfo->mrFrm; - SWRECTFN( pFrm ) + const SwFrame* pFrame = &mpFrameInfo->mrFrame; + SWRECTFN( pFrame ) bool bPlacement = false; bool bWritingMode = false; @@ -578,9 +578,9 @@ void SwTaggedPDFHelper::SetAttributes( vcl::PDFWriter::StructElement eType ) if ( bWritingMode ) { - eVal = pFrm->IsVertical() ? + eVal = pFrame->IsVertical() ? vcl::PDFWriter::TbRl : - pFrm->IsRightToLeft() ? + pFrame->IsRightToLeft() ? vcl::PDFWriter::RlTb : vcl::PDFWriter::LrTb; @@ -590,37 +590,37 @@ void SwTaggedPDFHelper::SetAttributes( vcl::PDFWriter::StructElement eType ) if ( bSpaceBefore ) { - nVal = (pFrm->*fnRect->fnGetTopMargin)(); + nVal = (pFrame->*fnRect->fnGetTopMargin)(); if ( 0 != nVal ) mpPDFExtOutDevData->SetStructureAttributeNumerical( vcl::PDFWriter::SpaceBefore, nVal ); } if ( bSpaceAfter ) { - nVal = (pFrm->*fnRect->fnGetBottomMargin)(); + nVal = (pFrame->*fnRect->fnGetBottomMargin)(); if ( 0 != nVal ) mpPDFExtOutDevData->SetStructureAttributeNumerical( vcl::PDFWriter::SpaceAfter, nVal ); } if ( bStartIndent ) { - nVal = (pFrm->*fnRect->fnGetLeftMargin)(); + nVal = (pFrame->*fnRect->fnGetLeftMargin)(); if ( 0 != nVal ) mpPDFExtOutDevData->SetStructureAttributeNumerical( vcl::PDFWriter::StartIndent, nVal ); } if ( bEndIndent ) { - nVal = (pFrm->*fnRect->fnGetRightMargin)(); + nVal = (pFrame->*fnRect->fnGetRightMargin)(); if ( 0 != nVal ) mpPDFExtOutDevData->SetStructureAttributeNumerical( vcl::PDFWriter::EndIndent, nVal ); } if ( bTextIndent ) { - OSL_ENSURE( pFrm->IsTextFrm(), "Frame type <-> tag attribute mismatch" ); + OSL_ENSURE( pFrame->IsTextFrame(), "Frame type <-> tag attribute mismatch" ); const SvxLRSpaceItem &rSpace = - static_cast<const SwTextFrm*>(pFrm)->GetTextNode()->GetSwAttrSet().GetLRSpace(); + static_cast<const SwTextFrame*>(pFrame)->GetTextNode()->GetSwAttrSet().GetLRSpace(); nVal = rSpace.GetTextFirstLineOfst(); if ( 0 != nVal ) mpPDFExtOutDevData->SetStructureAttributeNumerical( vcl::PDFWriter::TextIndent, nVal ); @@ -628,12 +628,12 @@ void SwTaggedPDFHelper::SetAttributes( vcl::PDFWriter::StructElement eType ) if ( bTextAlign ) { - OSL_ENSURE( pFrm->IsTextFrm(), "Frame type <-> tag attribute mismatch" ); - const SwAttrSet& aSet = static_cast<const SwTextFrm*>(pFrm)->GetTextNode()->GetSwAttrSet(); + OSL_ENSURE( pFrame->IsTextFrame(), "Frame type <-> tag attribute mismatch" ); + const SwAttrSet& aSet = static_cast<const SwTextFrame*>(pFrame)->GetTextNode()->GetSwAttrSet(); const SvxAdjust nAdjust = aSet.GetAdjust().GetAdjust(); if ( SVX_ADJUST_BLOCK == nAdjust || SVX_ADJUST_CENTER == nAdjust || - ( (pFrm->IsRightToLeft() && SVX_ADJUST_LEFT == nAdjust) || - (!pFrm->IsRightToLeft() && SVX_ADJUST_RIGHT == nAdjust) ) ) + ( (pFrame->IsRightToLeft() && SVX_ADJUST_LEFT == nAdjust) || + (!pFrame->IsRightToLeft() && SVX_ADJUST_RIGHT == nAdjust) ) ) { eVal = SVX_ADJUST_BLOCK == nAdjust ? vcl::PDFWriter::Justify : @@ -647,12 +647,12 @@ void SwTaggedPDFHelper::SetAttributes( vcl::PDFWriter::StructElement eType ) if ( bAlternateText ) { - OSL_ENSURE( pFrm->IsFlyFrm(), "Frame type <-> tag attribute mismatch" ); - const SwFlyFrm* pFly = static_cast<const SwFlyFrm*>(pFrm); - if ( pFly->Lower() && pFly->Lower()->IsNoTextFrm() ) + OSL_ENSURE( pFrame->IsFlyFrame(), "Frame type <-> tag attribute mismatch" ); + const SwFlyFrame* pFly = static_cast<const SwFlyFrame*>(pFrame); + if ( pFly->Lower() && pFly->Lower()->IsNoTextFrame() ) { - const SwNoTextFrm* pNoTextFrm = static_cast<const SwNoTextFrm*>(pFly->Lower()); - const SwNoTextNode* pNoTextNode = static_cast<const SwNoTextNode*>(pNoTextFrm->GetNode()); + const SwNoTextFrame* pNoTextFrame = static_cast<const SwNoTextFrame*>(pFly->Lower()); + const SwNoTextNode* pNoTextNode = static_cast<const SwNoTextNode*>(pNoTextFrame->GetNode()); const OUString aAlternateText( pNoTextNode->GetTitle() ); mpPDFExtOutDevData->SetAlternateText( aAlternateText ); @@ -661,13 +661,13 @@ void SwTaggedPDFHelper::SetAttributes( vcl::PDFWriter::StructElement eType ) if ( bWidth ) { - nVal = (pFrm->Frm().*fnRect->fnGetWidth)(); + nVal = (pFrame->Frame().*fnRect->fnGetWidth)(); mpPDFExtOutDevData->SetStructureAttributeNumerical( vcl::PDFWriter::Width, nVal ); } if ( bHeight ) { - nVal = (pFrm->Frm().*fnRect->fnGetHeight)(); + nVal = (pFrame->Frame().*fnRect->fnGetHeight)(); mpPDFExtOutDevData->SetStructureAttributeNumerical( vcl::PDFWriter::Height, nVal ); } @@ -675,17 +675,17 @@ void SwTaggedPDFHelper::SetAttributes( vcl::PDFWriter::StructElement eType ) { // BBox only for non-split tables: if ( vcl::PDFWriter::Table != eType || - ( pFrm->IsTabFrm() && - !static_cast<const SwTabFrm*>(pFrm)->IsFollow() && - !static_cast<const SwTabFrm*>(pFrm)->HasFollow() ) ) + ( pFrame->IsTabFrame() && + !static_cast<const SwTabFrame*>(pFrame)->IsFollow() && + !static_cast<const SwTabFrame*>(pFrame)->HasFollow() ) ) { - mpPDFExtOutDevData->SetStructureBoundingBox(pFrm->Frm().SVRect()); + mpPDFExtOutDevData->SetStructureBoundingBox(pFrame->Frame().SVRect()); } } if ( bRowSpan ) { - const SwCellFrm* pThisCell = dynamic_cast<const SwCellFrm*>(pFrm); + const SwCellFrame* pThisCell = dynamic_cast<const SwCellFrame*>(pFrame); if ( pThisCell ) { nVal = pThisCell->GetTabBox()->getRowSpan(); @@ -693,15 +693,15 @@ void SwTaggedPDFHelper::SetAttributes( vcl::PDFWriter::StructElement eType ) mpPDFExtOutDevData->SetStructureAttributeNumerical( vcl::PDFWriter::RowSpan, nVal ); // calculate colspan: - const SwTabFrm* pTabFrm = pThisCell->FindTabFrm(); - const SwTable* pTable = pTabFrm->GetTable(); + const SwTabFrame* pTabFrame = pThisCell->FindTabFrame(); + const SwTable* pTable = pTabFrame->GetTable(); - SWRECTFNX( pTabFrm ) + SWRECTFNX( pTabFrame ) const TableColumnsMapEntry& rCols = SwEnhancedPDFExportHelper::GetTableColumnsMap()[ pTable ]; - const long nLeft = (pThisCell->Frm().*fnRectX->fnGetLeft)(); - const long nRight = (pThisCell->Frm().*fnRectX->fnGetRight)(); + const long nLeft = (pThisCell->Frame().*fnRectX->fnGetLeft)(); + const long nRight = (pThisCell->Frame().*fnRectX->fnGetRight)(); const TableColumnsMapEntry::const_iterator aLeftIter = rCols.find( nLeft ); const TableColumnsMapEntry::const_iterator aRightIter = rCols.find( nRight ); @@ -832,16 +832,16 @@ void SwTaggedPDFHelper::BeginNumberedListStructureElements() if ( !mpNumInfo ) return; - const SwFrm& rFrm = mpNumInfo->mrFrm; - OSL_ENSURE( rFrm.IsTextFrm(), "numbered only for text frames" ); - const SwTextFrm& rTextFrm = static_cast<const SwTextFrm&>(rFrm); + const SwFrame& rFrame = mpNumInfo->mrFrame; + OSL_ENSURE( rFrame.IsTextFrame(), "numbered only for text frames" ); + const SwTextFrame& rTextFrame = static_cast<const SwTextFrame&>(rFrame); // Lowers of NonStructureElements should not be considered: - if ( lcl_IsInNonStructEnv( rTextFrm ) || rTextFrm.IsFollow() ) + if ( lcl_IsInNonStructEnv( rTextFrame ) || rTextFrame.IsFollow() ) return; - const SwTextNode* pTextNd = rTextFrm.GetTextNode(); + const SwTextNode* pTextNd = rTextFrame.GetTextNode(); const SwNumRule* pNumRule = pTextNd->GetNumRule(); const SwNodeNum* pNodeNum = pTextNd->GetNum(); @@ -965,22 +965,22 @@ void SwTaggedPDFHelper::BeginNumberedListStructureElements() void SwTaggedPDFHelper::BeginBlockStructureElements() { - const SwFrm* pFrm = &mpFrmInfo->mrFrm; + const SwFrame* pFrame = &mpFrameInfo->mrFrame; // Lowers of NonStructureElements should not be considered: - if ( lcl_IsInNonStructEnv( *pFrm ) ) + if ( lcl_IsInNonStructEnv( *pFrame ) ) return; // Check if we have to reopen an existing structure element. - // This has to be done e.g., if pFrm is a follow frame. + // This has to be done e.g., if pFrame is a follow frame. if ( CheckReopenTag() ) return; sal_uInt16 nPDFType = USHRT_MAX; OUString aPDFType; - switch ( pFrm->GetType() ) + switch ( pFrame->GetType() ) { /* * GROUPING ELEMENTS @@ -1026,7 +1026,7 @@ void SwTaggedPDFHelper::BeginBlockStructureElements() { const SwSection* pSection = - static_cast<const SwSectionFrm*>(pFrm)->GetSection(); + static_cast<const SwSectionFrame*>(pFrame)->GetSection(); if ( TOX_CONTENT_SECTION == pSection->GetType() ) { const SwTOXBase* pTOXBase = pSection->GetTOXBase(); @@ -1059,7 +1059,7 @@ void SwTaggedPDFHelper::BeginBlockStructureElements() case FRM_TXT : { const SwTextNode* pTextNd = - static_cast<const SwTextFrm*>(pFrm)->GetTextNode(); + static_cast<const SwTextFrame*>(pFrame)->GetTextNode(); const SwFormat* pTextFormat = pTextNd->GetFormatColl(); const SwFormat* pParentTextFormat = pTextFormat ? pTextFormat->DerivedFrom() : nullptr; @@ -1143,11 +1143,11 @@ void SwTaggedPDFHelper::BeginBlockStructureElements() // Section: TOCI - else if ( pFrm->IsInSct() ) + else if ( pFrame->IsInSct() ) { - const SwSectionFrm* pSctFrm = pFrm->FindSctFrm(); + const SwSectionFrame* pSctFrame = pFrame->FindSctFrame(); const SwSection* pSection = - static_cast<const SwSectionFrm*>(pSctFrm)->GetSection(); + static_cast<const SwSectionFrame*>(pSctFrame)->GetSection(); if ( TOX_CONTENT_SECTION == pSection->GetType() ) { @@ -1164,46 +1164,46 @@ void SwTaggedPDFHelper::BeginBlockStructureElements() case FRM_TAB : - // TabFrm: Table + // TabFrame: Table nPDFType = vcl::PDFWriter::Table; aPDFType = aTableString; { // set up table column data: - const SwTabFrm* pTabFrm = static_cast<const SwTabFrm*>(pFrm); - const SwTable* pTable = pTabFrm->GetTable(); + const SwTabFrame* pTabFrame = static_cast<const SwTabFrame*>(pFrame); + const SwTable* pTable = pTabFrame->GetTable(); TableColumnsMap& rTableColumnsMap = SwEnhancedPDFExportHelper::GetTableColumnsMap(); const TableColumnsMap::const_iterator aIter = rTableColumnsMap.find( pTable ); if ( aIter == rTableColumnsMap.end() ) { - SWRECTFN( pTabFrm ) + SWRECTFN( pTabFrame ) TableColumnsMapEntry& rCols = rTableColumnsMap[ pTable ]; - const SwTabFrm* pMasterFrm = pTabFrm->IsFollow() ? pTabFrm->FindMaster( true ) : pTabFrm; + const SwTabFrame* pMasterFrame = pTabFrame->IsFollow() ? pTabFrame->FindMaster( true ) : pTabFrame; - while ( pMasterFrm ) + while ( pMasterFrame ) { - const SwRowFrm* pRowFrm = static_cast<const SwRowFrm*>(pMasterFrm->GetLower()); + const SwRowFrame* pRowFrame = static_cast<const SwRowFrame*>(pMasterFrame->GetLower()); - while ( pRowFrm ) + while ( pRowFrame ) { - const SwFrm* pCellFrm = pRowFrm->GetLower(); + const SwFrame* pCellFrame = pRowFrame->GetLower(); - const long nLeft = (pCellFrm->Frm().*fnRect->fnGetLeft)(); + const long nLeft = (pCellFrame->Frame().*fnRect->fnGetLeft)(); rCols.insert( nLeft ); - while ( pCellFrm ) + while ( pCellFrame ) { - const long nRight = (pCellFrm->Frm().*fnRect->fnGetRight)(); + const long nRight = (pCellFrame->Frame().*fnRect->fnGetRight)(); rCols.insert( nRight ); - pCellFrm = pCellFrm->GetNext(); + pCellFrame = pCellFrame->GetNext(); } - pRowFrm = static_cast<const SwRowFrm*>(pRowFrm->GetNext()); + pRowFrame = static_cast<const SwRowFrame*>(pRowFrame->GetNext()); } - pMasterFrm = static_cast<const SwTabFrm*>(pMasterFrm->GetFollow()); + pMasterFrame = static_cast<const SwTabFrame*>(pMasterFrame->GetFollow()); } } } @@ -1216,9 +1216,9 @@ void SwTaggedPDFHelper::BeginBlockStructureElements() case FRM_ROW : - // RowFrm: TR + // RowFrame: TR - if ( !static_cast<const SwRowFrm*>(pFrm)->IsRepeatedHeadline() ) + if ( !static_cast<const SwRowFrame*>(pFrame)->IsRepeatedHeadline() ) { nPDFType = vcl::PDFWriter::TableRow; aPDFType = aTRString; @@ -1231,11 +1231,11 @@ void SwTaggedPDFHelper::BeginBlockStructureElements() case FRM_CELL : - // CellFrm: TH, TD + // CellFrame: TH, TD { - const SwTabFrm* pTable = static_cast<const SwCellFrm*>(pFrm)->FindTabFrm(); - if ( pTable->IsInHeadline( *pFrm ) || lcl_IsHeadlineCell( *static_cast<const SwCellFrm*>(pFrm) ) ) + const SwTabFrame* pTable = static_cast<const SwCellFrame*>(pFrame)->FindTabFrame(); + if ( pTable->IsInHeadline( *pFrame ) || lcl_IsHeadlineCell( *static_cast<const SwCellFrame*>(pFrame) ) ) { nPDFType = vcl::PDFWriter::TableHeader; aPDFType = aTHString; @@ -1254,16 +1254,16 @@ void SwTaggedPDFHelper::BeginBlockStructureElements() case FRM_FLY : - // FlyFrm: Figure, Formula, Control + // FlyFrame: Figure, Formula, Control // fly in content or fly at page { - const SwFlyFrm* pFly = static_cast<const SwFlyFrm*>(pFrm); - if ( pFly->Lower() && pFly->Lower()->IsNoTextFrm() ) + const SwFlyFrame* pFly = static_cast<const SwFlyFrame*>(pFrame); + if ( pFly->Lower() && pFly->Lower()->IsNoTextFrame() ) { bool bFormula = false; - const SwNoTextFrm* pNoTextFrm = static_cast<const SwNoTextFrm*>(pFly->Lower()); - SwOLENode* pOLENd = const_cast<SwOLENode*>(pNoTextFrm->GetNode()->GetOLENode()); + const SwNoTextFrame* pNoTextFrame = static_cast<const SwNoTextFrame*>(pFly->Lower()); + SwOLENode* pOLENd = const_cast<SwOLENode*>(pNoTextFrame->GetNode()->GetOLENode()); if ( pOLENd ) { SwOLEObj& aOLEObj = pOLENd->GetOLEObj(); @@ -1314,11 +1314,11 @@ void SwTaggedPDFHelper::BeginInlineStructureElements() { const SwLinePortion* pPor = &mpPorInfo->mrPor; const SwTextPaintInfo& rInf = mpPorInfo->mrTextPainter.GetInfo(); - const SwTextFrm* pFrm = rInf.GetTextFrm(); + const SwTextFrame* pFrame = rInf.GetTextFrame(); // Lowers of NonStructureElements should not be considered: - if ( lcl_IsInNonStructEnv( *pFrm ) ) + if ( lcl_IsInNonStructEnv( *pFrame ) ) return; sal_uInt16 nPDFType = USHRT_MAX; @@ -1339,7 +1339,7 @@ void SwTaggedPDFHelper::BeginInlineStructureElements() case POR_TXT : case POR_PARA : { - SwTextNode* pNd = const_cast<SwTextNode*>(pFrm->GetTextNode()); + SwTextNode* pNd = const_cast<SwTextNode*>(pFrame->GetTextNode()); SwTextAttr const*const pInetFormatAttr = pNd->GetTextAttrAt(rInf.GetIdx(), RES_TXTATR_INETFMT); @@ -1465,8 +1465,8 @@ SwEnhancedPDFExportHelper::SwEnhancedPDFExportHelper( SwEditShell& rSh, if ( mbSkipEmptyPages ) { maPageNumberMap.resize( mrSh.GetPageCount() ); - const SwPageFrm* pCurrPage = - static_cast<const SwPageFrm*>( mrSh.GetLayout()->Lower() ); + const SwPageFrame* pCurrPage = + static_cast<const SwPageFrame*>( mrSh.GetLayout()->Lower() ); sal_Int32 nPageNumber = 0; for ( size_t i = 0, n = maPageNumberMap.size(); i < n && pCurrPage; ++i ) { @@ -1475,7 +1475,7 @@ SwEnhancedPDFExportHelper::SwEnhancedPDFExportHelper( SwEditShell& rSh, else maPageNumberMap[i] = nPageNumber++; - pCurrPage = static_cast<const SwPageFrm*>( pCurrPage->GetNext() ); + pCurrPage = static_cast<const SwPageFrame*>( pCurrPage->GetNext() ); } } @@ -1483,7 +1483,7 @@ SwEnhancedPDFExportHelper::SwEnhancedPDFExportHelper( SwEditShell& rSh, aLinkIdMap.clear(); aNumListIdMap.clear(); aNumListBodyIdMap.clear(); - aFrmTagIdMap.clear(); + aFrameTagIdMap.clear(); #if OSL_DEBUG_LEVEL > 1 aStructStack.clear(); @@ -1507,7 +1507,7 @@ SwEnhancedPDFExportHelper::~SwEnhancedPDFExportHelper() delete mpRangeEnum; } -Rectangle SwEnhancedPDFExportHelper::SwRectToPDFRect(const SwPageFrm* pCurrPage, +Rectangle SwEnhancedPDFExportHelper::SwRectToPDFRect(const SwPageFrame* pCurrPage, const Rectangle& rRectangle) const { SwPostItMode nPostItMode = mrPrintData.GetPrintPostIts(); @@ -1520,7 +1520,7 @@ Rectangle SwEnhancedPDFExportHelper::SwRectToPDFRect(const SwPageFrm* pCurrPage, double fScale = 0.75; aRectSize.Width() = (aRectSize.Width() * fScale); aRectSize.Height() = (aRectSize.Height() * fScale); - long nOrigHeight = pCurrPage->Frm().Height(); + long nOrigHeight = pCurrPage->Frame().Height(); long nNewHeight = nOrigHeight*fScale; long nShiftY = (nOrigHeight-nNewHeight)/2; aRect.Left() = (aRect.Left() * fScale); @@ -1553,8 +1553,8 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() // Create new cursor and lock the view: SwDoc* pDoc = mrSh.GetDoc(); - mrSh.SwCrsrShell::Push(); - mrSh.SwCrsrShell::ClearMark(); + mrSh.SwCursorShell::Push(); + mrSh.SwCursorShell::ClearMark(); const bool bOldLockView = mrSh.IsViewLocked(); mrSh.LockView( true ); @@ -1583,8 +1583,8 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() { // Link Rectangle const SwRect& rNoteRect = mrSh.GetCharRect(); - const SwPageFrm* pCurrPage = - static_cast<const SwPageFrm*>( mrSh.GetLayout()->Lower() ); + const SwPageFrame* pCurrPage = + static_cast<const SwPageFrame*>( mrSh.GetLayout()->Lower() ); // Link PageNums std::vector<sal_Int32> aNotePageNums = CalcOutputPageNums( rNoteRect ); @@ -1616,7 +1616,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() } } pFirst = aIter.Next(); - mrSh.SwCrsrShell::ClearMark(); + mrSh.SwCursorShell::ClearMark(); } } @@ -1640,8 +1640,8 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() !mrSh.SelectHiddenRange() ) { // Select the hyperlink: - mrSh.SwCrsrShell::Right( 1, CRSR_SKIP_CHARS ); - if ( mrSh.SwCrsrShell::SelectTextAttr( RES_TXTATR_INETFMT, true ) ) + mrSh.SwCursorShell::Right( 1, CRSR_SKIP_CHARS ); + if ( mrSh.SwCursorShell::SelectTextAttr( RES_TXTATR_INETFMT, true ) ) { // First, we create the destination, because there may be more // than one link to this destination: @@ -1652,31 +1652,31 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() // We have to distinguish between intern and real URLs const bool bIntern = '#' == aURL[0]; - // _GetCrsr() is a SwShellCrsr, which is derived from + // _GetCursor() is a SwShellCursor, which is derived from // SwSelPaintRects, therefore the rectangles of the current // selection can be easily obtained: // Note: We make a copy of the rectangles, because they may // be deleted again in JumpToSwMark. SwRects aTmp; - aTmp.insert( aTmp.begin(), mrSh.SwCrsrShell::_GetCrsr()->begin(), mrSh.SwCrsrShell::_GetCrsr()->end() ); + aTmp.insert( aTmp.begin(), mrSh.SwCursorShell::_GetCursor()->begin(), mrSh.SwCursorShell::_GetCursor()->end() ); OSL_ENSURE( !aTmp.empty(), "Enhanced pdf export - rectangles are missing" ); - const SwPageFrm* pSelectionPage = - static_cast<const SwPageFrm*>( mrSh.GetLayout()->Lower() ); + const SwPageFrame* pSelectionPage = + static_cast<const SwPageFrame*>( mrSh.GetLayout()->Lower() ); // Create the destination for internal links: sal_Int32 nDestId = -1; if ( bIntern ) { aURL = aURL.copy( 1 ); - mrSh.SwCrsrShell::ClearMark(); + mrSh.SwCursorShell::ClearMark(); JumpToSwMark( &mrSh, aURL ); // Destination Rectangle const SwRect& rDestRect = mrSh.GetCharRect(); - const SwPageFrm* pCurrPage = - static_cast<const SwPageFrm*>( mrSh.GetLayout()->Lower() ); + const SwPageFrame* pCurrPage = + static_cast<const SwPageFrame*>( mrSh.GetLayout()->Lower() ); // Destination PageNum const sal_Int32 nDestPageNum = CalcOutputPageNum( rDestRect ); @@ -1730,7 +1730,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() } } } - mrSh.SwCrsrShell::ClearMark(); + mrSh.SwCursorShell::ClearMark(); } // HYPERLINKS (Graphics, Frames, OLEs ) @@ -1744,8 +1744,8 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() if ( RES_DRAWFRMFMT != pFrameFormat->Which() && SfxItemState::SET == pFrameFormat->GetAttrSet().GetItemState( RES_URL, true, &pItem ) ) { - const SwPageFrm* pCurrPage = - static_cast<const SwPageFrm*>( mrSh.GetLayout()->Lower() ); + const SwPageFrame* pCurrPage = + static_cast<const SwPageFrame*>( mrSh.GetLayout()->Lower() ); OUString aURL( static_cast<const SwFormatURL*>(pItem)->GetURL() ); const bool bIntern = '#' == aURL[0]; @@ -1755,13 +1755,13 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() if ( bIntern ) { aURL = aURL.copy( 1 ); - mrSh.SwCrsrShell::ClearMark(); + mrSh.SwCursorShell::ClearMark(); JumpToSwMark( &mrSh, aURL ); // Destination Rectangle const SwRect& rDestRect = mrSh.GetCharRect(); - pCurrPage = static_cast<const SwPageFrm*>( mrSh.GetLayout()->Lower() ); + pCurrPage = static_cast<const SwPageFrame*>( mrSh.GetLayout()->Lower() ); // Destination PageNum const sal_Int32 nDestPageNum = CalcOutputPageNum( rDestRect ); @@ -1810,7 +1810,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() } } } - mrSh.SwCrsrShell::ClearMark(); + mrSh.SwCursorShell::ClearMark(); } // REFERENCES @@ -1832,15 +1832,15 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() !mrSh.SelectHiddenRange() ) { // Select the field: - mrSh.SwCrsrShell::SetMark(); - mrSh.SwCrsrShell::Right( 1, CRSR_SKIP_CHARS ); + mrSh.SwCursorShell::SetMark(); + mrSh.SwCursorShell::Right( 1, CRSR_SKIP_CHARS ); // Link Rectangles SwRects aTmp; - aTmp.insert( aTmp.begin(), mrSh.SwCrsrShell::_GetCrsr()->begin(), mrSh.SwCrsrShell::_GetCrsr()->end() ); + aTmp.insert( aTmp.begin(), mrSh.SwCursorShell::_GetCursor()->begin(), mrSh.SwCursorShell::_GetCursor()->end() ); OSL_ENSURE( !aTmp.empty(), "Enhanced pdf export - rectangles are missing" ); - mrSh.SwCrsrShell::ClearMark(); + mrSh.SwCursorShell::ClearMark(); // Destination Rectangle const SwGetRefField* pField = @@ -1849,7 +1849,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() mrSh.GotoRefMark( rRefName, pField->GetSubType(), pField->GetSeqNo() ); const SwRect& rDestRect = mrSh.GetCharRect(); - const SwPageFrm* pCurrPage = static_cast<const SwPageFrm*>( mrSh.GetLayout()->Lower() ); + const SwPageFrame* pCurrPage = static_cast<const SwPageFrame*>( mrSh.GetLayout()->Lower() ); // Destination PageNum const sal_Int32 nDestPageNum = CalcOutputPageNum( rDestRect ); @@ -1900,7 +1900,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() } } pFirst = aIter.Next(); - mrSh.SwCrsrShell::ClearMark(); + mrSh.SwCursorShell::ClearMark(); } // FOOTNOTES @@ -1912,27 +1912,27 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() const SwTextFootnote* pTextFootnote = pDoc->GetFootnoteIdxs()[ nIdx ]; SwTextNode& rTNd = const_cast<SwTextNode&>(pTextFootnote->GetTextNode()); - mrSh._GetCrsr()->GetPoint()->nNode = rTNd; - mrSh._GetCrsr()->GetPoint()->nContent.Assign( &rTNd, pTextFootnote->GetStart() ); + mrSh._GetCursor()->GetPoint()->nNode = rTNd; + mrSh._GetCursor()->GetPoint()->nContent.Assign( &rTNd, pTextFootnote->GetStart() ); // 1. Check if the whole paragraph is hidden // 2. Check for hidden text attribute if ( rTNd.GetTextNode()->IsHidden() || mrSh.SelectHiddenRange() ) continue; - SwCrsrSaveState aSaveState( *mrSh._GetCrsr() ); + SwCursorSaveState aSaveState( *mrSh._GetCursor() ); // Select the footnote: - mrSh.SwCrsrShell::SetMark(); - mrSh.SwCrsrShell::Right( 1, CRSR_SKIP_CHARS ); + mrSh.SwCursorShell::SetMark(); + mrSh.SwCursorShell::Right( 1, CRSR_SKIP_CHARS ); // Link Rectangle SwRects aTmp; - aTmp.insert( aTmp.begin(), mrSh.SwCrsrShell::_GetCrsr()->begin(), mrSh.SwCrsrShell::_GetCrsr()->end() ); + aTmp.insert( aTmp.begin(), mrSh.SwCursorShell::_GetCursor()->begin(), mrSh.SwCursorShell::_GetCursor()->end() ); OSL_ENSURE( !aTmp.empty(), "Enhanced pdf export - rectangles are missing" ); - mrSh._GetCrsr()->RestoreSavePos(); - mrSh.SwCrsrShell::ClearMark(); + mrSh._GetCursor()->RestoreSavePos(); + mrSh.SwCursorShell::ClearMark(); if (aTmp.empty()) continue; @@ -1948,8 +1948,8 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() // Destination Rectangle const SwRect& rDestRect = mrSh.GetCharRect(); - const SwPageFrm* pCurrPage = - static_cast<const SwPageFrm*>( mrSh.GetLayout()->Lower() ); + const SwPageFrame* pCurrPage = + static_cast<const SwPageFrame*>( mrSh.GetLayout()->Lower() ); // Destination PageNum const sal_Int32 nDestPageNum = CalcOutputPageNum( rDestRect ); @@ -2014,8 +2014,8 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() mrSh.GotoOutline(i); const SwRect& rDestRect = mrSh.GetCharRect(); - const SwPageFrm* pCurrPage = - static_cast<const SwPageFrm*>( mrSh.GetLayout()->Lower() ); + const SwPageFrame* pCurrPage = + static_cast<const SwPageFrame*>( mrSh.GetLayout()->Lower() ); // Destination PageNum const sal_Int32 nDestPageNum = CalcOutputPageNum( rDestRect ); @@ -2054,7 +2054,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() { //get the name const ::sw::mark::IMark* pBkmk = ppMark->get(); - mrSh.SwCrsrShell::ClearMark(); + mrSh.SwCursorShell::ClearMark(); OUString sBkName = pBkmk->GetName(); //jump to it @@ -2063,8 +2063,8 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() // Destination Rectangle const SwRect& rDestRect = mrSh.GetCharRect(); - const SwPageFrm* pCurrPage = - static_cast<const SwPageFrm*>( mrSh.GetLayout()->Lower() ); + const SwPageFrame* pCurrPage = + static_cast<const SwPageFrame*>( mrSh.GetLayout()->Lower() ); // Destination PageNum const sal_Int32 nDestPageNum = CalcOutputPageNum( rDestRect ); @@ -2076,7 +2076,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() pPDFExtOutDevData->CreateNamedDest(sBkName, aRect, nDestPageNum); } } - mrSh.SwCrsrShell::ClearMark(); + mrSh.SwCursorShell::ClearMark(); //<--- i56629 } } @@ -2100,8 +2100,8 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() // Destination Rectangle const SwRect& rDestRect = mrSh.GetCharRect(); - const SwPageFrm* pCurrPage = - static_cast<const SwPageFrm*>( mrSh.GetLayout()->Lower() ); + const SwPageFrame* pCurrPage = + static_cast<const SwPageFrame*>( mrSh.GetLayout()->Lower() ); // Destination PageNum const sal_Int32 nDestPageNum = CalcOutputPageNum( rDestRect ); @@ -2133,7 +2133,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() // Restore view, cursor, and outdev: mrSh.LockView( bOldLockView ); - mrSh.SwCrsrShell::Pop( false ); + mrSh.SwCursorShell::Pop( false ); mrOut.Pop(); } @@ -2216,13 +2216,13 @@ void SwEnhancedPDFExportHelper::MakeHeaderFooterLinks( vcl::PDFExtOutDevData& rP // the offset of the link rectangle calculates as follows: const Point aOffset = rLinkRect.Pos() + mrOut.GetMapMode().GetOrigin(); - SwIterator<SwTextFrm,SwTextNode> aIter( rTNd ); - for ( SwTextFrm* pTmpFrm = aIter.First(); pTmpFrm; pTmpFrm = aIter.Next() ) + SwIterator<SwTextFrame,SwTextNode> aIter( rTNd ); + for ( SwTextFrame* pTmpFrame = aIter.First(); pTmpFrame; pTmpFrame = aIter.Next() ) { // Add offset to current page: - const SwPageFrm* pPageFrm = pTmpFrm->FindPageFrm(); + const SwPageFrame* pPageFrame = pTmpFrame->FindPageFrame(); SwRect aHFLinkRect( rLinkRect ); - aHFLinkRect.Pos() = pPageFrm->Frm().Pos() + aOffset; + aHFLinkRect.Pos() = pPageFrame->Frame().Pos() + aOffset; // #i97135# the gcc_x64 optimizer gets aHFLinkRect != rLinkRect wrong // fool it by comparing the position only (the width and height are the @@ -2235,7 +2235,7 @@ void SwEnhancedPDFExportHelper::MakeHeaderFooterLinks( vcl::PDFExtOutDevData& rP for ( size_t nNumIdx = 0; nNumIdx < aHFLinkPageNums.size(); ++nNumIdx ) { // Link Export - Rectangle aRect(SwRectToPDFRect(pPageFrm, aHFLinkRect.SVRect())); + Rectangle aRect(SwRectToPDFRect(pPageFrame, aHFLinkRect.SVRect())); const sal_Int32 nHFLinkId = rPDFExtOutDevData.CreateLink(aRect, aHFLinkPageNums[nNumIdx]); diff --git a/sw/source/core/text/atrstck.cxx b/sw/source/core/text/atrstck.cxx index 6d82c85adac5..ef421b1496cd 100644 --- a/sw/source/core/text/atrstck.cxx +++ b/sw/source/core/text/atrstck.cxx @@ -404,7 +404,7 @@ void SwAttrHandler::Init( const SfxPoolItem** pPoolItem, const SwAttrSet* pAS, } // It is possible, that Init is called more than once, e.g., in a - // SwTextFrm::FormatOnceMore situation. + // SwTextFrame::FormatOnceMore situation. delete pFnt; pFnt = new SwFont( rFnt ); } diff --git a/sw/source/core/text/blink.cxx b/sw/source/core/text/blink.cxx index 06ac0786b3c3..9588973deec3 100644 --- a/sw/source/core/text/blink.cxx +++ b/sw/source/core/text/blink.cxx @@ -68,8 +68,8 @@ IMPL_LINK_NOARG_TYPED(SwBlink, Blinker, Timer *, void) for (SwBlinkSet::iterator it = m_List.begin(); it != m_List.end(); ) { const SwBlinkPortion* pTmp = it->get(); - if( pTmp->GetRootFrm() && - pTmp->GetRootFrm()->GetCurrShell() ) + if( pTmp->GetRootFrame() && + pTmp->GetRootFrame()->GetCurrShell() ) { ++it; @@ -104,7 +104,7 @@ IMPL_LINK_NOARG_TYPED(SwBlink, Blinker, Timer *, void) Rectangle aRefresh( aPos, Size( nWidth, nHeight ) ); aRefresh.Right() += ( aRefresh.Bottom()- aRefresh.Top() ) / 8; - pTmp->GetRootFrm() + pTmp->GetRootFrame() ->GetCurrShell()->InvalidateWindows( aRefresh ); } else // Portions without a shell can be removed from the list @@ -116,7 +116,7 @@ IMPL_LINK_NOARG_TYPED(SwBlink, Blinker, Timer *, void) } void SwBlink::Insert( const Point& rPoint, const SwLinePortion* pPor, - const SwTextFrm *pTextFrm, sal_uInt16 nDir ) + const SwTextFrame *pTextFrame, sal_uInt16 nDir ) { std::unique_ptr<SwBlinkPortion> pBlinkPor(new SwBlinkPortion(pPor, nDir)); @@ -128,9 +128,9 @@ void SwBlink::Insert( const Point& rPoint, const SwLinePortion* pPor, else { pBlinkPor->SetPos( rPoint ); - pBlinkPor->SetRootFrm( pTextFrm->getRootFrm() ); + pBlinkPor->SetRootFrame( pTextFrame->getRootFrame() ); m_List.insert(std::move(pBlinkPor)); - pTextFrm->SetBlinkPor(); + pTextFrame->SetBlinkPor(); if( pPor->IsLayPortion() || pPor->IsParaPortion() ) const_cast<SwLineLayout*>(static_cast<const SwLineLayout*>(pPor))->SetBlinking(); @@ -161,11 +161,11 @@ void SwBlink::Delete( const SwLinePortion* pPor ) m_List.erase( pBlinkPortion ); } -void SwBlink::FrmDelete( const SwRootFrm* pRoot ) +void SwBlink::FrameDelete( const SwRootFrame* pRoot ) { for (SwBlinkSet::iterator it = m_List.begin(); it != m_List.end(); ) { - if (pRoot == (*it)->GetRootFrm()) + if (pRoot == (*it)->GetRootFrame()) m_List.erase( it++ ); else ++it; diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx index 5323eec7bd88..346aed608ac4 100644 --- a/sw/source/core/text/frmcrsr.cxx +++ b/sw/source/core/text/frmcrsr.cxx @@ -55,82 +55,82 @@ using namespace ::com::sun::star; * - RightMargin abstains from adjusting position with -1 * - GetCharRect returns a GetEndCharRect for MV_RIGHTMARGIN * - GetEndCharRect sets bRightMargin to true - * - SwTextCursor::bRightMargin is set to false by CharCrsrToLine + * - SwTextCursor::bRightMargin is set to false by CharCursorToLine */ namespace { -SwTextFrm *GetAdjFrmAtPos( SwTextFrm *pFrm, const SwPosition &rPos, +SwTextFrame *GetAdjFrameAtPos( SwTextFrame *pFrame, const SwPosition &rPos, const bool bRightMargin, const bool bNoScroll = true ) { // RightMargin in the last master line const sal_Int32 nOffset = rPos.nContent.GetIndex(); - SwTextFrm *pFrmAtPos = pFrm; - if( !bNoScroll || pFrm->GetFollow() ) + SwTextFrame *pFrameAtPos = pFrame; + if( !bNoScroll || pFrame->GetFollow() ) { - pFrmAtPos = pFrm->GetFrmAtPos( rPos ); - if( nOffset < pFrmAtPos->GetOfst() && - !pFrmAtPos->IsFollow() ) + pFrameAtPos = pFrame->GetFrameAtPos( rPos ); + if( nOffset < pFrameAtPos->GetOfst() && + !pFrameAtPos->IsFollow() ) { sal_Int32 nNew = nOffset; if( nNew < MIN_OFFSET_STEP ) nNew = 0; else nNew -= MIN_OFFSET_STEP; - sw_ChangeOffset( pFrmAtPos, nNew ); + sw_ChangeOffset( pFrameAtPos, nNew ); } } - while( pFrm != pFrmAtPos ) + while( pFrame != pFrameAtPos ) { - pFrm = pFrmAtPos; - pFrm->GetFormatted(); - pFrmAtPos = pFrm->GetFrmAtPos( rPos ); + pFrame = pFrameAtPos; + pFrame->GetFormatted(); + pFrameAtPos = pFrame->GetFrameAtPos( rPos ); } if( nOffset && bRightMargin ) { - while( pFrmAtPos && pFrmAtPos->GetOfst() == nOffset && - pFrmAtPos->IsFollow() ) + while( pFrameAtPos && pFrameAtPos->GetOfst() == nOffset && + pFrameAtPos->IsFollow() ) { - pFrmAtPos->GetFormatted(); - pFrmAtPos = pFrmAtPos->FindMaster(); + pFrameAtPos->GetFormatted(); + pFrameAtPos = pFrameAtPos->FindMaster(); } - OSL_ENSURE( pFrmAtPos, "+GetCharRect: no frame with my rightmargin" ); + OSL_ENSURE( pFrameAtPos, "+GetCharRect: no frame with my rightmargin" ); } - return pFrmAtPos ? pFrmAtPos : pFrm; + return pFrameAtPos ? pFrameAtPos : pFrame; } } -bool sw_ChangeOffset( SwTextFrm* pFrm, sal_Int32 nNew ) +bool sw_ChangeOffset( SwTextFrame* pFrame, sal_Int32 nNew ) { // Do not scroll in areas and outside of flies - OSL_ENSURE( !pFrm->IsFollow(), "Illegal Scrolling by Follow!" ); - if( pFrm->GetOfst() != nNew && !pFrm->IsInSct() ) + OSL_ENSURE( !pFrame->IsFollow(), "Illegal Scrolling by Follow!" ); + if( pFrame->GetOfst() != nNew && !pFrame->IsInSct() ) { - SwFlyFrm *pFly = pFrm->FindFlyFrm(); + SwFlyFrame *pFly = pFrame->FindFlyFrame(); // Attention: if e.g. in a column frame the size is still invalid // we must not scroll around just like that if ( ( pFly && pFly->IsValid() && !pFly->GetNextLink() && !pFly->GetPrevLink() ) || - ( !pFly && pFrm->IsInTab() ) ) + ( !pFly && pFrame->IsInTab() ) ) { - SwViewShell* pVsh = pFrm->getRootFrm()->GetCurrShell(); + SwViewShell* pVsh = pFrame->getRootFrame()->GetCurrShell(); if( pVsh ) { if( pVsh->GetRingContainer().size() > 1 || - ( pFrm->GetDrawObjs() && pFrm->GetDrawObjs()->size() ) ) + ( pFrame->GetDrawObjs() && pFrame->GetDrawObjs()->size() ) ) { - if( !pFrm->GetOfst() ) + if( !pFrame->GetOfst() ) return false; nNew = 0; } - pFrm->SetOfst( nNew ); - pFrm->SetPara( nullptr ); - pFrm->GetFormatted(); - if( pFrm->Frm().HasArea() ) - pFrm->getRootFrm()->GetCurrShell()->InvalidateWindows( pFrm->Frm() ); + pFrame->SetOfst( nNew ); + pFrame->SetPara( nullptr ); + pFrame->GetFormatted(); + if( pFrame->Frame().HasArea() ) + pFrame->getRootFrame()->GetCurrShell()->InvalidateWindows( pFrame->Frame() ); return true; } } @@ -138,17 +138,17 @@ bool sw_ChangeOffset( SwTextFrm* pFrm, sal_Int32 nNew ) return false; } -SwTextFrm& SwTextFrm::GetFrmAtOfst( const sal_Int32 nWhere ) +SwTextFrame& SwTextFrame::GetFrameAtOfst( const sal_Int32 nWhere ) { - SwTextFrm* pRet = this; + SwTextFrame* pRet = this; while( pRet->HasFollow() && nWhere >= pRet->GetFollow()->GetOfst() ) pRet = pRet->GetFollow(); return *pRet; } -SwTextFrm *SwTextFrm::GetFrmAtPos( const SwPosition &rPos ) +SwTextFrame *SwTextFrame::GetFrameAtPos( const SwPosition &rPos ) { - SwTextFrm *pFoll = this; + SwTextFrame *pFoll = this; while( pFoll->GetFollow() ) { if( rPos.nContent.GetIndex() > pFoll->GetFollow()->GetOfst() ) @@ -167,15 +167,15 @@ SwTextFrm *SwTextFrm::GetFrmAtPos( const SwPosition &rPos ) /* * GetCharRect() returns the char's char line described by aPos. - * GetCrsrOfst() does the reverse: It goes from a document coordinate to + * GetCursorOfst() does the reverse: It goes from a document coordinate to * a Pam. * Both are virtual in the frame base class and thus are redefined here. */ -bool SwTextFrm::GetCharRect( SwRect& rOrig, const SwPosition &rPos, - SwCrsrMoveState *pCMS ) const +bool SwTextFrame::GetCharRect( SwRect& rOrig, const SwPosition &rPos, + SwCursorMoveState *pCMS ) const { - OSL_ENSURE( ! IsVertical() || ! IsSwapped(),"SwTextFrm::GetCharRect with swapped frame" ); + OSL_ENSURE( ! IsVertical() || ! IsSwapped(),"SwTextFrame::GetCharRect with swapped frame" ); if( IsLocked() || IsHiddenNow() ) return false; @@ -186,29 +186,29 @@ bool SwTextFrm::GetCharRect( SwRect& rOrig, const SwPosition &rPos, // - the Follow chain grows dynamically; the one we end up in // needs to be formatted - // Optimisation: reading ahead saves us a GetAdjFrmAtPos + // Optimisation: reading ahead saves us a GetAdjFrameAtPos const bool bRightMargin = pCMS && ( MV_RIGHTMARGIN == pCMS->m_eState ); const bool bNoScroll = pCMS && pCMS->m_bNoScroll; - SwTextFrm *pFrm = GetAdjFrmAtPos( const_cast<SwTextFrm*>(this), rPos, bRightMargin, + SwTextFrame *pFrame = GetAdjFrameAtPos( const_cast<SwTextFrame*>(this), rPos, bRightMargin, bNoScroll ); - pFrm->GetFormatted(); - const SwFrm* pTmpFrm = static_cast<SwFrm*>(pFrm->GetUpper()); + pFrame->GetFormatted(); + const SwFrame* pTmpFrame = static_cast<SwFrame*>(pFrame->GetUpper()); - SWRECTFN ( pFrm ) - const SwTwips nUpperMaxY = (pTmpFrm->*fnRect->fnGetPrtBottom)(); - const SwTwips nFrmMaxY = (pFrm->*fnRect->fnGetPrtBottom)(); + SWRECTFN ( pFrame ) + const SwTwips nUpperMaxY = (pTmpFrame->*fnRect->fnGetPrtBottom)(); + const SwTwips nFrameMaxY = (pFrame->*fnRect->fnGetPrtBottom)(); // nMaxY is an absolute value SwTwips nMaxY = bVert ? - ( bVertL2R ? std::min( nFrmMaxY, nUpperMaxY ) : std::max( nFrmMaxY, nUpperMaxY ) ) : - std::min( nFrmMaxY, nUpperMaxY ); + ( bVertL2R ? std::min( nFrameMaxY, nUpperMaxY ) : std::max( nFrameMaxY, nUpperMaxY ) ) : + std::min( nFrameMaxY, nUpperMaxY ); bool bRet = false; - if ( pFrm->IsEmpty() || ! (pFrm->Prt().*fnRect->fnGetHeight)() ) + if ( pFrame->IsEmpty() || ! (pFrame->Prt().*fnRect->fnGetHeight)() ) { - Point aPnt1 = pFrm->Frm().Pos() + pFrm->Prt().Pos(); - SwTextNode* pTextNd = const_cast<SwTextFrm*>(this)->GetTextNode(); + Point aPnt1 = pFrame->Frame().Pos() + pFrame->Prt().Pos(); + SwTextNode* pTextNd = const_cast<SwTextFrame*>(this)->GetTextNode(); short nFirstOffset; pTextNd->GetFirstLineOfsWithNum( nFirstOffset ); @@ -219,7 +219,7 @@ bool SwTextFrm::GetCharRect( SwRect& rOrig, const SwPosition &rPos, aPnt1.Y() += nFirstOffset; if ( aPnt1.X() < nMaxY && !bVertL2R ) aPnt1.X() = nMaxY; - aPnt2.X() = aPnt1.X() + pFrm->Prt().Width(); + aPnt2.X() = aPnt1.X() + pFrame->Prt().Width(); aPnt2.Y() = aPnt1.Y(); if( aPnt2.X() < nMaxY ) aPnt2.X() = nMaxY; @@ -232,7 +232,7 @@ bool SwTextFrm::GetCharRect( SwRect& rOrig, const SwPosition &rPos, if( aPnt1.Y() > nMaxY ) aPnt1.Y() = nMaxY; aPnt2.X() = aPnt1.X(); - aPnt2.Y() = aPnt1.Y() + pFrm->Prt().Height(); + aPnt2.Y() = aPnt1.Y() + pFrame->Prt().Height(); if( aPnt2.Y() > nMaxY ) aPnt2.Y() = nMaxY; } @@ -245,19 +245,19 @@ bool SwTextFrm::GetCharRect( SwRect& rOrig, const SwPosition &rPos, pCMS->m_aRealHeight.Y() = bVert ? -rOrig.Width() : rOrig.Height(); } - if ( pFrm->IsRightToLeft() ) - pFrm->SwitchLTRtoRTL( rOrig ); + if ( pFrame->IsRightToLeft() ) + pFrame->SwitchLTRtoRTL( rOrig ); bRet = true; } else { - if( !pFrm->HasPara() ) + if( !pFrame->HasPara() ) return false; - SwFrmSwapper aSwapper( pFrm, true ); + SwFrameSwapper aSwapper( pFrame, true ); if ( bVert ) - nMaxY = pFrm->SwitchVerticalToHorizontal( nMaxY ); + nMaxY = pFrame->SwitchVerticalToHorizontal( nMaxY ); bool bGoOn = true; const sal_Int32 nOffset = rPos.nContent.GetIndex(); @@ -266,28 +266,28 @@ bool SwTextFrm::GetCharRect( SwRect& rOrig, const SwPosition &rPos, do { { - SwTextSizeInfo aInf( pFrm ); - SwTextCursor aLine( pFrm, &aInf ); + SwTextSizeInfo aInf( pFrame ); + SwTextCursor aLine( pFrame, &aInf ); nNextOfst = aLine.GetEnd(); - // See comment in AdjustFrm + // See comment in AdjustFrame // Include the line's last char? bRet = bRightMargin ? aLine.GetEndCharRect( &rOrig, nOffset, pCMS, nMaxY ) : aLine.GetCharRect( &rOrig, nOffset, pCMS, nMaxY ); } - if ( pFrm->IsRightToLeft() ) - pFrm->SwitchLTRtoRTL( rOrig ); + if ( pFrame->IsRightToLeft() ) + pFrame->SwitchLTRtoRTL( rOrig ); if ( bVert ) - pFrm->SwitchHorizontalToVertical( rOrig ); + pFrame->SwitchHorizontalToVertical( rOrig ); - if( pFrm->IsUndersized() && pCMS && !pFrm->GetNext() && + if( pFrame->IsUndersized() && pCMS && !pFrame->GetNext() && (rOrig.*fnRect->fnGetBottom)() == nUpperMaxY && - pFrm->GetOfst() < nOffset && - !pFrm->IsFollow() && !bNoScroll && - pFrm->GetTextNode()->GetText().getLength() != nNextOfst) + pFrame->GetOfst() < nOffset && + !pFrame->IsFollow() && !bNoScroll && + pFrame->GetTextNode()->GetText().getLength() != nNextOfst) { - bGoOn = sw_ChangeOffset( pFrm, nNextOfst ); + bGoOn = sw_ChangeOffset( pFrame, nNextOfst ); } else bGoOn = false; @@ -295,12 +295,12 @@ bool SwTextFrm::GetCharRect( SwRect& rOrig, const SwPosition &rPos, if ( pCMS ) { - if ( pFrm->IsRightToLeft() ) + if ( pFrame->IsRightToLeft() ) { if( pCMS->m_b2Lines && pCMS->m_p2Lines) { - pFrm->SwitchLTRtoRTL( pCMS->m_p2Lines->aLine ); - pFrm->SwitchLTRtoRTL( pCMS->m_p2Lines->aPortion ); + pFrame->SwitchLTRtoRTL( pCMS->m_p2Lines->aLine ); + pFrame->SwitchLTRtoRTL( pCMS->m_p2Lines->aPortion ); } } @@ -319,8 +319,8 @@ bool SwTextFrm::GetCharRect( SwRect& rOrig, const SwPosition &rPos, } if( pCMS->m_b2Lines && pCMS->m_p2Lines) { - pFrm->SwitchHorizontalToVertical( pCMS->m_p2Lines->aLine ); - pFrm->SwitchHorizontalToVertical( pCMS->m_p2Lines->aPortion ); + pFrame->SwitchHorizontalToVertical( pCMS->m_p2Lines->aLine ); + pFrame->SwitchHorizontalToVertical( pCMS->m_p2Lines->aPortion ); } } @@ -328,11 +328,11 @@ bool SwTextFrm::GetCharRect( SwRect& rOrig, const SwPosition &rPos, } if( bRet ) { - SwPageFrm *pPage = pFrm->FindPageFrm(); + SwPageFrame *pPage = pFrame->FindPageFrame(); OSL_ENSURE( pPage, "Text escaped from page?" ); const SwTwips nOrigTop = (rOrig.*fnRect->fnGetTop)(); - const SwTwips nPageTop = (pPage->Frm().*fnRect->fnGetTop)(); - const SwTwips nPageBott = (pPage->Frm().*fnRect->fnGetBottom)(); + const SwTwips nPageTop = (pPage->Frame().*fnRect->fnGetTop)(); + const SwTwips nPageBott = (pPage->Frame().*fnRect->fnGetBottom)(); // We have the following situation: if the frame is in an invalid // sectionframe, it's possible that the frame is outside the page. @@ -353,41 +353,41 @@ bool SwTextFrm::GetCharRect( SwRect& rOrig, const SwPosition &rPos, * and is used by the auto-positioned frame. */ -bool SwTextFrm::GetAutoPos( SwRect& rOrig, const SwPosition &rPos ) const +bool SwTextFrame::GetAutoPos( SwRect& rOrig, const SwPosition &rPos ) const { if( IsHiddenNow() ) return false; const sal_Int32 nOffset = rPos.nContent.GetIndex(); - SwTextFrm* pFrm = &(const_cast<SwTextFrm*>(this)->GetFrmAtOfst( nOffset )); + SwTextFrame* pFrame = &(const_cast<SwTextFrame*>(this)->GetFrameAtOfst( nOffset )); - pFrm->GetFormatted(); - const SwFrm* pTmpFrm = static_cast<SwFrm*>(pFrm->GetUpper()); + pFrame->GetFormatted(); + const SwFrame* pTmpFrame = static_cast<SwFrame*>(pFrame->GetUpper()); - SWRECTFN( pTmpFrm ) - SwTwips nUpperMaxY = (pTmpFrm->*fnRect->fnGetPrtBottom)(); + SWRECTFN( pTmpFrame ) + SwTwips nUpperMaxY = (pTmpFrame->*fnRect->fnGetPrtBottom)(); // nMaxY is in absolute value SwTwips nMaxY; if ( bVert ) { if ( bVertL2R ) - nMaxY = std::min( (pFrm->*fnRect->fnGetPrtBottom)(), nUpperMaxY ); + nMaxY = std::min( (pFrame->*fnRect->fnGetPrtBottom)(), nUpperMaxY ); else - nMaxY = std::max( (pFrm->*fnRect->fnGetPrtBottom)(), nUpperMaxY ); + nMaxY = std::max( (pFrame->*fnRect->fnGetPrtBottom)(), nUpperMaxY ); } else - nMaxY = std::min( (pFrm->*fnRect->fnGetPrtBottom)(), nUpperMaxY ); - if ( pFrm->IsEmpty() || ! (pFrm->Prt().*fnRect->fnGetHeight)() ) + nMaxY = std::min( (pFrame->*fnRect->fnGetPrtBottom)(), nUpperMaxY ); + if ( pFrame->IsEmpty() || ! (pFrame->Prt().*fnRect->fnGetHeight)() ) { - Point aPnt1 = pFrm->Frm().Pos() + pFrm->Prt().Pos(); + Point aPnt1 = pFrame->Frame().Pos() + pFrame->Prt().Pos(); Point aPnt2; if ( bVert ) { if ( aPnt1.X() < nMaxY && !bVertL2R ) aPnt1.X() = nMaxY; - aPnt2.X() = aPnt1.X() + pFrm->Prt().Width(); + aPnt2.X() = aPnt1.X() + pFrame->Prt().Width(); aPnt2.Y() = aPnt1.Y(); if( aPnt2.X() < nMaxY ) aPnt2.X() = nMaxY; @@ -397,7 +397,7 @@ bool SwTextFrm::GetAutoPos( SwRect& rOrig, const SwPosition &rPos ) const if( aPnt1.Y() > nMaxY ) aPnt1.Y() = nMaxY; aPnt2.X() = aPnt1.X(); - aPnt2.Y() = aPnt1.Y() + pFrm->Prt().Height(); + aPnt2.Y() = aPnt1.Y() + pFrame->Prt().Height(); if( aPnt2.Y() > nMaxY ) aPnt2.Y() = nMaxY; } @@ -406,16 +406,16 @@ bool SwTextFrm::GetAutoPos( SwRect& rOrig, const SwPosition &rPos ) const } else { - if( !pFrm->HasPara() ) + if( !pFrame->HasPara() ) return false; - SwFrmSwapper aSwapper( pFrm, true ); + SwFrameSwapper aSwapper( pFrame, true ); if ( bVert ) - nMaxY = pFrm->SwitchVerticalToHorizontal( nMaxY ); + nMaxY = pFrame->SwitchVerticalToHorizontal( nMaxY ); - SwTextSizeInfo aInf( pFrm ); - SwTextCursor aLine( pFrm, &aInf ); - SwCrsrMoveState aTmpState( MV_SETONLYTEXT ); + SwTextSizeInfo aInf( pFrame ); + SwTextCursor aLine( pFrame, &aInf ); + SwCursorMoveState aTmpState( MV_SETONLYTEXT ); aTmpState.m_bRealHeight = true; if( aLine.GetCharRect( &rOrig, nOffset, &aTmpState, nMaxY ) ) { @@ -425,11 +425,11 @@ bool SwTextFrm::GetAutoPos( SwRect& rOrig, const SwPosition &rPos ) const rOrig.Height( aTmpState.m_aRealHeight.Y() ); } - if ( pFrm->IsRightToLeft() ) - pFrm->SwitchLTRtoRTL( rOrig ); + if ( pFrame->IsRightToLeft() ) + pFrame->SwitchLTRtoRTL( rOrig ); if ( bVert ) - pFrm->SwitchHorizontalToVertical( rOrig ); + pFrame->SwitchHorizontalToVertical( rOrig ); return true; } @@ -443,7 +443,7 @@ bool SwTextFrm::GetAutoPos( SwRect& rOrig, const SwPosition &rPos ) const - If a proportional line spacing is applied use top of anchor character as top of the line. */ -bool SwTextFrm::GetTopOfLine( SwTwips& _onTopOfLine, +bool SwTextFrame::GetTopOfLine( SwTwips& _onTopOfLine, const SwPosition& _rPos ) const { bool bRet = true; @@ -467,9 +467,9 @@ bool SwTextFrm::GetTopOfLine( SwTwips& _onTopOfLine, else { // determine formatted text frame that contains the requested position - SwTextFrm* pFrm = &(const_cast<SwTextFrm*>(this)->GetFrmAtOfst( nOffset )); - pFrm->GetFormatted(); - SWREFRESHFN( pFrm ) + SwTextFrame* pFrame = &(const_cast<SwTextFrame*>(this)->GetFrameAtOfst( nOffset )); + pFrame->GetFormatted(); + SWREFRESHFN( pFrame ) // If proportional line spacing is applied // to the text frame, the top of the anchor character is also the // top of the line. @@ -490,16 +490,16 @@ bool SwTextFrm::GetTopOfLine( SwTwips& _onTopOfLine, else { // assure that text frame is in a horizontal layout - SwFrmSwapper aSwapper( pFrm, true ); + SwFrameSwapper aSwapper( pFrame, true ); // determine text line that contains the requested position - SwTextSizeInfo aInf( pFrm ); - SwTextCursor aLine( pFrm, &aInf ); - aLine.CharCrsrToLine( nOffset ); + SwTextSizeInfo aInf( pFrame ); + SwTextCursor aLine( pFrame, &aInf ); + aLine.CharCursorToLine( nOffset ); // determine top of line _onTopOfLine = aLine.Y(); if ( bVert ) { - _onTopOfLine = pFrm->SwitchHorizontalToVertical( _onTopOfLine ); + _onTopOfLine = pFrame->SwitchHorizontalToVertical( _onTopOfLine ); } } } @@ -513,8 +513,8 @@ bool SwTextFrm::GetTopOfLine( SwTwips& _onTopOfLine, struct SwFillData { - SwRect aFrm; - const SwCrsrMoveState *pCMS; + SwRect aFrame; + const SwCursorMoveState *pCMS; SwPosition* pPos; const Point& rPoint; SwTwips nLineWidth; @@ -522,66 +522,66 @@ struct SwFillData bool bInner : 1; bool bColumn : 1; bool bEmpty : 1; - SwFillData( const SwCrsrMoveState *pC, SwPosition* pP, const SwRect& rR, - const Point& rPt ) : aFrm( rR ), pCMS( pC ), pPos( pP ), rPoint( rPt ), + SwFillData( const SwCursorMoveState *pC, SwPosition* pP, const SwRect& rR, + const Point& rPt ) : aFrame( rR ), pCMS( pC ), pPos( pP ), rPoint( rPt ), nLineWidth( 0 ), bFirstLine( true ), bInner( false ), bColumn( false ), bEmpty( true ){} SwFillMode Mode() const { return pCMS->m_pFill->eMode; } long X() const { return rPoint.X(); } long Y() const { return rPoint.Y(); } - long Left() const { return aFrm.Left(); } - long Right() const { return aFrm.Right(); } - long Bottom() const { return aFrm.Bottom(); } - SwFillCrsrPos &Fill() const { return *pCMS->m_pFill; } + long Left() const { return aFrame.Left(); } + long Right() const { return aFrame.Right(); } + long Bottom() const { return aFrame.Bottom(); } + SwFillCursorPos &Fill() const { return *pCMS->m_pFill; } void SetTab( sal_uInt16 nNew ) { pCMS->m_pFill->nTabCnt = nNew; } void SetSpace( sal_uInt16 nNew ) { pCMS->m_pFill->nSpaceCnt = nNew; } void SetOrient( const sal_Int16 eNew ){ pCMS->m_pFill->eOrient = eNew; } }; -bool SwTextFrm::_GetCrsrOfst(SwPosition* pPos, const Point& rPoint, - const bool bChgFrm, SwCrsrMoveState* pCMS ) const +bool SwTextFrame::_GetCursorOfst(SwPosition* pPos, const Point& rPoint, + const bool bChgFrame, SwCursorMoveState* pCMS ) const { - // _GetCrsrOfst is called by GetCrsrOfst and GetKeyCrsrOfst. + // _GetCursorOfst is called by GetCursorOfst and GetKeyCursorOfst. // Never just a return false. if( IsLocked() || IsHiddenNow() ) return false; - const_cast<SwTextFrm*>(this)->GetFormatted(); + const_cast<SwTextFrame*>(this)->GetFormatted(); Point aOldPoint( rPoint ); if ( IsVertical() ) { SwitchVerticalToHorizontal( (Point&)rPoint ); - const_cast<SwTextFrm*>(this)->SwapWidthAndHeight(); + const_cast<SwTextFrame*>(this)->SwapWidthAndHeight(); } if ( IsRightToLeft() ) SwitchRTLtoLTR( (Point&)rPoint ); SwFillData *pFillData = ( pCMS && pCMS->m_pFill ) ? - new SwFillData( pCMS, pPos, Frm(), rPoint ) : nullptr; + new SwFillData( pCMS, pPos, Frame(), rPoint ) : nullptr; if ( IsEmpty() ) { - SwTextNode* pTextNd = const_cast<SwTextFrm*>(this)->GetTextNode(); + SwTextNode* pTextNd = const_cast<SwTextFrame*>(this)->GetTextNode(); pPos->nNode = *pTextNd; pPos->nContent.Assign( pTextNd, 0 ); if( pCMS && pCMS->m_bFieldInfo ) { - SwTwips nDiff = rPoint.X() - Frm().Left() - Prt().Left(); + SwTwips nDiff = rPoint.X() - Frame().Left() - Prt().Left(); if( nDiff > 50 || nDiff < 0 ) pCMS->m_bPosCorr = true; } } else { - SwTextSizeInfo aInf( const_cast<SwTextFrm*>(this) ); - SwTextCursor aLine( const_cast<SwTextFrm*>(this), &aInf ); + SwTextSizeInfo aInf( const_cast<SwTextFrame*>(this) ); + SwTextCursor aLine( const_cast<SwTextFrame*>(this), &aInf ); - // See comment in AdjustFrm() - SwTwips nMaxY = Frm().Top() + Prt().Top() + Prt().Height(); + // See comment in AdjustFrame() + SwTwips nMaxY = Frame().Top() + Prt().Top() + Prt().Height(); aLine.TwipsToLine( rPoint.Y() ); while( aLine.Y() + aLine.GetLineHeight() > nMaxY ) { @@ -594,25 +594,25 @@ bool SwTextFrm::_GetCrsrOfst(SwPosition* pPos, const Point& rPoint, while( aLine.GetLineNr() > 1 ) aLine.Prev(); - sal_Int32 nOffset = aLine.GetCrsrOfst( pPos, rPoint, bChgFrm, pCMS ); + sal_Int32 nOffset = aLine.GetCursorOfst( pPos, rPoint, bChgFrame, pCMS ); if( pCMS && pCMS->m_eState == MV_NONE && aLine.GetEnd() == nOffset ) pCMS->m_eState = MV_RIGHTMARGIN; // pPos is a pure IN parameter and must not be evaluated. - // pIter->GetCrsrOfst returns from a nesting with COMPLETE_STRING. - // If SwTextIter::GetCrsrOfst calls GetCrsrOfst further by itself + // pIter->GetCursorOfst returns from a nesting with COMPLETE_STRING. + // If SwTextIter::GetCursorOfst calls GetCursorOfst further by itself // nNode changes the position. // In such cases, pPos must not be calculated. if( COMPLETE_STRING != nOffset ) { - SwTextNode* pTextNd = const_cast<SwTextFrm*>(this)->GetTextNode(); + SwTextNode* pTextNd = const_cast<SwTextFrame*>(this)->GetTextNode(); pPos->nNode = *pTextNd; pPos->nContent.Assign( pTextNd, nOffset ); if( pFillData ) { if (pTextNd->GetText().getLength() > nOffset || - rPoint.Y() < Frm().Top() ) + rPoint.Y() < Frame().Top() ) pFillData->bInner = true; pFillData->bFirstLine = aLine.GetLineNr() < 2; if (pTextNd->GetText().getLength()) @@ -624,22 +624,22 @@ bool SwTextFrm::_GetCrsrOfst(SwPosition* pPos, const Point& rPoint, } } bool bChgFillData = false; - if( pFillData && FindPageFrm()->Frm().IsInside( aOldPoint ) ) + if( pFillData && FindPageFrame()->Frame().IsInside( aOldPoint ) ) { - FillCrsrPos( *pFillData ); + FillCursorPos( *pFillData ); bChgFillData = true; } if ( IsVertical() ) { if ( bChgFillData ) - SwitchHorizontalToVertical( pFillData->Fill().aCrsr.Pos() ); - const_cast<SwTextFrm*>(this)->SwapWidthAndHeight(); + SwitchHorizontalToVertical( pFillData->Fill().aCursor.Pos() ); + const_cast<SwTextFrame*>(this)->SwapWidthAndHeight(); } if ( IsRightToLeft() && bChgFillData ) { - SwitchLTRtoRTL( pFillData->Fill().aCrsr.Pos() ); + SwitchLTRtoRTL( pFillData->Fill().aCursor.Pos() ); const sal_Int16 eOrient = pFillData->pCMS->m_pFill->eOrient; if ( text::HoriOrientation::LEFT == eOrient ) @@ -654,42 +654,42 @@ bool SwTextFrm::_GetCrsrOfst(SwPosition* pPos, const Point& rPoint, return true; } -bool SwTextFrm::GetCrsrOfst(SwPosition* pPos, Point& rPoint, - SwCrsrMoveState* pCMS, bool ) const +bool SwTextFrame::GetCursorOfst(SwPosition* pPos, Point& rPoint, + SwCursorMoveState* pCMS, bool ) const { - const bool bChgFrm = !(pCMS && MV_UPDOWN == pCMS->m_eState); - return _GetCrsrOfst( pPos, rPoint, bChgFrm, pCMS ); + const bool bChgFrame = !(pCMS && MV_UPDOWN == pCMS->m_eState); + return _GetCursorOfst( pPos, rPoint, bChgFrame, pCMS ); } /* * Layout-oriented cursor movement to the line start. */ -bool SwTextFrm::LeftMargin(SwPaM *pPam) const +bool SwTextFrame::LeftMargin(SwPaM *pPam) const { if( &pPam->GetNode() != GetNode() ) - pPam->GetPoint()->nNode = *const_cast<SwTextFrm*>(this)->GetTextNode(); + pPam->GetPoint()->nNode = *const_cast<SwTextFrame*>(this)->GetTextNode(); - SwTextFrm *pFrm = GetAdjFrmAtPos( const_cast<SwTextFrm*>(this), *pPam->GetPoint(), + SwTextFrame *pFrame = GetAdjFrameAtPos( const_cast<SwTextFrame*>(this), *pPam->GetPoint(), SwTextCursor::IsRightMargin() ); - pFrm->GetFormatted(); + pFrame->GetFormatted(); sal_Int32 nIndx; - if ( pFrm->IsEmpty() ) + if ( pFrame->IsEmpty() ) nIndx = 0; else { - SwTextSizeInfo aInf( pFrm ); - SwTextCursor aLine( pFrm, &aInf ); + SwTextSizeInfo aInf( pFrame ); + SwTextCursor aLine( pFrame, &aInf ); - aLine.CharCrsrToLine(pPam->GetPoint()->nContent.GetIndex()); + aLine.CharCursorToLine(pPam->GetPoint()->nContent.GetIndex()); nIndx = aLine.GetStart(); - if( pFrm->GetOfst() && !pFrm->IsFollow() && !aLine.GetPrev() ) + if( pFrame->GetOfst() && !pFrame->IsFollow() && !aLine.GetPrev() ) { - sw_ChangeOffset( pFrm, 0 ); + sw_ChangeOffset( pFrame, 0 ); nIndx = 0; } } - pPam->GetPoint()->nContent = SwIndex( pFrm->GetTextNode(), nIndx ); + pPam->GetPoint()->nContent = SwIndex( pFrame->GetTextNode(), nIndx ); SwTextCursor::SetRightMargin( false ); return true; } @@ -700,45 +700,45 @@ bool SwTextFrm::LeftMargin(SwPaM *pPam) const * the last char in order to append text. */ -bool SwTextFrm::RightMargin(SwPaM *pPam, bool bAPI) const +bool SwTextFrame::RightMargin(SwPaM *pPam, bool bAPI) const { if( &pPam->GetNode() != GetNode() ) - pPam->GetPoint()->nNode = *const_cast<SwTextFrm*>(this)->GetTextNode(); + pPam->GetPoint()->nNode = *const_cast<SwTextFrame*>(this)->GetTextNode(); - SwTextFrm *pFrm = GetAdjFrmAtPos( const_cast<SwTextFrm*>(this), *pPam->GetPoint(), + SwTextFrame *pFrame = GetAdjFrameAtPos( const_cast<SwTextFrame*>(this), *pPam->GetPoint(), SwTextCursor::IsRightMargin() ); - pFrm->GetFormatted(); + pFrame->GetFormatted(); sal_Int32 nRightMargin; if ( IsEmpty() ) nRightMargin = 0; else { - SwTextSizeInfo aInf( pFrm ); - SwTextCursor aLine( pFrm, &aInf ); + SwTextSizeInfo aInf( pFrame ); + SwTextCursor aLine( pFrame, &aInf ); - aLine.CharCrsrToLine(pPam->GetPoint()->nContent.GetIndex()); + aLine.CharCursorToLine(pPam->GetPoint()->nContent.GetIndex()); nRightMargin = aLine.GetStart() + aLine.GetCurr()->GetLen(); // We skip hard line brakes if( aLine.GetCurr()->GetLen() && CH_BREAK == aInf.GetText()[nRightMargin - 1]) --nRightMargin; - else if( !bAPI && (aLine.GetNext() || pFrm->GetFollow()) ) + else if( !bAPI && (aLine.GetNext() || pFrame->GetFollow()) ) { while( nRightMargin > aLine.GetStart() && ' ' == aInf.GetText()[nRightMargin - 1]) --nRightMargin; } } - pPam->GetPoint()->nContent = SwIndex( pFrm->GetTextNode(), nRightMargin ); + pPam->GetPoint()->nContent = SwIndex( pFrame->GetTextNode(), nRightMargin ); SwTextCursor::SetRightMargin( !bAPI ); return true; } -// The following two methods try to put the Crsr into the next/succsessive +// The following two methods try to put the Cursor into the next/succsessive // line. If we do not have a preceding/successive line we forward the call // to the base class. -// The Crsr's horizontal justification is done afterwards by the CrsrShell. +// The Cursor's horizontal justification is done afterwards by the CursorShell. class SwSetToRightMargin { @@ -749,7 +749,7 @@ public: inline void SetRight( const bool bNew ) { bRight = bNew; } }; -bool SwTextFrm::_UnitUp( SwPaM *pPam, const SwTwips nOffset, +bool SwTextFrame::_UnitUp( SwPaM *pPam, const SwTwips nOffset, bool bSetInReadOnly ) const { // Set the RightMargin if needed @@ -761,10 +761,10 @@ bool SwTextFrm::_UnitUp( SwPaM *pPam, const SwTwips nOffset, { // If the PaM is located within different boxes, we have a table selection, // which is handled by the base class. - return SwContentFrm::UnitUp( pPam, nOffset, bSetInReadOnly ); + return SwContentFrame::UnitUp( pPam, nOffset, bSetInReadOnly ); } - const_cast<SwTextFrm*>(this)->GetFormatted(); + const_cast<SwTextFrame*>(this)->GetFormatted(); const sal_Int32 nPos = pPam->GetPoint()->nContent.GetIndex(); SwRect aCharBox; @@ -774,14 +774,14 @@ bool SwTextFrm::_UnitUp( SwPaM *pPam, const SwTwips nOffset, do { if( nFormat != COMPLETE_STRING && !IsFollow() ) - sw_ChangeOffset( const_cast<SwTextFrm*>(this), nFormat ); + sw_ChangeOffset( const_cast<SwTextFrame*>(this), nFormat ); - SwTextSizeInfo aInf( const_cast<SwTextFrm*>(this) ); - SwTextCursor aLine( const_cast<SwTextFrm*>(this), &aInf ); + SwTextSizeInfo aInf( const_cast<SwTextFrame*>(this) ); + SwTextCursor aLine( const_cast<SwTextFrame*>(this), &aInf ); // Optimize away flys with no flow and IsDummy() if( nPos ) - aLine.CharCrsrToLine( nPos ); + aLine.CharCursorToLine( nPos ); else aLine.Top(); @@ -821,16 +821,16 @@ bool SwTextFrm::_UnitUp( SwPaM *pPam, const SwTwips nOffset, aCharBox.SSize().Width() /= 2; aCharBox.Pos().X() = aCharBox.Pos().X() - 150; - // See comment in SwTextFrm::GetCrsrOfst() + // See comment in SwTextFrame::GetCursorOfst() #if OSL_DEBUG_LEVEL > 0 const sal_uLong nOldNode = pPam->GetPoint()->nNode.GetIndex(); #endif // The node should not be changed - sal_Int32 nTmpOfst = aLine.GetCrsrOfst( pPam->GetPoint(), + sal_Int32 nTmpOfst = aLine.GetCursorOfst( pPam->GetPoint(), aCharBox.Pos(), false ); #if OSL_DEBUG_LEVEL > 0 OSL_ENSURE( nOldNode == pPam->GetPoint()->nNode.GetIndex(), - "SwTextFrm::UnitUp: illegal node change" ); + "SwTextFrame::UnitUp: illegal node change" ); #endif // We make sure that we move up. @@ -840,7 +840,7 @@ bool SwTextFrm::_UnitUp( SwPaM *pPam, const SwTwips nOffset, aSet.SetRight( true ); } pPam->GetPoint()->nContent = - SwIndex( const_cast<SwTextFrm*>(this)->GetTextNode(), nTmpOfst ); + SwIndex( const_cast<SwTextFrame*>(this)->GetTextNode(), nTmpOfst ); return true; } @@ -858,13 +858,13 @@ bool SwTextFrm::_UnitUp( SwPaM *pPam, const SwTwips nOffset, */ if ( IsFollow() ) { - const SwTextFrm *pTmpPrev = FindMaster(); + const SwTextFrame *pTmpPrev = FindMaster(); sal_Int32 nOffs = GetOfst(); if( pTmpPrev ) { - SwViewShell *pSh = getRootFrm()->GetCurrShell(); + SwViewShell *pSh = getRootFrame()->GetCurrShell(); const bool bProtectedAllowed = pSh && pSh->GetViewOptions()->IsCursorInProtectedArea(); - const SwTextFrm *pPrevPrev = pTmpPrev; + const SwTextFrame *pPrevPrev = pTmpPrev; // We skip protected frames and frames without content here while( pPrevPrev && ( pPrevPrev->GetOfst() == nOffs || ( !bProtectedAllowed && pPrevPrev->IsProtected() ) ) ) @@ -877,12 +877,12 @@ bool SwTextFrm::_UnitUp( SwPaM *pPam, const SwTwips nOffset, pPrevPrev = nullptr; } if ( !pPrevPrev ) - return pTmpPrev->SwContentFrm::UnitUp( pPam, nOffset, bSetInReadOnly ); - aCharBox.Pos().Y() = pPrevPrev->Frm().Bottom() - 1; - return pPrevPrev->GetKeyCrsrOfst( pPam->GetPoint(), aCharBox.Pos() ); + return pTmpPrev->SwContentFrame::UnitUp( pPam, nOffset, bSetInReadOnly ); + aCharBox.Pos().Y() = pPrevPrev->Frame().Bottom() - 1; + return pPrevPrev->GetKeyCursorOfst( pPam->GetPoint(), aCharBox.Pos() ); } } - return SwContentFrm::UnitUp( pPam, nOffset, bSetInReadOnly ); + return SwContentFrame::UnitUp( pPam, nOffset, bSetInReadOnly ); } // Used for Bidi. nPos is the logical position in the string, bLeft indicates @@ -892,7 +892,7 @@ bool SwTextFrm::_UnitUp( SwPaM *pPam, const SwTwips nOffset, // current position static void lcl_VisualMoveRecursion( const SwLineLayout& rCurrLine, sal_Int32 nIdx, sal_Int32& nPos, bool& bRight, - sal_uInt8& nCrsrLevel, sal_uInt8 nDefaultDir ) + sal_uInt8& nCursorLevel, sal_uInt8 nDefaultDir ) { const SwLinePortion* pPor = rCurrLine.GetFirstPortion(); const SwLinePortion* pLast = nullptr; @@ -916,7 +916,7 @@ static void lcl_VisualMoveRecursion( const SwLineLayout& rCurrLine, sal_Int32 nI nPos = nPos + pPor->GetLen(); // leave bidi portion - if ( nCrsrLevel != nDefaultDir ) + if ( nCursorLevel != nDefaultDir ) { bRecurse = false; } @@ -925,7 +925,7 @@ static void lcl_VisualMoveRecursion( const SwLineLayout& rCurrLine, sal_Int32 nI // buffer: abcXYZ123 in LTR paragraph // view: abc123ZYX // cursor is between c and X in the buffer and cursor level = 0 - nCrsrLevel++; + nCursorLevel++; } // 2. special case: at beginning of portion after bidi portion @@ -933,7 +933,7 @@ static void lcl_VisualMoveRecursion( const SwLineLayout& rCurrLine, sal_Int32 nI static_cast<const SwMultiPortion*>(pLast)->IsBidi() && nIdx == nPos ) { // enter bidi portion - if ( nCrsrLevel != nDefaultDir ) + if ( nCursorLevel != nDefaultDir ) { bRecurse = true; nIdx = nIdx - pLast->GetLen(); @@ -947,20 +947,20 @@ static void lcl_VisualMoveRecursion( const SwLineLayout& rCurrLine, sal_Int32 nI const SwLineLayout& rLine = static_cast<const SwMultiPortion*>(pPor)->GetRoot(); sal_Int32 nTmpPos = nPos - nIdx; bool bTmpForward = ! bRight; - sal_uInt8 nTmpCrsrLevel = nCrsrLevel; + sal_uInt8 nTmpCursorLevel = nCursorLevel; lcl_VisualMoveRecursion( rLine, 0, nTmpPos, bTmpForward, - nTmpCrsrLevel, nDefaultDir + 1 ); + nTmpCursorLevel, nDefaultDir + 1 ); nPos = nTmpPos + nIdx; bRight = bTmpForward; - nCrsrLevel = nTmpCrsrLevel; + nCursorLevel = nTmpCursorLevel; } // go forward else { bRight = true; - nCrsrLevel = nDefaultDir; + nCursorLevel = nDefaultDir; } } @@ -972,7 +972,7 @@ static void lcl_VisualMoveRecursion( const SwLineLayout& rCurrLine, sal_Int32 nI if ( bRecurse && nIdx == nPos ) { // leave bidi portion - if ( nCrsrLevel == nDefaultDir ) + if ( nCursorLevel == nDefaultDir ) { bRecurse = false; } @@ -985,7 +985,7 @@ static void lcl_VisualMoveRecursion( const SwLineLayout& rCurrLine, sal_Int32 nI nPos = nPos - pLast->GetLen(); // enter bidi portion - if ( nCrsrLevel % 2 == nDefaultDir % 2 ) + if ( nCursorLevel % 2 == nDefaultDir % 2 ) { bRecurse = true; nIdx = nIdx - pLast->GetLen(); @@ -995,7 +995,7 @@ static void lcl_VisualMoveRecursion( const SwLineLayout& rCurrLine, sal_Int32 nI // buffer: abcXYZ123 in LTR paragraph // view: abc123ZYX // cursor is behind 3 in the buffer and cursor level = 2 - if ( nDefaultDir + 2 == nCrsrLevel ) + if ( nDefaultDir + 2 == nCursorLevel ) nPos = nPos + pLast->GetLen(); } } @@ -1006,37 +1006,37 @@ static void lcl_VisualMoveRecursion( const SwLineLayout& rCurrLine, sal_Int32 nI const SwLineLayout& rLine = static_cast<const SwMultiPortion*>(pPor)->GetRoot(); sal_Int32 nTmpPos = nPos - nIdx; bool bTmpForward = ! bRight; - sal_uInt8 nTmpCrsrLevel = nCrsrLevel; + sal_uInt8 nTmpCursorLevel = nCursorLevel; lcl_VisualMoveRecursion( rLine, 0, nTmpPos, bTmpForward, - nTmpCrsrLevel, nDefaultDir + 1 ); + nTmpCursorLevel, nDefaultDir + 1 ); // special case: // buffer: abcXYZ123 in LTR paragraph // view: abc123ZYX // cursor is between Z and 1 in the buffer and cursor level = 2 - if ( nTmpPos == pPor->GetLen() && nTmpCrsrLevel == nDefaultDir + 1 ) + if ( nTmpPos == pPor->GetLen() && nTmpCursorLevel == nDefaultDir + 1 ) { nTmpPos = nTmpPos - pPor->GetLen(); - nTmpCrsrLevel = nDefaultDir; + nTmpCursorLevel = nDefaultDir; bTmpForward = ! bTmpForward; } nPos = nTmpPos + nIdx; bRight = bTmpForward; - nCrsrLevel = nTmpCrsrLevel; + nCursorLevel = nTmpCursorLevel; } // go backward else { bRight = false; - nCrsrLevel = nDefaultDir; + nCursorLevel = nDefaultDir; } } } -void SwTextFrm::PrepareVisualMove( sal_Int32& nPos, sal_uInt8& nCrsrLevel, - bool& bForward, bool bInsertCrsr ) +void SwTextFrame::PrepareVisualMove( sal_Int32& nPos, sal_uInt8& nCursorLevel, + bool& bForward, bool bInsertCursor ) { if( IsEmpty() || IsHiddenNow() ) return; @@ -1047,7 +1047,7 @@ void SwTextFrm::PrepareVisualMove( sal_Int32& nPos, sal_uInt8& nCrsrLevel, SwTextCursor aLine(this, &aInf); if( nPos ) - aLine.CharCrsrToLine( nPos ); + aLine.CharCursorToLine( nPos ); else aLine.Top(); @@ -1064,10 +1064,10 @@ void SwTextFrm::PrepareVisualMove( sal_Int32& nPos, sal_uInt8& nCrsrLevel, // If the cursor level is 1, the cursor blinks between X and d and // -> sets the cursor between d and e. // The overwrite cursor simply travels to the next visual character. - if ( bInsertCrsr ) + if ( bInsertCursor ) { lcl_VisualMoveRecursion( *pLine, nStt, nPos, bForward, - nCrsrLevel, IsRightToLeft() ? 1 : 0 ); + nCursorLevel, IsRightToLeft() ? 1 : 0 ); return; } @@ -1138,7 +1138,7 @@ void SwTextFrm::PrepareVisualMove( sal_Int32& nPos, sal_uInt8& nCrsrLevel, ubidi_close( pBidi ); } -bool SwTextFrm::_UnitDown(SwPaM *pPam, const SwTwips nOffset, +bool SwTextFrame::_UnitDown(SwPaM *pPam, const SwTwips nOffset, bool bSetInReadOnly ) const { @@ -1148,15 +1148,15 @@ bool SwTextFrm::_UnitDown(SwPaM *pPam, const SwTwips nOffset, { // If the PaM is located within different boxes, we have a table selection, // which is handled by the base class. - return SwContentFrm::UnitDown( pPam, nOffset, bSetInReadOnly ); + return SwContentFrame::UnitDown( pPam, nOffset, bSetInReadOnly ); } - const_cast<SwTextFrm*>(this)->GetFormatted(); + const_cast<SwTextFrame*>(this)->GetFormatted(); const sal_Int32 nPos = pPam->GetPoint()->nContent.GetIndex(); SwRect aCharBox; - const SwContentFrm *pTmpFollow = nullptr; + const SwContentFrame *pTmpFollow = nullptr; if ( IsVertical() ) - const_cast<SwTextFrm*>(this)->SwapWidthAndHeight(); + const_cast<SwTextFrame*>(this)->SwapWidthAndHeight(); if ( !IsEmpty() && !IsHiddenNow() ) { @@ -1164,14 +1164,14 @@ bool SwTextFrm::_UnitDown(SwPaM *pPam, const SwTwips nOffset, do { if( nFormat != COMPLETE_STRING && !IsFollow() && - !sw_ChangeOffset( const_cast<SwTextFrm*>(this), nFormat ) ) + !sw_ChangeOffset( const_cast<SwTextFrame*>(this), nFormat ) ) break; - SwTextSizeInfo aInf( const_cast<SwTextFrm*>(this) ); - SwTextCursor aLine( const_cast<SwTextFrm*>(this), &aInf ); + SwTextSizeInfo aInf( const_cast<SwTextFrame*>(this) ); + SwTextCursor aLine( const_cast<SwTextFrame*>(this), &aInf ); nFormat = aLine.GetEnd(); - aLine.CharCrsrToLine( nPos ); + aLine.CharCursorToLine( nPos ); const SwLineLayout* pNextLine = aLine.GetNextLine(); const sal_Int32 nStart = aLine.GetStart(); @@ -1183,34 +1183,34 @@ bool SwTextFrm::_UnitDown(SwPaM *pPam, const SwTwips nOffset, { aCharBox.SSize().Width() /= 2; #if OSL_DEBUG_LEVEL > 0 - // See comment in SwTextFrm::GetCrsrOfst() + // See comment in SwTextFrame::GetCursorOfst() const sal_uLong nOldNode = pPam->GetPoint()->nNode.GetIndex(); #endif if ( pNextLine && ! bFirstOfDouble ) aLine.NextLine(); - sal_Int32 nTmpOfst = aLine.GetCrsrOfst( pPam->GetPoint(), + sal_Int32 nTmpOfst = aLine.GetCursorOfst( pPam->GetPoint(), aCharBox.Pos(), false ); #if OSL_DEBUG_LEVEL > 0 OSL_ENSURE( nOldNode == pPam->GetPoint()->nNode.GetIndex(), - "SwTextFrm::UnitDown: illegal node change" ); + "SwTextFrame::UnitDown: illegal node change" ); #endif // We make sure that we move down. if( nTmpOfst <= nStart && ! bFirstOfDouble ) nTmpOfst = nStart + 1; pPam->GetPoint()->nContent = - SwIndex( const_cast<SwTextFrm*>(this)->GetTextNode(), nTmpOfst ); + SwIndex( const_cast<SwTextFrame*>(this)->GetTextNode(), nTmpOfst ); if ( IsVertical() ) - const_cast<SwTextFrm*>(this)->SwapWidthAndHeight(); + const_cast<SwTextFrame*>(this)->SwapWidthAndHeight(); return true; } if( nullptr != ( pTmpFollow = GetFollow() ) ) { // Skip protected follows - const SwContentFrm* pTmp = pTmpFollow; - SwViewShell *pSh = getRootFrm()->GetCurrShell(); + const SwContentFrame* pTmp = pTmpFollow; + SwViewShell *pSh = getRootFrame()->GetCurrShell(); if( !pSh || !pSh->GetViewOptions()->IsCursorInProtectedArea() ) { while( pTmpFollow && pTmpFollow->IsProtected() ) @@ -1222,8 +1222,8 @@ bool SwTextFrm::_UnitDown(SwPaM *pPam, const SwTwips nOffset, if( !pTmpFollow ) // Only protected ones left { if ( IsVertical() ) - const_cast<SwTextFrm*>(this)->SwapWidthAndHeight(); - return pTmp->SwContentFrm::UnitDown( pPam, nOffset, bSetInReadOnly ); + const_cast<SwTextFrame*>(this)->SwapWidthAndHeight(); + return pTmp->SwContentFrame::UnitDown( pPam, nOffset, bSetInReadOnly ); } aLine.GetCharRect( &aCharBox, nPos ); @@ -1251,63 +1251,63 @@ bool SwTextFrm::_UnitDown(SwPaM *pPam, const SwTwips nOffset, pTmpFollow = GetFollow(); if ( IsVertical() ) - const_cast<SwTextFrm*>(this)->SwapWidthAndHeight(); + const_cast<SwTextFrame*>(this)->SwapWidthAndHeight(); // We take a shortcut for follows if( pTmpFollow ) { - aCharBox.Pos().Y() = pTmpFollow->Frm().Top() + 1; - return static_cast<const SwTextFrm*>(pTmpFollow)->GetKeyCrsrOfst( pPam->GetPoint(), + aCharBox.Pos().Y() = pTmpFollow->Frame().Top() + 1; + return static_cast<const SwTextFrame*>(pTmpFollow)->GetKeyCursorOfst( pPam->GetPoint(), aCharBox.Pos() ); } - return SwContentFrm::UnitDown( pPam, nOffset, bSetInReadOnly ); + return SwContentFrame::UnitDown( pPam, nOffset, bSetInReadOnly ); } -bool SwTextFrm::UnitUp(SwPaM *pPam, const SwTwips nOffset, +bool SwTextFrame::UnitUp(SwPaM *pPam, const SwTwips nOffset, bool bSetInReadOnly ) const { - /* We call ContentNode::GertFrm() in CrsrSh::Up(). + /* We call ContentNode::GertFrame() in CursorSh::Up(). * This _always returns the master. * In order to not mess with cursor travelling, we correct here - * in SwTextFrm. - * We calculate UnitUp for pFrm. pFrm is either a master (= this) or a + * in SwTextFrame. + * We calculate UnitUp for pFrame. pFrame is either a master (= this) or a * follow (!= this). */ - const SwTextFrm *pFrm = GetAdjFrmAtPos( const_cast<SwTextFrm*>(this), *(pPam->GetPoint()), + const SwTextFrame *pFrame = GetAdjFrameAtPos( const_cast<SwTextFrame*>(this), *(pPam->GetPoint()), SwTextCursor::IsRightMargin() ); - const bool bRet = pFrm->_UnitUp( pPam, nOffset, bSetInReadOnly ); + const bool bRet = pFrame->_UnitUp( pPam, nOffset, bSetInReadOnly ); // No SwTextCursor::SetRightMargin( false ); // Instead we have a SwSetToRightMargin in _UnitUp return bRet; } -bool SwTextFrm::UnitDown(SwPaM *pPam, const SwTwips nOffset, +bool SwTextFrame::UnitDown(SwPaM *pPam, const SwTwips nOffset, bool bSetInReadOnly ) const { - const SwTextFrm *pFrm = GetAdjFrmAtPos(const_cast<SwTextFrm*>(this), *(pPam->GetPoint()), + const SwTextFrame *pFrame = GetAdjFrameAtPos(const_cast<SwTextFrame*>(this), *(pPam->GetPoint()), SwTextCursor::IsRightMargin() ); - const bool bRet = pFrm->_UnitDown( pPam, nOffset, bSetInReadOnly ); + const bool bRet = pFrame->_UnitDown( pPam, nOffset, bSetInReadOnly ); SwTextCursor::SetRightMargin( false ); return bRet; } -void SwTextFrm::FillCrsrPos( SwFillData& rFill ) const +void SwTextFrame::FillCursorPos( SwFillData& rFill ) const { - if( !rFill.bColumn && GetUpper()->IsColBodyFrm() ) // ColumnFrms now with BodyFrm + if( !rFill.bColumn && GetUpper()->IsColBodyFrame() ) // ColumnFrames now with BodyFrame { - const SwColumnFrm* pTmp = - static_cast<const SwColumnFrm*>(GetUpper()->GetUpper()->GetUpper()->Lower()); // The 1st column - // The first SwFrm in BodyFrm of the first column - const SwFrm* pFrm = static_cast<const SwLayoutFrm*>(pTmp->Lower())->Lower(); + const SwColumnFrame* pTmp = + static_cast<const SwColumnFrame*>(GetUpper()->GetUpper()->GetUpper()->Lower()); // The 1st column + // The first SwFrame in BodyFrame of the first column + const SwFrame* pFrame = static_cast<const SwLayoutFrame*>(pTmp->Lower())->Lower(); sal_uInt16 nNextCol = 0; // In which column do we end up in? - while( rFill.X() > pTmp->Frm().Right() && pTmp->GetNext() ) + while( rFill.X() > pTmp->Frame().Right() && pTmp->GetNext() ) { - pTmp = static_cast<const SwColumnFrm*>(pTmp->GetNext()); - if( static_cast<const SwLayoutFrm*>(pTmp->Lower())->Lower() ) // ColumnFrms now with BodyFrm + pTmp = static_cast<const SwColumnFrame*>(pTmp->GetNext()); + if( static_cast<const SwLayoutFrame*>(pTmp->Lower())->Lower() ) // ColumnFrames now with BodyFrame { - pFrm = static_cast<const SwLayoutFrm*>(pTmp->Lower())->Lower(); + pFrame = static_cast<const SwLayoutFrame*>(pTmp->Lower())->Lower(); nNextCol = 0; } else @@ -1315,39 +1315,39 @@ void SwTextFrm::FillCrsrPos( SwFillData& rFill ) const } if( pTmp != GetUpper()->GetUpper() ) // Did we end up in another column? { - if( !pFrm ) + if( !pFrame ) return; if( nNextCol ) { - while( pFrm->GetNext() ) - pFrm = pFrm->GetNext(); + while( pFrame->GetNext() ) + pFrame = pFrame->GetNext(); } else { - while( pFrm->GetNext() && pFrm->Frm().Bottom() < rFill.Y() ) - pFrm = pFrm->GetNext(); + while( pFrame->GetNext() && pFrame->Frame().Bottom() < rFill.Y() ) + pFrame = pFrame->GetNext(); } // No filling, if the last frame in the targeted column does // not contain a paragraph, but e.g. a table - if( pFrm->IsTextFrm() ) + if( pFrame->IsTextFrame() ) { rFill.Fill().nColumnCnt = nNextCol; rFill.bColumn = true; if( rFill.pPos ) { - SwTextNode* pTextNd = const_cast<SwTextFrm*>(static_cast<const SwTextFrm*>(pFrm))->GetTextNode(); + SwTextNode* pTextNd = const_cast<SwTextFrame*>(static_cast<const SwTextFrame*>(pFrame))->GetTextNode(); rFill.pPos->nNode = *pTextNd; rFill.pPos->nContent.Assign( pTextNd, pTextNd->GetText().getLength()); } if( nNextCol ) { - rFill.aFrm = pTmp->Prt(); - rFill.aFrm += pTmp->Frm().Pos(); + rFill.aFrame = pTmp->Prt(); + rFill.aFrame += pTmp->Frame().Pos(); } else - rFill.aFrm = pFrm->Frm(); - static_cast<const SwTextFrm*>(pFrm)->FillCrsrPos( rFill ); + rFill.aFrame = pFrame->Frame(); + static_cast<const SwTextFrame*>(pFrame)->FillCursorPos( rFill ); } return; } @@ -1355,14 +1355,14 @@ void SwTextFrm::FillCrsrPos( SwFillData& rFill ) const SwFont *pFnt; SwTextFormatColl* pColl = GetTextNode()->GetTextColl(); SwTwips nFirst = GetTextNode()->GetSwAttrSet().GetULSpace().GetLower(); - SwTwips nDiff = rFill.Y() - Frm().Bottom(); + SwTwips nDiff = rFill.Y() - Frame().Bottom(); if( nDiff < nFirst ) nDiff = -1; else pColl = &pColl->GetNextTextFormatColl(); SwAttrSet aSet( const_cast<SwDoc*>(GetTextNode()->GetDoc())->GetAttrPool(), aTextFormatCollSetRange ); const SwAttrSet* pSet = &pColl->GetAttrSet(); - SwViewShell *pSh = getRootFrm()->GetCurrShell(); + SwViewShell *pSh = getRootFrame()->GetCurrShell(); if( GetTextNode()->HasSwAttrSet() ) { aSet.Put( *GetTextNode()->GetpSwAttrSet() ); @@ -1393,7 +1393,7 @@ void SwTextFrm::FillCrsrPos( SwFillData& rFill ) const SwTwips nDist = std::max( rUL.GetLower(), rUL.GetUpper() ); if( rFill.Fill().nColumnCnt ) { - rFill.aFrm.Height( nLineHeight ); + rFill.aFrame.Height( nLineHeight ); nDiff = rFill.Y() - rFill.Bottom(); nFirst = 0; } @@ -1423,7 +1423,7 @@ void SwTextFrm::FillCrsrPos( SwFillData& rFill ) const const SvxTabStopItem &rRuler = pSet->GetTabStops(); const SvxLRSpaceItem &rLRSpace = pSet->GetLRSpace(); - SwRect &rRect = rFill.Fill().aCrsr; + SwRect &rRect = rFill.Fill().aCursor; rRect.Top( rFill.Bottom() + (nDiff+1) * nDist - nLineHeight ); if( nFirst && nDiff > -1 ) rRect.Top( rRect.Top() + nFirst ); @@ -1641,13 +1641,13 @@ void SwTextFrm::FillCrsrPos( SwFillData& rFill ) const } } // Do we extend over the page's/column's/etc. lower edge? - const SwFrm* pUp = GetUpper(); + const SwFrame* pUp = GetUpper(); if( pUp->IsInSct() ) { - if( pUp->IsSctFrm() ) + if( pUp->IsSctFrame() ) pUp = pUp->GetUpper(); - else if( pUp->IsColBodyFrm() && - pUp->GetUpper()->GetUpper()->IsSctFrm() ) + else if( pUp->IsColBodyFrame() && + pUp->GetUpper()->GetUpper()->IsSctFrame() ) pUp = pUp->GetUpper()->GetUpper()->GetUpper(); } SWRECTFN( this ) @@ -1662,7 +1662,7 @@ void SwTextFrm::FillCrsrPos( SwFillData& rFill ) const rRect.Width( 1 ); } } - const_cast<SwCrsrMoveState*>(rFill.pCMS)->m_bFillRet = bFill; + const_cast<SwCursorMoveState*>(rFill.pCMS)->m_bFillRet = bFill; delete pFnt; } diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx index f4f21058639e..ac8c9b4ec3bf 100644 --- a/sw/source/core/text/frmform.cxx +++ b/sw/source/core/text/frmform.cxx @@ -67,25 +67,25 @@ public: }; sal_uInt16 FormatLevel::nLevel = 0; -void ValidateText( SwFrm *pFrm ) // Friend of frame +void ValidateText( SwFrame *pFrame ) // Friend of frame { - if ( ( ! pFrm->IsVertical() && - pFrm->Frm().Width() == pFrm->GetUpper()->Prt().Width() ) || - ( pFrm->IsVertical() && - pFrm->Frm().Height() == pFrm->GetUpper()->Prt().Height() ) ) - pFrm->mbValidSize = true; + if ( ( ! pFrame->IsVertical() && + pFrame->Frame().Width() == pFrame->GetUpper()->Prt().Width() ) || + ( pFrame->IsVertical() && + pFrame->Frame().Height() == pFrame->GetUpper()->Prt().Height() ) ) + pFrame->mbValidSize = true; } -void SwTextFrm::ValidateFrm() +void SwTextFrame::ValidateFrame() { - vcl::RenderContext* pRenderContext = getRootFrm()->GetCurrShell()->GetOut(); + vcl::RenderContext* pRenderContext = getRootFrame()->GetCurrShell()->GetOut(); // Validate surroundings to avoid oscillation SwSwapIfSwapped swap( this ); if ( !IsInFly() && !IsInTab() ) { // Only validate 'this' when inside a fly, the rest should actually only be // needed for footnotes, which do not exist in flys. - SwSectionFrm* pSct = FindSctFrm(); + SwSectionFrame* pSct = FindSctFrame(); if( pSct ) { if( !pSct->IsColLocked() ) @@ -94,7 +94,7 @@ void SwTextFrm::ValidateFrm() pSct = nullptr; } - SwFrm *pUp = GetUpper(); + SwFrame *pUp = GetUpper(); pUp->Calc(pRenderContext); if( pSct ) pSct->ColUnlock(); @@ -109,46 +109,46 @@ void SwTextFrm::ValidateFrm() pPara->SetPrepMustFit( bMustFit ); } -// After a RemoveFootnote the BodyFrm and all Frms contained within it, need to be +// After a RemoveFootnote the BodyFrame and all Frames contained within it, need to be // recalculated, so that the DeadLine is right. // First we search outwards, on the way back we calculate everything. -void _ValidateBodyFrm( SwFrm *pFrm ) +void _ValidateBodyFrame( SwFrame *pFrame ) { - vcl::RenderContext* pRenderContext = pFrm ? pFrm->getRootFrm()->GetCurrShell()->GetOut() : nullptr; - if( pFrm && !pFrm->IsCellFrm() ) + vcl::RenderContext* pRenderContext = pFrame ? pFrame->getRootFrame()->GetCurrShell()->GetOut() : nullptr; + if( pFrame && !pFrame->IsCellFrame() ) { - if( !pFrm->IsBodyFrm() && pFrm->GetUpper() ) - _ValidateBodyFrm( pFrm->GetUpper() ); - if( !pFrm->IsSctFrm() ) - pFrm->Calc(pRenderContext); + if( !pFrame->IsBodyFrame() && pFrame->GetUpper() ) + _ValidateBodyFrame( pFrame->GetUpper() ); + if( !pFrame->IsSctFrame() ) + pFrame->Calc(pRenderContext); else { - const bool bOld = static_cast<SwSectionFrm*>(pFrm)->IsContentLocked(); - static_cast<SwSectionFrm*>(pFrm)->SetContentLock( true ); - pFrm->Calc(pRenderContext); + const bool bOld = static_cast<SwSectionFrame*>(pFrame)->IsContentLocked(); + static_cast<SwSectionFrame*>(pFrame)->SetContentLock( true ); + pFrame->Calc(pRenderContext); if( !bOld ) - static_cast<SwSectionFrm*>(pFrm)->SetContentLock( false ); + static_cast<SwSectionFrame*>(pFrame)->SetContentLock( false ); } } } -void SwTextFrm::ValidateBodyFrm() +void SwTextFrame::ValidateBodyFrame() { SwSwapIfSwapped swap( this ); - // See comment in ValidateFrm() + // See comment in ValidateFrame() if ( !IsInFly() && !IsInTab() && - !( IsInSct() && FindSctFrm()->Lower()->IsColumnFrm() ) ) - _ValidateBodyFrm( GetUpper() ); + !( IsInSct() && FindSctFrame()->Lower()->IsColumnFrame() ) ) + _ValidateBodyFrame( GetUpper() ); } -bool SwTextFrm::_GetDropRect( SwRect &rRect ) const +bool SwTextFrame::_GetDropRect( SwRect &rRect ) const { - SwSwapIfNotSwapped swap(const_cast<SwTextFrm *>(this)); + SwSwapIfNotSwapped swap(const_cast<SwTextFrame *>(this)); - OSL_ENSURE( HasPara(), "SwTextFrm::_GetDropRect: try again next year." ); - SwTextSizeInfo aInf( const_cast<SwTextFrm*>(this) ); - SwTextMargin aLine( const_cast<SwTextFrm*>(this), &aInf ); + OSL_ENSURE( HasPara(), "SwTextFrame::_GetDropRect: try again next year." ); + SwTextSizeInfo aInf( const_cast<SwTextFrame*>(this) ); + SwTextMargin aLine( const_cast<SwTextFrame*>(this), &aInf ); if( aLine.GetDropLines() ) { rRect.Top( aLine.Y() ); @@ -167,26 +167,26 @@ bool SwTextFrm::_GetDropRect( SwRect &rRect ) const return false; } -const SwBodyFrm *SwTextFrm::FindBodyFrm() const +const SwBodyFrame *SwTextFrame::FindBodyFrame() const { if ( IsInDocBody() ) { - const SwFrm *pFrm = GetUpper(); - while( pFrm && !pFrm->IsBodyFrm() ) - pFrm = pFrm->GetUpper(); - return static_cast<const SwBodyFrm*>(pFrm); + const SwFrame *pFrame = GetUpper(); + while( pFrame && !pFrame->IsBodyFrame() ) + pFrame = pFrame->GetUpper(); + return static_cast<const SwBodyFrame*>(pFrame); } return nullptr; } -bool SwTextFrm::CalcFollow( const sal_Int32 nTextOfst ) +bool SwTextFrame::CalcFollow( const sal_Int32 nTextOfst ) { - vcl::RenderContext* pRenderContext = getRootFrm()->GetCurrShell()->GetOut(); + vcl::RenderContext* pRenderContext = getRootFrame()->GetCurrShell()->GetOut(); SwSwapIfSwapped swap( this ); OSL_ENSURE( HasFollow(), "CalcFollow: missing Follow." ); - SwTextFrm* pMyFollow = GetFollow(); + SwTextFrame* pMyFollow = GetFollow(); SwParaPortion *pPara = GetPara(); const bool bFollowField = pPara && pPara->IsFollowField(); @@ -197,18 +197,18 @@ bool SwTextFrm::CalcFollow( const sal_Int32 nTextOfst ) ( ! pMyFollow->IsVertical() && !pMyFollow->Prt().Height() ) ) { #if OSL_DEBUG_LEVEL > 0 - const SwFrm *pOldUp = GetUpper(); + const SwFrame *pOldUp = GetUpper(); #endif SWRECTFN ( this ) - SwTwips nOldBottom = (GetUpper()->Frm().*fnRect->fnGetBottom)(); - SwTwips nMyPos = (Frm().*fnRect->fnGetTop)(); + SwTwips nOldBottom = (GetUpper()->Frame().*fnRect->fnGetBottom)(); + SwTwips nMyPos = (Frame().*fnRect->fnGetTop)(); - const SwPageFrm *pPage = nullptr; + const SwPageFrame *pPage = nullptr; bool bOldInvaContent = true; if ( !IsInFly() && GetNext() ) { - pPage = FindPageFrm(); + pPage = FindPageFrame(); // Minimize = that is set back if needed - for invalidation see below bOldInvaContent = pPage->IsInvalidContent(); } @@ -217,8 +217,8 @@ bool SwTextFrm::CalcFollow( const sal_Int32 nTextOfst ) pMyFollow->SetFieldFollow( bFollowField ); if( HasFootnote() || pMyFollow->HasFootnote() ) { - ValidateFrm(); - ValidateBodyFrm(); + ValidateFrame(); + ValidateBodyFrame(); if( pPara ) { pPara->GetReformat() = SwCharRange(); @@ -227,7 +227,7 @@ bool SwTextFrm::CalcFollow( const sal_Int32 nTextOfst ) } // The footnote area must not get larger - SwSaveFootnoteHeight aSave( FindFootnoteBossFrm( true ), LONG_MAX ); + SwSaveFootnoteHeight aSave( FindFootnoteBossFrame( true ), LONG_MAX ); pMyFollow->CalcFootnoteFlag(); if ( !pMyFollow->GetNext() && !pMyFollow->HasFootnote() ) @@ -241,13 +241,13 @@ bool SwTextFrm::CalcFollow( const sal_Int32 nTextOfst ) // frame, we need to calculate that first. This is because the // FormatWidthCols() does not work if it is called from MakeAll // of the _locked_ follow. - SwSectionFrm* pSct = pMyFollow->FindSctFrm(); + SwSectionFrame* pSct = pMyFollow->FindSctFrame(); if( pSct && !pSct->IsAnLower( this ) ) { if( pSct->GetFollow() ) pSct->SimpleFormat(); - else if( ( pSct->IsVertical() && !pSct->Frm().Width() ) || - ( ! pSct->IsVertical() && !pSct->Frm().Height() ) ) + else if( ( pSct->IsVertical() && !pSct->Frame().Width() ) || + ( ! pSct->IsVertical() && !pSct->Frame().Height() ) ) break; } // OD 14.03.2003 #i11760# - intrinsic format of follow is controlled. @@ -258,16 +258,16 @@ bool SwTextFrm::CalcFollow( const sal_Int32 nTextOfst ) // Thus, forbid intrinsic format of follow. { bool bIsFollowInColumn = false; - SwFrm* pFollowUpper = pMyFollow->GetUpper(); + SwFrame* pFollowUpper = pMyFollow->GetUpper(); while ( pFollowUpper ) { - if ( pFollowUpper->IsColumnFrm() ) + if ( pFollowUpper->IsColumnFrame() ) { bIsFollowInColumn = true; break; } - if ( pFollowUpper->IsPageFrm() || - pFollowUpper->IsFlyFrm() ) + if ( pFollowUpper->IsPageFrame() || + pFollowUpper->IsFlyFrame() ) { break; } @@ -280,13 +280,13 @@ bool SwTextFrm::CalcFollow( const sal_Int32 nTextOfst ) } pMyFollow->Calc(pRenderContext); - // The Follow can tell from its Frm().Height() that something went wrong - OSL_ENSURE( !pMyFollow->GetPrev(), "SwTextFrm::CalcFollow: cheesy follow" ); + // The Follow can tell from its Frame().Height() that something went wrong + OSL_ENSURE( !pMyFollow->GetPrev(), "SwTextFrame::CalcFollow: cheesy follow" ); if( pMyFollow->GetPrev() ) { pMyFollow->Prepare(); pMyFollow->Calc(pRenderContext); - OSL_ENSURE( !pMyFollow->GetPrev(), "SwTextFrm::CalcFollow: very cheesy follow" ); + OSL_ENSURE( !pMyFollow->GetPrev(), "SwTextFrame::CalcFollow: very cheesy follow" ); } // OD 14.03.2003 #i11760# - reset control flag for follow format. @@ -308,8 +308,8 @@ bool SwTextFrm::CalcFollow( const sal_Int32 nTextOfst ) if( HasFootnote() || pMyFollow->HasFootnote() ) { - ValidateBodyFrm(); - ValidateFrm(); + ValidateBodyFrame(); + ValidateFrame(); if( pPara ) { pPara->GetReformat() = SwCharRange(); @@ -324,15 +324,15 @@ bool SwTextFrm::CalcFollow( const sal_Int32 nTextOfst ) } #if OSL_DEBUG_LEVEL > 0 - OSL_ENSURE( pOldUp == GetUpper(), "SwTextFrm::CalcFollow: heavy follow" ); + OSL_ENSURE( pOldUp == GetUpper(), "SwTextFrame::CalcFollow: heavy follow" ); #endif const long nRemaining = - - (GetUpper()->Frm().*fnRect->fnBottomDist)( nOldBottom ); - if ( nRemaining > 0 && !GetUpper()->IsSctFrm() && + - (GetUpper()->Frame().*fnRect->fnBottomDist)( nOldBottom ); + if ( nRemaining > 0 && !GetUpper()->IsSctFrame() && nRemaining != ( bVert ? - nMyPos - Frm().Right() : - Frm().Top() - nMyPos ) ) + nMyPos - Frame().Right() : + Frame().Top() - nMyPos ) ) { return true; } @@ -341,9 +341,9 @@ bool SwTextFrm::CalcFollow( const sal_Int32 nTextOfst ) return false; } -void SwTextFrm::AdjustFrm( const SwTwips nChgHght, bool bHasToFit ) +void SwTextFrame::AdjustFrame( const SwTwips nChgHght, bool bHasToFit ) { - vcl::RenderContext* pRenderContext = getRootFrm()->GetCurrShell()->GetOut(); + vcl::RenderContext* pRenderContext = getRootFrame()->GetCurrShell()->GetOut(); if( IsUndersized() ) { if( GetOfst() && !IsFollow() ) // A scrolled paragraph (undersized) @@ -351,7 +351,7 @@ void SwTextFrm::AdjustFrm( const SwTwips nChgHght, bool bHasToFit ) SetUndersized( nChgHght == 0 || bHasToFit ); } - // AdjustFrm is called with a swapped frame during + // AdjustFrame is called with a swapped frame during // formatting but the frame is not swapped during FormatEmpty SwSwapIfSwapped swap( this ); SWRECTFN ( this ) @@ -368,13 +368,13 @@ void SwTextFrm::AdjustFrm( const SwTwips nChgHght, bool bHasToFit ) SwTwips nReal = Grow( nChgHght, true ); if( nReal < nChgHght ) { - SwTwips nBot = (*fnRect->fnYInc)( (Frm().*fnRect->fnGetBottom)(), + SwTwips nBot = (*fnRect->fnYInc)( (Frame().*fnRect->fnGetBottom)(), nChgHght - nReal ); - SwFrm* pCont = FindFootnoteFrm()->GetUpper(); + SwFrame* pCont = FindFootnoteFrame()->GetUpper(); - if( (pCont->Frm().*fnRect->fnBottomDist)( nBot ) > 0 ) + if( (pCont->Frame().*fnRect->fnBottomDist)( nBot ) > 0 ) { - (Frm().*fnRect->fnAddBottom)( nChgHght ); + (Frame().*fnRect->fnAddBottom)( nChgHght ); if( bVert ) Prt().SSize().Width() += nChgHght; else @@ -395,17 +395,17 @@ void SwTextFrm::AdjustFrm( const SwTwips nChgHght, bool bHasToFit ) // calculated correctly. if ( GetPrev() ) { - SwFrm *pPre = GetUpper()->Lower(); + SwFrame *pPre = GetUpper()->Lower(); do { pPre->Calc(pRenderContext); pPre = pPre->GetNext(); } while ( pPre && pPre != this ); } - const Point aOldPos( Frm().Pos() ); + const Point aOldPos( Frame().Pos() ); MakePos(); - if ( aOldPos != Frm().Pos() ) + if ( aOldPos != Frame().Pos() ) { - // OD 2004-07-01 #i28701# - use new method <SwFrm::InvalidateObjs(..)> + // OD 2004-07-01 #i28701# - use new method <SwFrame::InvalidateObjs(..)> // No format is performed for the floating screen objects. InvalidateObjs( true ); } @@ -415,7 +415,7 @@ void SwTextFrm::AdjustFrm( const SwTwips nChgHght, bool bHasToFit ) // A Grow() is always accepted by the Layout, even if the // FixSize of the surrounding layout frame should not allow it. // We text for this case and correct the values. - // The Frm must NOT be shrunk further than its size permits + // The Frame must NOT be shrunk further than its size permits // even in the case of an emergency. SwTwips nRstHeight; if ( IsVertical() ) @@ -423,19 +423,19 @@ void SwTextFrm::AdjustFrm( const SwTwips nChgHght, bool bHasToFit ) OSL_ENSURE( ! IsSwapped(),"Swapped frame while calculating nRstHeight" ); if ( IsVertLR() ) - nRstHeight = GetUpper()->Frm().Left() + nRstHeight = GetUpper()->Frame().Left() + GetUpper()->Prt().Left() + GetUpper()->Prt().Width() - - Frm().Left(); + - Frame().Left(); else - nRstHeight = Frm().Left() + Frm().Width() - - ( GetUpper()->Frm().Left() + GetUpper()->Prt().Left() ); + nRstHeight = Frame().Left() + Frame().Width() - + ( GetUpper()->Frame().Left() + GetUpper()->Prt().Left() ); } else - nRstHeight = GetUpper()->Frm().Top() + nRstHeight = GetUpper()->Frame().Top() + GetUpper()->Prt().Top() + GetUpper()->Prt().Height() - - Frm().Top(); + - Frame().Top(); // We can get a bit of space in table cells, because there could be some // left through a vertical alignment to the top. @@ -445,34 +445,34 @@ void SwTextFrm::AdjustFrm( const SwTwips nChgHght, bool bHasToFit ) ( GetUpper()->Lower() == this || GetUpper()->Lower()->IsValid() ) ) { - long nAdd = (*fnRect->fnYDiff)( (GetUpper()->Lower()->Frm().*fnRect->fnGetTop)(), + long nAdd = (*fnRect->fnYDiff)( (GetUpper()->Lower()->Frame().*fnRect->fnGetTop)(), (GetUpper()->*fnRect->fnGetPrtTop)() ); OSL_ENSURE( nAdd >= 0, "Ey" ); nRstHeight += nAdd; } - // nRstHeight < 0 means that the TextFrm is located completely outside of its Upper. - // This can happen, if it's located within a FlyAtCntFrm, which changed sides by a + // nRstHeight < 0 means that the TextFrame is located completely outside of its Upper. + // This can happen, if it's located within a FlyAtContentFrame, which changed sides by a // Grow(). In such a case, it's wrong to execute the following Grow(). // In the case of a bug, we end up with an infinite loop. - SwTwips nFrmHeight = (Frm().*fnRect->fnGetHeight)(); + SwTwips nFrameHeight = (Frame().*fnRect->fnGetHeight)(); SwTwips nPrtHeight = (Prt().*fnRect->fnGetHeight)(); - if( nRstHeight < nFrmHeight ) + if( nRstHeight < nFrameHeight ) { // It can be that I have the right size, but the Upper is too small and can get me some room if( ( nRstHeight >= 0 || ( IsInFootnote() && IsInSct() ) ) && !bHasToFit ) - nRstHeight += GetUpper()->Grow( nFrmHeight - nRstHeight ); + nRstHeight += GetUpper()->Grow( nFrameHeight - nRstHeight ); // In column sections we do not want to get too big or else more areas are created by // GetNextSctLeaf. Instead, we shrink and remember bUndersized, so that FormatWidthCols // can calculate the right column size. - if ( nRstHeight < nFrmHeight ) + if ( nRstHeight < nFrameHeight ) { if( bHasToFit || !IsMoveable() || - ( IsInSct() && !FindSctFrm()->MoveAllowed(this) ) ) + ( IsInSct() && !FindSctFrame()->MoveAllowed(this) ) ) { SetUndersized( true ); - Shrink( std::min( ( nFrmHeight - nRstHeight), nPrtHeight ) ); + Shrink( std::min( ( nFrameHeight - nRstHeight), nPrtHeight ) ); } else SetUndersized( false ); @@ -480,8 +480,8 @@ void SwTextFrm::AdjustFrm( const SwTwips nChgHght, bool bHasToFit ) } else if( nChgHeight ) { - if( nRstHeight - nFrmHeight < nChgHeight ) - nChgHeight = nRstHeight - nFrmHeight; + if( nRstHeight - nFrameHeight < nChgHeight ) + nChgHeight = nRstHeight - nFrameHeight; if( nChgHeight ) Grow( nChgHeight ); } @@ -490,12 +490,12 @@ void SwTextFrm::AdjustFrm( const SwTwips nChgHght, bool bHasToFit ) Shrink( -nChgHght ); } -css::uno::Sequence< css::style::TabStop > SwTextFrm::GetTabStopInfo( SwTwips CurrentPos ) +css::uno::Sequence< css::style::TabStop > SwTextFrame::GetTabStopInfo( SwTwips CurrentPos ) { css::uno::Sequence< css::style::TabStop > tabs(1); css::style::TabStop ts; - SwTextFormatInfo aInf( getRootFrm()->GetCurrShell()->GetOut(), this ); + SwTextFormatInfo aInf( getRootFrame()->GetCurrShell()->GetOut(), this ); SwTextFormatter aLine( this, &aInf ); SwTextCursor TextCursor( this, &aInf ); const Point aCharPos( TextCursor.GetTopLeft() ); @@ -503,7 +503,7 @@ css::uno::Sequence< css::style::TabStop > SwTextFrm::GetTabStopInfo( SwTwips Cur SwTwips nRight = aLine.Right(); CurrentPos -= aCharPos.X(); - // get current tab stop information stored in the Frm + // get current tab stop information stored in the Frame const SvxTabStop *pTS = aLine.GetLineInfo().GetTabStop( CurrentPos, nRight ); if( !pTS ) @@ -534,11 +534,11 @@ css::uno::Sequence< css::style::TabStop > SwTextFrm::GetTabStopInfo( SwTwips Cur // nOffset holds the Offset in the text string, from which the Master closes // and the Follow starts. // If it's 0, the FollowFrame is deleted. -void SwTextFrm::_AdjustFollow( SwTextFormatter &rLine, +void SwTextFrame::_AdjustFollow( SwTextFormatter &rLine, const sal_Int32 nOffset, const sal_Int32 nEnd, const sal_uInt8 nMode ) { - SwFrmSwapper aSwapper( this, false ); + SwFrameSwapper aSwapper( this, false ); // We got the rest of the text mass: Delete all Follows // DummyPortions() are a special case. @@ -547,14 +547,14 @@ void SwTextFrm::_AdjustFollow( SwTextFormatter &rLine, { while( GetFollow() ) { - if( static_cast<SwTextFrm*>(GetFollow())->IsLocked() ) + if( static_cast<SwTextFrame*>(GetFollow())->IsLocked() ) { - OSL_FAIL( "+SwTextFrm::JoinFrm: Follow is locked." ); + OSL_FAIL( "+SwTextFrame::JoinFrame: Follow is locked." ); return; } if (GetFollow()->IsDeleteForbidden()) return; - JoinFrm(); + JoinFrame(); } return; @@ -573,7 +573,7 @@ void SwTextFrm::_AdjustFollow( SwTextFormatter &rLine, while( GetFollow() && GetFollow()->GetFollow() && nNewOfst >= GetFollow()->GetFollow()->GetOfst() ) { - JoinFrm(); + JoinFrame(); } } @@ -592,12 +592,12 @@ void SwTextFrm::_AdjustFollow( SwTextFormatter &rLine, } } -SwContentFrm *SwTextFrm::JoinFrm() +SwContentFrame *SwTextFrame::JoinFrame() { - OSL_ENSURE( GetFollow(), "+SwTextFrm::JoinFrm: no follow" ); - SwTextFrm *pFoll = GetFollow(); + OSL_ENSURE( GetFollow(), "+SwTextFrame::JoinFrame: no follow" ); + SwTextFrame *pFoll = GetFollow(); - SwTextFrm *pNxt = pFoll->GetFollow(); + SwTextFrame *pNxt = pFoll->GetFollow(); // All footnotes of the to-be-destroyed Follow are relocated to us sal_Int32 nStart = pFoll->GetOfst(); @@ -606,8 +606,8 @@ SwContentFrm *SwTextFrm::JoinFrm() const SwpHints *pHints = pFoll->GetTextNode()->GetpSwpHints(); if( pHints ) { - SwFootnoteBossFrm *pFootnoteBoss = nullptr; - SwFootnoteBossFrm *pEndBoss = nullptr; + SwFootnoteBossFrame *pFootnoteBoss = nullptr; + SwFootnoteBossFrame *pEndBoss = nullptr; for ( size_t i = 0; i < pHints->Count(); ++i ) { const SwTextAttr *pHt = pHints->Get(i); @@ -616,14 +616,14 @@ SwContentFrm *SwTextFrm::JoinFrm() if( pHt->GetFootnote().IsEndNote() ) { if( !pEndBoss ) - pEndBoss = pFoll->FindFootnoteBossFrm(); - SwFootnoteBossFrm::ChangeFootnoteRef( pFoll, static_cast<const SwTextFootnote*>(pHt), this ); + pEndBoss = pFoll->FindFootnoteBossFrame(); + SwFootnoteBossFrame::ChangeFootnoteRef( pFoll, static_cast<const SwTextFootnote*>(pHt), this ); } else { if( !pFootnoteBoss ) - pFootnoteBoss = pFoll->FindFootnoteBossFrm( true ); - SwFootnoteBossFrm::ChangeFootnoteRef( pFoll, static_cast<const SwTextFootnote*>(pHt), this ); + pFootnoteBoss = pFoll->FindFootnoteBossFrame( true ); + SwFootnoteBossFrame::ChangeFootnoteRef( pFoll, static_cast<const SwTextFootnote*>(pHt), this ); } SetFootnote( true ); } @@ -648,29 +648,29 @@ SwContentFrm *SwTextFrm::JoinFrm() // and relation CONTENT_FLOWS_TO for current previous paragraph, which // is <this>, will change. { - SwViewShell* pViewShell( pFoll->getRootFrm()->GetCurrShell() ); + SwViewShell* pViewShell( pFoll->getRootFrame()->GetCurrShell() ); if ( pViewShell && pViewShell->GetLayout() && pViewShell->GetLayout()->IsAnyShellAccessible() ) { pViewShell->InvalidateAccessibleParaFlowRelation( - dynamic_cast<SwTextFrm*>(pFoll->FindNextCnt( true )), + dynamic_cast<SwTextFrame*>(pFoll->FindNextCnt( true )), this ); } } pFoll->Cut(); SetFollow(pNxt); - SwFrm::DestroyFrm(pFoll); + SwFrame::DestroyFrame(pFoll); return pNxt; } -SwContentFrm *SwTextFrm::SplitFrm( const sal_Int32 nTextPos ) +SwContentFrame *SwTextFrame::SplitFrame( const sal_Int32 nTextPos ) { SwSwapIfSwapped swap( this ); // The Paste sends a Modify() to me // I lock myself, so that my data does not disappear - TextFrmLockGuard aLock( this ); - SwTextFrm *pNew = static_cast<SwTextFrm *>(GetTextNode()->MakeFrm( this )); + TextFrameLockGuard aLock( this ); + SwTextFrame *pNew = static_cast<SwTextFrame *>(GetTextNode()->MakeFrame( this )); pNew->SetFollow( GetFollow() ); SetFollow( pNew ); @@ -682,12 +682,12 @@ SwContentFrm *SwTextFrm::SplitFrm( const sal_Int32 nTextPos ) // and relation CONTENT_FLOWS_TO for current previous paragraph, which // is <this>, will change. { - SwViewShell* pViewShell( pNew->getRootFrm()->GetCurrShell() ); + SwViewShell* pViewShell( pNew->getRootFrame()->GetCurrShell() ); if ( pViewShell && pViewShell->GetLayout() && pViewShell->GetLayout()->IsAnyShellAccessible() ) { pViewShell->InvalidateAccessibleParaFlowRelation( - dynamic_cast<SwTextFrm*>(pNew->FindNextCnt( true )), + dynamic_cast<SwTextFrame*>(pNew->FindNextCnt( true )), this ); } } @@ -699,8 +699,8 @@ SwContentFrm *SwTextFrm::SplitFrm( const sal_Int32 nTextPos ) const SwpHints *pHints = GetTextNode()->GetpSwpHints(); if( pHints ) { - SwFootnoteBossFrm *pFootnoteBoss = nullptr; - SwFootnoteBossFrm *pEndBoss = nullptr; + SwFootnoteBossFrame *pFootnoteBoss = nullptr; + SwFootnoteBossFrame *pEndBoss = nullptr; for ( size_t i = 0; i < pHints->Count(); ++i ) { const SwTextAttr *pHt = pHints->Get(i); @@ -709,14 +709,14 @@ SwContentFrm *SwTextFrm::SplitFrm( const sal_Int32 nTextPos ) if( pHt->GetFootnote().IsEndNote() ) { if( !pEndBoss ) - pEndBoss = FindFootnoteBossFrm(); - SwFootnoteBossFrm::ChangeFootnoteRef( this, static_cast<const SwTextFootnote*>(pHt), pNew ); + pEndBoss = FindFootnoteBossFrame(); + SwFootnoteBossFrame::ChangeFootnoteRef( this, static_cast<const SwTextFootnote*>(pHt), pNew ); } else { if( !pFootnoteBoss ) - pFootnoteBoss = FindFootnoteBossFrm( true ); - SwFootnoteBossFrm::ChangeFootnoteRef( this, static_cast<const SwTextFootnote*>(pHt), pNew ); + pFootnoteBoss = FindFootnoteBossFrame( true ); + SwFootnoteBossFrame::ChangeFootnoteRef( this, static_cast<const SwTextFootnote*>(pHt), pNew ); } pNew->SetFootnote( true ); } @@ -741,7 +741,7 @@ SwContentFrm *SwTextFrm::SplitFrm( const sal_Int32 nTextPos ) return pNew; } -void SwTextFrm::_SetOfst( const sal_Int32 nNewOfst ) +void SwTextFrame::_SetOfst( const sal_Int32 nNewOfst ) { // We do not need to invalidate out Follow. // We are a Follow, get formatted right away and call @@ -758,9 +758,9 @@ void SwTextFrm::_SetOfst( const sal_Int32 nNewOfst ) InvalidateSize(); } -bool SwTextFrm::CalcPreps() +bool SwTextFrame::CalcPreps() { - OSL_ENSURE( ! IsVertical() || ! IsSwapped(), "SwTextFrm::CalcPreps with swapped frame" ); + OSL_ENSURE( ! IsVertical() || ! IsSwapped(), "SwTextFrame::CalcPreps with swapped frame" ); SWRECTFN( this ); SwParaPortion *pPara = GetPara(); @@ -781,7 +781,7 @@ bool SwTextFrm::CalcPreps() { if( !GetFollow() ) { - OSL_ENSURE( GetFollow(), "+SwTextFrm::CalcPreps: no credits" ); + OSL_ENSURE( GetFollow(), "+SwTextFrame::CalcPreps: no credits" ); return false; } @@ -801,16 +801,16 @@ bool SwTextFrm::CalcPreps() } else if ( bVert ) { - Frm().Width( Frm().Width() + Frm().Left() ); - Prt().Width( Prt().Width() + Frm().Left() ); - Frm().Left( 0 ); + Frame().Width( Frame().Width() + Frame().Left() ); + Prt().Width( Prt().Width() + Frame().Left() ); + Frame().Left( 0 ); SetWidow( true ); } else { - SwTwips nTmp = LONG_MAX - (Frm().Top()+10000); - SwTwips nDiff = nTmp - Frm().Height(); - Frm().Height( nTmp ); + SwTwips nTmp = LONG_MAX - (Frame().Top()+10000); + SwTwips nDiff = nTmp - Frame().Height(); + Frame().Height( nTmp ); Prt().Height( Prt().Height() + nDiff ); SetWidow( true ); } @@ -818,7 +818,7 @@ bool SwTextFrm::CalcPreps() else { OSL_ENSURE( nChgHeight < (Prt().*fnRect->fnGetHeight)(), - "+SwTextFrm::CalcPrep: want to shrink" ); + "+SwTextFrame::CalcPrep: want to shrink" ); nChgHeight = (Prt().*fnRect->fnGetHeight)() - nChgHeight; @@ -829,12 +829,12 @@ bool SwTextFrm::CalcPreps() if ( bVert ) { - SwRect aRepaint( Frm().Pos() + Prt().Pos(), Prt().SSize() ); + SwRect aRepaint( Frame().Pos() + Prt().Pos(), Prt().SSize() ); SwitchVerticalToHorizontal( aRepaint ); rRepaint.Chg( aRepaint.Pos(), aRepaint.SSize() ); } else - rRepaint.Chg( Frm().Pos() + Prt().Pos(), Prt().SSize() ); + rRepaint.Chg( Frame().Pos() + Prt().Pos(), Prt().SSize() ); if( 0 >= rRepaint.Width() ) rRepaint.Width(1); @@ -859,46 +859,46 @@ bool SwTextFrm::CalcPreps() { SwSwapIfNotSwapped swap( this ); - SwTextFormatInfo aInf( getRootFrm()->GetCurrShell()->GetOut(), this ); + SwTextFormatInfo aInf( getRootFrame()->GetCurrShell()->GetOut(), this ); SwTextFormatter aLine( this, &aInf ); - WidowsAndOrphans aFrmBreak( this ); + WidowsAndOrphans aFrameBreak( this ); // Whatever the attributes say: we split the paragraph in // MustFit in any case if( bPrepMustFit ) { - aFrmBreak.SetKeep( false ); - aFrmBreak.ClrOrphLines(); + aFrameBreak.SetKeep( false ); + aFrameBreak.ClrOrphLines(); } // Before calling FormatAdjust, we need to make sure // that the lines protruding at the bottom get indeed // truncated - bool bBreak = aFrmBreak.IsBreakNowWidAndOrp( aLine ); + bool bBreak = aFrameBreak.IsBreakNowWidAndOrp( aLine ); bRet = true; while( !bBreak && aLine.Next() ) { - bBreak = aFrmBreak.IsBreakNowWidAndOrp( aLine ); + bBreak = aFrameBreak.IsBreakNowWidAndOrp( aLine ); } if( bBreak ) { // We run into troubles: when TruncLines get called, the // conditions in IsInside change immediately such that // IsBreakNow can return different results. - // For this reason, we make it clear to rFrmBreak, that the + // For this reason, we make it clear to rFrameBreak, that the // end is reached at the location of rLine. // Let's see if it works ... aLine.TruncLines(); - aFrmBreak.SetRstHeight( aLine ); - FormatAdjust( aLine, aFrmBreak, aInf.GetText().getLength(), aInf.IsStop() ); + aFrameBreak.SetRstHeight( aLine ); + FormatAdjust( aLine, aFrameBreak, aInf.GetText().getLength(), aInf.IsStop() ); } else { if( !GetFollow() ) { - FormatAdjust( aLine, aFrmBreak, + FormatAdjust( aLine, aFrameBreak, aInf.GetText().getLength(), aInf.IsStop() ); } - else if ( !aFrmBreak.IsKeepAlways() ) + else if ( !aFrameBreak.IsKeepAlways() ) { // We delete a line before the Master, because the Follow // could hand over a line @@ -915,7 +915,7 @@ bool SwTextFrm::CalcPreps() if( bPrepMustFit ) { const SwTwips nMust = (GetUpper()->*fnRect->fnGetPrtBottom)(); - const SwTwips nIs = (Frm().*fnRect->fnGetBottom)(); + const SwTwips nIs = (Frame().*fnRect->fnGetBottom)(); if( bVert && nIs < nMust ) { @@ -939,16 +939,16 @@ bool SwTextFrm::CalcPreps() } // We rewire the footnotes and the character bound objects -#define CHG_OFFSET( pFrm, nNew )\ +#define CHG_OFFSET( pFrame, nNew )\ {\ - if( pFrm->GetOfst() < nNew )\ - pFrm->MoveFlyInCnt( this, 0, nNew );\ - else if( pFrm->GetOfst() > nNew )\ - MoveFlyInCnt( pFrm, nNew, COMPLETE_STRING );\ + if( pFrame->GetOfst() < nNew )\ + pFrame->MoveFlyInCnt( this, 0, nNew );\ + else if( pFrame->GetOfst() > nNew )\ + MoveFlyInCnt( pFrame, nNew, COMPLETE_STRING );\ } -void SwTextFrm::FormatAdjust( SwTextFormatter &rLine, - WidowsAndOrphans &rFrmBreak, +void SwTextFrame::FormatAdjust( SwTextFormatter &rLine, + WidowsAndOrphans &rFrameBreak, const sal_Int32 nStrLen, const bool bDummy ) { @@ -961,7 +961,7 @@ void SwTextFrm::FormatAdjust( SwTextFormatter &rLine, const bool bHasToFit = pPara->IsPrepMustFit(); // The StopFlag is set by footnotes which want to go onto the next page - // Call base class method <SwTextFrmBreak::IsBreakNow(..)> + // Call base class method <SwTextFrameBreak::IsBreakNow(..)> // instead of method <WidowsAndOrphans::IsBreakNow(..)> to get a break, // even if due to widow rule no enough lines exists. sal_uInt8 nNew = ( !GetFollow() && @@ -969,8 +969,8 @@ void SwTextFrm::FormatAdjust( SwTextFormatter &rLine, ( rLine.IsStop() || ( bHasToFit ? ( rLine.GetLineNr() > 1 && - !rFrmBreak.IsInside( rLine ) ) - : rFrmBreak.IsBreakNow( rLine ) ) ) ) + !rFrameBreak.IsInside( rLine ) ) + : rFrameBreak.IsBreakNow( rLine ) ) ) ) ? 1 : 0; // --> OD #i84870# // no split of text frame, which only contains a as-character anchored object @@ -980,7 +980,7 @@ void SwTextFrm::FormatAdjust( SwTextFormatter &rLine, (*GetDrawObjs())[0]->GetFrameFormat().GetAnchor().GetAnchorId() == FLY_AS_CHAR; // Still try split text frame if we have columns. - if (FindColFrm()) + if (FindColFrame()) bOnlyContainsAsCharAnchoredObj = false; if ( nNew && bOnlyContainsAsCharAnchoredObj ) @@ -990,14 +990,14 @@ void SwTextFrm::FormatAdjust( SwTextFormatter &rLine, // <-- if ( nNew ) { - SplitFrm( nEnd ); + SplitFrame( nEnd ); } - const SwFrm *pBodyFrm = FindBodyFrm(); + const SwFrame *pBodyFrame = FindBodyFrame(); - const long nBodyHeight = pBodyFrm ? ( IsVertical() ? - pBodyFrm->Frm().Width() : - pBodyFrm->Frm().Height() ) : 0; + const long nBodyHeight = pBodyFrame ? ( IsVertical() ? + pBodyFrame->Frame().Width() : + pBodyFrame->Frame().Height() ) : 0; // If the current values have been calculated, show that they // are valid now @@ -1012,10 +1012,10 @@ void SwTextFrm::FormatAdjust( SwTextFormatter &rLine, } // FindBreak truncates the last line - if( !rFrmBreak.FindBreak( this, rLine, bHasToFit ) ) + if( !rFrameBreak.FindBreak( this, rLine, bHasToFit ) ) { // If we're done formatting, we set nEnd to the end. - // AdjustFollow might execute JoinFrm() because of this. + // AdjustFollow might execute JoinFrame() because of this. // Else, nEnd is the end of the last line in the Master. sal_Int32 nOld = nEnd; nEnd = rLine.GetEnd(); @@ -1041,7 +1041,7 @@ void SwTextFrm::FormatAdjust( SwTextFormatter &rLine, // Example of this case: When an empty, but numbered paragraph // at the end of page is completely displaced by a fly frame. // Thus, the text frame introduced a follow by a - // <SwTextFrm::SplitFrm(..)> - see below. The follow then shows + // <SwTextFrame::SplitFrame(..)> - see below. The follow then shows // the numbering and must stay. if ( GetFollow()->GetOfst() != nEnd || GetFollow()->IsFieldFollow() || @@ -1049,7 +1049,7 @@ void SwTextFrm::FormatAdjust( SwTextFormatter &rLine, { nNew |= 3; } - else if (FindTabFrm() && nEnd > 0 && rLine.GetInfo().GetChar(nEnd - 1) == CH_BREAK) + else if (FindTabFrame() && nEnd > 0 && rLine.GetInfo().GetChar(nEnd - 1) == CH_BREAK) { // We are in a table, the paragraph has a follow and the text // ends with a hard line break. Don't join the follow just @@ -1071,23 +1071,23 @@ void SwTextFrm::FormatAdjust( SwTextFormatter &rLine, ( nStrLen == 0 && GetTextNode()->GetNumRule() ) ) ) { - SplitFrm( nEnd ); + SplitFrame( nEnd ); nNew |= 3; } } // If the remaining height changed e.g by RemoveFootnote() we need to // fill up in order to avoid oscillation. - if( bDummy && pBodyFrm && + if( bDummy && pBodyFrame && nBodyHeight < ( IsVertical() ? - pBodyFrm->Frm().Width() : - pBodyFrm->Frm().Height() ) ) + pBodyFrame->Frame().Width() : + pBodyFrame->Frame().Height() ) ) rLine.MakeDummyLine(); } - // In AdjustFrm() we set ourselves via Grow/Shrink + // In AdjustFrame() we set ourselves via Grow/Shrink // In AdjustFollow() we set our FollowFrame - const SwTwips nDocPrtTop = Frm().Top() + Prt().Top(); + const SwTwips nDocPrtTop = Frame().Top() + Prt().Top(); const SwTwips nOldHeight = Prt().SSize().Height(); const SwTwips nChg = rLine.CalcBottomLine() - nDocPrtTop - nOldHeight; @@ -1104,7 +1104,7 @@ void SwTextFrm::FormatAdjust( SwTextFormatter &rLine, rRepaint.Width( rRepaint.Width() - nChg ); } - AdjustFrm( nChg, bHasToFit ); + AdjustFrame( nChg, bHasToFit ); if( HasFollow() || IsInFootnote() ) _AdjustFollow( rLine, nEnd, nStrLen, nNew ); @@ -1114,10 +1114,10 @@ void SwTextFrm::FormatAdjust( SwTextFormatter &rLine, // bPrev is set whether Reformat.Start() was called because of Prev(). // Else, wo don't know whether we can limit the repaint or not. -bool SwTextFrm::FormatLine( SwTextFormatter &rLine, const bool bPrev ) +bool SwTextFrame::FormatLine( SwTextFormatter &rLine, const bool bPrev ) { OSL_ENSURE( ! IsVertical() || IsSwapped(), - "SwTextFrm::FormatLine( rLine, bPrev) with unswapped frame" ); + "SwTextFrame::FormatLine( rLine, bPrev) with unswapped frame" ); SwParaPortion *pPara = rLine.GetInfo().GetParaPortion(); const SwLineLayout *pOldCur = rLine.GetCurr(); const sal_Int32 nOldLen = pOldCur->GetLen(); @@ -1132,10 +1132,10 @@ bool SwTextFrm::FormatLine( SwTextFormatter &rLine, const bool bPrev ) const sal_Int32 nNewStart = rLine.FormatLine( rLine.GetStart() ); - OSL_ENSURE( Frm().Pos().Y() + Prt().Pos().Y() == rLine.GetFirstPos(), - "SwTextFrm::FormatLine: frame leaves orbit." ); + OSL_ENSURE( Frame().Pos().Y() + Prt().Pos().Y() == rLine.GetFirstPos(), + "SwTextFrame::FormatLine: frame leaves orbit." ); OSL_ENSURE( rLine.GetCurr()->Height(), - "SwTextFrm::FormatLine: line height is zero" ); + "SwTextFrame::FormatLine: line height is zero" ); // The current line break object const SwLineLayout *pNew = rLine.GetCurr(); @@ -1200,7 +1200,7 @@ bool SwTextFrm::FormatLine( SwTextFormatter &rLine, const bool bPrev ) } SwTwips nRght = std::max( nOldWidth, pNew->Width() + pNew->GetHangingMargin() ); - SwViewShell *pSh = getRootFrm()->GetCurrShell(); + SwViewShell *pSh = getRootFrame()->GetCurrShell(); const SwViewOption *pOpt = pSh ? pSh->GetViewOptions() : nullptr; if( pOpt && (pOpt->IsParagraph() || pOpt->IsLineBreak()) ) nRght += ( std::max( nOldAscent, pNew->GetAscent() ) ); @@ -1250,10 +1250,10 @@ bool SwTextFrm::FormatLine( SwTextFormatter &rLine, const bool bPrev ) return 0 != pPara->GetDelta(); } -void SwTextFrm::_Format( SwTextFormatter &rLine, SwTextFormatInfo &rInf, +void SwTextFrame::_Format( SwTextFormatter &rLine, SwTextFormatInfo &rInf, const bool bAdjust ) { - OSL_ENSURE( ! IsVertical() || IsSwapped(),"SwTextFrm::_Format with unswapped frame" ); + OSL_ENSURE( ! IsVertical() || IsSwapped(),"SwTextFrame::_Format with unswapped frame" ); SwParaPortion *pPara = rLine.GetInfo().GetParaPortion(); rLine.SetUnclipped( false ); @@ -1331,13 +1331,13 @@ void SwTextFrm::_Format( SwTextFormatter &rLine, SwTextFormatInfo &rInf, rRepaint.SetOfst( 0 ); rRepaint.SetRightOfst( 0 ); - rRepaint.Chg( Frm().Pos() + Prt().Pos(), Prt().SSize() ); + rRepaint.Chg( Frame().Pos() + Prt().Pos(), Prt().SSize() ); if( pPara->IsMargin() ) rRepaint.Width( rRepaint.Width() + pPara->GetHangingMargin() ); rRepaint.Top( rLine.Y() ); if( 0 >= rRepaint.Width() ) rRepaint.Width(1); - WidowsAndOrphans aFrmBreak( this, rInf.IsTest() ? 1 : 0 ); + WidowsAndOrphans aFrameBreak( this, rInf.IsTest() ? 1 : 0 ); // rLine is now set to the first line which needs formatting. // The bFirst flag makes sure that Next() is not called. @@ -1352,21 +1352,21 @@ void SwTextFrm::_Format( SwTextFormatter &rLine, SwTextFormatInfo &rInf, // because the Ofst was set wrongly in the Follow. bool bBreak = ( !pPara->IsPrepMustFit() || rLine.GetLineNr() > 1 ) - && aFrmBreak.IsBreakNowWidAndOrp( rLine ); + && aFrameBreak.IsBreakNowWidAndOrp( rLine ); if( bBreak ) { bool bPrevDone = nullptr != rLine.Prev(); - while( bPrevDone && aFrmBreak.IsBreakNowWidAndOrp(rLine) ) + while( bPrevDone && aFrameBreak.IsBreakNowWidAndOrp(rLine) ) bPrevDone = nullptr != rLine.Prev(); if( bPrevDone ) { - aFrmBreak.SetKeep( false ); + aFrameBreak.SetKeep( false ); rLine.Next(); } rLine.TruncLines(); // Play it safe - aFrmBreak.IsBreakNowWidAndOrp(rLine); + aFrameBreak.IsBreakNowWidAndOrp(rLine); } /* Meaning if the following flags are set: @@ -1396,8 +1396,8 @@ void SwTextFrm::_Format( SwTextFormatter &rLine, SwTextFormatInfo &rInf, if( IsFollow() && IsFieldFollow() && rLine.GetStart() == GetOfst() ) { - SwTextFrm *pMaster = FindMaster(); - OSL_ENSURE( pMaster, "SwTextFrm::Format: homeless follow" ); + SwTextFrame *pMaster = FindMaster(); + OSL_ENSURE( pMaster, "SwTextFrame::Format: homeless follow" ); const SwLineLayout* pLine=nullptr; if (pMaster) { @@ -1522,7 +1522,7 @@ void SwTextFrm::_Format( SwTextFormatter &rLine, SwTextFormatInfo &rInf, break; } } - bBreak = aFrmBreak.IsBreakNowWidAndOrp(rLine); + bBreak = aFrameBreak.IsBreakNowWidAndOrp(rLine); }while( !bBreak ); if( pFreeze ) @@ -1549,7 +1549,7 @@ void SwTextFrm::_Format( SwTextFormatter &rLine, SwTextFormatInfo &rInf, // FormatAdjust does not pay off at OnceMore if( bAdjust || !rLine.GetDropFormat() || !rLine.CalcOnceMore() ) { - FormatAdjust( rLine, aFrmBreak, nStrLen, rInf.IsStop() ); + FormatAdjust( rLine, aFrameBreak, nStrLen, rInf.IsStop() ); } if( rRepaint.HasArea() ) SetRepaint(); @@ -1565,10 +1565,10 @@ void SwTextFrm::_Format( SwTextFormatter &rLine, SwTextFormatInfo &rInf, } } -void SwTextFrm::FormatOnceMore( SwTextFormatter &rLine, SwTextFormatInfo &rInf ) +void SwTextFrame::FormatOnceMore( SwTextFormatter &rLine, SwTextFormatInfo &rInf ) { OSL_ENSURE( ! IsVertical() || IsSwapped(), - "A frame is not swapped in SwTextFrm::FormatOnceMore" ); + "A frame is not swapped in SwTextFrame::FormatOnceMore" ); SwParaPortion *pPara = rLine.GetInfo().GetParaPortion(); if( !pPara ) @@ -1613,7 +1613,7 @@ void SwTextFrm::FormatOnceMore( SwTextFormatter &rLine, SwTextFormatInfo &rInf ) // If something went wrong, we need to reformat again if( !bGoOn ) { - rInf.CtorInitTextFormatInfo( getRootFrm()->GetCurrShell()->GetOut(), this ); + rInf.CtorInitTextFormatInfo( getRootFrame()->GetCurrShell()->GetOut(), this ); rLine.CtorInitTextFormatter( this, &rInf ); rLine.SetDropLines( 1 ); rLine.CalcDropHeight( 1 ); @@ -1627,7 +1627,7 @@ void SwTextFrm::FormatOnceMore( SwTextFormatter &rLine, SwTextFormatInfo &rInf ) } } -void SwTextFrm::_Format( vcl::RenderContext* pRenderContext, SwParaPortion *pPara ) +void SwTextFrame::_Format( vcl::RenderContext* pRenderContext, SwParaPortion *pPara ) { const bool bIsEmpty = GetText().isEmpty(); @@ -1688,36 +1688,36 @@ void SwTextFrm::_Format( vcl::RenderContext* pRenderContext, SwParaPortion *pPar // We calculate the text frame's size and send a notification. // Shrink() or Grow() to adjust the frame's size to the changed required space. -void SwTextFrm::Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs * ) +void SwTextFrame::Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs * ) { SWRECTFN( this ) CalcAdditionalFirstLineOffset(); - // The range autopilot or the BASIC interface pass us TextFrms with + // The range autopilot or the BASIC interface pass us TextFrames with // a width <= 0 from time to time if( (Prt().*fnRect->fnGetWidth)() <= 0 ) { // If MustFit is set, we shrink to the Upper's bottom edge if needed. // Else we just take a standard size of 12 Pt. (240 twip). SwTextLineAccess aAccess( this ); - long nFrmHeight = (Frm().*fnRect->fnGetHeight)(); + long nFrameHeight = (Frame().*fnRect->fnGetHeight)(); if( aAccess.GetPara()->IsPrepMustFit() ) { const SwTwips nLimit = (GetUpper()->*fnRect->fnGetPrtBottom)(); - const SwTwips nDiff = - (Frm().*fnRect->fnBottomDist)( nLimit ); + const SwTwips nDiff = - (Frame().*fnRect->fnBottomDist)( nLimit ); if( nDiff > 0 ) Shrink( nDiff ); } - else if( 240 < nFrmHeight ) - Shrink( nFrmHeight - 240 ); - else if( 240 > nFrmHeight ) - Grow( 240 - nFrmHeight ); - nFrmHeight = (Frm().*fnRect->fnGetHeight)(); + else if( 240 < nFrameHeight ) + Shrink( nFrameHeight - 240 ); + else if( 240 > nFrameHeight ) + Grow( 240 - nFrameHeight ); + nFrameHeight = (Frame().*fnRect->fnGetHeight)(); long nTop = (this->*fnRect->fnGetTopMargin)(); - if( nTop > nFrmHeight ) - (this->*fnRect->fnSetYMargins)( nFrmHeight, 0 ); + if( nTop > nFrameHeight ) + (this->*fnRect->fnSetYMargins)( nFrameHeight, 0 ); else if( (Prt().*fnRect->fnGetHeight)() < 0 ) (Prt().*fnRect->fnSetHeight)( 0 ); return; @@ -1758,7 +1758,7 @@ void SwTextFrm::Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs } // We do not want to be interrupted during formatting - TextFrmLockGuard aLock(this); + TextFrameLockGuard aLock(this); SwTextLineAccess aAccess( this ); const bool bNew = !aAccess.SwTextLineAccess::IsAvailable(); const bool bSetOfst = @@ -1766,7 +1766,7 @@ void SwTextFrm::Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs if( CalcPreps() ) ; // nothing - // We return if already formatted, but if the TextFrm was just created + // We return if already formatted, but if the TextFrame was just created // and does not have any format information else if( !bNew && !aAccess.GetPara()->GetReformat().Len() ) { @@ -1780,15 +1780,15 @@ void SwTextFrm::Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs } else if( bSetOfst && IsFollow() ) { - SwTextFrm *pMaster = FindMaster(); - OSL_ENSURE( pMaster, "SwTextFrm::Format: homeless follow" ); + SwTextFrame *pMaster = FindMaster(); + OSL_ENSURE( pMaster, "SwTextFrame::Format: homeless follow" ); if( pMaster ) pMaster->Prepare( PREP_FOLLOW_FOLLOWS ); SwTwips nMaxY = (GetUpper()->*fnRect->fnGetPrtBottom)(); - if( (Frm().*fnRect->fnOverStep)( nMaxY ) ) + if( (Frame().*fnRect->fnOverStep)( nMaxY ) ) (this->*fnRect->fnSetLimit)( nMaxY ); - else if( (Frm().*fnRect->fnBottomDist)( nMaxY ) < 0 ) - (Frm().*fnRect->fnAddBottom)( -(Frm().*fnRect->fnGetHeight)() ); + else if( (Frame().*fnRect->fnBottomDist)( nMaxY ) < 0 ) + (Frame().*fnRect->fnAddBottom)( -(Frame().*fnRect->fnGetHeight)() ); } else { @@ -1797,20 +1797,20 @@ void SwTextFrm::Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs _SetOfst( 0 ); const bool bOrphan = IsWidow(); - const SwFootnoteBossFrm* pFootnoteBoss = HasFootnote() ? FindFootnoteBossFrm() : nullptr; + const SwFootnoteBossFrame* pFootnoteBoss = HasFootnote() ? FindFootnoteBossFrame() : nullptr; SwTwips nFootnoteHeight = 0; if( pFootnoteBoss ) { - const SwFootnoteContFrm* pCont = pFootnoteBoss->FindFootnoteCont(); - nFootnoteHeight = pCont ? (pCont->Frm().*fnRect->fnGetHeight)() : 0; + const SwFootnoteContFrame* pCont = pFootnoteBoss->FindFootnoteCont(); + nFootnoteHeight = pCont ? (pCont->Frame().*fnRect->fnGetHeight)() : 0; } do { _Format( pRenderContext, aAccess.GetPara() ); if( pFootnoteBoss && nFootnoteHeight ) { - const SwFootnoteContFrm* pCont = pFootnoteBoss->FindFootnoteCont(); - SwTwips nNewHeight = pCont ? (pCont->Frm().*fnRect->fnGetHeight)() : 0; + const SwFootnoteContFrame* pCont = pFootnoteBoss->FindFootnoteCont(); + SwTwips nNewHeight = pCont ? (pCont->Frame().*fnRect->fnGetHeight)() : 0; // If we lost some footnotes, we may have more space // for our main text, so we have to format again ... if( nNewHeight < nFootnoteHeight ) @@ -1823,13 +1823,13 @@ void SwTextFrm::Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs } while ( pFootnoteBoss ); if( bOrphan ) { - ValidateFrm(); + ValidateFrame(); SetWidow( false ); } } if( IsEmptyMaster() ) { - SwFrm* pPre = GetPrev(); + SwFrame* pPre = GetPrev(); if( pPre && // #i10826# It's the first, it cannot keep! pPre->GetIndPrev() && @@ -1859,10 +1859,10 @@ void SwTextFrm::Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs // frames will not calculated during the painting. So I actually want to // avoid a formatting during painting, but since I'm a coward, I'll only // force the quick formatting in the situation of issue i29062. -bool SwTextFrm::FormatQuick( bool bForceQuickFormat ) +bool SwTextFrame::FormatQuick( bool bForceQuickFormat ) { OSL_ENSURE( ! IsVertical() || ! IsSwapped(), - "SwTextFrm::FormatQuick with swapped frame" ); + "SwTextFrame::FormatQuick with swapped frame" ); if( IsEmpty() && FormatEmpty() ) return true; @@ -1878,10 +1878,10 @@ bool SwTextFrm::FormatQuick( bool bForceQuickFormat ) if( !pPara ) return false; - SwFrmSwapper aSwapper( this, true ); + SwFrameSwapper aSwapper( this, true ); - TextFrmLockGuard aLock(this); - SwTextFormatInfo aInf( getRootFrm()->GetCurrShell()->GetOut(), this, false, true ); + TextFrameLockGuard aLock(this); + SwTextFormatInfo aInf( getRootFrame()->GetCurrShell()->GetOut(), this, false, true ); if( 0 != aInf.MaxHyph() ) // Respect MaxHyphen! return false; @@ -1913,7 +1913,7 @@ bool SwTextFrm::FormatQuick( bool bForceQuickFormat ) } while( aLine.Next() ); // Last exit: the heights need to match - Point aTopLeft( Frm().Pos() ); + Point aTopLeft( Frame().Pos() ); aTopLeft += Prt().Pos(); const SwTwips nNewHeight = aLine.Y() + aLine.GetLineHeight(); const SwTwips nOldHeight = aTopLeft.Y() + Prt().Height(); @@ -1926,7 +1926,7 @@ bool SwTextFrm::FormatQuick( bool bForceQuickFormat ) return false; } - if (m_pFollow && nStart != (static_cast<SwTextFrm*>(m_pFollow))->GetOfst()) + if (m_pFollow && nStart != (static_cast<SwTextFrame*>(m_pFollow))->GetOfst()) return false; // can be caused by e.g. Orphans // We made it! diff --git a/sw/source/core/text/frminf.cxx b/sw/source/core/text/frminf.cxx index 97ddfefba5ac..181fecf54223 100644 --- a/sw/source/core/text/frminf.cxx +++ b/sw/source/core/text/frminf.cxx @@ -49,14 +49,14 @@ sal_Int32 SwTextMargin::GetTextEnd() const } // Does the paragraph fit into one line? -bool SwTextFrmInfo::IsOneLine() const +bool SwTextFrameInfo::IsOneLine() const { - const SwLineLayout *pLay = pFrm->GetPara(); + const SwLineLayout *pLay = pFrame->GetPara(); if( !pLay ) return false; // For follows false of course - if( pFrm->GetFollow() ) + if( pFrame->GetFollow() ) return false; pLay = pLay->GetNext(); @@ -70,20 +70,20 @@ bool SwTextFrmInfo::IsOneLine() const } // Is the line filled for X percent? -bool SwTextFrmInfo::IsFilled( const sal_uInt8 nPercent ) const +bool SwTextFrameInfo::IsFilled( const sal_uInt8 nPercent ) const { - const SwLineLayout *pLay = pFrm->GetPara(); + const SwLineLayout *pLay = pFrame->GetPara(); if( !pLay ) return false; - long nWidth = pFrm->Prt().Width(); + long nWidth = pFrame->Prt().Width(); nWidth *= nPercent; nWidth /= 100; return sal_uInt16(nWidth) <= pLay->Width(); } // Where does the text start (without whitespace)? (document global) -SwTwips SwTextFrmInfo::GetLineStart( const SwTextCursor &rLine ) +SwTwips SwTextFrameInfo::GetLineStart( const SwTextCursor &rLine ) { const sal_Int32 nTextStart = rLine.GetTextStart(); if( rLine.GetStart() == nTextStart ) @@ -97,28 +97,28 @@ SwTwips SwTextFrmInfo::GetLineStart( const SwTextCursor &rLine ) } // Where does the text start (without whitespace)? (relative in the Frame) -SwTwips SwTextFrmInfo::GetLineStart() const +SwTwips SwTextFrameInfo::GetLineStart() const { - SwTextSizeInfo aInf( const_cast<SwTextFrm*>(pFrm) ); - SwTextCursor aLine( const_cast<SwTextFrm*>(pFrm), &aInf ); - return GetLineStart( aLine ) - pFrm->Frm().Left() - pFrm->Prt().Left(); + SwTextSizeInfo aInf( const_cast<SwTextFrame*>(pFrame) ); + SwTextCursor aLine( const_cast<SwTextFrame*>(pFrame), &aInf ); + return GetLineStart( aLine ) - pFrame->Frame().Left() - pFrame->Prt().Left(); } // Calculates the character's position and returns the middle position -SwTwips SwTextFrmInfo::GetCharPos( sal_Int32 nChar, bool bCenter ) const +SwTwips SwTextFrameInfo::GetCharPos( sal_Int32 nChar, bool bCenter ) const { - SWRECTFN( pFrm ) - SwFrmSwapper aSwapper( pFrm, true ); + SWRECTFN( pFrame ) + SwFrameSwapper aSwapper( pFrame, true ); - SwTextSizeInfo aInf( const_cast<SwTextFrm*>(pFrm) ); - SwTextCursor aLine( const_cast<SwTextFrm*>(pFrm), &aInf ); + SwTextSizeInfo aInf( const_cast<SwTextFrame*>(pFrame) ); + SwTextCursor aLine( const_cast<SwTextFrame*>(pFrame), &aInf ); SwTwips nStt, nNext; SwRect aRect; if( static_cast<SwTextCursor&>(aLine).GetCharRect( &aRect, nChar ) ) { if ( bVert ) - pFrm->SwitchHorizontalToVertical( aRect ); + pFrame->SwitchHorizontalToVertical( aRect ); nStt = (aRect.*fnRect->fnGetLeft)(); } @@ -126,22 +126,22 @@ SwTwips SwTextFrmInfo::GetCharPos( sal_Int32 nChar, bool bCenter ) const nStt = aLine.GetLineStart(); if( !bCenter ) - return nStt - (pFrm->Frm().*fnRect->fnGetLeft)(); + return nStt - (pFrame->Frame().*fnRect->fnGetLeft)(); if( static_cast<SwTextCursor&>(aLine).GetCharRect( &aRect, nChar+1 ) ) { if ( bVert ) - pFrm->SwitchHorizontalToVertical( aRect ); + pFrame->SwitchHorizontalToVertical( aRect ); nNext = (aRect.*fnRect->fnGetLeft)(); } else nNext = aLine.GetLineStart(); - return (( nNext + nStt ) / 2 ) - (pFrm->Frm().*fnRect->fnGetLeft)(); + return (( nNext + nStt ) / 2 ) - (pFrame->Frame().*fnRect->fnGetLeft)(); } -SwPaM *AddPam( SwPaM *pPam, const SwTextFrm* pTextFrm, +SwPaM *AddPam( SwPaM *pPam, const SwTextFrame* pTextFrame, const sal_Int32 nPos, const sal_Int32 nLen ) { if( nLen ) @@ -160,7 +160,7 @@ SwPaM *AddPam( SwPaM *pPam, const SwTextFrm* pTextFrm, } SwIndex &rContent = pPam->GetPoint()->nContent; - rContent.Assign( const_cast<SwTextNode*>(pTextFrm->GetTextNode()), nPos ); + rContent.Assign( const_cast<SwTextNode*>(pTextFrame->GetTextNode()), nPos ); pPam->SetMark(); rContent += nLen; } @@ -168,10 +168,10 @@ SwPaM *AddPam( SwPaM *pPam, const SwTextFrm* pTextFrm, } // Accumulates the whitespace at line start and end in the Pam -void SwTextFrmInfo::GetSpaces( SwPaM &rPam, bool bWithLineBreak ) const +void SwTextFrameInfo::GetSpaces( SwPaM &rPam, bool bWithLineBreak ) const { - SwTextSizeInfo aInf( const_cast<SwTextFrm*>(pFrm) ); - SwTextMargin aLine( const_cast<SwTextFrm*>(pFrm), &aInf ); + SwTextSizeInfo aInf( const_cast<SwTextFrame*>(pFrame) ); + SwTextMargin aLine( const_cast<SwTextFrame*>(pFrame), &aInf ); SwPaM *pPam = &rPam; bool bFirstLine = true; do { @@ -182,7 +182,7 @@ void SwTextFrmInfo::GetSpaces( SwPaM &rPam, bool bWithLineBreak ) const // Do NOT include the blanks/tabs from the first line // in the selection if( !bFirstLine && nPos > aLine.GetStart() ) - pPam = AddPam( pPam, pFrm, aLine.GetStart(), + pPam = AddPam( pPam, pFrame, aLine.GetStart(), nPos - aLine.GetStart() ); // Do NOT include the blanks/tabs from the last line @@ -196,7 +196,7 @@ void SwTextFrmInfo::GetSpaces( SwPaM &rPam, bool bWithLineBreak ) const sal_uInt16 nOff = !bWithLineBreak && CH_BREAK == aLine.GetInfo().GetChar( aLine.GetEnd() - 1 ) ? 1 : 0; - pPam = AddPam( pPam, pFrm, nPos, aLine.GetEnd() - nPos - nOff ); + pPam = AddPam( pPam, pFrame, nPos, aLine.GetEnd() - nPos - nOff ); } } } @@ -207,10 +207,10 @@ void SwTextFrmInfo::GetSpaces( SwPaM &rPam, bool bWithLineBreak ) const // Is there a bullet/symbol etc. at the text position? // Fonts: CharSet, SYMBOL und DONTKNOW -bool SwTextFrmInfo::IsBullet( sal_Int32 nTextStart ) const +bool SwTextFrameInfo::IsBullet( sal_Int32 nTextStart ) const { - SwTextSizeInfo aInf( const_cast<SwTextFrm*>(pFrm) ); - SwTextMargin aLine( const_cast<SwTextFrm*>(pFrm), &aInf ); + SwTextSizeInfo aInf( const_cast<SwTextFrame*>(pFrame) ); + SwTextMargin aLine( const_cast<SwTextFrame*>(pFrame), &aInf ); aInf.SetIdx( nTextStart ); return aLine.IsSymbol( nTextStart ); } @@ -219,10 +219,10 @@ bool SwTextFrmInfo::IsBullet( sal_Int32 nTextStart ) const // The precondition for a positive or negative first line indent: // All lines (except for the first one) have the same left margin. // We do not want to be so picky and work with a tolerance of TOLERANCE twips. -SwTwips SwTextFrmInfo::GetFirstIndent() const +SwTwips SwTextFrameInfo::GetFirstIndent() const { - SwTextSizeInfo aInf( const_cast<SwTextFrm*>(pFrm) ); - SwTextCursor aLine( const_cast<SwTextFrm*>(pFrm), &aInf ); + SwTextSizeInfo aInf( const_cast<SwTextFrame*>(pFrame) ); + SwTextCursor aLine( const_cast<SwTextFrame*>(pFrame), &aInf ); const SwTwips nFirst = GetLineStart( aLine ); const SwTwips TOLERANCE = 20; @@ -251,18 +251,18 @@ SwTwips SwTextFrmInfo::GetFirstIndent() const return 1; } -sal_Int32 SwTextFrmInfo::GetBigIndent( sal_Int32& rFndPos, - const SwTextFrm *pNextFrm ) const +sal_Int32 SwTextFrameInfo::GetBigIndent( sal_Int32& rFndPos, + const SwTextFrame *pNextFrame ) const { - SwTextSizeInfo aInf( const_cast<SwTextFrm*>(pFrm) ); - SwTextCursor aLine( const_cast<SwTextFrm*>(pFrm), &aInf ); + SwTextSizeInfo aInf( const_cast<SwTextFrame*>(pFrame) ); + SwTextCursor aLine( const_cast<SwTextFrame*>(pFrame), &aInf ); SwTwips nNextIndent = 0; - if( pNextFrm ) + if( pNextFrame ) { // I'm a single line - SwTextSizeInfo aNxtInf( const_cast<SwTextFrm*>(pNextFrm) ); - SwTextCursor aNxtLine( const_cast<SwTextFrm*>(pNextFrm), &aNxtInf ); + SwTextSizeInfo aNxtInf( const_cast<SwTextFrame*>(pNextFrame) ); + SwTextCursor aNxtLine( const_cast<SwTextFrame*>(pNextFrame), &aNxtInf ); nNextIndent = GetLineStart( aNxtLine ); } else @@ -279,7 +279,7 @@ sal_Int32 SwTextFrmInfo::GetBigIndent( sal_Int32& rFndPos, return 0; const Point aPoint( nNextIndent, aLine.Y() ); - rFndPos = aLine.GetCrsrOfst( nullptr, aPoint, false ); + rFndPos = aLine.GetCursorOfst( nullptr, aPoint, false ); if( 1 >= rFndPos ) return 0; @@ -302,7 +302,7 @@ sal_Int32 SwTextFrmInfo::GetBigIndent( sal_Int32& rFndPos, SwRect aRect; return aLine.GetCharRect( &aRect, rFndPos ) - ? static_cast<sal_Int32>(aRect.Left() - pFrm->Frm().Left() - pFrm->Prt().Left()) + ? static_cast<sal_Int32>(aRect.Left() - pFrame->Frame().Left() - pFrame->Prt().Left()) : 0; } diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx index c8f8063c123b..b287c77e9b05 100644 --- a/sw/source/core/text/frmpaint.cxx +++ b/sw/source/core/text/frmpaint.cxx @@ -60,7 +60,7 @@ class SwExtraPainter { SwSaveClip aClip; SwRect aRect; - const SwTextFrm* pTextFrm; + const SwTextFrame* pTextFrame; SwViewShell *pSh; SwFont* pFnt; const SwLineNumberInfo &rLineInf; @@ -72,7 +72,7 @@ class SwExtraPainter bool bLineNum; inline bool IsClipChg() { return aClip.IsChg(); } public: - SwExtraPainter( const SwTextFrm *pFrm, SwViewShell *pVwSh, + SwExtraPainter( const SwTextFrame *pFrame, SwViewShell *pVwSh, const SwLineNumberInfo &rLnInf, const SwRect &rRct, sal_Int16 eHor, bool bLnNm ); ~SwExtraPainter() { delete pFnt; } @@ -86,12 +86,12 @@ public: void PaintRedline( SwTwips nY, long nMax ); }; -SwExtraPainter::SwExtraPainter( const SwTextFrm *pFrm, SwViewShell *pVwSh, +SwExtraPainter::SwExtraPainter( const SwTextFrame *pFrame, SwViewShell *pVwSh, const SwLineNumberInfo &rLnInf, const SwRect &rRct, sal_Int16 eHor, bool bLnNm ) - : aClip( pVwSh->GetWin() || pFrm->IsUndersized() ? pVwSh->GetOut() : nullptr ) + : aClip( pVwSh->GetWin() || pFrame->IsUndersized() ? pVwSh->GetOut() : nullptr ) , aRect( rRct ) - , pTextFrm( pFrm ) + , pTextFrame( pFrame ) , pSh( pVwSh ) , pFnt( nullptr ) , rLineInf( rLnInf ) @@ -102,9 +102,9 @@ SwExtraPainter::SwExtraPainter( const SwTextFrm *pFrm, SwViewShell *pVwSh, , bGoLeft(false) , bLineNum( bLnNm ) { - if( pFrm->IsUndersized() ) + if( pFrame->IsUndersized() ) { - SwTwips nBottom = pFrm->Frm().Bottom(); + SwTwips nBottom = pFrame->Frame().Bottom(); if( aRect.Bottom() > nBottom ) aRect.Bottom( nBottom ); } @@ -121,18 +121,18 @@ SwExtraPainter::SwExtraPainter( const SwTextFrm *pFrm, SwViewShell *pVwSh, outside of the paint rect */ nDivider = !rLineInf.GetDivider().isEmpty() ? rLineInf.GetDividerCountBy() : 0; - nX = pFrm->Frm().Left(); - SwCharFormat* pFormat = rLineInf.GetCharFormat( const_cast<IDocumentStylePoolAccess&>(pFrm->GetNode()->getIDocumentStylePoolAccess()) ); + nX = pFrame->Frame().Left(); + SwCharFormat* pFormat = rLineInf.GetCharFormat( const_cast<IDocumentStylePoolAccess&>(pFrame->GetNode()->getIDocumentStylePoolAccess()) ); OSL_ENSURE( pFormat, "PaintExtraData without CharFormat" ); - pFnt = new SwFont( &pFormat->GetAttrSet(), pFrm->GetTextNode()->getIDocumentSettingAccess() ); + pFnt = new SwFont( &pFormat->GetAttrSet(), pFrame->GetTextNode()->getIDocumentSettingAccess() ); pFnt->Invalidate(); pFnt->ChgPhysFnt( pSh, *pSh->GetOut() ); - pFnt->SetVertical( 0, pFrm->IsVertical() ); - nLineNr += pFrm->GetAllLines() - pFrm->GetThisLines(); + pFnt->SetVertical( 0, pFrame->IsVertical() ); + nLineNr += pFrame->GetAllLines() - pFrame->GetThisLines(); LineNumberPosition ePos = rLineInf.GetPos(); if( ePos != LINENUMBER_POS_LEFT && ePos != LINENUMBER_POS_RIGHT ) { - if( pFrm->FindPageFrm()->OnRightPage() ) + if( pFrame->FindPageFrame()->OnRightPage() ) { nVirtPageNum = 1; ePos = ePos == LINENUMBER_POS_INSIDE ? @@ -155,7 +155,7 @@ SwExtraPainter::SwExtraPainter( const SwTextFrm *pFrm, SwViewShell *pVwSh, else { bGoLeft = false; - nX += pFrm->Frm().Width() + rLineInf.GetPosFromLeft(); + nX += pFrame->Frame().Width() + rLineInf.GetPosFromLeft(); if( nX > aRect.Right() ) bLineNum = false; } @@ -165,17 +165,17 @@ SwExtraPainter::SwExtraPainter( const SwTextFrm *pFrm, SwViewShell *pVwSh, if( text::HoriOrientation::INSIDE == eHor || text::HoriOrientation::OUTSIDE == eHor ) { if( !nVirtPageNum ) - nVirtPageNum = pFrm->FindPageFrm()->OnRightPage() ? 1 : 2; + nVirtPageNum = pFrame->FindPageFrame()->OnRightPage() ? 1 : 2; if( nVirtPageNum % 2 ) eHor = eHor == text::HoriOrientation::INSIDE ? text::HoriOrientation::LEFT : text::HoriOrientation::RIGHT; else eHor = eHor == text::HoriOrientation::OUTSIDE ? text::HoriOrientation::LEFT : text::HoriOrientation::RIGHT; } - const SwFrm* pTmpFrm = pFrm->FindTabFrm(); - if( !pTmpFrm ) - pTmpFrm = pFrm; - nRedX = text::HoriOrientation::LEFT == eHor ? pTmpFrm->Frm().Left() - REDLINE_DISTANCE : - pTmpFrm->Frm().Right() + REDLINE_DISTANCE; + const SwFrame* pTmpFrame = pFrame->FindTabFrame(); + if( !pTmpFrame ) + pTmpFrame = pFrame; + nRedX = text::HoriOrientation::LEFT == eHor ? pTmpFrame->Frame().Left() - REDLINE_DISTANCE : + pTmpFrame->Frame().Right() + REDLINE_DISTANCE; } } @@ -195,10 +195,10 @@ void SwExtraPainter::PaintExtra( SwTwips nY, long nAsc, long nMax, bool bRed ) aDrawInf.SetSmartTags( nullptr ); aDrawInf.SetLeft( 0 ); aDrawInf.SetRight( LONG_MAX ); - aDrawInf.SetFrm( pTextFrm ); + aDrawInf.SetFrame( pTextFrame ); aDrawInf.SetFont( pFnt ); aDrawInf.SetSnapToGrid( false ); - aDrawInf.SetIgnoreFrmRTL( true ); + aDrawInf.SetIgnoreFrameRTL( true ); bool bTooBig = pFnt->GetSize( pFnt->GetActual() ).Height() > nMax && pFnt->GetHeight( pSh, *pSh->GetOut() ) > nMax; @@ -232,7 +232,7 @@ void SwExtraPainter::PaintExtra( SwTwips nY, long nAsc, long nMax, bool bRed ) if( aRct.Intersection( aRect ).IsEmpty() ) bPaint = false; else - aClip.ChgClip( aRect, pTextFrm ); + aClip.ChgClip( aRect, pTextFrame ); } } else if( bGoLeft ) @@ -263,25 +263,25 @@ void SwExtraPainter::PaintRedline( SwTwips nY, long nMax ) { if( aRct.Intersection( aRect ).IsEmpty() ) return; - aClip.ChgClip( aRect, pTextFrm ); + aClip.ChgClip( aRect, pTextFrame ); } } const Color aOldCol( pSh->GetOut()->GetLineColor() ); pSh->GetOut()->SetLineColor( SW_MOD()->GetRedlineMarkColor() ); - if ( pTextFrm->IsVertical() ) + if ( pTextFrame->IsVertical() ) { - pTextFrm->SwitchHorizontalToVertical( aStart ); - pTextFrm->SwitchHorizontalToVertical( aEnd ); + pTextFrame->SwitchHorizontalToVertical( aStart ); + pTextFrame->SwitchHorizontalToVertical( aEnd ); } pSh->GetOut()->DrawLine( aStart, aEnd ); pSh->GetOut()->SetLineColor( aOldCol ); } -void SwTextFrm::PaintExtraData( const SwRect &rRect ) const +void SwTextFrame::PaintExtraData( const SwRect &rRect ) const { - if( Frm().Top() > rRect.Bottom() || Frm().Bottom() < rRect.Top() ) + if( Frame().Top() > rRect.Bottom() || Frame().Bottom() < rRect.Top() ) return; const SwTextNode& rTextNode = *GetTextNode(); @@ -298,9 +298,9 @@ void SwTextFrm::PaintExtraData( const SwRect &rRect ) const { if( IsLocked() || IsHiddenNow() || !Prt().Height() ) return; - SwViewShell *pSh = getRootFrm()->GetCurrShell(); + SwViewShell *pSh = getRootFrame()->GetCurrShell(); - SwSwapIfNotSwapped swap(const_cast<SwTextFrm *>(this)); + SwSwapIfNotSwapped swap(const_cast<SwTextFrame *>(this)); SwRect rOldRect( rRect ); if ( IsVertical() ) @@ -316,16 +316,16 @@ void SwTextFrm::PaintExtraData( const SwRect &rRect ) const if( HasPara() ) { - TextFrmLockGuard aLock(const_cast<SwTextFrm*>(this)); + TextFrameLockGuard aLock(const_cast<SwTextFrame*>(this)); SwTextLineAccess aAccess( this ); aAccess.GetPara(); - SwTextPaintInfo aInf( const_cast<SwTextFrm*>(this), rRect ); + SwTextPaintInfo aInf( const_cast<SwTextFrame*>(this), rRect ); aLayoutModeModifier.Modify( false ); - SwTextPainter aLine( const_cast<SwTextFrm*>(this), &aInf ); + SwTextPainter aLine( const_cast<SwTextFrame*>(this), &aInf ); bool bNoDummy = !aLine.GetNext(); // Only one empty line! while( aLine.Y() + aLine.GetLineHeight() <= rRect.Top() ) @@ -390,30 +390,30 @@ void SwTextFrm::PaintExtraData( const SwRect &rRect ) const if( bLineNum && rLineInf.IsCountBlankLines() && ( aExtra.HasNumber() || aExtra.HasDivider() ) ) { - aExtra.PaintExtra( Frm().Top()+Prt().Top(), aExtra.GetFont() + aExtra.PaintExtra( Frame().Top()+Prt().Top(), aExtra.GetFont() ->GetAscent( pSh, *pSh->GetOut() ), Prt().Height(), bRedLine ); } else if( bRedLine ) - aExtra.PaintRedline( Frm().Top()+Prt().Top(), Prt().Height() ); + aExtra.PaintRedline( Frame().Top()+Prt().Top(), Prt().Height() ); } (SwRect&)rRect = rOldRect; } } -SwRect SwTextFrm::Paint() +SwRect SwTextFrame::Paint() { #if OSL_DEBUG_LEVEL > 1 - const SwTwips nDbgY = Frm().Top(); + const SwTwips nDbgY = Frame().Top(); (void)nDbgY; #endif // finger layout - OSL_ENSURE( GetValidPosFlag(), "+SwTextFrm::Paint: no Calc()" ); + OSL_ENSURE( GetValidPosFlag(), "+SwTextFrame::Paint: no Calc()" ); SwRect aRet( Prt() ); if ( IsEmpty() || !HasPara() ) - aRet += Frm().Pos(); + aRet += Frame().Pos(); else { // We return the right paint rect. Use the calculated PaintOfst as the @@ -422,7 +422,7 @@ SwRect SwTextFrm::Paint() long l; if ( IsVertLR() ) // mba: the following line was added, but we don't need it for the existing directions; kept for IsVertLR(), but should be checked - rRepaint.Chg( ( GetUpper()->Frm() ).Pos() + ( GetUpper()->Prt() ).Pos(), ( GetUpper()->Prt() ).SSize() ); + rRepaint.Chg( ( GetUpper()->Frame() ).Pos() + ( GetUpper()->Prt() ).Pos(), ( GetUpper()->Prt() ).SSize() ); if( rRepaint.GetOfst() ) rRepaint.Left( rRepaint.GetOfst() ); @@ -436,10 +436,10 @@ SwRect SwTextFrm::Paint() // In case our left edge is the same as the body frame's left edge, // then extend the rectangle to include the page margin as well, // otherwise some font will be clipped. - SwLayoutFrm* pBodyFrm = GetUpper(); - if (pBodyFrm->IsBodyFrm() && aRet.Left() == (pBodyFrm->Frm().Left() + pBodyFrm->Prt().Left())) - if (SwLayoutFrm* pPageFrm = pBodyFrm->GetUpper()) - aRet.Left(pPageFrm->Frm().Left()); + SwLayoutFrame* pBodyFrame = GetUpper(); + if (pBodyFrame->IsBodyFrame() && aRet.Left() == (pBodyFrame->Frame().Left() + pBodyFrame->Prt().Left())) + if (SwLayoutFrame* pPageFrame = pBodyFrame->GetUpper()) + aRet.Left(pPageFrame->Frame().Left()); if ( IsRightToLeft() ) SwitchLTRtoRTL( aRet ); @@ -452,9 +452,9 @@ SwRect SwTextFrm::Paint() return aRet; } -bool SwTextFrm::PaintEmpty( const SwRect &rRect, bool bCheck ) const +bool SwTextFrame::PaintEmpty( const SwRect &rRect, bool bCheck ) const { - SwViewShell *pSh = getRootFrm()->GetCurrShell(); + SwViewShell *pSh = getRootFrame()->GetCurrShell(); if( pSh && ( pSh->GetViewOptions()->IsParagraph() || bInitFont ) ) { bInitFont = false; @@ -502,13 +502,13 @@ bool SwTextFrm::PaintEmpty( const SwRect &rRect, bool bCheck ) const pFnt->SetCharSet( RTL_TEXTENCODING_SYMBOL, SW_LATIN ); } pFnt->SetVertical( 0, IsVertical() ); - SwFrmSwapper aSwapper( this, true ); + SwFrameSwapper aSwapper( this, true ); SwLayoutModeModifier aLayoutModeModifier( *pSh->GetOut() ); aLayoutModeModifier.Modify( IsRightToLeft() ); pFnt->Invalidate(); pFnt->ChgPhysFnt( pSh, *pSh->GetOut() ); - Point aPos = Frm().Pos() + Prt().Pos(); + Point aPos = Frame().Pos() + Prt().Pos(); const SvxLRSpaceItem &rSpace = GetTextNode()->GetSwAttrSet().GetLRSpace(); @@ -530,7 +530,7 @@ bool SwTextFrm::PaintEmpty( const SwRect &rRect, bool bCheck ) const if ( GetTextNode()->GetSwAttrSet().GetParaGrid().GetValue() && IsInDocBody() ) { - SwTextGridItem const*const pGrid(GetGridItem(FindPageFrm())); + SwTextGridItem const*const pGrid(GetGridItem(FindPageFrame())); if ( pGrid ) { // center character in grid line @@ -555,7 +555,7 @@ bool SwTextFrm::PaintEmpty( const SwRect &rRect, bool bCheck ) const aDrawInf.SetWrong( nullptr ); aDrawInf.SetGrammarCheck( nullptr ); aDrawInf.SetSmartTags( nullptr ); - aDrawInf.SetFrm( this ); + aDrawInf.SetFrame( this ); aDrawInf.SetFont( pFnt ); aDrawInf.SetSnapToGrid( false ); @@ -573,23 +573,23 @@ bool SwTextFrm::PaintEmpty( const SwRect &rRect, bool bCheck ) const return false; } -void SwTextFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, SwPrintData const*const) const +void SwTextFrame::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, SwPrintData const*const) const { ResetRepaint(); // #i16816# tagged pdf support - SwViewShell *pSh = getRootFrm()->GetCurrShell(); + SwViewShell *pSh = getRootFrame()->GetCurrShell(); Num_Info aNumInfo( *this ); SwTaggedPDFHelper aTaggedPDFHelperNumbering( &aNumInfo, nullptr, nullptr, rRenderContext ); - Frm_Info aFrmInfo( *this ); - SwTaggedPDFHelper aTaggedPDFHelperParagraph( nullptr, &aFrmInfo, nullptr, rRenderContext ); + Frame_Info aFrameInfo( *this ); + SwTaggedPDFHelper aTaggedPDFHelperParagraph( nullptr, &aFrameInfo, nullptr, rRenderContext ); if( !IsEmpty() || !PaintEmpty( rRect, true ) ) { #if OSL_DEBUG_LEVEL > 1 - const SwTwips nDbgY = Frm().Top(); + const SwTwips nDbgY = Frame().Top(); (void)nDbgY; #endif @@ -599,11 +599,11 @@ void SwTextFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, S // It can happen that the IdleCollector withdrew my cached information if( !HasPara() ) { - OSL_ENSURE( GetValidPosFlag(), "+SwTextFrm::Paint: no Calc()" ); + OSL_ENSURE( GetValidPosFlag(), "+SwTextFrame::Paint: no Calc()" ); // #i29062# pass info that we are currently // painting. - const_cast<SwTextFrm*>(this)->GetFormatted( true ); + const_cast<SwTextFrame*>(this)->GetFormatted( true ); if( IsEmpty() ) { PaintEmpty( rRect, false ); @@ -611,32 +611,32 @@ void SwTextFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, S } if( !HasPara() ) { - OSL_ENSURE( false, "+SwTextFrm::Paint: missing format information" ); + OSL_ENSURE( false, "+SwTextFrame::Paint: missing format information" ); return; } } // We don't want to be interrupted while painting. // Do that after thr Format()! - TextFrmLockGuard aLock(const_cast<SwTextFrm*>(this)); + TextFrameLockGuard aLock(const_cast<SwTextFrame*>(this)); - // We only paint the part of the TextFrm which changed, is within the + // We only paint the part of the TextFrame which changed, is within the // range and was requested to paint. // One could think that the area rRect _needs_ to be painted, although // rRepaint is set. Indeed, we cannot avoid this problem from a formal // perspective. Luckily we can assume rRepaint to be empty when we need - // paint the while Frm. + // paint the while Frame. SwTextLineAccess aAccess( this ); SwParaPortion *pPara = aAccess.GetPara(); SwRepaint &rRepaint = pPara->GetRepaint(); - // Switch off recycling when in the FlyCntFrm. + // Switch off recycling when in the FlyContentFrame. // A DrawRect is called for repainting the line anyways. if( rRepaint.GetOfst() ) { - const SwFlyFrm *pFly = FindFlyFrm(); - if( pFly && pFly->IsFlyInCntFrm() ) + const SwFlyFrame *pFly = FindFlyFrame(); + if( pFly && pFly->IsFlyInContentFrame() ) rRepaint.SetOfst( 0 ); } @@ -647,7 +647,7 @@ void SwTextFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, S SwRect aOldRect( rRect ); { - SwSwapIfNotSwapped swap(const_cast<SwTextFrm *>(this)); + SwSwapIfNotSwapped swap(const_cast<SwTextFrame *>(this)); if ( IsVertical() ) SwitchVerticalToHorizontal( (SwRect&)rRect ); @@ -655,14 +655,14 @@ void SwTextFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, S if ( IsRightToLeft() ) SwitchRTLtoLTR( (SwRect&)rRect ); - SwTextPaintInfo aInf( const_cast<SwTextFrm*>(this), rRect ); + SwTextPaintInfo aInf( const_cast<SwTextFrame*>(this), rRect ); aInf.SetWrongList( const_cast<SwTextNode*>(GetTextNode())->GetWrong() ); aInf.SetGrammarCheckList( const_cast<SwTextNode*>(GetTextNode())->GetGrammarCheck() ); aInf.SetSmartTags( const_cast<SwTextNode*>(GetTextNode())->GetSmartTags() ); aInf.GetTextFly().SetTopRule(); - SwTextPainter aLine( const_cast<SwTextFrm*>(this), &aInf ); - // Optimization: if no free flying Frm overlaps into our line, the + SwTextPainter aLine( const_cast<SwTextFrame*>(this), &aInf ); + // Optimization: if no free flying Frame overlaps into our line, the // SwTextFly just switches off aInf.GetTextFly().Relax(); diff --git a/sw/source/core/text/guess.cxx b/sw/source/core/text/guess.cxx index f558d0576341..939fe331b2c9 100644 --- a/sw/source/core/text/guess.cxx +++ b/sw/source/core/text/guess.cxx @@ -89,7 +89,7 @@ bool SwTextGuess::Guess( const SwTextPortion& rPor, SwTextFormatInfo &rInf, if ( rInf.SnapToGrid() ) { SwTextGridItem const*const pGrid( - GetGridItem(rInf.GetTextFrm()->FindPageFrm())); + GetGridItem(rInf.GetTextFrame()->FindPageFrame())); bAddItalic = !pGrid || GRID_LINES_CHARS != pGrid->GetGridType(); } @@ -112,7 +112,7 @@ bool SwTextGuess::Guess( const SwTextPortion& rPor, SwTextFormatInfo &rInf, nLineWidth -= nLeftRightBorderSpace; - const bool bUnbreakableNumberings = rInf.GetTextFrm()->GetTextNode()-> + const bool bUnbreakableNumberings = rInf.GetTextFrame()->GetTextNode()-> getIDocumentSettingAccess()->get(DocumentSettingId::UNBREAKABLE_NUMBERINGS); // first check if everything fits to line @@ -213,7 +213,7 @@ bool SwTextGuess::Guess( const SwTextPortion& rPor, SwTextFormatInfo &rInf, nBreakPos = nCutPos; sal_Int32 nX = nBreakPos; - const SvxAdjust& rAdjust = rInf.GetTextFrm()->GetTextNode()->GetSwAttrSet().GetAdjust().GetAdjust(); + const SvxAdjust& rAdjust = rInf.GetTextFrame()->GetTextNode()->GetSwAttrSet().GetAdjust().GetAdjust(); if ( rAdjust == SVX_ADJUST_LEFT ) { // we step back until a non blank character has been found @@ -336,7 +336,7 @@ bool SwTextGuess::Guess( const SwTextPortion& rPor, SwTextFormatInfo &rInf, // compare current script with script from last "real" character if ( nScript - 1 != rInf.GetFont()->GetActual() ) - aLang = rInf.GetTextFrm()->GetTextNode()->GetLang( + aLang = rInf.GetTextFrame()->GetTextNode()->GetLang( CH_TXTATR_BREAKWORD == cFieldChr ? nDoNotStepOver : nLangIndex, 0, nScript ); @@ -344,7 +344,7 @@ bool SwTextGuess::Guess( const SwTextPortion& rPor, SwTextFormatInfo &rInf, } const ForbiddenCharacters aForbidden( - *rInf.GetTextFrm()->GetNode()->getIDocumentSettingAccess()->getForbiddenCharacters( aLang, true ) ); + *rInf.GetTextFrame()->GetNode()->getIDocumentSettingAccess()->getForbiddenCharacters( aLang, true ) ); const bool bAllowHanging = rInf.IsHanging() && ! rInf.IsMulti() && ! rPor.InFieldGrp(); @@ -423,7 +423,7 @@ bool SwTextGuess::Guess( const SwTextPortion& rPor, SwTextFormatInfo &rInf, CHAR_SOFTHYPHEN == rInf.GetText()[ nBreakPos - 1 ] ) nBreakPos = rInf.GetIdx() - 1; - const SvxAdjust& rAdjust = rInf.GetTextFrm()->GetTextNode()->GetSwAttrSet().GetAdjust().GetAdjust(); + const SvxAdjust& rAdjust = rInf.GetTextFrame()->GetTextNode()->GetSwAttrSet().GetAdjust().GetAdjust(); if( rAdjust != SVX_ADJUST_LEFT ) { // Delete any blanks at the end of a line, but be careful: diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index d38630a1b11e..38d1e75feed5 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -145,15 +145,15 @@ void SwLineInfo::CtorInitLineInfo( const SwAttrSet& rAttrSet, nDefTabStop = USHRT_MAX; } -void SwTextInfo::CtorInitTextInfo( SwTextFrm *pFrm ) +void SwTextInfo::CtorInitTextInfo( SwTextFrame *pFrame ) { - m_pPara = pFrm->GetPara(); - m_nTextStart = pFrm->GetOfst(); + m_pPara = pFrame->GetPara(); + m_nTextStart = pFrame->GetOfst(); if (!m_pPara) { SAL_WARN("sw.core", "+SwTextInfo::CTOR: missing paragraph information"); - pFrm->Format(pFrm->getRootFrm()->GetCurrShell()->GetOut()); - m_pPara = pFrm->GetPara(); + pFrame->Format(pFrame->getRootFrame()->GetCurrShell()->GetOut()); + m_pPara = pFrame->GetPara(); } } @@ -191,7 +191,7 @@ SwTextSizeInfo::SwTextSizeInfo() , m_pRef(nullptr) , m_pFnt(nullptr) , m_pUnderFnt(nullptr) -, m_pFrm(nullptr) +, m_pFrame(nullptr) , m_pOpt(nullptr) , m_pText(nullptr) , m_nIdx(0) @@ -221,7 +221,7 @@ SwTextSizeInfo::SwTextSizeInfo( const SwTextSizeInfo &rNew ) m_pRef(const_cast<SwTextSizeInfo&>(rNew).GetRefDev()), m_pFnt(const_cast<SwTextSizeInfo&>(rNew).GetFont()), m_pUnderFnt(rNew.GetUnderFnt()), - m_pFrm(rNew.m_pFrm), + m_pFrame(rNew.m_pFrame), m_pOpt(&rNew.GetOpt()), m_pText(&rNew.GetText()), m_nIdx(rNew.GetIdx()), @@ -247,15 +247,15 @@ SwTextSizeInfo::SwTextSizeInfo( const SwTextSizeInfo &rNew ) #endif } -void SwTextSizeInfo::CtorInitTextSizeInfo( OutputDevice* pRenderContext, SwTextFrm *pFrame, SwFont *pNewFnt, +void SwTextSizeInfo::CtorInitTextSizeInfo( OutputDevice* pRenderContext, SwTextFrame *pFrame, SwFont *pNewFnt, const sal_Int32 nNewIdx, const sal_Int32 nNewLen ) { m_pKanaComp = nullptr; m_nKanaIdx = 0; - m_pFrm = pFrame; - CtorInitTextInfo( m_pFrm ); - const SwTextNode *pNd = m_pFrm->GetTextNode(); - m_pVsh = m_pFrm->getRootFrm()->GetCurrShell(); + m_pFrame = pFrame; + CtorInitTextInfo( m_pFrame ); + const SwTextNode *pNd = m_pFrame->GetTextNode(); + m_pVsh = m_pFrame->getRootFrame()->GetCurrShell(); // Get the output and reference device if ( m_pVsh ) @@ -283,7 +283,7 @@ void SwTextSizeInfo::CtorInitTextSizeInfo( OutputDevice* pRenderContext, SwTextF #endif // Set default layout mode ( LTR or RTL ). - if ( m_pFrm->IsRightToLeft() ) + if ( m_pFrame->IsRightToLeft() ) { m_pOut->SetLayoutMode( TEXT_LAYOUT_BIDI_STRONG | TEXT_LAYOUT_BIDI_RTL ); m_pRef->SetLayoutMode( TEXT_LAYOUT_BIDI_STRONG | TEXT_LAYOUT_BIDI_RTL ); @@ -307,7 +307,7 @@ void SwTextSizeInfo::CtorInitTextSizeInfo( OutputDevice* pRenderContext, SwTextF m_bURLNotify = pNoteURL && !m_bOnWin; SetSnapToGrid( pNd->GetSwAttrSet().GetParaGrid().GetValue() && - m_pFrm->IsInDocBody() ); + m_pFrame->IsInDocBody() ); m_pFnt = pNewFnt; m_pUnderFnt = nullptr; @@ -332,7 +332,7 @@ SwTextSizeInfo::SwTextSizeInfo( const SwTextSizeInfo &rNew, const OUString* pTex m_pRef(const_cast<SwTextSizeInfo&>(rNew).GetRefDev()), m_pFnt(const_cast<SwTextSizeInfo&>(rNew).GetFont()), m_pUnderFnt(rNew.GetUnderFnt()), - m_pFrm( rNew.m_pFrm ), + m_pFrame( rNew.m_pFrame ), m_pOpt(&rNew.GetOpt()), m_pText(pText), m_nIdx(nIndex), @@ -359,12 +359,12 @@ SwTextSizeInfo::SwTextSizeInfo( const SwTextSizeInfo &rNew, const OUString* pTex SetLen( GetMinLen( *this ) ); } -SwTextSizeInfo::SwTextSizeInfo( SwTextFrm *pTextFrm, SwFont *pTextFnt, +SwTextSizeInfo::SwTextSizeInfo( SwTextFrame *pTextFrame, SwFont *pTextFnt, const sal_Int32 nIndex, const sal_Int32 nLength ) : m_bOnWin(false) { - CtorInitTextSizeInfo( pTextFrm->getRootFrm()->GetCurrShell()->GetOut(), pTextFrm, pTextFnt, nIndex, nLength ); + CtorInitTextSizeInfo( pTextFrame->getRootFrame()->GetCurrShell()->GetOut(), pTextFrame, pTextFnt, nIndex, nLength ); } void SwTextSizeInfo::SelectFont() @@ -379,7 +379,7 @@ void SwTextSizeInfo::SelectFont() void SwTextSizeInfo::NoteAnimation() const { if( OnWin() ) - SwRootFrm::FlushVout(); + SwRootFrame::FlushVout(); OSL_ENSURE( m_pOut == m_pVsh->GetOut(), "SwTextSizeInfo::NoteAnimation() changed m_pOut" ); @@ -393,7 +393,7 @@ SwPosSize SwTextSizeInfo::GetTextSize( OutputDevice* pOutDev, const sal_uInt16 nComp) const { SwDrawTextInfo aDrawInf( m_pVsh, *pOutDev, pSI, rText, nIndex, nLength ); - aDrawInf.SetFrm( m_pFrm ); + aDrawInf.SetFrame( m_pFrame ); aDrawInf.SetFont( m_pFnt ); aDrawInf.SetSnapToGrid( SnapToGrid() ); aDrawInf.SetKanaComp( nComp ); @@ -414,7 +414,7 @@ SwPosSize SwTextSizeInfo::GetTextSize() const 0 ; SwDrawTextInfo aDrawInf( m_pVsh, *m_pOut, &rSI, *m_pText, m_nIdx, m_nLen ); - aDrawInf.SetFrm( m_pFrm ); + aDrawInf.SetFrame( m_pFrame ); aDrawInf.SetFont( m_pFnt ); aDrawInf.SetSnapToGrid( SnapToGrid() ); aDrawInf.SetKanaComp( nComp ); @@ -428,7 +428,7 @@ void SwTextSizeInfo::GetTextSize( const SwScriptInfo* pSI, const sal_Int32 nInde { SwDrawTextInfo aDrawInf( m_pVsh, *m_pOut, pSI, *m_pText, nIndex, nLength, 0, false, pCache); - aDrawInf.SetFrm( m_pFrm ); + aDrawInf.SetFrame( m_pFrame ); aDrawInf.SetFont( m_pFnt ); aDrawInf.SetSnapToGrid( SnapToGrid() ); aDrawInf.SetKanaComp( nComp ); @@ -448,7 +448,7 @@ sal_Int32 SwTextSizeInfo::GetTextBreak( const long nLineWidth, OSL_ENSURE( m_pRef == m_pOut, "GetTextBreak is supposed to use the RefDev" ); SwDrawTextInfo aDrawInf( m_pVsh, *m_pOut, &rScriptInfo, *m_pText, GetIdx(), nMaxLen, 0, false, pCache ); - aDrawInf.SetFrm( m_pFrm ); + aDrawInf.SetFrame( m_pFrame ); aDrawInf.SetFont( m_pFnt ); aDrawInf.SetSnapToGrid( SnapToGrid() ); aDrawInf.SetKanaComp( nComp ); @@ -469,7 +469,7 @@ sal_Int32 SwTextSizeInfo::GetTextBreak( const long nLineWidth, OSL_ENSURE( m_pRef == m_pOut, "GetTextBreak is supposed to use the RefDev" ); SwDrawTextInfo aDrawInf( m_pVsh, *m_pOut, &rScriptInfo, *m_pText, GetIdx(), nMaxLen, 0, false, pCache ); - aDrawInf.SetFrm( m_pFrm ); + aDrawInf.SetFrame( m_pFrame ); aDrawInf.SetFont( m_pFnt ); aDrawInf.SetSnapToGrid( SnapToGrid() ); aDrawInf.SetKanaComp( nComp ); @@ -483,7 +483,7 @@ bool SwTextSizeInfo::_HasHint( const SwTextNode* pTextNode, sal_Int32 nPos ) return pTextNode->GetTextAttrForCharAt(nPos); } -void SwTextPaintInfo::CtorInitTextPaintInfo( OutputDevice* pRenderContext, SwTextFrm *pFrame, const SwRect &rPaint ) +void SwTextPaintInfo::CtorInitTextPaintInfo( OutputDevice* pRenderContext, SwTextFrame *pFrame, const SwRect &rPaint ) { CtorInitTextSizeInfo( pRenderContext, pFrame ); aTextFly.CtorInitTextFly( pFrame ), @@ -527,9 +527,9 @@ SwTextPaintInfo::SwTextPaintInfo( const SwTextPaintInfo &rInf ) nSpaceIdx( rInf.GetSpaceIdx() ) { } -SwTextPaintInfo::SwTextPaintInfo( SwTextFrm *pFrame, const SwRect &rPaint ) +SwTextPaintInfo::SwTextPaintInfo( SwTextFrame *pFrame, const SwRect &rPaint ) { - CtorInitTextPaintInfo( pFrame->getRootFrm()->GetCurrShell()->GetOut(), pFrame, rPaint ); + CtorInitTextPaintInfo( pFrame->getRootFrame()->GetCurrShell()->GetOut(), pFrame, rPaint ); } extern Color aGlobalRetoucheColor; @@ -550,7 +550,7 @@ static bool lcl_IsDarkBackground( const SwTextPaintInfo& rInf ) // See implementation in /core/layout/paintfrm.cxx // There is a background color, if there is a background brush and // its color is *not* "no fill"/"auto fill". - if( rInf.GetTextFrm()->GetBackgroundBrush( aFillAttributes, pItem, pCol, aOrigBackRect, false ) ) + if( rInf.GetTextFrame()->GetBackgroundBrush( aFillAttributes, pItem, pCol, aOrigBackRect, false ) ) { if ( !pCol ) pCol = &pItem->GetColor(); @@ -581,7 +581,7 @@ void SwTextPaintInfo::_DrawText( const OUString &rText, const SwLinePortion &rPo if( GetFont()->IsBlink() && OnWin() && rPor.Width() ) { // check if accessibility options allow blinking portions: - const SwViewShell* pSh = GetTextFrm()->getRootFrm()->GetCurrShell(); + const SwViewShell* pSh = GetTextFrame()->getRootFrame()->GetCurrShell(); if ( pSh && ! pSh->GetAccessibilityOptions()->IsStopAnimatedText() && ! pSh->IsPreview() ) { @@ -590,16 +590,16 @@ void SwTextPaintInfo::_DrawText( const OUString &rText, const SwLinePortion &rPo Point aPoint( aPos ); - if ( GetTextFrm()->IsRightToLeft() ) - GetTextFrm()->SwitchLTRtoRTL( aPoint ); + if ( GetTextFrame()->IsRightToLeft() ) + GetTextFrame()->SwitchLTRtoRTL( aPoint ); if ( TEXT_LAYOUT_BIDI_STRONG != GetOut()->GetLayoutMode() ) aPoint.X() -= rPor.Width(); - if ( GetTextFrm()->IsVertical() ) - GetTextFrm()->SwitchHorizontalToVertical( aPoint ); + if ( GetTextFrame()->IsVertical() ) + GetTextFrame()->SwitchHorizontalToVertical( aPoint ); - pBlink->Insert( aPoint, &rPor, GetTextFrm(), m_pFnt->GetOrientation() ); + pBlink->Insert( aPoint, &rPor, GetTextFrame(), m_pFnt->GetOrientation() ); if( !pBlink->IsVisible() ) return; @@ -630,7 +630,7 @@ void SwTextPaintInfo::_DrawText( const OUString &rText, const SwLinePortion &rPo const bool bTmpSmart = bSmartTag && OnWin() && !GetOpt().IsPagePreview() && SwSmartTagMgr::Get().IsSmartTagsEnabled(); OSL_ENSURE( GetParaPortion(), "No paragraph!"); - SwDrawTextInfo aDrawInf( m_pFrm->getRootFrm()->GetCurrShell(), *m_pOut, pSI, rText, nStart, nLength, + SwDrawTextInfo aDrawInf( m_pFrame->getRootFrame()->GetCurrShell(), *m_pOut, pSI, rText, nStart, nLength, rPor.Width(), bBullet ); aDrawInf.SetLeft( GetPaintRect().Left() ); @@ -656,7 +656,7 @@ void SwTextPaintInfo::_DrawText( const OUString &rText, const SwLinePortion &rPo // the font is used to identify the current script via nActual aDrawInf.SetFont( m_pFnt ); // the frame is used to identify the orientation - aDrawInf.SetFrm( GetTextFrm() ); + aDrawInf.SetFrame( GetTextFrame() ); // we have to know if the paragraph should snap to grid aDrawInf.SetSnapToGrid( SnapToGrid() ); // for underlining we must know when not to add extra space behind @@ -670,13 +670,13 @@ void SwTextPaintInfo::_DrawText( const OUString &rText, const SwLinePortion &rPo if( m_pFnt->GetLeftBorder() && !static_cast<const SwTextPortion&>(rPor).GetJoinBorderWithPrev() ) { const sal_uInt16 nLeftBorderSpace = m_pFnt->GetLeftBorderSpace(); - if ( GetTextFrm()->IsRightToLeft() ) + if ( GetTextFrame()->IsRightToLeft() ) { aFontPos.X() -= nLeftBorderSpace; } else { - switch( m_pFnt->GetOrientation(GetTextFrm()->IsVertical()) ) + switch( m_pFnt->GetOrientation(GetTextFrame()->IsVertical()) ) { case 0 : aFontPos.X() += nLeftBorderSpace; @@ -764,27 +764,27 @@ void SwTextPaintInfo::CalcRect( const SwLinePortion& rPor, else { aPoint.A() = X(); - if ( GetTextFrm()->IsVertLR() ) + if ( GetTextFrame()->IsVertLR() ) aPoint.B() = Y() - rPor.Height() + rPor.GetAscent(); else aPoint.B() = Y() - rPor.GetAscent(); } // Adjust x coordinate if we are inside a bidi portion - const bool bFrmDir = GetTextFrm()->IsRightToLeft(); - const bool bCounterDir = ( !bFrmDir && DIR_RIGHT2LEFT == GetDirection() ) || - ( bFrmDir && DIR_LEFT2RIGHT == GetDirection() ); + const bool bFrameDir = GetTextFrame()->IsRightToLeft(); + const bool bCounterDir = ( !bFrameDir && DIR_RIGHT2LEFT == GetDirection() ) || + ( bFrameDir && DIR_LEFT2RIGHT == GetDirection() ); if ( bCounterDir ) aPoint.A() -= aSize.Width(); SwRect aRect( aPoint, aSize ); - if ( GetTextFrm()->IsRightToLeft() ) - GetTextFrm()->SwitchLTRtoRTL( aRect ); + if ( GetTextFrame()->IsRightToLeft() ) + GetTextFrame()->SwitchLTRtoRTL( aRect ); - if ( GetTextFrm()->IsVertical() ) - GetTextFrm()->SwitchHorizontalToVertical( aRect ); + if ( GetTextFrame()->IsVertical() ) + GetTextFrame()->SwitchHorizontalToVertical( aRect ); if( bInsideBox && rPor.InTextGrp() ) { @@ -792,7 +792,7 @@ void SwTextPaintInfo::CalcRect( const SwLinePortion& rPor, static_cast<const SwTextPortion&>(rPor).GetJoinBorderWithPrev(); const bool bJoinWithNext = static_cast<const SwTextPortion&>(rPor).GetJoinBorderWithNext(); - const bool bIsVert = GetTextFrm()->IsVertical(); + const bool bIsVert = GetTextFrame()->IsVertical(); aRect.Top(aRect.Top() + GetFont()->CalcShadowSpace(SvxShadowItemSide::TOP, bIsVert, bJoinWithPrev, bJoinWithNext )); aRect.Bottom(aRect.Bottom() - GetFont()->CalcShadowSpace(SvxShadowItemSide::BOTTOM, bIsVert, bJoinWithPrev, bJoinWithNext )); aRect.Left(aRect.Left() + GetFont()->CalcShadowSpace(SvxShadowItemSide::LEFT, bIsVert, bJoinWithPrev, bJoinWithNext )); @@ -834,10 +834,10 @@ static void lcl_DrawSpecial( const SwTextPaintInfo& rInf, const SwLinePortion& r bool bRotate = 0 != ( nOptions & DRAW_SPECIAL_OPTIONS_ROTATE ); // rRect is given in absolute coordinates - if ( rInf.GetTextFrm()->IsRightToLeft() ) - rInf.GetTextFrm()->SwitchRTLtoLTR( rRect ); - if ( rInf.GetTextFrm()->IsVertical() ) - rInf.GetTextFrm()->SwitchVerticalToHorizontal( rRect ); + if ( rInf.GetTextFrame()->IsRightToLeft() ) + rInf.GetTextFrame()->SwitchRTLtoLTR( rRect ); + if ( rInf.GetTextFrame()->IsVertical() ) + rInf.GetTextFrame()->SwitchVerticalToHorizontal( rRect ); const SwFont* pOldFnt = rInf.GetFont(); @@ -854,7 +854,7 @@ static void lcl_DrawSpecial( const SwTextPaintInfo& rInf, const SwLinePortion& r // Some of the current values are set at the font: if ( ! bRotate ) - m_pFnt->SetVertical( 0, rInf.GetTextFrm()->IsVertical() ); + m_pFnt->SetVertical( 0, rInf.GetTextFrame()->IsVertical() ); else m_pFnt->SetVertical( pOldFnt->GetOrientation() ); @@ -866,7 +866,7 @@ static void lcl_DrawSpecial( const SwTextPaintInfo& rInf, const SwLinePortion& r const_cast<SwTextPaintInfo&>(rInf).SetFont( m_pFnt ); // The maximum width depends on the current orientation - const sal_uInt16 nDir = m_pFnt->GetOrientation( rInf.GetTextFrm()->IsVertical() ); + const sal_uInt16 nDir = m_pFnt->GetOrientation( rInf.GetTextFrame()->IsVertical() ); SwTwips nMaxWidth; if (nDir == 900 || nDir == 2700) nMaxWidth = rRect.Height(); @@ -968,7 +968,7 @@ void SwTextPaintInfo::DrawTab( const SwLinePortion &rPor ) const if ( ! aRect.HasArea() ) return; - const sal_Unicode cChar = GetTextFrm()->IsRightToLeft() ? CHAR_TAB_RTL : CHAR_TAB; + const sal_Unicode cChar = GetTextFrame()->IsRightToLeft() ? CHAR_TAB_RTL : CHAR_TAB; const sal_uInt8 nOptions = DRAW_SPECIAL_OPTIONS_CENTER | DRAW_SPECIAL_OPTIONS_ROTATE; lcl_DrawSpecial( *this, rPor, aRect, Color(NON_PRINTING_CHARACTER_COLOR), cChar, nOptions ); @@ -987,7 +987,7 @@ void SwTextPaintInfo::DrawLineBreak( const SwLinePortion &rPor ) const if( aRect.HasArea() ) { - const sal_Unicode cChar = GetTextFrm()->IsRightToLeft() ? + const sal_Unicode cChar = GetTextFrame()->IsRightToLeft() ? CHAR_LINEBREAK_RTL : CHAR_LINEBREAK; const sal_uInt8 nOptions = 0; @@ -1020,8 +1020,8 @@ void SwTextPaintInfo::DrawRedArrow( const SwLinePortion &rPor ) const cChar = CHAR_RIGHT_ARROW; } - if ( GetTextFrm()->IsVertical() ) - GetTextFrm()->SwitchHorizontalToVertical( aRect ); + if ( GetTextFrame()->IsVertical() ) + GetTextFrame()->SwitchHorizontalToVertical( aRect ); Color aCol( COL_LIGHTRED ); @@ -1043,7 +1043,7 @@ void SwTextPaintInfo::DrawPostIts( const SwLinePortion&, bool bScript ) const const sal_uInt16 nFontHeight = m_pFnt->GetHeight( m_pVsh, *GetOut() ); const sal_uInt16 nFontAscent = m_pFnt->GetAscent( m_pVsh, *GetOut() ); - switch ( m_pFnt->GetOrientation( GetTextFrm()->IsVertical() ) ) + switch ( m_pFnt->GetOrientation( GetTextFrame()->IsVertical() ) ) { case 0 : aSize.Width() = nPostItsWidth; @@ -1068,11 +1068,11 @@ void SwTextPaintInfo::DrawPostIts( const SwLinePortion&, bool bScript ) const SwRect aTmpRect( aTmp, aSize ); - if ( GetTextFrm()->IsRightToLeft() ) - GetTextFrm()->SwitchLTRtoRTL( aTmpRect ); + if ( GetTextFrame()->IsRightToLeft() ) + GetTextFrame()->SwitchLTRtoRTL( aTmpRect ); - if ( GetTextFrm()->IsVertical() ) - GetTextFrm()->SwitchHorizontalToVertical( aTmpRect ); + if ( GetTextFrame()->IsVertical() ) + GetTextFrame()->SwitchHorizontalToVertical( aTmpRect ); const Rectangle aRect( aTmpRect.SVRect() ); SwViewOption::PaintPostIts( const_cast<OutputDevice*>(GetOut()), aRect, bScript ); @@ -1145,7 +1145,7 @@ void SwTextPaintInfo::DrawBackBrush( const SwLinePortion &rPor ) const CalcRect( rPor, &aIntersect, nullptr, true ); if(aIntersect.HasArea()) { - SwTextNode *pNd = m_pFrm->GetTextNode(); + SwTextNode *pNd = m_pFrame->GetTextNode(); const ::sw::mark::IMark* pFieldmark = nullptr; if(pNd) { @@ -1218,7 +1218,7 @@ void SwTextPaintInfo::DrawBorder( const SwLinePortion &rPor ) const if ( aDrawArea.HasArea() ) { PaintCharacterBorder( - *m_pFnt, aDrawArea, GetTextFrm()->IsVertical(), + *m_pFnt, aDrawArea, GetTextFrame()->IsVertical(), rPor.GetJoinBorderWithPrev(), rPor.GetJoinBorderWithNext()); } } @@ -1245,7 +1245,7 @@ void SwTextPaintInfo::DrawViewOpt( const SwLinePortion &rPor, && !GetOpt().IsReadonly() && SwViewOption::IsFieldShadings() && ( POR_NUMBER != nWhich - || m_pFrm->GetTextNode()->HasMarkedLabel())) // #i27615# + || m_pFrame->GetTextNode()->HasMarkedLabel())) // #i27615# { bDraw = true; } @@ -1281,7 +1281,7 @@ void SwTextPaintInfo::_NotifyURL( const SwLinePortion &rPor ) const if( aIntersect.HasArea() ) { - SwTextNode *pNd = const_cast<SwTextNode*>(GetTextFrm()->GetTextNode()); + SwTextNode *pNd = const_cast<SwTextNode*>(GetTextFrame()->GetTextNode()); SwTextAttr *const pAttr = pNd->GetTextAttrAt(GetIdx(), RES_TXTATR_INETFMT); if( pAttr ) @@ -1331,7 +1331,7 @@ const PropertyValues & SwTextFormatInfo::GetHyphValues() const bool SwTextFormatInfo::InitHyph( const bool bAutoHyphen ) { - const SwAttrSet& rAttrSet = GetTextFrm()->GetTextNode()->GetSwAttrSet(); + const SwAttrSet& rAttrSet = GetTextFrame()->GetTextNode()->GetSwAttrSet(); SetHanging( rAttrSet.GetHangingPunctuation().GetValue() ); SetScriptSpace( rAttrSet.GetScriptSpace().GetValue() ); SetForbiddenChars( rAttrSet.GetForbiddenRule().GetValue() ); @@ -1347,10 +1347,10 @@ bool SwTextFormatInfo::InitHyph( const bool bAutoHyphen ) return bAuto; } -void SwTextFormatInfo::CtorInitTextFormatInfo( OutputDevice* pRenderContext, SwTextFrm *pNewFrm, const bool bNewInterHyph, +void SwTextFormatInfo::CtorInitTextFormatInfo( OutputDevice* pRenderContext, SwTextFrame *pNewFrame, const bool bNewInterHyph, const bool bNewQuick, const bool bTst ) { - CtorInitTextPaintInfo( pRenderContext, pNewFrm, SwRect() ); + CtorInitTextPaintInfo( pRenderContext, pNewFrame, SwRect() ); m_bQuick = bNewQuick; m_bInterHyph = bNewInterHyph; @@ -1419,7 +1419,7 @@ bool SwTextFormatInfo::IsHyphenate() const const SwFormatDrop *SwTextFormatInfo::GetDropFormat() const { - const SwFormatDrop *pDrop = &GetTextFrm()->GetTextNode()->GetSwAttrSet().GetDrop(); + const SwFormatDrop *pDrop = &GetTextFrame()->GetTextNode()->GetSwAttrSet().GetDrop(); if( 1 >= pDrop->GetLines() || ( !pDrop->GetChars() && !pDrop->GetWholeWord() ) ) pDrop = nullptr; @@ -1434,10 +1434,10 @@ void SwTextFormatInfo::Init() m_bNoMidHyph = m_bStop = m_bNewLine = m_bUnderflow = m_bTabOverflow = false; // generally we do not allow number portions in follows, except... - if ( GetTextFrm()->IsFollow() ) + if ( GetTextFrame()->IsFollow() ) { - const SwTextFrm* pMaster = GetTextFrm()->FindMaster(); - OSL_ENSURE(pMaster, "pTextFrm without Master"); + const SwTextFrame* pMaster = GetTextFrame()->FindMaster(); + OSL_ENSURE(pMaster, "pTextFrame without Master"); const SwLinePortion* pTmpPara = pMaster ? pMaster->GetPara() : nullptr; // there is a master for this follow and the master does not have @@ -1463,7 +1463,7 @@ void SwTextFormatInfo::Init() SetPaintOfst(0); } -SwTextFormatInfo::SwTextFormatInfo(OutputDevice* pRenderContext, SwTextFrm *pFrame, const bool bInterHyphL, +SwTextFormatInfo::SwTextFormatInfo(OutputDevice* pRenderContext, SwTextFrame *pFrame, const bool bInterHyphL, const bool bQuickL, const bool bTst) { CtorInitTextFormatInfo(pRenderContext, pFrame, bInterHyphL, bQuickL, bTst); @@ -1559,7 +1559,7 @@ sal_Int32 SwTextFormatInfo::ScanPortionEnd( const sal_Int32 nStart, const sal_Unicode cThousandSep2 = ',' == cTabDec ? '.' : '\''; bool bNumFound = false; - const bool bTabCompat = GetTextFrm()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT); + const bool bTabCompat = GetTextFrame()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT); for( ; i < nEnd; ++i ) { diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx index de1a8cd94f97..e1f36662845b 100644 --- a/sw/source/core/text/inftxt.hxx +++ b/sw/source/core/text/inftxt.hxx @@ -47,7 +47,7 @@ class SwLineLayout; class SwLinePortion; class SwParaPortion; class SwTabPortion; -class SwTextFrm; +class SwTextFrame; class SwTextSizeInfo; class SwViewOption; class SwViewShell; @@ -128,9 +128,9 @@ protected: {} public: - void CtorInitTextInfo( SwTextFrm *pFrm ); + void CtorInitTextInfo( SwTextFrame *pFrame ); SwTextInfo( const SwTextInfo &rInf ); - explicit SwTextInfo( SwTextFrm *pFrm ) { CtorInitTextInfo( pFrm ); } + explicit SwTextInfo( SwTextFrame *pFrame ) { CtorInitTextInfo( pFrame ); } SwParaPortion *GetParaPortion() { return m_pPara; } const SwParaPortion *GetParaPortion() const { return m_pPara; } sal_Int32 GetTextStart() const { return m_nTextStart; } @@ -162,7 +162,7 @@ protected: SwFont *m_pFnt; SwUnderlineFont *m_pUnderFnt; // Font for underlining - SwTextFrm *m_pFrm; + SwTextFrame *m_pFrame; const SwViewOption *m_pOpt; const OUString *m_pText; sal_Int32 m_nIdx, m_nLen; @@ -187,7 +187,7 @@ protected: sal_uInt8 m_nDirection : 2; // writing direction: 0/90/180/270 degree protected: - void CtorInitTextSizeInfo( OutputDevice* pRenderContext, SwTextFrm *pFrm, SwFont *pFnt = nullptr, + void CtorInitTextSizeInfo( OutputDevice* pRenderContext, SwTextFrame *pFrame, SwFont *pFnt = nullptr, const sal_Int32 nIdx = 0, const sal_Int32 nLen = COMPLETE_STRING ); SwTextSizeInfo(); @@ -197,7 +197,7 @@ public: const sal_Int32 nIdx = 0, const sal_Int32 nLen = COMPLETE_STRING ); - SwTextSizeInfo( SwTextFrm *pTextFrm, SwFont *pTextFnt = nullptr, + SwTextSizeInfo( SwTextFrame *pTextFrame, SwFont *pTextFnt = nullptr, const sal_Int32 nIndex = 0, const sal_Int32 nLength = COMPLETE_STRING ); @@ -296,11 +296,11 @@ public: void NoteAnimation() const; // Home is where Your heart is... - inline SwTextFrm *GetTextFrm() { return m_pFrm; } - inline const SwTextFrm *GetTextFrm() const { return m_pFrm; } + inline SwTextFrame *GetTextFrame() { return m_pFrame; } + inline const SwTextFrame *GetTextFrame() const { return m_pFrame; } inline bool HasHint( sal_Int32 nPos ) const - { return _HasHint( m_pFrm->GetTextNode(), nPos ); } + { return _HasHint( m_pFrame->GetTextNode(), nPos ); } static bool _HasHint( const SwTextNode* pTextNode, sal_Int32 nPos ); // If Kana Compression is enabled, a minimum and maximum portion width @@ -360,7 +360,7 @@ class SwTextPaintInfo : public SwTextSizeInfo std::vector<long>* pSpaceAdd; const SvxBrushItem *pBrushItem; // For the background SwRect aItemRect; // Also for the background - SwTextFly aTextFly; // Calculate the FlyFrm + SwTextFly aTextFly; // Calculate the FlyFrame Point aPos; // Paint position SwRect aPaintRect; // Original paint rect (from Layout paint) @@ -392,12 +392,12 @@ public: SwTextPaintInfo( const SwTextPaintInfo &rInf ); SwTextPaintInfo( const SwTextPaintInfo &rInf, const OUString* pText ); - void CtorInitTextPaintInfo( OutputDevice* pRenderContext, SwTextFrm *pFrame, const SwRect &rPaint ); + void CtorInitTextPaintInfo( OutputDevice* pRenderContext, SwTextFrame *pFrame, const SwRect &rPaint ); const SvxBrushItem *GetBrushItem() const { return pBrushItem; } const SwRect &GetBrushRect() const { return aItemRect; } - SwTextPaintInfo( SwTextFrm *pFrame, const SwRect &rPaint ); + SwTextPaintInfo( SwTextFrame *pFrame, const SwRect &rPaint ); inline SwTwips X() const { return aPos.X(); } inline void X( const long nNew ) { aPos.X() = nNew; } @@ -545,9 +545,9 @@ class SwTextFormatInfo : public SwTextPaintInfo bool _CheckFootnotePortion( SwLineLayout* pCurr ); public: - void CtorInitTextFormatInfo( OutputDevice* pRenderContext, SwTextFrm *pFrm, const bool bInterHyph = false, + void CtorInitTextFormatInfo( OutputDevice* pRenderContext, SwTextFrame *pFrame, const bool bInterHyph = false, const bool bQuick = false, const bool bTst = false ); - SwTextFormatInfo(OutputDevice* pRenderContext, SwTextFrm *pFrame, const bool bInterHyphL = false, + SwTextFormatInfo(OutputDevice* pRenderContext, SwTextFrame *pFrame, const bool bInterHyphL = false, const bool bQuickL = false, const bool bTst = false); // For the formatting inside a double line in a line (multi-line portion) @@ -628,7 +628,7 @@ public: inline void SetParaFootnote(); - // FlyFrms + // FlyFrames inline SwFlyPortion *GetFly() { return m_pFly; } inline void SetFly( SwFlyPortion *pNew ) { m_pFly = pNew; } @@ -792,12 +792,12 @@ inline sal_Int32 SwTextFormatInfo::GetReformatStart() const inline const SwAttrSet& SwTextFormatInfo::GetCharAttr() const { - return GetTextFrm()->GetTextNode()->GetSwAttrSet(); + return GetTextFrame()->GetTextNode()->GetSwAttrSet(); } inline void SwTextFormatInfo::SetParaFootnote() { - GetTextFrm()->SetFootnote( true ); + GetTextFrame()->SetFootnote( true ); } #endif diff --git a/sw/source/core/text/itradj.cxx b/sw/source/core/text/itradj.cxx index c0670bd09e28..0f677ac9664e 100644 --- a/sw/source/core/text/itradj.cxx +++ b/sw/source/core/text/itradj.cxx @@ -258,8 +258,8 @@ void SwTextAdjuster::CalcNewBlock( SwLineLayout *pCurrent, // i60591: hennerdrews SwScriptInfo& rSI = GetInfo().GetParaPortion()->GetScriptInfo(); - SwTextSizeInfo aInf ( GetTextFrm() ); - SwTextIter aItr ( GetTextFrm(), &aInf ); + SwTextSizeInfo aInf ( GetTextFrame() ); + SwTextIter aItr ( GetTextFrame(), &aInf ); if ( rSI.CountKashida() ) { @@ -283,7 +283,7 @@ void SwTextAdjuster::CalcNewBlock( SwLineLayout *pCurrent, // #i49277# const bool bDoNotJustifyLinesWithManualBreak = - GetTextFrm()->GetNode()->getIDocumentSettingAccess()->get(DocumentSettingId::DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK); + GetTextFrame()->GetNode()->getIDocumentSettingAccess()->get(DocumentSettingId::DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK); SwLinePortion *pPos = pCurrent->GetPortion(); @@ -539,7 +539,7 @@ SwMarginPortion *SwTextAdjuster::CalcRightMargin( SwLineLayout *pCurrent, else { nRealWidth = GetLineWidth(); - // For each FlyFrm extending into the right margin, we create a FlyPortion. + // For each FlyFrame extending into the right margin, we create a FlyPortion. const long nLeftMar = GetLeftMargin(); SwRect aCurrRect( nLeftMar + nPrtWidth, Y() + nRealHeight - nLineHeight, nRealWidth - nPrtWidth, nLineHeight ); @@ -582,7 +582,7 @@ void SwTextAdjuster::CalcFlyAdjust( SwLineLayout *pCurrent ) SwGluePortion *pGlue = pLeft; // the last GluePortion // 2) We attach a right margin: - // CalcRightMargin also calculates a possible overlap with FlyFrms. + // CalcRightMargin also calculates a possible overlap with FlyFrames. CalcRightMargin( pCurrent ); SwLinePortion *pPos = pLeft->GetPortion(); @@ -590,7 +590,7 @@ void SwTextAdjuster::CalcFlyAdjust( SwLineLayout *pCurrent ) // If we only have one line, the text portion is consecutive and we center, then ... bool bComplete = 0 == m_nStart; - const bool bTabCompat = GetTextFrm()->GetNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT); + const bool bTabCompat = GetTextFrame()->GetNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT); bool bMultiTab = false; while( pPos ) @@ -683,24 +683,24 @@ void SwTextAdjuster::CalcAdjLine( SwLineLayout *pCurrent ) SwFlyPortion *SwTextAdjuster::CalcFlyPortion( const long nRealWidth, const SwRect &rCurrRect ) { - SwTextFly aTextFly( GetTextFrm() ); + SwTextFly aTextFly( GetTextFrame() ); const sal_uInt16 nCurrWidth = m_pCurr->PrtWidth(); SwFlyPortion *pFlyPortion = nullptr; SwRect aLineVert( rCurrRect ); - if ( GetTextFrm()->IsRightToLeft() ) - GetTextFrm()->SwitchLTRtoRTL( aLineVert ); - if ( GetTextFrm()->IsVertical() ) - GetTextFrm()->SwitchHorizontalToVertical( aLineVert ); + if ( GetTextFrame()->IsRightToLeft() ) + GetTextFrame()->SwitchLTRtoRTL( aLineVert ); + if ( GetTextFrame()->IsVertical() ) + GetTextFrame()->SwitchHorizontalToVertical( aLineVert ); // aFlyRect is document-global! - SwRect aFlyRect( aTextFly.GetFrm( aLineVert ) ); + SwRect aFlyRect( aTextFly.GetFrame( aLineVert ) ); - if ( GetTextFrm()->IsRightToLeft() ) - GetTextFrm()->SwitchRTLtoLTR( aFlyRect ); - if ( GetTextFrm()->IsVertical() ) - GetTextFrm()->SwitchVerticalToHorizontal( aFlyRect ); + if ( GetTextFrame()->IsRightToLeft() ) + GetTextFrame()->SwitchRTLtoLTR( aFlyRect ); + if ( GetTextFrame()->IsVertical() ) + GetTextFrame()->SwitchVerticalToHorizontal( aFlyRect ); // If a Frame overlapps we open a Portion if( aFlyRect.HasArea() ) diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx index 56adbd5a3e8f..03f80de1164c 100644 --- a/sw/source/core/text/itratr.cxx +++ b/sw/source/core/text/itratr.cxx @@ -489,7 +489,7 @@ static void lcl_MinMaxNode( SwFrameFormat* pNd, SwMinMaxNodeArgs* pIn ) } else { - const SwFormatFrmSize &rSz = pNd->GetFrmSize(); + const SwFormatFrameSize &rSz = pNd->GetFrameSize(); nMin = rSz.GetWidth(); } nMax = nMin; @@ -702,7 +702,7 @@ void SwTextNode::GetMinMaxSize( sal_uLong nIndex, sal_uLong& rMin, sal_uLong &rM } else { - const SwFormatFrmSize& rTmpSize = pFrameFormat->GetFrmSize(); + const SwFormatFrameSize& rTmpSize = pFrameFormat->GetFrameSize(); if( RES_FLYFRMFMT == pFrameFormat->Which() && rTmpSize.GetWidthPercent() ) { @@ -716,7 +716,7 @@ void SwTextNode::GetMinMaxSize( sal_uLong nIndex, sal_uLong& rMin, sal_uLong &rM rMax = USHRT_MAX; } else - nAktWidth = pFrameFormat->GetFrmSize().GetWidth(); + nAktWidth = pFrameFormat->GetFrameSize().GetWidth(); } nAktWidth += rLR.GetLeft(); nAktWidth += rLR.GetRight(); @@ -958,24 +958,24 @@ sal_uInt16 SwTextNode::GetScalingOfSelectedText( sal_Int32 nStt, sal_Int32 nEnd nWidth = std::max( nWidth, nProWidth ); // search for a text frame this node belongs to - SwIterator<SwTextFrm,SwTextNode> aFrmIter( *this ); - SwTextFrm* pFrm = nullptr; - for( SwTextFrm* pTmpFrm = aFrmIter.First(); pTmpFrm; pTmpFrm = aFrmIter.Next() ) + SwIterator<SwTextFrame,SwTextNode> aFrameIter( *this ); + SwTextFrame* pFrame = nullptr; + for( SwTextFrame* pTmpFrame = aFrameIter.First(); pTmpFrame; pTmpFrame = aFrameIter.Next() ) { - if ( pTmpFrm->GetOfst() <= nStt && - ( !pTmpFrm->GetFollow() || - pTmpFrm->GetFollow()->GetOfst() > nStt ) ) + if ( pTmpFrame->GetOfst() <= nStt && + ( !pTmpFrame->GetFollow() || + pTmpFrame->GetFollow()->GetOfst() > nStt ) ) { - pFrm = pTmpFrm; + pFrame = pTmpFrame; break; } } // search for the line containing nStt - if ( pFrm && pFrm->HasPara() ) + if ( pFrame && pFrame->HasPara() ) { - SwTextInfo aInf( pFrm ); - SwTextIter aLine( pFrm, &aInf ); + SwTextInfo aInf( pFrame ); + SwTextIter aLine( pFrame, &aInf ); aLine.CharToLine( nStt ); pOut->SetMapMode( aOldMap ); return (sal_uInt16)( nWidth ? @@ -1014,18 +1014,18 @@ SwTwips SwTextNode::GetWidthOfLeadingTabs() const aPos.nContent += nIdx; // Find the non-follow text frame: - SwIterator<SwTextFrm,SwTextNode> aIter( *this ); - for( SwTextFrm* pFrm = aIter.First(); pFrm; pFrm = aIter.Next() ) + SwIterator<SwTextFrame,SwTextNode> aIter( *this ); + for( SwTextFrame* pFrame = aIter.First(); pFrame; pFrame = aIter.Next() ) { // Only consider master frames: - if ( !pFrm->IsFollow() ) + if ( !pFrame->IsFollow() ) { - SWRECTFN( pFrm ) + SWRECTFN( pFrame ) SwRect aRect; - pFrm->GetCharRect( aRect, aPos ); - nRet = pFrm->IsRightToLeft() ? - (pFrm->*fnRect->fnGetPrtRight)() - (aRect.*fnRect->fnGetRight)() : - (aRect.*fnRect->fnGetLeft)() - (pFrm->*fnRect->fnGetPrtLeft)(); + pFrame->GetCharRect( aRect, aPos ); + nRet = pFrame->IsRightToLeft() ? + (pFrame->*fnRect->fnGetPrtRight)() - (aRect.*fnRect->fnGetRight)() : + (aRect.*fnRect->fnGetLeft)() - (pFrame->*fnRect->fnGetPrtLeft)(); break; } } diff --git a/sw/source/core/text/itratr.hxx b/sw/source/core/text/itratr.hxx index fa6136cf2747..4687039b3e54 100644 --- a/sw/source/core/text/itratr.hxx +++ b/sw/source/core/text/itratr.hxx @@ -32,7 +32,7 @@ class SwAttrSet; class SwTextNode; class SwRedlineItr; class SwViewShell; -class SwTextFrm; +class SwTextFrame; class SwAttrIter { @@ -64,7 +64,7 @@ private: protected: void Chg( SwTextAttr *pHt ); void Rst( SwTextAttr *pHt ); - void CtorInitAttrIter( SwTextNode& rTextNode, SwScriptInfo& rScrInf, SwTextFrm* pFrm = nullptr ); + void CtorInitAttrIter( SwTextNode& rTextNode, SwScriptInfo& rScrInf, SwTextFrame* pFrame = nullptr ); explicit SwAttrIter(SwTextNode* pTextNode) : pShell(nullptr) , pFnt(nullptr) diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx index 2b2a42562f20..79f2e1e79c9e 100644 --- a/sw/source/core/text/itrcrsr.cxx +++ b/sw/source/core/text/itrcrsr.cxx @@ -56,7 +56,7 @@ bool SwTextCursor::bRightMargin = false; // this function allows to find the coordinates of a position (defined // in pCMS->pSpecialPos) inside a special portion (e.g., a field) static void lcl_GetCharRectInsideField( SwTextSizeInfo& rInf, SwRect& rOrig, - const SwCrsrMoveState& rCMS, + const SwCursorMoveState& rCMS, const SwLinePortion& rPor ) { OSL_ENSURE( rCMS.m_pSpecialPos, "Information about special pos missing" ); @@ -158,19 +158,19 @@ namespace { } } // end of anonymous namespace -void SwTextMargin::CtorInitTextMargin( SwTextFrm *pNewFrm, SwTextSizeInfo *pNewInf ) +void SwTextMargin::CtorInitTextMargin( SwTextFrame *pNewFrame, SwTextSizeInfo *pNewInf ) { - CtorInitTextIter( pNewFrm, pNewInf ); + CtorInitTextIter( pNewFrame, pNewInf ); m_pInf = pNewInf; GetInfo().SetFont( GetFnt() ); - const SwTextNode *pNode = m_pFrm->GetTextNode(); + const SwTextNode *pNode = m_pFrame->GetTextNode(); - const SvxLRSpaceItem &rSpace = m_pFrm->GetTextNode()->GetSwAttrSet().GetLRSpace(); + const SvxLRSpaceItem &rSpace = m_pFrame->GetTextNode()->GetSwAttrSet().GetLRSpace(); // #i95907# // #i111284# const bool bListLevelIndentsApplicableAndLabelAlignmentActive( - AreListLevelIndentsApplicableAndLabelAlignmentActive( *(m_pFrm->GetTextNode()) ) ); + AreListLevelIndentsApplicableAndLabelAlignmentActive( *(m_pFrame->GetTextNode()) ) ); // Carefully adjust the text formatting ranges. @@ -184,11 +184,11 @@ void SwTextMargin::CtorInitTextMargin( SwTextFrm *pNewFrm, SwTextSizeInfo *pNewI // Note: These values have already been used during calculation // of the printing area of the paragraph. const int nLMWithNum = pNode->GetLeftMarginWithNum( true ); - if ( m_pFrm->IsRightToLeft() ) + if ( m_pFrame->IsRightToLeft() ) { // this calculation is identical this the calculation for L2R layout - see below - nLeft = m_pFrm->Frm().Left() + - m_pFrm->Prt().Left() + + nLeft = m_pFrame->Frame().Left() + + m_pFrame->Prt().Left() + nLMWithNum - pNode->GetLeftMarginWithNum() - // #i95907# @@ -206,8 +206,8 @@ void SwTextMargin::CtorInitTextMargin( SwTextFrm *pNewFrm, SwTextSizeInfo *pNewI !pNode->getIDocumentSettingAccess()->get(DocumentSettingId::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING) ) { // this calculation is identical this the calculation for R2L layout - see above - nLeft = m_pFrm->Frm().Left() + - m_pFrm->Prt().Left() + + nLeft = m_pFrame->Frame().Left() + + m_pFrame->Prt().Left() + nLMWithNum - pNode->GetLeftMarginWithNum() - // #i95907# @@ -218,27 +218,27 @@ void SwTextMargin::CtorInitTextMargin( SwTextFrm *pNewFrm, SwTextSizeInfo *pNewI } else { - nLeft = m_pFrm->Frm().Left() + + nLeft = m_pFrame->Frame().Left() + std::max( long( rSpace.GetTextLeft() + nLMWithNum ), - m_pFrm->Prt().Left() ); + m_pFrame->Prt().Left() ); } } - nRight = m_pFrm->Frm().Left() + m_pFrm->Prt().Left() + m_pFrm->Prt().Width(); + nRight = m_pFrame->Frame().Left() + m_pFrame->Prt().Left() + m_pFrame->Prt().Width(); if( nLeft >= nRight && // #i53066# Omit adjustment of nLeft for numbered // paras inside cells inside new documents: ( pNode->getIDocumentSettingAccess()->get(DocumentSettingId::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING) || - !m_pFrm->IsInTab() || + !m_pFrame->IsInTab() || !nLMWithNum ) ) { - nLeft = m_pFrm->Prt().Left() + m_pFrm->Frm().Left(); + nLeft = m_pFrame->Prt().Left() + m_pFrame->Frame().Left(); if( nLeft >= nRight ) // e.g. with large paragraph indentations in slim table columns nRight = nLeft + 1; // einen goennen wir uns immer } - if( m_pFrm->IsFollow() && m_pFrm->GetOfst() ) + if( m_pFrame->IsFollow() && m_pFrame->GetOfst() ) nFirst = nLeft; else { @@ -303,7 +303,7 @@ void SwTextMargin::CtorInitTextMargin( SwTextFrm *pNewFrm, SwTextSizeInfo *pNewI // #i95907# // #i111284# - if ( m_pFrm->IsRightToLeft() || + if ( m_pFrame->IsRightToLeft() || bListLevelIndentsApplicableAndLabelAlignmentActive || !pNode->getIDocumentSettingAccess()->get(DocumentSettingId::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING) ) { @@ -311,25 +311,25 @@ void SwTextMargin::CtorInitTextMargin( SwTextFrm *pNewFrm, SwTextSizeInfo *pNewI } else { - nFirst = m_pFrm->Frm().Left() + + nFirst = m_pFrame->Frame().Left() + std::max( rSpace.GetTextLeft() + nLMWithNum+ nFirstLineOfs, - m_pFrm->Prt().Left() ); + m_pFrame->Prt().Left() ); } - // Note: <SwTextFrm::GetAdditionalFirstLineOffset()> returns a negative + // Note: <SwTextFrame::GetAdditionalFirstLineOffset()> returns a negative // value for the new list label position and space mode LABEL_ALIGNMENT // and label alignment CENTER and RIGHT in L2R layout respectively // label alignment LEFT and CENTER in R2L layout - nFirst += m_pFrm->GetAdditionalFirstLineOffset(); + nFirst += m_pFrame->GetAdditionalFirstLineOffset(); if( nFirst >= nRight ) nFirst = nRight - 1; } - const SvxAdjustItem& rAdjust = m_pFrm->GetTextNode()->GetSwAttrSet().GetAdjust(); + const SvxAdjustItem& rAdjust = m_pFrame->GetTextNode()->GetSwAttrSet().GetAdjust(); nAdjust = static_cast<sal_uInt16>(rAdjust.GetAdjust()); // left is left and right is right - if ( m_pFrm->IsRightToLeft() ) + if ( m_pFrame->IsRightToLeft() ) { if ( SVX_ADJUST_LEFT == nAdjust ) nAdjust = SVX_ADJUST_RIGHT; @@ -389,20 +389,20 @@ SwTwips SwTextMargin::GetLineStart() const return nRet; } -void SwTextCursor::CtorInitTextCursor( SwTextFrm *pNewFrm, SwTextSizeInfo *pNewInf ) +void SwTextCursor::CtorInitTextCursor( SwTextFrame *pNewFrame, SwTextSizeInfo *pNewInf ) { - CtorInitTextMargin( pNewFrm, pNewInf ); + CtorInitTextMargin( pNewFrame, pNewInf ); // 6096: Attention, the iterators are derived! // GetInfo().SetOut( GetInfo().GetWin() ); } // 1170: Ancient bug: Shift-End forgets the last character ... bool SwTextCursor::GetEndCharRect( SwRect* pOrig, const sal_Int32 nOfst, - SwCrsrMoveState* pCMS, const long nMax ) + SwCursorMoveState* pCMS, const long nMax ) { // 1170: Ambiguity of document positions bRightMargin = true; - CharCrsrToLine(nOfst); + CharCursorToLine(nOfst); // Somehow twisted: nOfst names the position behind the last // character of the last line == This is the position in front of the first character @@ -472,7 +472,7 @@ bool SwTextCursor::GetEndCharRect( SwRect* pOrig, const sal_Int32 nOfst, // heights in one line ( first value = offset to y of pOrig, second // value = real height of (shortened) cursor void SwTextCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst, - SwCrsrMoveState* pCMS ) + SwCursorMoveState* pCMS ) { const OUString aText = GetInfo().GetText(); SwTextSizeInfo aInf( GetInfo(), &aText, m_nStart ); @@ -719,7 +719,7 @@ void SwTextCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst, SetPropFont( 50 ); SwTextGridItem const*const pGrid( - GetGridItem(GetTextFrm()->FindPageFrm())); + GetGridItem(GetTextFrame()->FindPageFrame())); const bool bHasGrid = pGrid && GetInfo().SnapToGrid(); const sal_uInt16 nRubyHeight = bHasGrid ? pGrid->GetRubyHeight() : 0; @@ -1170,9 +1170,9 @@ void SwTextCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst, } bool SwTextCursor::GetCharRect( SwRect* pOrig, const sal_Int32 nOfst, - SwCrsrMoveState* pCMS, const long nMax ) + SwCursorMoveState* pCMS, const long nMax ) { - CharCrsrToLine(nOfst); + CharCursorToLine(nOfst); // Indicates that a position inside a special portion (field, number portion) // is requested. @@ -1218,7 +1218,7 @@ bool SwTextCursor::GetCharRect( SwRect* pOrig, const sal_Int32 nOfst, pCMS->m_p2Lines->aPortion.Pos().Y() += aCharPos.Y(); } - const bool bTabOverMargin = GetTextFrm()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_OVER_MARGIN); + const bool bTabOverMargin = GetTextFrame()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_OVER_MARGIN); // Make sure the cursor respects the right margin, unless in compat mode, where the tab size has priority over the margin size. if( pOrig->Left() > nTmpRight && !bTabOverMargin) pOrig->Pos().X() = nTmpRight; @@ -1243,13 +1243,13 @@ bool SwTextCursor::GetCharRect( SwRect* pOrig, const sal_Int32 nOfst, pCMS->m_aRealHeight.Y() = nMax - nTmp; } } - long nOut = pOrig->Right() - GetTextFrm()->Frm().Right(); + long nOut = pOrig->Right() - GetTextFrame()->Frame().Right(); if( nOut > 0 ) { - if( GetTextFrm()->Frm().Width() < GetTextFrm()->Prt().Left() - + GetTextFrm()->Prt().Width() ) - nOut += GetTextFrm()->Frm().Width() - GetTextFrm()->Prt().Left() - - GetTextFrm()->Prt().Width(); + if( GetTextFrame()->Frame().Width() < GetTextFrame()->Prt().Left() + + GetTextFrame()->Prt().Width() ) + nOut += GetTextFrame()->Frame().Width() - GetTextFrame()->Prt().Left() + - GetTextFrame()->Prt().Width(); if( nOut > 0 ) pOrig->Pos().X() -= nOut + 10; } @@ -1258,8 +1258,8 @@ bool SwTextCursor::GetCharRect( SwRect* pOrig, const sal_Int32 nOfst, } // Return: Offset in String -sal_Int32 SwTextCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint, - bool bChgNode, SwCrsrMoveState* pCMS ) const +sal_Int32 SwTextCursor::GetCursorOfst( SwPosition *pPos, const Point &rPoint, + bool bChgNode, SwCursorMoveState* pCMS ) const { // If necessary, as catch up, do the adjustment GetAdjusted(); @@ -1414,7 +1414,7 @@ sal_Int32 SwTextCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint, if( bFieldInfo && ( nWidth30 < nX || bRightOver || bLeftOver || ( pPor->InNumberGrp() && !pPor->IsFootnoteNumPortion() ) || ( pPor->IsMarginPortion() && nWidth > nX + 30 ) ) ) - static_cast<SwCrsrMoveState*>(pCMS)->m_bPosCorr = true; + static_cast<SwCursorMoveState*>(pCMS)->m_bPosCorr = true; // #i27615# if (pCMS) @@ -1435,16 +1435,16 @@ sal_Int32 SwTextCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint, if( pCMS ) { if( pPor->IsFlyPortion() && bFieldInfo ) - static_cast<SwCrsrMoveState*>(pCMS)->m_bPosCorr = true; + static_cast<SwCursorMoveState*>(pCMS)->m_bPosCorr = true; if (!bRightOver && nX) { if( pPor->IsFootnoteNumPortion()) - static_cast<SwCrsrMoveState*>(pCMS)->m_bFootnoteNoInfo = true; + static_cast<SwCursorMoveState*>(pCMS)->m_bFootnoteNoInfo = true; else if (pPor->InNumberGrp() ) // #i23726# { - static_cast<SwCrsrMoveState*>(pCMS)->m_nInNumPostionOffset = nX; - static_cast<SwCrsrMoveState*>(pCMS)->m_bInNumPortion = true; + static_cast<SwCursorMoveState*>(pCMS)->m_nInNumPostionOffset = nX; + static_cast<SwCursorMoveState*>(pCMS)->m_bInNumPortion = true; } } } @@ -1528,7 +1528,7 @@ sal_Int32 SwTextCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint, } // Skip space at the end of the line - if( bLastPortion && (m_pCurr->GetNext() || m_pFrm->GetFollow() ) + if( bLastPortion && (m_pCurr->GetNext() || m_pFrame->GetFollow() ) && rText[nCurrStart + nLength - 1] == ' ' ) --nLength; @@ -1537,7 +1537,7 @@ sal_Int32 SwTextCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint, { if( pPor->IsMultiPortion() ) { - // In a multi-portion we use GetCrsrOfst()-function recursively + // In a multi-portion we use GetCursorOfst()-function recursively SwTwips nTmpY = rPoint.Y() - m_pCurr->GetAscent() + pPor->GetAscent(); // if we are in the first line of a double line portion, we have // to add a value to nTmpY for not staying in this line @@ -1584,7 +1584,7 @@ sal_Int32 SwTextCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint, nX = 0; } - return GetCrsrOfst( pPos, Point( GetLineStart() + nX, rPoint.Y() ), + return GetCursorOfst( pPos, Point( GetLineStart() + nX, rPoint.Y() ), bChgNode, pCMS ); } if( pPor->InTextGrp() ) @@ -1661,7 +1661,7 @@ sal_Int32 SwTextCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint, aDrawInf.SetSpace( nSpaceAdd ); aDrawInf.SetFont( aSizeInf.GetFont() ); - aDrawInf.SetFrm( m_pFrm ); + aDrawInf.SetFrame( m_pFrame ); aDrawInf.SetSnapToGrid( aSizeInf.SnapToGrid() ); aDrawInf.SetPosMatchesBounds( pCMS && pCMS->m_bPosMatchesBounds ); @@ -1670,7 +1670,7 @@ sal_Int32 SwTextCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint, ! pPor->InFieldGrp() ) aDrawInf.SetKanaComp( nKanaComp ); - nLength = aSizeInf.GetFont()->_GetCrsrOfst( aDrawInf ); + nLength = aSizeInf.GetFont()->_GetCursorOfst( aDrawInf ); // get position inside field portion? if ( pPor->InFieldGrp() && pCMS && pCMS->m_pSpecialPos ) @@ -1681,7 +1681,7 @@ sal_Int32 SwTextCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint, // set cursor bidi level if ( pCMS ) - static_cast<SwCrsrMoveState*>(pCMS)->m_nCursorBidiLevel = + static_cast<SwCursorMoveState*>(pCMS)->m_nCursorBidiLevel = aDrawInf.GetCursorBidiLevel(); if( bFieldInfo && nLength == pPor->GetLen() && @@ -1700,42 +1700,42 @@ sal_Int32 SwTextCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint, // JP 24.11.94: if the Position is not in Fly, then // we many not return with COMPLETE_STRING as value! // (BugId: 9692 + Change in feshview) - SwFlyInCntFrm *pTmp = static_cast<SwFlyCntPortion*>(pPor)->GetFlyFrm(); - SwFrm* pLower = pTmp->GetLower(); + SwFlyInContentFrame *pTmp = static_cast<SwFlyCntPortion*>(pPor)->GetFlyFrame(); + SwFrame* pLower = pTmp->GetLower(); bool bChgNodeInner = pLower - && (pLower->IsTextFrm() || pLower->IsLayoutFrm()); + && (pLower->IsTextFrame() || pLower->IsLayoutFrame()); Point aTmpPoint( rPoint ); - if ( m_pFrm->IsRightToLeft() ) - m_pFrm->SwitchLTRtoRTL( aTmpPoint ); + if ( m_pFrame->IsRightToLeft() ) + m_pFrame->SwitchLTRtoRTL( aTmpPoint ); - if ( m_pFrm->IsVertical() ) - m_pFrm->SwitchHorizontalToVertical( aTmpPoint ); + if ( m_pFrame->IsVertical() ) + m_pFrame->SwitchHorizontalToVertical( aTmpPoint ); - if( bChgNodeInner && pTmp->Frm().IsInside( aTmpPoint ) && + if( bChgNodeInner && pTmp->Frame().IsInside( aTmpPoint ) && !( pTmp->IsProtected() ) ) { nLength = static_cast<SwFlyCntPortion*>(pPor)-> - GetFlyCrsrOfst( nX, aTmpPoint, pPos, pCMS ); + GetFlyCursorOfst( nX, aTmpPoint, pPos, pCMS ); // After a change of the frame, our font must be still // available for/in the OutputDevice. // For comparison: Paint and new SwFlyCntPortion ! static_cast<SwTextSizeInfo*>(m_pInf)->SelectFont(); - // 6776: The pIter->GetCrsrOfst is returning here + // 6776: The pIter->GetCursorOfst is returning here // from a nesting with COMPLETE_STRING. return COMPLETE_STRING; } } else - nLength = pPor->GetCrsrOfst( nX ); + nLength = pPor->GetCursorOfst( nX ); } } nOffset = nCurrStart + nLength; // 7684: We end up in front of the HyphPortion. We must assure // that we end up in the string. - // If we are at end of line in front of FlyFrms, we must proceed the same way. + // If we are at end of line in front of FlyFrames, we must proceed the same way. if( nOffset && pPor->GetLen() == nLength && pPor->GetPortion() && !pPor->GetPortion()->GetLen() && pPor->GetPortion()->InHyphGrp() ) --nOffset; @@ -1760,16 +1760,16 @@ sal_Int32 SwTextCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint, true if any overlapping text portion has been found and put into list false if no portion overlaps, the list has been unchanged */ -bool SwTextFrm::FillSelection( SwSelectionList& rSelList, const SwRect& rRect ) const +bool SwTextFrame::FillSelection( SwSelectionList& rSelList, const SwRect& rRect ) const { bool bRet = false; - // PaintArea() instead Frm() for negative indents - SwRect aTmpFrm( PaintArea() ); - if( !rRect.IsOver( aTmpFrm ) ) + // PaintArea() instead Frame() for negative indents + SwRect aTmpFrame( PaintArea() ); + if( !rRect.IsOver( aTmpFrame ) ) return false; if( rSelList.checkContext( this ) ) { - SwRect aRect( aTmpFrm ); + SwRect aRect( aTmpFrame ); aRect.Intersection( rRect ); // rNode without const to create SwPaMs SwContentNode &rNode = const_cast<SwContentNode&>( *GetNode() ); @@ -1785,8 +1785,8 @@ bool SwTextFrm::FillSelection( SwSelectionList& rSelList, const SwRect& rRect ) sal_Int32 nOld = -1; SwPosition aPosR( aPosL ); Point aPoint; - SwTextInfo aInf( const_cast<SwTextFrm*>(this) ); - SwTextIter aLine( const_cast<SwTextFrm*>(this), &aInf ); + SwTextInfo aInf( const_cast<SwTextFrame*>(this) ); + SwTextIter aLine( const_cast<SwTextFrame*>(this), &aInf ); // We have to care for top-to-bottom layout, where right becomes top etc. SWRECTFN( this ) SwTwips nTop = (aRect.*fnRect->fnGetTop)(); @@ -1828,8 +1828,8 @@ bool SwTextFrm::FillSelection( SwSelectionList& rSelList, const SwRect& rRect ) } // Looking for the position of the left border of the rectangle // in this text line - SwCrsrMoveState aState( MV_UPDOWN ); - if( GetCrsrOfst( &aPosL, aPoint, &aState ) ) + SwCursorMoveState aState( MV_UPDOWN ); + if( GetCursorOfst( &aPosL, aPoint, &aState ) ) { if( bVert ) { @@ -1845,7 +1845,7 @@ bool SwTextFrm::FillSelection( SwSelectionList& rSelList, const SwRect& rRect ) // is not the same like the left position of the line before // which cound happen e.g. for field portions or fly frames // a SwPaM will be inserted with these positions - if( GetCrsrOfst( &aPosR, aPoint, &aState ) && + if( GetCursorOfst( &aPosR, aPoint, &aState ) && nOld != aPosL.nContent.GetIndex() ) { SwPaM *pPam = new SwPaM( aPosL, aPosR ); @@ -1876,10 +1876,10 @@ bool SwTextFrm::FillSelection( SwSelectionList& rSelList, const SwRect& rRect ) for ( size_t i = 0; i < rObjs.size(); ++i ) { const SwAnchoredObject* pAnchoredObj = rObjs[i]; - if( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) == nullptr ) + if( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) == nullptr ) continue; - const SwFlyFrm* pFly = static_cast<const SwFlyFrm*>(pAnchoredObj); - if( pFly->IsFlyInCntFrm() && pFly->FillSelection( rSelList, rRect ) ) + const SwFlyFrame* pFly = static_cast<const SwFlyFrame*>(pAnchoredObj); + if( pFly->IsFlyInContentFrame() && pFly->FillSelection( rSelList, rRect ) ) bRet = true; } } diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx index 579344450ac3..f23245979ba0 100644 --- a/sw/source/core/text/itrform2.cxx +++ b/sw/source/core/text/itrform2.cxx @@ -87,9 +87,9 @@ inline void ClearFly( SwTextFormatInfo &rInf ) rInf.SetFly(nullptr); } -void SwTextFormatter::CtorInitTextFormatter( SwTextFrm *pNewFrm, SwTextFormatInfo *pNewInf ) +void SwTextFormatter::CtorInitTextFormatter( SwTextFrame *pNewFrame, SwTextFormatInfo *pNewInf ) { - CtorInitTextPainter( pNewFrm, pNewInf ); + CtorInitTextPainter( pNewFrame, pNewInf ); m_pInf = pNewInf; pDropFormat = GetInfo().GetDropFormat(); pMulti = nullptr; @@ -136,15 +136,15 @@ void SwTextFormatter::Insert( SwLineLayout *pLay ) m_pCurr = pLay; } -sal_uInt16 SwTextFormatter::GetFrmRstHeight() const +sal_uInt16 SwTextFormatter::GetFrameRstHeight() const { // We want the rest height relative to the page. - // If we're in a table, then pFrm->GetUpper() is not the page. + // If we're in a table, then pFrame->GetUpper() is not the page. - // GetFrmRstHeight() is being called with Footnote. - // Wrong: const SwFrm *pUpper = pFrm->GetUpper(); - const SwFrm *pPage = static_cast<const SwFrm*>(m_pFrm->FindPageFrm()); - const SwTwips nHeight = pPage->Frm().Top() + // GetFrameRstHeight() is being called with Footnote. + // Wrong: const SwFrame *pUpper = pFrame->GetUpper(); + const SwFrame *pPage = static_cast<const SwFrame*>(m_pFrame->FindPageFrame()); + const SwTwips nHeight = pPage->Frame().Top() + pPage->Prt().Top() + pPage->Prt().Height() - Y(); if( 0 > nHeight ) @@ -380,11 +380,11 @@ void SwTextFormatter::BuildPortions( SwTextFormatInfo &rInf ) SwLinePortion *pPor = NewPortion( rInf ); // Asian grid stuff - SwTextGridItem const*const pGrid(GetGridItem(m_pFrm->FindPageFrm())); + SwTextGridItem const*const pGrid(GetGridItem(m_pFrame->FindPageFrame())); const bool bHasGrid = pGrid && rInf.SnapToGrid() && GRID_LINES_CHARS == pGrid->GetGridType(); - const SwDoc *pDoc = rInf.GetTextFrm()->GetNode()->GetDoc(); + const SwDoc *pDoc = rInf.GetTextFrame()->GetNode()->GetDoc(); const sal_uInt16 nGridWidth = (bHasGrid) ? GetGridWidth(*pGrid, *pDoc) : 0; // used for grid mode only: @@ -491,19 +491,19 @@ void SwTextFormatter::BuildPortions( SwTextFormatInfo &rInf ) // if we have a new GridKernPortion, we initially calculate // its size so that its ends on the grid - const SwPageFrm* pPageFrm = m_pFrm->FindPageFrm(); - const SwLayoutFrm* pBody = pPageFrm->FindBodyCont(); - SWRECTFN( pPageFrm ) + const SwPageFrame* pPageFrame = m_pFrame->FindPageFrame(); + const SwLayoutFrame* pBody = pPageFrame->FindBodyCont(); + SWRECTFN( pPageFrame ) const long nGridOrigin = pBody ? (pBody->*fnRect->fnGetPrtLeft)() : - (pPageFrm->*fnRect->fnGetPrtLeft)(); + (pPageFrame->*fnRect->fnGetPrtLeft)(); SwTwips nStartX = rInf.X() + GetLeftMargin(); if ( bVert ) { Point aPoint( nStartX, 0 ); - m_pFrm->SwitchHorizontalToVertical( aPoint ); + m_pFrame->SwitchHorizontalToVertical( aPoint ); nStartX = aPoint.Y(); } @@ -878,7 +878,7 @@ SwTextPortion *SwTextFormatter::WhichTextPor( SwTextFormatInfo &rInf ) const pPor = new SwFieldMarkPortion(); else if (rInf.GetText()[rInf.GetIdx()]==CH_TXT_ATR_FORMELEMENT) { - SwTextNode *pNd = rInf.GetTextFrm()->GetTextNode(); + SwTextNode *pNd = rInf.GetTextFrame()->GetTextNode(); const SwDoc *doc = pNd->GetDoc(); SwIndex aIndex(pNd, rInf.GetIdx()); SwPosition aPosition(*pNd, aIndex); @@ -1022,7 +1022,7 @@ SwLinePortion *SwTextFormatter::WhichFirstPortion(SwTextFormatInfo &rInf) } // We can stand in the follow, it's crucial that - // pFrm->GetOfst() == 0! + // pFrame->GetOfst() == 0! if( rInf.GetIdx() ) { // We now too can elongate FootnotePortions and ErgoSumPortions @@ -1030,7 +1030,7 @@ SwLinePortion *SwTextFormatter::WhichFirstPortion(SwTextFormatInfo &rInf) // 1. The ErgoSumTexts if( !rInf.IsErgoDone() ) { - if( m_pFrm->IsInFootnote() && !m_pFrm->GetIndPrev() ) + if( m_pFrame->IsInFootnote() && !m_pFrame->GetIndPrev() ) pPor = static_cast<SwLinePortion*>(NewErgoSumPortion( rInf )); rInf.SetErgoDone( true ); } @@ -1038,8 +1038,8 @@ SwLinePortion *SwTextFormatter::WhichFirstPortion(SwTextFormatInfo &rInf) // 2. Arrow portions if( !pPor && !rInf.IsArrowDone() ) { - if( m_pFrm->GetOfst() && !m_pFrm->IsFollow() && - rInf.GetIdx() == m_pFrm->GetOfst() ) + if( m_pFrame->GetOfst() && !m_pFrame->IsFollow() && + rInf.GetIdx() == m_pFrame->GetOfst() ) pPor = new SwArrowPortion( *m_pCurr ); rInf.SetArrowDone( true ); } @@ -1048,7 +1048,7 @@ SwLinePortion *SwTextFormatter::WhichFirstPortion(SwTextFormatInfo &rInf) if ( ! pPor && ! m_pCurr->GetPortion() ) { SwTextGridItem const*const pGrid( - GetGridItem(GetTextFrm()->FindPageFrm())); + GetGridItem(GetTextFrame()->FindPageFrame())); if ( pGrid ) pPor = new SwKernPortion( *m_pCurr ); } @@ -1073,7 +1073,7 @@ SwLinePortion *SwTextFormatter::WhichFirstPortion(SwTextFormatInfo &rInf) OSL_ENSURE( ( ! rInf.IsMulti() && ! pMulti ) || pMulti->HasRotation(), "Rotated number portion trouble" ); - const bool bFootnoteNum = m_pFrm->IsFootnoteNumFrm(); + const bool bFootnoteNum = m_pFrame->IsFootnoteNumFrame(); rInf.GetParaPortion()->SetFootnoteNum( bFootnoteNum ); if( bFootnoteNum ) pPor = static_cast<SwLinePortion*>(NewFootnoteNumPortion( rInf )); @@ -1081,10 +1081,10 @@ SwLinePortion *SwTextFormatter::WhichFirstPortion(SwTextFormatInfo &rInf) } // 6. The ErgoSumTexts of course also exist in the TextMaster, - // it's crucial whether the SwFootnoteFrm is aFollow + // it's crucial whether the SwFootnoteFrame is aFollow if( !rInf.IsErgoDone() && !pPor && ! rInf.IsMulti() ) { - if( m_pFrm->IsInFootnote() && !m_pFrm->GetIndPrev() ) + if( m_pFrame->IsInFootnote() && !m_pFrame->GetIndPrev() ) pPor = static_cast<SwLinePortion*>(NewErgoSumPortion( rInf )); rInf.SetErgoDone( true ); } @@ -1096,7 +1096,7 @@ SwLinePortion *SwTextFormatter::WhichFirstPortion(SwTextFormatInfo &rInf) "Rotated number portion trouble" ); // If we're in the follow, then of course not - if( GetTextFrm()->GetTextNode()->GetNumRule() ) + if( GetTextFrame()->GetTextNode()->GetNumRule() ) pPor = static_cast<SwLinePortion*>(NewNumberPortion( rInf )); rInf.SetNumDone( true ); } @@ -1108,7 +1108,7 @@ SwLinePortion *SwTextFormatter::WhichFirstPortion(SwTextFormatInfo &rInf) if ( !pPor && !m_pCurr->GetPortion() ) { SwTextGridItem const*const pGrid( - GetGridItem(GetTextFrm()->FindPageFrm())); + GetGridItem(GetTextFrame()->FindPageFrame())); if ( pGrid ) pPor = new SwKernPortion( *m_pCurr ); } @@ -1116,8 +1116,8 @@ SwLinePortion *SwTextFormatter::WhichFirstPortion(SwTextFormatInfo &rInf) // 10. Decimal tab portion at the beginning of each line in table cells if ( !pPor && !m_pCurr->GetPortion() && - GetTextFrm()->IsInTab() && - GetTextFrm()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT) ) + GetTextFrame()->IsInTab() && + GetTextFrame()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT) ) { pPor = NewTabPortion( rInf, true ); } @@ -1194,7 +1194,7 @@ SwLinePortion *SwTextFormatter::NewPortion( SwTextFormatInfo &rInf ) } // Ein fieser Sonderfall: ein Rahmen ohne Umlauf kreuzt den // Footnote-Bereich. Wir muessen die Footnote-Portion als Zeilenrest - // bekanntgeben, damit SwTextFrm::Format nicht abbricht + // bekanntgeben, damit SwTextFrame::Format nicht abbricht // (die Textmasse wurde ja durchformatiert). if( rInf.GetRest() ) rInf.SetNewLine( true ); @@ -1257,7 +1257,7 @@ SwLinePortion *SwTextFormatter::NewPortion( SwTextFormatInfo &rInf ) if ( rInf.SnapToGrid() ) { SwTextGridItem const*const pGrid( - GetGridItem(GetTextFrm()->FindPageFrm())); + GetGridItem(GetTextFrame()->FindPageFrame())); if ( pGrid ) { bRubyTop = ! pGrid->GetRubyTextBelow(); @@ -1266,12 +1266,12 @@ SwLinePortion *SwTextFormatter::NewPortion( SwTextFormatInfo &rInf ) } pTmp = new SwRubyPortion( *pCreate, *rInf.GetFont(), - *GetTextFrm()->GetTextNode()->getIDocumentSettingAccess(), + *GetTextFrame()->GetTextNode()->getIDocumentSettingAccess(), nEnd, 0, pRubyPos ); } else if( SW_MC_ROTATE == pCreate->nId ) pTmp = new SwRotatedPortion( *pCreate, nEnd, - GetTextFrm()->IsRightToLeft() ); + GetTextFrame()->IsRightToLeft() ); else pTmp = new SwDoubleLinePortion( *pCreate, nEnd ); @@ -1346,7 +1346,7 @@ SwLinePortion *SwTextFormatter::NewPortion( SwTextFormatInfo &rInf ) // We have a decimal tab portion in the line and the next character has to be // aligned at the tab stop position. We store the width from the beginning of // the tab stop portion up to the portion containint the decimal separator: - if ( GetTextFrm()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT) /*rInf.GetVsh()->IsTabCompat();*/ && + if ( GetTextFrame()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT) /*rInf.GetVsh()->IsTabCompat();*/ && POR_TABDECIMAL == pLastTabPortion->GetWhichPor() ) { OSL_ENSURE( rInf.X() >= pLastTabPortion->Fix(), "Decimal tab stop position cannot be calculated" ); @@ -1403,7 +1403,7 @@ SwLinePortion *SwTextFormatter::NewPortion( SwTextFormatInfo &rInf ) if ( pTextFootnote ) { SwFormatFootnote& rFootnote = (SwFormatFootnote&)pTextFootnote->GetFootnote(); - const SwDoc *pDoc = rInf.GetTextFrm()->GetNode()->GetDoc(); + const SwDoc *pDoc = rInf.GetTextFrame()->GetNode()->GetDoc(); const SwEndNoteInfo* pInfo; if( rFootnote.IsEndNote() ) pInfo = &pDoc->GetEndNoteInfo(); @@ -1432,7 +1432,7 @@ SwLinePortion *SwTextFormatter::NewPortion( SwTextFormatInfo &rInf ) if ( pNumFnt ) { - sal_uInt16 nDir = pNumFnt->GetOrientation( rInf.GetTextFrm()->IsVertical() ); + sal_uInt16 nDir = pNumFnt->GetOrientation( rInf.GetTextFrame()->IsVertical() ); if ( 0 != nDir ) { delete pPor; @@ -1477,7 +1477,7 @@ SwLinePortion *SwTextFormatter::NewPortion( SwTextFormatInfo &rInf ) sal_Int32 SwTextFormatter::FormatLine(const sal_Int32 nStartPos) { - OSL_ENSURE( ! m_pFrm->IsVertical() || m_pFrm->IsSwapped(), + OSL_ENSURE( ! m_pFrame->IsVertical() || m_pFrame->IsSwapped(), "SwTextFormatter::FormatLine( nStartPos ) with unswapped frame" ); // For the formatting routines, we set pOut to the reference device. @@ -1552,8 +1552,8 @@ sal_Int32 SwTextFormatter::FormatLine(const sal_Int32 nStartPos) if( GetInfo().IsStop() ) { m_pCurr->SetLen( 0 ); - m_pCurr->Height( GetFrmRstHeight() + 1 ); - m_pCurr->SetRealHeight( GetFrmRstHeight() + 1 ); + m_pCurr->Height( GetFrameRstHeight() + 1 ); + m_pCurr->SetRealHeight( GetFrameRstHeight() + 1 ); m_pCurr->Width(0); m_pCurr->Truncate(); return nStartPos; @@ -1616,7 +1616,7 @@ sal_Int32 SwTextFormatter::FormatLine(const sal_Int32 nStartPos) // In case of compat mode, it's possible that a tab portion is wider after // formatting than before. If this is the case, we also have to make sure // the SwLineLayout is wider as well. - if (GetInfo().GetTextFrm()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_OVER_MARGIN)) + if (GetInfo().GetTextFrame()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_OVER_MARGIN)) { sal_uInt16 nSum = 0; SwLinePortion* pPor = m_pCurr->GetFirstPortion(); @@ -1693,7 +1693,7 @@ void SwTextFormatter::CalcRealHeight( bool bNewLine ) sal_uInt16 nLineHeight = m_pCurr->Height(); m_pCurr->SetClipping( false ); - SwTextGridItem const*const pGrid(GetGridItem(m_pFrm->FindPageFrm())); + SwTextGridItem const*const pGrid(GetGridItem(m_pFrame->FindPageFrame())); if ( pGrid && GetInfo().SnapToGrid() ) { const sal_uInt16 nGridWidth = pGrid->GetBaseHeight(); @@ -1736,7 +1736,7 @@ void SwTextFormatter::CalcRealHeight( bool bNewLine ) // Zeile am Absatzende geben (bei leeren Abs?tzen oder nach einem // Shift-Return), die das Register durchaus beachten soll. if( !m_pCurr->IsDummy() || ( !m_pCurr->GetNext() && - GetStart() >= GetTextFrm()->GetText().getLength() && !bNewLine ) ) + GetStart() >= GetTextFrame()->GetText().getLength() && !bNewLine ) ) { const SvxLineSpacingItem *pSpace = m_aLineInf.GetLineSpacing(); if( pSpace ) @@ -1747,7 +1747,7 @@ void SwTextFormatter::CalcRealHeight( bool bNewLine ) // shrink first line of paragraph too on spacing < 100% if (IsParaLine() && pSpace->GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_PROP - && GetTextFrm()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::PROP_LINE_SPACING_SHRINKS_FIRST_LINE)) + && GetTextFrame()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::PROP_LINE_SPACING_SHRINKS_FIRST_LINE)) { long nTmp = pSpace->GetPropLineSpace(); // Word will render < 50% too but it's just not readable @@ -1795,7 +1795,7 @@ void SwTextFormatter::CalcRealHeight( bool bNewLine ) default: OSL_FAIL( ": unknown LineSpaceRule" ); } // Note: for the _first_ line the line spacing of the previous - // paragraph is applied in SwFlowFrm::CalcUpperSpace() + // paragraph is applied in SwFlowFrame::CalcUpperSpace() if( !IsParaLine() ) switch( pSpace->GetInterLineSpaceRule() ) { @@ -1832,9 +1832,9 @@ void SwTextFormatter::CalcRealHeight( bool bNewLine ) if( IsRegisterOn() ) { SwTwips nTmpY = Y() + m_pCurr->GetAscent() + nLineHeight - m_pCurr->Height(); - SWRECTFN( m_pFrm ) + SWRECTFN( m_pFrame ) if ( bVert ) - nTmpY = m_pFrm->SwitchHorizontalToVertical( nTmpY ); + nTmpY = m_pFrame->SwitchHorizontalToVertical( nTmpY ); nTmpY = (*fnRect->fnYDiff)( nTmpY, RegStart() ); const sal_uInt16 nDiff = sal_uInt16( nTmpY % RegDiff() ); if( nDiff ) @@ -1865,9 +1865,9 @@ void SwTextFormatter::FeedInf( SwTextFormatInfo &rInf ) const nTmpRight > USHRT_MAX || nTmpFirst > USHRT_MAX ) { - SWRECTFN( rInf.GetTextFrm() ) - nTmpLeft = (rInf.GetTextFrm()->Frm().*fnRect->fnGetLeft)(); - nTmpRight = (rInf.GetTextFrm()->Frm().*fnRect->fnGetRight)(); + SWRECTFN( rInf.GetTextFrame() ) + nTmpLeft = (rInf.GetTextFrame()->Frame().*fnRect->fnGetLeft)(); + nTmpRight = (rInf.GetTextFrame()->Frame().*fnRect->fnGetRight)(); nTmpFirst = nTmpLeft; } @@ -1917,8 +1917,8 @@ SwTwips SwTextFormatter::CalcBottomLine() const SwTwips nMin = GetInfo().GetTextFly().GetMinBottom(); if( nMin && ++nMin > nRet ) { - SwTwips nDist = m_pFrm->Frm().Height() - m_pFrm->Prt().Height() - - m_pFrm->Prt().Top(); + SwTwips nDist = m_pFrame->Frame().Height() - m_pFrame->Prt().Height() + - m_pFrame->Prt().Top(); if( nRet + nDist < nMin ) { const bool bRepaint = HasTruncLines() && @@ -1966,7 +1966,7 @@ bool SwTextFormatter::AllowRepaintOpt() const else { // ????: Blank in der letzten Masterzeile (blocksat.sdw) - bOptimizeRepaint = nullptr == m_pCurr->GetNext() && !m_pFrm->GetFollow(); + bOptimizeRepaint = nullptr == m_pCurr->GetNext() && !m_pFrame->GetFollow(); if ( bOptimizeRepaint ) { SwLinePortion *pPos = m_pCurr->GetFirstPortion(); @@ -1999,7 +1999,7 @@ bool SwTextFormatter::AllowRepaintOpt() const void SwTextFormatter::CalcUnclipped( SwTwips& rTop, SwTwips& rBottom ) { - OSL_ENSURE( ! m_pFrm->IsVertical() || m_pFrm->IsSwapped(), + OSL_ENSURE( ! m_pFrame->IsVertical() || m_pFrame->IsSwapped(), "SwTextFormatter::CalcUnclipped with unswapped frame" ); long nFlyAsc, nFlyDesc; @@ -2012,7 +2012,7 @@ void SwTextFormatter::CalcUnclipped( SwTwips& rTop, SwTwips& rBottom ) void SwTextFormatter::UpdatePos( SwLineLayout *pCurrent, Point aStart, sal_Int32 nStartIdx, bool bAlways ) const { - OSL_ENSURE( ! m_pFrm->IsVertical() || m_pFrm->IsSwapped(), + OSL_ENSURE( ! m_pFrame->IsVertical() || m_pFrame->IsSwapped(), "SwTextFormatter::UpdatePos with unswapped frame" ); if( GetInfo().IsTest() ) @@ -2084,10 +2084,10 @@ void SwTextFormatter::UpdatePos( SwLineLayout *pCurrent, Point aStart, else { Point aBase( aTmpInf.GetPos() ); - if ( GetInfo().GetTextFrm()->IsVertical() ) - GetInfo().GetTextFrm()->SwitchHorizontalToVertical( aBase ); + if ( GetInfo().GetTextFrame()->IsVertical() ) + GetInfo().GetTextFrame()->SwitchHorizontalToVertical( aBase ); - static_cast<SwFlyCntPortion*>(pPos)->SetBase( *aTmpInf.GetTextFrm(), + static_cast<SwFlyCntPortion*>(pPos)->SetBase( *aTmpInf.GetTextFrame(), aBase, nTmpAscent, nTmpDescent, nFlyAsc, nFlyDesc, nFlags ); } @@ -2133,7 +2133,7 @@ void SwTextFormatter::UpdatePos( SwLineLayout *pCurrent, Point aStart, void SwTextFormatter::AlignFlyInCntBase( long nBaseLine ) const { - OSL_ENSURE( ! m_pFrm->IsVertical() || m_pFrm->IsSwapped(), + OSL_ENSURE( ! m_pFrame->IsVertical() || m_pFrame->IsSwapped(), "SwTextFormatter::AlignFlyInCntBase with unswapped frame" ); if( GetInfo().IsTest() ) @@ -2162,15 +2162,15 @@ void SwTextFormatter::AlignFlyInCntBase( long nBaseLine ) const else { Point aBase; - if ( GetInfo().GetTextFrm()->IsVertical() ) + if ( GetInfo().GetTextFrame()->IsVertical() ) { - nBaseLine = GetInfo().GetTextFrm()->SwitchHorizontalToVertical( nBaseLine ); + nBaseLine = GetInfo().GetTextFrame()->SwitchHorizontalToVertical( nBaseLine ); aBase = Point( nBaseLine, static_cast<SwFlyCntPortion*>(pPos)->GetRefPoint().Y() ); } else aBase = Point( static_cast<SwFlyCntPortion*>(pPos)->GetRefPoint().X(), nBaseLine ); - static_cast<SwFlyCntPortion*>(pPos)->SetBase( *GetInfo().GetTextFrm(), aBase, nTmpAscent, nTmpDescent, + static_cast<SwFlyCntPortion*>(pPos)->SetBase( *GetInfo().GetTextFrame(), aBase, nTmpAscent, nTmpDescent, nFlyAsc, nFlyDesc, nFlags ); } } @@ -2189,11 +2189,11 @@ bool SwTextFormatter::ChkFlyUnderflow( SwTextFormatInfo &rInf ) const SwRect aLine( GetLeftMargin(), Y(), rInf.RealWidth(), nHeight ); SwRect aLineVert( aLine ); - if ( m_pFrm->IsVertical() ) - m_pFrm->SwitchHorizontalToVertical( aLineVert ); - SwRect aInter( rInf.GetTextFly().GetFrm( aLineVert ) ); - if ( m_pFrm->IsVertical() ) - m_pFrm->SwitchVerticalToHorizontal( aInter ); + if ( m_pFrame->IsVertical() ) + m_pFrame->SwitchHorizontalToVertical( aLineVert ); + SwRect aInter( rInf.GetTextFly().GetFrame( aLineVert ) ); + if ( m_pFrame->IsVertical() ) + m_pFrame->SwitchVerticalToHorizontal( aInter ); if( !aInter.HasArea() ) return false; @@ -2209,11 +2209,11 @@ bool SwTextFormatter::ChkFlyUnderflow( SwTextFormatInfo &rInf ) const aLine.Width( pPos->Width() ); aLineVert = aLine; - if ( m_pFrm->IsVertical() ) - m_pFrm->SwitchHorizontalToVertical( aLineVert ); - aInter = rInf.GetTextFly().GetFrm( aLineVert ); - if ( m_pFrm->IsVertical() ) - m_pFrm->SwitchVerticalToHorizontal( aInter ); + if ( m_pFrame->IsVertical() ) + m_pFrame->SwitchHorizontalToVertical( aLineVert ); + aInter = rInf.GetTextFly().GetFrame( aLineVert ); + if ( m_pFrame->IsVertical() ) + m_pFrame->SwitchVerticalToHorizontal( aInter ); // New flys from below? if( !pPos->IsFlyPortion() ) @@ -2312,18 +2312,18 @@ void SwTextFormatter::CalcFlyWidth( SwTextFormatInfo &rInf ) + nLeftMar - nLeftMin , nHeight ); SwRect aLineVert( aLine ); - if ( m_pFrm->IsRightToLeft() ) - m_pFrm->SwitchLTRtoRTL( aLineVert ); + if ( m_pFrame->IsRightToLeft() ) + m_pFrame->SwitchLTRtoRTL( aLineVert ); - if ( m_pFrm->IsVertical() ) - m_pFrm->SwitchHorizontalToVertical( aLineVert ); - SwRect aInter( rTextFly.GetFrm( aLineVert ) ); + if ( m_pFrame->IsVertical() ) + m_pFrame->SwitchHorizontalToVertical( aLineVert ); + SwRect aInter( rTextFly.GetFrame( aLineVert ) ); - if ( m_pFrm->IsRightToLeft() ) - m_pFrm->SwitchRTLtoLTR( aInter ); + if ( m_pFrame->IsRightToLeft() ) + m_pFrame->SwitchRTLtoLTR( aInter ); - if ( m_pFrm->IsVertical() ) - m_pFrm->SwitchVerticalToHorizontal( aInter ); + if ( m_pFrame->IsVertical() ) + m_pFrame->SwitchVerticalToHorizontal( aInter ); if( aInter.IsOver( aLine ) ) { @@ -2331,21 +2331,21 @@ void SwTextFormatter::CalcFlyWidth( SwTextFormatInfo &rInf ) bool bForced = false; if( aInter.Left() <= nLeftMin ) { - SwTwips nFrmLeft = GetTextFrm()->Frm().Left(); - if( GetTextFrm()->Prt().Left() < 0 ) - nFrmLeft += GetTextFrm()->Prt().Left(); - if( aInter.Left() < nFrmLeft ) - aInter.Left( nFrmLeft ); + SwTwips nFrameLeft = GetTextFrame()->Frame().Left(); + if( GetTextFrame()->Prt().Left() < 0 ) + nFrameLeft += GetTextFrame()->Prt().Left(); + if( aInter.Left() < nFrameLeft ) + aInter.Left( nFrameLeft ); long nAddMar = 0; - if ( m_pFrm->IsRightToLeft() ) + if ( m_pFrame->IsRightToLeft() ) { - nAddMar = m_pFrm->Frm().Right() - Right(); + nAddMar = m_pFrame->Frame().Right() - Right(); if ( nAddMar < 0 ) nAddMar = 0; } else - nAddMar = nLeftMar - nFrmLeft; + nAddMar = nLeftMar - nFrameLeft; aInter.Width( aInter.Width() + nAddMar ); // For a negative first line indent, we set this flag to show @@ -2399,8 +2399,8 @@ void SwTextFormatter::CalcFlyWidth( SwTextFormatInfo &rInf ) // That means we can comfortably grow up to this value; that's how // we save a few empty lines. long nNextTop = rTextFly.GetNextTop(); - if ( m_pFrm->IsVertical() ) - nNextTop = m_pFrm->SwitchVerticalToHorizontal( nNextTop ); + if ( m_pFrame->IsVertical() ) + nNextTop = m_pFrame->SwitchVerticalToHorizontal( nNextTop ); if( nNextTop > aInter.Bottom() ) { SwTwips nH = nNextTop - aInter.Top(); @@ -2435,26 +2435,26 @@ void SwTextFormatter::CalcFlyWidth( SwTextFormatInfo &rInf ) if( pFly->Fix() < rInf.Width() ) rInf.Width( pFly->Fix() ); - SwTextGridItem const*const pGrid(GetGridItem(m_pFrm->FindPageFrm())); + SwTextGridItem const*const pGrid(GetGridItem(m_pFrame->FindPageFrame())); if ( pGrid ) { - const SwPageFrm* pPageFrm = m_pFrm->FindPageFrm(); - const SwLayoutFrm* pBody = pPageFrm->FindBodyCont(); + const SwPageFrame* pPageFrame = m_pFrame->FindPageFrame(); + const SwLayoutFrame* pBody = pPageFrame->FindBodyCont(); - SWRECTFN( pPageFrm ) + SWRECTFN( pPageFrame ) const long nGridOrigin = pBody ? (pBody->*fnRect->fnGetPrtLeft)() : - (pPageFrm->*fnRect->fnGetPrtLeft)(); + (pPageFrame->*fnRect->fnGetPrtLeft)(); - const SwDoc *pDoc = rInf.GetTextFrm()->GetNode()->GetDoc(); + const SwDoc *pDoc = rInf.GetTextFrame()->GetNode()->GetDoc(); const sal_uInt16 nGridWidth = GetGridWidth(*pGrid, *pDoc); SwTwips nStartX = GetLeftMargin(); if ( bVert ) { Point aPoint( nStartX, 0 ); - m_pFrm->SwitchHorizontalToVertical( aPoint ); + m_pFrame->SwitchHorizontalToVertical( aPoint ); nStartX = aPoint.Y(); } @@ -2476,12 +2476,12 @@ SwFlyCntPortion *SwTextFormatter::NewFlyCntPortion( SwTextFormatInfo &rInf, SwTextAttr *pHint ) const { SwFlyCntPortion *pRet = nullptr; - const SwFrm *pFrame = static_cast<SwFrm*>(m_pFrm); + const SwFrame *pFrame = static_cast<SwFrame*>(m_pFrame); - SwFlyInCntFrm *pFly; + SwFlyInContentFrame *pFly; SwFrameFormat* pFrameFormat = static_cast<SwTextFlyCnt*>(pHint)->GetFlyCnt().GetFrameFormat(); if( RES_FLYFRMFMT == pFrameFormat->Which() ) - pFly = static_cast<SwTextFlyCnt*>(pHint)->GetFlyFrm(pFrame); + pFly = static_cast<SwTextFlyCnt*>(pHint)->GetFlyFrame(pFrame); else pFly = nullptr; // aBase is the document-global position, from which the new extra portion is placed @@ -2500,15 +2500,15 @@ SwFlyCntPortion *SwTextFormatter::NewFlyCntPortion( SwTextFormatInfo &rInf, // he actually never was in. sal_uInt16 nAscent = 0; - const bool bTextFrmVertical = GetInfo().GetTextFrm()->IsVertical(); + const bool bTextFrameVertical = GetInfo().GetTextFrame()->IsVertical(); const bool bUseFlyAscent = pFly && pFly->GetValidPosFlag() && - 0 != ( bTextFrmVertical ? + 0 != ( bTextFrameVertical ? pFly->GetRefPoint().X() : pFly->GetRefPoint().Y() ); if ( bUseFlyAscent ) - nAscent = static_cast<sal_uInt16>( std::abs( int( bTextFrmVertical ? + nAscent = static_cast<sal_uInt16>( std::abs( int( bTextFrameVertical ? pFly->GetRelPos().X() : pFly->GetRelPos().Y() ) ) ); @@ -2532,15 +2532,15 @@ SwFlyCntPortion *SwTextFormatter::NewFlyCntPortion( SwTextFormatInfo &rInf, } Point aTmpBase( aBase ); - if ( GetInfo().GetTextFrm()->IsVertical() ) - GetInfo().GetTextFrm()->SwitchHorizontalToVertical( aTmpBase ); + if ( GetInfo().GetTextFrame()->IsVertical() ) + GetInfo().GetTextFrame()->SwitchHorizontalToVertical( aTmpBase ); if( pFly ) { - pRet = new SwFlyCntPortion( *GetInfo().GetTextFrm(), pFly, aTmpBase, + pRet = new SwFlyCntPortion( *GetInfo().GetTextFrame(), pFly, aTmpBase, nTmpAscent, nTmpDescent, nFlyAsc, nFlyDesc, nMode ); // We need to make sure that our font is set again in the OutputDevice - // It could be that the FlyInCnt was added anew and GetFlyFrm() would + // It could be that the FlyInCnt was added anew and GetFlyFrame() would // in turn cause, that it'd be created anew again. // This one's frames get formatted right away, which change the font and // we have a bug (3322). @@ -2552,17 +2552,17 @@ SwFlyCntPortion *SwTextFormatter::NewFlyCntPortion( SwTextFormatInfo &rInf, if( !rInf.IsTest() ) { aTmpBase = aBase; - if ( GetInfo().GetTextFrm()->IsVertical() ) - GetInfo().GetTextFrm()->SwitchHorizontalToVertical( aTmpBase ); + if ( GetInfo().GetTextFrame()->IsVertical() ) + GetInfo().GetTextFrame()->SwitchHorizontalToVertical( aTmpBase ); - pRet->SetBase( *rInf.GetTextFrm(), aTmpBase, nTmpAscent, + pRet->SetBase( *rInf.GetTextFrame(), aTmpBase, nTmpAscent, nTmpDescent, nFlyAsc, nFlyDesc, nMode ); } } } else { - pRet = new SwFlyCntPortion( *rInf.GetTextFrm(), static_cast<SwDrawContact*>(pFrameFormat->FindContactObj()), + pRet = new SwFlyCntPortion( *rInf.GetTextFrame(), static_cast<SwDrawContact*>(pFrameFormat->FindContactObj()), aTmpBase, nTmpAscent, nTmpDescent, nFlyAsc, nFlyDesc, nMode ); } return pRet; diff --git a/sw/source/core/text/itrform2.hxx b/sw/source/core/text/itrform2.hxx index 1f5b97f1cf20..cc28091f087f 100644 --- a/sw/source/core/text/itrform2.hxx +++ b/sw/source/core/text/itrform2.hxx @@ -78,7 +78,7 @@ class SwTextFormatter : public SwTextPainter Determines the next object, that reaches into the rest of the line and constructs the appropriate FlyPortion. - SwTextFly::GetFrm(const SwRect&, bool) will be needed for this. + SwTextFly::GetFrame(const SwRect&, bool) will be needed for this. The right edge can be shortened by flys */ @@ -151,12 +151,12 @@ public: // Amongst others for DropCaps bool CalcOnceMore(); - void CtorInitTextFormatter( SwTextFrm *pFrm, SwTextFormatInfo *pInf ); - SwTextFormatter(SwTextFrm *pTextFrm, SwTextFormatInfo *pTextFormatInf) - : SwTextPainter(pTextFrm->GetTextNode()) + void CtorInitTextFormatter( SwTextFrame *pFrame, SwTextFormatInfo *pInf ); + SwTextFormatter(SwTextFrame *pTextFrame, SwTextFormatInfo *pTextFormatInf) + : SwTextPainter(pTextFrame->GetTextNode()) , bUnclipped(false) { - CtorInitTextFormatter( pTextFrm, pTextFormatInf ); + CtorInitTextFormatter( pTextFrame, pTextFormatInf ); } virtual ~SwTextFormatter(); @@ -188,7 +188,7 @@ public: void Insert( SwLineLayout *pLine ); // The remaining height to the page border - sal_uInt16 GetFrmRstHeight() const; + sal_uInt16 GetFrameRstHeight() const; // How wide would you be without any bounds (Flys etc.)? SwTwips _CalcFitToContent( ); diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx index e147e7b9f425..81d18736ae17 100644 --- a/sw/source/core/text/itrpaint.cxx +++ b/sw/source/core/text/itrpaint.cxx @@ -69,9 +69,9 @@ bool IsUnderlineBreak( const SwLinePortion& rPor, const SwFont& rFnt ) SVX_CASEMAP_KAPITAELCHEN == rFnt.GetCaseMap(); } -void SwTextPainter::CtorInitTextPainter( SwTextFrm *pNewFrm, SwTextPaintInfo *pNewInf ) +void SwTextPainter::CtorInitTextPainter( SwTextFrame *pNewFrame, SwTextPaintInfo *pNewInf ) { - CtorInitTextCursor( pNewFrm, pNewInf ); + CtorInitTextCursor( pNewFrame, pNewInf ); m_pInf = pNewInf; SwFont *pMyFnt = GetFnt(); GetInfo().SetFont( pMyFnt ); @@ -195,7 +195,7 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip, GetInfo().GetPos().Y() + nTmpHeight > rPaint.Top() + rPaint.Height() ) { bClip = false; - rClip.ChgClip( rPaint, m_pFrm, m_pCurr->HasUnderscore() ); + rClip.ChgClip( rPaint, m_pFrame, m_pCurr->HasUnderscore() ); } #if OSL_DEBUG_LEVEL > 1 static bool bClipAlways = false; @@ -224,7 +224,7 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip, if( m_pCurr->IsClipping() ) { - rClip.ChgClip( aLineRect, m_pFrm ); + rClip.ChgClip( aLineRect, m_pFrame ); bClip = false; } @@ -234,9 +234,9 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip, // Baseline-Ausgabe auch bei nicht-TextPortions (vgl. TabPor mit Fill) // if no special vertical alignment is used, // we calculate Y value for the whole line - SwTextGridItem const*const pGrid(GetGridItem(GetTextFrm()->FindPageFrm())); + SwTextGridItem const*const pGrid(GetGridItem(GetTextFrame()->FindPageFrame())); const bool bAdjustBaseLine = - ( !GetTextFrm()->IsVertical() || GetLineInfo().HasSpecialAlign( true ) ) && (! GetTextFrm()->IsInFly()) && + ( !GetTextFrame()->IsVertical() || GetLineInfo().HasSpecialAlign( true ) ) && (! GetTextFrame()->IsInFly()) && ( nullptr != pGrid ); const SwTwips nLineBaseLine = GetInfo().GetPos().Y() + nTmpAscent; if ( ! bAdjustBaseLine ) @@ -329,7 +329,7 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip, GetInfo().X() + pPor->Width() + ( pPor->Height() / 2 ) > nMaxRight ) { bClip = false; - rClip.ChgClip( rPaint, m_pFrm, m_pCurr->HasUnderscore() ); + rClip.ChgClip( rPaint, m_pFrame, m_pCurr->HasUnderscore() ); } // Portions, which lay "below" the text like post-its @@ -414,7 +414,7 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip, if( !GetNextLine() && GetInfo().GetVsh() && !GetInfo().GetVsh()->IsPreview() && - GetInfo().GetOpt().IsParagraph() && !GetTextFrm()->GetFollow() && + GetInfo().GetOpt().IsParagraph() && !GetTextFrame()->GetFollow() && GetInfo().GetIdx() >= GetInfo().GetText().getLength() ) { const SwTmpEndPortion aEnd( *pEndTempl ); @@ -430,10 +430,10 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip, if( GetInfo().GetVsh() && !GetInfo().GetVsh()->IsPreview() ) { const bool bNextUndersized = - ( GetTextFrm()->GetNext() && - 0 == GetTextFrm()->GetNext()->Prt().Height() && - GetTextFrm()->GetNext()->IsTextFrm() && - static_cast<SwTextFrm*>(GetTextFrm()->GetNext())->IsUndersized() ) ; + ( GetTextFrame()->GetNext() && + 0 == GetTextFrame()->GetNext()->Prt().Height() && + GetTextFrame()->GetNext()->IsTextFrame() && + static_cast<SwTextFrame*>(GetTextFrame()->GetNext())->IsUndersized() ) ; if( bUnderSz || bNextUndersized ) { @@ -444,7 +444,7 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip, GetInfo().DrawRedArrow( *pArrow ); // GetInfo().Y() must be current baseline - SwTwips nDiff = GetInfo().Y() + nTmpHeight - nTmpAscent - GetTextFrm()->Frm().Bottom(); + SwTwips nDiff = GetInfo().Y() + nTmpHeight - nTmpAscent - GetTextFrame()->Frame().Bottom(); if( ( nDiff > 0 && ( GetEnd() < GetInfo().GetText().getLength() || ( nDiff > nTmpHeight/2 && GetPrevLine() ) ) ) || @@ -461,7 +461,7 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip, } if( m_pCurr->IsClipping() ) - rClip.ChgClip( rPaint, m_pFrm ); + rClip.ChgClip( rPaint, m_pFrame ); } void SwTextPainter::CheckSpecialUnderline( const SwLinePortion* pPor, @@ -544,7 +544,7 @@ void SwTextPainter::CheckSpecialUnderline( const SwLinePortion* pPor, { // here starts the algorithm for calculating the underline font SwScriptInfo& rScriptInfo = GetInfo().GetParaPortion()->GetScriptInfo(); - SwAttrIter aIter( *GetInfo().GetTextFrm()->GetTextNode(), + SwAttrIter aIter( *GetInfo().GetTextFrame()->GetTextNode(), rScriptInfo ); sal_Int32 nTmpIdx = nIndx; diff --git a/sw/source/core/text/itrpaint.hxx b/sw/source/core/text/itrpaint.hxx index a200524efb28..efa267396bef 100644 --- a/sw/source/core/text/itrpaint.hxx +++ b/sw/source/core/text/itrpaint.hxx @@ -31,7 +31,7 @@ class SwTextPainter : public SwTextCursor void CheckSpecialUnderline( const SwLinePortion* pPor, long nAdjustBaseLine = 0 ); protected: - void CtorInitTextPainter( SwTextFrm *pFrm, SwTextPaintInfo *pInf ); + void CtorInitTextPainter( SwTextFrame *pFrame, SwTextPaintInfo *pInf ); explicit SwTextPainter(SwTextNode* pTextNode) : SwTextCursor(pTextNode) , bPaintDrop(false) @@ -39,10 +39,10 @@ protected: } public: - SwTextPainter(SwTextFrm *pTextFrm, SwTextPaintInfo *pTextPaintInf) - : SwTextCursor(pTextFrm->GetTextNode()) + SwTextPainter(SwTextFrame *pTextFrame, SwTextPaintInfo *pTextPaintInf) + : SwTextCursor(pTextFrame->GetTextNode()) { - CtorInitTextPainter( pTextFrm, pTextPaintInf ); + CtorInitTextPainter( pTextFrame, pTextPaintInf ); } void DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip, const bool bUnderSz ); diff --git a/sw/source/core/text/itrtxt.cxx b/sw/source/core/text/itrtxt.cxx index db5430e8b045..479114c25381 100644 --- a/sw/source/core/text/itrtxt.cxx +++ b/sw/source/core/text/itrtxt.cxx @@ -33,23 +33,23 @@ #include "txtfrm.hxx" #include "porfly.hxx" -void SwTextIter::CtorInitTextIter( SwTextFrm *pNewFrm, SwTextInfo *pNewInf ) +void SwTextIter::CtorInitTextIter( SwTextFrame *pNewFrame, SwTextInfo *pNewInf ) { - SwTextNode *pNode = pNewFrm->GetTextNode(); + SwTextNode *pNode = pNewFrame->GetTextNode(); - OSL_ENSURE( pNewFrm->GetPara(), "No paragraph" ); + OSL_ENSURE( pNewFrame->GetPara(), "No paragraph" ); - CtorInitAttrIter( *pNode, pNewFrm->GetPara()->GetScriptInfo(), pNewFrm ); + CtorInitAttrIter( *pNode, pNewFrame->GetPara()->GetScriptInfo(), pNewFrame ); - m_pFrm = pNewFrm; + m_pFrame = pNewFrame; m_pInf = pNewInf; m_aLineInf.CtorInitLineInfo( pNode->GetSwAttrSet(), *pNode ); - m_nFrameStart = m_pFrm->Frm().Pos().Y() + m_pFrm->Prt().Pos().Y(); + m_nFrameStart = m_pFrame->Frame().Pos().Y() + m_pFrame->Prt().Pos().Y(); SwTextIter::Init(); // Order is important: only execute FillRegister if GetValue!=0 m_bRegisterOn = pNode->GetSwAttrSet().GetRegister().GetValue() - && m_pFrm->FillRegister( m_nRegStart, m_nRegDiff ); + && m_pFrame->FillRegister( m_nRegStart, m_nRegDiff ); } void SwTextIter::Init() @@ -199,7 +199,7 @@ void SwTextIter::CharToLine(const sal_Int32 nChar) } // 1170: beruecksichtigt Mehrdeutigkeiten: -const SwLineLayout *SwTextCursor::CharCrsrToLine( const sal_Int32 nPosition ) +const SwLineLayout *SwTextCursor::CharCursorToLine( const sal_Int32 nPosition ) { CharToLine( nPosition ); if( nPosition != m_nStart ) @@ -224,7 +224,7 @@ sal_uInt16 SwTextCursor::AdjustBaseLine( const SwLineLayout& rLine, sal_uInt16 nOfst = rLine.GetRealHeight() - rLine.Height(); - SwTextGridItem const*const pGrid(GetGridItem(m_pFrm->FindPageFrm())); + SwTextGridItem const*const pGrid(GetGridItem(m_pFrame->FindPageFrame())); if ( pGrid && GetInfo().SnapToGrid() ) { @@ -272,9 +272,9 @@ sal_uInt16 SwTextCursor::AdjustBaseLine( const SwLineLayout& rLine, nOfst += rLine.Height() - nPorHeight + nPorAscent; break; case SvxParaVertAlignItem::AUTOMATIC : - if ( bAutoToCentered || GetInfo().GetTextFrm()->IsVertical() ) + if ( bAutoToCentered || GetInfo().GetTextFrame()->IsVertical() ) { - if( GetInfo().GetTextFrm()->IsVertLR() ) + if( GetInfo().GetTextFrame()->IsVertLR() ) nOfst += rLine.Height() - ( rLine.Height() - nPorHeight ) / 2 - nPorAscent; else nOfst += ( rLine.Height() - nPorHeight ) / 2 + nPorAscent; @@ -328,7 +328,7 @@ void SwTextIter::TruncLines( bool bNoteFollow ) lcl_NeedsFieldRest( m_pCurr ) ); // bug 88534: wrong positioning of flys - SwTextFrm* pFollow = GetTextFrm()->GetFollow(); + SwTextFrame* pFollow = GetTextFrame()->GetFollow(); if ( pFollow && ! pFollow->IsLocked() && nEnd == pFollow->GetOfst() ) { @@ -342,7 +342,7 @@ void SwTextIter::TruncLines( bool bNoteFollow ) pLine = pLine->GetNext(); } - SwpHints* pTmpHints = GetTextFrm()->GetTextNode()->GetpSwpHints(); + SwpHints* pTmpHints = GetTextFrame()->GetTextNode()->GetpSwpHints(); // examine hints in range nEnd - (nEnd + nRangeChar) for( size_t i = 0; i < pTmpHints->Count(); ++i ) @@ -363,10 +363,10 @@ void SwTextIter::TruncLines( bool bNoteFollow ) } if( m_pCurr->IsDummy() && !m_pCurr->GetLen() && - m_nStart < GetTextFrm()->GetText().getLength() ) + m_nStart < GetTextFrame()->GetText().getLength() ) m_pCurr->SetRealHeight( 1 ); if( GetHints() ) - m_pFrm->RemoveFootnote( nEnd ); + m_pFrame->RemoveFootnote( nEnd ); } void SwTextIter::CntHyphens( sal_uInt8 &nEndCnt, sal_uInt8 &nMidCnt) const diff --git a/sw/source/core/text/itrtxt.hxx b/sw/source/core/text/itrtxt.hxx index c4ec33ba65cf..42e901894da7 100644 --- a/sw/source/core/text/itrtxt.hxx +++ b/sw/source/core/text/itrtxt.hxx @@ -22,9 +22,9 @@ #include "itratr.hxx" #include "inftxt.hxx" -class SwTextFrm; +class SwTextFrame; struct SwPosition; -struct SwCrsrMoveState; +struct SwCursorMoveState; class SwMarginPortion; class SwFlyPortion; @@ -32,7 +32,7 @@ class SwTextIter : public SwAttrIter { protected: SwLineInfo m_aLineInf; - SwTextFrm *m_pFrm; + SwTextFrame *m_pFrame; SwTextInfo *m_pInf; SwLineLayout *m_pCurr; SwLineLayout *m_pPrev; @@ -52,10 +52,10 @@ protected: // Reset in the first line void Init(); - void CtorInitTextIter( SwTextFrm *pFrm, SwTextInfo *pInf ); + void CtorInitTextIter( SwTextFrame *pFrame, SwTextInfo *pInf ); explicit SwTextIter(SwTextNode* pTextNode) : SwAttrIter(pTextNode) - , m_pFrm(nullptr) + , m_pFrame(nullptr) , m_pInf(nullptr) , m_pCurr(nullptr) , m_pPrev(nullptr) @@ -73,13 +73,13 @@ protected: { } public: - SwTextIter(SwTextFrm *pTextFrm, SwTextInfo *pTextInf) - : SwAttrIter(pTextFrm->GetTextNode()) + SwTextIter(SwTextFrame *pTextFrame, SwTextInfo *pTextInf) + : SwAttrIter(pTextFrame->GetTextNode()) , m_bOneBlock(false) , m_bLastBlock(false) , m_bLastCenter(false) { - CtorInitTextIter(pTextFrm, pTextInf); + CtorInitTextIter(pTextFrame, pTextInf); } inline const SwLineLayout *GetCurr() const { return m_pCurr; } // NEVER 0! inline const SwLineLayout *GetNext() const { return m_pCurr->GetNext(); } @@ -102,7 +102,7 @@ public: const SwLineLayout *Next(); const SwLineLayout *Prev(); - // Skips the FlyFrms dummy line + // Skips the FlyFrames dummy line const SwLineLayout *NextLine(); const SwLineLayout *PrevLine(); const SwLineLayout *GetNextLine() const; @@ -132,8 +132,8 @@ public: inline bool SeekAndChgBefore( SwTextSizeInfo &rInf ); inline bool SeekStartAndChg( SwTextSizeInfo &rInf, const bool bPara=false ); - inline SwTextFrm *GetTextFrm() { return m_pFrm; } - inline const SwTextFrm *GetTextFrm() const { return m_pFrm; } + inline SwTextFrame *GetTextFrame() { return m_pFrame; } + inline const SwTextFrame *GetTextFrame() const { return m_pFrame; } // Counts consecutive hyphens in order to be within the boundary given by MaxHyphens void CntHyphens( sal_uInt8 &nEndCnt, sal_uInt8 &nMidCnt) const; @@ -157,7 +157,7 @@ protected: // For FormatQuoVadis inline void Right( const SwTwips nNew ) { nRight = nNew; } - void CtorInitTextMargin( SwTextFrm *pFrm, SwTextSizeInfo *pInf ); + void CtorInitTextMargin( SwTextFrame *pFrame, SwTextSizeInfo *pInf ); explicit SwTextMargin(SwTextNode* pTextNode) : SwTextIter(pTextNode) , nLeft(0) @@ -172,10 +172,10 @@ protected: { } public: - SwTextMargin(SwTextFrm *pTextFrm, SwTextSizeInfo *pTextSizeInf) - : SwTextIter(pTextFrm->GetTextNode()) + SwTextMargin(SwTextFrame *pTextFrame, SwTextSizeInfo *pTextSizeInf) + : SwTextIter(pTextFrame->GetTextNode()) { - CtorInitTextMargin( pTextFrm, pTextSizeInf ); + CtorInitTextMargin( pTextFrame, pTextSizeInf ); } inline SwTwips GetLeftMargin() const; inline SwTwips Left() const; @@ -223,7 +223,7 @@ public: class SwTextAdjuster : public SwTextMargin { - // Adjusts the portion, if we have adjustment and FlyFrms + // Adjusts the portion, if we have adjustment and FlyFrames void CalcFlyAdjust( SwLineLayout *pCurr ); // Calls SplitGlues and CalcBlockAdjust @@ -243,8 +243,8 @@ protected: SwTwips nReal = 0, bool bSkipKashida = false ); SwTwips CalcKanaAdj( SwLineLayout *pCurr ); public: - inline SwTextAdjuster( SwTextFrm *pTextFrm, SwTextSizeInfo *pTextSizeInf ) : SwTextMargin(pTextFrm!=nullptr?pTextFrm->GetTextNode():nullptr) - { CtorInitTextMargin( pTextFrm, pTextSizeInf ); } + inline SwTextAdjuster( SwTextFrame *pTextFrame, SwTextSizeInfo *pTextSizeInf ) : SwTextMargin(pTextFrame!=nullptr?pTextFrame->GetTextNode():nullptr) + { CtorInitTextMargin( pTextFrame, pTextSizeInf ); } // Is overloaded by SwTextFormatter due to UpdatePos void CalcAdjLine( SwLineLayout *pCurr ); @@ -269,24 +269,24 @@ class SwTextCursor : public SwTextAdjuster // Ambiguities static bool bRightMargin; - void _GetCharRect(SwRect *, const sal_Int32, SwCrsrMoveState* ); + void _GetCharRect(SwRect *, const sal_Int32, SwCursorMoveState* ); protected: - void CtorInitTextCursor( SwTextFrm *pFrm, SwTextSizeInfo *pInf ); + void CtorInitTextCursor( SwTextFrame *pFrame, SwTextSizeInfo *pInf ); explicit SwTextCursor(SwTextNode* pTextNode) : SwTextAdjuster(pTextNode) { } public: - SwTextCursor( SwTextFrm *pTextFrm, SwTextSizeInfo *pTextSizeInf ) - : SwTextAdjuster(pTextFrm->GetTextNode()) + SwTextCursor( SwTextFrame *pTextFrame, SwTextSizeInfo *pTextSizeInf ) + : SwTextAdjuster(pTextFrame->GetTextNode()) { - CtorInitTextCursor(pTextFrm, pTextSizeInf); + CtorInitTextCursor(pTextFrame, pTextSizeInf); } - bool GetCharRect(SwRect *, const sal_Int32, SwCrsrMoveState* = nullptr, + bool GetCharRect(SwRect *, const sal_Int32, SwCursorMoveState* = nullptr, const long nMax = 0 ); - bool GetEndCharRect(SwRect *, const sal_Int32, SwCrsrMoveState* = nullptr, + bool GetEndCharRect(SwRect *, const sal_Int32, SwCursorMoveState* = nullptr, const long nMax = 0 ); - sal_Int32 GetCrsrOfst( SwPosition *pPos, const Point &rPoint, - bool bChgNode, SwCrsrMoveState* = nullptr ) const; + sal_Int32 GetCursorOfst( SwPosition *pPos, const Point &rPoint, + bool bChgNode, SwCursorMoveState* = nullptr ) const; // Respects ambiguities: For the implementation see below - const SwLineLayout *CharCrsrToLine( const sal_Int32 nPos ); + const SwLineLayout *CharCursorToLine( const sal_Int32 nPos ); // calculates baseline for portion rPor // bAutoToCentered indicates, if AUTOMATIC mode means CENTERED or BASELINE diff --git a/sw/source/core/text/pordrop.hxx b/sw/source/core/text/pordrop.hxx index a4ac1422830a..1c747d113102 100644 --- a/sw/source/core/text/pordrop.hxx +++ b/sw/source/core/text/pordrop.hxx @@ -85,7 +85,7 @@ public: void PaintDrop( const SwTextPaintInfo &rInf ) const; virtual bool Format( SwTextFormatInfo &rInf ) override; virtual SwPosSize GetTextSize( const SwTextSizeInfo &rInfo ) const override; - virtual sal_Int32 GetCrsrOfst( const sal_uInt16 nOfst ) const override; + virtual sal_Int32 GetCursorOfst( const sal_uInt16 nOfst ) const override; inline sal_uInt16 GetLines() const { return nLines; } inline sal_uInt16 GetDistance() const { return nDistance; } diff --git a/sw/source/core/text/porexp.cxx b/sw/source/core/text/porexp.cxx index 44afffdda300..90a290f9fc63 100644 --- a/sw/source/core/text/porexp.cxx +++ b/sw/source/core/text/porexp.cxx @@ -22,8 +22,8 @@ #include <inftxt.hxx> #include <porexp.hxx> -sal_Int32 SwExpandPortion::GetCrsrOfst( const sal_uInt16 nOfst ) const -{ return SwLinePortion::GetCrsrOfst( nOfst ); } +sal_Int32 SwExpandPortion::GetCursorOfst( const sal_uInt16 nOfst ) const +{ return SwLinePortion::GetCursorOfst( nOfst ); } bool SwExpandPortion::GetExpText( const SwTextSizeInfo&, OUString &rText ) const { diff --git a/sw/source/core/text/porexp.hxx b/sw/source/core/text/porexp.hxx index 166c77c58422..60b10175ed7c 100644 --- a/sw/source/core/text/porexp.hxx +++ b/sw/source/core/text/porexp.hxx @@ -27,7 +27,7 @@ class SwExpandPortion : public SwTextPortion public: inline SwExpandPortion() { SetWhichPor( POR_EXP ); } virtual bool Format( SwTextFormatInfo &rInf ) override; - virtual sal_Int32 GetCrsrOfst( const sal_uInt16 nOfst ) const override; + virtual sal_Int32 GetCursorOfst( const sal_uInt16 nOfst ) const override; virtual bool GetExpText( const SwTextSizeInfo &rInf, OUString &rText ) const override; virtual SwPosSize GetTextSize( const SwTextSizeInfo &rInfo ) const override; virtual void Paint( const SwTextPaintInfo &rInf ) const override; diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx index 3f40a3384879..d28a18be387c 100644 --- a/sw/source/core/text/porfld.cxx +++ b/sw/source/core/text/porfld.cxx @@ -511,7 +511,7 @@ SwNumberPortion::SwNumberPortion( const OUString &rExpand, SetCenter( bCntr ); } -sal_Int32 SwNumberPortion::GetCrsrOfst( const sal_uInt16 ) const +sal_Int32 SwNumberPortion::GetCursorOfst( const sal_uInt16 ) const { return 0; } @@ -549,12 +549,12 @@ bool SwNumberPortion::Format( SwTextFormatInfo &rInf ) if ( !mbLabelAlignmentPosAndSpaceModeActive ) { - if ( !rInf.GetTextFrm()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING) && + if ( !rInf.GetTextFrame()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING) && // #i32902# !IsFootnoteNumPortion() ) { nDiff = rInf.Left() - + rInf.GetTextFrm()->GetTextNode()-> + + rInf.GetTextFrame()->GetTextNode()-> GetSwAttrSet().GetLRSpace().GetTextFirstLineOfst() - rInf.First() + rInf.ForcedLeftMargin(); @@ -577,7 +577,7 @@ bool SwNumberPortion::Format( SwTextFormatInfo &rInf ) nDiff = nFixWidth + nMinDist; // Numbering evades the Fly, no nDiff in the second round - // Tricky special case: FlyFrm is in an Area we're just about to + // Tricky special case: FlyFrame is in an Area we're just about to // acquire // The NumberPortion is marked as hidden const bool bFly = rInf.GetFly() || @@ -687,8 +687,8 @@ void SwNumberPortion::Paint( const SwTextPaintInfo &rInf ) const sal_uInt16 nSpaceOffs = nFixWidth; pThis->Width( nFixWidth ); - if( ( IsLeft() && ! rInf.GetTextFrm()->IsRightToLeft() ) || - ( ! IsLeft() && ! IsCenter() && rInf.GetTextFrm()->IsRightToLeft() ) ) + if( ( IsLeft() && ! rInf.GetTextFrame()->IsRightToLeft() ) || + ( ! IsLeft() && ! IsCenter() && rInf.GetTextFrame()->IsRightToLeft() ) ) SwExpandPortion::Paint( rInf ); else { @@ -753,7 +753,7 @@ SwBulletPortion::SwBulletPortion( const sal_Unicode cBullet, #define GRFNUM_SECURE 10 SwGrfNumPortion::SwGrfNumPortion( - SwFrm*, + SwFrame*, const OUString& rGraphicFollowedBy, const SvxBrushItem* pGrfBrush, const SwFormatVertOrient* pGrfOrient, const Size& rGrfSize, @@ -858,7 +858,7 @@ bool SwGrfNumPortion::Format( SwTextFormatInfo &rInf ) nDiff = nFixWidth + nMinDist; // Numbering evades Fly, no nDiff in the second round - // Tricky special case: FlyFrm is in the Area we were just + // Tricky special case: FlyFrame is in the Area we were just // about to get a hold of. // The NumberPortion is marked as hidden if( nDiff > rInf.Width() ) @@ -895,8 +895,8 @@ void SwGrfNumPortion::Paint( const SwTextPaintInfo &rInf ) const Size aSize( nTmpWidth, GetGrfHeight() - 2 * GRFNUM_SECURE ); const bool bTmpLeft = mbLabelAlignmentPosAndSpaceModeActive || - ( IsLeft() && ! rInf.GetTextFrm()->IsRightToLeft() ) || - ( ! IsLeft() && ! IsCenter() && rInf.GetTextFrm()->IsRightToLeft() ); + ( IsLeft() && ! rInf.GetTextFrame()->IsRightToLeft() ) || + ( ! IsLeft() && ! IsCenter() && rInf.GetTextFrame()->IsRightToLeft() ); if( nFixWidth < Width() && !bTmpLeft ) { @@ -932,8 +932,8 @@ void SwGrfNumPortion::Paint( const SwTextPaintInfo &rInf ) const bDraw = !rInf.GetOpt().IsGraphic(); if( !nId ) { - SetId( sal_IntPtr( rInf.GetTextFrm() ) ); - rInf.GetTextFrm()->SetAnimation(); + SetId( sal_IntPtr( rInf.GetTextFrame() ) ); + rInf.GetTextFrame()->SetAnimation(); } if( aTmp.IsOver( rInf.GetPaintRect() ) && !bDraw ) { @@ -947,7 +947,7 @@ void SwGrfNumPortion::Paint( const SwTextPaintInfo &rInf ) const Graphic* pGraph = const_cast<Graphic*>(pBrush->GetGraphic()); if (pGraph) pGraph->StopAnimation(nullptr,nId); - rInf.GetTextFrm()->getRootFrm()->GetCurrShell()->InvalidateWindows( aTmp ); + rInf.GetTextFrame()->getRootFrame()->GetCurrShell()->InvalidateWindows( aTmp ); } else if ( pViewShell && @@ -978,17 +978,17 @@ void SwGrfNumPortion::Paint( const SwTextPaintInfo &rInf ) const } SwRect aRepaint( rInf.GetPaintRect() ); - const SwTextFrm& rFrm = *rInf.GetTextFrm(); - if( rFrm.IsVertical() ) + const SwTextFrame& rFrame = *rInf.GetTextFrame(); + if( rFrame.IsVertical() ) { - rFrm.SwitchHorizontalToVertical( aTmp ); - rFrm.SwitchHorizontalToVertical( aRepaint ); + rFrame.SwitchHorizontalToVertical( aTmp ); + rFrame.SwitchHorizontalToVertical( aRepaint ); } - if( rFrm.IsRightToLeft() ) + if( rFrame.IsRightToLeft() ) { - rFrm.SwitchLTRtoRTL( aTmp ); - rFrm.SwitchLTRtoRTL( aRepaint ); + rFrame.SwitchLTRtoRTL( aTmp ); + rFrame.SwitchLTRtoRTL( aRepaint ); } if( bDraw && aTmp.HasArea() ) @@ -1034,9 +1034,9 @@ void SwGrfNumPortion::SetBase( long nLnAscent, long nLnDescent, } } -void SwTextFrm::StopAnimation( OutputDevice* pOut ) +void SwTextFrame::StopAnimation( OutputDevice* pOut ) { - OSL_ENSURE( HasAnimation(), "SwTextFrm::StopAnimation: Which Animation?" ); + OSL_ENSURE( HasAnimation(), "SwTextFrame::StopAnimation: Which Animation?" ); if( HasPara() ) { SwLineLayout *pLine = GetPara(); @@ -1178,7 +1178,7 @@ bool SwCombinedPortion::Format( SwTextFormatInfo &rInf ) } const sal_Int32 nTop = ( nCount + 1 ) / 2; // the first character of the second line - SwViewShell *pSh = rInf.GetTextFrm()->getRootFrm()->GetCurrShell(); + SwViewShell *pSh = rInf.GetTextFrame()->getRootFrame()->GetCurrShell(); SwFont aTmpFont( *rInf.GetFont() ); SwFontSave aFontSave( rInf, &aTmpFont ); nProportion = 55; diff --git a/sw/source/core/text/porfld.hxx b/sw/source/core/text/porfld.hxx index 69088b37b4b4..3efd8983da00 100644 --- a/sw/source/core/text/porfld.hxx +++ b/sw/source/core/text/porfld.hxx @@ -26,7 +26,7 @@ class SwFont; class SvxBrushItem; class SwFormatVertOrient; -class SwFrm; +class SwFrame; class SwFieldPortion : public SwExpandPortion { @@ -138,7 +138,7 @@ public: const sal_uInt16 nMinDst, const bool bLabelAlignmentPosAndSpaceModeActive ); virtual void Paint( const SwTextPaintInfo &rInf ) const override; - virtual sal_Int32 GetCrsrOfst( const sal_uInt16 nOfst ) const override; + virtual sal_Int32 GetCursorOfst( const sal_uInt16 nOfst ) const override; virtual bool Format( SwTextFormatInfo &rInf ) override; // Field cloner for SplitGlue @@ -169,7 +169,7 @@ class SwGrfNumPortion : public SwNumberPortion SwTwips nGrfHeight; sal_Int16 eOrient; public: - SwGrfNumPortion( SwFrm *pFrm, + SwGrfNumPortion( SwFrame *pFrame, const OUString& rGraphicFollowedBy, const SvxBrushItem* pGrfBrush, const SwFormatVertOrient* pGrfOrient, diff --git a/sw/source/core/text/porfly.cxx b/sw/source/core/text/porfly.cxx index 9fa002ba6b6b..f824098991bd 100644 --- a/sw/source/core/text/porfly.cxx +++ b/sw/source/core/text/porfly.cxx @@ -147,7 +147,7 @@ bool SwFlyCntPortion::Format( SwTextFormatInfo &rInf ) * @param nStart * @param nEnd */ -void SwTextFrm::MoveFlyInCnt( SwTextFrm *pNew, sal_Int32 nStart, sal_Int32 nEnd ) +void SwTextFrame::MoveFlyInCnt( SwTextFrame *pNew, sal_Int32 nStart, sal_Int32 nEnd ) { SwSortedObjs *pObjs = nullptr; if ( nullptr != (pObjs = GetDrawObjs()) ) @@ -163,10 +163,10 @@ void SwTextFrm::MoveFlyInCnt( SwTextFrm *pNew, sal_Int32 nStart, sal_Int32 nEnd const sal_Int32 nIdx = pPos->nContent.GetIndex(); if ( nIdx >= nStart && nEnd > nIdx ) { - if ( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) != nullptr ) + if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr ) { - RemoveFly( static_cast<SwFlyFrm*>(pAnchoredObj) ); - pNew->AppendFly( static_cast<SwFlyFrm*>(pAnchoredObj) ); + RemoveFly( static_cast<SwFlyFrame*>(pAnchoredObj) ); + pNew->AppendFly( static_cast<SwFlyFrame*>(pAnchoredObj) ); } else if ( dynamic_cast< const SwAnchoredDrawObject *>( pAnchoredObj ) != nullptr ) { @@ -180,7 +180,7 @@ void SwTextFrm::MoveFlyInCnt( SwTextFrm *pNew, sal_Int32 nStart, sal_Int32 nEnd } } -sal_Int32 SwTextFrm::CalcFlyPos( SwFrameFormat* pSearch ) +sal_Int32 SwTextFrame::CalcFlyPos( SwFrameFormat* pSearch ) { SwpHints* pHints = GetTextNode()->GetpSwpHints(); OSL_ENSURE( pHints, "CalcFlyPos: Why me?" ); @@ -207,7 +207,7 @@ void SwFlyCntPortion::Paint( const SwTextPaintInfo &rInf ) const { if( bDraw ) { - if( !static_cast<SwDrawContact*>(pContact)->GetAnchorFrm() ) + if( !static_cast<SwDrawContact*>(pContact)->GetAnchorFrame() ) { // No direct positioning of the drawing object is needed SwDrawContact* pDrawContact = static_cast<SwDrawContact*>(pContact); @@ -220,25 +220,25 @@ void SwFlyCntPortion::Paint( const SwTextPaintInfo &rInf ) const // Re-paint everything at a CompletePaint call SwRect aRepaintRect( rInf.GetPaintRect() ); - if ( rInf.GetTextFrm()->IsRightToLeft() ) - rInf.GetTextFrm()->SwitchLTRtoRTL( aRepaintRect ); + if ( rInf.GetTextFrame()->IsRightToLeft() ) + rInf.GetTextFrame()->SwitchLTRtoRTL( aRepaintRect ); - if ( rInf.GetTextFrm()->IsVertical() ) - rInf.GetTextFrm()->SwitchHorizontalToVertical( aRepaintRect ); + if ( rInf.GetTextFrame()->IsVertical() ) + rInf.GetTextFrame()->SwitchHorizontalToVertical( aRepaintRect ); - if( (GetFlyFrm()->IsCompletePaint() || - GetFlyFrm()->Frm().IsOver( aRepaintRect )) && - SwFlyFrm::IsPaint( const_cast<SwVirtFlyDrawObj*>(GetFlyFrm()->GetVirtDrawObj()), - GetFlyFrm()->getRootFrm()->GetCurrShell() )) + if( (GetFlyFrame()->IsCompletePaint() || + GetFlyFrame()->Frame().IsOver( aRepaintRect )) && + SwFlyFrame::IsPaint( const_cast<SwVirtFlyDrawObj*>(GetFlyFrame()->GetVirtDrawObj()), + GetFlyFrame()->getRootFrame()->GetCurrShell() )) { - SwRect aRect( GetFlyFrm()->Frm() ); - if( !GetFlyFrm()->IsCompletePaint() ) + SwRect aRect( GetFlyFrame()->Frame() ); + if( !GetFlyFrame()->IsCompletePaint() ) aRect._Intersection( aRepaintRect ); - // GetFlyFrm() may change the layout mode at the output device. + // GetFlyFrame() may change the layout mode at the output device. { SwLayoutModeModifier aLayoutModeModifier( *rInf.GetOut() ); - GetFlyFrm()->Paint( const_cast<vcl::RenderContext&>(*rInf.GetOut()), aRect ); + GetFlyFrame()->Paint( const_cast<vcl::RenderContext&>(*rInf.GetOut()), aRect ); } ((SwTextPaintInfo&)rInf).GetRefDev()->SetLayoutMode( rInf.GetOut()->GetLayoutMode() ); @@ -258,8 +258,8 @@ void SwFlyCntPortion::Paint( const SwTextPaintInfo &rInf ) const /** * Use the dimensions of pFly->OutRect() */ -SwFlyCntPortion::SwFlyCntPortion( const SwTextFrm& rFrm, - SwFlyInCntFrm *pFly, const Point &rBase, +SwFlyCntPortion::SwFlyCntPortion( const SwTextFrame& rFrame, + SwFlyInContentFrame *pFly, const Point &rBase, long nLnAscent, long nLnDescent, long nFlyAsc, long nFlyDesc, objectpositioning::AsCharFlags nFlags ) : @@ -268,14 +268,14 @@ SwFlyCntPortion::SwFlyCntPortion( const SwTextFrm& rFrm, bMax( false ), nAlign( 0 ) { - OSL_ENSURE( pFly, "SwFlyCntPortion::SwFlyCntPortion: no SwFlyInCntFrm!" ); + OSL_ENSURE( pFly, "SwFlyCntPortion::SwFlyCntPortion: no SwFlyInContentFrame!" ); nLineLength = 1; nFlags |= AS_CHAR_ULSPACE | AS_CHAR_INIT; - SetBase( rFrm, rBase, nLnAscent, nLnDescent, nFlyAsc, nFlyDesc, nFlags ); + SetBase( rFrame, rBase, nLnAscent, nLnDescent, nFlyAsc, nFlyDesc, nFlags ); SetWhichPor( POR_FLYCNT ); } -SwFlyCntPortion::SwFlyCntPortion( const SwTextFrm& rFrm, +SwFlyCntPortion::SwFlyCntPortion( const SwTextFrame& rFrame, SwDrawContact *pDrawContact, const Point &rBase, long nLnAscent, long nLnDescent, long nFlyAsc, long nFlyDesc, @@ -286,7 +286,7 @@ SwFlyCntPortion::SwFlyCntPortion( const SwTextFrm& rFrm, nAlign( 0 ) { OSL_ENSURE( pDrawContact, "SwFlyCntPortion::SwFlyCntPortion: no SwDrawContact!" ); - if( !pDrawContact->GetAnchorFrm() ) + if( !pDrawContact->GetAnchorFrame() ) { // No direct positioning needed any more pDrawContact->ConnectToLayout(); @@ -297,7 +297,7 @@ SwFlyCntPortion::SwFlyCntPortion( const SwTextFrm& rFrm, nLineLength = 1; nFlags |= AS_CHAR_ULSPACE | AS_CHAR_INIT; - SetBase( rFrm, rBase, nLnAscent, nLnDescent, nFlyAsc, nFlyDesc, nFlags ); + SetBase( rFrame, rBase, nLnAscent, nLnDescent, nFlyAsc, nFlyDesc, nFlags ); SetWhichPor( POR_FLYCNT ); } @@ -308,7 +308,7 @@ SwFlyCntPortion::SwFlyCntPortion( const SwTextFrm& rFrm, * * @param rBase CAUTION: needs to be an absolute value! */ -void SwFlyCntPortion::SetBase( const SwTextFrm& rFrm, const Point &rBase, +void SwFlyCntPortion::SetBase( const SwTextFrame& rFrame, const Point &rBase, long nLnAscent, long nLnDescent, long nFlyAsc, long nFlyDesc, objectpositioning::AsCharFlags nFlags ) @@ -319,10 +319,10 @@ void SwFlyCntPortion::SetBase( const SwTextFrm& rFrm, const Point &rBase, if( bDraw ) { // Determine drawing object ('master' or 'virtual') by frame - pSdrObj = GetDrawContact()->GetDrawObjectByAnchorFrm( rFrm ); + pSdrObj = GetDrawContact()->GetDrawObjectByAnchorFrame( rFrame ); if ( !pSdrObj ) { - OSL_FAIL( "SwFlyCntPortion::SetBase(..) - No drawing object found by <GetDrawContact()->GetDrawObjectByAnchorFrm( rFrm )>" ); + OSL_FAIL( "SwFlyCntPortion::SetBase(..) - No drawing object found by <GetDrawContact()->GetDrawObjectByAnchorFrame( rFrame )>" ); pSdrObj = GetDrawContact()->GetMaster(); } @@ -336,7 +336,7 @@ void SwFlyCntPortion::SetBase( const SwTextFrm& rFrm, const Point &rBase, } else { - pSdrObj = GetFlyFrm()->GetVirtDrawObj(); + pSdrObj = GetFlyFrame()->GetVirtDrawObj(); } if (!pSdrObj) @@ -368,12 +368,12 @@ void SwFlyCntPortion::SetBase( const SwTextFrm& rFrm, const Point &rBase, SwFormatHoriOrient aHori(pTextBox->GetHoriOrient()); aHori.SetHoriOrient(css::text::HoriOrientation::NONE); - sal_Int32 nLeft = aTextRectangle.getX() - rFrm.Frm().Left(); + sal_Int32 nLeft = aTextRectangle.getX() - rFrame.Frame().Left(); aHori.SetPos(nLeft); SwFormatVertOrient aVert(pTextBox->GetVertOrient()); aVert.SetVertOrient(css::text::VertOrientation::NONE); - sal_Int32 nTop = aTextRectangle.getY() - rFrm.Frm().Top() - nFlyAsc; + sal_Int32 nTop = aTextRectangle.getY() - rFrame.Frame().Top() - nFlyAsc; aVert.SetPos(nTop); pTextBox->LockModify(); @@ -414,24 +414,24 @@ void SwFlyCntPortion::SetBase( const SwTextFrm& rFrm, const Point &rBase, } } -sal_Int32 SwFlyCntPortion::GetFlyCrsrOfst( const sal_uInt16 nOfst, - const Point &rPoint, SwPosition *pPos, SwCrsrMoveState* pCMS ) const +sal_Int32 SwFlyCntPortion::GetFlyCursorOfst( const sal_uInt16 nOfst, + const Point &rPoint, SwPosition *pPos, SwCursorMoveState* pCMS ) const { - // As the FlyCnt are not attached to the side, their GetCrsrOfst() will + // As the FlyCnt are not attached to the side, their GetCursorOfst() will // not be called. // In order to reduce management overhead for the layout page, the paragraph - // calls the FlyFrm's GetCrsrOfst() only when needed + // calls the FlyFrame's GetCursorOfst() only when needed Point aPoint( rPoint ); - if( !pPos || bDraw || !( GetFlyFrm()->GetCrsrOfst( pPos, aPoint, pCMS ) ) ) - return SwLinePortion::GetCrsrOfst( nOfst ); + if( !pPos || bDraw || !( GetFlyFrame()->GetCursorOfst( pPos, aPoint, pCMS ) ) ) + return SwLinePortion::GetCursorOfst( nOfst ); else return 0; } -sal_Int32 SwFlyCntPortion::GetCrsrOfst( const sal_uInt16 nOfst ) const +sal_Int32 SwFlyCntPortion::GetCursorOfst( const sal_uInt16 nOfst ) const { - // OSL_FAIL("SwFlyCntPortion::GetCrsrOfst: use GetFlyCrsrOfst()"); - return SwLinePortion::GetCrsrOfst( nOfst ); + // OSL_FAIL("SwFlyCntPortion::GetCursorOfst: use GetFlyCursorOfst()"); + return SwLinePortion::GetCursorOfst( nOfst ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/text/porfly.hxx b/sw/source/core/text/porfly.hxx index 941388a86fc6..f78765f267ba 100644 --- a/sw/source/core/text/porfly.hxx +++ b/sw/source/core/text/porfly.hxx @@ -24,9 +24,9 @@ #include "porglue.hxx" class SwDrawContact; -class SwFlyInCntFrm; -class SwTextFrm; -struct SwCrsrMoveState; +class SwFlyInContentFrame; +class SwTextFrame; +struct SwCursorMoveState; class SwFlyPortion : public SwFixPortion { @@ -44,28 +44,28 @@ public: /// This portion represents an as-character anchored fly (shape, frame, etc.) class SwFlyCntPortion : public SwLinePortion { - void *pContact; // bDraw ? DrawContact : FlyInCntFrm + void *pContact; // bDraw ? DrawContact : FlyInContentFrame Point aRef; // Relatively to this point we calculate the AbsPos bool bDraw : 1; // DrawContact? bool bMax : 1; // Line adjustment and height == line height sal_uInt8 nAlign : 3; // Line adjustment? No, above, middle, bottom - virtual sal_Int32 GetCrsrOfst( const sal_uInt16 nOfst ) const override; + virtual sal_Int32 GetCursorOfst( const sal_uInt16 nOfst ) const override; public: // Use new datatype for parameter <nFlags> - SwFlyCntPortion( const SwTextFrm& rFrm, SwFlyInCntFrm *pFly, + SwFlyCntPortion( const SwTextFrame& rFrame, SwFlyInContentFrame *pFly, const Point &rBase, long nAscent, long nDescent, long nFlyAsc, long nFlyDesc, objectpositioning::AsCharFlags nFlags ); // Use new datatype for parameter <nFlags> - SwFlyCntPortion( const SwTextFrm& rFrm, SwDrawContact *pDrawContact, + SwFlyCntPortion( const SwTextFrame& rFrame, SwDrawContact *pDrawContact, const Point &rBase, long nAscent, long nDescent, long nFlyAsc, long nFlyDesc, objectpositioning::AsCharFlags nFlags ); inline const Point& GetRefPoint() const { return aRef; } - inline SwFlyInCntFrm *GetFlyFrm() { return static_cast<SwFlyInCntFrm*>(pContact); } - inline const SwFlyInCntFrm *GetFlyFrm() const - { return static_cast<SwFlyInCntFrm*>(pContact); } + inline SwFlyInContentFrame *GetFlyFrame() { return static_cast<SwFlyInContentFrame*>(pContact); } + inline const SwFlyInContentFrame *GetFlyFrame() const + { return static_cast<SwFlyInContentFrame*>(pContact); } inline SwDrawContact *GetDrawContact() { return static_cast<SwDrawContact*>(pContact); } inline const SwDrawContact* GetDrawContact() const { return static_cast<SwDrawContact*>(pContact); } @@ -75,12 +75,12 @@ public: inline void SetAlign( sal_uInt8 nNew ) { nAlign = nNew; } inline void SetMax( bool bNew ) { bMax = bNew; } // Use new datatype for parameter <nFlags> - void SetBase( const SwTextFrm& rFrm, const Point &rBase, + void SetBase( const SwTextFrame& rFrame, const Point &rBase, long nLnAscent, long nLnDescent, long nFlyAscent, long nFlyDescent, objectpositioning::AsCharFlags nFlags ); - sal_Int32 GetFlyCrsrOfst( const sal_uInt16 nOfst, const Point &rPoint, - SwPosition *pPos, SwCrsrMoveState* pCMS ) const; + sal_Int32 GetFlyCursorOfst( const sal_uInt16 nOfst, const Point &rPoint, + SwPosition *pPos, SwCursorMoveState* pCMS ) const; virtual bool Format( SwTextFormatInfo &rInf ) override; virtual void Paint( const SwTextPaintInfo &rInf ) const override; OUTPUT_OPERATOR_OVERRIDE diff --git a/sw/source/core/text/porftn.hxx b/sw/source/core/text/porftn.hxx index 6051c26dbcb1..1d8b333ad136 100644 --- a/sw/source/core/text/porftn.hxx +++ b/sw/source/core/text/porftn.hxx @@ -21,7 +21,7 @@ #include "porfld.hxx" -class SwTextFrm; +class SwTextFrame; class SwTextFootnote; class SwFootnotePortion : public SwFieldPortion @@ -84,7 +84,7 @@ class SwErgoSumPortion : public SwFieldPortion { public: SwErgoSumPortion( const OUString &rExp, const OUString& rStr ); - virtual sal_Int32 GetCrsrOfst( const sal_uInt16 nOfst ) const override; + virtual sal_Int32 GetCursorOfst( const sal_uInt16 nOfst ) const override; virtual bool Format( SwTextFormatInfo &rInf ) override; // Field cloner for SplitGlue diff --git a/sw/source/core/text/porglue.cxx b/sw/source/core/text/porglue.cxx index e5e130166997..47004e5bbd43 100644 --- a/sw/source/core/text/porglue.cxx +++ b/sw/source/core/text/porglue.cxx @@ -34,10 +34,10 @@ SwGluePortion::SwGluePortion( const sal_uInt16 nInitFixWidth ) SetWhichPor( POR_GLUE ); } -sal_Int32 SwGluePortion::GetCrsrOfst( const sal_uInt16 nOfst ) const +sal_Int32 SwGluePortion::GetCursorOfst( const sal_uInt16 nOfst ) const { if( !GetLen() || nOfst > GetLen() || !Width() ) - return SwLinePortion::GetCrsrOfst( nOfst ); + return SwLinePortion::GetCursorOfst( nOfst ); else return nOfst / (Width() / GetLen()); } diff --git a/sw/source/core/text/porglue.hxx b/sw/source/core/text/porglue.hxx index c43f0418d196..98ff30b6b48a 100644 --- a/sw/source/core/text/porglue.hxx +++ b/sw/source/core/text/porglue.hxx @@ -41,7 +41,7 @@ public: inline void MoveHalfGlue( SwGluePortion *pTarget ); inline void AdjFixWidth(); virtual void Paint( const SwTextPaintInfo &rInf ) const override; - virtual sal_Int32 GetCrsrOfst( const sal_uInt16 nOfst ) const override; + virtual sal_Int32 GetCursorOfst( const sal_uInt16 nOfst ) const override; virtual SwPosSize GetTextSize( const SwTextSizeInfo &rInfo ) const override; virtual bool GetExpText( const SwTextSizeInfo &rInf, OUString &rText ) const override; diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx index 7d483f5d5c72..e29d93f485a7 100644 --- a/sw/source/core/text/porlay.cxx +++ b/sw/source/core/text/porlay.cxx @@ -270,7 +270,7 @@ void SwLineLayout::CalcLine( SwTextFormatter &rLine, SwTextFormatInfo &rInf ) // #i3952# const bool bIgnoreBlanksAndTabsForLineHeightCalculation = - rInf.GetTextFrm()->GetNode()->getIDocumentSettingAccess()->get(DocumentSettingId::IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION); + rInf.GetTextFrame()->GetNode()->getIDocumentSettingAccess()->get(DocumentSettingId::IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION); bool bHasBlankPortion = false; bool bHasOnlyBlankPortions = true; @@ -299,7 +299,7 @@ void SwLineLayout::CalcLine( SwTextFormatter &rLine, SwTextFormatInfo &rInf ) SAL_WARN_IF( POR_LIN == pPos->GetWhichPor(), "sw.core", "SwLineLayout::CalcLine: don't use SwLinePortions !" ); - // Null portions are eliminated. They can form if two FlyFrms + // Null portions are eliminated. They can form if two FlyFrames // overlap. if( !pPos->Compress() ) { @@ -1937,10 +1937,10 @@ sal_Int32 SwScriptInfo::ThaiJustify( const OUString& rText, long* pKernArray, SwScriptInfo* SwScriptInfo::GetScriptInfo( const SwTextNode& rTNd, bool bAllowInvalid ) { - SwIterator<SwTextFrm,SwTextNode> aIter( rTNd ); + SwIterator<SwTextFrame,SwTextNode> aIter( rTNd ); SwScriptInfo* pScriptInfo = nullptr; - for( SwTextFrm* pLast = aIter.First(); pLast; pLast = aIter.Next() ) + for( SwTextFrame* pLast = aIter.First(); pLast; pLast = aIter.Next() ) { pScriptInfo = const_cast<SwScriptInfo*>(pLast->GetScriptInfo()); if ( pScriptInfo ) @@ -2031,7 +2031,7 @@ SwTwips SwLineLayout::_GetHangingMargin() const return nDiff; } -SwTwips SwTextFrm::HangingMargin() const +SwTwips SwTextFrame::HangingMargin() const { SAL_WARN_IF( !HasPara(), "sw.core", "Don't call me without a paraportion" ); if( !GetPara()->IsMargin() ) diff --git a/sw/source/core/text/porlay.hxx b/sw/source/core/text/porlay.hxx index 3e6079b2d097..29018d0e45a8 100644 --- a/sw/source/core/text/porlay.hxx +++ b/sw/source/core/text/porlay.hxx @@ -237,7 +237,7 @@ class SwParaPortion : public SwLineLayout // Fraction aZoom; long m_nDelta; - // If a SwTextFrm is locked, no changes occur to the formatting data (under + // If a SwTextFrame is locked, no changes occur to the formatting data (under // pLine) (compare with Orphans) bool m_bFlys : 1; // Overlapping Flys? bool m_bPrep : 1; // PREP_* @@ -270,7 +270,7 @@ public: inline SwScriptInfo& GetScriptInfo() { return m_aScriptInfo; } inline const SwScriptInfo& GetScriptInfo() const { return m_aScriptInfo; } - // For SwTextFrm::Format: returns the paragraph's current length + // For SwTextFrame::Format: returns the paragraph's current length sal_Int32 GetParLen() const; // For Prepare() @@ -332,7 +332,7 @@ inline void SwParaPortion::FormatReset() { m_nDelta = 0; m_aReformat = SwCharRange(0, COMPLETE_STRING); - // bFlys needs to be retained in SwTextFrm::_Format() so that empty + // bFlys needs to be retained in SwTextFrame::_Format() so that empty // paragraphs that needed to avoid Frames with no flow, reformat // when the Frame disappears from the Area // bFlys = false; diff --git a/sw/source/core/text/porlin.cxx b/sw/source/core/text/porlin.cxx index 3aec6cad6347..bf138cd3665a 100644 --- a/sw/source/core/text/porlin.cxx +++ b/sw/source/core/text/porlin.cxx @@ -98,12 +98,12 @@ void SwLinePortion::PrePaint( const SwTextPaintInfo& rInf, sal_uInt16 nPos; SwTextPaintInfo aInf( rInf ); - const bool bBidiPor = rInf.GetTextFrm()->IsRightToLeft() != + const bool bBidiPor = rInf.GetTextFrame()->IsRightToLeft() != bool( TEXT_LAYOUT_BIDI_RTL & rInf.GetOut()->GetLayoutMode() ); sal_uInt16 nDir = bBidiPor ? 1800 : - rInf.GetFont()->GetOrientation( rInf.GetTextFrm()->IsVertical() ); + rInf.GetFont()->GetOrientation( rInf.GetTextFrame()->IsVertical() ); switch ( nDir ) { @@ -222,7 +222,7 @@ SwLinePortion *SwLinePortion::FindPrevPortion( const SwLinePortion *pRoot ) return pPos; } -sal_Int32 SwLinePortion::GetCrsrOfst( const sal_uInt16 nOfst ) const +sal_Int32 SwLinePortion::GetCursorOfst( const sal_uInt16 nOfst ) const { if( nOfst > ( PrtWidth() / 2 ) ) return GetLen(); @@ -271,9 +271,9 @@ void SwLinePortion::FormatEOL( SwTextFormatInfo & ) void SwLinePortion::Move( SwTextPaintInfo &rInf ) { bool bB2T = rInf.GetDirection() == DIR_BOTTOM2TOP; - const bool bFrmDir = rInf.GetTextFrm()->IsRightToLeft(); - bool bCounterDir = ( ! bFrmDir && DIR_RIGHT2LEFT == rInf.GetDirection() ) || - ( bFrmDir && DIR_LEFT2RIGHT == rInf.GetDirection() ); + const bool bFrameDir = rInf.GetTextFrame()->IsRightToLeft(); + bool bCounterDir = ( ! bFrameDir && DIR_RIGHT2LEFT == rInf.GetDirection() ) || + ( bFrameDir && DIR_LEFT2RIGHT == rInf.GetDirection() ); if ( InSpaceGrp() && rInf.GetSpaceAdd() ) { diff --git a/sw/source/core/text/porlin.hxx b/sw/source/core/text/porlin.hxx index 85d2a2f81eca..486827db2e39 100644 --- a/sw/source/core/text/porlin.hxx +++ b/sw/source/core/text/porlin.hxx @@ -148,7 +148,7 @@ public: SwLinePortion *FindPrevPortion( const SwLinePortion *pRoot ); SwLinePortion *FindLastPortion(); - virtual sal_Int32 GetCrsrOfst( const sal_uInt16 nOfst ) const; + virtual sal_Int32 GetCursorOfst( const sal_uInt16 nOfst ) const; virtual SwPosSize GetTextSize( const SwTextSizeInfo &rInfo ) const; void CalcTextSize( const SwTextSizeInfo &rInfo ); diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx index 5426990aaa39..53219bf4ca28 100644 --- a/sw/source/core/text/pormulti.cxx +++ b/sw/source/core/text/pormulti.cxx @@ -803,7 +803,7 @@ SwMultiCreator* SwTextSizeInfo::GetMultiCreator( sal_Int32 &rPos, } else // no nested bidi portion required - nCurrLevel = GetTextFrm()->IsRightToLeft() ? 1 : 0; + nCurrLevel = GetTextFrame()->IsRightToLeft() ? 1 : 0; // check if there is a field at rPos: sal_uInt8 nNextLevel = nCurrLevel; @@ -835,14 +835,14 @@ SwMultiCreator* SwTextSizeInfo::GetMultiCreator( sal_Int32 &rPos, const SvxCharRotateItem* pRotate = nullptr; const SfxPoolItem* pRotItem; - if( SfxItemState::SET == m_pFrm->GetTextNode()->GetSwAttrSet(). + if( SfxItemState::SET == m_pFrame->GetTextNode()->GetSwAttrSet(). GetItemState( RES_CHRATR_ROTATE, true, &pRotItem ) && static_cast<const SvxCharRotateItem*>(pRotItem)->GetValue() ) pRotate = static_cast<const SvxCharRotateItem*>(pRotItem); else pRotItem = nullptr; const SvxTwoLinesItem* p2Lines = nullptr; - const SwTextNode *pLclTextNode = m_pFrm->GetTextNode(); + const SwTextNode *pLclTextNode = m_pFrame->GetTextNode(); if( !pLclTextNode ) return nullptr; const SfxPoolItem* pItem; @@ -897,7 +897,7 @@ SwMultiCreator* SwTextSizeInfo::GetMultiCreator( sal_Int32 &rPos, pRet->pItem = nullptr; pRet->pAttr = pRuby; pRet->nId = SW_MC_RUBY; - pRet->nLevel = GetTextFrm()->IsRightToLeft() ? 1 : 0; + pRet->nLevel = GetTextFrame()->IsRightToLeft() ? 1 : 0; return pRet; } if( n2Lines < nCount || ( pItem && pItem == p2Lines && @@ -935,7 +935,7 @@ SwMultiCreator* SwTextSizeInfo::GetMultiCreator( sal_Int32 &rPos, aEnd.push_front( GetText().getLength() ); } pRet->nId = SW_MC_DOUBLE; - pRet->nLevel = GetTextFrm()->IsRightToLeft() ? 1 : 0; + pRet->nLevel = GetTextFrame()->IsRightToLeft() ? 1 : 0; // n2Lines is the index of the last 2-line-attribute, which contains // the actual position. @@ -1248,11 +1248,11 @@ SwSpaceManipulator::~SwSpaceManipulator() // Manages the paint for a SwMultiPortion. // External, for the calling function, it seems to be a normal Paint-function, -// internal it is like a SwTextFrm::Paint with multiple DrawTextLines +// internal it is like a SwTextFrame::Paint with multiple DrawTextLines void SwTextPainter::PaintMultiPortion( const SwRect &rPaint, SwMultiPortion& rMulti, const SwMultiPortion* pEnvPor ) { - SwTextGridItem const*const pGrid(GetGridItem(m_pFrm->FindPageFrm())); + SwTextGridItem const*const pGrid(GetGridItem(m_pFrame->FindPageFrame())); const bool bHasGrid = pGrid && GetInfo().SnapToGrid(); sal_uInt16 nRubyHeight = 0; bool bRubyTop = false; @@ -1278,15 +1278,15 @@ void SwTextPainter::PaintMultiPortion( const SwRect &rPaint, SwLayoutModeModifier aLayoutModeModifier( *GetInfo().GetOut() ); sal_uInt8 nEnvDir = 0; sal_uInt8 nThisDir = 0; - sal_uInt8 nFrmDir = 0; + sal_uInt8 nFrameDir = 0; if ( rMulti.IsBidi() ) { // these values are needed for the calculation of the x coordinate // and the layout mode OSL_ENSURE( ! pEnvPor || pEnvPor->IsBidi(), "Oh no, I expected a BidiPortion" ); - nFrmDir = GetInfo().GetTextFrm()->IsRightToLeft() ? 1 : 0; - nEnvDir = pEnvPor ? static_cast<const SwBidiPortion*>(pEnvPor)->GetLevel() % 2 : nFrmDir; + nFrameDir = GetInfo().GetTextFrame()->IsRightToLeft() ? 1 : 0; + nEnvDir = pEnvPor ? static_cast<const SwBidiPortion*>(pEnvPor)->GetLevel() % 2 : nFrameDir; nThisDir = static_cast<SwBidiPortion&>(rMulti).GetLevel() % 2; } @@ -1371,7 +1371,7 @@ void SwTextPainter::PaintMultiPortion( const SwRect &rPaint, SwTwips nMultiWidth = rMulti.Width() + rMulti.CalcSpacing( GetInfo().GetSpaceAdd(), GetInfo() ); - if ( nFrmDir == nThisDir ) + if ( nFrameDir == nThisDir ) GetInfo().X( GetInfo().X() - nMultiWidth ); else GetInfo().X( GetInfo().X() + nMultiWidth ); @@ -1475,7 +1475,7 @@ void SwTextPainter::PaintMultiPortion( const SwRect &rPaint, { // we do not allow any rotation inside a bidi portion SwFont* pTmpFont = GetInfo().GetFont(); - pTmpFont->SetVertical( 0, GetInfo().GetTextFrm()->IsVertical() ); + pTmpFont->SetVertical( 0, GetInfo().GetTextFrame()->IsVertical() ); } if( pPor->IsMultiPortion() && static_cast<SwMultiPortion*>(pPor)->IsBidi() ) @@ -1621,7 +1621,7 @@ static void lcl_TruncateMultiPortion( SwMultiPortion& rMulti, SwTextFormatInfo& // Manages the formatting of a SwMultiPortion. External, for the calling // function, it seems to be a normal Format-function, internal it is like a -// SwTextFrm::_Format with multiple BuildPortions +// SwTextFrame::_Format with multiple BuildPortions bool SwTextFormatter::BuildMultiPortion( SwTextFormatInfo &rInf, SwMultiPortion& rMulti ) { @@ -1655,7 +1655,7 @@ bool SwTextFormatter::BuildMultiPortion( SwTextFormatInfo &rInf, if ( rMulti.IsBidi() ) { // set layout mode - aLayoutModeModifier.Modify( ! rInf.GetTextFrm()->IsRightToLeft() ); + aLayoutModeModifier.Modify( ! rInf.GetTextFrame()->IsRightToLeft() ); } SwTwips nTmpX = 0; @@ -1669,30 +1669,30 @@ bool SwTextFormatter::BuildMultiPortion( SwTextFormatInfo &rInf, // We set nTmpX (which is used for portion calculating) to the // current Y value - const SwPageFrm* pPage = m_pFrm->FindPageFrm(); + const SwPageFrame* pPage = m_pFrame->FindPageFrame(); OSL_ENSURE( pPage, "No page in frame!"); - const SwLayoutFrm* pUpperFrm = pPage; + const SwLayoutFrame* pUpperFrame = pPage; - if ( m_pFrm->IsInTab() ) + if ( m_pFrame->IsInTab() ) { - pUpperFrm = m_pFrm->GetUpper(); - while ( pUpperFrm && !pUpperFrm->IsCellFrm() ) - pUpperFrm = pUpperFrm->GetUpper(); - assert(pUpperFrm); //pFrm is in table but does not have an upper cell frame - if (!pUpperFrm) + pUpperFrame = m_pFrame->GetUpper(); + while ( pUpperFrame && !pUpperFrame->IsCellFrame() ) + pUpperFrame = pUpperFrame->GetUpper(); + assert(pUpperFrame); //pFrame is in table but does not have an upper cell frame + if (!pUpperFrame) return false; - const SwTableLine* pLine = static_cast<const SwRowFrm*>(pUpperFrm->GetUpper())->GetTabLine(); - const SwFormatFrmSize& rFrameFormatSize = pLine->GetFrameFormat()->GetFrmSize(); + const SwTableLine* pLine = static_cast<const SwRowFrame*>(pUpperFrame->GetUpper())->GetTabLine(); + const SwFormatFrameSize& rFrameFormatSize = pLine->GetFrameFormat()->GetFrameSize(); if ( ATT_VAR_SIZE == rFrameFormatSize.GetHeightSizeType() ) - pUpperFrm = pPage; + pUpperFrame = pPage; } - if ( pUpperFrm == pPage && !m_pFrm->IsInFootnote() ) - pUpperFrm = pPage->FindBodyCont(); + if ( pUpperFrame == pPage && !m_pFrame->IsInFootnote() ) + pUpperFrame = pPage->FindBodyCont(); - nMaxWidth = pUpperFrm ? - ( rInf.GetTextFrm()->IsVertical() ? - pUpperFrm->Prt().Width() : - pUpperFrm->Prt().Height() ) : + nMaxWidth = pUpperFrame ? + ( rInf.GetTextFrame()->IsVertical() ? + pUpperFrame->Prt().Width() : + pUpperFrame->Prt().Height() ) : USHRT_MAX; } else @@ -1750,7 +1750,7 @@ bool SwTextFormatter::BuildMultiPortion( SwTextFormatInfo &rInf, SwLinePortion *pNextSecond = nullptr; bool bRet = false; - SwTextGridItem const*const pGrid(GetGridItem(m_pFrm->FindPageFrm())); + SwTextGridItem const*const pGrid(GetGridItem(m_pFrame->FindPageFrame())); const bool bHasGrid = pGrid && GRID_LINES_CHARS == pGrid->GetGridType(); bool bRubyTop = false; @@ -2196,7 +2196,7 @@ SwLinePortion* SwTextFormatter::MakeRestPortion( const SwLineLayout* pLine, if ( GetInfo().SnapToGrid() ) { SwTextGridItem const*const pGrid( - GetGridItem(m_pFrm->FindPageFrm())); + GetGridItem(m_pFrame->FindPageFrame())); if ( pGrid ) { bRubyTop = ! pGrid->GetRubyTextBelow(); @@ -2205,7 +2205,7 @@ SwLinePortion* SwTextFormatter::MakeRestPortion( const SwLineLayout* pLine, } pTmp = new SwRubyPortion( *pCreate, *GetInfo().GetFont(), - *m_pFrm->GetTextNode()->getIDocumentSettingAccess(), + *m_pFrame->GetTextNode()->getIDocumentSettingAccess(), nMultiPos, static_cast<const SwRubyPortion*>(pHelpMulti)->GetRubyOffset(), pRubyPos ); } @@ -2235,7 +2235,7 @@ SwLinePortion* SwTextFormatter::MakeRestPortion( const SwLineLayout* pLine, } // SwTextCursorSave notes the start and current line of a SwTextCursor, -// sets them to the values for GetCrsrOfst inside a multiportion +// sets them to the values for GetCursorOfst inside a multiportion // and restores them in the destructor. SwTextCursorSave::SwTextCursorSave( SwTextCursor* pCursor, SwMultiPortion* pMulti, @@ -2244,7 +2244,7 @@ SwTextCursorSave::SwTextCursorSave( SwTextCursor* pCursor, sal_Int32 nCurrStart, long nSpaceAdd ) { - pTextCrsr = pCursor; + pTextCursor = pCursor; nStart = pCursor->m_nStart; pCursor->m_nStart = nCurrStart; pCurr = pCursor->m_pCurr; @@ -2288,11 +2288,11 @@ SwTextCursorSave::SwTextCursorSave( SwTextCursor* pCursor, SwTextCursorSave::~SwTextCursorSave() { if( bSpaceChg ) - SwDoubleLinePortion::ResetSpaceAdd( pTextCrsr->m_pCurr ); - pTextCrsr->m_pCurr->Width( nWidth ); - pTextCrsr->m_pCurr = pCurr; - pTextCrsr->m_nStart = nStart; - pTextCrsr->SetPropFont( nOldProp ); + SwDoubleLinePortion::ResetSpaceAdd( pTextCursor->m_pCurr ); + pTextCursor->m_pCurr->Width( nWidth ); + pTextCursor->m_pCurr = pCurr; + pTextCursor->m_nStart = nStart; + pTextCursor->SetPropFont( nOldProp ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/text/pormulti.hxx b/sw/source/core/text/pormulti.hxx index ed87a58271e4..e2e04b43b611 100644 --- a/sw/source/core/text/pormulti.hxx +++ b/sw/source/core/text/pormulti.hxx @@ -228,7 +228,7 @@ public: class SwTextCursorSave { - SwTextCursor* pTextCrsr; + SwTextCursor* pTextCursor; SwLineLayout* pCurr; sal_Int32 nStart; sal_uInt16 nWidth; diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx index 1c45f5d5bac6..5c3f8a063058 100644 --- a/sw/source/core/text/porrst.cxx +++ b/sw/source/core/text/porrst.cxx @@ -81,7 +81,7 @@ SwBreakPortion::SwBreakPortion( const SwLinePortion &rPortion ) SetWhichPor( POR_BRK ); } -sal_Int32 SwBreakPortion::GetCrsrOfst( const sal_uInt16 ) const +sal_Int32 SwBreakPortion::GetCursorOfst( const sal_uInt16 ) const { return 0; } sal_uInt16 SwBreakPortion::GetViewWidth( const SwTextSizeInfo & ) const @@ -188,11 +188,11 @@ SwArrowPortion::SwArrowPortion( const SwLinePortion &rPortion ) : SwArrowPortion::SwArrowPortion( const SwTextPaintInfo &rInf ) : bLeft( false ) { - Height( (sal_uInt16)(rInf.GetTextFrm()->Prt().Height()) ); - aPos.X() = rInf.GetTextFrm()->Frm().Left() + - rInf.GetTextFrm()->Prt().Right(); - aPos.Y() = rInf.GetTextFrm()->Frm().Top() + - rInf.GetTextFrm()->Prt().Bottom(); + Height( (sal_uInt16)(rInf.GetTextFrame()->Prt().Height()) ); + aPos.X() = rInf.GetTextFrame()->Frame().Left() + + rInf.GetTextFrame()->Prt().Right(); + aPos.Y() = rInf.GetTextFrame()->Frame().Top() + + rInf.GetTextFrame()->Prt().Bottom(); SetWhichPor( POR_ARROW ); } @@ -203,14 +203,14 @@ void SwArrowPortion::Paint( const SwTextPaintInfo &rInf ) const SwLinePortion *SwArrowPortion::Compress() { return this; } -SwTwips SwTextFrm::EmptyHeight() const +SwTwips SwTextFrame::EmptyHeight() const { if (IsCollapse()) { - SwViewShell *pSh = getRootFrm()->GetCurrShell(); - if ( dynamic_cast<const SwCrsrShell*>( pSh ) != nullptr ) { - SwCrsrShell *pCrSh = static_cast<SwCrsrShell*>(pSh); - SwContentFrm *pCurrFrm=pCrSh->GetCurrFrm(); - if (pCurrFrm==static_cast<SwContentFrm const *>(this)) { + SwViewShell *pSh = getRootFrame()->GetCurrShell(); + if ( dynamic_cast<const SwCursorShell*>( pSh ) != nullptr ) { + SwCursorShell *pCrSh = static_cast<SwCursorShell*>(pSh); + SwContentFrame *pCurrFrame=pCrSh->GetCurrFrame(); + if (pCurrFrame==static_cast<SwContentFrame const *>(this)) { // do nothing } else { return 1; @@ -219,12 +219,12 @@ SwTwips SwTextFrm::EmptyHeight() const return 1; } } - OSL_ENSURE( ! IsVertical() || ! IsSwapped(),"SwTextFrm::EmptyHeight with swapped frame" ); + OSL_ENSURE( ! IsVertical() || ! IsSwapped(),"SwTextFrame::EmptyHeight with swapped frame" ); SwFont *pFnt; const SwTextNode& rTextNode = *GetTextNode(); const IDocumentSettingAccess* pIDSA = rTextNode.getIDocumentSettingAccess(); - SwViewShell *pSh = getRootFrm()->GetCurrShell(); + SwViewShell *pSh = getRootFrame()->GetCurrShell(); if ( rTextNode.HasSwAttrSet() ) { const SwAttrSet *pAttrSet = &( rTextNode.GetSwAttrSet() ); @@ -276,9 +276,9 @@ SwTwips SwTextFrm::EmptyHeight() const return nRet; } -bool SwTextFrm::FormatEmpty() +bool SwTextFrame::FormatEmpty() { - OSL_ENSURE( ! IsVertical() || ! IsSwapped(),"SwTextFrm::FormatEmpty with swapped frame" ); + OSL_ENSURE( ! IsVertical() || ! IsSwapped(),"SwTextFrame::FormatEmpty with swapped frame" ); bool bCollapse = EmptyHeight( ) == 1 && this->IsCollapse( ); @@ -311,7 +311,7 @@ bool SwTextFrm::FormatEmpty() if ( GetTextNode()->GetSwAttrSet().GetParaGrid().GetValue() && IsInDocBody() ) { - SwTextGridItem const*const pGrid(GetGridItem(FindPageFrm())); + SwTextGridItem const*const pGrid(GetGridItem(FindPageFrame())); if ( pGrid ) nHeight = pGrid->GetBaseHeight() + pGrid->GetRubyHeight(); } @@ -321,7 +321,7 @@ bool SwTextFrm::FormatEmpty() if( !nChg ) SetUndersized( false ); - AdjustFrm( nChg ); + AdjustFrame( nChg ); if( HasBlinkPor() ) { @@ -345,21 +345,21 @@ bool SwTextFrm::FormatEmpty() return true; } -bool SwTextFrm::FillRegister( SwTwips& rRegStart, sal_uInt16& rRegDiff ) +bool SwTextFrame::FillRegister( SwTwips& rRegStart, sal_uInt16& rRegDiff ) { - const SwFrm *pFrm = this; + const SwFrame *pFrame = this; rRegDiff = 0; while( !( ( FRM_BODY | FRM_FLY ) - & pFrm->GetType() ) && pFrm->GetUpper() ) - pFrm = pFrm->GetUpper(); - if( ( FRM_BODY| FRM_FLY ) & pFrm->GetType() ) + & pFrame->GetType() ) && pFrame->GetUpper() ) + pFrame = pFrame->GetUpper(); + if( ( FRM_BODY| FRM_FLY ) & pFrame->GetType() ) { - SWRECTFN( pFrm ) - rRegStart = (pFrm->*fnRect->fnGetPrtTop)(); - pFrm = pFrm->FindPageFrm(); - if( pFrm->IsPageFrm() ) + SWRECTFN( pFrame ) + rRegStart = (pFrame->*fnRect->fnGetPrtTop)(); + pFrame = pFrame->FindPageFrame(); + if( pFrame->IsPageFrame() ) { - SwPageDesc* pDesc = const_cast<SwPageFrm*>(static_cast<const SwPageFrm*>(pFrm))->FindPageDesc(); + SwPageDesc* pDesc = const_cast<SwPageFrame*>(static_cast<const SwPageFrame*>(pFrame))->FindPageDesc(); if( pDesc ) { rRegDiff = pDesc->GetRegHeight(); @@ -377,7 +377,7 @@ bool SwTextFrm::FillRegister( SwTwips& rRegStart, sal_uInt16& rRegDiff ) } else { - SwViewShell *pSh = getRootFrm()->GetCurrShell(); + SwViewShell *pSh = getRootFrame()->GetCurrShell(); SwFontAccess aFontAccess( pFormat, pSh ); SwFont aFnt( aFontAccess.Get()->GetFont() ); @@ -475,7 +475,7 @@ void SwHiddenTextPortion::Paint( const SwTextPaintInfo & rInf) const bool SwHiddenTextPortion::Format( SwTextFormatInfo &rInf ) { Width( 0 ); - rInf.GetTextFrm()->HideFootnotes( rInf.GetIdx(), rInf.GetIdx() + GetLen() ); + rInf.GetTextFrame()->HideFootnotes( rInf.GetIdx(), rInf.GetIdx() + GetLen() ); return false; }; diff --git a/sw/source/core/text/porrst.hxx b/sw/source/core/text/porrst.hxx index 4e5dd7a339b2..e58f0680d169 100644 --- a/sw/source/core/text/porrst.hxx +++ b/sw/source/core/text/porrst.hxx @@ -43,7 +43,7 @@ public: virtual void Paint( const SwTextPaintInfo &rInf ) const override; virtual bool Format( SwTextFormatInfo &rInf ) override; virtual sal_uInt16 GetViewWidth( const SwTextSizeInfo &rInf ) const override; - virtual sal_Int32 GetCrsrOfst( const sal_uInt16 nOfst ) const override; + virtual sal_Int32 GetCursorOfst( const sal_uInt16 nOfst ) const override; // Accessibility: pass information about this portion to the PortionHandler virtual void HandlePortion( SwPortionHandler& rPH ) const override; diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx index 2cf9befa9790..5057cc88b609 100644 --- a/sw/source/core/text/portxt.cxx +++ b/sw/source/core/text/portxt.cxx @@ -89,7 +89,7 @@ static sal_Int32 lcl_AddSpace( const SwTextSizeInfo &rInf, const OUString* pStr, if ( nEnd > nPos && ASIAN == nScript ) { LanguageType aLang = - rInf.GetTextFrm()->GetTextNode()->GetLang( rInf.GetIdx(), 1, nScript ); + rInf.GetTextFrame()->GetTextNode()->GetLang( rInf.GetIdx(), 1, nScript ); if (!MsLangId::isKorean(aLang)) { @@ -126,7 +126,7 @@ static sal_Int32 lcl_AddSpace( const SwTextSizeInfo &rInf, const OUString* pStr, if ( nEnd > nPos && COMPLEX == nScript ) { LanguageType aLang = - rInf.GetTextFrm()->GetTextNode()->GetLang( rInf.GetIdx(), 1, nScript ); + rInf.GetTextFrame()->GetTextNode()->GetLang( rInf.GetIdx(), 1, nScript ); if ( LANGUAGE_THAI == aLang ) { @@ -152,7 +152,7 @@ static sal_Int32 lcl_AddSpace( const SwTextSizeInfo &rInf, const OUString* pStr, LATIN == nScript && ( nEnd == nPos + 1 ) && pSI && ( i18n::ScriptType::COMPLEX == pSI->ScriptType( nPos + 1 ) ) && - rInf.GetTextFrm() && rInf.GetTextFrm()->IsRightToLeft(); + rInf.GetTextFrame() && rInf.GetTextFrame()->IsRightToLeft(); if ( bDoNotAddSpace ) return nCnt; @@ -198,7 +198,7 @@ static sal_Int32 lcl_AddSpace( const SwTextSizeInfo &rInf, const OUString* pStr, if( ASIAN == nNextScript ) { LanguageType aLang = - rInf.GetTextFrm()->GetTextNode()->GetLang( nPos, 1, nNextScript ); + rInf.GetTextFrame()->GetTextNode()->GetLang( nPos, 1, nNextScript ); if (!MsLangId::isKorean(aLang)) ++nCnt; @@ -370,7 +370,7 @@ bool SwTextPortion::_Format( SwTextFormatInfo &rInf ) rInf.IsOtherThanFootnoteInside() ) || ( rInf.GetLast() && - rInf.GetTextFrm()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT) && + rInf.GetTextFrame()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT) && rInf.GetLast()->InTabGrp() && rInf.GetLineStart() + rInf.GetLast()->GetLen() < rInf.GetIdx() && aGuess.BreakPos() == rInf.GetIdx() && @@ -492,10 +492,10 @@ void SwTextPortion::FormatEOL( SwTextFormatInfo &rInf ) } } -sal_Int32 SwTextPortion::GetCrsrOfst( const sal_uInt16 nOfst ) const +sal_Int32 SwTextPortion::GetCursorOfst( const sal_uInt16 nOfst ) const { - OSL_ENSURE( false, "SwTextPortion::GetCrsrOfst: don't use this method!" ); - return SwLinePortion::GetCrsrOfst( nOfst ); + OSL_ENSURE( false, "SwTextPortion::GetCursorOfst: don't use this method!" ); + return SwLinePortion::GetCursorOfst( nOfst ); } // The GetTextSize() assumes that the own length is correct @@ -787,7 +787,7 @@ bool SwFieldMarkPortion::Format( SwTextFormatInfo & ) void SwFieldFormCheckboxPortion::Paint( const SwTextPaintInfo& rInf ) const { - SwTextNode* pNd = const_cast<SwTextNode*>(rInf.GetTextFrm()->GetTextNode()); + SwTextNode* pNd = const_cast<SwTextNode*>(rInf.GetTextFrame()->GetTextNode()); const SwDoc *doc=pNd->GetDoc(); SwIndex aIndex( pNd, rInf.GetIdx() ); SwPosition aPosition(*pNd, aIndex); @@ -807,7 +807,7 @@ void SwFieldFormCheckboxPortion::Paint( const SwTextPaintInfo& rInf ) const bool SwFieldFormCheckboxPortion::Format( SwTextFormatInfo & rInf ) { - SwTextNode *pNd = rInf.GetTextFrm( )->GetTextNode( ); + SwTextNode *pNd = rInf.GetTextFrame( )->GetTextNode( ); const SwDoc *doc = pNd->GetDoc( ); SwIndex aIndex( pNd, rInf.GetIdx( ) ); SwPosition aPosition( *pNd, aIndex ); diff --git a/sw/source/core/text/portxt.hxx b/sw/source/core/text/portxt.hxx index 08710b07f513..5c04df451c28 100644 --- a/sw/source/core/text/portxt.hxx +++ b/sw/source/core/text/portxt.hxx @@ -38,7 +38,7 @@ public: virtual void Paint( const SwTextPaintInfo &rInf ) const override; virtual bool Format( SwTextFormatInfo &rInf ) override; virtual void FormatEOL( SwTextFormatInfo &rInf ) override; - virtual sal_Int32 GetCrsrOfst( const sal_uInt16 nOfst ) const override; + virtual sal_Int32 GetCursorOfst( const sal_uInt16 nOfst ) const override; virtual SwPosSize GetTextSize( const SwTextSizeInfo &rInfo ) const override; virtual bool GetExpText( const SwTextSizeInfo &rInf, OUString &rText ) const override; virtual long CalcSpacing( long nSpaceAdd, const SwTextSizeInfo &rInf ) const override; diff --git a/sw/source/core/text/redlnitr.cxx b/sw/source/core/text/redlnitr.cxx index ca6880bcb090..d0f798ef50b4 100644 --- a/sw/source/core/text/redlnitr.cxx +++ b/sw/source/core/text/redlnitr.cxx @@ -43,11 +43,11 @@ using namespace ::com::sun::star; -void SwAttrIter::CtorInitAttrIter( SwTextNode& rTextNode, SwScriptInfo& rScrInf, SwTextFrm* pFrm ) +void SwAttrIter::CtorInitAttrIter( SwTextNode& rTextNode, SwScriptInfo& rScrInf, SwTextFrame* pFrame ) { // during HTML-Import it can happen, that no layout exists - SwRootFrm* pRootFrm = rTextNode.getIDocumentLayoutAccess().GetCurrentLayout(); - pShell = pRootFrm ? pRootFrm->GetCurrShell() : nullptr; + SwRootFrame* pRootFrame = rTextNode.getIDocumentLayoutAccess().GetCurrentLayout(); + pShell = pRootFrame ? pRootFrame->GetCurrShell() : nullptr; pScriptInfo = &rScrInf; @@ -64,14 +64,14 @@ void SwAttrIter::CtorInitAttrIter( SwTextNode& rTextNode, SwScriptInfo& rScrInf, // set font to vertical if frame layout is vertical bool bVertLayout = false; bool bRTL = false; - if ( pFrm ) + if ( pFrame ) { - if ( pFrm->IsVertical() ) + if ( pFrame->IsVertical() ) { bVertLayout = true; pFnt->SetVertical( pFnt->GetOrientation(), true ); } - bRTL = pFrm->IsRightToLeft(); + bRTL = pFrame->IsRightToLeft(); } // Initialize the default attribute of the attribute handler diff --git a/sw/source/core/text/txtcache.cxx b/sw/source/core/text/txtcache.cxx index 029f2d6c862f..826c253547d7 100644 --- a/sw/source/core/text/txtcache.cxx +++ b/sw/source/core/text/txtcache.cxx @@ -21,8 +21,8 @@ #include "txtfrm.hxx" #include "porlay.hxx" -SwTextLine::SwTextLine( SwTextFrm *pFrm, SwParaPortion *pNew ) : - SwCacheObj( static_cast<void*>(pFrm) ), +SwTextLine::SwTextLine( SwTextFrame *pFrame, SwParaPortion *pNew ) : + SwCacheObj( static_cast<void*>(pFrame) ), pLine( pNew ) { } @@ -34,7 +34,7 @@ SwTextLine::~SwTextLine() SwCacheObj *SwTextLineAccess::NewObj() { - return new SwTextLine( const_cast<SwTextFrm *>(static_cast<SwTextFrm const *>(pOwner)) ); + return new SwTextLine( const_cast<SwTextFrame *>(static_cast<SwTextFrame const *>(pOwner)) ); } SwParaPortion *SwTextLineAccess::GetPara() @@ -45,15 +45,15 @@ SwParaPortion *SwTextLineAccess::GetPara() else { pRet = static_cast<SwTextLine*>(Get()); - const_cast<SwTextFrm *>(static_cast<SwTextFrm const *>(pOwner))->SetCacheIdx( pRet->GetCachePos() ); + const_cast<SwTextFrame *>(static_cast<SwTextFrame const *>(pOwner))->SetCacheIdx( pRet->GetCachePos() ); } if ( !pRet->GetPara() ) pRet->SetPara( new SwParaPortion ); return pRet->GetPara(); } -SwTextLineAccess::SwTextLineAccess( const SwTextFrm *pOwn ) : - SwCacheAccess( *SwTextFrm::GetTextCache(), pOwn, pOwn->GetCacheIdx() ) +SwTextLineAccess::SwTextLineAccess( const SwTextFrame *pOwn ) : + SwCacheAccess( *SwTextFrame::GetTextCache(), pOwn, pOwn->GetCacheIdx() ) { } @@ -62,9 +62,9 @@ bool SwTextLineAccess::IsAvailable() const return pObj && static_cast<SwTextLine*>(pObj)->GetPara(); } -bool SwTextFrm::_HasPara() const +bool SwTextFrame::_HasPara() const { - SwTextLine *pTextLine = static_cast<SwTextLine*>(SwTextFrm::GetTextCache()-> + SwTextLine *pTextLine = static_cast<SwTextLine*>(SwTextFrame::GetTextCache()-> Get( this, GetCacheIdx(), false )); if ( pTextLine ) { @@ -72,16 +72,16 @@ bool SwTextFrm::_HasPara() const return true; } else - const_cast<SwTextFrm*>(this)->mnCacheIndex = USHRT_MAX; + const_cast<SwTextFrame*>(this)->mnCacheIndex = USHRT_MAX; return false; } -SwParaPortion *SwTextFrm::GetPara() +SwParaPortion *SwTextFrame::GetPara() { if ( GetCacheIdx() != USHRT_MAX ) { - SwTextLine *pLine = static_cast<SwTextLine*>(SwTextFrm::GetTextCache()-> + SwTextLine *pLine = static_cast<SwTextLine*>(SwTextFrame::GetTextCache()-> Get( this, GetCacheIdx(), false )); if ( pLine ) return pLine->GetPara(); @@ -91,12 +91,12 @@ SwParaPortion *SwTextFrm::GetPara() return nullptr; } -void SwTextFrm::ClearPara() +void SwTextFrame::ClearPara() { - OSL_ENSURE( !IsLocked(), "+SwTextFrm::ClearPara: this is locked." ); + OSL_ENSURE( !IsLocked(), "+SwTextFrame::ClearPara: this is locked." ); if ( !IsLocked() && GetCacheIdx() != USHRT_MAX ) { - SwTextLine *pTextLine = static_cast<SwTextLine*>(SwTextFrm::GetTextCache()-> + SwTextLine *pTextLine = static_cast<SwTextLine*>(SwTextFrame::GetTextCache()-> Get( this, GetCacheIdx(), false )); if ( pTextLine ) { @@ -108,12 +108,12 @@ void SwTextFrm::ClearPara() } } -void SwTextFrm::SetPara( SwParaPortion *pNew, bool bDelete ) +void SwTextFrame::SetPara( SwParaPortion *pNew, bool bDelete ) { if ( GetCacheIdx() != USHRT_MAX ) { // Only change the information, the CacheObj stays there - SwTextLine *pTextLine = static_cast<SwTextLine*>(SwTextFrm::GetTextCache()-> + SwTextLine *pTextLine = static_cast<SwTextLine*>(SwTextFrame::GetTextCache()-> Get( this, GetCacheIdx(), false )); if ( pTextLine ) { @@ -130,7 +130,7 @@ void SwTextFrm::SetPara( SwParaPortion *pNew, bool bDelete ) else if ( pNew ) { // Insert a new one SwTextLine *pTextLine = new SwTextLine( this, pNew ); - if ( SwTextFrm::GetTextCache()->Insert( pTextLine ) ) + if ( SwTextFrame::GetTextCache()->Insert( pTextLine ) ) mnCacheIndex = pTextLine->GetCachePos(); else { diff --git a/sw/source/core/text/txtcache.hxx b/sw/source/core/text/txtcache.hxx index afa02c271dd1..df3979aa46da 100644 --- a/sw/source/core/text/txtcache.hxx +++ b/sw/source/core/text/txtcache.hxx @@ -24,7 +24,7 @@ #include "swcache.hxx" class SwParaPortion; -class SwTextFrm; +class SwTextFrame; class SwTextLine : public SwCacheObj { @@ -33,7 +33,7 @@ class SwTextLine : public SwCacheObj public: DECL_FIXEDMEMPOOL_NEWDEL(SwTextLine) - SwTextLine( SwTextFrm *pFrm, SwParaPortion *pNew = nullptr ); + SwTextLine( SwTextFrame *pFrame, SwParaPortion *pNew = nullptr ); virtual ~SwTextLine(); inline SwParaPortion *GetPara() { return pLine; } @@ -49,7 +49,7 @@ protected: virtual SwCacheObj *NewObj() override; public: - explicit SwTextLineAccess( const SwTextFrm *pOwner ); + explicit SwTextLineAccess( const SwTextFrame *pOwner ); SwParaPortion *GetPara(); diff --git a/sw/source/core/text/txtdrop.cxx b/sw/source/core/text/txtdrop.cxx index 7c4abafdb1b0..8be41458531d 100644 --- a/sw/source/core/text/txtdrop.cxx +++ b/sw/source/core/text/txtdrop.cxx @@ -52,11 +52,11 @@ static bool lcl_IsDropFlyInter( const SwTextFormatInfo &rInf, const SwTextFly& rTextFly = rInf.GetTextFly(); if( rTextFly.IsOn() ) { - SwRect aRect( rInf.GetTextFrm()->Frm().Pos(), Size( nWidth, nHeight) ); - aRect.Pos() += rInf.GetTextFrm()->Prt().Pos(); + SwRect aRect( rInf.GetTextFrame()->Frame().Pos(), Size( nWidth, nHeight) ); + aRect.Pos() += rInf.GetTextFrame()->Prt().Pos(); aRect.Pos().X() += rInf.X(); aRect.Pos().Y() = rInf.Y(); - aRect = rTextFly.GetFrm( aRect ); + aRect = rTextFly.GetFrame( aRect ); return aRect.HasArea(); } @@ -190,19 +190,19 @@ bool SwTextNode::GetDropSize(int& rFontHeight, int& rDropHeight, int& rDropDesce } // get text frame - SwIterator<SwTextFrm,SwTextNode> aIter( *this ); - for( SwTextFrm* pLastFrm = aIter.First(); pLastFrm; pLastFrm = aIter.Next() ) + SwIterator<SwTextFrame,SwTextNode> aIter( *this ); + for( SwTextFrame* pLastFrame = aIter.First(); pLastFrame; pLastFrame = aIter.Next() ) { // Only (master-) text frames can have a drop cap. - if ( !pLastFrm->IsFollow() ) + if ( !pLastFrame->IsFollow() ) { - if( !pLastFrm->HasPara() ) - pLastFrm->GetFormatted(); + if( !pLastFrame->HasPara() ) + pLastFrame->GetFormatted(); - if ( !pLastFrm->IsEmpty() ) + if ( !pLastFrame->IsEmpty() ) { - const SwParaPortion* pPara = pLastFrm->GetPara(); + const SwParaPortion* pPara = pLastFrame->GetPara(); OSL_ENSURE( pPara, "GetDropSize could not find the ParaPortion, I'll guess the drop cap size" ); if ( pPara ) @@ -324,7 +324,7 @@ void SwDropPortion::PaintDrop( const SwTextPaintInfo &rInf ) const aClipRect.Intersection( rInf.GetPaintRect() ); } SwSaveClip aClip( const_cast<OutputDevice*>(rInf.GetOut()) ); - aClip.ChgClip( aClipRect, rInf.GetTextFrm() ); + aClip.ChgClip( aClipRect, rInf.GetTextFrame() ); // Just do, what we always do ... PaintText( rInf ); @@ -347,10 +347,10 @@ void SwDropPortion::Paint( const SwTextPaintInfo &rInf ) const // make sure that font is not rotated SwFont* pTmpFont = nullptr; - if ( rInf.GetFont()->GetOrientation( rInf.GetTextFrm()->IsVertical() ) ) + if ( rInf.GetFont()->GetOrientation( rInf.GetTextFrame()->IsVertical() ) ) { pTmpFont = new SwFont( *rInf.GetFont() ); - pTmpFont->SetVertical( 0, rInf.GetTextFrm()->IsVertical() ); + pTmpFont->SetVertical( 0, rInf.GetTextFrame()->IsVertical() ); } SwFontSave aFontSave( rInf, pTmpFont ); @@ -422,7 +422,7 @@ SwPosSize SwDropPortion::GetTextSize( const SwTextSizeInfo &rInf ) const return aPosSize; } -sal_Int32 SwDropPortion::GetCrsrOfst( const sal_uInt16 ) const +sal_Int32 SwDropPortion::GetCursorOfst( const sal_uInt16 ) const { return 0; } @@ -510,7 +510,7 @@ SwDropPortion *SwTextFormatter::NewDropPortion( SwTextFormatInfo &rInf ) return nullptr; sal_Int32 nPorLen = pDropFormat->GetWholeWord() ? 0 : pDropFormat->GetChars(); - nPorLen = m_pFrm->GetTextNode()->GetDropLen( nPorLen ); + nPorLen = m_pFrame->GetTextNode()->GetDropLen( nPorLen ); if( !nPorLen ) { static_cast<SwTextFormatter*>(this)->ClearDropFormat(); @@ -563,11 +563,11 @@ SwDropPortion *SwTextFormatter::NewDropPortion( SwTextFormatInfo &rInf ) if ( pFormat ) { const SwAttrSet& rSet = pFormat->GetAttrSet(); - pTmpFnt->SetDiffFnt( &rSet, m_pFrm->GetTextNode()->getIDocumentSettingAccess() ); + pTmpFnt->SetDiffFnt( &rSet, m_pFrame->GetTextNode()->getIDocumentSettingAccess() ); } // we do not allow a vertical font for the drop portion - pTmpFnt->SetVertical( 0, rInf.GetTextFrm()->IsVertical() ); + pTmpFnt->SetVertical( 0, rInf.GetTextFrame()->IsVertical() ); // find next attribute change / script change const sal_Int32 nTmpIdx = nNextChg; @@ -855,7 +855,7 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTextFormatInfo &rInf // respect to a common baseline : 0 // get descent and ascent from union - if ( rInf.GetTextFrm()->IsVertical() ) + if ( rInf.GetTextFrame()->IsVertical() ) { nDescent = aCommonRect.Left(); nAscent = aCommonRect.Right(); diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx index 8e7907a61a35..c470a067f710 100644 --- a/sw/source/core/text/txtfld.cxx +++ b/sw/source/core/text/txtfld.cxx @@ -54,16 +54,16 @@ #include <IDocumentSettingAccess.hxx> #include <svl/itemiter.hxx> -static bool lcl_IsInBody( SwFrm *pFrm ) +static bool lcl_IsInBody( SwFrame *pFrame ) { - if ( pFrm->IsInDocBody() ) + if ( pFrame->IsInDocBody() ) return true; else { - const SwFrm *pTmp = pFrm; - const SwFlyFrm *pFly; - while ( nullptr != (pFly = pTmp->FindFlyFrm()) ) - pTmp = pFly->GetAnchorFrm(); + const SwFrame *pTmp = pFrame; + const SwFlyFrame *pFly; + while ( nullptr != (pFly = pTmp->FindFlyFrame()) ) + pTmp = pFly->GetAnchorFrame(); return pTmp->IsInDocBody(); } } @@ -72,7 +72,7 @@ SwExpandPortion *SwTextFormatter::NewFieldPortion( SwTextFormatInfo &rInf, const SwTextAttr *pHint ) const { SwExpandPortion *pRet = nullptr; - SwFrm *pFrame = m_pFrm; + SwFrame *pFrame = m_pFrame; SwField *pField = const_cast<SwField*>(pHint->GetFormatField().GetField()); const bool bName = rInf.GetOpt().IsFieldName(); @@ -154,14 +154,14 @@ SwExpandPortion *SwTextFormatter::NewFieldPortion( SwTextFormatInfo &rInf, { SwPageNumberFieldType *pPageNr = static_cast<SwPageNumberFieldType *>(pField->GetTyp()); - const SwRootFrm* pTmpRootFrm = pSh->GetLayout(); - const bool bVirt = pTmpRootFrm->IsVirtPageNum(); + const SwRootFrame* pTmpRootFrame = pSh->GetLayout(); + const bool bVirt = pTmpRootFrame->IsVirtPageNum(); sal_uInt16 nVirtNum = pFrame->GetVirtPageNum(); - sal_uInt16 nNumPages = pTmpRootFrm->GetPageNum(); + sal_uInt16 nNumPages = pTmpRootFrame->GetPageNum(); sal_Int16 nNumFormat = -1; if(SVX_NUM_PAGEDESC == pField->GetFormat()) - nNumFormat = pFrame->FindPageFrm()->GetPageDesc()->GetNumType().GetNumberingType(); + nNumFormat = pFrame->FindPageFrame()->GetPageDesc()->GetNumType().GetNumberingType(); static_cast<SwPageNumberField*>(pField) ->ChangeExpansion(nVirtNum, nNumPages); pPageNr->ChangeExpansion(pDoc, @@ -279,7 +279,7 @@ SwExpandPortion *SwTextFormatter::NewFieldPortion( SwTextFormatInfo &rInf, if( !bName ) { pTmpFnt = new SwFont( *pFnt ); - pTmpFnt->SetDiffFnt( &pChFormat->GetAttrSet(), m_pFrm->GetTextNode()->getIDocumentSettingAccess() ); + pTmpFnt->SetDiffFnt( &pChFormat->GetAttrSet(), m_pFrame->GetTextNode()->getIDocumentSettingAccess() ); } { OUString const aStr( (bName) @@ -406,7 +406,7 @@ SwLinePortion *SwTextFormatter::NewExtraPortion( SwTextFormatInfo &rInf ) */ static void checkApplyParagraphMarkFormatToNumbering( SwFont* pNumFnt, SwTextFormatInfo& rInf, const IDocumentSettingAccess* pIDSA ) { - SwTextNode* node = rInf.GetTextFrm()->GetTextNode(); + SwTextNode* node = rInf.GetTextFrame()->GetTextNode(); if( !pIDSA->get(DocumentSettingId::APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING )) return; if( SwpHints* hints = node->GetpSwpHints()) @@ -454,7 +454,7 @@ SwNumberPortion *SwTextFormatter::NewNumberPortion( SwTextFormatInfo &rInf ) con return nullptr; SwNumberPortion *pRet = nullptr; - const SwTextNode* pTextNd = GetTextFrm()->GetTextNode(); + const SwTextNode* pTextNd = GetTextFrame()->GetTextNode(); const SwNumRule* pNumRule = pTextNd->GetNumRule(); // Has a "valid" number? @@ -478,7 +478,7 @@ SwNumberPortion *SwTextFormatter::NewNumberPortion( SwTextFormatInfo &rInf ) con if( SVX_NUM_BITMAP == rNumFormat.GetNumberingType() ) { - pRet = new SwGrfNumPortion( const_cast<SwTextFrm*>(GetTextFrm()), + pRet = new SwGrfNumPortion( const_cast<SwTextFrame*>(GetTextFrame()), pTextNd->GetLabelFollowedBy(), rNumFormat.GetBrush(), rNumFormat.GetGraphicOrientation(), @@ -545,7 +545,7 @@ SwNumberPortion *SwTextFormatter::NewNumberPortion( SwTextFormatInfo &rInf ) con // we do not allow a vertical font pNumFnt->SetVertical( pNumFnt->GetOrientation(), - m_pFrm->IsVertical() ); + m_pFrame->IsVertical() ); // --> OD 2008-01-23 #newlistelevelattrs# pRet = new SwBulletPortion( rNumFormat.GetBulletChar(), @@ -590,7 +590,7 @@ SwNumberPortion *SwTextFormatter::NewNumberPortion( SwTextFormatInfo &rInf ) con checkApplyParagraphMarkFormatToNumbering( pNumFnt, rInf, pIDSA ); // we do not allow a vertical font - pNumFnt->SetVertical( pNumFnt->GetOrientation(), m_pFrm->IsVertical() ); + pNumFnt->SetVertical( pNumFnt->GetOrientation(), m_pFrame->IsVertical() ); pRet = new SwNumberPortion( aText, pNumFnt, bLeft, bCenter, nMinDist, diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx index cfb5832f8a03..8c041c66492d 100644 --- a/sw/source/core/text/txtfly.cxx +++ b/sw/source/core/text/txtfly.cxx @@ -172,16 +172,16 @@ void ClrContourCache() // #i68520# const SwRect SwContourCache::CalcBoundRect( const SwAnchoredObject* pAnchoredObj, const SwRect &rLine, - const SwTextFrm* pFrm, + const SwTextFrame* pFrame, const long nXPos, const bool bRight ) { SwRect aRet; const SwFrameFormat* pFormat = &(pAnchoredObj->GetFrameFormat()); if( pFormat->GetSurround().IsContour() && - ( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) == nullptr || - ( static_cast<const SwFlyFrm*>(pAnchoredObj)->Lower() && - static_cast<const SwFlyFrm*>(pAnchoredObj)->Lower()->IsNoTextFrm() ) ) ) + ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) == nullptr || + ( static_cast<const SwFlyFrame*>(pAnchoredObj)->Lower() && + static_cast<const SwFlyFrame*>(pAnchoredObj)->Lower()->IsNoTextFrame() ) ) ) { aRet = pAnchoredObj->GetObjRectWithSpaces(); if( aRet.IsOver( rLine ) ) @@ -190,7 +190,7 @@ const SwRect SwContourCache::CalcBoundRect( const SwAnchoredObject* pAnchoredObj pContourCache = new SwContourCache; aRet = pContourCache->ContourRect( - pFormat, pAnchoredObj->GetDrawObj(), pFrm, rLine, nXPos, bRight ); + pFormat, pAnchoredObj->GetDrawObj(), pFrame, rLine, nXPos, bRight ); } else aRet.Width( 0 ); @@ -204,7 +204,7 @@ const SwRect SwContourCache::CalcBoundRect( const SwAnchoredObject* pAnchoredObj } const SwRect SwContourCache::ContourRect( const SwFormat* pFormat, - const SdrObject* pObj, const SwTextFrm* pFrm, const SwRect &rLine, + const SdrObject* pObj, const SwTextFrame* pFrame, const SwRect &rLine, const long nXPos, const bool bRight ) { SwRect aRet; @@ -226,9 +226,9 @@ const SwRect SwContourCache::ContourRect( const SwFormat* pFormat, // GetContour() causes the graphic to be loaded, which may cause // the graphic to change its size, call ClrObject() tools::PolyPolygon aPoly; - if( !static_cast<const SwVirtFlyDrawObj*>(pObj)->GetFlyFrm()->GetContour( aPoly ) ) + if( !static_cast<const SwVirtFlyDrawObj*>(pObj)->GetFlyFrame()->GetContour( aPoly ) ) aPoly = tools::PolyPolygon( static_cast<const SwVirtFlyDrawObj*>(pObj)-> - GetFlyFrm()->Frm().SVRect() ); + GetFlyFrame()->Frame().SVRect() ); aPolyPolygon.clear(); aPolyPolygon.append(aPoly.getB2DPolyPolygon()); } @@ -250,7 +250,7 @@ const SwRect SwContourCache::ContourRect( const SwFormat* pFormat, // after GetContour() pTextRanger[ 0 ] = new TextRanger( aPolyPolygon, pPolyPolygon, 20, (sal_uInt16)rLRSpace.GetLeft(), (sal_uInt16)rLRSpace.GetRight(), - pFormat->GetSurround().IsOutside(), false, pFrm->IsVertical() ); + pFormat->GetSurround().IsOutside(), false, pFrame->IsVertical() ); pTextRanger[ 0 ]->SetUpper( rULSpace.GetUpper() ); pTextRanger[ 0 ]->SetLower( rULSpace.GetLower() ); @@ -272,7 +272,7 @@ const SwRect SwContourCache::ContourRect( const SwFormat* pFormat, pSdrObj[ 0 ] = pTmpObj; pTextRanger[ 0 ] = pTmpRanger; } - SWRECTFN( pFrm ) + SWRECTFN( pFrame ) long nTmpTop = (rLine.*fnRect->fnGetTop)(); // fnGetBottom is top + height long nTmpBottom = (rLine.*fnRect->fnGetBottom)(); @@ -313,7 +313,7 @@ const SwRect SwContourCache::ContourRect( const SwFormat* pFormat, SwTextFly::SwTextFly() : pPage(nullptr) , mpCurrAnchoredObj(nullptr) - , pCurrFrm(nullptr) + , pCurrFrame(nullptr) , pMaster(nullptr) , mpAnchoredObjList(nullptr) , nMinBottom(0) @@ -328,16 +328,16 @@ SwTextFly::SwTextFly() { } -SwTextFly::SwTextFly( const SwTextFrm *pFrm ) +SwTextFly::SwTextFly( const SwTextFrame *pFrame ) { - CtorInitTextFly( pFrm ); + CtorInitTextFly( pFrame ); } SwTextFly::SwTextFly( const SwTextFly& rTextFly ) { pPage = rTextFly.pPage; mpCurrAnchoredObj = rTextFly.mpCurrAnchoredObj; - pCurrFrm = rTextFly.pCurrFrm; + pCurrFrame = rTextFly.pCurrFrame; pMaster = rTextFly.pMaster; if( rTextFly.mpAnchoredObjList ) { @@ -363,24 +363,24 @@ SwTextFly::~SwTextFly() delete mpAnchoredObjList; } -void SwTextFly::CtorInitTextFly( const SwTextFrm *pFrm ) +void SwTextFly::CtorInitTextFly( const SwTextFrame *pFrame ) { mbIgnoreCurrentFrame = false; mbIgnoreContour = false; mbIgnoreObjsInHeaderFooter = false; - pPage = pFrm->FindPageFrm(); - const SwFlyFrm* pTmp = pFrm->FindFlyFrm(); + pPage = pFrame->FindPageFrame(); + const SwFlyFrame* pTmp = pFrame->FindFlyFrame(); // #i68520# mpCurrAnchoredObj = pTmp; - pCurrFrm = pFrm; - pMaster = pCurrFrm->IsFollow() ? nullptr : pCurrFrm; + pCurrFrame = pFrame; + pMaster = pCurrFrame->IsFollow() ? nullptr : pCurrFrame; // #i68520# mpAnchoredObjList = nullptr; // If we're not overlapped by a frame or if a FlyCollection does not exist // at all, we switch off forever. // It could be, however, that a line is added while formatting, that // extends into a frame. - // That's why we do not optimize for: bOn = pSortedFlys && IsAnyFrm(); + // That's why we do not optimize for: bOn = pSortedFlys && IsAnyFrame(); bOn = pPage->GetSortedObjs() != nullptr; bTopRule = true; nMinBottom = 0; @@ -388,12 +388,12 @@ void SwTextFly::CtorInitTextFly( const SwTextFrm *pFrm ) nIndex = ULONG_MAX; } -SwRect SwTextFly::_GetFrm( const SwRect &rRect, bool bTop ) const +SwRect SwTextFly::_GetFrame( const SwRect &rRect, bool bTop ) const { SwRect aRet; if( ForEach( rRect, &aRet, true ) ) { - SWRECTFN( pCurrFrm ) + SWRECTFN( pCurrFrame ) if( bTop ) (aRet.*fnRect->fnSetTop)( (rRect.*fnRect->fnGetTop)() ); @@ -407,13 +407,13 @@ SwRect SwTextFly::_GetFrm( const SwRect &rRect, bool bTop ) const return aRet; } -bool SwTextFly::IsAnyFrm() const +bool SwTextFly::IsAnyFrame() const { - SwSwapIfSwapped swap(const_cast<SwTextFrm *>(pCurrFrm)); + SwSwapIfSwapped swap(const_cast<SwTextFrame *>(pCurrFrame)); - OSL_ENSURE( bOn, "IsAnyFrm: Why?" ); - SwRect aRect( pCurrFrm->Frm().Pos() + pCurrFrm->Prt().Pos(), - pCurrFrm->Prt().SSize() ); + OSL_ENSURE( bOn, "IsAnyFrame: Why?" ); + SwRect aRect( pCurrFrame->Frame().Pos() + pCurrFrame->Prt().Pos(), + pCurrFrame->Prt().SSize() ); return ForEach( aRect, nullptr, false ); } @@ -424,8 +424,8 @@ bool SwTextFly::IsAnyObj( const SwRect &rRect ) const SwRect aRect( rRect ); if ( aRect.IsEmpty() ) - aRect = SwRect( pCurrFrm->Frm().Pos() + pCurrFrm->Prt().Pos(), - pCurrFrm->Prt().SSize() ); + aRect = SwRect( pCurrFrame->Frame().Pos() + pCurrFrame->Prt().Pos(), + pCurrFrame->Prt().SSize() ); const SwSortedObjs *pSorted = pPage->GetSortedObjs(); if( pSorted ) // bOn actually makes sure that we have objects on the side, @@ -449,11 +449,11 @@ bool SwTextFly::IsAnyObj( const SwRect &rRect ) const return false; } -const SwContentFrm* SwTextFly::_GetMaster() +const SwContentFrame* SwTextFly::_GetMaster() { - pMaster = pCurrFrm; + pMaster = pCurrFrame; while( pMaster && pMaster->IsFollow() ) - pMaster = static_cast<SwContentFrm*>(pMaster->FindMaster()); + pMaster = static_cast<SwContentFrame*>(pMaster->FindMaster()); return pMaster; } @@ -500,17 +500,17 @@ bool SwTextFly::DrawTextOpaque( SwDrawTextInfo &rInf ) SwAnchoredObjList::size_type nCount( bOn ? GetAnchoredObjList()->size() : 0 ); if ( bOn && nCount > 0 ) { - const sal_uInt16 nHellId = pPage->getRootFrm()->GetCurrShell()->getIDocumentDrawModelAccess().GetHellId(); + const sal_uInt16 nHellId = pPage->getRootFrame()->GetCurrShell()->getIDocumentDrawModelAccess().GetHellId(); for( SwAnchoredObjList::size_type i = 0; i < nCount; ++i ) { // #i68520# const SwAnchoredObject* pTmpAnchoredObj = (*mpAnchoredObjList)[i]; - if( dynamic_cast<const SwFlyFrm*>(pTmpAnchoredObj) && + if( dynamic_cast<const SwFlyFrame*>(pTmpAnchoredObj) && mpCurrAnchoredObj != pTmpAnchoredObj ) { // #i68520# - const SwFlyFrm& rFly = dynamic_cast<const SwFlyFrm&>(*pTmpAnchoredObj); - if( aRegion.GetOrigin().IsOver( rFly.Frm() ) ) + const SwFlyFrame& rFly = dynamic_cast<const SwFlyFrame&>(*pTmpAnchoredObj); + if( aRegion.GetOrigin().IsOver( rFly.Frame() ) ) { const SwFrameFormat *pFormat = rFly.GetFormat(); const SwFormatSurround &rSur = pFormat->GetSurround(); @@ -520,7 +520,7 @@ bool SwTextFly::DrawTextOpaque( SwDrawTextInfo &rInf ) SURROUND_THROUGHT == rSur.GetSurround() && ( !rSur.IsAnchorOnly() || // #i68520# - GetMaster() == rFly.GetAnchorFrm() || + GetMaster() == rFly.GetAnchorFrame() || ((FLY_AT_PARA != rAnchor.GetAnchorId()) && (FLY_AT_CHAR != rAnchor.GetAnchorId()) ) @@ -531,15 +531,15 @@ bool SwTextFly::DrawTextOpaque( SwDrawTextInfo &rInf ) ) { // Except for the content is transparent - const SwNoTextFrm *pNoText = - rFly.Lower() && rFly.Lower()->IsNoTextFrm() - ? static_cast<const SwNoTextFrm*>(rFly.Lower()) + const SwNoTextFrame *pNoText = + rFly.Lower() && rFly.Lower()->IsNoTextFrame() + ? static_cast<const SwNoTextFrame*>(rFly.Lower()) : nullptr; if ( !pNoText || (!pNoText->IsTransparent() && !rSur.IsContour()) ) { bOpaque = true; - aRegion -= rFly.Frm(); + aRegion -= rFly.Frame(); } } } @@ -588,7 +588,7 @@ void SwTextFly::DrawFlyRect( OutputDevice* pOut, const SwRect &rRect, SwAnchoredObjList::size_type nCount( bOn ? GetAnchoredObjList()->size() : 0 ); if ( bOn && nCount > 0 ) { - const sal_uInt16 nHellId = pPage->getRootFrm()->GetCurrShell()->getIDocumentDrawModelAccess().GetHellId(); + const sal_uInt16 nHellId = pPage->getRootFrame()->GetCurrShell()->getIDocumentDrawModelAccess().GetHellId(); for( SwAnchoredObjList::size_type i = 0; i < nCount; ++i ) { // #i68520# @@ -597,7 +597,7 @@ void SwTextFly::DrawFlyRect( OutputDevice* pOut, const SwRect &rRect, continue; // #i68520# - const SwFlyFrm* pFly = dynamic_cast<const SwFlyFrm*>(pAnchoredObjTmp); + const SwFlyFrame* pFly = dynamic_cast<const SwFlyFrame*>(pAnchoredObjTmp); if (pFly) { // #i68520# @@ -615,14 +615,14 @@ void SwTextFly::DrawFlyRect( OutputDevice* pOut, const SwRect &rRect, : !rSur.IsContour() ) && !pFly->IsBackgroundTransparent() && ( !pFly->Lower() || - !pFly->Lower()->IsNoTextFrm() || - !static_cast<const SwNoTextFrm*>(pFly->Lower())->IsTransparent() ); + !pFly->Lower()->IsNoTextFrame() || + !static_cast<const SwNoTextFrame*>(pFly->Lower())->IsTransparent() ); if ( bClipFlyArea ) { // #i68520# SwRect aFly( pAnchoredObjTmp->GetObjRect() ); // OD 24.01.2003 #106593# - ::SwAlignRect( aFly, pPage->getRootFrm()->GetCurrShell(), pOut ); + ::SwAlignRect( aFly, pPage->getRootFrame()->GetCurrShell(), pOut ); if( aFly.Width() > 0 && aFly.Height() > 0 ) aRegion -= aFly; } @@ -659,7 +659,7 @@ bool SwTextFly::GetTop( const SwAnchoredObject* _pAnchoredObj, const bool bInFooterOrHeader ) { // #i68520# - // <mpCurrAnchoredObj> is set, if <pCurrFrm> is inside a fly frame + // <mpCurrAnchoredObj> is set, if <pCurrFrame> is inside a fly frame if( _pAnchoredObj != mpCurrAnchoredObj ) { // #i26945# @@ -698,7 +698,7 @@ bool SwTextFly::GetTop( const SwAnchoredObject* _pAnchoredObj, // bEvade: consider pNew, if we are not inside a fly // consider pNew, if pNew is lower of <mpCurrAnchoredObj> bool bEvade = !mpCurrAnchoredObj || - Is_Lower_Of( dynamic_cast<const SwFlyFrm*>(mpCurrAnchoredObj), pNew); + Is_Lower_Of( dynamic_cast<const SwFlyFrame*>(mpCurrAnchoredObj), pNew); if ( !bEvade ) { @@ -774,20 +774,20 @@ bool SwTextFly::GetTop( const SwAnchoredObject* _pAnchoredObj, // #i26945# const SwFormatAnchor& rNewA = _pAnchoredObj->GetFrameFormat().GetAnchor(); OSL_ENSURE( FLY_AS_CHAR != rNewA.GetAnchorId(), - "Don't call GetTop with a FlyInCntFrm" ); + "Don't call GetTop with a FlyInContentFrame" ); if (FLY_AT_PAGE == rNewA.GetAnchorId()) return true; // We always avoid page anchored ones // If Flys anchored at paragraph are caught in a FlyCnt, then // their influence ends at the borders of the FlyCnt! // If we are currently formatting the text of the FlyCnt, then - // it has to get out of the way of the Frm anchored at paragraph! - // pCurrFrm is the anchor of pNew? + // it has to get out of the way of the Frame anchored at paragraph! + // pCurrFrame is the anchor of pNew? // #i26945# - const SwFrm* pTmp = _pAnchoredObj->GetAnchorFrm(); - if( pTmp == pCurrFrm ) + const SwFrame* pTmp = _pAnchoredObj->GetAnchorFrame(); + if( pTmp == pCurrFrame ) return true; - if( pTmp->IsTextFrm() && ( pTmp->IsInFly() || pTmp->IsInFootnote() ) ) + if( pTmp->IsTextFrame() && ( pTmp->IsInFly() || pTmp->IsInFootnote() ) ) { // #i26945# Point aPos = _pAnchoredObj->GetObjRect().Pos(); @@ -796,10 +796,10 @@ bool SwTextFly::GetTop( const SwAnchoredObject* _pAnchoredObj, // #i26945# // If <pTmp> is a text frame inside a table, take the upper // of the anchor frame, which contains the anchor position. - else if ( pTmp->IsTextFrm() && pTmp->IsInTab() ) + else if ( pTmp->IsTextFrame() && pTmp->IsInTab() ) { pTmp = const_cast<SwAnchoredObject*>(_pAnchoredObj) - ->GetAnchorFrmContainingAnchPos()->GetUpper(); + ->GetAnchorFrameContainingAnchPos()->GetUpper(); } // #i28701# - consider all objects in same context, // if wrapping style is considered on object positioning. @@ -812,22 +812,22 @@ bool SwTextFly::GetTop( const SwAnchoredObject* _pAnchoredObj, // object position and former text wrapping is applied. // This condition is typically for documents imported from the // OpenOffice.org file format. - const IDocumentSettingAccess* pIDSA = pCurrFrm->GetTextNode()->getIDocumentSettingAccess(); + const IDocumentSettingAccess* pIDSA = pCurrFrame->GetTextNode()->getIDocumentSettingAccess(); if ( ( pIDSA->get(DocumentSettingId::CONSIDER_WRAP_ON_OBJECT_POSITION) || !pIDSA->get(DocumentSettingId::USE_FORMER_TEXT_WRAPPING) ) && - ::FindKontext( pTmp, 0 ) == ::FindKontext( pCurrFrm, 0 ) ) + ::FindKontext( pTmp, 0 ) == ::FindKontext( pCurrFrame, 0 ) ) { return true; } - const SwFrm* pHeader = nullptr; - if ( pCurrFrm->GetNext() != pTmp && - ( IsFrmInSameKontext( pTmp, pCurrFrm ) || + const SwFrame* pHeader = nullptr; + if ( pCurrFrame->GetNext() != pTmp && + ( IsFrameInSameKontext( pTmp, pCurrFrame ) || // #i13832#, #i24135# wrap around objects in page header ( !pIDSA->get(DocumentSettingId::USE_FORMER_TEXT_WRAPPING) && nullptr != ( pHeader = pTmp->FindFooterOrHeader() ) && - !pHeader->IsFooterFrm() && - pCurrFrm->IsInDocBody() ) ) ) + !pHeader->IsFooterFrame() && + pCurrFrame->IsInDocBody() ) ) ) { if( pHeader || FLY_AT_FLY == rNewA.GetAnchorId() ) return true; @@ -841,7 +841,7 @@ bool SwTextFly::GetTop( const SwAnchoredObject* _pAnchoredObj, // If possible determine Index via SwFormatAnchor because // otherwise it's quite expensive. if( ULONG_MAX == nIndex ) - nIndex = pCurrFrm->GetNode()->GetIndex(); + nIndex = pCurrFrame->GetNode()->GetIndex(); if( nIndex >= nTmpIndex ) return true; @@ -854,21 +854,21 @@ bool SwTextFly::GetTop( const SwAnchoredObject* _pAnchoredObj, // #i68520# SwAnchoredObjList* SwTextFly::InitAnchoredObjList() { - OSL_ENSURE( pCurrFrm, "InitFlyList: No Frame, no FlyList" ); + OSL_ENSURE( pCurrFrame, "InitFlyList: No Frame, no FlyList" ); // #i68520# OSL_ENSURE( !mpAnchoredObjList, "InitFlyList: FlyList already initialized" ); - SwSwapIfSwapped swap(const_cast<SwTextFrm *>(pCurrFrm)); + SwSwapIfSwapped swap(const_cast<SwTextFrame *>(pCurrFrame)); const SwSortedObjs *pSorted = pPage->GetSortedObjs(); const size_t nCount = pSorted ? pSorted->size() : 0; // --> #108724# Page header/footer content doesn't have to wrap around // floating screen objects - const bool bFooterHeader = nullptr != pCurrFrm->FindFooterOrHeader(); - const IDocumentSettingAccess* pIDSA = pCurrFrm->GetTextNode()->getIDocumentSettingAccess(); + const bool bFooterHeader = nullptr != pCurrFrame->FindFooterOrHeader(); + const IDocumentSettingAccess* pIDSA = pCurrFrame->GetTextNode()->getIDocumentSettingAccess(); // #i40155# - check, if frame is marked not to wrap const bool bWrapAllowed = ( pIDSA->get(DocumentSettingId::USE_FORMER_TEXT_WRAPPING) || - ( !pCurrFrm->IsInFootnote() && !bFooterHeader ) ); + ( !pCurrFrame->IsInFootnote() && !bFooterHeader ) ); bOn = false; @@ -882,21 +882,21 @@ SwAnchoredObjList* SwTextFly::InitAnchoredObjList() SwRect aRect; if ( pIDSA->get(DocumentSettingId::USE_FORMER_TEXT_WRAPPING) ) { - aRect = pCurrFrm->Prt(); - aRect += pCurrFrm->Frm().Pos(); + aRect = pCurrFrame->Prt(); + aRect += pCurrFrame->Frame().Pos(); } else { - aRect = pCurrFrm->Frm(); + aRect = pCurrFrame->Frame(); } // Make ourselves a little smaller than we are, // so that 1-Twip-overlappings are ignored (#49532) - SWRECTFN( pCurrFrm ) + SWRECTFN( pCurrFrame ) const long nRight = (aRect.*fnRect->fnGetRight)() - 1; const long nLeft = (aRect.*fnRect->fnGetLeft)() + 1; - const bool bR2L = pCurrFrm->IsRightToLeft(); + const bool bR2L = pCurrFrame->IsRightToLeft(); - const IDocumentDrawModelAccess& rIDDMA = pCurrFrm->GetTextNode()->getIDocumentDrawModelAccess(); + const IDocumentDrawModelAccess& rIDDMA = pCurrFrame->GetTextNode()->getIDocumentDrawModelAccess(); for( size_t i = 0; i < nCount; ++i ) { @@ -906,7 +906,7 @@ SwAnchoredObjList* SwTextFly::InitAnchoredObjList() // #118809# - If requested, do not consider // objects in page header|footer for text frames not in page // header|footer. This is requested for the calculation of - // the base offset for objects <SwTextFrm::CalcBaseOfstForFly()> + // the base offset for objects <SwTextFrame::CalcBaseOfstForFly()> // #i20505# Do not consider oversized objects SwAnchoredObject* pAnchoredObj = (*pSorted)[ i ]; assert(pAnchoredObj); @@ -914,7 +914,7 @@ SwAnchoredObjList* SwTextFly::InitAnchoredObjList() !rIDDMA.IsVisibleLayerId( pAnchoredObj->GetDrawObj()->GetLayer() ) || !pAnchoredObj->ConsiderForTextWrap() || ( mbIgnoreObjsInHeaderFooter && !bFooterHeader && - pAnchoredObj->GetAnchorFrm()->FindFooterOrHeader() ) ) + pAnchoredObj->GetAnchorFrame()->FindFooterOrHeader() ) ) { continue; } @@ -925,7 +925,7 @@ SwAnchoredObjList* SwTextFly::InitAnchoredObjList() (aBound.*fnRect->fnGetBottom)() ) > 0 || nLeft > (aBound.*fnRect->fnGetRight)() || (aBound.*fnRect->fnGetHeight)() > - 2 * (pPage->Frm().*fnRect->fnGetHeight)() ) + 2 * (pPage->Frame().*fnRect->fnGetHeight)() ) { continue; } @@ -933,7 +933,7 @@ SwAnchoredObjList* SwTextFly::InitAnchoredObjList() // #i26945# - pass <pAnchoredObj> to method // <GetTop(..)> instead of only the <SdrObject> instance of the // anchored object - if ( GetTop( pAnchoredObj, pCurrFrm->IsInFootnote(), bFooterHeader ) ) + if ( GetTop( pAnchoredObj, pCurrFrame->IsInFootnote(), bFooterHeader ) ) { // OD 11.03.2003 #107862# - adjust insert position: // overlapping objects should be sorted from left to right and @@ -954,7 +954,7 @@ SwAnchoredObjList* SwTextFly::InitAnchoredObjList() const SwFormatSurround &rFlyFormat = pAnchoredObj->GetFrameFormat().GetSurround(); // #i68520# if ( rFlyFormat.IsAnchorOnly() && - pAnchoredObj->GetAnchorFrm() == GetMaster() ) + pAnchoredObj->GetAnchorFrame() == GetMaster() ) { const SwFormatVertOrient &rTmpFormat = pAnchoredObj->GetFrameFormat().GetVertOrient(); @@ -969,7 +969,7 @@ SwAnchoredObjList* SwTextFly::InitAnchoredObjList() } if( nMinBottom ) { - SwTwips nMax = (pCurrFrm->GetUpper()->*fnRect->fnGetPrtBottom)(); + SwTwips nMax = (pCurrFrame->GetUpper()->*fnRect->fnGetPrtBottom)(); if( (*fnRect->fnYDiff)( nMinBottom, nMax ) > 0 ) nMinBottom = nMax; } @@ -987,13 +987,13 @@ SwAnchoredObjList* SwTextFly::InitAnchoredObjList() SwTwips SwTextFly::CalcMinBottom() const { SwTwips nRet = 0; - const SwContentFrm *pLclMaster = GetMaster(); + const SwContentFrame *pLclMaster = GetMaster(); OSL_ENSURE(pLclMaster, "SwTextFly without master"); const SwSortedObjs *pDrawObj = pLclMaster ? pLclMaster->GetDrawObjs() : nullptr; const size_t nCount = pDrawObj ? pDrawObj->size() : 0; if( nCount ) { - SwTwips nEndOfFrm = pCurrFrm->Frm().Bottom(); + SwTwips nEndOfFrame = pCurrFrame->Frame().Bottom(); for( size_t i = 0; i < nCount; ++i ) { SwAnchoredObject* pAnchoredObj = (*pDrawObj)[ i ]; @@ -1005,13 +1005,13 @@ SwTwips SwTextFly::CalcMinBottom() const if( text::VertOrientation::BOTTOM != rTmpFormat.GetVertOrient() ) { const SwRect aBound( pAnchoredObj->GetObjRectWithSpaces() ); - if( aBound.Top() < nEndOfFrm ) + if( aBound.Top() < nEndOfFrame ) nRet = std::max( nRet, aBound.Bottom() ); } } } - SwTwips nMax = pCurrFrm->GetUpper()->Frm().Top() + - pCurrFrm->GetUpper()->Prt().Bottom(); + SwTwips nMax = pCurrFrame->GetUpper()->Frame().Top() + + pCurrFrame->GetUpper()->Prt().Bottom(); if( nRet > nMax ) nRet = nMax; } @@ -1020,7 +1020,7 @@ SwTwips SwTextFly::CalcMinBottom() const bool SwTextFly::ForEach( const SwRect &rRect, SwRect* pRect, bool bAvoid ) const { - SwSwapIfSwapped swap(const_cast<SwTextFrm *>(pCurrFrm)); + SwSwapIfSwapped swap(const_cast<SwTextFrame *>(pCurrFrame)); bool bRet = false; // #i68520# @@ -1035,7 +1035,7 @@ bool SwTextFly::ForEach( const SwRect &rRect, SwRect* pRect, bool bAvoid ) const SwRect aRect( pAnchoredObj->GetObjRectWithSpaces() ); // Optimierung - SWRECTFN( pCurrFrm ) + SWRECTFN( pCurrFrame ) if( (aRect.*fnRect->fnGetLeft)() > (rRect.*fnRect->fnGetRight)() ) break; // #i68520# @@ -1053,7 +1053,7 @@ bool SwTextFly::ForEach( const SwRect &rRect, SwRect* pRect, bool bAvoid ) const if( ( SURROUND_THROUGHT == rSur.GetSurround() && ( !rSur.IsAnchorOnly() || // #i68520# - GetMaster() == pAnchoredObj->GetAnchorFrm() || + GetMaster() == pAnchoredObj->GetAnchorFrame() || ((FLY_AT_PARA != rAnchor.GetAnchorId()) && (FLY_AT_CHAR != rAnchor.GetAnchorId())) ) ) || aRect.Top() == FAR_AWAY ) @@ -1061,7 +1061,7 @@ bool SwTextFly::ForEach( const SwRect &rRect, SwRect* pRect, bool bAvoid ) const } // #i58642# - // Compare <GetMaster()> instead of <pCurrFrm> with the anchor + // Compare <GetMaster()> instead of <pCurrFrame> with the anchor // frame of the anchored object, because a follow frame have // to ignore the anchored objects of its master frame. // Note: Anchored objects are always registered at the master @@ -1069,7 +1069,7 @@ bool SwTextFly::ForEach( const SwRect &rRect, SwRect* pRect, bool bAvoid ) const // but these aren't handled here. // #i68520# if ( mbIgnoreCurrentFrame && - GetMaster() == pAnchoredObj->GetAnchorFrm() ) + GetMaster() == pAnchoredObj->GetAnchorFrame() ) continue; if( pRect ) @@ -1079,10 +1079,10 @@ bool SwTextFly::ForEach( const SwRect &rRect, SwRect* pRect, bool bAvoid ) const if( aFly.IsEmpty() || !aFly.IsOver( rRect ) ) continue; if( !bRet || ( - ( !pCurrFrm->IsRightToLeft() && + ( !pCurrFrame->IsRightToLeft() && ( (aFly.*fnRect->fnGetLeft)() < (pRect->*fnRect->fnGetLeft)() ) ) || - ( pCurrFrm->IsRightToLeft() && + ( pCurrFrame->IsRightToLeft() && ( (aFly.*fnRect->fnGetRight)() > (pRect->*fnRect->fnGetRight)() ) ) ) ) *pRect = aFly; @@ -1117,11 +1117,11 @@ void SwTextFly::CalcRightMargin( SwRect &rFly, const SwRect &rLine ) const { // Usually the right margin is the right margin of the Printarea - OSL_ENSURE( ! pCurrFrm->IsVertical() || ! pCurrFrm->IsSwapped(), + OSL_ENSURE( ! pCurrFrame->IsVertical() || ! pCurrFrame->IsSwapped(), "SwTextFly::CalcRightMargin with swapped frame" ); - SWRECTFN( pCurrFrm ) + SWRECTFN( pCurrFrame ) // #118796# - correct determination of right of printing area - SwTwips nRight = (pCurrFrm->*fnRect->fnGetPrtRight)(); + SwTwips nRight = (pCurrFrame->*fnRect->fnGetPrtRight)(); SwTwips nFlyRight = (rFly.*fnRect->fnGetRight)(); SwRect aLine( rLine ); (aLine.*fnRect->fnSetRight)( nRight ); @@ -1131,7 +1131,7 @@ void SwTextFly::CalcRightMargin( SwRect &rFly, // and protrudes into the same line. // Flys with run-through are invisible for those below, i.e., they // are ignored for computing the margins of other Flys. - // 3301: pNext->Frm().IsOver( rLine ) is necessary + // 3301: pNext->Frame().IsOver( rLine ) is necessary // #i68520# SwSurround eSurroundForTextWrap; @@ -1156,7 +1156,7 @@ void SwTextFly::CalcRightMargin( SwRect &rFly, continue; const SwRect aTmp( SwContourCache::CalcBoundRect - ( pNext, aLine, pCurrFrm, nFlyRight, true ) ); + ( pNext, aLine, pCurrFrame, nFlyRight, true ) ); SwTwips nTmpRight = (aTmp.*fnRect->fnGetRight)(); // optimization: @@ -1190,7 +1190,7 @@ void SwTextFly::CalcRightMargin( SwRect &rFly, if( SURROUND_RIGHT == eSurroundForTextWrap || SURROUND_PARALLEL == eSurroundForTextWrap ) { - // overrule the FlyFrm + // overrule the FlyFrame if( nRight > nFlyRight ) nRight = nFlyRight; bStop = true; @@ -1205,11 +1205,11 @@ void SwTextFly::CalcLeftMargin( SwRect &rFly, SwAnchoredObjList::size_type nFlyPos, const SwRect &rLine ) const { - OSL_ENSURE( ! pCurrFrm->IsVertical() || ! pCurrFrm->IsSwapped(), + OSL_ENSURE( ! pCurrFrame->IsVertical() || ! pCurrFrame->IsSwapped(), "SwTextFly::CalcLeftMargin with swapped frame" ); - SWRECTFN( pCurrFrm ) + SWRECTFN( pCurrFrame ) // #118796# - correct determination of left of printing area - SwTwips nLeft = (pCurrFrm->*fnRect->fnGetPrtLeft)(); + SwTwips nLeft = (pCurrFrame->*fnRect->fnGetPrtLeft)(); const SwTwips nFlyLeft = (rFly.*fnRect->fnGetLeft)(); if( nLeft > nFlyLeft ) @@ -1222,7 +1222,7 @@ void SwTextFly::CalcLeftMargin( SwRect &rFly, // and protrudes into the same line. // Flys with run-through are invisible for those below, i.e., they // are ignored for computing the margins of other Flys. - // 3301: pNext->Frm().IsOver( rLine ) is necessary + // 3301: pNext->Frame().IsOver( rLine ) is necessary // #i68520# SwAnchoredObjList::size_type nMyPos = nFlyPos; @@ -1248,7 +1248,7 @@ void SwTextFly::CalcLeftMargin( SwRect &rFly, continue; const SwRect aTmp( SwContourCache::CalcBoundRect - ( pNext, aLine, pCurrFrm, nFlyLeft, false ) ); + ( pNext, aLine, pCurrFrame, nFlyLeft, false ) ); if( (aTmp.*fnRect->fnGetLeft)() < nFlyLeft && aTmp.IsOver( aLine ) ) { @@ -1268,16 +1268,16 @@ void SwTextFly::CalcLeftMargin( SwRect &rFly, SwRect SwTextFly::AnchoredObjToRect( const SwAnchoredObject* pAnchoredObj, const SwRect &rLine ) const { - SWRECTFN( pCurrFrm ) + SWRECTFN( pCurrFrame ) - const long nXPos = pCurrFrm->IsRightToLeft() ? + const long nXPos = pCurrFrame->IsRightToLeft() ? rLine.Right() : (rLine.*fnRect->fnGetLeft)(); SwRect aFly = mbIgnoreContour ? pAnchoredObj->GetObjRectWithSpaces() : - SwContourCache::CalcBoundRect( pAnchoredObj, rLine, pCurrFrm, - nXPos, ! pCurrFrm->IsRightToLeft() ); + SwContourCache::CalcBoundRect( pAnchoredObj, rLine, pCurrFrame, + nXPos, ! pCurrFrame->IsRightToLeft() ); if( !aFly.Width() ) return aFly; @@ -1336,7 +1336,7 @@ SwSurround SwTextFly::_GetSurroundForTextWrap( const SwAnchoredObject* pAnchored const SwFormatSurround &rFlyFormat = pFormat->GetSurround(); SwSurround eSurroundForTextWrap = rFlyFormat.GetSurround(); - if( rFlyFormat.IsAnchorOnly() && pAnchoredObj->GetAnchorFrm() != GetMaster() ) + if( rFlyFormat.IsAnchorOnly() && pAnchoredObj->GetAnchorFrame() != GetMaster() ) { const SwFormatAnchor& rAnchor = pFormat->GetAnchor(); if ((FLY_AT_PARA == rAnchor.GetAnchorId()) || @@ -1352,7 +1352,7 @@ SwSurround SwTextFly::_GetSurroundForTextWrap( const SwAnchoredObject* pAnchored return eSurroundForTextWrap; // left is left and right is right - if ( pCurrFrm->IsRightToLeft() ) + if ( pCurrFrame->IsRightToLeft() ) { if ( SURROUND_LEFT == eSurroundForTextWrap ) eSurroundForTextWrap = SURROUND_RIGHT; @@ -1363,9 +1363,9 @@ SwSurround SwTextFly::_GetSurroundForTextWrap( const SwAnchoredObject* pAnchored // "ideal page wrap": if ( SURROUND_IDEAL == eSurroundForTextWrap ) { - SWRECTFN( pCurrFrm ) - const long nCurrLeft = (pCurrFrm->*fnRect->fnGetPrtLeft)(); - const long nCurrRight = (pCurrFrm->*fnRect->fnGetPrtRight)(); + SWRECTFN( pCurrFrame ) + const long nCurrLeft = (pCurrFrame->*fnRect->fnGetPrtLeft)(); + const long nCurrRight = (pCurrFrame->*fnRect->fnGetPrtRight)(); const SwRect aRect( pAnchoredObj->GetObjRectWithSpaces() ); long nFlyLeft = (aRect.*fnRect->fnGetLeft)(); long nFlyRight = (aRect.*fnRect->fnGetRight)(); @@ -1400,12 +1400,12 @@ SwSurround SwTextFly::_GetSurroundForTextWrap( const SwAnchoredObject* pAnchored return eSurroundForTextWrap; } -bool SwTextFly::IsAnyFrm( const SwRect &rLine ) const +bool SwTextFly::IsAnyFrame( const SwRect &rLine ) const { - SwSwapIfSwapped swap(const_cast<SwTextFrm *>(pCurrFrm)); + SwSwapIfSwapped swap(const_cast<SwTextFrame *>(pCurrFrame)); - OSL_ENSURE( bOn, "IsAnyFrm: Why?" ); + OSL_ENSURE( bOn, "IsAnyFrame: Why?" ); return ForEach( rLine, nullptr, false ); } diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx index e9b2f94531a8..8e13867f67e7 100644 --- a/sw/source/core/text/txtfrm.cxx +++ b/sw/source/core/text/txtfrm.cxx @@ -80,7 +80,7 @@ /// Switches width and height of the text frame -void SwTextFrm::SwapWidthAndHeight() +void SwTextFrame::SwapWidthAndHeight() { if ( ! mbIsSwapped ) { @@ -89,7 +89,7 @@ void SwTextFrm::SwapWidthAndHeight() if( IsVertLR() ) Prt().Pos().Y() = nPrtOfstX; else - Prt().Pos().Y() = Frm().Width() - ( nPrtOfstX + Prt().Width() ); + Prt().Pos().Y() = Frame().Width() - ( nPrtOfstX + Prt().Width() ); } else @@ -99,12 +99,12 @@ void SwTextFrm::SwapWidthAndHeight() if( IsVertLR() ) Prt().Pos().X() = nPrtOfstY; else - Prt().Pos().X() = Frm().Height() - ( nPrtOfstY + Prt().Height() ); + Prt().Pos().X() = Frame().Height() - ( nPrtOfstY + Prt().Height() ); } - const long nFrmWidth = Frm().Width(); - Frm().Width( Frm().Height() ); - Frm().Height( nFrmWidth ); + const long nFrameWidth = Frame().Width(); + Frame().Width( Frame().Height() ); + Frame().Height( nFrameWidth ); const long nPrtWidth = Prt().Width(); Prt().Width( Prt().Height() ); Prt().Height( nPrtWidth ); @@ -116,36 +116,36 @@ void SwTextFrm::SwapWidthAndHeight() * Calculates the coordinates of a rectangle when switching from * horizontal to vertical layout. */ -void SwTextFrm::SwitchHorizontalToVertical( SwRect& rRect ) const +void SwTextFrame::SwitchHorizontalToVertical( SwRect& rRect ) const { // calc offset inside frame long nOfstX, nOfstY; if ( IsVertLR() ) { - nOfstX = rRect.Left() - Frm().Left(); - nOfstY = rRect.Top() - Frm().Top(); + nOfstX = rRect.Left() - Frame().Left(); + nOfstY = rRect.Top() - Frame().Top(); } else { - nOfstX = rRect.Left() - Frm().Left(); - nOfstY = rRect.Top() + rRect.Height() - Frm().Top(); + nOfstX = rRect.Left() - Frame().Left(); + nOfstY = rRect.Top() + rRect.Height() - Frame().Top(); } const long nWidth = rRect.Width(); const long nHeight = rRect.Height(); if ( IsVertLR() ) - rRect.Left(Frm().Left() + nOfstY); + rRect.Left(Frame().Left() + nOfstY); else { if ( mbIsSwapped ) - rRect.Left( Frm().Left() + Frm().Height() - nOfstY ); + rRect.Left( Frame().Left() + Frame().Height() - nOfstY ); else // frame is rotated - rRect.Left( Frm().Left() + Frm().Width() - nOfstY ); + rRect.Left( Frame().Left() + Frame().Width() - nOfstY ); } - rRect.Top( Frm().Top() + nOfstX ); + rRect.Top( Frame().Top() + nOfstX ); rRect.Width( nHeight ); rRect.Height( nWidth ); } @@ -154,30 +154,30 @@ void SwTextFrm::SwitchHorizontalToVertical( SwRect& rRect ) const * Calculates the coordinates of a point when switching from * horizontal to vertical layout. */ -void SwTextFrm::SwitchHorizontalToVertical( Point& rPoint ) const +void SwTextFrame::SwitchHorizontalToVertical( Point& rPoint ) const { // calc offset inside frame - const long nOfstX = rPoint.X() - Frm().Left(); - const long nOfstY = rPoint.Y() - Frm().Top(); + const long nOfstX = rPoint.X() - Frame().Left(); + const long nOfstY = rPoint.Y() - Frame().Top(); if ( IsVertLR() ) - rPoint.X() = Frm().Left() + nOfstY; + rPoint.X() = Frame().Left() + nOfstY; else { if ( mbIsSwapped ) - rPoint.X() = Frm().Left() + Frm().Height() - nOfstY; + rPoint.X() = Frame().Left() + Frame().Height() - nOfstY; else // calc rotated coords - rPoint.X() = Frm().Left() + Frm().Width() - nOfstY; + rPoint.X() = Frame().Left() + Frame().Width() - nOfstY; } - rPoint.Y() = Frm().Top() + nOfstX; + rPoint.Y() = Frame().Top() + nOfstX; } /** * Calculates the a limit value when switching from * horizontal to vertical layout. */ -long SwTextFrm::SwitchHorizontalToVertical( long nLimit ) const +long SwTextFrame::SwitchHorizontalToVertical( long nLimit ) const { Point aTmp( 0, nLimit ); SwitchHorizontalToVertical( aTmp ); @@ -188,28 +188,28 @@ long SwTextFrm::SwitchHorizontalToVertical( long nLimit ) const * Calculates the coordinates of a rectangle when switching from * vertical to horizontal layout. */ -void SwTextFrm::SwitchVerticalToHorizontal( SwRect& rRect ) const +void SwTextFrame::SwitchVerticalToHorizontal( SwRect& rRect ) const { long nOfstX; // calc offset inside frame if ( IsVertLR() ) - nOfstX = rRect.Left() - Frm().Left(); + nOfstX = rRect.Left() - Frame().Left(); else { if ( mbIsSwapped ) - nOfstX = Frm().Left() + Frm().Height() - ( rRect.Left() + rRect.Width() ); + nOfstX = Frame().Left() + Frame().Height() - ( rRect.Left() + rRect.Width() ); else - nOfstX = Frm().Left() + Frm().Width() - ( rRect.Left() + rRect.Width() ); + nOfstX = Frame().Left() + Frame().Width() - ( rRect.Left() + rRect.Width() ); } - const long nOfstY = rRect.Top() - Frm().Top(); + const long nOfstY = rRect.Top() - Frame().Top(); const long nWidth = rRect.Height(); const long nHeight = rRect.Width(); // calc rotated coords - rRect.Left( Frm().Left() + nOfstY ); - rRect.Top( Frm().Top() + nOfstX ); + rRect.Left( Frame().Left() + nOfstY ); + rRect.Top( Frame().Top() + nOfstX ); rRect.Width( nWidth ); rRect.Height( nHeight ); } @@ -218,73 +218,73 @@ void SwTextFrm::SwitchVerticalToHorizontal( SwRect& rRect ) const * Calculates the coordinates of a point when switching from * vertical to horizontal layout. */ -void SwTextFrm::SwitchVerticalToHorizontal( Point& rPoint ) const +void SwTextFrame::SwitchVerticalToHorizontal( Point& rPoint ) const { long nOfstX; // calc offset inside frame if ( IsVertLR() ) - nOfstX = rPoint.X() - Frm().Left(); + nOfstX = rPoint.X() - Frame().Left(); else { if ( mbIsSwapped ) - nOfstX = Frm().Left() + Frm().Height() - rPoint.X(); + nOfstX = Frame().Left() + Frame().Height() - rPoint.X(); else - nOfstX = Frm().Left() + Frm().Width() - rPoint.X(); + nOfstX = Frame().Left() + Frame().Width() - rPoint.X(); } - const long nOfstY = rPoint.Y() - Frm().Top(); + const long nOfstY = rPoint.Y() - Frame().Top(); // calc rotated coords - rPoint.X() = Frm().Left() + nOfstY; - rPoint.Y() = Frm().Top() + nOfstX; + rPoint.X() = Frame().Left() + nOfstY; + rPoint.Y() = Frame().Top() + nOfstX; } /** * Calculates the a limit value when switching from * vertical to horizontal layout. */ -long SwTextFrm::SwitchVerticalToHorizontal( long nLimit ) const +long SwTextFrame::SwitchVerticalToHorizontal( long nLimit ) const { Point aTmp( nLimit, 0 ); SwitchVerticalToHorizontal( aTmp ); return aTmp.Y(); } -SwFrmSwapper::SwFrmSwapper( const SwTextFrm* pTextFrm, bool bSwapIfNotSwapped ) - : pFrm( pTextFrm ), bUndo( false ) +SwFrameSwapper::SwFrameSwapper( const SwTextFrame* pTextFrame, bool bSwapIfNotSwapped ) + : pFrame( pTextFrame ), bUndo( false ) { - if ( pFrm->IsVertical() && - ( ( bSwapIfNotSwapped && ! pFrm->IsSwapped() ) || - ( ! bSwapIfNotSwapped && pFrm->IsSwapped() ) ) ) + if ( pFrame->IsVertical() && + ( ( bSwapIfNotSwapped && ! pFrame->IsSwapped() ) || + ( ! bSwapIfNotSwapped && pFrame->IsSwapped() ) ) ) { bUndo = true; - const_cast<SwTextFrm*>(pFrm)->SwapWidthAndHeight(); + const_cast<SwTextFrame*>(pFrame)->SwapWidthAndHeight(); } } -SwFrmSwapper::~SwFrmSwapper() +SwFrameSwapper::~SwFrameSwapper() { if ( bUndo ) - const_cast<SwTextFrm*>(pFrm)->SwapWidthAndHeight(); + const_cast<SwTextFrame*>(pFrame)->SwapWidthAndHeight(); } -void SwTextFrm::SwitchLTRtoRTL( SwRect& rRect ) const +void SwTextFrame::SwitchLTRtoRTL( SwRect& rRect ) const { - SwSwapIfNotSwapped swap(const_cast<SwTextFrm *>(this)); + SwSwapIfNotSwapped swap(const_cast<SwTextFrame *>(this)); long nWidth = rRect.Width(); - rRect.Left( 2 * ( Frm().Left() + Prt().Left() ) + + rRect.Left( 2 * ( Frame().Left() + Prt().Left() ) + Prt().Width() - rRect.Right() - 1 ); rRect.Width( nWidth ); } -void SwTextFrm::SwitchLTRtoRTL( Point& rPoint ) const +void SwTextFrame::SwitchLTRtoRTL( Point& rPoint ) const { - SwSwapIfNotSwapped swap(const_cast<SwTextFrm *>(this)); + SwSwapIfNotSwapped swap(const_cast<SwTextFrame *>(this)); - rPoint.X() = 2 * ( Frm().Left() + Prt().Left() ) + Prt().Width() - rPoint.X() - 1; + rPoint.X() = 2 * ( Frame().Left() + Prt().Left() ) + Prt().Width() - rPoint.X() - 1; } SwLayoutModeModifier::SwLayoutModeModifier( const OutputDevice& rOutp ) : @@ -334,9 +334,9 @@ SwDigitModeModifier::~SwDigitModeModifier() const_cast<OutputDevice&>(rOut).SetDigitLanguage( nOldLanguageType ); } -void SwTextFrm::Init() +void SwTextFrame::Init() { - OSL_ENSURE( !IsLocked(), "+SwTextFrm::Init: this is locked." ); + OSL_ENSURE( !IsLocked(), "+SwTextFrame::Init: this is locked." ); if( !IsLocked() ) { ClearPara(); @@ -348,8 +348,8 @@ void SwTextFrm::Init() } } -SwTextFrm::SwTextFrm(SwTextNode * const pNode, SwFrm* pSib ) - : SwContentFrm( pNode, pSib ) +SwTextFrame::SwTextFrame(SwTextNode * const pNode, SwFrame* pSib ) + : SwContentFrame( pNode, pSib ) , mnAllLines( 0 ) , mnThisLines( 0 ) , mnFlyAnchorOfst( 0 ) @@ -372,10 +372,10 @@ SwTextFrm::SwTextFrm(SwTextNode * const pNode, SwFrm* pSib ) , mbIsSwapped( false ) , mbFollowFormatAllowed( true ) // OD 14.03.2003 #i11760# { - mnFrmType = FRM_TXT; + mnFrameType = FRM_TXT; } -void SwTextFrm::DestroyImpl() +void SwTextFrame::DestroyImpl() { // Remove associated SwParaPortion from pTextCache ClearPara(); @@ -384,7 +384,7 @@ void SwTextFrm::DestroyImpl() if( nullptr != ( pCNd = dynamic_cast<SwContentNode*>( GetRegisteredIn() ) ) && !pCNd->GetDoc()->IsInDtor() && HasFootnote() ) { - SwTextNode *pTextNd = static_cast<SwTextFrm*>(this)->GetTextNode(); + SwTextNode *pTextNd = static_cast<SwTextFrame*>(this)->GetTextNode(); const SwFootnoteIdxs &rFootnoteIdxs = pCNd->GetDoc()->GetFootnoteIdxs(); size_t nPos = 0; sal_uLong nIndex = pCNd->GetIndex(); @@ -401,24 +401,24 @@ void SwTextFrm::DestroyImpl() SwTextFootnote* pTextFootnote = rFootnoteIdxs[ nPos ]; if( pTextFootnote->GetTextNode().GetIndex() > nIndex ) break; - pTextFootnote->DelFrms( this ); + pTextFootnote->DelFrames( this ); ++nPos; } } - SwContentFrm::DestroyImpl(); + SwContentFrame::DestroyImpl(); } -SwTextFrm::~SwTextFrm() +SwTextFrame::~SwTextFrame() { } -const OUString& SwTextFrm::GetText() const +const OUString& SwTextFrame::GetText() const { return GetTextNode()->GetText(); } -void SwTextFrm::ResetPreps() +void SwTextFrame::ResetPreps() { if ( GetCacheIdx() != USHRT_MAX ) { @@ -428,19 +428,19 @@ void SwTextFrm::ResetPreps() } } -bool SwTextFrm::IsHiddenNow() const +bool SwTextFrame::IsHiddenNow() const { - SwFrmSwapper aSwapper( this, true ); + SwFrameSwapper aSwapper( this, true ); - if( !Frm().Width() && IsValid() && GetUpper()->IsValid() ) // invalid when stack overflows (StackHack)! + if( !Frame().Width() && IsValid() && GetUpper()->IsValid() ) // invalid when stack overflows (StackHack)! { -// OSL_FAIL( "SwTextFrm::IsHiddenNow: thin frame" ); +// OSL_FAIL( "SwTextFrame::IsHiddenNow: thin frame" ); return true; } const bool bHiddenCharsHidePara = GetTextNode()->HasHiddenCharAttribute( true ); const bool bHiddenParaField = GetTextNode()->HasHiddenParaField(); - const SwViewShell* pVsh = getRootFrm()->GetCurrShell(); + const SwViewShell* pVsh = getRootFrame()->GetCurrShell(); if ( pVsh && ( bHiddenCharsHidePara || bHiddenParaField ) ) { @@ -459,7 +459,7 @@ bool SwTextFrm::IsHiddenNow() const } /// Removes Textfrm's attachments, when it's hidden -void SwTextFrm::HideHidden() +void SwTextFrame::HideHidden() { OSL_ENSURE( !GetFollow() && IsHiddenNow(), "HideHidden on visible frame of hidden frame has follow" ); @@ -473,13 +473,13 @@ void SwTextFrm::HideHidden() ClearPara(); } -void SwTextFrm::HideFootnotes( sal_Int32 nStart, sal_Int32 nEnd ) +void SwTextFrame::HideFootnotes( sal_Int32 nStart, sal_Int32 nEnd ) { const SwpHints *pHints = GetTextNode()->GetpSwpHints(); if( pHints ) { const size_t nSize = pHints->Count(); - SwPageFrm *pPage = nullptr; + SwPageFrame *pPage = nullptr; for ( size_t i = 0; i < nSize; ++i ) { const SwTextAttr *pHt = pHints->Get(i); @@ -491,7 +491,7 @@ void SwTextFrm::HideFootnotes( sal_Int32 nStart, sal_Int32 nEnd ) if( nStart <= nIdx ) { if( !pPage ) - pPage = FindPageFrm(); + pPage = FindPageFrame(); pPage->RemoveFootnote( this, static_cast<const SwTextFootnote*>(pHt) ); } } @@ -509,7 +509,7 @@ void SwTextFrm::HideFootnotes( sal_Int32 nStart, sal_Int32 nEnd ) * (b) the paragraph is the last content in the document and * (c) the anchor character is an as-character anchored graphic. */ -bool sw_HideObj( const SwTextFrm& _rFrm, +bool sw_HideObj( const SwTextFrame& _rFrame, const RndStdIds _eAnchorType, const sal_Int32 _nObjAnchorPos, SwAnchoredObject* _pAnchoredObj ) @@ -518,19 +518,19 @@ bool sw_HideObj( const SwTextFrm& _rFrm, if (_eAnchorType == FLY_AT_CHAR) { - const IDocumentSettingAccess* pIDSA = _rFrm.GetTextNode()->getIDocumentSettingAccess(); + const IDocumentSettingAccess* pIDSA = _rFrame.GetTextNode()->getIDocumentSettingAccess(); if ( !pIDSA->get(DocumentSettingId::USE_FORMER_TEXT_WRAPPING) && !pIDSA->get(DocumentSettingId::OLD_LINE_SPACING) && !pIDSA->get(DocumentSettingId::USE_FORMER_OBJECT_POS) && pIDSA->get(DocumentSettingId::CONSIDER_WRAP_ON_OBJECT_POSITION) && - _rFrm.IsInDocBody() && !_rFrm.FindNextCnt() ) + _rFrame.IsInDocBody() && !_rFrame.FindNextCnt() ) { - const OUString &rStr = _rFrm.GetTextNode()->GetText(); + const OUString &rStr = _rFrame.GetTextNode()->GetText(); const sal_Unicode cAnchorChar = _nObjAnchorPos < rStr.getLength() ? rStr[_nObjAnchorPos] : 0; if (cAnchorChar == CH_TXTATR_BREAKWORD) { const SwTextAttr* const pHint( - _rFrm.GetTextNode()->GetTextAttrForCharAt(_nObjAnchorPos, + _rFrame.GetTextNode()->GetTextAttrForCharAt(_nObjAnchorPos, RES_TXTATR_FLYCNT) ); if ( pHint ) { @@ -544,8 +544,8 @@ bool sw_HideObj( const SwTextFrm& _rFrm, { bRet = false; // set needed data structure values for object positioning - SWRECTFN( (&_rFrm) ); - SwRect aLastCharRect( _rFrm.Frm() ); + SWRECTFN( (&_rFrame) ); + SwRect aLastCharRect( _rFrame.Frame() ); (aLastCharRect.*fnRect->fnSetWidth)( 1 ); _pAnchoredObj->maLastCharRect = aLastCharRect; _pAnchoredObj->mnLastTopOfLine = (aLastCharRect.*fnRect->fnGetTop)(); @@ -570,7 +570,7 @@ bool sw_HideObj( const SwTextFrm& _rFrm, * - is called from HideHidden() - should hide objects in hidden paragraphs and * - from _Format() - should hide/show objects in partly visible paragraphs */ -void SwTextFrm::HideAndShowObjects() +void SwTextFrame::HideAndShowObjects() { if ( GetDrawObjs() ) { @@ -598,7 +598,7 @@ void SwTextFrm::HideAndShowObjects() // paragraph is visible, but can contain hidden text portion. // first we check if objects are allowed to be hidden: const SwTextNode& rNode = *GetTextNode(); - const SwViewShell* pVsh = getRootFrm()->GetCurrShell(); + const SwViewShell* pVsh = getRootFrame()->GetCurrShell(); const bool bShouldBeHidden = !pVsh || !pVsh->GetWin() || !pVsh->GetViewOptions()->IsShowHiddenChar(); @@ -633,7 +633,7 @@ void SwTextFrm::HideAndShowObjects() } else { - OSL_FAIL( "<SwTextFrm::HideAndShowObjects()> - object not anchored at/inside paragraph!?" ); + OSL_FAIL( "<SwTextFrame::HideAndShowObjects()> - object not anchored at/inside paragraph!?" ); } } } @@ -641,8 +641,8 @@ void SwTextFrm::HideAndShowObjects() if (IsFollow()) { - SwTextFrm *pMaster = FindMaster(); - OSL_ENSURE(pMaster, "SwTextFrm without master"); + SwTextFrame *pMaster = FindMaster(); + OSL_ENSURE(pMaster, "SwTextFrame without master"); if (pMaster) pMaster->HideAndShowObjects(); } @@ -650,11 +650,11 @@ void SwTextFrm::HideAndShowObjects() /** * Returns the first possible break point in the current line. - * This method is used in SwTextFrm::Format() to decide whether the previous + * This method is used in SwTextFrame::Format() to decide whether the previous * line has to be formatted as well. * nFound is <= nEndLine. */ -sal_Int32 SwTextFrm::FindBrk( const OUString &rText, +sal_Int32 SwTextFrame::FindBrk( const OUString &rText, const sal_Int32 nStart, const sal_Int32 nEnd ) { @@ -679,7 +679,7 @@ sal_Int32 SwTextFrm::FindBrk( const OUString &rText, return nFound; } -bool SwTextFrm::IsIdxInside( const sal_Int32 nPos, const sal_Int32 nLen ) const +bool SwTextFrame::IsIdxInside( const sal_Int32 nPos, const sal_Int32 nLen ) const { if( nLen != COMPLETE_STRING && GetOfst() > nPos + nLen ) // the range preceded us return false; @@ -698,13 +698,13 @@ bool SwTextFrm::IsIdxInside( const sal_Int32 nPos, const sal_Int32 nLen ) const return pPara && ( nPos <= nMax + pPara->GetLen() ); } -inline void SwTextFrm::InvalidateRange(const SwCharRange &aRange, const long nD) +inline void SwTextFrame::InvalidateRange(const SwCharRange &aRange, const long nD) { if ( IsIdxInside( aRange.Start(), aRange.Len() ) ) _InvalidateRange( aRange, nD ); } -void SwTextFrm::_InvalidateRange( const SwCharRange &aRange, const long nD) +void SwTextFrame::_InvalidateRange( const SwCharRange &aRange, const long nD) { if ( !HasPara() ) { InvalidateSize(); @@ -738,10 +738,10 @@ void SwTextFrm::_InvalidateRange( const SwCharRange &aRange, const long nD) } } -void SwTextFrm::CalcLineSpace() +void SwTextFrame::CalcLineSpace() { OSL_ENSURE( ! IsVertical() || ! IsSwapped(), - "SwTextFrm::CalcLineSpace with swapped frame!" ); + "SwTextFrame::CalcLineSpace with swapped frame!" ); if( IsLocked() || !HasPara() ) return; @@ -757,7 +757,7 @@ void SwTextFrm::CalcLineSpace() Size aNewSize( Prt().SSize() ); - SwTextFormatInfo aInf( getRootFrm()->GetCurrShell()->GetOut(), this ); + SwTextFormatInfo aInf( getRootFrame()->GetCurrShell()->GetOut(), this ); SwTextFormatter aLine( this, &aInf ); if( aLine.GetDropLines() ) { @@ -768,18 +768,18 @@ void SwTextFrm::CalcLineSpace() aLine.Top(); aLine.RecalcRealHeight(); - aNewSize.Height() = (aLine.Y() - Frm().Top()) + aLine.GetLineHeight(); + aNewSize.Height() = (aLine.Y() - Frame().Top()) + aLine.GetLineHeight(); SwTwips nDelta = aNewSize.Height() - Prt().Height(); // Underflow with free-flying frames if( aInf.GetTextFly().IsOn() ) { - SwRect aTmpFrm( Frm() ); + SwRect aTmpFrame( Frame() ); if( nDelta < 0 ) - aTmpFrm.Height( Prt().Height() ); + aTmpFrame.Height( Prt().Height() ); else - aTmpFrm.Height( aNewSize.Height() ); - if( aInf.GetTextFly().Relax( aTmpFrm ) ) + aTmpFrame.Height( aNewSize.Height() ); + if( aInf.GetTextFly().Relax( aTmpFrame ) ) { Init(); return; @@ -788,7 +788,7 @@ void SwTextFrm::CalcLineSpace() if( nDelta ) { - SwTextFrmBreak aBreak( this ); + SwTextFrameBreak aBreak( this ); if( GetFollow() || aBreak.IsBreakNow( aLine ) ) { // if there is a Follow() or if we need to break here, reformat @@ -803,11 +803,11 @@ void SwTextFrm::CalcLineSpace() } } -static void lcl_SetWrong( SwTextFrm& rFrm, sal_Int32 nPos, sal_Int32 nCnt, bool bMove ) +static void lcl_SetWrong( SwTextFrame& rFrame, sal_Int32 nPos, sal_Int32 nCnt, bool bMove ) { - if ( !rFrm.IsFollow() ) + if ( !rFrame.IsFollow() ) { - SwTextNode* pTextNode = rFrm.GetTextNode(); + SwTextNode* pTextNode = rFrame.GetTextNode(); IGrammarContact* pGrammarContact = getGrammarContact( *pTextNode ); SwGrammarMarkUp* pWrongGrammar = pGrammarContact ? pGrammarContact->getGrammarCheck( *pTextNode, false ) : @@ -851,13 +851,13 @@ static void lcl_SetWrong( SwTextFrm& rFrm, sal_Int32 nPos, sal_Int32 nCnt, bool pTextNode->SetSmartTagDirty( true ); } - SwRootFrm *pRootFrm = rFrm.getRootFrm(); - if (pRootFrm) + SwRootFrame *pRootFrame = rFrame.getRootFrame(); + if (pRootFrame) { - pRootFrm->SetNeedGrammarCheck( true ); + pRootFrame->SetNeedGrammarCheck( true ); } - SwPageFrm *pPage = rFrm.FindPageFrm(); + SwPageFrame *pPage = rFrame.FindPageFrame(); if( pPage ) { pPage->InvalidateSpelling(); @@ -867,23 +867,23 @@ static void lcl_SetWrong( SwTextFrm& rFrm, sal_Int32 nPos, sal_Int32 nCnt, bool } } -static void lcl_SetScriptInval( SwTextFrm& rFrm, sal_Int32 nPos ) +static void lcl_SetScriptInval( SwTextFrame& rFrame, sal_Int32 nPos ) { - if( rFrm.GetPara() ) - rFrm.GetPara()->GetScriptInfo().SetInvalidityA( nPos ); + if( rFrame.GetPara() ) + rFrame.GetPara()->GetScriptInfo().SetInvalidityA( nPos ); } -static void lcl_ModifyOfst( SwTextFrm* pFrm, sal_Int32 nPos, sal_Int32 nLen ) +static void lcl_ModifyOfst( SwTextFrame* pFrame, sal_Int32 nPos, sal_Int32 nLen ) { - while( pFrm && pFrm->GetOfst() <= nPos ) - pFrm = pFrm->GetFollow(); - while( pFrm ) + while( pFrame && pFrame->GetOfst() <= nPos ) + pFrame = pFrame->GetFollow(); + while( pFrame ) { if (nLen == COMPLETE_STRING) - pFrm->ManipOfst( pFrm->GetTextNode()->GetText().getLength() ); + pFrame->ManipOfst( pFrame->GetTextNode()->GetText().getLength() ); else - pFrm->ManipOfst( pFrm->GetOfst() + nLen ); - pFrm = pFrm->GetFollow(); + pFrame->ManipOfst( pFrame->GetOfst() + nLen ); + pFrame = pFrame->GetFollow(); } } @@ -906,15 +906,15 @@ static bool hasA11yRelevantAttribute( const std::vector<sal_uInt16>& nWhich ) return false; } -void SwTextFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) +void SwTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) { const sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0; // modifications concerning frame attributes are processed by the base class if( IsInRange( aFrameFormatSetRange, nWhich ) || RES_FMT_CHG == nWhich ) { - SwContentFrm::Modify( pOld, pNew ); - if( nWhich == RES_FMT_CHG && getRootFrm()->GetCurrShell() ) + SwContentFrame::Modify( pOld, pNew ); + if( nWhich == RES_FMT_CHG && getRootFrame()->GetCurrShell() ) { // collection has changed Prepare(); @@ -1032,7 +1032,7 @@ void SwTextFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) hasA11yRelevantAttribute( static_cast<const SwUpdateAttr*>(pNew)->getFormatAttr() ) ) { // #i104008# - SwViewShell* pViewSh = getRootFrm() ? getRootFrm()->GetCurrShell() : nullptr; + SwViewShell* pViewSh = getRootFrame() ? getRootFrame()->GetCurrShell() : nullptr; if ( pViewSh ) { pViewSh->InvalidateAccessibleParaAttrs( *this ); @@ -1050,7 +1050,7 @@ void SwTextFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) _InvalidatePrt(); if( IsInSct() && !GetPrev() ) { - SwSectionFrm *pSect = FindSctFrm(); + SwSectionFrame *pSect = FindSctFrame(); if( pSect->ContainsAny() == this ) pSect->InvalidatePrt(); } @@ -1156,7 +1156,7 @@ void SwTextFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) --nCount; if( IsInSct() && !GetPrev() ) { - SwSectionFrm *pSect = FindSctFrm(); + SwSectionFrame *pSect = FindSctFrame(); if( pSect->ContainsAny() == this ) pSect->InvalidatePrt(); } @@ -1182,10 +1182,10 @@ void SwTextFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) for ( size_t i = 0; GetDrawObjs() && i < pObjs->size(); ++i ) { SwAnchoredObject* pAnchoredObj = (*pObjs)[i]; - if ( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) != nullptr ) + if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr ) { - SwFlyFrm *pFly = static_cast<SwFlyFrm*>(pAnchoredObj); - if( !pFly->IsFlyInCntFrm() ) + SwFlyFrame *pFly = static_cast<SwFlyFrame*>(pAnchoredObj); + if( !pFly->IsFlyInContentFrame() ) { const SvxBrushItem &rBack = pFly->GetAttrSet()->GetBackground(); @@ -1240,7 +1240,7 @@ void SwTextFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) if( nCount ) { - if( getRootFrm()->GetCurrShell() ) + if( getRootFrame()->GetCurrShell() ) { Prepare(); _InvalidatePrt(); @@ -1279,16 +1279,16 @@ void SwTextFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) aOldSet.ClearItem( RES_PARATR_SPLIT ); aNewSet.ClearItem( RES_PARATR_SPLIT ); } - SwContentFrm::Modify( &aOldSet, &aNewSet ); + SwContentFrame::Modify( &aOldSet, &aNewSet ); } else - SwContentFrm::Modify( pOld, pNew ); + SwContentFrame::Modify( pOld, pNew ); } if (isA11yRelevantAttribute(nWhich)) { // #i88069# - SwViewShell* pViewSh = getRootFrm() ? getRootFrm()->GetCurrShell() : nullptr; + SwViewShell* pViewSh = getRootFrame() ? getRootFrame()->GetCurrShell() : nullptr; if ( pViewSh ) { pViewSh->InvalidateAccessibleParaAttrs( *this ); @@ -1303,7 +1303,7 @@ void SwTextFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) if( pOld && pNew ) { const SwDocPosUpdate *pDocPos = static_cast<const SwDocPosUpdate*>(pOld); - if( pDocPos->nDocPos <= maFrm.Top() ) + if( pDocPos->nDocPos <= maFrame.Top() ) { const SwFormatField *pField = static_cast<const SwFormatField *>(pNew); InvalidateRange( @@ -1329,7 +1329,7 @@ void SwTextFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) if ( !nWhich ) { // is called by e. g. HiddenPara with 0 - SwFrm *pNxt; + SwFrame *pNxt; if ( nullptr != (pNxt = FindNext()) ) pNxt->InvalidatePrt(); } @@ -1343,12 +1343,12 @@ void SwTextFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) CalcFootnoteFlag(); } -bool SwTextFrm::GetInfo( SfxPoolItem &rHint ) const +bool SwTextFrame::GetInfo( SfxPoolItem &rHint ) const { if ( RES_VIRTPAGENUM_INFO == rHint.Which() && IsInDocBody() && ! IsFollow() ) { SwVirtPageNumInfo &rInfo = static_cast<SwVirtPageNumInfo&>(rHint); - const SwPageFrm *pPage = FindPageFrm(); + const SwPageFrame *pPage = FindPageFrame(); if ( pPage ) { if ( pPage == rInfo.GetOrigPage() && !GetPrev() ) @@ -1369,9 +1369,9 @@ bool SwTextFrm::GetInfo( SfxPoolItem &rHint ) const return true; } -void SwTextFrm::PrepWidows( const sal_uInt16 nNeed, bool bNotify ) +void SwTextFrame::PrepWidows( const sal_uInt16 nNeed, bool bNotify ) { - OSL_ENSURE(GetFollow() && nNeed, "+SwTextFrm::Prepare: lost all friends"); + OSL_ENSURE(GetFollow() && nNeed, "+SwTextFrame::Prepare: lost all friends"); SwParaPortion *pPara = GetPara(); if ( !pPara ) @@ -1421,38 +1421,38 @@ void SwTextFrm::PrepWidows( const sal_uInt16 nNeed, bool bNotify ) } } -static bool lcl_ErgoVadis( SwTextFrm* pFrm, sal_Int32 &rPos, const PrepareHint ePrep ) +static bool lcl_ErgoVadis( SwTextFrame* pFrame, sal_Int32 &rPos, const PrepareHint ePrep ) { - const SwFootnoteInfo &rFootnoteInfo = pFrm->GetNode()->GetDoc()->GetFootnoteInfo(); + const SwFootnoteInfo &rFootnoteInfo = pFrame->GetNode()->GetDoc()->GetFootnoteInfo(); if( ePrep == PREP_ERGOSUM ) { if( rFootnoteInfo.aErgoSum.isEmpty() ) return false; - rPos = pFrm->GetOfst(); + rPos = pFrame->GetOfst(); } else { if( rFootnoteInfo.aQuoVadis.isEmpty() ) return false; - if( pFrm->HasFollow() ) - rPos = pFrm->GetFollow()->GetOfst(); + if( pFrame->HasFollow() ) + rPos = pFrame->GetFollow()->GetOfst(); else - rPos = pFrm->GetText().getLength(); + rPos = pFrame->GetText().getLength(); if( rPos ) --rPos; // our last character } return true; } -bool SwTextFrm::Prepare( const PrepareHint ePrep, const void* pVoid, +bool SwTextFrame::Prepare( const PrepareHint ePrep, const void* pVoid, bool bNotify ) { bool bParaPossiblyInvalid = false; - SwFrmSwapper aSwapper( this, false ); + SwFrameSwapper aSwapper( this, false ); #if OSL_DEBUG_LEVEL > 1 - const SwTwips nDbgY = Frm().Top(); + const SwTwips nDbgY = Frame().Top(); (void)nDbgY; #endif @@ -1472,9 +1472,9 @@ bool SwTextFrm::Prepare( const PrepareHint ePrep, const void* pVoid, // so that we format and bUndersized is set (if needed) if( IsInFly() || IsInSct() ) { - SwTwips nTmpBottom = GetUpper()->Frm().Top() + + SwTwips nTmpBottom = GetUpper()->Frame().Top() + GetUpper()->Prt().Bottom(); - if( nTmpBottom < Frm().Bottom() ) + if( nTmpBottom < Frame().Bottom() ) break; } // Are there any free-flying frames on this page? @@ -1488,7 +1488,7 @@ bool SwTextFrm::Prepare( const PrepareHint ePrep, const void* pVoid, if( GetTextNode()->GetSwAttrSet().GetRegister().GetValue()) break; - SwTextGridItem const*const pGrid(GetGridItem(FindPageFrm())); + SwTextGridItem const*const pGrid(GetGridItem(FindPageFrame())); if ( pGrid && GetTextNode()->GetSwAttrSet().GetParaGrid().GetValue() ) break; @@ -1506,7 +1506,7 @@ bool SwTextFrm::Prepare( const PrepareHint ePrep, const void* pVoid, if( !HasPara() && PREP_MUST_FIT != ePrep ) { SetInvalidVert( true ); // Test - OSL_ENSURE( !IsLocked(), "SwTextFrm::Prepare: three of a perfect pair" ); + OSL_ENSURE( !IsLocked(), "SwTextFrame::Prepare: three of a perfect pair" ); if ( bNotify ) InvalidateSize(); else @@ -1520,13 +1520,13 @@ bool SwTextFrm::Prepare( const PrepareHint ePrep, const void* pVoid, switch( ePrep ) { - case PREP_MOVEFTN : Frm().Height(0); + case PREP_MOVEFTN : Frame().Height(0); Prt().Height(0); _InvalidatePrt(); _InvalidateSize(); /* no break here */ case PREP_ADJUST_FRM : pPara->SetPrepAdjust(); - if( IsFootnoteNumFrm() != pPara->IsFootnoteNum() || + if( IsFootnoteNumFrame() != pPara->IsFootnoteNum() || IsUndersized() ) { InvalidateRange( SwCharRange( 0, 1 ), 1); @@ -1552,9 +1552,9 @@ bool SwTextFrm::Prepare( const PrepareHint ePrep, const void* pVoid, SwTextFootnote const *pFootnote = static_cast<SwTextFootnote const *>(pVoid); if( IsInFootnote() ) { - // Am I the first TextFrm of a footnote? + // Am I the first TextFrame of a footnote? if( !GetPrev() ) - // So we're a TextFrm of the footnote, which has + // So we're a TextFrame of the footnote, which has // to display the footnote number or the ErgoSum text InvalidateRange( SwCharRange( 0, 1 ), 1); @@ -1574,7 +1574,7 @@ bool SwTextFrm::Prepare( const PrepareHint ePrep, const void* pVoid, } else { - // We are the TextFrm _with_ the footnote + // We are the TextFrame _with_ the footnote const sal_Int32 nPos = pFootnote->GetStart(); InvalidateRange( SwCharRange( nPos, 1 ), 1); } @@ -1646,7 +1646,7 @@ bool SwTextFrm::Prepare( const PrepareHint ePrep, const void* pVoid, { if ( GetValidPrtAreaFlag() ) { - SwTextGridItem const*const pGrid(GetGridItem(FindPageFrm())); + SwTextGridItem const*const pGrid(GetGridItem(FindPageFrame())); if ( pGrid && GetTextNode()->GetSwAttrSet().GetParaGrid().GetValue() ) InvalidatePrt(); } @@ -1658,9 +1658,9 @@ bool SwTextFrm::Prepare( const PrepareHint ePrep, const void* pVoid, { if( IsInFly() ) { - SwTwips nTmpBottom = GetUpper()->Frm().Top() + + SwTwips nTmpBottom = GetUpper()->Frame().Top() + GetUpper()->Prt().Bottom(); - if( nTmpBottom < Frm().Bottom() ) + if( nTmpBottom < Frame().Bottom() ) bFormat = true; } if( !bFormat ) @@ -1740,11 +1740,11 @@ bool SwTextFrm::Prepare( const PrepareHint ePrep, const void* pVoid, InvalidateSize(); _InvalidatePrt(); - SwFrm* pNxt; + SwFrame* pNxt; if ( nullptr != ( pNxt = GetIndNext() ) ) { pNxt->_InvalidatePrt(); - if ( pNxt->IsLayoutFrm() ) + if ( pNxt->IsLayoutFrame() ) pNxt->InvalidatePage(); } SetCompletePaint(); @@ -1826,78 +1826,78 @@ bool SwTextFrm::Prepare( const PrepareHint ePrep, const void* pVoid, * The frame is changed in size and position, its SwParaPortion is moved aside * and a new one is created. * To achieve this, run formatting with bTestFormat flag set. - * In the destructor the TextFrm is reset to its original state. + * In the destructor the TextFrame is reset to its original state. */ class SwTestFormat { - SwTextFrm *pFrm; + SwTextFrame *pFrame; SwParaPortion *pOldPara; - SwRect aOldFrm, aOldPrt; + SwRect aOldFrame, aOldPrt; public: - SwTestFormat( SwTextFrm* pTextFrm, const SwFrm* pPrv, SwTwips nMaxHeight ); + SwTestFormat( SwTextFrame* pTextFrame, const SwFrame* pPrv, SwTwips nMaxHeight ); ~SwTestFormat(); }; -SwTestFormat::SwTestFormat( SwTextFrm* pTextFrm, const SwFrm* pPre, SwTwips nMaxHeight ) - : pFrm( pTextFrm ) +SwTestFormat::SwTestFormat( SwTextFrame* pTextFrame, const SwFrame* pPre, SwTwips nMaxHeight ) + : pFrame( pTextFrame ) { - aOldFrm = pFrm->Frm(); - aOldPrt = pFrm->Prt(); + aOldFrame = pFrame->Frame(); + aOldPrt = pFrame->Prt(); - SWRECTFN( pFrm ) - SwTwips nLower = (pFrm->*fnRect->fnGetBottomMargin)(); + SWRECTFN( pFrame ) + SwTwips nLower = (pFrame->*fnRect->fnGetBottomMargin)(); - pFrm->Frm() = pFrm->GetUpper()->Prt(); - pFrm->Frm() += pFrm->GetUpper()->Frm().Pos(); + pFrame->Frame() = pFrame->GetUpper()->Prt(); + pFrame->Frame() += pFrame->GetUpper()->Frame().Pos(); - (pFrm->Frm().*fnRect->fnSetHeight)( nMaxHeight ); - if( pFrm->GetPrev() ) - (pFrm->Frm().*fnRect->fnSetPosY)( - (pFrm->GetPrev()->Frm().*fnRect->fnGetBottom)() - + (pFrame->Frame().*fnRect->fnSetHeight)( nMaxHeight ); + if( pFrame->GetPrev() ) + (pFrame->Frame().*fnRect->fnSetPosY)( + (pFrame->GetPrev()->Frame().*fnRect->fnGetBottom)() - ( bVert ? nMaxHeight + 1 : 0 ) ); - SwBorderAttrAccess aAccess( SwFrm::GetCache(), pFrm ); + SwBorderAttrAccess aAccess( SwFrame::GetCache(), pFrame ); const SwBorderAttrs &rAttrs = *aAccess.Get(); - (pFrm->Prt().*fnRect->fnSetPosX)( rAttrs.CalcLeft( pFrm ) ); + (pFrame->Prt().*fnRect->fnSetPosX)( rAttrs.CalcLeft( pFrame ) ); if( pPre ) { - SwTwips nUpper = pFrm->CalcUpperSpace( &rAttrs, pPre ); - (pFrm->Prt().*fnRect->fnSetPosY)( nUpper ); + SwTwips nUpper = pFrame->CalcUpperSpace( &rAttrs, pPre ); + (pFrame->Prt().*fnRect->fnSetPosY)( nUpper ); } - (pFrm->Prt().*fnRect->fnSetHeight)( - std::max( 0L , (pFrm->Frm().*fnRect->fnGetHeight)() - - (pFrm->Prt().*fnRect->fnGetTop)() - nLower ) ); - (pFrm->Prt().*fnRect->fnSetWidth)( - (pFrm->Frm().*fnRect->fnGetWidth)() - - ( rAttrs.CalcLeft( pFrm ) + rAttrs.CalcRight( pFrm ) ) ); - pOldPara = pFrm->HasPara() ? pFrm->GetPara() : nullptr; - pFrm->SetPara( new SwParaPortion(), false ); + (pFrame->Prt().*fnRect->fnSetHeight)( + std::max( 0L , (pFrame->Frame().*fnRect->fnGetHeight)() - + (pFrame->Prt().*fnRect->fnGetTop)() - nLower ) ); + (pFrame->Prt().*fnRect->fnSetWidth)( + (pFrame->Frame().*fnRect->fnGetWidth)() - + ( rAttrs.CalcLeft( pFrame ) + rAttrs.CalcRight( pFrame ) ) ); + pOldPara = pFrame->HasPara() ? pFrame->GetPara() : nullptr; + pFrame->SetPara( new SwParaPortion(), false ); - OSL_ENSURE( ! pFrm->IsSwapped(), "A frame is swapped before _Format" ); + OSL_ENSURE( ! pFrame->IsSwapped(), "A frame is swapped before _Format" ); - if ( pFrm->IsVertical() ) - pFrm->SwapWidthAndHeight(); + if ( pFrame->IsVertical() ) + pFrame->SwapWidthAndHeight(); - SwTextFormatInfo aInf( pFrm->getRootFrm()->GetCurrShell()->GetOut(), pFrm, false, true, true ); - SwTextFormatter aLine( pFrm, &aInf ); + SwTextFormatInfo aInf( pFrame->getRootFrame()->GetCurrShell()->GetOut(), pFrame, false, true, true ); + SwTextFormatter aLine( pFrame, &aInf ); - pFrm->_Format( aLine, aInf ); + pFrame->_Format( aLine, aInf ); - if ( pFrm->IsVertical() ) - pFrm->SwapWidthAndHeight(); + if ( pFrame->IsVertical() ) + pFrame->SwapWidthAndHeight(); - OSL_ENSURE( ! pFrm->IsSwapped(), "A frame is swapped after _Format" ); + OSL_ENSURE( ! pFrame->IsSwapped(), "A frame is swapped after _Format" ); } SwTestFormat::~SwTestFormat() { - pFrm->Frm() = aOldFrm; - pFrm->Prt() = aOldPrt; - pFrm->SetPara( pOldPara ); + pFrame->Frame() = aOldFrame; + pFrame->Prt() = aOldPrt; + pFrame->SetPara( pOldPara ); } -bool SwTextFrm::TestFormat( const SwFrm* pPrv, SwTwips &rMaxHeight, bool &bSplit ) +bool SwTextFrame::TestFormat( const SwFrame* pPrv, SwTwips &rMaxHeight, bool &bSplit ) { PROTOCOL_ENTER( this, PROT_TESTFORMAT, 0, nullptr ) @@ -1906,7 +1906,7 @@ bool SwTextFrm::TestFormat( const SwFrm* pPrv, SwTwips &rMaxHeight, bool &bSplit SwTestFormat aSave( this, pPrv, rMaxHeight ); - return SwTextFrm::WouldFit( rMaxHeight, bSplit, true ); + return SwTextFrame::WouldFit( rMaxHeight, bSplit, true ); } /** @@ -1921,10 +1921,10 @@ bool SwTextFrm::TestFormat( const SwFrm* pPrv, SwTwips &rMaxHeight, bool &bSplit * * @returns true if I can split */ -bool SwTextFrm::WouldFit( SwTwips &rMaxHeight, bool &bSplit, bool bTst ) +bool SwTextFrame::WouldFit( SwTwips &rMaxHeight, bool &bSplit, bool bTst ) { OSL_ENSURE( ! IsVertical() || ! IsSwapped(), - "SwTextFrm::WouldFit with swapped frame" ); + "SwTextFrame::WouldFit with swapped frame" ); SWRECTFN( this ); if( IsLocked() ) @@ -1936,8 +1936,8 @@ bool SwTextFrm::WouldFit( SwTwips &rMaxHeight, bool &bSplit, bool bTst ) // OD 2004-05-24 #i27801# - correction: 'short cut' for empty paragraph // can *not* be applied, if test format is in progress. The test format doesn't - // adjust the frame and the printing area - see method <SwTextFrm::_Format(..)>, - // which is called in <SwTextFrm::TestFormat(..)> + // adjust the frame and the printing area - see method <SwTextFrame::_Format(..)>, + // which is called in <SwTextFrame::TestFormat(..)> if ( IsEmpty() && !bTst ) { bSplit = false; @@ -1954,34 +1954,34 @@ bool SwTextFrm::WouldFit( SwTwips &rMaxHeight, bool &bSplit, bool bTst ) // GetPara can still be 0 in edge cases // We return true in order to be reformatted on the new Page OSL_ENSURE( HasPara() || IsHiddenNow(), "WouldFit: GetFormatted() and then !HasPara()" ); - if( !HasPara() || ( !(Frm().*fnRect->fnGetHeight)() && IsHiddenNow() ) ) + if( !HasPara() || ( !(Frame().*fnRect->fnGetHeight)() && IsHiddenNow() ) ) return true; // Because the Orphan flag only exists for a short moment, we also check // whether the Framesize is set to very huge by CalcPreps, in order to // force a MoveFwd if( IsWidow() || ( bVert ? - ( 0 == Frm().Left() ) : - ( LONG_MAX - 20000 < Frm().Bottom() ) ) ) + ( 0 == Frame().Left() ) : + ( LONG_MAX - 20000 < Frame().Bottom() ) ) ) { SetWidow(false); if ( GetFollow() ) { // If we've ended up here due to a Widow request by our Follow, we check // whether there's a Follow with a real height at all. - // Else (e.g. for newly created SctFrms) we ignore the IsWidow() and + // Else (e.g. for newly created SctFrames) we ignore the IsWidow() and // still check if we can find enough room - if( ( ( ! bVert && LONG_MAX - 20000 >= Frm().Bottom() ) || - ( bVert && 0 < Frm().Left() ) ) && + if( ( ( ! bVert && LONG_MAX - 20000 >= Frame().Bottom() ) || + ( bVert && 0 < Frame().Left() ) ) && ( GetFollow()->IsVertical() ? - !GetFollow()->Frm().Width() : - !GetFollow()->Frm().Height() ) ) + !GetFollow()->Frame().Width() : + !GetFollow()->Frame().Height() ) ) { - SwTextFrm* pFoll = GetFollow()->GetFollow(); + SwTextFrame* pFoll = GetFollow()->GetFollow(); while( pFoll && ( pFoll->IsVertical() ? - !pFoll->Frm().Width() : - !pFoll->Frm().Height() ) ) + !pFoll->Frame().Width() : + !pFoll->Frame().Height() ) ) pFoll = pFoll->GetFollow(); if( pFoll ) return false; @@ -1996,15 +1996,15 @@ bool SwTextFrm::WouldFit( SwTwips &rMaxHeight, bool &bSplit, bool bTst ) SwTextSizeInfo aInf( this ); SwTextMargin aLine( this, &aInf ); - WidowsAndOrphans aFrmBreak( this, rMaxHeight, bSplit ); + WidowsAndOrphans aFrameBreak( this, rMaxHeight, bSplit ); bool bRet = true; aLine.Bottom(); // is breaking necessary? - bSplit = !aFrmBreak.IsInside( aLine ); + bSplit = !aFrameBreak.IsInside( aLine ); if ( bSplit ) - bRet = !aFrmBreak.IsKeepAlways() && aFrmBreak.WouldFit( aLine, rMaxHeight, bTst ); + bRet = !aFrameBreak.IsKeepAlways() && aFrameBreak.WouldFit( aLine, rMaxHeight, bTst ); else { // we need the total height including the current line @@ -2018,10 +2018,10 @@ bool SwTextFrm::WouldFit( SwTwips &rMaxHeight, bool &bSplit, bool bTst ) return bRet; } -sal_uInt16 SwTextFrm::GetParHeight() const +sal_uInt16 SwTextFrame::GetParHeight() const { OSL_ENSURE( ! IsVertical() || ! IsSwapped(), - "SwTextFrm::GetParHeight with swapped frame" ); + "SwTextFrame::GetParHeight with swapped frame" ); if( !HasPara() ) { // For non-empty paragraphs this is a special case @@ -2059,9 +2059,9 @@ sal_uInt16 SwTextFrm::GetParHeight() const /** * @returns this _always_ in the formatted state! */ -SwTextFrm* SwTextFrm::GetFormatted( bool bForceQuickFormat ) +SwTextFrame* SwTextFrame::GetFormatted( bool bForceQuickFormat ) { - vcl::RenderContext* pRenderContext = getRootFrm()->GetCurrShell()->GetOut(); + vcl::RenderContext* pRenderContext = getRootFrame()->GetCurrShell()->GetOut(); SwSwapIfSwapped swap( this ); // The IdleCollector could've removed my cached information @@ -2078,13 +2078,13 @@ SwTextFrm* SwTextFrm::GetFormatted( bool bForceQuickFormat ) // format information // Optimization with FormatQuick() if( bFormat && !FormatQuick( bForceQuickFormat ) ) - Format(getRootFrm()->GetCurrShell()->GetOut()); + Format(getRootFrame()->GetCurrShell()->GetOut()); } return this; } -SwTwips SwTextFrm::CalcFitToContent() +SwTwips SwTextFrame::CalcFitToContent() { // #i31490# // If we are currently locked, we better return with a @@ -2095,26 +2095,26 @@ SwTwips SwTextFrm::CalcFitToContent() SwParaPortion* pOldPara = GetPara(); SwParaPortion *pDummy = new SwParaPortion(); SetPara( pDummy, false ); - const SwPageFrm* pPage = FindPageFrm(); + const SwPageFrame* pPage = FindPageFrame(); - const Point aOldFrmPos = Frm().Pos(); - const SwTwips nOldFrmWidth = Frm().Width(); + const Point aOldFramePos = Frame().Pos(); + const SwTwips nOldFrameWidth = Frame().Width(); const SwTwips nOldPrtWidth = Prt().Width(); const SwTwips nPageWidth = GetUpper()->IsVertical() ? pPage->Prt().Height() : pPage->Prt().Width(); - Frm().Width( nPageWidth ); + Frame().Width( nPageWidth ); Prt().Width( nPageWidth ); // #i25422# objects anchored as character in RTL if ( IsRightToLeft() ) - Frm().Pos().X() += nOldFrmWidth - nPageWidth; + Frame().Pos().X() += nOldFrameWidth - nPageWidth; // #i31490# - TextFrmLockGuard aLock( this ); + TextFrameLockGuard aLock( this ); - SwTextFormatInfo aInf( getRootFrm()->GetCurrShell()->GetOut(), this, false, true, true ); + SwTextFormatInfo aInf( getRootFrame()->GetCurrShell()->GetOut(), this, false, true, true ); aInf.SetIgnoreFly( true ); SwTextFormatter aLine( this, &aInf ); SwHookOut aHook( aInf ); @@ -2123,12 +2123,12 @@ SwTwips SwTextFrm::CalcFitToContent() const SwTwips nMax = std::max( (SwTwips)MINLAY, aLine._CalcFitToContent() + 1 ); - Frm().Width( nOldFrmWidth ); + Frame().Width( nOldFrameWidth ); Prt().Width( nOldPrtWidth ); // #i25422# objects anchored as character in RTL if ( IsRightToLeft() ) - Frm().Pos() = aOldFrmPos; + Frame().Pos() = aOldFramePos; SetPara( pOldPara ); @@ -2141,7 +2141,7 @@ SwTwips SwTextFrm::CalcFitToContent() * line offset for the real text formatting due to the value of label * adjustment attribute of the list level. */ -void SwTextFrm::CalcAdditionalFirstLineOffset() +void SwTextFrame::CalcAdditionalFirstLineOffset() { if ( IsLocked() ) return; @@ -2171,10 +2171,10 @@ void SwTextFrm::CalcAdditionalFirstLineOffset() SetPara( pDummy, false ); // lock paragraph - TextFrmLockGuard aLock( this ); + TextFrameLockGuard aLock( this ); // simulate text formatting - SwTextFormatInfo aInf( getRootFrm()->GetCurrShell()->GetOut(), this, false, true, true ); + SwTextFormatInfo aInf( getRootFrame()->GetCurrShell()->GetOut(), this, false, true, true ); aInf.SetIgnoreFly( true ); SwTextFormatter aLine( this, &aInf ); SwHookOut aHook( aInf ); @@ -2225,15 +2225,15 @@ void SwTextFrm::CalcAdditionalFirstLineOffset() * determine the height of the last line, which * uses the font */ -void SwTextFrm::_CalcHeightOfLastLine( const bool _bUseFont ) +void SwTextFrame::_CalcHeightOfLastLine( const bool _bUseFont ) { // #i71281# // invalidate printing area, if height of last line changes const SwTwips mnOldHeightOfLastLine( mnHeightOfLastLine ); // determine output device - SwViewShell* pVsh = getRootFrm()->GetCurrShell(); - OSL_ENSURE( pVsh, "<SwTextFrm::_GetHeightOfLastLineForPropLineSpacing()> - no SwViewShell" ); + SwViewShell* pVsh = getRootFrame()->GetCurrShell(); + OSL_ENSURE( pVsh, "<SwTextFrame::_GetHeightOfLastLineForPropLineSpacing()> - no SwViewShell" ); // #i78921# - make code robust, according to provided patch // There could be no <SwViewShell> instance in the case of loading a binary @@ -2249,7 +2249,7 @@ void SwTextFrm::_CalcHeightOfLastLine( const bool _bUseFont ) { pOut = GetTextNode()->getIDocumentDeviceAccess().getReferenceDevice( true ); } - OSL_ENSURE( pOut, "<SwTextFrm::_GetHeightOfLastLineForPropLineSpacing()> - no OutputDevice" ); + OSL_ENSURE( pOut, "<SwTextFrame::_GetHeightOfLastLineForPropLineSpacing()> - no OutputDevice" ); // #i78921# - make code robust, according to provided patch if ( !pOut ) { @@ -2310,7 +2310,7 @@ void SwTextFrm::_CalcHeightOfLastLine( const bool _bUseFont ) if ( bCalcHeightOfLastLine ) { OSL_ENSURE( HasPara(), - "<SwTextFrm::_CalcHeightOfLastLine()> - missing paragraph portions." ); + "<SwTextFrame::_CalcHeightOfLastLine()> - missing paragraph portions." ); const SwLineLayout* pLineLayout = GetPara(); while ( pLineLayout && pLineLayout->GetNext() ) { @@ -2363,7 +2363,7 @@ void SwTextFrm::_CalcHeightOfLastLine( const bool _bUseFont ) * value of a proportional line spacing is * returned or not */ -long SwTextFrm::GetLineSpace( const bool _bNoPropLineSpace ) const +long SwTextFrame::GetLineSpace( const bool _bNoPropLineSpace ) const { long nRet = 0; @@ -2405,7 +2405,7 @@ long SwTextFrm::GetLineSpace( const bool _bNoPropLineSpace ) const return nRet; } -sal_uInt16 SwTextFrm::FirstLineHeight() const +sal_uInt16 SwTextFrame::FirstLineHeight() const { if ( !HasPara() ) { @@ -2420,28 +2420,28 @@ sal_uInt16 SwTextFrm::FirstLineHeight() const return pPara->Height(); } -sal_uInt16 SwTextFrm::GetLineCount( sal_Int32 nPos ) +sal_uInt16 SwTextFrame::GetLineCount( sal_Int32 nPos ) { sal_uInt16 nRet = 0; - SwTextFrm *pFrm = this; + SwTextFrame *pFrame = this; do { - pFrm->GetFormatted(); - if( !pFrm->HasPara() ) + pFrame->GetFormatted(); + if( !pFrame->HasPara() ) break; - SwTextSizeInfo aInf( pFrm ); - SwTextMargin aLine( pFrm, &aInf ); + SwTextSizeInfo aInf( pFrame ); + SwTextMargin aLine( pFrame, &aInf ); if( COMPLETE_STRING == nPos ) aLine.Bottom(); else aLine.CharToLine( nPos ); nRet = nRet + aLine.GetLineNr(); - pFrm = pFrm->GetFollow(); - } while ( pFrm && pFrm->GetOfst() <= nPos ); + pFrame = pFrame->GetFollow(); + } while ( pFrame && pFrame->GetOfst() <= nPos ); return nRet; } -void SwTextFrm::ChgThisLines() +void SwTextFrame::ChgThisLines() { // not necessary to format here (GerFormatted etc.), because we have to come from there! sal_uLong nNew = 0; @@ -2474,10 +2474,10 @@ void SwTextFrm::ChgThisLines() mnAllLines -= mnThisLines; mnThisLines = nNew; mnAllLines += mnThisLines; - SwFrm *pNxt = GetNextContentFrm(); + SwFrame *pNxt = GetNextContentFrame(); while( pNxt && pNxt->IsInTab() ) { - if( nullptr != (pNxt = pNxt->FindTabFrm()) ) + if( nullptr != (pNxt = pNxt->FindTabFrame()) ) pNxt = pNxt->FindNextCnt(); } if( pNxt ) @@ -2488,7 +2488,7 @@ void SwTextFrm::ChgThisLines() { SwRepaint& rRepaint = GetPara()->GetRepaint(); rRepaint.Bottom( std::max( rRepaint.Bottom(), - Frm().Top()+Prt().Bottom())); + Frame().Top()+Prt().Bottom())); } } else // Paragraphs which are not counted should not manipulate the AllLines. @@ -2496,7 +2496,7 @@ void SwTextFrm::ChgThisLines() } } -void SwTextFrm::RecalcAllLines() +void SwTextFrame::RecalcAllLines() { ValidateLineNum(); @@ -2513,23 +2513,23 @@ void SwTextFrm::RecalcAllLines() nNewNum = rLineNum.GetStartValue() - 1; // If it is a follow or not has not be considered if it is a restart at each page; the // restart should also take effect at follows. - else if ( bRestart && FindPageFrm()->FindFirstBodyContent() == this ) + else if ( bRestart && FindPageFrame()->FindFirstBodyContent() == this ) { nNewNum = 0; } else { - SwContentFrm *pPrv = GetPrevContentFrm(); + SwContentFrame *pPrv = GetPrevContentFrame(); while ( pPrv && (pPrv->IsInTab() || pPrv->IsInDocBody() != IsInDocBody()) ) - pPrv = pPrv->GetPrevContentFrm(); + pPrv = pPrv->GetPrevContentFrame(); // #i78254# Restart line numbering at page change // First body content may be in table! - if ( bRestart && pPrv && pPrv->FindPageFrm() != FindPageFrm() ) + if ( bRestart && pPrv && pPrv->FindPageFrame() != FindPageFrame() ) pPrv = nullptr; - nNewNum = pPrv ? static_cast<SwTextFrm*>(pPrv)->GetAllLines() : 0; + nNewNum = pPrv ? static_cast<SwTextFrame*>(pPrv)->GetAllLines() : 0; } if ( rLineNum.IsCount() ) nNewNum += GetThisLines(); @@ -2537,10 +2537,10 @@ void SwTextFrm::RecalcAllLines() if ( nOld != nNewNum ) { mnAllLines = nNewNum; - SwContentFrm *pNxt = GetNextContentFrm(); + SwContentFrame *pNxt = GetNextContentFrame(); while ( pNxt && (pNxt->IsInTab() || pNxt->IsInDocBody() != IsInDocBody()) ) - pNxt = pNxt->GetNextContentFrm(); + pNxt = pNxt->GetNextContentFrame(); if ( pNxt ) { if ( pNxt->GetUpper() != GetUpper() ) @@ -2552,7 +2552,7 @@ void SwTextFrm::RecalcAllLines() } } -void SwTextFrm::VisitPortions( SwPortionHandler& rPH ) const +void SwTextFrame::VisitPortions( SwPortionHandler& rPH ) const { const SwParaPortion* pPara = IsValid() ? GetPara() : nullptr; @@ -2579,29 +2579,29 @@ void SwTextFrm::VisitPortions( SwPortionHandler& rPH ) const rPH.Finish(); } -const SwScriptInfo* SwTextFrm::GetScriptInfo() const +const SwScriptInfo* SwTextFrame::GetScriptInfo() const { const SwParaPortion* pPara = GetPara(); return pPara ? &pPara->GetScriptInfo() : nullptr; } /** - * Helper function for SwTextFrm::CalcBasePosForFly() + * Helper function for SwTextFrame::CalcBasePosForFly() */ -static SwTwips lcl_CalcFlyBasePos( const SwTextFrm& rFrm, SwRect aFlyRect, +static SwTwips lcl_CalcFlyBasePos( const SwTextFrame& rFrame, SwRect aFlyRect, SwTextFly& rTextFly ) { - SWRECTFN( (&rFrm) ) - SwTwips nRet = rFrm.IsRightToLeft() ? - (rFrm.Frm().*fnRect->fnGetRight)() : - (rFrm.Frm().*fnRect->fnGetLeft)(); + SWRECTFN( (&rFrame) ) + SwTwips nRet = rFrame.IsRightToLeft() ? + (rFrame.Frame().*fnRect->fnGetRight)() : + (rFrame.Frame().*fnRect->fnGetLeft)(); do { - SwRect aRect = rTextFly.GetFrm( aFlyRect ); + SwRect aRect = rTextFly.GetFrame( aFlyRect ); if ( 0 != (aRect.*fnRect->fnGetWidth)() ) { - if ( rFrm.IsRightToLeft() ) + if ( rFrame.IsRightToLeft() ) { if ( (aRect.*fnRect->fnGetRight)() - (aFlyRect.*fnRect->fnGetRight)() >= 0 ) @@ -2634,10 +2634,10 @@ static SwTwips lcl_CalcFlyBasePos( const SwTextFrm& rFrm, SwRect aFlyRect, return nRet; } -void SwTextFrm::CalcBaseOfstForFly() +void SwTextFrame::CalcBaseOfstForFly() { OSL_ENSURE( !IsVertical() || !IsSwapped(), - "SwTextFrm::CalcBasePosForFly with swapped frame!" ); + "SwTextFrame::CalcBasePosForFly with swapped frame!" ); const SwNode* pNode = GetTextNode(); if ( !pNode->getIDocumentSettingAccess()->get(DocumentSettingId::ADD_FLY_OFFSETS) ) @@ -2645,7 +2645,7 @@ void SwTextFrm::CalcBaseOfstForFly() SWRECTFN( this ) - SwRect aFlyRect( Frm().Pos() + Prt().Pos(), Prt().SSize() ); + SwRect aFlyRect( Frame().Pos() + Prt().Pos(), Prt().SSize() ); // Get first 'real' line and adjust position and height of line rectangle // OD 08.09.2003 #110978#, #108749#, #110354# - correct behaviour, @@ -2678,8 +2678,8 @@ void SwTextFrm::CalcBaseOfstForFly() // make values relative to frame start position SwTwips nLeft = IsRightToLeft() ? - (Frm().*fnRect->fnGetRight)() : - (Frm().*fnRect->fnGetLeft)(); + (Frame().*fnRect->fnGetRight)() : + (Frame().*fnRect->fnGetLeft)(); mnFlyAnchorOfst = nRet1 - nLeft; mnFlyAnchorOfstNoWrap = nRet2 - nLeft; @@ -2688,14 +2688,14 @@ void SwTextFrm::CalcBaseOfstForFly() /** * Repaint all text frames of the given text node */ -void SwTextFrm::repaintTextFrames( const SwTextNode& rNode ) +void SwTextFrame::repaintTextFrames( const SwTextNode& rNode ) { - SwIterator<SwTextFrm,SwTextNode> aIter( rNode ); - for( const SwTextFrm *pFrm = aIter.First(); pFrm; pFrm = aIter.Next() ) + SwIterator<SwTextFrame,SwTextNode> aIter( rNode ); + for( const SwTextFrame *pFrame = aIter.First(); pFrame; pFrame = aIter.Next() ) { - SwRect aRec( pFrm->PaintArea() ); - const SwRootFrm *pRootFrm = pFrm->getRootFrm(); - SwViewShell *pCurShell = pRootFrm ? pRootFrm->GetCurrShell() : nullptr; + SwRect aRec( pFrame->PaintArea() ); + const SwRootFrame *pRootFrame = pFrame->getRootFrame(); + SwViewShell *pCurShell = pRootFrame ? pRootFrame->GetCurrShell() : nullptr; if( pCurShell ) pCurShell->InvalidateWindows( aRec ); } diff --git a/sw/source/core/text/txtftn.cxx b/sw/source/core/text/txtftn.cxx index 2c5255cff428..c9169818a3c5 100644 --- a/sw/source/core/text/txtftn.cxx +++ b/sw/source/core/text/txtftn.cxx @@ -55,35 +55,35 @@ using namespace ::com::sun::star; -bool SwTextFrm::_IsFootnoteNumFrm() const +bool SwTextFrame::_IsFootnoteNumFrame() const { - const SwFootnoteFrm* pFootnote = FindFootnoteFrm()->GetMaster(); + const SwFootnoteFrame* pFootnote = FindFootnoteFrame()->GetMaster(); while( pFootnote && !pFootnote->ContainsContent() ) pFootnote = pFootnote->GetMaster(); return !pFootnote; } /** - * Looks for the TextFrm matching the SwTextFootnote within a master-follow chain + * Looks for the TextFrame matching the SwTextFootnote within a master-follow chain */ -SwTextFrm *SwTextFrm::FindFootnoteRef( const SwTextFootnote *pFootnote ) +SwTextFrame *SwTextFrame::FindFootnoteRef( const SwTextFootnote *pFootnote ) { - SwTextFrm *pFrm = this; + SwTextFrame *pFrame = this; const bool bFwd = pFootnote->GetStart() >= GetOfst(); - while( pFrm ) + while( pFrame ) { - if( SwFootnoteBossFrm::FindFootnote( pFrm, pFootnote ) ) - return pFrm; - pFrm = bFwd ? pFrm->GetFollow() : - pFrm->IsFollow() ? pFrm->FindMaster() : nullptr; + if( SwFootnoteBossFrame::FindFootnote( pFrame, pFootnote ) ) + return pFrame; + pFrame = bFwd ? pFrame->GetFollow() : + pFrame->IsFollow() ? pFrame->FindMaster() : nullptr; } - return pFrm; + return pFrame; } #ifdef DBG_UTIL -void SwTextFrm::CalcFootnoteFlag( sal_Int32 nStop )// For testing the SplitFrm +void SwTextFrame::CalcFootnoteFlag( sal_Int32 nStop )// For testing the SplitFrame #else -void SwTextFrm::CalcFootnoteFlag() +void SwTextFrame::CalcFootnoteFlag() #endif { mbFootnote = false; @@ -118,33 +118,33 @@ void SwTextFrm::CalcFootnoteFlag() } } -bool SwTextFrm::CalcPrepFootnoteAdjust() +bool SwTextFrame::CalcPrepFootnoteAdjust() { OSL_ENSURE( HasFootnote(), "Who´s calling me?" ); - SwFootnoteBossFrm *pBoss = FindFootnoteBossFrm( true ); - const SwFootnoteFrm *pFootnote = pBoss->FindFirstFootnote( this ); + SwFootnoteBossFrame *pBoss = FindFootnoteBossFrame( true ); + const SwFootnoteFrame *pFootnote = pBoss->FindFirstFootnote( this ); if( pFootnote && FTNPOS_CHAPTER != GetNode()->GetDoc()->GetFootnoteInfo().ePos && - ( !pBoss->GetUpper()->IsSctFrm() || - !static_cast<SwSectionFrm*>(pBoss->GetUpper())->IsFootnoteAtEnd() ) ) + ( !pBoss->GetUpper()->IsSctFrame() || + !static_cast<SwSectionFrame*>(pBoss->GetUpper())->IsFootnoteAtEnd() ) ) { - const SwFootnoteContFrm *pCont = pBoss->FindFootnoteCont(); + const SwFootnoteContFrame *pCont = pBoss->FindFootnoteCont(); bool bReArrange = true; SWRECTFN( this ) - if ( pCont && (*fnRect->fnYDiff)( (pCont->Frm().*fnRect->fnGetTop)(), - (Frm().*fnRect->fnGetBottom)() ) > 0 ) + if ( pCont && (*fnRect->fnYDiff)( (pCont->Frame().*fnRect->fnGetTop)(), + (Frame().*fnRect->fnGetBottom)() ) > 0 ) { - pBoss->RearrangeFootnotes( (Frm().*fnRect->fnGetBottom)(), false, + pBoss->RearrangeFootnotes( (Frame().*fnRect->fnGetBottom)(), false, pFootnote->GetAttr() ); - ValidateBodyFrm(); - ValidateFrm(); + ValidateBodyFrame(); + ValidateFrame(); pFootnote = pBoss->FindFirstFootnote( this ); } else bReArrange = false; - if( !pCont || !pFootnote || bReArrange != (pFootnote->FindFootnoteBossFrm() == pBoss) ) + if( !pCont || !pFootnote || bReArrange != (pFootnote->FindFootnoteBossFrame() == pBoss) ) { - SwTextFormatInfo aInf( getRootFrm()->GetCurrShell()->GetOut(), this ); + SwTextFormatInfo aInf( getRootFrame()->GetCurrShell()->GetOut(), this ); SwTextFormatter aLine( this, &aInf ); aLine.TruncLines(); SetPara( nullptr ); // May be deleted! @@ -159,45 +159,45 @@ bool SwTextFrm::CalcPrepFootnoteAdjust() * Local helper function. Checks if nLower should be taken as the boundary * for the footnote. */ -static SwTwips lcl_GetFootnoteLower( const SwTextFrm* pFrm, SwTwips nLower ) +static SwTwips lcl_GetFootnoteLower( const SwTextFrame* pFrame, SwTwips nLower ) { // nLower is an absolute value. It denotes the bottom of the line // containing the footnote. - SWRECTFN( pFrm ) + SWRECTFN( pFrame ) - OSL_ENSURE( !pFrm->IsVertical() || !pFrm->IsSwapped(), + OSL_ENSURE( !pFrame->IsVertical() || !pFrame->IsSwapped(), "lcl_GetFootnoteLower with swapped frame" ); SwTwips nAdd; SwTwips nRet = nLower; // Check if text is inside a table. - if ( pFrm->IsInTab() ) + if ( pFrame->IsInTab() ) { - // If pFrm is inside a table, we have to check if + // If pFrame is inside a table, we have to check if // a) The table is not allowed to split or // b) The table row is not allowed to split // Inside a table, there are no footnotes, - // see SwFrm::FindFootnoteBossFrm. So we don't have to check - // the case that pFrm is inside a (footnote collecting) section + // see SwFrame::FindFootnoteBossFrame. So we don't have to check + // the case that pFrame is inside a (footnote collecting) section // within the table. - const SwFrm* pRow = pFrm; - while( !pRow->IsRowFrm() || !pRow->GetUpper()->IsTabFrm() ) + const SwFrame* pRow = pFrame; + while( !pRow->IsRowFrame() || !pRow->GetUpper()->IsTabFrame() ) pRow = pRow->GetUpper(); - const SwTabFrm* pTabFrm = static_cast<const SwTabFrm*>(pRow->GetUpper()); + const SwTabFrame* pTabFrame = static_cast<const SwTabFrame*>(pRow->GetUpper()); - OSL_ENSURE( pTabFrm && pRow && - pRow->GetUpper()->IsTabFrm(), "Upper of row should be tab" ); + OSL_ENSURE( pTabFrame && pRow && + pRow->GetUpper()->IsTabFrame(), "Upper of row should be tab" ); - const bool bDontSplit = !pTabFrm->IsFollow() && - !pTabFrm->IsLayoutSplitAllowed(); + const bool bDontSplit = !pTabFrame->IsFollow() && + !pTabFrame->IsLayoutSplitAllowed(); SwTwips nMin = 0; if ( bDontSplit ) - nMin = (pTabFrm->Frm().*fnRect->fnGetBottom)(); - else if ( !static_cast<const SwRowFrm*>(pRow)->IsRowSplitAllowed() ) - nMin = (pRow->Frm().*fnRect->fnGetBottom)(); + nMin = (pTabFrame->Frame().*fnRect->fnGetBottom)(); + else if ( !static_cast<const SwRowFrame*>(pRow)->IsRowSplitAllowed() ) + nMin = (pRow->Frame().*fnRect->fnGetBottom)(); if ( nMin && (*fnRect->fnYDiff)( nMin, nLower ) > 0 ) nRet = nMin; @@ -205,7 +205,7 @@ static SwTwips lcl_GetFootnoteLower( const SwTextFrm* pFrm, SwTwips nLower ) nAdd = (pRow->GetUpper()->*fnRect->fnGetBottomMargin)(); } else - nAdd = (pFrm->*fnRect->fnGetBottomMargin)(); + nAdd = (pFrame->*fnRect->fnGetBottomMargin)(); if( nAdd > 0 ) { @@ -217,22 +217,22 @@ static SwTwips lcl_GetFootnoteLower( const SwTextFrm* pFrm, SwTwips nLower ) // #i10770#: If there are fly frames anchored at previous paragraphs, // the deadline should consider their lower borders. - const SwFrm* pStartFrm = pFrm->GetUpper()->GetLower(); - OSL_ENSURE( pStartFrm, "Upper has no lower" ); + const SwFrame* pStartFrame = pFrame->GetUpper()->GetLower(); + OSL_ENSURE( pStartFrame, "Upper has no lower" ); SwTwips nFlyLower = bVert ? LONG_MAX : 0; - while ( pStartFrm != pFrm ) + while ( pStartFrame != pFrame ) { - OSL_ENSURE( pStartFrm, "Frame chain is broken" ); - if ( pStartFrm->GetDrawObjs() ) + OSL_ENSURE( pStartFrame, "Frame chain is broken" ); + if ( pStartFrame->GetDrawObjs() ) { - const SwSortedObjs &rObjs = *pStartFrm->GetDrawObjs(); + const SwSortedObjs &rObjs = *pStartFrame->GetDrawObjs(); for ( size_t i = 0; i < rObjs.size(); ++i ) { SwAnchoredObject* pAnchoredObj = rObjs[i]; SwRect aRect( pAnchoredObj->GetObjRect() ); - if ( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) == nullptr || - static_cast<SwFlyFrm*>(pAnchoredObj)->IsValid() ) + if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) == nullptr || + static_cast<SwFlyFrame*>(pAnchoredObj)->IsValid() ) { const SwTwips nBottom = (aRect.*fnRect->fnGetBottom)(); if ( (*fnRect->fnYDiff)( nBottom, nFlyLower ) > 0 ) @@ -241,7 +241,7 @@ static SwTwips lcl_GetFootnoteLower( const SwTextFrm* pFrm, SwTwips nLower ) } } - pStartFrm = pStartFrm->GetNext(); + pStartFrame = pStartFrame->GetNext(); } if ( bVert ) @@ -252,12 +252,12 @@ static SwTwips lcl_GetFootnoteLower( const SwTextFrm* pFrm, SwTwips nLower ) return nRet; } -SwTwips SwTextFrm::GetFootnoteLine( const SwTextFootnote *pFootnote ) const +SwTwips SwTextFrame::GetFootnoteLine( const SwTextFootnote *pFootnote ) const { OSL_ENSURE( ! IsVertical() || ! IsSwapped(), - "SwTextFrm::GetFootnoteLine with swapped frame" ); + "SwTextFrame::GetFootnoteLine with swapped frame" ); - SwTextFrm *pThis = const_cast<SwTextFrm*>(this); + SwTextFrame *pThis = const_cast<SwTextFrame*>(this); if( !HasPara() ) { @@ -265,12 +265,12 @@ SwTwips SwTextFrm::GetFootnoteLine( const SwTextFootnote *pFootnote ) const // the frame is currently locked. We return the previous value. return pThis->mnFootnoteLine > 0 ? pThis->mnFootnoteLine : - IsVertical() ? Frm().Left() : Frm().Bottom(); + IsVertical() ? Frame().Left() : Frame().Bottom(); } SwTwips nRet; { - SwSwapIfNotSwapped swap(const_cast<SwTextFrm *>(this)); + SwSwapIfNotSwapped swap(const_cast<SwTextFrame *>(this)); SwTextInfo aInf( pThis ); SwTextIter aLine( pThis, &aInf ); @@ -289,40 +289,40 @@ SwTwips SwTextFrm::GetFootnoteLine( const SwTextFootnote *pFootnote ) const } /** - * Calculates the maximum reachable height for the TextFrm in the Footnote Area. + * Calculates the maximum reachable height for the TextFrame in the Footnote Area. * The cell's bottom margin with the Footnote Reference limit's this height. */ -SwTwips SwTextFrm::_GetFootnoteFrmHeight() const +SwTwips SwTextFrame::_GetFootnoteFrameHeight() const { - OSL_ENSURE( !IsFollow() && IsInFootnote(), "SwTextFrm::SetFootnoteLine: moon walk" ); + OSL_ENSURE( !IsFollow() && IsInFootnote(), "SwTextFrame::SetFootnoteLine: moon walk" ); - const SwFootnoteFrm *pFootnoteFrm = FindFootnoteFrm(); - const SwTextFrm *pRef = static_cast<const SwTextFrm *>(pFootnoteFrm->GetRef()); - const SwFootnoteBossFrm *pBoss = FindFootnoteBossFrm(); - if( pBoss != pRef->FindFootnoteBossFrm( !pFootnoteFrm->GetAttr()-> + const SwFootnoteFrame *pFootnoteFrame = FindFootnoteFrame(); + const SwTextFrame *pRef = static_cast<const SwTextFrame *>(pFootnoteFrame->GetRef()); + const SwFootnoteBossFrame *pBoss = FindFootnoteBossFrame(); + if( pBoss != pRef->FindFootnoteBossFrame( !pFootnoteFrame->GetAttr()-> GetFootnote().IsEndNote() ) ) return 0; - SwSwapIfSwapped swap(const_cast<SwTextFrm *>(this)); + SwSwapIfSwapped swap(const_cast<SwTextFrame *>(this)); SwTwips nHeight = pRef->IsInFootnoteConnect() ? - 1 : pRef->GetFootnoteLine( pFootnoteFrm->GetAttr() ); + 1 : pRef->GetFootnoteLine( pFootnoteFrame->GetAttr() ); if( nHeight ) { // As odd as it may seem: the first Footnote on the page may not touch the // Footnote Reference, when entering text in the Footnote Area. - const SwFrm *pCont = pFootnoteFrm->GetUpper(); + const SwFrame *pCont = pFootnoteFrame->GetUpper(); // Height within the Container which we're allowed to consume anyways SWRECTFN( pCont ) SwTwips nTmp = (*fnRect->fnYDiff)( (pCont->*fnRect->fnGetPrtBottom)(), - (Frm().*fnRect->fnGetTop)() ); + (Frame().*fnRect->fnGetTop)() ); #if OSL_DEBUG_LEVEL > 0 if( nTmp < 0 ) { bool bInvalidPos = false; - const SwLayoutFrm* pTmp = GetUpper(); + const SwLayoutFrame* pTmp = GetUpper(); while( !bInvalidPos && pTmp ) { bInvalidPos = !pTmp->GetValidPosFlag() || @@ -335,16 +335,16 @@ SwTwips SwTextFrm::_GetFootnoteFrmHeight() const } #endif - if ( (*fnRect->fnYDiff)( (pCont->Frm().*fnRect->fnGetTop)(), nHeight) > 0 ) + if ( (*fnRect->fnYDiff)( (pCont->Frame().*fnRect->fnGetTop)(), nHeight) > 0 ) { // Growth potential of the container if ( !pRef->IsInFootnoteConnect() ) { - SwSaveFootnoteHeight aSave( const_cast<SwFootnoteBossFrm*>(pBoss), nHeight ); - nHeight = const_cast<SwFootnoteContFrm*>(static_cast<const SwFootnoteContFrm*>(pCont))->Grow( LONG_MAX, true ); + SwSaveFootnoteHeight aSave( const_cast<SwFootnoteBossFrame*>(pBoss), nHeight ); + nHeight = const_cast<SwFootnoteContFrame*>(static_cast<const SwFootnoteContFrame*>(pCont))->Grow( LONG_MAX, true ); } else - nHeight = const_cast<SwFootnoteContFrm*>(static_cast<const SwFootnoteContFrm*>(pCont))->Grow( LONG_MAX, true ); + nHeight = const_cast<SwFootnoteContFrame*>(static_cast<const SwFootnoteContFrame*>(pCont))->Grow( LONG_MAX, true ); nHeight += nTmp; if( nHeight < 0 ) @@ -352,7 +352,7 @@ SwTwips SwTextFrm::_GetFootnoteFrmHeight() const } else { // The container has to shrink - nTmp += (*fnRect->fnYDiff)( (pCont->Frm().*fnRect->fnGetTop)(), nHeight); + nTmp += (*fnRect->fnYDiff)( (pCont->Frame().*fnRect->fnGetTop)(), nHeight); if( nTmp > 0 ) nHeight = nTmp; else @@ -363,30 +363,30 @@ SwTwips SwTextFrm::_GetFootnoteFrmHeight() const return nHeight; } -SwTextFrm *SwTextFrm::FindQuoVadisFrm() +SwTextFrame *SwTextFrame::FindQuoVadisFrame() { - // Check whether we're in a FootnoteFrm + // Check whether we're in a FootnoteFrame if( GetIndPrev() || !IsInFootnote() ) return nullptr; - // To the preceding FootnoteFrm - SwFootnoteFrm *pFootnoteFrm = FindFootnoteFrm()->GetMaster(); - if( !pFootnoteFrm ) + // To the preceding FootnoteFrame + SwFootnoteFrame *pFootnoteFrame = FindFootnoteFrame()->GetMaster(); + if( !pFootnoteFrame ) return nullptr; // Now the last Content - SwContentFrm *pCnt = pFootnoteFrm->ContainsContent(); + SwContentFrame *pCnt = pFootnoteFrame->ContainsContent(); if( !pCnt ) return nullptr; - SwContentFrm *pLast; + SwContentFrame *pLast; do { pLast = pCnt; - pCnt = pCnt->GetNextContentFrm(); - } while( pCnt && pFootnoteFrm->IsAnLower( pCnt ) ); - return static_cast<SwTextFrm*>(pLast); + pCnt = pCnt->GetNextContentFrame(); + } while( pCnt && pFootnoteFrame->IsAnLower( pCnt ) ); + return static_cast<SwTextFrame*>(pLast); } -void SwTextFrm::RemoveFootnote( const sal_Int32 nStart, const sal_Int32 nLen ) +void SwTextFrame::RemoveFootnote( const sal_Int32 nStart, const sal_Int32 nLen ) { if ( !IsFootnoteAllowed() ) return; @@ -398,7 +398,7 @@ void SwTextFrm::RemoveFootnote( const sal_Int32 nStart, const sal_Int32 nLen ) bool bRollBack = nLen != COMPLETE_STRING; const size_t nSize = pHints->Count(); sal_Int32 nEnd; - SwTextFrm* pSource; + SwTextFrame* pSource; if( bRollBack ) { nEnd = nStart + nLen; @@ -414,10 +414,10 @@ void SwTextFrm::RemoveFootnote( const sal_Int32 nStart, const sal_Int32 nLen ) if( nSize ) { - SwPageFrm* pUpdate = nullptr; + SwPageFrame* pUpdate = nullptr; bool bRemove = false; - SwFootnoteBossFrm *pFootnoteBoss = nullptr; - SwFootnoteBossFrm *pEndBoss = nullptr; + SwFootnoteBossFrame *pFootnoteBoss = nullptr; + SwFootnoteBossFrame *pEndBoss = nullptr; bool bFootnoteEndDoc = FTNPOS_CHAPTER == GetNode()->GetDoc()->GetFootnoteInfo().ePos; for ( size_t i = nSize; i; ) @@ -438,16 +438,16 @@ void SwTextFrm::RemoveFootnote( const sal_Int32 nStart, const sal_Int32 nLen ) if( bEndn ) { if( !pEndBoss ) - pEndBoss = pSource->FindFootnoteBossFrm(); + pEndBoss = pSource->FindFootnoteBossFrame(); } else { if( !pFootnoteBoss ) { - pFootnoteBoss = pSource->FindFootnoteBossFrm( true ); - if( pFootnoteBoss->GetUpper()->IsSctFrm() ) + pFootnoteBoss = pSource->FindFootnoteBossFrame( true ); + if( pFootnoteBoss->GetUpper()->IsSctFrame() ) { - SwSectionFrm* pSect = static_cast<SwSectionFrm*>( + SwSectionFrame* pSect = static_cast<SwSectionFrame*>( pFootnoteBoss->GetUpper()); if( pSect->IsFootnoteAtEnd() ) bFootnoteEndDoc = false; @@ -467,42 +467,42 @@ void SwTextFrm::RemoveFootnote( const sal_Int32 nStart, const sal_Int32 nLen ) // -> Footnote moves into the PrevFollow // // Both need to be on one Page/in one Column - SwFootnoteFrm *pFootnoteFrm = SwFootnoteBossFrm::FindFootnote(pSource, pFootnote); + SwFootnoteFrame *pFootnoteFrame = SwFootnoteBossFrame::FindFootnote(pSource, pFootnote); - if( pFootnoteFrm ) + if( pFootnoteFrame ) { const bool bEndDoc = bEndn || bFootnoteEndDoc; if( bRollBack ) { - while ( pFootnoteFrm ) + while ( pFootnoteFrame ) { - pFootnoteFrm->SetRef( this ); - pFootnoteFrm = pFootnoteFrm->GetFollow(); + pFootnoteFrame->SetRef( this ); + pFootnoteFrame = pFootnoteFrame->GetFollow(); SetFootnote( true ); } } else if( GetFollow() ) { - SwContentFrm *pDest = GetFollow(); - while( pDest->GetFollow() && static_cast<SwTextFrm*>(pDest-> + SwContentFrame *pDest = GetFollow(); + while( pDest->GetFollow() && static_cast<SwTextFrame*>(pDest-> GetFollow())->GetOfst() <= nIdx ) pDest = pDest->GetFollow(); - OSL_ENSURE( !SwFootnoteBossFrm::FindFootnote( - pDest,pFootnote),"SwTextFrm::RemoveFootnote: footnote exists"); + OSL_ENSURE( !SwFootnoteBossFrame::FindFootnote( + pDest,pFootnote),"SwTextFrame::RemoveFootnote: footnote exists"); // Never deregister; always move if ( bEndDoc || - !pFootnoteFrm->FindFootnoteBossFrm()->IsBefore( pDest->FindFootnoteBossFrm( !bEndn ) ) + !pFootnoteFrame->FindFootnoteBossFrame()->IsBefore( pDest->FindFootnoteBossFrame( !bEndn ) ) ) { - SwPageFrm* pTmp = pFootnoteFrm->FindPageFrm(); + SwPageFrame* pTmp = pFootnoteFrame->FindPageFrame(); if( pUpdate && pUpdate != pTmp ) pUpdate->UpdateFootnoteNum(); pUpdate = pTmp; - while ( pFootnoteFrm ) + while ( pFootnoteFrame ) { - pFootnoteFrm->SetRef( pDest ); - pFootnoteFrm = pFootnoteFrm->GetFollow(); + pFootnoteFrame->SetRef( pDest ); + pFootnoteFrame = pFootnoteFrame->GetFollow(); } } else @@ -510,24 +510,24 @@ void SwTextFrm::RemoveFootnote( const sal_Int32 nStart, const sal_Int32 nLen ) pFootnoteBoss->MoveFootnotes( this, pDest, pFootnote ); bRemove = true; } - static_cast<SwTextFrm*>(pDest)->SetFootnote( true ); + static_cast<SwTextFrame*>(pDest)->SetFootnote( true ); - OSL_ENSURE( SwFootnoteBossFrm::FindFootnote( pDest, - pFootnote),"SwTextFrm::RemoveFootnote: footnote ChgRef failed"); + OSL_ENSURE( SwFootnoteBossFrame::FindFootnote( pDest, + pFootnote),"SwTextFrame::RemoveFootnote: footnote ChgRef failed"); } else { if( !bEndDoc || ( bEndn && pEndBoss->IsInSct() && !SwLayouter::Collecting( GetNode()->GetDoc(), - pEndBoss->FindSctFrm(), nullptr ) ) ) + pEndBoss->FindSctFrame(), nullptr ) ) ) { if( bEndn ) pEndBoss->RemoveFootnote( this, pFootnote ); else pFootnoteBoss->RemoveFootnote( this, pFootnote ); bRemove = bRemove || !bEndDoc; - OSL_ENSURE( !SwFootnoteBossFrm::FindFootnote( this, pFootnote ), - "SwTextFrm::RemoveFootnote: can't get off that footnote" ); + OSL_ENSURE( !SwFootnoteBossFrame::FindFootnote( this, pFootnote ), + "SwTextFrame::RemoveFootnote: can't get off that footnote" ); } } } @@ -539,8 +539,8 @@ void SwTextFrm::RemoveFootnote( const sal_Int32 nStart, const sal_Int32 nLen ) // We brake the oscillation if( bRemove && !bFootnoteEndDoc && HasPara() ) { - ValidateBodyFrm(); - ValidateFrm(); + ValidateBodyFrame(); + ValidateFrame(); } } @@ -564,7 +564,7 @@ void SwTextFrm::RemoveFootnote( const sal_Int32 nStart, const sal_Int32 nLen ) * We basically only have two possibilities: * * a) The Footnote is already present - * => we move it, if another pSrcFrm has been found + * => we move it, if another pSrcFrame has been found * * b) The Footnote is not present * => we have it created for us @@ -579,10 +579,10 @@ void SwTextFrm::RemoveFootnote( const sal_Int32 nStart, const sal_Int32 nLen ) * * @returns false on any type of error */ -void SwTextFrm::ConnectFootnote( SwTextFootnote *pFootnote, const SwTwips nDeadLine ) +void SwTextFrame::ConnectFootnote( SwTextFootnote *pFootnote, const SwTwips nDeadLine ) { OSL_ENSURE( !IsVertical() || !IsSwapped(), - "SwTextFrm::ConnectFootnote with swapped frame" ); + "SwTextFrame::ConnectFootnote with swapped frame" ); mbFootnote = true; mbInFootnoteConnect = true; // Just reset! @@ -593,122 +593,122 @@ void SwTextFrm::ConnectFootnote( SwTextFootnote *pFootnote, const SwTwips nDeadL mnFootnoteLine = nDeadLine; // We always need a parent (Page/Column) - SwSectionFrm *pSect; - SwContentFrm *pContent = this; + SwSectionFrame *pSect; + SwContentFrame *pContent = this; if( bEnd && IsInSct() ) { - pSect = FindSctFrm(); + pSect = FindSctFrame(); if( pSect->IsEndnAtEnd() ) pContent = pSect->FindLastContent( FINDMODE_ENDNOTE ); if( !pContent ) pContent = this; } - SwFootnoteBossFrm *pBoss = pContent->FindFootnoteBossFrm( !bEnd ); + SwFootnoteBossFrame *pBoss = pContent->FindFootnoteBossFrame( !bEnd ); #if OSL_DEBUG_LEVEL > 1 SwTwips nRstHeight = GetRstHeight(); #endif - pSect = pBoss->FindSctFrm(); + pSect = pBoss->FindSctFrame(); bool bDocEnd = bEnd ? !( pSect && pSect->IsEndnAtEnd() ) : ( !( pSect && pSect->IsFootnoteAtEnd() ) && FTNPOS_CHAPTER == GetNode()->GetDoc()->GetFootnoteInfo().ePos ); // Footnote can be registered with the Follow - SwContentFrm *pSrcFrm = FindFootnoteRef( pFootnote ); + SwContentFrame *pSrcFrame = FindFootnoteRef( pFootnote ); if( bDocEnd ) { - if( pSect && pSrcFrm ) + if( pSect && pSrcFrame ) { - SwFootnoteFrm *pFootnoteFrm = SwFootnoteBossFrm::FindFootnote( pSrcFrm, pFootnote ); - if( pFootnoteFrm && pFootnoteFrm->IsInSct() ) + SwFootnoteFrame *pFootnoteFrame = SwFootnoteBossFrame::FindFootnote( pSrcFrame, pFootnote ); + if( pFootnoteFrame && pFootnoteFrame->IsInSct() ) { - pBoss->RemoveFootnote( pSrcFrm, pFootnote ); - pSrcFrm = nullptr; + pBoss->RemoveFootnote( pSrcFrame, pFootnote ); + pSrcFrame = nullptr; } } } else if( bEnd && pSect ) { - SwFootnoteFrm *pFootnoteFrm = pSrcFrm ? SwFootnoteBossFrm::FindFootnote( pSrcFrm, pFootnote ) : nullptr; - if( pFootnoteFrm && !pFootnoteFrm->GetUpper() ) - pFootnoteFrm = nullptr; + SwFootnoteFrame *pFootnoteFrame = pSrcFrame ? SwFootnoteBossFrame::FindFootnote( pSrcFrame, pFootnote ) : nullptr; + if( pFootnoteFrame && !pFootnoteFrame->GetUpper() ) + pFootnoteFrame = nullptr; SwDoc *pDoc = GetNode()->GetDoc(); - if( SwLayouter::Collecting( pDoc, pSect, pFootnoteFrm ) ) + if( SwLayouter::Collecting( pDoc, pSect, pFootnoteFrame ) ) { - if( !pSrcFrm ) + if( !pSrcFrame ) { - SwFootnoteFrm *pNew = new SwFootnoteFrm(pDoc->GetDfltFrameFormat(),this,this,pFootnote); + SwFootnoteFrame *pNew = new SwFootnoteFrame(pDoc->GetDfltFrameFormat(),this,this,pFootnote); SwNodeIndex aIdx( *pFootnote->GetStartNode(), 1 ); ::_InsertCnt( pNew, pDoc, aIdx.GetIndex() ); GetNode()->getIDocumentLayoutAccess().GetLayouter()->CollectEndnote( pNew ); } - else if( pSrcFrm != this ) - SwFootnoteBossFrm::ChangeFootnoteRef( pSrcFrm, pFootnote, this ); + else if( pSrcFrame != this ) + SwFootnoteBossFrame::ChangeFootnoteRef( pSrcFrame, pFootnote, this ); mbInFootnoteConnect = false; return; } - else if( pSrcFrm ) + else if( pSrcFrame ) { - SwFootnoteBossFrm *pFootnoteBoss = pFootnoteFrm->FindFootnoteBossFrm(); + SwFootnoteBossFrame *pFootnoteBoss = pFootnoteFrame->FindFootnoteBossFrame(); if( !pFootnoteBoss->IsInSct() || - pFootnoteBoss->ImplFindSctFrm()->GetSection()!=pSect->GetSection() ) + pFootnoteBoss->ImplFindSctFrame()->GetSection()!=pSect->GetSection() ) { - pBoss->RemoveFootnote( pSrcFrm, pFootnote ); - pSrcFrm = nullptr; + pBoss->RemoveFootnote( pSrcFrame, pFootnote ); + pSrcFrame = nullptr; } } } if( bDocEnd || bEnd ) { - if( !pSrcFrm ) + if( !pSrcFrame ) pBoss->AppendFootnote( this, pFootnote ); - else if( pSrcFrm != this ) - SwFootnoteBossFrm::ChangeFootnoteRef( pSrcFrm, pFootnote, this ); + else if( pSrcFrame != this ) + SwFootnoteBossFrame::ChangeFootnoteRef( pSrcFrame, pFootnote, this ); mbInFootnoteConnect = false; return; } SwSaveFootnoteHeight aHeight( pBoss, nDeadLine ); - if( !pSrcFrm ) // No Footnote was found at all + if( !pSrcFrame ) // No Footnote was found at all pBoss->AppendFootnote( this, pFootnote ); else { - SwFootnoteFrm *pFootnoteFrm = SwFootnoteBossFrm::FindFootnote( pSrcFrm, pFootnote ); - SwFootnoteBossFrm *pFootnoteBoss = pFootnoteFrm->FindFootnoteBossFrm(); + SwFootnoteFrame *pFootnoteFrame = SwFootnoteBossFrame::FindFootnote( pSrcFrame, pFootnote ); + SwFootnoteBossFrame *pFootnoteBoss = pFootnoteFrame->FindFootnoteBossFrame(); bool bBrutal = false; if( pFootnoteBoss == pBoss ) // Ref and Footnote are on the same Page/Column { - SwFrm *pCont = pFootnoteFrm->GetUpper(); + SwFrame *pCont = pFootnoteFrame->GetUpper(); SWRECTFN ( pCont ) - long nDiff = (*fnRect->fnYDiff)( (pCont->Frm().*fnRect->fnGetTop)(), + long nDiff = (*fnRect->fnYDiff)( (pCont->Frame().*fnRect->fnGetTop)(), nDeadLine ); if( nDiff >= 0 ) { // If the Footnote has been registered to a Follow, we need to // rewire it now too - if ( pSrcFrm != this ) - SwFootnoteBossFrm::ChangeFootnoteRef( pSrcFrm, pFootnote, this ); + if ( pSrcFrame != this ) + SwFootnoteBossFrame::ChangeFootnoteRef( pSrcFrame, pFootnote, this ); // We have some room left, so the Footnote can grow - if ( pFootnoteFrm->GetFollow() && nDiff > 0 ) + if ( pFootnoteFrame->GetFollow() && nDiff > 0 ) { - SwTwips nHeight = (pCont->Frm().*fnRect->fnGetHeight)(); + SwTwips nHeight = (pCont->Frame().*fnRect->fnGetHeight)(); pBoss->RearrangeFootnotes( nDeadLine, false, pFootnote ); - ValidateBodyFrm(); - ValidateFrm(); - SwViewShell *pSh = getRootFrm()->GetCurrShell(); - if ( pSh && nHeight == (pCont->Frm().*fnRect->fnGetHeight)() ) + ValidateBodyFrame(); + ValidateFrame(); + SwViewShell *pSh = getRootFrame()->GetCurrShell(); + if ( pSh && nHeight == (pCont->Frame().*fnRect->fnGetHeight)() ) // So that we don't miss anything - pSh->InvalidateWindows( pCont->Frm() ); + pSh->InvalidateWindows( pCont->Frame() ); } mbInFootnoteConnect = false; return; @@ -719,26 +719,26 @@ void SwTextFrm::ConnectFootnote( SwTextFootnote *pFootnote, const SwTwips nDeadL else { // Ref and Footnote are not on one Page; attempt to move is necessary - SwFrm* pTmp = this; - while( pTmp->GetNext() && pSrcFrm != pTmp ) + SwFrame* pTmp = this; + while( pTmp->GetNext() && pSrcFrame != pTmp ) pTmp = pTmp->GetNext(); - if( pSrcFrm == pTmp ) + if( pSrcFrame == pTmp ) bBrutal = true; else { // If our Parent is in a column Area, but the Page already has a // FootnoteContainer, we can only brute force it - if( pSect && pSect->FindFootnoteBossFrm( !bEnd )->FindFootnoteCont() ) + if( pSect && pSect->FindFootnoteBossFrame( !bEnd )->FindFootnoteCont() ) bBrutal = true; - else if ( !pFootnoteFrm->GetPrev() || + else if ( !pFootnoteFrame->GetPrev() || pFootnoteBoss->IsBefore( pBoss ) ) { - SwFootnoteBossFrm *pSrcBoss = pSrcFrm->FindFootnoteBossFrm( !bEnd ); - pSrcBoss->MoveFootnotes( pSrcFrm, this, pFootnote ); + SwFootnoteBossFrame *pSrcBoss = pSrcFrame->FindFootnoteBossFrame( !bEnd ); + pSrcBoss->MoveFootnotes( pSrcFrame, this, pFootnote ); } else - SwFootnoteBossFrm::ChangeFootnoteRef( pSrcFrm, pFootnote, this ); + SwFootnoteBossFrame::ChangeFootnoteRef( pSrcFrame, pFootnote, this ); } } @@ -747,7 +747,7 @@ void SwTextFrm::ConnectFootnote( SwTextFootnote *pFootnote, const SwTwips nDeadL // nMaxFootnoteHeight after RemoveFootnote if( bBrutal ) { - pBoss->RemoveFootnote( pSrcFrm, pFootnote, false ); + pBoss->RemoveFootnote( pSrcFrame, pFootnote, false ); SwSaveFootnoteHeight *pHeight = bEnd ? nullptr : new SwSaveFootnoteHeight( pBoss, nDeadLine ); pBoss->AppendFootnote( this, pFootnote ); delete pHeight; @@ -760,20 +760,20 @@ void SwTextFrm::ConnectFootnote( SwTextFootnote *pFootnote, const SwTwips nDeadL { // Validate environment, to avoid oscillation SwSaveFootnoteHeight aNochmal( pBoss, nDeadLine ); - ValidateBodyFrm(); + ValidateBodyFrame(); pBoss->RearrangeFootnotes( nDeadLine, true ); - ValidateFrm(); + ValidateFrame(); } else if( pSect->IsFootnoteAtEnd() ) { - ValidateBodyFrm(); - ValidateFrm(); + ValidateBodyFrame(); + ValidateFrame(); } #if OSL_DEBUG_LEVEL > 1 - // pFootnoteFrm may have changed due to Calc ... - SwFootnoteFrm *pFootnoteFrm = pBoss->FindFootnote( this, pFootnote ); - if( pFootnoteFrm && pBoss != pFootnoteFrm->FindFootnoteBossFrm( !bEnd ) ) + // pFootnoteFrame may have changed due to Calc ... + SwFootnoteFrame *pFootnoteFrame = pBoss->FindFootnote( this, pFootnote ); + if( pFootnoteFrame && pBoss != pFootnoteFrame->FindFootnoteBossFrame( !bEnd ) ) { int bla = 5; (void)bla; @@ -791,20 +791,20 @@ void SwTextFrm::ConnectFootnote( SwTextFootnote *pFootnote, const SwTwips nDeadL SwFootnotePortion *SwTextFormatter::NewFootnotePortion( SwTextFormatInfo &rInf, SwTextAttr *pHint ) { - OSL_ENSURE( ! m_pFrm->IsVertical() || m_pFrm->IsSwapped(), + OSL_ENSURE( ! m_pFrame->IsVertical() || m_pFrame->IsSwapped(), "NewFootnotePortion with unswapped frame" ); - if( !m_pFrm->IsFootnoteAllowed() ) + if( !m_pFrame->IsFootnoteAllowed() ) return nullptr; SwTextFootnote *pFootnote = static_cast<SwTextFootnote*>(pHint); const SwFormatFootnote& rFootnote = static_cast<const SwFormatFootnote&>(pFootnote->GetFootnote()); - SwDoc *pDoc = m_pFrm->GetNode()->GetDoc(); + SwDoc *pDoc = m_pFrame->GetNode()->GetDoc(); if( rInf.IsTest() ) return new SwFootnotePortion( rFootnote.GetViewNumStr( *pDoc ), pFootnote ); - SwSwapIfSwapped swap(m_pFrm); + SwSwapIfSwapped swap(m_pFrame); sal_uInt16 nReal; { @@ -822,23 +822,23 @@ SwFootnotePortion *SwTextFormatter::NewFootnotePortion( SwTextFormatInfo &rInf, SwTwips nLower = Y() + nReal; - const bool bVertical = m_pFrm->IsVertical(); + const bool bVertical = m_pFrame->IsVertical(); if( bVertical ) - nLower = m_pFrm->SwitchHorizontalToVertical( nLower ); + nLower = m_pFrame->SwitchHorizontalToVertical( nLower ); - nLower = lcl_GetFootnoteLower( m_pFrm, nLower ); + nLower = lcl_GetFootnoteLower( m_pFrame, nLower ); // We just refresh. // The Connect does not do anything useful in this case, but will // mostly throw away the Footnote and create it anew. if( !rInf.IsQuick() ) - m_pFrm->ConnectFootnote( pFootnote, nLower ); + m_pFrame->ConnectFootnote( pFootnote, nLower ); - SwTextFrm *pScrFrm = m_pFrm->FindFootnoteRef( pFootnote ); - SwFootnoteBossFrm *pBoss = m_pFrm->FindFootnoteBossFrm( !rFootnote.IsEndNote() ); - SwFootnoteFrm *pFootnoteFrm = nullptr; - if( pScrFrm ) - pFootnoteFrm = SwFootnoteBossFrm::FindFootnote( pScrFrm, pFootnote ); + SwTextFrame *pScrFrame = m_pFrame->FindFootnoteRef( pFootnote ); + SwFootnoteBossFrame *pBoss = m_pFrame->FindFootnoteBossFrame( !rFootnote.IsEndNote() ); + SwFootnoteFrame *pFootnoteFrame = nullptr; + if( pScrFrame ) + pFootnoteFrame = SwFootnoteBossFrame::FindFootnote( pScrFrame, pFootnote ); // We see whether our Append has caused some Footnote to // still be on the Page/Column. If not, our line disappears too, @@ -851,15 +851,15 @@ SwFootnotePortion *SwTextFormatter::NewFootnotePortion( SwTextFormatInfo &rInf, // the Footnote Reference should be moved to the next one. if( !rFootnote.IsEndNote() ) { - SwSectionFrm *pSct = pBoss->FindSctFrm(); + SwSectionFrame *pSct = pBoss->FindSctFrame(); bool bAtSctEnd = pSct && pSct->IsFootnoteAtEnd(); if( FTNPOS_CHAPTER != pDoc->GetFootnoteInfo().ePos || bAtSctEnd ) { - SwFrm* pFootnoteCont = pBoss->FindFootnoteCont(); + SwFrame* pFootnoteCont = pBoss->FindFootnoteCont(); // If the Parent is within an Area, it can only be a Column of this // Area. If this one is not the first Column, we can avoid it. - if( !m_pFrm->IsInTab() && ( GetLineNr() > 1 || m_pFrm->GetPrev() || - ( !bAtSctEnd && m_pFrm->GetIndPrev() ) || + if( !m_pFrame->IsInTab() && ( GetLineNr() > 1 || m_pFrame->GetPrev() || + ( !bAtSctEnd && m_pFrame->GetIndPrev() ) || ( pSct && pBoss->GetPrev() ) ) ) { if( !pFootnoteCont ) @@ -873,12 +873,12 @@ SwFootnotePortion *SwTextFormatter::NewFootnotePortion( SwTextFormatInfo &rInf, // Page/Page column if( pSct && !bAtSctEnd ) // Is the Container in a (column) Area? { - SwFootnoteBossFrm* pTmp = pBoss->FindSctFrm()->FindFootnoteBossFrm( true ); - SwFootnoteContFrm* pFootnoteC = pTmp->FindFootnoteCont(); + SwFootnoteBossFrame* pTmp = pBoss->FindSctFrame()->FindFootnoteBossFrame( true ); + SwFootnoteContFrame* pFootnoteC = pTmp->FindFootnoteCont(); if( pFootnoteC ) { - SwFootnoteFrm* pTmpFrm = static_cast<SwFootnoteFrm*>(pFootnoteC->Lower()); - if( pTmpFrm && *pTmpFrm < pFootnote ) + SwFootnoteFrame* pTmpFrame = static_cast<SwFootnoteFrame*>(pFootnoteC->Lower()); + if( pTmpFrame && *pTmpFrame < pFootnote ) { rInf.SetStop( true ); return nullptr; @@ -889,19 +889,19 @@ SwFootnotePortion *SwTextFormatter::NewFootnotePortion( SwTextFormatInfo &rInf, SwTwips nTmpBot = Y() + nReal * 2; if( bVertical ) - nTmpBot = m_pFrm->SwitchHorizontalToVertical( nTmpBot ); + nTmpBot = m_pFrame->SwitchHorizontalToVertical( nTmpBot ); SWRECTFN( pFootnoteCont ) const long nDiff = (*fnRect->fnYDiff)( - (pFootnoteCont->Frm().*fnRect->fnGetTop)(), + (pFootnoteCont->Frame().*fnRect->fnGetTop)(), nTmpBot ); - if( pScrFrm && nDiff < 0 ) + if( pScrFrame && nDiff < 0 ) { - if( pFootnoteFrm ) + if( pFootnoteFrame ) { - SwFootnoteBossFrm *pFootnoteBoss = pFootnoteFrm->FindFootnoteBossFrm(); + SwFootnoteBossFrame *pFootnoteBoss = pFootnoteFrame->FindFootnoteBossFrame(); if( pFootnoteBoss != pBoss ) { // We're in the last Line and the Footnote has moved @@ -928,19 +928,19 @@ SwFootnotePortion *SwTextFormatter::NewFootnotePortion( SwTextFormatInfo &rInf, */ SwNumberPortion *SwTextFormatter::NewFootnoteNumPortion( SwTextFormatInfo &rInf ) const { - OSL_ENSURE( m_pFrm->IsInFootnote() && !m_pFrm->GetIndPrev() && !rInf.IsFootnoteDone(), + OSL_ENSURE( m_pFrame->IsInFootnote() && !m_pFrame->GetIndPrev() && !rInf.IsFootnoteDone(), "This is the wrong place for a ftnnumber" ); if( rInf.GetTextStart() != m_nStart || rInf.GetTextStart() != rInf.GetIdx() ) return nullptr; - const SwFootnoteFrm* pFootnoteFrm = m_pFrm->FindFootnoteFrm(); - const SwTextFootnote* pFootnote = pFootnoteFrm->GetAttr(); + const SwFootnoteFrame* pFootnoteFrame = m_pFrame->FindFootnoteFrame(); + const SwTextFootnote* pFootnote = pFootnoteFrame->GetAttr(); // Aha! So we're in the Footnote Area! SwFormatFootnote& rFootnote = (SwFormatFootnote&)pFootnote->GetFootnote(); - SwDoc *pDoc = m_pFrm->GetNode()->GetDoc(); + SwDoc *pDoc = m_pFrame->GetNode()->GetDoc(); OUString aFootnoteText( rFootnote.GetViewNumStr( *pDoc, true )); const SwEndNoteInfo* pInfo; @@ -951,7 +951,7 @@ SwNumberPortion *SwTextFormatter::NewFootnoteNumPortion( SwTextFormatInfo &rInf const SwAttrSet& rSet = pInfo->GetCharFormat(*pDoc)->GetAttrSet(); const SwAttrSet* pParSet = &rInf.GetCharAttr(); - const IDocumentSettingAccess* pIDSA = m_pFrm->GetTextNode()->getIDocumentSettingAccess(); + const IDocumentSettingAccess* pIDSA = m_pFrame->GetTextNode()->getIDocumentSettingAccess(); SwFont *pNumFnt = new SwFont( pParSet, pIDSA ); // #i37142# @@ -970,16 +970,16 @@ SwNumberPortion *SwTextFormatter::NewFootnoteNumPortion( SwTextFormatInfo &rInf pNumFnt->SetWeight( WEIGHT_NORMAL, SW_CTL ); pNumFnt->SetDiffFnt(&rSet, pIDSA ); - pNumFnt->SetVertical( pNumFnt->GetOrientation(), m_pFrm->IsVertical() ); + pNumFnt->SetVertical( pNumFnt->GetOrientation(), m_pFrame->IsVertical() ); SwFootnoteNumPortion* pNewPor = new SwFootnoteNumPortion( aFootnoteText, pNumFnt ); - pNewPor->SetLeft( !m_pFrm->IsRightToLeft() ); + pNewPor->SetLeft( !m_pFrame->IsRightToLeft() ); return pNewPor; } -OUString lcl_GetPageNumber( const SwPageFrm* pPage ) +OUString lcl_GetPageNumber( const SwPageFrame* pPage ) { - OSL_ENSURE( pPage, "GetPageNumber: Homeless TextFrm" ); + OSL_ENSURE( pPage, "GetPageNumber: Homeless TextFrame" ); const sal_uInt16 nVirtNum = pPage->GetVirtPageNum(); const SvxNumberType& rNum = pPage->GetPageDesc()->GetNumType(); return rNum.GetNumStr( nVirtNum ); @@ -988,22 +988,22 @@ OUString lcl_GetPageNumber( const SwPageFrm* pPage ) SwErgoSumPortion *SwTextFormatter::NewErgoSumPortion( SwTextFormatInfo &rInf ) const { // We cannot assume we're a Follow - if( !m_pFrm->IsInFootnote() || m_pFrm->GetPrev() || - rInf.IsErgoDone() || rInf.GetIdx() != m_pFrm->GetOfst() || - m_pFrm->ImplFindFootnoteFrm()->GetAttr()->GetFootnote().IsEndNote() ) + if( !m_pFrame->IsInFootnote() || m_pFrame->GetPrev() || + rInf.IsErgoDone() || rInf.GetIdx() != m_pFrame->GetOfst() || + m_pFrame->ImplFindFootnoteFrame()->GetAttr()->GetFootnote().IsEndNote() ) return nullptr; // Aha, wir sind also im Fussnotenbereich - const SwFootnoteInfo &rFootnoteInfo = m_pFrm->GetNode()->GetDoc()->GetFootnoteInfo(); - SwTextFrm *pQuoFrm = m_pFrm->FindQuoVadisFrm(); - if( !pQuoFrm ) + const SwFootnoteInfo &rFootnoteInfo = m_pFrame->GetNode()->GetDoc()->GetFootnoteInfo(); + SwTextFrame *pQuoFrame = m_pFrame->FindQuoVadisFrame(); + if( !pQuoFrame ) return nullptr; - const SwPageFrm* pPage = m_pFrm->FindPageFrm(); - const SwPageFrm* pQuoPage = pQuoFrm->FindPageFrm(); - if( pPage == pQuoFrm->FindPageFrm() ) + const SwPageFrame* pPage = m_pFrame->FindPageFrame(); + const SwPageFrame* pQuoPage = pQuoFrame->FindPageFrame(); + if( pPage == pQuoFrame->FindPageFrame() ) return nullptr; // If the QuoVadis is on the same Column/Page const OUString aPage = lcl_GetPageNumber( pPage ); - SwParaPortion *pPara = pQuoFrm->GetPara(); + SwParaPortion *pPara = pQuoFrame->GetPara(); if( pPara ) pPara->SetErgoSumNum( aPage ); if( rFootnoteInfo.aErgoSum.isEmpty() ) @@ -1015,36 +1015,36 @@ SwErgoSumPortion *SwTextFormatter::NewErgoSumPortion( SwTextFormatInfo &rInf ) c sal_Int32 SwTextFormatter::FormatQuoVadis( const sal_Int32 nOffset ) { - OSL_ENSURE( ! m_pFrm->IsVertical() || ! m_pFrm->IsSwapped(), + OSL_ENSURE( ! m_pFrame->IsVertical() || ! m_pFrame->IsSwapped(), "SwTextFormatter::FormatQuoVadis with swapped frame" ); - if( !m_pFrm->IsInFootnote() || m_pFrm->ImplFindFootnoteFrm()->GetAttr()->GetFootnote().IsEndNote() ) + if( !m_pFrame->IsInFootnote() || m_pFrame->ImplFindFootnoteFrame()->GetAttr()->GetFootnote().IsEndNote() ) return nOffset; - const SwFrm* pErgoFrm = m_pFrm->FindFootnoteFrm()->GetFollow(); - if( !pErgoFrm && m_pFrm->HasFollow() ) - pErgoFrm = m_pFrm->GetFollow(); - if( !pErgoFrm ) + const SwFrame* pErgoFrame = m_pFrame->FindFootnoteFrame()->GetFollow(); + if( !pErgoFrame && m_pFrame->HasFollow() ) + pErgoFrame = m_pFrame->GetFollow(); + if( !pErgoFrame ) return nOffset; - if( pErgoFrm == m_pFrm->GetNext() ) + if( pErgoFrame == m_pFrame->GetNext() ) { - SwFrm *pCol = m_pFrm->FindColFrm(); + SwFrame *pCol = m_pFrame->FindColFrame(); while( pCol && !pCol->GetNext() ) - pCol = pCol->GetUpper()->FindColFrm(); + pCol = pCol->GetUpper()->FindColFrame(); if( pCol ) return nOffset; } else { - const SwPageFrm* pPage = m_pFrm->FindPageFrm(); - const SwPageFrm* pErgoPage = pErgoFrm->FindPageFrm(); + const SwPageFrame* pPage = m_pFrame->FindPageFrame(); + const SwPageFrame* pErgoPage = pErgoFrame->FindPageFrame(); if( pPage == pErgoPage ) return nOffset; // If the ErgoSum is on the same Page } SwTextFormatInfo &rInf = GetInfo(); - const SwFootnoteInfo &rFootnoteInfo = m_pFrm->GetNode()->GetDoc()->GetFootnoteInfo(); + const SwFootnoteInfo &rFootnoteInfo = m_pFrame->GetNode()->GetDoc()->GetFootnoteInfo(); if( rFootnoteInfo.aQuoVadis.isEmpty() ) return nOffset; @@ -1076,7 +1076,7 @@ sal_Int32 SwTextFormatter::FormatQuoVadis( const sal_Int32 nOffset ) const sal_uInt16 nOldRealWidth = rInf.RealWidth(); rInf.RealWidth( nOldRealWidth - nLastLeft ); - OUString aErgo = lcl_GetPageNumber( pErgoFrm->FindPageFrm() ); + OUString aErgo = lcl_GetPageNumber( pErgoFrame->FindPageFrame() ); SwQuoVadisPortion *pQuo = new SwQuoVadisPortion(rFootnoteInfo.aQuoVadis, aErgo ); pQuo->SetAscent( rInf.GetAscent() ); pQuo->Height( rInf.GetTextHeight() ); @@ -1105,7 +1105,7 @@ sal_Int32 SwTextFormatter::FormatQuoVadis( const sal_Int32 nOffset ) sal_Int32 nRet; { - SwSwapIfNotSwapped swap(m_pFrm); + SwSwapIfNotSwapped swap(m_pFrame); nRet = FormatLine( m_nStart ); } @@ -1215,7 +1215,7 @@ sal_Int32 SwTextFormatter::FormatQuoVadis( const sal_Int32 nOffset ) */ void SwTextFormatter::MakeDummyLine() { - sal_uInt16 nRstHeight = GetFrmRstHeight(); + sal_uInt16 nRstHeight = GetFrameRstHeight(); if( m_pCurr && nRstHeight > m_pCurr->Height() ) { SwLineLayout *pLay = new SwLineLayout; @@ -1248,14 +1248,14 @@ SwFootnoteSave::SwFootnoteSave( const SwTextSizeInfo &rInf, , pFnt( nullptr ) , pOld( nullptr ) { - if( pTextFootnote && rInf.GetTextFrm() ) + if( pTextFootnote && rInf.GetTextFrame() ) { pFnt = ((SwTextSizeInfo&)rInf).GetFont(); pOld = new SwFont( *pFnt ); pOld->GetTox() = pFnt->GetTox(); pFnt->GetTox() = 0; SwFormatFootnote& rFootnote = (SwFormatFootnote&)pTextFootnote->GetFootnote(); - const SwDoc *pDoc = rInf.GetTextFrm()->GetNode()->GetDoc(); + const SwDoc *pDoc = rInf.GetTextFrame()->GetNode()->GetDoc(); // #i98418# if ( bApplyGivenScriptType ) @@ -1275,7 +1275,7 @@ SwFootnoteSave::SwFootnoteSave( const SwTextSizeInfo &rInf, else pInfo = &pDoc->GetFootnoteInfo(); const SwAttrSet& rSet = pInfo->GetAnchorCharFormat((SwDoc&)*pDoc)->GetAttrSet(); - pFnt->SetDiffFnt( &rSet, rInf.GetTextFrm()->GetNode()->getIDocumentSettingAccess() ); + pFnt->SetDiffFnt( &rSet, rInf.GetTextFrame()->GetNode()->getIDocumentSettingAccess() ); // we reduce footnote size, if we are inside a double line portion if ( ! pOld->GetEscapement() && 50 == pOld->GetPropr() ) @@ -1291,7 +1291,7 @@ SwFootnoteSave::SwFootnoteSave( const SwTextSizeInfo &rInf, if( SfxItemState::SET == rSet.GetItemState( RES_CHRATR_ROTATE, true, &pItem )) pFnt->SetVertical( static_cast<const SvxCharRotateItem*>(pItem)->GetValue(), - rInf.GetTextFrm()->IsVertical() ); + rInf.GetTextFrame()->IsVertical() ); pFnt->ChgPhysFnt( pInf->GetVsh(), *pInf->GetOut() ); @@ -1460,7 +1460,7 @@ SwErgoSumPortion::SwErgoSumPortion(const OUString &rExp, const OUString& rStr) SetWhichPor( POR_ERGOSUM ); } -sal_Int32 SwErgoSumPortion::GetCrsrOfst( const sal_uInt16 ) const +sal_Int32 SwErgoSumPortion::GetCursorOfst( const sal_uInt16 ) const { return 0; } @@ -1503,7 +1503,7 @@ void SwParaPortion::SetErgoSumNum( const OUString& rErgo ) } /** - * Is called in SwTextFrm::Prepare() + * Is called in SwTextFrame::Prepare() */ bool SwParaPortion::UpdateQuoVadis( const OUString &rQuo ) { diff --git a/sw/source/core/text/txthyph.cxx b/sw/source/core/text/txthyph.cxx index 741cdca0bdc2..f6c70df42157 100644 --- a/sw/source/core/text/txthyph.cxx +++ b/sw/source/core/text/txthyph.cxx @@ -55,16 +55,16 @@ Reference< XHyphenatedWord > SwTextFormatInfo::HyphWord( /** * We format a row for interactive hyphenation */ -bool SwTextFrm::Hyphenate( SwInterHyphInfo &rHyphInf ) +bool SwTextFrame::Hyphenate( SwInterHyphInfo &rHyphInf ) { - vcl::RenderContext* pRenderContext = getRootFrm()->GetCurrShell()->GetOut(); - OSL_ENSURE( ! IsVertical() || ! IsSwapped(),"swapped frame at SwTextFrm::Hyphenate" ); + vcl::RenderContext* pRenderContext = getRootFrame()->GetCurrShell()->GetOut(); + OSL_ENSURE( ! IsVertical() || ! IsSwapped(),"swapped frame at SwTextFrame::Hyphenate" ); if( !g_pBreakIt->GetBreakIter().is() ) return false; // We lock it, to start with - OSL_ENSURE( !IsLocked(), "SwTextFrm::Hyphenate: this is locked" ); + OSL_ENSURE( !IsLocked(), "SwTextFrame::Hyphenate: this is locked" ); // The frame::Frame must have a valid SSize! Calc(pRenderContext); @@ -75,12 +75,12 @@ bool SwTextFrm::Hyphenate( SwInterHyphInfo &rHyphInf ) { // We always need to enable hyphenation // Don't be afraid: the SwTextIter saves the old row in the hyphenate - TextFrmLockGuard aLock( this ); + TextFrameLockGuard aLock( this ); if ( IsVertical() ) SwapWidthAndHeight(); - SwTextFormatInfo aInf( getRootFrm()->GetCurrShell()->GetOut(), this, true ); // true for interactive hyph! + SwTextFormatInfo aInf( getRootFrame()->GetCurrShell()->GetOut(), this, true ); // true for interactive hyph! SwTextFormatter aLine( this, &aInf ); aLine.CharToLine( rHyphInf.nStart ); @@ -131,14 +131,14 @@ bool SwTextFormatter::Hyphenate( SwInterHyphInfo &rHyphInf ) // We never need to hyphenate anything in the last row // Except for, if it contains a FlyPortion or if it's the // last row of the Master - if( !GetNext() && !rInf.GetTextFly().IsOn() && !m_pFrm->GetFollow() ) + if( !GetNext() && !rInf.GetTextFly().IsOn() && !m_pFrame->GetFollow() ) return false; sal_Int32 nWrdStart = m_nStart; // We need to retain the old row // E.g.: The attribute for hyphenation was not set, but - // it's always set in SwTextFrm::Hyphenate, because we want + // it's always set in SwTextFrame::Hyphenate, because we want // to set breakpoints. SwLineLayout *pOldCurr = m_pCurr; @@ -164,7 +164,7 @@ bool SwTextFormatter::Hyphenate( SwInterHyphInfo &rHyphInf ) if( m_pCurr->PrtWidth() && m_pCurr->GetLen() ) { // Wir muessen uns darauf einstellen, dass in der Zeile - // FlyFrms haengen, an denen auch umgebrochen werden darf. + // FlyFrames haengen, an denen auch umgebrochen werden darf. // Wir suchen also die erste HyphPortion in dem angegebenen // Bereich. diff --git a/sw/source/core/text/txtinit.cxx b/sw/source/core/text/txtinit.cxx index cc6e330dd405..c8ac851fa7e3 100644 --- a/sw/source/core/text/txtinit.cxx +++ b/sw/source/core/text/txtinit.cxx @@ -38,8 +38,8 @@ #include "txtfly.hxx" #include "dbg_lay.hxx" -SwCache *SwTextFrm::pTextCache = nullptr; -long SwTextFrm::nMinPrtLine = 0; +SwCache *SwTextFrame::pTextCache = nullptr; +long SwTextFrame::nMinPrtLine = 0; SwContourCache *pContourCache = nullptr; SwDropCapCache *pDropCapCache = nullptr; @@ -57,12 +57,12 @@ void _TextInit() { pFntCache = new SwFntCache; // Cache for SwSubFont -> SwFntObj = { Font aFont, Font* pScrFont, Font* pPrtFont, OutputDevice* pPrinter, ... } pSwFontCache = new SwFontCache; // Cache for SwTextFormatColl -> SwFontObj = { SwFont aSwFont, SfxPoolItem* pDefaultArray } - SwCache *pTextCache = new SwCache( 250 // Cache for SwTextFrm -> SwTextLine = { SwParaPortion* pLine } + SwCache *pTextCache = new SwCache( 250 // Cache for SwTextFrame -> SwTextLine = { SwParaPortion* pLine } #ifdef DBG_UTIL - , "static SwTextFrm::pTextCache" + , "static SwTextFrame::pTextCache" #endif ); - SwTextFrm::SetTextCache( pTextCache ); + SwTextFrame::SetTextCache( pTextCache ); pWaveCol = new Color( COL_GRAY ); PROTOCOL_INIT } @@ -70,7 +70,7 @@ void _TextInit() void _TextFinit() { PROTOCOL_STOP - delete SwTextFrm::GetTextCache(); + delete SwTextFrame::GetTextCache(); delete pSwFontCache; delete pFntCache; delete pBlink; diff --git a/sw/source/core/text/txtio.cxx b/sw/source/core/text/txtio.cxx index 1e29121a8cb9..98d3eb89a830 100644 --- a/sw/source/core/text/txtio.cxx +++ b/sw/source/core/text/txtio.cxx @@ -316,9 +316,9 @@ SvStream &SwFlyCntPortion::operator<<( SvStream &rOs ) const //$ ostream CONSTCHAR( pText2, " {FRM:" ); rOs.WriteCharPtr(pText2); rOs.WriteCharPtr(" {FRM:"); - WriteSwRect(rOs, GetFlyFrm()->Frm()).WriteCharPtr(pClose); + WriteSwRect(rOs, GetFlyFrame()->Frame()).WriteCharPtr(pClose); rOs.WriteCharPtr(" {PRT:"); - WriteSwRect(rOs, GetFlyFrm()->Prt()).WriteCharPtr(pClose); + WriteSwRect(rOs, GetFlyFrame()->Prt()).WriteCharPtr(pClose); rOs.WriteCharPtr(pClose); } rOs.WriteCharPtr(pClose); diff --git a/sw/source/core/text/txtpaint.cxx b/sw/source/core/text/txtpaint.cxx index e055a8fd40d6..5db3d2e63d6b 100644 --- a/sw/source/core/text/txtpaint.cxx +++ b/sw/source/core/text/txtpaint.cxx @@ -39,17 +39,17 @@ void SwSaveClip::Reset() } } -void SwSaveClip::_ChgClip( const SwRect &rRect, const SwTextFrm* pFrm, +void SwSaveClip::_ChgClip( const SwRect &rRect, const SwTextFrame* pFrame, bool bEnlargeRect ) { SwRect aOldRect( rRect ); - const bool bVertical = pFrm && pFrm->IsVertical(); + const bool bVertical = pFrame && pFrame->IsVertical(); - if ( pFrm && pFrm->IsRightToLeft() ) - pFrm->SwitchLTRtoRTL( (SwRect&)rRect ); + if ( pFrame && pFrame->IsRightToLeft() ) + pFrame->SwitchLTRtoRTL( (SwRect&)rRect ); if ( bVertical ) - pFrm->SwitchHorizontalToVertical( (SwRect&)rRect ); + pFrame->SwitchHorizontalToVertical( (SwRect&)rRect ); if ( !pOut || (!rRect.HasArea() && !pOut->IsClipRegion()) ) { @@ -87,7 +87,7 @@ void SwSaveClip::_ChgClip( const SwRect &rRect, const SwTextFrm* pFrm, } } - if( SwRootFrm::HasSameRect( rRect ) ) + if( SwRootFrame::HasSameRect( rRect ) ) pOut->SetClipRegion(); else { diff --git a/sw/source/core/text/txtpaint.hxx b/sw/source/core/text/txtpaint.hxx index 16f883907427..3a791b720224 100644 --- a/sw/source/core/text/txtpaint.hxx +++ b/sw/source/core/text/txtpaint.hxx @@ -30,7 +30,7 @@ class SwSaveClip bool bChg; protected: VclPtr<OutputDevice> pOut; - void _ChgClip( const SwRect &rRect, const SwTextFrm* pFrm, + void _ChgClip( const SwRect &rRect, const SwTextFrame* pFrame, bool bEnlargeRect ); public: explicit SwSaveClip(OutputDevice* pOutDev) @@ -41,9 +41,9 @@ public: } inline ~SwSaveClip(); - inline void ChgClip( const SwRect &rRect, const SwTextFrm* pFrm = nullptr, + inline void ChgClip( const SwRect &rRect, const SwTextFrame* pFrame = nullptr, bool bEnlargeRect = false) - { if( pOut ) _ChgClip( rRect, pFrm, bEnlargeRect ); } + { if( pOut ) _ChgClip( rRect, pFrame, bEnlargeRect ); } void Reset(); inline bool IsOn() const { return bOn; } inline bool IsChg() const { return bChg; } diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx index ba9e12742804..d4aace514393 100644 --- a/sw/source/core/text/txttab.cxx +++ b/sw/source/core/text/txttab.cxx @@ -70,17 +70,17 @@ SwTabPortion *SwTextFormatter::NewTabPortion( SwTextFormatInfo &rInf, bool bAuto sal_uInt16 nNewTabPos; bool bAutoTabStop = true; { - const bool bRTL = m_pFrm->IsRightToLeft(); + const bool bRTL = m_pFrame->IsRightToLeft(); // #i24363# tab stops relative to indent // nTabLeft: The absolute value, the tab stops are relative to: Tabs origin. // #i91133# const bool bTabsRelativeToIndent = - m_pFrm->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TABS_RELATIVE_TO_INDENT); + m_pFrame->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TABS_RELATIVE_TO_INDENT); const SwTwips nTabLeft = bRTL - ? m_pFrm->Frm().Right() - + ? m_pFrame->Frame().Right() - ( bTabsRelativeToIndent ? GetTabLeft() : 0 ) - : m_pFrm->Frm().Left() + + : m_pFrame->Frame().Left() + ( bTabsRelativeToIndent ? GetTabLeft() : 0 ); // The absolute position, where we started the line formatting @@ -88,7 +88,7 @@ SwTabPortion *SwTextFormatter::NewTabPortion( SwTextFormatInfo &rInf, bool bAuto if ( bRTL ) { Point aPoint( nLinePos, 0 ); - m_pFrm->SwitchLTRtoRTL( aPoint ); + m_pFrame->SwitchLTRtoRTL( aPoint ); nLinePos = aPoint.X(); } @@ -105,15 +105,15 @@ SwTabPortion *SwTextFormatter::NewTabPortion( SwTextFormatInfo &rInf, bool bAuto nLinePos + nTabPos; SwTwips nMyRight; - if ( m_pFrm->IsVertLR() ) + if ( m_pFrame->IsVertLR() ) nMyRight = Left(); else nMyRight = Right(); - if ( m_pFrm->IsVertical() ) + if ( m_pFrame->IsVertical() ) { - Point aRightTop( nMyRight, m_pFrm->Frm().Top() ); - m_pFrm->SwitchHorizontalToVertical( aRightTop ); + Point aRightTop( nMyRight, m_pFrame->Frame().Top() ); + m_pFrame->SwitchHorizontalToVertical( aRightTop ); nMyRight = aRightTop.Y(); } @@ -149,7 +149,7 @@ SwTabPortion *SwTextFormatter::NewTabPortion( SwTextFormatInfo &rInf, bool bAuto if( USHRT_MAX == nDefTabDist ) { const SvxTabStopItem& rTab = - static_cast<const SvxTabStopItem &>(m_pFrm->GetAttrSet()-> + static_cast<const SvxTabStopItem &>(m_pFrame->GetAttrSet()-> GetPool()->GetDefaultItem( RES_PARATR_TABSTOP )); if( rTab.Count() ) nDefTabDist = (sal_uInt16)rTab[0].GetTabPos(); @@ -169,7 +169,7 @@ SwTabPortion *SwTextFormatter::NewTabPortion( SwTextFormatInfo &rInf, bool bAuto : ( ( nCount + 1 ) * nDefTabDist ); // --> FME 2004-09-21 #117919 Minimum tab stop width is 1 or 51 twips: - const SwTwips nMinimumTabWidth = m_pFrm->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT) ? 0 : 50; + const SwTwips nMinimumTabWidth = m_pFrame->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT) ? 0 : 50; if( ( bRTL && nTabLeft - nNextPos >= nCurrentAbsPos - nMinimumTabWidth ) || ( !bRTL && nNextPos + nTabLeft <= nCurrentAbsPos + nMinimumTabWidth ) ) { @@ -194,12 +194,12 @@ SwTabPortion *SwTextFormatter::NewTabPortion( SwTextFormatInfo &rInf, bool bAuto if ( bRTL ) { Point aPoint( Left(), 0 ); - m_pFrm->SwitchLTRtoRTL( aPoint ); - nLeftMarginTabPos = m_pFrm->Frm().Right() - aPoint.X(); + m_pFrame->SwitchLTRtoRTL( aPoint ); + nLeftMarginTabPos = m_pFrame->Frame().Right() - aPoint.X(); } else { - nLeftMarginTabPos = Left() - m_pFrm->Frm().Left(); + nLeftMarginTabPos = Left() - m_pFrame->Frame().Left(); } } if( m_pCurr->HasForcedLeftMargin() ) @@ -230,7 +230,7 @@ SwTabPortion *SwTextFormatter::NewTabPortion( SwTextFormatInfo &rInf, bool bAuto !pTabStop || nNextPos != m_aLineInf.GetListTabStopPosition() ) || // compatibility option TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST: - m_pFrm->GetTextNode()->getIDocumentSettingAccess()-> + m_pFrame->GetTextNode()->getIDocumentSettingAccess()-> get(DocumentSettingId::TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST); if ( bTabAtLeftMarginAllowed ) { @@ -323,8 +323,8 @@ bool SwTabPortion::PreFormat( SwTextFormatInfo &rInf ) // Here we settle down ... Fix( static_cast<sal_uInt16>(rInf.X()) ); - const bool bTabCompat = rInf.GetTextFrm()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT); - const bool bTabOverflow = rInf.GetTextFrm()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_OVERFLOW); + const bool bTabCompat = rInf.GetTextFrame()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT); + const bool bTabOverflow = rInf.GetTextFrame()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_OVERFLOW); // The minimal width of a tab is one blank at least. // #i37686# In compatibility mode, the minimum width @@ -357,7 +357,7 @@ bool SwTabPortion::PreFormat( SwTextFormatInfo &rInf ) ( rInf.Width() <= rInf.X() + PrtWidth() && rInf.X() <= rInf.Width() ) ; // #95477# Rotated tab stops get the width of one blank - const sal_uInt16 nDir = rInf.GetFont()->GetOrientation( rInf.GetTextFrm()->IsVertical() ); + const sal_uInt16 nDir = rInf.GetFont()->GetOrientation( rInf.GetTextFrame()->IsVertical() ); if( ! bFull && 0 == nDir ) { @@ -385,7 +385,7 @@ bool SwTabPortion::PreFormat( SwTextFormatInfo &rInf ) bool bAtParaEnd = rInf.GetIdx() + GetLen() == rInf.GetText().getLength(); if ( bFull && bTabCompat && ( ( bTabOverflow && ( rInf.IsTabOverflow() || !IsAutoTabStop() ) ) || bAtParaEnd ) && - GetTabPos() >= rInf.GetTextFrm()->Frm().Width() ) + GetTabPos() >= rInf.GetTextFrame()->Frame().Width() ) { bFull = false; if ( bTabOverflow && !IsAutoTabStop() ) @@ -422,7 +422,7 @@ bool SwTabPortion::PreFormat( SwTextFormatInfo &rInf ) else { // A trick with impact: The new Tabportions now behave like - // FlyFrms, located in the line - including adjustment ! + // FlyFrames, located in the line - including adjustment ! SetFixWidth( PrtWidth() ); return false; } @@ -430,7 +430,7 @@ bool SwTabPortion::PreFormat( SwTextFormatInfo &rInf ) bool SwTabPortion::PostFormat( SwTextFormatInfo &rInf ) { - const bool bTabOverMargin = rInf.GetTextFrm()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_OVER_MARGIN); + const bool bTabOverMargin = rInf.GetTextFrame()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_OVER_MARGIN); // If the tab position is larger than the right margin, it gets scaled down by default. // However, if compat mode enabled, we allow tabs to go over the margin: the rest of the paragraph is not broken into lines. const sal_uInt16 nRight = bTabOverMargin ? GetTabPos() : std::min(GetTabPos(), rInf.Width()); @@ -445,7 +445,7 @@ bool SwTabPortion::PostFormat( SwTextFormatInfo &rInf ) const sal_uInt16 nWhich = GetWhichPor(); OSL_ENSURE( POR_TABLEFT != nWhich, "SwTabPortion::PostFormat: already formatted" ); - const bool bTabCompat = rInf.GetTextFrm()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT); + const bool bTabCompat = rInf.GetTextFrame()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT); // #127428# Abandon dec. tab position if line is full if ( bTabCompat && POR_TABDECIMAL == nWhich ) diff --git a/sw/source/core/text/widorp.cxx b/sw/source/core/text/widorp.cxx index b995ee6cc8f2..11e8c7aa658b 100644 --- a/sw/source/core/text/widorp.cxx +++ b/sw/source/core/text/widorp.cxx @@ -44,37 +44,37 @@ namespace { // A Follow on the same page as its master is nasty. -inline bool IsNastyFollow( const SwTextFrm *pFrm ) +inline bool IsNastyFollow( const SwTextFrame *pFrame ) { - OSL_ENSURE( !pFrm->IsFollow() || !pFrm->GetPrev() || - static_cast<const SwTextFrm*>(pFrm->GetPrev())->GetFollow() == pFrm, + OSL_ENSURE( !pFrame->IsFollow() || !pFrame->GetPrev() || + static_cast<const SwTextFrame*>(pFrame->GetPrev())->GetFollow() == pFrame, "IsNastyFollow: Was ist denn hier los?" ); - return pFrm->IsFollow() && pFrm->GetPrev(); + return pFrame->IsFollow() && pFrame->GetPrev(); } } -SwTextFrmBreak::SwTextFrmBreak( SwTextFrm *pNewFrm, const SwTwips nRst ) - : m_nRstHeight(nRst), m_pFrm(pNewFrm) +SwTextFrameBreak::SwTextFrameBreak( SwTextFrame *pNewFrame, const SwTwips nRst ) + : m_nRstHeight(nRst), m_pFrame(pNewFrame) { - SwSwapIfSwapped swap(m_pFrm); - SWRECTFN( m_pFrm ) - m_nOrigin = (m_pFrm->*fnRect->fnGetPrtTop)(); - m_bKeep = !m_pFrm->IsMoveable() || IsNastyFollow( m_pFrm ); - if( !m_bKeep && m_pFrm->IsInSct() ) + SwSwapIfSwapped swap(m_pFrame); + SWRECTFN( m_pFrame ) + m_nOrigin = (m_pFrame->*fnRect->fnGetPrtTop)(); + m_bKeep = !m_pFrame->IsMoveable() || IsNastyFollow( m_pFrame ); + if( !m_bKeep && m_pFrame->IsInSct() ) { - const SwSectionFrm* const pSct = m_pFrm->FindSctFrm(); - m_bKeep = pSct->Lower()->IsColumnFrm() && !pSct->MoveAllowed( m_pFrm ); + const SwSectionFrame* const pSct = m_pFrame->FindSctFrame(); + m_bKeep = pSct->Lower()->IsColumnFrame() && !pSct->MoveAllowed( m_pFrame ); } - m_bKeep = m_bKeep || !m_pFrm->GetTextNode()->GetSwAttrSet().GetSplit().GetValue() || - m_pFrm->GetTextNode()->GetSwAttrSet().GetKeep().GetValue(); + m_bKeep = m_bKeep || !m_pFrame->GetTextNode()->GetSwAttrSet().GetSplit().GetValue() || + m_pFrame->GetTextNode()->GetSwAttrSet().GetKeep().GetValue(); m_bBreak = false; - if( !m_nRstHeight && !m_pFrm->IsFollow() && m_pFrm->IsInFootnote() && m_pFrm->HasPara() ) + if( !m_nRstHeight && !m_pFrame->IsFollow() && m_pFrame->IsInFootnote() && m_pFrame->HasPara() ) { - m_nRstHeight = m_pFrm->GetFootnoteFrmHeight(); - m_nRstHeight += (m_pFrm->Prt().*fnRect->fnGetHeight)() - - (m_pFrm->Frm().*fnRect->fnGetHeight)(); + m_nRstHeight = m_pFrame->GetFootnoteFrameHeight(); + m_nRstHeight += (m_pFrame->Prt().*fnRect->fnGetHeight)() - + (m_pFrame->Frame().*fnRect->fnGetHeight)(); if( m_nRstHeight < 0 ) m_nRstHeight = 0; } @@ -100,32 +100,32 @@ SwTextFrmBreak::SwTextFrmBreak( SwTextFrm *pNewFrm, const SwTwips nRst ) * be done until the Follow is formatted. Unfortunately this is crucial * to decide if the whole paragraph goes to the next page or not. */ -bool SwTextFrmBreak::IsInside( SwTextMargin &rLine ) const +bool SwTextFrameBreak::IsInside( SwTextMargin &rLine ) const { bool bFit = false; - SwSwapIfSwapped swap(m_pFrm); - SWRECTFN( m_pFrm ) + SwSwapIfSwapped swap(m_pFrame); + SWRECTFN( m_pFrame ) // nOrigin is an absolut value, rLine referes to the swapped situation. SwTwips nTmpY; - if ( m_pFrm->IsVertical() ) - nTmpY = m_pFrm->SwitchHorizontalToVertical( rLine.Y() + rLine.GetLineHeight() ); + if ( m_pFrame->IsVertical() ) + nTmpY = m_pFrame->SwitchHorizontalToVertical( rLine.Y() + rLine.GetLineHeight() ); else nTmpY = rLine.Y() + rLine.GetLineHeight(); SwTwips nLineHeight = (*fnRect->fnYDiff)( nTmpY , m_nOrigin ); // 7455 und 6114: Calculate extra space for bottom border. - nLineHeight += (m_pFrm->*fnRect->fnGetBottomMargin)(); + nLineHeight += (m_pFrame->*fnRect->fnGetBottomMargin)(); if( m_nRstHeight ) bFit = m_nRstHeight >= nLineHeight; else { - // The Frm has a height to fit on the page. + // The Frame has a height to fit on the page. SwTwips nHeight = - (*fnRect->fnYDiff)( (m_pFrm->GetUpper()->*fnRect->fnGetPrtBottom)(), m_nOrigin ); + (*fnRect->fnYDiff)( (m_pFrame->GetUpper()->*fnRect->fnGetPrtBottom)(), m_nOrigin ); // If everything is inside the existing frame the result is true; bFit = nHeight >= nLineHeight; @@ -133,25 +133,25 @@ bool SwTextFrmBreak::IsInside( SwTextMargin &rLine ) const if ( !bFit ) { if ( rLine.GetNext() && - m_pFrm->IsInTab() && !m_pFrm->GetFollow() && !m_pFrm->GetIndNext() ) + m_pFrame->IsInTab() && !m_pFrame->GetFollow() && !m_pFrame->GetIndNext() ) { // add additional space taken as lower space as last content in a table // for all text lines except the last one. - nHeight += m_pFrm->CalcAddLowerSpaceAsLastInTableCell(); + nHeight += m_pFrame->CalcAddLowerSpaceAsLastInTableCell(); bFit = nHeight >= nLineHeight; } } // <-- if( !bFit ) { - // The LineHeight exceeds the current Frm height. + // The LineHeight exceeds the current Frame height. // Call a test Grow to detect if the Frame could // grow the requested area. - nHeight += m_pFrm->GrowTst( LONG_MAX ); + nHeight += m_pFrame->GrowTst( LONG_MAX ); - // The Grow() returns the height by which the Upper of the TextFrm - // would let the TextFrm grow. - // The TextFrm itself can grow as much as it wants. + // The Grow() returns the height by which the Upper of the TextFrame + // would let the TextFrame grow. + // The TextFrame itself can grow as much as it wants. bFit = nHeight >= nLineHeight; } } @@ -159,9 +159,9 @@ bool SwTextFrmBreak::IsInside( SwTextMargin &rLine ) const return bFit; } -bool SwTextFrmBreak::IsBreakNow( SwTextMargin &rLine ) +bool SwTextFrameBreak::IsBreakNow( SwTextMargin &rLine ) { - SwSwapIfSwapped swap(m_pFrm); + SwSwapIfSwapped swap(m_pFrame); // bKeep is stronger than IsBreakNow() // Is there enough space ? @@ -180,15 +180,15 @@ bool SwTextFrmBreak::IsBreakNow( SwTextMargin &rLine ) bool bFirstLine = 1 == rLine.GetLineNr() && !rLine.GetPrev(); m_bBreak = true; - if( ( bFirstLine && m_pFrm->GetIndPrev() ) + if( ( bFirstLine && m_pFrame->GetIndPrev() ) || ( rLine.GetLineNr() <= rLine.GetDropLines() ) ) { m_bKeep = true; m_bBreak = false; } - else if(bFirstLine && m_pFrm->IsInFootnote() && !m_pFrm->FindFootnoteFrm()->GetPrev()) + else if(bFirstLine && m_pFrame->IsInFootnote() && !m_pFrame->FindFootnoteFrame()->GetPrev()) { - SwLayoutFrm* pTmp = m_pFrm->FindFootnoteBossFrm()->FindBodyCont(); + SwLayoutFrame* pTmp = m_pFrame->FindFootnoteBossFrame()->FindBodyCont(); if( !pTmp || !pTmp->Lower() ) m_bBreak = false; } @@ -198,53 +198,53 @@ bool SwTextFrmBreak::IsBreakNow( SwTextMargin &rLine ) } /// OD 2004-02-27 #106629# - no longer inline -void SwTextFrmBreak::SetRstHeight( const SwTextMargin &rLine ) +void SwTextFrameBreak::SetRstHeight( const SwTextMargin &rLine ) { // OD, FME 2004-02-27 #106629# - consider bottom margin - SWRECTFN( m_pFrm ) + SWRECTFN( m_pFrame ) - m_nRstHeight = (m_pFrm->*fnRect->fnGetBottomMargin)(); + m_nRstHeight = (m_pFrame->*fnRect->fnGetBottomMargin)(); if ( bVert ) { - if ( m_pFrm->IsVertLR() ) - m_nRstHeight = (*fnRect->fnYDiff)( m_pFrm->SwitchHorizontalToVertical( rLine.Y() ) , m_nOrigin ); + if ( m_pFrame->IsVertLR() ) + m_nRstHeight = (*fnRect->fnYDiff)( m_pFrame->SwitchHorizontalToVertical( rLine.Y() ) , m_nOrigin ); else - m_nRstHeight += m_nOrigin - m_pFrm->SwitchHorizontalToVertical( rLine.Y() ); + m_nRstHeight += m_nOrigin - m_pFrame->SwitchHorizontalToVertical( rLine.Y() ); } else m_nRstHeight += rLine.Y() - m_nOrigin; } -WidowsAndOrphans::WidowsAndOrphans( SwTextFrm *pNewFrm, const SwTwips nRst, +WidowsAndOrphans::WidowsAndOrphans( SwTextFrame *pNewFrame, const SwTwips nRst, bool bChkKeep ) - : SwTextFrmBreak( pNewFrm, nRst ), nWidLines( 0 ), nOrphLines( 0 ) + : SwTextFrameBreak( pNewFrame, nRst ), nWidLines( 0 ), nOrphLines( 0 ) { - SwSwapIfSwapped swap(m_pFrm); + SwSwapIfSwapped swap(m_pFrame); if( m_bKeep ) { // 5652: If pararagraph should not be split but is larger than // the page, then bKeep is overruled. - if( bChkKeep && !m_pFrm->GetPrev() && !m_pFrm->IsInFootnote() && - m_pFrm->IsMoveable() && - ( !m_pFrm->IsInSct() || m_pFrm->FindSctFrm()->MoveAllowed(m_pFrm) ) ) + if( bChkKeep && !m_pFrame->GetPrev() && !m_pFrame->IsInFootnote() && + m_pFrame->IsMoveable() && + ( !m_pFrame->IsInSct() || m_pFrame->FindSctFrame()->MoveAllowed(m_pFrame) ) ) m_bKeep = false; // Even if Keep is set, Orphans has to be respected. // e.g. if there are chained frames where a Follow in the last frame // receives a Keep, because it is not (forward) movable - // nevertheless the paragraph can request lines from the Master // because of the Orphan rule. - if( m_pFrm->IsFollow() ) - nWidLines = m_pFrm->GetTextNode()->GetSwAttrSet().GetWidows().GetValue(); + if( m_pFrame->IsFollow() ) + nWidLines = m_pFrame->GetTextNode()->GetSwAttrSet().GetWidows().GetValue(); } else { - const SwAttrSet& rSet = m_pFrm->GetTextNode()->GetSwAttrSet(); + const SwAttrSet& rSet = m_pFrame->GetTextNode()->GetSwAttrSet(); const SvxOrphansItem &rOrph = rSet.GetOrphans(); if ( rOrph.GetValue() > 1 ) nOrphLines = rOrph.GetValue(); - if ( m_pFrm->IsFollow() ) + if ( m_pFrame->IsFollow() ) nWidLines = rSet.GetWidows().GetValue(); } @@ -253,29 +253,29 @@ WidowsAndOrphans::WidowsAndOrphans( SwTextFrm *pNewFrm, const SwTwips nRst, { bool bResetFlags = false; - if ( m_pFrm->IsInTab() ) + if ( m_pFrame->IsInTab() ) { // For compatibility reasons, we disable Keep/Widows/Orphans // inside splittable row frames: - if ( m_pFrm->GetNextCellLeaf( MAKEPAGE_NONE ) || m_pFrm->IsInFollowFlowRow() ) + if ( m_pFrame->GetNextCellLeaf( MAKEPAGE_NONE ) || m_pFrame->IsInFollowFlowRow() ) { - const SwFrm* pTmpFrm = m_pFrm->GetUpper(); - while ( !pTmpFrm->IsRowFrm() ) - pTmpFrm = pTmpFrm->GetUpper(); - if ( static_cast<const SwRowFrm*>(pTmpFrm)->IsRowSplitAllowed() ) + const SwFrame* pTmpFrame = m_pFrame->GetUpper(); + while ( !pTmpFrame->IsRowFrame() ) + pTmpFrame = pTmpFrame->GetUpper(); + if ( static_cast<const SwRowFrame*>(pTmpFrame)->IsRowSplitAllowed() ) bResetFlags = true; } } - if( m_pFrm->IsInFootnote() && !m_pFrm->GetIndPrev() ) + if( m_pFrame->IsInFootnote() && !m_pFrame->GetIndPrev() ) { // Inside of footnotes there are good reasons to turn off the Keep attribute // as well as Widows/Orphans. - SwFootnoteFrm *pFootnote = m_pFrm->FindFootnoteFrm(); + SwFootnoteFrame *pFootnote = m_pFrame->FindFootnoteFrame(); const bool bFt = !pFootnote->GetAttr()->GetFootnote().IsEndNote(); if( !pFootnote->GetPrev() && - pFootnote->FindFootnoteBossFrm( bFt ) != pFootnote->GetRef()->FindFootnoteBossFrm( bFt ) - && ( !m_pFrm->IsInSct() || m_pFrm->FindSctFrm()->MoveAllowed(m_pFrm) ) ) + pFootnote->FindFootnoteBossFrame( bFt ) != pFootnote->GetRef()->FindFootnoteBossFrame( bFt ) + && ( !m_pFrame->IsInSct() || m_pFrame->FindSctFrame()->MoveAllowed(m_pFrame) ) ) { bResetFlags = true; } @@ -295,14 +295,14 @@ WidowsAndOrphans::WidowsAndOrphans( SwTextFrm *pNewFrm, const SwTwips nRst, * line where the paragraph should have a break and truncate the paragraph there. * FindBreak() */ -bool WidowsAndOrphans::FindBreak( SwTextFrm *pFrame, SwTextMargin &rLine, +bool WidowsAndOrphans::FindBreak( SwTextFrame *pFrame, SwTextMargin &rLine, bool bHasToFit ) { - // OD 2004-02-25 #i16128# - Why member <pFrm> _*and*_ parameter <pFrame>?? + // OD 2004-02-25 #i16128# - Why member <pFrame> _*and*_ parameter <pFrame>?? // Thus, assertion on situation, that these are different to figure out why. - OSL_ENSURE( m_pFrm == pFrame, "<WidowsAndOrphans::FindBreak> - pFrm != pFrame" ); + OSL_ENSURE( m_pFrame == pFrame, "<WidowsAndOrphans::FindBreak> - pFrame != pFrame" ); - SwSwapIfSwapped swap(m_pFrm); + SwSwapIfSwapped swap(m_pFrame); bool bRet = true; sal_uInt16 nOldOrphans = nOrphLines; @@ -346,7 +346,7 @@ bool WidowsAndOrphans::FindBreak( SwTextFrm *pFrame, SwTextMargin &rLine, * Returns true if the Widows-rule matches, that means that the * paragraph should not be split (keep) ! */ -bool WidowsAndOrphans::FindWidows( SwTextFrm *pFrame, SwTextMargin &rLine ) +bool WidowsAndOrphans::FindWidows( SwTextFrame *pFrame, SwTextMargin &rLine ) { OSL_ENSURE( ! pFrame->IsVertical() || ! pFrame->IsSwapped(), "WidowsAndOrphans::FindWidows with swapped frame" ); @@ -357,7 +357,7 @@ bool WidowsAndOrphans::FindWidows( SwTextFrm *pFrame, SwTextMargin &rLine ) rLine.Bottom(); // We can still cut something off - SwTextFrm *pMaster = pFrame->FindMaster(); + SwTextFrame *pMaster = pFrame->FindMaster(); OSL_ENSURE(pMaster, "+WidowsAndOrphans::FindWidows: Widows in a master?"); if( !pMaster ) return false; @@ -399,7 +399,7 @@ bool WidowsAndOrphans::FindWidows( SwTextFrm *pFrame, SwTextMargin &rLine ) // multiple lines (e.g. via frames). if( !pMaster->IsLocked() && pMaster->GetUpper() ) { - const SwTwips nTmpRstHeight = (pMaster->Frm().*fnRect->fnBottomDist) + const SwTwips nTmpRstHeight = (pMaster->Frame().*fnRect->fnBottomDist) ( (pMaster->GetUpper()->*fnRect->fnGetPrtBottom)() ); if ( nTmpRstHeight >= SwTwips(rLine.GetInfo().GetParaPortion()->Height() ) ) @@ -422,7 +422,7 @@ bool WidowsAndOrphans::FindWidows( SwTextFrm *pFrame, SwTextMargin &rLine ) if( 0 > nChg && !pMaster->IsLocked() && pMaster->GetUpper() ) { - SwTwips nTmpRstHeight = (pMaster->Frm().*fnRect->fnBottomDist) + SwTwips nTmpRstHeight = (pMaster->Frame().*fnRect->fnBottomDist) ( (pMaster->GetUpper()->*fnRect->fnGetPrtBottom)() ); if( nTmpRstHeight >= SwTwips(rLine.GetInfo().GetParaPortion()->Height() ) ) { @@ -472,7 +472,7 @@ bool WidowsAndOrphans::FindWidows( SwTextFrm *pFrame, SwTextMargin &rLine ) bool WidowsAndOrphans::WouldFit( SwTextMargin &rLine, SwTwips &rMaxHeight, bool bTst ) { - // Here it does not matter, if pFrm is swapped or not. + // Here it does not matter, if pFrame is swapped or not. // IsInside() takes care of itself // We expect that rLine is set to the last line @@ -499,14 +499,14 @@ bool WidowsAndOrphans::WouldFit( SwTextMargin &rLine, SwTwips &rMaxHeight, bool return false; // Check the Widows-rule - if( !nWidLines && !m_pFrm->IsFollow() ) + if( !nWidLines && !m_pFrame->IsFollow() ) { // Usually we only have to check for Widows if we are a Follow. // On WouldFit the rule has to be checked for the Master too, // because we are just in the middle of calculating the break. // In Ctor of WidowsAndOrphans the nWidLines are only calced for // Follows from the AttrSet - so we catch up now: - const SwAttrSet& rSet = m_pFrm->GetTextNode()->GetSwAttrSet(); + const SwAttrSet& rSet = m_pFrame->GetTextNode()->GetSwAttrSet(); nWidLines = rSet.GetWidows().GetValue(); } diff --git a/sw/source/core/text/widorp.hxx b/sw/source/core/text/widorp.hxx index 207bfe3117e5..8b214a3f5e4f 100644 --- a/sw/source/core/text/widorp.hxx +++ b/sw/source/core/text/widorp.hxx @@ -18,22 +18,22 @@ */ #ifndef INCLUDED_SW_SOURCE_CORE_TEXT_WIDORP_HXX #define INCLUDED_SW_SOURCE_CORE_TEXT_WIDORP_HXX -class SwTextFrm; +class SwTextFrame; #include "swtypes.hxx" #include "itrtxt.hxx" -class SwTextFrmBreak +class SwTextFrameBreak { private: SwTwips m_nRstHeight; SwTwips m_nOrigin; protected: - SwTextFrm *m_pFrm; + SwTextFrame *m_pFrame; bool m_bBreak; bool m_bKeep; public: - SwTextFrmBreak( SwTextFrm *pFrm, const SwTwips nRst = 0 ); + SwTextFrameBreak( SwTextFrame *pFrame, const SwTwips nRst = 0 ); bool IsBreakNow( SwTextMargin &rLine ); bool IsKeepAlways() const { return m_bKeep; } @@ -42,7 +42,7 @@ public: bool IsInside( SwTextMargin &rLine ) const; // In order to be able to handle special cases with Footnote. - // SetRstHeight sets the rest height for SwTextFrmBreak. This is needed + // SetRstHeight sets the rest height for SwTextFrameBreak. This is needed // to call TruncLines() without IsBreakNow() returning another value. // We assume that rLine is pointing to the last non-fitting line. @@ -50,25 +50,25 @@ public: void SetRstHeight( const SwTextMargin &rLine ); }; -class WidowsAndOrphans : public SwTextFrmBreak +class WidowsAndOrphans : public SwTextFrameBreak { private: sal_uInt16 nWidLines, nOrphLines; public: - WidowsAndOrphans( SwTextFrm *pFrm, const SwTwips nRst = 0, + WidowsAndOrphans( SwTextFrame *pFrame, const SwTwips nRst = 0, bool bCheckKeep = true ); - bool FindWidows( SwTextFrm *pFrm, SwTextMargin &rLine ); + bool FindWidows( SwTextFrame *pFrame, SwTextMargin &rLine ); sal_uInt16 GetWidowsLines() const { return nWidLines; } sal_uInt16 GetOrphansLines() const { return nOrphLines; } void ClrOrphLines(){ nOrphLines = 0; } - bool FindBreak( SwTextFrm *pFrm, SwTextMargin &rLine, bool bHasToFit ); + bool FindBreak( SwTextFrame *pFrame, SwTextMargin &rLine, bool bHasToFit ); bool WouldFit( SwTextMargin &rLine, SwTwips &rMaxHeight, bool bTest ); // OD 2004-02-25 #i16128# - rename method to avoid confusion with base class - // method <SwTextFrmBreak::IsBreakNow>, which isn't virtual. + // method <SwTextFrameBreak::IsBreakNow>, which isn't virtual. bool IsBreakNowWidAndOrp( SwTextMargin &rLine ) { bool isOnFirstLine = (rLine.GetLineNr() == 1 && !rLine.GetPrev()); diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx index cc173c3e1f84..83adb1f84fd7 100644 --- a/sw/source/core/text/xmldump.cxx +++ b/sw/source/core/text/xmldump.cxx @@ -227,7 +227,7 @@ namespace } } -void SwFrm::dumpAsXml( xmlTextWriterPtr writer ) const +void SwFrame::dumpAsXml( xmlTextWriterPtr writer ) const { bool bCreateWriter = ( nullptr == writer ); if ( bCreateWriter ) @@ -293,11 +293,11 @@ void SwFrm::dumpAsXml( xmlTextWriterPtr writer ) const dumpAsXmlAttributes( writer ); - if (IsRootFrm()) + if (IsRootFrame()) { - const SwRootFrm* pRootFrm = static_cast<const SwRootFrm*>(this); + const SwRootFrame* pRootFrame = static_cast<const SwRootFrame*>(this); xmlTextWriterStartElement(writer, BAD_CAST("shells")); - for (SwViewShell& rViewShell : pRootFrm->GetCurrShell()->GetRingContainer()) + for (SwViewShell& rViewShell : pRootFrame->GetCurrShell()->GetRingContainer()) rViewShell.dumpAsXml(writer); xmlTextWriterEndElement(writer); } @@ -322,10 +322,10 @@ void SwFrm::dumpAsXml( xmlTextWriterPtr writer ) const } // Dump the children - if ( IsTextFrm( ) ) + if ( IsTextFrame( ) ) { - const SwTextFrm *pTextFrm = static_cast<const SwTextFrm *>(this); - OUString aText = pTextFrm->GetText( ); + const SwTextFrame *pTextFrame = static_cast<const SwTextFrame *>(this); + OUString aText = pTextFrame->GetText( ); for ( int i = 0; i < 32; i++ ) { aText = aText.replace( i, '*' ); @@ -335,7 +335,7 @@ void SwFrm::dumpAsXml( xmlTextWriterPtr writer ) const xmlTextWriterWriteString( writer, reinterpret_cast<const xmlChar *>(aText8.getStr( )) ); XmlPortionDumper pdumper( writer ); - pTextFrm->VisitPortions( pdumper ); + pTextFrame->VisitPortions( pdumper ); } else @@ -349,14 +349,14 @@ void SwFrm::dumpAsXml( xmlTextWriterPtr writer ) const lcl_freeWriter( writer ); } -void SwFrm::dumpInfosAsXml( xmlTextWriterPtr writer ) const +void SwFrame::dumpInfosAsXml( xmlTextWriterPtr writer ) const { - // output the Frm + // output the Frame xmlTextWriterStartElement( writer, BAD_CAST( "bounds" ) ); - xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "left" ), "%ld", Frm().Left() ); - xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "top" ), "%ld", Frm().Top() ); - xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "width" ), "%ld", Frm().Width() ); - xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "height" ), "%ld", Frm().Height() ); + xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "left" ), "%ld", Frame().Left() ); + xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "top" ), "%ld", Frame().Top() ); + xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "width" ), "%ld", Frame().Width() ); + xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "height" ), "%ld", Frame().Height() ); xmlTextWriterEndElement( writer ); } @@ -364,40 +364,40 @@ void SwFrm::dumpInfosAsXml( xmlTextWriterPtr writer ) const // bomb on two string litterals in the format. static const char* TMP_FORMAT = "%" SAL_PRIuUINTPTR; -void SwFrm::dumpAsXmlAttributes( xmlTextWriterPtr writer ) const +void SwFrame::dumpAsXmlAttributes( xmlTextWriterPtr writer ) const { xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "ptr" ), "%p", this ); - xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "id" ), "%" SAL_PRIuUINT32, GetFrmId() ); + xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "id" ), "%" SAL_PRIuUINT32, GetFrameId() ); xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "symbol" ), "%s", BAD_CAST( typeid( *this ).name( ) ) ); if ( GetNext( ) ) - xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "next" ), "%" SAL_PRIuUINT32, GetNext()->GetFrmId() ); + xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "next" ), "%" SAL_PRIuUINT32, GetNext()->GetFrameId() ); if ( GetPrev( ) ) - xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "prev" ), "%" SAL_PRIuUINT32, GetPrev()->GetFrmId() ); + xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "prev" ), "%" SAL_PRIuUINT32, GetPrev()->GetFrameId() ); if ( GetUpper( ) ) - xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "upper" ), "%" SAL_PRIuUINT32, GetUpper()->GetFrmId() ); + xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "upper" ), "%" SAL_PRIuUINT32, GetUpper()->GetFrameId() ); if ( GetLower( ) ) - xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "lower" ), "%" SAL_PRIuUINT32, GetLower()->GetFrmId() ); - if ( IsTextFrm( ) ) + xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "lower" ), "%" SAL_PRIuUINT32, GetLower()->GetFrameId() ); + if ( IsTextFrame( ) ) { - const SwTextFrm *pTextFrm = static_cast<const SwTextFrm *>(this); - const SwTextNode *pTextNode = pTextFrm->GetTextNode(); + const SwTextFrame *pTextFrame = static_cast<const SwTextFrame *>(this); + const SwTextNode *pTextNode = pTextFrame->GetTextNode(); xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "txtNodeIndex" ), TMP_FORMAT, pTextNode->GetIndex() ); } - if (IsHeaderFrm() || IsFooterFrm()) + if (IsHeaderFrame() || IsFooterFrame()) { - const SwHeadFootFrm *pHeadFootFrm = static_cast<const SwHeadFootFrm*>(this); - OUString aFormatName = pHeadFootFrm->GetFormat()->GetName(); + const SwHeadFootFrame *pHeadFootFrame = static_cast<const SwHeadFootFrame*>(this); + OUString aFormatName = pHeadFootFrame->GetFormat()->GetName(); xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "fmtName" ), "%s", BAD_CAST(OUStringToOString(aFormatName, RTL_TEXTENCODING_UTF8).getStr())); - xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "fmtPtr" ), "%p", pHeadFootFrm->GetFormat()); + xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "fmtPtr" ), "%p", pHeadFootFrame->GetFormat()); } } -void SwFrm::dumpChildrenAsXml( xmlTextWriterPtr writer ) const +void SwFrame::dumpChildrenAsXml( xmlTextWriterPtr writer ) const { - const SwFrm *pFrm = GetLower( ); - for ( ; pFrm != nullptr; pFrm = pFrm->GetNext( ) ) + const SwFrame *pFrame = GetLower( ); + for ( ; pFrame != nullptr; pFrame = pFrame->GetNext( ) ) { - pFrm->dumpAsXml( writer ); + pFrame->dumpAsXml( writer ); } } @@ -431,34 +431,34 @@ void SwFont::dumpAsXml(xmlTextWriterPtr writer) const xmlTextWriterEndElement(writer); } -void SwTextFrm::dumpAsXmlAttributes( xmlTextWriterPtr writer ) const +void SwTextFrame::dumpAsXmlAttributes( xmlTextWriterPtr writer ) const { - SwFrm::dumpAsXmlAttributes( writer ); + SwFrame::dumpAsXmlAttributes( writer ); if ( HasFollow() ) - xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "follow" ), "%" SAL_PRIuUINT32, GetFollow()->GetFrmId() ); + xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "follow" ), "%" SAL_PRIuUINT32, GetFollow()->GetFrameId() ); if (m_pPrecede != nullptr) - xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "precede" ), "%" SAL_PRIuUINT32, static_cast<SwTextFrm*>(m_pPrecede)->GetFrmId() ); + xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "precede" ), "%" SAL_PRIuUINT32, static_cast<SwTextFrame*>(m_pPrecede)->GetFrameId() ); } -void SwSectionFrm::dumpAsXmlAttributes( xmlTextWriterPtr writer ) const +void SwSectionFrame::dumpAsXmlAttributes( xmlTextWriterPtr writer ) const { - SwFrm::dumpAsXmlAttributes( writer ); + SwFrame::dumpAsXmlAttributes( writer ); if ( HasFollow() ) - xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "follow" ), "%" SAL_PRIuUINT32, GetFollow()->GetFrmId() ); + xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "follow" ), "%" SAL_PRIuUINT32, GetFollow()->GetFrameId() ); if (m_pPrecede != nullptr) - xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "precede" ), "%" SAL_PRIuUINT32, static_cast<SwSectionFrm*>( m_pPrecede )->GetFrmId() ); + xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "precede" ), "%" SAL_PRIuUINT32, static_cast<SwSectionFrame*>( m_pPrecede )->GetFrameId() ); } -void SwTabFrm::dumpAsXmlAttributes( xmlTextWriterPtr writer ) const +void SwTabFrame::dumpAsXmlAttributes( xmlTextWriterPtr writer ) const { - SwFrm::dumpAsXmlAttributes( writer ); + SwFrame::dumpAsXmlAttributes( writer ); if ( HasFollow() ) - xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "follow" ), "%" SAL_PRIuUINT32, GetFollow()->GetFrmId() ); + xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "follow" ), "%" SAL_PRIuUINT32, GetFollow()->GetFrameId() ); if (m_pPrecede != nullptr) - xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "precede" ), "%" SAL_PRIuUINT32, static_cast<SwTabFrm*>( m_pPrecede )->GetFrmId() ); + xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "precede" ), "%" SAL_PRIuUINT32, static_cast<SwTabFrame*>( m_pPrecede )->GetFrameId() ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/tox/ToxTabStopTokenHandler.cxx b/sw/source/core/tox/ToxTabStopTokenHandler.cxx index 8ac6c227c480..9be242d3cd53 100644 --- a/sw/source/core/tox/ToxTabStopTokenHandler.cxx +++ b/sw/source/core/tox/ToxTabStopTokenHandler.cxx @@ -38,7 +38,7 @@ DefaultToxTabStopTokenHandler::DefaultToxTabStopTokenHandler(sal_uInt32 indexOfS ToxTabStopTokenHandler::HandledTabStopToken DefaultToxTabStopTokenHandler::HandleTabStopToken( - const SwFormToken& aToken, const SwTextNode& targetNode, const SwRootFrm *currentLayout) const + const SwFormToken& aToken, const SwTextNode& targetNode, const SwRootFrame *currentLayout) const { HandledTabStopToken result; @@ -91,14 +91,14 @@ DefaultToxTabStopTokenHandler::CalculatePageMarginFromPageDescription(const SwTe pPageDesc = &mDefaultPageDescription; } const SwFrameFormat& rPgDscFormat = pPageDesc->GetMaster(); - long result = rPgDscFormat.GetFrmSize().GetWidth() - rPgDscFormat.GetLRSpace().GetLeft() + long result = rPgDscFormat.GetFrameSize().GetWidth() - rPgDscFormat.GetLRSpace().GetLeft() - rPgDscFormat.GetLRSpace().GetRight(); return result; } /*static*/ bool -DefaultToxTabStopTokenHandler::CanUseLayoutRectangle(const SwTextNode& targetNode, const SwRootFrm *currentLayout) +DefaultToxTabStopTokenHandler::CanUseLayoutRectangle(const SwTextNode& targetNode, const SwRootFrame *currentLayout) { const SwPageDesc* pageDescription = static_cast<const SwFormatPageDesc&>( targetNode.SwContentNode::GetAttr(RES_PAGEDESC)).GetPageDesc(); @@ -106,16 +106,16 @@ DefaultToxTabStopTokenHandler::CanUseLayoutRectangle(const SwTextNode& targetNod if (!pageDescription) { return false; } - const SwFrm* pFrm = targetNode.getLayoutFrm(currentLayout); - if (!pFrm) { + const SwFrame* pFrame = targetNode.getLayoutFrame(currentLayout); + if (!pFrame) { return false; } - pFrm = pFrm->FindPageFrm(); - if (!pFrm) { + pFrame = pFrame->FindPageFrame(); + if (!pFrame) { return false; } - const SwPageFrm* pageFrm = static_cast<const SwPageFrm*>(pFrm); - if (pageDescription != pageFrm->GetPageDesc()) { + const SwPageFrame* pageFrame = static_cast<const SwPageFrame*>(pFrame); + if (pageDescription != pageFrame->GetPageDesc()) { return false; } return true; diff --git a/sw/source/core/tox/ToxTextGenerator.cxx b/sw/source/core/tox/ToxTextGenerator.cxx index bea3a6e4dabd..cc181de41650 100644 --- a/sw/source/core/tox/ToxTextGenerator.cxx +++ b/sw/source/core/tox/ToxTextGenerator.cxx @@ -116,7 +116,7 @@ ToxTextGenerator::HandleChapterToken(const SwTOXSortTabBase& rBase, const SwForm } // #i53420# - const SwContentFrm* contentFrame = contentNode->getLayoutFrm(pDoc->getIDocumentLayoutAccess().GetCurrentLayout()); + const SwContentFrame* contentFrame = contentNode->getLayoutFrame(pDoc->getIDocumentLayoutAccess().GetCurrentLayout()); if (!contentFrame) { return OUString(); } @@ -125,7 +125,7 @@ ToxTextGenerator::HandleChapterToken(const SwTOXSortTabBase& rBase, const SwForm } OUString -ToxTextGenerator::GenerateTextForChapterToken(const SwFormToken& chapterToken, const SwContentFrm* contentFrame, +ToxTextGenerator::GenerateTextForChapterToken(const SwFormToken& chapterToken, const SwContentFrame* contentFrame, const SwContentNode *contentNode) const { OUString retval; @@ -350,7 +350,7 @@ ToxTextGenerator::ConstructPageNumberPlaceholder(size_t numberOfToxSources) /*virtual*/ SwChapterField ToxTextGenerator::ObtainChapterField(SwChapterFieldType* chapterFieldType, - const SwFormToken* chapterToken, const SwContentFrm* contentFrame, + const SwFormToken* chapterToken, const SwContentFrame* contentFrame, const SwContentNode* contentNode) const { assert(chapterToken); diff --git a/sw/source/core/tox/txmsrt.cxx b/sw/source/core/tox/txmsrt.cxx index 4c3e07b3e728..955fd898e6fc 100644 --- a/sw/source/core/tox/txmsrt.cxx +++ b/sw/source/core/tox/txmsrt.cxx @@ -158,12 +158,12 @@ SwTOXSortTabBase::SwTOXSortTabBase( TOXSortType nTyp, const SwContentNode* pNd, { // Then get the 'anchor' (body) position Point aPt; - const SwContentFrm* pFrm = pNd->getLayoutFrm( pNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ); - if( pFrm ) + const SwContentFrame* pFrame = pNd->getLayoutFrame( pNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ); + if( pFrame ) { SwPosition aPos( *pNd ); const SwDoc& rDoc = *pNd->GetDoc(); - bool const bResult = GetBodyTextNode( rDoc, aPos, *pFrm ); + bool const bResult = GetBodyTextNode( rDoc, aPos, *pFrame ); OSL_ENSURE(bResult, "where is the text node"); (void) bResult; // unused in non-debug nPos = aPos.nNode.GetIndex(); diff --git a/sw/source/core/txtnode/SwGrammarContact.cxx b/sw/source/core/txtnode/SwGrammarContact.cxx index 86291396e92a..0f900d44c83e 100644 --- a/sw/source/core/txtnode/SwGrammarContact.cxx +++ b/sw/source/core/txtnode/SwGrammarContact.cxx @@ -74,7 +74,7 @@ IMPL_LINK_TYPED( SwGrammarContact, TimerRepaint, Timer *, pTimer, void ) { //Replace the old wrong list by the proxy list and repaint all frames getMyTextNode()->SetGrammarCheck( mpProxyList ); mpProxyList = nullptr; - SwTextFrm::repaintTextFrames( *getMyTextNode() ); + SwTextFrame::repaintTextFrames( *getMyTextNode() ); } } } @@ -91,7 +91,7 @@ void SwGrammarContact::updateCursorPosition( const SwPosition& rNewPos ) if( mpProxyList ) { // replace old list by the proxy list and repaint getMyTextNode()->SetGrammarCheck( mpProxyList ); - SwTextFrm::repaintTextFrames( *getMyTextNode() ); + SwTextFrame::repaintTextFrames( *getMyTextNode() ); } GetRegisteredInNonConst()->Remove( this ); // good bye old paragraph mpProxyList = nullptr; @@ -160,7 +160,7 @@ void SwGrammarContact::Modify( const SfxPoolItem* pOld, const SfxPoolItem * ) void SwGrammarContact::finishGrammarCheck( SwTextNode& rTextNode ) { if( &rTextNode != GetRegisteredIn() ) // not my paragraph - SwTextFrm::repaintTextFrames( rTextNode ); // can be repainted directly + SwTextFrame::repaintTextFrames( rTextNode ); // can be repainted directly else { if( mpProxyList ) @@ -171,7 +171,7 @@ void SwGrammarContact::finishGrammarCheck( SwTextNode& rTextNode ) else if( getMyTextNode()->GetGrammarCheck() ) { // all grammar problems seems to be gone, no delay needed getMyTextNode()->SetGrammarCheck( nullptr ); - SwTextFrm::repaintTextFrames( *getMyTextNode() ); + SwTextFrame::repaintTextFrames( *getMyTextNode() ); } } } diff --git a/sw/source/core/txtnode/atrfld.cxx b/sw/source/core/txtnode/atrfld.cxx index a201bf33ba60..a86a5a2cc98d 100644 --- a/sw/source/core/txtnode/atrfld.cxx +++ b/sw/source/core/txtnode/atrfld.cxx @@ -266,7 +266,7 @@ void SwFormatField::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) } break; case RES_DOCPOS_UPDATE: - // Je nach DocPos aktualisieren (SwTextFrm::Modify()) + // Je nach DocPos aktualisieren (SwTextFrame::Modify()) pTextNd->ModifyNotification( pNew, this ); return; diff --git a/sw/source/core/txtnode/atrflyin.cxx b/sw/source/core/txtnode/atrflyin.cxx index d1f746bdfbb6..fb768e7538eb 100644 --- a/sw/source/core/txtnode/atrflyin.cxx +++ b/sw/source/core/txtnode/atrflyin.cxx @@ -76,20 +76,20 @@ SwTextFlyCnt::SwTextFlyCnt( SwFormatFlyCnt& rAttr, sal_Int32 nStartPos ) * Nodeinformationen vorliegen), verteilt sich der Ablauf. * ad 1) MakeTextHint() wird durch den Aufruf von SwDoc::CopyLayout() * der das neue FlyFrameFormat erzeugt und mit dem duplizierten Inhalt des - * FlyFrm verbunden. + * FlyFrame verbunden. * ad 2) SetAnchor() wird von SwTextNode::Insert() gerufen und sorgt fuer das * setzen des Ankers (die SwPosition des Dummy-Zeichens wird dem FlyFrameFormat * per SetAttr bekannt gegeben). Dies kann nicht im MakeTextHint erledigt * werden, da der Zielnode unbestimmt ist. - * ad 3) _GetFlyFrm() wird im Formatierungsprozess vom LineIter gerufen - * und sucht den FlyFrm zum Dummyzeichen des aktuellen ContentFrm. Wird keiner - * gefunden, so wird ein neuer FlyFrm angelegt. + * ad 3) _GetFlyFrame() wird im Formatierungsprozess vom LineIter gerufen + * und sucht den FlyFrame zum Dummyzeichen des aktuellen ContentFrame. Wird keiner + * gefunden, so wird ein neuer FlyFrame angelegt. * Kritisch an diesem Vorgehen ist, dass das pContent->AppendFly() eine * sofortige Neuformatierung von pContent anstoesst. Die Rekursion kommt - * allerdings durch den Lockmechanismus in SwTextFrm::Format() nicht + * allerdings durch den Lockmechanismus in SwTextFrame::Format() nicht * zu stande. * Attraktiv ist der Umstand, dass niemand ueber die vom Node abhaengigen - * ContentFrms iterieren braucht, um die FlyInCntFrm anzulegen. Dies geschieht + * ContentFrames iterieren braucht, um die FlyInContentFrame anzulegen. Dies geschieht * bei der Arbeit. */ @@ -167,12 +167,12 @@ void SwTextFlyCnt::SetAnchor( const SwTextNode *pNode ) aAnchor.SetType( FLY_AS_CHAR ); // default! aAnchor.SetAnchor( &aPos ); - // beim Ankerwechsel werden immer alle FlyFrms vom Attribut geloescht + // beim Ankerwechsel werden immer alle FlyFrames vom Attribut geloescht // JP 25.04.95: wird innerhalb des SplitNodes die Frames verschoben // koennen die Frames erhalten bleiben. if( ( !pNode->GetpSwpHints() || !pNode->GetpSwpHints()->IsInSplitNode() ) && RES_DRAWFRMFMT != pFormat->Which() ) - pFormat->DelFrms(); + pFormat->DelFrames(); // stehen wir noch im falschen Dokument ? if( pDoc != pFormat->GetDoc() ) @@ -204,59 +204,59 @@ void SwTextFlyCnt::SetAnchor( const SwTextNode *pNode ) pFormat->SetFormatAttr( aAnchor ); // nur den Anker neu setzen } - // Am Node haengen u.a. abhaengige CntFrms. - // Fuer jeden CntFrm wird ein SwFlyInCntFrm angelegt. + // Am Node haengen u.a. abhaengige ContentFrames. + // Fuer jeden ContentFrame wird ein SwFlyInContentFrame angelegt. } -// _GetFlyFrm() wird im Formatierungsprozess vom LineIter gerufen -// und sucht den FlyFrm zum Dummyzeichen des aktuellen ContentFrm. Wird keiner -// gefunden, so wird ein neuer FlyFrm angelegt. +// _GetFlyFrame() wird im Formatierungsprozess vom LineIter gerufen +// und sucht den FlyFrame zum Dummyzeichen des aktuellen ContentFrame. Wird keiner +// gefunden, so wird ein neuer FlyFrame angelegt. // (siehe Kommentar ind SwTextFlyCnt::MakeTextHint) -SwFlyInCntFrm *SwTextFlyCnt::_GetFlyFrm( const SwFrm *pCurrFrm ) +SwFlyInContentFrame *SwTextFlyCnt::_GetFlyFrame( const SwFrame *pCurrFrame ) { SwFrameFormat* pFrameFormat = GetFlyCnt().GetFrameFormat(); if( RES_DRAWFRMFMT == pFrameFormat->Which() ) { - OSL_ENSURE( false, "SwTextFlyCnt::_GetFlyFrm: DrawInCnt-Baustelle!" ); + OSL_ENSURE( false, "SwTextFlyCnt::_GetFlyFrame: DrawInCnt-Baustelle!" ); return nullptr; } - SwIterator<SwFlyFrm,SwFormat> aIter( *GetFlyCnt().pFormat ); - OSL_ENSURE( pCurrFrm->IsTextFrm(), "SwTextFlyCnt::_GetFlyFrm for TextFrms only." ); - SwFrm* pFrm = aIter.First(); - if ( pFrm ) + SwIterator<SwFlyFrame,SwFormat> aIter( *GetFlyCnt().pFormat ); + OSL_ENSURE( pCurrFrame->IsTextFrame(), "SwTextFlyCnt::_GetFlyFrame for TextFrames only." ); + SwFrame* pFrame = aIter.First(); + if ( pFrame ) { - SwTextFrm *pFirst = const_cast<SwTextFrm*>(static_cast<const SwTextFrm*>(pCurrFrm)); + SwTextFrame *pFirst = const_cast<SwTextFrame*>(static_cast<const SwTextFrame*>(pCurrFrame)); while ( pFirst->IsFollow() ) pFirst = pFirst->FindMaster(); do { - SwTextFrm *pTmp = pFirst; + SwTextFrame *pTmp = pFirst; do - { if( static_cast<SwFlyFrm*>(pFrm)->GetAnchorFrm() == static_cast<SwFrm*>(pTmp) ) + { if( static_cast<SwFlyFrame*>(pFrame)->GetAnchorFrame() == static_cast<SwFrame*>(pTmp) ) { - if ( pTmp != pCurrFrm ) + if ( pTmp != pCurrFrame ) { - pTmp->RemoveFly( static_cast<SwFlyFrm*>(pFrm) ); - const_cast<SwTextFrm*>(static_cast<const SwTextFrm*>(pCurrFrm))->AppendFly( static_cast<SwFlyFrm*>(pFrm) ); + pTmp->RemoveFly( static_cast<SwFlyFrame*>(pFrame) ); + const_cast<SwTextFrame*>(static_cast<const SwTextFrame*>(pCurrFrame))->AppendFly( static_cast<SwFlyFrame*>(pFrame) ); } - return static_cast<SwFlyInCntFrm*>(pFrm); + return static_cast<SwFlyInContentFrame*>(pFrame); } pTmp = pTmp->GetFollow(); } while ( pTmp ); - pFrm = aIter.Next(); + pFrame = aIter.Next(); - } while( pFrm ); + } while( pFrame ); } - // Wir haben keinen passenden FlyFrm gefunden, deswegen wird ein + // Wir haben keinen passenden FlyFrame gefunden, deswegen wird ein // neuer angelegt. - // Dabei wird eine sofortige Neuformatierung von pCurrFrm angestossen. - // Die Rekursion wird durch den Lockmechanismus in SwTextFrm::Format() + // Dabei wird eine sofortige Neuformatierung von pCurrFrame angestossen. + // Die Rekursion wird durch den Lockmechanismus in SwTextFrame::Format() // abgewuergt. - SwFrm* pCurrentFrame = const_cast<SwFrm*>(pCurrFrm); - SwFlyInCntFrm *pFly = new SwFlyInCntFrm(static_cast<SwFlyFrameFormat*>(pFrameFormat), pCurrentFrame, pCurrentFrame); + SwFrame* pCurrentFrame = const_cast<SwFrame*>(pCurrFrame); + SwFlyInContentFrame *pFly = new SwFlyInContentFrame(static_cast<SwFlyFrameFormat*>(pFrameFormat), pCurrentFrame, pCurrentFrame); pCurrentFrame->AppendFly(pFly); pFly->RegistFlys(); @@ -264,8 +264,8 @@ SwFlyInCntFrm *SwTextFlyCnt::_GetFlyFrm( const SwFrm *pCurrFrm ) // nach seiner Konstruktion stramm durchformatiert wird. // #i26945# - Use new object formatter to format Writer // fly frame and its content. - SwObjectFormatter::FormatObj( *pFly, const_cast<SwFrm*>(pCurrFrm), - pCurrFrm->FindPageFrm() ); + SwObjectFormatter::FormatObj( *pFly, const_cast<SwFrame*>(pCurrFrame), + pCurrFrame->FindPageFrame() ); return pFly; } diff --git a/sw/source/core/txtnode/atrftn.cxx b/sw/source/core/txtnode/atrftn.cxx index 9f74feb41b73..3bbf8720c5aa 100644 --- a/sw/source/core/txtnode/atrftn.cxx +++ b/sw/source/core/txtnode/atrftn.cxx @@ -165,7 +165,7 @@ void SwFormatFootnote::SetEndNote( bool b ) { if ( GetTextFootnote() ) { - GetTextFootnote()->DelFrms(nullptr); + GetTextFootnote()->DelFrames(nullptr); } m_bEndNote = b; } @@ -307,9 +307,9 @@ void SwTextFootnote::SetStartNode( const SwNodeIndex *pNewNode, bool bDelNode ) } else // Werden die Nodes nicht geloescht mussen sie bei den Seiten - // abmeldet (Frms loeschen) werden, denn sonst bleiben sie + // abmeldet (Frames loeschen) werden, denn sonst bleiben sie // stehen (Undo loescht sie nicht!) - DelFrms( nullptr ); + DelFrames( nullptr ); } DELETEZ( m_pStartNode ); @@ -431,58 +431,58 @@ void SwTextFootnote::MakeNewTextSection( SwNodes& rNodes ) m_pStartNode = new SwNodeIndex( *pSttNd ); } -void SwTextFootnote::DelFrms( const SwFrm* pSib ) +void SwTextFootnote::DelFrames( const SwFrame* pSib ) { // delete the FootnoteFrames from the pages OSL_ENSURE( m_pTextNode, "SwTextFootnote: where is my TextNode?" ); if ( !m_pTextNode ) return; - const SwRootFrm* pRoot = pSib ? pSib->getRootFrm() : nullptr; - bool bFrmFnd = false; + const SwRootFrame* pRoot = pSib ? pSib->getRootFrame() : nullptr; + bool bFrameFnd = false; { - SwIterator<SwContentFrm,SwTextNode> aIter( *m_pTextNode ); - for( SwContentFrm* pFnd = aIter.First(); pFnd; pFnd = aIter.Next() ) + SwIterator<SwContentFrame,SwTextNode> aIter( *m_pTextNode ); + for( SwContentFrame* pFnd = aIter.First(); pFnd; pFnd = aIter.Next() ) { - if( pRoot != pFnd->getRootFrm() && pRoot ) + if( pRoot != pFnd->getRootFrame() && pRoot ) continue; - SwPageFrm* pPage = pFnd->FindPageFrm(); + SwPageFrame* pPage = pFnd->FindPageFrame(); if( pPage ) { pPage->RemoveFootnote( pFnd, this ); - bFrmFnd = true; + bFrameFnd = true; } } } //JP 13.05.97: falls das Layout vorm loeschen der Fussnoten entfernt // wird, sollte man das ueber die Fussnote selbst tun - if ( !bFrmFnd && m_pStartNode ) + if ( !bFrameFnd && m_pStartNode ) { SwNodeIndex aIdx( *m_pStartNode ); SwContentNode* pCNd = m_pTextNode->GetNodes().GoNext( &aIdx ); if( pCNd ) { - SwIterator<SwContentFrm,SwContentNode> aIter( *pCNd ); - for( SwContentFrm* pFnd = aIter.First(); pFnd; pFnd = aIter.Next() ) + SwIterator<SwContentFrame,SwContentNode> aIter( *pCNd ); + for( SwContentFrame* pFnd = aIter.First(); pFnd; pFnd = aIter.Next() ) { - if( pRoot != pFnd->getRootFrm() && pRoot ) + if( pRoot != pFnd->getRootFrame() && pRoot ) continue; - SwPageFrm* pPage = pFnd->FindPageFrm(); + SwPageFrame* pPage = pFnd->FindPageFrame(); - SwFrm *pFrm = pFnd->GetUpper(); - while ( pFrm && !pFrm->IsFootnoteFrm() ) - pFrm = pFrm->GetUpper(); + SwFrame *pFrame = pFnd->GetUpper(); + while ( pFrame && !pFrame->IsFootnoteFrame() ) + pFrame = pFrame->GetUpper(); - SwFootnoteFrm *pFootnote = static_cast<SwFootnoteFrm*>(pFrm); + SwFootnoteFrame *pFootnote = static_cast<SwFootnoteFrame*>(pFrame); while ( pFootnote && pFootnote->GetMaster() ) pFootnote = pFootnote->GetMaster(); OSL_ENSURE( pFootnote->GetAttr() == this, "Footnote mismatch error." ); while ( pFootnote ) { - SwFootnoteFrm *pFoll = pFootnote->GetFollow(); + SwFootnoteFrame *pFoll = pFootnote->GetFollow(); pFootnote->Cut(); - SwFrm::DestroyFrm(pFootnote); + SwFrame::DestroyFrame(pFootnote); pFootnote = pFoll; } diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx index d1d94e8f3d79..f8189328cff6 100644 --- a/sw/source/core/txtnode/fntcache.cxx +++ b/sw/source/core/txtnode/fntcache.cxx @@ -254,14 +254,14 @@ static void lcl_calcLinePos( const CalcLinePosData &rData, if ( rData.bSwitchL2R ) { - rData.rInf.GetFrm()->SwitchLTRtoRTL( rStart ); - rData.rInf.GetFrm()->SwitchLTRtoRTL( rEnd ); + rData.rInf.GetFrame()->SwitchLTRtoRTL( rStart ); + rData.rInf.GetFrame()->SwitchLTRtoRTL( rEnd ); } if ( rData.bSwitchH2V ) { - rData.rInf.GetFrm()->SwitchHorizontalToVertical( rStart ); - rData.rInf.GetFrm()->SwitchHorizontalToVertical( rEnd ); + rData.rInf.GetFrame()->SwitchHorizontalToVertical( rStart ); + rData.rInf.GetFrame()->SwitchHorizontalToVertical( rEnd ); } } @@ -872,9 +872,9 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf ) // HACK: UNDERLINE_WAVE must not be abused any more, hence the grey wave // line of the ExtendedAttributeSets will appear in the font color first - const bool bSwitchH2V = rInf.GetFrm() && rInf.GetFrm()->IsVertical(); - const bool bSwitchL2R = rInf.GetFrm() && rInf.GetFrm()->IsRightToLeft() && - ! rInf.IsIgnoreFrmRTL(); + const bool bSwitchH2V = rInf.GetFrame() && rInf.GetFrame()->IsVertical(); + const bool bSwitchL2R = rInf.GetFrame() && rInf.GetFrame()->IsRightToLeft() && + ! rInf.IsIgnoreFrameRTL(); const ComplexTextLayoutMode nMode = rInf.GetOut().GetLayoutMode(); const bool bBidiPor = ( bSwitchL2R != ( TEXT_LAYOUT_DEFAULT != ( TEXT_LAYOUT_BIDI_RTL & nMode ) ) ); @@ -897,7 +897,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf ) nPixWidth = rInf.GetOut().PixelToLogic( aTmp ).Width(); } - aTextOriginPos.X() += rInf.GetFrm()->IsRightToLeft() ? 0 : nPixWidth; + aTextOriginPos.X() += rInf.GetFrame()->IsRightToLeft() ? 0 : nPixWidth; } Color aOldColor( pTmpFont->GetColor() ); @@ -912,10 +912,10 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf ) // ASIAN LINE AND CHARACTER GRID MODE START - if ( rInf.GetFrm() && rInf.SnapToGrid() && rInf.GetFont() && + if ( rInf.GetFrame() && rInf.SnapToGrid() && rInf.GetFont() && SW_CJK == rInf.GetFont()->GetActual() ) { - SwTextGridItem const*const pGrid(GetGridItem(rInf.GetFrm()->FindPageFrm())); + SwTextGridItem const*const pGrid(GetGridItem(rInf.GetFrame()->FindPageFrame())); // ASIAN LINE AND CHARACTER GRID MODE: Do we want to snap asian characters to the grid? if ( pGrid && GRID_LINES_CHARS == pGrid->GetGridType() && pGrid->IsSnapToChars()) @@ -1012,7 +1012,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf ) aTextOriginPos.X() + rInf.GetPos().X() ; if ( bSwitchH2V ) - rInf.GetFrm()->SwitchHorizontalToVertical( aTextOriginPos ); + rInf.GetFrame()->SwitchHorizontalToVertical( aTextOriginPos ); rInf.GetOut().DrawTextArray( aTextOriginPos, rInf.GetText(), pKernArray, rInf.GetIdx(), rInf.GetLen() ); @@ -1025,10 +1025,10 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf ) // For text grid refactor // ASIAN LINE AND CHARACTER GRID MODE START: not snap to characters - if ( rInf.GetFrm() && rInf.SnapToGrid() && rInf.GetFont() && + if ( rInf.GetFrame() && rInf.SnapToGrid() && rInf.GetFont() && SW_CJK == rInf.GetFont()->GetActual() ) { - SwTextGridItem const*const pGrid(GetGridItem(rInf.GetFrm()->FindPageFrm())); + SwTextGridItem const*const pGrid(GetGridItem(rInf.GetFrame()->FindPageFrame())); // ASIAN LINE AND CHARACTER GRID MODE - do not snap to characters if ( pGrid && GRID_LINES_CHARS == pGrid->GetGridType() && !pGrid->IsSnapToChars() ) @@ -1044,7 +1044,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf ) rInf.GetOut().GetTextArray( rInf.GetText(), pKernArray, rInf.GetIdx(), rInf.GetLen() ); if ( bSwitchH2V ) - rInf.GetFrm()->SwitchHorizontalToVertical( aTextOriginPos ); + rInf.GetFrame()->SwitchHorizontalToVertical( aTextOriginPos ); if ( rInf.GetSpace() || rInf.GetKanaComp()) { long nSpaceAdd = rInf.GetSpace() / SPACING_PRECISION_FACTOR; @@ -1169,10 +1169,10 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf ) && ( aTmp != rInf.GetOut().GetMapMode().GetScaleX() ); if ( bSwitchL2R ) - rInf.GetFrm()->SwitchLTRtoRTL( aTextOriginPos ); + rInf.GetFrame()->SwitchLTRtoRTL( aTextOriginPos ); if ( bSwitchH2V ) - rInf.GetFrm()->SwitchHorizontalToVertical( aTextOriginPos ); + rInf.GetFrame()->SwitchHorizontalToVertical( aTextOriginPos ); // In the good old days we used to have a simple DrawText if the // output device is the printer. Now we need a DrawTextArray if @@ -1559,10 +1559,10 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf ) ( rInf.GetSpace() / SPACING_PRECISION_FACTOR ); if ( bSwitchL2R ) - rInf.GetFrm()->SwitchLTRtoRTL( aTextOriginPos ); + rInf.GetFrame()->SwitchLTRtoRTL( aTextOriginPos ); if ( bSwitchH2V ) - rInf.GetFrm()->SwitchHorizontalToVertical( aTextOriginPos ); + rInf.GetFrame()->SwitchHorizontalToVertical( aTextOriginPos ); #if defined(MACOSX) || defined(IOS) rInf.GetOut().DrawTextArray( aTextOriginPos, rInf.GetText(), @@ -1701,14 +1701,14 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf ) if ( bSwitchL2R ) { - rInf.GetFrm()->SwitchLTRtoRTL( aCurrPos ); - rInf.GetFrm()->SwitchLTRtoRTL( aEnd ); + rInf.GetFrame()->SwitchLTRtoRTL( aCurrPos ); + rInf.GetFrame()->SwitchLTRtoRTL( aEnd ); } if ( bSwitchH2V ) { - rInf.GetFrm()->SwitchHorizontalToVertical( aCurrPos ); - rInf.GetFrm()->SwitchHorizontalToVertical( aEnd ); + rInf.GetFrame()->SwitchHorizontalToVertical( aCurrPos ); + rInf.GetFrame()->SwitchHorizontalToVertical( aEnd ); } rInf.GetOut().DrawWaveLine( aCurrPos, aEnd ); @@ -1749,10 +1749,10 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf ) { if ( bSwitchL2R ) - rInf.GetFrm()->SwitchLTRtoRTL( aTextOriginPos ); + rInf.GetFrame()->SwitchLTRtoRTL( aTextOriginPos ); if ( bSwitchH2V ) - rInf.GetFrm()->SwitchHorizontalToVertical( aTextOriginPos ); + rInf.GetFrame()->SwitchHorizontalToVertical( aTextOriginPos ); #if defined(MACOSX) || defined(IOS) rInf.GetOut().DrawTextArray( aTextOriginPos, *pStr, pKernArray + nOffs, @@ -1811,10 +1811,10 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf ) pPrinter->SetDigitLanguage( rInf.GetOut().GetDigitLanguage() ); } - if ( rInf.GetFrm() && nLn && rInf.SnapToGrid() && rInf.GetFont() && + if ( rInf.GetFrame() && nLn && rInf.SnapToGrid() && rInf.GetFont() && SW_CJK == rInf.GetFont()->GetActual() ) { - SwTextGridItem const*const pGrid(GetGridItem(rInf.GetFrm()->FindPageFrm())); + SwTextGridItem const*const pGrid(GetGridItem(rInf.GetFrame()->FindPageFrame())); if ( pGrid && GRID_LINES_CHARS == pGrid->GetGridType() && pGrid->IsSnapToChars() ) { const SwDoc* pDoc = rInf.GetShell()->GetDoc(); @@ -1853,10 +1853,10 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf ) } //for textgrid refactor - if ( rInf.GetFrm() && nLn && rInf.SnapToGrid() && rInf.GetFont() && + if ( rInf.GetFrame() && nLn && rInf.SnapToGrid() && rInf.GetFont() && SW_CJK == rInf.GetFont()->GetActual() ) { - SwTextGridItem const*const pGrid(GetGridItem(rInf.GetFrm()->FindPageFrm())); + SwTextGridItem const*const pGrid(GetGridItem(rInf.GetFrame()->FindPageFrame())); if ( pGrid && GRID_LINES_CHARS == pGrid->GetGridType() && !pGrid->IsSnapToChars() ) { const long nGridWidthAdd = EvalGridWidthAdd( pGrid, rInf ); @@ -1998,7 +1998,7 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf ) return aTextSize; } -sal_Int32 SwFntObj::GetCrsrOfst( SwDrawTextInfo &rInf ) +sal_Int32 SwFntObj::GetCursorOfst( SwDrawTextInfo &rInf ) { long nSpaceAdd = rInf.GetSpace() / SPACING_PRECISION_FACTOR; const long nSperren = -rInf.GetSperren() / SPACING_PRECISION_FACTOR; @@ -2092,10 +2092,10 @@ sal_Int32 SwFntObj::GetCrsrOfst( SwDrawTextInfo &rInf ) long nSpaceSum = 0; long nKernSum = 0; - if ( rInf.GetFrm() && rInf.GetLen() && rInf.SnapToGrid() && + if ( rInf.GetFrame() && rInf.GetLen() && rInf.SnapToGrid() && rInf.GetFont() && SW_CJK == rInf.GetFont()->GetActual() ) { - SwTextGridItem const*const pGrid(GetGridItem(rInf.GetFrm()->FindPageFrm())); + SwTextGridItem const*const pGrid(GetGridItem(rInf.GetFrame()->FindPageFrame())); if ( pGrid && GRID_LINES_CHARS == pGrid->GetGridType() && pGrid->IsSnapToChars() ) { const SwDoc* pDoc = rInf.GetShell()->GetDoc(); @@ -2119,10 +2119,10 @@ sal_Int32 SwFntObj::GetCrsrOfst( SwDrawTextInfo &rInf ) } //for textgrid refactor - if ( rInf.GetFrm() && rInf.GetLen() && rInf.SnapToGrid() && + if ( rInf.GetFrame() && rInf.GetLen() && rInf.SnapToGrid() && rInf.GetFont() && SW_CJK == rInf.GetFont()->GetActual() ) { - SwTextGridItem const*const pGrid(GetGridItem(rInf.GetFrm()->FindPageFrm())); + SwTextGridItem const*const pGrid(GetGridItem(rInf.GetFrame()->FindPageFrame())); if ( pGrid && GRID_LINES_CHARS == pGrid->GetGridType() && !pGrid->IsSnapToChars() ) { @@ -2328,10 +2328,10 @@ sal_Int32 SwFont::GetTextBreak( SwDrawTextInfo& rInf, long nTextWidth ) sal_Int32 nLn = rInf.GetLen() == COMPLETE_STRING ? rInf.GetText().getLength() : rInf.GetLen(); - if ( rInf.GetFrm() && nLn && rInf.SnapToGrid() && + if ( rInf.GetFrame() && nLn && rInf.SnapToGrid() && rInf.GetFont() && SW_CJK == rInf.GetFont()->GetActual() ) { - SwTextGridItem const*const pGrid(GetGridItem(rInf.GetFrm()->FindPageFrm())); + SwTextGridItem const*const pGrid(GetGridItem(rInf.GetFrame()->FindPageFrame())); if ( pGrid && GRID_LINES_CHARS == pGrid->GetGridType() && pGrid->IsSnapToChars() ) { const SwDoc* pDoc = rInf.GetShell()->GetDoc(); @@ -2362,10 +2362,10 @@ sal_Int32 SwFont::GetTextBreak( SwDrawTextInfo& rInf, long nTextWidth ) } //for text grid enhancement - if ( rInf.GetFrm() && nLn && rInf.SnapToGrid() && rInf.GetFont() && + if ( rInf.GetFrame() && nLn && rInf.SnapToGrid() && rInf.GetFont() && SW_CJK == rInf.GetFont()->GetActual() ) { - SwTextGridItem const*const pGrid(GetGridItem(rInf.GetFrm()->FindPageFrm())); + SwTextGridItem const*const pGrid(GetGridItem(rInf.GetFrame()->FindPageFrame())); if ( pGrid && GRID_LINES_CHARS == pGrid->GetGridType() && !pGrid->IsSnapToChars() ) { const long nGridWidthAdd = EvalGridWidthAdd( pGrid, rInf ); @@ -2545,7 +2545,7 @@ bool SwDrawTextInfo::ApplyAutoColor( vcl::Font* pFont ) /// OD 21.08.2002 #99657# /// There is a user defined setting for the background, if there /// is a background brush and its color is *not* "no fill"/"auto fill". - if( GetFrm()->GetBackgroundBrush( aFillAttributes, pItem, pCol, aOrigBackRect, false ) ) + if( GetFrame()->GetBackgroundBrush( aFillAttributes, pItem, pCol, aOrigBackRect, false ) ) { if (aFillAttributes.get() && aFillAttributes->isUsed()) { diff --git a/sw/source/core/txtnode/fntcap.cxx b/sw/source/core/txtnode/fntcap.cxx index aabaeedd4b7a..55853b6bf5f3 100644 --- a/sw/source/core/txtnode/fntcap.cxx +++ b/sw/source/core/txtnode/fntcap.cxx @@ -276,11 +276,11 @@ void SwDoDrawCapital::DrawSpace( Point &rPos ) long nDiff = rInf.GetPos().X() - rPos.X(); Point aPos( rPos ); - const bool bSwitchL2R = rInf.GetFrm()->IsRightToLeft() && - ! rInf.IsIgnoreFrmRTL(); + const bool bSwitchL2R = rInf.GetFrame()->IsRightToLeft() && + ! rInf.IsIgnoreFrameRTL(); if ( bSwitchL2R ) - rInf.GetFrm()->SwitchLTRtoRTL( aPos ); + rInf.GetFrame()->SwitchLTRtoRTL( aPos ); const ComplexTextLayoutMode nMode = rInf.GetpOut()->GetLayoutMode(); const bool bBidiPor = ( bSwitchL2R != @@ -289,8 +289,8 @@ void SwDoDrawCapital::DrawSpace( Point &rPos ) if ( bBidiPor ) nDiff = -nDiff; - if ( rInf.GetFrm()->IsVertical() ) - rInf.GetFrm()->SwitchHorizontalToVertical( aPos ); + if ( rInf.GetFrame()->IsVertical() ) + rInf.GetFrame()->SwitchHorizontalToVertical( aPos ); if ( nDiff ) { @@ -312,38 +312,38 @@ void SwSubFont::DrawCapital( SwDrawTextInfo &rInf ) DoOnCapitals( aDo ); } -class SwDoCapitalCrsrOfst : public SwDoCapitals +class SwDoCapitalCursorOfst : public SwDoCapitals { protected: SwFntObj *pUpperFnt; SwFntObj *pLowerFnt; - sal_Int32 nCrsr; + sal_Int32 nCursor; sal_uInt16 nOfst; public: - SwDoCapitalCrsrOfst( SwDrawTextInfo &rInfo, const sal_uInt16 nOfs ) : - SwDoCapitals( rInfo ), pUpperFnt(nullptr), pLowerFnt(nullptr), nCrsr( 0 ), nOfst( nOfs ) + SwDoCapitalCursorOfst( SwDrawTextInfo &rInfo, const sal_uInt16 nOfs ) : + SwDoCapitals( rInfo ), pUpperFnt(nullptr), pLowerFnt(nullptr), nCursor( 0 ), nOfst( nOfs ) { } - virtual ~SwDoCapitalCrsrOfst() {} + virtual ~SwDoCapitalCursorOfst() {} virtual void Init( SwFntObj *pUpperFont, SwFntObj *pLowerFont ) override; virtual void Do() override; - inline sal_Int32 GetCrsr(){ return nCrsr; } + inline sal_Int32 GetCursor(){ return nCursor; } }; -void SwDoCapitalCrsrOfst::Init( SwFntObj *pUpperFont, SwFntObj *pLowerFont ) +void SwDoCapitalCursorOfst::Init( SwFntObj *pUpperFont, SwFntObj *pLowerFont ) { pUpperFnt = pUpperFont; pLowerFnt = pLowerFont; } -void SwDoCapitalCrsrOfst::Do() +void SwDoCapitalCursorOfst::Do() { if ( nOfst ) { if ( static_cast<long>(nOfst) > rInf.GetSize().Width() ) { nOfst -= rInf.GetSize().Width(); - nCrsr = nCrsr + rInf.GetLen(); + nCursor = nCursor + rInf.GetLen(); } else { @@ -355,35 +355,35 @@ void SwDoCapitalCrsrOfst::Do() aDrawInf.SetOfst( nOfst ); aDrawInf.SetKern( rInf.GetKern() ); aDrawInf.SetKanaComp( rInf.GetKanaComp() ); - aDrawInf.SetFrm( rInf.GetFrm() ); + aDrawInf.SetFrame( rInf.GetFrame() ); aDrawInf.SetFont( rInf.GetFont() ); if ( rInf.GetUpper() ) { aDrawInf.SetSpace( 0 ); - nCrsr = nCrsr + pUpperFnt->GetCrsrOfst( aDrawInf ); + nCursor = nCursor + pUpperFnt->GetCursorOfst( aDrawInf ); } else { aDrawInf.SetSpace( rInf.GetSpace() ); - nCrsr = nCrsr + pLowerFnt->GetCrsrOfst( aDrawInf ); + nCursor = nCursor + pLowerFnt->GetCursorOfst( aDrawInf ); } nOfst = 0; } } } -sal_Int32 SwSubFont::GetCapitalCrsrOfst( SwDrawTextInfo& rInf ) +sal_Int32 SwSubFont::GetCapitalCursorOfst( SwDrawTextInfo& rInf ) { const long nOldKern = rInf.GetKern(); rInf.SetKern( CheckKerning() ); - SwDoCapitalCrsrOfst aDo( rInf, rInf.GetOfst() ); + SwDoCapitalCursorOfst aDo( rInf, rInf.GetOfst() ); Point aPos; rInf.SetPos( aPos ); rInf.SetDrawSpace( false ); DoOnCapitals( aDo ); rInf.SetKern( nOldKern ); - return aDo.GetCrsr(); + return aDo.GetCursor(); } class SwDoDrawStretchCapital : public SwDoDrawCapital @@ -425,14 +425,14 @@ void SwDoDrawStretchCapital::Do() rInf.ApplyAutoColor(); Point aPos( rInf.GetPos() ); - const bool bSwitchL2R = rInf.GetFrm()->IsRightToLeft() && - ! rInf.IsIgnoreFrmRTL(); + const bool bSwitchL2R = rInf.GetFrame()->IsRightToLeft() && + ! rInf.IsIgnoreFrameRTL(); if ( bSwitchL2R ) - rInf.GetFrm()->SwitchLTRtoRTL( aPos ); + rInf.GetFrame()->SwitchLTRtoRTL( aPos ); - if ( rInf.GetFrm()->IsVertical() ) - rInf.GetFrm()->SwitchHorizontalToVertical( aPos ); + if ( rInf.GetFrame()->IsVertical() ) + rInf.GetFrame()->SwitchHorizontalToVertical( aPos ); // Optimierung: if( 1 >= rInf.GetLen() ) diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index 2d6bcd82a771..85a83660f4b5 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -103,7 +103,7 @@ typedef std::vector<SwTextAttr*> SwpHts; pNd->GetpSwpHints()->Check(true); } #define CHECK_SWPHINTS_IF_FRM(pNd) { if( pNd->GetpSwpHints() && \ !pNd->GetDoc()->IsInReading() ) \ - pNd->GetpSwpHints()->Check(getLayoutFrm(nullptr, nullptr, nullptr, false) != nullptr); } + pNd->GetpSwpHints()->Check(getLayoutFrame(nullptr, nullptr, nullptr, false) != nullptr); } #else #define CHECK_SWPHINTS(pNd) #define CHECK_SWPHINTS_IF_FRM(pNd) @@ -123,7 +123,7 @@ SwTextNode *SwNodes::MakeTextNode( const SwNodeIndex & rWhere, if ( IsDocNodes() ) UpdateOutlineNode(*pNode); - // if there is no layout or it is in a hidden section, MakeFrms is not needed + // if there is no layout or it is in a hidden section, MakeFrames is not needed const SwSectionNode* pSectNd; if( !GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell() || ( nullptr != (pSectNd = pNode->FindSectionNode()) && @@ -140,7 +140,7 @@ SwTextNode *SwNodes::MakeTextNode( const SwNodeIndex & rWhere, switch (pNd->GetNodeType()) { case ND_TABLENODE: - static_cast<SwTableNode*>(pNd)->MakeFrms( aIdx ); + static_cast<SwTableNode*>(pNd)->MakeFrames( aIdx ); return pNode; case ND_SECTIONNODE: @@ -148,19 +148,19 @@ SwTextNode *SwNodes::MakeTextNode( const SwNodeIndex & rWhere, static_cast<SwSectionNode*>(pNd)->IsContentHidden() ) { SwNodeIndex aTmpIdx( *pNode ); - pNd = FindPrvNxtFrmNode( aTmpIdx, pNode ); + pNd = FindPrvNxtFrameNode( aTmpIdx, pNode ); if( !pNd ) return pNode; aTmp = *pNd; break; } - static_cast<SwSectionNode*>(pNd)->MakeFrms( aIdx ); + static_cast<SwSectionNode*>(pNd)->MakeFrames( aIdx ); return pNode; case ND_TEXTNODE: case ND_GRFNODE: case ND_OLENODE: - static_cast<SwContentNode*>(pNd)->MakeFrms( *pNode ); + static_cast<SwContentNode*>(pNd)->MakeFrames( *pNode ); return pNode; case ND_ENDNODE: @@ -270,7 +270,7 @@ SwTextNode::~SwTextNode() if (HasWriterListeners()) { - DelFrms_TextNodePart(); + DelFrames_TextNodePart(); } } @@ -282,13 +282,13 @@ void SwTextNode::FileLoadedInitHints() } } -SwContentFrm *SwTextNode::MakeFrm( SwFrm* pSib ) +SwContentFrame *SwTextNode::MakeFrame( SwFrame* pSib ) { // fdo#52028: ODF file import does not result in MergePortions being called // for every attribute, since that would be inefficient. So call it here. FileLoadedInitHints(); - SwContentFrm *pFrm = new SwTextFrm( this, pSib ); - return pFrm; + SwContentFrame *pFrame = new SwTextFrame( this, pSib ); + return pFrame; } sal_Int32 SwTextNode::Len() const @@ -302,20 +302,20 @@ static void lcl_ChangeFootnoteRef( SwTextNode &rNode ) SwpHints *pSwpHints = rNode.GetpSwpHints(); if( pSwpHints && rNode.GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell() ) { - SwContentFrm* pFrm = nullptr; + SwContentFrame* pFrame = nullptr; // OD 07.11.2002 #104840# - local variable to remember first footnote // of node <rNode> in order to invalidate position of its first content. // Thus, in its <MakeAll()> it will checked its position relative to its reference. - SwFootnoteFrm* pFirstFootnoteOfNode = nullptr; + SwFootnoteFrame* pFirstFootnoteOfNode = nullptr; for( size_t j = pSwpHints->Count(); j; ) { SwTextAttr* pHt = pSwpHints->Get(--j); if (RES_TXTATR_FTN == pHt->Which()) { - if( !pFrm ) + if( !pFrame ) { - pFrm = SwIterator<SwContentFrm,SwTextNode>(rNode).First(); - if (!pFrm) + pFrame = SwIterator<SwContentFrame,SwTextNode>(rNode).First(); + if (!pFrame) return; } SwTextFootnote *pAttr = static_cast<SwTextFootnote*>(pHt); @@ -323,18 +323,18 @@ static void lcl_ChangeFootnoteRef( SwTextNode &rNode ) SwNodeIndex aIdx( *pAttr->GetStartNode(), 1 ); SwContentNode *pNd = aIdx.GetNode().GetContentNode(); if ( !pNd ) - pNd = pFrm->GetAttrSet()->GetDoc()-> + pNd = pFrame->GetAttrSet()->GetDoc()-> GetNodes().GoNextSection( &aIdx, true, false ); if ( !pNd ) continue; - SwIterator<SwContentFrm,SwContentNode> aIter( *pNd ); - SwContentFrm* pContent = aIter.First(); + SwIterator<SwContentFrame,SwContentNode> aIter( *pNd ); + SwContentFrame* pContent = aIter.First(); if( pContent ) { - OSL_ENSURE( pContent->getRootFrm() == pFrm->getRootFrm(), + OSL_ENSURE( pContent->getRootFrame() == pFrame->getRootFrame(), "lcl_ChangeFootnoteRef: Layout double?" ); - SwFootnoteFrm *pFootnote = pContent->FindFootnoteFrm(); + SwFootnoteFrame *pFootnote = pContent->FindFootnoteFrame(); if( pFootnote && pFootnote->GetAttr() == pAttr ) { while( pFootnote->GetMaster() ) @@ -343,16 +343,16 @@ static void lcl_ChangeFootnoteRef( SwTextNode &rNode ) pFirstFootnoteOfNode = pFootnote; while ( pFootnote ) { - pFootnote->SetRef( pFrm ); + pFootnote->SetRef( pFrame ); pFootnote = pFootnote->GetFollow(); - static_cast<SwTextFrm*>(pFrm)->SetFootnote( true ); + static_cast<SwTextFrame*>(pFrame)->SetFootnote( true ); } } #if OSL_DEBUG_LEVEL > 0 while( nullptr != (pContent = aIter.Next()) ) { - SwFootnoteFrm *pDbgFootnote = pContent->FindFootnoteFrm(); - OSL_ENSURE( !pDbgFootnote || pDbgFootnote->GetRef() == pFrm, + SwFootnoteFrame *pDbgFootnote = pContent->FindFootnoteFrame(); + OSL_ENSURE( !pDbgFootnote || pDbgFootnote->GetRef() == pFrame, "lcl_ChangeFootnoteRef: Who's that guy?" ); } #endif @@ -362,7 +362,7 @@ static void lcl_ChangeFootnoteRef( SwTextNode &rNode ) // #104840# - invalidate if ( pFirstFootnoteOfNode ) { - SwContentFrm* pContent = pFirstFootnoteOfNode->ContainsContent(); + SwContentFrame* pContent = pFirstFootnoteOfNode->ContainsContent(); if ( pContent ) { pContent->_InvalidatePos(); @@ -465,7 +465,7 @@ SwContentNode *SwTextNode::SplitContentNode( const SwPosition &rPos ) SwTextAttr* const pHt = m_pSwpHints->Get( --j ); if ( RES_TXTATR_FLYCNT == pHt ->Which() ) { - pHt->GetFlyCnt().GetFrameFormat()->DelFrms(); + pHt->GetFlyCnt().GetFrameFormat()->DelFrames(); } else if ( pHt->DontExpand() ) { @@ -482,17 +482,17 @@ SwContentNode *SwTextNode::SplitContentNode( const SwPosition &rPos ) } - SwIterator<SwContentFrm,SwTextNode> aIter( *this ); - for( SwContentFrm* pFrm = aIter.First(); pFrm; pFrm = aIter.Next() ) + SwIterator<SwContentFrame,SwTextNode> aIter( *this ); + for( SwContentFrame* pFrame = aIter.First(); pFrame; pFrame = aIter.Next() ) { - pFrm->RegisterToNode( *pNode ); - if( pFrm->IsTextFrm() && !pFrm->IsFollow() && static_cast<SwTextFrm*>(pFrm)->GetOfst() ) - static_cast<SwTextFrm*>(pFrm)->SetOfst( 0 ); + pFrame->RegisterToNode( *pNode ); + if( pFrame->IsTextFrame() && !pFrame->IsFollow() && static_cast<SwTextFrame*>(pFrame)->GetOfst() ) + static_cast<SwTextFrame*>(pFrame)->SetOfst( 0 ); } if ( IsInCache() ) { - SwFrm::GetCache().Delete( this ); + SwFrame::GetCache().Delete( this ); SetInCache( false ); } @@ -501,10 +501,10 @@ SwContentNode *SwTextNode::SplitContentNode( const SwPosition &rPos ) // If there is an accessible layout we must call modify even // with length zero, because we have to notify about the changed // text node. - const SwRootFrm *pRootFrm; + const SwRootFrame *pRootFrame; if ( (nTextLen != nSplitPos) || - ( (pRootFrm = pNode->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout()) != nullptr && - pRootFrm->IsAnyShellAccessible() ) ) + ( (pRootFrame = pNode->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout()) != nullptr && + pRootFrame->IsAnyShellAccessible() ) ) { // dann sage den Frames noch, das am Ende etwas "geloescht" wurde if( 1 == nTextLen - nSplitPos ) @@ -522,7 +522,7 @@ SwContentNode *SwTextNode::SplitContentNode( const SwPosition &rPos ) { MoveTextAttr_To_AttrSet(); } - pNode->MakeFrms( *this ); // neue Frames anlegen. + pNode->MakeFrames( *this ); // neue Frames anlegen. lcl_ChangeFootnoteRef( *this ); } else @@ -582,7 +582,7 @@ SwContentNode *SwTextNode::SplitContentNode( const SwPosition &rPos ) if ( HasWriterListeners() ) { - MakeFrms( *pNode ); // neue Frames anlegen. + MakeFrames( *pNode ); // neue Frames anlegen. } lcl_ChangeFootnoteRef( *pNode ); } @@ -709,7 +709,7 @@ SwContentNode *SwTextNode::JoinNext() if( pTextNode->HasAnyIndex() ) { - // alle Crsr/StkCrsr/UnoCrsr aus dem Loeschbereich verschieben + // alle Cursor/StackCursor/UnoCursor aus dem Loeschbereich verschieben pDoc->CorrAbs( aIdx, SwPosition( *this ), nOldLen, true ); } rNds.Delete(aIdx); @@ -803,7 +803,7 @@ SwContentNode *SwTextNode::JoinPrev() if( pTextNode->HasAnyIndex() ) { - // alle Crsr/StkCrsr/UnoCrsr aus dem Loeschbereich verschieben + // alle Cursor/StackCursor/UnoCursor aus dem Loeschbereich verschieben pDoc->CorrAbs( aIdx, SwPosition( *this ), nLen, true ); } rNds.Delete(aIdx); @@ -1182,8 +1182,8 @@ void SwTextNode::Update( //Any drawing objects anchored into this text node may be sorted by their //anchor position which may have changed here, so resort them - SwContentFrm* pContentFrm = getLayoutFrm(GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout()); - SwSortedObjs* pSortedObjs = pContentFrm ? pContentFrm->GetDrawObjs() : nullptr; + SwContentFrame* pContentFrame = getLayoutFrame(GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout()); + SwSortedObjs* pSortedObjs = pContentFrame ? pContentFrame->GetDrawObjs() : nullptr; if (pSortedObjs) pSortedObjs->UpdateAll(); } @@ -1382,7 +1382,7 @@ const SwTextInputField* SwTextNode::GetOverlappingInputField( const SwTextAttr& return pTextInputField; } -void SwTextNode::DelFrms_TextNodePart() +void SwTextNode::DelFrames_TextNodePart() { SetWrong( nullptr ); SetWrongDirty(WrongState::TODO); @@ -2382,7 +2382,7 @@ void SwTextNode::GCAttr() if(bChanged) { - //TextFrm's reagieren auf aHint, andere auf aNew + //TextFrame's reagieren auf aHint, andere auf aNew SwUpdateAttr aHint( nMin, nMax, @@ -2453,13 +2453,13 @@ void SwTextNode::NumRuleChgd() if( IsInCache() ) { - SwFrm::GetCache().Delete( this ); + SwFrame::GetCache().Delete( this ); SetInCache( false ); } SetInSwFntCache( false ); // Sending "noop" modify in order to cause invalidations of registered - // <SwTextFrm> instances to get the list style change respectively the change + // <SwTextFrame> instances to get the list style change respectively the change // in the list tree reflected in the layout. // Important note: { @@ -2562,7 +2562,7 @@ SwTextNode* SwTextNode::_MakeNewTextNode( const SwNodeIndex& rPos, bool bNext, if( !bNext && bRemoveFromCache && IsInCache() ) { - SwFrm::GetCache().Delete( this ); + SwFrame::GetCache().Delete( this ); SetInCache( false ); } } @@ -2607,7 +2607,7 @@ SwTextNode* SwTextNode::_MakeNewTextNode( const SwNodeIndex& rPos, bool bNext, aClearWhichIds.push_back( RES_PARATR_NUMRULE ); if ( ClearItemsFromAttrSet( aClearWhichIds ) != 0 && IsInCache() ) { - SwFrm::GetCache().Delete( this ); + SwFrame::GetCache().Delete( this ); SetInCache( false ); } } @@ -2639,7 +2639,7 @@ SwContentNode* SwTextNode::AppendNode( const SwPosition & rPos ) } if( HasWriterListeners() ) - MakeFrms( *pNew ); + MakeFrames( *pNew ); return pNew; } diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx index 5a9dec06c0c6..134cce58364f 100644 --- a/sw/source/core/txtnode/swfont.cxx +++ b/sw/source/core/txtnode/swfont.cxx @@ -1328,13 +1328,13 @@ void SwSubFont::_DrawStretchText( SwDrawTextInfo &rInf ) { SV_STAT( nDrawStretchText ); - if ( rInf.GetFrm() ) + if ( rInf.GetFrame() ) { - if ( rInf.GetFrm()->IsRightToLeft() ) - rInf.GetFrm()->SwitchLTRtoRTL( aPos ); + if ( rInf.GetFrame()->IsRightToLeft() ) + rInf.GetFrame()->SwitchLTRtoRTL( aPos ); - if ( rInf.GetFrm()->IsVertical() ) - rInf.GetFrm()->SwitchHorizontalToVertical( aPos ); + if ( rInf.GetFrame()->IsVertical() ) + rInf.GetFrame()->SwitchHorizontalToVertical( aPos ); rInf.SetPos( aPos ); } @@ -1373,7 +1373,7 @@ void SwSubFont::_DrawStretchText( SwDrawTextInfo &rInf ) rInf.SetPos(aOldPos); } -sal_Int32 SwSubFont::_GetCrsrOfst( SwDrawTextInfo& rInf ) +sal_Int32 SwSubFont::_GetCursorOfst( SwDrawTextInfo& rInf ) { if ( !pLastFont || pLastFont->GetOwner()!=m_pMagic ) ChgFnt( rInf.GetShell(), rInf.GetOut() ); @@ -1383,9 +1383,9 @@ sal_Int32 SwSubFont::_GetCrsrOfst( SwDrawTextInfo& rInf ) sal_Int32 nLn = rInf.GetLen() == COMPLETE_STRING ? rInf.GetText().getLength() : rInf.GetLen(); rInf.SetLen( nLn ); - sal_Int32 nCrsr = 0; + sal_Int32 nCursor = 0; if( IsCapital() && nLn ) - nCrsr = GetCapitalCrsrOfst( rInf ); + nCursor = GetCapitalCursorOfst( rInf ); else { const OUString oldText = rInf.GetText(); @@ -1393,17 +1393,17 @@ sal_Int32 SwSubFont::_GetCrsrOfst( SwDrawTextInfo& rInf ) rInf.SetKern( CheckKerning() ); SV_STAT( nGetTextSize ); if ( !IsCaseMap() ) - nCrsr = pLastFont->GetCrsrOfst( rInf ); + nCursor = pLastFont->GetCursorOfst( rInf ); else { OUString aTmp = CalcCaseMap( rInf.GetText() ); rInf.SetText( aTmp ); - nCrsr = pLastFont->GetCrsrOfst( rInf ); + nCursor = pLastFont->GetCursorOfst( rInf ); } rInf.SetKern( nOldKern ); rInf.SetText(oldText); } - return nCrsr; + return nCursor; } void SwSubFont::CalcEsc( SwDrawTextInfo& rInf, Point& rPos ) @@ -1411,7 +1411,7 @@ void SwSubFont::CalcEsc( SwDrawTextInfo& rInf, Point& rPos ) long nOfst; const sal_uInt16 nDir = UnMapDirection( - GetOrientation(), rInf.GetFrm() && rInf.GetFrm()->IsVertical() ); + GetOrientation(), rInf.GetFrame() && rInf.GetFrame()->IsVertical() ); switch ( GetEscapement() ) { @@ -1478,12 +1478,12 @@ void SwDrawTextInfo::Shift( sal_uInt16 nDir ) OSL_ENSURE( m_bSize, "DrawTextInfo: Undefined Width" ); #endif - const bool bBidiPor = ( GetFrm() && GetFrm()->IsRightToLeft() ) != + const bool bBidiPor = ( GetFrame() && GetFrame()->IsRightToLeft() ) != ( TEXT_LAYOUT_DEFAULT != ( TEXT_LAYOUT_BIDI_RTL & GetpOut()->GetLayoutMode() ) ); nDir = bBidiPor ? 1800 : - UnMapDirection( nDir, GetFrm() && GetFrm()->IsVertical() ); + UnMapDirection( nDir, GetFrame() && GetFrame()->IsVertical() ); switch ( nDir ) { diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index f2cd6003507b..986a98532eee 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -1270,7 +1270,7 @@ bool SwTextNode::InsertHint( SwTextAttr * const pAttr, const SetAttrMode nMode ) if( !(SetAttrMode::NOTXTATRCHR & nInsMode) ) { // Wir muessen zuerst einfuegen, da in SetAnchor() - // dem FlyFrm GetStart() uebermittelt wird. + // dem FlyFrame GetStart() uebermittelt wird. //JP 11.05.98: falls das Anker-Attribut schon richtig // gesetzt ist, dann korrigiere dieses nach dem Einfuegen // des Zeichens. Sonst muesste das immer ausserhalb @@ -1397,7 +1397,7 @@ bool SwTextNode::InsertHint( SwTextAttr * const pAttr, const SetAttrMode nMode ) { SwContentNode* pCNd = rNodes[ nSttIdx ]->GetContentNode(); if( nullptr != pCNd ) - pCNd->DelFrms(); + pCNd->DelFrames(); } } diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx index e8e060f1b84a..5064e0081de9 100644 --- a/sw/source/core/txtnode/txtedt.cxx +++ b/sw/source/core/txtnode/txtedt.cxx @@ -88,10 +88,10 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::linguistic2; using namespace ::com::sun::star::smarttags; -// Wir ersparen uns in Hyphenate ein GetFrm() +// Wir ersparen uns in Hyphenate ein GetFrame() // Achtung: in edlingu.cxx stehen die Variablen! extern const SwTextNode *pLinguNode; -extern SwTextFrm *pLinguFrm; +extern SwTextFrame *pLinguFrame; /* * This has basically the same function as SwScriptInfo::MaskHiddenRanges, @@ -177,32 +177,32 @@ lcl_MaskRedlinesAndHiddenText( const SwTextNode& rNode, OUStringBuffer& rText, /** * Used for spell checking. Calculates a rectangle for repaint. */ -static SwRect lcl_CalculateRepaintRect( SwTextFrm& rTextFrm, sal_Int32 nChgStart, sal_Int32 nChgEnd ) +static SwRect lcl_CalculateRepaintRect( SwTextFrame& rTextFrame, sal_Int32 nChgStart, sal_Int32 nChgEnd ) { SwRect aRect; - SwTextNode *pNode = rTextFrm.GetTextNode(); + SwTextNode *pNode = rTextFrame.GetTextNode(); SwNodeIndex aNdIdx( *pNode ); SwPosition aPos( aNdIdx, SwIndex( pNode, nChgEnd ) ); - SwCrsrMoveState aTmpState( MV_NONE ); + SwCursorMoveState aTmpState( MV_NONE ); aTmpState.m_b2Lines = true; - rTextFrm.GetCharRect( aRect, aPos, &aTmpState ); + rTextFrame.GetCharRect( aRect, aPos, &aTmpState ); // information about end of repaint area Sw2LinesPos* pEnd2Pos = aTmpState.m_p2Lines; - const SwTextFrm *pEndFrm = &rTextFrm; + const SwTextFrame *pEndFrame = &rTextFrame; - while( pEndFrm->HasFollow() && - nChgEnd >= pEndFrm->GetFollow()->GetOfst() ) - pEndFrm = pEndFrm->GetFollow(); + while( pEndFrame->HasFollow() && + nChgEnd >= pEndFrame->GetFollow()->GetOfst() ) + pEndFrame = pEndFrame->GetFollow(); if ( pEnd2Pos ) { // we are inside a special portion, take left border - SWRECTFN( pEndFrm ) + SWRECTFN( pEndFrame ) (aRect.*fnRect->fnSetTop)( (pEnd2Pos->aLine.*fnRect->fnGetTop)() ); - if ( pEndFrm->IsRightToLeft() ) + if ( pEndFrame->IsRightToLeft() ) (aRect.*fnRect->fnSetLeft)( (pEnd2Pos->aPortion.*fnRect->fnGetLeft)() ); else (aRect.*fnRect->fnSetLeft)( (pEnd2Pos->aPortion.*fnRect->fnGetRight)() ); @@ -214,28 +214,28 @@ static SwRect lcl_CalculateRepaintRect( SwTextFrm& rTextFrm, sal_Int32 nChgStart aTmpState.m_p2Lines = nullptr; SwRect aTmp; aPos = SwPosition( aNdIdx, SwIndex( pNode, nChgStart ) ); - rTextFrm.GetCharRect( aTmp, aPos, &aTmpState ); + rTextFrame.GetCharRect( aTmp, aPos, &aTmpState ); // i63141: GetCharRect(..) could cause a formatting, - // during the formatting SwTextFrms could be joined, deleted, created... - // => we have to reinit pStartFrm and pEndFrm after the formatting - const SwTextFrm* pStartFrm = &rTextFrm; - while( pStartFrm->HasFollow() && - nChgStart >= pStartFrm->GetFollow()->GetOfst() ) - pStartFrm = pStartFrm->GetFollow(); - pEndFrm = pStartFrm; - while( pEndFrm->HasFollow() && - nChgEnd >= pEndFrm->GetFollow()->GetOfst() ) - pEndFrm = pEndFrm->GetFollow(); + // during the formatting SwTextFrames could be joined, deleted, created... + // => we have to reinit pStartFrame and pEndFrame after the formatting + const SwTextFrame* pStartFrame = &rTextFrame; + while( pStartFrame->HasFollow() && + nChgStart >= pStartFrame->GetFollow()->GetOfst() ) + pStartFrame = pStartFrame->GetFollow(); + pEndFrame = pStartFrame; + while( pEndFrame->HasFollow() && + nChgEnd >= pEndFrame->GetFollow()->GetOfst() ) + pEndFrame = pEndFrame->GetFollow(); // information about start of repaint area Sw2LinesPos* pSt2Pos = aTmpState.m_p2Lines; if ( pSt2Pos ) { // we are inside a special portion, take right border - SWRECTFN( pStartFrm ) + SWRECTFN( pStartFrame ) (aTmp.*fnRect->fnSetTop)( (pSt2Pos->aLine.*fnRect->fnGetTop)() ); - if ( pStartFrm->IsRightToLeft() ) + if ( pStartFrame->IsRightToLeft() ) (aTmp.*fnRect->fnSetLeft)( (pSt2Pos->aPortion.*fnRect->fnGetRight)() ); else (aTmp.*fnRect->fnSetLeft)( (pSt2Pos->aPortion.*fnRect->fnGetLeft)() ); @@ -246,45 +246,45 @@ static SwRect lcl_CalculateRepaintRect( SwTextFrm& rTextFrm, sal_Int32 nChgStart bool bSameFrame = true; - if( rTextFrm.HasFollow() ) + if( rTextFrame.HasFollow() ) { - if( pEndFrm != pStartFrm ) + if( pEndFrame != pStartFrame ) { bSameFrame = false; - SwRect aStFrm( pStartFrm->PaintArea() ); + SwRect aStFrame( pStartFrame->PaintArea() ); { - SWRECTFN( pStartFrm ) - (aTmp.*fnRect->fnSetLeft)( (aStFrm.*fnRect->fnGetLeft)() ); - (aTmp.*fnRect->fnSetRight)( (aStFrm.*fnRect->fnGetRight)() ); - (aTmp.*fnRect->fnSetBottom)( (aStFrm.*fnRect->fnGetBottom)() ); + SWRECTFN( pStartFrame ) + (aTmp.*fnRect->fnSetLeft)( (aStFrame.*fnRect->fnGetLeft)() ); + (aTmp.*fnRect->fnSetRight)( (aStFrame.*fnRect->fnGetRight)() ); + (aTmp.*fnRect->fnSetBottom)( (aStFrame.*fnRect->fnGetBottom)() ); } - aStFrm = pEndFrm->PaintArea(); + aStFrame = pEndFrame->PaintArea(); { - SWRECTFN( pEndFrm ) - (aRect.*fnRect->fnSetTop)( (aStFrm.*fnRect->fnGetTop)() ); - (aRect.*fnRect->fnSetLeft)( (aStFrm.*fnRect->fnGetLeft)() ); - (aRect.*fnRect->fnSetRight)( (aStFrm.*fnRect->fnGetRight)() ); + SWRECTFN( pEndFrame ) + (aRect.*fnRect->fnSetTop)( (aStFrame.*fnRect->fnGetTop)() ); + (aRect.*fnRect->fnSetLeft)( (aStFrame.*fnRect->fnGetLeft)() ); + (aRect.*fnRect->fnSetRight)( (aStFrame.*fnRect->fnGetRight)() ); } aRect.Union( aTmp ); while( true ) { - pStartFrm = pStartFrm->GetFollow(); - if( pStartFrm == pEndFrm ) + pStartFrame = pStartFrame->GetFollow(); + if( pStartFrame == pEndFrame ) break; - aRect.Union( pStartFrm->PaintArea() ); + aRect.Union( pStartFrame->PaintArea() ); } } } if( bSameFrame ) { - SWRECTFN( pStartFrm ) + SWRECTFN( pStartFrame ) if( (aTmp.*fnRect->fnGetTop)() == (aRect.*fnRect->fnGetTop)() ) (aRect.*fnRect->fnSetLeft)( (aTmp.*fnRect->fnGetLeft)() ); else { - SwRect aStFrm( pStartFrm->PaintArea() ); - (aRect.*fnRect->fnSetLeft)( (aStFrm.*fnRect->fnGetLeft)() ); - (aRect.*fnRect->fnSetRight)( (aStFrm.*fnRect->fnGetRight)() ); + SwRect aStFrame( pStartFrame->PaintArea() ); + (aRect.*fnRect->fnSetLeft)( (aStFrame.*fnRect->fnGetLeft)() ); + (aRect.*fnRect->fnSetRight)( (aStFrame.*fnRect->fnGetRight)() ); (aRect.*fnRect->fnSetTop)( (aTmp.*fnRect->fnGetTop)() ); } @@ -644,7 +644,7 @@ void SwTextNode::RstTextAttr( m_pSwpHints->MergePortions(*this); } - // TextFrm's respond to aHint, others to aNew + // TextFrame's respond to aHint, others to aNew SwUpdateAttr aHint( nMin, nMax, @@ -941,7 +941,7 @@ bool SwScanner::NextWord() bool SwTextNode::Spell(SwSpellArgs* pArgs) { - // Die Aehnlichkeiten zu SwTextFrm::_AutoSpell sind beabsichtigt ... + // Die Aehnlichkeiten zu SwTextFrame::_AutoSpell sind beabsichtigt ... // ACHTUNG: Ev. Bugs in beiden Routinen fixen! // modify string according to redline information and hidden text @@ -1238,7 +1238,7 @@ bool SwTextNode::Convert( SwConversionArgs &rArgs ) // Die Aehnlichkeiten zu SwTextNode::Spell sind beabsichtigt ... // ACHTUNG: Ev. Bugs in beiden Routinen fixen! -SwRect SwTextFrm::_AutoSpell( const SwContentNode* pActNode, sal_Int32 nActPos ) +SwRect SwTextFrame::_AutoSpell( const SwContentNode* pActNode, sal_Int32 nActPos ) { SwRect aRect; #if OSL_DEBUG_LEVEL > 1 @@ -1403,7 +1403,7 @@ SwRect SwTextFrm::_AutoSpell( const SwContentNode* pActNode, sal_Int32 nActPos ) aRect = lcl_CalculateRepaintRect( *this, nChgStart, nChgEnd ); // fdo#71558 notify misspelled word to accessibility - SwViewShell* pViewSh = getRootFrm() ? getRootFrm()->GetCurrShell() : nullptr; + SwViewShell* pViewSh = getRootFrame() ? getRootFrame()->GetCurrShell() : nullptr; if( pViewSh ) pViewSh->InvalidateAccessibleParaAttrs( *this ); } @@ -1438,7 +1438,7 @@ SwRect SwTextFrm::_AutoSpell( const SwContentNode* pActNode, sal_Int32 nActPos ) @param nActPos ??? @return SwRect Repaint area */ -SwRect SwTextFrm::SmartTagScan( SwContentNode* /*pActNode*/, sal_Int32 /*nActPos*/ ) +SwRect SwTextFrame::SmartTagScan( SwContentNode* /*pActNode*/, sal_Int32 /*nActPos*/ ) { SwRect aRet; SwTextNode *pNode = GetTextNode(); @@ -1557,7 +1557,7 @@ SwRect SwTextFrm::SmartTagScan( SwContentNode* /*pActNode*/, sal_Int32 /*nActPos } // Wird vom CollectAutoCmplWords gerufen -void SwTextFrm::CollectAutoCmplWrds( SwContentNode* pActNode, sal_Int32 nActPos ) +void SwTextFrame::CollectAutoCmplWrds( SwContentNode* pActNode, sal_Int32 nActPos ) { SwTextNode *pNode = GetTextNode(); if( pNode != pActNode || !nActPos ) @@ -1606,7 +1606,7 @@ void SwTextFrm::CollectAutoCmplWrds( SwContentNode* pActNode, sal_Int32 nActPos pNode->SetAutoCompleteWordDirty( false ); } -/** Findet den TextFrm und sucht dessen CalcHyph */ +/** Findet den TextFrame und sucht dessen CalcHyph */ bool SwTextNode::Hyphenate( SwInterHyphInfo &rHyphInf ) { // Abkuerzung: am Absatz ist keine Sprache eingestellt: @@ -1618,38 +1618,38 @@ bool SwTextNode::Hyphenate( SwInterHyphInfo &rHyphInf ) return false; } - SwTextFrm *pFrm = ::sw::SwHyphIterCacheLastTxtFrm(this, + SwTextFrame *pFrame = ::sw::SwHyphIterCacheLastTextFrame(this, [&rHyphInf, this]() { - return static_cast<SwTextFrm*>(this->getLayoutFrm( + return static_cast<SwTextFrame*>(this->getLayoutFrame( this->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), - rHyphInf.GetCrsrPos())); + rHyphInf.GetCursorPos())); }); - if( pFrm ) - pFrm = &(pFrm->GetFrmAtOfst( rHyphInf.nStart )); + if( pFrame ) + pFrame = &(pFrame->GetFrameAtOfst( rHyphInf.nStart )); else { // 4935: Seit der Trennung ueber Sonderbereiche sind Faelle // moeglich, in denen kein Frame zum Node vorliegt. // Also keinOSL_ENSURE - OSL_ENSURE( pFrm, "!SwTextNode::Hyphenate: can't find any frame" ); + OSL_ENSURE( pFrame, "!SwTextNode::Hyphenate: can't find any frame" ); return false; } - while( pFrm ) + while( pFrame ) { - if( pFrm->Hyphenate( rHyphInf ) ) + if( pFrame->Hyphenate( rHyphInf ) ) { // Das Layout ist nicht robust gegen "Direktformatierung" // (7821, 7662, 7408); vgl. layact.cxx, // SwLayAction::_TurboAction(), if( !pCnt->IsValid() ... - pFrm->SetCompletePaint(); + pFrame->SetCompletePaint(); return true; } - pFrm = pFrm->GetFollow(); - if( pFrm ) + pFrame = pFrame->GetFollow(); + if( pFrame ) { - rHyphInf.nEnd = rHyphInf.nEnd - (pFrm->GetOfst() - rHyphInf.nStart); - rHyphInf.nStart = pFrm->GetOfst(); + rHyphInf.nEnd = rHyphInf.nEnd - (pFrame->GetOfst() - rHyphInf.nStart); + rHyphInf.nStart = pFrame->GetOfst(); } } return false; diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx index 90b04c018225..fd439e76356d 100644 --- a/sw/source/core/undo/rolbck.cxx +++ b/sw/source/core/undo/rolbck.cxx @@ -428,7 +428,7 @@ SwHistorySetFootnote::SwHistorySetFootnote( SwTextFootnote* pTextFootnote, sal_u SwNode* pSaveNd = pDoc->GetNodes()[ m_nNodeIndex ]; // keep pointer to StartNode of FootnoteSection and reset its attribute for now - // (as a result, its/all Frms will be deleted automatically) + // (as a result, its/all Frames will be deleted automatically) SwNodeIndex aSttIdx( *pTextFootnote->GetStartNode() ); pTextFootnote->SetStartNode( nullptr, false ); @@ -889,9 +889,9 @@ void SwHistoryChangeFlyAnchor::SetInDoc( SwDoc* pDoc, bool ) aTmp.SetAnchor( &aPos ); // so the Layout does not get confused - if ( !pCNd || !pCNd->getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, nullptr, false ) ) + if ( !pCNd || !pCNd->getLayoutFrame( pDoc->getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, nullptr, false ) ) { - m_rFormat.DelFrms(); + m_rFormat.DelFrames(); } m_rFormat.SetFormatAttr( aTmp ); diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx index dfee272a8387..adb31b0ea3a2 100644 --- a/sw/source/core/undo/unattr.cxx +++ b/sw/source/core/undo/unattr.cxx @@ -315,7 +315,7 @@ void SwUndoFormatAttr::RepeatImpl(::sw::RepeatContext & rContext) case RES_FLYFRMFMT: { // Check if the cursor is in a flying frame - // Steps: search in all FlyFrmFormats for the FlyContent attribute + // Steps: search in all FlyFrameFormats for the FlyContent attribute // and validate if the cursor is in the respective section SwFrameFormat *const pFly = rContext.GetRepeatPaM().GetNode().GetFlyFormat(); @@ -364,7 +364,7 @@ void SwUndoFormatAttr::SaveFlyAnchor( bool bSvDrwPt ) Point aPt( static_cast<SwFrameFormat*>(m_pFormat)->FindSdrObject() ->GetRelativePos() ); // store old value as attribute, to keep SwUndoFormatAttr small - m_pOldSet->Put( SwFormatFrmSize( ATT_VAR_SIZE, aPt.X(), aPt.Y() ) ); + m_pOldSet->Put( SwFormatFrameSize( ATT_VAR_SIZE, aPt.X(), aPt.Y() ) ); } } @@ -433,7 +433,7 @@ bool SwUndoFormatAttr::RestoreFlyAnchor(::sw::UndoRedoContext & rContext) if( pDoc->getIDocumentLayoutAccess().GetCurrentViewShell() ) { if( RES_DRAWFRMFMT == pFrameFormat->Which() ) { // get the old cached value - const SwFormatFrmSize& rOldSize = static_cast<const SwFormatFrmSize&>( + const SwFormatFrameSize& rOldSize = static_cast<const SwFormatFrameSize&>( m_pOldSet->Get( RES_FRM_SIZE ) ); aDrawSavePt.X() = rOldSize.GetWidth(); aDrawSavePt.Y() = rOldSize.GetHeight(); @@ -442,7 +442,7 @@ bool SwUndoFormatAttr::RestoreFlyAnchor(::sw::UndoRedoContext & rContext) // write the current value into cache aDrawOldPt = pFrameFormat->FindSdrObject()->GetRelativePos(); } else { - pFrameFormat->DelFrms(); // delete Frms + pFrameFormat->DelFrames(); // delete Frames } } @@ -451,7 +451,7 @@ bool SwUndoFormatAttr::RestoreFlyAnchor(::sw::UndoRedoContext & rContext) // Consider case, that as-character anchored object has moved its anchor position. if (FLY_AS_CHAR == rOldAnch.GetAnchorId()) { // With InContents it's tricky: the text attribute needs to be deleted. - // Unfortunately, this not only destroys the Frms but also the format. + // Unfortunately, this not only destroys the Frames but also the format. // To prevent that, first detach the connection between attribute and // format. const SwPosition *pPos = rOldAnch.GetContentAnchor(); @@ -491,7 +491,7 @@ bool SwUndoFormatAttr::RestoreFlyAnchor(::sw::UndoRedoContext & rContext) // change of the Contact object by setting the anchor. SdrObject* pObj = pCont->GetMaster(); - if( pCont->GetAnchorFrm() && !pObj->IsInserted() ) { + if( pCont->GetAnchorFrame() && !pObj->IsInserted() ) { OSL_ENSURE( pDoc->getIDocumentDrawModelAccess().GetDrawModel(), "RestoreFlyAnchor without DrawModel" ); pDoc->getIDocumentDrawModelAccess().GetDrawModel()->GetPage( 0 )->InsertObject( pObj ); @@ -500,7 +500,7 @@ bool SwUndoFormatAttr::RestoreFlyAnchor(::sw::UndoRedoContext & rContext) // cache the old value again m_pOldSet->Put( - SwFormatFrmSize( ATT_VAR_SIZE, aDrawOldPt.X(), aDrawOldPt.Y() ) ); + SwFormatFrameSize( ATT_VAR_SIZE, aDrawOldPt.X(), aDrawOldPt.Y() ) ); } if (FLY_AS_CHAR == aNewAnchor.GetAnchorId()) { @@ -512,7 +512,7 @@ bool SwUndoFormatAttr::RestoreFlyAnchor(::sw::UndoRedoContext & rContext) } if (RES_DRAWFRMFMT != pFrameFormat->Which()) - pFrameFormat->MakeFrms(); + pFrameFormat->MakeFrames(); else { SdrObject* pSdrObj = pFrameFormat->FindSdrObject(); diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx index e68ce6dfda8f..a9c7dca25ba5 100644 --- a/sw/source/core/undo/undel.cxx +++ b/sw/source/core/undo/undel.cxx @@ -46,11 +46,11 @@ #include <vector> // DELETE -/* lcl_MakeAutoFrms has to call MakeFrms for objects bounded "AtChar" +/* lcl_MakeAutoFrames has to call MakeFrames for objects bounded "AtChar" ( == AUTO ), if the anchor frame has be moved via _MoveNodes(..) and - DelFrms(..) + DelFrames(..) */ -static void lcl_MakeAutoFrms( const SwFrameFormats& rSpzArr, sal_uLong nMovedIndex ) +static void lcl_MakeAutoFrames( const SwFrameFormats& rSpzArr, sal_uLong nMovedIndex ) { if( !rSpzArr.empty() ) { @@ -62,7 +62,7 @@ static void lcl_MakeAutoFrms( const SwFrameFormats& rSpzArr, sal_uLong nMovedInd { const SwPosition* pAPos = pAnchor->GetContentAnchor(); if( pAPos && nMovedIndex == pAPos->nNode.GetIndex() ) - pFormat->MakeFrms(); + pFormat->MakeFrames(); } } } @@ -329,7 +329,7 @@ SwUndoDelete::SwUndoDelete( } } if( m_nSectDiff || m_nReplaceDummy ) - lcl_MakeAutoFrms( *pDoc->GetSpzFrameFormats(), + lcl_MakeAutoFrames( *pDoc->GetSpzFrameFormats(), m_bJoinNext ? pEndTextNd->GetIndex() : pSttTextNd->GetIndex() ); } else @@ -881,7 +881,7 @@ void SwUndoDelete::UndoImpl(::sw::UndoRedoContext & rContext) } if( pMovedNode ) - lcl_MakeAutoFrms(*rDoc.GetSpzFrameFormats(), pMovedNode->GetIndex()); + lcl_MakeAutoFrames(*rDoc.GetSpzFrameFormats(), pMovedNode->GetIndex()); if( m_pSttStr ) { @@ -1044,7 +1044,7 @@ void SwUndoDelete::RedoImpl(::sw::UndoRedoContext & rContext) false, &pItem ) ) pNextNd->SetAttr( *pItem ); } - pTableNd->DelFrms(); + pTableNd->DelFrames(); } // avoid asserts from ~SwIndexReg for deleted nodes diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx index a603a69c9c3a..928b831d66ca 100644 --- a/sw/source/core/undo/undobj.cxx +++ b/sw/source/core/undo/undobj.cxx @@ -147,7 +147,7 @@ void SwUndo::RemoveIdxFromRange( SwPaM& rPam, bool bMoveNext ) void SwUndo::RemoveIdxRel( sal_uLong nIdx, const SwPosition& rPos ) { - // Move only the Crsr. Bookmarks/TOXMarks/etc. are done by the corresponding + // Move only the Cursor. Bookmarks/TOXMarks/etc. are done by the corresponding // JoinNext/JoinPrev SwNodeIndex aIdx( rPos.nNode.GetNode().GetNodes(), nIdx ); ::PaMCorrRel( aIdx, rPos ); diff --git a/sw/source/core/undo/undobj1.cxx b/sw/source/core/undo/undobj1.cxx index 17b11837a263..7696d1a7971b 100644 --- a/sw/source/core/undo/undobj1.cxx +++ b/sw/source/core/undo/undobj1.cxx @@ -55,7 +55,7 @@ SwUndoFlyBase::~SwUndoFlyBase() delete pFrameFormat; } -void SwUndoFlyBase::InsFly(::sw::UndoRedoContext & rContext, bool bShowSelFrm) +void SwUndoFlyBase::InsFly(::sw::UndoRedoContext & rContext, bool bShowSelFrame) { SwDoc *const pDoc = & rContext.GetDoc(); @@ -117,9 +117,9 @@ void SwUndoFlyBase::InsFly(::sw::UndoRedoContext & rContext, bool bShowSelFrm) pCNd->GetTextNode()->InsertItem( aFormat, nCntPos, nCntPos ); } - pFrameFormat->MakeFrms(); + pFrameFormat->MakeFrames(); - if( bShowSelFrm ) + if( bShowSelFrame ) { rContext.SetSelections(pFrameFormat, nullptr); } @@ -153,7 +153,7 @@ void SwUndoFlyBase::InsFly(::sw::UndoRedoContext & rContext, bool bShowSelFrm) void SwUndoFlyBase::DelFly( SwDoc* pDoc ) { bDelFormat = true; // delete Format in DTOR - pFrameFormat->DelFrms(); // destroy Frms + pFrameFormat->DelFrames(); // destroy Frames // all Uno objects should now log themselves off { @@ -226,7 +226,7 @@ void SwUndoFlyBase::DelFly( SwDoc* pDoc ) SwUndoInsLayFormat::SwUndoInsLayFormat( SwFrameFormat* pFormat, sal_uLong nNodeIdx, sal_Int32 nCntIdx ) : SwUndoFlyBase( pFormat, RES_DRAWFRMFMT == pFormat->Which() ? UNDO_INSDRAWFMT : UNDO_INSLAYFMT ), - mnCrsrSaveIndexPara( nNodeIdx ), mnCrsrSaveIndexPos( nCntIdx ) + mnCursorSaveIndexPara( nNodeIdx ), mnCursorSaveIndexPos( nCntIdx ) { const SwFormatAnchor& rAnchor = pFrameFormat->GetAnchor(); nRndId = static_cast<sal_uInt16>(rAnchor.GetAnchorId()); @@ -264,17 +264,17 @@ void SwUndoInsLayFormat::UndoImpl(::sw::UndoRedoContext & rContext) if( rContent.GetContentIdx() ) // no content { bool bRemoveIdx = true; - if( mnCrsrSaveIndexPara > 0 ) + if( mnCursorSaveIndexPara > 0 ) { SwTextNode *const pNode = - rDoc.GetNodes()[mnCrsrSaveIndexPara]->GetTextNode(); + rDoc.GetNodes()[mnCursorSaveIndexPara]->GetTextNode(); if( pNode ) { SwNodeIndex aIdx( rDoc.GetNodes(), rContent.GetContentIdx()->GetIndex() ); SwNodeIndex aEndIdx( rDoc.GetNodes(), aIdx.GetNode().EndOfSectionIndex() ); - SwIndex aIndex( pNode, mnCrsrSaveIndexPos ); + SwIndex aIndex( pNode, mnCursorSaveIndexPos ); SwPosition aPos( *pNode, aIndex ); SwDoc::CorrAbs( aIdx, aEndIdx, aPos, true ); bRemoveIdx = false; @@ -395,7 +395,7 @@ lcl_GetSwUndoId(SwFrameFormat *const pFrameFormat) SwUndoDelLayFormat::SwUndoDelLayFormat( SwFrameFormat* pFormat ) : SwUndoFlyBase( pFormat, lcl_GetSwUndoId(pFormat) ) - , bShowSelFrm( true ) + , bShowSelFrame( true ) { SwDoc* pDoc = pFormat->GetDoc(); DelFly( pDoc ); @@ -428,7 +428,7 @@ SwRewriter SwUndoDelLayFormat::GetRewriter() const void SwUndoDelLayFormat::UndoImpl(::sw::UndoRedoContext & rContext) { - InsFly( rContext, bShowSelFrm ); + InsFly( rContext, bShowSelFrame ); } void SwUndoDelLayFormat::RedoImpl(::sw::UndoRedoContext & rContext) @@ -539,7 +539,7 @@ void SwUndoSetFlyFormat::UndoImpl(::sw::UndoRedoContext & rContext) if( rDoc.GetFrameFormats()->Contains( pOldFormat ) ) { if( bAnchorChgd ) - pFrameFormat->DelFrms(); + pFrameFormat->DelFrames(); if( pFrameFormat->DerivedFrom() != pOldFormat ) pFrameFormat->SetDerivedFrom( pOldFormat ); @@ -565,7 +565,7 @@ void SwUndoSetFlyFormat::UndoImpl(::sw::UndoRedoContext & rContext) if (FLY_AS_CHAR == rOldAnch.GetAnchorId()) { // With InContents it's tricky: the text attribute needs to be - // deleted. Unfortunately, this not only destroys the Frms but + // deleted. Unfortunately, this not only destroys the Frames but // also the format. To prevent that, first detach the // connection between attribute and format. const SwPosition *pPos = rOldAnch.GetContentAnchor(); @@ -598,7 +598,7 @@ void SwUndoSetFlyFormat::UndoImpl(::sw::UndoRedoContext & rContext) nOldContent, 0 ); } - pFrameFormat->MakeFrms(); + pFrameFormat->MakeFrames(); } rContext.SetSelections(pFrameFormat, nullptr); } diff --git a/sw/source/core/undo/unfmco.cxx b/sw/source/core/undo/unfmco.cxx index 7759230e559a..c69f50bbf1f8 100644 --- a/sw/source/core/undo/unfmco.cxx +++ b/sw/source/core/undo/unfmco.cxx @@ -70,7 +70,7 @@ void SwUndoFormatColl::RepeatImpl(::sw::RepeatContext & rContext) void SwUndoFormatColl::DoSetFormatColl(SwDoc & rDoc, SwPaM & rPaM) { - // Only one TextFrmColl can be applied to a section, thus request only in + // Only one TextFrameColl can be applied to a section, thus request only in // this array. // does the format still exist? diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx index aa8de2c3e397..38c532c26d7b 100644 --- a/sw/source/core/undo/unins.cxx +++ b/sw/source/core/undo/unins.cxx @@ -991,9 +991,9 @@ void SwUndoInsertLabel::RepeatImpl(::sw::RepeatContext & rContext) case LTYPE_FLY: case LTYPE_OBJECT: { - SwFlyFrm* pFly; - SwContentFrm *pCnt = pCNd->getLayoutFrm( rDoc.getIDocumentLayoutAccess().GetCurrentLayout() ); - if( pCnt && nullptr != ( pFly = pCnt->FindFlyFrm() ) ) + SwFlyFrame* pFly; + SwContentFrame *pCnt = pCNd->getLayoutFrame( rDoc.getIDocumentLayoutAccess().GetCurrentLayout() ); + if( pCnt && nullptr != ( pFly = pCnt->FindFlyFrame() ) ) nIdx = pFly->GetFormat()->GetContent().GetContentIdx()->GetIndex(); } break; diff --git a/sw/source/core/undo/unsort.cxx b/sw/source/core/undo/unsort.cxx index f393cfe9de2d..4399cdd1fcf7 100644 --- a/sw/source/core/undo/unsort.cxx +++ b/sw/source/core/undo/unsort.cxx @@ -86,11 +86,11 @@ void SwUndoSort::UndoImpl(::sw::UndoRedoContext & rContext) SwTableNode* pTableNd = rDoc.GetNodes()[ nTableNd ]->GetTableNode(); - // #i37739# A simple 'MakeFrms' after the node sorting + // #i37739# A simple 'MakeFrames' after the node sorting // does not work if the table is inside a frame and has no prev/next. SwNode2Layout aNode2Layout( *pTableNd ); - pTableNd->DelFrms(); + pTableNd->DelFrames(); const SwTable& rTable = pTableNd->GetTable(); SwMovedBoxes aMovedList; @@ -110,10 +110,10 @@ void SwUndoSort::UndoImpl(::sw::UndoRedoContext & rContext) } // Restore table frames: - // #i37739# A simple 'MakeFrms' after the node sorting + // #i37739# A simple 'MakeFrames' after the node sorting // does not work if the table is inside a frame and has no prev/next. const sal_uLong nIdx = pTableNd->GetIndex(); - aNode2Layout.RestoreUpperFrms( rDoc.GetNodes(), nIdx, nIdx + 1 ); + aNode2Layout.RestoreUpperFrames( rDoc.GetNodes(), nIdx, nIdx + 1 ); } else { @@ -165,11 +165,11 @@ void SwUndoSort::RedoImpl(::sw::UndoRedoContext & rContext) SwTableNode* pTableNd = rDoc.GetNodes()[ nTableNd ]->GetTableNode(); - // #i37739# A simple 'MakeFrms' after the node sorting + // #i37739# A simple 'MakeFrames' after the node sorting // does not work if the table is inside a frame and has no prev/next. SwNode2Layout aNode2Layout( *pTableNd ); - pTableNd->DelFrms(); + pTableNd->DelFrames(); const SwTable& rTable = pTableNd->GetTable(); SwMovedBoxes aMovedList; @@ -193,10 +193,10 @@ void SwUndoSort::RedoImpl(::sw::UndoRedoContext & rContext) } // Restore table frames: - // #i37739# A simple 'MakeFrms' after the node sorting + // #i37739# A simple 'MakeFrames' after the node sorting // does not work if the table is inside a frame and has no prev/next. const sal_uLong nIdx = pTableNd->GetIndex(); - aNode2Layout.RestoreUpperFrms( rDoc.GetNodes(), nIdx, nIdx + 1 ); + aNode2Layout.RestoreUpperFrames( rDoc.GetNodes(), nIdx, nIdx + 1 ); } else { diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx index 8acb14a9cfed..116c68696907 100644 --- a/sw/source/core/undo/untbl.cxx +++ b/sw/source/core/undo/untbl.cxx @@ -130,7 +130,7 @@ public: void RestoreAttr( SwTable& rTable, bool bModifyBox = false ); void SaveContentAttrs( SwDoc* pDoc ); - void CreateNew( SwTable& rTable, bool bCreateFrms = true, + void CreateNew( SwTable& rTable, bool bCreateFrames = true, bool bRestoreChart = true ); bool IsNewModel() const { return m_bNewModel; } }; @@ -256,7 +256,7 @@ void SwUndoInsTable::UndoImpl(::sw::UndoRedoContext & rContext) SwTableNode* pTableNd = aIdx.GetNode().GetTableNode(); OSL_ENSURE( pTableNd, "no TableNode" ); - pTableNd->DelFrms(); + pTableNd->DelFrames(); if( IDocumentRedlineAccess::IsRedlineOn( GetRedlineMode() )) rDoc.getIDocumentRedlineAccess().DeleteRedline( *pTableNd, true, USHRT_MAX ); @@ -443,17 +443,17 @@ void SwUndoTableToText::UndoImpl(::sw::UndoRedoContext & rContext) SwDoc & rDoc = rContext.GetDoc(); SwPaM *const pPam(& rContext.GetCursorSupplier().CreateNewShellCursor()); - SwNodeIndex aFrmIdx( rDoc.GetNodes(), nSttNd ); + SwNodeIndex aFrameIdx( rDoc.GetNodes(), nSttNd ); SwNodeIndex aEndIdx( rDoc.GetNodes(), nEndNd ); - pPam->GetPoint()->nNode = aFrmIdx; + pPam->GetPoint()->nNode = aFrameIdx; pPam->SetMark(); pPam->GetPoint()->nNode = aEndIdx; rDoc.DelNumRules( *pPam ); pPam->DeleteMark(); // now collect all Uppers - SwNode2Layout aNode2Layout( aFrmIdx.GetNode() ); + SwNode2Layout aNode2Layout( aFrameIdx.GetNode() ); // create TableNode structure SwTableNode* pTableNd = rDoc.GetNodes().UndoTableToText( nSttNd, nEndNd, *m_pBoxSaves ); @@ -490,7 +490,7 @@ void SwUndoTableToText::UndoImpl(::sw::UndoRedoContext & rContext) pHistory->SetTmpEnd( nTmpEnd ); } - aNode2Layout.RestoreUpperFrms( rDoc.GetNodes(), + aNode2Layout.RestoreUpperFrames( rDoc.GetNodes(), pTableNd->GetIndex(), pTableNd->GetIndex()+1 ); // Is a table selection requested? @@ -525,7 +525,7 @@ SwTableNode* SwNodes::UndoTableToText( sal_uLong nSttNd, sal_uLong nEndNd, for( n = pTableNd->GetIndex() + 1; n < nTmpEnd; ++n ) { if( ( pNd = (*this)[ n ] )->IsContentNode() ) - static_cast<SwContentNode*>(pNd)->DelFrms(); + static_cast<SwContentNode*>(pNd)->DelFrames(); pNd->m_pStartOfSection = pTableNd; } } @@ -726,7 +726,7 @@ void SwUndoTextToTable::UndoImpl(::sw::UndoRedoContext & rContext) if( pDelBoxes ) { - pTNd->DelFrms(); + pTNd->DelFrames(); SwTable& rTable = pTNd->GetTable(); for( size_t n = pDelBoxes->size(); n; ) { @@ -753,7 +753,7 @@ void SwUndoTextToTable::UndoImpl(::sw::UndoRedoContext & rContext) { SwNodeIndex & rIdx = aPam.GetPoint()->nNode; - // than move, relatively, the Crsr/etc. again + // than move, relatively, the Cursor/etc. again RemoveIdxRel( rIdx.GetIndex()+1, *pPos ); rIdx.GetNode().GetContentNode()->JoinNext(); @@ -771,7 +771,7 @@ void SwUndoTextToTable::UndoImpl(::sw::UndoRedoContext & rContext) aPam.GetMark()->nContent.Assign( nullptr, 0 ); aPam.GetPoint()->nContent.Assign( nullptr, 0 ); - // than move, relatively, the Crsr/etc. again + // than move, relatively, the Cursor/etc. again pPos->nContent.Assign(pTextNd, pTextNd->GetText().getLength()); RemoveIdxRel( nEndNode + 1, *pPos ); @@ -921,7 +921,7 @@ void _SaveTable::RestoreAttr( SwTable& rTable, bool bMdfyBox ) { m_bModifyBox = bMdfyBox; - // first, get back attributes of TableFrmFormat + // first, get back attributes of TableFrameFormat SwFrameFormat* pFormat = rTable.GetFrameFormat(); SfxItemSet& rFormatSet = (SfxItemSet&)pFormat->GetAttrSet(); rFormatSet.ClearItem(); @@ -929,13 +929,13 @@ void _SaveTable::RestoreAttr( SwTable& rTable, bool bMdfyBox ) if( pFormat->IsInCache() ) { - SwFrm::GetCache().Delete( pFormat ); + SwFrame::GetCache().Delete( pFormat ); pFormat->SetInCache( false ); } // for safety, invalidate all TableFrames - SwIterator<SwTabFrm,SwFormat> aIter( *pFormat ); - for( SwTabFrm* pLast = aIter.First(); pLast; pLast = aIter.Next() ) + SwIterator<SwTabFrame,SwFormat> aIter( *pFormat ); + for( SwTabFrame* pLast = aIter.First(); pLast; pLast = aIter.Next() ) if( pLast->GetTable() == &rTable ) { pLast->InvalidateAll(); @@ -972,13 +972,13 @@ void _SaveTable::SaveContentAttrs( SwDoc* pDoc ) m_pLine->SaveContentAttrs(pDoc); } -void _SaveTable::CreateNew( SwTable& rTable, bool bCreateFrms, +void _SaveTable::CreateNew( SwTable& rTable, bool bCreateFrames, bool bRestoreChart ) { _FndBox aTmpBox( nullptr, nullptr ); - aTmpBox.DelFrms( rTable ); + aTmpBox.DelFrames( rTable ); - // first, get back attributes of TableFrmFormat + // first, get back attributes of TableFrameFormat SwFrameFormat* pFormat = rTable.GetFrameFormat(); SfxItemSet& rFormatSet = (SfxItemSet&)pFormat->GetAttrSet(); rFormatSet.ClearItem(); @@ -986,7 +986,7 @@ void _SaveTable::CreateNew( SwTable& rTable, bool bCreateFrms, if( pFormat->IsInCache() ) { - SwFrm::GetCache().Delete( pFormat ); + SwFrame::GetCache().Delete( pFormat ); pFormat->SetInCache( false ); } @@ -1068,8 +1068,8 @@ void _SaveTable::CreateNew( SwTable& rTable, bool bCreateFrms, aParent.GetTabLines().erase( aParent.GetTabLines().begin(), aParent.GetTabLines().begin() + n ); assert(aParent.GetTabLines().empty()); - if( bCreateFrms ) - aTmpBox.MakeFrms( rTable ); + if( bCreateFrames ) + aTmpBox.MakeFrames( rTable ); if( bRestoreChart ) { // TL_CHART2: need to inform chart of probably changed cell names @@ -1093,20 +1093,20 @@ void _SaveTable::NewFrameFormat( const SwTableLine* pTableLn, const SwTableBox* m_aFrameFormats[nFormatPos] = pFormat; } - // first re-assign Frms - SwIterator<SwTabFrm,SwFormat> aIter( *pOldFormat ); - for( SwFrm* pLast = aIter.First(); pLast; pLast = aIter.Next() ) + // first re-assign Frames + SwIterator<SwTabFrame,SwFormat> aIter( *pOldFormat ); + for( SwFrame* pLast = aIter.First(); pLast; pLast = aIter.Next() ) { - if( pTableLn ? static_cast<SwRowFrm*>(pLast)->GetTabLine() == pTableLn - : static_cast<SwCellFrm*>(pLast)->GetTabBox() == pTableBx ) + if( pTableLn ? static_cast<SwRowFrame*>(pLast)->GetTabLine() == pTableLn + : static_cast<SwCellFrame*>(pLast)->GetTabBox() == pTableBx ) { pLast->RegisterToFormat(*pFormat); pLast->InvalidateAll(); - pLast->ReinitializeFrmSizeAttrFlags(); + pLast->ReinitializeFrameSizeAttrFlags(); if ( !pTableLn ) { - static_cast<SwCellFrm*>(pLast)->SetDerivedVert( false ); - static_cast<SwCellFrm*>(pLast)->CheckDirChange(); + static_cast<SwCellFrame*>(pLast)->SetDerivedVert( false ); + static_cast<SwCellFrame*>(pLast)->CheckDirChange(); } } } @@ -1774,11 +1774,11 @@ void SwUndoTableNdsChg::UndoImpl(::sw::UndoRedoContext & rContext) } } - // fdo#57197: before deleting the SwTableBoxes, delete the SwTabFrms + // fdo#57197: before deleting the SwTableBoxes, delete the SwTabFrames aTmpBox.SetTableLines(aDelBoxes, pTableNd->GetTable()); - aTmpBox.DelFrms(pTableNd->GetTable()); + aTmpBox.DelFrames(pTableNd->GetTable()); - // do this _after_ deleting Frms because disposing SwAccessible requires + // do this _after_ deleting Frames because disposing SwAccessible requires // connection to the nodes, see SwAccessibleChild::IsAccessible() for (size_t i = 0; i < aDelNodes.size(); ++i) { @@ -2932,7 +2932,7 @@ void SwUndoSplitTable::UndoImpl(::sw::UndoRedoContext & rContext) SwTable::SelLineFromBox( pBox, aSelBoxes ); _FndBox aTmpBox( nullptr, nullptr ); aTmpBox.SetTableLines( aSelBoxes, rTable ); - aTmpBox.DelFrms( rTable ); + aTmpBox.DelFrames( rTable ); rTable.DeleteSel( pDoc, aSelBoxes, nullptr, nullptr, false, false ); } break; @@ -3028,13 +3028,13 @@ void SwUndoMergeTable::UndoImpl(::sw::UndoRedoContext & rContext) // get lines for layout update _FndBox aFndBox( nullptr, nullptr ); aFndBox.SetTableLines( *pTable ); - aFndBox.DelFrms( *pTable ); + aFndBox.DelFrames( *pTable ); // ? TL_CHART2: notification or locking of controller required ? SwTableNode* pNew = pDoc->GetNodes().SplitTable( rIdx ); // update layout - aFndBox.MakeFrms( *pTable ); + aFndBox.MakeFrames( *pTable ); // ? TL_CHART2: notification or locking of controller required ? if( bWithPrev ) @@ -3057,7 +3057,7 @@ void SwUndoMergeTable::UndoImpl(::sw::UndoRedoContext & rContext) // create frames for the new table SwNodeIndex aTmpIdx( *pNew ); - pNew->MakeFrms( &aTmpIdx ); + pNew->MakeFrames( &aTmpIdx ); // position cursor somewhere in content SwContentNode* pCNd = pDoc->GetNodes().GoNext( &rIdx ); diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx index 169040689c45..45372893af17 100644 --- a/sw/source/core/unocore/unochart.cxx +++ b/sw/source/core/unocore/unochart.cxx @@ -215,38 +215,38 @@ bool FillRangeDescriptor( return true; } -static OUString GetCellRangeName( SwFrameFormat &rTableFormat, SwUnoCrsr &rTableCrsr ) +static OUString GetCellRangeName( SwFrameFormat &rTableFormat, SwUnoCursor &rTableCursor ) { OUString aRes; //!! see also SwXTextTableCursor::getRangeName - SwUnoTableCrsr* pUnoTableCrsr = dynamic_cast<SwUnoTableCrsr*>(&rTableCrsr); - if (!pUnoTableCrsr) + SwUnoTableCursor* pUnoTableCursor = dynamic_cast<SwUnoTableCursor*>(&rTableCursor); + if (!pUnoTableCursor) return OUString(); - pUnoTableCrsr->MakeBoxSels(); + pUnoTableCursor->MakeBoxSels(); const SwStartNode* pStart; const SwTableBox* pStartBox = nullptr; const SwTableBox* pEndBox = nullptr; - pStart = pUnoTableCrsr->GetPoint()->nNode.GetNode().FindTableBoxStartNode(); + pStart = pUnoTableCursor->GetPoint()->nNode.GetNode().FindTableBoxStartNode(); if (pStart) { const SwTable* pTable = SwTable::FindTable( &rTableFormat ); pEndBox = pTable->GetTableBox( pStart->GetIndex()); aRes = pEndBox->GetName(); - if(pUnoTableCrsr->HasMark()) + if(pUnoTableCursor->HasMark()) { - pStart = pUnoTableCrsr->GetMark()->nNode.GetNode().FindTableBoxStartNode(); + pStart = pUnoTableCursor->GetMark()->nNode.GetNode().FindTableBoxStartNode(); pStartBox = pTable->GetTableBox( pStart->GetIndex()); } OSL_ENSURE( pStartBox, "start box not found" ); OSL_ENSURE( pEndBox, "end box not found" ); // need to switch start and end? - if (*pUnoTableCrsr->GetPoint() < *pUnoTableCrsr->GetMark()) + if (*pUnoTableCursor->GetPoint() < *pUnoTableCursor->GetMark()) { const SwTableBox* pTmpBox = pStartBox; pStartBox = pEndBox; @@ -367,7 +367,7 @@ static void GetFormatAndCreateCursorFromRangeRep( const SwDoc *pDoc, const OUString &rRangeRepresentation, // must be a single range (i.e. so called sub-range) SwFrameFormat **ppTableFormat, // will be set to the table format of the table used in the range representation - std::shared_ptr<SwUnoCrsr>& rpUnoCrsr ) // will be set to cursor spanning the cell range (cursor will be created!) + std::shared_ptr<SwUnoCursor>& rpUnoCursor ) // will be set to cursor spanning the cell range (cursor will be created!) { OUString aTableName; // table name OUString aStartCell; // name of top left cell @@ -379,7 +379,7 @@ static void GetFormatAndCreateCursorFromRangeRep( { if (ppTableFormat) *ppTableFormat = nullptr; - rpUnoCrsr.reset(); + rpUnoCursor.reset(); } else { @@ -393,10 +393,10 @@ static void GetFormatAndCreateCursorFromRangeRep( *ppTableFormat = pTableFormat; - rpUnoCrsr.reset(); // default result in case of failure + rpUnoCursor.reset(); // default result in case of failure SwTable *pTable = pTableFormat ? SwTable::FindTable( pTableFormat ) : nullptr; - // create new SwUnoCrsr spanning the specified range + // create new SwUnoCursor spanning the specified range //! see also SwXTextTable::GetRangeByName // #i80314# // perform validation check. Thus, pass <true> as 2nd parameter to <SwTable::GetTableBox(..)> @@ -408,24 +408,24 @@ static void GetFormatAndCreateCursorFromRangeRep( SwPosition aPos(*pSttNd); // set cursor to top left box of range - auto pUnoCrsr = pTableFormat->GetDoc()->CreateUnoCrsr(aPos, true); - pUnoCrsr->Move( fnMoveForward, fnGoNode ); - pUnoCrsr->SetRemainInSection( false ); + auto pUnoCursor = pTableFormat->GetDoc()->CreateUnoCursor(aPos, true); + pUnoCursor->Move( fnMoveForward, fnGoNode ); + pUnoCursor->SetRemainInSection( false ); // #i80314# // perform validation check. Thus, pass <true> as 2nd parameter to <SwTable::GetTableBox(..)> const SwTableBox* pBRBox = pTable->GetTableBox( aEndCell, true ); if(pBRBox) { - pUnoCrsr->SetMark(); - pUnoCrsr->GetPoint()->nNode = *pBRBox->GetSttNd(); - pUnoCrsr->Move( fnMoveForward, fnGoNode ); - SwUnoTableCrsr* pCrsr = - dynamic_cast<SwUnoTableCrsr*>(pUnoCrsr.get()); + pUnoCursor->SetMark(); + pUnoCursor->GetPoint()->nNode = *pBRBox->GetSttNd(); + pUnoCursor->Move( fnMoveForward, fnGoNode ); + SwUnoTableCursor* pCursor = + dynamic_cast<SwUnoTableCursor*>(pUnoCursor.get()); // HACK: remove pending actions for old style tables - UnoActionRemoveContext aRemoveContext(*pCrsr); - pCrsr->MakeBoxSels(); - rpUnoCrsr = pUnoCrsr; + UnoActionRemoveContext aRemoveContext(*pCursor); + pCursor->MakeBoxSels(); + rpUnoCursor = pUnoCursor; } } } @@ -671,11 +671,11 @@ uno::Reference< chart2::data::XDataSource > SwChartDataProvider::Impl_createData // get table format for that single table from above SwFrameFormat *pTableFormat = nullptr; // pointer to table format - std::shared_ptr<SwUnoCrsr> pUnoCrsr; // here required to check if the cells in the range do actually exist + std::shared_ptr<SwUnoCursor> pUnoCursor; // here required to check if the cells in the range do actually exist if (aSubRanges.getLength() > 0) - GetFormatAndCreateCursorFromRangeRep( pDoc, pSubRanges[0], &pTableFormat, pUnoCrsr ); + GetFormatAndCreateCursorFromRangeRep( pDoc, pSubRanges[0], &pTableFormat, pUnoCursor ); - if (!pTableFormat || !pUnoCrsr) + if (!pTableFormat || !pUnoCursor) throw lang::IllegalArgumentException(); if(pTableFormat) @@ -885,18 +885,18 @@ uno::Reference< chart2::data::XDataSource > SwChartDataProvider::Impl_createData } // get cursors spanning the cell ranges for label and data - std::shared_ptr<SwUnoCrsr> pLabelUnoCrsr; - std::shared_ptr<SwUnoCrsr> pDataUnoCrsr; - GetFormatAndCreateCursorFromRangeRep( pDoc, aLabelRange, &pTableFormat, pLabelUnoCrsr); - GetFormatAndCreateCursorFromRangeRep( pDoc, aDataRange, &pTableFormat, pDataUnoCrsr); + std::shared_ptr<SwUnoCursor> pLabelUnoCursor; + std::shared_ptr<SwUnoCursor> pDataUnoCursor; + GetFormatAndCreateCursorFromRangeRep( pDoc, aLabelRange, &pTableFormat, pLabelUnoCursor); + GetFormatAndCreateCursorFromRangeRep( pDoc, aDataRange, &pTableFormat, pDataUnoCursor); // create XDataSequence's from cursors - if (pLabelUnoCrsr) - pLabelSeqs[ nSeqsIdx ] = new SwChartDataSequence( *this, *pTableFormat, pLabelUnoCrsr ); - OSL_ENSURE( pDataUnoCrsr, "pointer to data sequence missing" ); - if (pDataUnoCrsr) - pDataSeqs [ nSeqsIdx ] = new SwChartDataSequence( *this, *pTableFormat, pDataUnoCrsr ); - if (pLabelUnoCrsr || pDataUnoCrsr) + if (pLabelUnoCursor) + pLabelSeqs[ nSeqsIdx ] = new SwChartDataSequence( *this, *pTableFormat, pLabelUnoCursor ); + OSL_ENSURE( pDataUnoCursor, "pointer to data sequence missing" ); + if (pDataUnoCursor) + pDataSeqs [ nSeqsIdx ] = new SwChartDataSequence( *this, *pTableFormat, pDataUnoCursor ); + if (pLabelUnoCursor || pDataUnoCursor) ++nSeqsIdx; } OSL_ENSURE( nSeqsIdx == nNumLDS, "mismatch between sequence size and num,ber of entries" ); @@ -1367,23 +1367,23 @@ uno::Reference< chart2::data::XDataSequence > SwChartDataProvider::Impl_createDa throw lang::DisposedException(); SwFrameFormat *pTableFormat = nullptr; // pointer to table format - std::shared_ptr<SwUnoCrsr> pUnoCrsr; // pointer to new created cursor spanning the cell range + std::shared_ptr<SwUnoCursor> pUnoCursor; // pointer to new created cursor spanning the cell range GetFormatAndCreateCursorFromRangeRep( pDoc, rRangeRepresentation, - &pTableFormat, pUnoCrsr ); - if (!pTableFormat || !pUnoCrsr) + &pTableFormat, pUnoCursor ); + if (!pTableFormat || !pUnoCursor) throw lang::IllegalArgumentException(); // check that cursors point and mark are in a single row or column. - OUString aCellRange( GetCellRangeName( *pTableFormat, *pUnoCrsr ) ); + OUString aCellRange( GetCellRangeName( *pTableFormat, *pUnoCursor ) ); SwRangeDescriptor aDesc; FillRangeDescriptor( aDesc, aCellRange ); if (aDesc.nTop != aDesc.nBottom && aDesc.nLeft != aDesc.nRight) throw lang::IllegalArgumentException(); - OSL_ENSURE( pTableFormat && pUnoCrsr, "table format or cursor missing" ); + OSL_ENSURE( pTableFormat && pUnoCursor, "table format or cursor missing" ); uno::Reference< chart2::data::XDataSequence > xDataSeq; if (!bTestOnly) - xDataSeq = new SwChartDataSequence( *this, *pTableFormat, pUnoCrsr ); + xDataSeq = new SwChartDataSequence( *this, *pTableFormat, pUnoCursor ); return xDataSeq; } @@ -1745,8 +1745,8 @@ OUString SAL_CALL SwChartDataProvider::convertRangeToXML( const OUString& rRange { const OUString aRange( rRangeRepresentation.getToken(0, ';', nPos) ); SwFrameFormat *pTableFormat = nullptr; // pointer to table format - std::shared_ptr<SwUnoCrsr> pCrsr; - GetFormatAndCreateCursorFromRangeRep( pDoc, aRange, &pTableFormat, pCrsr ); + std::shared_ptr<SwUnoCursor> pCursor; + GetFormatAndCreateCursorFromRangeRep( pDoc, aRange, &pTableFormat, pCursor ); if (!pTableFormat) throw lang::IllegalArgumentException(); SwTable* pTable = SwTable::FindTable( pTableFormat ); @@ -1881,7 +1881,7 @@ uno::Sequence< OUString > SAL_CALL SwChartDataSource::getSupportedServiceNames( SwChartDataSequence::SwChartDataSequence( SwChartDataProvider &rProvider, SwFrameFormat &rTableFormat, - std::shared_ptr<SwUnoCrsr> pTableCursor ) : + std::shared_ptr<SwUnoCursor> pTableCursor ) : SwClient( &rTableFormat ), m_aEvtListeners( GetChartMutex() ), m_aModifyListeners( GetChartMutex() ), @@ -1889,7 +1889,7 @@ SwChartDataSequence::SwChartDataSequence( m_aColLabelText( SW_RES( STR_CHART2_COL_LABEL_TEXT ) ), m_xDataProvider( &rProvider ), m_pDataProvider( &rProvider ), - m_pTableCrsr( pTableCursor ), + m_pTableCursor( pTableCursor ), m_pPropSet( aSwMapProvider.GetPropertySet( PROPERTY_MAP_CHART2_DATA_SEQUENCE ) ) { m_bDisposed = false; @@ -1919,11 +1919,11 @@ SwChartDataSequence::SwChartDataSequence( release(); #if OSL_DEBUG_LEVEL > 0 - // check if it can properly convert into a SwUnoTableCrsr + // check if it can properly convert into a SwUnoTableCursor // which is required for some functions - SwUnoTableCrsr* pUnoTableCrsr = dynamic_cast<SwUnoTableCrsr*>(&(*m_pTableCrsr)); - OSL_ENSURE(pUnoTableCrsr, "SwChartDataSequence: cursor not SwUnoTableCrsr"); - (void) pUnoTableCrsr; + SwUnoTableCursor* pUnoTableCursor = dynamic_cast<SwUnoTableCursor*>(&(*m_pTableCursor)); + OSL_ENSURE(pUnoTableCursor, "SwChartDataSequence: cursor not SwUnoTableCursor"); + (void) pUnoTableCursor; #endif } @@ -1937,7 +1937,7 @@ SwChartDataSequence::SwChartDataSequence( const SwChartDataSequence &rObj ) : m_aColLabelText( SW_RES(STR_CHART2_COL_LABEL_TEXT) ), m_xDataProvider( rObj.m_pDataProvider ), m_pDataProvider( rObj.m_pDataProvider ), - m_pTableCrsr( rObj.m_pTableCrsr ), + m_pTableCursor( rObj.m_pTableCursor ), m_pPropSet( rObj.m_pPropSet ) { m_bDisposed = false; @@ -1967,11 +1967,11 @@ SwChartDataSequence::SwChartDataSequence( const SwChartDataSequence &rObj ) : release(); #if OSL_DEBUG_LEVEL > 0 - // check if it can properly convert into a SwUnoTableCrsr + // check if it can properly convert into a SwUnoTableCursor // which is required for some functions - SwUnoTableCrsr* pUnoTableCrsr = dynamic_cast<SwUnoTableCrsr*>(&(*m_pTableCrsr)); - OSL_ENSURE(pUnoTableCrsr, "SwChartDataSequence: cursor not SwUnoTableCrsr"); - (void) pUnoTableCrsr; + SwUnoTableCursor* pUnoTableCursor = dynamic_cast<SwUnoTableCursor*>(&(*m_pTableCursor)); + OSL_ENSURE(pUnoTableCursor, "SwChartDataSequence: cursor not SwUnoTableCursor"); + (void) pUnoTableCursor; #endif } @@ -2013,7 +2013,7 @@ OUString SAL_CALL SwChartDataSequence::getSourceRangeRepresentation( ) SwFrameFormat* pTableFormat = GetFrameFormat(); if (pTableFormat) { - const OUString aCellRange( GetCellRangeName( *pTableFormat, *m_pTableCrsr ) ); + const OUString aCellRange( GetCellRangeName( *pTableFormat, *m_pTableCursor ) ); OSL_ENSURE( !aCellRange.isEmpty(), "failed to get cell range" ); aRes = pTableFormat->GetName() + "." + aCellRange; } @@ -2039,7 +2039,7 @@ uno::Sequence< OUString > SAL_CALL SwChartDataSequence::generateLabel( throw uno::RuntimeException(); else { - const OUString aCellRange( GetCellRangeName( *pTableFormat, *m_pTableCrsr ) ); + const OUString aCellRange( GetCellRangeName( *pTableFormat, *m_pTableCursor ) ); OSL_ENSURE( !aCellRange.isEmpty(), "failed to get cell range" ); bOk = FillRangeDescriptor( aDesc, aCellRange ); OSL_ENSURE( bOk, "failed to get SwRangeDescriptor" ); @@ -2144,9 +2144,9 @@ std::vector< css::uno::Reference< css::table::XCell > > SwChartDataSequence::Get if(pTable->IsTableComplex()) return std::vector< css::uno::Reference< css::table::XCell > >(); SwRangeDescriptor aDesc; - if(!FillRangeDescriptor(aDesc, GetCellRangeName(*pTableFormat, *m_pTableCrsr))) + if(!FillRangeDescriptor(aDesc, GetCellRangeName(*pTableFormat, *m_pTableCursor))) return std::vector< css::uno::Reference< css::table::XCell > >(); - return SwXCellRange(m_pTableCrsr, *pTableFormat, aDesc).GetCells(); + return SwXCellRange(m_pTableCursor, *pTableFormat, aDesc).GetCells(); } uno::Sequence< OUString > SAL_CALL SwChartDataSequence::getTextualData() @@ -2301,9 +2301,9 @@ void SwChartDataSequence::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pN ClientModify(this, pOld, pNew ); // table was deleted or cursor was deleted - if(!GetRegisteredIn() || !m_pTableCrsr) + if(!GetRegisteredIn() || !m_pTableCursor) { - m_pTableCrsr.reset(nullptr); + m_pTableCursor.reset(nullptr); dispose(); } else @@ -2409,7 +2409,7 @@ void SAL_CALL SwChartDataSequence::dispose( ) if (pLclRegisteredIn && pLclRegisteredIn->HasWriterListeners()) { pLclRegisteredIn->Remove(this); - m_pTableCrsr.reset(nullptr); + m_pTableCursor.reset(nullptr); } } @@ -2449,10 +2449,10 @@ bool SwChartDataSequence::DeleteBox( const SwTableBox &rBox ) // if the implementation cursor gets affected (i.e. the box where it is located // in gets removed) we need to move it before that... (otherwise it does not need to change) - const SwStartNode* pPointStartNode = m_pTableCrsr->GetPoint()->nNode.GetNode().FindTableBoxStartNode(); - const SwStartNode* pMarkStartNode = m_pTableCrsr->GetMark()->nNode.GetNode().FindTableBoxStartNode(); + const SwStartNode* pPointStartNode = m_pTableCursor->GetPoint()->nNode.GetNode().FindTableBoxStartNode(); + const SwStartNode* pMarkStartNode = m_pTableCursor->GetMark()->nNode.GetNode().FindTableBoxStartNode(); - if (!m_pTableCrsr->HasMark() || (pPointStartNode == rBox.GetSttNd() && pMarkStartNode == rBox.GetSttNd())) + if (!m_pTableCursor->HasMark() || (pPointStartNode == rBox.GetSttNd() && pMarkStartNode == rBox.GetSttNd())) { bNowEmpty = true; } @@ -2522,12 +2522,12 @@ bool SwChartDataSequence::DeleteBox( const SwTableBox &rBox ) SwPosition aNewPos( *pCNd ); // new position to be used with cursor // if the mark is to be changed, make sure there is one - if (pMarkStartNode == rBox.GetSttNd() && !m_pTableCrsr->HasMark()) - m_pTableCrsr->SetMark(); + if (pMarkStartNode == rBox.GetSttNd() && !m_pTableCursor->HasMark()) + m_pTableCursor->SetMark(); // set cursor to new position SwPosition *pPos = (pPointStartNode == rBox.GetSttNd()) ? - m_pTableCrsr->GetPoint() : m_pTableCrsr->GetMark(); + m_pTableCursor->GetPoint() : m_pTableCursor->GetMark(); if (pPos) { pPos->nNode = aNewPos.nNode; @@ -2553,7 +2553,7 @@ void SwChartDataSequence::FillRangeDesc( SwRangeDescriptor &rRangeDesc ) const SwTable* pTable = SwTable::FindTable( pTableFormat ); if(!pTable->IsTableComplex()) { - FillRangeDescriptor( rRangeDesc, GetCellRangeName( *pTableFormat, *m_pTableCrsr ) ); + FillRangeDescriptor( rRangeDesc, GetCellRangeName( *pTableFormat, *m_pTableCursor ) ); } } } @@ -2575,8 +2575,8 @@ void SwChartDataSequence::FillRangeDesc( SwRangeDescriptor &rRangeDesc ) const bool SwChartDataSequence::ExtendTo( bool bExtendCol, sal_Int32 nFirstNew, sal_Int32 nCount ) { - SwUnoTableCrsr* pUnoTableCrsr = dynamic_cast<SwUnoTableCrsr*>(&(*m_pTableCrsr)); - if (!pUnoTableCrsr) + SwUnoTableCursor* pUnoTableCursor = dynamic_cast<SwUnoTableCursor*>(&(*m_pTableCursor)); + if (!pUnoTableCursor) return false; const SwStartNode *pStartNd = nullptr; @@ -2590,11 +2590,11 @@ bool SwChartDataSequence::ExtendTo( bool bExtendCol, // get range descriptor (cell range) for current data-sequence - pStartNd = pUnoTableCrsr->GetPoint()->nNode.GetNode().FindTableBoxStartNode(); + pStartNd = pUnoTableCursor->GetPoint()->nNode.GetNode().FindTableBoxStartNode(); pEndBox = pTable->GetTableBox( pStartNd->GetIndex() ); const OUString aEndBox( pEndBox->GetName() ); - pStartNd = pUnoTableCrsr->GetMark()->nNode.GetNode().FindTableBoxStartNode(); + pStartNd = pUnoTableCursor->GetMark()->nNode.GetNode().FindTableBoxStartNode(); pStartBox = pTable->GetTableBox( pStartNd->GetIndex() ); const OUString aStartBox( pStartBox->GetName() ); @@ -2647,11 +2647,11 @@ bool SwChartDataSequence::ExtendTo( bool bExtendCol, // move table cursor to new start and end of data-sequence const SwTableBox *pNewStartBox = pTable->GetTableBox( aNewStartCell ); const SwTableBox *pNewEndBox = pTable->GetTableBox( aNewEndCell ); - pUnoTableCrsr->SetMark(); - pUnoTableCrsr->GetPoint()->nNode = *pNewEndBox->GetSttNd(); - pUnoTableCrsr->GetMark()->nNode = *pNewStartBox->GetSttNd(); - pUnoTableCrsr->Move( fnMoveForward, fnGoNode ); - pUnoTableCrsr->MakeBoxSels(); + pUnoTableCursor->SetMark(); + pUnoTableCursor->GetPoint()->nNode = *pNewEndBox->GetSttNd(); + pUnoTableCursor->GetMark()->nNode = *pNewStartBox->GetSttNd(); + pUnoTableCursor->Move( fnMoveForward, fnGoNode ); + pUnoTableCursor->MakeBoxSels(); } return bChanged; diff --git a/sw/source/core/unocore/unocrsr.cxx b/sw/source/core/unocore/unocrsr.cxx index d62096c8a3ee..314ee8f8a822 100644 --- a/sw/source/core/unocore/unocrsr.cxx +++ b/sw/source/core/unocore/unocrsr.cxx @@ -27,9 +27,9 @@ sw::DocDisposingHint::~DocDisposingHint() {} -IMPL_FIXEDMEMPOOL_NEWDEL( SwUnoCrsr ) +IMPL_FIXEDMEMPOOL_NEWDEL( SwUnoCursor ) -SwUnoCrsr::SwUnoCrsr( const SwPosition &rPos, SwPaM* pRing ) +SwUnoCursor::SwUnoCursor( const SwPosition &rPos, SwPaM* pRing ) : SwCursor( rPos, pRing, false ) , SwModify(nullptr) , m_bRemainInSection(true) @@ -37,12 +37,12 @@ SwUnoCrsr::SwUnoCrsr( const SwPosition &rPos, SwPaM* pRing ) , m_bSkipOverProtectSections(false) {} -SwUnoCrsr::~SwUnoCrsr() +SwUnoCursor::~SwUnoCursor() { SwDoc* pDoc = GetDoc(); if( !pDoc->IsInDtor() ) { - assert(!static_cast<bool>(SwIterator<SwClient, SwUnoCrsr>(*this).First())); + assert(!static_cast<bool>(SwIterator<SwClient, SwUnoCursor>(*this).First())); } // delete the whole ring @@ -54,23 +54,23 @@ SwUnoCrsr::~SwUnoCrsr() } } -bool SwUnoCrsr::IsReadOnlyAvailable() const +bool SwUnoCursor::IsReadOnlyAvailable() const { return true; } -const SwContentFrm* -SwUnoCrsr::DoSetBidiLevelLeftRight( bool &, bool, bool ) +const SwContentFrame* +SwUnoCursor::DoSetBidiLevelLeftRight( bool &, bool, bool ) { return nullptr; // not for uno cursor } -void SwUnoCrsr::DoSetBidiLevelUpDown() +void SwUnoCursor::DoSetBidiLevelUpDown() { return; // not for uno cursor } -bool SwUnoCrsr::IsSelOvr( int eFlags ) +bool SwUnoCursor::IsSelOvr( int eFlags ) { if (m_bRemainInSection) { @@ -156,24 +156,24 @@ bool SwUnoCrsr::IsSelOvr( int eFlags ) return SwCursor::IsSelOvr( eFlags ); } -SwUnoTableCrsr::SwUnoTableCrsr(const SwPosition& rPos) +SwUnoTableCursor::SwUnoTableCursor(const SwPosition& rPos) : SwCursor(rPos, nullptr, false) - , SwUnoCrsr(rPos) + , SwUnoCursor(rPos) , SwTableCursor(rPos) , m_aTableSel(rPos, nullptr, false) { SetRemainInSection(false); } -SwUnoTableCrsr::~SwUnoTableCrsr() +SwUnoTableCursor::~SwUnoTableCursor() { while (m_aTableSel.GetNext() != &m_aTableSel) delete m_aTableSel.GetNext(); } -bool SwUnoTableCrsr::IsSelOvr( int eFlags ) +bool SwUnoTableCursor::IsSelOvr( int eFlags ) { - bool bRet = SwUnoCrsr::IsSelOvr( eFlags ); + bool bRet = SwUnoCursor::IsSelOvr( eFlags ); if( !bRet ) { const SwTableNode* pTNd = GetPoint()->nNode.GetNode().FindTableNode(); @@ -184,16 +184,16 @@ bool SwUnoTableCrsr::IsSelOvr( int eFlags ) return bRet; } -void SwUnoTableCrsr::MakeBoxSels() +void SwUnoTableCursor::MakeBoxSels() { const SwContentNode* pCNd; - bool bMakeTableCrsrs = true; + bool bMakeTableCursors = true; if( GetPoint()->nNode.GetIndex() && GetMark()->nNode.GetIndex() && - nullptr != ( pCNd = GetContentNode() ) && pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ) && - nullptr != ( pCNd = GetContentNode(false) ) && pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ) ) - bMakeTableCrsrs = GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout()->MakeTableCrsrs( *this ); + nullptr != ( pCNd = GetContentNode() ) && pCNd->getLayoutFrame( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ) && + nullptr != ( pCNd = GetContentNode(false) ) && pCNd->getLayoutFrame( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ) ) + bMakeTableCursors = GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout()->MakeTableCursors( *this ); - if ( !bMakeTableCrsrs ) + if ( !bMakeTableCursors ) { SwSelBoxes const& rTmpBoxes = GetSelectedBoxes(); while (!rTmpBoxes.empty()) diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index 8763a8304946..910317c57cb9 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -107,7 +107,7 @@ static SwPaM* lcl_createPamCopy(const SwPaM& rPam) void GetSelectableFromAny(uno::Reference<uno::XInterface> const& xIfc, SwDoc & rTargetDoc, SwPaM *& o_rpPaM, std::pair<OUString, FlyCntType> & o_rFrame, - OUString & o_rTableName, SwUnoTableCrsr const*& o_rpTableCursor, + OUString & o_rTableName, SwUnoTableCursor const*& o_rpTableCursor, ::sw::mark::IMark const*& o_rpMark, std::vector<SdrObject *> & o_rSdrObjects) { @@ -178,10 +178,10 @@ void GetSelectableFromAny(uno::Reference<uno::XInterface> const& xIfc, ::sw::UnoTunnelGetImplementation<SwXTextRanges>(xTunnel)); if (pRanges) { - SwUnoCrsr const* pUnoCrsr = pRanges->GetCursor(); - if (pUnoCrsr && pUnoCrsr->GetDoc() == &rTargetDoc) + SwUnoCursor const* pUnoCursor = pRanges->GetCursor(); + if (pUnoCursor && pUnoCursor->GetDoc() == &rTargetDoc) { - o_rpPaM = lcl_createPamCopy(*pUnoCrsr); + o_rpPaM = lcl_createPamCopy(*pUnoCursor); } return; } @@ -249,12 +249,12 @@ void GetSelectableFromAny(uno::Reference<uno::XInterface> const& xIfc, ::sw::UnoTunnelGetImplementation<SwXCellRange>(xTunnel)); if (pCellRange) { - SwUnoCrsr const*const pUnoCrsr(pCellRange->GetTableCrsr()); - if (pUnoCrsr && pUnoCrsr->GetDoc() == &rTargetDoc) + SwUnoCursor const*const pUnoCursor(pCellRange->GetTableCursor()); + if (pUnoCursor && pUnoCursor->GetDoc() == &rTargetDoc) { // probably can't copy it to o_rpPaM for this since it's // a SwTableCursor - o_rpTableCursor = dynamic_cast<SwUnoTableCrsr const*>(pUnoCrsr); + o_rpTableCursor = dynamic_cast<SwUnoTableCursor const*>(pUnoCursor); } return; } @@ -299,7 +299,7 @@ GetNestedTextContent(SwTextNode & rTextNode, sal_Int32 const nIndex, } // Read the special properties of the cursor -bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry +bool getCursorPropertyValue(const SfxItemPropertySimpleEntry& rEntry , SwPaM& rPam , Any *pAny , PropertyState& eState @@ -897,10 +897,10 @@ void GetCurPageStyle(SwPaM& rPaM, OUString &rString) { if (!rPaM.GetContentNode()) return; // TODO: is there an easy way to get it for tables/sections? - SwContentFrm* pFrame = rPaM.GetContentNode()->getLayoutFrm(rPaM.GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout()); + SwContentFrame* pFrame = rPaM.GetContentNode()->getLayoutFrame(rPaM.GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout()); if(pFrame) { - const SwPageFrm* pPage = pFrame->FindPageFrm(); + const SwPageFrame* pPage = pFrame->FindPageFrame(); if(pPage) { SwStyleNameMapper::FillProgName(pPage->GetPageDesc()->GetName(), @@ -910,7 +910,7 @@ void GetCurPageStyle(SwPaM& rPaM, OUString &rString) } // reset special properties of the cursor -void resetCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry, SwPaM& rPam) +void resetCursorPropertyValue(const SfxItemPropertySimpleEntry& rEntry, SwPaM& rPam) { SwDoc* pDoc = rPam.GetDoc(); switch(rEntry.nWID) @@ -951,13 +951,13 @@ void resetCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry, SwPaM& rPa } } -void InsertFile(SwUnoCrsr* pUnoCrsr, const OUString& rURL, +void InsertFile(SwUnoCursor* pUnoCursor, const OUString& rURL, const uno::Sequence< beans::PropertyValue >& rOptions) throw (lang::IllegalArgumentException, io::IOException, uno::RuntimeException, std::exception) { std::unique_ptr<SfxMedium> pMed; - SwDoc* pDoc = pUnoCrsr->GetDoc(); + SwDoc* pDoc = pUnoCursor->GetDoc(); SwDocShell* pDocSh = pDoc->GetDocShell(); utl::MediaDescriptor aMediaDescriptor( rOptions ); OUString sFileName = rURL; @@ -1055,30 +1055,30 @@ void InsertFile(SwUnoCrsr* pUnoCrsr, const OUString& rURL, pSet->Put(SfxBoolItem(FN_API_CALL, true)); if(!sPassword.isEmpty()) pSet->Put(SfxStringItem(SID_PASSWORD, sPassword)); - Reader *pRead = pDocSh->StartConvertFrom( *pMed, &pRdr, nullptr, pUnoCrsr); + Reader *pRead = pDocSh->StartConvertFrom( *pMed, &pRdr, nullptr, pUnoCursor); if( pRead ) { UnoActionContext aContext(pDoc); - if(pUnoCrsr->HasMark()) - pDoc->getIDocumentContentOperations().DeleteAndJoin(*pUnoCrsr); + if(pUnoCursor->HasMark()) + pDoc->getIDocumentContentOperations().DeleteAndJoin(*pUnoCursor); - SwNodeIndex aSave( pUnoCrsr->GetPoint()->nNode, -1 ); - sal_Int32 nContent = pUnoCrsr->GetPoint()->nContent.GetIndex(); + SwNodeIndex aSave( pUnoCursor->GetPoint()->nNode, -1 ); + sal_Int32 nContent = pUnoCursor->GetPoint()->nContent.GetIndex(); sal_uInt32 nErrno = pRdr->Read( *pRead ); // and paste the document if(!nErrno) { ++aSave; - pUnoCrsr->SetMark(); - pUnoCrsr->GetMark()->nNode = aSave; + pUnoCursor->SetMark(); + pUnoCursor->GetMark()->nNode = aSave; SwContentNode* pCntNode = aSave.GetNode().GetContentNode(); if( !pCntNode ) nContent = 0; - pUnoCrsr->GetMark()->nContent.Assign( pCntNode, nContent ); + pUnoCursor->GetMark()->nContent.Assign( pCntNode, nContent ); } delete pRdr; diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index 171592f3e3e8..165b1525ef7c 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -721,9 +721,9 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape) } else if ((aAnchor.GetAnchorId() != FLY_AT_PAGE) && pDoc->getIDocumentLayoutAccess().GetCurrentLayout()) { - SwCrsrMoveState aState( MV_SETONLYTEXT ); + SwCursorMoveState aState( MV_SETONLYTEXT ); Point aTmp(convertMm100ToTwip(aMM100Pos.X), convertMm100ToTwip(aMM100Pos.Y)); - pDoc->getIDocumentLayoutAccess().GetCurrentLayout()->GetCrsrOfst( pPam->GetPoint(), aTmp, &aState ); + pDoc->getIDocumentLayoutAccess().GetCurrentLayout()->GetCursorOfst( pPam->GetPoint(), aTmp, &aState ); aAnchor.SetAnchor( pPam->GetPoint() ); // #i32349# - adjustment of vertical positioning @@ -1304,7 +1304,7 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a RndStdIds eOldAnchorId = rOldAnchor.GetAnchorId(); SdrObject* pObj = pFormat->FindSdrObject(); SwFrameFormat *pFlyFormat = FindFrameFormat( pObj ); - pFlyFormat->DelFrms(); + pFlyFormat->DelFrames(); if( text::TextContentAnchorType_AS_CHARACTER != eNewAnchor && (FLY_AS_CHAR == eOldAnchorId)) { @@ -1337,9 +1337,9 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a SwPaM aPam(pDoc->GetNodes().GetEndOfContent()); if( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ) { - SwCrsrMoveState aState( MV_SETONLYTEXT ); + SwCursorMoveState aState( MV_SETONLYTEXT ); Point aTmp( pObj->GetSnapRect().TopLeft() ); - pDoc->getIDocumentLayoutAccess().GetCurrentLayout()->GetCrsrOfst( aPam.GetPoint(), aTmp, &aState ); + pDoc->getIDocumentLayoutAccess().GetCurrentLayout()->GetCursorOfst( aPam.GetPoint(), aTmp, &aState ); } else { @@ -1358,9 +1358,9 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a SwPaM aPam(pDoc->GetNodes().GetEndOfContent()); if( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ) { - SwCrsrMoveState aState( MV_SETONLYTEXT ); + SwCursorMoveState aState( MV_SETONLYTEXT ); Point aTmp( pObj->GetSnapRect().TopLeft() ); - pDoc->getIDocumentLayoutAccess().GetCurrentLayout()->GetCrsrOfst( aPam.GetPoint(), aTmp, &aState ); + pDoc->getIDocumentLayoutAccess().GetCurrentLayout()->GetCursorOfst( aPam.GetPoint(), aTmp, &aState ); } else { @@ -1369,7 +1369,7 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a } //the RES_TXTATR_FLYCNT needs to be added now SwTextNode *pNd = aPam.GetNode().GetTextNode(); - SAL_WARN_IF( !pNd, "sw.uno", "Crsr is not in a TextNode." ); + SAL_WARN_IF( !pNd, "sw.uno", "Cursor is not in a TextNode." ); SwFormatFlyCnt aFormat( pFlyFormat ); pNd->InsertItem(aFormat, aPam.GetPoint()->nContent.GetIndex(), 0 ); diff --git a/sw/source/core/unocore/unoflatpara.cxx b/sw/source/core/unocore/unoflatpara.cxx index 0688b392753a..bf288eb39a31 100644 --- a/sw/source/core/unocore/unoflatpara.cxx +++ b/sw/source/core/unocore/unoflatpara.cxx @@ -392,9 +392,9 @@ uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getNextPara() { SwViewShell* pViewShell = mpDoc->getIDocumentLayoutAccess().GetCurrentViewShell(); - SwPageFrm* pCurrentPage = pViewShell ? pViewShell->Imp()->GetFirstVisPage(pViewShell->GetOut()) : nullptr; - SwPageFrm* pStartPage = pCurrentPage; - SwPageFrm* pStopPage = nullptr; + SwPageFrame* pCurrentPage = pViewShell ? pViewShell->Imp()->GetFirstVisPage(pViewShell->GetOut()) : nullptr; + SwPageFrame* pStartPage = pCurrentPage; + SwPageFrame* pStopPage = nullptr; while ( pCurrentPage && pCurrentPage != pStopPage ) { @@ -406,7 +406,7 @@ uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getNextPara() return xRet; // search for invalid content: - SwContentFrm* pCnt = pCurrentPage->ContainsContent(); + SwContentFrame* pCnt = pCurrentPage->ContainsContent(); while( pCnt && pCurrentPage->IsAnLower( pCnt ) ) { @@ -422,7 +422,7 @@ uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getNextPara() break; } - pCnt = pCnt->GetNextContentFrm(); + pCnt = pCnt->GetNextContentFrame(); } } @@ -434,12 +434,12 @@ uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getNextPara() pCurrentPage->ValidateSpelling(); // proceed with next page, wrap at end of document if required: - pCurrentPage = static_cast<SwPageFrm*>(pCurrentPage->GetNext()); + pCurrentPage = static_cast<SwPageFrame*>(pCurrentPage->GetNext()); if ( !pCurrentPage && !pStopPage ) { pStopPage = pStartPage; - pCurrentPage = static_cast<SwPageFrm*>(pViewShell->GetLayout()->Lower()); + pCurrentPage = static_cast<SwPageFrame*>(pViewShell->GetLayout()->Lower()); } } } diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index 4b3a8edeb7d3..ba315f55e6ce 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -160,7 +160,7 @@ public: bool GetProperty(sal_uInt16 nWID, sal_uInt8 nMemberId, const uno::Any*& pAny ); bool FillBaseProperties(SfxItemSet& rToSet, const SfxItemSet &rFromSet, bool& rSizeFound); - virtual bool AnyToItemSet( SwDoc* pDoc, SfxItemSet& rFrmSet, SfxItemSet& rSet, bool& rSizeFound) = 0; + virtual bool AnyToItemSet( SwDoc* pDoc, SfxItemSet& rFrameSet, SfxItemSet& rSet, bool& rSizeFound) = 0; }; BaseFrameProperties_Impl::~BaseFrameProperties_Impl() @@ -857,46 +857,46 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI pWidthType ||pSyncWidth || pSyncHeight ) { rSizeFound = true; - SwFormatFrmSize aFrmSz ( static_cast < const ::SwFormatFrmSize& > ( rFromSet.Get ( RES_FRM_SIZE ) ) ); + SwFormatFrameSize aFrameSz ( static_cast < const ::SwFormatFrameSize& > ( rFromSet.Get ( RES_FRM_SIZE ) ) ); if(pWidth) - bRet &= ((SfxPoolItem&)aFrmSz).PutValue(*pWidth, MID_FRMSIZE_WIDTH|CONVERT_TWIPS); + bRet &= ((SfxPoolItem&)aFrameSz).PutValue(*pWidth, MID_FRMSIZE_WIDTH|CONVERT_TWIPS); if(pHeight) - bRet &= ((SfxPoolItem&)aFrmSz).PutValue(*pHeight, MID_FRMSIZE_HEIGHT|CONVERT_TWIPS); + bRet &= ((SfxPoolItem&)aFrameSz).PutValue(*pHeight, MID_FRMSIZE_HEIGHT|CONVERT_TWIPS); if(pRelH ) - bRet &= ((SfxPoolItem&)aFrmSz).PutValue(*pRelH, MID_FRMSIZE_REL_HEIGHT); + bRet &= ((SfxPoolItem&)aFrameSz).PutValue(*pRelH, MID_FRMSIZE_REL_HEIGHT); if (pRelHRelation) - bRet &= const_cast<SwFormatFrmSize&>(aFrmSz).PutValue(*pRelHRelation, MID_FRMSIZE_REL_HEIGHT_RELATION); + bRet &= const_cast<SwFormatFrameSize&>(aFrameSz).PutValue(*pRelHRelation, MID_FRMSIZE_REL_HEIGHT_RELATION); if(pRelW ) - bRet &= ((SfxPoolItem&)aFrmSz).PutValue(*pRelW, MID_FRMSIZE_REL_WIDTH); + bRet &= ((SfxPoolItem&)aFrameSz).PutValue(*pRelW, MID_FRMSIZE_REL_WIDTH); if (pRelWRelation) - bRet &= const_cast<SwFormatFrmSize&>(aFrmSz).PutValue(*pRelWRelation, MID_FRMSIZE_REL_WIDTH_RELATION); + bRet &= const_cast<SwFormatFrameSize&>(aFrameSz).PutValue(*pRelWRelation, MID_FRMSIZE_REL_WIDTH_RELATION); if(pSyncWidth) - bRet &= ((SfxPoolItem&)aFrmSz).PutValue(*pSyncWidth, MID_FRMSIZE_IS_SYNC_WIDTH_TO_HEIGHT); + bRet &= ((SfxPoolItem&)aFrameSz).PutValue(*pSyncWidth, MID_FRMSIZE_IS_SYNC_WIDTH_TO_HEIGHT); if(pSyncHeight) - bRet &= ((SfxPoolItem&)aFrmSz).PutValue(*pSyncHeight, MID_FRMSIZE_IS_SYNC_HEIGHT_TO_WIDTH); + bRet &= ((SfxPoolItem&)aFrameSz).PutValue(*pSyncHeight, MID_FRMSIZE_IS_SYNC_HEIGHT_TO_WIDTH); if(pSize) - bRet &= ((SfxPoolItem&)aFrmSz).PutValue(*pSize, MID_FRMSIZE_SIZE|CONVERT_TWIPS); + bRet &= ((SfxPoolItem&)aFrameSz).PutValue(*pSize, MID_FRMSIZE_SIZE|CONVERT_TWIPS); if(pSizeType) - bRet &= ((SfxPoolItem&)aFrmSz).PutValue(*pSizeType, MID_FRMSIZE_SIZE_TYPE); + bRet &= ((SfxPoolItem&)aFrameSz).PutValue(*pSizeType, MID_FRMSIZE_SIZE_TYPE); if(pWidthType) - bRet &= ((SfxPoolItem&)aFrmSz).PutValue(*pWidthType, MID_FRMSIZE_WIDTH_TYPE); - if(!aFrmSz.GetWidth()) - aFrmSz.SetWidth(MINFLY); - if(!aFrmSz.GetHeight()) - aFrmSz.SetHeight(MINFLY); - rToSet.Put(aFrmSz); + bRet &= ((SfxPoolItem&)aFrameSz).PutValue(*pWidthType, MID_FRMSIZE_WIDTH_TYPE); + if(!aFrameSz.GetWidth()) + aFrameSz.SetWidth(MINFLY); + if(!aFrameSz.GetHeight()) + aFrameSz.SetHeight(MINFLY); + rToSet.Put(aFrameSz); } else { rSizeFound = false; - SwFormatFrmSize aFrmSz; + SwFormatFrameSize aFrameSz; awt::Size aSize; aSize.Width = 2 * MM50; aSize.Height = 2 * MM50; ::uno::Any aSizeVal; aSizeVal <<= aSize; - ((SfxPoolItem&)aFrmSz).PutValue(aSizeVal, MID_FRMSIZE_SIZE|CONVERT_TWIPS); - rToSet.Put(aFrmSz); + ((SfxPoolItem&)aFrameSz).PutValue(aSizeVal, MID_FRMSIZE_SIZE|CONVERT_TWIPS); + rToSet.Put(aFrameSz); } } const ::uno::Any* pFrameDirection = nullptr; @@ -956,7 +956,7 @@ public: SwFrameProperties_Impl(); virtual ~SwFrameProperties_Impl(){} - bool AnyToItemSet( SwDoc* pDoc, SfxItemSet& rFrmSet, SfxItemSet& rSet, bool& rSizeFound) override; + bool AnyToItemSet( SwDoc* pDoc, SfxItemSet& rFrameSet, SfxItemSet& rSet, bool& rSizeFound) override; }; SwFrameProperties_Impl::SwFrameProperties_Impl(): @@ -1021,7 +1021,7 @@ public: SwGraphicProperties_Impl(); virtual ~SwGraphicProperties_Impl(){} - virtual bool AnyToItemSet( SwDoc* pDoc, SfxItemSet& rFrmSet, SfxItemSet& rSet, bool& rSizeFound) override; + virtual bool AnyToItemSet( SwDoc* pDoc, SfxItemSet& rFrameSet, SfxItemSet& rSet, bool& rSizeFound) override; }; SwGraphicProperties_Impl::SwGraphicProperties_Impl( ) : @@ -1046,7 +1046,7 @@ static inline void lcl_FillMirror ( SfxItemSet &rToSet, const ::SfxItemSet &rFro bool SwGraphicProperties_Impl::AnyToItemSet( SwDoc* pDoc, - SfxItemSet& rFrmSet, + SfxItemSet& rFrameSet, SfxItemSet& rGrSet, bool& rSizeFound) { @@ -1075,13 +1075,13 @@ bool SwGraphicProperties_Impl::AnyToItemSet( { rtl::Reference< SwDocStyleSheet > xStyle( new SwDocStyleSheet(*pStyle) ); const ::SfxItemSet *pItemSet = &xStyle->GetItemSet(); - bRet = FillBaseProperties(rFrmSet, *pItemSet, rSizeFound); + bRet = FillBaseProperties(rFrameSet, *pItemSet, rSizeFound); lcl_FillMirror ( rGrSet, *pItemSet, pHEvenMirror, pHOddMirror, pVMirror, bRet ); } else { const ::SfxItemSet *pItemSet = &pDoc->getIDocumentStylePoolAccess().GetFrameFormatFromPool( RES_POOLFRM_GRAPHIC )->GetAttrSet(); - bRet = FillBaseProperties(rFrmSet, *pItemSet, rSizeFound); + bRet = FillBaseProperties(rFrameSet, *pItemSet, rSizeFound); lcl_FillMirror ( rGrSet, *pItemSet, pHEvenMirror, pHOddMirror, pVMirror, bRet ); } @@ -1123,17 +1123,17 @@ public: SwFrameProperties_Impl(/*aSwMapProvider.GetPropertyMap(PROPERTY_MAP_EMBEDDED_OBJECT)*/ ){} virtual ~SwOLEProperties_Impl(){} - virtual bool AnyToItemSet( SwDoc* pDoc, SfxItemSet& rFrmSet, SfxItemSet& rSet, bool& rSizeFound) override; + virtual bool AnyToItemSet( SwDoc* pDoc, SfxItemSet& rFrameSet, SfxItemSet& rSet, bool& rSizeFound) override; }; bool SwOLEProperties_Impl::AnyToItemSet( - SwDoc* pDoc, SfxItemSet& rFrmSet, SfxItemSet& rSet, bool& rSizeFound) + SwDoc* pDoc, SfxItemSet& rFrameSet, SfxItemSet& rSet, bool& rSizeFound) { const ::uno::Any* pTemp; if(!GetProperty(FN_UNO_CLSID, 0, pTemp) && !GetProperty(FN_UNO_STREAM_NAME, 0, pTemp) && !GetProperty(FN_EMBEDDED_OBJECT, 0, pTemp) ) return false; - SwFrameProperties_Impl::AnyToItemSet( pDoc, rFrmSet, rSet, rSizeFound); + SwFrameProperties_Impl::AnyToItemSet( pDoc, rFrameSet, rSet, rSizeFound); return true; } @@ -1325,15 +1325,15 @@ void SwXFrame::setName(const OUString& rName) throw( uno::RuntimeException, std: uno::Reference< beans::XPropertySetInfo > SwXFrame::getPropertySetInfo() throw( uno::RuntimeException, std::exception ) { uno::Reference< beans::XPropertySetInfo > xRef; - static uno::Reference< beans::XPropertySetInfo > xFrmRef; + static uno::Reference< beans::XPropertySetInfo > xFrameRef; static uno::Reference< beans::XPropertySetInfo > xGrfRef; static uno::Reference< beans::XPropertySetInfo > xOLERef; switch(eType) { case FLYCNTTYPE_FRM: - if( !xFrmRef.is() ) - xFrmRef = m_pPropSet->getPropertySetInfo(); - xRef = xFrmRef; + if( !xFrameRef.is() ) + xFrameRef = m_pPropSet->getPropertySetInfo(); + xRef = xFrameRef; break; case FLYCNTTYPE_GRF: if( !xGrfRef.is() ) @@ -1524,7 +1524,7 @@ void SwXFrame::setPropertyValue(const OUString& rPropertyName, const ::uno::Any& aValue >>= sTitle; // assure that <SdrObject> instance exists. GetOrCreateSdrObject(rFlyFormat); - rFlyFormat.GetDoc()->SetFlyFrmTitle(rFlyFormat, sTitle); + rFlyFormat.GetDoc()->SetFlyFrameTitle(rFlyFormat, sTitle); } // New attribute Description else if( FN_UNO_DESCRIPTION == pEntry->nWID ) @@ -1534,7 +1534,7 @@ void SwXFrame::setPropertyValue(const OUString& rPropertyName, const ::uno::Any& aValue >>= sDescription; // assure that <SdrObject> instance exists. GetOrCreateSdrObject(rFlyFormat); - rFlyFormat.GetDoc()->SetFlyFrmDescription(rFlyFormat, sDescription); + rFlyFormat.GetDoc()->SetFlyFrameDescription(rFlyFormat, sDescription); } else if(FN_UNO_FRAME_STYLE_NAME == pEntry->nWID) { @@ -1550,11 +1550,11 @@ void SwXFrame::setPropertyValue(const OUString& rPropertyName, const ::uno::Any& if ( !pFormat->GetDoc()->IsInReading() ) { // see SwFEShell::SetFrameFormat( SwFrameFormat *pNewFormat, bool bKeepOrient, Point* pDocPos ) - SwFlyFrm *pFly = nullptr; + SwFlyFrame *pFly = nullptr; { const SwFrameFormat* pFormatXX = pFormat; if (dynamic_cast<const SwFlyFrameFormat*>( pFormatXX) ) - pFly = static_cast<const SwFlyFrameFormat*>(pFormatXX)->GetFrm(); + pFly = static_cast<const SwFlyFrameFormat*>(pFormatXX)->GetFrame(); } if ( pFly ) { @@ -1777,7 +1777,7 @@ void SwXFrame::setPropertyValue(const OUString& rPropertyName, const ::uno::Any& aAnchor.SetAnchor(&aPos); aAnchor.SetType(FLY_AT_FLY); aSet.Put(aAnchor); - pDoc->SetFlyFrmAttr( *pFormat, aSet ); + pDoc->SetFlyFrameAttr( *pFormat, aSet ); bDone = true; } } @@ -1811,7 +1811,7 @@ void SwXFrame::setPropertyValue(const OUString& rPropertyName, const ::uno::Any& if(!(aChangedBrushItem == aOriginalBrushItem)) { setSvxBrushItemAsFillAttributesToTargetSet(aChangedBrushItem, aSet); - pFormat->GetDoc()->SetFlyFrmAttr( *pFormat, aSet ); + pFormat->GetDoc()->SetFlyFrameAttr( *pFormat, aSet ); } bDone = true; @@ -1835,7 +1835,7 @@ void SwXFrame::setPropertyValue(const OUString& rPropertyName, const ::uno::Any& aSet.Put(XFillBmpStretchItem(drawing::BitmapMode_STRETCH == eMode)); aSet.Put(XFillBmpTileItem(drawing::BitmapMode_REPEAT == eMode)); - pFormat->GetDoc()->SetFlyFrmAttr( *pFormat, aSet ); + pFormat->GetDoc()->SetFlyFrameAttr( *pFormat, aSet ); bDone = true; } @@ -1938,10 +1938,10 @@ void SwXFrame::setPropertyValue(const OUString& rPropertyName, const ::uno::Any& // if document is currently in reading mode. if ( !pFormat->GetDoc()->IsInReading() ) { - // see SwFEShell::SetFlyFrmAttr( SfxItemSet& rSet ) - SwFlyFrm *pFly = nullptr; + // see SwFEShell::SetFlyFrameAttr( SfxItemSet& rSet ) + SwFlyFrame *pFly = nullptr; if (dynamic_cast<SwFlyFrameFormat*>( pFormat) ) - pFly = static_cast<SwFlyFrameFormat*>(pFormat)->GetFrm(); + pFly = static_cast<SwFlyFrameFormat*>(pFormat)->GetFrame(); if (pFly) { const ::SfxPoolItem* pItem; @@ -1956,7 +1956,7 @@ void SwXFrame::setPropertyValue(const OUString& rPropertyName, const ::uno::Any& } } - pFormat->GetDoc()->SetFlyFrmAttr( *pFormat, aSet ); + pFormat->GetDoc()->SetFlyFrameAttr( *pFormat, aSet ); } else if(FN_UNO_CLSID == pEntry->nWID || FN_UNO_STREAM_NAME == pEntry->nWID || FN_EMBEDDED_OBJECT == pEntry->nWID) { @@ -2237,11 +2237,11 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName) // format document completely in order to get correct value pFormat->GetDoc()->GetEditShell()->CalcLayout(); - SwFrm* pTmpFrm = SwIterator<SwFrm,SwFormat>( *pFormat ).First(); - if ( pTmpFrm ) + SwFrame* pTmpFrame = SwIterator<SwFrame,SwFormat>( *pFormat ).First(); + if ( pTmpFrame ) { - OSL_ENSURE( pTmpFrm->IsValid(), "frame not valid" ); - const SwRect &rRect = pTmpFrm->Frm(); + OSL_ENSURE( pTmpFrame->IsValid(), "frame not valid" ); + const SwRect &rRect = pTmpFrame->Frame(); Size aMM100Size = OutputDevice::LogicToLogic( Size( rRect.Width(), rRect.Height() ), MapMode( MAP_TWIP ), MapMode( MAP_100TH_MM )); @@ -2527,7 +2527,7 @@ void SwXFrame::setPropertyToDefault( const OUString& rPropertyName ) SwFlyFrameFormat& rFlyFormat = dynamic_cast<SwFlyFrameFormat&>(*pFormat); // assure that <SdrObject> instance exists. GetOrCreateSdrObject(rFlyFormat); - rFlyFormat.GetDoc()->SetFlyFrmTitle(rFlyFormat, aEmptyOUStr); + rFlyFormat.GetDoc()->SetFlyFrameTitle(rFlyFormat, aEmptyOUStr); } // New attribute Description else if( FN_UNO_DESCRIPTION == pEntry->nWID ) @@ -2535,7 +2535,7 @@ void SwXFrame::setPropertyToDefault( const OUString& rPropertyName ) SwFlyFrameFormat& rFlyFormat = dynamic_cast<SwFlyFrameFormat&>(*pFormat); // assure that <SdrObject> instance exists. GetOrCreateSdrObject(rFlyFormat); - rFlyFormat.GetDoc()->SetFlyFrmDescription(rFlyFormat, aEmptyOUStr); + rFlyFormat.GetDoc()->SetFlyFrameDescription(rFlyFormat, aEmptyOUStr); } else { @@ -2718,7 +2718,7 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan SwNode& rNode = pDoc->GetNodes().GetEndOfContent(); SwPaM aPam(rNode); aPam.Move( fnMoveBackward, fnGoDoc ); - static sal_uInt16 const aFrmAttrRange[] = + static sal_uInt16 const aFrameAttrRange[] = { RES_FRMATR_BEGIN, RES_FRMATR_END-1, RES_UNKNOWNATR_CONTAINER, RES_UNKNOWNATR_CONTAINER, @@ -2736,14 +2736,14 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan }; SfxItemSet aGrSet(pDoc->GetAttrPool(), aGrAttrRange ); - SfxItemSet aFrmSet(pDoc->GetAttrPool(), aFrmAttrRange ); + SfxItemSet aFrameSet(pDoc->GetAttrPool(), aFrameAttrRange ); //UUUU set correct parent to get the XFILL_NONE FillStyle as needed - aFrmSet.SetParent(&pDoc->GetDfltFrameFormat()->GetAttrSet()); + aFrameSet.SetParent(&pDoc->GetDfltFrameFormat()->GetAttrSet()); // no the related items need to be added to the set bool bSizeFound; - if(!pProps->AnyToItemSet( pDoc, aFrmSet, aGrSet, bSizeFound)) + if(!pProps->AnyToItemSet( pDoc, aFrameSet, aGrSet, bSizeFound)) throw lang::IllegalArgumentException(); // a TextRange is handled separately *aPam.GetPoint() = *aIntPam.GetPoint(); @@ -2755,7 +2755,7 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan const SfxPoolItem* pItem; RndStdIds eAnchorId = FLY_AT_PARA; - if(SfxItemState::SET == aFrmSet.GetItemState(RES_ANCHOR, false, &pItem) ) + if(SfxItemState::SET == aFrameSet.GetItemState(RES_ANCHOR, false, &pItem) ) { eAnchorId = static_cast<const SwFormatAnchor*>(pItem)->GetAnchorId(); if( FLY_AT_FLY == eAnchorId && @@ -2763,14 +2763,14 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan { // framebound only where a frame exists SwFormatAnchor aAnchor(FLY_AT_PARA); - aFrmSet.Put(aAnchor); + aFrameSet.Put(aAnchor); } else if ((FLY_AT_PAGE == eAnchorId) && 0 == static_cast<const SwFormatAnchor*>(pItem)->GetPageNum() ) { SwFormatAnchor aAnchor( *static_cast<const SwFormatAnchor*>(pItem) ); aAnchor.SetAnchor( aPam.GetPoint() ); - aFrmSet.Put(aAnchor); + aFrameSet.Put(aAnchor); } } @@ -2790,22 +2790,22 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan // to prevent conflicts if the to-be-anchored position is part of the to-be-copied text if (eAnchorId != FLY_AT_PAGE) { - pAnchorItem = static_cast<SwFormatAnchor*>(aFrmSet.Get(RES_ANCHOR).Clone()); - aFrmSet.Put( SwFormatAnchor( FLY_AT_PAGE, 1 )); + pAnchorItem = static_cast<SwFormatAnchor*>(aFrameSet.Get(RES_ANCHOR).Clone()); + aFrameSet.Put( SwFormatAnchor( FLY_AT_PAGE, 1 )); } aPam.DeleteMark(); // mark position node will be deleted! aIntPam.DeleteMark(); // mark position node will be deleted! - pFormat = pDoc->MakeFlyAndMove( *m_pCopySource, aFrmSet, + pFormat = pDoc->MakeFlyAndMove( *m_pCopySource, aFrameSet, nullptr, pParentFrameFormat ); if(pAnchorItem && pFormat) { - pFormat->DelFrms(); + pFormat->DelFrames(); pAnchorItem->SetAnchor( m_pCopySource->Start() ); SfxItemSet aAnchorSet( pDoc->GetAttrPool(), RES_ANCHOR, RES_ANCHOR ); aAnchorSet.Put( *pAnchorItem ); - pDoc->SetFlyFrmAttr( *pFormat, aAnchorSet ); + pDoc->SetFlyFrameAttr( *pFormat, aAnchorSet ); delete pAnchorItem; } DELETEZ( m_pCopySource ); @@ -2813,7 +2813,7 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan else { pFormat = pDoc->MakeFlySection( FLY_AT_PARA, aPam.GetPoint(), - &aFrmSet, pParentFrameFormat ); + &aFrameSet, pParentFrameFormat ); } if(pFormat) { @@ -2865,10 +2865,10 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan } pFormat = - pGrfObj ? pDoc->getIDocumentContentOperations().Insert( aPam, *pGrfObj, &aFrmSet, &aGrSet, + pGrfObj ? pDoc->getIDocumentContentOperations().Insert( aPam, *pGrfObj, &aFrameSet, &aGrSet, pParentFrameFormat ) : pDoc->getIDocumentContentOperations().Insert( aPam, sGraphicURL, sFltName, &aGraphic, - &aFrmSet, &aGrSet, pParentFrameFormat ); + &aFrameSet, &aGrSet, pParentFrameFormat ); delete pGrfObj; if(pFormat) { @@ -2963,16 +2963,16 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan } MapMode aMyMap( MAP_TWIP ); aSz = OutputDevice::LogicToLogic( aSz, aRefMap, aMyMap ); - SwFormatFrmSize aFrmSz; - aFrmSz.SetSize(aSz); - aFrmSet.Put(aFrmSz); + SwFormatFrameSize aFrameSz; + aFrameSz.SetSize(aSz); + aFrameSet.Put(aFrameSz); } SwFlyFrameFormat* pFormat2 = nullptr; // TODO/LATER: Is it the only possible aspect here? sal_Int64 nAspect = embed::Aspects::MSOLE_CONTENT; ::svt::EmbeddedObjectRef xObjRef( xIPObj, nAspect ); - pFormat2 = pDoc->getIDocumentContentOperations().Insert(aPam, xObjRef, &aFrmSet, nullptr, nullptr ); + pFormat2 = pDoc->getIDocumentContentOperations().Insert(aPam, xObjRef, &aFrameSet, nullptr, nullptr ); assert(pFormat2 && "Doc->Insert(notxt) failed."); pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_INSERT, nullptr); @@ -2988,7 +2988,7 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_INSERT, nullptr); SwFlyFrameFormat* pFrameFormat = nullptr; - pFrameFormat = pDoc->getIDocumentContentOperations().InsertOLE( aPam, sStreamName, embed::Aspects::MSOLE_CONTENT, &aFrmSet, nullptr, nullptr ); + pFrameFormat = pDoc->getIDocumentContentOperations().InsertOLE( aPam, sStreamName, embed::Aspects::MSOLE_CONTENT, &aFrameSet, nullptr, nullptr ); pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_INSERT, nullptr); pFrameFormat->Add(this); if(!m_sName.isEmpty()) @@ -3014,7 +3014,7 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan mrPers.GetEmbeddedObjectContainer().InsertEmbeddedObject( obj, rName ); SwFlyFrameFormat* pFrameFormat = nullptr; - pFrameFormat = pDoc->getIDocumentContentOperations().Insert( aPam, xObj, &aFrmSet, nullptr, nullptr ); + pFrameFormat = pDoc->getIDocumentContentOperations().Insert( aPam, xObj, &aFrameSet, nullptr, nullptr ); pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_INSERT, nullptr); pFrameFormat->Add(this); if(!m_sName.isEmpty()) @@ -3073,7 +3073,7 @@ void SwXFrame::attach(const uno::Reference< text::XTextRange > & xTextRange) SwFormatAnchor aAnchor = static_cast<const SwFormatAnchor&>(aSet.Get(RES_ANCHOR)); aAnchor.SetAnchor( aIntPam.Start() ); aSet.Put(aAnchor); - pDoc->SetFlyFrmAttr( *pFormat, aSet ); + pDoc->SetFlyFrameAttr( *pFormat, aSet ); } else throw lang::IllegalArgumentException(); @@ -3286,7 +3286,7 @@ uno::Reference< container::XEnumeration > SwXTextFrame::createEnumeration() thr if(!pFormat) return nullptr; SwPosition aPos(pFormat->GetContent().GetContentIdx()->GetNode()); - auto pUnoCursor(GetDoc()->CreateUnoCrsr(aPos)); + auto pUnoCursor(GetDoc()->CreateUnoCursor(aPos)); pUnoCursor->Move(fnMoveForward, fnGoNode); return SwXParagraphEnumeration::Create(this, pUnoCursor, CURSOR_FRAME); } diff --git a/sw/source/core/unocore/unoftn.cxx b/sw/source/core/unocore/unoftn.cxx index 640efc8cae9a..f805fc50f58f 100644 --- a/sw/source/core/unocore/unoftn.cxx +++ b/sw/source/core/unocore/unoftn.cxx @@ -436,8 +436,8 @@ SwXFootnote::createTextCursor() throw (uno::RuntimeException, std::exception) SwPosition aPos( *pTextFootnote->GetStartNode() ); SwXTextCursor *const pXCursor = new SwXTextCursor(*GetDoc(), this, CURSOR_FOOTNOTE, aPos); - auto& rUnoCrsr(pXCursor->GetCursor()); - rUnoCrsr.Move(fnMoveForward, fnGoNode); + auto& rUnoCursor(pXCursor->GetCursor()); + rUnoCursor.Move(fnMoveForward, fnGoNode); const uno::Reference< text::XTextCursor > xRet = static_cast<text::XWordCursor*>(pXCursor); return xRet; @@ -483,7 +483,7 @@ SwXFootnote::createEnumeration() throw (uno::RuntimeException, std::exception) SwTextFootnote const*const pTextFootnote = rFormat.GetTextFootnote(); SwPosition aPos( *pTextFootnote->GetStartNode() ); - auto pUnoCursor(GetDoc()->CreateUnoCrsr(aPos)); + auto pUnoCursor(GetDoc()->CreateUnoCursor(aPos)); pUnoCursor->Move(fnMoveForward, fnGoNode); return SwXParagraphEnumeration::Create(this, pUnoCursor, CURSOR_FOOTNOTE); } diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx index e71a2fc1fa25..b3d00eec2861 100644 --- a/sw/source/core/unocore/unoobj.cxx +++ b/sw/source/core/unocore/unoobj.cxx @@ -282,11 +282,11 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) SwTextFormatColl *const pLocal = pStyle->GetCollection(); UnoActionContext aAction(pDoc); pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr ); - SwPaM *pTmpCrsr = &rPaM; + SwPaM *pTmpCursor = &rPaM; do { - pDoc->SetTextFormatColl(*pTmpCrsr, pLocal); - pTmpCrsr = static_cast<SwPaM*>(pTmpCrsr->GetNext()); - } while ( pTmpCrsr != &rPaM ); + pDoc->SetTextFormatColl(*pTmpCursor, pLocal); + pTmpCursor = static_cast<SwPaM*>(pTmpCursor->GetNext()); + } while ( pTmpCursor != &rPaM ); pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr ); } @@ -341,19 +341,19 @@ SwUnoCursorHelper::SetPageDesc( } static void -lcl_SetNodeNumStart(SwPaM & rCrsr, uno::Any const& rValue) +lcl_SetNodeNumStart(SwPaM & rCursor, uno::Any const& rValue) { sal_Int16 nTmp = 1; rValue >>= nTmp; sal_uInt16 nStt = (nTmp < 0 ? USHRT_MAX : (sal_uInt16)nTmp); - SwDoc* pDoc = rCrsr.GetDoc(); + SwDoc* pDoc = rCursor.GetDoc(); UnoActionContext aAction(pDoc); - if( rCrsr.GetNext() != &rCrsr ) // MultiSelection? + if( rCursor.GetNext() != &rCursor ) // MultiSelection? { pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr ); - SwPamRanges aRangeArr( rCrsr ); - SwPaM aPam( *rCrsr.GetPoint() ); + SwPamRanges aRangeArr( rCursor ); + SwPaM aPam( *rCursor.GetPoint() ); for( size_t n = 0; n < aRangeArr.Count(); ++n ) { pDoc->SetNumRuleStart(*aRangeArr.SetPam( n, aPam ).GetPoint()); @@ -364,8 +364,8 @@ lcl_SetNodeNumStart(SwPaM & rCrsr, uno::Any const& rValue) } else { - pDoc->SetNumRuleStart( *rCrsr.GetPoint()); - pDoc->SetNodeNumStart( *rCrsr.GetPoint(), nStt ); + pDoc->SetNumRuleStart( *rCursor.GetPoint()); + pDoc->SetNodeNumStart( *rCursor.GetPoint(), nStt ); } } @@ -389,7 +389,7 @@ lcl_setCharFormatSequence(SwPaM & rPam, uno::Any const& rValue) lcl_setCharStyle(rPam.GetDoc(), aStyle, aSet); // the first style should replace the current attributes, // all other have to be added - SwUnoCursorHelper::SetCrsrAttr(rPam, aSet, (nStyle) + SwUnoCursorHelper::SetCursorAttr(rPam, aSet, (nStyle) ? SetAttrMode::DONTREPLACE : SetAttrMode::DEFAULT); rPam.GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_START, nullptr); @@ -617,11 +617,11 @@ SwUnoCursorHelper::GetCurTextFormatColl(SwPaM & rPaM, const bool bConditional) static const sal_uLong nMaxLookup = 1000; SwFormatColl *pFormat = nullptr; bool bError = false; - SwPaM *pTmpCrsr = &rPaM; + SwPaM *pTmpCursor = &rPaM; do { - const sal_uLong nSttNd = pTmpCrsr->Start()->nNode.GetIndex(); - const sal_uLong nEndNd = pTmpCrsr->End()->nNode.GetIndex(); + const sal_uLong nSttNd = pTmpCursor->Start()->nNode.GetIndex(); + const sal_uLong nEndNd = pTmpCursor->End()->nNode.GetIndex(); if( nEndNd - nSttNd >= nMaxLookup ) { @@ -649,8 +649,8 @@ SwUnoCursorHelper::GetCurTextFormatColl(SwPaM & rPaM, const bool bConditional) } } - pTmpCrsr = static_cast<SwPaM*>(pTmpCrsr->GetNext()); - } while ( pTmpCrsr != &rPaM ); + pTmpCursor = static_cast<SwPaM*>(pTmpCursor->GetNext()); + } while ( pTmpCursor != &rPaM ); return (bError) ? nullptr : pFormat; } @@ -670,7 +670,7 @@ public: : m_rPropSet(*aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_CURSOR)) , m_eType(eType) , m_xParentText(xParent) - , m_pUnoCursor(rDoc.CreateUnoCrsr(rPoint), true) + , m_pUnoCursor(rDoc.CreateUnoCursor(rPoint), true) { if (pMark) { @@ -679,14 +679,14 @@ public: } } - SwUnoCrsr& GetCursorOrThrow() { + SwUnoCursor& GetCursorOrThrow() { if(!m_pUnoCursor) throw uno::RuntimeException("SwXTextCursor: disposed or invalid", nullptr); return *m_pUnoCursor; } }; -SwUnoCrsr& SwXTextCursor::GetCursor() +SwUnoCursor& SwXTextCursor::GetCursor() { return *m_pImpl->m_pUnoCursor; } SwPaM const* SwXTextCursor::GetPaM() const @@ -726,15 +726,15 @@ SwXTextCursor::~SwXTextCursor() void SwXTextCursor::DeleteAndInsert(const OUString& rText, const bool bForceExpandHints) { - auto pUnoCrsr = static_cast<SwCursor*>(&(*m_pImpl->m_pUnoCursor)); - if(pUnoCrsr) + auto pUnoCursor = static_cast<SwCursor*>(&(*m_pImpl->m_pUnoCursor)); + if(pUnoCursor) { // Start/EndAction - SwDoc* pDoc = pUnoCrsr->GetDoc(); + SwDoc* pDoc = pUnoCursor->GetDoc(); UnoActionContext aAction(pDoc); const sal_Int32 nTextLen = rText.getLength(); pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_INSERT, nullptr); - auto pCurrent = static_cast<SwCursor*>(pUnoCrsr); + auto pCurrent = static_cast<SwCursor*>(pUnoCursor); do { if (pCurrent->HasMark()) @@ -749,12 +749,12 @@ void SwXTextCursor::DeleteAndInsert(const OUString& rText, OSL_ENSURE( bSuccess, "Doc->Insert(Str) failed." ); (void) bSuccess; - SwUnoCursorHelper::SelectPam(*pUnoCrsr, true); + SwUnoCursorHelper::SelectPam(*pUnoCursor, true); pCurrent->Left(rText.getLength(), CRSR_SKIP_CHARS, false, false); } pCurrent = static_cast<SwCursor*>(pCurrent->GetNext()); - } while (pCurrent != pUnoCrsr); + } while (pCurrent != pUnoCursor); pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_INSERT, nullptr); } } @@ -890,7 +890,7 @@ void SAL_CALL SwXTextCursor::collapseToStart() throw (uno::RuntimeException, std { SolarMutexGuard aGuard; - SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + SwUnoCursor & rUnoCursor( m_pImpl->GetCursorOrThrow() ); if (rUnoCursor.HasMark()) { @@ -906,7 +906,7 @@ void SAL_CALL SwXTextCursor::collapseToEnd() throw (uno::RuntimeException, std:: { SolarMutexGuard aGuard; - SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + SwUnoCursor & rUnoCursor( m_pImpl->GetCursorOrThrow() ); if (rUnoCursor.HasMark()) { @@ -923,10 +923,10 @@ sal_Bool SAL_CALL SwXTextCursor::isCollapsed() throw (uno::RuntimeException, std SolarMutexGuard aGuard; bool bRet = true; - auto pUnoCrsr(m_pImpl->m_pUnoCursor); - if(pUnoCrsr && pUnoCrsr->GetMark()) + auto pUnoCursor(m_pImpl->m_pUnoCursor); + if(pUnoCursor && pUnoCursor->GetMark()) { - bRet = (*pUnoCrsr->GetPoint() == *pUnoCrsr->GetMark()); + bRet = (*pUnoCursor->GetPoint() == *pUnoCursor->GetMark()); } return bRet; } @@ -937,7 +937,7 @@ throw (uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + SwUnoCursor & rUnoCursor( m_pImpl->GetCursorOrThrow() ); SwUnoCursorHelper::SelectPam(rUnoCursor, Expand); bool bRet = rUnoCursor.Left( nCount, CRSR_SKIP_CHARS, false, false); @@ -956,7 +956,7 @@ throw (uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + SwUnoCursor & rUnoCursor( m_pImpl->GetCursorOrThrow() ); SwUnoCursorHelper::SelectPam(rUnoCursor, Expand); bool bRet = rUnoCursor.Right(nCount, CRSR_SKIP_CHARS, false, false); @@ -974,7 +974,7 @@ SwXTextCursor::gotoStart(sal_Bool Expand) throw (uno::RuntimeException, std::exc { SolarMutexGuard aGuard; - SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + SwUnoCursor & rUnoCursor( m_pImpl->GetCursorOrThrow() ); SwUnoCursorHelper::SelectPam(rUnoCursor, Expand); if (CURSOR_BODY == m_pImpl->m_eType) @@ -1030,7 +1030,7 @@ SwXTextCursor::gotoEnd(sal_Bool Expand) throw (uno::RuntimeException, std::excep { SolarMutexGuard aGuard; - SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + SwUnoCursor & rUnoCursor( m_pImpl->GetCursorOrThrow() ); SwUnoCursorHelper::SelectPam(rUnoCursor, Expand); if (CURSOR_BODY == m_pImpl->m_eType) @@ -1064,7 +1064,7 @@ throw (uno::RuntimeException, std::exception) throw uno::RuntimeException(); } - SwUnoCrsr & rOwnCursor( m_pImpl->GetCursorOrThrow() ); + SwUnoCursor & rOwnCursor( m_pImpl->GetCursorOrThrow() ); uno::Reference<lang::XUnoTunnel> xRangeTunnel( xRange, uno::UNO_QUERY); SwXTextRange* pRange = nullptr; @@ -1202,7 +1202,7 @@ sal_Bool SAL_CALL SwXTextCursor::isStartOfWord() throw (uno::RuntimeException, s { SolarMutexGuard aGuard; - SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + SwUnoCursor & rUnoCursor( m_pImpl->GetCursorOrThrow() ); const bool bRet = rUnoCursor.IsStartWordWT( i18n::WordType::DICTIONARY_WORD ); @@ -1213,7 +1213,7 @@ sal_Bool SAL_CALL SwXTextCursor::isEndOfWord() throw (uno::RuntimeException, std { SolarMutexGuard aGuard; - SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + SwUnoCursor & rUnoCursor( m_pImpl->GetCursorOrThrow() ); const bool bRet = rUnoCursor.IsEndWordWT( i18n::WordType::DICTIONARY_WORD ); @@ -1225,7 +1225,7 @@ SwXTextCursor::gotoNextWord(sal_Bool Expand) throw (uno::RuntimeException, std:: { SolarMutexGuard aGuard; - SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + SwUnoCursor & rUnoCursor( m_pImpl->GetCursorOrThrow() ); // problems arise when a paragraph starts with something other than a word bool bRet = false; @@ -1272,7 +1272,7 @@ SwXTextCursor::gotoPreviousWord(sal_Bool Expand) throw (uno::RuntimeException, s { SolarMutexGuard aGuard; - SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + SwUnoCursor & rUnoCursor( m_pImpl->GetCursorOrThrow() ); // white spaces create problems on the paragraph start bool bRet = false; @@ -1312,7 +1312,7 @@ SwXTextCursor::gotoEndOfWord(sal_Bool Expand) throw (uno::RuntimeException, std: { SolarMutexGuard aGuard; - SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + SwUnoCursor & rUnoCursor( m_pImpl->GetCursorOrThrow() ); bool bRet = false; SwPosition *const pPoint = rUnoCursor.GetPoint(); @@ -1348,7 +1348,7 @@ SwXTextCursor::gotoStartOfWord(sal_Bool Expand) throw (uno::RuntimeException, st { SolarMutexGuard aGuard; - SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + SwUnoCursor & rUnoCursor( m_pImpl->GetCursorOrThrow() ); bool bRet = false; SwPosition *const pPoint = rUnoCursor.GetPoint(); @@ -1384,7 +1384,7 @@ SwXTextCursor::isStartOfSentence() throw (uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + SwUnoCursor & rUnoCursor( m_pImpl->GetCursorOrThrow() ); // start of paragraph? bool bRet = rUnoCursor.GetPoint()->nContent == 0; @@ -1394,10 +1394,10 @@ SwXTextCursor::isStartOfSentence() throw (uno::RuntimeException, std::exception) if (!bRet && (!rUnoCursor.HasMark() || *rUnoCursor.GetPoint() == *rUnoCursor.GetMark())) { - SwCursor aCrsr(*rUnoCursor.GetPoint(),nullptr,false); - SwPosition aOrigPos = *aCrsr.GetPoint(); - aCrsr.GoSentence(SwCursor::START_SENT ); - bRet = aOrigPos == *aCrsr.GetPoint(); + SwCursor aCursor(*rUnoCursor.GetPoint(),nullptr,false); + SwPosition aOrigPos = *aCursor.GetPoint(); + aCursor.GoSentence(SwCursor::START_SENT ); + bRet = aOrigPos == *aCursor.GetPoint(); } return bRet; } @@ -1407,7 +1407,7 @@ SwXTextCursor::isEndOfSentence() throw (uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + SwUnoCursor & rUnoCursor( m_pImpl->GetCursorOrThrow() ); // end of paragraph? bool bRet = rUnoCursor.GetContentNode() && @@ -1418,10 +1418,10 @@ SwXTextCursor::isEndOfSentence() throw (uno::RuntimeException, std::exception) if (!bRet && (!rUnoCursor.HasMark() || *rUnoCursor.GetPoint() == *rUnoCursor.GetMark())) { - SwCursor aCrsr(*rUnoCursor.GetPoint(), nullptr, false); - SwPosition aOrigPos = *aCrsr.GetPoint(); - aCrsr.GoSentence(SwCursor::END_SENT); - bRet = aOrigPos == *aCrsr.GetPoint(); + SwCursor aCursor(*rUnoCursor.GetPoint(), nullptr, false); + SwPosition aOrigPos = *aCursor.GetPoint(); + aCursor.GoSentence(SwCursor::END_SENT); + bRet = aOrigPos == *aCursor.GetPoint(); } return bRet; } @@ -1431,7 +1431,7 @@ SwXTextCursor::gotoNextSentence(sal_Bool Expand) throw (uno::RuntimeException, s { SolarMutexGuard aGuard; - SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + SwUnoCursor & rUnoCursor( m_pImpl->GetCursorOrThrow() ); const bool bWasEOS = isEndOfSentence(); SwUnoCursorHelper::SelectPam(rUnoCursor, Expand); @@ -1467,7 +1467,7 @@ throw (uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + SwUnoCursor & rUnoCursor( m_pImpl->GetCursorOrThrow() ); SwUnoCursorHelper::SelectPam(rUnoCursor, Expand); bool bRet = rUnoCursor.GoSentence(SwCursor::PREV_SENT); @@ -1496,7 +1496,7 @@ throw (uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + SwUnoCursor & rUnoCursor( m_pImpl->GetCursorOrThrow() ); SwUnoCursorHelper::SelectPam(rUnoCursor, Expand); // if we're at the para start then we wont move @@ -1519,7 +1519,7 @@ SwXTextCursor::gotoEndOfSentence(sal_Bool Expand) throw (uno::RuntimeException, { SolarMutexGuard aGuard; - SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + SwUnoCursor & rUnoCursor( m_pImpl->GetCursorOrThrow() ); SwUnoCursorHelper::SelectPam(rUnoCursor, Expand); // bRet is true if GoSentence() succeeded or if the @@ -1543,7 +1543,7 @@ SwXTextCursor::isStartOfParagraph() throw (uno::RuntimeException, std::exception { SolarMutexGuard aGuard; - SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + SwUnoCursor & rUnoCursor( m_pImpl->GetCursorOrThrow() ); const bool bRet = SwUnoCursorHelper::IsStartOfPara(rUnoCursor); return bRet; @@ -1554,7 +1554,7 @@ SwXTextCursor::isEndOfParagraph() throw (uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + SwUnoCursor & rUnoCursor( m_pImpl->GetCursorOrThrow() ); const bool bRet = SwUnoCursorHelper::IsEndOfPara(rUnoCursor); return bRet; @@ -1566,7 +1566,7 @@ throw (uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + SwUnoCursor & rUnoCursor( m_pImpl->GetCursorOrThrow() ); if (CURSOR_META == m_pImpl->m_eType) { @@ -1591,7 +1591,7 @@ SwXTextCursor::gotoEndOfParagraph(sal_Bool Expand) throw (uno::RuntimeException, { SolarMutexGuard aGuard; - SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + SwUnoCursor & rUnoCursor( m_pImpl->GetCursorOrThrow() ); if (CURSOR_META == m_pImpl->m_eType) { @@ -1616,7 +1616,7 @@ SwXTextCursor::gotoNextParagraph(sal_Bool Expand) throw (uno::RuntimeException, { SolarMutexGuard aGuard; - SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + SwUnoCursor & rUnoCursor( m_pImpl->GetCursorOrThrow() ); if (CURSOR_META == m_pImpl->m_eType) { @@ -1633,7 +1633,7 @@ throw (uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + SwUnoCursor & rUnoCursor( m_pImpl->GetCursorOrThrow() ); if (CURSOR_META == m_pImpl->m_eType) { @@ -1657,7 +1657,7 @@ SwXTextCursor::getStart() throw (uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + SwUnoCursor & rUnoCursor( m_pImpl->GetCursorOrThrow() ); uno::Reference< text::XTextRange > xRet; SwPaM aPam(*rUnoCursor.Start()); @@ -1683,7 +1683,7 @@ SwXTextCursor::getEnd() throw (uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + SwUnoCursor & rUnoCursor( m_pImpl->GetCursorOrThrow() ); uno::Reference< text::XTextRange > xRet; SwPaM aPam(*rUnoCursor.End()); @@ -1708,7 +1708,7 @@ OUString SAL_CALL SwXTextCursor::getString() throw (uno::RuntimeException, std:: { SolarMutexGuard aGuard; - SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + SwUnoCursor & rUnoCursor( m_pImpl->GetCursorOrThrow() ); OUString aText; SwUnoCursorHelper::GetTextFromPam(rUnoCursor, aText); @@ -1720,7 +1720,7 @@ SwXTextCursor::setString(const OUString& aString) throw (uno::RuntimeException, { SolarMutexGuard aGuard; - SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + SwUnoCursor & rUnoCursor( m_pImpl->GetCursorOrThrow() ); (void) rUnoCursor; // just to check if valid const bool bForceExpandHints( (CURSOR_META == m_pImpl->m_eType) @@ -1747,7 +1747,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, } beans::PropertyState eTemp; - const bool bDone = SwUnoCursorHelper::getCrsrPropertyValue( + const bool bDone = SwUnoCursorHelper::getCursorPropertyValue( *pEntry, rPaM, &aAny, eTemp ); if (!bDone) @@ -1757,7 +1757,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, RES_TXTATR_UNKNOWN_CONTAINER, RES_TXTATR_UNKNOWN_CONTAINER, RES_UNKNOWNATR_CONTAINER, RES_UNKNOWNATR_CONTAINER, 0L); - SwUnoCursorHelper::GetCrsrAttr(rPaM, aSet); + SwUnoCursorHelper::GetCursorAttr(rPaM, aSet); rPropSet.getPropertyValue(*pEntry, aSet, aAny); } @@ -1782,7 +1782,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, // FN_UNO_PARA_STYLE is known to set attributes for nodes, inside // SwUnoCursorHelper::SetTextFormatColl, instead of extending item set. -// We need to get them from nodes in next call to GetCrsrAttr. +// We need to get them from nodes in next call to GetCursorAttr. // The rest could cause similar problems in theory, so we just list them here. inline bool propertyCausesSideEffectsInNodes(sal_uInt16 nWID) { @@ -1851,7 +1851,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, // we need to get up-to-date item set from nodes if (i == 0 || bPreviousPropertyCausesSideEffectsInNodes) - SwUnoCursorHelper::GetCrsrAttr(rPaM, aItemSet); + SwUnoCursorHelper::GetCursorAttr(rPaM, aItemSet); const uno::Any &rValue = rPropertyValues[i].Value; // this can set some attributes in nodes' mpAttrSet @@ -1859,7 +1859,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, rPropSet.setPropertyValue(*pEntry, rValue, aItemSet); if (i + 1 == aEntries.size() || bPropertyCausesSideEffectsInNodes) - SwUnoCursorHelper::SetCrsrAttr(rPaM, aItemSet, nAttrMode, bTableMode); + SwUnoCursorHelper::SetCursorAttr(rPaM, aItemSet, nAttrMode, bTableMode); bPreviousPropertyCausesSideEffectsInNodes = bPropertyCausesSideEffectsInNodes; } @@ -1925,7 +1925,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception) if ( pEntry->nWID >= FN_UNO_RANGE_BEGIN && pEntry->nWID <= FN_UNO_RANGE_END ) { - (void)SwUnoCursorHelper::getCrsrPropertyValue( + (void)SwUnoCursorHelper::getCursorPropertyValue( *pEntry, rPaM, nullptr, pStates[i] ); } else @@ -1954,7 +1954,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception) 0L )); } // #i63870# - SwUnoCursorHelper::GetCrsrAttr( rPaM, *pSet ); + SwUnoCursorHelper::GetCursorAttr( rPaM, *pSet ); } pStates[i] = ( pSet->Count() ) @@ -1968,7 +1968,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception) { pSetParent.reset( pSet->Clone( false ) ); // #i63870# - SwUnoCursorHelper::GetCrsrAttr( + SwUnoCursorHelper::GetCursorAttr( rPaM, *pSetParent, true, false ); } @@ -2001,7 +2001,7 @@ lcl_SelectParaAndReset( SwPaM &rPaM, SwDoc & rDoc, // if we are reseting paragraph attributes, we need to select the full paragraph first SwPosition aStart = *rPaM.Start(); SwPosition aEnd = *rPaM.End(); - auto pTemp ( rDoc.CreateUnoCrsr(aStart) ); + auto pTemp ( rDoc.CreateUnoCursor(aStart) ); if(!SwUnoCursorHelper::IsStartOfPara(*pTemp)) { pTemp->MovePara(fnParaCurr, fnParaStart); @@ -2053,7 +2053,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception) } else { - SwUnoCursorHelper::resetCrsrPropertyValue(*pEntry, rPaM); + SwUnoCursorHelper::resetCursorPropertyValue(*pEntry, rPaM); } } @@ -2090,7 +2090,7 @@ SwXTextCursor::getPropertySetInfo() throw (uno::RuntimeException, std::exception static uno::Reference< beans::XPropertySetInfo > xRef; if(!xRef.is()) { - static SfxItemPropertyMapEntry const aCrsrExtMap_Impl[] = + static SfxItemPropertyMapEntry const aCursorExtMap_Impl[] = { { OUString(UNO_NAME_IS_SKIP_HIDDEN_TEXT), FN_SKIP_HIDDEN_TEXT, cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, { OUString(UNO_NAME_IS_SKIP_PROTECTED_TEXT), FN_SKIP_PROTECTED_TEXT, cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, @@ -2101,7 +2101,7 @@ SwXTextCursor::getPropertySetInfo() throw (uno::RuntimeException, std::exception // extend PropertySetInfo! const uno::Sequence<beans::Property> aPropSeq = xInfo->getProperties(); xRef = new SfxExtItemPropertySetInfo( - aCrsrExtMap_Impl, + aCursorExtMap_Impl, aPropSeq ); } return xRef; @@ -2116,7 +2116,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, { SolarMutexGuard aGuard; - SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + SwUnoCursor & rUnoCursor( m_pImpl->GetCursorOrThrow() ); if (rPropertyName == UNO_NAME_IS_SKIP_HIDDEN_TEXT) { @@ -2150,7 +2150,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, { SolarMutexGuard aGuard; - SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + SwUnoCursor & rUnoCursor( m_pImpl->GetCursorOrThrow() ); uno::Any aAny; if (rPropertyName == UNO_NAME_IS_SKIP_HIDDEN_TEXT) @@ -2217,7 +2217,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + SwUnoCursor & rUnoCursor( m_pImpl->GetCursorOrThrow() ); const beans::PropertyState eRet = SwUnoCursorHelper::GetPropertyState( rUnoCursor, m_pImpl->m_rPropSet, rPropertyName); @@ -2231,7 +2231,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + SwUnoCursor & rUnoCursor( m_pImpl->GetCursorOrThrow() ); return SwUnoCursorHelper::GetPropertyStates( rUnoCursor, m_pImpl->m_rPropSet, rPropertyNames); @@ -2271,7 +2271,7 @@ void SAL_CALL SwXTextCursor::setPropertyValues( SolarMutexGuard aGuard; - SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + SwUnoCursor & rUnoCursor( m_pImpl->GetCursorOrThrow() ); // a little lame to have to copy into this. uno::Sequence< beans::PropertyValue > aPropertyValues( aValues.getLength() ); @@ -2372,7 +2372,7 @@ throw (uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + SwUnoCursor & rUnoCursor( m_pImpl->GetCursorOrThrow() ); std::set<sal_uInt16> aParaWhichIds; std::set<sal_uInt16> aWhichIds; @@ -2396,7 +2396,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + SwUnoCursor & rUnoCursor( m_pImpl->GetCursorOrThrow() ); const sal_Int32 nCount = rPropertyNames.getLength(); if ( nCount ) @@ -2440,7 +2440,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception) } else if (pEntry->nWID == FN_UNO_NUM_START_VALUE) { - SwUnoCursorHelper::resetCrsrPropertyValue(*pEntry, rUnoCursor); + SwUnoCursorHelper::resetCursorPropertyValue(*pEntry, rUnoCursor); } } @@ -2463,7 +2463,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, { SolarMutexGuard aGuard; - SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + SwUnoCursor & rUnoCursor( m_pImpl->GetCursorOrThrow() ); const sal_Int32 nCount = rPropertyNames.getLength(); uno::Sequence< uno::Any > aRet(nCount); @@ -2503,7 +2503,7 @@ throw (uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + SwUnoCursor & rUnoCursor( m_pImpl->GetCursorOrThrow() ); SwNode& node = rUnoCursor.GetNode(); @@ -2544,7 +2544,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + SwUnoCursor & rUnoCursor( m_pImpl->GetCursorOrThrow() ); SwUnoCursorHelper::makeRedline(rUnoCursor, rRedlineType, rRedlineProperties); } @@ -2556,7 +2556,7 @@ throw (lang::IllegalArgumentException, io::IOException, { SolarMutexGuard aGuard; - SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + SwUnoCursor & rUnoCursor( m_pImpl->GetCursorOrThrow() ); SwUnoCursorHelper::InsertFile(&rUnoCursor, rURL, rOptions); } @@ -2892,7 +2892,7 @@ SwXTextCursor::sort(const uno::Sequence< beans::PropertyValue >& rDescriptor) { SolarMutexGuard aGuard; - SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + SwUnoCursor & rUnoCursor( m_pImpl->GetCursorOrThrow() ); if (rUnoCursor.HasMark()) { @@ -2937,7 +2937,7 @@ throw (uno::RuntimeException, std::exception) SolarMutexGuard g; if (rServiceName != "com.sun.star.text.TextContent") throw uno::RuntimeException(); - SwUnoCrsr& rUnoCursor( m_pImpl->GetCursorOrThrow() ); + SwUnoCursor& rUnoCursor( m_pImpl->GetCursorOrThrow() ); return SwXParaFrameEnumeration::Create(rUnoCursor, PARAFRAME_PORTION_TEXTRANGE); } @@ -2946,7 +2946,7 @@ SwXTextCursor::createEnumeration() throw (uno::RuntimeException, std::exception) { SolarMutexGuard g; - SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + SwUnoCursor & rUnoCursor( m_pImpl->GetCursorOrThrow() ); const uno::Reference<lang::XUnoTunnel> xTunnel( m_pImpl->m_xParentText, uno::UNO_QUERY); @@ -2961,11 +2961,11 @@ SwXTextCursor::createEnumeration() throw (uno::RuntimeException, std::exception) throw uno::RuntimeException(); } - auto pNewCrsr(rUnoCursor.GetDoc()->CreateUnoCrsr(*rUnoCursor.GetPoint()) ); + auto pNewCursor(rUnoCursor.GetDoc()->CreateUnoCursor(*rUnoCursor.GetPoint()) ); if (rUnoCursor.HasMark()) { - pNewCrsr->SetMark(); - *pNewCrsr->GetMark() = *rUnoCursor.GetMark(); + pNewCursor->SetMark(); + *pNewCursor->GetMark() = *rUnoCursor.GetMark(); } const CursorType eSetType = (CURSOR_TBLTEXT == m_pImpl->m_eType) ? CURSOR_SELECTION_IN_TABLE : CURSOR_SELECTION; @@ -2974,7 +2974,7 @@ SwXTextCursor::createEnumeration() throw (uno::RuntimeException, std::exception) : nullptr); SwTable const*const pTable( (pStartNode) ? & pStartNode->GetTable() : nullptr ); - return SwXParagraphEnumeration::Create(pParentText, pNewCrsr, eSetType, pStartNode, pTable); + return SwXParagraphEnumeration::Create(pParentText, pNewCursor, eSetType, pStartNode, pTable); } uno::Type SAL_CALL diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index 5e35fa3e43c2..2b1827560566 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -166,11 +166,11 @@ struct FrameClientSortListLess namespace { - void lcl_CollectFrameAtNodeWithLayout(SwDoc* pDoc, const SwContentFrm* pCFrm, + void lcl_CollectFrameAtNodeWithLayout(SwDoc* pDoc, const SwContentFrame* pCFrame, FrameClientSortList_t& rFrames, const sal_uInt16 nAnchorType) { - auto pObjs = pCFrm->GetDrawObjs(); + auto pObjs = pCFrame->GetDrawObjs(); if(!pObjs) return; const auto aTextBoxes = SwTextBoxHelper::findTextBoxes(pDoc); @@ -206,13 +206,13 @@ void CollectFrameAtNode( const SwNodeIndex& rIdx, const auto nChkType = static_cast< sal_uInt16 >((bAtCharAnchoredObjs) ? FLY_AT_CHAR : FLY_AT_PARA); - const SwContentFrm* pCFrm; + const SwContentFrame* pCFrame; const SwContentNode* pCNd; if( pDoc->getIDocumentLayoutAccess().GetCurrentViewShell() && nullptr != (pCNd = rIdx.GetNode().GetContentNode()) && - nullptr != (pCFrm = pCNd->getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout())) ) + nullptr != (pCFrame = pCNd->getLayoutFrame( pDoc->getIDocumentLayoutAccess().GetCurrentLayout())) ) { - lcl_CollectFrameAtNodeWithLayout(pDoc, pCFrm, rFrames, nChkType); + lcl_CollectFrameAtNodeWithLayout(pDoc, pCFrame, rFrames, nChkType); } else { @@ -244,10 +244,10 @@ void CollectFrameAtNode( const SwNodeIndex& rIdx, UnoActionContext::UnoActionContext(SwDoc *const pDoc) : m_pDoc(pDoc) { - SwRootFrm *const pRootFrm = m_pDoc->getIDocumentLayoutAccess().GetCurrentLayout(); - if (pRootFrm) + SwRootFrame *const pRootFrame = m_pDoc->getIDocumentLayoutAccess().GetCurrentLayout(); + if (pRootFrame) { - pRootFrm->StartAllAction(); + pRootFrame->StartAllAction(); } } @@ -256,10 +256,10 @@ UnoActionContext::~UnoActionContext() // Doc may already have been removed here if (m_pDoc) { - SwRootFrm *const pRootFrm = m_pDoc->getIDocumentLayoutAccess().GetCurrentLayout(); - if (pRootFrm) + SwRootFrame *const pRootFrame = m_pDoc->getIDocumentLayoutAccess().GetCurrentLayout(); + if (pRootFrame) { - pRootFrm->EndAllAction(); + pRootFrame->EndAllAction(); } } } @@ -267,10 +267,10 @@ UnoActionContext::~UnoActionContext() static void lcl_RemoveImpl(SwDoc *const pDoc) { assert(pDoc); - SwRootFrm *const pRootFrm = pDoc->getIDocumentLayoutAccess().GetCurrentLayout(); - if (pRootFrm) + SwRootFrame *const pRootFrame = pDoc->getIDocumentLayoutAccess().GetCurrentLayout(); + if (pRootFrame) { - pRootFrm->UnoRemoveAllActions(); + pRootFrame->UnoRemoveAllActions(); } } @@ -280,7 +280,7 @@ UnoActionRemoveContext::UnoActionRemoveContext(SwDoc *const pDoc) lcl_RemoveImpl(m_pDoc); } -static SwDoc * lcl_IsNewStyleTable(SwUnoTableCrsr const& rCursor) +static SwDoc * lcl_IsNewStyleTable(SwUnoTableCursor const& rCursor) { SwTableNode *const pTableNode = rCursor.GetNode().FindTableNode(); return (pTableNode && !pTableNode->GetTable().IsNewModel()) @@ -288,11 +288,11 @@ static SwDoc * lcl_IsNewStyleTable(SwUnoTableCrsr const& rCursor) : nullptr; } -UnoActionRemoveContext::UnoActionRemoveContext(SwUnoTableCrsr const& rCursor) +UnoActionRemoveContext::UnoActionRemoveContext(SwUnoTableCursor const& rCursor) : m_pDoc(lcl_IsNewStyleTable(rCursor)) { // this insanity is only necessary for old-style tables - // because SwRootFrm::MakeTableCrsrs() creates the table cursor for these + // because SwRootFrame::MakeTableCursors() creates the table cursor for these if (m_pDoc) { lcl_RemoveImpl(m_pDoc); @@ -303,10 +303,10 @@ UnoActionRemoveContext::~UnoActionRemoveContext() { if (m_pDoc) { - SwRootFrm *const pRootFrm = m_pDoc->getIDocumentLayoutAccess().GetCurrentLayout(); - if (pRootFrm) + SwRootFrame *const pRootFrame = m_pDoc->getIDocumentLayoutAccess().GetCurrentLayout(); + if (pRootFrame) { - pRootFrm->UnoRestoreAllActions(); + pRootFrame->UnoRestoreAllActions(); } } } @@ -330,7 +330,7 @@ void ClientModify(SwClient* pClient, const SfxPoolItem *pOld, const SfxPoolItem } } -void SwUnoCursorHelper::SetCrsrAttr(SwPaM & rPam, +void SwUnoCursorHelper::SetCursorAttr(SwPaM & rPam, const SfxItemSet& rSet, const SetAttrMode nAttrMode, const bool bTableMode) { @@ -372,7 +372,7 @@ void SwUnoCursorHelper::SetCrsrAttr(SwPaM & rPam, // #i63870# // split third parameter <bCurrentAttrOnly> into new parameters <bOnlyTextAttr> // and <bGetFromChrFormat> to get better control about resulting <SfxItemSet> -void SwUnoCursorHelper::GetCrsrAttr(SwPaM & rPam, +void SwUnoCursorHelper::GetCursorAttr(SwPaM & rPam, SfxItemSet & rSet, const bool bOnlyTextAttr, const bool bGetFromChrFormat) { static const sal_uLong nMaxLookup = 1000; @@ -450,11 +450,11 @@ struct SwXParagraphEnumerationImpl final : public SwXParagraphEnumeration sal_Int32 m_nLastParaEnd; bool m_bFirstParagraph; uno::Reference< text::XTextContent > m_xNextPara; - sw::UnoCursorPointer m_pCrsr; + sw::UnoCursorPointer m_pCursor; SwXParagraphEnumerationImpl( uno::Reference< text::XText > const& xParent, - ::std::shared_ptr<SwUnoCrsr> pCursor, + ::std::shared_ptr<SwUnoCursor> pCursor, const CursorType eType, SwStartNode const*const pStartNode, SwTable const*const pTable) : m_xParentText( xParent ) @@ -469,7 +469,7 @@ struct SwXParagraphEnumerationImpl final : public SwXParagraphEnumeration , m_nFirstParaStart( -1 ) , m_nLastParaEnd( -1 ) , m_bFirstParagraph( true ) - , m_pCrsr(pCursor) + , m_pCursor(pCursor) { OSL_ENSURE(m_xParentText.is(), "SwXParagraphEnumeration: no parent?"); OSL_ENSURE( !((CURSOR_SELECTION_IN_TABLE == eType) || @@ -480,7 +480,7 @@ struct SwXParagraphEnumerationImpl final : public SwXParagraphEnumeration if ((CURSOR_SELECTION == m_eCursorType) || (CURSOR_SELECTION_IN_TABLE == m_eCursorType)) { - SwUnoCrsr & rCursor = GetCursor(); + SwUnoCursor & rCursor = GetCursor(); rCursor.Normalize(); m_nFirstParaStart = rCursor.GetPoint()->nContent.GetIndex(); m_nLastParaEnd = rCursor.GetMark()->nContent.GetIndex(); @@ -489,7 +489,7 @@ struct SwXParagraphEnumerationImpl final : public SwXParagraphEnumeration } virtual ~SwXParagraphEnumerationImpl() - { m_pCrsr.reset(nullptr); } + { m_pCursor.reset(nullptr); } virtual void SAL_CALL release() throw () override { SolarMutexGuard g; @@ -508,15 +508,15 @@ struct SwXParagraphEnumerationImpl final : public SwXParagraphEnumeration virtual sal_Bool SAL_CALL hasMoreElements() throw (css::uno::RuntimeException, std::exception) override; virtual css::uno::Any SAL_CALL nextElement() throw (css::container::NoSuchElementException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) override; - SwUnoCrsr& GetCursor() - { return *m_pCrsr; } + SwUnoCursor& GetCursor() + { return *m_pCursor; } uno::Reference< text::XTextContent > NextElement_Impl() throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException); }; SwXParagraphEnumeration* SwXParagraphEnumeration::Create( uno::Reference< text::XText > const& xParent, - ::std::shared_ptr<SwUnoCrsr> pCursor, + ::std::shared_ptr<SwUnoCursor> pCursor, const CursorType eType, SwStartNode const*const pStartNode, SwTable const*const pTable) @@ -531,7 +531,7 @@ SwXParagraphEnumerationImpl::hasMoreElements() throw (uno::RuntimeException, std return m_bFirstParagraph || m_xNextPara.is(); } -//!! compare to SwShellTableCrsr::FillRects() in viscrs.cxx +//!! compare to SwShellTableCursor::FillRects() in viscrs.cxx static SwTableNode * lcl_FindTopLevelTable( SwTableNode *const pTableNode, SwTable const*const pOwnTable) @@ -550,17 +550,17 @@ lcl_FindTopLevelTable( static bool lcl_CursorIsInSection( - SwUnoCrsr const*const pUnoCrsr, SwStartNode const*const pOwnStartNode) + SwUnoCursor const*const pUnoCursor, SwStartNode const*const pOwnStartNode) { // returns true if the cursor is in the section (or in a sub section!) // represented by pOwnStartNode bool bRes = true; - if (pUnoCrsr && pOwnStartNode) + if (pUnoCursor && pOwnStartNode) { const SwEndNode * pOwnEndNode = pOwnStartNode->EndOfSectionNode(); - bRes = pOwnStartNode->GetIndex() <= pUnoCrsr->Start()->nNode.GetIndex() && - pUnoCrsr->End()->nNode.GetIndex() <= pOwnEndNode->GetIndex(); + bRes = pOwnStartNode->GetIndex() <= pUnoCursor->Start()->nNode.GetIndex() && + pUnoCursor->End()->nNode.GetIndex() <= pOwnEndNode->GetIndex(); } return bRes; } @@ -568,36 +568,36 @@ lcl_CursorIsInSection( uno::Reference< text::XTextContent > SwXParagraphEnumerationImpl::NextElement_Impl() throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) { - SwUnoCrsr& rUnoCrsr = GetCursor(); + SwUnoCursor& rUnoCursor = GetCursor(); // check for exceeding selections if (!m_bFirstParagraph && ((CURSOR_SELECTION == m_eCursorType) || (CURSOR_SELECTION_IN_TABLE == m_eCursorType))) { - SwPosition* pStart = rUnoCrsr.Start(); - auto aNewCrsr(rUnoCrsr.GetDoc()->CreateUnoCrsr(*pStart)); + SwPosition* pStart = rUnoCursor.Start(); + auto aNewCursor(rUnoCursor.GetDoc()->CreateUnoCursor(*pStart)); // one may also go into tables here if ((CURSOR_TBLTEXT != m_eCursorType) && (CURSOR_SELECTION_IN_TABLE != m_eCursorType)) { - aNewCrsr->SetRemainInSection( false ); + aNewCursor->SetRemainInSection( false ); } // os 2005-01-14: This part is only necessary to detect movements out // of a selection; if there is no selection we don't have to care - SwTableNode *const pTableNode = aNewCrsr->GetNode().FindTableNode(); + SwTableNode *const pTableNode = aNewCursor->GetNode().FindTableNode(); if (((CURSOR_TBLTEXT != m_eCursorType) && (CURSOR_SELECTION_IN_TABLE != m_eCursorType)) && pTableNode) { - aNewCrsr->GetPoint()->nNode = pTableNode->EndOfSectionIndex(); - aNewCrsr->Move(fnMoveForward, fnGoNode); + aNewCursor->GetPoint()->nNode = pTableNode->EndOfSectionIndex(); + aNewCursor->Move(fnMoveForward, fnGoNode); } else { - aNewCrsr->MovePara(fnParaNext, fnParaStart); + aNewCursor->MovePara(fnParaNext, fnParaStart); } - if (m_nEndIndex < aNewCrsr->Start()->nNode.GetIndex()) + if (m_nEndIndex < aNewCursor->Start()->nNode.GetIndex()) { return nullptr; } @@ -606,15 +606,15 @@ SwXParagraphEnumerationImpl::NextElement_Impl() throw (container::NoSuchElementE bool bInTable = false; if (!m_bFirstParagraph) { - rUnoCrsr.SetRemainInSection( false ); + rUnoCursor.SetRemainInSection( false ); // what to do if already in a table? - SwTableNode * pTableNode = rUnoCrsr.GetNode().FindTableNode(); + SwTableNode * pTableNode = rUnoCursor.GetNode().FindTableNode(); pTableNode = lcl_FindTopLevelTable( pTableNode, m_pOwnTable ); if (pTableNode && (&pTableNode->GetTable() != m_pOwnTable)) { // this is a foreign table: go to end - rUnoCrsr.GetPoint()->nNode = pTableNode->EndOfSectionIndex(); - if (!rUnoCrsr.Move(fnMoveForward, fnGoNode)) + rUnoCursor.GetPoint()->nNode = pTableNode->EndOfSectionIndex(); + if (!rUnoCursor.Move(fnMoveForward, fnGoNode)) { return nullptr; } @@ -625,19 +625,19 @@ SwXParagraphEnumerationImpl::NextElement_Impl() throw (container::NoSuchElementE uno::Reference< text::XTextContent > xRef; // the cursor must remain in the current section or a subsection // before AND after the movement... - if (lcl_CursorIsInSection( &rUnoCrsr, m_pOwnStartNode ) && + if (lcl_CursorIsInSection( &rUnoCursor, m_pOwnStartNode ) && (m_bFirstParagraph || bInTable || - (rUnoCrsr.MovePara(fnParaNext, fnParaStart) && - lcl_CursorIsInSection( &rUnoCrsr, m_pOwnStartNode )))) + (rUnoCursor.MovePara(fnParaNext, fnParaStart) && + lcl_CursorIsInSection( &rUnoCursor, m_pOwnStartNode )))) { - SwPosition* pStart = rUnoCrsr.Start(); + SwPosition* pStart = rUnoCursor.Start(); const sal_Int32 nFirstContent = (m_bFirstParagraph) ? m_nFirstParaStart : -1; const sal_Int32 nLastContent = (m_nEndIndex == pStart->nNode.GetIndex()) ? m_nLastParaEnd : -1; // position in a table, or in a simple paragraph? - SwTableNode * pTableNode = rUnoCrsr.GetNode().FindTableNode(); + SwTableNode * pTableNode = rUnoCursor.GetNode().FindTableNode(); pTableNode = lcl_FindTopLevelTable( pTableNode, m_pOwnTable ); if (/*CURSOR_TBLTEXT != eCursorType && CURSOR_SELECTION_IN_TABLE != eCursorType && */ pTableNode && (&pTableNode->GetTable() != m_pOwnTable)) @@ -650,7 +650,7 @@ SwXParagraphEnumerationImpl::NextElement_Impl() throw (container::NoSuchElementE else { text::XText *const pText = m_xParentText.get(); - xRef = SwXParagraph::CreateXParagraph(*rUnoCrsr.GetDoc(), + xRef = SwXParagraph::CreateXParagraph(*rUnoCursor.GetDoc(), pStart->nNode.GetNode().GetTextNode(), static_cast<SwXText*>(pText), nFirstContent, nLastContent); } @@ -1039,10 +1039,10 @@ bool XTextRangeToSwPaM( SwUnoInternalPaM & rToFill, { xTextCursor.set( pText->CreateCursor() ); xTextCursor->gotoEnd(sal_True); - const uno::Reference<lang::XUnoTunnel> xCrsrTunnel( + const uno::Reference<lang::XUnoTunnel> xCursorTunnel( xTextCursor, uno::UNO_QUERY); pCursor = - ::sw::UnoTunnelGetImplementation<OTextCursorHelper>(xCrsrTunnel); + ::sw::UnoTunnelGetImplementation<OTextCursorHelper>(xCursorTunnel); } if(pRange && &pRange->GetDoc() == rToFill.GetDoc()) { @@ -1058,18 +1058,18 @@ bool XTextRangeToSwPaM( SwUnoInternalPaM & rToFill, { SwDoc* const pDoc = (pCursor) ? pCursor->GetDoc() : ((pPortion) ? pPortion->GetCursor().GetDoc() : nullptr); - const SwPaM* const pUnoCrsr = (pCursor) ? pCursor->GetPaM() + const SwPaM* const pUnoCursor = (pCursor) ? pCursor->GetPaM() : ((pPortion) ? &pPortion->GetCursor() : nullptr); - if (pUnoCrsr && pDoc == rToFill.GetDoc()) + if (pUnoCursor && pDoc == rToFill.GetDoc()) { - OSL_ENSURE(!pUnoCrsr->IsMultiSelection(), + OSL_ENSURE(!pUnoCursor->IsMultiSelection(), "what to do about rings?"); bRet = true; - *rToFill.GetPoint() = *pUnoCrsr->GetPoint(); - if (pUnoCrsr->HasMark()) + *rToFill.GetPoint() = *pUnoCursor->GetPoint(); + if (pUnoCursor->HasMark()) { rToFill.SetMark(); - *rToFill.GetMark() = *pUnoCrsr->GetMark(); + *rToFill.GetMark() = *pUnoCursor->GetMark(); } else rToFill.DeleteMark(); @@ -1118,15 +1118,15 @@ SwXTextRange::CreateXTextRange( { const uno::Reference<text::XText> xParentText( ::sw::CreateParentXText(rDoc, rPos)); - const auto pNewCrsr(rDoc.CreateUnoCrsr(rPos)); + const auto pNewCursor(rDoc.CreateUnoCursor(rPos)); if(pMark) { - pNewCrsr->SetMark(); - *pNewCrsr->GetMark() = *pMark; + pNewCursor->SetMark(); + *pNewCursor->GetMark() = *pMark; } const bool isCell( dynamic_cast<SwXCell*>(xParentText.get()) ); const uno::Reference< text::XTextRange > xRet( - new SwXTextRange(*pNewCrsr, xParentText, + new SwXTextRange(*pNewCursor, xParentText, isCell ? RANGE_IN_CELL : RANGE_IN_TEXT) ); return xRet; } @@ -1252,13 +1252,13 @@ throw (uno::RuntimeException, std::exception) throw uno::RuntimeException(); } const SwPosition aPos(GetDoc().GetNodes().GetEndOfContent()); - const auto pNewCrsr(m_pImpl->m_rDoc.CreateUnoCrsr(aPos)); - if (!GetPositions(*pNewCrsr)) + const auto pNewCursor(m_pImpl->m_rDoc.CreateUnoCursor(aPos)); + if (!GetPositions(*pNewCursor)) { throw uno::RuntimeException(); } - return SwXParaFrameEnumeration::Create(*pNewCrsr, PARAFRAME_PORTION_TEXTRANGE); + return SwXParaFrameEnumeration::Create(*pNewCursor, PARAFRAME_PORTION_TEXTRANGE); } uno::Reference< container::XEnumeration > SAL_CALL @@ -1271,8 +1271,8 @@ SwXTextRange::createEnumeration() throw (uno::RuntimeException, std::exception) throw uno::RuntimeException(); } const SwPosition aPos(GetDoc().GetNodes().GetEndOfContent()); - auto pNewCrsr(m_pImpl->m_rDoc.CreateUnoCrsr(aPos)); - if (!GetPositions(*pNewCrsr)) + auto pNewCursor(m_pImpl->m_rDoc.CreateUnoCursor(aPos)); + if (!GetPositions(*pNewCursor)) { throw uno::RuntimeException(); } @@ -1283,7 +1283,7 @@ SwXTextRange::createEnumeration() throw (uno::RuntimeException, std::exception) const CursorType eSetType = (RANGE_IN_CELL == m_pImpl->m_eRangePosition) ? CURSOR_SELECTION_IN_TABLE : CURSOR_SELECTION; - return SwXParagraphEnumeration::Create(m_pImpl->m_xParentText, pNewCrsr, eSetType); + return SwXParagraphEnumeration::Create(m_pImpl->m_xParentText, pNewCursor, eSetType); } uno::Type SAL_CALL SwXTextRange::getElementType() throw (uno::RuntimeException, std::exception) @@ -1497,7 +1497,7 @@ struct SwXTextRangesImpl final : public SwXTextRanges { if (pPaM) { - m_pUnoCursor.reset(pPaM->GetDoc()->CreateUnoCrsr(*pPaM->GetPoint())); + m_pUnoCursor.reset(pPaM->GetDoc()->CreateUnoCursor(*pPaM->GetPoint())); ::sw::DeepCopyPaM(*pPaM, *GetCursor()); } MakeRanges(); @@ -1507,7 +1507,7 @@ struct SwXTextRangesImpl final : public SwXTextRanges SolarMutexGuard g; OWeakObject::release(); } - virtual SwUnoCrsr* GetCursor() override + virtual SwUnoCursor* GetCursor() override { return &(*m_pUnoCursor); }; void MakeRanges(); ::std::vector< uno::Reference< text::XTextRange > > m_Ranges; @@ -1615,7 +1615,7 @@ struct SwXParaFrameEnumerationImpl final : public SwXParaFrameEnumeration SolarMutexGuard g; OWeakObject::release(); } - SwUnoCrsr& GetCursor() + SwUnoCursor& GetCursor() { return *m_pUnoCursor; } void PurgeFrameClients() { @@ -1647,7 +1647,7 @@ SwXParaFrameEnumeration* SwXParaFrameEnumeration::Create(const SwPaM& rPaM, cons SwXParaFrameEnumerationImpl::SwXParaFrameEnumerationImpl( const SwPaM& rPaM, const enum ParaFrameMode eParaFrameMode, SwFrameFormat* const pFormat) - : m_pUnoCursor(rPaM.GetDoc()->CreateUnoCrsr(*rPaM.GetPoint())) + : m_pUnoCursor(rPaM.GetDoc()->CreateUnoCursor(*rPaM.GetPoint())) { if (rPaM.HasMark()) { @@ -1672,9 +1672,9 @@ SwXParaFrameEnumerationImpl::SwXParaFrameEnumerationImpl( if (PARAFRAME_PORTION_TEXTRANGE == eParaFrameMode) { //get all frames that are bound at paragraph or at character - for(const auto& pFlyFrm : rPaM.GetDoc()->GetAllFlyFormats(&GetCursor(), false, true)) + for(const auto& pFlyFrame : rPaM.GetDoc()->GetAllFlyFormats(&GetCursor(), false, true)) { - const auto pFrameFormat = const_cast<SwFrameFormat*>(&pFlyFrm->GetFormat()); + const auto pFrameFormat = const_cast<SwFrameFormat*>(&pFlyFrame->GetFormat()); m_vFrames.push_back(std::shared_ptr<sw::FrameClient>(new sw::FrameClient(pFrameFormat))); } } diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx index c76943b61eb2..8cf08e4f741b 100644 --- a/sw/source/core/unocore/unoparagraph.cxx +++ b/sw/source/core/unocore/unoparagraph.cxx @@ -568,7 +568,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, pValues[nProp], pPropertyNames[nProp], pEntry->nWID)) { beans::PropertyState eTemp; - const bool bDone = SwUnoCursorHelper::getCrsrPropertyValue( + const bool bDone = SwUnoCursorHelper::getCursorPropertyValue( *pEntry, aPam, &(pValues[nProp]), eTemp, &rTextNode ); if (!bDone) { @@ -646,7 +646,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) SwTextNode & rTextNode(m_pImpl->GetTextNodeOrThrow()); - //SwNode& rTextNode = pUnoCrsr->GetPoint()->nNode.GetNode(); + //SwNode& rTextNode = pUnoCursor->GetPoint()->nNode.GetNode(); //const SwAttrSet& rAttrSet = static_cast<SwTextNode&>(rTextNode).GetSwAttrSet(); //sal_uInt16 nAttrCount = rAttrSet.Count(); @@ -824,7 +824,7 @@ throw (uno::RuntimeException, std::exception) // and thus only pretendend to be paragraph attributes beans::PropertyState eTemp; const bool bDone = - SwUnoCursorHelper::getCrsrPropertyValue( + SwUnoCursorHelper::getCursorPropertyValue( *pEntry, aPam, &aValue, eTemp, &rTextNode ); // if not found try the real paragraph attributes... @@ -1150,10 +1150,10 @@ throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception) static_cast<cppu::OWeakObject *>(this)); } - const bool bBelowFrmAtrEnd(pEntry->nWID < RES_FRMATR_END); + const bool bBelowFrameAtrEnd(pEntry->nWID < RES_FRMATR_END); const bool bDrawingLayerRange(XATTR_FILL_FIRST <= pEntry->nWID && XATTR_FILL_LAST >= pEntry->nWID); - if(bBelowFrmAtrEnd || bDrawingLayerRange) + if(bBelowFrameAtrEnd || bDrawingLayerRange) { std::set<sal_uInt16> aWhichIds; @@ -1178,7 +1178,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception) // to paragraph boundaries SwPosition aStart( *aCursor.Start() ); SwPosition aEnd ( *aCursor.End() ); - auto pTemp( aCursor.GetDoc()->CreateUnoCrsr(aStart) ); + auto pTemp( aCursor.GetDoc()->CreateUnoCursor(aStart) ); if(!SwUnoCursorHelper::IsStartOfPara(*pTemp)) { pTemp->MovePara(fnParaCurr, fnParaStart); @@ -1200,7 +1200,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception) } else { - SwUnoCursorHelper::resetCrsrPropertyValue(*pEntry, aCursor); + SwUnoCursorHelper::resetCursorPropertyValue(*pEntry, aCursor); } } @@ -1228,10 +1228,10 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, static_cast<cppu::OWeakObject *>(this)); } - const bool bBelowFrmAtrEnd(pEntry->nWID < RES_FRMATR_END); + const bool bBelowFrameAtrEnd(pEntry->nWID < RES_FRMATR_END); const bool bDrawingLayerRange(XATTR_FILL_FIRST <= pEntry->nWID && XATTR_FILL_LAST >= pEntry->nWID); - if(bBelowFrmAtrEnd || bDrawingLayerRange) + if(bBelowFrameAtrEnd || bDrawingLayerRange) { const SfxPoolItem& rDefItem = rTextNode.GetDoc()->GetAttrPool().GetDefaultItem(pEntry->nWID); diff --git a/sw/source/core/unocore/unoport.cxx b/sw/source/core/unocore/unoport.cxx index ca603e804262..0c176c7fa275 100644 --- a/sw/source/core/unocore/unoport.cxx +++ b/sw/source/core/unocore/unoport.cxx @@ -62,9 +62,9 @@ public: Impl() : m_EventListeners(m_Mutex) { } }; -void SwXTextPortion::init(const SwUnoCrsr* pPortionCursor) +void SwXTextPortion::init(const SwUnoCursor* pPortionCursor) { - m_pUnoCursor = pPortionCursor->GetDoc()->CreateUnoCrsr(*pPortionCursor->GetPoint()); + m_pUnoCursor = pPortionCursor->GetDoc()->CreateUnoCursor(*pPortionCursor->GetPoint()); if (pPortionCursor->HasMark()) { m_pUnoCursor->SetMark(); @@ -73,7 +73,7 @@ void SwXTextPortion::init(const SwUnoCrsr* pPortionCursor) } SwXTextPortion::SwXTextPortion( - const SwUnoCrsr* pPortionCrsr, + const SwUnoCursor* pPortionCursor, uno::Reference< text::XText > const& rParent, SwTextPortionType eType) : m_pImpl(new Impl) @@ -88,11 +88,11 @@ SwXTextPortion::SwXTextPortion( , m_ePortionType(eType) , m_bIsCollapsed(false) { - init( pPortionCrsr); + init( pPortionCursor); } SwXTextPortion::SwXTextPortion( - const SwUnoCrsr* pPortionCrsr, + const SwUnoCursor* pPortionCursor, uno::Reference< text::XText > const& rParent, SwFrameFormat& rFormat ) : m_pImpl(new Impl) @@ -104,11 +104,11 @@ SwXTextPortion::SwXTextPortion( , m_ePortionType(PORTION_FRAME) , m_bIsCollapsed(false) { - init( pPortionCrsr); + init( pPortionCursor); } SwXTextPortion::SwXTextPortion( - const SwUnoCrsr* pPortionCrsr, + const SwUnoCursor* pPortionCursor, SwTextRuby const& rAttr, uno::Reference< text::XText > const& xParent, bool bIsEnd ) @@ -125,7 +125,7 @@ SwXTextPortion::SwXTextPortion( , m_ePortionType( bIsEnd ? PORTION_RUBY_END : PORTION_RUBY_START ) , m_bIsCollapsed(false) { - init( pPortionCrsr); + init( pPortionCursor); if (!bIsEnd) { @@ -159,9 +159,9 @@ throw( uno::RuntimeException, std::exception ) { SolarMutexGuard aGuard; uno::Reference< text::XTextRange > xRet; - SwUnoCrsr& rUnoCrsr = GetCursor(); + SwUnoCursor& rUnoCursor = GetCursor(); - SwPaM aPam(*rUnoCrsr.Start()); + SwPaM aPam(*rUnoCursor.Start()); uno::Reference< text::XText > xParent = getText(); xRet = new SwXTextRange(aPam, xParent); return xRet; @@ -172,9 +172,9 @@ throw( uno::RuntimeException, std::exception ) { SolarMutexGuard aGuard; uno::Reference< text::XTextRange > xRet; - SwUnoCrsr& rUnoCrsr = GetCursor(); + SwUnoCursor& rUnoCursor = GetCursor(); - SwPaM aPam(*rUnoCrsr.End()); + SwPaM aPam(*rUnoCursor.End()); uno::Reference< text::XText > xParent = getText(); xRet = new SwXTextRange(aPam, xParent); return xRet; @@ -185,15 +185,15 @@ throw( uno::RuntimeException, std::exception ) { SolarMutexGuard aGuard; OUString aText; - SwUnoCrsr& rUnoCrsr = GetCursor(); + SwUnoCursor& rUnoCursor = GetCursor(); // TextPortions are always within a paragraph - SwTextNode* pTextNd = rUnoCrsr.GetNode().GetTextNode(); + SwTextNode* pTextNd = rUnoCursor.GetNode().GetTextNode(); if ( pTextNd ) { - const sal_Int32 nStt = rUnoCrsr.Start()->nContent.GetIndex(); + const sal_Int32 nStt = rUnoCursor.Start()->nContent.GetIndex(); aText = pTextNd->GetExpandText( nStt, - rUnoCrsr.End()->nContent.GetIndex() - nStt ); + rUnoCursor.End()->nContent.GetIndex() - nStt ); } return aText; } @@ -201,9 +201,9 @@ throw( uno::RuntimeException, std::exception ) void SwXTextPortion::setString(const OUString& aString) throw( uno::RuntimeException, std::exception ) { SolarMutexGuard aGuard; - SwUnoCrsr& rUnoCrsr = GetCursor(); + SwUnoCursor& rUnoCursor = GetCursor(); - SwUnoCursorHelper::SetString(rUnoCrsr, aString); + SwUnoCursorHelper::SetString(rUnoCursor, aString); } uno::Reference< beans::XPropertySetInfo > SwXTextPortion::getPropertySetInfo() @@ -229,22 +229,22 @@ void SwXTextPortion::setPropertyValue(const OUString& rPropertyName, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException, std::exception ) { SolarMutexGuard aGuard; - SwUnoCrsr& rUnoCrsr = GetCursor(); + SwUnoCursor& rUnoCursor = GetCursor(); - SwUnoCursorHelper::SetPropertyValue(rUnoCrsr, *m_pPropSet, + SwUnoCursorHelper::SetPropertyValue(rUnoCursor, *m_pPropSet, rPropertyName, aValue); } void SwXTextPortion::GetPropertyValue( uno::Any &rVal, const SfxItemPropertySimpleEntry& rEntry, - SwUnoCrsr *pUnoCrsr, + SwUnoCursor *pUnoCursor, SfxItemSet *&pSet ) { - OSL_ENSURE( pUnoCrsr, "UNO cursor missing" ); - if (!pUnoCrsr) + OSL_ENSURE( pUnoCursor, "UNO cursor missing" ); + if (!pUnoCursor) return; - if(pUnoCrsr) + if(pUnoCursor) { switch(rEntry.nWID) { @@ -375,18 +375,18 @@ void SwXTextPortion::GetPropertyValue( break; default: beans::PropertyState eTemp; - bool bDone = SwUnoCursorHelper::getCrsrPropertyValue( - rEntry, *pUnoCrsr, &(rVal), eTemp ); + bool bDone = SwUnoCursorHelper::getCursorPropertyValue( + rEntry, *pUnoCursor, &(rVal), eTemp ); if(!bDone) { if(!pSet) { - pSet = new SfxItemSet(pUnoCrsr->GetDoc()->GetAttrPool(), + pSet = new SfxItemSet(pUnoCursor->GetDoc()->GetAttrPool(), RES_CHRATR_BEGIN, RES_FRMATR_END - 1, RES_UNKNOWNATR_CONTAINER, RES_UNKNOWNATR_CONTAINER, RES_TXTATR_UNKNOWN_CONTAINER, RES_TXTATR_UNKNOWN_CONTAINER, 0L); - SwUnoCursorHelper::GetCrsrAttr(*pUnoCrsr, *pSet); + SwUnoCursorHelper::GetCursorAttr(*pUnoCursor, *pSet); } m_pPropSet->getPropertyValue(rEntry, *pSet, rVal); } @@ -402,7 +402,7 @@ uno::Sequence< uno::Any > SAL_CALL SwXTextPortion::GetPropertyValues_Impl( const OUString *pPropertyNames = rPropertyNames.getConstArray(); uno::Sequence< uno::Any > aValues(rPropertyNames.getLength()); uno::Any *pValues = aValues.getArray(); - SwUnoCrsr& rUnoCrsr = GetCursor(); + SwUnoCursor& rUnoCursor = GetCursor(); { SfxItemSet *pSet = nullptr; @@ -414,7 +414,7 @@ uno::Sequence< uno::Any > SAL_CALL SwXTextPortion::GetPropertyValues_Impl( const SfxItemPropertySimpleEntry* pEntry = rMap.getByName(pPropertyNames[nProp]); if(pEntry) { - GetPropertyValue( pValues[nProp], *pEntry, &rUnoCrsr, pSet ); + GetPropertyValue( pValues[nProp], *pEntry, &rUnoCursor, pSet ); } else throw beans::UnknownPropertyException( "Unknown property: " + pPropertyNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); @@ -439,7 +439,7 @@ void SAL_CALL SwXTextPortion::SetPropertyValues_Impl( throw( beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException) { - SwUnoCrsr& rUnoCrsr = GetCursor(); + SwUnoCursor& rUnoCursor = GetCursor(); { const OUString* pPropertyNames = rPropertyNames.getConstArray(); @@ -457,7 +457,7 @@ void SAL_CALL SwXTextPortion::SetPropertyValues_Impl( aValues[nProp].Name = pPropertyNames[nProp]; aValues[nProp].Value = pValues[nProp]; } - SwUnoCursorHelper::SetPropertyValues( rUnoCrsr, *m_pPropSet, aValues ); + SwUnoCursorHelper::SetPropertyValues( rUnoCursor, *m_pPropSet, aValues ); } } @@ -518,7 +518,7 @@ uno::Sequence< beans::SetPropertyTolerantFailed > SAL_CALL SwXTextPortion::setPr if (rPropertyNames.getLength() != rValues.getLength()) throw lang::IllegalArgumentException(); - SwUnoCrsr& rUnoCrsr = this->GetCursor(); + SwUnoCursor& rUnoCursor = this->GetCursor(); sal_Int32 nProps = rPropertyNames.getLength(); const OUString *pProp = rPropertyNames.getConstArray(); @@ -550,7 +550,7 @@ uno::Sequence< beans::SetPropertyTolerantFailed > SAL_CALL SwXTextPortion::setPr else { SwUnoCursorHelper::SetPropertyValue( - rUnoCrsr, *m_pPropSet, pProp[i], pValue[i] ); + rUnoCursor, *m_pPropSet, pProp[i], pValue[i] ); } } } @@ -612,7 +612,7 @@ uno::Sequence< beans::GetDirectPropertyTolerantResult > SAL_CALL SwXTextPortion: { SolarMutexGuard aGuard; - SwUnoCrsr& rUnoCrsr = this->GetCursor(); + SwUnoCursor& rUnoCursor = this->GetCursor(); std::vector< beans::GetDirectPropertyTolerantResult > aResultVector; @@ -628,7 +628,7 @@ uno::Sequence< beans::GetDirectPropertyTolerantResult > SAL_CALL SwXTextPortion: uno::Sequence< beans::PropertyState > aPropertyStates = SwUnoCursorHelper::GetPropertyStates( - rUnoCrsr, *m_pPropSet, + rUnoCursor, *m_pPropSet, rPropertyNames, SW_PROPERTY_STATE_CALLER_SWX_TEXT_PORTION_TOLERANT ); const beans::PropertyState* pPropertyStates = aPropertyStates.getConstArray(); @@ -664,7 +664,7 @@ uno::Sequence< beans::GetDirectPropertyTolerantResult > SAL_CALL SwXTextPortion: { // get property value // (compare to SwXTextPortion::getPropertyValue(s)) - GetPropertyValue( aResult.Value, *pEntry, &rUnoCrsr, pSet ); + GetPropertyValue( aResult.Value, *pEntry, &rUnoCursor, pSet ); aResult.Result = beans::TolerantPropertySetResultType::SUCCESS; aResultVector.push_back( aResult ); } @@ -751,7 +751,7 @@ beans::PropertyState SwXTextPortion::getPropertyState(const OUString& rPropertyN { SolarMutexGuard aGuard; beans::PropertyState eRet = beans::PropertyState_DEFAULT_VALUE; - SwUnoCrsr& rUnoCrsr = GetCursor(); + SwUnoCursor& rUnoCursor = GetCursor(); if (GetTextPortionType() == PORTION_RUBY_START && rPropertyName.startsWith("Ruby")) @@ -760,7 +760,7 @@ beans::PropertyState SwXTextPortion::getPropertyState(const OUString& rPropertyN } else { - eRet = SwUnoCursorHelper::GetPropertyState(rUnoCrsr, *m_pPropSet, + eRet = SwUnoCursorHelper::GetPropertyState(rUnoCursor, *m_pPropSet, rPropertyName); } return eRet; @@ -771,10 +771,10 @@ uno::Sequence< beans::PropertyState > SwXTextPortion::getPropertyStates( throw( beans::UnknownPropertyException, uno::RuntimeException, std::exception ) { SolarMutexGuard aGuard; - SwUnoCrsr& rUnoCrsr = GetCursor(); + SwUnoCursor& rUnoCursor = GetCursor(); uno::Sequence< beans::PropertyState > aRet = - SwUnoCursorHelper::GetPropertyStates(rUnoCrsr, *m_pPropSet, + SwUnoCursorHelper::GetPropertyStates(rUnoCursor, *m_pPropSet, rPropertyNames, SW_PROPERTY_STATE_CALLER_SWX_TEXT_PORTION); if(GetTextPortionType() == PORTION_RUBY_START) @@ -794,10 +794,10 @@ void SwXTextPortion::setPropertyToDefault(const OUString& rPropertyName) throw( beans::UnknownPropertyException, uno::RuntimeException, std::exception ) { SolarMutexGuard aGuard; - SwUnoCrsr& rUnoCrsr = GetCursor(); + SwUnoCursor& rUnoCursor = GetCursor(); SwUnoCursorHelper::SetPropertyToDefault( - rUnoCrsr, *m_pPropSet, rPropertyName); + rUnoCursor, *m_pPropSet, rPropertyName); } uno::Any SwXTextPortion::getPropertyDefault(const OUString& rPropertyName) @@ -805,9 +805,9 @@ uno::Any SwXTextPortion::getPropertyDefault(const OUString& rPropertyName) { SolarMutexGuard aGuard; uno::Any aRet; - SwUnoCrsr& rUnoCrsr = GetCursor(); + SwUnoCursor& rUnoCursor = GetCursor(); - aRet = SwUnoCursorHelper::GetPropertyDefault(rUnoCrsr, *m_pPropSet, + aRet = SwUnoCursorHelper::GetPropertyDefault(rUnoCursor, *m_pPropSet, rPropertyName); return aRet; } @@ -816,9 +816,9 @@ uno::Reference< container::XEnumeration > SwXTextPortion::createContentEnumerat throw( uno::RuntimeException, std::exception ) { SolarMutexGuard aGuard; - SwUnoCrsr& rUnoCrsr = GetCursor(); + SwUnoCursor& rUnoCursor = GetCursor(); - return SwXParaFrameEnumeration::Create(rUnoCrsr, PARAFRAME_PORTION_CHAR, m_pFrameFormat); + return SwXParaFrameEnumeration::Create(rUnoCursor, PARAFRAME_PORTION_CHAR, m_pFrameFormat); } namespace diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx index cd6d41354dea..c1aad4c5c094 100644 --- a/sw/source/core/unocore/unoportenum.cxx +++ b/sw/source/core/unocore/unoportenum.cxx @@ -79,7 +79,7 @@ typedef ::std::stack< PortionList_t > PortionStack_t; static void lcl_CreatePortions( TextRangeList_t & i_rPortions, uno::Reference< text::XText > const& i_xParentText, - SwUnoCrsr* pUnoCrsr, + SwUnoCursor* pUnoCursor, FrameClientSortList_t & i_rFrames, const sal_Int32 i_nStartPos, const sal_Int32 i_nEndPos ); @@ -176,18 +176,18 @@ namespace } } - static void lcl_FillBookmarkArray(SwDoc& rDoc, SwUnoCrsr& rUnoCrsr, SwXBookmarkPortion_ImplList& rBkmArr) + static void lcl_FillBookmarkArray(SwDoc& rDoc, SwUnoCursor& rUnoCursor, SwXBookmarkPortion_ImplList& rBkmArr) { IDocumentMarkAccess* const pMarkAccess = rDoc.getIDocumentMarkAccess(); if(!pMarkAccess->getBookmarksCount()) return; - const SwNodeIndex nOwnNode = rUnoCrsr.GetPoint()->nNode; + const SwNodeIndex nOwnNode = rUnoCursor.GetPoint()->nNode; SwTextNode* pTextNode = nOwnNode.GetNode().GetTextNode(); if (!pTextNode) { // no need to consider marks starting after aEndOfPara - SwPosition aEndOfPara(*rUnoCrsr.GetPoint()); + SwPosition aEndOfPara(*rUnoCursor.GetPoint()); aEndOfPara.nContent = aEndOfPara.nNode.GetNode().GetTextNode()->Len(); const IDocumentMarkAccess::const_iterator_t pCandidatesEnd = upper_bound( pMarkAccess->getBookmarksBegin(), @@ -263,7 +263,7 @@ namespace static void lcl_FillAnnotationStartArray( SwDoc& rDoc, - SwUnoCrsr& rUnoCrsr, + SwUnoCursor& rUnoCursor, SwAnnotationStartPortion_ImplList& rAnnotationStartArr ) { IDocumentMarkAccess* const pMarkAccess = rDoc.getIDocumentMarkAccess(); @@ -273,7 +273,7 @@ namespace } // no need to consider annotation marks starting after aEndOfPara - SwPosition aEndOfPara(*rUnoCrsr.GetPoint()); + SwPosition aEndOfPara(*rUnoCursor.GetPoint()); aEndOfPara.nContent = aEndOfPara.nNode.GetNode().GetTextNode()->Len(); const IDocumentMarkAccess::const_iterator_t pCandidatesEnd = upper_bound( pMarkAccess->getAnnotationMarksBegin(), @@ -282,7 +282,7 @@ namespace sw::mark::CompareIMarkStartsAfter()); // finds the first that starts after // search for all annotation marks that have its start position in this paragraph - const SwNodeIndex nOwnNode = rUnoCrsr.GetPoint()->nNode; + const SwNodeIndex nOwnNode = rUnoCursor.GetPoint()->nNode; for( IDocumentMarkAccess::const_iterator_t ppMark = pMarkAccess->getAnnotationMarksBegin(); ppMark != pCandidatesEnd; ++ppMark ) @@ -355,36 +355,36 @@ throw( RuntimeException, std::exception ) } SwXTextPortionEnumeration::SwXTextPortionEnumeration( - SwPaM& rParaCrsr, + SwPaM& rParaCursor, uno::Reference< XText > const & xParentText, const sal_Int32 nStart, const sal_Int32 nEnd ) : m_Portions() { - m_pUnoCrsr = rParaCrsr.GetDoc()->CreateUnoCrsr(*rParaCrsr.GetPoint()); + m_pUnoCursor = rParaCursor.GetDoc()->CreateUnoCursor(*rParaCursor.GetPoint()); OSL_ENSURE(nEnd == -1 || (nStart <= nEnd && - nEnd <= m_pUnoCrsr->Start()->nNode.GetNode().GetTextNode()->GetText().getLength()), + nEnd <= m_pUnoCursor->Start()->nNode.GetNode().GetTextNode()->GetText().getLength()), "start or end value invalid!"); // find all frames, graphics and OLEs that are bound AT character in para FrameClientSortList_t frames; - ::CollectFrameAtNode(m_pUnoCrsr->GetPoint()->nNode, frames, true); + ::CollectFrameAtNode(m_pUnoCursor->GetPoint()->nNode, frames, true); lcl_CreatePortions(m_Portions, xParentText, &GetCursor(), frames, nStart, nEnd); } SwXTextPortionEnumeration::SwXTextPortionEnumeration( - SwPaM& rParaCrsr, + SwPaM& rParaCursor, TextRangeList_t const & rPortions ) : m_Portions( rPortions ) { - m_pUnoCrsr = rParaCrsr.GetDoc()->CreateUnoCrsr(*rParaCrsr.GetPoint()); + m_pUnoCursor = rParaCursor.GetDoc()->CreateUnoCursor(*rParaCursor.GetPoint()); } SwXTextPortionEnumeration::~SwXTextPortionEnumeration() { SolarMutexGuard aGuard; - m_pUnoCrsr.reset(nullptr); + m_pUnoCursor.reset(nullptr); } sal_Bool SwXTextPortionEnumeration::hasMoreElements() @@ -413,11 +413,11 @@ throw( container::NoSuchElementException, lang::WrappedTargetException, typedef ::std::deque< sal_Int32 > FieldMarks_t; static void -lcl_FillFieldMarkArray(FieldMarks_t & rFieldMarks, SwUnoCrsr const & rUnoCrsr, +lcl_FillFieldMarkArray(FieldMarks_t & rFieldMarks, SwUnoCursor const & rUnoCursor, const sal_Int32 i_nStartPos) { const SwTextNode * const pTextNode = - rUnoCrsr.GetPoint()->nNode.GetNode().GetTextNode(); + rUnoCursor.GetPoint()->nNode.GetNode().GetTextNode(); if (!pTextNode) return; const sal_Unicode fld[] = { @@ -433,18 +433,18 @@ lcl_FillFieldMarkArray(FieldMarks_t & rFieldMarks, SwUnoCrsr const & rUnoCrsr, static uno::Reference<text::XTextRange> lcl_ExportFieldMark( uno::Reference< text::XText > const & i_xParentText, - SwUnoCrsr * const pUnoCrsr, + SwUnoCursor * const pUnoCursor, const SwTextNode * const pTextNode ) { uno::Reference<text::XTextRange> xRef; - SwDoc* pDoc = pUnoCrsr->GetDoc(); + SwDoc* pDoc = pUnoCursor->GetDoc(); //flr: maybe it's a good idea to add a special hint to the hints array and rely on the hint segmentation.... - const sal_Int32 start = pUnoCrsr->Start()->nContent.GetIndex(); - OSL_ENSURE(pUnoCrsr->End()->nContent.GetIndex() == start, + const sal_Int32 start = pUnoCursor->Start()->nContent.GetIndex(); + OSL_ENSURE(pUnoCursor->End()->nContent.GetIndex() == start, "hmm --- why is this different"); - pUnoCrsr->Right(1, CRSR_SKIP_CHARS, false, false); - if ( *pUnoCrsr->GetMark() == *pUnoCrsr->GetPoint() ) + pUnoCursor->Right(1, CRSR_SKIP_CHARS, false, false); + if ( *pUnoCursor->GetMark() == *pUnoCursor->GetPoint() ) { OSL_FAIL("cannot move cursor?"); return nullptr; @@ -457,10 +457,10 @@ lcl_ExportFieldMark( if (pDoc) { pFieldmark = pDoc->getIDocumentMarkAccess()-> - getFieldmarkFor(*pUnoCrsr->GetMark()); + getFieldmarkFor(*pUnoCursor->GetMark()); } SwXTextPortion* pPortion = new SwXTextPortion( - pUnoCrsr, i_xParentText, PORTION_FIELD_START); + pUnoCursor, i_xParentText, PORTION_FIELD_START); xRef = pPortion; if (pFieldmark && pDoc) { @@ -474,10 +474,10 @@ lcl_ExportFieldMark( if (pDoc) { pFieldmark = pDoc->getIDocumentMarkAccess()-> - getFieldmarkFor(*pUnoCrsr->GetMark()); + getFieldmarkFor(*pUnoCursor->GetMark()); } SwXTextPortion* pPortion = new SwXTextPortion( - pUnoCrsr, i_xParentText, PORTION_FIELD_END); + pUnoCursor, i_xParentText, PORTION_FIELD_END); xRef = pPortion; if (pFieldmark && pDoc) { @@ -490,10 +490,10 @@ lcl_ExportFieldMark( ::sw::mark::IFieldmark* pFieldmark = nullptr; if (pDoc) { - pFieldmark = pDoc->getIDocumentMarkAccess()->getFieldmarkFor(*pUnoCrsr->GetMark()); + pFieldmark = pDoc->getIDocumentMarkAccess()->getFieldmarkFor(*pUnoCursor->GetMark()); } SwXTextPortion* pPortion = new SwXTextPortion( - pUnoCrsr, i_xParentText, PORTION_FIELD_START_END); + pUnoCursor, i_xParentText, PORTION_FIELD_START_END); xRef = pPortion; if (pFieldmark && pDoc) { @@ -511,10 +511,10 @@ lcl_ExportFieldMark( static Reference<XTextRange> lcl_CreateRefMarkPortion( Reference<XText> const& xParent, - const SwUnoCrsr * const pUnoCrsr, + const SwUnoCursor * const pUnoCursor, const SwTextAttr & rAttr, const bool bEnd) { - SwDoc* pDoc = pUnoCrsr->GetDoc(); + SwDoc* pDoc = pUnoCursor->GetDoc(); SwFormatRefMark& rRefMark = const_cast<SwFormatRefMark&>( static_cast<const SwFormatRefMark&>(rAttr.GetAttr())); Reference<XTextContent> xContent; @@ -526,13 +526,13 @@ lcl_CreateRefMarkPortion( SwXTextPortion* pPortion = nullptr; if (!bEnd) { - pPortion = new SwXTextPortion(pUnoCrsr, xParent, PORTION_REFMARK_START); + pPortion = new SwXTextPortion(pUnoCursor, xParent, PORTION_REFMARK_START); pPortion->SetRefMark(xContent); pPortion->SetCollapsed(rAttr.End() == nullptr); } else { - pPortion = new SwXTextPortion(pUnoCrsr, xParent, PORTION_REFMARK_END); + pPortion = new SwXTextPortion(pUnoCursor, xParent, PORTION_REFMARK_END); pPortion->SetRefMark(xContent); } return pPortion; @@ -542,10 +542,10 @@ static void lcl_InsertRubyPortion( TextRangeList_t & rPortions, Reference<XText> const& xParent, - const SwUnoCrsr * const pUnoCrsr, + const SwUnoCursor * const pUnoCursor, const SwTextAttr & rAttr, const bool bEnd) { - SwXTextPortion* pPortion = new SwXTextPortion(pUnoCrsr, + SwXTextPortion* pPortion = new SwXTextPortion(pUnoCursor, static_txtattr_cast<const SwTextRuby&>(rAttr), xParent, bEnd); rPortions.push_back(pPortion); pPortion->SetCollapsed(rAttr.End() == nullptr); @@ -554,10 +554,10 @@ lcl_InsertRubyPortion( static Reference<XTextRange> lcl_CreateTOXMarkPortion( Reference<XText> const& xParent, - const SwUnoCrsr * const pUnoCrsr, + const SwUnoCursor * const pUnoCursor, SwTextAttr & rAttr, const bool bEnd) { - SwDoc* pDoc = pUnoCrsr->GetDoc(); + SwDoc* pDoc = pUnoCursor->GetDoc(); SwTOXMark & rTOXMark = static_cast<SwTOXMark&>(rAttr.GetAttr()); const Reference<XTextContent> xContent( @@ -567,13 +567,13 @@ lcl_CreateTOXMarkPortion( SwXTextPortion* pPortion = nullptr; if (!bEnd) { - pPortion = new SwXTextPortion(pUnoCrsr, xParent, PORTION_TOXMARK_START); + pPortion = new SwXTextPortion(pUnoCursor, xParent, PORTION_TOXMARK_START); pPortion->SetTOXMark(xContent); pPortion->SetCollapsed(rAttr.GetEnd() == nullptr); } else { - pPortion = new SwXTextPortion(pUnoCrsr, xParent, PORTION_TOXMARK_END); + pPortion = new SwXTextPortion(pUnoCursor, xParent, PORTION_TOXMARK_END); pPortion->SetTOXMark(xContent); } return pPortion; @@ -582,7 +582,7 @@ lcl_CreateTOXMarkPortion( static uno::Reference<text::XTextRange> lcl_CreateMetaPortion( uno::Reference<text::XText> const& xParent, - const SwUnoCrsr * const pUnoCrsr, + const SwUnoCursor * const pUnoCursor, SwTextAttr & rAttr, ::std::unique_ptr<TextRangeList_t const> && pPortions) { const uno::Reference<rdf::XMetadatable> xMeta( SwXMeta::CreateXMeta( @@ -593,13 +593,13 @@ lcl_CreateMetaPortion( { const uno::Reference<text::XTextContent> xContent(xMeta, uno::UNO_QUERY); - pPortion = new SwXTextPortion(pUnoCrsr, xParent, PORTION_META); + pPortion = new SwXTextPortion(pUnoCursor, xParent, PORTION_META); pPortion->SetMeta(xContent); } else { const uno::Reference<text::XTextField> xField(xMeta, uno::UNO_QUERY); - pPortion = new SwXTextPortion(pUnoCrsr, xParent, PORTION_FIELD); + pPortion = new SwXTextPortion(pUnoCursor, xParent, PORTION_FIELD); pPortion->SetTextField(xField); } return pPortion; @@ -608,7 +608,7 @@ lcl_CreateMetaPortion( static void lcl_ExportBookmark( TextRangeList_t & rPortions, Reference<XText> const& xParent, - const SwUnoCrsr * const pUnoCrsr, + const SwUnoCursor * const pUnoCursor, SwXBookmarkPortion_ImplList& rBkmArr, const sal_Int32 nIndex) { @@ -628,7 +628,7 @@ static void lcl_ExportBookmark( (BKM_TYPE_START_END == pPtr->nBkmType)) { pPortion = - new SwXTextPortion(pUnoCrsr, xParent, PORTION_BOOKMARK_START); + new SwXTextPortion(pUnoCursor, xParent, PORTION_BOOKMARK_START); rPortions.push_back(pPortion); pPortion->SetBookmark(pPtr->xBookmark); pPortion->SetCollapsed( BKM_TYPE_START_END == pPtr->nBkmType ); @@ -637,7 +637,7 @@ static void lcl_ExportBookmark( if (BKM_TYPE_END == pPtr->nBkmType) { pPortion = - new SwXTextPortion(pUnoCrsr, xParent, PORTION_BOOKMARK_END); + new SwXTextPortion(pUnoCursor, xParent, PORTION_BOOKMARK_END); rPortions.push_back(pPortion); pPortion->SetBookmark(pPtr->xBookmark); } @@ -648,7 +648,7 @@ static void lcl_ExportBookmark( static void lcl_ExportSoftPageBreak( TextRangeList_t & rPortions, Reference<XText> const& xParent, - const SwUnoCrsr * const pUnoCrsr, + const SwUnoCursor * const pUnoCursor, SwSoftPageBreakList& rBreakArr, const sal_Int32 nIndex) { @@ -665,7 +665,7 @@ static void lcl_ExportSoftPageBreak( break; rPortions.push_back( - new SwXTextPortion(pUnoCrsr, xParent, PORTION_SOFT_PAGEBREAK) ); + new SwXTextPortion(pUnoCursor, xParent, PORTION_SOFT_PAGEBREAK) ); rBreakArr.erase( aIter++ ); } } @@ -712,7 +712,7 @@ static Reference<XTextRange> lcl_ExportHints( PortionStack_t & rPortionStack, const Reference<XText> & xParent, - SwUnoCrsr * const pUnoCrsr, + SwUnoCursor * const pUnoCursor, SwpHints * const pHints, const sal_Int32 i_nStartPos, const sal_Int32 i_nEndPos, @@ -725,7 +725,7 @@ lcl_ExportHints( // if the attribute has a dummy character, then xRef is set (except META) // otherwise, the portion for the attribute is inserted into rPortions! Reference<XTextRange> xRef; - SwDoc* pDoc = pUnoCrsr->GetDoc(); + SwDoc* pDoc = pUnoCursor->GetDoc(); //search for special text attributes - first some ends size_t nEndIndex = 0; sal_Int32 nNextEnd = 0; @@ -744,14 +744,14 @@ lcl_ExportHints( case RES_TXTATR_TOXMARK: { Reference<XTextRange> xTmp = lcl_CreateTOXMarkPortion( - xParent, pUnoCrsr, *pAttr, true); + xParent, pUnoCursor, *pAttr, true); rPortionStack.top().first->push_back(xTmp); } break; case RES_TXTATR_REFMARK: { Reference<XTextRange> xTmp = lcl_CreateRefMarkPortion( - xParent, pUnoCrsr, *pAttr, true); + xParent, pUnoCursor, *pAttr, true); rPortionStack.top().first->push_back(xTmp); } break; @@ -760,10 +760,10 @@ lcl_ExportHints( if( *pAttr->GetEnd() == pAttr->GetStart()) { lcl_InsertRubyPortion( *rPortionStack.top().first, - xParent, pUnoCrsr, *pAttr, false); + xParent, pUnoCursor, *pAttr, false); } lcl_InsertRubyPortion( *rPortionStack.top().first, - xParent, pUnoCrsr, *pAttr, true); + xParent, pUnoCursor, *pAttr, true); break; case RES_TXTATR_META: case RES_TXTATR_METAFIELD: @@ -795,7 +795,7 @@ lcl_ExportHints( pCurrentPortions(Top.first); rPortionStack.pop(); const uno::Reference<text::XTextRange> xPortion( - lcl_CreateMetaPortion(xParent, pUnoCrsr, + lcl_CreateMetaPortion(xParent, pUnoCursor, *pAttr, std::move(pCurrentPortions))); rPortionStack.top().first->push_back(xPortion); } @@ -822,13 +822,13 @@ lcl_ExportHints( case RES_TXTATR_FIELD: if(!bRightMoveForbidden) { - pUnoCrsr->Right(1,CRSR_SKIP_CHARS,false,false); - if( *pUnoCrsr->GetMark() == *pUnoCrsr->GetPoint() ) + pUnoCursor->Right(1,CRSR_SKIP_CHARS,false,false); + if( *pUnoCursor->GetMark() == *pUnoCursor->GetPoint() ) break; SwXTextPortion* pPortion; xRef = pPortion = new SwXTextPortion( - pUnoCrsr, xParent, PORTION_FIELD); + pUnoCursor, xParent, PORTION_FIELD); Reference<XTextField> const xField = SwXTextField::CreateXTextField(pDoc, &pAttr->GetFormatField()); @@ -839,22 +839,22 @@ lcl_ExportHints( case RES_TXTATR_ANNOTATION: if(!bRightMoveForbidden) { - pUnoCrsr->Right(1,CRSR_SKIP_CHARS,false,false); - if( *pUnoCrsr->GetMark() == *pUnoCrsr->GetPoint() ) + pUnoCursor->Right(1,CRSR_SKIP_CHARS,false,false); + if( *pUnoCursor->GetMark() == *pUnoCursor->GetPoint() ) break; const SwTextAnnotationField* pTextAnnotationField = dynamic_cast<const SwTextAnnotationField*>( pAttr ); ::sw::mark::IMark* pAnnotationMark = pTextAnnotationField ? pTextAnnotationField->GetAnnotationMark() : nullptr; if ( pAnnotationMark != nullptr ) { - SwXTextPortion* pPortion = new SwXTextPortion( pUnoCrsr, xParent, PORTION_ANNOTATION_END ); + SwXTextPortion* pPortion = new SwXTextPortion( pUnoCursor, xParent, PORTION_ANNOTATION_END ); pPortion->SetBookmark(SwXBookmark::CreateXBookmark( *pDoc, pAnnotationMark)); xRef = pPortion; } else { - SwXTextPortion* pPortion = new SwXTextPortion( pUnoCrsr, xParent, PORTION_ANNOTATION ); + SwXTextPortion* pPortion = new SwXTextPortion( pUnoCursor, xParent, PORTION_ANNOTATION ); Reference<XTextField> xField = SwXTextField::CreateXTextField(pDoc, &pAttr->GetFormatField()); @@ -868,15 +868,15 @@ lcl_ExportHints( if(!bRightMoveForbidden) { - pUnoCrsr->Right( + pUnoCursor->Right( pAttr->GetFormatField().GetField()->ExpandField( true ).getLength() + 2, CRSR_SKIP_CHARS, false, false ); - if( *pUnoCrsr->GetMark() == *pUnoCrsr->GetPoint() ) + if( *pUnoCursor->GetMark() == *pUnoCursor->GetPoint() ) break; SwXTextPortion* pPortion = - new SwXTextPortion( pUnoCrsr, xParent, PORTION_FIELD); + new SwXTextPortion( pUnoCursor, xParent, PORTION_FIELD); xRef = pPortion; Reference<XTextField> xField = SwXTextField::CreateXTextField(pDoc, @@ -888,16 +888,16 @@ lcl_ExportHints( case RES_TXTATR_FLYCNT: if(!bRightMoveForbidden) { - pUnoCrsr->Right(1,CRSR_SKIP_CHARS,false,false); - if( *pUnoCrsr->GetMark() == *pUnoCrsr->GetPoint() ) + pUnoCursor->Right(1,CRSR_SKIP_CHARS,false,false); + if( *pUnoCursor->GetMark() == *pUnoCursor->GetPoint() ) break; // Robust #i81708 content in covered cells // Do not expose inline anchored textboxes. if (rTextBoxes.find(pAttr->GetFlyCnt().GetFrameFormat()) != rTextBoxes.end()) break; - pUnoCrsr->Exchange(); - xRef = new SwXTextPortion( pUnoCrsr, xParent, PORTION_FRAME); + pUnoCursor->Exchange(); + xRef = new SwXTextPortion( pUnoCursor, xParent, PORTION_FRAME); } break; @@ -905,12 +905,12 @@ lcl_ExportHints( { if(!bRightMoveForbidden) { - pUnoCrsr->Right(1,CRSR_SKIP_CHARS,false,false); - if( *pUnoCrsr->GetMark() == *pUnoCrsr->GetPoint() ) + pUnoCursor->Right(1,CRSR_SKIP_CHARS,false,false); + if( *pUnoCursor->GetMark() == *pUnoCursor->GetPoint() ) break; SwXTextPortion* pPortion; xRef = pPortion = new SwXTextPortion( - pUnoCrsr, xParent, PORTION_FOOTNOTE); + pUnoCursor, xParent, PORTION_FOOTNOTE); Reference<XFootnote> xContent = SwXFootnotes::GetObject(*pDoc, pAttr->GetFootnote()); pPortion->SetFootnote(xContent); @@ -926,18 +926,18 @@ lcl_ExportHints( { if (bIsPoint) { - pUnoCrsr->Right(1,CRSR_SKIP_CHARS,false,false); + pUnoCursor->Right(1,CRSR_SKIP_CHARS,false,false); } Reference<XTextRange> xTmp = (RES_TXTATR_REFMARK == nAttrWhich) ? lcl_CreateRefMarkPortion( - xParent, pUnoCrsr, *pAttr, false) + xParent, pUnoCursor, *pAttr, false) : lcl_CreateTOXMarkPortion( - xParent, pUnoCrsr, *pAttr, false); + xParent, pUnoCursor, *pAttr, false); if (bIsPoint) // consume CH_TXTATR! { - pUnoCrsr->Normalize(false); - pUnoCrsr->DeleteMark(); + pUnoCursor->Normalize(false); + pUnoCursor->DeleteMark(); xRef = xTmp; } else // just insert it @@ -952,7 +952,7 @@ lcl_ExportHints( if(pAttr->GetEnd() && (*pAttr->GetEnd() != pAttr->GetStart())) { lcl_InsertRubyPortion( *rPortionStack.top().first, - xParent, pUnoCrsr, *pAttr, false); + xParent, pUnoCursor, *pAttr, false); } break; case RES_TXTATR_META: @@ -961,7 +961,7 @@ lcl_ExportHints( { if (!bRightMoveForbidden) { - pUnoCrsr->Right(1,CRSR_SKIP_CHARS,false,false); + pUnoCursor->Right(1,CRSR_SKIP_CHARS,false,false); o_rbCursorMoved = true; // only if the end is included in selection! if ((i_nEndPos < 0) || @@ -1017,7 +1017,7 @@ lcl_ExportHints( return xRef; } -static void lcl_MoveCursor( SwUnoCrsr * const pUnoCrsr, +static void lcl_MoveCursor( SwUnoCursor * const pUnoCursor, const sal_Int32 nCurrentIndex, const sal_Int32 nNextFrameIndex, const sal_Int32 nNextPortionIndex, @@ -1025,7 +1025,7 @@ static void lcl_MoveCursor( SwUnoCrsr * const pUnoCrsr, const sal_Int32 nNextMarkIndex, const sal_Int32 nEndPos ) { - sal_Int32 nMovePos = pUnoCrsr->GetContentNode()->Len(); + sal_Int32 nMovePos = pUnoCursor->GetContentNode()->Len(); if ((nEndPos >= 0) && (nEndPos < nMovePos)) { @@ -1054,13 +1054,13 @@ static void lcl_MoveCursor( SwUnoCrsr * const pUnoCrsr, if (nMovePos > nCurrentIndex) { - pUnoCrsr->GetPoint()->nContent = nMovePos; + pUnoCursor->GetPoint()->nContent = nMovePos; } } static void lcl_FillRedlineArray( SwDoc const & rDoc, - SwUnoCrsr const & rUnoCrsr, + SwUnoCursor const & rUnoCursor, SwXRedlinePortion_ImplList& rRedArr ) { const SwRedlineTable& rRedTable = rDoc.getIDocumentRedlineAccess().GetRedlineTable(); @@ -1068,7 +1068,7 @@ static void lcl_FillRedlineArray( if ( nRedTableCount > 0 ) { - const SwPosition* pStart = rUnoCrsr.GetPoint(); + const SwPosition* pStart = rUnoCursor.GetPoint(); const SwNodeIndex nOwnNode = pStart->nNode; for(size_t nRed = 0; nRed < nRedTableCount; ++nRed) @@ -1087,11 +1087,11 @@ static void lcl_FillRedlineArray( } static void lcl_FillSoftPageBreakArray( - SwUnoCrsr const & rUnoCrsr, + SwUnoCursor const & rUnoCursor, SwSoftPageBreakList& rBreakArr ) { const SwTextNode *pTextNode = - rUnoCrsr.GetPoint()->nNode.GetNode().GetTextNode(); + rUnoCursor.GetPoint()->nNode.GetNode().GetTextNode(); if( pTextNode ) pTextNode->fillSoftPageBreakList( rBreakArr ); } @@ -1099,7 +1099,7 @@ static void lcl_FillSoftPageBreakArray( static void lcl_ExportRedline( TextRangeList_t & rPortions, Reference<XText> const& xParent, - const SwUnoCrsr * const pUnoCrsr, + const SwUnoCursor * const pUnoCursor, SwXRedlinePortion_ImplList& rRedlineArr, const sal_Int32 nIndex) { @@ -1118,7 +1118,7 @@ static void lcl_ExportRedline( else if ( nIndex == nRealIndex ) { rPortions.push_back( new SwXRedlinePortion( - *pPtr->m_pRedline, pUnoCrsr, xParent, pPtr->m_bStart)); + *pPtr->m_pRedline, pUnoCursor, xParent, pPtr->m_bStart)); rRedlineArr.erase ( aIter++ ); } // MTG: 23/11/05: If we've iterated past nIndex, exit the loop @@ -1130,26 +1130,26 @@ static void lcl_ExportRedline( static void lcl_ExportBkmAndRedline( TextRangeList_t & rPortions, Reference<XText> const & xParent, - const SwUnoCrsr * const pUnoCrsr, + const SwUnoCursor * const pUnoCursor, SwXBookmarkPortion_ImplList& rBkmArr, SwXRedlinePortion_ImplList& rRedlineArr, SwSoftPageBreakList& rBreakArr, const sal_Int32 nIndex) { if (!rBkmArr.empty()) - lcl_ExportBookmark(rPortions, xParent, pUnoCrsr, rBkmArr, nIndex); + lcl_ExportBookmark(rPortions, xParent, pUnoCursor, rBkmArr, nIndex); if (!rRedlineArr.empty()) - lcl_ExportRedline(rPortions, xParent, pUnoCrsr, rRedlineArr, nIndex); + lcl_ExportRedline(rPortions, xParent, pUnoCursor, rRedlineArr, nIndex); if (!rBreakArr.empty()) - lcl_ExportSoftPageBreak(rPortions, xParent, pUnoCrsr, rBreakArr, nIndex); + lcl_ExportSoftPageBreak(rPortions, xParent, pUnoCursor, rBreakArr, nIndex); } static void lcl_ExportAnnotationStarts( TextRangeList_t & rPortions, Reference<XText> const & xParent, - const SwUnoCrsr * const pUnoCrsr, + const SwUnoCursor * const pUnoCursor, SwAnnotationStartPortion_ImplList& rAnnotationStartArr, const sal_Int32 nIndex) { @@ -1170,7 +1170,7 @@ static void lcl_ExportAnnotationStarts( } SwXTextPortion* pPortion = - new SwXTextPortion( pUnoCrsr, xParent, PORTION_ANNOTATION ); + new SwXTextPortion( pUnoCursor, xParent, PORTION_ANNOTATION ); pPortion->SetTextField( pPtr->mxAnnotationField ); rPortions.push_back(pPortion); @@ -1182,7 +1182,7 @@ static void lcl_ExportAnnotationStarts( static sal_Int32 lcl_ExportFrames( TextRangeList_t & rPortions, Reference<XText> const & i_xParent, - SwUnoCrsr * const i_pUnoCrsr, + SwUnoCursor * const i_pUnoCursor, FrameClientSortList_t & i_rFrames, sal_Int32 const i_nCurrentIndex) { @@ -1199,7 +1199,7 @@ static sal_Int32 lcl_ExportFrames( i_rFrames.front().pFrameClient->GetRegisteredIn(); if (pFrame) // Frame could be disposed { - SwXTextPortion* pPortion = new SwXTextPortion(i_pUnoCrsr, i_xParent, + SwXTextPortion* pPortion = new SwXTextPortion(i_pUnoCursor, i_xParent, *static_cast<SwFrameFormat*>( const_cast<SwModify*>( pFrame ) ) ); rPortions.push_back(pPortion); } @@ -1238,59 +1238,59 @@ static sal_Int32 lcl_GetNextIndex( static void lcl_CreatePortions( TextRangeList_t & i_rPortions, uno::Reference< text::XText > const & i_xParentText, - SwUnoCrsr * const pUnoCrsr, + SwUnoCursor * const pUnoCursor, FrameClientSortList_t & i_rFrames, const sal_Int32 i_nStartPos, const sal_Int32 i_nEndPos ) { - if (!pUnoCrsr) + if (!pUnoCursor) return; // set the start if a selection should be exported if ((i_nStartPos > 0) && - (pUnoCrsr->Start()->nContent.GetIndex() != i_nStartPos)) + (pUnoCursor->Start()->nContent.GetIndex() != i_nStartPos)) { - pUnoCrsr->DeleteMark(); - OSL_ENSURE(pUnoCrsr->Start()->nNode.GetNode().GetTextNode() && - (i_nStartPos <= pUnoCrsr->Start()->nNode.GetNode().GetTextNode()-> + pUnoCursor->DeleteMark(); + OSL_ENSURE(pUnoCursor->Start()->nNode.GetNode().GetTextNode() && + (i_nStartPos <= pUnoCursor->Start()->nNode.GetNode().GetTextNode()-> GetText().getLength()), "Incorrect start position" ); // ??? should this be i_nStartPos - current position ? - pUnoCrsr->Right(static_cast<sal_Int32>(i_nStartPos), + pUnoCursor->Right(static_cast<sal_Int32>(i_nStartPos), CRSR_SKIP_CHARS, false, false); } - SwDoc * const pDoc = pUnoCrsr->GetDoc(); + SwDoc * const pDoc = pUnoCursor->GetDoc(); FieldMarks_t FieldMarks; - lcl_FillFieldMarkArray(FieldMarks, *pUnoCrsr, i_nStartPos); + lcl_FillFieldMarkArray(FieldMarks, *pUnoCursor, i_nStartPos); SwXBookmarkPortion_ImplList Bookmarks; - lcl_FillBookmarkArray(*pDoc, *pUnoCrsr, Bookmarks); + lcl_FillBookmarkArray(*pDoc, *pUnoCursor, Bookmarks); SwXRedlinePortion_ImplList Redlines; - lcl_FillRedlineArray(*pDoc, *pUnoCrsr, Redlines); + lcl_FillRedlineArray(*pDoc, *pUnoCursor, Redlines); SwSoftPageBreakList SoftPageBreaks; - lcl_FillSoftPageBreakArray(*pUnoCrsr, SoftPageBreaks); + lcl_FillSoftPageBreakArray(*pUnoCursor, SoftPageBreaks); SwAnnotationStartPortion_ImplList AnnotationStarts; - lcl_FillAnnotationStartArray( *pDoc, *pUnoCrsr, AnnotationStarts ); + lcl_FillAnnotationStartArray( *pDoc, *pUnoCursor, AnnotationStarts ); PortionStack_t PortionStack; PortionStack.push( PortionList_t(&i_rPortions, nullptr) ); - std::set<const SwFrameFormat*> aTextBoxes = SwTextBoxHelper::findTextBoxes(pUnoCrsr->GetNode()); + std::set<const SwFrameFormat*> aTextBoxes = SwTextBoxHelper::findTextBoxes(pUnoCursor->GetNode()); bool bAtEnd( false ); while (!bAtEnd) // every iteration consumes at least current character! { - if (pUnoCrsr->HasMark()) + if (pUnoCursor->HasMark()) { - pUnoCrsr->Normalize(false); - pUnoCrsr->DeleteMark(); + pUnoCursor->Normalize(false); + pUnoCursor->DeleteMark(); } - SwTextNode * const pTextNode = pUnoCrsr->GetNode().GetTextNode(); + SwTextNode * const pTextNode = pUnoCursor->GetNode().GetTextNode(); if (!pTextNode) { OSL_FAIL("lcl_CreatePortions: no TextNode - what now ?"); @@ -1299,24 +1299,24 @@ static void lcl_CreatePortions( SwpHints * const pHints = pTextNode->GetpSwpHints(); const sal_Int32 nCurrentIndex = - pUnoCrsr->GetPoint()->nContent.GetIndex(); + pUnoCursor->GetPoint()->nContent.GetIndex(); // this contains the portion which consumes the character in the // text at nCurrentIndex; i.e. it must be set _once_ per iteration uno::Reference< XTextRange > xRef; - SwUnoCursorHelper::SelectPam(*pUnoCrsr, true); // set mark + SwUnoCursorHelper::SelectPam(*pUnoCursor, true); // set mark const sal_Int32 nFirstFrameIndex = lcl_ExportFrames( *PortionStack.top().first, - i_xParentText, pUnoCrsr, i_rFrames, nCurrentIndex); + i_xParentText, pUnoCursor, i_rFrames, nCurrentIndex); lcl_ExportBkmAndRedline( *PortionStack.top().first, i_xParentText, - pUnoCrsr, Bookmarks, Redlines, SoftPageBreaks, nCurrentIndex ); + pUnoCursor, Bookmarks, Redlines, SoftPageBreaks, nCurrentIndex ); lcl_ExportAnnotationStarts( *PortionStack.top().first, i_xParentText, - pUnoCrsr, + pUnoCursor, AnnotationStarts, nCurrentIndex ); @@ -1329,7 +1329,7 @@ static void lcl_CreatePortions( if (pHints) { // N.B.: side-effects nNextAttrIndex, bCursorMoved; may move cursor - xRef = lcl_ExportHints(PortionStack, i_xParentText, pUnoCrsr, + xRef = lcl_ExportHints(PortionStack, i_xParentText, pUnoCursor, pHints, i_nStartPos, i_nEndPos, nCurrentIndex, bAtEnd, bCursorMoved, nNextAttrIndex, aTextBoxes); if (PortionStack.empty()) @@ -1345,7 +1345,7 @@ static void lcl_CreatePortions( !FieldMarks.empty() && (FieldMarks.front() == nCurrentIndex)) { // moves cursor - xRef = lcl_ExportFieldMark(i_xParentText, pUnoCrsr, pTextNode); + xRef = lcl_ExportFieldMark(i_xParentText, pUnoCursor, pTextNode); FieldMarks.pop_front(); } } @@ -1370,7 +1370,7 @@ static void lcl_CreatePortions( } lcl_MoveCursor( - pUnoCrsr, + pUnoCursor, nCurrentIndex, nFirstFrameIndex, nNextPortionIndex, @@ -1378,13 +1378,13 @@ static void lcl_CreatePortions( nNextMarkIndex, i_nEndPos ); - xRef = new SwXTextPortion(pUnoCrsr, i_xParentText, PORTION_TEXT); + xRef = new SwXTextPortion(pUnoCursor, i_xParentText, PORTION_TEXT); } else if (bAtEnd && !xRef.is() && !pTextNode->Len()) { // special case: for an empty paragraph, we better put out a // text portion because there may be a hyperlink attribute - xRef = new SwXTextPortion(pUnoCrsr, i_xParentText, PORTION_TEXT); + xRef = new SwXTextPortion(pUnoCursor, i_xParentText, PORTION_TEXT); } if (xRef.is()) diff --git a/sw/source/core/unocore/unoredline.cxx b/sw/source/core/unocore/unoredline.cxx index ce58ecd5cca9..bd4d51bae2a2 100644 --- a/sw/source/core/unocore/unoredline.cxx +++ b/sw/source/core/unocore/unoredline.cxx @@ -161,7 +161,7 @@ uno::Reference<container::XEnumeration> SwXRedlineText::createEnumeration() SolarMutexGuard aGuard; SwPaM aPam(aNodeIndex); aPam.Move(fnMoveForward, fnGoNode); - auto pUnoCursor(GetDoc()->CreateUnoCrsr(*aPam.Start())); + auto pUnoCursor(GetDoc()->CreateUnoCursor(*aPam.Start())); return SwXParagraphEnumeration::Create(this, pUnoCursor, CURSOR_REDLINE); } @@ -176,9 +176,9 @@ sal_Bool SwXRedlineText::hasElements( ) throw(uno::RuntimeException, std::excep } SwXRedlinePortion::SwXRedlinePortion(SwRangeRedline const& rRedline, - SwUnoCrsr const*const pPortionCrsr, + SwUnoCursor const*const pPortionCursor, uno::Reference< text::XText > const& xParent, bool const bStart) - : SwXTextPortion(pPortionCrsr, xParent, + : SwXTextPortion(pPortionCursor, xParent, (bStart) ? PORTION_REDLINE_START : PORTION_REDLINE_END) , m_rRedline(rRedline) { @@ -239,8 +239,8 @@ uno::Any SwXRedlinePortion::getPropertyValue( const OUString& rPropertyName ) { if ( 1 < ( pNodeIdx->GetNode().EndOfSectionIndex() - pNodeIdx->GetNode().GetIndex() ) ) { - SwUnoCrsr& rUnoCrsr = GetCursor(); - uno::Reference<text::XText> xRet = new SwXRedlineText(rUnoCrsr.GetDoc(), *pNodeIdx); + SwUnoCursor& rUnoCursor = GetCursor(); + uno::Reference<text::XText> xRet = new SwXRedlineText(rUnoCursor.GetDoc(), *pNodeIdx); aRet <<= xRet; } else { @@ -260,9 +260,9 @@ uno::Any SwXRedlinePortion::getPropertyValue( const OUString& rPropertyName ) void SwXRedlinePortion::Validate() throw( uno::RuntimeException ) { - SwUnoCrsr& rUnoCrsr = GetCursor(); + SwUnoCursor& rUnoCursor = GetCursor(); //search for the redline - SwDoc* pDoc = rUnoCrsr.GetDoc(); + SwDoc* pDoc = rUnoCursor.GetDoc(); const SwRedlineTable& rRedTable = pDoc->getIDocumentRedlineAccess().GetRedlineTable(); bool bFound = false; for(size_t nRed = 0; nRed < rRedTable.size() && !bFound; nRed++) @@ -535,7 +535,7 @@ uno::Reference< container::XEnumeration > SwXRedline::createEnumeration() throw return nullptr; SwPaM aPam(*pNodeIndex); aPam.Move(fnMoveForward, fnGoNode); - auto pUnoCursor(GetDoc()->CreateUnoCrsr(*aPam.Start())); + auto pUnoCursor(GetDoc()->CreateUnoCursor(*aPam.Start())); return SwXParagraphEnumeration::Create(this, pUnoCursor, CURSOR_REDLINE); } @@ -564,20 +564,20 @@ uno::Reference< text::XTextCursor > SwXRedline::createTextCursor() throw( uno:: SwPosition aPos(*pNodeIndex); SwXTextCursor *const pXCursor = new SwXTextCursor(*pDoc, this, CURSOR_REDLINE, aPos); - auto& rUnoCrsr(pXCursor->GetCursor()); - rUnoCrsr.Move(fnMoveForward, fnGoNode); + auto& rUnoCursor(pXCursor->GetCursor()); + rUnoCursor.Move(fnMoveForward, fnGoNode); // is here a table? - SwTableNode* pTableNode = rUnoCrsr.GetNode().FindTableNode(); + SwTableNode* pTableNode = rUnoCursor.GetNode().FindTableNode(); SwContentNode* pCont = nullptr; while( pTableNode ) { - rUnoCrsr.GetPoint()->nNode = *pTableNode->EndOfSectionNode(); - pCont = GetDoc()->GetNodes().GoNext(&rUnoCrsr.GetPoint()->nNode); + rUnoCursor.GetPoint()->nNode = *pTableNode->EndOfSectionNode(); + pCont = GetDoc()->GetNodes().GoNext(&rUnoCursor.GetPoint()->nNode); pTableNode = pCont->FindTableNode(); } if(pCont) - rUnoCrsr.GetPoint()->nContent.Assign(pCont, 0); + rUnoCursor.GetPoint()->nContent.Assign(pCont, 0); xRet = static_cast<text::XWordCursor*>(pXCursor); } else diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index c8a06ca629d2..d8b0037dfe9b 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -3161,7 +3161,7 @@ void SAL_CALL SwXStyle::setAllPropertiesToDefault( ) pTargetFormat->SetFormatAttr(aLR); pTargetFormat->SetFormatAttr(aUL); SwPageDesc* pStdPgDsc = m_pDoc->getIDocumentStylePoolAccess().GetPageDescFromPool(RES_POOLPAGE_STANDARD); - SwFormatFrmSize aFrmSz(ATT_FIX_SIZE); + SwFormatFrameSize aFrameSz(ATT_FIX_SIZE); if(RES_POOLPAGE_STANDARD == rPageDesc.GetPoolFormatId()) { @@ -3169,27 +3169,27 @@ void SAL_CALL SwXStyle::setAllPropertiesToDefault( ) { const Size aPhysSize( SvxPaperInfo::GetPaperSize( static_cast<Printer*>(m_pDoc->getIDocumentDeviceAccess().getPrinter(false)))); - aFrmSz.SetSize(aPhysSize); + aFrameSz.SetSize(aPhysSize); } else { - aFrmSz.SetSize(SvxPaperInfo::GetDefaultPaperSize()); + aFrameSz.SetSize(SvxPaperInfo::GetDefaultPaperSize()); } } else { - aFrmSz = pStdPgDsc->GetMaster().GetFrmSize(); + aFrameSz = pStdPgDsc->GetMaster().GetFrameSize(); } if(pStdPgDsc->GetLandscape()) { - SwTwips nTmp = aFrmSz.GetHeight(); - aFrmSz.SetHeight(aFrmSz.GetWidth()); - aFrmSz.SetWidth(nTmp); + SwTwips nTmp = aFrameSz.GetHeight(); + aFrameSz.SetHeight(aFrameSz.GetWidth()); + aFrameSz.SetWidth(nTmp); } - pTargetFormat->SetFormatAttr( aFrmSz ); + pTargetFormat->SetFormatAttr( aFrameSz ); } else { diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index ac526d230538..6f93d125fd97 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -207,7 +207,7 @@ static void lcl_SetSpecialProperty(SwFrameFormat* pFormat, case FN_TABLE_WIDTH: case FN_TABLE_RELATIVE_WIDTH: { - SwFormatFrmSize aSz( pFormat->GetFrmSize() ); + SwFormatFrameSize aSz( pFormat->GetFrameSize() ); if(FN_TABLE_WIDTH == pEntry->nWID) { sal_Int32 nWidth = 0; @@ -276,7 +276,7 @@ static uno::Any lcl_GetSpecialProperty(SwFrameFormat* pFormat, const SfxItemProp case FN_TABLE_RELATIVE_WIDTH: { uno::Any aRet; - const SwFormatFrmSize& rSz = pFormat->GetFrmSize(); + const SwFormatFrameSize& rSz = pFormat->GetFrameSize(); if(FN_TABLE_WIDTH == pEntry->nWID) rSz.QueryValue(aRet, MID_FRMSIZE_WIDTH|CONVERT_TWIPS); else if(FN_TABLE_RELATIVE_WIDTH == pEntry->nWID) @@ -573,32 +573,32 @@ static void lcl_InspectLines(SwTableLines& rLines, std::vector<OUString>& rAllNa static bool lcl_FormatTable(SwFrameFormat* pTableFormat) { bool bHasFrames = false; - SwIterator<SwFrm,SwFormat> aIter( *pTableFormat ); - for(SwFrm* pFrm = aIter.First(); pFrm; pFrm = aIter.Next()) + SwIterator<SwFrame,SwFormat> aIter( *pTableFormat ); + for(SwFrame* pFrame = aIter.First(); pFrame; pFrame = aIter.Next()) { - vcl::RenderContext* pRenderContext = pFrm->getRootFrm()->GetCurrShell()->GetOut(); - // mba: no TYPEINFO for SwTabFrm - if(!pFrm->IsTabFrm()) + vcl::RenderContext* pRenderContext = pFrame->getRootFrame()->GetCurrShell()->GetOut(); + // mba: no TYPEINFO for SwTabFrame + if(!pFrame->IsTabFrame()) continue; - SwTabFrm* pTabFrm = static_cast<SwTabFrm*>(pFrm); - if(pTabFrm->IsValid()) - pTabFrm->InvalidatePos(); - pTabFrm->SetONECalcLowers(); - pTabFrm->Calc(pRenderContext); + SwTabFrame* pTabFrame = static_cast<SwTabFrame*>(pFrame); + if(pTabFrame->IsValid()) + pTabFrame->InvalidatePos(); + pTabFrame->SetONECalcLowers(); + pTabFrame->Calc(pRenderContext); bHasFrames = true; } return bHasFrames; } -static void lcl_CrsrSelect(SwPaM& rCrsr, bool bExpand) +static void lcl_CursorSelect(SwPaM& rCursor, bool bExpand) { if(bExpand) { - if(!rCrsr.HasMark()) - rCrsr.SetMark(); + if(!rCursor.HasMark()) + rCursor.SetMark(); } - else if(rCrsr.HasMark()) - rCrsr.DeleteMark(); + else if(rCursor.HasMark()) + rCursor.DeleteMark(); } static void lcl_GetTableSeparators(uno::Any& rRet, SwTable* pTable, SwTableBox* pBox, bool bRow) @@ -945,8 +945,8 @@ uno::Reference<text::XTextCursor> SwXCell::createTextCursor() throw( uno::Runtim SwPosition aPos(*pSttNd); SwXTextCursor* const pXCursor = new SwXTextCursor(*GetDoc(), this, CURSOR_TBLTEXT, aPos); - auto& rUnoCrsr(pXCursor->GetCursor()); - rUnoCrsr.Move(fnMoveForward, fnGoNode); + auto& rUnoCursor(pXCursor->GetCursor()); + rUnoCursor.Move(fnMoveForward, fnGoNode); return static_cast<text::XWordCursor*>(pXCursor); } @@ -1089,7 +1089,7 @@ uno::Reference<container::XEnumeration> SwXCell::createEnumeration() throw( uno: return uno::Reference<container::XEnumeration>(); const SwStartNode* pSttNd = pBox->GetSttNd(); SwPosition aPos(*pSttNd); - auto pUnoCursor(GetDoc()->CreateUnoCrsr(aPos)); + auto pUnoCursor(GetDoc()->CreateUnoCursor(aPos)); pUnoCursor->Move(fnMoveForward, fnGoNode); // remember table and start node for later travelling // (used in export of tables in tables) @@ -1304,21 +1304,21 @@ void SwXTextTableRow::setPropertyValue(const OUString& rPropertyName, const uno: case FN_UNO_ROW_HEIGHT: case FN_UNO_ROW_AUTO_HEIGHT: { - SwFormatFrmSize aFrmSize(pLn->GetFrameFormat()->GetFrmSize()); + SwFormatFrameSize aFrameSize(pLn->GetFrameFormat()->GetFrameSize()); if(FN_UNO_ROW_AUTO_HEIGHT== pEntry->nWID) { bool bSet = *static_cast<sal_Bool const *>(aValue.getValue()); - aFrmSize.SetHeightSizeType(bSet ? ATT_VAR_SIZE : ATT_FIX_SIZE); + aFrameSize.SetHeightSizeType(bSet ? ATT_VAR_SIZE : ATT_FIX_SIZE); } else { sal_Int32 nHeight = 0; aValue >>= nHeight; - Size aSz(aFrmSize.GetSize()); + Size aSz(aFrameSize.GetSize()); aSz.Height() = convertMm100ToTwip(nHeight); - aFrmSize.SetSize(aSz); + aFrameSize.SetSize(aSz); } - pDoc->SetAttr(aFrmSize, *pLn->ClaimFrameFormat()); + pDoc->SetAttr(aFrameSize, *pLn->ClaimFrameFormat()); } break; @@ -1361,7 +1361,7 @@ uno::Any SwXTextTableRow::getPropertyValue(const OUString& rPropertyName) throw( case FN_UNO_ROW_HEIGHT: case FN_UNO_ROW_AUTO_HEIGHT: { - const SwFormatFrmSize& rSize = pLn->GetFrameFormat()->GetFrmSize(); + const SwFormatFrameSize& rSize = pLn->GetFrameFormat()->GetFrameSize(); if(FN_UNO_ROW_AUTO_HEIGHT== pEntry->nWID) { aRet <<= ATT_VAR_SIZE == rSize.GetHeightSizeType(); @@ -1431,12 +1431,12 @@ sal_Bool SwXTextTableCursor::supportsService(const OUString& rServiceName) throw { return cppu::supportsService(this, rServiceName); } IMPLEMENT_FORWARD_XINTERFACE2(SwXTextTableCursor,SwXTextTableCursor_Base,OTextCursorHelper) -const SwPaM* SwXTextTableCursor::GetPaM() const { return &GetCrsr(); } -SwPaM* SwXTextTableCursor::GetPaM() { return &GetCrsr(); } +const SwPaM* SwXTextTableCursor::GetPaM() const { return &GetCursor(); } +SwPaM* SwXTextTableCursor::GetPaM() { return &GetCursor(); } const SwDoc* SwXTextTableCursor::GetDoc() const { return GetFrameFormat()->GetDoc(); } SwDoc* SwXTextTableCursor::GetDoc() { return GetFrameFormat()->GetDoc(); } -const SwUnoCrsr& SwXTextTableCursor::GetCrsr() const { return *m_pUnoCrsr; } -SwUnoCrsr& SwXTextTableCursor::GetCrsr() { return *m_pUnoCrsr; } +const SwUnoCursor& SwXTextTableCursor::GetCursor() const { return *m_pUnoCursor; } +SwUnoCursor& SwXTextTableCursor::GetCursor() { return *m_pUnoCursor; } uno::Sequence<OUString> SwXTextTableCursor::getSupportedServiceNames() throw( uno::RuntimeException, std::exception ) { return {"com.sun.star.text.TextTableCursor"}; } @@ -1448,50 +1448,50 @@ SwXTextTableCursor::SwXTextTableCursor(SwFrameFormat* pFormat, SwTableBox* pBox) SwDoc* pDoc = pFormat->GetDoc(); const SwStartNode* pSttNd = pBox->GetSttNd(); SwPosition aPos(*pSttNd); - m_pUnoCrsr = pDoc->CreateUnoCrsr(aPos, true); - m_pUnoCrsr->Move( fnMoveForward, fnGoNode ); - SwUnoTableCrsr& rTableCrsr = dynamic_cast<SwUnoTableCrsr&>(*m_pUnoCrsr); - rTableCrsr.MakeBoxSels(); + m_pUnoCursor = pDoc->CreateUnoCursor(aPos, true); + m_pUnoCursor->Move( fnMoveForward, fnGoNode ); + SwUnoTableCursor& rTableCursor = dynamic_cast<SwUnoTableCursor&>(*m_pUnoCursor); + rTableCursor.MakeBoxSels(); } SwXTextTableCursor::SwXTextTableCursor(SwFrameFormat& rTableFormat, const SwTableCursor* pTableSelection) : SwClient(&rTableFormat), m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_TABLE_CURSOR)) { - m_pUnoCrsr = pTableSelection->GetDoc()->CreateUnoCrsr(*pTableSelection->GetPoint(), true); + m_pUnoCursor = pTableSelection->GetDoc()->CreateUnoCursor(*pTableSelection->GetPoint(), true); if(pTableSelection->HasMark()) { - m_pUnoCrsr->SetMark(); - *m_pUnoCrsr->GetMark() = *pTableSelection->GetMark(); + m_pUnoCursor->SetMark(); + *m_pUnoCursor->GetMark() = *pTableSelection->GetMark(); } const SwSelBoxes& rBoxes = pTableSelection->GetSelectedBoxes(); - SwUnoTableCrsr& rTableCrsr = dynamic_cast<SwUnoTableCrsr&>(*m_pUnoCrsr); + SwUnoTableCursor& rTableCursor = dynamic_cast<SwUnoTableCursor&>(*m_pUnoCursor); for(auto pBox : rBoxes) - rTableCrsr.InsertBox(*pBox); - rTableCrsr.MakeBoxSels(); + rTableCursor.InsertBox(*pBox); + rTableCursor.MakeBoxSels(); } OUString SwXTextTableCursor::getRangeName() throw (uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - SwUnoCrsr& rUnoCrsr = GetCrsr(); - SwUnoTableCrsr* pTableCrsr = dynamic_cast<SwUnoTableCrsr*>(&rUnoCrsr); + SwUnoCursor& rUnoCursor = GetCursor(); + SwUnoTableCursor* pTableCursor = dynamic_cast<SwUnoTableCursor*>(&rUnoCursor); //!! see also SwChartDataSequence::getSourceRangeRepresentation - if(!pTableCrsr) + if(!pTableCursor) return OUString(); - pTableCrsr->MakeBoxSels(); - const SwStartNode* pNode = pTableCrsr->GetPoint()->nNode.GetNode().FindTableBoxStartNode(); + pTableCursor->MakeBoxSels(); + const SwStartNode* pNode = pTableCursor->GetPoint()->nNode.GetNode().FindTableBoxStartNode(); const SwTable* pTable = SwTable::FindTable(GetFrameFormat()); const SwTableBox* pEndBox = pTable->GetTableBox(pNode->GetIndex()); - if(pTableCrsr->HasMark()) + if(pTableCursor->HasMark()) { - pNode = pTableCrsr->GetMark()->nNode.GetNode().FindTableBoxStartNode(); + pNode = pTableCursor->GetMark()->nNode.GetNode().FindTableBoxStartNode(); const SwTableBox* pStartBox = pTable->GetTableBox(pNode->GetIndex()); if(pEndBox != pStartBox) { // need to switch start and end? - if(*pTableCrsr->GetPoint() < *pTableCrsr->GetMark()) + if(*pTableCursor->GetPoint() < *pTableCursor->GetMark()) std::swap(pStartBox, pEndBox); return pStartBox->GetName() + ":" + pEndBox->GetName(); } @@ -1503,90 +1503,90 @@ sal_Bool SwXTextTableCursor::gotoCellByName(const OUString& sCellName, sal_Bool throw(uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - SwUnoCrsr& rUnoCrsr = GetCrsr(); - auto& rTableCrsr = dynamic_cast<SwUnoTableCrsr&>(rUnoCrsr); - lcl_CrsrSelect(rTableCrsr, bExpand); - return rTableCrsr.GotoTableBox(sCellName); + SwUnoCursor& rUnoCursor = GetCursor(); + auto& rTableCursor = dynamic_cast<SwUnoTableCursor&>(rUnoCursor); + lcl_CursorSelect(rTableCursor, bExpand); + return rTableCursor.GotoTableBox(sCellName); } sal_Bool SwXTextTableCursor::goLeft(sal_Int16 Count, sal_Bool bExpand) throw( uno::RuntimeException, std::exception ) { SolarMutexGuard aGuard; - SwUnoCrsr& rUnoCrsr = GetCrsr(); - SwUnoTableCrsr& rTableCrsr = dynamic_cast<SwUnoTableCrsr&>(rUnoCrsr); - lcl_CrsrSelect(rTableCrsr, bExpand); - return rTableCrsr.Left(Count, CRSR_SKIP_CHARS, false, false); + SwUnoCursor& rUnoCursor = GetCursor(); + SwUnoTableCursor& rTableCursor = dynamic_cast<SwUnoTableCursor&>(rUnoCursor); + lcl_CursorSelect(rTableCursor, bExpand); + return rTableCursor.Left(Count, CRSR_SKIP_CHARS, false, false); } sal_Bool SwXTextTableCursor::goRight(sal_Int16 Count, sal_Bool bExpand) throw( uno::RuntimeException, std::exception ) { SolarMutexGuard aGuard; - SwUnoCrsr& rUnoCrsr = GetCrsr(); - SwUnoTableCrsr& rTableCrsr = dynamic_cast<SwUnoTableCrsr&>(rUnoCrsr); - lcl_CrsrSelect(rTableCrsr, bExpand); - return rTableCrsr.Right(Count, CRSR_SKIP_CHARS, false, false); + SwUnoCursor& rUnoCursor = GetCursor(); + SwUnoTableCursor& rTableCursor = dynamic_cast<SwUnoTableCursor&>(rUnoCursor); + lcl_CursorSelect(rTableCursor, bExpand); + return rTableCursor.Right(Count, CRSR_SKIP_CHARS, false, false); } sal_Bool SwXTextTableCursor::goUp(sal_Int16 Count, sal_Bool bExpand) throw( uno::RuntimeException, std::exception ) { SolarMutexGuard aGuard; - SwUnoCrsr& rUnoCrsr = GetCrsr(); - SwUnoTableCrsr& rTableCrsr = dynamic_cast<SwUnoTableCrsr&>(rUnoCrsr); - lcl_CrsrSelect(rTableCrsr, bExpand); - return rTableCrsr.UpDown(true, Count, nullptr, 0); + SwUnoCursor& rUnoCursor = GetCursor(); + SwUnoTableCursor& rTableCursor = dynamic_cast<SwUnoTableCursor&>(rUnoCursor); + lcl_CursorSelect(rTableCursor, bExpand); + return rTableCursor.UpDown(true, Count, nullptr, 0); } sal_Bool SwXTextTableCursor::goDown(sal_Int16 Count, sal_Bool bExpand) throw( uno::RuntimeException, std::exception ) { SolarMutexGuard aGuard; - SwUnoCrsr& rUnoCrsr = GetCrsr(); - SwUnoTableCrsr& rTableCrsr = dynamic_cast<SwUnoTableCrsr&>(rUnoCrsr); - lcl_CrsrSelect(rTableCrsr, bExpand); - return rTableCrsr.UpDown(false, Count, nullptr, 0); + SwUnoCursor& rUnoCursor = GetCursor(); + SwUnoTableCursor& rTableCursor = dynamic_cast<SwUnoTableCursor&>(rUnoCursor); + lcl_CursorSelect(rTableCursor, bExpand); + return rTableCursor.UpDown(false, Count, nullptr, 0); } void SwXTextTableCursor::gotoStart(sal_Bool bExpand) throw( uno::RuntimeException, std::exception ) { SolarMutexGuard aGuard; - SwUnoCrsr& rUnoCrsr = GetCrsr(); - SwUnoTableCrsr& rTableCrsr = dynamic_cast<SwUnoTableCrsr&>(rUnoCrsr); - lcl_CrsrSelect(rTableCrsr, bExpand); - rTableCrsr.MoveTable(fnTableCurr, fnTableStart); + SwUnoCursor& rUnoCursor = GetCursor(); + SwUnoTableCursor& rTableCursor = dynamic_cast<SwUnoTableCursor&>(rUnoCursor); + lcl_CursorSelect(rTableCursor, bExpand); + rTableCursor.MoveTable(fnTableCurr, fnTableStart); } void SwXTextTableCursor::gotoEnd(sal_Bool bExpand) throw( uno::RuntimeException, std::exception ) { SolarMutexGuard aGuard; - SwUnoCrsr& rUnoCrsr = GetCrsr(); - SwUnoTableCrsr& rTableCrsr = dynamic_cast<SwUnoTableCrsr&>(rUnoCrsr); - lcl_CrsrSelect(rTableCrsr, bExpand); - rTableCrsr.MoveTable(fnTableCurr, fnTableEnd); + SwUnoCursor& rUnoCursor = GetCursor(); + SwUnoTableCursor& rTableCursor = dynamic_cast<SwUnoTableCursor&>(rUnoCursor); + lcl_CursorSelect(rTableCursor, bExpand); + rTableCursor.MoveTable(fnTableCurr, fnTableEnd); } sal_Bool SwXTextTableCursor::mergeRange() throw (uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - SwUnoCrsr& rUnoCrsr = GetCrsr(); + SwUnoCursor& rUnoCursor = GetCursor(); - SwUnoTableCrsr& rTableCrsr = dynamic_cast<SwUnoTableCrsr&>(rUnoCrsr); + SwUnoTableCursor& rTableCursor = dynamic_cast<SwUnoTableCursor&>(rUnoCursor); { // HACK: remove pending actions for selecting old style tables - UnoActionRemoveContext aRemoveContext(rTableCrsr); + UnoActionRemoveContext aRemoveContext(rTableCursor); } - rTableCrsr.MakeBoxSels(); + rTableCursor.MakeBoxSels(); bool bResult; { - UnoActionContext aContext(rUnoCrsr.GetDoc()); - bResult = TBLMERGE_OK == rTableCrsr.GetDoc()->MergeTable(rTableCrsr); + UnoActionContext aContext(rUnoCursor.GetDoc()); + bResult = TBLMERGE_OK == rTableCursor.GetDoc()->MergeTable(rTableCursor); } if(bResult) { - size_t nCount = rTableCrsr.GetSelectedBoxesCount(); + size_t nCount = rTableCursor.GetSelectedBoxesCount(); while (nCount--) - rTableCrsr.DeleteBox(nCount); + rTableCursor.DeleteBox(nCount); } - rTableCrsr.MakeBoxSels(); + rTableCursor.MakeBoxSels(); return bResult; } @@ -1596,19 +1596,19 @@ sal_Bool SwXTextTableCursor::splitRange(sal_Int16 Count, sal_Bool Horizontal) SolarMutexGuard aGuard; if (Count <= 0) throw uno::RuntimeException("Illegal first argument: needs to be > 0", static_cast<cppu::OWeakObject*>(this)); - SwUnoCrsr& rUnoCrsr = GetCrsr(); - SwUnoTableCrsr& rTableCrsr = dynamic_cast<SwUnoTableCrsr&>(rUnoCrsr); + SwUnoCursor& rUnoCursor = GetCursor(); + SwUnoTableCursor& rTableCursor = dynamic_cast<SwUnoTableCursor&>(rUnoCursor); { // HACK: remove pending actions for selecting old style tables - UnoActionRemoveContext aRemoveContext(rTableCrsr); + UnoActionRemoveContext aRemoveContext(rTableCursor); } - rTableCrsr.MakeBoxSels(); + rTableCursor.MakeBoxSels(); bool bResult; { - UnoActionContext aContext(rUnoCrsr.GetDoc()); - bResult = rTableCrsr.GetDoc()->SplitTable(rTableCrsr.GetSelectedBoxes(), !Horizontal, Count); + UnoActionContext aContext(rUnoCursor.GetDoc()); + bResult = rTableCursor.GetDoc()->SplitTable(rTableCursor.GetSelectedBoxes(), !Horizontal, Count); } - rTableCrsr.MakeBoxSels(); + rTableCursor.MakeBoxSels(); return bResult; } @@ -1627,28 +1627,28 @@ void SwXTextTableCursor::setPropertyValue(const OUString& rPropertyName, const u std::exception) { SolarMutexGuard aGuard; - SwUnoCrsr& rUnoCrsr = GetCrsr(); + SwUnoCursor& rUnoCursor = GetCursor(); auto pEntry(m_pPropSet->getPropertyMap().getByName(rPropertyName)); if(!pEntry) throw beans::UnknownPropertyException("Unknown property: " + rPropertyName, static_cast<cppu::OWeakObject*>(this)); if(pEntry->nFlags & beans::PropertyAttribute::READONLY) throw beans::PropertyVetoException("Property is read-only: " + rPropertyName, static_cast<cppu::OWeakObject*>(this)); { - auto pSttNode = rUnoCrsr.GetNode().StartOfSectionNode(); + auto pSttNode = rUnoCursor.GetNode().StartOfSectionNode(); const SwTableNode* pTableNode = pSttNode->FindTableNode(); lcl_FormatTable(pTableNode->GetTable().GetFrameFormat()); } - auto& rTableCrsr = dynamic_cast<SwUnoTableCrsr&>(rUnoCrsr); - rTableCrsr.MakeBoxSels(); - SwDoc* pDoc = rUnoCrsr.GetDoc(); + auto& rTableCursor = dynamic_cast<SwUnoTableCursor&>(rUnoCursor); + rTableCursor.MakeBoxSels(); + SwDoc* pDoc = rUnoCursor.GetDoc(); switch(pEntry->nWID) { case FN_UNO_TABLE_CELL_BACKGROUND: { SvxBrushItem aBrush(RES_BACKGROUND); - SwDoc::GetBoxAttr(rUnoCrsr, aBrush); + SwDoc::GetBoxAttr(rUnoCursor, aBrush); aBrush.PutValue(aValue, pEntry->nMemberId); - pDoc->SetBoxAttr(rUnoCrsr, aBrush); + pDoc->SetBoxAttr(rUnoCursor, aBrush); } break; @@ -1656,24 +1656,24 @@ void SwXTextTableCursor::setPropertyValue(const OUString& rPropertyName, const u { SfxUInt32Item aNumberFormat(RES_BOXATR_FORMAT); aNumberFormat.PutValue(aValue, 0); - pDoc->SetBoxAttr(rUnoCrsr, aNumberFormat); + pDoc->SetBoxAttr(rUnoCursor, aNumberFormat); } break; case FN_UNO_PARA_STYLE: - SwUnoCursorHelper::SetTextFormatColl(aValue, rUnoCrsr); + SwUnoCursorHelper::SetTextFormatColl(aValue, rUnoCursor); break; default: { SfxItemSet aItemSet(pDoc->GetAttrPool(), pEntry->nWID, pEntry->nWID); - SwUnoCursorHelper::GetCrsrAttr(rTableCrsr.GetSelRing(), + SwUnoCursorHelper::GetCursorAttr(rTableCursor.GetSelRing(), aItemSet); if (!SwUnoCursorHelper::SetCursorPropertyValue( - *pEntry, aValue, rTableCrsr.GetSelRing(), aItemSet)) + *pEntry, aValue, rTableCursor.GetSelRing(), aItemSet)) { m_pPropSet->setPropertyValue(*pEntry, aValue, aItemSet); } - SwUnoCursorHelper::SetCrsrAttr(rTableCrsr.GetSelRing(), + SwUnoCursorHelper::SetCursorAttr(rTableCursor.GetSelRing(), aItemSet, SetAttrMode::DEFAULT, true); } } @@ -1686,24 +1686,24 @@ uno::Any SwXTextTableCursor::getPropertyValue(const OUString& rPropertyName) std::exception) { SolarMutexGuard aGuard; - SwUnoCrsr& rUnoCrsr = GetCrsr(); + SwUnoCursor& rUnoCursor = GetCursor(); { - auto pSttNode = rUnoCrsr.GetNode().StartOfSectionNode(); + auto pSttNode = rUnoCursor.GetNode().StartOfSectionNode(); const SwTableNode* pTableNode = pSttNode->FindTableNode(); lcl_FormatTable(pTableNode->GetTable().GetFrameFormat()); } - SwUnoTableCrsr& rTableCrsr = dynamic_cast<SwUnoTableCrsr&>(rUnoCrsr); + SwUnoTableCursor& rTableCursor = dynamic_cast<SwUnoTableCursor&>(rUnoCursor); auto pEntry(m_pPropSet->getPropertyMap().getByName(rPropertyName)); if(!pEntry) throw beans::UnknownPropertyException("Unknown property: " + rPropertyName, static_cast<cppu::OWeakObject*>(this)); - rTableCrsr.MakeBoxSels(); + rTableCursor.MakeBoxSels(); uno::Any aResult; switch(pEntry->nWID) { case FN_UNO_TABLE_CELL_BACKGROUND: { SvxBrushItem aBrush(RES_BACKGROUND); - if (SwDoc::GetBoxAttr(rUnoCrsr, aBrush)) + if (SwDoc::GetBoxAttr(rUnoCursor, aBrush)) aBrush.QueryValue(aResult, pEntry->nMemberId); } break; @@ -1713,18 +1713,18 @@ uno::Any SwXTextTableCursor::getPropertyValue(const OUString& rPropertyName) break; case FN_UNO_PARA_STYLE: { - auto pFormat(SwUnoCursorHelper::GetCurTextFormatColl(rUnoCrsr, false)); + auto pFormat(SwUnoCursorHelper::GetCurTextFormatColl(rUnoCursor, false)); if(pFormat) aResult = uno::makeAny(pFormat->GetName()); } break; default: { - SfxItemSet aSet(rTableCrsr.GetDoc()->GetAttrPool(), + SfxItemSet aSet(rTableCursor.GetDoc()->GetAttrPool(), RES_CHRATR_BEGIN, RES_FRMATR_END-1, RES_UNKNOWNATR_CONTAINER, RES_UNKNOWNATR_CONTAINER, 0L); - SwUnoCursorHelper::GetCrsrAttr(rTableCrsr.GetSelRing(), aSet); + SwUnoCursorHelper::GetCursorAttr(rTableCursor.GetSelRing(), aSet); m_pPropSet->getPropertyValue(*pEntry, aSet, aResult); } } @@ -1883,7 +1883,7 @@ void SwTableProperties_Impl::ApplyTableAttr(const SwTable& rTable, SwDoc& rDoc) GetProperty(FN_TABLE_WIDTH, 0xff, pWidth); bool bPutSize = pWidth != nullptr; - SwFormatFrmSize aSz(ATT_VAR_SIZE); + SwFormatFrameSize aSz(ATT_VAR_SIZE); if(pWidth) { aSz.PutValue(*pWidth, MID_FRMSIZE_WIDTH); @@ -2201,21 +2201,21 @@ uno::Reference<table::XCellRange> SwXTextTable::GetRangeByName(SwFrameFormat* p const SwStartNode* pSttNd = pTLBox->GetSttNd(); SwPosition aPos(*pSttNd); // set cursor to the upper-left cell of the range - auto pUnoCrsr(pFormat->GetDoc()->CreateUnoCrsr(aPos, true)); - pUnoCrsr->Move(fnMoveForward, fnGoNode); - pUnoCrsr->SetRemainInSection(false); + auto pUnoCursor(pFormat->GetDoc()->CreateUnoCursor(aPos, true)); + pUnoCursor->Move(fnMoveForward, fnGoNode); + pUnoCursor->SetRemainInSection(false); const SwTableBox* pBRBox(pTable->GetTableBox(rBRName)); if(!pBRBox) return nullptr; - pUnoCrsr->SetMark(); - pUnoCrsr->GetPoint()->nNode = *pBRBox->GetSttNd(); - pUnoCrsr->Move( fnMoveForward, fnGoNode ); - SwUnoTableCrsr* pCrsr = dynamic_cast<SwUnoTableCrsr*>(pUnoCrsr.get()); + pUnoCursor->SetMark(); + pUnoCursor->GetPoint()->nNode = *pBRBox->GetSttNd(); + pUnoCursor->Move( fnMoveForward, fnGoNode ); + SwUnoTableCursor* pCursor = dynamic_cast<SwUnoTableCursor*>(pUnoCursor.get()); // HACK: remove pending actions for selecting old style tables - UnoActionRemoveContext aRemoveContext(*pCrsr); - pCrsr->MakeBoxSels(); - // pUnoCrsr will be provided and will not be deleted - return new SwXCellRange(pUnoCrsr, *pFormat, rDesc); + UnoActionRemoveContext aRemoveContext(*pCursor); + pCursor->MakeBoxSels(); + // pUnoCursor will be provided and will not be deleted + return new SwXCellRange(pUnoCursor, *pFormat, rDesc); } uno::Reference<table::XCellRange> SwXTextTable::getCellRangeByPosition(sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 nRight, sal_Int32 nBottom) @@ -2578,18 +2578,18 @@ void SwXTextTable::setPropertyValue(const OUString& rPropertyName, const uno::An const SwStartNode* pSttNd = pTLBox->GetSttNd(); SwPosition aPos(*pSttNd); // set cursor to top left cell - auto pUnoCrsr(pDoc->CreateUnoCrsr(aPos, true)); - pUnoCrsr->Move( fnMoveForward, fnGoNode ); - pUnoCrsr->SetRemainInSection( false ); + auto pUnoCursor(pDoc->CreateUnoCursor(aPos, true)); + pUnoCursor->Move( fnMoveForward, fnGoNode ); + pUnoCursor->SetRemainInSection( false ); const SwTableBox* pBRBox = lcl_FindCornerTableBox(rLines, false); - pUnoCrsr->SetMark(); - pUnoCrsr->GetPoint()->nNode = *pBRBox->GetSttNd(); - pUnoCrsr->Move( fnMoveForward, fnGoNode ); - SwUnoTableCrsr& rCrsr = dynamic_cast<SwUnoTableCrsr&>(*pUnoCrsr); + pUnoCursor->SetMark(); + pUnoCursor->GetPoint()->nNode = *pBRBox->GetSttNd(); + pUnoCursor->Move( fnMoveForward, fnGoNode ); + SwUnoTableCursor& rCursor = dynamic_cast<SwUnoTableCursor&>(*pUnoCursor); // HACK: remove pending actions for selecting old style tables - UnoActionRemoveContext aRemoveContext(rCrsr); - rCrsr.MakeBoxSels(); + UnoActionRemoveContext aRemoveContext(rCursor); + rCursor.MakeBoxSels(); SfxItemSet aSet(pDoc->GetAttrPool(), RES_BOX, RES_BOX, @@ -2623,7 +2623,7 @@ void SwXTextTable::setPropertyValue(const OUString& rPropertyName, const uno::An aSet.Put(aBox); aSet.Put(aBoxInfo); - pDoc->SetTabBorders(rCrsr, aSet); + pDoc->SetTabBorders(rCursor, aSet); } break; @@ -2767,27 +2767,27 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName) const SwStartNode* pSttNd = pTLBox->GetSttNd(); SwPosition aPos(*pSttNd); // set cursor to top left cell - auto pUnoCrsr(pDoc->CreateUnoCrsr(aPos, true)); - pUnoCrsr->Move( fnMoveForward, fnGoNode ); - pUnoCrsr->SetRemainInSection( false ); + auto pUnoCursor(pDoc->CreateUnoCursor(aPos, true)); + pUnoCursor->Move( fnMoveForward, fnGoNode ); + pUnoCursor->SetRemainInSection( false ); const SwTableBox* pBRBox = lcl_FindCornerTableBox(rLines, false); - pUnoCrsr->SetMark(); + pUnoCursor->SetMark(); const SwStartNode* pLastNd = pBRBox->GetSttNd(); - pUnoCrsr->GetPoint()->nNode = *pLastNd; + pUnoCursor->GetPoint()->nNode = *pLastNd; - pUnoCrsr->Move( fnMoveForward, fnGoNode ); - SwUnoTableCrsr& rCrsr = dynamic_cast<SwUnoTableCrsr&>(*pUnoCrsr); + pUnoCursor->Move( fnMoveForward, fnGoNode ); + SwUnoTableCursor& rCursor = dynamic_cast<SwUnoTableCursor&>(*pUnoCursor); // HACK: remove pending actions for selecting old style tables - UnoActionRemoveContext aRemoveContext(rCrsr); - rCrsr.MakeBoxSels(); + UnoActionRemoveContext aRemoveContext(rCursor); + rCursor.MakeBoxSels(); SfxItemSet aSet(pDoc->GetAttrPool(), RES_BOX, RES_BOX, SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER, 0); aSet.Put(SvxBoxInfoItem( SID_ATTR_BORDER_INNER )); - SwDoc::GetTabBorders(rCrsr, aSet); + SwDoc::GetTabBorders(rCursor, aSet); const SvxBoxInfoItem& rBoxInfoItem = static_cast<const SvxBoxInfoItem&>(aSet.Get(SID_ATTR_BORDER_INNER)); const SvxBoxItem& rBox = static_cast<const SvxBoxItem&>(aSet.Get(RES_BOX)); @@ -3138,13 +3138,13 @@ uno::Sequence<OUString> SwXCellRange::getSupportedServiceNames() throw( uno::Run "com.sun.star.style.ParagraphPropertiesComplex" }; } -SwXCellRange::SwXCellRange(sw::UnoCursorPointer pCrsr, SwFrameFormat& rFrameFormat, +SwXCellRange::SwXCellRange(sw::UnoCursorPointer pCursor, SwFrameFormat& rFrameFormat, SwRangeDescriptor& rDesc) : SwClient(&rFrameFormat) , m_ChartListeners(m_Mutex) , aRgDesc(rDesc) , m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_TABLE_RANGE)) - , m_pTableCrsr(pCrsr) + , m_pTableCursor(pCursor) , m_bFirstRowAsLabel(false) , m_bFirstColumnAsLabel(false) { @@ -3215,21 +3215,21 @@ uno::Reference< table::XCellRange > SwXCellRange::getCellRangeByPosition( const SwStartNode* pSttNd = pTLBox->GetSttNd(); SwPosition aPos(*pSttNd); // set cursor in the upper-left cell of the range - auto pUnoCrsr(pFormat->GetDoc()->CreateUnoCrsr(aPos, true)); - pUnoCrsr->Move( fnMoveForward, fnGoNode ); - pUnoCrsr->SetRemainInSection( false ); + auto pUnoCursor(pFormat->GetDoc()->CreateUnoCursor(aPos, true)); + pUnoCursor->Move( fnMoveForward, fnGoNode ); + pUnoCursor->SetRemainInSection( false ); const SwTableBox* pBRBox = pTable->GetTableBox( sBRName ); if(pBRBox) { - pUnoCrsr->SetMark(); - pUnoCrsr->GetPoint()->nNode = *pBRBox->GetSttNd(); - pUnoCrsr->Move( fnMoveForward, fnGoNode ); - SwUnoTableCrsr* pCrsr = dynamic_cast<SwUnoTableCrsr*>(pUnoCrsr.get()); + pUnoCursor->SetMark(); + pUnoCursor->GetPoint()->nNode = *pBRBox->GetSttNd(); + pUnoCursor->Move( fnMoveForward, fnGoNode ); + SwUnoTableCursor* pCursor = dynamic_cast<SwUnoTableCursor*>(pUnoCursor.get()); // HACK: remove pending actions for selecting old style tables - UnoActionRemoveContext aRemoveContext(*pCrsr); - pCrsr->MakeBoxSels(); - // pUnoCrsr will be provided and will not be deleted - SwXCellRange* pCellRange = new SwXCellRange(pUnoCrsr, *pFormat, aNewDesc); + UnoActionRemoveContext aRemoveContext(*pCursor); + pCursor->MakeBoxSels(); + // pUnoCursor will be provided and will not be deleted + SwXCellRange* pCellRange = new SwXCellRange(pUnoCursor, *pFormat, aNewDesc); aRet = pCellRange; } } @@ -3283,21 +3283,21 @@ void SwXCellRange::setPropertyValue(const OUString& rPropertyName, const uno::An if ( pEntry->nFlags & beans::PropertyAttribute::READONLY) throw beans::PropertyVetoException("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); - SwDoc* pDoc = m_pTableCrsr->GetDoc(); - SwUnoTableCrsr& rCrsr = dynamic_cast<SwUnoTableCrsr&>(*m_pTableCrsr); + SwDoc* pDoc = m_pTableCursor->GetDoc(); + SwUnoTableCursor& rCursor = dynamic_cast<SwUnoTableCursor&>(*m_pTableCursor); { // HACK: remove pending actions for selecting old style tables - UnoActionRemoveContext aRemoveContext(rCrsr); + UnoActionRemoveContext aRemoveContext(rCursor); } - rCrsr.MakeBoxSels(); + rCursor.MakeBoxSels(); switch(pEntry->nWID ) { case FN_UNO_TABLE_CELL_BACKGROUND: { SvxBrushItem aBrush( RES_BACKGROUND ); - SwDoc::GetBoxAttr( *m_pTableCrsr, aBrush ); + SwDoc::GetBoxAttr( *m_pTableCursor, aBrush ); ((SfxPoolItem&)aBrush).PutValue(aValue, pEntry->nMemberId); - pDoc->SetBoxAttr( *m_pTableCrsr, aBrush ); + pDoc->SetBoxAttr( *m_pTableCursor, aBrush ); } break; @@ -3326,20 +3326,20 @@ void SwXCellRange::setPropertyValue(const OUString& rPropertyName, const uno::An aBoxInfo.SetValid(nValid); aSet.Put(aBoxInfo); - SwDoc::GetTabBorders(rCrsr, aSet); + SwDoc::GetTabBorders(rCursor, aSet); aSet.Put(aBoxInfo); SvxBoxItem aBoxItem(static_cast<const SvxBoxItem&>(aSet.Get(RES_BOX))); ((SfxPoolItem&)aBoxItem).PutValue(aValue, pEntry->nMemberId); aSet.Put(aBoxItem); - pDoc->SetTabBorders( *m_pTableCrsr, aSet ); + pDoc->SetTabBorders( *m_pTableCursor, aSet ); } break; case RES_BOXATR_FORMAT: { SfxUInt32Item aNumberFormat(RES_BOXATR_FORMAT); ((SfxPoolItem&)aNumberFormat).PutValue(aValue, 0); - pDoc->SetBoxAttr(rCrsr, aNumberFormat); + pDoc->SetBoxAttr(rCursor, aNumberFormat); } break; case FN_UNO_RANGE_ROW_LABEL: @@ -3365,15 +3365,15 @@ void SwXCellRange::setPropertyValue(const OUString& rPropertyName, const uno::An default: { SfxItemSet aItemSet( pDoc->GetAttrPool(), pEntry->nWID, pEntry->nWID ); - SwUnoCursorHelper::GetCrsrAttr(rCrsr.GetSelRing(), + SwUnoCursorHelper::GetCursorAttr(rCursor.GetSelRing(), aItemSet); if (!SwUnoCursorHelper::SetCursorPropertyValue( - *pEntry, aValue, rCrsr.GetSelRing(), aItemSet)) + *pEntry, aValue, rCursor.GetSelRing(), aItemSet)) { m_pPropSet->setPropertyValue(*pEntry, aValue, aItemSet); } - SwUnoCursorHelper::SetCrsrAttr(rCrsr.GetSelRing(), + SwUnoCursorHelper::SetCursorAttr(rCursor.GetSelRing(), aItemSet, SetAttrMode::DEFAULT, true); } } @@ -3403,20 +3403,20 @@ uno::Any SwXCellRange::getPropertyValue(const OUString& rPropertyName) case FN_UNO_TABLE_CELL_BACKGROUND: { SvxBrushItem aBrush( RES_BACKGROUND ); - if(SwDoc::GetBoxAttr( *m_pTableCrsr, aBrush )) + if(SwDoc::GetBoxAttr( *m_pTableCursor, aBrush )) aBrush.QueryValue(aRet, pEntry->nMemberId); } break; case RES_BOX : { - SwDoc* pDoc = m_pTableCrsr->GetDoc(); + SwDoc* pDoc = m_pTableCursor->GetDoc(); SfxItemSet aSet(pDoc->GetAttrPool(), RES_BOX, RES_BOX, SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER, 0); aSet.Put(SvxBoxInfoItem( SID_ATTR_BORDER_INNER )); - SwDoc::GetTabBorders(*m_pTableCrsr, aSet); + SwDoc::GetTabBorders(*m_pTableCursor, aSet); const SvxBoxItem& rBoxItem = static_cast<const SvxBoxItem&>(aSet.Get(RES_BOX)); rBoxItem.QueryValue(aRet, pEntry->nMemberId); } @@ -3427,7 +3427,7 @@ uno::Any SwXCellRange::getPropertyValue(const OUString& rPropertyName) case FN_UNO_PARA_STYLE: { SwFormatColl *const pTmpFormat = - SwUnoCursorHelper::GetCurTextFormatColl(*m_pTableCrsr, false); + SwUnoCursorHelper::GetCurTextFormatColl(*m_pTableCursor, false); OUString sRet; if(pFormat) sRet = pTmpFormat->GetName(); @@ -3442,14 +3442,14 @@ uno::Any SwXCellRange::getPropertyValue(const OUString& rPropertyName) break; default: { - SfxItemSet aSet(m_pTableCrsr->GetDoc()->GetAttrPool(), + SfxItemSet aSet(m_pTableCursor->GetDoc()->GetAttrPool(), RES_CHRATR_BEGIN, RES_FRMATR_END -1, RES_TXTATR_UNKNOWN_CONTAINER, RES_TXTATR_UNKNOWN_CONTAINER, RES_UNKNOWNATR_CONTAINER, RES_UNKNOWNATR_CONTAINER, 0L); // first look at the attributes of the cursor - SwUnoTableCrsr* pCrsr = dynamic_cast<SwUnoTableCrsr*>(&(*m_pTableCrsr)); - SwUnoCursorHelper::GetCrsrAttr(pCrsr->GetSelRing(), aSet); + SwUnoTableCursor* pCursor = dynamic_cast<SwUnoTableCursor*>(&(*m_pTableCursor)); + SwUnoCursorHelper::GetCursorAttr(pCursor->GetSelRing(), aSet); m_pPropSet->getPropertyValue(*pEntry, aSet, aRet); } } @@ -3700,10 +3700,10 @@ void SAL_CALL SwXCellRange::sort(const uno::Sequence< beans::PropertyValue >& rD SwFrameFormat* pFormat(GetFrameFormat()); if(pFormat && SwUnoCursorHelper::ConvertSortProperties(rDescriptor, aSortOpt)) { - SwUnoTableCrsr& rTableCrsr = dynamic_cast<SwUnoTableCrsr&>(*m_pTableCrsr); - rTableCrsr.MakeBoxSels(); + SwUnoTableCursor& rTableCursor = dynamic_cast<SwUnoTableCursor&>(*m_pTableCursor); + rTableCursor.MakeBoxSels(); UnoActionContext aContext(pFormat->GetDoc()); - pFormat->GetDoc()->SortTable(rTableCrsr.GetSelectedBoxes(), aSortOpt); + pFormat->GetDoc()->SortTable(rTableCursor.GetSelectedBoxes(), aSortOpt); } } @@ -3713,18 +3713,18 @@ sal_uInt16 SwXCellRange::getColumnCount() sal_uInt16 SwXCellRange::getRowCount() { return static_cast<sal_uInt16>(aRgDesc.nBottom - aRgDesc.nTop + 1); } -const SwUnoCrsr* SwXCellRange::GetTableCrsr() const +const SwUnoCursor* SwXCellRange::GetTableCursor() const { SwFrameFormat* pFormat = GetFrameFormat(); - return pFormat ? &(*m_pTableCrsr) : nullptr; + return pFormat ? &(*m_pTableCursor) : nullptr; } void SwXCellRange::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) { ClientModify(this, pOld, pNew ); - if(!GetRegisteredIn() || !m_pTableCrsr) + if(!GetRegisteredIn() || !m_pTableCursor) { - m_pTableCrsr.reset(nullptr); + m_pTableCursor.reset(nullptr); lang::EventObject const ev(static_cast< ::cppu::OWeakObject&>(*this)); m_ChartListeners.disposeAndClear(ev); } @@ -3827,15 +3827,15 @@ void SwXTableRows::insertByIndex(sal_Int32 nIndex, sal_Int32 nCount) SwPosition aPos(*pSttNd); // set cursor to the upper-left cell of the range UnoActionContext aAction(pFrameFormat->GetDoc()); - std::shared_ptr<SwUnoTableCrsr> const pUnoCrsr( - std::dynamic_pointer_cast<SwUnoTableCrsr>( - pFrameFormat->GetDoc()->CreateUnoCrsr(aPos, true))); - pUnoCrsr->Move( fnMoveForward, fnGoNode ); + std::shared_ptr<SwUnoTableCursor> const pUnoCursor( + std::dynamic_pointer_cast<SwUnoTableCursor>( + pFrameFormat->GetDoc()->CreateUnoCursor(aPos, true))); + pUnoCursor->Move( fnMoveForward, fnGoNode ); { // remove actions - TODO: why? - UnoActionRemoveContext aRemoveContext(pUnoCrsr->GetDoc()); + UnoActionRemoveContext aRemoveContext(pUnoCursor->GetDoc()); } - pFrameFormat->GetDoc()->InsertRow(*pUnoCrsr, (sal_uInt16)nCount, bAppend); + pFrameFormat->GetDoc()->InsertRow(*pUnoCursor, (sal_uInt16)nCount, bAppend); } void SwXTableRows::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount) @@ -3855,26 +3855,26 @@ void SwXTableRows::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount) const SwStartNode* pSttNd = pTLBox->GetSttNd(); SwPosition aPos(*pSttNd); // set cursor to the upper-left cell of the range - auto pUnoCrsr(pFrameFormat->GetDoc()->CreateUnoCrsr(aPos, true)); - pUnoCrsr->Move(fnMoveForward, fnGoNode); - pUnoCrsr->SetRemainInSection( false ); + auto pUnoCursor(pFrameFormat->GetDoc()->CreateUnoCursor(aPos, true)); + pUnoCursor->Move(fnMoveForward, fnGoNode); + pUnoCursor->SetRemainInSection( false ); const OUString sBLName = sw_GetCellName(0, nIndex + nCount - 1); const SwTableBox* pBLBox = pTable->GetTableBox( sBLName ); if(!pBLBox) throw uno::RuntimeException("Illegal arguments", static_cast<cppu::OWeakObject*>(this)); - pUnoCrsr->SetMark(); - pUnoCrsr->GetPoint()->nNode = *pBLBox->GetSttNd(); - pUnoCrsr->Move(fnMoveForward, fnGoNode); - SwUnoTableCrsr* pCrsr = dynamic_cast<SwUnoTableCrsr*>(pUnoCrsr.get()); + pUnoCursor->SetMark(); + pUnoCursor->GetPoint()->nNode = *pBLBox->GetSttNd(); + pUnoCursor->Move(fnMoveForward, fnGoNode); + SwUnoTableCursor* pCursor = dynamic_cast<SwUnoTableCursor*>(pUnoCursor.get()); { // HACK: remove pending actions for selecting old style tables - UnoActionRemoveContext aRemoveContext(*pCrsr); + UnoActionRemoveContext aRemoveContext(*pCursor); } - pCrsr->MakeBoxSels(); + pCursor->MakeBoxSels(); { // these braces are important UnoActionContext aAction(pFrameFormat->GetDoc()); - pFrameFormat->GetDoc()->DeleteRow(*pUnoCrsr); - pUnoCrsr.reset(); + pFrameFormat->GetDoc()->DeleteRow(*pUnoCursor); + pUnoCursor.reset(); } { // invalidate all actions - TODO: why? @@ -3966,15 +3966,15 @@ void SwXTableColumns::insertByIndex(sal_Int32 nIndex, sal_Int32 nCount) const SwStartNode* pSttNd = pTLBox->GetSttNd(); SwPosition aPos(*pSttNd); UnoActionContext aAction(pFrameFormat->GetDoc()); - auto pUnoCrsr(pFrameFormat->GetDoc()->CreateUnoCrsr(aPos, true)); - pUnoCrsr->Move(fnMoveForward, fnGoNode); + auto pUnoCursor(pFrameFormat->GetDoc()->CreateUnoCursor(aPos, true)); + pUnoCursor->Move(fnMoveForward, fnGoNode); { // remove actions - TODO: why? - UnoActionRemoveContext aRemoveContext(pUnoCrsr->GetDoc()); + UnoActionRemoveContext aRemoveContext(pUnoCursor->GetDoc()); } - pFrameFormat->GetDoc()->InsertCol(*pUnoCrsr, (sal_uInt16)nCount, bAppend); + pFrameFormat->GetDoc()->InsertCol(*pUnoCursor, (sal_uInt16)nCount, bAppend); } ///@see SwXTableRows::removeByIndex (TODO: seems to be copy and paste programming here) @@ -3995,26 +3995,26 @@ void SwXTableColumns::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount) const SwStartNode* pSttNd = pTLBox->GetSttNd(); SwPosition aPos(*pSttNd); // set cursor to the upper-left cell of the range - auto pUnoCrsr(pFrameFormat->GetDoc()->CreateUnoCrsr(aPos, true)); - pUnoCrsr->Move(fnMoveForward, fnGoNode); - pUnoCrsr->SetRemainInSection(false); + auto pUnoCursor(pFrameFormat->GetDoc()->CreateUnoCursor(aPos, true)); + pUnoCursor->Move(fnMoveForward, fnGoNode); + pUnoCursor->SetRemainInSection(false); const OUString sTRName = sw_GetCellName(nIndex + nCount - 1, 0); const SwTableBox* pTRBox = pTable->GetTableBox(sTRName); if(!pTRBox) throw uno::RuntimeException("Cell not found", static_cast<cppu::OWeakObject*>(this)); - pUnoCrsr->SetMark(); - pUnoCrsr->GetPoint()->nNode = *pTRBox->GetSttNd(); - pUnoCrsr->Move(fnMoveForward, fnGoNode); - SwUnoTableCrsr* pCrsr = dynamic_cast<SwUnoTableCrsr*>(pUnoCrsr.get()); + pUnoCursor->SetMark(); + pUnoCursor->GetPoint()->nNode = *pTRBox->GetSttNd(); + pUnoCursor->Move(fnMoveForward, fnGoNode); + SwUnoTableCursor* pCursor = dynamic_cast<SwUnoTableCursor*>(pUnoCursor.get()); { // HACK: remove pending actions for selecting old style tables - UnoActionRemoveContext aRemoveContext(*pCrsr); + UnoActionRemoveContext aRemoveContext(*pCursor); } - pCrsr->MakeBoxSels(); + pCursor->MakeBoxSels(); { // these braces are important UnoActionContext aAction(pFrameFormat->GetDoc()); - pFrameFormat->GetDoc()->DeleteCol(*pUnoCrsr); - pUnoCrsr.reset(); + pFrameFormat->GetDoc()->DeleteCol(*pUnoCursor); + pUnoCursor.reset(); } { // invalidate all actions - TODO: why? diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index f10a37853ea9..08213898f90b 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -469,26 +469,26 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) OTextCursorHelper *const pCursor = ::sw::UnoTunnelGetImplementation<OTextCursorHelper>(xRangeTunnel); - SwCursor aCrsr(*aPam.GetPoint(), nullptr, false); - SwUnoCursorHelper::SelectPam(aCrsr, true); - aCrsr.Left(1, CRSR_SKIP_CHARS, false, false); + SwCursor aCursor(*aPam.GetPoint(), nullptr, false); + SwUnoCursorHelper::SelectPam(aCursor, true); + aCursor.Left(1, CRSR_SKIP_CHARS, false, false); // here, the PaM needs to be moved: if (pRange) { - pRange->SetPositions(aCrsr); + pRange->SetPositions(aCursor); } else { - SwPaM *const pUnoCrsr = pCursor->GetPaM(); - *pUnoCrsr->GetPoint() = *aCrsr.GetPoint(); - if (aCrsr.HasMark()) + SwPaM *const pUnoCursor = pCursor->GetPaM(); + *pUnoCursor->GetPoint() = *aCursor.GetPoint(); + if (aCursor.HasMark()) { - pUnoCrsr->SetMark(); - *pUnoCrsr->GetMark() = *aCrsr.GetMark(); + pUnoCursor->SetMark(); + *pUnoCursor->GetMark() = *aCursor.GetMark(); } else { - pUnoCrsr->DeleteMark(); + pUnoCursor->DeleteMark(); } } } @@ -2564,7 +2564,7 @@ throw (uno::RuntimeException, std::exception) SwNode& rNode = GetDoc()->GetNodes().GetEndOfContent(); SwPosition aPos(rNode); - auto pUnoCursor(GetDoc()->CreateUnoCrsr(aPos)); + auto pUnoCursor(GetDoc()->CreateUnoCursor(aPos)); pUnoCursor->Move(fnMoveBackward, fnGoDoc); return SwXParagraphEnumeration::Create(this, pUnoCursor, CURSOR_BODY); } @@ -2745,28 +2745,28 @@ SwXHeadFootText::createTextCursor() throw (uno::RuntimeException, std::exception SwPosition aPos(rNode); SwXTextCursor *const pXCursor = new SwXTextCursor(*GetDoc(), this, (m_pImpl->m_bIsHeader) ? CURSOR_HEADER : CURSOR_FOOTER, aPos); - auto& rUnoCrsr(pXCursor->GetCursor()); - rUnoCrsr.Move(fnMoveForward, fnGoNode); + auto& rUnoCursor(pXCursor->GetCursor()); + rUnoCursor.Move(fnMoveForward, fnGoNode); // save current start node to be able to check if there is content // after the table - otherwise the cursor would be in the body text! SwStartNode const*const pOwnStartNode = rNode.FindSttNodeByType( (m_pImpl->m_bIsHeader) ? SwHeaderStartNode : SwFooterStartNode); // is there a table here? - SwTableNode* pTableNode = rUnoCrsr.GetNode().FindTableNode(); + SwTableNode* pTableNode = rUnoCursor.GetNode().FindTableNode(); SwContentNode* pCont = nullptr; while (pTableNode) { - rUnoCrsr.GetPoint()->nNode = *pTableNode->EndOfSectionNode(); - pCont = GetDoc()->GetNodes().GoNext(&rUnoCrsr.GetPoint()->nNode); + rUnoCursor.GetPoint()->nNode = *pTableNode->EndOfSectionNode(); + pCont = GetDoc()->GetNodes().GoNext(&rUnoCursor.GetPoint()->nNode); pTableNode = pCont->FindTableNode(); } if (pCont) { - rUnoCrsr.GetPoint()->nContent.Assign(pCont, 0); + rUnoCursor.GetPoint()->nContent.Assign(pCont, 0); } SwStartNode const*const pNewStartNode = - rUnoCrsr.GetNode().FindSttNodeByType( + rUnoCursor.GetNode().FindSttNodeByType( (m_pImpl->m_bIsHeader) ? SwHeaderStartNode : SwFooterStartNode); if (!pNewStartNode || (pNewStartNode != pOwnStartNode)) { @@ -2826,7 +2826,7 @@ throw (uno::RuntimeException, std::exception) const SwFormatContent& rFlyContent = rHeadFootFormat.GetContent(); const SwNode& rNode = rFlyContent.GetContentIdx()->GetNode(); SwPosition aPos(rNode); - auto pUnoCursor(GetDoc()->CreateUnoCrsr(aPos)); + auto pUnoCursor(GetDoc()->CreateUnoCursor(aPos)); pUnoCursor->Move(fnMoveForward, fnGoNode); return SwXParagraphEnumeration::Create(this, pUnoCursor, (m_pImpl->m_bIsHeader) ? CURSOR_HEADER : CURSOR_FOOTER); } diff --git a/sw/source/core/view/pagepreviewlayout.cxx b/sw/source/core/view/pagepreviewlayout.cxx index 37cf0b5f4add..05519c54f4a6 100644 --- a/sw/source/core/view/pagepreviewlayout.cxx +++ b/sw/source/core/view/pagepreviewlayout.cxx @@ -44,11 +44,11 @@ // methods to initialize page preview layout SwPagePreviewLayout::SwPagePreviewLayout( SwViewShell& _rParentViewShell, - const SwRootFrm& _rLayoutRootFrm ) + const SwRootFrame& _rLayoutRootFrame ) : mnXFree ( 4*142 ), mnYFree ( 4*142 ), mrParentViewShell( _rParentViewShell ), - mrLayoutRootFrm ( _rLayoutRootFrm ) + mrLayoutRootFrame ( _rLayoutRootFrame ) { _Clear(); @@ -125,23 +125,23 @@ void SwPagePreviewLayout::_CalcPreviewLayoutSizes() vcl::RenderContext* pRenderContext = mrParentViewShell.GetOut(); // calculate maximal page size; calculate also number of pages - const SwPageFrm* pPage = static_cast<const SwPageFrm*>(mrLayoutRootFrm.Lower()); + const SwPageFrame* pPage = static_cast<const SwPageFrame*>(mrLayoutRootFrame.Lower()); while ( pPage ) { if ( !mbBookPreview && !mbPrintEmptyPages && pPage->IsEmptyPage() ) { - pPage = static_cast<const SwPageFrm*>(pPage->GetNext()); + pPage = static_cast<const SwPageFrame*>(pPage->GetNext()); continue; } ++mnPages; pPage->Calc(pRenderContext); - const Size& rPageSize = pPage->Frm().SSize(); + const Size& rPageSize = pPage->Frame().SSize(); if ( rPageSize.Width() > maMaxPageSize.Width() ) maMaxPageSize.Width() = rPageSize.Width(); if ( rPageSize.Height() > maMaxPageSize.Height() ) maMaxPageSize.Height() = rPageSize.Height(); - pPage = static_cast<const SwPageFrm*>(pPage->GetNext()); + pPage = static_cast<const SwPageFrame*>(pPage->GetNext()); } // calculate and set column width and row height mnColWidth = maMaxPageSize.Width() + mnXFree; @@ -555,7 +555,7 @@ void SwPagePreviewLayout::_CalcPreviewPages() return; // determine start page frame - const SwPageFrm* pStartPage = mrLayoutRootFrm.GetPageByPageNum( mnPaintPhyStartPageNum ); + const SwPageFrame* pStartPage = mrLayoutRootFrame.GetPageByPageNum( mnPaintPhyStartPageNum ); // calculate initial paint offset Point aInitialPaintOffset; @@ -575,7 +575,7 @@ void SwPagePreviewLayout::_CalcPreviewPages() aInitialPaintOffset += maAdditionalPaintOffset; // prepare loop data - const SwPageFrm* pPage = pStartPage; + const SwPageFrame* pPage = pStartPage; sal_uInt16 nCurrCol = mnPaintStartCol; sal_uInt16 nConsideredRows = 0; Point aCurrPaintOffset = aInitialPaintOffset; @@ -587,7 +587,7 @@ void SwPagePreviewLayout::_CalcPreviewPages() { if ( !mbBookPreview && !mbPrintEmptyPages && pPage->IsEmptyPage() ) { - pPage = static_cast<const SwPageFrm*>(pPage->GetNext()); + pPage = static_cast<const SwPageFrame*>(pPage->GetNext()); continue; } @@ -604,7 +604,7 @@ void SwPagePreviewLayout::_CalcPreviewPages() pPreviewPage->bVisible = false; maPreviewPages.push_back( pPreviewPage ); // continue with next page and next column - pPage = static_cast<const SwPageFrm*>(pPage->GetNext()); + pPage = static_cast<const SwPageFrame*>(pPage->GetNext()); ++nCurrCol; continue; } @@ -641,7 +641,7 @@ void SwPagePreviewLayout::_CalcPreviewPages() } // prepare data for next loop - pPage = static_cast<const SwPageFrm*>(pPage->GetNext()); + pPage = static_cast<const SwPageFrame*>(pPage->GetNext()); /// check whether RTL interface or not if(!AllSettings::GetLayoutRTL()) @@ -662,7 +662,7 @@ void SwPagePreviewLayout::_CalcPreviewPages() OD 13.12.2002 #103492# */ -bool SwPagePreviewLayout::_CalcPreviewDataForPage( const SwPageFrm& _rPage, +bool SwPagePreviewLayout::_CalcPreviewDataForPage( const SwPageFrame& _rPage, const Point& _rPreviewOffset, PreviewPage* _opPreviewPage ) { @@ -672,12 +672,12 @@ bool SwPagePreviewLayout::_CalcPreviewDataForPage( const SwPageFrm& _rPage, if ( _rPage.IsEmptyPage() ) { if ( _rPage.GetPhyPageNum() % 2 == 0 ) - _opPreviewPage->aPageSize = _rPage.GetPrev()->Frm().SSize(); + _opPreviewPage->aPageSize = _rPage.GetPrev()->Frame().SSize(); else - _opPreviewPage->aPageSize = _rPage.GetNext()->Frm().SSize(); + _opPreviewPage->aPageSize = _rPage.GetNext()->Frame().SSize(); } else - _opPreviewPage->aPageSize = _rPage.Frm().SSize(); + _opPreviewPage->aPageSize = _rPage.Frame().SSize(); // position of page in preview window Point aPreviewWinOffset( _rPreviewOffset ); if ( _opPreviewPage->aPageSize.Width() < maMaxPageSize.Width() ) @@ -693,7 +693,7 @@ bool SwPagePreviewLayout::_CalcPreviewDataForPage( const SwPageFrm& _rPage, } else { - _opPreviewPage->aLogicPos = _rPage.Frm().Pos(); + _opPreviewPage->aLogicPos = _rPage.Frame().Pos(); _opPreviewPage->aMapOffset = _opPreviewPage->aPreviewWinPos - _opPreviewPage->aLogicPos; } @@ -1029,7 +1029,7 @@ bool SwPagePreviewLayout::Paint(vcl::RenderContext& rRenderContext, const Rectan } // OD 17.11.2003 #i22014# - no paint, if <superfluous> flag is set at layout - if (mrLayoutRootFrm.IsSuperfluous()) + if (mrLayoutRootFrame.IsSuperfluous()) { return true; } @@ -1050,7 +1050,7 @@ bool SwPagePreviewLayout::Paint(vcl::RenderContext& rRenderContext, const Rectan { mrParentViewShell.Imp()->m_bFirstPageInvalid = false; mrParentViewShell.Imp()->m_pFirstVisiblePage = - const_cast<SwPageFrm*>(maPreviewPages[0]->pPage); + const_cast<SwPageFrame*>(maPreviewPages[0]->pPage); } // paint preview background @@ -1077,7 +1077,7 @@ bool SwPagePreviewLayout::Paint(vcl::RenderContext& rRenderContext, const Rectan MapMode aMapMode( pOutputDev->GetMapMode() ); MapMode aSavedMapMode = aMapMode; - const vcl::Font& rEmptyPgFont = SwPageFrm::GetEmptyPageFont(); + const vcl::Font& rEmptyPgFont = SwPageFrame::GetEmptyPageFont(); for ( std::vector<PreviewPage*>::const_iterator aPageIter = maPreviewPages.begin(); aPageIter != maPreviewPages.end(); @@ -1116,7 +1116,7 @@ bool SwPagePreviewLayout::Paint(vcl::RenderContext& rRenderContext, const Rectan pOutputDev->SetFont( aOldFont ); // paint shadow and border for empty page // OD 19.02.2003 #107369# - use new method to paint page border and shadow - SwPageFrm::PaintBorderAndShadow( aPageRect, &mrParentViewShell, true, false, true ); + SwPageFrame::PaintBorderAndShadow( aPageRect, &mrParentViewShell, true, false, true ); } else { @@ -1128,11 +1128,11 @@ bool SwPagePreviewLayout::Paint(vcl::RenderContext& rRenderContext, const Rectan // paint page border and shadow { SwRect aPageBorderRect; - SwPageFrm::GetBorderAndShadowBoundRect( SwRect( aPageRect ), &mrParentViewShell, &rRenderContext, aPageBorderRect, + SwPageFrame::GetBorderAndShadowBoundRect( SwRect( aPageRect ), &mrParentViewShell, &rRenderContext, aPageBorderRect, (*aPageIter)->pPage->IsLeftShadowNeeded(), (*aPageIter)->pPage->IsRightShadowNeeded(), true ); const vcl::Region aDLRegion(aPageBorderRect.SVRect()); mrParentViewShell.DLPrePaint2(aDLRegion); - SwPageFrm::PaintBorderAndShadow( aPageRect, &mrParentViewShell, true, false, true ); + SwPageFrame::PaintBorderAndShadow( aPageRect, &mrParentViewShell, true, false, true ); mrParentViewShell.DLPostPaint2(true); } // <-- @@ -1160,7 +1160,7 @@ bool SwPagePreviewLayout::Paint(vcl::RenderContext& rRenderContext, const Rectan mrParentViewShell.Imp()->UpdateAccessiblePreview( maPreviewPages, aMapMode.GetScaleX(), - mrLayoutRootFrm.GetPageByPageNum( mnSelectedPageNum ), + mrLayoutRootFrame.GetPageByPageNum( mnSelectedPageNum ), maWinSize ); } @@ -1199,7 +1199,7 @@ void SwPagePreviewLayout::Repaint( const Rectangle& rInvalidCoreRect ) const { mrParentViewShell.Imp()->m_bFirstPageInvalid = false; mrParentViewShell.Imp()->m_pFirstVisiblePage = - const_cast<SwPageFrm*>(maPreviewPages[0]->pPage); + const_cast<SwPageFrame*>(maPreviewPages[0]->pPage); } // invalidate visible pages, which overlap the invalid core rectangle @@ -1253,7 +1253,7 @@ void SwPagePreviewLayout::_PaintSelectMarkAtPage(vcl::RenderContext& rRenderCont SwRect aPageRect( _aSelectedPreviewPage->aLogicPos, _aSelectedPreviewPage->aPageSize ); // OD 19.02.2003 #107369# - use aligned page rectangle, as it is used for - // page border and shadow paint - see <SwPageFrm::PaintBorderAndShadow(..)> + // page border and shadow paint - see <SwPageFrame::PaintBorderAndShadow(..)> ::SwAlignRect( aPageRect, &mrParentViewShell, pOutputDev ); Rectangle aPxPageRect = pOutputDev->LogicToPixel( aPageRect.SVRect() ); @@ -1444,7 +1444,7 @@ sal_uInt16 SwPagePreviewLayout::ConvertAbsoluteToRelativePageNum( sal_uInt16 _nA return _nAbsPageNum; } - const SwPageFrm* pTmpPage = static_cast<const SwPageFrm*>(mrLayoutRootFrm.Lower()); + const SwPageFrame* pTmpPage = static_cast<const SwPageFrame*>(mrLayoutRootFrame.Lower()); sal_uInt16 nRet = 1; @@ -1453,7 +1453,7 @@ sal_uInt16 SwPagePreviewLayout::ConvertAbsoluteToRelativePageNum( sal_uInt16 _nA if ( !pTmpPage->IsEmptyPage() ) ++nRet; - pTmpPage = static_cast<const SwPageFrm*>( pTmpPage->GetNext() ); + pTmpPage = static_cast<const SwPageFrame*>( pTmpPage->GetNext() ); } return nRet; @@ -1467,8 +1467,8 @@ sal_uInt16 SwPagePreviewLayout::ConvertRelativeToAbsolutePageNum( sal_uInt16 _nR return _nRelPageNum; } - const SwPageFrm* pTmpPage = static_cast<const SwPageFrm*>(mrLayoutRootFrm.Lower()); - const SwPageFrm* pRet = nullptr; + const SwPageFrame* pTmpPage = static_cast<const SwPageFrame*>(mrLayoutRootFrame.Lower()); + const SwPageFrame* pRet = nullptr; sal_uInt16 i = 0; while( pTmpPage && i != _nRelPageNum ) @@ -1477,7 +1477,7 @@ sal_uInt16 SwPagePreviewLayout::ConvertRelativeToAbsolutePageNum( sal_uInt16 _nR ++i; pRet = pTmpPage; - pTmpPage = static_cast<const SwPageFrm*>( pTmpPage->GetNext() ); + pTmpPage = static_cast<const SwPageFrame*>( pTmpPage->GetNext() ); } return pRet->GetPhyPageNum(); diff --git a/sw/source/core/view/vdraw.cxx b/sw/source/core/view/vdraw.cxx index 25f2b87efdd8..2f20aeb33dca 100644 --- a/sw/source/core/view/vdraw.cxx +++ b/sw/source/core/view/vdraw.cxx @@ -174,7 +174,7 @@ bool SwViewShellImp::IsDragPossible( const Point &rPoint ) aRect.Union( aTmp ); } else - aRect = GetShell()->GetLayout()->Frm(); + aRect = GetShell()->GetLayout()->Frame(); aRect.Top( aRect.Top() - FUZZY_EDGE ); aRect.Bottom( aRect.Bottom() + FUZZY_EDGE ); @@ -220,9 +220,9 @@ void SwViewShellImp::NotifySizeChg( const Size &rNewSz ) if( !pCont || dynamic_cast<const SwDrawContact*>( pCont) == nullptr ) continue; - const SwFrm *pAnchor = static_cast<const SwDrawContact*>(pCont)->GetAnchorFrm(); + const SwFrame *pAnchor = static_cast<const SwDrawContact*>(pCont)->GetAnchorFrame(); if ( !pAnchor || pAnchor->IsInFly() || !pAnchor->IsValid() || - !pAnchor->GetUpper() || !pAnchor->FindPageFrm() || + !pAnchor->GetUpper() || !pAnchor->FindPageFrame() || (FLY_AS_CHAR == pCont->GetFormat()->GetAnchor().GetAnchorId()) ) { continue; @@ -232,8 +232,8 @@ void SwViewShellImp::NotifySizeChg( const Size &rNewSz ) // Actually this should never happen but currently layouting // is broken. So don't move anchors, if the page is invalid. // This should be turned into an DBG_ASSERT, once layouting is fixed! - const SwPageFrm *pPageFrm = pAnchor->FindPageFrm(); - if (!pPageFrm || pPageFrm->IsInvalid() ) { + const SwPageFrame *pPageFrame = pAnchor->FindPageFrame(); + if (!pPageFrame || pPageFrame->IsInvalid() ) { SAL_WARN( "sw.core", "Trying to move anchor from invalid page - fix layouting!" ); continue; } diff --git a/sw/source/core/view/viewimp.cxx b/sw/source/core/view/viewimp.cxx index 4d3206ea0427..d84ffa91d15d 100644 --- a/sw/source/core/view/viewimp.cxx +++ b/sw/source/core/view/viewimp.cxx @@ -45,15 +45,15 @@ void SwViewShellImp::Init( const SwViewOption *pNewOpt ) { OSL_ENSURE( m_pDrawView, "SwViewShellImp::Init without DrawView" ); //Create PageView if it doesn't exist - SwRootFrm *pRoot = m_pShell->GetLayout(); + SwRootFrame *pRoot = m_pShell->GetLayout(); if ( !m_pSdrPageView ) { IDocumentDrawModelAccess& rIDDMA = m_pShell->getIDocumentDrawModelAccess(); if ( !pRoot->GetDrawPage() ) pRoot->SetDrawPage( rIDDMA.GetDrawModel()->GetPage( 0 ) ); - if ( pRoot->GetDrawPage()->GetSize() != pRoot->Frm().SSize() ) - pRoot->GetDrawPage()->SetSize( pRoot->Frm().SSize() ); + if ( pRoot->GetDrawPage()->GetSize() != pRoot->Frame().SSize() ) + pRoot->GetDrawPage()->SetSize( pRoot->Frame().SSize() ); m_pSdrPageView = m_pDrawView->ShowSdrPage( pRoot->GetDrawPage()); // OD 26.06.2003 #108784# - notify drawing page view about invisible @@ -73,8 +73,8 @@ void SwViewShellImp::Init( const SwViewOption *pNewOpt ) Fraction aSnGrWdtY(rSz.Height(), pNewOpt->GetDivisionY() + 1); m_pDrawView->SetSnapGridWidth( aSnGrWdtX, aSnGrWdtY ); - if ( pRoot->Frm().HasArea() ) - m_pDrawView->SetWorkArea( pRoot->Frm().SVRect() ); + if ( pRoot->Frame().HasArea() ) + m_pDrawView->SetWorkArea( pRoot->Frame().SVRect() ); if ( GetShell()->IsPreview() ) m_pDrawView->SetAnimationEnabled( false ); @@ -138,7 +138,7 @@ bool SwViewShellImp::AddPaintRect( const SwRect &rRect ) { // In case of normal rendering, this makes sure only visible rectangles are painted. // Otherwise get the rectangle of the full document, so all paint rectangles are invalidated. - const SwRect& rArea = m_pShell->isTiledRendering() ? m_pShell->GetLayout()->Frm() : m_pShell->VisArea(); + const SwRect& rArea = m_pShell->isTiledRendering() ? m_pShell->GetLayout()->Frame() : m_pShell->VisArea(); m_pRegion = new SwRegionRects( rArea ); } (*m_pRegion) -= rRect; @@ -147,10 +147,10 @@ bool SwViewShellImp::AddPaintRect( const SwRect &rRect ) return false; } -void SwViewShellImp::CheckWaitCrsr() +void SwViewShellImp::CheckWaitCursor() { if ( m_pLayAction ) - m_pLayAction->CheckWaitCrsr(); + m_pLayAction->CheckWaitCursor(); } bool SwViewShellImp::IsCalcLayoutProgress() const @@ -170,36 +170,36 @@ bool SwViewShellImp::IsUpdateExpFields() void SwViewShellImp::SetFirstVisPage(OutputDevice* pRenderContext) { - if ( m_pShell->mbDocSizeChgd && m_pShell->VisArea().Top() > m_pShell->GetLayout()->Frm().Height() ) + if ( m_pShell->mbDocSizeChgd && m_pShell->VisArea().Top() > m_pShell->GetLayout()->Frame().Height() ) { //We are in an action and because of erase actions the VisArea is //after the first visible page. //To avoid excessive formatting, hand back the last page. - m_pFirstVisiblePage = static_cast<SwPageFrm*>(m_pShell->GetLayout()->Lower()); + m_pFirstVisiblePage = static_cast<SwPageFrame*>(m_pShell->GetLayout()->Lower()); while ( m_pFirstVisiblePage && m_pFirstVisiblePage->GetNext() ) - m_pFirstVisiblePage = static_cast<SwPageFrm*>(m_pFirstVisiblePage->GetNext()); + m_pFirstVisiblePage = static_cast<SwPageFrame*>(m_pFirstVisiblePage->GetNext()); } else { const SwViewOption* pSwViewOption = GetShell()->GetViewOptions(); const bool bBookMode = pSwViewOption->IsViewLayoutBookMode(); - SwPageFrm *pPage = static_cast<SwPageFrm*>(m_pShell->GetLayout()->Lower()); + SwPageFrame *pPage = static_cast<SwPageFrame*>(m_pShell->GetLayout()->Lower()); SwRect aPageRect = pPage->GetBoundRect(pRenderContext); while ( pPage && !aPageRect.IsOver( m_pShell->VisArea() ) ) { - pPage = static_cast<SwPageFrm*>(pPage->GetNext()); + pPage = static_cast<SwPageFrame*>(pPage->GetNext()); if ( pPage ) { aPageRect = pPage->GetBoundRect(pRenderContext); if ( bBookMode && pPage->IsEmptyPage() ) { - const SwPageFrm& rFormatPage = pPage->GetFormatPage(); + const SwPageFrame& rFormatPage = pPage->GetFormatPage(); aPageRect.SSize() = rFormatPage.GetBoundRect(pRenderContext).SSize(); } } } - m_pFirstVisiblePage = pPage ? pPage : static_cast<SwPageFrm*>(m_pShell->GetLayout()->Lower()); + m_pFirstVisiblePage = pPage ? pPage : static_cast<SwPageFrame*>(m_pShell->GetLayout()->Lower()); } m_bFirstPageInvalid = false; } @@ -268,14 +268,14 @@ Color SwViewShellImp::GetRetoucheColor() const return aRet; } -SwPageFrm *SwViewShellImp::GetFirstVisPage(OutputDevice* pRenderContext) +SwPageFrame *SwViewShellImp::GetFirstVisPage(OutputDevice* pRenderContext) { if ( m_bFirstPageInvalid ) SetFirstVisPage(pRenderContext); return m_pFirstVisiblePage; } -const SwPageFrm *SwViewShellImp::GetFirstVisPage(OutputDevice* pRenderContext) const +const SwPageFrame *SwViewShellImp::GetFirstVisPage(OutputDevice* pRenderContext) const { if ( m_bFirstPageInvalid ) const_cast<SwViewShellImp*>(this)->SetFirstVisPage(pRenderContext); @@ -302,65 +302,65 @@ void SwViewShellImp::UpdateAccessible() GetAccessibleMap().GetDocumentView(); } -void SwViewShellImp::DisposeAccessible( const SwFrm *pFrm, +void SwViewShellImp::DisposeAccessible( const SwFrame *pFrame, const SdrObject *pObj, bool bRecursive ) { - OSL_ENSURE( !pFrm || pFrm->IsAccessibleFrm(), "frame is not accessible" ); + OSL_ENSURE( !pFrame || pFrame->IsAccessibleFrame(), "frame is not accessible" ); for(SwViewShell& rTmp : GetShell()->GetRingContainer()) { if( rTmp.Imp()->IsAccessible() ) - rTmp.Imp()->GetAccessibleMap().Dispose( pFrm, pObj, nullptr, bRecursive ); + rTmp.Imp()->GetAccessibleMap().Dispose( pFrame, pObj, nullptr, bRecursive ); } } -void SwViewShellImp::MoveAccessible( const SwFrm *pFrm, const SdrObject *pObj, - const SwRect& rOldFrm ) +void SwViewShellImp::MoveAccessible( const SwFrame *pFrame, const SdrObject *pObj, + const SwRect& rOldFrame ) { - OSL_ENSURE( !pFrm || pFrm->IsAccessibleFrm(), "frame is not accessible" ); + OSL_ENSURE( !pFrame || pFrame->IsAccessibleFrame(), "frame is not accessible" ); for(SwViewShell& rTmp : GetShell()->GetRingContainer()) { if( rTmp.Imp()->IsAccessible() ) - rTmp.Imp()->GetAccessibleMap().InvalidatePosOrSize( pFrm, pObj, nullptr, - rOldFrm ); + rTmp.Imp()->GetAccessibleMap().InvalidatePosOrSize( pFrame, pObj, nullptr, + rOldFrame ); } } -void SwViewShellImp::InvalidateAccessibleFrmContent( const SwFrm *pFrm ) +void SwViewShellImp::InvalidateAccessibleFrameContent( const SwFrame *pFrame ) { - OSL_ENSURE( pFrm->IsAccessibleFrm(), "frame is not accessible" ); + OSL_ENSURE( pFrame->IsAccessibleFrame(), "frame is not accessible" ); for(SwViewShell& rTmp : GetShell()->GetRingContainer()) { if( rTmp.Imp()->IsAccessible() ) - rTmp.Imp()->GetAccessibleMap().InvalidateContent( pFrm ); + rTmp.Imp()->GetAccessibleMap().InvalidateContent( pFrame ); } } -void SwViewShellImp::InvalidateAccessibleCursorPosition( const SwFrm *pFrm ) +void SwViewShellImp::InvalidateAccessibleCursorPosition( const SwFrame *pFrame ) { if( IsAccessible() ) - GetAccessibleMap().InvalidateCursorPosition( pFrm ); + GetAccessibleMap().InvalidateCursorPosition( pFrame ); } void SwViewShellImp::InvalidateAccessibleEditableState( bool bAllShells, - const SwFrm *pFrm ) + const SwFrame *pFrame ) { if( bAllShells ) { for(SwViewShell& rTmp : GetShell()->GetRingContainer()) { if( rTmp.Imp()->IsAccessible() ) - rTmp.Imp()->GetAccessibleMap().InvalidateStates( AccessibleStates::EDITABLE, pFrm ); + rTmp.Imp()->GetAccessibleMap().InvalidateStates( AccessibleStates::EDITABLE, pFrame ); } } else if( IsAccessible() ) { - GetAccessibleMap().InvalidateStates( AccessibleStates::EDITABLE, pFrm ); + GetAccessibleMap().InvalidateStates( AccessibleStates::EDITABLE, pFrame ); } } -void SwViewShellImp::InvalidateAccessibleRelationSet( const SwFlyFrm *pMaster, - const SwFlyFrm *pFollow ) +void SwViewShellImp::InvalidateAccessibleRelationSet( const SwFlyFrame *pMaster, + const SwFlyFrame *pFollow ) { for(SwViewShell& rTmp : GetShell()->GetRingContainer()) { @@ -371,10 +371,10 @@ void SwViewShellImp::InvalidateAccessibleRelationSet( const SwFlyFrm *pMaster, } /// invalidate CONTENT_FLOWS_FROM/_TO relation for paragraphs -void SwViewShellImp::_InvalidateAccessibleParaFlowRelation( const SwTextFrm* _pFromTextFrm, - const SwTextFrm* _pToTextFrm ) +void SwViewShellImp::_InvalidateAccessibleParaFlowRelation( const SwTextFrame* _pFromTextFrame, + const SwTextFrame* _pToTextFrame ) { - if ( !_pFromTextFrm && !_pToTextFrm ) + if ( !_pFromTextFrame && !_pToTextFrame ) { // No text frame provided. Thus, nothing to do. return; @@ -384,15 +384,15 @@ void SwViewShellImp::_InvalidateAccessibleParaFlowRelation( const SwTextFrm* _pF { if ( rTmp.Imp()->IsAccessible() ) { - if ( _pFromTextFrm ) + if ( _pFromTextFrame ) { rTmp.Imp()->GetAccessibleMap(). - InvalidateParaFlowRelation( *_pFromTextFrm, true ); + InvalidateParaFlowRelation( *_pFromTextFrame, true ); } - if ( _pToTextFrm ) + if ( _pToTextFrame ) { rTmp.Imp()->GetAccessibleMap(). - InvalidateParaFlowRelation( *_pToTextFrm, false ); + InvalidateParaFlowRelation( *_pToTextFrame, false ); } } } @@ -411,13 +411,13 @@ void SwViewShellImp::_InvalidateAccessibleParaTextSelection() } /// invalidate attributes for paragraphs -void SwViewShellImp::_InvalidateAccessibleParaAttrs( const SwTextFrm& rTextFrm ) +void SwViewShellImp::_InvalidateAccessibleParaAttrs( const SwTextFrame& rTextFrame ) { for(SwViewShell& rTmp : GetShell()->GetRingContainer()) { if ( rTmp.Imp()->IsAccessible() ) { - rTmp.Imp()->GetAccessibleMap().InvalidateAttr( rTextFrm ); + rTmp.Imp()->GetAccessibleMap().InvalidateAttr( rTextFrame ); } } } @@ -425,12 +425,12 @@ void SwViewShellImp::_InvalidateAccessibleParaAttrs( const SwTextFrm& rTextFrm ) // OD 15.01.2003 #103492# - method signature change due to new page preview functionality void SwViewShellImp::UpdateAccessiblePreview( const std::vector<PreviewPage*>& _rPreviewPages, const Fraction& _rScale, - const SwPageFrm* _pSelectedPageFrm, + const SwPageFrame* _pSelectedPageFrame, const Size& _rPreviewWinSize ) { if( IsAccessible() ) GetAccessibleMap().UpdatePreview( _rPreviewPages, _rScale, - _pSelectedPageFrm, _rPreviewWinSize ); + _pSelectedPageFrame, _rPreviewWinSize ); } void SwViewShellImp::InvalidateAccessiblePreviewSelection( sal_uInt16 nSelPage ) diff --git a/sw/source/core/view/viewpg.cxx b/sw/source/core/view/viewpg.cxx index 5ce9b9bae458..60a7cda9bcc8 100644 --- a/sw/source/core/view/viewpg.cxx +++ b/sw/source/core/view/viewpg.cxx @@ -113,8 +113,8 @@ void SwViewShell::PrintProspect( SwTwips nMaxRowSz, nMaxColSz; - const SwPageFrm *pStPage = nullptr; - const SwPageFrm *pNxtPage = nullptr; + const SwPageFrame *pStPage = nullptr; + const SwPageFrame *pNxtPage = nullptr; if (rPagesToPrint.first > 0) { pStPage = sw_getPage(*aShell.GetLayout(), rPagesToPrint.first); @@ -132,13 +132,13 @@ void SwViewShell::PrintProspect( if ( pStPage->IsEmptyPage() ) { if ( pStPage->GetPhyPageNum() % 2 == 0 ) - aSttPageSize = pStPage->GetPrev()->Frm().SSize(); + aSttPageSize = pStPage->GetPrev()->Frame().SSize(); else - aSttPageSize = pStPage->GetNext()->Frm().SSize(); + aSttPageSize = pStPage->GetNext()->Frame().SSize(); } else { - aSttPageSize = pStPage->Frm().SSize(); + aSttPageSize = pStPage->Frame().SSize(); } } Size aNxtPageSize; @@ -147,13 +147,13 @@ void SwViewShell::PrintProspect( if ( pNxtPage->IsEmptyPage() ) { if ( pNxtPage->GetPhyPageNum() % 2 == 0 ) - aNxtPageSize = pNxtPage->GetPrev()->Frm().SSize(); + aNxtPageSize = pNxtPage->GetPrev()->Frame().SSize(); else - aNxtPageSize = pNxtPage->GetNext()->Frm().SSize(); + aNxtPageSize = pNxtPage->GetNext()->Frame().SSize(); } else { - aNxtPageSize = pNxtPage->Frm().SSize(); + aNxtPageSize = pNxtPage->Frame().SSize(); } } @@ -206,13 +206,13 @@ void SwViewShell::PrintProspect( if( pStPage ) { aShell.Imp()->SetFirstVisPageInvalid(); - aShell.maVisArea = pStPage->Frm(); + aShell.maVisArea = pStPage->Frame(); Point aPos( aSttPt ); aPos -= aShell.maVisArea.Pos(); aMapMode.SetOrigin( aPos ); pPrinter->SetMapMode( aMapMode ); - pStPage->GetUpper()->Paint( *pOutDev, pStPage->Frm() ); + pStPage->GetUpper()->Paint( *pOutDev, pStPage->Frame() ); } pStPage = pNxtPage; diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 229b7a551364..1b01d6e6d02c 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -327,14 +327,14 @@ void SwViewShell::ImplEndAction( const bool bIdleEnd ) // else we get Paint errors! // e.g. additional mode, page half visible vertically, in the // middle a selection and with an other cursor jump to left - // right border. Without ShowCrsr the selection disappears. - bool bShowCrsr = pRegion && dynamic_cast<const SwCrsrShell*>(this) != nullptr; - if( bShowCrsr ) - static_cast<SwCrsrShell*>(this)->HideCrsrs(); + // right border. Without ShowCursor the selection disappears. + bool bShowCursor = pRegion && dynamic_cast<const SwCursorShell*>(this) != nullptr; + if( bShowCursor ) + static_cast<SwCursorShell*>(this)->HideCursors(); if ( pRegion ) { - SwRootFrm* pCurrentLayout = GetLayout(); + SwRootFrame* pCurrentLayout = GetLayout(); Imp()->m_pRegion = nullptr; @@ -441,8 +441,8 @@ void SwViewShell::ImplEndAction( const bool bIdleEnd ) delete pRegion; Imp()->DelRegion(); } - if( bShowCrsr ) - static_cast<SwCrsrShell*>(this)->ShowCrsrs( true ); + if( bShowCursor ) + static_cast<SwCursorShell*>(this)->ShowCursors( true ); } else { @@ -578,7 +578,7 @@ const SwRect& SwViewShell::VisArea() const { // when using the tiled rendering, consider the entire document as our // visible area - return isTiledRendering()? GetLayout()->Frm(): maVisArea; + return isTiledRendering()? GetLayout()->Frame(): maVisArea; } void SwViewShell::MakeVisible( const SwRect &rRect ) @@ -589,15 +589,15 @@ void SwViewShell::MakeVisible( const SwRect &rRect ) { if( mpWin ) { - const SwFrm* pRoot = GetLayout(); + const SwFrame* pRoot = GetLayout(); int nLoopCnt = 3; long nOldH; do{ - nOldH = pRoot->Frm().Height(); + nOldH = pRoot->Frame().Height(); StartAction(); ScrollMDI( this, rRect, USHRT_MAX, USHRT_MAX ); EndAction(); - } while( nOldH != pRoot->Frm().Height() && nLoopCnt-- ); + } while( nOldH != pRoot->Frame().Height() && nLoopCnt-- ); } #if OSL_DEBUG_LEVEL > 0 else @@ -654,16 +654,16 @@ void SwViewShell::UpdateFields(bool bCloseDB) { SET_CURR_SHELL( this ); - bool bCrsr = dynamic_cast<const SwCrsrShell*>( this ) != nullptr; - if ( bCrsr ) - static_cast<SwCrsrShell*>(this)->StartAction(); + bool bCursor = dynamic_cast<const SwCursorShell*>( this ) != nullptr; + if ( bCursor ) + static_cast<SwCursorShell*>(this)->StartAction(); else StartAction(); GetDoc()->getIDocumentFieldsAccess().UpdateFields(nullptr, bCloseDB); - if ( bCrsr ) - static_cast<SwCrsrShell*>(this)->EndAction(); + if ( bCursor ) + static_cast<SwCursorShell*>(this)->EndAction(); else EndAction(); } @@ -717,8 +717,8 @@ void SwViewShell::LayoutIdle() { //Prepare and recover cache, so that it will not get fouled. - SwSaveSetLRUOfst aSave( *SwTextFrm::GetTextCache(), - SwTextFrm::GetTextCache()->GetCurMax() - 50 ); + SwSaveSetLRUOfst aSave( *SwTextFrame::GetTextCache(), + SwTextFrame::GetTextCache()->GetCurMax() - 50 ); // #125243# there are lots of stacktraces indicating that Imp() returns NULL // this SwViewShell seems to be invalid - but it's not clear why // this return is only a workaround! @@ -731,14 +731,14 @@ void SwViewShell::LayoutIdle() static void lcl_InvalidateAllContent( SwViewShell& rSh, sal_uInt8 nInv ) { - bool bCrsr = dynamic_cast<const SwCrsrShell*>( &rSh) != nullptr; - if ( bCrsr ) - static_cast<SwCrsrShell&>(rSh).StartAction(); + bool bCursor = dynamic_cast<const SwCursorShell*>( &rSh) != nullptr; + if ( bCursor ) + static_cast<SwCursorShell&>(rSh).StartAction(); else rSh.StartAction(); rSh.GetLayout()->InvalidateAllContent( nInv ); - if ( bCrsr ) - static_cast<SwCrsrShell&>(rSh).EndAction(); + if ( bCursor ) + static_cast<SwCursorShell&>(rSh).EndAction(); else rSh.EndAction(); @@ -751,16 +751,16 @@ static void lcl_InvalidateAllContent( SwViewShell& rSh, sal_uInt8 nInv ) */ static void lcl_InvalidateAllObjPos( SwViewShell &_rSh ) { - const bool bIsCrsrShell = dynamic_cast<const SwCrsrShell*>( &_rSh) != nullptr; - if ( bIsCrsrShell ) - static_cast<SwCrsrShell&>(_rSh).StartAction(); + const bool bIsCursorShell = dynamic_cast<const SwCursorShell*>( &_rSh) != nullptr; + if ( bIsCursorShell ) + static_cast<SwCursorShell&>(_rSh).StartAction(); else _rSh.StartAction(); _rSh.GetLayout()->InvalidateAllObjPos(); - if ( bIsCrsrShell ) - static_cast<SwCrsrShell&>(_rSh).EndAction(); + if ( bIsCursorShell ) + static_cast<SwCursorShell&>(_rSh).EndAction(); else _rSh.EndAction(); @@ -951,8 +951,8 @@ void SwViewShell::CalcLayout() SwWait aWait( *GetDoc()->GetDocShell(), true ); //prepare and recover cache, so that it will not get fouled. - SwSaveSetLRUOfst aSaveLRU( *SwTextFrm::GetTextCache(), - SwTextFrm::GetTextCache()->GetCurMax() - 50 ); + SwSaveSetLRUOfst aSaveLRU( *SwTextFrame::GetTextCache(), + SwTextFrame::GetTextCache()->GetCurMax() - 50 ); //switch on Progress when none is running yet. const bool bEndProgress = SfxProgress::GetActiveProgress( GetDoc()->GetDocShell() ) == nullptr; @@ -1011,11 +1011,11 @@ void SwViewShell::SizeChgNotify() { mbDocSizeChgd = true; - if ( !Imp()->IsCalcLayoutProgress() && dynamic_cast<const SwCrsrShell*>( this ) != nullptr ) + if ( !Imp()->IsCalcLayoutProgress() && dynamic_cast<const SwCursorShell*>( this ) != nullptr ) { - const SwFrm *pCnt = static_cast<SwCrsrShell*>(this)->GetCurrFrm( false ); - const SwPageFrm *pPage; - if ( pCnt && nullptr != (pPage = pCnt->FindPageFrm()) ) + const SwFrame *pCnt = static_cast<SwCursorShell*>(this)->GetCurrFrame( false ); + const SwPageFrame *pPage; + if ( pCnt && nullptr != (pPage = pCnt->FindPageFrame()) ) { const sal_uInt16 nVirtNum = pPage->GetVirtPageNum(); const SvxNumberType& rNum = pPage->GetPageDesc()->GetNumType(); @@ -1052,7 +1052,7 @@ void SwViewShell::VisPortChgd( const SwRect &rRect) //First get the old visible page, so we don't have to look //for it afterwards. - const SwFrm *pOldPage = Imp()->GetFirstVisPage(GetWin()); + const SwFrame *pOldPage = Imp()->GetFirstVisPage(GetWin()); const SwRect aPrevArea( VisArea() ); const bool bFull = aPrevArea.IsEmpty(); @@ -1061,7 +1061,7 @@ void SwViewShell::VisPortChgd( const SwRect &rRect) //When there a PaintRegion still exists and the VisArea has changed, //the PaintRegion is at least by now obsolete. The PaintRegion can - //have been created by RootFrm::Paint. + //have been created by RootFrame::Paint. if ( !mbInEndAction && Imp()->GetRegion() && Imp()->GetRegion()->GetOrigin() != VisArea() ) Imp()->DelRegion(); @@ -1086,9 +1086,9 @@ void SwViewShell::VisPortChgd( const SwRect &rRect) // If possible, don't scroll the application background // (PaintDesktop). Also limit the left and right side of // the scroll range to the pages. - const SwPageFrm *pPage = static_cast<SwPageFrm*>(GetLayout()->Lower()); - if ( pPage->Frm().Top() > pOldPage->Frm().Top() ) - pPage = static_cast<const SwPageFrm*>(pOldPage); + const SwPageFrame *pPage = static_cast<SwPageFrame*>(GetLayout()->Lower()); + if ( pPage->Frame().Top() > pOldPage->Frame().Top() ) + pPage = static_cast<const SwPageFrame*>(pOldPage); SwRect aBoth( VisArea() ); aBoth.Union( aPrevArea ); const SwTwips nBottom = aBoth.Bottom(); @@ -1097,12 +1097,12 @@ void SwViewShell::VisPortChgd( const SwRect &rRect) const bool bBookMode = GetViewOptions()->IsViewLayoutBookMode(); - while ( pPage && pPage->Frm().Top() <= nBottom ) + while ( pPage && pPage->Frame().Top() <= nBottom ) { SwRect aPageRect( pPage->GetBoundRect(GetWin()) ); if ( bBookMode ) { - const SwPageFrm& rFormatPage = static_cast<const SwPageFrm*>(pPage)->GetFormatPage(); + const SwPageFrame& rFormatPage = static_cast<const SwPageFrame*>(pPage)->GetFormatPage(); aPageRect.SSize() = rFormatPage.GetBoundRect(GetWin()).SSize(); } @@ -1149,7 +1149,7 @@ void SwViewShell::VisPortChgd( const SwRect &rRect) } } } - pPage = static_cast<const SwPageFrm*>(pPage->GetNext()); + pPage = static_cast<const SwPageFrame*>(pPage->GetNext()); } Rectangle aRect( aPrevArea.SVRect() ); aRect.Left() = nMinLeft; @@ -1455,13 +1455,13 @@ void SwViewShell::PaintDesktop(vcl::RenderContext& rRenderContext, const SwRect //Unfortunately we must at any rate Paint the rectangles next to the pages, //as these are not painted at VisPortChgd. bool bBorderOnly = false; - const SwRootFrm *pRoot = GetLayout(); - if ( rRect.Top() > pRoot->Frm().Bottom() ) + const SwRootFrame *pRoot = GetLayout(); + if ( rRect.Top() > pRoot->Frame().Bottom() ) { - const SwFrm *pPg = pRoot->Lower(); + const SwFrame *pPg = pRoot->Lower(); while ( pPg && pPg->GetNext() ) pPg = pPg->GetNext(); - if ( !pPg || !pPg->Frm().IsOver( VisArea() ) ) + if ( !pPg || !pPg->Frame().IsOver( VisArea() ) ) bBorderOnly = true; } @@ -1477,14 +1477,14 @@ void SwViewShell::PaintDesktop(vcl::RenderContext& rRenderContext, const SwRect if ( bBorderOnly ) { - const SwFrm *pPage =pRoot->Lower(); + const SwFrame *pPage =pRoot->Lower(); SwRect aLeft( rRect ), aRight( rRect ); while ( pPage ) { - long nTmp = pPage->Frm().Left(); + long nTmp = pPage->Frame().Left(); if ( nTmp < aLeft.Right() ) aLeft.Right( nTmp ); - nTmp = pPage->Frm().Right(); + nTmp = pPage->Frame().Right(); if ( nTmp > aRight.Left() ) { aRight.Left( nTmp + nSidebarWidth ); @@ -1499,20 +1499,20 @@ void SwViewShell::PaintDesktop(vcl::RenderContext& rRenderContext, const SwRect } else { - const SwFrm *pPage = Imp()->GetFirstVisPage(&rRenderContext); + const SwFrame *pPage = Imp()->GetFirstVisPage(&rRenderContext); const SwTwips nBottom = rRect.Bottom(); while ( pPage && !aRegion.empty() && - (pPage->Frm().Top() <= nBottom) ) + (pPage->Frame().Top() <= nBottom) ) { - SwRect aPageRect( pPage->Frm() ); + SwRect aPageRect( pPage->Frame() ); if ( bBookMode ) { - const SwPageFrm& rFormatPage = static_cast<const SwPageFrm*>(pPage)->GetFormatPage(); - aPageRect.SSize() = rFormatPage.Frm().SSize(); + const SwPageFrame& rFormatPage = static_cast<const SwPageFrame*>(pPage)->GetFormatPage(); + aPageRect.SSize() = rFormatPage.Frame().SSize(); } const bool bSidebarRight = - static_cast<const SwPageFrm*>(pPage)->SidebarPosition() == sw::sidebarwindows::SidebarPosition::RIGHT; + static_cast<const SwPageFrame*>(pPage)->SidebarPosition() == sw::sidebarwindows::SidebarPosition::RIGHT; aPageRect.Pos().X() -= bSidebarRight ? 0 : nSidebarWidth; aPageRect.SSize().Width() += nSidebarWidth; @@ -1583,16 +1583,16 @@ bool SwViewShell::CheckInvalidForPaint( const SwRect &rRect ) if ( !GetWin() ) return false; - const SwPageFrm *pPage = Imp()->GetFirstVisPage(GetOut()); + const SwPageFrame *pPage = Imp()->GetFirstVisPage(GetOut()); const SwTwips nBottom = VisArea().Bottom(); const SwTwips nRight = VisArea().Right(); bool bRet = false; - while ( !bRet && pPage && !((pPage->Frm().Top() > nBottom) || - (pPage->Frm().Left() > nRight))) + while ( !bRet && pPage && !((pPage->Frame().Top() > nBottom) || + (pPage->Frame().Left() > nRight))) { if ( pPage->IsInvalid() || pPage->IsInvalidFly() ) bRet = true; - pPage = static_cast<const SwPageFrm*>(pPage->GetNext()); + pPage = static_cast<const SwPageFrame*>(pPage->GetNext()); } if ( bRet ) @@ -1740,7 +1740,7 @@ void SwViewShell::Paint(vcl::RenderContext& rRenderContext, const Rectangle &rRe return; } - if ( SwRootFrm::IsInPaint() ) + if ( SwRootFrame::IsInPaint() ) { //During the publication of a page at printing the Paint is buffered. SwPaintQueue::Add( this, SwRect( rRect ) ); @@ -1762,7 +1762,7 @@ void SwViewShell::Paint(vcl::RenderContext& rRenderContext, const Rectangle &rRe mbPaintInProgress = true; SET_CURR_SHELL( this ); - SwRootFrm::SetNoVirDev( true ); + SwRootFrame::SetNoVirDev( true ); //We don't want to Clip to and fro, we trust that all are limited //to the rectangle and only need to calculate the clipping once. @@ -1807,7 +1807,7 @@ void SwViewShell::Paint(vcl::RenderContext& rRenderContext, const Rectangle &rRe // <-- } } - SwRootFrm::SetNoVirDev( false ); + SwRootFrame::SetNoVirDev( false ); mbPaintInProgress = false; UISizeNotify(); } @@ -1962,9 +1962,9 @@ void SwViewShell::InvalidateLayout( bool bSizeChanged ) // That leads to problems with Invalidate, e.g. when setting up an new View // the content is inserted and formatted (regardless of empty VisArea). // Therefore the pages must be roused for formatting. - if( !GetLayout()->Frm().Height() ) + if( !GetLayout()->Frame().Height() ) { - SwFrm* pPage = GetLayout()->Lower(); + SwFrame* pPage = GetLayout()->Lower(); while( pPage ) { pPage->_InvalidateSize(); @@ -1976,7 +1976,7 @@ void SwViewShell::InvalidateLayout( bool bSizeChanged ) LockPaint(); StartAction(); - SwPageFrm *pPg = static_cast<SwPageFrm*>(GetLayout()->Lower()); + SwPageFrame *pPg = static_cast<SwPageFrame*>(GetLayout()->Lower()); do { pPg->InvalidateSize(); pPg->_InvalidatePrt(); @@ -1986,26 +1986,26 @@ void SwViewShell::InvalidateLayout( bool bSizeChanged ) pPg->PrepareHeader(); pPg->PrepareFooter(); } - pPg = static_cast<SwPageFrm*>(pPg->GetNext()); + pPg = static_cast<SwPageFrame*>(pPg->GetNext()); } while ( pPg ); // When the size ratios in browse mode change, // the Position and PrtArea of the Content and Tab frames must be Invalidated. sal_uInt8 nInv = INV_PRTAREA | INV_TABLE | INV_POS; - // In case of layout or mode change, the ContentFrms need a size-Invalidate + // In case of layout or mode change, the ContentFrames need a size-Invalidate // because of printer/screen formatting. if ( bSizeChanged ) nInv |= INV_SIZE | INV_DIRECTION; GetLayout()->InvalidateAllContent( nInv ); - SwFrm::CheckPageDescs( static_cast<SwPageFrm*>(GetLayout()->Lower()) ); + SwFrame::CheckPageDescs( static_cast<SwPageFrame*>(GetLayout()->Lower()) ); EndAction(); UnlockPaint(); } -SwRootFrm *SwViewShell::GetLayout() const +SwRootFrame *SwViewShell::GetLayout() const { return mpLayout.get(); } @@ -2037,9 +2037,9 @@ void SwViewShell::DrawSelChanged() Size SwViewShell::GetDocSize() const { Size aSz; - const SwRootFrm* pRoot = GetLayout(); + const SwRootFrame* pRoot = GetLayout(); if( pRoot ) - aSz = pRoot->Frm().SSize(); + aSz = pRoot->Frame().SSize(); return aSz; } @@ -2205,7 +2205,7 @@ void SwViewShell::ImplApplyViewOptions( const SwViewOption &rOpt ) pMyWin->Invalidate(); if ( bReformat ) { - // Nothing helps, we need to send all ContentFrms a + // Nothing helps, we need to send all ContentFrames a // Prepare, we format anew: StartAction(); Reformat(); @@ -2362,12 +2362,12 @@ void SwViewShell::InvalidateAccessibleFocus() /** * invalidate CONTENT_FLOWS_FROM/_TO relation for paragraphs #i27138# */ -void SwViewShell::InvalidateAccessibleParaFlowRelation( const SwTextFrm* _pFromTextFrm, - const SwTextFrm* _pToTextFrm ) +void SwViewShell::InvalidateAccessibleParaFlowRelation( const SwTextFrame* _pFromTextFrame, + const SwTextFrame* _pToTextFrame ) { if ( GetLayout() && GetLayout()->IsAnyShellAccessible() ) { - Imp()->_InvalidateAccessibleParaFlowRelation( _pFromTextFrm, _pToTextFrm ); + Imp()->_InvalidateAccessibleParaFlowRelation( _pFromTextFrame, _pToTextFrame ); } } @@ -2385,11 +2385,11 @@ void SwViewShell::InvalidateAccessibleParaTextSelection() /** * invalidate attributes for paragraphs #i88069# */ -void SwViewShell::InvalidateAccessibleParaAttrs( const SwTextFrm& rTextFrm ) +void SwViewShell::InvalidateAccessibleParaAttrs( const SwTextFrame& rTextFrame ) { if ( GetLayout() && GetLayout()->IsAnyShellAccessible() ) { - Imp()->_InvalidateAccessibleParaAttrs( rTextFrm ); + Imp()->_InvalidateAccessibleParaAttrs( rTextFrame ); } } @@ -2441,19 +2441,19 @@ sal_uInt16 SwViewShell::GetPageCount() const const Size SwViewShell::GetPageSize( sal_uInt16 nPageNum, bool bSkipEmptyPages ) const { Size aSize; - const SwRootFrm* pTmpRoot = GetLayout(); + const SwRootFrame* pTmpRoot = GetLayout(); if( pTmpRoot && nPageNum ) { - const SwPageFrm* pPage = static_cast<const SwPageFrm*> + const SwPageFrame* pPage = static_cast<const SwPageFrame*> (pTmpRoot->Lower()); while( --nPageNum && pPage->GetNext() ) - pPage = static_cast<const SwPageFrm*>( pPage->GetNext() ); + pPage = static_cast<const SwPageFrame*>( pPage->GetNext() ); if( !bSkipEmptyPages && pPage->IsEmptyPage() && pPage->GetNext() ) - pPage = static_cast<const SwPageFrm*>( pPage->GetNext() ); + pPage = static_cast<const SwPageFrame*>( pPage->GetNext() ); - aSize = pPage->Frm().SSize(); + aSize = pPage->Frame().SSize(); } return aSize; } @@ -2467,14 +2467,14 @@ sal_Int32 SwViewShell::GetPageNumAndSetOffsetForPDF( OutputDevice& rOut, const S // #i40059# Position out of bounds: SwRect aRect( rRect ); - aRect.Pos().X() = std::max( aRect.Left(), GetLayout()->Frm().Left() ); + aRect.Pos().X() = std::max( aRect.Left(), GetLayout()->Frame().Left() ); - const SwPageFrm* pPage = GetLayout()->GetPageAtPos( aRect.Center() ); + const SwPageFrame* pPage = GetLayout()->GetPageAtPos( aRect.Center() ); if ( pPage ) { OSL_ENSURE( pPage, "GetPageNumAndSetOffsetForPDF: No page found" ); - Point aOffset( pPage->Frm().Pos() ); + Point aOffset( pPage->Frame().Pos() ); aOffset.X() = -aOffset.X(); aOffset.Y() = -aOffset.Y(); diff --git a/sw/source/core/view/vnew.cxx b/sw/source/core/view/vnew.cxx index 2b8300cdd742..b49ce2ca1575 100644 --- a/sw/source/core/view/vnew.cxx +++ b/sw/source/core/view/vnew.cxx @@ -125,9 +125,9 @@ void SwViewShell::Init( const SwViewOption *pNewOpt ) // end of "disable multiple layouts" if( !mpLayout ) { - // switched to two step construction because creating the layout in SwRootFrm needs a valid pLayout set - mpLayout = SwRootFrmPtr(new SwRootFrm(mpDoc->GetDfltFrameFormat(), this), - &SwFrm::DestroyFrm); + // switched to two step construction because creating the layout in SwRootFrame needs a valid pLayout set + mpLayout = SwRootFramePtr(new SwRootFrame(mpDoc->GetDfltFrameFormat(), this), + &SwFrame::DestroyFrame); mpLayout->Init( mpDoc->GetDfltFrameFormat() ); } } @@ -216,8 +216,8 @@ SwViewShell::SwViewShell( SwDoc& rDocument, vcl::Window *pWindow, } // extend format cache. - if ( SwTextFrm::GetTextCache()->GetCurMax() < 2550 ) - SwTextFrm::GetTextCache()->IncreaseMax( 100 ); + if ( SwTextFrame::GetTextCache()->GetCurMax() < 2550 ) + SwTextFrame::GetTextCache()->IncreaseMax( 100 ); if( mpOpt->IsGridVisible() || getIDocumentDrawModelAccess().GetDrawModel() ) Imp()->MakeDrawView(); @@ -291,8 +291,8 @@ SwViewShell::SwViewShell( SwViewShell& rShell, vcl::Window *pWindow, } // extend format cache. - if ( SwTextFrm::GetTextCache()->GetCurMax() < 2550 ) - SwTextFrm::GetTextCache()->IncreaseMax( 100 ); + if ( SwTextFrame::GetTextCache()->GetCurMax() < 2550 ) + SwTextFrame::GetTextCache()->IncreaseMax( 100 ); if( mpOpt->IsGridVisible() || getIDocumentDrawModelAccess().GetDrawModel() ) Imp()->MakeDrawView(); @@ -324,11 +324,11 @@ SwViewShell::~SwViewShell() { if( pGNd->IsAnimated() ) { - SwIterator<SwFrm,SwGrfNode> aIter( *pGNd ); - for( SwFrm* pFrm = aIter.First(); pFrm; pFrm = aIter.Next() ) + SwIterator<SwFrame,SwGrfNode> aIter( *pGNd ); + for( SwFrame* pFrame = aIter.First(); pFrame; pFrame = aIter.Next() ) { - OSL_ENSURE( pFrm->IsNoTextFrm(), "GraphicNode with Text?" ); - static_cast<SwNoTextFrm*>(pFrm)->StopAnimation( mpOut ); + OSL_ENSURE( pFrame->IsNoTextFrame(), "GraphicNode with Text?" ); + static_cast<SwNoTextFrame*>(pFrame)->StopAnimation( mpOut ); } } } @@ -339,7 +339,7 @@ SwViewShell::~SwViewShell() } delete mpImp; // Delete first, so that the LayoutViews are destroyed. - mpImp = nullptr; // Set to zero, because ~SwFrm relies on it. + mpImp = nullptr; // Set to zero, because ~SwFrame relies on it. if ( mpDoc ) { @@ -352,8 +352,8 @@ SwViewShell::~SwViewShell() delete mpOpt; // resize format cache. - if ( SwTextFrm::GetTextCache()->GetCurMax() > 250 ) - SwTextFrm::GetTextCache()->DecreaseMax( 100 ); + if ( SwTextFrame::GetTextCache()->GetCurMax() > 250 ) + SwTextFrame::GetTextCache()->DecreaseMax( 100 ); // Remove from PaintQueue if necessary SwPaintQueue::Remove( this ); diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx index 4c0b4fd02b21..9945b48d2881 100644 --- a/sw/source/core/view/vprint.cxx +++ b/sw/source/core/view/vprint.cxx @@ -125,7 +125,7 @@ void SwPaintQueue::Add( SwViewShell *pNew, const SwRect &rNew ) void SwPaintQueue::Repaint() { - if (!SwRootFrm::IsInPaint() && s_pPaintQueue) + if (!SwRootFrame::IsInPaint() && s_pPaintQueue) { SwQueuedPaint *pPt = s_pPaintQueue; do @@ -240,7 +240,7 @@ void SwViewShell::ChgAllPageOrientation( Orientation eOri ) } aNew.SetLandscape( bNewOri ); SwFrameFormat& rFormat = aNew.GetMaster(); - SwFormatFrmSize aSz( rFormat.GetFrmSize() ); + SwFormatFrameSize aSz( rFormat.GetFrameSize() ); // adjust size // PORTRAIT -> higher than wide // LANDSCAPE -> wider than high @@ -285,9 +285,9 @@ void SwViewShell::ChgAllPageSize( Size &rSz ) aSz.Width() = aTmp; } - SwFormatFrmSize aFrmSz( rPgFormat.GetFrmSize() ); - aFrmSz.SetSize( aSz ); - rPgFormat.SetFormatAttr( aFrmSz ); + SwFormatFrameSize aFrameSz( rPgFormat.GetFrameSize() ); + aFrameSz.SetSize( aSz ); + rPgFormat.SetFormatAttr( aFrameSz ); pMyDoc->ChgPageDesc( i, aNew ); } } @@ -296,9 +296,9 @@ void SwViewShell::CalcPagesForPrint( sal_uInt16 nMax ) { SET_CURR_SHELL( this ); - SwRootFrm* pMyLayout = GetLayout(); + SwRootFrame* pMyLayout = GetLayout(); - const SwFrm *pPage = pMyLayout->Lower(); + const SwFrame *pPage = pMyLayout->Lower(); SwLayAction aAction( pMyLayout, Imp() ); pMyLayout->StartAllAction(); @@ -306,7 +306,7 @@ void SwViewShell::CalcPagesForPrint( sal_uInt16 nMax ) { pPage->Calc(GetOut()); SwRect aOldVis( VisArea() ); - maVisArea = pPage->Frm(); + maVisArea = pPage->Frame(); Imp()->SetFirstVisPageInvalid(); aAction.Reset(); aAction.SetPaint( false ); @@ -346,47 +346,47 @@ SwDoc * SwViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt) // the PrintDoc - will be replaced! pPrtDoc->ReplaceStyles( *GetDoc() ); - SwShellCrsr *pActCrsr = pFESh->_GetCrsr(); - SwShellCrsr *pFirstCrsr = dynamic_cast<SwShellCrsr*>(pActCrsr->GetNext()); - if( !pActCrsr->HasMark() ) // with a multi-selection the current cursor might be empty + SwShellCursor *pActCursor = pFESh->_GetCursor(); + SwShellCursor *pFirstCursor = dynamic_cast<SwShellCursor*>(pActCursor->GetNext()); + if( !pActCursor->HasMark() ) // with a multi-selection the current cursor might be empty { - pActCrsr = dynamic_cast<SwShellCrsr*>(pActCrsr->GetPrev()); + pActCursor = dynamic_cast<SwShellCursor*>(pActCursor->GetPrev()); } // Y-position of the first selection Point aSelPoint; if( pFESh->IsTableMode() ) { - SwShellTableCrsr* pShellTableCrsr = pFESh->GetTableCrsr(); + SwShellTableCursor* pShellTableCursor = pFESh->GetTableCursor(); - const SwContentNode* pContentNode = pShellTableCrsr->GetNode().GetContentNode(); - const SwContentFrm *pContentFrm = pContentNode ? pContentNode->getLayoutFrm( GetLayout(), nullptr, pShellTableCrsr->Start() ) : nullptr; - if( pContentFrm ) + const SwContentNode* pContentNode = pShellTableCursor->GetNode().GetContentNode(); + const SwContentFrame *pContentFrame = pContentNode ? pContentNode->getLayoutFrame( GetLayout(), nullptr, pShellTableCursor->Start() ) : nullptr; + if( pContentFrame ) { SwRect aCharRect; - SwCrsrMoveState aTmpState( MV_NONE ); - pContentFrm->GetCharRect( aCharRect, *pShellTableCrsr->Start(), &aTmpState ); + SwCursorMoveState aTmpState( MV_NONE ); + pContentFrame->GetCharRect( aCharRect, *pShellTableCursor->Start(), &aTmpState ); aSelPoint = Point( aCharRect.Left(), aCharRect.Top() ); } } - else if (pFirstCrsr) + else if (pFirstCursor) { - aSelPoint = pFirstCrsr->GetSttPos(); + aSelPoint = pFirstCursor->GetSttPos(); } - const SwPageFrm* pPage = GetLayout()->GetPageAtPos( aSelPoint ); + const SwPageFrame* pPage = GetLayout()->GetPageAtPos( aSelPoint ); OSL_ENSURE( pPage, "no page found!" ); // get page descriptor - fall back to the first one if pPage could not be found const SwPageDesc* pPageDesc = pPage ? pPrtDoc->FindPageDesc( pPage->GetPageDesc()->GetName() ) : &pPrtDoc->GetPageDesc( 0 ); - if( !pFESh->IsTableMode() && pActCrsr && pActCrsr->HasMark() ) + if( !pFESh->IsTableMode() && pActCursor && pActCursor->HasMark() ) { // Tweak paragraph attributes of last paragraph SwNodeIndex aNodeIdx( *pPrtDoc->GetNodes().GetEndOfContent().StartOfSectionNode() ); SwTextNode* pTextNd = pPrtDoc->GetNodes().GoNext( &aNodeIdx )->GetTextNode(); SwContentNode *pLastNd = - pActCrsr->GetContentNode( (*pActCrsr->GetMark()) <= (*pActCrsr->GetPoint()) ); + pActCursor->GetContentNode( (*pActCursor->GetMark()) <= (*pActCursor->GetPoint()) ); // copy the paragraph attributes of the first paragraph if( pLastNd && pLastNd->IsTextNode() ) static_cast<SwTextNode*>(pLastNd)->CopyCollFormat( *pTextNd ); @@ -408,13 +408,13 @@ SwDoc * SwViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt) else { pCNd->SetAttr( SwFormatPageDesc( pPageDesc ) ); - if( pFirstCrsr && pFirstCrsr->HasMark() ) + if( pFirstCursor && pFirstCursor->HasMark() ) { SwTextNode *pTextNd = pCNd->GetTextNode(); if( pTextNd ) { SwContentNode *pFirstNd = - pFirstCrsr->GetContentNode( (*pFirstCrsr->GetMark()) > (*pFirstCrsr->GetPoint()) ); + pFirstCursor->GetContentNode( (*pFirstCursor->GetMark()) > (*pFirstCursor->GetPoint()) ); // copy paragraph attributes of the first paragraph if( pFirstNd && pFirstNd->IsTextNode() ) static_cast<SwTextNode*>(pFirstNd)->CopyCollFormat( *pTextNd ); @@ -427,19 +427,19 @@ SwDoc * SwViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt) // TODO: there is already a GetPageByPageNum, but it checks some physical page // number; unsure if we want that here, should find out what that is... -SwPageFrm const* -sw_getPage(SwRootFrm const& rLayout, sal_Int32 const nPage) +SwPageFrame const* +sw_getPage(SwRootFrame const& rLayout, sal_Int32 const nPage) { // yes this is O(n^2) but at least it does not crash... - SwPageFrm const* pPage = dynamic_cast<const SwPageFrm*>(rLayout.Lower()); + SwPageFrame const* pPage = dynamic_cast<const SwPageFrame*>(rLayout.Lower()); for (sal_Int32 i = nPage; pPage && (i > 0); --i) { if (1 == i) { // note: nPage is 1-based, i.e. 0 is invalid! return pPage; } - pPage = dynamic_cast<SwPageFrm const*>(pPage->GetNext()); + pPage = dynamic_cast<SwPageFrame const*>(pPage->GetNext()); } - OSL_ENSURE(pPage, "ERROR: SwPageFrm expected"); + OSL_ENSURE(pPage, "ERROR: SwPageFrame expected"); OSL_FAIL("non-existent page requested"); return nullptr; } @@ -518,7 +518,7 @@ bool SwViewShell::PrintOrPDFExport( ? rPrintData.GetRenderData().m_pPostItShell.get()// post-it page : pShell; // a 'regular' page, not one from the post-it doc - SwPageFrm const*const pStPage = + SwPageFrame const*const pStPage = sw_getPage(*pViewSh2->GetLayout(), abs(nPage)); OSL_ENSURE( pStPage, "failed to get start page" ); if (!pStPage) @@ -528,13 +528,13 @@ bool SwViewShell::PrintOrPDFExport( //!! applying view options and formatting the document should now only be done in getRendererCount! - ::SetSwVisArea( pViewSh2, pStPage->Frm() ); + ::SetSwVisArea( pViewSh2, pStPage->Frame() ); pShell->InitPrt(pOutDev); - ::SetSwVisArea( pViewSh2, pStPage->Frm() ); + ::SetSwVisArea( pViewSh2, pStPage->Frame() ); - pStPage->GetUpper()->Paint( *pOutDev, pStPage->Frm(), &rPrintData ); + pStPage->GetUpper()->Paint( *pOutDev, pStPage->Frame(), &rPrintData ); SwPaintQueue::Repaint(); @@ -557,7 +557,7 @@ bool SwViewShell::PrintOrPDFExport( //Now scale the recorded page down so the notes //will fit in the final page double fScale = 0.75; - long nOrigHeight = pStPage->Frm().Height(); + long nOrigHeight = pStPage->Frame().Height(); long nNewHeight = nOrigHeight*fScale; long nShiftY = (nOrigHeight-nNewHeight)/2; pMetaFile->Scale( fScale, fScale ); @@ -610,7 +610,7 @@ void SwViewShell::PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintD } // CalcPagesForPrint() should not be necessary here. The pages in the - // visible area will be formatted in SwRootFrm::Paint(). + // visible area will be formatted in SwRootFrame::Paint(). // Removing this gives us a performance gain during saving the // document because the thumbnail creation will not trigger a complete // formatting of the document. diff --git a/sw/source/core/view/vprint.hxx b/sw/source/core/view/vprint.hxx index 38e1bd98f4bc..c2451acd4ae8 100644 --- a/sw/source/core/view/vprint.hxx +++ b/sw/source/core/view/vprint.hxx @@ -20,7 +20,7 @@ #ifndef INCLUDED_SW_SOURCE_CORE_VIEW_VPRINT_HXX #define INCLUDED_SW_SOURCE_CORE_VIEW_VPRINT_HXX -SwPageFrm const* sw_getPage(SwRootFrm const& rLayout, sal_Int32 const nPage); +SwPageFrame const* sw_getPage(SwRootFrame const& rLayout, sal_Int32 const nPage); #endif diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx index db16166a2a02..5c6f63ecf85d 100644 --- a/sw/source/filter/ascii/parasc.cxx +++ b/sw/source/filter/ascii/parasc.cxx @@ -62,7 +62,7 @@ class SwASCIIParser void InsertText( const OUString& rStr ); public: - SwASCIIParser( SwDoc* pD, const SwPaM& rCrsr, SvStream& rIn, + SwASCIIParser( SwDoc* pD, const SwPaM& rCursor, SvStream& rIn, bool bReadNewDoc, const SwAsciiOptions& rOpts ); ~SwASCIIParser(); @@ -88,12 +88,12 @@ sal_uLong AsciiReader::Read( SwDoc &rDoc, const OUString&, SwPaM &rPam, const OU return nRet; } -SwASCIIParser::SwASCIIParser(SwDoc* pD, const SwPaM& rCrsr, SvStream& rIn, +SwASCIIParser::SwASCIIParser(SwDoc* pD, const SwPaM& rCursor, SvStream& rIn, bool bReadNewDoc, const SwAsciiOptions& rOpts) : pDoc(pD), rInput(rIn), rOpt(rOpts), nFileSize(0), nScript(SvtScriptType::NONE) , bNewDoc(bReadNewDoc) { - pPam = new SwPaM( *rCrsr.GetPoint() ); + pPam = new SwPaM( *rCursor.GetPoint() ); pArr = new sal_Char [ ASC_BUFFLEN + 2 ]; pItemSet = new SfxItemSet( pDoc->GetAttrPool(), diff --git a/sw/source/filter/basflt/fltini.cxx b/sw/source/filter/basflt/fltini.cxx index 7e785aa9966e..18c175caa6d3 100644 --- a/sw/source/filter/basflt/fltini.cxx +++ b/sw/source/filter/basflt/fltini.cxx @@ -298,18 +298,18 @@ void CalculateFlySize(SfxItemSet& rFlySet, const SwNodeIndex& rAnchor, { const SfxPoolItem* pItem = nullptr; if( SfxItemState::SET != rFlySet.GetItemState( RES_FRM_SIZE, true, &pItem ) || - MINFLY > static_cast<const SwFormatFrmSize*>(pItem)->GetWidth() ) + MINFLY > static_cast<const SwFormatFrameSize*>(pItem)->GetWidth() ) { - SwFormatFrmSize aSz(static_cast<const SwFormatFrmSize&>(rFlySet.Get(RES_FRM_SIZE))); + SwFormatFrameSize aSz(static_cast<const SwFormatFrameSize&>(rFlySet.Get(RES_FRM_SIZE))); if (pItem) - aSz = static_cast<const SwFormatFrmSize&>(*pItem); + aSz = static_cast<const SwFormatFrameSize&>(*pItem); SwTwips nWidth; // determine the width; if there is a table use the width of the table; // otherwise use the width of the page const SwTableNode* pTableNd = rAnchor.GetNode().FindTableNode(); if( pTableNd ) - nWidth = pTableNd->GetTable().GetFrameFormat()->GetFrmSize().GetWidth(); + nWidth = pTableNd->GetTable().GetFrameFormat()->GetFrameSize().GetWidth(); else nWidth = nPageWidth; @@ -318,8 +318,8 @@ void CalculateFlySize(SfxItemSet& rFlySet, const SwNodeIndex& rAnchor, if( pSttNd ) { bool bOnlyOneNode = true; - sal_uLong nMinFrm = 0; - sal_uLong nMaxFrm = 0; + sal_uLong nMinFrame = 0; + sal_uLong nMaxFrame = 0; SwTextNode* pFirstTextNd = nullptr; SwNodeIndex aIdx( *pSttNd, 1 ); SwNodeIndex aEnd( *pSttNd->GetNode().EndOfSectionNode() ); @@ -338,14 +338,14 @@ void CalculateFlySize(SfxItemSet& rFlySet, const SwNodeIndex& rAnchor, } sal_uLong nAbsMinCnts; - pTextNd->GetMinMaxSize( aIdx.GetIndex(), nMinFrm, nMaxFrm, nAbsMinCnts ); + pTextNd->GetMinMaxSize( aIdx.GetIndex(), nMinFrame, nMaxFrame, nAbsMinCnts ); } ++aIdx; } if( bOnlyOneNode ) { - if( nMinFrm < MINLAY && pFirstTextNd ) + if( nMinFrame < MINLAY && pFirstTextNd ) { // if the first node don't contained any content, then // insert one char in it calc again and delete once again @@ -353,7 +353,7 @@ void CalculateFlySize(SfxItemSet& rFlySet, const SwNodeIndex& rAnchor, pFirstTextNd->InsertText("MM", aNdIdx); sal_uLong nAbsMinCnts; pFirstTextNd->GetMinMaxSize( pFirstTextNd->GetIndex(), - nMinFrm, nMaxFrm, nAbsMinCnts ); + nMinFrame, nMaxFrame, nAbsMinCnts ); aNdIdx -= 2; pFirstTextNd->EraseText( aNdIdx, 2 ); } @@ -368,22 +368,22 @@ void CalculateFlySize(SfxItemSet& rFlySet, const SwNodeIndex& rAnchor, { sal_uInt16 nWidthTmp = pLn->GetOutWidth() + pLn->GetInWidth(); nWidthTmp = nWidthTmp + rBoxItem.GetDistance( nLine ); - nMinFrm += nWidthTmp; - nMaxFrm += nWidthTmp; + nMinFrame += nWidthTmp; + nMaxFrame += nWidthTmp; } nLine = SvxBoxItemLine::RIGHT; } // enforce minimum width for contents - if( nMinFrm < MINLAY ) - nMinFrm = MINLAY; - if( nMaxFrm < MINLAY ) - nMaxFrm = MINLAY; - - if( nWidth > (sal_uInt16)nMaxFrm ) - nWidth = nMaxFrm; - else if( nWidth > (sal_uInt16)nMinFrm ) - nWidth = nMinFrm; + if( nMinFrame < MINLAY ) + nMinFrame = MINLAY; + if( nMaxFrame < MINLAY ) + nMaxFrame = MINLAY; + + if( nWidth > (sal_uInt16)nMaxFrame ) + nWidth = nMaxFrame; + else if( nWidth > (sal_uInt16)nMinFrame ) + nWidth = nMinFrame; } } @@ -395,9 +395,9 @@ void CalculateFlySize(SfxItemSet& rFlySet, const SwNodeIndex& rAnchor, aSz.SetHeight( MINFLY ); rFlySet.Put( aSz ); } - else if( MINFLY > static_cast<const SwFormatFrmSize*>(pItem)->GetHeight() ) + else if( MINFLY > static_cast<const SwFormatFrameSize*>(pItem)->GetHeight() ) { - SwFormatFrmSize aSz( *static_cast<const SwFormatFrmSize*>(pItem) ); + SwFormatFrameSize aSz( *static_cast<const SwFormatFrameSize*>(pItem) ); aSz.SetHeight( MINFLY ); rFlySet.Put( aSz ); } diff --git a/sw/source/filter/basflt/fltshell.cxx b/sw/source/filter/basflt/fltshell.cxx index 8218236081c3..becc8ad52e5e 100644 --- a/sw/source/filter/basflt/fltshell.cxx +++ b/sw/source/filter/basflt/fltshell.cxx @@ -527,7 +527,7 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, if(pDoc->getIDocumentLayoutAccess().GetCurrentViewShell() && (FLY_AT_PARA == pFormat->GetAnchor().GetAnchorId())) { - pFormat->MakeFrms(); + pFormat->MakeFrames(); } } } diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx index 7c098122b840..a2e6a5c6c6e5 100644 --- a/sw/source/filter/basflt/shellio.cxx +++ b/sw/source/filter/basflt/shellio.cxx @@ -68,7 +68,7 @@ sal_uLong SwReader::Read( const Reader& rOptions ) po->pStrm = pStrm; po->pStg = pStg; po->xStg = xStg; - po->bInsertMode = nullptr != pCrsr; + po->bInsertMode = nullptr != pCursor; po->bSkipImages = mbSkipImages; // if a Medium is selected, get its Stream @@ -94,8 +94,8 @@ sal_uLong SwReader::Read( const Reader& rOptions ) pDoc->SetInXMLImport( dynamic_cast< XMLReader* >(po) != nullptr ); SwPaM *pPam; - if( pCrsr ) - pPam = pCrsr; + if( pCursor ) + pPam = pCursor; else { // if the Reader was not called by a Shell, create a PaM ourselves @@ -114,7 +114,7 @@ sal_uLong SwReader::Read( const Reader& rOptions ) bool bReadPageDescs = false; bool const bDocUndo = pDoc->GetIDocumentUndoRedo().DoesUndo(); - bool bSaveUndo = bDocUndo && pCrsr; + bool bSaveUndo = bDocUndo && pCursor; if( bSaveUndo ) { // the reading of the page template cannot be undone! @@ -137,7 +137,7 @@ sal_uLong SwReader::Read( const Reader& rOptions ) RedlineMode_t ePostReadRedlineMode( nsRedlineMode_t::REDLINE_IGNORE ); // Array of FlyFormats - SwFrameFormats aFlyFrmArr; + SwFrameFormats aFlyFrameArr; // only read templates? then ignore multi selection! bool bFormatsOnly = po->aOpt.IsFormatsOnly(); @@ -149,7 +149,7 @@ sal_uLong SwReader::Read( const Reader& rOptions ) pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( nsRedlineMode_t::REDLINE_IGNORE ); SwPaM* pUndoPam = nullptr; - if( bDocUndo || pCrsr ) + if( bDocUndo || pCursor ) { // set Pam to the previous node, so that it is not also moved const SwNodeIndex& rTmp = pPam->GetPoint()->nNode; @@ -157,10 +157,10 @@ sal_uLong SwReader::Read( const Reader& rOptions ) } // store for now all Fly's - if( pCrsr ) + if( pCursor ) { std::copy(pDoc->GetSpzFrameFormats()->begin(), - pDoc->GetSpzFrameFormats()->end(), std::back_inserter(aFlyFrmArr)); + pDoc->GetSpzFrameFormats()->end(), std::back_inserter(aFlyFrameArr)); } const sal_Int32 nSttContent = pPam->GetPoint()->nContent.GetIndex(); @@ -205,7 +205,7 @@ sal_uLong SwReader::Read( const Reader& rOptions ) } } - if( pCrsr ) + if( pCursor ) { *pUndoPam->GetMark() = *pPam->GetPoint(); ++pUndoPam->GetPoint()->nNode; @@ -224,7 +224,7 @@ sal_uLong SwReader::Read( const Reader& rOptions ) { SwFrameFormat* pFrameFormat = (*pDoc->GetSpzFrameFormats())[ n ]; const SwFormatAnchor& rAnchor = pFrameFormat->GetAnchor(); - if( !aFlyFrmArr.Contains( pFrameFormat) ) + if( !aFlyFrameArr.Contains( pFrameFormat) ) { SwPosition const*const pFrameAnchor( rAnchor.GetContentAnchor()); @@ -254,7 +254,7 @@ sal_uLong SwReader::Read( const Reader& rOptions ) RES_DRAWFRMFMT == pFrameFormat->Which() ) { // DrawObjects are not allowed in Headers/Footers! - pFrameFormat->DelFrms(); + pFrameFormat->DelFrames(); pDoc->DelFrameFormat( pFrameFormat ); --n; } @@ -273,28 +273,28 @@ sal_uLong SwReader::Read( const Reader& rOptions ) if( pFrameFormat->HasWriterListeners() ) { // Draw-Objects create a Frame when being inserted; thus delete them - pFrameFormat->DelFrms(); + pFrameFormat->DelFrames(); } if (FLY_AT_PAGE == rAnchor.GetAnchorId()) { if( !rAnchor.GetContentAnchor() ) { - pFrameFormat->MakeFrms(); + pFrameFormat->MakeFrames(); } - else if( pCrsr ) + else if( pCursor ) { pDoc->SetContainsAtPageObjWithContentAnchor( true ); } } else - pFrameFormat->MakeFrms(); + pFrameFormat->MakeFrames(); } } } } - if( !aFlyFrmArr.empty() ) - aFlyFrmArr.clear(); + if( !aFlyFrameArr.empty() ) + aFlyFrameArr.clear(); pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( eOld ); if( pDoc->getIDocumentRedlineAccess().IsRedlineOn() ) @@ -357,7 +357,7 @@ sal_uLong SwReader::Read( const Reader& rOptions ) } // delete Pam if it was created only for reading - if( !pCrsr ) + if( !pCursor ) { delete pPam; // open a new one @@ -376,7 +376,7 @@ sal_uLong SwReader::Read( const Reader& rOptions ) pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( eOld ); pDoc->SetOle2Link( aOLELink ); - if( pCrsr ) // das Doc ist jetzt modifiziert + if( pCursor ) // das Doc ist jetzt modifiziert pDoc->getIDocumentState().SetModified(); // #i38810# - If links have been updated, the document // have to be modified. During update of links the OLE link at the document @@ -397,7 +397,7 @@ sal_uLong SwReader::Read( const Reader& rOptions ) SwReader::SwReader(SfxMedium& rMedium, const OUString& rFileName, SwDoc *pDocument) - : SwDocFac(pDocument), pStrm(nullptr), pMedium(&rMedium), pCrsr(nullptr), + : SwDocFac(pDocument), pStrm(nullptr), pMedium(&rMedium), pCursor(nullptr), aFileName(rFileName), mbSkipImages(false) { SetBaseURL( rMedium.GetBaseURL() ); @@ -407,7 +407,7 @@ SwReader::SwReader(SfxMedium& rMedium, const OUString& rFileName, SwDoc *pDocume // Read into an existing document SwReader::SwReader(SvStream& rStrm, const OUString& rFileName, const OUString& rBaseURL, SwPaM& rPam) - : SwDocFac(rPam.GetDoc()), pStrm(&rStrm), pMedium(nullptr), pCrsr(&rPam), + : SwDocFac(rPam.GetDoc()), pStrm(&rStrm), pMedium(nullptr), pCursor(&rPam), aFileName(rFileName), mbSkipImages(false) { SetBaseURL( rBaseURL ); @@ -415,13 +415,13 @@ SwReader::SwReader(SvStream& rStrm, const OUString& rFileName, const OUString& r SwReader::SwReader(SfxMedium& rMedium, const OUString& rFileName, SwPaM& rPam) : SwDocFac(rPam.GetDoc()), pStrm(nullptr), pMedium(&rMedium), - pCrsr(&rPam), aFileName(rFileName), mbSkipImages(false) + pCursor(&rPam), aFileName(rFileName), mbSkipImages(false) { SetBaseURL( rMedium.GetBaseURL() ); } SwReader::SwReader( const uno::Reference < embed::XStorage > &rStg, const OUString& rFilename, SwPaM &rPam ) - : SwDocFac(rPam.GetDoc()), pStrm(nullptr), xStg( rStg ), pMedium(nullptr), pCrsr(&rPam), aFileName(rFilename), mbSkipImages(false) + : SwDocFac(rPam.GetDoc()), pStrm(nullptr), xStg( rStg ), pMedium(nullptr), pCursor(&rPam), aFileName(rFilename), mbSkipImages(false) { } @@ -616,11 +616,11 @@ void Reader::SetFltName( const OUString& ) { } -void Reader::ResetFrameFormatAttrs( SfxItemSet &rFrmSet ) +void Reader::ResetFrameFormatAttrs( SfxItemSet &rFrameSet ) { - rFrmSet.Put( SvxLRSpaceItem(RES_LR_SPACE) ); - rFrmSet.Put( SvxULSpaceItem(RES_UL_SPACE) ); - rFrmSet.Put( SvxBoxItem(RES_BOX) ); + rFrameSet.Put( SvxLRSpaceItem(RES_LR_SPACE) ); + rFrameSet.Put( SvxULSpaceItem(RES_UL_SPACE) ); + rFrameSet.Put( SvxBoxItem(RES_BOX) ); } void Reader::ResetFrameFormats( SwDoc& rDoc ) @@ -699,7 +699,7 @@ int StgReader::GetReaderType() * Constructors, Destructors are inline (inc/shellio.hxx). */ -SwWriter::SwWriter(SvStream& rStrm, SwCrsrShell &rShell, bool bInWriteAll) +SwWriter::SwWriter(SvStream& rStrm, SwCursorShell &rShell, bool bInWriteAll) : pStrm(&rStrm), pMedium(nullptr), pOutPam(nullptr), pShell(&rShell), rDoc(*rShell.GetDoc()), bWriteAll(bInWriteAll) { @@ -722,7 +722,7 @@ SwWriter::SwWriter( const uno::Reference < embed::XStorage >& rStg, SwDoc &rDocu { } -SwWriter::SwWriter(SfxMedium& rMedium, SwCrsrShell &rShell, bool bInWriteAll) +SwWriter::SwWriter(SfxMedium& rMedium, SwCursorShell &rShell, bool bInWriteAll) : pStrm(nullptr), pMedium(&rMedium), pOutPam(nullptr), pShell(&rShell), rDoc(*rShell.GetDoc()), bWriteAll(bInWriteAll) { @@ -768,7 +768,7 @@ sal_uLong SwWriter::Write( WriterRef& rxWriter, const OUString* pRealFileName ) if( !bWriteAll && ( pShell || pOutPam )) { if( pShell ) - pPam = pShell->GetCrsr(); + pPam = pShell->GetCursor(); else pPam = pOutPam; @@ -832,13 +832,13 @@ sal_uLong SwWriter::Write( WriterRef& rxWriter, const OUString* pRealFileName ) { const SwPageDesc& rPgDsc = pOutDoc->GetPageDesc( 0 ); //const SwPageDesc& rPgDsc = *pOutDoc->GetPageDescFromPool( RES_POOLPAGE_STANDARD ); - const SwFormatFrmSize& rSz = rPgDsc.GetMaster().GetFrmSize(); + const SwFormatFrameSize& rSz = rPgDsc.GetMaster().GetFrameSize(); // Clipboard-Document is always created w/o printer; thus the // default PageDesc is always aug LONG_MAX !! Set then to DIN A4 if( LONG_MAX == rSz.GetHeight() || LONG_MAX == rSz.GetWidth() ) { SwPageDesc aNew( rPgDsc ); - SwFormatFrmSize aNewSz( rSz ); + SwFormatFrameSize aNewSz( rSz ); Size a4(SvxPaperInfo::GetPaperSize( PAPER_A4 )); aNewSz.SetHeight( a4.Width() ); aNewSz.SetWidth( a4.Height() ); diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx index 0d1399a7f085..b5690e80ed9e 100644 --- a/sw/source/filter/html/css1atr.cxx +++ b/sw/source/filter/html/css1atr.cxx @@ -145,7 +145,7 @@ static Writer& OutCSS1_SvxULSpace_SvxLRSpace( Writer& rWrt, static Writer& OutCSS1_SvxBrush( Writer& rWrt, const SfxPoolItem& rHt, sal_uInt16 nMode ); static Writer& OutCSS1_SvxBrush( Writer& rWrt, const SfxPoolItem& rHt ); -static Writer& OutCSS1_SwFormatFrmSize( Writer& rWrt, const SfxPoolItem& rHt, +static Writer& OutCSS1_SwFormatFrameSize( Writer& rWrt, const SfxPoolItem& rHt, sal_uInt16 nMode ); static Writer& OutCSS1_SvxFormatBreak_SwFormatPDesc_SvxFormatKeep( Writer& rWrt, const SfxItemSet& rItemSet, @@ -1713,10 +1713,10 @@ static Writer& OutCSS1_SwPageDesc( Writer& rWrt, const SwPageDesc& rPageDesc, // only export Portrait oder Landscape. Otherwise export size. bool bRefLandscape = pRefPageDesc && pRefPageDesc->GetLandscape(); Size aRefSz; - const Size& rSz = rPageDesc.GetMaster().GetFrmSize().GetSize(); + const Size& rSz = rPageDesc.GetMaster().GetFrameSize().GetSize(); if( pRefPageDesc ) { - aRefSz = pRefPageDesc->GetMaster().GetFrmSize().GetSize(); + aRefSz = pRefPageDesc->GetMaster().GetFrameSize().GetSize(); if( bRefLandscape != rPageDesc.GetLandscape() ) { long nTmp = aRefSz.Height(); @@ -1960,7 +1960,7 @@ Writer& OutCSS1_NumBulListStyleOpt( Writer& rWrt, const SwNumRule& rNumRule, } void SwHTMLWriter::OutCSS1_FrameFormatOptions( const SwFrameFormat& rFrameFormat, - sal_uInt32 nFrmOpts, + sal_uInt32 nFrameOpts, const SdrObject *pSdrObj, const SfxItemSet *pItemSet ) { @@ -1971,7 +1971,7 @@ void SwHTMLWriter::OutCSS1_FrameFormatOptions( const SwFrameFormat& rFrameFormat const SwFormatHoriOrient& rHoriOri = rFrameFormat.GetHoriOrient(); SvxLRSpaceItem aLRItem( rFrameFormat.GetLRSpace() ); SvxULSpaceItem aULItem( rFrameFormat.GetULSpace() ); - if( nFrmOpts & HTML_FRMOPT_S_ALIGN ) + if( nFrameOpts & HTML_FRMOPT_S_ALIGN ) { const SwFormatAnchor& rAnchor = rFrameFormat.GetAnchor(); switch( rAnchor.GetAnchorId() ) @@ -1981,7 +1981,7 @@ void SwHTMLWriter::OutCSS1_FrameFormatOptions( const SwFrameFormat& rFrameFormat if( text::RelOrientation::FRAME == rHoriOri.GetRelationOrient() || text::RelOrientation::PRINT_AREA == rHoriOri.GetRelationOrient() ) { - if( !(nFrmOpts & HTML_FRMOPT_ALIGN) ) + if( !(nFrameOpts & HTML_FRMOPT_ALIGN) ) { // float const sal_Char *pStr = text::HoriOrientation::RIGHT==rHoriOri.GetHoriOrient() @@ -2072,7 +2072,7 @@ void SwHTMLWriter::OutCSS1_FrameFormatOptions( const SwFrameFormat& rFrameFormat } // width/height - if( nFrmOpts & HTML_FRMOPT_S_SIZE ) + if( nFrameOpts & HTML_FRMOPT_S_SIZE ) { if( RES_DRAWFRMFMT == rFrameFormat.Which() ) { @@ -2083,17 +2083,17 @@ void SwHTMLWriter::OutCSS1_FrameFormatOptions( const SwFrameFormat& rFrameFormat if( pSdrObj ) { Size aTwipSz( pSdrObj->GetLogicRect().GetSize() ); - if( nFrmOpts & HTML_FRMOPT_S_WIDTH ) + if( nFrameOpts & HTML_FRMOPT_S_WIDTH ) { - if( nFrmOpts & HTML_FRMOPT_S_PIXSIZE ) + if( nFrameOpts & HTML_FRMOPT_S_PIXSIZE ) OutCSS1_PixelProperty( sCSS1_P_width, aTwipSz.Width(), false ); else OutCSS1_UnitProperty( sCSS1_P_width, aTwipSz.Width() ); } - if( nFrmOpts & HTML_FRMOPT_S_HEIGHT ) + if( nFrameOpts & HTML_FRMOPT_S_HEIGHT ) { - if( nFrmOpts & HTML_FRMOPT_S_PIXSIZE ) + if( nFrameOpts & HTML_FRMOPT_S_PIXSIZE ) OutCSS1_PixelProperty( sCSS1_P_height, aTwipSz.Height(), true ); else @@ -2103,25 +2103,25 @@ void SwHTMLWriter::OutCSS1_FrameFormatOptions( const SwFrameFormat& rFrameFormat } else { - OSL_ENSURE( HTML_FRMOPT_ABSSIZE & nFrmOpts, + OSL_ENSURE( HTML_FRMOPT_ABSSIZE & nFrameOpts, "Export absolute size" ); - OSL_ENSURE( HTML_FRMOPT_ANYSIZE & nFrmOpts, + OSL_ENSURE( HTML_FRMOPT_ANYSIZE & nFrameOpts, "Export every size" ); sal_uInt16 nMode = 0; - if( nFrmOpts & HTML_FRMOPT_S_WIDTH ) + if( nFrameOpts & HTML_FRMOPT_S_WIDTH ) nMode |= CSS1_FRMSIZE_WIDTH; - if( nFrmOpts & HTML_FRMOPT_S_HEIGHT ) + if( nFrameOpts & HTML_FRMOPT_S_HEIGHT ) nMode |= (CSS1_FRMSIZE_MINHEIGHT|CSS1_FRMSIZE_FIXHEIGHT); - if( nFrmOpts & HTML_FRMOPT_S_PIXSIZE ) + if( nFrameOpts & HTML_FRMOPT_S_PIXSIZE ) nMode |= CSS1_FRMSIZE_PIXEL; - OutCSS1_SwFormatFrmSize( *this, rFrameFormat.GetFrmSize(), nMode ); + OutCSS1_SwFormatFrameSize( *this, rFrameFormat.GetFrameSize(), nMode ); } } const SfxItemSet& rItemSet = rFrameFormat.GetAttrSet(); // margin-* - if( (nFrmOpts & HTML_FRMOPT_S_SPACE) && + if( (nFrameOpts & HTML_FRMOPT_S_SPACE) && IsHTMLMode( HTMLMODE_FLY_MARGINS) ) { const SvxLRSpaceItem *pLRItem = nullptr; @@ -2135,17 +2135,17 @@ void SwHTMLWriter::OutCSS1_FrameFormatOptions( const SwFrameFormat& rFrameFormat } // border - if( nFrmOpts & HTML_FRMOPT_S_BORDER ) + if( nFrameOpts & HTML_FRMOPT_S_BORDER ) { const SfxPoolItem* pItem; - if( nFrmOpts & HTML_FRMOPT_S_NOBORDER ) + if( nFrameOpts & HTML_FRMOPT_S_NOBORDER ) OutCSS1_SvxBox( *this, rFrameFormat.GetBox() ); else if( SfxItemState::SET==rItemSet.GetItemState( RES_BOX, true, &pItem ) ) OutCSS1_SvxBox( *this, *pItem ); } // background (if, then the color must be set also) - if( nFrmOpts & HTML_FRMOPT_S_BACKGROUND ) + if( nFrameOpts & HTML_FRMOPT_S_BACKGROUND ) OutCSS1_FrameFormatBackground( rFrameFormat ); if( pItemSet ) @@ -2919,12 +2919,12 @@ static Writer& OutCSS1_SwFormatDrop( Writer& rWrt, const SfxPoolItem& rHt ) return rWrt; } -static Writer& OutCSS1_SwFormatFrmSize( Writer& rWrt, const SfxPoolItem& rHt, +static Writer& OutCSS1_SwFormatFrameSize( Writer& rWrt, const SfxPoolItem& rHt, sal_uInt16 nMode ) { SwHTMLWriter& rHTMLWrt = static_cast<SwHTMLWriter&>(rWrt); - const SwFormatFrmSize& rFSItem = static_cast<const SwFormatFrmSize&>(rHt); + const SwFormatFrameSize& rFSItem = static_cast<const SwFormatFrameSize&>(rHt); if( nMode & CSS1_FRMSIZE_WIDTH ) { diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx index 7b644865b823..97b9248297ee 100644 --- a/sw/source/filter/html/htmlatr.cxx +++ b/sw/source/filter/html/htmlatr.cxx @@ -868,7 +868,7 @@ void OutHTML_SwFormat( Writer& rWrt, const SwFormat& rFormat, sal_uInt16 nDir = rHWrt.GetHTMLDirection( (pNodeItemSet ? static_cast < const SvxFrameDirectionItem& >( pNodeItemSet->Get( RES_FRAMEDIR ) ) - : rFormat.GetFrmDir() ).GetValue() ); + : rFormat.GetFrameDir() ).GetValue() ); // Ein <P> wird nur geschrieben, wenn // - wir in keiner OL/UL/DL sind, oder @@ -2063,7 +2063,7 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode ) rHTMLWrt.ChangeParaToken( 0 ); // Alle an dem Node verankerten Rahmen ausgeben - rHTMLWrt.OutFlyFrm( rNode.GetIndex(), 0, HTML_POS_ANY ); + rHTMLWrt.OutFlyFrame( rNode.GetIndex(), 0, HTML_POS_ANY ); if( rHTMLWrt.m_bLFPossible ) rHTMLWrt.OutNewLine(); // Absatz-Tag in eine neue Zeile @@ -2089,7 +2089,7 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode ) const SwFrameFormat& rPgFormat = rHTMLWrt.pDoc->getIDocumentStylePoolAccess().GetPageDescFromPool ( RES_POOLPAGE_HTML, false )->GetMaster(); - const SwFormatFrmSize& rSz = rPgFormat.GetFrmSize(); + const SwFormatFrameSize& rSz = rPgFormat.GetFrameSize(); const SvxLRSpaceItem& rLR = rPgFormat.GetLRSpace(); const SwFormatCol& rCol = rPgFormat.GetCol(); @@ -2104,7 +2104,7 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode ) const SwTableBox* pBox = pTableNd->GetTable().GetTableBox( pNd->StartOfSectionIndex() ); if( pBox ) - nPageWidth = pBox->GetFrameFormat()->GetFrmSize().GetWidth(); + nPageWidth = pBox->GetFrameFormat()->GetFrameSize().GetWidth(); } OString sWidth = OString::number(SwHTMLWriter::ToPixel(nPageWidth - nLeft - nRight, false)); @@ -2176,7 +2176,7 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode ) rHTMLWrt.m_bLFPossible = !rHTMLWrt.m_nLastParaToken; // Alle an dem Node verankerten Rahmen ausgeben - rHTMLWrt.OutFlyFrm( rNode.GetIndex(), 0, HTML_POS_ANY ); + rHTMLWrt.OutFlyFrame( rNode.GetIndex(), 0, HTML_POS_ANY ); rHTMLWrt.m_bLFPossible = false; return rWrt; @@ -2229,13 +2229,13 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode ) rHTMLWrt.OutForm(); // An dem Node "verankerte" Seitenegebunde Rahmen ausgeben - bool bFlysLeft = rHTMLWrt.OutFlyFrm( rNode.GetIndex(), 0, HTML_POS_PREFIX ); + bool bFlysLeft = rHTMLWrt.OutFlyFrame( rNode.GetIndex(), 0, HTML_POS_PREFIX ); // An dem Node verankerte Rahmen ausgeben, die vor dem // Absatz-Tag geschrieben werden sollen. if( bFlysLeft ) { - bFlysLeft = rHTMLWrt.OutFlyFrm( rNode.GetIndex(), 0, HTML_POS_BEFORE ); + bFlysLeft = rHTMLWrt.OutFlyFrame( rNode.GetIndex(), 0, HTML_POS_BEFORE ); } if( rHTMLWrt.pCurPam->GetPoint()->nNode == rHTMLWrt.pCurPam->GetMark()->nNode ) @@ -2402,7 +2402,7 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode ) if( bFlysLeft ) { aEndPosLst.OutEndAttrs( rHTMLWrt, nStrPos + nOffset, &aContext ); - bFlysLeft = rHTMLWrt.OutFlyFrm( rNode.GetIndex(), + bFlysLeft = rHTMLWrt.OutFlyFrame( rNode.GetIndex(), nStrPos, HTML_POS_INSIDE, &aContext ); } @@ -2562,7 +2562,7 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode ) // Die an der letzten Position verankerten Rahmen ausgeben if( bFlysLeft ) - bFlysLeft = rHTMLWrt.OutFlyFrm( rNode.GetIndex(), + bFlysLeft = rHTMLWrt.OutFlyFrame( rNode.GetIndex(), nEnd, HTML_POS_INSIDE ); OSL_ENSURE( !bFlysLeft, "Es wurden nicht alle Rahmen gespeichert!" ); @@ -2900,9 +2900,9 @@ static Writer& OutHTML_SwFlyCnt( Writer& rWrt, const SfxPoolItem& rHt ) const SwFrameFormat& rFormat = *rFlyCnt.GetFrameFormat(); const SdrObject *pSdrObj = nullptr; - SwHTMLFrmType eType = - (SwHTMLFrmType)rHTMLWrt.GuessFrmType( rFormat, pSdrObj ); - sal_uInt8 nMode = aHTMLOutFrmAsCharTable[eType][rHTMLWrt.m_nExportMode]; + SwHTMLFrameType eType = + (SwHTMLFrameType)rHTMLWrt.GuessFrameType( rFormat, pSdrObj ); + sal_uInt8 nMode = aHTMLOutFrameAsCharTable[eType][rHTMLWrt.m_nExportMode]; rHTMLWrt.OutFrameFormat( nMode, rFormat, pSdrObj ); return rWrt; } diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx index addae9ddf749..291856442520 100644 --- a/sw/source/filter/html/htmlcss1.cxx +++ b/sw/source/filter/html/htmlcss1.cxx @@ -385,8 +385,8 @@ void SwCSS1Parser::SetPageDescAttrs( const SvxBrushItem *pBrush, { SvxBrushItem aBrushItem( RES_BACKGROUND ); SvxBoxItem aBoxItem( RES_BOX ); - SvxFrameDirectionItem aFrmDirItem(FRMDIR_ENVIRONMENT, RES_FRAMEDIR); - bool bSetBrush = pBrush!=nullptr, bSetBox = false, bSetFrmDir = false; + SvxFrameDirectionItem aFrameDirItem(FRMDIR_ENVIRONMENT, RES_FRAMEDIR); + bool bSetBrush = pBrush!=nullptr, bSetBox = false, bSetFrameDir = false; if( pBrush ) aBrushItem = *pBrush; @@ -413,13 +413,13 @@ void SwCSS1Parser::SetPageDescAttrs( const SvxBrushItem *pBrush, if( SfxItemState::SET == pItemSet2->GetItemState( RES_FRAMEDIR, false, &pItem ) ) { // eine Umrandung wird gesetzt - aFrmDirItem = *static_cast< const SvxFrameDirectionItem *>( pItem ); + aFrameDirItem = *static_cast< const SvxFrameDirectionItem *>( pItem ); pItemSet2->ClearItem( RES_FRAMEDIR ); - bSetFrmDir = true; + bSetFrameDir = true; } } - if( bSetBrush || bSetBox || bSetFrmDir ) + if( bSetBrush || bSetBox || bSetFrameDir ) { static sal_uInt16 aPoolIds[] = { RES_POOLPAGE_HTML, RES_POOLPAGE_FIRST, RES_POOLPAGE_LEFT, RES_POOLPAGE_RIGHT }; @@ -434,8 +434,8 @@ void SwCSS1Parser::SetPageDescAttrs( const SvxBrushItem *pBrush, rMaster.SetFormatAttr( aBrushItem ); if( bSetBox ) rMaster.SetFormatAttr( aBoxItem ); - if( bSetFrmDir ) - rMaster.SetFormatAttr( aFrmDirItem ); + if( bSetFrameDir ) + rMaster.SetFormatAttr( aFrameDirItem ); ChgPageDesc( pPageDesc, aNewPageDesc ); } @@ -512,7 +512,7 @@ void SwCSS1Parser::SetPageDescAttrs( const SwPageDesc *pPageDesc, { if( rPropInfo.eSizeType == SVX_CSS1_STYPE_TWIP ) { - rMaster.SetFormatAttr( SwFormatFrmSize( ATT_FIX_SIZE, rPropInfo.nWidth, + rMaster.SetFormatAttr( SwFormatFrameSize( ATT_FIX_SIZE, rPropInfo.nWidth, rPropInfo.nHeight ) ); bChanged = true; } @@ -522,17 +522,17 @@ void SwCSS1Parser::SetPageDescAttrs( const SwPageDesc *pPageDesc, // Groesse der Vorlage erhalten. Bei "landscape" und "portrait" // wird das Landscape-Flag gesetzt und evtl. die Breite/Hoehe // vertauscht. - SwFormatFrmSize aFrmSz( rMaster.GetFrmSize() ); + SwFormatFrameSize aFrameSz( rMaster.GetFrameSize() ); bool bLandscape = aNewPageDesc.GetLandscape(); if( ( bLandscape && rPropInfo.eSizeType == SVX_CSS1_STYPE_PORTRAIT ) || ( !bLandscape && rPropInfo.eSizeType == SVX_CSS1_STYPE_LANDSCAPE ) ) { - SwTwips nTmp = aFrmSz.GetHeight(); - aFrmSz.SetHeight( aFrmSz.GetWidth() ); - aFrmSz.SetWidth( nTmp ); - rMaster.SetFormatAttr( aFrmSz ); + SwTwips nTmp = aFrameSz.GetHeight(); + aFrameSz.SetHeight( aFrameSz.GetWidth() ); + aFrameSz.SetWidth( nTmp ); + rMaster.SetFormatAttr( aFrameSz ); aNewPageDesc.SetLandscape( !bLandscape ); bChanged = true; } @@ -1943,7 +1943,7 @@ bool SwHTMLParser::ParseStyleOptions( const OUString &rStyle, void SwHTMLParser::SetAnchorAndAdjustment( const SfxItemSet & /*rItemSet*/, const SvxCSS1PropertyInfo &rPropInfo, - SfxItemSet &rFrmItemSet ) + SfxItemSet &rFrameItemSet ) { SwFormatAnchor aAnchor; @@ -2039,20 +2039,20 @@ void SwHTMLParser::SetAnchorAndAdjustment( const SfxItemSet & /*rItemSet*/, eSurround = SURROUND_RIGHT; } } - rFrmItemSet.Put( aAnchor ); + rFrameItemSet.Put( aAnchor ); // Absolut Positioniert mit Durchlauf - rFrmItemSet.Put( SwFormatHoriOrient( nHoriPos, eHoriOri, eHoriRel ) ); - rFrmItemSet.Put( SwFormatVertOrient( nVertPos, eVertOri, eVertRel ) ); - rFrmItemSet.Put( SwFormatSurround( eSurround ) ); + rFrameItemSet.Put( SwFormatHoriOrient( nHoriPos, eHoriOri, eHoriRel ) ); + rFrameItemSet.Put( SwFormatVertOrient( nVertPos, eVertOri, eVertRel ) ); + rFrameItemSet.Put( SwFormatSurround( eSurround ) ); } void SwHTMLParser::SetVarSize( SfxItemSet & /*rItemSet*/, SvxCSS1PropertyInfo &rPropInfo, - SfxItemSet &rFrmItemSet, + SfxItemSet &rFrameItemSet, SwTwips nDfltWidth, sal_uInt8 nDfltPrcWidth ) { - SwFrmSize eSize = ATT_MIN_SIZE; + SwFrameSize eSize = ATT_MIN_SIZE; SwTwips nWidth = nDfltWidth, nHeight = MINFLY; sal_uInt8 nPrcWidth = nDfltPrcWidth, nPrcHeight = 0; switch( rPropInfo.eWidthType ) @@ -2082,16 +2082,16 @@ void SwHTMLParser::SetVarSize( SfxItemSet & /*rItemSet*/, ; } - SwFormatFrmSize aFrmSize( eSize, nWidth, nHeight ); - aFrmSize.SetWidthPercent( nPrcWidth ); - aFrmSize.SetHeightPercent( nPrcHeight ); - rFrmItemSet.Put( aFrmSize ); + SwFormatFrameSize aFrameSize( eSize, nWidth, nHeight ); + aFrameSize.SetWidthPercent( nPrcWidth ); + aFrameSize.SetHeightPercent( nPrcHeight ); + rFrameItemSet.Put( aFrameSize ); } void SwHTMLParser::SetFrameFormatAttrs( SfxItemSet &rItemSet, SvxCSS1PropertyInfo & /*rPropInfo*/, sal_uInt16 nFlags, - SfxItemSet &rFrmItemSet ) + SfxItemSet &rFrameItemSet ) { const SfxPoolItem *pItem; if( (nFlags & HTML_FF_BOX) != 0 && @@ -2102,11 +2102,11 @@ void SwHTMLParser::SetFrameFormatAttrs( SfxItemSet &rItemSet, SvxBoxItem aBoxItem( *static_cast<const SvxBoxItem *>(pItem) ); // Alle 4 Seiten gleichzeitig auf 0 setzen aBoxItem.SetDistance( 0 ); - rFrmItemSet.Put( aBoxItem ); + rFrameItemSet.Put( aBoxItem ); } else { - rFrmItemSet.Put( *pItem ); + rFrameItemSet.Put( *pItem ); } rItemSet.ClearItem( RES_BOX ); } @@ -2114,14 +2114,14 @@ void SwHTMLParser::SetFrameFormatAttrs( SfxItemSet &rItemSet, if( (nFlags & HTML_FF_BACKGROUND) != 0 && SfxItemState::SET==rItemSet.GetItemState( RES_BACKGROUND, true, &pItem ) ) { - rFrmItemSet.Put( *pItem ); + rFrameItemSet.Put( *pItem ); rItemSet.ClearItem( RES_BACKGROUND ); } if( (nFlags & HTML_FF_DIRECTION) != 0 && SfxItemState::SET==rItemSet.GetItemState( RES_FRAMEDIR, true, &pItem ) ) { - rFrmItemSet.Put( *pItem ); + rFrameItemSet.Put( *pItem ); rItemSet.ClearItem( RES_FRAMEDIR ); } } diff --git a/sw/source/filter/html/htmlctxt.cxx b/sw/source/filter/html/htmlctxt.cxx index 669a46862d44..01aa9ea1f838 100644 --- a/sw/source/filter/html/htmlctxt.cxx +++ b/sw/source/filter/html/htmlctxt.cxx @@ -423,27 +423,27 @@ bool SwHTMLParser::DoPositioning( SfxItemSet &rItemSet, // - es wurde eine Breite angegeben (in beiden Faellen noetig) if( SwCSS1Parser::MayBePositioned( rPropInfo ) ) { - SfxItemSet aFrmItemSet( m_pDoc->GetAttrPool(), + SfxItemSet aFrameItemSet( m_pDoc->GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); if( !IsNewDoc() ) - Reader::ResetFrameFormatAttrs(aFrmItemSet ); + Reader::ResetFrameFormatAttrs(aFrameItemSet ); // Ausrichtung setzen SetAnchorAndAdjustment( text::VertOrientation::NONE, text::HoriOrientation::NONE, rItemSet, rPropInfo, - aFrmItemSet ); + aFrameItemSet ); // Groesse setzen - SetVarSize( rItemSet, rPropInfo, aFrmItemSet ); + SetVarSize( rItemSet, rPropInfo, aFrameItemSet ); // Abstaende setzen - SetSpace( Size(0,0), rItemSet, rPropInfo, aFrmItemSet ); + SetSpace( Size(0,0), rItemSet, rPropInfo, aFrameItemSet ); // Sonstige CSS1-Attribute Setzen SetFrameFormatAttrs( rItemSet, rPropInfo, HTML_FF_BOX|HTML_FF_PADDING|HTML_FF_BACKGROUND|HTML_FF_DIRECTION, - aFrmItemSet ); + aFrameItemSet ); - InsertFlyFrame( aFrmItemSet, pContext, rPropInfo.aId, + InsertFlyFrame( aFrameItemSet, pContext, rPropInfo.aId, CONTEXT_FLAGS_ABSPOS ); pContext->SetPopStack( true ); rPropInfo.aId.clear(); @@ -463,18 +463,18 @@ bool SwHTMLParser::CreateContainer( const OUString& rClass, SwCSS1Parser::MayBePositioned( rPropInfo ) ) { // Container-Klasse - SfxItemSet *pFrmItemSet = pContext->GetFrmItemSet( m_pDoc ); + SfxItemSet *pFrameItemSet = pContext->GetFrameItemSet( m_pDoc ); if( !IsNewDoc() ) - Reader::ResetFrameFormatAttrs( *pFrmItemSet ); + Reader::ResetFrameFormatAttrs( *pFrameItemSet ); SetAnchorAndAdjustment( text::VertOrientation::NONE, text::HoriOrientation::NONE, - rItemSet, rPropInfo, *pFrmItemSet ); + rItemSet, rPropInfo, *pFrameItemSet ); Size aDummy(0,0); SetFixSize( aDummy, aDummy, false, false, rItemSet, rPropInfo, - *pFrmItemSet ); - SetSpace( aDummy, rItemSet, rPropInfo, *pFrmItemSet ); + *pFrameItemSet ); + SetSpace( aDummy, rItemSet, rPropInfo, *pFrameItemSet ); SetFrameFormatAttrs( rItemSet, rPropInfo, HTML_FF_BOX|HTML_FF_BACKGROUND|HTML_FF_DIRECTION, - *pFrmItemSet ); + *pFrameItemSet ); bRet = true; } @@ -730,12 +730,12 @@ void SwHTMLParser::SplitPREListingXMP( _HTMLAttrContext *pCntxt ) FinishPREListingXMP(); } -SfxItemSet *_HTMLAttrContext::GetFrmItemSet( SwDoc *pCreateDoc ) +SfxItemSet *_HTMLAttrContext::GetFrameItemSet( SwDoc *pCreateDoc ) { - if( !pFrmItemSet && pCreateDoc ) - pFrmItemSet = new SfxItemSet( pCreateDoc->GetAttrPool(), + if( !pFrameItemSet && pCreateDoc ) + pFrameItemSet = new SfxItemSet( pCreateDoc->GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); - return pFrmItemSet; + return pFrameItemSet; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/html/htmldrawreader.cxx b/sw/source/filter/html/htmldrawreader.cxx index b6fa8fddc5b0..633afe6e83f9 100644 --- a/sw/source/filter/html/htmldrawreader.cxx +++ b/sw/source/filter/html/htmldrawreader.cxx @@ -83,10 +83,10 @@ void SwHTMLParser::InsertDrawObject( SdrObject* pNewDrawObj, // to the visible layer. pNewDrawObj->SetLayer( m_pDoc->getIDocumentDrawModelAccess().GetInvisibleHeavenId() ); - SfxItemSet aFrmSet( m_pDoc->GetAttrPool(), + SfxItemSet aFrameSet( m_pDoc->GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); if( !IsNewDoc() ) - Reader::ResetFrameFormatAttrs( aFrmSet ); + Reader::ResetFrameFormatAttrs( aFrameSet ); sal_uInt16 nLeftSpace = 0, nRightSpace = 0, nUpperSpace = 0, nLowerSpace = 0; if( (rPixSpace.Width() || rPixSpace.Height()) && Application::GetDefaultDevice() ) @@ -124,7 +124,7 @@ void SwHTMLParser::InsertDrawObject( SdrObject* pNewDrawObj, SvxLRSpaceItem aLRItem( RES_LR_SPACE ); aLRItem.SetLeft( nLeftSpace ); aLRItem.SetRight( nRightSpace ); - aFrmSet.Put( aLRItem ); + aFrameSet.Put( aLRItem ); } // oberen/unteren Rand setzen @@ -150,7 +150,7 @@ void SwHTMLParser::InsertDrawObject( SdrObject* pNewDrawObj, SvxULSpaceItem aULItem( RES_UL_SPACE ); aULItem.SetUpper( nUpperSpace ); aULItem.SetLower( nLowerSpace ); - aFrmSet.Put( aULItem ); + aFrameSet.Put( aULItem ); } SwFormatAnchor aAnchor( FLY_AS_CHAR ); @@ -174,20 +174,20 @@ void SwHTMLParser::InsertDrawObject( SdrObject* pNewDrawObj, // #i26791# - direct positioning for <SwDoc::Insert(..)> pNewDrawObj->SetRelativePos( Point(rCSS1PropInfo.nLeft + nLeftSpace, rCSS1PropInfo.nTop + nUpperSpace) ); - aFrmSet.Put( SwFormatSurround(SURROUND_THROUGHT) ); + aFrameSet.Put( SwFormatSurround(SURROUND_THROUGHT) ); } else if( SVX_ADJUST_LEFT == rCSS1PropInfo.eFloat || text::HoriOrientation::LEFT == eHoriOri ) { aAnchor.SetType( FLY_AT_PARA ); - aFrmSet.Put( SwFormatSurround(bHidden ? SURROUND_THROUGHT + aFrameSet.Put( SwFormatSurround(bHidden ? SURROUND_THROUGHT : SURROUND_RIGHT) ); // #i26791# - direct positioning for <SwDoc::Insert(..)> pNewDrawObj->SetRelativePos( Point(nLeftSpace, nUpperSpace) ); } else if( text::VertOrientation::NONE != eVertOri ) { - aFrmSet.Put( SwFormatVertOrient( 0, eVertOri ) ); + aFrameSet.Put( SwFormatVertOrient( 0, eVertOri ) ); } if (FLY_AT_PAGE == aAnchor.GetAnchorId()) @@ -198,9 +198,9 @@ void SwHTMLParser::InsertDrawObject( SdrObject* pNewDrawObj, { aAnchor.SetAnchor( m_pPam->GetPoint() ); } - aFrmSet.Put( aAnchor ); + aFrameSet.Put( aAnchor ); - m_pDoc->getIDocumentContentOperations().InsertDrawObj( *m_pPam, *pNewDrawObj, aFrmSet ); + m_pDoc->getIDocumentContentOperations().InsertDrawObj( *m_pPam, *pNewDrawObj, aFrameSet ); } static void PutEEPoolItem( SfxItemSet &rEEItemSet, diff --git a/sw/source/filter/html/htmldrawwriter.cxx b/sw/source/filter/html/htmldrawwriter.cxx index f879cf3c7b17..c9769f8a52e0 100644 --- a/sw/source/filter/html/htmldrawwriter.cxx +++ b/sw/source/filter/html/htmldrawwriter.cxx @@ -283,12 +283,12 @@ Writer& OutHTML_DrawFrameFormatAsMarquee( Writer& rWrt, rWrt.Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() ); // und nun noch ALIGN, HSPACE und VSPACE - sal_uInt32 nFrmFlags = HTML_FRMOPTS_MARQUEE; + sal_uInt32 nFrameFlags = HTML_FRMOPTS_MARQUEE; if( rHTMLWrt.IsHTMLMode( HTMLMODE_ABS_POS_DRAW ) ) - nFrmFlags |= HTML_FRMOPTS_MARQUEE_CSS1; - OString aEndTags = rHTMLWrt.OutFrameFormatOptions( rFormat, aEmptyOUStr, nFrmFlags ); + nFrameFlags |= HTML_FRMOPTS_MARQUEE_CSS1; + OString aEndTags = rHTMLWrt.OutFrameFormatOptions( rFormat, aEmptyOUStr, nFrameFlags ); if( rHTMLWrt.IsHTMLMode( HTMLMODE_ABS_POS_DRAW ) ) - rHTMLWrt.OutCSS1_FrameFormatOptions( rFormat, nFrmFlags, &rSdrObject ); + rHTMLWrt.OutCSS1_FrameFormatOptions( rFormat, nFrameFlags, &rSdrObject ); rWrt.Strm().WriteChar( '>' ); diff --git a/sw/source/filter/html/htmlfly.cxx b/sw/source/filter/html/htmlfly.cxx index d7320398f63d..ddabe12afee2 100644 --- a/sw/source/filter/html/htmlfly.cxx +++ b/sw/source/filter/html/htmlfly.cxx @@ -35,7 +35,7 @@ using namespace css; -SwHTMLPosFlyFrm::SwHTMLPosFlyFrm( const SwPosFlyFrm& rPosFly, +SwHTMLPosFlyFrame::SwHTMLPosFlyFrame( const SwPosFlyFrame& rPosFly, const SdrObject *pSdrObj, sal_uInt8 nOutMode ) : pFrameFormat( &rPosFly.GetFormat() ), @@ -69,22 +69,22 @@ SwHTMLPosFlyFrm::SwHTMLPosFlyFrm( const SwPosFlyFrm& rPosFly, } } -bool SwHTMLPosFlyFrm::operator<( const SwHTMLPosFlyFrm& rFrm ) const +bool SwHTMLPosFlyFrame::operator<( const SwHTMLPosFlyFrame& rFrame ) const { - if( pNdIdx->GetIndex() == rFrm.pNdIdx->GetIndex() ) + if( pNdIdx->GetIndex() == rFrame.pNdIdx->GetIndex() ) { - if( nContentIdx == rFrm.nContentIdx ) + if( nContentIdx == rFrame.nContentIdx ) { - if( GetOutPos() == rFrm.GetOutPos() ) - return nOrdNum < rFrm.nOrdNum; + if( GetOutPos() == rFrame.GetOutPos() ) + return nOrdNum < rFrame.nOrdNum; else - return GetOutPos() < rFrm.GetOutPos(); + return GetOutPos() < rFrame.GetOutPos(); } else - return nContentIdx < rFrm.nContentIdx; + return nContentIdx < rFrame.nContentIdx; } else - return pNdIdx->GetIndex() < rFrm.pNdIdx->GetIndex(); + return pNdIdx->GetIndex() < rFrame.pNdIdx->GetIndex(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/html/htmlfly.hxx b/sw/source/filter/html/htmlfly.hxx index 265305385b62..bf42b0f5ee46 100644 --- a/sw/source/filter/html/htmlfly.hxx +++ b/sw/source/filter/html/htmlfly.hxx @@ -26,11 +26,11 @@ class SdrObject; class SwFrameFormat; class SwNodeIndex; -class SwPosFlyFrm; +class SwPosFlyFrame; // ACHTUNG: Die Werte dieses Enumgs gehen direkt in die // Augabe Tabelle!!! -enum SwHTMLFrmType +enum SwHTMLFrameType { HTML_FRMTYPE_TABLE, HTML_FRMTYPE_TABLE_CAP, @@ -76,28 +76,28 @@ enum SwHTMLFrmType const sal_uInt16 MAX_FRMTYPES = HTML_FRMTYPE_END; const sal_uInt16 MAX_BROWSERS = 4; -extern sal_uInt8 aHTMLOutFrmPageFlyTable[MAX_FRMTYPES][MAX_BROWSERS]; -extern sal_uInt8 aHTMLOutFrmParaFrameTable[MAX_FRMTYPES][MAX_BROWSERS]; -extern sal_uInt8 aHTMLOutFrmParaPrtAreaTable[MAX_FRMTYPES][MAX_BROWSERS]; -extern sal_uInt8 aHTMLOutFrmParaOtherTable[MAX_FRMTYPES][MAX_BROWSERS]; -extern sal_uInt8 aHTMLOutFrmAsCharTable[MAX_FRMTYPES][MAX_BROWSERS]; +extern sal_uInt8 aHTMLOutFramePageFlyTable[MAX_FRMTYPES][MAX_BROWSERS]; +extern sal_uInt8 aHTMLOutFrameParaFrameTable[MAX_FRMTYPES][MAX_BROWSERS]; +extern sal_uInt8 aHTMLOutFrameParaPrtAreaTable[MAX_FRMTYPES][MAX_BROWSERS]; +extern sal_uInt8 aHTMLOutFrameParaOtherTable[MAX_FRMTYPES][MAX_BROWSERS]; +extern sal_uInt8 aHTMLOutFrameAsCharTable[MAX_FRMTYPES][MAX_BROWSERS]; -class SwHTMLPosFlyFrm +class SwHTMLPosFlyFrame { const SwFrameFormat *pFrameFormat; // der Rahmen const SdrObject *pSdrObject; // ggf. Sdr-Objekt SwNodeIndex *pNdIdx; // Node-Index - sal_uInt32 nOrdNum; // Aus SwPosFlyFrm + sal_uInt32 nOrdNum; // Aus SwPosFlyFrame sal_Int32 nContentIdx; // seine Position im Content sal_uInt8 nOutputMode; // Ausgabe-Infos public: - SwHTMLPosFlyFrm( const SwPosFlyFrm& rPosFly, + SwHTMLPosFlyFrame( const SwPosFlyFrame& rPosFly, const SdrObject *pSdrObj, sal_uInt8 nOutMode ); - bool operator==( const SwHTMLPosFlyFrm& ) const { return false; } - bool operator<( const SwHTMLPosFlyFrm& ) const; + bool operator==( const SwHTMLPosFlyFrame& ) const { return false; } + bool operator<( const SwHTMLPosFlyFrame& ) const; const SwFrameFormat& GetFormat() const { return *pFrameFormat; } const SdrObject *GetSdrObject() const { return pSdrObject; } @@ -115,9 +115,9 @@ public: sal_uInt8 GetOutPos() const { return nOutputMode & HTML_POS_MASK; } }; -class SwHTMLPosFlyFrms - : public o3tl::sorted_vector<SwHTMLPosFlyFrm*, - o3tl::less_ptr_to<SwHTMLPosFlyFrm>, +class SwHTMLPosFlyFrames + : public o3tl::sorted_vector<SwHTMLPosFlyFrame*, + o3tl::less_ptr_to<SwHTMLPosFlyFrame>, o3tl::find_partialorder_ptrequals> {}; diff --git a/sw/source/filter/html/htmlflyt.cxx b/sw/source/filter/html/htmlflyt.cxx index 21fd0c75dcff..f8b61022b07f 100644 --- a/sw/source/filter/html/htmlflyt.cxx +++ b/sw/source/filter/html/htmlflyt.cxx @@ -21,7 +21,7 @@ #define TE(t,p,c) (sal_uInt8)( HTML_OUT_##t | HTML_POS_##p | HTML_CNTNR_##c ) -sal_uInt8 aHTMLOutFrmPageFlyTable[MAX_FRMTYPES][MAX_BROWSERS] = +sal_uInt8 aHTMLOutFramePageFlyTable[MAX_FRMTYPES][MAX_BROWSERS] = { { // Textrahmen mit Tabelle @@ -117,7 +117,7 @@ sal_uInt8 aHTMLOutFrmPageFlyTable[MAX_FRMTYPES][MAX_BROWSERS] = } }; -sal_uInt8 aHTMLOutFrmParaFrameTable[MAX_FRMTYPES][MAX_BROWSERS] = +sal_uInt8 aHTMLOutFrameParaFrameTable[MAX_FRMTYPES][MAX_BROWSERS] = { { // Textrahmen mit Tabelle @@ -214,7 +214,7 @@ sal_uInt8 aHTMLOutFrmParaFrameTable[MAX_FRMTYPES][MAX_BROWSERS] = } }; -sal_uInt8 aHTMLOutFrmParaPrtAreaTable[MAX_FRMTYPES][MAX_BROWSERS] = +sal_uInt8 aHTMLOutFrameParaPrtAreaTable[MAX_FRMTYPES][MAX_BROWSERS] = { { // Textrahmen mit Tabelle @@ -310,7 +310,7 @@ sal_uInt8 aHTMLOutFrmParaPrtAreaTable[MAX_FRMTYPES][MAX_BROWSERS] = } }; -sal_uInt8 aHTMLOutFrmParaOtherTable[MAX_FRMTYPES][MAX_BROWSERS] = +sal_uInt8 aHTMLOutFrameParaOtherTable[MAX_FRMTYPES][MAX_BROWSERS] = { { // Textrahmen mit Tabelle @@ -406,7 +406,7 @@ sal_uInt8 aHTMLOutFrmParaOtherTable[MAX_FRMTYPES][MAX_BROWSERS] = } }; -sal_uInt8 aHTMLOutFrmAsCharTable[MAX_FRMTYPES][MAX_BROWSERS] = +sal_uInt8 aHTMLOutFrameAsCharTable[MAX_FRMTYPES][MAX_BROWSERS] = { { // Textrahmen mit Tabelle diff --git a/sw/source/filter/html/htmlflywriter.cxx b/sw/source/filter/html/htmlflywriter.cxx index 2defd045c41e..9395e49290a3 100644 --- a/sw/source/filter/html/htmlflywriter.cxx +++ b/sw/source/filter/html/htmlflywriter.cxx @@ -158,10 +158,10 @@ static HTMLOutEvent aIMapEventTable[] = { nullptr, nullptr, 0 } }; -sal_uInt16 SwHTMLWriter::GuessFrmType( const SwFrameFormat& rFrameFormat, +sal_uInt16 SwHTMLWriter::GuessFrameType( const SwFrameFormat& rFrameFormat, const SdrObject*& rpSdrObj ) { - SwHTMLFrmType eType; + SwHTMLFrameType eType; if( RES_DRAWFRMFMT == rFrameFormat.Which() ) { @@ -205,7 +205,7 @@ sal_uInt16 SwHTMLWriter::GuessFrmType( const SwFrameFormat& rFrameFormat, else if( pNd->IsOLENode() ) { // Applet, Plugin, Floating-Frame - eType = (SwHTMLFrmType)GuessOLENodeFrmType( *pNd ); + eType = (SwHTMLFrameType)GuessOLENodeFrameType( *pNd ); } else { @@ -246,11 +246,11 @@ sal_uInt16 SwHTMLWriter::GuessFrmType( const SwFrameFormat& rFrameFormat, // leerer Rahmen? Nur wenn kein Rahmen am // Text- oder Start-Node verankert ist. bEmpty = true; - if( m_pHTMLPosFlyFrms ) + if( m_pHTMLPosFlyFrames ) { - for( auto pHTMLPosFlyFrm : *m_pHTMLPosFlyFrms ) + for( auto pHTMLPosFlyFrame : *m_pHTMLPosFlyFrames ) { - sal_uLong nIdx = pHTMLPosFlyFrm->GetNdIndex().GetIndex(); + sal_uLong nIdx = pHTMLPosFlyFrame->GetNdIndex().GetIndex(); bEmpty = (nIdx != nStt) && (nIdx != nStt-1); if( !bEmpty || nIdx > nStt ) break; @@ -288,20 +288,20 @@ sal_uInt16 SwHTMLWriter::GuessFrmType( const SwFrameFormat& rFrameFormat, return static_cast< sal_uInt16 >(eType); } -void SwHTMLWriter::CollectFlyFrms() +void SwHTMLWriter::CollectFlyFrames() { OSL_ENSURE( HTML_CFG_MAX+1 == MAX_BROWSERS, "number of browser configurations has changed" ); - SwPosFlyFrms aFlyPos(pDoc->GetAllFlyFormats(bWriteAll ? nullptr : pCurPam, true)); + SwPosFlyFrames aFlyPos(pDoc->GetAllFlyFormats(bWriteAll ? nullptr : pCurPam, true)); - for(SwPosFlyFrms::const_iterator aIter(aFlyPos.begin()); aIter != aFlyPos.end(); ++aIter) + for(SwPosFlyFrames::const_iterator aIter(aFlyPos.begin()); aIter != aFlyPos.end(); ++aIter) { const SwFrameFormat& rFrameFormat = (*aIter)->GetFormat(); const SdrObject *pSdrObj = nullptr; const SwPosition *pAPos; const SwContentNode *pACNd; - SwHTMLFrmType eType = (SwHTMLFrmType)GuessFrmType( rFrameFormat, pSdrObj ); + SwHTMLFrameType eType = (SwHTMLFrameType)GuessFrameType( rFrameFormat, pSdrObj ); sal_uInt8 nMode; const SwFormatAnchor& rAnchor = rFrameFormat.GetAnchor(); @@ -310,7 +310,7 @@ void SwHTMLWriter::CollectFlyFrms() { case FLY_AT_PAGE: case FLY_AT_FLY: - nMode = aHTMLOutFrmPageFlyTable[eType][m_nExportMode]; + nMode = aHTMLOutFramePageFlyTable[eType][m_nExportMode]; break; case FLY_AT_PARA: @@ -325,56 +325,56 @@ void SwHTMLWriter::CollectFlyFrms() static_cast<const SvxLRSpaceItem&>(pACNd->GetAttr(RES_LR_SPACE)); if( rLRItem.GetTextLeft() || rLRItem.GetRight() ) { - nMode = aHTMLOutFrmParaFrameTable[eType][m_nExportMode]; + nMode = aHTMLOutFrameParaFrameTable[eType][m_nExportMode]; break; } } - nMode = aHTMLOutFrmParaPrtAreaTable[eType][m_nExportMode]; + nMode = aHTMLOutFrameParaPrtAreaTable[eType][m_nExportMode]; break; case FLY_AT_CHAR: if( text::RelOrientation::FRAME == eHoriRel || text::RelOrientation::PRINT_AREA == eHoriRel ) - nMode = aHTMLOutFrmParaPrtAreaTable[eType][m_nExportMode]; + nMode = aHTMLOutFrameParaPrtAreaTable[eType][m_nExportMode]; else - nMode = aHTMLOutFrmParaOtherTable[eType][m_nExportMode]; + nMode = aHTMLOutFrameParaOtherTable[eType][m_nExportMode]; break; default: - nMode = aHTMLOutFrmParaPrtAreaTable[eType][m_nExportMode]; + nMode = aHTMLOutFrameParaPrtAreaTable[eType][m_nExportMode]; break; } - if( !m_pHTMLPosFlyFrms ) - m_pHTMLPosFlyFrms = new SwHTMLPosFlyFrms; + if( !m_pHTMLPosFlyFrames ) + m_pHTMLPosFlyFrames = new SwHTMLPosFlyFrames; - SwHTMLPosFlyFrm *pNew = new SwHTMLPosFlyFrm(**aIter, pSdrObj, nMode); - m_pHTMLPosFlyFrms->insert( pNew ); + SwHTMLPosFlyFrame *pNew = new SwHTMLPosFlyFrame(**aIter, pSdrObj, nMode); + m_pHTMLPosFlyFrames->insert( pNew ); } } -bool SwHTMLWriter::OutFlyFrm( sal_uLong nNdIdx, sal_Int32 nContentIdx, sal_uInt8 nPos, +bool SwHTMLWriter::OutFlyFrame( sal_uLong nNdIdx, sal_Int32 nContentIdx, sal_uInt8 nPos, HTMLOutContext *pContext ) { bool bFlysLeft = false; // Noch Flys an aktueller Node-Position da? - // OutFlyFrm kan rekursiv aufgerufen werden. Deshalb muss man + // OutFlyFrame kan rekursiv aufgerufen werden. Deshalb muss man // manchmal wieder von vorne anfangen, nachdem ein Fly ausgegeben // wurde. bool bRestart = true; - while( m_pHTMLPosFlyFrms && bRestart ) + while( m_pHTMLPosFlyFrames && bRestart ) { bFlysLeft = bRestart = false; // suche nach dem Anfang der FlyFrames size_t i {0}; - for( ; i < m_pHTMLPosFlyFrms->size() && - (*m_pHTMLPosFlyFrms)[i]->GetNdIndex().GetIndex() < nNdIdx; i++ ) + for( ; i < m_pHTMLPosFlyFrames->size() && + (*m_pHTMLPosFlyFrames)[i]->GetNdIndex().GetIndex() < nNdIdx; i++ ) ; - for( ; !bRestart && i < m_pHTMLPosFlyFrms->size() && - (*m_pHTMLPosFlyFrms)[i]->GetNdIndex().GetIndex() == nNdIdx; i++ ) + for( ; !bRestart && i < m_pHTMLPosFlyFrames->size() && + (*m_pHTMLPosFlyFrames)[i]->GetNdIndex().GetIndex() == nNdIdx; i++ ) { - SwHTMLPosFlyFrm *pPosFly = (*m_pHTMLPosFlyFrms)[i]; + SwHTMLPosFlyFrame *pPosFly = (*m_pHTMLPosFlyFrames)[i]; if( ( HTML_POS_ANY == nPos || pPosFly->GetOutPos() == nPos ) && pPosFly->GetContentIndex() == nContentIdx ) @@ -382,12 +382,12 @@ bool SwHTMLWriter::OutFlyFrm( sal_uLong nNdIdx, sal_Int32 nContentIdx, sal_uInt8 // Erst entfernen ist wichtig, weil in tieferen // Rekursionen evtl. weitere Eintraege oder das // ganze Array geloscht werden koennte. - m_pHTMLPosFlyFrms->erase(i); + m_pHTMLPosFlyFrames->erase(i); i--; - if( m_pHTMLPosFlyFrms->empty() ) + if( m_pHTMLPosFlyFrames->empty() ) { - delete m_pHTMLPosFlyFrms; - m_pHTMLPosFlyFrms = nullptr; + delete m_pHTMLPosFlyFrames; + m_pHTMLPosFlyFrames = nullptr; bRestart = true; // nicht wirklich, nur raus // aus der Schleife } @@ -424,8 +424,8 @@ bool SwHTMLWriter::OutFlyFrm( sal_uLong nNdIdx, sal_Int32 nContentIdx, sal_uInt8 void SwHTMLWriter::OutFrameFormat( sal_uInt8 nMode, const SwFrameFormat& rFrameFormat, const SdrObject *pSdrObject ) { - sal_uInt8 nCntnrMode = SwHTMLPosFlyFrm::GetOutCntnr( nMode ); - sal_uInt8 nOutMode = SwHTMLPosFlyFrm::GetOutFn(nMode); + sal_uInt8 nCntnrMode = SwHTMLPosFlyFrame::GetOutCntnr( nMode ); + sal_uInt8 nOutMode = SwHTMLPosFlyFrame::GetOutFn(nMode); const sal_Char *pCntnrStr = nullptr; if( HTML_CNTNR_NONE != nCntnrMode ) { @@ -443,15 +443,15 @@ void SwHTMLWriter::OutFrameFormat( sal_uInt8 nMode, const SwFrameFormat& rFrameF Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() ); // Fuer Nicht-Zeichenobekte eine Breite ausgeben - sal_uLong nFrmFlags = HTML_FRMOPTS_CNTNR; + sal_uLong nFrameFlags = HTML_FRMOPTS_CNTNR; // Fuer spaltige Rahmen koennen wir auch noch den Hintergrund ausgeben. if( HTML_OUT_MULTICOL == nOutMode ) - nFrmFlags |= HTML_FRMOPT_S_BACKGROUND|HTML_FRMOPT_S_BORDER; + nFrameFlags |= HTML_FRMOPT_S_BACKGROUND|HTML_FRMOPT_S_BORDER; if( IsHTMLMode( HTMLMODE_BORDER_NONE ) ) - nFrmFlags |= HTML_FRMOPT_S_NOBORDER; - OutCSS1_FrameFormatOptions( rFrameFormat, nFrmFlags, pSdrObject ); + nFrameFlags |= HTML_FRMOPT_S_NOBORDER; + OutCSS1_FrameFormatOptions( rFrameFormat, nFrameFlags, pSdrObject ); Strm().WriteChar( '>' ); if( HTML_CNTNR_DIV == nCntnrMode ) @@ -520,7 +520,7 @@ void SwHTMLWriter::OutFrameFormat( sal_uInt8 nMode, const SwFrameFormat& rFrameF OString SwHTMLWriter::OutFrameFormatOptions( const SwFrameFormat &rFrameFormat, const OUString& rAlternateText, - sal_uInt32 nFrmOpts, + sal_uInt32 nFrameOpts, const OString &rEndTags ) { OString sRetEndTags(rEndTags); @@ -529,11 +529,11 @@ OString SwHTMLWriter::OutFrameFormatOptions( const SwFrameFormat &rFrameFormat, const SfxItemSet& rItemSet = rFrameFormat.GetAttrSet(); // Name - if( (nFrmOpts & (HTML_FRMOPT_ID|HTML_FRMOPT_NAME)) && + if( (nFrameOpts & (HTML_FRMOPT_ID|HTML_FRMOPT_NAME)) && !rFrameFormat.GetName().isEmpty() ) { const sal_Char *pStr = - (nFrmOpts & HTML_FRMOPT_ID) ? OOO_STRING_SVTOOLS_HTML_O_id : OOO_STRING_SVTOOLS_HTML_O_name; + (nFrameOpts & HTML_FRMOPT_ID) ? OOO_STRING_SVTOOLS_HTML_O_id : OOO_STRING_SVTOOLS_HTML_O_name; sOut.append(' ').append(pStr). append("=\""); Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() ); @@ -542,7 +542,7 @@ OString SwHTMLWriter::OutFrameFormatOptions( const SwFrameFormat &rFrameFormat, } // Name - if( nFrmOpts & HTML_FRMOPT_DIR ) + if( nFrameOpts & HTML_FRMOPT_DIR ) { sal_uInt16 nDir = GetHTMLDirection( rItemSet ); Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() ); @@ -550,7 +550,7 @@ OString SwHTMLWriter::OutFrameFormatOptions( const SwFrameFormat &rFrameFormat, } // ALT - if( (nFrmOpts & HTML_FRMOPT_ALT) && !rAlternateText.isEmpty() ) + if( (nFrameOpts & HTML_FRMOPT_ALT) && !rAlternateText.isEmpty() ) { sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_alt). append("=\""); @@ -562,14 +562,14 @@ OString SwHTMLWriter::OutFrameFormatOptions( const SwFrameFormat &rFrameFormat, // ALIGN const sal_Char *pStr = nullptr; RndStdIds eAnchorId = rFrameFormat.GetAnchor().GetAnchorId(); - if( (nFrmOpts & HTML_FRMOPT_ALIGN) && + if( (nFrameOpts & HTML_FRMOPT_ALIGN) && ((FLY_AT_PARA == eAnchorId) || (FLY_AT_CHAR == eAnchorId)) ) { // MIB 12.3.98: Ist es nicht schlauer, absatzgebundene // Rahmen notfalls links auszurichten als sie // zeichengebunden einzufuegen??? const SwFormatHoriOrient& rHoriOri = rFrameFormat.GetHoriOrient(); - if( !(nFrmOpts & HTML_FRMOPT_S_ALIGN) || + if( !(nFrameOpts & HTML_FRMOPT_S_ALIGN) || text::RelOrientation::FRAME == rHoriOri.GetRelationOrient() || text::RelOrientation::PRINT_AREA == rHoriOri.GetRelationOrient() ) { @@ -578,8 +578,8 @@ OString SwHTMLWriter::OutFrameFormatOptions( const SwFrameFormat &rFrameFormat, : OOO_STRING_SVTOOLS_HTML_AL_left; } } - if( (nFrmOpts & HTML_FRMOPT_ALIGN) && !pStr && - ( (nFrmOpts & HTML_FRMOPT_S_ALIGN) == 0 || + if( (nFrameOpts & HTML_FRMOPT_ALIGN) && !pStr && + ( (nFrameOpts & HTML_FRMOPT_S_ALIGN) == 0 || (FLY_AS_CHAR == eAnchorId) ) && SfxItemState::SET == rItemSet.GetItemState( RES_VERT_ORIENT, true, &pItem )) { @@ -605,7 +605,7 @@ OString SwHTMLWriter::OutFrameFormatOptions( const SwFrameFormat &rFrameFormat, // HSPACE und VSPACE Size aTwipSpc( 0, 0 ); - if( (nFrmOpts & (HTML_FRMOPT_SPACE|HTML_FRMOPT_MARGINSIZE)) && + if( (nFrameOpts & (HTML_FRMOPT_SPACE|HTML_FRMOPT_MARGINSIZE)) && SfxItemState::SET == rItemSet.GetItemState( RES_LR_SPACE, true, &pItem )) { aTwipSpc.Width() = @@ -613,7 +613,7 @@ OString SwHTMLWriter::OutFrameFormatOptions( const SwFrameFormat &rFrameFormat, static_cast<const SvxLRSpaceItem*>(pItem)->GetRight() ) / 2; m_nDfltLeftMargin = m_nDfltRightMargin = aTwipSpc.Width(); } - if( (nFrmOpts & (HTML_FRMOPT_SPACE|HTML_FRMOPT_MARGINSIZE)) && + if( (nFrameOpts & (HTML_FRMOPT_SPACE|HTML_FRMOPT_MARGINSIZE)) && SfxItemState::SET == rItemSet.GetItemState( RES_UL_SPACE, true, &pItem )) { aTwipSpc.Height() = @@ -622,7 +622,7 @@ OString SwHTMLWriter::OutFrameFormatOptions( const SwFrameFormat &rFrameFormat, m_nDfltTopMargin = m_nDfltBottomMargin = (sal_uInt16)aTwipSpc.Height(); } - if( (nFrmOpts & HTML_FRMOPT_SPACE) && + if( (nFrameOpts & HTML_FRMOPT_SPACE) && (aTwipSpc.Width() || aTwipSpc.Height()) && Application::GetDefaultDevice() ) { @@ -649,7 +649,7 @@ OString SwHTMLWriter::OutFrameFormatOptions( const SwFrameFormat &rFrameFormat, // Der Abstand muss bei der Groesse beruecksichtigt, wenn das entsprechende // Flag gesetzt ist. - if( (nFrmOpts & HTML_FRMOPT_MARGINSIZE) ) + if( (nFrameOpts & HTML_FRMOPT_MARGINSIZE) ) { aTwipSpc.Width() *= -2; aTwipSpc.Height() *= -2; @@ -660,7 +660,7 @@ OString SwHTMLWriter::OutFrameFormatOptions( const SwFrameFormat &rFrameFormat, aTwipSpc.Height() = 0; } - if( !(nFrmOpts & HTML_FRMOPT_ABSSIZE) && + if( !(nFrameOpts & HTML_FRMOPT_ABSSIZE) && SfxItemState::SET == rItemSet.GetItemState( RES_BOX, true, &pItem )) { const SvxBoxItem* pBoxItem = static_cast<const SvxBoxItem*>(pItem); @@ -673,12 +673,12 @@ OString SwHTMLWriter::OutFrameFormatOptions( const SwFrameFormat &rFrameFormat, // WIDTH und/oder HEIGHT // ATT_VAR_SIZE/ATT_MIN_SIZE nur ausgeben, wenn ANYSIZE gesezut ist - if( (nFrmOpts & HTML_FRMOPT_SIZE) && + if( (nFrameOpts & HTML_FRMOPT_SIZE) && SfxItemState::SET == rItemSet.GetItemState( RES_FRM_SIZE, true, &pItem ) && - ( (nFrmOpts & HTML_FRMOPT_ANYSIZE) || - ATT_FIX_SIZE == static_cast<const SwFormatFrmSize *>(pItem)->GetHeightSizeType()) ) + ( (nFrameOpts & HTML_FRMOPT_ANYSIZE) || + ATT_FIX_SIZE == static_cast<const SwFormatFrameSize *>(pItem)->GetHeightSizeType()) ) { - const SwFormatFrmSize *pFSItem = static_cast<const SwFormatFrmSize *>(pItem); + const SwFormatFrameSize *pFSItem = static_cast<const SwFormatFrameSize *>(pItem); sal_uInt8 nPrcWidth = pFSItem->GetWidthPercent(); sal_uInt8 nPrcHeight = pFSItem->GetHeightPercent(); @@ -708,7 +708,7 @@ OString SwHTMLWriter::OutFrameFormatOptions( const SwFrameFormat &rFrameFormat, aPixelSz.Height() = 1; } - if( (nFrmOpts & HTML_FRMOPT_WIDTH) && + if( (nFrameOpts & HTML_FRMOPT_WIDTH) && ((nPrcWidth && nPrcWidth!=255) || aPixelSz.Width()) ) { sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_width). @@ -720,7 +720,7 @@ OString SwHTMLWriter::OutFrameFormatOptions( const SwFrameFormat &rFrameFormat, sOut.append("\""); } - if( (nFrmOpts & HTML_FRMOPT_HEIGHT) && + if( (nFrameOpts & HTML_FRMOPT_HEIGHT) && ((nPrcHeight && nPrcHeight!=255) || aPixelSz.Height()) ) { sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_height). @@ -738,7 +738,7 @@ OString SwHTMLWriter::OutFrameFormatOptions( const SwFrameFormat &rFrameFormat, // Umlauf fuer absatzgeb. Grafiken als <BR CLEAR=...> in den String // schreiben - if( (nFrmOpts & HTML_FRMOPT_BRCLEAR) && + if( (nFrameOpts & HTML_FRMOPT_BRCLEAR) && ((FLY_AT_PARA == rFrameFormat.GetAnchor().GetAnchorId()) || (FLY_AT_CHAR == rFrameFormat.GetAnchor().GetAnchorId())) && SfxItemState::SET == rItemSet.GetItemState( RES_SURROUND, true, &pItem )) @@ -942,9 +942,9 @@ void SwHTMLWriter::writeFrameFormatOptions(HtmlWriter& aHtml, const SwFrameForma if( (nFrameOptions & HTML_FRMOPT_SIZE) && SfxItemState::SET == rItemSet.GetItemState( RES_FRM_SIZE, true, &pItem ) && ( (nFrameOptions & HTML_FRMOPT_ANYSIZE) || - ATT_FIX_SIZE == static_cast<const SwFormatFrmSize *>(pItem)->GetHeightSizeType()) ) + ATT_FIX_SIZE == static_cast<const SwFormatFrameSize *>(pItem)->GetHeightSizeType()) ) { - const SwFormatFrmSize *pFSItem = static_cast<const SwFormatFrmSize *>(pItem); + const SwFormatFrameSize *pFSItem = static_cast<const SwFormatFrameSize *>(pItem); sal_uInt8 nPrcWidth = pFSItem->GetWidthPercent(); sal_uInt8 nPrcHeight = pFSItem->GetHeightPercent(); @@ -1125,12 +1125,12 @@ OUString lclWriteOutImap(SwHTMLWriter& rHTMLWrt, const SfxItemSet& rItemSet, con Fraction aScaleX(1, 1); Fraction aScaleY(1, 1); - const SwFormatFrmSize& rFrmSize = rFrameFormat.GetFrmSize(); + const SwFormatFrameSize& rFrameSize = rFrameFormat.GetFrameSize(); const SvxBoxItem& rBox = rFrameFormat.GetBox(); - if (!rFrmSize.GetWidthPercent() && rRealSize.Width()) + if (!rFrameSize.GetWidthPercent() && rRealSize.Width()) { - SwTwips nWidth = rFrmSize.GetWidth(); + SwTwips nWidth = rFrameSize.GetWidth(); nWidth -= rBox.CalcLineSpace(SvxBoxItemLine::LEFT) + rBox.CalcLineSpace(SvxBoxItemLine::RIGHT); OSL_ENSURE( nWidth > 0, "Gibt es 0 twip breite Grafiken!?" ); @@ -1144,9 +1144,9 @@ OUString lclWriteOutImap(SwHTMLWriter& rHTMLWrt, const SfxItemSet& rItemSet, con } } - if (!rFrmSize.GetHeightPercent() && rRealSize.Height()) + if (!rFrameSize.GetHeightPercent() && rRealSize.Height()) { - SwTwips nHeight = rFrmSize.GetHeight(); + SwTwips nHeight = rFrameSize.GetHeight(); nHeight -= rBox.CalcLineSpace(SvxBoxItemLine::TOP) + rBox.CalcLineSpace(SvxBoxItemLine::BOTTOM); @@ -1203,7 +1203,7 @@ OUString lclWriteOutImap(SwHTMLWriter& rHTMLWrt, const SfxItemSet& rItemSet, con Writer& OutHTML_Image( Writer& rWrt, const SwFrameFormat &rFrameFormat, Graphic& rGraphic, const OUString& rAlternateText, - const Size &rRealSize, sal_uInt32 nFrmOpts, + const Size &rRealSize, sal_uInt32 nFrameOpts, const sal_Char *pMarkType, const ImageMap *pAltImgMap ) { @@ -1292,7 +1292,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrameFormat &rFrameFormat, // <font color = ...>...<img ... >...</font> sal_uInt16 nBorderWidth = 0; - if( (nFrmOpts & HTML_FRMOPT_BORDER) && + if( (nFrameOpts & HTML_FRMOPT_BORDER) && SfxItemState::SET == rItemSet.GetItemState( RES_BOX, true, &pItem )) { Size aTwipBorder( 0, 0 ); @@ -1380,11 +1380,11 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrameFormat &rFrameFormat, } // alt, align, width, height, hspace, vspace - rHTMLWrt.writeFrameFormatOptions(aHtml, rFrameFormat, rAlternateText, nFrmOpts); + rHTMLWrt.writeFrameFormatOptions(aHtml, rFrameFormat, rAlternateText, nFrameOpts); if( rHTMLWrt.IsHTMLMode( HTMLMODE_ABS_POS_FLY ) ) - rHTMLWrt.OutCSS1_FrameFormatOptions( rFrameFormat, nFrmOpts ); + rHTMLWrt.OutCSS1_FrameFormatOptions( rFrameFormat, nFrameOpts ); - if( nFrmOpts & HTML_FRMOPT_BORDER ) + if( nFrameOpts & HTML_FRMOPT_BORDER ) { aHtml.attribute(OOO_STRING_SVTOOLS_HTML_O_border, nBorderWidth); } @@ -1543,13 +1543,13 @@ static Writer & OutHTML_FrameFormatAsMulticol( Writer& rWrt, rWrt.Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() ); // WIDTH - sal_uLong nFrmFlags = bInCntnr ? HTML_FRMOPTS_MULTICOL_CNTNR + sal_uLong nFrameFlags = bInCntnr ? HTML_FRMOPTS_MULTICOL_CNTNR : HTML_FRMOPTS_MULTICOL; if( rHTMLWrt.IsHTMLMode( HTMLMODE_ABS_POS_FLY ) && !bInCntnr ) - nFrmFlags |= HTML_FRMOPTS_MULTICOL_CSS1; - rHTMLWrt.OutFrameFormatOptions( rFrameFormat, aEmptyOUStr, nFrmFlags ); + nFrameFlags |= HTML_FRMOPTS_MULTICOL_CSS1; + rHTMLWrt.OutFrameFormatOptions( rFrameFormat, aEmptyOUStr, nFrameFlags ); if( rHTMLWrt.IsHTMLMode( HTMLMODE_ABS_POS_FLY ) && !bInCntnr ) - rHTMLWrt.OutCSS1_FrameFormatOptions( rFrameFormat, nFrmFlags ); + rHTMLWrt.OutCSS1_FrameFormatOptions( rFrameFormat, nFrameFlags ); rWrt.Strm().WriteChar( '>' ); @@ -1629,11 +1629,11 @@ static Writer& OutHTML_FrameFormatAsDivOrSpan( Writer& rWrt, sOut.append('<').append(pStr); rWrt.Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() ); - sal_uLong nFrmFlags = HTML_FRMOPTS_DIV; + sal_uLong nFrameFlags = HTML_FRMOPTS_DIV; if( rHTMLWrt.IsHTMLMode( HTMLMODE_BORDER_NONE ) ) - nFrmFlags |= HTML_FRMOPT_S_NOBORDER; - OString aEndTags = rHTMLWrt.OutFrameFormatOptions( rFrameFormat, aEmptyOUStr, nFrmFlags ); - rHTMLWrt.OutCSS1_FrameFormatOptions( rFrameFormat, nFrmFlags ); + nFrameFlags |= HTML_FRMOPT_S_NOBORDER; + OString aEndTags = rHTMLWrt.OutFrameFormatOptions( rFrameFormat, aEmptyOUStr, nFrameFlags ); + rHTMLWrt.OutCSS1_FrameFormatOptions( rFrameFormat, nFrameFlags ); rWrt.Strm().WriteChar( '>' ); rHTMLWrt.IncIndentLevel(); // den Inhalt einruecken @@ -1643,7 +1643,7 @@ static Writer& OutHTML_FrameFormatAsDivOrSpan( Writer& rWrt, sal_uLong nStt = rFlyContent.GetContentIdx()->GetIndex(); // Am Start-Node verankerte Rahmen-gebundene Rahmen ausgeben - rHTMLWrt.OutFlyFrm( nStt, 0, HTML_POS_ANY ); + rHTMLWrt.OutFlyFrame( nStt, 0, HTML_POS_ANY ); const SwStartNode* pSttNd = rWrt.pDoc->GetNodes()[nStt]->GetStartNode(); OSL_ENSURE( pSttNd, "Wo ist der Start-Node" ); @@ -1702,13 +1702,13 @@ static Writer& OutHTML_FrameFormatGrfNode( Writer& rWrt, const SwFrameFormat& rF if( !pGrfNd ) return rWrt; - sal_uLong nFrmFlags = bInCntnr ? HTML_FRMOPTS_IMG_CNTNR : HTML_FRMOPTS_IMG; + sal_uLong nFrameFlags = bInCntnr ? HTML_FRMOPTS_IMG_CNTNR : HTML_FRMOPTS_IMG; if( rHTMLWrt.IsHTMLMode( HTMLMODE_ABS_POS_FLY ) && !bInCntnr ) - nFrmFlags |= HTML_FRMOPTS_IMG_CSS1; + nFrameFlags |= HTML_FRMOPTS_IMG_CSS1; Graphic aGraphic = pGrfNd->GetGraphic(); OutHTML_Image( rWrt, rFrameFormat, aGraphic, pGrfNd->GetTitle(), - pGrfNd->GetTwipSize(), nFrmFlags, "graphic" ); + pGrfNd->GetTwipSize(), nFrameFlags, "graphic" ); return rWrt; } diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx index 4388f16d093f..b56cc4b7db5b 100644 --- a/sw/source/filter/html/htmlforw.cxx +++ b/sw/source/filter/html/htmlforw.cxx @@ -725,7 +725,7 @@ Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt, bool bEmptyValue = false; uno::Any aTmp = xPropSet->getPropertyValue( "ClassId" ); sal_Int16 nClassId = *static_cast<sal_Int16 const *>(aTmp.getValue()); - sal_uInt32 nFrmOpts = HTML_FRMOPTS_CONTROL; + sal_uInt32 nFrameOpts = HTML_FRMOPTS_CONTROL; switch( nClassId ) { case form::FormComponentType::CHECKBOX: @@ -914,7 +914,7 @@ Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt, case form::FormComponentType::IMAGEBUTTON: eType = TYPE_IMAGE; - nFrmOpts = HTML_FRMOPTS_IMG_CONTROL; + nFrameOpts = HTML_FRMOPTS_IMG_CONTROL; break; default: // kennt HTML nicht @@ -1024,13 +1024,13 @@ Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt, { // Wenn Zeichen-Objekte nicht absolut positioniert werden duerfen, // das entsprechende Flag loeschen. - nFrmOpts |= (TYPE_IMAGE == eType + nFrameOpts |= (TYPE_IMAGE == eType ? HTML_FRMOPTS_IMG_CONTROL_CSS1 : HTML_FRMOPTS_CONTROL_CSS1); } OString aEndTags; - if( nFrmOpts != 0 ) - aEndTags = rHTMLWrt.OutFrameFormatOptions( rFormat, aEmptyOUStr, nFrmOpts ); + if( nFrameOpts != 0 ) + aEndTags = rHTMLWrt.OutFrameFormatOptions( rFormat, aEmptyOUStr, nFrameOpts ); if( rHTMLWrt.m_bCfgOutStyles ) { @@ -1138,7 +1138,7 @@ Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt, } } - rHTMLWrt.OutCSS1_FrameFormatOptions( rFormat, nFrmOpts, &rFormObj, + rHTMLWrt.OutCSS1_FrameFormatOptions( rFormat, nFrameOpts, &rFormObj, &aItemSet ); } @@ -1313,22 +1313,22 @@ void SwHTMLWriter::GetControls() // Ueber dieses Array laesst sich dann feststellen, wo form::Forms geoeffnet // und geschlossen werden muessen. - if( m_pHTMLPosFlyFrms ) + if( m_pHTMLPosFlyFrames ) { // die absatz-gebundenen Controls einsammeln - for( size_t i=0; i<m_pHTMLPosFlyFrms->size(); i++ ) + for( size_t i=0; i<m_pHTMLPosFlyFrames->size(); i++ ) { - const SwHTMLPosFlyFrm* pPosFlyFrm = (*m_pHTMLPosFlyFrms)[ i ]; - if( HTML_OUT_CONTROL != pPosFlyFrm->GetOutFn() ) + const SwHTMLPosFlyFrame* pPosFlyFrame = (*m_pHTMLPosFlyFrames)[ i ]; + if( HTML_OUT_CONTROL != pPosFlyFrame->GetOutFn() ) continue; - const SdrObject *pSdrObj = pPosFlyFrm->GetSdrObject(); + const SdrObject *pSdrObj = pPosFlyFrame->GetSdrObject(); OSL_ENSURE( pSdrObj, "Wo ist das SdrObject?" ); if( !pSdrObj ) continue; AddControl( m_aHTMLControls, dynamic_cast<const SdrUnoObj&>(*pSdrObj), - pPosFlyFrm->GetNdIndex().GetIndex() ); + pPosFlyFrame->GetNdIndex().GetIndex() ); } } diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx index 35dbcf540ddf..00ec79fd3f97 100644 --- a/sw/source/filter/html/htmlgrin.cxx +++ b/sw/source/filter/html/htmlgrin.cxx @@ -152,36 +152,36 @@ void SwHTMLParser::SetAnchorAndAdjustment( sal_Int16 eVertOri, sal_Int16 eHoriOri, const SfxItemSet &rCSS1ItemSet, const SvxCSS1PropertyInfo &rCSS1PropInfo, - SfxItemSet& rFrmItemSet ) + SfxItemSet& rFrameItemSet ) { const SfxItemSet *pCntnrItemSet = nullptr; auto i = m_aContexts.size(); while( !pCntnrItemSet && i > m_nContextStMin ) - pCntnrItemSet = m_aContexts[--i]->GetFrmItemSet(); + pCntnrItemSet = m_aContexts[--i]->GetFrameItemSet(); if( pCntnrItemSet ) { // Wenn wir und in einem Container befinden wird die Verankerung // des Containers uebernommen. - rFrmItemSet.Put( *pCntnrItemSet ); + rFrameItemSet.Put( *pCntnrItemSet ); } else if( SwCSS1Parser::MayBePositioned( rCSS1PropInfo, true ) ) { // Wenn die Ausrichtung anhand der CSS1-Optionen gesetzt werden kann // werden die benutzt. - SetAnchorAndAdjustment( rCSS1ItemSet, rCSS1PropInfo, rFrmItemSet ); + SetAnchorAndAdjustment( rCSS1ItemSet, rCSS1PropInfo, rFrameItemSet ); } else { // Sonst wird die Ausrichtung entsprechend der normalen HTML-Optionen // gesetzt. - SetAnchorAndAdjustment( eVertOri, eHoriOri, rFrmItemSet ); + SetAnchorAndAdjustment( eVertOri, eHoriOri, rFrameItemSet ); } } void SwHTMLParser::SetAnchorAndAdjustment( sal_Int16 eVertOri, sal_Int16 eHoriOri, - SfxItemSet& rFrmSet, + SfxItemSet& rFrameSet, bool bDontAppend ) { bool bMoveBackward = false; @@ -256,11 +256,11 @@ void SwHTMLParser::SetAnchorAndAdjustment( sal_Int16 eVertOri, eVertRel = text::RelOrientation::PRINT_AREA; } - rFrmSet.Put( SwFormatHoriOrient( 0, eHoriOri, eHoriRel) ); + rFrameSet.Put( SwFormatHoriOrient( 0, eHoriOri, eHoriRel) ); - rFrmSet.Put( SwFormatSurround( eSurround ) ); + rFrameSet.Put( SwFormatSurround( eSurround ) ); } - rFrmSet.Put( SwFormatVertOrient( 0, eVertOri, eVertRel) ); + rFrameSet.Put( SwFormatVertOrient( 0, eVertOri, eVertRel) ); if( bMoveBackward ) m_pPam->Move( fnMoveBackward ); @@ -270,10 +270,10 @@ void SwHTMLParser::SetAnchorAndAdjustment( sal_Int16 eVertOri, if( bMoveBackward ) m_pPam->Move( fnMoveForward ); - rFrmSet.Put( aAnchor ); + rFrameSet.Put( aAnchor ); } -void SwHTMLParser::RegisterFlyFrm( SwFrameFormat *pFlyFormat ) +void SwHTMLParser::RegisterFlyFrame( SwFrameFormat *pFlyFormat ) { // automatisch verankerte Rahmen muessen noch um eine Position // nach vorne verschoben werden. @@ -281,7 +281,7 @@ void SwHTMLParser::RegisterFlyFrm( SwFrameFormat *pFlyFormat ) (FLY_AT_PARA == pFlyFormat->GetAnchor().GetAnchorId()) && SURROUND_THROUGHT == pFlyFormat->GetSurround().GetSurround() ) { - m_aMoveFlyFrms.push_back( pFlyFormat ); + m_aMoveFlyFrames.push_back( pFlyFormat ); m_aMoveFlyCnts.push_back( m_pPam->GetPoint()->nContent.GetIndex() ); } } @@ -494,10 +494,10 @@ IMAGE_SETEVENT: if( HasStyleOptions( aStyle, aId, aClass ) ) ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo ); - SfxItemSet aFrmSet( m_pDoc->GetAttrPool(), + SfxItemSet aFrameSet( m_pDoc->GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); if( !IsNewDoc() ) - Reader::ResetFrameFormatAttrs( aFrmSet ); + Reader::ResetFrameFormatAttrs( aFrameSet ); // Umrandung setzen long nHBorderWidth = 0, nVBorderWidth = 0; @@ -537,17 +537,17 @@ IMAGE_SETEVENT: aBoxItem.SetLine( &aHBorderLine, SvxBoxItemLine::BOTTOM ); aBoxItem.SetLine( &aVBorderLine, SvxBoxItemLine::LEFT ); aBoxItem.SetLine( &aVBorderLine, SvxBoxItemLine::RIGHT ); - aFrmSet.Put( aBoxItem ); + aFrameSet.Put( aBoxItem ); } // Ausrichtung setzen - SetAnchorAndAdjustment( eVertOri, eHoriOri, aItemSet, aPropInfo, aFrmSet ); + SetAnchorAndAdjustment( eVertOri, eHoriOri, aItemSet, aPropInfo, aFrameSet ); // Abstaende setzen - SetSpace( Size( nHSpace, nVSpace), aItemSet, aPropInfo, aFrmSet ); + SetSpace( Size( nHSpace, nVSpace), aItemSet, aPropInfo, aFrameSet ); // Sonstige CSS1-Attribute Setzen - SetFrameFormatAttrs( aItemSet, aPropInfo, HTML_FF_BOX, aFrmSet ); + SetFrameFormatAttrs( aItemSet, aPropInfo, HTML_FF_BOX, aFrameSet ); Size aTwipSz( bPrcWidth ? 0 : nWidth, bPrcHeight ? 0 : nHeight ); if( (aTwipSz.Width() || aTwipSz.Height()) && Application::GetDefaultDevice() ) @@ -590,7 +590,7 @@ IMAGE_SETEVENT: Size aGrfSz( 0, 0 ); bool bSetTwipSize = true; // Twip-Size am Node setzen? - bool bChangeFrmSize = false; // Frame-Format nachtraeglich anpassen? + bool bChangeFrameSize = false; // Frame-Format nachtraeglich anpassen? bool bRequestGrfNow = false; bool bSetScaleImageMap = false; sal_uInt8 nPrcWidth = 0, nPrcHeight = 0; @@ -608,7 +608,7 @@ IMAGE_SETEVENT: } // Die Groesse des Rahmens wird nachtraeglich gesetzt - bChangeFrmSize = true; + bChangeFrameSize = true; aGrfSz = aTwipSz; if( !nWidth && !nHeight ) { @@ -673,13 +673,13 @@ IMAGE_SETEVENT: SwFormatURL aURL; aURL.SetMap( pImgMap );//wird kopieiert bSetScaleImageMap = !nPrcWidth || !nPrcHeight; - aFrmSet.Put( aURL ); + aFrameSet.Put( aURL ); } else { ImageMap aEmptyImgMap( aName ); SwFormatURL aURL; aURL.SetMap( &aEmptyImgMap );//wird kopieiert - aFrmSet.Put( aURL ); + aFrameSet.Put( aURL ); m_nMissingImgMaps++; // es fehlen noch Image-Maps // die Grafik muss beim SetTwipSize skaliert werden, wenn @@ -717,14 +717,14 @@ IMAGE_SETEVENT: aTwipSz.Height() = MINFLY; } - SwFormatFrmSize aFrmSize( ATT_FIX_SIZE, aTwipSz.Width(), aTwipSz.Height() ); - aFrmSize.SetWidthPercent( nPrcWidth ); - aFrmSize.SetHeightPercent( nPrcHeight ); - aFrmSet.Put( aFrmSize ); + SwFormatFrameSize aFrameSize( ATT_FIX_SIZE, aTwipSz.Width(), aTwipSz.Height() ); + aFrameSize.SetWidthPercent( nPrcWidth ); + aFrameSize.SetHeightPercent( nPrcHeight ); + aFrameSet.Put( aFrameSize ); // passing empty sGrfNm here, means we don't want the graphic to be linked SwFrameFormat *pFlyFormat = m_pDoc->getIDocumentContentOperations().Insert( *m_pPam, sGrfNm, aEmptyOUStr, &aGraphic, - &aFrmSet, nullptr, nullptr ); + &aFrameSet, nullptr, nullptr ); SwGrfNode *pGrfNd = m_pDoc->GetNodes()[ pFlyFormat->GetContent().GetContentIdx() ->GetIndex()+1 ]->GetGrfNode(); @@ -748,7 +748,7 @@ IMAGE_SETEVENT: if( bSetTwipSize ) pGrfNd->SetTwipSize( aGrfSz ); - pGrfNd->SetChgTwipSize( bChangeFrmSize ); + pGrfNd->SetChgTwipSize( bChangeFrameSize ); if( bSetScaleImageMap ) pGrfNd->SetScaleImageMap( true ); @@ -817,7 +817,7 @@ IMAGE_SETEVENT: } // Ggf. Frames anlegen und Auto-gebundenen Rahmen registrieren - RegisterFlyFrm( pFlyFormat ); + RegisterFlyFrame( pFlyFormat ); if( !aId.isEmpty() ) InsertBookmark( aId ); diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx index e0caa1610ae3..1ecfa949a72a 100644 --- a/sw/source/filter/html/htmlplug.cxx +++ b/sw/source/filter/html/htmlplug.cxx @@ -196,10 +196,10 @@ void SwHTMLParser::SetFixSize( const Size& rPixSize, } // Size setzen - SwFormatFrmSize aFrmSize( ATT_FIX_SIZE, aTwipSz.Width(), aTwipSz.Height() ); - aFrmSize.SetWidthPercent( nPrcWidth ); - aFrmSize.SetHeightPercent( nPrcHeight ); - rFlyItemSet.Put( aFrmSize ); + SwFormatFrameSize aFrameSize( ATT_FIX_SIZE, aTwipSz.Width(), aTwipSz.Height() ); + aFrameSize.SetWidthPercent( nPrcWidth ); + aFrameSize.SetHeightPercent( nPrcHeight ); + rFlyItemSet.Put( aFrameSize ); } void SwHTMLParser::SetSpace( const Size& rPixSpace, @@ -386,7 +386,7 @@ void SwHTMLParser::InsertEmbed() ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo ); // Die Default-Werte umsetzen (ausser Hoehe/Breite, das macht schon - // SetFrmSize() fuer uns) + // SetFrameSize() fuer uns) if( eVertOri==text::VertOrientation::NONE && eHoriOri==text::HoriOrientation::NONE ) eVertOri = text::VertOrientation::TOP; if( USHRT_MAX==aSpace.Width() ) @@ -395,7 +395,7 @@ void SwHTMLParser::InsertEmbed() aSpace.Height() = 0; if( bHidden ) { - // Size (0,0) wird in SetFrmSize auf (MINFLY, MINFLY) umgebogen + // Size (0,0) wird in SetFrameSize auf (MINFLY, MINFLY) umgebogen aSize.Width() = 0; aSize.Height() = 0; aSpace.Width() = 0; aSpace.Height() = 0; bPrcWidth = bPrcHeight = false; @@ -437,35 +437,35 @@ void SwHTMLParser::InsertEmbed() } } - SfxItemSet aFrmSet( m_pDoc->GetAttrPool(), + SfxItemSet aFrameSet( m_pDoc->GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); if( !IsNewDoc() ) - Reader::ResetFrameFormatAttrs( aFrmSet ); + Reader::ResetFrameFormatAttrs( aFrameSet ); // den Anker setzen if( !bHidden ) { - SetAnchorAndAdjustment( eVertOri, eHoriOri, aItemSet, aPropInfo, aFrmSet ); + SetAnchorAndAdjustment( eVertOri, eHoriOri, aItemSet, aPropInfo, aFrameSet ); } else { SwFormatAnchor aAnchor( FLY_AT_PARA ); aAnchor.SetAnchor( m_pPam->GetPoint() ); - aFrmSet.Put( aAnchor ); - aFrmSet.Put( SwFormatHoriOrient( 0, text::HoriOrientation::LEFT, text::RelOrientation::FRAME) ); - aFrmSet.Put( SwFormatSurround( SURROUND_THROUGHT ) ); - aFrmSet.Put( SwFormatVertOrient( 0, text::VertOrientation::TOP, text::RelOrientation::PRINT_AREA ) ); + aFrameSet.Put( aAnchor ); + aFrameSet.Put( SwFormatHoriOrient( 0, text::HoriOrientation::LEFT, text::RelOrientation::FRAME) ); + aFrameSet.Put( SwFormatSurround( SURROUND_THROUGHT ) ); + aFrameSet.Put( SwFormatVertOrient( 0, text::VertOrientation::TOP, text::RelOrientation::PRINT_AREA ) ); } // und noch die Groesse des Rahmens Size aDfltSz( HTML_DFLT_EMBED_WIDTH, HTML_DFLT_EMBED_HEIGHT ); SetFixSize( aSize, aDfltSz, bPrcWidth, bPrcHeight, aItemSet, aPropInfo, - aFrmSet ); - SetSpace( aSpace, aItemSet, aPropInfo, aFrmSet ); + aFrameSet ); + SetSpace( aSpace, aItemSet, aPropInfo, aFrameSet ); // und in das Dok einfuegen SwFrameFormat* pFlyFormat = - m_pDoc->getIDocumentContentOperations().Insert( *m_pPam, ::svt::EmbeddedObjectRef( xObj, embed::Aspects::MSOLE_CONTENT ), &aFrmSet, nullptr, nullptr ); + m_pDoc->getIDocumentContentOperations().Insert( *m_pPam, ::svt::EmbeddedObjectRef( xObj, embed::Aspects::MSOLE_CONTENT ), &aFrameSet, nullptr, nullptr ); // Namen am FrameFormat setzen if( !aName.isEmpty() ) @@ -480,10 +480,10 @@ void SwHTMLParser::InsertEmbed() // Ggf Frames anlegen und auto-geb. Rahmen registrieren if( !bHidden ) { - // HIDDEN-Plugins sollen absatzgebunden bleiben. Da RegisterFlyFrm + // HIDDEN-Plugins sollen absatzgebunden bleiben. Da RegisterFlyFrame // absatzgebundene Rahmen mit DUrchlauf in am Zeichen gebundene // Rahmen umwandelt, muessen die Frames hier von Hand angelegt werden. - RegisterFlyFrm( pFlyFormat ); + RegisterFlyFrame( pFlyFormat ); } } @@ -611,18 +611,18 @@ void SwHTMLParser::NewObject() if( HasStyleOptions( aStyle, aId, aClass ) ) ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo ); - SfxItemSet& rFrmSet = m_pAppletImpl->GetItemSet(); + SfxItemSet& rFrameSet = m_pAppletImpl->GetItemSet(); if( !IsNewDoc() ) - Reader::ResetFrameFormatAttrs( rFrmSet ); + Reader::ResetFrameFormatAttrs( rFrameSet ); // den Anker und die Ausrichtung setzen - SetAnchorAndAdjustment( eVertOri, eHoriOri, aItemSet, aPropInfo, rFrmSet ); + SetAnchorAndAdjustment( eVertOri, eHoriOri, aItemSet, aPropInfo, rFrameSet ); // und noch die Groesse des Rahmens Size aDfltSz( HTML_DFLT_APPLET_WIDTH, HTML_DFLT_APPLET_HEIGHT ); SetFixSize( aSize, aDfltSz, bPrcWidth, bPrcHeight, aItemSet, aPropInfo, - rFrmSet ); - SetSpace( aSpace, aItemSet, aPropInfo, rFrmSet ); + rFrameSet ); + SetSpace( aSpace, aItemSet, aPropInfo, rFrameSet ); } #endif @@ -650,7 +650,7 @@ void SwHTMLParser::EndObject() pNoTextNd->SetTitle( m_pAppletImpl->GetAltText() ); // Ggf Frames anlegen und auto-geb. Rahmen registrieren - RegisterFlyFrm( pFlyFormat ); + RegisterFlyFrame( pFlyFormat ); delete m_pAppletImpl; m_pAppletImpl = nullptr; @@ -746,18 +746,18 @@ void SwHTMLParser::InsertApplet() if( HasStyleOptions( aStyle, aId, aClass ) ) ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo ); - SfxItemSet& rFrmSet = m_pAppletImpl->GetItemSet(); + SfxItemSet& rFrameSet = m_pAppletImpl->GetItemSet(); if( !IsNewDoc() ) - Reader::ResetFrameFormatAttrs( rFrmSet ); + Reader::ResetFrameFormatAttrs( rFrameSet ); // den Anker und die Ausrichtung setzen - SetAnchorAndAdjustment( eVertOri, eHoriOri, aItemSet, aPropInfo, rFrmSet ); + SetAnchorAndAdjustment( eVertOri, eHoriOri, aItemSet, aPropInfo, rFrameSet ); // und noch die Groesse des Rahmens Size aDfltSz( HTML_DFLT_APPLET_WIDTH, HTML_DFLT_APPLET_HEIGHT ); SetFixSize( aSize, aDfltSz, bPrcWidth, bPrcHeight, aItemSet, aPropInfo, - rFrmSet ); - SetSpace( aSpace, aItemSet, aPropInfo, rFrmSet ); + rFrameSet ); + SetSpace( aSpace, aItemSet, aPropInfo, rFrameSet ); } #endif @@ -784,7 +784,7 @@ void SwHTMLParser::EndApplet() pNoTextNd->SetTitle( m_pAppletImpl->GetAltText() ); // Ggf Frames anlegen und auto-geb. Rahmen registrieren - RegisterFlyFrm( pFlyFormat ); + RegisterFlyFrame( pFlyFormat ); delete m_pAppletImpl; m_pAppletImpl = nullptr; @@ -929,23 +929,23 @@ void SwHTMLParser::InsertFloatingFrame() ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo ); // den Itemset holen - SfxItemSet aFrmSet( m_pDoc->GetAttrPool(), + SfxItemSet aFrameSet( m_pDoc->GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); if( !IsNewDoc() ) - Reader::ResetFrameFormatAttrs( aFrmSet ); + Reader::ResetFrameFormatAttrs( aFrameSet ); // den Anker und die Ausrichtung setzen - SetAnchorAndAdjustment( eVertOri, eHoriOri, aItemSet, aPropInfo, aFrmSet ); + SetAnchorAndAdjustment( eVertOri, eHoriOri, aItemSet, aPropInfo, aFrameSet ); // und noch die Groesse des Rahmens Size aDfltSz( HTML_DFLT_APPLET_WIDTH, HTML_DFLT_APPLET_HEIGHT ); SetFixSize( aSize, aDfltSz, bPrcWidth, bPrcHeight, aItemSet, aPropInfo, - aFrmSet ); - SetSpace( aSpace, aItemSet, aPropInfo, aFrmSet ); + aFrameSet ); + SetSpace( aSpace, aItemSet, aPropInfo, aFrameSet ); // und in das Dok einfuegen SwFrameFormat* pFlyFormat = - m_pDoc->getIDocumentContentOperations().Insert( *m_pPam, ::svt::EmbeddedObjectRef( xObj, embed::Aspects::MSOLE_CONTENT ), &aFrmSet, nullptr, nullptr ); + m_pDoc->getIDocumentContentOperations().Insert( *m_pPam, ::svt::EmbeddedObjectRef( xObj, embed::Aspects::MSOLE_CONTENT ), &aFrameSet, nullptr, nullptr ); // den alternativen Namen setzen SwNoTextNode *pNoTextNd = @@ -954,16 +954,16 @@ void SwHTMLParser::InsertFloatingFrame() pNoTextNd->SetTitle( aAlt ); // Ggf Frames anlegen und auto-geb. Rahmen registrieren - RegisterFlyFrm( pFlyFormat ); + RegisterFlyFrame( pFlyFormat ); m_bInFloatingFrame = true; } -sal_uInt16 SwHTMLWriter::GuessOLENodeFrmType( const SwNode& rNode ) +sal_uInt16 SwHTMLWriter::GuessOLENodeFrameType( const SwNode& rNode ) { SwOLEObj& rObj = const_cast<SwOLENode*>(rNode.GetOLENode())->GetOLEObj(); - SwHTMLFrmType eType = HTML_FRMTYPE_OLE; + SwHTMLFrameType eType = HTML_FRMTYPE_OLE; uno::Reference < embed::XClassifiedObject > xClass ( rObj.GetOleRef(), uno::UNO_QUERY ); SvGlobalName aClass( xClass->getClassID() ); @@ -1013,7 +1013,7 @@ Writer& OutHTML_FrameFormatOLENode( Writer& rWrt, const SwFrameFormat& rFrameFor return rWrt; } - sal_uLong nFrmOpts; + sal_uLong nFrameOpts; // wenn meoglich vor dem "Objekt" einen Zeilen-Umbruch ausgeben if( rHTMLWrt.m_bLFPossible ) @@ -1065,12 +1065,12 @@ Writer& OutHTML_FrameFormatOLENode( Writer& rWrt, const SwFrameFormat& rFrameFor { // Das Plugin ist HIDDEN sOut.append(' ').append(OOO_STRING_SW_HTML_O_Hidden); - nFrmOpts = HTML_FRMOPTS_HIDDEN_EMBED; + nFrameOpts = HTML_FRMOPTS_HIDDEN_EMBED; bHiddenEmbed = true; } else { - nFrmOpts = bInCntnr ? HTML_FRMOPTS_EMBED_CNTNR + nFrameOpts = bInCntnr ? HTML_FRMOPTS_EMBED_CNTNR : HTML_FRMOPTS_EMBED; } } @@ -1125,7 +1125,7 @@ Writer& OutHTML_FrameFormatOLENode( Writer& rWrt, const SwFrameFormat& rFrameFor if( bScript ) sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_mayscript); - nFrmOpts = bInCntnr ? HTML_FRMOPTS_APPLET_CNTNR + nFrameOpts = bInCntnr ? HTML_FRMOPTS_APPLET_CNTNR : HTML_FRMOPTS_APPLET; } else @@ -1140,7 +1140,7 @@ Writer& OutHTML_FrameFormatOLENode( Writer& rWrt, const SwFrameFormat& rFrameFor rHTMLWrt.m_eDestEnc, &rHTMLWrt.m_aNonConvertableCharacters ); - nFrmOpts = bInCntnr ? HTML_FRMOPTS_IFRAME_CNTNR + nFrameOpts = bInCntnr ? HTML_FRMOPTS_IFRAME_CNTNR : HTML_FRMOPTS_IFRAME; } @@ -1148,10 +1148,10 @@ Writer& OutHTML_FrameFormatOLENode( Writer& rWrt, const SwFrameFormat& rFrameFor // ALT, WIDTH, HEIGHT, HSPACE, VSPACE, ALIGN if( rHTMLWrt.IsHTMLMode( HTMLMODE_ABS_POS_FLY ) && !bHiddenEmbed ) - nFrmOpts |= HTML_FRMOPTS_OLE_CSS1; - OString aEndTags = rHTMLWrt.OutFrameFormatOptions( rFrameFormat, pOLENd->GetTitle(), nFrmOpts ); + nFrameOpts |= HTML_FRMOPTS_OLE_CSS1; + OString aEndTags = rHTMLWrt.OutFrameFormatOptions( rFrameFormat, pOLENd->GetTitle(), nFrameOpts ); if( rHTMLWrt.IsHTMLMode( HTMLMODE_ABS_POS_FLY ) && !bHiddenEmbed ) - rHTMLWrt.OutCSS1_FrameFormatOptions( rFrameFormat, nFrmOpts ); + rHTMLWrt.OutCSS1_FrameFormatOptions( rFrameFormat, nFrameOpts ); if( aGlobName == SvGlobalName( SO3_APPLET_CLASSID ) ) { diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx index b40c3ce4bc50..1907c71adf7c 100644 --- a/sw/source/filter/html/htmlsect.cxx +++ b/sw/source/filter/html/htmlsect.cxx @@ -313,26 +313,26 @@ void SwHTMLParser::NewDivision( int nToken ) aSection.SetProtectFlag(true); } - SfxItemSet aFrmItemSet( m_pDoc->GetAttrPool(), + SfxItemSet aFrameItemSet( m_pDoc->GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); if( !IsNewDoc() ) - Reader::ResetFrameFormatAttrs(aFrmItemSet ); + Reader::ResetFrameFormatAttrs(aFrameItemSet ); const SfxPoolItem *pItem; if( SfxItemState::SET == aItemSet.GetItemState( RES_BACKGROUND, false, &pItem ) ) { - aFrmItemSet.Put( *pItem ); + aFrameItemSet.Put( *pItem ); aItemSet.ClearItem( RES_BACKGROUND ); } if( SfxItemState::SET == aItemSet.GetItemState( RES_FRAMEDIR, false, &pItem ) ) { - aFrmItemSet.Put( *pItem ); + aFrameItemSet.Put( *pItem ); aItemSet.ClearItem( RES_FRAMEDIR ); } - m_pDoc->InsertSwSection( *m_pPam, aSection, nullptr, &aFrmItemSet, false ); + m_pDoc->InsertSwSection( *m_pPam, aSection, nullptr, &aFrameItemSet, false ); // ggfs. einen Bereich anspringen if( JUMPTO_REGION == m_eJumpTo && aName == m_sJmpMark ) @@ -591,7 +591,7 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss ) bool bInCntnr = false; auto i = m_aContexts.size(); while( !bInCntnr && i > m_nContextStMin ) - bInCntnr = nullptr != m_aContexts[--i]->GetFrmItemSet(); + bInCntnr = nullptr != m_aContexts[--i]->GetFrameItemSet(); // Parse style sheets, but don't position anything by now. bool bStyleParsed = false; @@ -618,26 +618,26 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss ) bool bPositioned = false; if( bInCntnr || SwCSS1Parser::MayBePositioned( aPropInfo, true ) ) { - SfxItemSet aFrmItemSet( m_pDoc->GetAttrPool(), + SfxItemSet aFrameItemSet( m_pDoc->GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); if( !IsNewDoc() ) - Reader::ResetFrameFormatAttrs(aFrmItemSet ); + Reader::ResetFrameFormatAttrs(aFrameItemSet ); SetAnchorAndAdjustment( text::VertOrientation::NONE, text::HoriOrientation::NONE, aItemSet, aPropInfo, - aFrmItemSet ); + aFrameItemSet ); // The width is either the WIDTH attribute's value or contained // in some style option. - SetVarSize( aItemSet, aPropInfo, aFrmItemSet, nTwipWidth, nPrcWidth ); + SetVarSize( aItemSet, aPropInfo, aFrameItemSet, nTwipWidth, nPrcWidth ); - SetSpace( Size(0,0), aItemSet, aPropInfo, aFrmItemSet ); + SetSpace( Size(0,0), aItemSet, aPropInfo, aFrameItemSet ); // Set some other frame attributes. If the background is set, its // it will be cleared here. That for, it won't be set at the section, // too. SetFrameFormatAttrs( aItemSet, aPropInfo, HTML_FF_BOX|HTML_FF_BACKGROUND|HTML_FF_PADDING|HTML_FF_DIRECTION, - aFrmItemSet ); + aFrameItemSet ); // Insert fly frame. If the are columns, the fly frame's name is not // the sections name but a generated one. @@ -648,7 +648,7 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss ) aPropInfo.aId.clear(); } - InsertFlyFrame( aFrmItemSet, pCntxt, aFlyName, CONTEXT_FLAGS_ABSPOS ); + InsertFlyFrame( aFrameItemSet, pCntxt, aFlyName, CONTEXT_FLAGS_ABSPOS ); pCntxt->SetPopStack( true ); bPositioned = true; @@ -690,10 +690,10 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss ) OUString aName( m_pDoc->GetUniqueSectionName( !aId.isEmpty() ? &aId : nullptr ) ); SwSectionData aSection( CONTENT_SECTION, aName ); - SfxItemSet aFrmItemSet( m_pDoc->GetAttrPool(), + SfxItemSet aFrameItemSet( m_pDoc->GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); if( !IsNewDoc() ) - Reader::ResetFrameFormatAttrs(aFrmItemSet ); + Reader::ResetFrameFormatAttrs(aFrameItemSet ); if( nGutter && Application::GetDefaultDevice() ) { @@ -706,22 +706,22 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss ) nPrcWidth = 100; aFormatCol.Init( nCols, nGutter, USHRT_MAX ); - aFrmItemSet.Put( aFormatCol ); + aFrameItemSet.Put( aFormatCol ); const SfxPoolItem *pItem; if( SfxItemState::SET == aItemSet.GetItemState( RES_BACKGROUND, false, &pItem ) ) { - aFrmItemSet.Put( *pItem ); + aFrameItemSet.Put( *pItem ); aItemSet.ClearItem( RES_BACKGROUND ); } if( SfxItemState::SET == aItemSet.GetItemState( RES_FRAMEDIR, false, &pItem ) ) { - aFrmItemSet.Put( *pItem ); + aFrameItemSet.Put( *pItem ); aItemSet.ClearItem( RES_FRAMEDIR ); } - m_pDoc->InsertSwSection( *m_pPam, aSection, nullptr, &aFrmItemSet, false ); + m_pDoc->InsertSwSection( *m_pPam, aSection, nullptr, &aFrameItemSet, false ); // Jump to section, if this is requested. if( JUMPTO_REGION == m_eJumpTo && aName == m_sJmpMark ) @@ -778,7 +778,7 @@ void SwHTMLParser::InsertFlyFrame( const SfxItemSet& rItemSet, if( !rName.isEmpty() ) pFlyFormat->SetName( rName ); - RegisterFlyFrm( pFlyFormat ); + RegisterFlyFrame( pFlyFormat ); const SwFormatContent& rFlyContent = pFlyFormat->GetContent(); const SwNodeIndex& rFlyCntIdx = *rFlyContent.GetContentIdx(); diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx index 5e1fc096469f..0559b5f81a40 100644 --- a/sw/source/filter/html/htmltab.cxx +++ b/sw/source/filter/html/htmltab.cxx @@ -1400,10 +1400,10 @@ void HTMLTable::FixFrameFormat( SwTableBox *pBox, pFrameFormat = pBox->ClaimFrameFormat(); // die Breite der Box berechnen - SwTwips nFrmWidth = (SwTwips)pLayoutInfo->GetColumn(nCol) + SwTwips nFrameWidth = (SwTwips)pLayoutInfo->GetColumn(nCol) ->GetRelColWidth(); for( sal_uInt16 i=1; i<nColSpan; i++ ) - nFrmWidth += (SwTwips)pLayoutInfo->GetColumn(nCol+i) + nFrameWidth += (SwTwips)pLayoutInfo->GetColumn(nCol+i) ->GetRelColWidth(); // die Umrandung nur an Edit-Boxen setzen (bei der oberen und unteren @@ -1414,7 +1414,7 @@ void HTMLTable::FixFrameFormat( SwTableBox *pBox, bool bSet = (nCellPadding > 0); SvxBoxItem aBoxItem( RES_BOX ); - long nInnerFrmWidth = nFrmWidth; + long nInnerFrameWidth = nFrameWidth; if( bTopLine ) { @@ -1453,13 +1453,13 @@ void HTMLTable::FixFrameFormat( SwTableBox *pBox, const SvxBorderLine& rBorderLine = 0==nCol ? aLeftBorderLine : aBorderLine; aBoxItem.SetLine( &rBorderLine, SvxBoxItemLine::LEFT ); - nInnerFrmWidth -= GetBorderWidth( rBorderLine ); + nInnerFrameWidth -= GetBorderWidth( rBorderLine ); bSet = true; } if( nCol+nColSpan == nCols && bRightBorder ) { aBoxItem.SetLine( &aRightBorderLine, SvxBoxItemLine::RIGHT ); - nInnerFrmWidth -= GetBorderWidth( aRightBorderLine ); + nInnerFrameWidth -= GetBorderWidth( aRightBorderLine ); bSet = true; } @@ -1471,8 +1471,8 @@ void HTMLTable::FixFrameFormat( SwTableBox *pBox, { // BorderDist nicht mehr Bestandteil einer Zelle mit fixer Breite sal_uInt16 nBDist = static_cast< sal_uInt16 >( - (2*nCellPadding <= nInnerFrmWidth) ? nCellPadding - : (nInnerFrmWidth / 2) ); + (2*nCellPadding <= nInnerFrameWidth) ? nCellPadding + : (nInnerFrameWidth / 2) ); // wir setzen das Item nur, wenn es eine Umrandung gibt // oder eine sheet::Border-Distanz vorgegeben ist. Fehlt letztere, // dann gibt es eine Umrandung, und wir muessen die Distanz @@ -1670,7 +1670,7 @@ SwTableLine *HTMLTable::MakeTableLine( SwTableBox *pUpper, nRowHeight += GetTopCellSpace( nTopRow, 1, false ) + GetBottomCellSpace( nTopRow, 1, false ); - pFrameFormat->SetFormatAttr( SwFormatFrmSize( ATT_MIN_SIZE, 0, nRowHeight ) ); + pFrameFormat->SetFormatAttr( SwFormatFrameSize( ATT_MIN_SIZE, 0, nRowHeight ) ); } if( pBGBrushItem ) @@ -2525,9 +2525,9 @@ void HTMLTable::MakeTable( SwTableBox *pBox, sal_uInt16 nAbsAvail, if( bPrcWidth && text::HoriOrientation::FULL!=eHoriOri ) { pFrameFormat->LockModify(); - SwFormatFrmSize aFrmSize( pFrameFormat->GetFrmSize() ); - aFrmSize.SetWidthPercent( (sal_uInt8)nWidth ); - pFrameFormat->SetFormatAttr( aFrmSize ); + SwFormatFrameSize aFrameSize( pFrameFormat->GetFrameSize() ); + aFrameSize.SetWidthPercent( (sal_uInt8)nWidth ); + pFrameFormat->SetFormatAttr( aFrameSize ); pFrameFormat->UnlockModify(); } } @@ -2638,7 +2638,7 @@ void HTMLTable::MakeTable( SwTableBox *pBox, sal_uInt16 nAbsAvail, (pSwTable->GetTabLines())[0]->ClaimFrameFormat(); (pSwTable->GetTabLines())[0]->GetFrameFormat() - ->SetFormatAttr( SwFormatFrmSize( ATT_MIN_SIZE, 0, nHeight ) ); + ->SetFormatAttr( SwFormatFrameSize( ATT_MIN_SIZE, 0, nHeight ) ); } if( GetBGBrush() ) @@ -2662,9 +2662,9 @@ void HTMLTable::MakeTable( SwTableBox *pBox, sal_uInt16 nAbsAvail, sal_uInt32 nMin = pLayoutInfo->GetMin(); if( nMin > USHRT_MAX ) nMin = USHRT_MAX; - SwFormatFrmSize aFlyFrmSize( ATT_VAR_SIZE, (SwTwips)nMin, MINLAY ); - aFlyFrmSize.SetWidthPercent( 100 ); - pContext->GetFrameFormat()->SetFormatAttr( aFlyFrmSize ); + SwFormatFrameSize aFlyFrameSize( ATT_VAR_SIZE, (SwTwips)nMin, MINLAY ); + aFlyFrameSize.SetWidthPercent( 100 ); + pContext->GetFrameFormat()->SetFormatAttr( aFlyFrameSize ); bIsInFlyFrame = false; } else @@ -2679,8 +2679,8 @@ void HTMLTable::MakeTable( SwTableBox *pBox, sal_uInt16 nAbsAvail, sal_uInt32 nMax = pLayoutInfo->GetMax(); if( nMax > USHRT_MAX ) nMax = USHRT_MAX; - SwFormatFrmSize aFlyFrmSize( ATT_VAR_SIZE, (SwTwips)nMax, MINLAY ); - pContext->GetFrameFormat()->SetFormatAttr( aFlyFrmSize ); + SwFormatFrameSize aFlyFrameSize( ATT_VAR_SIZE, (SwTwips)nMax, MINLAY ); + pContext->GetFrameFormat()->SetFormatAttr( aFlyFrameSize ); bIsInFlyFrame = false; } else @@ -3673,10 +3673,10 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions, { // Die Tabelle soll in einen Rahmen geschaufelt werden. - SfxItemSet aFrmSet( m_pDoc->GetAttrPool(), + SfxItemSet aFrameSet( m_pDoc->GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); if( !pCurTable->IsNewDoc() ) - Reader::ResetFrameFormatAttrs( aFrmSet ); + Reader::ResetFrameFormatAttrs( aFrameSet ); SwSurround eSurround = SURROUND_NONE; sal_Int16 eHori; @@ -3697,26 +3697,26 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions, eHori = text::HoriOrientation::LEFT; break; } - SetAnchorAndAdjustment( text::VertOrientation::NONE, eHori, aFrmSet, + SetAnchorAndAdjustment( text::VertOrientation::NONE, eHori, aFrameSet, true ); - aFrmSet.Put( SwFormatSurround(eSurround) ); + aFrameSet.Put( SwFormatSurround(eSurround) ); - SwFormatFrmSize aFrmSize( ATT_VAR_SIZE, 20*MM50, MINLAY ); - aFrmSize.SetWidthPercent( 100 ); - aFrmSet.Put( aFrmSize ); + SwFormatFrameSize aFrameSize( ATT_VAR_SIZE, 20*MM50, MINLAY ); + aFrameSize.SetWidthPercent( 100 ); + aFrameSet.Put( aFrameSize ); sal_uInt16 nSpace = pCurTable->GetHSpace(); if( nSpace ) - aFrmSet.Put( SvxLRSpaceItem(nSpace,nSpace, 0, 0, RES_LR_SPACE) ); + aFrameSet.Put( SvxLRSpaceItem(nSpace,nSpace, 0, 0, RES_LR_SPACE) ); nSpace = pCurTable->GetVSpace(); if( nSpace ) - aFrmSet.Put( SvxULSpaceItem(nSpace,nSpace, RES_UL_SPACE) ); + aFrameSet.Put( SvxULSpaceItem(nSpace,nSpace, RES_UL_SPACE) ); - RndStdIds eAnchorId = static_cast<const SwFormatAnchor&>(aFrmSet. + RndStdIds eAnchorId = static_cast<const SwFormatAnchor&>(aFrameSet. Get( RES_ANCHOR )). GetAnchorId(); SwFrameFormat *pFrameFormat = m_pDoc->MakeFlySection( - eAnchorId, m_pPam->GetPoint(), &aFrmSet ); + eAnchorId, m_pPam->GetPoint(), &aFrameSet ); pTCntxt->SetFrameFormat( pFrameFormat ); const SwFormatContent& rFlyContent = pFrameFormat->GetContent(); @@ -5006,17 +5006,17 @@ void _TableSaveStruct::MakeTable( sal_uInt16 nWidth, SwPosition& rPos, SwDoc *pD if( pTCntxt->GetFrameFormat() ) { - pTCntxt->GetFrameFormat()->DelFrms(); - pTableNd->DelFrms(); - pTCntxt->GetFrameFormat()->MakeFrms(); + pTCntxt->GetFrameFormat()->DelFrames(); + pTableNd->DelFrames(); + pTCntxt->GetFrameFormat()->MakeFrames(); } else { - pTableNd->DelFrms(); + pTableNd->DelFrames(); SwNodeIndex aIdx( *pTableNd->EndOfSectionNode(), 1 ); OSL_ENSURE( aIdx.GetIndex() <= pTCntxt->GetPos()->nNode.GetIndex(), "unerwarteter Node fuer das Tabellen-Layout" ); - pTableNd->MakeFrms( &aIdx ); + pTableNd->MakeFrames( &aIdx ); } } diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx index 3b3c8a457ce6..1773f8d6b42a 100644 --- a/sw/source/filter/html/htmltabw.cxx +++ b/sw/source/filter/html/htmltabw.cxx @@ -902,9 +902,9 @@ Writer& OutHTML_SwTableNode( Writer& rWrt, SwTableNode & rNode, if( pFlyFrameFormat ) { eSurround = pFlyFrameFormat->GetSurround().GetSurround(); - const SwFormatFrmSize& rFrmSize = pFlyFrameFormat->GetFrmSize(); - nFlyPrcWidth = rFrmSize.GetWidthPercent(); - nFlyWidth = rFrmSize.GetSize().Width(); + const SwFormatFrameSize& rFrameSize = pFlyFrameFormat->GetFrameSize(); + nFlyPrcWidth = rFrameSize.GetWidthPercent(); + nFlyWidth = rFrameSize.GetSize().Width(); eFlyHoriOri = pFlyFrameFormat->GetHoriOrient().GetHoriOrient(); if( text::HoriOrientation::NONE == eFlyHoriOri ) @@ -928,9 +928,9 @@ Writer& OutHTML_SwTableNode( Writer& rWrt, SwTableNode & rNode, SwFrameFormat *pFormat = rTable.GetFrameFormat(); - const SwFormatFrmSize& rFrmSize = pFormat->GetFrmSize(); - long nWidth = rFrmSize.GetSize().Width(); - sal_uInt8 nPrcWidth = rFrmSize.GetWidthPercent(); + const SwFormatFrameSize& rFrameSize = pFormat->GetFrameSize(); + long nWidth = rFrameSize.GetSize().Width(); + sal_uInt8 nPrcWidth = rFrameSize.GetWidthPercent(); sal_uInt16 nBaseWidth = (sal_uInt16)nWidth; sal_Int16 eTabHoriOri = pFormat->GetHoriOrient().GetHoriOrient(); diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 54cfe6767ba8..42c4ff1befd9 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -233,7 +233,7 @@ sal_uLong HTMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPam, return nRet; } -SwHTMLParser::SwHTMLParser( SwDoc* pD, SwPaM& rCrsr, SvStream& rIn, +SwHTMLParser::SwHTMLParser( SwDoc* pD, SwPaM& rCursor, SvStream& rIn, const OUString& rPath, const OUString& rBaseURL, bool bReadNewDoc, @@ -300,13 +300,13 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, SwPaM& rCrsr, SvStream& rIn, { m_nEventId = nullptr; m_bUpperSpace = m_bViewCreated = m_bChkJumpMark = - m_bSetCrsr = false; + m_bSetCursor = false; m_eScriptLang = HTML_SL_UNKNOWN; m_bAnyStarBasic = true; - rCrsr.DeleteMark(); - m_pPam = &rCrsr; // re-use existing cursor: avoids spurious ~SwIndexReg assert + rCursor.DeleteMark(); + m_pPam = &rCursor; // re-use existing cursor: avoids spurious ~SwIndexReg assert memset( &m_aAttrTab, 0, sizeof( _HTMLAttrTable )); // Die Font-Groessen 1-7 aus der INI-Datei lesen @@ -761,16 +761,16 @@ if( m_pSttNdIdx->GetIndex()+1 == m_pPam->GetBound( false ).nNode.GetIndex() ) pCNd->EndOfSectionIndex() && !bHasFlysOrMarks ) { SwViewShell *pVSh = CheckActionViewShell(); - SwCrsrShell *pCrsrSh = pVSh && dynamic_cast< const SwCrsrShell *>( pVSh ) != nullptr - ? static_cast < SwCrsrShell * >( pVSh ) + SwCursorShell *pCursorSh = pVSh && dynamic_cast< const SwCursorShell *>( pVSh ) != nullptr + ? static_cast < SwCursorShell * >( pVSh ) : nullptr; - if( pCrsrSh && - pCrsrSh->GetCrsr()->GetPoint() + if( pCursorSh && + pCursorSh->GetCursor()->GetPoint() ->nNode.GetIndex() == nNodeIdx ) { - pCrsrSh->MovePara(fnParaPrev, fnParaEnd ); - pCrsrSh->SetMark(); - pCrsrSh->ClearMark(); + pCursorSh->MovePara(fnParaPrev, fnParaEnd ); + pCursorSh->SetMark(); + pCursorSh->ClearMark(); } m_pPam->GetBound().nContent.Assign( nullptr, 0 ); m_pPam->GetBound(false).nContent.Assign( nullptr, 0 ); @@ -2579,16 +2579,16 @@ SwViewShell *SwHTMLParser::CallEndAction( bool bChkAction, bool bChkPtr ) if( !m_pActionViewShell || (bChkAction && !m_pActionViewShell->ActionPend()) ) return m_pActionViewShell; - if( m_bSetCrsr ) + if( m_bSetCursor ) { - // set the cursor to the doc begin in all CrsrEditShells + // set the cursor to the doc begin in all CursorEditShells for(SwViewShell& rSh : m_pActionViewShell->GetRingContainer()) { - if( dynamic_cast<const SwCrsrShell *>(&rSh) != nullptr ) - static_cast<SwCrsrShell*>(&rSh)->SttEndDoc(true); + if( dynamic_cast<const SwCursorShell *>(&rSh) != nullptr ) + static_cast<SwCursorShell*>(&rSh)->SttEndDoc(true); } - m_bSetCrsr = false; + m_bSetCursor = false; } if( dynamic_cast< const SwEditShell *>( m_pActionViewShell ) != nullptr ) { @@ -2891,9 +2891,9 @@ void SwHTMLParser::_SetAttr( bool bChkEnd, bool bBeforeTable, } } - for( auto n = m_aMoveFlyFrms.size(); n; ) + for( auto n = m_aMoveFlyFrames.size(); n; ) { - SwFrameFormat *pFrameFormat = m_aMoveFlyFrms[ --n ]; + SwFrameFormat *pFrameFormat = m_aMoveFlyFrames[ --n ]; const SwFormatAnchor& rAnchor = pFrameFormat->GetAnchor(); OSL_ENSURE( FLY_AT_PARA == rAnchor.GetAnchorId(), @@ -2916,7 +2916,7 @@ void SwHTMLParser::_SetAttr( bool bChkEnd, bool bBeforeTable, } if( bMoveFly ) { - pFrameFormat->DelFrms(); + pFrameFormat->DelFrames(); *pAttrPam->GetPoint() = *pFlyPos; pAttrPam->GetPoint()->nContent.Assign( pAttrPam->GetContentNode(), m_aMoveFlyCnts[n] ); @@ -2940,8 +2940,8 @@ void SwHTMLParser::_SetAttr( bool bChkEnd, bool bBeforeTable, pFrameFormat->SetFormatAttr( aVertOri ); } - pFrameFormat->MakeFrms(); - m_aMoveFlyFrms.erase( m_aMoveFlyFrms.begin() + n ); + pFrameFormat->MakeFrames(); + m_aMoveFlyFrames.erase( m_aMoveFlyFrames.begin() + n ); m_aMoveFlyCnts.erase( m_aMoveFlyCnts.begin() + n ); } } @@ -4875,13 +4875,13 @@ void SwHTMLParser::InsertSpacer() // einen leeren Textrahmen anlegen // den Itemset holen - SfxItemSet aFrmSet( m_pDoc->GetAttrPool(), + SfxItemSet aFrameSet( m_pDoc->GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); if( !IsNewDoc() ) - Reader::ResetFrameFormatAttrs( aFrmSet ); + Reader::ResetFrameFormatAttrs( aFrameSet ); // den Anker und die Ausrichtung setzen - SetAnchorAndAdjustment( eVertOri, eHoriOri, aFrmSet ); + SetAnchorAndAdjustment( eVertOri, eHoriOri, aFrameSet ); // und noch die Groesse des Rahmens Size aDfltSz( MINFLY, MINFLY ); @@ -4891,21 +4891,21 @@ void SwHTMLParser::InsertSpacer() SvxCSS1PropertyInfo aDummyPropInfo; SetFixSize( aSize, aDfltSz, bPrcWidth, bPrcHeight, - aDummyItemSet, aDummyPropInfo, aFrmSet ); - SetSpace( aSpace, aDummyItemSet, aDummyPropInfo, aFrmSet ); + aDummyItemSet, aDummyPropInfo, aFrameSet ); + SetSpace( aSpace, aDummyItemSet, aDummyPropInfo, aFrameSet ); // den Inhalt schuetzen SvxProtectItem aProtectItem( RES_PROTECT) ; aProtectItem.SetContentProtect( true ); - aFrmSet.Put( aProtectItem ); + aFrameSet.Put( aProtectItem ); // der Rahmen anlegen RndStdIds eAnchorId = - static_cast<const SwFormatAnchor &>(aFrmSet.Get(RES_ANCHOR)).GetAnchorId(); + static_cast<const SwFormatAnchor &>(aFrameSet.Get(RES_ANCHOR)).GetAnchorId(); SwFrameFormat *pFlyFormat = m_pDoc->MakeFlySection( eAnchorId, - m_pPam->GetPoint(), &aFrmSet ); + m_pPam->GetPoint(), &aFrameSet ); // Ggf Frames anlegen und auto-geb. Rahmen registrieren - RegisterFlyFrm( pFlyFormat ); + RegisterFlyFrame( pFlyFormat ); } break; case HTML_SPTYPE_VERT: @@ -5015,7 +5015,7 @@ SwTwips SwHTMLParser::GetCurrentBrowseWidth() { const SwFrameFormat& rPgFormat = m_pCSS1Parser->GetMasterPageDesc()->GetMaster(); - const SwFormatFrmSize& rSz = rPgFormat.GetFrmSize(); + const SwFormatFrameSize& rSz = rPgFormat.GetFrameSize(); const SvxLRSpaceItem& rLR = rPgFormat.GetLRSpace(); const SvxULSpaceItem& rUL = rPgFormat.GetULSpace(); const SwFormatCol& rCol = rPgFormat.GetCol(); diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx index da2a33aa64e1..376e68b61ed7 100644 --- a/sw/source/filter/html/swhtml.hxx +++ b/sw/source/filter/html/swhtml.hxx @@ -202,7 +202,7 @@ class _HTMLAttrContext OUString aClass; // die Klasse des Kontexts _HTMLAttrContext_SaveDoc *pSaveDocContext; - SfxItemSet *pFrmItemSet; + SfxItemSet *pFrameItemSet; sal_uInt16 nToken; // das Token, zu dem der Kontext gehoehrt @@ -234,7 +234,7 @@ public: bool bDfltColl=false ) : aClass( rClass ), pSaveDocContext( nullptr ), - pFrmItemSet( nullptr ), + pFrameItemSet( nullptr ), nToken( nTokn ), nTextFormatColl( nPoolId ), nLeftMargin( 0 ), @@ -256,7 +256,7 @@ public: explicit _HTMLAttrContext( sal_uInt16 nTokn ) : pSaveDocContext( nullptr ), - pFrmItemSet( nullptr ), + pFrameItemSet( nullptr ), nToken( nTokn ), nTextFormatColl( 0 ), nLeftMargin( 0 ), @@ -276,7 +276,7 @@ public: bRestartListing( false ) {} - ~_HTMLAttrContext() { ClearSaveDocContext(); delete pFrmItemSet; } + ~_HTMLAttrContext() { ClearSaveDocContext(); delete pFrameItemSet; } sal_uInt16 GetToken() const { return nToken; } @@ -308,8 +308,8 @@ public: bool HasSaveDocContext() const { return pSaveDocContext!=nullptr; } _HTMLAttrContext_SaveDoc *GetSaveDocContext( bool bCreate=false ); - const SfxItemSet *GetFrmItemSet() const { return pFrmItemSet; } - SfxItemSet *GetFrmItemSet( SwDoc *pCreateDoc ); + const SfxItemSet *GetFrameItemSet() const { return pFrameItemSet; } + SfxItemSet *GetFrameItemSet( SwDoc *pCreateDoc ); void SetFinishPREListingXMP( bool bSet ) { bFinishPREListingXMP = bSet; } bool IsFinishPREListingXMP() const { return bFinishPREListingXMP; } @@ -381,7 +381,7 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient _HTMLAttrs m_aParaAttrs; // vorlauefige Absatz-Attribute _HTMLAttrTable m_aAttrTab; // "offene" Attribute _HTMLAttrContexts m_aContexts;// der aktuelle Attribut/Token-Kontext - std::vector<SwFrameFormat *> m_aMoveFlyFrms;// Fly-Frames, the anchor is moved + std::vector<SwFrameFormat *> m_aMoveFlyFrames;// Fly-Frames, the anchor is moved std::deque<sal_Int32> m_aMoveFlyCnts;// and the Content-Positions SwApplet_Impl *m_pAppletImpl; // das aktuelle Applet @@ -438,7 +438,7 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient // Flag um doppeltes init durch Rekursion // zu verhindern. bool m_bViewCreated : 1; // die View wurde schon erzeugt (asynchron) - bool m_bSetCrsr : 1; // Crsr wieder auf den Anfang setzen + bool m_bSetCursor : 1; // Cursor wieder auf den Anfang setzen bool m_bSetModEnabled : 1; bool m_bInFloatingFrame : 1; // Wir sind in einen Floating Frame @@ -493,7 +493,7 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient inline void SetAttr( bool bChkEnd = true, bool bBeforeTable = false, _HTMLAttrs *pPostIts = nullptr ) { - if( !m_aSetAttrTab.empty() || !m_aMoveFlyFrms.empty() ) + if( !m_aSetAttrTab.empty() || !m_aMoveFlyFrames.empty() ) _SetAttr( bChkEnd, bBeforeTable, pPostIts ); } @@ -667,20 +667,20 @@ private: sal_Int16 eHoriOri, const SfxItemSet &rItemSet, const SvxCSS1PropertyInfo &rPropInfo, - SfxItemSet& rFrmSet ); + SfxItemSet& rFrameSet ); void SetAnchorAndAdjustment( sal_Int16 eVertOri, sal_Int16 eHoriOri, - SfxItemSet& rFrmSet, + SfxItemSet& rFrameSet, bool bDontAppend=false ); void SetAnchorAndAdjustment( const SfxItemSet &rItemSet, const SvxCSS1PropertyInfo &rPropInfo, - SfxItemSet &rFrmItemSet ); + SfxItemSet &rFrameItemSet ); static void SetFrameFormatAttrs( SfxItemSet &rItemSet, SvxCSS1PropertyInfo &rPropInfo, - sal_uInt16 nFlags, SfxItemSet &rFrmItemSet ); + sal_uInt16 nFlags, SfxItemSet &rFrameItemSet ); // Frames anlegen und Auto-gebundene Rahmen registrieren - void RegisterFlyFrm( SwFrameFormat *pFlyFrm ); + void RegisterFlyFrame( SwFrameFormat *pFlyFrame ); // Die Groesse des Fly-Frames an die Vorgaben und Gegebenheiten anpassen // (nicht fuer Grafiken, deshalb htmlplug.cxx) @@ -884,7 +884,7 @@ protected: public: - SwHTMLParser( SwDoc* pD, SwPaM & rCrsr, SvStream& rIn, + SwHTMLParser( SwDoc* pD, SwPaM & rCursor, SvStream& rIn, const OUString& rFileName, const OUString& rBaseURL, bool bReadNewDoc = true, diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx index f66e87631f12..e741ee631b5a 100644 --- a/sw/source/filter/html/wrthtml.cxx +++ b/sw/source/filter/html/wrthtml.cxx @@ -91,7 +91,7 @@ static sal_Char sIndentTabs[MAX_INDENT_LEVEL+2] = "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"; SwHTMLWriter::SwHTMLWriter( const OUString& rBaseURL ) - : m_pHTMLPosFlyFrms(nullptr) + : m_pHTMLPosFlyFrames(nullptr) , m_pNumRuleInfo(new SwHTMLNumRuleInfo) , m_pNextNumRuleInfo(nullptr) , m_nHTMLMode(0) @@ -378,8 +378,8 @@ sal_uLong SwHTMLWriter::WriteStream() // Tabelle fuer die freifliegenden Rahmen erzeugen, aber nur wenn // das gesamte Dokument geschrieben wird - m_pHTMLPosFlyFrms = nullptr; - CollectFlyFrms(); + m_pHTMLPosFlyFrames = nullptr; + CollectFlyFrames(); m_nLastParaToken = 0; GetControls(); CollectLinkTargets(); @@ -438,12 +438,12 @@ sal_uLong SwHTMLWriter::WriteStream() } // loesche die Tabelle mit den freifliegenden Rahmen - OSL_ENSURE( !m_pHTMLPosFlyFrms, "Wurden nicht alle Rahmen ausgegeben" ); - if( m_pHTMLPosFlyFrms ) + OSL_ENSURE( !m_pHTMLPosFlyFrames, "Wurden nicht alle Rahmen ausgegeben" ); + if( m_pHTMLPosFlyFrames ) { - m_pHTMLPosFlyFrms->DeleteAndDestroyAll(); - delete m_pHTMLPosFlyFrms; - m_pHTMLPosFlyFrms = nullptr; + m_pHTMLPosFlyFrames->DeleteAndDestroyAll(); + delete m_pHTMLPosFlyFrames; + m_pHTMLPosFlyFrames = nullptr; } m_aHTMLControls.DeleteAndDestroyAll(); diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx index 8a65c8128ae6..03d891f57866 100644 --- a/sw/source/filter/html/wrthtml.hxx +++ b/sw/source/filter/html/wrthtml.hxx @@ -52,7 +52,7 @@ class SdrUnoObj; class SvxBrushItem; class SvxFontItem; class SwHTMLNumRuleInfo; -class SwHTMLPosFlyFrms; +class SwHTMLPosFlyFrames; class SwTextFootnote; typedef std::vector<SwTextFootnote*> SwHTMLTextFootnotes; @@ -260,7 +260,7 @@ class IDocumentStylePoolAccess; class SwHTMLWriter : public Writer { - SwHTMLPosFlyFrms *m_pHTMLPosFlyFrms; + SwHTMLPosFlyFrames *m_pHTMLPosFlyFrames; SwHTMLNumRuleInfo *m_pNumRuleInfo;// aktuelle Numerierung SwHTMLNumRuleInfo *m_pNextNumRuleInfo; sal_uInt32 m_nHTMLMode; // Beschreibung der Export-Konfiguration @@ -414,7 +414,7 @@ public: void OutHyperlinkHRefValue( const OUString& rURL ); // gebe die evt. an der akt. Position stehenden FlyFrame aus. - bool OutFlyFrm( sal_uLong nNdIdx, sal_Int32 nContentIdx, + bool OutFlyFrame( sal_uLong nNdIdx, sal_Int32 nContentIdx, sal_uInt8 nPos, HTMLOutContext *pContext = nullptr ); void OutFrameFormat( sal_uInt8 nType, const SwFrameFormat& rFormat, const SdrObject *pSdrObj ); @@ -468,14 +468,14 @@ public: // Frame-Formats ausgeben und ggf. ein <BR CLEAR=...> vorne an // rEndTags anhaengen OString OutFrameFormatOptions( const SwFrameFormat& rFrameFormat, const OUString& rAltText, - sal_uInt32 nFrmOpts, const OString& rEndTags = OString() ); + sal_uInt32 nFrameOpts, const OString& rEndTags = OString() ); - void writeFrameFormatOptions(HtmlWriter& aHtml, const SwFrameFormat& rFrameFormat, const OUString& rAltText, sal_uInt32 nFrmOpts); + void writeFrameFormatOptions(HtmlWriter& aHtml, const SwFrameFormat& rFrameFormat, const OUString& rAltText, sal_uInt32 nFrameOpts); void OutCSS1_TableFrameFormatOptions( const SwFrameFormat& rFrameFormat ); void OutCSS1_TableCellBorderHack(const SwFrameFormat& rFrameFormat); void OutCSS1_SectionFormatOptions( const SwFrameFormat& rFrameFormat, const SwFormatCol *pCol ); - void OutCSS1_FrameFormatOptions( const SwFrameFormat& rFrameFormat, sal_uInt32 nFrmOpts, + void OutCSS1_FrameFormatOptions( const SwFrameFormat& rFrameFormat, sal_uInt32 nFrameOpts, const SdrObject *pSdrObj=nullptr, const SfxItemSet *pItemSet=nullptr ); void OutCSS1_FrameFormatBackground( const SwFrameFormat& rFrameFormat ); @@ -504,11 +504,11 @@ public: static sal_uInt32 ToPixel( sal_uInt32 nVal, const bool bVert ); - sal_uInt16 GuessFrmType( const SwFrameFormat& rFrameFormat, + sal_uInt16 GuessFrameType( const SwFrameFormat& rFrameFormat, const SdrObject*& rpStrObj ); - static sal_uInt16 GuessOLENodeFrmType( const SwNode& rNd ); + static sal_uInt16 GuessOLENodeFrameType( const SwNode& rNd ); - void CollectFlyFrms(); + void CollectFlyFrames(); sal_uInt16 GetHTMLFontSize( sal_uInt32 nFontHeight ) const; @@ -649,7 +649,7 @@ Writer& OutHTML_HeaderFooter( Writer& rWrt, const SwFrameFormat& rFrameFormat, Writer& OutHTML_Image( Writer&, const SwFrameFormat& rFormat, Graphic& rGraphic, const OUString& rAlternateText, - const Size& rRealSize, sal_uInt32 nFrmOpts, + const Size& rRealSize, sal_uInt32 nFrameOpts, const sal_Char *pMarkType = nullptr, const ImageMap *pGenImgMap = nullptr ); diff --git a/sw/source/filter/inc/msfilter.hxx b/sw/source/filter/inc/msfilter.hxx index 0e213ed4aedd..a3157b6f7195 100644 --- a/sw/source/filter/inc/msfilter.hxx +++ b/sw/source/filter/inc/msfilter.hxx @@ -310,7 +310,7 @@ namespace sw their layout frms deleted and recalculated. This TableManager detects the necessity to do this, and all tables inserted into a document should be registered with this manager with - InsertTable, and before finialization DelAndMakeTableFrms should + InsertTable, and before finialization DelAndMakeTableFrames should be called. @author @@ -323,7 +323,7 @@ namespace sw public: typedef std::map<InsertedTableClient *, SwNodeIndex *> TableMap; typedef TableMap::iterator TableMapIter; - void DelAndMakeTableFrms(); + void DelAndMakeTableFrames(); void InsertTable(SwTableNode &rTableNode, SwPaM &rPaM); explicit InsertedTablesManager(const SwDoc &rDoc); private: diff --git a/sw/source/filter/inc/wrtswtbl.hxx b/sw/source/filter/inc/wrtswtbl.hxx index 55819710c516..7d5871bca30a 100644 --- a/sw/source/filter/inc/wrtswtbl.hxx +++ b/sw/source/filter/inc/wrtswtbl.hxx @@ -236,7 +236,7 @@ protected: sal_uInt16 nBorder; // Dicke der ausseren Umrandung sal_uInt16 nInnerBorder; // Dicke der inneren Umrandung - sal_uInt32 nBaseWidth; // Bezugsgroesse fur Breiten SwFormatFrmSize + sal_uInt32 nBaseWidth; // Bezugsgroesse fur Breiten SwFormatFrameSize sal_uInt16 nHeadEndRow; // letzte Zeile des Tabellen-Kopfes diff --git a/sw/source/filter/writer/wrtswtbl.cxx b/sw/source/filter/writer/wrtswtbl.cxx index 5cd0bd4e27a1..4dbb1315fc33 100644 --- a/sw/source/filter/writer/wrtswtbl.cxx +++ b/sw/source/filter/writer/wrtswtbl.cxx @@ -81,10 +81,10 @@ SwWriteTableCol::SwWriteTableCol(sal_uInt32 nPosition) sal_uInt32 SwWriteTable::GetBoxWidth( const SwTableBox *pBox ) { const SwFrameFormat *pFormat = pBox->GetFrameFormat(); - const SwFormatFrmSize& aFrmSize= - static_cast<const SwFormatFrmSize&>(pFormat->GetFormatAttr( RES_FRM_SIZE )); + const SwFormatFrameSize& aFrameSize= + static_cast<const SwFormatFrameSize&>(pFormat->GetFormatAttr( RES_FRM_SIZE )); - return sal::static_int_cast<sal_uInt32>(aFrmSize.GetSize().Width()); + return sal::static_int_cast<sal_uInt32>(aFrameSize.GetSize().Width()); } long SwWriteTable::GetLineHeight( const SwTableLine *pLine ) @@ -151,7 +151,7 @@ long SwWriteTable::GetLineHeight( const SwTableBox *pBox ) long nHeight = 0; if( SfxItemState::SET == rItemSet.GetItemState( RES_FRM_SIZE, true, &pItem )) - nHeight = static_cast<const SwFormatFrmSize*>(pItem)->GetHeight(); + nHeight = static_cast<const SwFormatFrameSize*>(pItem)->GetHeight(); return nHeight; } @@ -587,7 +587,7 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, sal_uInt16 nStartRow, long nHeight = 0; if( SfxItemState::SET == rItemSet.GetItemState( RES_FRM_SIZE, true, &pItem )) - nHeight = static_cast<const SwFormatFrmSize*>(pItem)->GetHeight(); + nHeight = static_cast<const SwFormatFrameSize*>(pItem)->GetHeight(); const SvxBrushItem *pBrushItem, *pLineBrush = pParentBrush; if( SfxItemState::SET == rItemSet.GetItemState( RES_BACKGROUND, false, diff --git a/sw/source/filter/ww8/WW8TableInfo.cxx b/sw/source/filter/ww8/WW8TableInfo.cxx index 92640e340f90..6bb6f54870b5 100644 --- a/sw/source/filter/ww8/WW8TableInfo.cxx +++ b/sw/source/filter/ww8/WW8TableInfo.cxx @@ -206,7 +206,7 @@ GridColsPtr WW8TableNodeInfoInner::getGridColsOfRow(AttributeOutputBase & rBase, if (!pFormat) return pResult; - const SwFormatFrmSize &rSize = pFormat->GetFrmSize(); + const SwFormatFrameSize &rSize = pFormat->GetFrameSize(); unsigned long nTableSz = static_cast<unsigned long>(rSize.GetWidth()); long nPageSize = 0; @@ -259,7 +259,7 @@ WidthsPtr WW8TableNodeInfoInner::getColumnWidthsBasedOnAllRows() for (size_t nBoxIndex = 0; nBoxIndex < nBoxes; ++nBoxIndex) { const SwFrameFormat* pBoxFormat = rTabBoxes[ nBoxIndex ]->GetFrameFormat(); - const SwFormatFrmSize& rLSz = pBoxFormat->GetFrmSize(); + const SwFormatFrameSize& rLSz = pBoxFormat->GetFrameSize(); nSeparatorPosition += rLSz.GetWidth(); pSeparators->push_back(nSeparatorPosition); } @@ -312,7 +312,7 @@ WidthsPtr WW8TableNodeInfoInner::getWidthsOfRow() for (sal_uInt32 n = 0; n < nBoxes; n++) { const SwFrameFormat* pBoxFormat = rTabBoxes[ n ]->GetFrameFormat(); - const SwFormatFrmSize& rLSz = pBoxFormat->GetFrmSize(); + const SwFormatFrameSize& rLSz = pBoxFormat->GetFrameSize(); pWidths->push_back(rLSz.GetWidth()); } @@ -587,7 +587,7 @@ WW8TableInfo::processSwTableByLayout(const SwTable * pTable, RowEndInners_t &rLa { SwRect aRect = aTableCellInfo.getRect(); - SAL_INFO( "sw.ww8", "<CellFrm>" ); + SAL_INFO( "sw.ww8", "<CellFrame>" ); SAL_INFO( "sw.ww8", "<rect top=\"" << aRect.Top() << "\" bottom=\"" << aRect.Bottom() << "\" left=\"" << aRect.Left() << "\" right=\"" << aRect.Right() << "\"/>" ); const SwTableBox * pTableBox = aTableCellInfo.getTableBox(); @@ -618,7 +618,7 @@ WW8TableInfo::processSwTableByLayout(const SwTable * pTable, RowEndInners_t &rLa while (!bDone); } - SAL_INFO( "sw.ww8", "</CellFrm>" ); + SAL_INFO( "sw.ww8", "</CellFrame>" ); } return reorderByLayout(pTable, rLastRowEnds); @@ -1098,12 +1098,12 @@ CellInfoMultiSet::const_iterator WW8TableCellGrid::getCellsEnd(long nTop) void WW8TableCellGrid::insert(const SwRect & rRect, WW8TableNodeInfo * pNodeInfo, - unsigned long * pFormatFrmWidth) + unsigned long * pFormatFrameWidth) { CellInfo aCellInfo(rRect, pNodeInfo); - if (pFormatFrmWidth != nullptr) - aCellInfo.setFormatFrmWidth(*pFormatFrmWidth); + if (pFormatFrameWidth != nullptr) + aCellInfo.setFormatFrameWidth(*pFormatFrameWidth); WW8TableCellGridRow::Pointer_t pRow = getRow(rRect.Top()); pRow->insert(aCellInfo); @@ -1143,8 +1143,8 @@ void WW8TableCellGrid::addShadowCells() *aRowSpanIt < aCellIt->bottom()) { aRect.Top(*aRowSpanIt); - unsigned long nFormatFrmWidth = aCellIt->getFormatFrmWidth(); - insert(aRect, nullptr, &nFormatFrmWidth); + unsigned long nFormatFrameWidth = aCellIt->getFormatFrameWidth(); + insert(aRect, nullptr, &nFormatFrameWidth); bVertMerge = true; } @@ -1248,7 +1248,7 @@ WW8TableNodeInfo * WW8TableCellGrid::connectCells(RowEndInners_t &rLastRowEnds) if (bBeginningOfCell) { - pWidths->push_back(aCellIt->getFormatFrmWidth()); + pWidths->push_back(aCellIt->getFormatFrameWidth()); if (pNodeInfo) pTableBoxes->push_back(pNodeInfo->getTableBox()); @@ -1475,15 +1475,15 @@ void WW8TableCellGridRow::setRowSpans(RowSpansPtr pRowSpans) CellInfo::CellInfo(const SwRect & aRect, WW8TableNodeInfo * pNodeInfo) -: m_aRect(aRect), m_pNodeInfo(pNodeInfo), m_nFormatFrmWidth(0) +: m_aRect(aRect), m_pNodeInfo(pNodeInfo), m_nFormatFrameWidth(0) { if (pNodeInfo != nullptr) { const SwTableBox * pBox = pNodeInfo->getTableBox(); const SwFrameFormat * pFrameFormat = pBox->GetFrameFormat(); - const SwFormatFrmSize & rSize = pFrameFormat->GetFrmSize(); + const SwFormatFrameSize & rSize = pFrameFormat->GetFrameSize(); - m_nFormatFrmWidth = rSize.GetWidth(); + m_nFormatFrameWidth = rSize.GetWidth(); } } diff --git a/sw/source/filter/ww8/WW8TableInfo.hxx b/sw/source/filter/ww8/WW8TableInfo.hxx index f6f7168e5d92..24f7cae08a1f 100644 --- a/sw/source/filter/ww8/WW8TableInfo.hxx +++ b/sw/source/filter/ww8/WW8TableInfo.hxx @@ -116,7 +116,7 @@ class CellInfo { SwRect m_aRect; WW8TableNodeInfo * m_pNodeInfo; - unsigned long m_nFormatFrmWidth; + unsigned long m_nFormatFrameWidth; public: CellInfo(const SwRect & aRect, WW8TableNodeInfo * pNodeInfo); @@ -124,7 +124,7 @@ public: CellInfo(const CellInfo & aRectAndTableInfo) : m_aRect(aRectAndTableInfo.m_aRect), m_pNodeInfo(aRectAndTableInfo.m_pNodeInfo), - m_nFormatFrmWidth(aRectAndTableInfo.m_nFormatFrmWidth) + m_nFormatFrameWidth(aRectAndTableInfo.m_nFormatFrameWidth) { } @@ -141,14 +141,14 @@ public: SwRect getRect() const { return m_aRect; } WW8TableNodeInfo * getTableNodeInfo() const { return m_pNodeInfo; } - unsigned long getFormatFrmWidth() const + unsigned long getFormatFrameWidth() const { - return m_nFormatFrmWidth; + return m_nFormatFrameWidth; } - void setFormatFrmWidth(unsigned long nFormatFrmWidth) + void setFormatFrameWidth(unsigned long nFormatFrameWidth) { - m_nFormatFrmWidth = nFormatFrmWidth; + m_nFormatFrameWidth = nFormatFrameWidth; } #ifdef DBG_UTIL @@ -276,7 +276,7 @@ public: ~WW8TableCellGrid(); void insert(const SwRect & rRect, WW8TableNodeInfo * pNodeInfo, - unsigned long * pFormatFrmWidth = nullptr); + unsigned long * pFormatFrameWidth = nullptr); void addShadowCells(); WW8TableNodeInfo *connectCells(RowEndInners_t &rLastRowEnds); diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx b/sw/source/filter/ww8/attributeoutputbase.hxx index 308a247abd4d..092153ad0cbf 100644 --- a/sw/source/filter/ww8/attributeoutputbase.hxx +++ b/sw/source/filter/ww8/attributeoutputbase.hxx @@ -90,7 +90,7 @@ class SfxPoolItem; class SfxItemSet; class SvxParaVertAlignItem; class SvxParaGridItem; -class SwFormatFrmSize; +class SwFormatFrameSize; class SvxPaperBinItem; class SvxLRSpaceItem; class SvxULSpaceItem; @@ -541,7 +541,7 @@ protected: virtual void ParaSnapToGrid( const SvxParaGridItem& ) = 0; /// Sfx item RES_FRM_SIZE - virtual void FormatFrameSize( const SwFormatFrmSize& ) = 0; + virtual void FormatFrameSize( const SwFormatFrameSize& ) = 0; /// Sfx item RES_PAPER_BIN virtual void FormatPaperBin( const SvxPaperBinItem& ) = 0; diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 4c1ca922dfff..c21910850e25 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -3014,7 +3014,7 @@ void DocxAttributeOutput::InitTableHelper( ww8::WW8TableNodeInfoInner::Pointer_t GetTablePageSize( pTableTextNodeInfoInner.get(), nPageSize, bRelBoxSize ); const SwFrameFormat *pFormat = pTable->GetFrameFormat( ); - const sal_uInt32 nTableSz = static_cast<sal_uInt32>(pFormat->GetFrmSize( ).GetWidth( )); + const sal_uInt32 nTableSz = static_cast<sal_uInt32>(pFormat->GetFrameSize( ).GetWidth( )); const SwHTMLTableLayout *pLayout = pTable->GetHTMLTableLayout(); if( pLayout && pLayout->IsExportable() ) @@ -3202,7 +3202,7 @@ void DocxAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t // If actual width of table is relative it should export is as "pct".` const SwTable *pTable = pTableTextNodeInfoInner->getTable(); SwFrameFormat *pTableFormat = pTable->GetFrameFormat( ); - const SwFormatFrmSize &rSize = pTableFormat->GetFrmSize(); + const SwFormatFrameSize &rSize = pTableFormat->GetFrameSize(); int nWidthPercent = rSize.GetWidthPercent(); uno::Reference<beans::XPropertySet> xPropertySet(SwXTextTables::GetObject(const_cast<SwTableFormat&>(*pTable->GetFrameFormat( ))),uno::UNO_QUERY); bool isWidthRelative = false; @@ -3615,7 +3615,7 @@ void DocxAttributeOutput::TableHeight( ww8::WW8TableNodeInfoInner::Pointer_t pTa const SwTableLine * pTabLine = pTabBox->GetUpper(); const SwFrameFormat * pLineFormat = pTabLine->GetFrameFormat(); - const SwFormatFrmSize& rLSz = pLineFormat->GetFrmSize(); + const SwFormatFrameSize& rLSz = pLineFormat->GetFrameSize(); if ( ATT_VAR_SIZE != rLSz.GetHeightSizeType() && rLSz.GetHeight() ) { sal_Int32 nHeight = rLSz.GetHeight(); @@ -7238,7 +7238,7 @@ void DocxAttributeOutput::ParaSnapToGrid( const SvxParaGridItem& rGrid ) FSEND ); } -void DocxAttributeOutput::FormatFrameSize( const SwFormatFrmSize& rSize ) +void DocxAttributeOutput::FormatFrameSize( const SwFormatFrameSize& rSize ) { if (m_rExport.SdrExporter().getTextFrameSyntax() && m_rExport.SdrExporter().getFlyFrameSize()) { @@ -7249,7 +7249,7 @@ void DocxAttributeOutput::FormatFrameSize( const SwFormatFrmSize& rSize ) else if (m_rExport.SdrExporter().getDMLTextFrameSyntax()) { } - else if ( m_rExport.m_bOutFlyFrmAttrs ) + else if ( m_rExport.m_bOutFlyFrameAttrs ) { if ( rSize.GetWidth() && rSize.GetWidthSizeType() == ATT_FIX_SIZE ) AddToAttrList( m_rExport.SdrExporter().getFlyAttrList(), @@ -7298,7 +7298,7 @@ void DocxAttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLRSpace ) else if (m_rExport.SdrExporter().getDMLTextFrameSyntax()) { } - else if ( m_rExport.m_bOutFlyFrmAttrs ) + else if ( m_rExport.m_bOutFlyFrameAttrs ) { AddToAttrList( m_rExport.SdrExporter().getFlyAttrList(), FSNS( XML_w, XML_hSpace ), OString::number( @@ -7356,7 +7356,7 @@ void DocxAttributeOutput::FormatULSpace( const SvxULSpaceItem& rULSpace ) else if (m_rExport.SdrExporter().getDMLTextFrameSyntax()) { } - else if ( m_rExport.m_bOutFlyFrmAttrs ) + else if ( m_rExport.m_bOutFlyFrameAttrs ) { AddToAttrList( m_rExport.SdrExporter().getFlyAttrList(), FSNS( XML_w, XML_vSpace ), OString::number( @@ -7483,7 +7483,7 @@ void DocxAttributeOutput::FormatSurround( const SwFormatSurround& rSurround ) else if (m_rExport.SdrExporter().getDMLTextFrameSyntax()) { } - else if ( m_rExport.m_bOutFlyFrmAttrs ) + else if ( m_rExport.m_bOutFlyFrameAttrs ) { OString sWrap( "auto" ); switch ( rSurround.GetSurround( ) ) @@ -7562,7 +7562,7 @@ void DocxAttributeOutput::FormatVertOrientation( const SwFormatVertOrient& rFlyV else if (m_rExport.SdrExporter().getDMLTextFrameSyntax()) { } - else if ( m_rExport.m_bOutFlyFrmAttrs ) + else if ( m_rExport.m_bOutFlyFrameAttrs ) { if ( !sAlign.isEmpty() ) AddToAttrList( m_rExport.SdrExporter().getFlyAttrList(), FSNS( XML_w, XML_yAlign ), sAlign.getStr() ); @@ -7622,7 +7622,7 @@ void DocxAttributeOutput::FormatHorizOrientation( const SwFormatHoriOrient& rFly else if (m_rExport.SdrExporter().getDMLTextFrameSyntax()) { } - else if ( m_rExport.m_bOutFlyFrmAttrs ) + else if ( m_rExport.m_bOutFlyFrameAttrs ) { if ( !sAlign.isEmpty() ) AddToAttrList( m_rExport.SdrExporter().getFlyAttrList(), FSNS( XML_w, XML_xAlign ), sAlign.getStr() ); @@ -8064,7 +8064,7 @@ void DocxAttributeOutput::FormatFrameDirection( const SvxFrameDirectionItem& rDi if ( bBiDi ) m_pSerializer->singleElementNS( XML_w, XML_bidi, FSEND ); } - else if ( !m_rExport.m_bOutFlyFrmAttrs ) + else if ( !m_rExport.m_bOutFlyFrameAttrs ) { if ( bBiDi ) m_pSerializer->singleElementNS( XML_w, XML_bidi, FSNS( XML_w, XML_val ), "1", FSEND ); diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx index 1dbddc43f73a..73abf8217fb0 100644 --- a/sw/source/filter/ww8/docxattributeoutput.hxx +++ b/sw/source/filter/ww8/docxattributeoutput.hxx @@ -609,7 +609,7 @@ protected: virtual void ParaSnapToGrid( const SvxParaGridItem& ) override; /// Sfx item RES_FRM_SIZE - virtual void FormatFrameSize( const SwFormatFrmSize& ) override; + virtual void FormatFrameSize( const SwFormatFrameSize& ) override; /// Sfx item RES_PAPER_BIN virtual void FormatPaperBin( const SvxPaperBinItem& ) override; diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx index 0366407d9368..6518f4f126f2 100644 --- a/sw/source/filter/ww8/docxsdrexport.cxx +++ b/sw/source/filter/ww8/docxsdrexport.cxx @@ -1598,7 +1598,7 @@ void DocxSdrExport::writeDMLTextFrame(ww8::Frame* pParentFrame, int nAnchorId, b { pFS->startElementNS(XML_wps, XML_bodyPr, xBodyPrAttrList); // AutoSize of the Text Frame. - const SwFormatFrmSize& rSize = rFrameFormat.GetFrmSize(); + const SwFormatFrameSize& rSize = rFrameFormat.GetFrameSize(); pFS->singleElementNS(XML_a, (rSize.GetHeightSizeType() == ATT_VAR_SIZE ? XML_spAutoFit : XML_noAutofit), FSEND); pFS->endElementNS(XML_wps, XML_bodyPr); @@ -1608,7 +1608,7 @@ void DocxSdrExport::writeDMLTextFrame(ww8::Frame* pParentFrame, int nAnchorId, b // Relative size of the Text Frame. const sal_uInt8 nWidthPercent = rSize.GetWidthPercent(); - if (nWidthPercent && nWidthPercent != SwFormatFrmSize::SYNCED) + if (nWidthPercent && nWidthPercent != SwFormatFrameSize::SYNCED) { pFS->startElementNS(XML_wp14, XML_sizeRelH, XML_relativeFrom, (rSize.GetWidthPercentRelation() == text::RelOrientation::PAGE_FRAME ? "page" : "margin"), @@ -1619,7 +1619,7 @@ void DocxSdrExport::writeDMLTextFrame(ww8::Frame* pParentFrame, int nAnchorId, b pFS->endElementNS(XML_wp14, XML_sizeRelH); } const sal_uInt8 nHeightPercent = rSize.GetHeightPercent(); - if (nHeightPercent && nHeightPercent != SwFormatFrmSize::SYNCED) + if (nHeightPercent && nHeightPercent != SwFormatFrameSize::SYNCED) { pFS->startElementNS(XML_wp14, XML_sizeRelV, XML_relativeFrom, (rSize.GetHeightPercentRelation() == text::RelOrientation::PAGE_FRAME ? "page" : "margin"), diff --git a/sw/source/filter/ww8/escher.hxx b/sw/source/filter/ww8/escher.hxx index b956d5f48c1a..d0ea96eac96c 100644 --- a/sw/source/filter/ww8/escher.hxx +++ b/sw/source/filter/ww8/escher.hxx @@ -120,7 +120,7 @@ public: sal_Int32 WriteGrfBullet(const Graphic&); sal_Int32 WriteOLEFlyFrame(const SwFrameFormat& rFormat, sal_uInt32 nShapeId); void WriteEmptyFlyFrame(const SwFrameFormat& rFormat, sal_uInt32 nShapeId); - virtual void WriteFrmExtraData(const SwFrameFormat&); + virtual void WriteFrameExtraData(const SwFrameFormat&); virtual void WritePictures(); virtual ~SwBasicEscherEx(); //i120927,this function is added to export hyperlink info,such as graphic/frame/OLE @@ -148,7 +148,7 @@ private: void MakeZOrderArrAndFollowIds(std::vector<DrawObj>& rSrcArr, DrawObjPointerVector& rDstArr); - sal_Int32 WriteFlyFrm(const DrawObj &rObj, sal_uInt32 &rShapeId, + sal_Int32 WriteFlyFrame(const DrawObj &rObj, sal_uInt32 &rShapeId, DrawObjPointerVector &rPVec); sal_Int32 WriteTextFlyFrame(const DrawObj &rObj, sal_uInt32 nShapeId, sal_uInt32 nTextBox, DrawObjPointerVector &rPVec); @@ -166,7 +166,7 @@ public: void FinishEscher(); virtual void WritePictures() override; - virtual void WriteFrmExtraData(const SwFrameFormat& rFormat) override; + virtual void WriteFrameExtraData(const SwFrameFormat& rFormat) override; EscherExHostAppData* StartShape(const css::uno::Reference< css::drawing::XShape > &, const Rectangle*) override {return &aHostData;} private: diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index 2f2e35d44471..577d827d14b4 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -719,10 +719,10 @@ void RtfAttributeOutput::TableDefinition(ww8::WW8TableNodeInfoInner::Pointer_t p GetExport().m_pDoc->GetPageDesc(0).GetPageFormatOfNode(*pNode, false); const SvxLRSpaceItem& rLR = pFrameFormat->GetLRSpace(); - nPageSize = pFrameFormat->GetFrmSize().GetWidth() - + nPageSize = pFrameFormat->GetFrameSize().GetWidth() - rLR.GetLeft() - rLR.GetRight(); } - SwTwips nTableSz = pFormat->GetFrmSize().GetWidth(); + SwTwips nTableSz = pFormat->GetFrameSize().GetWidth(); // Not using m_nTableDepth, which is not yet incremented here. sal_uInt32 nCurrentDepth = pTableTextNodeInfoInner->getDepth(); m_aCells[nCurrentDepth] = pRow->GetCells().size(); @@ -736,7 +736,7 @@ void RtfAttributeOutput::TableDefinition(ww8::WW8TableNodeInfoInner::Pointer_t p // Right boundary: this can't be in TableCellProperties as the old // value of nSz is needed. - nSz += pCellFormat->GetFrmSize().GetWidth(); + nSz += pCellFormat->GetFrameSize().GetWidth(); m_aRowDefs.append(OOO_STRING_SVTOOLS_RTF_CELLX); SwTwips nCalc = nSz; nCalc *= nPageSize; @@ -826,7 +826,7 @@ void RtfAttributeOutput::TableHeight(ww8::WW8TableNodeInfoInner::Pointer_t pTabl const SwTableBox* pTabBox = pTableTextNodeInfoInner->getTableBox(); const SwTableLine* pTabLine = pTabBox->GetUpper(); const SwFrameFormat* pLineFormat = pTabLine->GetFrameFormat(); - const SwFormatFrmSize& rLSz = pLineFormat->GetFrmSize(); + const SwFormatFrameSize& rLSz = pLineFormat->GetFrameSize(); if (ATT_VAR_SIZE != rLSz.GetHeightSizeType() && rLSz.GetHeight()) { @@ -969,7 +969,7 @@ void RtfAttributeOutput::InitTableHelper(ww8::WW8TableNodeInfoInner::Pointer_t p GetTablePageSize(pTableTextNodeInfoInner.get(), nPageSize, bRelBoxSize); const SwFrameFormat* pFormat = pTable->GetFrameFormat(); - const sal_uInt32 nTableSz = static_cast<sal_uInt32>(pFormat->GetFrmSize().GetWidth()); + const sal_uInt32 nTableSz = static_cast<sal_uInt32>(pFormat->GetFrameSize().GetWidth()); const SwHTMLTableLayout* pLayout = pTable->GetHTMLTableLayout(); if (pLayout && pLayout->IsExportable()) @@ -1732,11 +1732,11 @@ void lcl_TextFrameShadow(std::vector< std::pair<OString, OString> >& rFlyPropert void lcl_TextFrameRelativeSize(std::vector< std::pair<OString, OString> >& rFlyProperties, const SwFrameFormat& rFrameFormat) { - const SwFormatFrmSize& rSize = rFrameFormat.GetFrmSize(); + const SwFormatFrameSize& rSize = rFrameFormat.GetFrameSize(); // Relative size of the Text Frame. const sal_uInt8 nWidthPercent = rSize.GetWidthPercent(); - if (nWidthPercent && nWidthPercent != SwFormatFrmSize::SYNCED) + if (nWidthPercent && nWidthPercent != SwFormatFrameSize::SYNCED) { rFlyProperties.push_back(std::make_pair<OString, OString>("pctHoriz", OString::number(nWidthPercent * 10))); @@ -1753,7 +1753,7 @@ void lcl_TextFrameRelativeSize(std::vector< std::pair<OString, OString> >& rFlyP rFlyProperties.push_back(std::make_pair("sizerelh", aRelation)); } const sal_uInt8 nHeightPercent = rSize.GetHeightPercent(); - if (nHeightPercent && nHeightPercent != SwFormatFrmSize::SYNCED) + if (nHeightPercent && nHeightPercent != SwFormatFrameSize::SYNCED) { rFlyProperties.push_back(std::make_pair<OString, OString>("pctVert", OString::number(nHeightPercent * 10))); @@ -1867,11 +1867,11 @@ void RtfAttributeOutput::OutputFlyFrame_Impl(const ww8::Frame& rFrame, const Poi const Size aSize = rFrame.GetSize(); m_pFlyFrameSize = &aSize; - m_rExport.m_bOutFlyFrmAttrs = m_rExport.bRTFFlySyntax = true; + m_rExport.m_bOutFlyFrameAttrs = m_rExport.bRTFFlySyntax = true; m_rExport.OutputFormat(rFrame.GetFrameFormat(), false, false, true); m_rExport.Strm().WriteCharPtr(m_aRunText.makeStringAndClear().getStr()); m_rExport.Strm().WriteCharPtr(m_aStyles.makeStringAndClear().getStr()); - m_rExport.m_bOutFlyFrmAttrs = m_rExport.bRTFFlySyntax = false; + m_rExport.m_bOutFlyFrameAttrs = m_rExport.bRTFFlySyntax = false; m_pFlyFrameSize = nullptr; const SwFrameFormat& rFrameFormat = rFrame.GetFrameFormat(); @@ -2928,7 +2928,7 @@ void RtfAttributeOutput::ParaSnapToGrid(const SvxParaGridItem& /*rGrid*/) SAL_INFO("sw.rtf", "TODO: " << OSL_THIS_FUNC); } -void RtfAttributeOutput::FormatFrameSize(const SwFormatFrmSize& rSize) +void RtfAttributeOutput::FormatFrameSize(const SwFormatFrameSize& rSize) { if (m_rExport.m_bOutPageDescs) { @@ -2948,7 +2948,7 @@ void RtfAttributeOutput::FormatPaperBin(const SvxPaperBinItem&) void RtfAttributeOutput::FormatLRSpace(const SvxLRSpaceItem& rLRSpace) { - if (!m_rExport.m_bOutFlyFrmAttrs) + if (!m_rExport.m_bOutFlyFrameAttrs) { if (m_rExport.m_bOutPageDescs) { @@ -2989,7 +2989,7 @@ void RtfAttributeOutput::FormatLRSpace(const SvxLRSpaceItem& rLRSpace) void RtfAttributeOutput::FormatULSpace(const SvxULSpaceItem& rULSpace) { - if (!m_rExport.m_bOutFlyFrmAttrs) + if (!m_rExport.m_bOutFlyFrameAttrs) { if (m_rExport.m_bOutPageDescs) { @@ -3043,7 +3043,7 @@ void RtfAttributeOutput::FormatULSpace(const SvxULSpaceItem& rULSpace) void RtfAttributeOutput::FormatSurround(const SwFormatSurround& rSurround) { - if (m_rExport.m_bOutFlyFrmAttrs && !m_rExport.bRTFFlySyntax) + if (m_rExport.m_bOutFlyFrameAttrs && !m_rExport.bRTFFlySyntax) { SwSurround eSurround = rSurround.GetSurround(); bool bGold = SURROUND_IDEAL == eSurround; @@ -3053,7 +3053,7 @@ void RtfAttributeOutput::FormatSurround(const SwFormatSurround& rSurround) m_aRunText->append(OOO_STRING_SVTOOLS_RTF_FLYMAINCNT); m_aRunText->append((sal_Int32) aMC.GetValue()); } - else if (m_rExport.m_bOutFlyFrmAttrs && m_rExport.bRTFFlySyntax) + else if (m_rExport.m_bOutFlyFrameAttrs && m_rExport.bRTFFlySyntax) { // See DocxSdrExport::startDMLAnchorInline() for SwFormatSurround -> WR / WRK mappings. sal_Int32 nWr = -1; @@ -3092,7 +3092,7 @@ void RtfAttributeOutput::FormatSurround(const SwFormatSurround& rSurround) void RtfAttributeOutput::FormatVertOrientation(const SwFormatVertOrient& rFlyVert) { - if (m_rExport.m_bOutFlyFrmAttrs && m_rExport.bRTFFlySyntax) + if (m_rExport.m_bOutFlyFrameAttrs && m_rExport.bRTFFlySyntax) { switch (rFlyVert.GetRelationOrient()) { @@ -3135,7 +3135,7 @@ void RtfAttributeOutput::FormatVertOrientation(const SwFormatVertOrient& rFlyVer void RtfAttributeOutput::FormatHorizOrientation(const SwFormatHoriOrient& rFlyHori) { - if (m_rExport.m_bOutFlyFrmAttrs && m_rExport.bRTFFlySyntax) + if (m_rExport.m_bOutFlyFrameAttrs && m_rExport.bRTFFlySyntax) { switch (rFlyHori.GetRelationOrient()) { @@ -3904,7 +3904,7 @@ void RtfAttributeOutput::FlyFrameGraphic(const SwFlyFrameFormat* pFlyFrameFormat Size aSize(pGrfNode->GetTwipSize()); Size aRendered(aSize); - const SwFormatFrmSize& rS = pFlyFrameFormat->GetFrmSize(); + const SwFormatFrameSize& rS = pFlyFrameFormat->GetFrameSize(); aRendered.Width() = rS.GetWidth(); aRendered.Height() = rS.GetHeight(); @@ -3935,9 +3935,9 @@ void RtfAttributeOutput::FlyFrameGraphic(const SwFlyFrameFormat* pFlyFrameFormat m_rExport.Strm().WriteCharPtr("{" OOO_STRING_SVTOOLS_RTF_SHP "{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_SHPINST); m_pFlyFrameSize = &aRendered; m_rExport.m_pParentFrame = pFrame; - m_rExport.m_bOutFlyFrmAttrs = m_rExport.bRTFFlySyntax = true; + m_rExport.m_bOutFlyFrameAttrs = m_rExport.bRTFFlySyntax = true; m_rExport.OutputFormat(pFrame->GetFrameFormat(), false, false, true); - m_rExport.m_bOutFlyFrmAttrs = m_rExport.bRTFFlySyntax = false; + m_rExport.m_bOutFlyFrameAttrs = m_rExport.bRTFFlySyntax = false; m_rExport.m_pParentFrame = nullptr; m_pFlyFrameSize = nullptr; diff --git a/sw/source/filter/ww8/rtfattributeoutput.hxx b/sw/source/filter/ww8/rtfattributeoutput.hxx index 1a882fd5dc97..e13fcd6c2ec8 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.hxx +++ b/sw/source/filter/ww8/rtfattributeoutput.hxx @@ -375,7 +375,7 @@ protected: virtual void ParaSnapToGrid(const SvxParaGridItem&) override; /// Sfx item RES_FRM_SIZE - virtual void FormatFrameSize(const SwFormatFrmSize&) override; + virtual void FormatFrameSize(const SwFormatFrameSize&) override; /// Sfx item RES_PAPER_BIN virtual void FormatPaperBin(const SvxPaperBinItem&) override; diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx index df670a7f0982..29e4ae0436ad 100644 --- a/sw/source/filter/ww8/rtfexport.cxx +++ b/sw/source/filter/ww8/rtfexport.cxx @@ -593,7 +593,7 @@ void RtfExport::ExportDocument_Impl() if (rPageDesc.GetLandscape()) Strm().WriteCharPtr(OOO_STRING_SVTOOLS_RTF_LANDSCAPE); - const SwFormatFrmSize& rSz = rFormatPage.GetFrmSize(); + const SwFormatFrameSize& rSz = rFormatPage.GetFrameSize(); // Clipboard document is always created without a printer, then // the size will be always LONG_MAX! Solution then is to use A4 if (LONG_MAX == rSz.GetHeight() || LONG_MAX == rSz.GetWidth()) diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx index c5dda9fe66d7..9281a257f885 100644 --- a/sw/source/filter/ww8/writerhelper.cxx +++ b/sw/source/filter/ww8/writerhelper.cxx @@ -110,17 +110,17 @@ namespace } /* - Utility to convert a SwPosFlyFrms into a simple vector of ww8::Frames + Utility to convert a SwPosFlyFrames into a simple vector of ww8::Frames The crucial thing is that a ww8::Frame always has an anchor which points to some content in the document. This is a requirement of exporting to Word */ - ww8::Frames SwPosFlyFrmsToFrames(const SwPosFlyFrms &rFlys) + ww8::Frames SwPosFlyFramesToFrames(const SwPosFlyFrames &rFlys) { ww8::Frames aRet; - for(SwPosFlyFrms::const_iterator aIter(rFlys.begin()); aIter != rFlys.end(); ++aIter) + for(SwPosFlyFrames::const_iterator aIter(rFlys.begin()); aIter != rFlys.end(); ++aIter) { const SwFrameFormat &rEntry = (*aIter)->GetFormat(); @@ -165,7 +165,7 @@ namespace ww8 { //For i120928,size conversion before exporting graphic of bullet Frame::Frame(const Graphic &rGrf, const SwPosition &rPos) - : mpFlyFrm(nullptr) + : mpFlyFrame(nullptr) , maPos(rPos) , maSize() , maLayoutSize() @@ -190,7 +190,7 @@ namespace ww8 } Frame::Frame(const SwFrameFormat &rFormat, const SwPosition &rPos) - : mpFlyFrm(&rFormat) + : mpFlyFrame(&rFormat) , maPos(rPos) , maSize() , maLayoutSize() // #i43447# @@ -217,7 +217,7 @@ namespace ww8 // header/footer) - thus, get the values from the format. if ( aLayRect.IsEmpty() ) { - aRect.SetSize( rFormat.GetFrmSize().GetSize() ); + aRect.SetSize( rFormat.GetFrameSize().GetSize() ); } maLayoutSize = aRect.GetSize(); } @@ -524,8 +524,8 @@ namespace sw */ ww8::Frames GetFrames(const SwDoc &rDoc, SwPaM *pPaM /*, bool bAll*/) { - SwPosFlyFrms aFlys(rDoc.GetAllFlyFormats(pPaM, true)); - ww8::Frames aRet(SwPosFlyFrmsToFrames(aFlys)); + SwPosFlyFrames aFlys(rDoc.GetAllFlyFormats(pPaM, true)); + ww8::Frames aRet(SwPosFlyFramesToFrames(aFlys)); return aRet; } @@ -844,7 +844,7 @@ namespace sw { } - void InsertedTablesManager::DelAndMakeTableFrms() + void InsertedTablesManager::DelAndMakeTableFrames() { if (!mbHasRoot) return; @@ -862,8 +862,8 @@ namespace sw if (pFrameFormat != nullptr) { SwNodeIndex *pIndex = aIter->second; - pTable->DelFrms(); - pTable->MakeFrms(pIndex); + pTable->DelFrames(); + pTable->MakeFrames(pIndex); } } } diff --git a/sw/source/filter/ww8/writerhelper.hxx b/sw/source/filter/ww8/writerhelper.hxx index af98c92dbd0e..6c60d7760492 100644 --- a/sw/source/filter/ww8/writerhelper.hxx +++ b/sw/source/filter/ww8/writerhelper.hxx @@ -96,7 +96,7 @@ namespace ww8 public: enum WriterSource {eTextBox, eGraphic, eOle, eDrawing, eFormControl,eBulletGrf}; private: - const SwFrameFormat* mpFlyFrm; + const SwFrameFormat* mpFlyFrame; SwPosition maPos; Size maSize; // #i43447# - Size of the frame in the layout. @@ -110,7 +110,7 @@ namespace ww8 bool mbForBullet:1; Graphic maGrf; public: - Frame(const SwFrameFormat &rFlyFrm, const SwPosition &rPos); + Frame(const SwFrameFormat &rFlyFrame, const SwPosition &rPos); Frame(const Graphic&, const SwPosition &); /** Get the writer SwFrameFormat that this object describes @@ -118,7 +118,7 @@ namespace ww8 @return The wrapped SwFrameFormat */ - const SwFrameFormat &GetFrameFormat() const { return *mpFlyFrm; } + const SwFrameFormat &GetFrameFormat() const { return *mpFlyFrame; } /** Get the position this frame is anchored at @@ -179,7 +179,7 @@ namespace ww8 if (mbForBullet && rOther.mbForBullet) return (maGrf == rOther.maGrf); else if ((!mbForBullet) && (!rOther.mbForBullet)) - return (mpFlyFrm == rOther.mpFlyFrm); + return (mpFlyFrame == rOther.mpFlyFrame); return false; } diff --git a/sw/source/filter/ww8/writerwordglue.cxx b/sw/source/filter/ww8/writerwordglue.cxx index a070676b5c00..25ad1a18e046 100644 --- a/sw/source/filter/ww8/writerwordglue.cxx +++ b/sw/source/filter/ww8/writerwordglue.cxx @@ -66,7 +66,7 @@ namespace myImplHelpers height, which is totally nonoptimum, but the best we can do. */ long nDist=0; - const SwFormatFrmSize& rSz = rFormat.GetFrmSize(); + const SwFormatFrameSize& rSz = rFormat.GetFrameSize(); const SwHeaderAndFooterEatSpacingItem &rSpacingCtrl = sw::util::ItemGet<SwHeaderAndFooterEatSpacingItem> @@ -80,7 +80,7 @@ namespace myImplHelpers nDist += aRect.Height(); else { - const SwFormatFrmSize& rSize = rFormat.GetFrmSize(); + const SwFormatFrameSize& rSize = rFormat.GetFrameSize(); if (ATT_VAR_SIZE != rSize.GetHeightSizeType()) nDist += rSize.GetHeight(); else @@ -367,8 +367,8 @@ namespace sw const SwColumns& rFollowColumns = rFollowCols.GetColumns(); SvxLRSpaceItem aOneLR = lcl_getWordLRSpace(rTitleFormat); SvxLRSpaceItem aTwoLR = lcl_getWordLRSpace(rFollowFormat); - const SwFormatFrmSize& rFirstFrmSize = rTitleFormat.GetFrmSize(); - const SwFormatFrmSize& rFollowFrmSize = rFollowFormat.GetFrmSize(); + const SwFormatFrameSize& rFirstFrameSize = rTitleFormat.GetFrameSize(); + const SwFormatFrameSize& rFollowFrameSize = rFollowFormat.GetFrameSize(); if (rFirstColumns.size() != rFollowColumns.size()) { @@ -377,7 +377,7 @@ namespace sw } else if (aOneLR != aTwoLR) bPlausableSingleWordSection = false; - else if (rFirstFrmSize != rFollowFrmSize) + else if (rFirstFrameSize != rFollowFrameSize) bPlausableSingleWordSection = false; else { diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index 2da78d53c20c..648e6454fa7f 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -203,17 +203,17 @@ void SwBasicEscherEx::WriteHyperlinkWithinFly( SvMemoryStream& rStrm, const SwFo OUString tmpTextMark; OUString rUrl = pINetFormatArg->GetURL(); - OUString rTarFrm = pINetFormatArg->GetTargetFrameName(); + OUString rTarFrame = pINetFormatArg->GetTargetFrameName(); sal_uInt32 mnFlags = 0; INetURLObject aUrlObj( rUrl ); const INetProtocol eProtocol = aUrlObj.GetProtocol(); //Target Frame - if (!rTarFrm.isEmpty()) + if (!rTarFrame.isEmpty()) { - SwWW8Writer::WriteLong(tmpStrm, rTarFrm.getLength()+1); - SwWW8Writer::WriteString16(tmpStrm, rTarFrm, false); + SwWW8Writer::WriteLong(tmpStrm, rTarFrame.getLength()+1); + SwWW8Writer::WriteString16(tmpStrm, rTarFrame, false); tmpStrm.WriteUInt16( 0 ); @@ -743,7 +743,7 @@ void PlcDrawObj::WritePlc( WW8Export& rWrt ) const // the Object is not visible - so get the values from // the format. The Position may not be correct. if( aLayRect.IsEmpty() ) - aRect.SetSize( rFormat.GetFrmSize().GetSize() ); + aRect.SetSize( rFormat.GetFrameSize().GetSize() ); else { // #i56090# Do not only consider the first client @@ -1572,7 +1572,7 @@ SwBasicEscherEx::~SwBasicEscherEx() { } -void SwBasicEscherEx::WriteFrmExtraData(const SwFrameFormat&) +void SwBasicEscherEx::WriteFrameExtraData(const SwFrameFormat&) { AddAtom(4, ESCHER_ClientAnchor); GetStream().WriteUInt32( 0x80000000 ); @@ -1583,7 +1583,7 @@ void SwBasicEscherEx::WriteEmptyFlyFrame(const SwFrameFormat& rFormat, sal_uInt3 OpenContainer(ESCHER_SpContainer); AddShape(ESCHER_ShpInst_PictureFrame, 0xa00, nShapeId); // store anchor attribute - WriteFrmExtraData(rFormat); + WriteFrameExtraData(rFormat); AddAtom(6, DFF_msofbtUDefProp, 3, 1); //Prop id is 0xF122 GetStream().WriteUInt16( 0x053F ).WriteUInt32( nInlineHack ); @@ -1739,7 +1739,7 @@ sal_Int32 SwBasicEscherEx::WriteGrfFlyFrame(const SwFrameFormat& rFormat, sal_uI aPropOpt.Commit( GetStream() ); // store anchor attribute - WriteFrmExtraData( rFormat ); + WriteFrameExtraData( rFormat ); CloseContainer(); // ESCHER_SpContainer return nBorderThick; @@ -1897,7 +1897,7 @@ sal_Int32 SwBasicEscherEx::WriteOLEFlyFrame(const SwFrameFormat& rFormat, sal_uI aPropOpt.Commit(GetStream()); // store anchor attribute - WriteFrmExtraData( rFormat ); + WriteFrameExtraData( rFormat ); CloseContainer(); // ESCHER_SpContainer } @@ -2326,7 +2326,7 @@ SwEscherEx::SwEscherEx(SvStream* pStrm, WW8Export& rWW8Wrt) case ww8::Frame::eTextBox: case ww8::Frame::eOle: case ww8::Frame::eGraphic: - nBorderThick = WriteFlyFrm(*pObj, nShapeId, aSorted); + nBorderThick = WriteFlyFrame(*pObj, nShapeId, aSorted); break; case ww8::Frame::eFormControl: WriteOCXControl(rFormat, nShapeId = GenerateShapeId()); @@ -2489,7 +2489,7 @@ bool WinwordAnchoring::ConvertPosition( SwFormatHoriOrient& _iorHoriOri, // This is the case for drawing objects, which are anchored inside a page // header/footer of an *unused* page style. if ( dynamic_cast<SwAnchoredDrawObject*>(pAnchoredObj) && - !pAnchoredObj->GetAnchorFrm() ) + !pAnchoredObj->GetAnchorFrame() ) { return false; } @@ -2596,7 +2596,7 @@ bool WinwordAnchoring::ConvertPosition( SwFormatHoriOrient& _iorHoriOri, _iorHoriOri.SetRelationOrient( text::RelOrientation::PAGE_FRAME ); // #i33818# bool bRelToTableCell( false ); - aPos = pAnchoredObj->GetRelPosToPageFrm( bFollowTextFlow, + aPos = pAnchoredObj->GetRelPosToPageFrame( bFollowTextFlow, bRelToTableCell ); if ( bRelToTableCell ) { @@ -2606,7 +2606,7 @@ bool WinwordAnchoring::ConvertPosition( SwFormatHoriOrient& _iorHoriOri, else if ( eHoriConv == CONV2COL ) { _iorHoriOri.SetRelationOrient( text::RelOrientation::FRAME ); - aPos = pAnchoredObj->GetRelPosToAnchorFrm(); + aPos = pAnchoredObj->GetRelPosToAnchorFrame(); } else if ( eHoriConv == CONV2CHAR ) { @@ -2707,7 +2707,7 @@ bool WinwordAnchoring::ConvertPosition( SwFormatHoriOrient& _iorHoriOri, _iorVertOri.SetRelationOrient( text::RelOrientation::PAGE_FRAME ); // #i33818# bool bRelToTableCell( false ); - aPos = pAnchoredObj->GetRelPosToPageFrm( bFollowTextFlow, + aPos = pAnchoredObj->GetRelPosToPageFrame( bFollowTextFlow, bRelToTableCell ); if ( bRelToTableCell ) { @@ -2717,7 +2717,7 @@ bool WinwordAnchoring::ConvertPosition( SwFormatHoriOrient& _iorHoriOri, else if ( eVertConv == CONV2PARA ) { _iorVertOri.SetRelationOrient( text::RelOrientation::FRAME ); - aPos = pAnchoredObj->GetRelPosToAnchorFrm(); + aPos = pAnchoredObj->GetRelPosToAnchorFrame(); } else if ( eVertConv == CONV2LINE ) { @@ -2871,7 +2871,7 @@ void WinwordAnchoring::SetAnchoring(const SwFrameFormat& rFormat) } } -void SwEscherEx::WriteFrmExtraData( const SwFrameFormat& rFormat ) +void SwEscherEx::WriteFrameExtraData( const SwFrameFormat& rFormat ) { aWinwordAnchoring.SetAnchoring(rFormat); aWinwordAnchoring.WriteData(*this); @@ -2883,7 +2883,7 @@ void SwEscherEx::WriteFrmExtraData( const SwFrameFormat& rFormat ) GetStream().WriteInt32( 1 ); } -sal_Int32 SwEscherEx::WriteFlyFrm(const DrawObj &rObj, sal_uInt32 &rShapeId, +sal_Int32 SwEscherEx::WriteFlyFrame(const DrawObj &rObj, sal_uInt32 &rShapeId, DrawObjPointerVector &rPVec) { const SwFrameFormat &rFormat = rObj.maContent.GetFrameFormat(); @@ -3033,7 +3033,7 @@ sal_Int32 SwEscherEx::WriteTextFlyFrame(const DrawObj &rObj, sal_uInt32 nShapeId aPropOpt.Commit( GetStream() ); // store anchor attribute - WriteFrmExtraData( rFormat ); + WriteFrameExtraData( rFormat ); AddAtom( 4, ESCHER_ClientTextbox ); GetStream().WriteUInt32( nTextBox ); @@ -3090,7 +3090,7 @@ void SwEscherEx::WriteOCXControl( const SwFrameFormat& rFormat, sal_uInt32 nShap aPropOpt.Commit( GetStream() ); // store anchor attribute - WriteFrmExtraData( rFormat ); + WriteFrameExtraData( rFormat ); CloseContainer(); // ESCHER_SpContainer } diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index 84c83c94bdf9..dfafddecca55 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -199,8 +199,8 @@ SwWW8AttrIter::SwWW8AttrIter(MSWordExportBase& rWr, const SwTextNode& rTextNd) : #i2916# Get list of any graphics which may be anchored from this paragraph. */ - maFlyFrms = GetFramesInNode(rWr.m_aFrames, rNd); - std::sort(maFlyFrms.begin(), maFlyFrms.end(), sortswflys()); + maFlyFrames = GetFramesInNode(rWr.m_aFrames, rNd); + std::sort(maFlyFrames.begin(), maFlyFrames.end(), sortswflys()); /* #i18480# @@ -210,11 +210,11 @@ SwWW8AttrIter::SwWW8AttrIter(MSWordExportBase& rWr, const SwTextNode& rTextNd) : */ if (rWr.m_bInWriteEscher) { - for ( auto& aFlyFrm : maFlyFrms ) - aFlyFrm.ForceTreatAsInline(); + for ( auto& aFlyFrame : maFlyFrames ) + aFlyFrame.ForceTreatAsInline(); } - maFlyIter = maFlyFrms.begin(); + maFlyIter = maFlyFrames.begin(); if ( !m_rExport.m_pDoc->getIDocumentRedlineAccess().GetRedlineTable().empty() ) { @@ -347,7 +347,7 @@ sal_Int32 SwWW8AttrIter::SearchNext( sal_Int32 nStartPos ) character because anchors in Word appear after the character they are anchored to. */ - if (maFlyIter != maFlyFrms.end()) + if (maFlyIter != maFlyFrames.end()) { const SwPosition &rAnchor = maFlyIter->GetPosition(); @@ -510,10 +510,10 @@ void SwWW8AttrIter::OutAttr( sal_Int32 nSwPos, bool bRuby ) bool SwWW8AttrIter::IsWatermarkFrame() { - if (maFlyFrms.size() != 1) + if (maFlyFrames.size() != 1) return false; - while ( maFlyIter != maFlyFrms.end() ) + while ( maFlyIter != maFlyFrames.end() ) { const SdrObject* pSdrObj = maFlyIter->GetFrameFormat().FindRealSdrObject(); @@ -532,7 +532,7 @@ bool SwWW8AttrIter::IsAnchorLinkedToThisNode( sal_uLong nNodePos ) { ww8::FrameIter aTmpFlyIter = maFlyIter ; - while ( aTmpFlyIter != maFlyFrms.end() ) + while ( aTmpFlyIter != maFlyFrames.end() ) { const SwPosition &rAnchor = maFlyIter->GetPosition(); sal_uLong nAnchorPos = rAnchor.nNode.GetIndex(); @@ -552,7 +552,7 @@ FlyProcessingState SwWW8AttrIter::OutFlys(sal_Int32 nSwPos) // collection point to first gather info about all of the potentially linked textboxes: to be analyzed later. OUString sLinkChainName; ww8::FrameIter linkedTextboxesIter = maFlyIter; - while ( linkedTextboxesIter != maFlyFrms.end() ) + while ( linkedTextboxesIter != maFlyFrames.end() ) { uno::Reference< drawing::XShape > xShape; ww8::Frame xFrame = *linkedTextboxesIter; @@ -617,7 +617,7 @@ FlyProcessingState SwWW8AttrIter::OutFlys(sal_Int32 nSwPos) May have an anchored graphic to be placed, loop through sorted array and output all at this position */ - while ( maFlyIter != maFlyFrms.end() ) + while ( maFlyIter != maFlyFrames.end() ) { const SwPosition &rAnchor = maFlyIter->GetPosition(); const sal_Int32 nPos = rAnchor.nContent.GetIndex(); @@ -1495,7 +1495,7 @@ short MSWordExportBase::GetCurrentPageDirection() const const SwFrameFormat &rFormat = m_pAktPageDesc ? m_pAktPageDesc->GetMaster() : m_pDoc->GetPageDesc( 0 ).GetMaster(); - return rFormat.GetFrmDir().GetValue(); + return rFormat.GetFrameDir().GetValue(); } short MSWordExportBase::GetDefaultFrameDirection( ) const @@ -1506,7 +1506,7 @@ short MSWordExportBase::GetDefaultFrameDirection( ) const nDir = GetCurrentPageDirection( ); else if ( m_pOutFormatNode ) { - if ( m_bOutFlyFrmAttrs ) //frame + if ( m_bOutFlyFrameAttrs ) //frame { nDir = TrueFrameDirection( *static_cast< const SwFrameFormat * >(m_pOutFormatNode) ); } @@ -1543,7 +1543,7 @@ short MSWordExportBase::TrueFrameDirection( const SwFrameFormat &rFlyFormat ) co const SvxFrameDirectionItem* pItem = nullptr; while ( pFlyFormat ) { - pItem = &pFlyFormat->GetFrmDir(); + pItem = &pFlyFormat->GetFrameDir(); if ( FRMDIR_ENVIRONMENT == pItem->GetValue() ) { pItem = nullptr; @@ -2955,7 +2955,7 @@ void WW8AttributeOutput::OutputFlyFrame_Impl( const ww8::Frame& rFormat, const P { /* Munge flys in fly into absolutely positioned elements for word 6 */ const SwTextNode* pParTextNode = rAnch.GetContentAnchor()->nNode.GetNode().GetTextNode(); - const SwRect aPageRect = pParTextNode->FindPageFrmRect(); + const SwRect aPageRect = pParTextNode->FindPageFrameRect(); aOffset = rFrameFormat.FindLayoutRect().Pos(); aOffset -= aPageRect.Pos(); @@ -2998,7 +2998,7 @@ void AttributeOutputBase::OutputFlyFrame( const ww8::Frame& rFormat ) // get the Layout Node-Position if (FLY_AT_PAGE == rFormat.GetFrameFormat().GetAnchor().GetAnchorId()) - aLayPos = rNode.FindPageFrmRect().Pos(); + aLayPos = rNode.FindPageFrameRect().Pos(); else aLayPos = rNode.FindLayoutRect().Pos(); diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index d1d8bbfb2473..76182e223a2d 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -1777,7 +1777,7 @@ void MSWordExportBase::SaveData( sal_uLong nStt, sal_uLong nEnd ) aData.eOldAnchorType = m_eNewAnchorType; aData.bOldOutTable = m_bOutTable; - aData.bOldFlyFrmAttrs = m_bOutFlyFrmAttrs; + aData.bOldFlyFrameAttrs = m_bOutFlyFrameAttrs; aData.bOldStartTOX = m_bStartTOX; aData.bOldInWriteTOX = m_bInWriteTOX; @@ -1785,7 +1785,7 @@ void MSWordExportBase::SaveData( sal_uLong nStt, sal_uLong nEnd ) m_bOutTable = false; // Caution: bIsInTable should not be set here - m_bOutFlyFrmAttrs = false; + m_bOutFlyFrameAttrs = false; m_bStartTOX = false; m_bInWriteTOX = false; @@ -1803,7 +1803,7 @@ void MSWordExportBase::RestoreData() m_pOrigPam = rData.pOldEnd; m_bOutTable = rData.bOldOutTable; - m_bOutFlyFrmAttrs = rData.bOldFlyFrmAttrs; + m_bOutFlyFrameAttrs = rData.bOldFlyFrameAttrs; m_bStartTOX = rData.bOldStartTOX; m_bInWriteTOX = rData.bOldInWriteTOX; @@ -2035,7 +2035,7 @@ void WW8AttributeOutput::TableHeight( ww8::WW8TableNodeInfoInner::Pointer_t pTab // Zeilenhoehe ausgeben sprmTDyaRowHeight long nHeight = 0; - const SwFormatFrmSize& rLSz = pLineFormat->GetFrmSize(); + const SwFormatFrameSize& rLSz = pLineFormat->GetFrameSize(); if ( ATT_VAR_SIZE != rLSz.GetHeightSizeType() && rLSz.GetHeight() ) { if ( ATT_MIN_SIZE == rLSz.GetHeightSizeType() ) @@ -2256,7 +2256,7 @@ void AttributeOutputBase::GetTablePageSize( ww8::WW8TableNodeInfoInner * pTableT if (!pFormat) return; - const SwFormatFrmSize &rSize = pFormat->GetFrmSize(); + const SwFormatFrameSize &rSize = pFormat->GetFrameSize(); int nWidthPercent = rSize.GetWidthPercent(); bool bManualAligned = pFormat->GetHoriOrient().GetHoriOrient() == text::HoriOrientation::NONE; if ( (pFormat->GetHoriOrient().GetHoriOrient() == text::HoriOrientation::FULL) || bManualAligned ) @@ -2284,7 +2284,7 @@ void AttributeOutputBase::GetTablePageSize( ww8::WW8TableNodeInfoInner * pTableT if ( 0 == ( nPageSize = aRect.Width() ) ) { const SvxLRSpaceItem& rLR = pParentFormat->GetLRSpace(); - nPageSize = pParentFormat->GetFrmSize().GetWidth() - rLR.GetLeft() + nPageSize = pParentFormat->GetFrameSize().GetWidth() - rLR.GetLeft() - rLR.GetRight(); } } @@ -2922,7 +2922,7 @@ void MSWordExportBase::ExportDocument( bool bWriteAll ) m_nFormatCollStart = m_nCharFormatStart + m_pDoc->GetCharFormats()->size() - 1; m_bStyDef = m_bBreakBefore = m_bOutKF = - m_bOutFlyFrmAttrs = m_bOutPageDescs = m_bOutTable = m_bOutFirstPage = + m_bOutFlyFrameAttrs = m_bOutPageDescs = m_bOutTable = m_bOutFirstPage = m_bOutGrf = m_bInWriteEscher = m_bStartTOX = m_bInWriteTOX = false; @@ -3384,7 +3384,7 @@ MSWordExportBase::MSWordExportBase( SwDoc *pDocument, SwPaM *pCurrentPam, SwPaM , m_bStyDef(false) , m_bBreakBefore(false) , m_bOutKF(false) - , m_bOutFlyFrmAttrs(false) + , m_bOutFlyFrameAttrs(false) , m_bOutPageDescs(false) , m_bOutFirstPage(false) , m_bOutTable(false) diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx index 9bfb0bdb7139..834a55dbdf1f 100644 --- a/sw/source/filter/ww8/wrtww8.hxx +++ b/sw/source/filter/ww8/wrtww8.hxx @@ -437,7 +437,7 @@ struct MSWordSaveData bool bOldWriteAll : 1; ///< WW8Export only bool bOldOutTable : 1; - bool bOldFlyFrmAttrs : 1; + bool bOldFlyFrameAttrs : 1; bool bOldStartTOX : 1; bool bOldInWriteTOX : 1; // m_bOutPageDescs does not have to be saved in MSWordExportBase::SaveData @@ -536,7 +536,7 @@ public: bool m_bStyDef : 1; // should Style be written? bool m_bBreakBefore : 1; // Breaks are being written 2 times bool m_bOutKF : 1; // Header/Footer texts are being written - bool m_bOutFlyFrmAttrs : 1; // Frame-attr of Flys are being written + bool m_bOutFlyFrameAttrs : 1; // Frame-attr of Flys are being written bool m_bOutPageDescs : 1; ///< PageDescs (section properties) are being written bool m_bOutFirstPage : 1; // write Attrset of FirstPageDesc bool m_bOutTable : 1; // table is being written @@ -1324,7 +1324,7 @@ public: class GraphicDetails { public: - ww8::Frame maFly; // surrounding FlyFrms + ww8::Frame maFly; // surrounding FlyFrames sal_uLong mnPos; // FilePos of the graphics sal_uInt16 mnWid; // Width of the graphics sal_uInt16 mnHei; // Height of the graphics @@ -1462,7 +1462,7 @@ private: const SwFormatDrop &mrSwFormatDrop; - ww8::Frames maFlyFrms; // #i2916# + ww8::Frames maFlyFrames; // #i2916# ww8::FrameIter maFlyIter; sal_Int32 SearchNext( sal_Int32 nStartPos ); diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx index be42e4f531c0..476ab4fcef90 100644 --- a/sw/source/filter/ww8/wrtww8gr.cxx +++ b/sw/source/filter/ww8/wrtww8gr.cxx @@ -421,7 +421,7 @@ void WW8Export::OutGrf(const ww8::Frame &rFrame) } if (!bVert) { - SwTwips nHeight = rFlyFormat.GetFrmSize().GetHeight(); + SwTwips nHeight = rFlyFormat.GetFrameSize().GetHeight(); nHeight/=20; //nHeight was in twips, want it in half points, but //then half of total height. long nFontHeight = static_cast<const SvxFontHeightItem&>( diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index 112a125e4c7f..aec5271e00ec 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -822,11 +822,11 @@ void MSWordExportBase::OutputFormat( const SwFormat& rFormat, bool bPapFormat, b } } - m_bOutFlyFrmAttrs = true; + m_bOutFlyFrameAttrs = true; //script doesn't matter if not exporting chp OutputItemSet(aSet, true, false, i18n::ScriptType::LATIN, m_bExportModeRTF); - m_bOutFlyFrmAttrs = false; + m_bOutFlyFrameAttrs = false; bCallOutSet = false; } @@ -2925,9 +2925,9 @@ void AttributeOutputBase::TextFlyContent( const SwFormatFlyCnt& rFlyContent ) aLayPos = pTextNd->FindLayoutRect( false, &aLayPos ).Pos(); SwPosition aPos( *pTextNd ); - ww8::Frame aFrm( *rFlyContent.GetFrameFormat(), aPos ); + ww8::Frame aFrame( *rFlyContent.GetFrameFormat(), aPos ); - OutputFlyFrame_Impl( aFrm, aLayPos ); + OutputFlyFrame_Impl( aFrame, aLayPos ); } } @@ -3284,9 +3284,9 @@ void WW8AttributeOutput::ParaNumRule_Impl(const SwTextNode* /*pTextNd*/, /* File FRMATR.HXX */ -void WW8AttributeOutput::FormatFrameSize( const SwFormatFrmSize& rSize ) +void WW8AttributeOutput::FormatFrameSize( const SwFormatFrameSize& rSize ) { - if( m_rWW8Export.m_bOutFlyFrmAttrs ) // Flys + if( m_rWW8Export.m_bOutFlyFrameAttrs ) // Flys { if( m_rWW8Export.m_bOutGrf ) return; // Fly um Grafik -> Auto-Groesse @@ -3621,7 +3621,7 @@ void WW8AttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLR ) { // Flys fehlen noch ( siehe RTF ) - if ( m_rWW8Export.m_bOutFlyFrmAttrs ) // Flys + if ( m_rWW8Export.m_bOutFlyFrameAttrs ) // Flys { // sprmPDxaFromText10 m_rWW8Export.InsUInt16( NS_sprm::LN_PDxaFromText10 ); @@ -3670,7 +3670,7 @@ void WW8AttributeOutput::FormatULSpace( const SvxULSpaceItem& rUL ) { // Flys fehlen noch ( siehe RTF ) - if ( m_rWW8Export.m_bOutFlyFrmAttrs ) // Flys + if ( m_rWW8Export.m_bOutFlyFrameAttrs ) // Flys { // sprmPDyaFromText m_rWW8Export.InsUInt16( NS_sprm::LN_PDyaFromText ); @@ -3728,7 +3728,7 @@ void WW8AttributeOutput::FormatULSpace( const SvxULSpaceItem& rUL ) void WW8AttributeOutput::FormatSurround( const SwFormatSurround& rSurround ) { - if ( m_rWW8Export.m_bOutFlyFrmAttrs ) + if ( m_rWW8Export.m_bOutFlyFrameAttrs ) { m_rWW8Export.InsUInt16( NS_sprm::LN_PWr ); @@ -3741,7 +3741,7 @@ void WW8AttributeOutput::FormatVertOrientation( const SwFormatVertOrient& rFlyVe { //!!!! Ankertyp und entsprechende Umrechnung fehlt noch - if ( m_rWW8Export.m_bOutFlyFrmAttrs ) + if ( m_rWW8Export.m_bOutFlyFrameAttrs ) { short nPos; switch( rFlyVert.GetVertOrient() ) @@ -3779,7 +3779,7 @@ void WW8AttributeOutput::FormatHorizOrientation( const SwFormatHoriOrient& rFlyH } //!!!! Ankertyp und entsprechende Umrechnung fehlt noch - if ( m_rWW8Export.m_bOutFlyFrmAttrs ) + if ( m_rWW8Export.m_bOutFlyFrameAttrs ) { short nPos; switch( rFlyHori.GetHoriOrient() ) @@ -3812,7 +3812,7 @@ void WW8AttributeOutput::FormatAnchor( const SwFormatAnchor& rAnchor ) { OSL_ENSURE( m_rWW8Export.m_pParentFrame, "Anchor without mpParentFrame !!" ); - if ( m_rWW8Export.m_bOutFlyFrmAttrs ) + if ( m_rWW8Export.m_bOutFlyFrameAttrs ) { sal_uInt8 nP = 0; switch ( rAnchor.GetAnchorId() ) @@ -4134,7 +4134,7 @@ SwTwips WW8Export::CurrentPageWidth(SwTwips &rLeft, SwTwips &rRight) const : &m_pDoc->GetPageDesc(0).GetMaster(); const SvxLRSpaceItem& rLR = pFormat->GetLRSpace(); - SwTwips nPageSize = pFormat->GetFrmSize().GetWidth(); + SwTwips nPageSize = pFormat->GetFrameSize().GetWidth(); rLeft = rLR.GetLeft(); rRight = rLR.GetRight(); return nPageSize; @@ -4188,17 +4188,17 @@ void AttributeOutputBase::FormatColumns( const SwFormatCol& rCol ) const SwColumns& rColumns = rCol.GetColumns(); sal_uInt16 nCols = rColumns.size(); - if ( 1 < nCols && !GetExport( ).m_bOutFlyFrmAttrs ) + if ( 1 < nCols && !GetExport( ).m_bOutFlyFrameAttrs ) { // dann besorge mal die Seitenbreite ohne Raender !! const SwFrameFormat* pFormat = GetExport( ).m_pAktPageDesc ? &GetExport( ).m_pAktPageDesc->GetMaster() : &const_cast<const SwDoc *>(GetExport( ).m_pDoc)->GetPageDesc(0).GetMaster(); - const SvxFrameDirectionItem &frameDirection = pFormat->GetFrmDir(); + const SvxFrameDirectionItem &frameDirection = pFormat->GetFrameDir(); SwTwips nPageSize; if ( frameDirection.GetValue() == FRMDIR_VERT_TOP_RIGHT || frameDirection.GetValue() == FRMDIR_VERT_TOP_LEFT ) { const SvxULSpaceItem &rUL = pFormat->GetULSpace(); - nPageSize = pFormat->GetFrmSize().GetHeight(); + nPageSize = pFormat->GetFrameSize().GetHeight(); nPageSize -= rUL.GetUpper() + rUL.GetLower(); const SwFormatHeader *header = dynamic_cast<const SwFormatHeader *>(pFormat->GetAttrSet().GetItem(RES_HEADER)); @@ -4207,7 +4207,7 @@ void AttributeOutputBase::FormatColumns( const SwFormatCol& rCol ) const SwFrameFormat *headerFormat = header->GetHeaderFormat(); if (headerFormat) { - nPageSize -= headerFormat->GetFrmSize().GetHeight(); + nPageSize -= headerFormat->GetFrameSize().GetHeight(); } } const SwFormatFooter *footer = dynamic_cast<const SwFormatFooter *>(pFormat->GetAttrSet().GetItem(RES_FOOTER)); @@ -4216,14 +4216,14 @@ void AttributeOutputBase::FormatColumns( const SwFormatCol& rCol ) const SwFrameFormat *footerFormat = footer->GetFooterFormat(); if ( footerFormat ) { - nPageSize -= footerFormat->GetFrmSize().GetHeight(); + nPageSize -= footerFormat->GetFrameSize().GetHeight(); } } } else { const SvxLRSpaceItem &rLR = pFormat->GetLRSpace(); - nPageSize = pFormat->GetFrmSize().GetWidth(); + nPageSize = pFormat->GetFrameSize().GetWidth(); nPageSize -= rLR.GetLeft() + rLR.GetRight(); //i120133: The Section width should consider page indent value. nPageSize -= rCol.GetAdjustValue(); @@ -4420,7 +4420,7 @@ void WW8AttributeOutput::FormatFrameDirection( const SvxFrameDirectionItem& rDir nDir = m_rWW8Export.GetCurrentPageDirection(); else if ( m_rWW8Export.m_pOutFormatNode ) { - if ( m_rWW8Export.m_bOutFlyFrmAttrs ) //frame + if ( m_rWW8Export.m_bOutFlyFrameAttrs ) //frame { nDir = m_rWW8Export.TrueFrameDirection( *static_cast<const SwFrameFormat*>(m_rWW8Export.m_pOutFormatNode) ); @@ -4466,7 +4466,7 @@ void WW8AttributeOutput::FormatFrameDirection( const SvxFrameDirectionItem& rDir m_rWW8Export.InsUInt16( NS_sprm::LN_SFBiDi ); m_rWW8Export.pO->push_back( bBiDi ? 1 : 0 ); } - else if ( !m_rWW8Export.m_bOutFlyFrmAttrs ) //paragraph/style + else if ( !m_rWW8Export.m_bOutFlyFrameAttrs ) //paragraph/style { m_rWW8Export.InsUInt16( NS_sprm::LN_PFBiDi ); m_rWW8Export.pO->push_back( bBiDi ? 1 : 0 ); @@ -4965,7 +4965,7 @@ void AttributeOutputBase::OutputItem( const SfxPoolItem& rHt ) break; case RES_FRM_SIZE: - FormatFrameSize( static_cast< const SwFormatFrmSize& >( rHt ) ); + FormatFrameSize( static_cast< const SwFormatFrameSize& >( rHt ) ); break; case RES_PAPER_BIN: FormatPaperBin( static_cast< const SvxPaperBinItem& >( rHt ) ); diff --git a/sw/source/filter/ww8/ww8attributeoutput.hxx b/sw/source/filter/ww8/ww8attributeoutput.hxx index f3c0b9af7b9b..1a1f1d6fdf6f 100644 --- a/sw/source/filter/ww8/ww8attributeoutput.hxx +++ b/sw/source/filter/ww8/ww8attributeoutput.hxx @@ -356,7 +356,7 @@ protected: virtual void ParaSnapToGrid( const SvxParaGridItem& ) override; /// Sfx item RES_FRM_SIZE - virtual void FormatFrameSize( const SwFormatFrmSize& ) override; + virtual void FormatFrameSize( const SwFormatFrameSize& ) override; /// Sfx item RES_PAPER_BIN virtual void FormatPaperBin( const SvxPaperBinItem& ) override; diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx index e937f314beab..7458609689f6 100644 --- a/sw/source/filter/ww8/ww8graf.cxx +++ b/sw/source/filter/ww8/ww8graf.cxx @@ -1457,15 +1457,15 @@ void SwWW8ImplReader::ReadGrafLayer1( WW8PLCFspecial* pPF, long nGrafAnchorCp ) aSet.Put(SwFormatVertOrient(aRect.Top(), text::VertOrientation::NONE, aVertRelOriTab[ nYAlign ])); - SwFrameFormat *pFrm = m_rDoc.getIDocumentContentOperations().InsertDrawObj( *m_pPaM, *pObject, aSet ); + SwFrameFormat *pFrame = m_rDoc.getIDocumentContentOperations().InsertDrawObj( *m_pPaM, *pObject, aSet ); pObject->SetMergedItemSet(aSet); - if (dynamic_cast< const SwDrawFrameFormat *>( pFrm ) != nullptr) + if (dynamic_cast< const SwDrawFrameFormat *>( pFrame ) != nullptr) { - static_cast<SwDrawFrameFormat*>(pFrm)->PosAttrSet(); + static_cast<SwDrawFrameFormat*>(pFrame)->PosAttrSet(); } - AddAutoAnchor(pFrm); + AddAutoAnchor(pFrame); } } } @@ -1622,7 +1622,7 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj, /* am Rahmen zu setzende Frame-Attribute ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - SwFormatFrmSize falls noch nicht gesetzt, hier setzen + SwFormatFrameSize falls noch nicht gesetzt, hier setzen SvxLRSpaceItem hier setzen SvxULSpaceItem hier setzen SvxOpaqueItem (Derzeit bei Rahmen nicht moeglich! khz 10.2.1999) @@ -1720,21 +1720,21 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj, bool bFixSize = !(WW8ITEMVALUE(rOldSet, SDRATTR_TEXT_AUTOGROWHEIGHT, SdrOnOffItem)); - // Size: SwFormatFrmSize + // Size: SwFormatFrameSize if( SfxItemState::SET != rFlySet.GetItemState(RES_FRM_SIZE, false) ) { const Rectangle& rSnapRect = pSdrObj->GetSnapRect(); // if necessary adapt width and position of the framework: The // recorded interior is to remain equally large despite thick edges. - rFlySet.Put( SwFormatFrmSize(bFixSize ? ATT_FIX_SIZE : ATT_VAR_SIZE, + rFlySet.Put( SwFormatFrameSize(bFixSize ? ATT_FIX_SIZE : ATT_VAR_SIZE, rSnapRect.GetWidth() + 2*nOutside, rSnapRect.GetHeight() + 2*nOutside) ); } else // If a size is set, adjust it to consider border thickness { - SwFormatFrmSize aSize = static_cast<const SwFormatFrmSize &>(rFlySet.Get(RES_FRM_SIZE)); + SwFormatFrameSize aSize = static_cast<const SwFormatFrameSize &>(rFlySet.Get(RES_FRM_SIZE)); - SwFormatFrmSize aNewSize = SwFormatFrmSize(bFixSize ? ATT_FIX_SIZE : ATT_VAR_SIZE, + SwFormatFrameSize aNewSize = SwFormatFrameSize(bFixSize ? ATT_FIX_SIZE : ATT_VAR_SIZE, aSize.GetWidth() + 2*nOutside, aSize.GetHeight() + 2*nOutside); aNewSize.SetWidthSizeType(aSize.GetWidthSizeType()); @@ -2628,7 +2628,7 @@ SwFrameFormat* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp ) sal_uInt16 nCount = pObject->GetUserDataCount(); if(nCount) { - OUString lnName, aObjName, aTarFrm; + OUString lnName, aObjName, aTarFrame; for (sal_uInt16 i = 0; i < nCount; i++ ) { SdrObjUserData* pData = pObject->GetUserData( i ); @@ -2643,7 +2643,7 @@ SwFrameFormat* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp ) { lnName = macInf->GetHlink(); aObjName = macInf->GetName(); - aTarFrm = macInf->GetTarFrm(); + aTarFrame = macInf->GetTarFrame(); break; } } @@ -2653,8 +2653,8 @@ SwFrameFormat* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp ) pFormatURL->SetURL( lnName, false ); if (!aObjName.isEmpty()) pFormatURL->SetName(aObjName); - if (!aTarFrm.isEmpty()) - pFormatURL->SetTargetFrameName(aTarFrm); + if (!aTarFrame.isEmpty()) + pFormatURL->SetTargetFrameName(aTarFrame); pFormatURL->SetMap(nullptr); aFlySet.Put(*pFormatURL); } @@ -2892,9 +2892,9 @@ SwFlyFrameFormat* SwWW8ImplReader::ConvertDrawTextToFly(SdrObject* &rpObject, Rectangle aInnerDist(pRecord->nDxTextLeft, pRecord->nDyTextTop, pRecord->nDxTextRight, pRecord->nDyTextBottom); - SwFormatFrmSize aFrmSize(ATT_FIX_SIZE, pF->nXaRight - pF->nXaLeft, pF->nYaBottom - pF->nYaTop); - aFrmSize.SetWidthSizeType(pRecord->bAutoWidth ? ATT_VAR_SIZE : ATT_FIX_SIZE); - rFlySet.Put(aFrmSize); + SwFormatFrameSize aFrameSize(ATT_FIX_SIZE, pF->nXaRight - pF->nXaLeft, pF->nYaBottom - pF->nYaTop); + aFrameSize.SetWidthSizeType(pRecord->bAutoWidth ? ATT_VAR_SIZE : ATT_FIX_SIZE); + rFlySet.Put(aFrameSize); MatchSdrItemsIntoFlySet( rpObject, rFlySet, pRecord->eLineStyle, pRecord->eLineDashing, pRecord->eShapeType, aInnerDist ); @@ -3008,7 +3008,7 @@ SwFlyFrameFormat* SwWW8ImplReader::ImportReplaceableDrawables( SdrObject* &rpObj ProcessEscherAlign(pRecord, pF, rFlySet, true); - rFlySet.Put(SwFormatFrmSize(ATT_FIX_SIZE, nWidthTw, nHeightTw)); + rFlySet.Put(SwFormatFrameSize(ATT_FIX_SIZE, nWidthTw, nHeightTw)); SfxItemSet aGrSet(m_rDoc.GetAttrPool(), RES_GRFATR_BEGIN, RES_GRFATR_END-1); diff --git a/sw/source/filter/ww8/ww8graf2.cxx b/sw/source/filter/ww8/ww8graf2.cxx index 09c13885fab1..194e2105d511 100644 --- a/sw/source/filter/ww8/ww8graf2.cxx +++ b/sw/source/filter/ww8/ww8graf2.cxx @@ -366,7 +366,7 @@ SwFlyFrameFormat* SwWW8ImplReader::MakeGrafNotInContent(const WW8PicDesc& rPD, aAnchor.SetAnchor(m_pPaM->GetPoint()); aFlySet.Put(aAnchor); - aFlySet.Put( SwFormatFrmSize( ATT_FIX_SIZE, nWidth, nHeight ) ); + aFlySet.Put( SwFormatFrameSize( ATT_FIX_SIZE, nWidth, nHeight ) ); SwFlyFrameFormat* pFlyFormat = m_rDoc.getIDocumentContentOperations().Insert(*m_pPaM, rFileName, OUString(), pGraph, &aFlySet, &rGrfSet, nullptr); @@ -375,7 +375,7 @@ SwFlyFrameFormat* SwWW8ImplReader::MakeGrafNotInContent(const WW8PicDesc& rPD, if (m_rDoc.getIDocumentLayoutAccess().GetCurrentViewShell() && (FLY_AT_PARA == pFlyFormat->GetAnchor().GetAnchorId())) { - pFlyFormat->MakeFrms(); + pFlyFormat->MakeFrames(); } return pFlyFormat; } @@ -602,7 +602,7 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj, // Set the size from the WinWord PIC-structure as graphic // size - aAttrSet.Put( SwFormatFrmSize( ATT_FIX_SIZE, aPD.nWidth, + aAttrSet.Put( SwFormatFrameSize( ATT_FIX_SIZE, aPD.nWidth, aPD.nHeight ) ); } diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 0fe320c3aa25..84512a5297ad 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -302,9 +302,9 @@ void SwWW8ImplReader::ReadEmbeddedData( SvMemoryStream& rStrm, SwDocShell* pDocS // target frame if( ::get_flag( nFlags, WW8_HLINK_FRAME ) ) { - OUString sFrmName; - lclAppendString32(sFrmName, rStrm, true); - hlStr.tarFrm = sFrmName; + OUString sFrameName; + lclAppendString32(sFrameName, rStrm, true); + hlStr.tarFrame = sFrameName; } // UNC path @@ -1174,8 +1174,8 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt, { pInfo->SetShapeId( rObjData.nShapeId ); pInfo->SetHlink( hlStr.hLinkAddr ); - if (!hlStr.tarFrm.isEmpty()) - pInfo->SetTarFrm( hlStr.tarFrm ); + if (!hlStr.tarFrame.isEmpty()) + pInfo->SetTarFrame( hlStr.tarFrame ); OUString aNameStr = GetPropertyString( DFF_Prop_wzName, rSt ); if (!aNameStr.isEmpty()) pInfo->SetName( aNameStr ); @@ -1493,18 +1493,18 @@ void SwWW8FltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, SwPaM aRegion(rTmpPos); if (rEntry.MakeRegion(pDoc, aRegion, false)) { - SwFrameFormat *pFrm; + SwFrameFormat *pFrame; // If we have just one single inline graphic then // don't insert a field for the single frame, set // the frames hyperlink field attribute directly. - if (nullptr != (pFrm = SwWW8ImplReader::ContainsSingleInlineGraphic(aRegion))) + if (nullptr != (pFrame = SwWW8ImplReader::ContainsSingleInlineGraphic(aRegion))) { const SwFormatINetFormat *pAttr = static_cast<const SwFormatINetFormat *>( rEntry.pAttr); SwFormatURL aURL; aURL.SetURL(pAttr->GetValue(), false); aURL.SetTargetFrameName(pAttr->GetTargetFrame()); - pFrm->SetFormatAttr(aURL); + pFrame->SetFormatAttr(aURL); } else { @@ -2117,14 +2117,14 @@ void WW8ReaderSave::Restore( SwWW8ImplReader* pRdr ) pRdr->m_bFirstPara = mbFirstPara; // Close all attributes as attributes could be created that extend the Fly - pRdr->DeleteCtrlStk(); + pRdr->DeleteCtrlStack(); pRdr->m_pCtrlStck = mpOldStck; pRdr->m_pRedlineStack->closeall(*pRdr->m_pPaM->GetPoint()); delete pRdr->m_pRedlineStack; pRdr->m_pRedlineStack = mpOldRedlines; - pRdr->DeleteAnchorStk(); + pRdr->DeleteAnchorStack(); pRdr->m_pAnchorStck = mpOldAnchorStck; *pRdr->m_pPaM->GetPoint() = maTmpPos; @@ -2246,22 +2246,22 @@ void SwWW8ImplReader::Read_HdFtTextAsHackedFrame(WW8_CP nStart, WW8_CP nLen, SwFormatAnchor aAnch( pFrame->GetAnchor() ); aAnch.SetType( FLY_AT_PARA ); pFrame->SetFormatAttr( aAnch ); - SwFormatFrmSize aSz(ATT_MIN_SIZE, nPageWidth, MINLAY); - SwFrmSize eFrmSize = ATT_MIN_SIZE; - if( eFrmSize != aSz.GetWidthSizeType() ) - aSz.SetWidthSizeType( eFrmSize ); + SwFormatFrameSize aSz(ATT_MIN_SIZE, nPageWidth, MINLAY); + SwFrameSize eFrameSize = ATT_MIN_SIZE; + if( eFrameSize != aSz.GetWidthSizeType() ) + aSz.SetWidthSizeType( eFrameSize ); pFrame->SetFormatAttr(aSz); pFrame->SetFormatAttr(SwFormatSurround(SURROUND_THROUGHT)); pFrame->SetFormatAttr(SwFormatHoriOrient(0, text::HoriOrientation::LEFT)); //iFOO // #i43427# - send frame for header/footer into background. pFrame->SetFormatAttr( SvxOpaqueItem( RES_OPAQUE, false ) ); - SdrObject* pFrmObj = CreateContactObject( pFrame ); - OSL_ENSURE( pFrmObj, + SdrObject* pFrameObj = CreateContactObject( pFrame ); + OSL_ENSURE( pFrameObj, "<SwWW8ImplReader::Read_HdFtTextAsHackedFrame(..)> - missing SdrObject instance" ); - if ( pFrmObj ) + if ( pFrameObj ) { - pFrmObj->SetOrdNum( 0L ); + pFrameObj->SetOrdNum( 0L ); } MoveInsideFly(pFrame); @@ -4275,10 +4275,10 @@ SwWW8ImplReader::SwWW8ImplReader(sal_uInt8 nVersionPara, SotStorage* pStorage, m_pStrm->SetEndian( SvStreamEndian::LITTLE ); m_aApos.push_back(false); - mpCrsr = m_rDoc.CreateUnoCrsr(rPos); + mpCursor = m_rDoc.CreateUnoCursor(rPos); } -void SwWW8ImplReader::DeleteStk(SwFltControlStack* pStck) +void SwWW8ImplReader::DeleteStack(SwFltControlStack* pStck) { if( pStck ) { @@ -4934,7 +4934,7 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss) pDocShell->SetReadOnlyUI(); } - m_pPaM = mpCrsr.get(); + m_pPaM = mpCursor.get(); m_pCtrlStck = new SwWW8FltControlStack( &m_rDoc, m_nFieldFlags, *this ); @@ -5258,7 +5258,7 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss) eMode |= nsRedlineMode_t::REDLINE_SHOW_DELETE; } - m_aInsertedTables.DelAndMakeTableFrms(); + m_aInsertedTables.DelAndMakeTableFrames(); m_aSectionManager.InsertSegments(); m_vColl.clear(); @@ -5280,11 +5280,11 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss) m_pDataStream = nullptr; m_pTableStream = nullptr; - DeleteCtrlStk(); + DeleteCtrlStack(); m_pRedlineStack->closeall(*m_pPaM->GetPoint()); delete m_pRedlineStack; - DeleteAnchorStk(); - DeleteRefStks(); + DeleteAnchorStack(); + DeleteRefStacks(); // For i120928,achieve the graphics from the special bookmark with is for graphic bullet { @@ -5370,7 +5370,7 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss) SAL_WARN_IF(m_pTableEndPaM, "sw.ww8", "document ended without table ending"); m_pTableEndPaM.reset(); //ensure this is deleted before pPaM - mpCrsr.reset(); + mpCursor.reset(); m_pPaM = nullptr; m_pLastAnchorPos.reset();//ensure this is deleted before UpdatePageDescs diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index ab3bd028e3ad..0d2fb99a0fcf 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -525,8 +525,8 @@ public: void SetHlink( const OUString& rHlink ) { maHlink = rHlink; } const OUString& GetHlink() const { return maHlink; } - void SetTarFrm( const OUString& rTarFrm ) { maTarFrm = rTarFrm; } - const OUString& GetTarFrm() const { return maTarFrm; } + void SetTarFrame( const OUString& rTarFrame ) { maTarFrame = rTarFrame; } + const OUString& GetTarFrame() const { return maTarFrame; } void SetShapeId( const sal_Int32& rShapeId ) { mnShapeId = rShapeId; } const sal_Int32& GetShapeId() const { return mnShapeId; } void SetName( const OUString& rName ) { maNameStr = rName; } @@ -536,13 +536,13 @@ private: sal_Int32 mnShapeId; OUString maHlink; OUString maNameStr; - OUString maTarFrm; + OUString maTarFrame; }; struct HyperLinksTable { OUString hLinkAddr; - OUString tarFrm; + OUString tarFrame; }; namespace sw @@ -1091,7 +1091,7 @@ private: // general stuff SwDoc& m_rDoc; - std::shared_ptr<SwUnoCrsr> mpCrsr; + std::shared_ptr<SwUnoCursor> mpCursor; SwPaM* m_pPaM; SwWW8FltControlStack* m_pCtrlStck; // stack for the attributes @@ -1395,16 +1395,16 @@ private: void CopyPageDescHdFt( const SwPageDesc* pOrgPageDesc, SwPageDesc* pNewPageDesc, sal_uInt8 nCode ); - void DeleteStk(SwFltControlStack* prStck); - void DeleteCtrlStk() { DeleteStk( m_pCtrlStck ); m_pCtrlStck = nullptr; } - void DeleteRefStks() + void DeleteStack(SwFltControlStack* prStck); + void DeleteCtrlStack() { DeleteStack( m_pCtrlStck ); m_pCtrlStck = nullptr; } + void DeleteRefStacks() { - DeleteStk( m_pReffedStck ); + DeleteStack( m_pReffedStck ); m_pReffedStck = nullptr; - DeleteStk( m_pReffingStck ); + DeleteStack( m_pReffingStck ); m_pReffingStck = nullptr; } - void DeleteAnchorStk() { DeleteStk( m_pAnchorStck ); m_pAnchorStck = nullptr; } + void DeleteAnchorStack() { DeleteStack( m_pAnchorStck ); m_pAnchorStck = nullptr; } void emulateMSWordAddTextToParagraph(const OUString& rAddString); void simpleAddTextToParagraph(const OUString& rAddString); bool HandlePageBreakChar(); diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index daaeee6fd16f..3501d63d1911 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -2306,7 +2306,7 @@ void WW8TabDesc::SetSizePosition(SwFrameFormat* pFrameFormat) pApply->SetFormatAttr(aItemSet); if (pFrameFormat) { - SwFormatFrmSize aSize = pFrameFormat->GetFrmSize(); + SwFormatFrameSize aSize = pFrameFormat->GetFrameSize(); aSize.SetHeightSizeType(ATT_MIN_SIZE); aSize.SetHeight(MINLAY); pFrameFormat->SetFormatAttr(aSize); @@ -2418,8 +2418,8 @@ void WW8TabDesc::CreateSwTable(SvxULSpaceItem* pULSpaceItem) // total width of table if( nMaxRight - nMinLeft > MINLAY * nDefaultSwCols ) { - pTable->GetFrameFormat()->SetFormatAttr(SwFormatFrmSize(ATT_FIX_SIZE, nSwWidth)); - aItemSet.Put(SwFormatFrmSize(ATT_FIX_SIZE, nSwWidth)); + pTable->GetFrameFormat()->SetFormatAttr(SwFormatFrameSize(ATT_FIX_SIZE, nSwWidth)); + aItemSet.Put(SwFormatFrameSize(ATT_FIX_SIZE, nSwWidth)); } SvxFrameDirectionItem aDirection( @@ -3098,7 +3098,7 @@ void WW8TabDesc::AdjustNewBand() if( bClaimLineFormat ) { pTabLine->ClaimFrameFormat(); // necessary because of cell height - SwFormatFrmSize aF( ATT_MIN_SIZE, 0, 0 ); // default + SwFormatFrameSize aF( ATT_MIN_SIZE, 0, 0 ); // default if (pActBand->nLineHeight == 0) // 0 = Auto aF.SetHeightSizeType( ATT_VAR_SIZE ); @@ -3125,7 +3125,7 @@ void WW8TabDesc::AdjustNewBand() short i; // SW-Index short j; // WW-Index short nW; // Width - SwFormatFrmSize aFS( ATT_FIX_SIZE ); + SwFormatFrameSize aFS( ATT_FIX_SIZE ); j = pActBand->bLEmptyCol ? -1 : 0; for( i = 0; i < pActBand->nSwCols; i++ ) @@ -4512,14 +4512,14 @@ void WW8RStyle::Import() rtl_TextEncoding SwWW8StyInf::GetCharSet() const { - if ((m_pFormat) && (m_pFormat->GetFrmDir().GetValue() == FRMDIR_HORI_RIGHT_TOP)) + if ((m_pFormat) && (m_pFormat->GetFrameDir().GetValue() == FRMDIR_HORI_RIGHT_TOP)) return m_eRTLFontSrcCharSet; return m_eLTRFontSrcCharSet; } rtl_TextEncoding SwWW8StyInf::GetCJKCharSet() const { - if ((m_pFormat) && (m_pFormat->GetFrmDir().GetValue() == FRMDIR_HORI_RIGHT_TOP)) + if ((m_pFormat) && (m_pFormat->GetFrameDir().GetValue() == FRMDIR_HORI_RIGHT_TOP)) return m_eRTLFontSrcCharSet; return m_eCJKFontSrcCharSet; } diff --git a/sw/source/filter/ww8/ww8par2.hxx b/sw/source/filter/ww8/ww8par2.hxx index 4b508e5f995e..7f14316d932d 100644 --- a/sw/source/filter/ww8/ww8par2.hxx +++ b/sw/source/filter/ww8/ww8par2.hxx @@ -34,7 +34,7 @@ class WW8RStyle; class WW8DupProperties { public: - WW8DupProperties(SwDoc &rDoc, SwWW8FltControlStack *pStk); + WW8DupProperties(SwDoc &rDoc, SwWW8FltControlStack *pStack); void Insert(const SwPosition &rPos); private: WW8DupProperties(const WW8DupProperties&) = delete; @@ -54,7 +54,7 @@ struct WW8SwFlyPara sal_Int16 nWidth, nHeight; // size sal_Int16 nNetWidth; - SwFrmSize eHeightFix; // height fixed or min + SwFrameSize eHeightFix; // height fixed or min RndStdIds eAnchor; // binding short eHRel; // page or page border short eVRel; // page or page border diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx index 586be7d8758e..ff437e345eec 100644 --- a/sw/source/filter/ww8/ww8par4.cxx +++ b/sw/source/filter/ww8/ww8par4.cxx @@ -272,7 +272,7 @@ SwFrameFormat* SwWW8ImplReader::ImportOle(const Graphic* pGrf, const Size aSizeTwip = OutputDevice::LogicToLogic( aGraph.GetPrefSize(), aGraph.GetPrefMapMode(), MAP_TWIP ); - pTempSet->Put( SwFormatFrmSize( ATT_FIX_SIZE, aSizeTwip.Width(), + pTempSet->Put( SwFormatFrameSize( ATT_FIX_SIZE, aSizeTwip.Width(), aSizeTwip.Height() ) ); pTempSet->Put( SwFormatVertOrient( 0, text::VertOrientation::TOP, text::RelOrientation::FRAME )); @@ -380,8 +380,8 @@ SdrObject* SwWW8ImplReader::ImportOleBase( Graphic& rGraph, if (pFlySet) { - if (const SwFormatFrmSize* pSize = - static_cast<const SwFormatFrmSize*>(pFlySet->GetItem(RES_FRM_SIZE, false))) + if (const SwFormatFrameSize* pSize = + static_cast<const SwFormatFrameSize*>(pFlySet->GetItem(RES_FRM_SIZE, false))) { aRect.SetSize(pSize->GetSize()); } diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 092c694124df..79ecd45b4215 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -215,12 +215,12 @@ void SwWW8ImplReader::SetDocumentGrid(SwFrameFormat &rFormat, const wwSection &r rFormat.SetFormatAttr(SvxFrameDirectionItem(rSection.meDir, RES_FRAMEDIR)); - SwTwips nTextareaHeight = rFormat.GetFrmSize().GetHeight(); + SwTwips nTextareaHeight = rFormat.GetFrameSize().GetHeight(); const SvxULSpaceItem &rUL = ItemGet<SvxULSpaceItem>(rFormat, RES_UL_SPACE); nTextareaHeight -= rUL.GetUpper(); nTextareaHeight -= rUL.GetLower(); - SwTwips nTextareaWidth = rFormat.GetFrmSize().GetWidth(); + SwTwips nTextareaWidth = rFormat.GetFrameSize().GetWidth(); const SvxLRSpaceItem &rLR = ItemGet<SvxLRSpaceItem>(rFormat, RES_LR_SPACE); nTextareaWidth -= rLR.GetLeft(); nTextareaWidth -= rLR.GetRight(); @@ -418,7 +418,7 @@ void wwSectionManager::SetPage(SwPageDesc &rInPageDesc, SwFrameFormat &rFormat, rInPageDesc.SetLandscape(rSection.IsLandScape()); // 2. paper size - SwFormatFrmSize aSz( rFormat.GetFrmSize() ); + SwFormatFrameSize aSz( rFormat.GetFrameSize() ); aSz.SetWidth(rSection.GetPageWidth()); aSz.SetHeight(SvxPaperInfo::GetSloppyPaperDimension(rSection.GetPageHeight())); rFormat.SetFormatAttr(aSz); @@ -589,7 +589,7 @@ void wwSectionManager::SetPageULSpaceItems(SwFrameFormat &rFormat, SvxULSpaceItem aHdUL(pHdFormat->GetULSpace()); if (!rSection.IsFixedHeightHeader()) //normal { - pHdFormat->SetFormatAttr(SwFormatFrmSize(ATT_MIN_SIZE, 0, rData.nSwHLo)); + pHdFormat->SetFormatAttr(SwFormatFrameSize(ATT_MIN_SIZE, 0, rData.nSwHLo)); // #i19922# - minimum page header height is now 1mm // use new constant <cMinHdFtHeight> aHdUL.SetLower( writer_cast<sal_uInt16>(rData.nSwHLo - cMinHdFtHeight) ); @@ -600,7 +600,7 @@ void wwSectionManager::SetPageULSpaceItems(SwFrameFormat &rFormat, { // #i48832# - set correct spacing between header and body. const SwTwips nHdLowerSpace( std::abs(rSection.maSep.dyaTop) - rData.nSwUp - rData.nSwHLo ); - pHdFormat->SetFormatAttr(SwFormatFrmSize(ATT_FIX_SIZE, 0, rData.nSwHLo + nHdLowerSpace)); + pHdFormat->SetFormatAttr(SwFormatFrameSize(ATT_FIX_SIZE, 0, rData.nSwHLo + nHdLowerSpace)); aHdUL.SetLower( static_cast< sal_uInt16 >(nHdLowerSpace) ); pHdFormat->SetFormatAttr(SwHeaderAndFooterEatSpacingItem( RES_HEADER_FOOTER_EAT_SPACING, false)); @@ -616,7 +616,7 @@ void wwSectionManager::SetPageULSpaceItems(SwFrameFormat &rFormat, SvxULSpaceItem aFtUL(pFtFormat->GetULSpace()); if (!rSection.IsFixedHeightFooter()) //normal { - pFtFormat->SetFormatAttr(SwFormatFrmSize(ATT_MIN_SIZE, 0, rData.nSwFUp)); + pFtFormat->SetFormatAttr(SwFormatFrameSize(ATT_MIN_SIZE, 0, rData.nSwFUp)); // #i19922# - minimum page header height is now 1mm // use new constant <cMinHdFtHeight> aFtUL.SetUpper( writer_cast<sal_uInt16>(rData.nSwFUp - cMinHdFtHeight) ); @@ -627,7 +627,7 @@ void wwSectionManager::SetPageULSpaceItems(SwFrameFormat &rFormat, { // #i48832# - set correct spacing between footer and body. const SwTwips nFtUpperSpace( std::abs(rSection.maSep.dyaBottom) - rData.nSwLo - rData.nSwFUp ); - pFtFormat->SetFormatAttr(SwFormatFrmSize(ATT_FIX_SIZE, 0, rData.nSwFUp + nFtUpperSpace)); + pFtFormat->SetFormatAttr(SwFormatFrameSize(ATT_FIX_SIZE, 0, rData.nSwFUp + nFtUpperSpace)); aFtUL.SetUpper( static_cast< sal_uInt16 >(nFtUpperSpace) ); pFtFormat->SetFormatAttr(SwHeaderAndFooterEatSpacingItem( RES_HEADER_FOOTER_EAT_SPACING, false)); @@ -2061,7 +2061,7 @@ WW8FlySet::WW8FlySet(SwWW8ImplReader& rReader, const WW8FlyPara* pFW, //types of frames, the left right thickness and space makes //it wider, but the top bottom spacing and border thickness //is placed inside. - Put( SwFormatFrmSize( pFS->eHeightFix, pFS->nWidth + + Put( SwFormatFrameSize( pFS->eHeightFix, pFS->nWidth + aSizeArray[WW8_LEFT] + aSizeArray[WW8_RIGHT], pFS->nHeight)); } @@ -2097,7 +2097,7 @@ WW8FlySet::WW8FlySet( SwWW8ImplReader& rReader, const SwPaM* pPaM, aSizeArray[WW8_BOT]*=2; } - Put( SwFormatFrmSize( ATT_FIX_SIZE, nWidth+aSizeArray[WW8_LEFT]+ + Put( SwFormatFrameSize( ATT_FIX_SIZE, nWidth+aSizeArray[WW8_LEFT]+ aSizeArray[WW8_RIGHT], nHeight+aSizeArray[WW8_TOP] + aSizeArray[WW8_BOT]) ); } @@ -2121,8 +2121,8 @@ void WW8FlySet::Init(const SwWW8ImplReader& rReader, const SwPaM* pPaM) Put(SwFormatVertOrient(0, text::VertOrientation::TOP, text::RelOrientation::FRAME)); } -WW8DupProperties::WW8DupProperties(SwDoc &rDoc, SwWW8FltControlStack *pStk) - : pCtrlStck(pStk), +WW8DupProperties::WW8DupProperties(SwDoc &rDoc, SwWW8FltControlStack *pStack) + : pCtrlStck(pStack), aChrSet(rDoc.GetAttrPool(), RES_CHRATR_BEGIN, RES_CHRATR_END - 1 ), aParSet(rDoc.GetAttrPool(), RES_PARATR_BEGIN, RES_PARATR_END - 1 ) { @@ -2234,7 +2234,7 @@ SwTwips SwWW8ImplReader::MoveOutsideFly(SwFrameFormat *pFlyFormat, if (pTableFormat) { - SwFormatFrmSize aSize = pTableFormat->GetFrmSize(); + SwFormatFrameSize aSize = pTableFormat->GetFrameSize(); aSize.SetHeightSizeType(ATT_MIN_SIZE); aSize.SetHeight(MINLAY); pFlyFormat->SetFormatAttr(aSize); @@ -2540,7 +2540,7 @@ void SwWW8ImplReader::StopApo() if (m_pSFlyPara->pFlyFormat) m_pSFlyPara->pFlyFormat->SetFormatAttr(SvxBrushItem(aBg, RES_BACKGROUND)); - DeleteAnchorStk(); + DeleteAnchorStack(); m_pAnchorStck = m_pSFlyPara->pOldAnchorStck; // When inserting a graphic into the fly frame using the auto @@ -2552,7 +2552,7 @@ void SwWW8ImplReader::StopApo() long nW = m_pSFlyPara->nNewNetWidth; nW += m_pSFlyPara->nWidth - m_pSFlyPara->nNetWidth; // border for it m_pSFlyPara->pFlyFormat->SetFormatAttr( - SwFormatFrmSize( m_pSFlyPara->eHeightFix, nW, m_pSFlyPara->nHeight ) ); + SwFormatFrameSize( m_pSFlyPara->eHeightFix, nW, m_pSFlyPara->nHeight ) ); } /* Word set *no* width meaning its an automatic width. The @@ -2567,14 +2567,14 @@ void SwWW8ImplReader::StopApo() using namespace sw::util; SfxItemSet aFlySet( m_pSFlyPara->pFlyFormat->GetAttrSet() ); - SwFormatFrmSize aSize(ItemGet<SwFormatFrmSize>(aFlySet, RES_FRM_SIZE)); + SwFormatFrameSize aSize(ItemGet<SwFormatFrameSize>(aFlySet, RES_FRM_SIZE)); aFlySet.ClearItem(RES_FRM_SIZE); CalculateFlySize(aFlySet, m_pSFlyPara->pMainTextPos->nNode, m_pSFlyPara->nWidth); - nNewWidth = ItemGet<SwFormatFrmSize>(aFlySet, RES_FRM_SIZE).GetWidth(); + nNewWidth = ItemGet<SwFormatFrameSize>(aFlySet, RES_FRM_SIZE).GetWidth(); aSize.SetWidth(nNewWidth); aSize.SetWidthSizeType(ATT_VAR_SIZE); @@ -2583,8 +2583,8 @@ void SwWW8ImplReader::StopApo() } delete m_pSFlyPara->pMainTextPos, m_pSFlyPara->pMainTextPos = nullptr; -// To create the SwFrms when inserting into an existing document, fltshell.cxx -// will call pFlyFrm->MakeFrms() when setting the FltAnchor attribute +// To create the SwFrames when inserting into an existing document, fltshell.cxx +// will call pFlyFrame->MakeFrames() when setting the FltAnchor attribute } diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index aeb5f9782a24..f19243d523b0 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -4601,7 +4601,7 @@ WW8PLCFMan::WW8PLCFMan(WW8ScannerBase* pBase, ManTypes nType, long nStartCp, p->nCp2OrIdx = 0; p->bFirstSprm = false; - p->pIdStk = nullptr; + p->pIdStack = nullptr; if ((p == pChp) || (p == pPap)) p->nStartPos = p->nEndPos = nStartCp; @@ -4622,7 +4622,7 @@ WW8PLCFMan::WW8PLCFMan(WW8ScannerBase* pBase, ManTypes nType, long nStartCp, if( p->pPLCFx->IsSprm() ) { // Careful: nEndPos must be - p->pIdStk = new std::stack<sal_uInt16>; + p->pIdStack = new std::stack<sal_uInt16>; if ((p == pChp) || (p == pPap)) { WW8_CP nTemp = p->nEndPos+p->nCpOfs; @@ -4645,7 +4645,7 @@ WW8PLCFMan::WW8PLCFMan(WW8ScannerBase* pBase, ManTypes nType, long nStartCp, WW8PLCFMan::~WW8PLCFMan() { for( sal_uInt16 i=0; i<nPLCF; i++) - delete aD[i].pIdStk; + delete aD[i].pIdStack; } // 0. which attr class, @@ -4773,8 +4773,8 @@ void WW8PLCFMan::GetSprmEnd( short nIdx, WW8PLCFManResult* pRes ) const const WW8PLCFxDesc* p = &aD[nIdx]; - if (!(p->pIdStk->empty())) - pRes->nSprmId = p->pIdStk->top(); // get end position + if (!(p->pIdStack->empty())) + pRes->nSprmId = p->pIdStack->top(); // get end position else { OSL_ENSURE( false, "No Id on the Stack" ); @@ -4835,12 +4835,12 @@ bool WW8PLCFMan::TransferOpenSprms(std::stack<sal_uInt16> &rStack) for (sal_uInt16 i = 0; i < nPLCF; ++i) { WW8PLCFxDesc* p = &aD[i]; - if (!p || !p->pIdStk) + if (!p || !p->pIdStack) continue; - while (!p->pIdStk->empty()) + while (!p->pIdStack->empty()) { - rStack.push(p->pIdStk->top()); - p->pIdStk->pop(); + rStack.push(p->pIdStack->top()); + p->pIdStack->pop(); } } return rStack.empty(); @@ -4854,7 +4854,7 @@ void WW8PLCFMan::AdvSprm(short nIdx, bool bStart) if( bStart ) { const sal_uInt16 nLastId = GetId(p); - p->pIdStk->push(nLastId); // remember Id for attribute end + p->pIdStack->push(nLastId); // remember Id for attribute end if( p->nSprmsLen ) { /* @@ -4886,9 +4886,9 @@ void WW8PLCFMan::AdvSprm(short nIdx, bool bStart) } else { - if (!(p->pIdStk->empty())) - p->pIdStk->pop(); - if (p->pIdStk->empty()) + if (!(p->pIdStack->empty())) + p->pIdStack->pop(); + if (p->pIdStack->empty()) { if ( (p == pChp) || (p == pPap) ) { @@ -4974,7 +4974,7 @@ void WW8PLCFMan::AdvNoSprm(short nIdx, bool bStart) p->nStartPos = aD[nIdx+1].nStartPos; else { - if (aD[nIdx+1].pIdStk->empty()) + if (aD[nIdx+1].pIdStack->empty()) { WW8PLCFx_PCD *pTemp = static_cast<WW8PLCFx_PCD*>(pPcd->pPLCFx); /* diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx index b0ec865217e5..368429aa2b92 100644 --- a/sw/source/filter/ww8/ww8scan.hxx +++ b/sw/source/filter/ww8/ww8scan.hxx @@ -821,7 +821,7 @@ enum ManTypes // enums for PLCFMan-ctor struct WW8PLCFxDesc { WW8PLCFx* pPLCFx; - ::std::stack<sal_uInt16>* pIdStk; // memory for Attr-Id for Attr-end(s) + ::std::stack<sal_uInt16>* pIdStack; // memory for Attr-Id for Attr-end(s) const sal_uInt8* pMemPos;// where are the Sprm(s) long nOrigSprmsLen; @@ -852,7 +852,7 @@ struct WW8PLCFxDesc //existing ones. WW8PLCFxDesc() : pPLCFx(nullptr) - , pIdStk(nullptr) + , pIdStack(nullptr) , pMemPos(nullptr) , nOrigSprmsLen(0) , nStartPos(WW8_CP_MAX) diff --git a/sw/source/filter/xml/xmlexpit.cxx b/sw/source/filter/xml/xmlexpit.cxx index c556a4da7983..4f5be35d9724 100644 --- a/sw/source/filter/xml/xmlexpit.cxx +++ b/sw/source/filter/xml/xmlexpit.cxx @@ -1069,32 +1069,32 @@ bool SvXMLExportItemMapper::QueryXMLValue( case RES_FRM_SIZE: { - const SwFormatFrmSize& rFrmSize = dynamic_cast<const SwFormatFrmSize&>(rItem); + const SwFormatFrameSize& rFrameSize = dynamic_cast<const SwFormatFrameSize&>(rItem); bool bOutHeight = false; switch( nMemberId ) { case MID_FRMSIZE_REL_WIDTH: - if (rFrmSize.GetWidthPercent()) + if (rFrameSize.GetWidthPercent()) { ::sax::Converter::convertPercent( - aOut, rFrmSize.GetWidthPercent() ); + aOut, rFrameSize.GetWidthPercent() ); bOk = true; } break; case MID_FRMSIZE_MIN_HEIGHT: - if( ATT_MIN_SIZE == rFrmSize.GetHeightSizeType() ) + if( ATT_MIN_SIZE == rFrameSize.GetHeightSizeType() ) bOutHeight = true; break; case MID_FRMSIZE_FIX_HEIGHT: - if( ATT_FIX_SIZE == rFrmSize.GetHeightSizeType() ) + if( ATT_FIX_SIZE == rFrameSize.GetHeightSizeType() ) bOutHeight = true; break; } if( bOutHeight ) { - rUnitConverter.convertMeasureToXML(aOut, rFrmSize.GetHeight()); + rUnitConverter.convertMeasureToXML(aOut, rFrameSize.GetHeight()); bOk = true; } } diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index 195bafd7d760..127726796d06 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -480,14 +480,14 @@ sal_Int64 SAL_CALL SwXMLImport::getSomething( const Sequence< sal_Int8 >& rId ) static OTextCursorHelper *lcl_xml_GetSwXTextCursor( const Reference < XTextCursor >& rTextCursor ) { - Reference<XUnoTunnel> xCrsrTunnel( rTextCursor, UNO_QUERY ); - OSL_ENSURE( xCrsrTunnel.is(), "missing XUnoTunnel for Cursor" ); - if( !xCrsrTunnel.is() ) + Reference<XUnoTunnel> xCursorTunnel( rTextCursor, UNO_QUERY ); + OSL_ENSURE( xCursorTunnel.is(), "missing XUnoTunnel for Cursor" ); + if( !xCursorTunnel.is() ) return nullptr; - OTextCursorHelper *pTextCrsr = reinterpret_cast< OTextCursorHelper *>( - sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() ))); - OSL_ENSURE( pTextCrsr, "SwXTextCursor missing" ); - return pTextCrsr; + OTextCursorHelper *pTextCursor = reinterpret_cast< OTextCursorHelper *>( + sal::static_int_cast< sal_IntPtr >( xCursorTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() ))); + OSL_ENSURE( pTextCursor, "SwXTextCursor missing" ); + return pTextCursor; } void SwXMLImport::startDocument() @@ -588,7 +588,7 @@ void SwXMLImport::startDocument() // We also might change into the insert mode later, so we have to make // sure to first set the insert mode and then create the text import // helper. Otherwise it won't have the insert flag set! - OTextCursorHelper *pTextCrsr = nullptr; + OTextCursorHelper *pTextCursor = nullptr; Reference < XTextCursor > xTextCursor; if( HasTextImport() ) xTextCursor = GetTextImport()->GetCursor(); @@ -597,16 +597,16 @@ void SwXMLImport::startDocument() Reference < XTextDocument > xTextDoc( GetModel(), UNO_QUERY ); Reference < XText > xText = xTextDoc->getText(); xTextCursor = xText->createTextCursor(); - SwCrsrShell *pCrsrSh = nullptr; + SwCursorShell *pCursorSh = nullptr; SwDoc *pDoc = nullptr; if( SvXMLImportFlags::ALL == getImportFlags() ) { - pTextCrsr = lcl_xml_GetSwXTextCursor( xTextCursor ); - OSL_ENSURE( pTextCrsr, "SwXTextCursor missing" ); - if( !pTextCrsr ) + pTextCursor = lcl_xml_GetSwXTextCursor( xTextCursor ); + OSL_ENSURE( pTextCursor, "SwXTextCursor missing" ); + if( !pTextCursor ) return; - pDoc = pTextCrsr->GetDoc(); + pDoc = pTextCursor->GetDoc(); OSL_ENSURE( pDoc, "SwDoc missing" ); if( !pDoc ) return; @@ -615,16 +615,16 @@ void SwXMLImport::startDocument() // a document. We then have to insert at the current edit shell's // cursor position. That not quite clean code, but there is no other // way currently. - pCrsrSh = pDoc->GetEditShell(); + pCursorSh = pDoc->GetEditShell(); } - if( pCrsrSh ) + if( pCursorSh ) { const uno::Reference<text::XTextRange> xInsertTextRange( SwXTextRange::CreateXTextRange( - *pDoc, *pCrsrSh->GetCrsr()->GetPoint(), nullptr ) ); + *pDoc, *pCursorSh->GetCursor()->GetPoint(), nullptr ) ); setTextInsertMode( xInsertTextRange ); xTextCursor = GetTextImport()->GetCursor(); - pTextCrsr = nullptr; + pTextCursor = nullptr; } else GetTextImport()->SetCursor( xTextCursor ); @@ -633,13 +633,13 @@ void SwXMLImport::startDocument() if( (!(getImportFlags() & (SvXMLImportFlags::CONTENT|SvXMLImportFlags::MASTERSTYLES)))) return; - if( !pTextCrsr ) - pTextCrsr = lcl_xml_GetSwXTextCursor( xTextCursor ); - OSL_ENSURE( pTextCrsr, "SwXTextCursor missing" ); - if( !pTextCrsr ) + if( !pTextCursor ) + pTextCursor = lcl_xml_GetSwXTextCursor( xTextCursor ); + OSL_ENSURE( pTextCursor, "SwXTextCursor missing" ); + if( !pTextCursor ) return; - SwDoc *pDoc = pTextCrsr->GetDoc(); + SwDoc *pDoc = pTextCursor->GetDoc(); OSL_ENSURE( pDoc, "SwDoc missing" ); if( !pDoc ) return; @@ -656,7 +656,7 @@ void SwXMLImport::startDocument() m_pSttNdIdx = new SwNodeIndex( pDoc->GetNodes() ); if( IsInsertMode() ) { - SwPaM *pPaM = pTextCrsr->GetPaM(); + SwPaM *pPaM = pTextCursor->GetPaM(); const SwPosition* pPos = pPaM->GetPoint(); // Split once and remember the node that has been splitted. @@ -725,13 +725,13 @@ void SwXMLImport::endDocument() SwDoc *pDoc = nullptr; if( (getImportFlags() & SvXMLImportFlags::CONTENT) && !IsStylesOnlyMode() ) { - Reference<XUnoTunnel> xCrsrTunnel( GetTextImport()->GetCursor(), + Reference<XUnoTunnel> xCursorTunnel( GetTextImport()->GetCursor(), UNO_QUERY); - assert(xCrsrTunnel.is() && "missing XUnoTunnel for Cursor"); - OTextCursorHelper *pTextCrsr = reinterpret_cast< OTextCursorHelper *>( - sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() ))); - assert(pTextCrsr && "SwXTextCursor missing"); - SwPaM *pPaM = pTextCrsr->GetPaM(); + assert(xCursorTunnel.is() && "missing XUnoTunnel for Cursor"); + OTextCursorHelper *pTextCursor = reinterpret_cast< OTextCursorHelper *>( + sal::static_int_cast< sal_IntPtr >( xCursorTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() ))); + assert(pTextCursor && "SwXTextCursor missing"); + SwPaM *pPaM = pTextCursor->GetPaM(); if( IsInsertMode() && m_pSttNdIdx->GetIndex() ) { // If we are in insert mode, join the splitted node that is in front diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx index 2a0d155f9f93..0e28509b7edd 100644 --- a/sw/source/filter/xml/xmlimpit.cxx +++ b/sw/source/filter/xml/xmlimpit.cxx @@ -845,12 +845,12 @@ bool SvXMLImportItemMapper::PutXMLValue( case RES_FRM_SIZE: { - SwFormatFrmSize& rFrmSize = dynamic_cast<SwFormatFrmSize&>(rItem); + SwFormatFrameSize& rFrameSize = dynamic_cast<SwFormatFrameSize&>(rItem); bool bSetHeight = false; bool bSetWidth = false; bool bSetSizeType = false; - SwFrmSize eSizeType = ATT_VAR_SIZE; + SwFrameSize eSizeType = ATT_VAR_SIZE; sal_Int32 nMin = MINLAY; switch( nMemberId ) @@ -866,7 +866,7 @@ bool SvXMLImportItemMapper::PutXMLValue( else if( nValue > 100 ) nValue = 100; - rFrmSize.SetWidthPercent( (sal_Int8)nValue ); + rFrameSize.SetWidthPercent( (sal_Int8)nValue ); } } break; @@ -901,8 +901,8 @@ bool SvXMLImportItemMapper::PutXMLValue( else if( nValue > USHRT_MAX ) nValue = USHRT_MAX; - rFrmSize.SetWidth( (sal_uInt16)nValue ); - rFrmSize.SetHeightSizeType( ATT_VAR_SIZE ); + rFrameSize.SetWidth( (sal_uInt16)nValue ); + rFrameSize.SetHeightSizeType( ATT_VAR_SIZE ); bOk = true; } } @@ -917,11 +917,11 @@ bool SvXMLImportItemMapper::PutXMLValue( if( bOk ) { if( bSetWidth ) - rFrmSize.SetWidth( (sal_uInt16)nValue ); + rFrameSize.SetWidth( (sal_uInt16)nValue ); if( bSetHeight ) - rFrmSize.SetHeight( (sal_uInt16)nValue ); + rFrameSize.SetHeight( (sal_uInt16)nValue ); if( bSetSizeType ) - rFrmSize.SetHeightSizeType( eSizeType ); + rFrameSize.SetHeightSizeType( eSizeType ); } } } diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx index 1852787fb193..227ea830d9b2 100644 --- a/sw/source/filter/xml/xmltble.cxx +++ b/sw/source/filter/xml/xmltble.cxx @@ -191,14 +191,14 @@ bool SwXMLTableFrameFormatsSort_Impl::AddRow( SwFrameFormat& rFrameFormat, const OUString& rNamePrefix, sal_uInt32 nLine ) { - const SwFormatFrmSize *pFrmSize = nullptr; + const SwFormatFrameSize *pFrameSize = nullptr; const SwFormatRowSplit* pRowSplit = nullptr; const SvxBrushItem *pBrush = nullptr; const SfxItemSet& rItemSet = rFrameFormat.GetAttrSet(); const SfxPoolItem *pItem; if( SfxItemState::SET == rItemSet.GetItemState( RES_FRM_SIZE, false, &pItem ) ) - pFrmSize = static_cast<const SwFormatFrmSize *>(pItem); + pFrameSize = static_cast<const SwFormatFrameSize *>(pItem); if( SfxItemState::SET == rItemSet.GetItemState( RES_ROW_SPLIT, false, &pItem ) ) pRowSplit = static_cast<const SwFormatRowSplit *>(pItem); @@ -207,7 +207,7 @@ bool SwXMLTableFrameFormatsSort_Impl::AddRow( SwFrameFormat& rFrameFormat, pBrush = static_cast<const SvxBrushItem *>(pItem); // empty styles have not to be exported - if( !pFrmSize && !pBrush && !pRowSplit ) + if( !pFrameSize && !pBrush && !pRowSplit ) return false; // order is: -/brush, size/-, size/brush @@ -215,7 +215,7 @@ bool SwXMLTableFrameFormatsSort_Impl::AddRow( SwFrameFormat& rFrameFormat, SwXMLFrameFormats_Impl::iterator i; for( i = aFormatList.begin(); i < aFormatList.end(); ++i ) { - const SwFormatFrmSize *pTestFrmSize = nullptr; + const SwFormatFrameSize *pTestFrameSize = nullptr; const SwFormatRowSplit* pTestRowSplit = nullptr; const SvxBrushItem *pTestBrush = nullptr; const SwFrameFormat *pTestFormat = *i; @@ -223,14 +223,14 @@ bool SwXMLTableFrameFormatsSort_Impl::AddRow( SwFrameFormat& rFrameFormat, if( SfxItemState::SET == rTestSet.GetItemState( RES_FRM_SIZE, false, &pItem ) ) { - if( !pFrmSize ) + if( !pFrameSize ) break; - pTestFrmSize = static_cast<const SwFormatFrmSize *>(pItem); + pTestFrameSize = static_cast<const SwFormatFrameSize *>(pItem); } else { - if( pFrmSize ) + if( pFrameSize ) continue; } @@ -262,9 +262,9 @@ bool SwXMLTableFrameFormatsSort_Impl::AddRow( SwFrameFormat& rFrameFormat, continue; } - if( pFrmSize && - ( pFrmSize->GetHeightSizeType() != pTestFrmSize->GetHeightSizeType() || - pFrmSize->GetHeight() != pTestFrmSize->GetHeight() ) ) + if( pFrameSize && + ( pFrameSize->GetHeightSizeType() != pTestFrameSize->GetHeightSizeType() || + pFrameSize->GetHeight() != pTestFrameSize->GetHeight() ) ) continue; if( pBrush && (*pBrush != *pTestBrush) ) @@ -701,11 +701,11 @@ void SwXMLExport::ExportTableAutoStyles( const SwTableNode& rTableNd ) if( pTableFormat ) { sal_Int16 eTabHoriOri = pTableFormat->GetHoriOrient().GetHoriOrient(); - const SwFormatFrmSize& rFrmSize = pTableFormat->GetFrmSize(); + const SwFormatFrameSize& rFrameSize = pTableFormat->GetFrameSize(); - sal_uInt32 nAbsWidth = rFrmSize.GetSize().Width(); + sal_uInt32 nAbsWidth = rFrameSize.GetSize().Width(); sal_uInt32 nBaseWidth = 0UL; - sal_Int8 nPrcWidth = rFrmSize.GetWidthPercent(); + sal_Int8 nPrcWidth = rFrameSize.GetWidthPercent(); bool bFixAbsWidth = nPrcWidth != 0 || /*text::*/HoriOrientation::NONE == eTabHoriOri || /*text::*/HoriOrientation::FULL == eTabHoriOri; diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx index 8cb7e491f4cf..a5ec78a33e5f 100644 --- a/sw/source/filter/xml/xmltbli.cxx +++ b/sw/source/filter/xml/xmltbli.cxx @@ -691,26 +691,26 @@ void SwXMLTableCellContext_Impl::EndElement() xSrcTextCursor->gotoEnd( sal_True ); // Until we have an API for copying we have to use the core. - Reference<XUnoTunnel> xSrcCrsrTunnel( xSrcTextCursor, UNO_QUERY); - assert(xSrcCrsrTunnel.is() && "missing XUnoTunnel for Cursor"); - OTextCursorHelper *pSrcTextCrsr = reinterpret_cast< OTextCursorHelper * >( - sal::static_int_cast< sal_IntPtr >( xSrcCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() ))); - assert(pSrcTextCrsr && "SwXTextCursor missing"); - SwDoc *pDoc = pSrcTextCrsr->GetDoc(); - const SwPaM *pSrcPaM = pSrcTextCrsr->GetPaM(); + Reference<XUnoTunnel> xSrcCursorTunnel( xSrcTextCursor, UNO_QUERY); + assert(xSrcCursorTunnel.is() && "missing XUnoTunnel for Cursor"); + OTextCursorHelper *pSrcTextCursor = reinterpret_cast< OTextCursorHelper * >( + sal::static_int_cast< sal_IntPtr >( xSrcCursorTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() ))); + assert(pSrcTextCursor && "SwXTextCursor missing"); + SwDoc *pDoc = pSrcTextCursor->GetDoc(); + const SwPaM *pSrcPaM = pSrcTextCursor->GetPaM(); while( nColRepeat > 1 && GetTable()->IsInsertCellPossible() ) { _InsertContent(); - Reference<XUnoTunnel> xDstCrsrTunnel( + Reference<XUnoTunnel> xDstCursorTunnel( GetImport().GetTextImport()->GetCursor(), UNO_QUERY); - assert(xDstCrsrTunnel.is() && "missing XUnoTunnel for Cursor"); - OTextCursorHelper *pDstTextCrsr = reinterpret_cast< OTextCursorHelper * >( - sal::static_int_cast< sal_IntPtr >( xDstCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() )) ); - assert(pDstTextCrsr && "SwXTextCursor missing"); + assert(xDstCursorTunnel.is() && "missing XUnoTunnel for Cursor"); + OTextCursorHelper *pDstTextCursor = reinterpret_cast< OTextCursorHelper * >( + sal::static_int_cast< sal_IntPtr >( xDstCursorTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() )) ); + assert(pDstTextCursor && "SwXTextCursor missing"); SwPaM aSrcPaM(*pSrcPaM->GetMark(), *pSrcPaM->GetPoint()); - SwPosition aDstPos( *pDstTextCrsr->GetPaM()->GetPoint() ); + SwPosition aDstPos( *pDstTextCursor->GetPaM()->GetPoint() ); pDoc->getIDocumentContentOperations().CopyRange( aSrcPaM, aDstPos, /*bCopyAll=*/false, /*bCheckPos=*/true ); nColRepeat--; @@ -801,7 +801,7 @@ SwXMLTableColContext_Impl::SwXMLTableColContext_Impl( SfxItemState::SET == pAutoItemSet->GetItemState( RES_FRM_SIZE, false, &pItem ) ) { - const SwFormatFrmSize *pSize = static_cast<const SwFormatFrmSize *>(pItem); + const SwFormatFrameSize *pSize = static_cast<const SwFormatFrameSize *>(pItem); nWidth = pSize->GetWidth(); bRelWidth = ATT_VAR_SIZE == pSize->GetHeightSizeType(); } @@ -1921,7 +1921,7 @@ SwTableBox *SwXMLTableContext::MakeTableBox( SwTableLine *pUpper, pFrameFormat->ResetAllFormatAttr(); // #i73790# - method renamed pFrameFormat->SetFormatAttr( aFillOrder ); - pFrameFormat->SetFormatAttr( SwFormatFrmSize( ATT_VAR_SIZE, nColWidth ) ); + pFrameFormat->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, nColWidth ) ); SwTableLines& rLines = pBox->GetTabLines(); bool bSplitted = false; @@ -2168,7 +2168,7 @@ SwTableBox *SwXMLTableContext::MakeTableBox( if (! bModifyLocked) pBoxFormat2->UnlockModify(); - pBoxFormat2->SetFormatAttr( SwFormatFrmSize( ATT_VAR_SIZE, nColWidth ) ); + pBoxFormat2->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, nColWidth ) ); return pBox; } @@ -2702,10 +2702,10 @@ void SwXMLTableContext::MakeTable() bSetHoriOrient = true; } - const SwFormatFrmSize *pSize = nullptr; + const SwFormatFrameSize *pSize = nullptr; if( SfxItemState::SET == pAutoItemSet->GetItemState( RES_FRM_SIZE, false, &pItem ) ) - pSize = static_cast<const SwFormatFrmSize *>(pItem); + pSize = static_cast<const SwFormatFrameSize *>(pItem); switch( eHoriOrient ) { @@ -2776,7 +2776,7 @@ void SwXMLTableContext::MakeTable() // This must be after the call to _MakeTable, because nWidth might be // changed there. pFrameFormat->LockModify(); - SwFormatFrmSize aSize( ATT_VAR_SIZE, m_nWidth ); + SwFormatFrameSize aSize( ATT_VAR_SIZE, m_nWidth ); aSize.SetWidthPercent( nPrcWidth ); pFrameFormat->SetFormatAttr( aSize ); pFrameFormat->UnlockModify(); @@ -2806,9 +2806,9 @@ void SwXMLTableContext::MakeTable() // ??? this is always false: root frame is only created in SwViewShell::Init if( m_pTableNode->GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell() ) { - m_pTableNode->DelFrms(); + m_pTableNode->DelFrames(); SwNodeIndex aIdx( *m_pTableNode->EndOfSectionNode(), 1 ); - m_pTableNode->MakeFrms( &aIdx ); + m_pTableNode->MakeFrames( &aIdx ); } } @@ -2840,17 +2840,17 @@ const SwStartNode *SwXMLTableContext::InsertTableSection( ->InsertTableSection(pPrevSttNd, pStringValueStyleName); const SwStartNode *pStNd; - Reference<XUnoTunnel> xCrsrTunnel( GetImport().GetTextImport()->GetCursor(), + Reference<XUnoTunnel> xCursorTunnel( GetImport().GetTextImport()->GetCursor(), UNO_QUERY); - OSL_ENSURE( xCrsrTunnel.is(), "missing XUnoTunnel for Cursor" ); - OTextCursorHelper *pTextCrsr = reinterpret_cast< OTextCursorHelper * >( - sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() ))); - OSL_ENSURE( pTextCrsr, "SwXTextCursor missing" ); + OSL_ENSURE( xCursorTunnel.is(), "missing XUnoTunnel for Cursor" ); + OTextCursorHelper *pTextCursor = reinterpret_cast< OTextCursorHelper * >( + sal::static_int_cast< sal_IntPtr >( xCursorTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() ))); + OSL_ENSURE( pTextCursor, "SwXTextCursor missing" ); if( m_bFirstSection ) { // The Cursor already is in the first section - pStNd = pTextCrsr->GetPaM()->GetNode().FindTableBoxStartNode(); + pStNd = pTextCursor->GetPaM()->GetNode().FindTableBoxStartNode(); m_bFirstSection = false; GetImport().GetTextImport()->SetStyleAndAttrs( GetImport(), GetImport().GetTextImport()->GetCursor(), "Standard", true ); @@ -2861,7 +2861,7 @@ const SwStartNode *SwXMLTableContext::InsertTableSection( const SwEndNode *pEndNd = pPrevSttNd ? pPrevSttNd->EndOfSectionNode() : m_pTableNode->EndOfSectionNode(); // #i78921# - make code robust - OSL_ENSURE( pDoc, "<SwXMLTableContext::InsertTableSection(..)> - no <pDoc> at <SwXTextCursor> instance - <SwXTextCurosr> doesn't seem to be registered at a <SwUnoCrsr> instance." ); + OSL_ENSURE( pDoc, "<SwXMLTableContext::InsertTableSection(..)> - no <pDoc> at <SwXTextCursor> instance - <SwXTextCurosr> doesn't seem to be registered at a <SwUnoCursor> instance." ); if ( !pDoc ) { pDoc = const_cast<SwDoc*>(pEndNd->GetDoc()); diff --git a/sw/source/filter/xml/xmltexte.cxx b/sw/source/filter/xml/xmltexte.cxx index d310886bb0bd..b6e3f4f11586 100644 --- a/sw/source/filter/xml/xmltexte.cxx +++ b/sw/source/filter/xml/xmltexte.cxx @@ -68,10 +68,10 @@ enum SvEmbeddedObjectTypes SwNoTextNode *SwXMLTextParagraphExport::GetNoTextNode( const Reference < XPropertySet >& rPropSet ) { - Reference<XUnoTunnel> xCrsrTunnel( rPropSet, UNO_QUERY ); - assert(xCrsrTunnel.is() && "missing XUnoTunnel for embedded"); + Reference<XUnoTunnel> xCursorTunnel( rPropSet, UNO_QUERY ); + assert(xCursorTunnel.is() && "missing XUnoTunnel for embedded"); SwXFrame *pFrame = reinterpret_cast< SwXFrame * >( - sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( SwXFrame::getUnoTunnelId() ))); + sal::static_int_cast< sal_IntPtr >( xCursorTunnel->getSomething( SwXFrame::getUnoTunnelId() ))); assert(pFrame && "SwXFrame missing"); SwFrameFormat *pFrameFormat = pFrame->GetFrameFormat(); const SwFormatContent& rContent = pFrameFormat->GetContent(); diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx index 7f7a3481ac9d..a57a910aee9b 100644 --- a/sw/source/filter/xml/xmltexti.cxx +++ b/sw/source/filter/xml/xmltexti.cxx @@ -105,7 +105,7 @@ static void lcl_putHeightAndWidth ( SfxItemSet &rItemSet, nHeight = convertMm100ToTwip( nHeight ); if( nHeight < MINFLY ) nHeight = MINFLY; - rItemSet.Put( SwFormatFrmSize( ATT_FIX_SIZE, nWidth, nHeight ) ); + rItemSet.Put( SwFormatFrameSize( ATT_FIX_SIZE, nWidth, nHeight ) ); } SwFormatAnchor aAnchor( FLY_AT_CHAR ); @@ -183,15 +183,15 @@ SvXMLImportContext *SwXMLTextImportHelper::CreateTableChildContext( bool SwXMLTextImportHelper::IsInHeaderFooter() const { - uno::Reference<XUnoTunnel> xCrsrTunnel( + uno::Reference<XUnoTunnel> xCursorTunnel( const_cast<SwXMLTextImportHelper *>(this)->GetCursor(), UNO_QUERY ); - assert(xCrsrTunnel.is() && "missing XUnoTunnel for Cursor"); - OTextCursorHelper *pTextCrsr = reinterpret_cast< OTextCursorHelper * >( - sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() ))); - SAL_WARN_IF(!pTextCrsr, "sw.uno", "SwXTextCursor missing"); - SwDoc *pDoc = pTextCrsr ? pTextCrsr->GetDoc() : nullptr; + assert(xCursorTunnel.is() && "missing XUnoTunnel for Cursor"); + OTextCursorHelper *pTextCursor = reinterpret_cast< OTextCursorHelper * >( + sal::static_int_cast< sal_IntPtr >( xCursorTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() ))); + SAL_WARN_IF(!pTextCursor, "sw.uno", "SwXTextCursor missing"); + SwDoc *pDoc = pTextCursor ? pTextCursor->GetDoc() : nullptr; - return pDoc && pDoc->IsInHeaderFooter( pTextCrsr->GetPaM()->GetPoint()->nNode ); + return pDoc && pDoc->IsInHeaderFooter( pTextCursor->GetPaM()->GetPoint()->nNode ); } static SwOLENode *lcl_GetOLENode( const SwFrameFormat *pFrameFormat ) @@ -228,11 +228,11 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOLEObject( if( aObjName.isEmpty() ) return xPropSet; - uno::Reference<XUnoTunnel> xCrsrTunnel( GetCursor(), UNO_QUERY ); - assert(xCrsrTunnel.is() && "missing XUnoTunnel for Cursor"); - OTextCursorHelper *pTextCrsr = reinterpret_cast< OTextCursorHelper * >( - sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() ))); - SAL_WARN_IF(!pTextCrsr, "sw.uno", "SwXTextCursor missing"); + uno::Reference<XUnoTunnel> xCursorTunnel( GetCursor(), UNO_QUERY ); + assert(xCursorTunnel.is() && "missing XUnoTunnel for Cursor"); + OTextCursorHelper *pTextCursor = reinterpret_cast< OTextCursorHelper * >( + sal::static_int_cast< sal_IntPtr >( xCursorTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() ))); + SAL_WARN_IF(!pTextCursor, "sw.uno", "SwXTextCursor missing"); SwDoc *pDoc = SwImport::GetDocFromXMLImport( rImport ); SfxItemSet aItemSet( pDoc->GetAttrPool(), RES_FRMATR_BEGIN, @@ -286,9 +286,9 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOLEObject( lcl_setObjectVisualArea( xObj, nAspect, aTwipSize, MAP_TWIP ); } - if( pTextCrsr ) + if( pTextCursor ) { - pFrameFormat = pDoc->getIDocumentContentOperations().Insert( *pTextCrsr->GetPaM(), + pFrameFormat = pDoc->getIDocumentContentOperations().Insert( *pTextCursor->GetPaM(), ::svt::EmbeddedObjectRef( xObj, embed::Aspects::MSOLE_CONTENT ), &aItemSet, nullptr, @@ -342,9 +342,9 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOLEObject( // the correct aspect will be set later // TODO/LATER: Actually it should be set here - if( pTextCrsr ) + if( pTextCursor ) { - pFrameFormat = pDoc->getIDocumentContentOperations().InsertOLE( *pTextCrsr->GetPaM(), aName, embed::Aspects::MSOLE_CONTENT, &aItemSet, nullptr, nullptr ); + pFrameFormat = pDoc->getIDocumentContentOperations().InsertOLE( *pTextCursor->GetPaM(), aName, embed::Aspects::MSOLE_CONTENT, &aItemSet, nullptr, nullptr ); pOLENd = lcl_GetOLENode( pFrameFormat ); } aObjName = aName; @@ -542,11 +542,11 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOOoLink( uno::Reference < XPropertySet > xPropSet; - uno::Reference<XUnoTunnel> xCrsrTunnel( GetCursor(), UNO_QUERY ); - assert(xCrsrTunnel.is() && "missing XUnoTunnel for Cursor"); - OTextCursorHelper *pTextCrsr = reinterpret_cast< OTextCursorHelper * >( - sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() ))); - OSL_ENSURE( pTextCrsr, "SwXTextCursor missing" ); + uno::Reference<XUnoTunnel> xCursorTunnel( GetCursor(), UNO_QUERY ); + assert(xCursorTunnel.is() && "missing XUnoTunnel for Cursor"); + OTextCursorHelper *pTextCursor = reinterpret_cast< OTextCursorHelper * >( + sal::static_int_cast< sal_IntPtr >( xCursorTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() ))); + OSL_ENSURE( pTextCursor, "SwXTextCursor missing" ); SwDoc *pDoc = SwImport::GetDocFromXMLImport( rImport ); SfxItemSet aItemSet( pDoc->GetAttrPool(), RES_FRMATR_BEGIN, @@ -593,7 +593,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOOoLink( uno::UNO_QUERY_THROW ); { - SwFrameFormat *pFrameFormat = pDoc->getIDocumentContentOperations().Insert( *pTextCrsr->GetPaM(), + SwFrameFormat *pFrameFormat = pDoc->getIDocumentContentOperations().Insert( *pTextCursor->GetPaM(), ::svt::EmbeddedObjectRef( xObj, embed::Aspects::MSOLE_CONTENT ), &aItemSet, nullptr, @@ -630,12 +630,12 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertApplet( SolarMutexGuard aGuard; uno::Reference < XPropertySet > xPropSet; - uno::Reference<XUnoTunnel> xCrsrTunnel( GetCursor(), UNO_QUERY ); - assert(xCrsrTunnel.is() && "missing XUnoTunnel for Cursor"); - OTextCursorHelper *pTextCrsr = reinterpret_cast< OTextCursorHelper * >( - sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() ))); - OSL_ENSURE( pTextCrsr, "SwXTextCursor missing" ); - SwDoc *pDoc = pTextCrsr->GetDoc(); + uno::Reference<XUnoTunnel> xCursorTunnel( GetCursor(), UNO_QUERY ); + assert(xCursorTunnel.is() && "missing XUnoTunnel for Cursor"); + OTextCursorHelper *pTextCursor = reinterpret_cast< OTextCursorHelper * >( + sal::static_int_cast< sal_IntPtr >( xCursorTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() ))); + OSL_ENSURE( pTextCursor, "SwXTextCursor missing" ); + SwDoc *pDoc = pTextCursor->GetDoc(); SfxItemSet aItemSet( pDoc->GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END ); @@ -655,7 +655,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertApplet( Size( nWidth, nHeight ), MAP_100TH_MM ); - SwFrameFormat *pFrameFormat = pDoc->getIDocumentContentOperations().Insert( *pTextCrsr->GetPaM(), + SwFrameFormat *pFrameFormat = pDoc->getIDocumentContentOperations().Insert( *pTextCursor->GetPaM(), ::svt::EmbeddedObjectRef( aAppletImpl.GetApplet(), embed::Aspects::MSOLE_CONTENT ), &aAppletImpl.GetItemSet(), nullptr, @@ -677,12 +677,12 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertPlugin( sal_Int32 nWidth, sal_Int32 nHeight ) { uno::Reference < XPropertySet > xPropSet; - uno::Reference<XUnoTunnel> xCrsrTunnel( GetCursor(), UNO_QUERY ); - assert(xCrsrTunnel.is() && "missing XUnoTunnel for Cursor"); - OTextCursorHelper *pTextCrsr = reinterpret_cast< OTextCursorHelper * >( - sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() ))); - OSL_ENSURE( pTextCrsr, "SwXTextCursor missing" ); - SwDoc *pDoc = pTextCrsr->GetDoc(); + uno::Reference<XUnoTunnel> xCursorTunnel( GetCursor(), UNO_QUERY ); + assert(xCursorTunnel.is() && "missing XUnoTunnel for Cursor"); + OTextCursorHelper *pTextCursor = reinterpret_cast< OTextCursorHelper * >( + sal::static_int_cast< sal_IntPtr >( xCursorTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() ))); + OSL_ENSURE( pTextCursor, "SwXTextCursor missing" ); + SwDoc *pDoc = pTextCursor->GetDoc(); SfxItemSet aItemSet( pDoc->GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END ); @@ -730,7 +730,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertPlugin( makeAny( OUString( rMimeType ) ) ); } - SwFrameFormat *pFrameFormat = pDoc->getIDocumentContentOperations().Insert( *pTextCrsr->GetPaM(), + SwFrameFormat *pFrameFormat = pDoc->getIDocumentContentOperations().Insert( *pTextCursor->GetPaM(), ::svt::EmbeddedObjectRef( xObj, embed::Aspects::MSOLE_CONTENT ), &aItemSet, nullptr, @@ -760,12 +760,12 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertFloatingFra SolarMutexGuard aGuard; uno::Reference < XPropertySet > xPropSet; - uno::Reference<XUnoTunnel> xCrsrTunnel( GetCursor(), UNO_QUERY ); - assert(xCrsrTunnel.is() && "missing XUnoTunnel for Cursor"); - OTextCursorHelper *pTextCrsr = reinterpret_cast< OTextCursorHelper * >( - sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() ))); - OSL_ENSURE( pTextCrsr, "SwXTextCursor missing" ); - SwDoc *pDoc = pTextCrsr->GetDoc(); + uno::Reference<XUnoTunnel> xCursorTunnel( GetCursor(), UNO_QUERY ); + assert(xCursorTunnel.is() && "missing XUnoTunnel for Cursor"); + OTextCursorHelper *pTextCursor = reinterpret_cast< OTextCursorHelper * >( + sal::static_int_cast< sal_IntPtr >( xCursorTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() ))); + OSL_ENSURE( pTextCursor, "SwXTextCursor missing" ); + SwDoc *pDoc = pTextCursor->GetDoc(); SfxItemSet aItemSet( pDoc->GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END ); @@ -883,7 +883,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertFloatingFra makeAny( sal_Int32( aMargin.Height() ) ) ); } - SwFrameFormat *pFrameFormat = pDoc->getIDocumentContentOperations().Insert( *pTextCrsr->GetPaM(), + SwFrameFormat *pFrameFormat = pDoc->getIDocumentContentOperations().Insert( *pTextCursor->GetPaM(), ::svt::EmbeddedObjectRef( xObj, embed::Aspects::MSOLE_CONTENT ), &aItemSet, nullptr, @@ -912,10 +912,10 @@ void SwXMLTextImportHelper::endAppletOrPlugin( // this method will modify the document directly -> lock SolarMutex SolarMutexGuard aGuard; - uno::Reference<XUnoTunnel> xCrsrTunnel( rPropSet, UNO_QUERY ); - assert(xCrsrTunnel.is() && "missing XUnoTunnel for embedded"); + uno::Reference<XUnoTunnel> xCursorTunnel( rPropSet, UNO_QUERY ); + assert(xCursorTunnel.is() && "missing XUnoTunnel for embedded"); SwXFrame *pFrame = reinterpret_cast< SwXFrame * >( - sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( SwXFrame::getUnoTunnelId() ))); + sal::static_int_cast< sal_IntPtr >( xCursorTunnel->getSomething( SwXFrame::getUnoTunnelId() ))); OSL_ENSURE( pFrame, "SwXFrame missing" ); SwFrameFormat *pFrameFormat = pFrame->GetFrameFormat(); const SwFormatContent& rContent = pFrameFormat->GetContent(); diff --git a/sw/source/ui/chrdlg/break.cxx b/sw/source/ui/chrdlg/break.cxx index e994fc267774..49e4b3433b00 100644 --- a/sw/source/ui/chrdlg/break.cxx +++ b/sw/source/ui/chrdlg/break.cxx @@ -197,8 +197,8 @@ void SwBreakDlg::CheckEnable() m_pPageCollBox->Enable(false); bEnable = false; } - else if(rSh.GetFrmType(nullptr,true) - & (FrmTypeFlags::FLY_ANY | FrmTypeFlags::HEADER | FrmTypeFlags::FOOTER | FrmTypeFlags::FOOTNOTE)) + else if(rSh.GetFrameType(nullptr,true) + & (FrameTypeFlags::FLY_ANY | FrameTypeFlags::HEADER | FrameTypeFlags::FOOTER | FrameTypeFlags::FOOTNOTE)) { m_pPageBtn->Enable(false); if(m_pPageBtn->IsChecked()) diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx index da6c131dafe5..fa8a26a92a0c 100644 --- a/sw/source/ui/chrdlg/chardlg.cxx +++ b/sw/source/ui/chrdlg/chardlg.cxx @@ -143,7 +143,7 @@ SwCharURLPage::SwCharURLPage(vcl::Window* pParent, const SfxItemSet& rCoreSet) get(m_pTextFT, "textft"); get(m_pTextED, "texted"); get(m_pNameED, "nameed"); - get(m_pTargetFrmLB, "targetfrmlb"); + get(m_pTargetFrameLB, "targetfrmlb"); get(m_pURLPB, "urlpb"); get(m_pEventPB, "eventpb"); get(m_pVisitedLB, "visitedlb"); @@ -177,7 +177,7 @@ SwCharURLPage::SwCharURLPage(vcl::Window* pParent, const SfxItemSet& rCoreSet) for ( size_t i = 0; i < nCount; i++ ) { - m_pTargetFrmLB->InsertEntry( pList->at( i ) ); + m_pTargetFrameLB->InsertEntry( pList->at( i ) ); } } delete pList; @@ -195,7 +195,7 @@ void SwCharURLPage::dispose() m_pTextFT.clear(); m_pTextED.clear(); m_pNameED.clear(); - m_pTargetFrmLB.clear(); + m_pTargetFrameLB.clear(); m_pURLPB.clear(); m_pEventPB.clear(); m_pVisitedLB.clear(); @@ -231,10 +231,10 @@ void SwCharURLPage::Reset(const SfxItemSet* rSet) } m_pNotVisitedLB->SelectEntry(sEntry); - m_pTargetFrmLB->SetText(pINetFormat->GetTargetFrame()); + m_pTargetFrameLB->SetText(pINetFormat->GetTargetFrame()); m_pVisitedLB-> SaveValue(); m_pNotVisitedLB->SaveValue(); - m_pTargetFrmLB-> SaveValue(); + m_pTargetFrameLB-> SaveValue(); pINetItem = new SvxMacroItem(FN_INET_FIELD_MACRO); if( pINetFormat->GetMacroTable() ) @@ -259,11 +259,11 @@ bool SwCharURLPage::FillItemSet(SfxItemSet* rSet) sURL = URIHelper::simpleNormalizedMakeRelative(OUString(), sURL); } - SwFormatINetFormat aINetFormat(sURL, m_pTargetFrmLB->GetText()); + SwFormatINetFormat aINetFormat(sURL, m_pTargetFrameLB->GetText()); aINetFormat.SetName(m_pNameED->GetText()); bool bURLModified = m_pURLED->IsValueChangedFromSaved(); bool bNameModified = m_pNameED->IsModified(); - bool bTargetModified = m_pTargetFrmLB->IsValueChangedFromSaved(); + bool bTargetModified = m_pTargetFrameLB->IsValueChangedFromSaved(); bModified = bURLModified || bNameModified || bTargetModified; // set valid settings first diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx index ea8de1164edc..23779cc11090 100644 --- a/sw/source/ui/chrdlg/drpcps.cxx +++ b/sw/source/ui/chrdlg/drpcps.cxx @@ -278,7 +278,7 @@ void SwDropCapsPict::UpdatePaintSettings() { // query the Font at paragraph's beginning mpPage->rSh.Push(); - mpPage->rSh.SttCrsrMove(); + mpPage->rSh.SttCursorMove(); mpPage->rSh.ClearMark(); SwWhichPara pSwuifnParaCurr = GetfnParaCurr(); SwPosPara pSwuifnParaStart = GetfnParaStart(); @@ -292,7 +292,7 @@ void SwDropCapsPict::UpdatePaintSettings() // CTL GetFontSettings( *mpPage, maCTLFont, RES_CHRATR_CTL_FONT ); - mpPage->rSh.EndCrsrMove(); + mpPage->rSh.EndCursorMove(); mpPage->rSh.Pop(false); } else diff --git a/sw/source/ui/chrdlg/pardlg.cxx b/sw/source/ui/chrdlg/pardlg.cxx index d3b72a0222aa..0775a2bedbc9 100644 --- a/sw/source/ui/chrdlg/pardlg.cxx +++ b/sw/source/ui/chrdlg/pardlg.cxx @@ -208,8 +208,8 @@ void SwParaDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage) else if( m_nParaExt == nId ) { // pagebreak only when the cursor is in the body-area and not in a table - const FrmTypeFlags eType = rSh.GetFrmType(nullptr,true); - if( !(FrmTypeFlags::BODY & eType) || + const FrameTypeFlags eType = rSh.GetFrameType(nullptr,true); + if( !(FrameTypeFlags::BODY & eType) || rSh.GetSelectionType() & nsSelectionType::SEL_TBL ) { aSet.Put(SfxBoolItem(SID_DISABLE_SVXEXTPARAGRAPHTABPAGE_PAGEBREAK,true)); @@ -226,8 +226,8 @@ void SwParaDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage) nHtmlMode & HTMLMODE_SOME_STYLES) { // pagebreak only when the cursor is in the body-area and not in a table - const FrmTypeFlags eType = rSh.GetFrmType(nullptr,true); - if(!(FrmTypeFlags::BODY & eType) || + const FrameTypeFlags eType = rSh.GetFrameType(nullptr,true); + if(!(FrameTypeFlags::BODY & eType) || rSh.GetSelectionType() & nsSelectionType::SEL_TBL) { aSet.Put(SfxBoolItem(SID_DISABLE_SVXEXTPARAGRAPHTABPAGE_PAGEBREAK,true)); diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 34a6ec15af79..2096b5e763f0 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -1311,7 +1311,7 @@ void SwTableOptionsTabPage::PageCreated( const SfxAllItemSet& aSet) SetWrtShell(pWrtSh->GetValue()); } -SwShdwCrsrOptionsTabPage::SwShdwCrsrOptionsTabPage( vcl::Window* pParent, +SwShdwCursorOptionsTabPage::SwShdwCursorOptionsTabPage( vcl::Window* pParent, const SfxItemSet& rSet ) : SfxTabPage(pParent, "OptFormatAidsPage", "modules/swriter/ui/optformataidspage.ui", &rSet), @@ -1336,7 +1336,7 @@ SwShdwCrsrOptionsTabPage::SwShdwCrsrOptionsTabPage( vcl::Window* pParent, get(m_pFillSpaceRB, "fillspace"); get(m_pCursorProtFrame, "crsrprotframe"); - get(m_pCrsrInProtCB, "cursorinprot"); + get(m_pCursorInProtCB, "cursorinprot"); get(m_pIgnoreProtCB, "ignoreprot"); get(m_pMathBaselineAlignmentCB, "mathbaseline"); @@ -1370,17 +1370,17 @@ SwShdwCrsrOptionsTabPage::SwShdwCrsrOptionsTabPage( vcl::Window* pParent, m_pFillSpaceRB->Hide(); m_pCursorProtFrame->Hide(); - m_pCrsrInProtCB->Hide(); + m_pCursorInProtCB->Hide(); m_pIgnoreProtCB->Hide(); } } -SwShdwCrsrOptionsTabPage::~SwShdwCrsrOptionsTabPage() +SwShdwCursorOptionsTabPage::~SwShdwCursorOptionsTabPage() { disposeOnce(); } -void SwShdwCrsrOptionsTabPage::dispose() +void SwShdwCursorOptionsTabPage::dispose() { m_pParaCB.clear(); m_pSHyphCB.clear(); @@ -1398,25 +1398,25 @@ void SwShdwCrsrOptionsTabPage::dispose() m_pFillTabRB.clear(); m_pFillSpaceRB.clear(); m_pCursorProtFrame.clear(); - m_pCrsrInProtCB.clear(); + m_pCursorInProtCB.clear(); m_pIgnoreProtCB.clear(); m_pMathBaselineAlignmentCB.clear(); SfxTabPage::dispose(); } -VclPtr<SfxTabPage> SwShdwCrsrOptionsTabPage::Create( vcl::Window* pParent, const SfxItemSet* rSet ) +VclPtr<SfxTabPage> SwShdwCursorOptionsTabPage::Create( vcl::Window* pParent, const SfxItemSet* rSet ) { - return VclPtr<SwShdwCrsrOptionsTabPage>::Create( pParent, *rSet ); + return VclPtr<SwShdwCursorOptionsTabPage>::Create( pParent, *rSet ); } -void SwShdwCrsrOptionsTabPage::PageCreated( const SfxAllItemSet& aSet ) +void SwShdwCursorOptionsTabPage::PageCreated( const SfxAllItemSet& aSet ) { const SwWrtShellItem* pWrtSh = aSet.GetItem<SwWrtShellItem>(SID_WRT_SHELL, false); if (pWrtSh) SetWrtShell(pWrtSh->GetValue()); } -bool SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet* rSet ) +bool SwShdwCursorOptionsTabPage::FillItemSet( SfxItemSet* rSet ) { SwShadowCursorItem aOpt; aOpt.SetOn( m_pOnOffCB->IsChecked() ); @@ -1447,9 +1447,9 @@ bool SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet* rSet ) bRet |= m_pMathBaselineAlignmentCB->IsValueChangedFromSaved(); } - if( m_pCrsrInProtCB->IsValueChangedFromSaved()) + if( m_pCursorInProtCB->IsValueChangedFromSaved()) { - rSet->Put(SfxBoolItem(FN_PARAM_CRSR_IN_PROTECTED, m_pCrsrInProtCB->IsChecked())); + rSet->Put(SfxBoolItem(FN_PARAM_CRSR_IN_PROTECTED, m_pCursorInProtCB->IsChecked())); bRet = true; } @@ -1483,7 +1483,7 @@ bool SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet* rSet ) return bRet; } -void SwShdwCrsrOptionsTabPage::Reset( const SfxItemSet* rSet ) +void SwShdwCursorOptionsTabPage::Reset( const SfxItemSet* rSet ) { const SfxPoolItem* pItem = nullptr; @@ -1506,8 +1506,8 @@ void SwShdwCrsrOptionsTabPage::Reset( const SfxItemSet* rSet ) } if( SfxItemState::SET == rSet->GetItemState( FN_PARAM_CRSR_IN_PROTECTED, false, &pItem )) - m_pCrsrInProtCB->Check(static_cast<const SfxBoolItem*>(pItem)->GetValue()); - m_pCrsrInProtCB->SaveValue(); + m_pCursorInProtCB->Check(static_cast<const SfxBoolItem*>(pItem)->GetValue()); + m_pCursorInProtCB->SaveValue(); if (rSet->GetItemState(FN_PARAM_IGNORE_PROTECTED, false, &pItem) == SfxItemState::SET) m_pIgnoreProtCB->Check(static_cast<const SfxBoolItem*>(pItem)->GetValue()); diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx index 24eb19692340..cc3befe72043 100644 --- a/sw/source/ui/dbui/dbinsdlg.cxx +++ b/sw/source/ui/dbui/dbinsdlg.cxx @@ -716,7 +716,7 @@ IMPL_LINK_TYPED( SwInsertDBColAutoPilot, TableFormatHdl, Button*, pButton, void } else nWidth = rSh.GetAnyCurRect( - FrmTypeFlags::FLY_ANY & rSh.GetFrmType( nullptr, true ) + FrameTypeFlags::FLY_ANY & rSh.GetFrameType( nullptr, true ) ? RECT_FLY_PRT_EMBEDDED : RECT_PAGE_PRT ).Width(); @@ -1194,7 +1194,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, if( !rSh.IsEndPara() ) { rSh.SwEditShell::SplitNode(); - rSh.SwCrsrShell::Left(1,CRSR_SKIP_CHARS); + rSh.SwCursorShell::Left(1,CRSR_SKIP_CHARS); } rSh.DoUndo( false ); @@ -1247,7 +1247,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, GetFieldType( 0, RES_DBNEXTSETFLD )), "1", "", aDBData ); - bool bSetCrsr = true; + bool bSetCursor = true; const size_t nCols = aColArr.size(); ::sw::mark::IMark* pMark = nullptr; for( sal_Int32 i = 0 ; ; ++i ) @@ -1358,21 +1358,21 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, { rSh.Insert( sIns ); - if( bSetCrsr) + if( bSetCursor) { // to the beginning and set a mark, so that // the cursor can be set to the initial position // at the end. - rSh.SwCrsrShell::MovePara( + rSh.SwCursorShell::MovePara( GetfnParaCurr(), GetfnParaStart() ); pMark = rSh.SetBookmark( vcl::KeyCode(), OUString(), OUString(), IDocumentMarkAccess::MarkType::UNO_BOOKMARK ); - rSh.SwCrsrShell::MovePara( + rSh.SwCursorShell::MovePara( GetfnParaCurr(), GetfnParaEnd() ); - bSetCrsr = false; + bSetCursor = false; } } } @@ -1396,7 +1396,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, pWait.reset(new SwWait( *pView->GetDocShell(), true )); } - if( !bSetCrsr && pMark != nullptr) + if( !bSetCursor && pMark != nullptr) { rSh.SetMark(); rSh.GotoMark( pMark ); diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx index 10fbcdc0752f..06446f3dcdb2 100644 --- a/sw/source/ui/dbui/mmlayoutpage.cxx +++ b/sw/source/ui/dbui/mmlayoutpage.cxx @@ -296,17 +296,17 @@ SwFrameFormat* SwMailMergeLayoutPage::InsertAddressFrame( else aSet.Put(SwFormatHoriOrient( rDestination.X(), text::HoriOrientation::NONE, text::RelOrientation::PAGE_FRAME )); aSet.Put(SwFormatVertOrient( rDestination.Y(), text::VertOrientation::NONE, text::RelOrientation::PAGE_FRAME )); - aSet.Put(SwFormatFrmSize( ATT_MIN_SIZE, DEFAULT_ADDRESS_WIDTH, DEFAULT_ADDRESS_HEIGHT )); + aSet.Put(SwFormatFrameSize( ATT_MIN_SIZE, DEFAULT_ADDRESS_WIDTH, DEFAULT_ADDRESS_HEIGHT )); // the example gets a border around the frame, the real document doesn't get one if(!bExample) aSet.Put(SvxBoxItem( RES_BOX )); aSet.Put(SwFormatSurround( SURROUND_NONE )); - rShell.NewFlyFrm(aSet, true ); + rShell.NewFlyFrame(aSet, true ); SwFrameFormat* pRet = rShell.GetFlyFrameFormat(); OSL_ENSURE( pRet, "Fly not inserted" ); - rShell.UnSelectFrm(); + rShell.UnSelectFrame(); const Sequence< OUString> aBlocks = rConfigItem.GetAddressBlocks(); if(bExample) { @@ -423,7 +423,7 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig const SwRect& rPageRect = rShell.GetAnyCurRect(RECT_PAGE); const Point aGreetingPos( DEFAULT_LEFT_DISTANCE + rPageRect.Left(), GREETING_TOP_DISTANCE ); - const bool bRet = rShell.SetShadowCrsrPos( aGreetingPos, FILL_SPACE ); + const bool bRet = rShell.SetShadowCursorPos( aGreetingPos, FILL_SPACE ); if(!bRet) { @@ -654,8 +654,8 @@ IMPL_LINK_NOARG_TYPED(SwMailMergeLayoutPage, PreviewLoadedHdl_Impl, SwOneExample aZoom <<= (sal_Int16)DocumentZoomType::ENTIRE_PAGE; m_xViewProperties->setPropertyValue(UNO_NAME_ZOOM_TYPE, aZoom); - const SwFormatFrmSize& rPageSize = m_pExampleWrtShell->GetPageDesc( - m_pExampleWrtShell->GetCurPageDesc()).GetMaster().GetFrmSize(); + const SwFormatFrameSize& rPageSize = m_pExampleWrtShell->GetPageDesc( + m_pExampleWrtShell->GetCurPageDesc()).GetMaster().GetFrameSize(); m_pLeftMF->SetMax(rPageSize.GetWidth() - DEFAULT_LEFT_DISTANCE); m_pTopMF->SetMax(rPageSize.GetHeight() - DEFAULT_TOP_DISTANCE); } @@ -702,7 +702,7 @@ IMPL_LINK_NOARG_TYPED(SwMailMergeLayoutPage, ChangeAddressHdl_Impl, SpinField&, else aSet.Put(SwFormatHoriOrient( nLeft, text::HoriOrientation::NONE, text::RelOrientation::PAGE_FRAME )); aSet.Put(SwFormatVertOrient( nTop, text::VertOrientation::NONE, text::RelOrientation::PAGE_FRAME )); - m_pExampleWrtShell->GetDoc()->SetFlyFrmAttr( *m_pAddressBlockFormat, aSet ); + m_pExampleWrtShell->GetDoc()->SetFlyFrameAttr( *m_pAddressBlockFormat, aSet ); } } diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx index 1ab325949492..eaf6d5f9efa2 100644 --- a/sw/source/ui/dbui/mmoutputpage.cxx +++ b/sw/source/ui/dbui/mmoutputpage.cxx @@ -552,11 +552,11 @@ IMPL_LINK_TYPED(SwMailMergeOutputPage, SaveStartHdl_Impl, Button*, pButton, void OSL_ENSURE( pSourceView, "source view missing"); if(pSourceView) { - SfxViewFrame* pSourceViewFrm = pSourceView->GetViewFrame(); + SfxViewFrame* pSourceViewFrame = pSourceView->GetViewFrame(); uno::Reference< frame::XFrame > xFrame = - pSourceViewFrm->GetFrame().GetFrameInterface(); + pSourceViewFrame->GetFrame().GetFrameInterface(); xFrame->getContainerWindow()->setVisible(sal_True); - pSourceViewFrm->GetDispatcher()->Execute(SID_SAVEDOC, SfxCallMode::SYNCHRON); + pSourceViewFrame->GetDispatcher()->Execute(SID_SAVEDOC, SfxCallMode::SYNCHRON); xFrame->getContainerWindow()->setVisible(sal_False); SwDocShell* pDocShell = pSourceView->GetDocShell(); //if the document has been saved its URL has to be stored for @@ -594,7 +594,7 @@ int SwMailMergeOutputPage::documentStartPageNumber( int document ) const SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem(); SwView* pTargetView = rConfigItem.GetTargetView(); assert( pTargetView ); - SwCrsrShell& shell = pTargetView->GetWrtShell(); + SwCursorShell& shell = pTargetView->GetWrtShell(); const SwDocMergeInfo& info = rConfigItem.GetDocumentMergeInfo( document ); sal_uInt16 page, dummy; shell.Push(); diff --git a/sw/source/ui/dialog/macassgn.cxx b/sw/source/ui/dialog/macassgn.cxx index 5eadf9a3f2e8..7db602354c48 100644 --- a/sw/source/ui/dialog/macassgn.cxx +++ b/sw/source/ui/dialog/macassgn.cxx @@ -68,7 +68,7 @@ SfxEventNamesItem SwMacroAssignDlg::AddEvents( DlgEventType eType ) SVX_EVENT_IMAGE_LOAD); } // no break; - case MACASSGN_FRMURL: // Frm - URL-Attributes + case MACASSGN_FRMURL: // Frame - URL-Attributes { if( !bHtmlMode && (MACASSGN_FRMURL == eType || MACASSGN_ALLFRM == eType)) diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx index fb2fb83e5a7f..a097e030c326 100644 --- a/sw/source/ui/dialog/swdlgfact.cxx +++ b/sw/source/ui/dialog/swdlgfact.cxx @@ -924,15 +924,15 @@ VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateTableMergeDialog(vcl::Wi return new VclAbstractDialog_Impl( pDlg ); } -SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateFrmTabDialog(const OUString &rDialogType, +SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateFrameTabDialog(const OUString &rDialogType, SfxViewFrame *pFrame, vcl::Window *pParent, const SfxItemSet& rCoreSet, - bool bNewFrm, + bool bNewFrame, bool bFormat, const OString& sDefPage, const OUString* pFormatStr ) { - VclPtr<SfxTabDialog> pDlg = VclPtr<SwFrmDlg>::Create(pFrame, pParent, rCoreSet, bNewFrm, rDialogType, bFormat, sDefPage, pFormatStr); + VclPtr<SfxTabDialog> pDlg = VclPtr<SwFrameDlg>::Create(pFrame, pParent, rCoreSet, bNewFrame, rDialogType, bFormat, sDefPage, pFormatStr); return new AbstractTabDialog_Impl(pDlg); } @@ -1156,7 +1156,7 @@ CreateTabPage SwAbstractDialogFactory_Impl::GetTabPageCreatorFunc( sal_uInt16 nI break; case RID_SW_TP_OPTSHDWCRSR: case RID_SW_TP_HTML_OPTSHDWCRSR: - pRet = SwShdwCrsrOptionsTabPage::Create; + pRet = SwShdwCursorOptionsTabPage::Create; break; case RID_SW_TP_REDLINE_OPT : pRet = SwRedlineOptionsTabPage::Create; diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx index ec09b278f765..45690ebd831b 100644 --- a/sw/source/ui/dialog/swdlgfact.hxx +++ b/sw/source/ui/dialog/swdlgfact.hxx @@ -428,10 +428,10 @@ public: virtual AbstractSwModalRedlineAcceptDlg * CreateSwModalRedlineAcceptDlg(vcl::Window *pParent) override; virtual VclAbstractDialog* CreateTableMergeDialog(vcl::Window* pParent, bool& rWithPrev) override; - virtual SfxAbstractTabDialog* CreateFrmTabDialog( const OUString &rDialogType, + virtual SfxAbstractTabDialog* CreateFrameTabDialog( const OUString &rDialogType, SfxViewFrame *pFrame, vcl::Window *pParent, const SfxItemSet& rCoreSet, - bool bNewFrm = true, + bool bNewFrame = true, bool bFormat = false, const OString& sDefPage = OString(), const OUString* pFormatStr = nullptr) override; diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index 35a7b606f67b..44b1119449ee 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -140,7 +140,7 @@ private: SwFormatFootnoteAtTextEnd m_FootnoteNtAtEnd; SwFormatEndAtTextEnd m_EndNtAtEnd; SwFormatNoBalancedColumns m_Balance; - SvxFrameDirectionItem m_FrmDirItem; + SvxFrameDirectionItem m_FrameDirItem; SvxLRSpaceItem m_LRSpaceItem; const size_t m_nArrPos; // shows, if maybe textcontent is in the region @@ -158,7 +158,7 @@ public: SwFormatFootnoteAtTextEnd& GetFootnoteNtAtEnd() { return m_FootnoteNtAtEnd; } SwFormatEndAtTextEnd& GetEndNtAtEnd() { return m_EndNtAtEnd; } SwFormatNoBalancedColumns& GetBalance() { return m_Balance; } - SvxFrameDirectionItem& GetFrmDir() { return m_FrmDirItem; } + SvxFrameDirectionItem& GetFrameDir() { return m_FrameDirItem; } SvxLRSpaceItem& GetLRSpace() { return m_LRSpaceItem; } size_t GetArrPos() const { return m_nArrPos; } @@ -182,7 +182,7 @@ public: SectRepr::SectRepr( size_t nPos, SwSection& rSect ) : m_SectionData( rSect ) , m_Brush( RES_BACKGROUND ) - , m_FrmDirItem( FRMDIR_ENVIRONMENT, RES_FRAMEDIR ) + , m_FrameDirItem( FRMDIR_ENVIRONMENT, RES_FRAMEDIR ) , m_LRSpaceItem( RES_LR_SPACE ) , m_nArrPos(nPos) , m_bContent(m_SectionData.GetLinkFileName().isEmpty()) @@ -196,7 +196,7 @@ SectRepr::SectRepr( size_t nPos, SwSection& rSect ) m_FootnoteNtAtEnd = pFormat->GetFootnoteAtTextEnd(); m_EndNtAtEnd = pFormat->GetEndAtTextEnd(); m_Balance.SetValue(pFormat->GetBalancedColumns().GetValue()); - m_FrmDirItem = pFormat->GetFrmDir(); + m_FrameDirItem = pFormat->GetFrameDir(); m_LRSpaceItem = pFormat->GetLRSpace(); } } @@ -797,8 +797,8 @@ IMPL_LINK_NOARG_TYPED(SwEditRegionDlg, OkHdl, Button*, void) if( pFormat->GetBalancedColumns() != pRepr->GetBalance() ) pSet->Put( pRepr->GetBalance() ); - if( pFormat->GetFrmDir() != pRepr->GetFrmDir() ) - pSet->Put( pRepr->GetFrmDir() ); + if( pFormat->GetFrameDir() != pRepr->GetFrameDir() ) + pSet->Put( pRepr->GetFrameDir() ); if( pFormat->GetLRSpace() != pRepr->GetLRSpace()) pSet->Put( pRepr->GetLRSpace()); @@ -1056,7 +1056,7 @@ IMPL_LINK_NOARG_TYPED(SwEditRegionDlg, OptionsHdl, Button*, void) aSet.Put( pSectRepr->GetFootnoteNtAtEnd() ); aSet.Put( pSectRepr->GetEndNtAtEnd() ); aSet.Put( pSectRepr->GetBalance() ); - aSet.Put( pSectRepr->GetFrmDir() ); + aSet.Put( pSectRepr->GetFrameDir() ); aSet.Put( pSectRepr->GetLRSpace() ); const SwSectionFormats& rDocFormats = rSh.GetDoc()->GetSections(); @@ -1068,7 +1068,7 @@ IMPL_LINK_NOARG_TYPED(SwEditRegionDlg, OptionsHdl, Button*, void) if (!nWidth) nWidth = USHRT_MAX; - aSet.Put(SwFormatFrmSize(ATT_VAR_SIZE, nWidth)); + aSet.Put(SwFormatFrameSize(ATT_VAR_SIZE, nWidth)); aSet.Put(SvxSizeItem(SID_ATTR_PAGE_SIZE, Size(nWidth, nWidth))); ScopedVclPtrInstance< SwSectionPropertyTabDialog > aTabDlg(this, aSet, rSh); @@ -1079,7 +1079,7 @@ IMPL_LINK_NOARG_TYPED(SwEditRegionDlg, OptionsHdl, Button*, void) { const SfxPoolItem *pColItem, *pBrushItem, *pFootnoteItem, *pEndItem, *pBalanceItem, - *pFrmDirItem, *pLRSpaceItem; + *pFrameDirItem, *pLRSpaceItem; SfxItemState eColState = pOutSet->GetItemState( RES_COL, false, &pColItem ); SfxItemState eBrushState = pOutSet->GetItemState( @@ -1090,8 +1090,8 @@ IMPL_LINK_NOARG_TYPED(SwEditRegionDlg, OptionsHdl, Button*, void) RES_END_AT_TXTEND, false, &pEndItem ); SfxItemState eBalanceState = pOutSet->GetItemState( RES_COLUMNBALANCE, false, &pBalanceItem ); - SfxItemState eFrmDirState = pOutSet->GetItemState( - RES_FRAMEDIR, false, &pFrmDirItem ); + SfxItemState eFrameDirState = pOutSet->GetItemState( + RES_FRAMEDIR, false, &pFrameDirItem ); SfxItemState eLRState = pOutSet->GetItemState( RES_LR_SPACE, false, &pLRSpaceItem); @@ -1100,7 +1100,7 @@ IMPL_LINK_NOARG_TYPED(SwEditRegionDlg, OptionsHdl, Button*, void) SfxItemState::SET == eFootnoteState || SfxItemState::SET == eEndState || SfxItemState::SET == eBalanceState|| - SfxItemState::SET == eFrmDirState|| + SfxItemState::SET == eFrameDirState|| SfxItemState::SET == eLRState) { SvTreeListEntry* pSelEntry = m_pTree->FirstSelected(); @@ -1117,8 +1117,8 @@ IMPL_LINK_NOARG_TYPED(SwEditRegionDlg, OptionsHdl, Button*, void) pRepr->GetEndNtAtEnd() = *static_cast<const SwFormatEndAtTextEnd*>(pEndItem); if( SfxItemState::SET == eBalanceState ) pRepr->GetBalance().SetValue(static_cast<const SwFormatNoBalancedColumns*>(pBalanceItem)->GetValue()); - if( SfxItemState::SET == eFrmDirState ) - pRepr->GetFrmDir().SetValue(static_cast<const SvxFrameDirectionItem*>(pFrmDirItem)->GetValue()); + if( SfxItemState::SET == eFrameDirState ) + pRepr->GetFrameDir().SetValue(static_cast<const SvxFrameDirectionItem*>(pFrameDirItem)->GetValue()); if( SfxItemState::SET == eLRState ) pRepr->GetLRSpace() = *static_cast<const SvxLRSpaceItem*>(pLRSpaceItem); @@ -1443,7 +1443,7 @@ void SwInsertSectionTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) } else if (nId == m_nColumnPageId) { - const SwFormatFrmSize& rSize = static_cast<const SwFormatFrmSize&>(GetInputSetImpl()->Get(RES_FRM_SIZE)); + const SwFormatFrameSize& rSize = static_cast<const SwFormatFrameSize&>(GetInputSetImpl()->Get(RES_FRM_SIZE)); static_cast<SwColumnPage&>(rPage).SetPageWidth(rSize.GetWidth()); static_cast<SwColumnPage&>(rPage).ShowBalance(true); static_cast<SwColumnPage&>(rPage).SetInSection(true); @@ -1464,12 +1464,12 @@ short SwInsertSectionTabDialog::Ok() "SwInsertSectionTabDialog: no SectionData?"); const SfxItemSet* pOutputItemSet = GetOutputItemSet(); rWrtSh.InsertSection(*m_pSectionData, pOutputItemSet); - SfxViewFrame* pViewFrm = rWrtSh.GetView().GetViewFrame(); + SfxViewFrame* pViewFrame = rWrtSh.GetView().GetViewFrame(); uno::Reference< frame::XDispatchRecorder > xRecorder = - pViewFrm->GetBindings().GetRecorder(); + pViewFrame->GetBindings().GetRecorder(); if ( xRecorder.is() ) { - SfxRequest aRequest( pViewFrm, FN_INSERT_REGION); + SfxRequest aRequest( pViewFrame, FN_INSERT_REGION); const SfxPoolItem* pCol; if(SfxItemState::SET == pOutputItemSet->GetItemState(RES_COL, false, &pCol)) { diff --git a/sw/source/ui/envelp/labelexp.cxx b/sw/source/ui/envelp/labelexp.cxx index f027de2d9dca..26ff44dd7d9a 100644 --- a/sw/source/ui/envelp/labelexp.cxx +++ b/sw/source/ui/envelp/labelexp.cxx @@ -107,7 +107,7 @@ IMPL_LINK_NOARG_TYPED(SwVisitingCardPage, FrameControlInitializedHdl, SwOneExamp OUString sEntry; if( pSel ) sEntry = *static_cast<OUString*>(pSel->GetUserData()); - uno::Reference< text::XTextCursor > & xCrsr = pExampleFrame->GetTextCursor(); + uno::Reference< text::XTextCursor > & xCursor = pExampleFrame->GetTextCursor(); OUString uEntry(sEntry); if(LISTBOX_ENTRY_NOTFOUND != m_pAutoTextGroupLB->GetSelectEntryPos()) @@ -124,7 +124,7 @@ IMPL_LINK_NOARG_TYPED(SwVisitingCardPage, FrameControlInitializedHdl, SwOneExamp aEntry >>= xEntry; if(xEntry.is()) { - uno::Reference< text::XTextRange > xRange(xCrsr, uno::UNO_QUERY); + uno::Reference< text::XTextRange > xRange(xCursor, uno::UNO_QUERY); xEntry->applyTo(xRange); } UpdateFields(); diff --git a/sw/source/ui/fldui/DropDownFieldDialog.cxx b/sw/source/ui/fldui/DropDownFieldDialog.cxx index 2df5ba1199ba..a4a00367082d 100644 --- a/sw/source/ui/fldui/DropDownFieldDialog.cxx +++ b/sw/source/ui/fldui/DropDownFieldDialog.cxx @@ -65,7 +65,7 @@ sw::DropDownFieldDialog::DropDownFieldDialog(vcl::Window *pParent, SwWrtShell &r m_pListItemsLB->SelectEntry(pDropField->GetSelectedItem()); } - bool bEnable = !rSh.IsCrsrReadonly(); + bool bEnable = !rSh.IsCursorReadonly(); m_pOKPB->Enable( bEnable ); m_pListItemsLB->GrabFocus(); diff --git a/sw/source/ui/fldui/fldedt.cxx b/sw/source/ui/fldui/fldedt.cxx index c339618a5ef2..23c26b837c80 100644 --- a/sw/source/ui/fldui/fldedt.cxx +++ b/sw/source/ui/fldui/fldedt.cxx @@ -51,7 +51,7 @@ void SwFieldEditDlg::EnsureSelection(SwField *pCurField, SwFieldMgr &rMgr) { - if (pSh->CrsrInsideInputField()) + if (pSh->CursorInsideInputField()) { // move cursor to start of Input Field SwInputField* pInputField = dynamic_cast<SwInputField*>(pCurField); @@ -65,8 +65,8 @@ void SwFieldEditDlg::EnsureSelection(SwField *pCurField, SwFieldMgr &rMgr) Normalize PaM instead of swapping. */ if (!pSh->HasSelection()) { - SwShellCrsr* pCrsr = pSh->getShellCrsr(true); - SwPosition aOrigPos(*pCrsr->GetPoint()); + SwShellCursor* pCursor = pSh->getShellCursor(true); + SwPosition aOrigPos(*pCursor->GetPoint()); //After this attempt it is possible that rMgr.GetCurField() != pCurField if //the field was in e.g. a zero height portion and so invisible in which @@ -78,8 +78,8 @@ void SwFieldEditDlg::EnsureSelection(SwField *pCurField, SwFieldMgr &rMgr) bool bSelectionFailed = pCurField != pRealCurField; if (bSelectionFailed) { - pCrsr->DeleteMark(); - *pCrsr->GetPoint() = aOrigPos; + pCursor->DeleteMark(); + *pCursor->GetPoint() = aOrigPos; } } @@ -137,7 +137,7 @@ void SwFieldEditDlg::Init() // Traveling only when more than one field pSh->StartAction(); - pSh->CreateCrsr(); + pSh->CreateCursor(); bool bMove = rMgr.GoNext(); if( bMove ) @@ -151,7 +151,7 @@ void SwFieldEditDlg::Init() if (pCurField->GetTypeId() == TYP_EXTUSERFLD) m_pAddressBT->Show(); - pSh->DestroyCrsr(); + pSh->DestroyCursor(); pSh->EndAction(); } diff --git a/sw/source/ui/fldui/inpdlg.cxx b/sw/source/ui/fldui/inpdlg.cxx index 171bfec91edb..5052e3d0303b 100644 --- a/sw/source/ui/fldui/inpdlg.cxx +++ b/sw/source/ui/fldui/inpdlg.cxx @@ -97,7 +97,7 @@ SwFieldInputDlg::SwFieldInputDlg( vcl::Window *pParent, SwWrtShell &rS, // JP 31.3.00: Inputfields in readonly regions must be allowed to // input any content. - 74639 - bool bEnable = !rSh.IsCrsrReadonly(); + bool bEnable = !rSh.IsCursorReadonly(); m_pOKBT->Enable( bEnable ); m_pEditED->SetReadOnly( !bEnable ); diff --git a/sw/source/ui/fldui/javaedit.cxx b/sw/source/ui/fldui/javaedit.cxx index de2b334556ac..02e965df8511 100644 --- a/sw/source/ui/fldui/javaedit.cxx +++ b/sw/source/ui/fldui/javaedit.cxx @@ -151,7 +151,7 @@ void SwJavaEditDialog::CheckTravel() { // Traveling only when more than one field pSh->StartAction(); - pSh->CreateCrsr(); + pSh->CreateCursor(); bNext = pMgr->GoNext(); if( bNext ) @@ -161,7 +161,7 @@ void SwJavaEditDialog::CheckTravel() pMgr->GoNext(); bTravel |= bNext || bPrev; - pSh->DestroyCrsr(); + pSh->DestroyCursor(); pSh->EndAction(); if (pField->IsCodeURL()) diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx index 21475b35f5e7..2abc0d820384 100644 --- a/sw/source/ui/fmtui/tmpdlg.cxx +++ b/sw/source/ui/fmtui/tmpdlg.cxx @@ -242,10 +242,10 @@ SwTemplateDlg::SwTemplateDlg(vcl::Window* pParent, // frame styles case SFX_STYLE_FAMILY_FRAME: { - m_nTypeId = AddTabPage("type", SwFrmPage::Create, - SwFrmPage::GetRanges); - m_nOptionsId = AddTabPage("options", SwFrmAddPage::Create, - SwFrmAddPage::GetRanges); + m_nTypeId = AddTabPage("type", SwFramePage::Create, + SwFramePage::GetRanges); + m_nOptionsId = AddTabPage("options", SwFrameAddPage::Create, + SwFrameAddPage::GetRanges); m_nWrapId = AddTabPage("wrap", SwWrapTabPage::Create, SwWrapTabPage::GetRanges); @@ -448,13 +448,13 @@ void SwTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) } else if (nId == m_nTypeId) { - static_cast<SwFrmPage&>(rPage).SetNewFrame( true ); - static_cast<SwFrmPage&>(rPage).SetFormatUsed( true ); + static_cast<SwFramePage&>(rPage).SetNewFrame( true ); + static_cast<SwFramePage&>(rPage).SetFormatUsed( true ); } else if (nId == m_nOptionsId) { - static_cast<SwFrmAddPage&>(rPage).SetFormatUsed(true); - static_cast<SwFrmAddPage&>(rPage).SetNewFrame(true); + static_cast<SwFrameAddPage&>(rPage).SetFormatUsed(true); + static_cast<SwFrameAddPage&>(rPage).SetNewFrame(true); } else if (nId == m_nWrapId) { @@ -463,7 +463,7 @@ void SwTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) else if (nId == m_nColumnId) { if( nType == SFX_STYLE_FAMILY_FRAME ) - static_cast<SwColumnPage&>(rPage).SetFrmMode(true); + static_cast<SwColumnPage&>(rPage).SetFrameMode(true); static_cast<SwColumnPage&>(rPage).SetFormatUsed( true ); } //UUUU do not remove; many other style dialog combinations still use the SfxTabPage diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx index 9afdb5f318b0..7f0480f4ddc8 100644 --- a/sw/source/ui/frmdlg/column.cxx +++ b/sw/source/ui/frmdlg/column.cxx @@ -135,7 +135,7 @@ SwColumnDlg::SwColumnDlg(vcl::Window* pParent, SwWrtShell& rSh) { const SwFrameFormat* pFormat = rSh.GetFlyFrameFormat() ; pFrameSet = new SfxItemSet(rWrtShell.GetAttrPool(), aSectIds ); - pFrameSet->Put(pFormat->GetFrmSize()); + pFrameSet->Put(pFormat->GetFrameSize()); pFrameSet->Put(pFormat->GetCol()); pColPgSet = pFrameSet; } @@ -150,7 +150,7 @@ SwColumnDlg::SwColumnDlg(vcl::Window* pParent, SwWrtShell& rSh) 0 ); const SwFrameFormat &rFormat = pPageDesc->GetMaster(); - nPageWidth = rFormat.GetFrmSize().GetSize().Width(); + nPageWidth = rFormat.GetFrameSize().GetSize().Width(); const SvxLRSpaceItem& rLRSpace = (const SvxLRSpaceItem&)rFormat.GetLRSpace(); const SvxBoxItem& rBox = (const SvxBoxItem&) rFormat.GetBox(); @@ -270,17 +270,17 @@ void SwColumnDlg::ObjectHdl(ListBox* pBox) case LISTBOX_SELECTION : pSet = pSelectionSet; if( pSelectionSet ) - pSet->Put(SwFormatFrmSize(ATT_VAR_SIZE, nWidth, nWidth)); + pSet->Put(SwFormatFrameSize(ATT_VAR_SIZE, nWidth, nWidth)); break; case LISTBOX_SECTION : case LISTBOX_SECTIONS : pSet = pSectionSet; - pSet->Put(SwFormatFrmSize(ATT_VAR_SIZE, nWidth, nWidth)); + pSet->Put(SwFormatFrameSize(ATT_VAR_SIZE, nWidth, nWidth)); break; case LISTBOX_PAGE : nWidth = nPageWidth; pSet = pPageSet; - pSet->Put(SwFormatFrmSize(ATT_VAR_SIZE, nWidth, nWidth)); + pSet->Put(SwFormatFrameSize(ATT_VAR_SIZE, nWidth, nWidth)); break; case LISTBOX_FRAME: pSet = pFrameSet; @@ -290,7 +290,7 @@ void SwColumnDlg::ObjectHdl(ListBox* pBox) bool bIsSection = pSet == pSectionSet || pSet == pSelectionSet; pTabPage->ShowBalance(bIsSection); pTabPage->SetInSection(bIsSection); - pTabPage->SetFrmMode(true); + pTabPage->SetFrameMode(true); pTabPage->SetPageWidth(nWidth); if( pSet ) pTabPage->Reset(pSet); @@ -363,12 +363,12 @@ IMPL_LINK_NOARG_TYPED(SwColumnDlg, OkHdl, Button*, void) aTmp.Put(*pFrameSet); rWrtShell.StartAction(); rWrtShell.Push(); - rWrtShell.SetFlyFrmAttr( aTmp ); + rWrtShell.SetFlyFrameAttr( aTmp ); // undo the frame selection again - if(rWrtShell.IsFrmSelected()) + if(rWrtShell.IsFrameSelected()) { - rWrtShell.UnSelectFrm(); - rWrtShell.LeaveSelFrmMode(); + rWrtShell.UnSelectFrame(); + rWrtShell.LeaveSelFrameMode(); } rWrtShell.Pop(); rWrtShell.EndAction(); @@ -412,7 +412,7 @@ SwColumnPage::SwColumnPage(vcl::Window *pParent, const SfxItemSet &rSet) , nMinWidth(MINLAY) , pModifiedField(nullptr) , bFormat(false) - , bFrm(false) + , bFrame(false) , bHtmlMode(false) , bLockUpdate(false) { @@ -439,7 +439,7 @@ SwColumnPage::SwColumnPage(vcl::Window *pParent, const SfxItemSet &rSet) get(m_pDefaultVS, "valueset"); get(m_pPgeExampleWN, "pageexample"); - get(m_pFrmExampleWN, "frameexample"); + get(m_pFrameExampleWN, "frameexample"); connectPercentField(aEd1, "width1mf"); connectPercentField(aEd2, "width2mf"); @@ -583,7 +583,7 @@ void SwColumnPage::dispose() m_pTextDirectionFT.clear(); m_pTextDirectionLB.clear(); m_pPgeExampleWN.clear(); - m_pFrmExampleWN.clear(); + m_pFrameExampleWN.clear(); SfxTabPage::dispose(); } @@ -628,13 +628,13 @@ void SwColumnPage::Reset(const SfxItemSet *rSet) m_pCLNrEdt->SetMax(std::max((sal_uInt16)m_pCLNrEdt->GetMax(), nCols)); m_pCLNrEdt->SetLast(std::max(nCols,(sal_uInt16)m_pCLNrEdt->GetMax())); - if(bFrm) + if(bFrame) { if(bFormat) // there is no size here pColMgr->SetActualWidth(FRAME_FORMAT_WIDTH); else { - const SwFormatFrmSize& rSize = static_cast<const SwFormatFrmSize&>(rSet->Get(RES_FRM_SIZE)); + const SwFormatFrameSize& rSize = static_cast<const SwFormatFrameSize&>(rSet->Get(RES_FRM_SIZE)); const SvxBoxItem& rBox = static_cast<const SvxBoxItem&>(rSet->Get(RES_BOX)); pColMgr->SetActualWidth((sal_uInt16)rSize.GetSize().Width() - rBox.GetDistance()); } @@ -795,10 +795,10 @@ IMPL_LINK_NOARG_TYPED( SwColumnPage, UpdateColMgr, Edit&, void ) //prompt example window if(!bLockUpdate) { - if(bFrm) + if(bFrame) { - m_pFrmExampleWN->SetColumns( pColMgr->GetColumns() ); - m_pFrmExampleWN->Invalidate(); + m_pFrameExampleWN->SetColumns( pColMgr->GetColumns() ); + m_pFrameExampleWN->Invalidate(); } else m_pPgeExampleWN->Invalidate(); @@ -1235,7 +1235,7 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet) rDirItem.GetValue() == FRMDIR_VERT_TOP_LEFT; } - if (!bFrm) + if (!bFrame) { if( SfxItemState::SET == rSet.GetItemState( SID_ATTR_PAGE_SIZE )) { @@ -1269,7 +1269,7 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet) UpdateColMgr( *m_pLineWidthEdit ); } } - m_pFrmExampleWN->Hide(); + m_pFrameExampleWN->Hide(); m_pPgeExampleWN->UpdateExample( rSet, pColMgr ); m_pPgeExampleWN->Show(); @@ -1277,10 +1277,10 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet) else { m_pPgeExampleWN->Hide(); - m_pFrmExampleWN->Show(); + m_pFrameExampleWN->Show(); // Size - const SwFormatFrmSize& rSize = static_cast<const SwFormatFrmSize&>(rSet.Get(RES_FRM_SIZE)); + const SwFormatFrameSize& rSize = static_cast<const SwFormatFrameSize&>(rSet.Get(RES_FRM_SIZE)); const SvxBoxItem& rBox = static_cast<const SvxBoxItem&>( rSet.Get(RES_BOX)); sal_uInt16 nTotalWish; @@ -1302,7 +1302,7 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet) } bool bPercent; // only relative data in frame format - if ( bFormat || (rSize.GetWidthPercent() && rSize.GetWidthPercent() != SwFormatFrmSize::SYNCED) ) + if ( bFormat || (rSize.GetWidthPercent() && rSize.GetWidthPercent() != SwFormatFrameSize::SYNCED) ) { // set value for 100% aEd1.SetRefValue(nTotalWish); @@ -1371,9 +1371,9 @@ IMPL_LINK_TYPED( SwColumnPage, SetDefaultsHdl, ValueSet *, pVS, void ) } } -void SwColumnPage::SetFrmMode(bool bMod) +void SwColumnPage::SetFrameMode(bool bMod) { - bFrm = bMod; + bFrame = bMod; } void SwColumnPage::SetInSection(bool bSet) diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx index d07c7fb3bd0a..4f3509e00544 100644 --- a/sw/source/ui/frmdlg/cption.cxx +++ b/sw/source/ui/frmdlg/cption.cxx @@ -178,15 +178,15 @@ SwCaptionDialog::SwCaptionDialog( vcl::Window *pParent, SwView &rV ) : else if( eType & nsSelectionType::SEL_FRM ) { nPoolId = RES_POOLCOLL_LABEL_FRAME; - sString = ::GetOldFrmCat(); - uno::Reference< text::XTextFramesSupplier > xFrms(xModel, uno::UNO_QUERY); - xNameAccess = xFrms->getTextFrames(); + sString = ::GetOldFrameCat(); + uno::Reference< text::XTextFramesSupplier > xFrames(xModel, uno::UNO_QUERY); + xNameAccess = xFrames->getTextFrames(); sObjectName = rSh.GetFlyName(); } else if( eType == nsSelectionType::SEL_TXT ) { nPoolId = RES_POOLCOLL_LABEL_FRAME; - sString = ::GetOldFrmCat(); + sString = ::GetOldFrameCat(); } else if( eType & nsSelectionType::SEL_DRW ) { diff --git a/sw/source/ui/frmdlg/frmdlg.cxx b/sw/source/ui/frmdlg/frmdlg.cxx index 171612a77ca7..66fffef1f306 100644 --- a/sw/source/ui/frmdlg/frmdlg.cxx +++ b/sw/source/ui/frmdlg/frmdlg.cxx @@ -44,10 +44,10 @@ #include <svx/xflgrit.hxx> // the dialog's carrier -SwFrmDlg::SwFrmDlg( SfxViewFrame* pViewFrame, +SwFrameDlg::SwFrameDlg( SfxViewFrame* pViewFrame, vcl::Window* pParent, const SfxItemSet& rCoreSet, - bool bNewFrm, + bool bNewFrame, const OUString& sResType, bool bFormat, const OString& sDefPage, @@ -57,7 +57,7 @@ SwFrmDlg::SwFrmDlg( SfxViewFrame* pViewFrame, "modules/swriter/ui/" + sResType.toAsciiLowerCase() + ".ui", &rCoreSet, pStr != nullptr) , m_bFormat(bFormat) - , m_bNew(bNewFrm) + , m_bNew(bNewFrame) , m_rSet(rCoreSet) , m_sDlgType(sResType) , m_pWrtShell(static_cast<SwView*>(pViewFrame->GetViewShell())->GetWrtShellPtr()) @@ -84,10 +84,10 @@ SwFrmDlg::SwFrmDlg( SfxViewFrame* pViewFrame, SetText(GetText() + SW_RESSTR(STR_COLL_HEADER) + *pStr + ")"); } - m_nStdId = AddTabPage("type", SwFrmPage::Create, nullptr); - m_nAddId = AddTabPage("options", SwFrmAddPage::Create, nullptr); + m_nStdId = AddTabPage("type", SwFramePage::Create, nullptr); + m_nAddId = AddTabPage("options", SwFrameAddPage::Create, nullptr); m_nWrapId = AddTabPage("wrap", SwWrapTabPage::Create, nullptr); - m_nUrlId = AddTabPage("hyperlink", SwFrmURLPage::Create, nullptr); + m_nUrlId = AddTabPage("hyperlink", SwFrameURLPage::Create, nullptr); if (m_sDlgType == "PictureDialog") { m_nPictureId = AddTabPage("picture", SwGrfExtPage::Create, nullptr); @@ -136,25 +136,25 @@ SwFrmDlg::SwFrmDlg( SfxViewFrame* pViewFrame, SetCurPageId(sDefPage); } -SwFrmDlg::~SwFrmDlg() +SwFrameDlg::~SwFrameDlg() { } -void SwFrmDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) +void SwFrameDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) { SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); if (nId == m_nStdId) { - static_cast<SwFrmPage&>(rPage).SetNewFrame(m_bNew); - static_cast<SwFrmPage&>(rPage).SetFormatUsed(m_bFormat); - static_cast<SwFrmPage&>(rPage).SetFrmType(m_sDlgType); + static_cast<SwFramePage&>(rPage).SetNewFrame(m_bNew); + static_cast<SwFramePage&>(rPage).SetFormatUsed(m_bFormat); + static_cast<SwFramePage&>(rPage).SetFrameType(m_sDlgType); } else if (nId == m_nAddId) { - static_cast<SwFrmAddPage&>(rPage).SetFormatUsed(m_bFormat); - static_cast<SwFrmAddPage&>(rPage).SetFrmType(m_sDlgType); - static_cast<SwFrmAddPage&>(rPage).SetNewFrame(m_bNew); - static_cast<SwFrmAddPage&>(rPage).SetShell(m_pWrtShell); + static_cast<SwFrameAddPage&>(rPage).SetFormatUsed(m_bFormat); + static_cast<SwFrameAddPage&>(rPage).SetFrameType(m_sDlgType); + static_cast<SwFrameAddPage&>(rPage).SetNewFrame(m_bNew); + static_cast<SwFrameAddPage&>(rPage).SetShell(m_pWrtShell); } else if (nId == m_nWrapId) { @@ -164,10 +164,10 @@ void SwFrmDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) } else if (nId == m_nColumnId) { - static_cast<SwColumnPage&>(rPage).SetFrmMode(true); + static_cast<SwColumnPage&>(rPage).SetFrameMode(true); static_cast<SwColumnPage&>(rPage).SetFormatUsed(m_bFormat); - const SwFormatFrmSize& rSize = static_cast<const SwFormatFrmSize&>( + const SwFormatFrameSize& rSize = static_cast<const SwFormatFrameSize&>( m_rSet.Get( RES_FRM_SIZE )); static_cast<SwColumnPage&>(rPage).SetPageWidth( rSize.GetWidth() ); } diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index 0bf1e50dc144..93ede702cb09 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -76,7 +76,7 @@ using namespace ::sfx2; #define SwFPos SvxSwFramePosString -struct FrmMap +struct FrameMap { SvxSwFramePosString::StringId eStrId; SvxSwFramePosString::StringId eMirrorStrId; @@ -164,7 +164,7 @@ static RelationMap aAsCharRelationMap[] = #define HORI_PAGE_REL (LB_REL_PG_FRAME|LB_REL_PG_PRTAREA|LB_REL_PG_LEFT| \ LB_REL_PG_RIGHT) -static FrmMap aHPageMap[] = +static FrameMap aHPageMap[] = { {SwFPos::LEFT, SwFPos::MIR_LEFT, text::HoriOrientation::LEFT, HORI_PAGE_REL}, {SwFPos::RIGHT, SwFPos::MIR_RIGHT, text::HoriOrientation::RIGHT, HORI_PAGE_REL}, @@ -172,14 +172,14 @@ static FrmMap aHPageMap[] = {SwFPos::FROMLEFT, SwFPos::MIR_FROMLEFT, text::HoriOrientation::NONE, HORI_PAGE_REL} }; -static FrmMap aHPageHtmlMap[] = +static FrameMap aHPageHtmlMap[] = { {SwFPos::FROMLEFT, SwFPos::MIR_FROMLEFT, text::HoriOrientation::NONE, LB_REL_PG_FRAME} }; #define VERT_PAGE_REL (LB_REL_PG_FRAME|LB_REL_PG_PRTAREA) -static FrmMap aVPageMap[] = +static FrameMap aVPageMap[] = { {SwFPos::TOP, SwFPos::TOP, text::VertOrientation::TOP, VERT_PAGE_REL}, {SwFPos::BOTTOM, SwFPos::BOTTOM, text::VertOrientation::BOTTOM, VERT_PAGE_REL}, @@ -187,7 +187,7 @@ static FrmMap aVPageMap[] = {SwFPos::FROMTOP, SwFPos::FROMTOP, text::VertOrientation::NONE, VERT_PAGE_REL} }; -static FrmMap aVPageHtmlMap[] = +static FrameMap aVPageHtmlMap[] = { {SwFPos::FROMTOP, SwFPos::FROMTOP, text::VertOrientation::NONE, LB_REL_PG_FRAME} }; @@ -196,7 +196,7 @@ static FrmMap aVPageHtmlMap[] = #define HORI_FRAME_REL (LB_FLY_REL_PG_FRAME|LB_FLY_REL_PG_PRTAREA| \ LB_FLY_REL_PG_LEFT|LB_FLY_REL_PG_RIGHT) -static FrmMap aHFrameMap[] = +static FrameMap aHFrameMap[] = { {SwFPos::LEFT, SwFPos::MIR_LEFT, text::HoriOrientation::LEFT, HORI_FRAME_REL}, {SwFPos::RIGHT, SwFPos::MIR_RIGHT, text::HoriOrientation::RIGHT, HORI_FRAME_REL}, @@ -204,7 +204,7 @@ static FrmMap aHFrameMap[] = {SwFPos::FROMLEFT, SwFPos::MIR_FROMLEFT, text::HoriOrientation::NONE, HORI_FRAME_REL} }; -static FrmMap aHFlyHtmlMap[] = +static FrameMap aHFlyHtmlMap[] = { {SwFPos::LEFT, SwFPos::MIR_LEFT, text::HoriOrientation::LEFT, LB_FLY_REL_PG_FRAME}, {SwFPos::FROMLEFT, SwFPos::MIR_FROMLEFT, text::HoriOrientation::NONE, LB_FLY_REL_PG_FRAME} @@ -213,7 +213,7 @@ static FrmMap aHFlyHtmlMap[] = // own vertical alignment map for objects anchored to frame #define VERT_FRAME_REL (LB_FLY_VERT_FRAME|LB_FLY_VERT_PRTAREA) -static FrmMap aVFrameMap[] = +static FrameMap aVFrameMap[] = { {SwFPos::TOP, SwFPos::TOP, text::VertOrientation::TOP, VERT_FRAME_REL}, {SwFPos::BOTTOM, SwFPos::BOTTOM, text::VertOrientation::BOTTOM, VERT_FRAME_REL}, @@ -221,7 +221,7 @@ static FrmMap aVFrameMap[] = {SwFPos::FROMTOP, SwFPos::FROMTOP, text::VertOrientation::NONE, VERT_FRAME_REL} }; -static FrmMap aVFlyHtmlMap[] = +static FrameMap aVFlyHtmlMap[] = { {SwFPos::TOP, SwFPos::TOP, text::VertOrientation::TOP, LB_FLY_VERT_FRAME}, {SwFPos::FROMTOP, SwFPos::FROMTOP, text::VertOrientation::NONE, LB_FLY_VERT_FRAME} @@ -232,7 +232,7 @@ static FrmMap aVFlyHtmlMap[] = LB_REL_PG_FRAME|LB_REL_PG_PRTAREA|LB_REL_FRM_LEFT| \ LB_REL_FRM_RIGHT) -static FrmMap aHParaMap[] = +static FrameMap aHParaMap[] = { {SwFPos::LEFT, SwFPos::MIR_LEFT, text::HoriOrientation::LEFT, HORI_PARA_REL}, {SwFPos::RIGHT, SwFPos::MIR_RIGHT, text::HoriOrientation::RIGHT, HORI_PARA_REL}, @@ -242,13 +242,13 @@ static FrmMap aHParaMap[] = #define HTML_HORI_PARA_REL (LB_FRAME|LB_PRTAREA) -static FrmMap aHParaHtmlMap[] = +static FrameMap aHParaHtmlMap[] = { {SwFPos::LEFT, SwFPos::LEFT, text::HoriOrientation::LEFT, HTML_HORI_PARA_REL}, {SwFPos::RIGHT, SwFPos::RIGHT, text::HoriOrientation::RIGHT, HTML_HORI_PARA_REL} }; -static FrmMap aHParaHtmlAbsMap[] = +static FrameMap aHParaHtmlAbsMap[] = { {SwFPos::LEFT, SwFPos::MIR_LEFT, text::HoriOrientation::LEFT, HTML_HORI_PARA_REL}, {SwFPos::RIGHT, SwFPos::MIR_RIGHT, text::HoriOrientation::RIGHT, HTML_HORI_PARA_REL} @@ -258,7 +258,7 @@ static FrmMap aHParaHtmlAbsMap[] = #define VERT_PARA_REL (LB_VERT_FRAME|LB_VERT_PRTAREA| \ LB_REL_PG_FRAME|LB_REL_PG_PRTAREA) -static FrmMap aVParaMap[] = +static FrameMap aVParaMap[] = { {SwFPos::TOP, SwFPos::TOP, text::VertOrientation::TOP, VERT_PARA_REL}, {SwFPos::BOTTOM, SwFPos::BOTTOM, text::VertOrientation::BOTTOM, VERT_PARA_REL}, @@ -266,7 +266,7 @@ static FrmMap aVParaMap[] = {SwFPos::FROMTOP, SwFPos::FROMTOP, text::VertOrientation::NONE, VERT_PARA_REL} }; -static FrmMap aVParaHtmlMap[] = +static FrameMap aVParaHtmlMap[] = { {SwFPos::TOP, SwFPos::TOP, text::VertOrientation::TOP, LB_VERT_PRTAREA} }; @@ -276,7 +276,7 @@ static FrmMap aVParaHtmlMap[] = LB_REL_PG_FRAME|LB_REL_PG_PRTAREA|LB_REL_FRM_LEFT| \ LB_REL_FRM_RIGHT|LB_REL_CHAR) -static FrmMap aHCharMap[] = +static FrameMap aHCharMap[] = { {SwFPos::LEFT, SwFPos::MIR_LEFT, text::HoriOrientation::LEFT, HORI_CHAR_REL}, {SwFPos::RIGHT, SwFPos::MIR_RIGHT, text::HoriOrientation::RIGHT, HORI_CHAR_REL}, @@ -286,13 +286,13 @@ static FrmMap aHCharMap[] = #define HTML_HORI_CHAR_REL (LB_FRAME|LB_PRTAREA|LB_REL_CHAR) -static FrmMap aHCharHtmlMap[] = +static FrameMap aHCharHtmlMap[] = { {SwFPos::LEFT, SwFPos::LEFT, text::HoriOrientation::LEFT, HTML_HORI_CHAR_REL}, {SwFPos::RIGHT, SwFPos::RIGHT, text::HoriOrientation::RIGHT, HTML_HORI_CHAR_REL} }; -static FrmMap aHCharHtmlAbsMap[] = +static FrameMap aHCharHtmlAbsMap[] = { {SwFPos::LEFT, SwFPos::MIR_LEFT, text::HoriOrientation::LEFT, LB_PRTAREA|LB_REL_CHAR}, {SwFPos::RIGHT, SwFPos::MIR_RIGHT, text::HoriOrientation::RIGHT, LB_PRTAREA}, @@ -303,14 +303,14 @@ static FrmMap aHCharHtmlAbsMap[] = #define VERT_CHAR_REL (LB_VERT_FRAME|LB_VERT_PRTAREA| \ LB_REL_PG_FRAME|LB_REL_PG_PRTAREA) -static FrmMap aVCharMap[] = +static FrameMap aVCharMap[] = { // introduce mappings for new vertical alignment at top of line <LB_VERT_LINE> // and correct mapping for vertical alignment at character for position <FROM_BOTTOM> // Note: Because of these adjustments the map becomes ambigous in its values // <eStrId>/<eMirrorStrId> and <nAlign>. These ambiguities are considered - // in the methods <SwFrmPage::FillRelLB(..)>, <SwFrmPage::GetAlignment(..)> - // and <SwFrmPage::FillPosLB(..)> + // in the methods <SwFramePage::FillRelLB(..)>, <SwFramePage::GetAlignment(..)> + // and <SwFramePage::FillPosLB(..)> {SwFPos::TOP, SwFPos::TOP, text::VertOrientation::TOP, VERT_CHAR_REL|LB_REL_CHAR}, {SwFPos::BOTTOM, SwFPos::BOTTOM, text::VertOrientation::BOTTOM, VERT_CHAR_REL|LB_REL_CHAR}, {SwFPos::BELOW, SwFPos::BELOW, text::VertOrientation::CHAR_BOTTOM, LB_REL_CHAR}, @@ -322,19 +322,19 @@ static FrmMap aVCharMap[] = {SwFPos::CENTER_VERT, SwFPos::CENTER_VERT, text::VertOrientation::LINE_CENTER, LB_VERT_LINE} }; -static FrmMap aVCharHtmlMap[] = +static FrameMap aVCharHtmlMap[] = { {SwFPos::BELOW, SwFPos::BELOW, text::VertOrientation::CHAR_BOTTOM, LB_REL_CHAR} }; -static FrmMap aVCharHtmlAbsMap[] = +static FrameMap aVCharHtmlAbsMap[] = { {SwFPos::TOP, SwFPos::TOP, text::VertOrientation::TOP, LB_REL_CHAR}, {SwFPos::BELOW, SwFPos::BELOW, text::VertOrientation::CHAR_BOTTOM, LB_REL_CHAR} }; // anchored as character -static FrmMap aVAsCharMap[] = +static FrameMap aVAsCharMap[] = { {SwFPos::TOP, SwFPos::TOP, text::VertOrientation::TOP, LB_REL_BASE}, {SwFPos::BOTTOM, SwFPos::BOTTOM, text::VertOrientation::BOTTOM, LB_REL_BASE}, @@ -351,7 +351,7 @@ static FrmMap aVAsCharMap[] = {SwFPos::FROMBOTTOM, SwFPos::FROMBOTTOM, text::VertOrientation::NONE, LB_REL_BASE} }; -static FrmMap aVAsCharHtmlMap[] = +static FrameMap aVAsCharHtmlMap[] = { {SwFPos::TOP, SwFPos::TOP, text::VertOrientation::TOP, LB_REL_BASE}, {SwFPos::CENTER_VERT, SwFPos::CENTER_VERT, text::VertOrientation::CENTER, LB_REL_BASE}, @@ -363,14 +363,14 @@ static FrmMap aVAsCharHtmlMap[] = {SwFPos::CENTER_VERT, SwFPos::CENTER_VERT, text::VertOrientation::LINE_CENTER, LB_REL_ROW} }; -const sal_uInt16 SwFrmPage::aPageRg[] = { +const sal_uInt16 SwFramePage::aPageRg[] = { RES_FRM_SIZE, RES_FRM_SIZE, RES_VERT_ORIENT, RES_ANCHOR, RES_COL, RES_COL, RES_FOLLOW_TEXT_FLOW, RES_FOLLOW_TEXT_FLOW, 0 }; -const sal_uInt16 SwFrmAddPage::aAddPgRg[] = { +const sal_uInt16 SwFrameAddPage::aAddPgRg[] = { RES_PROTECT, RES_PROTECT, RES_PRINT, RES_PRINT, FN_SET_FRM_NAME, FN_SET_FRM_NAME, @@ -378,7 +378,7 @@ const sal_uInt16 SwFrmAddPage::aAddPgRg[] = { 0 }; -static size_t lcl_GetFrmMapCount( const FrmMap* pMap) +static size_t lcl_GetFrameMapCount( const FrameMap* pMap) { if ( pMap ) { @@ -566,13 +566,13 @@ static sal_uLong lcl_GetLBRelationsForRelations( const sal_Int16 _nRel ) // helper method on order to determine all possible // listbox relations in a relation map for a given string ID -static sal_uLong lcl_GetLBRelationsForStrID( const FrmMap* _pMap, +static sal_uLong lcl_GetLBRelationsForStrID( const FrameMap* _pMap, const SvxSwFramePosString::StringId _eStrId, const bool _bUseMirrorStr ) { sal_uLong nLBRelations = 0L; - size_t nRelMapSize = lcl_GetFrmMapCount( _pMap ); + size_t nRelMapSize = lcl_GetFrameMapCount( _pMap ); for ( size_t nRelMapPos = 0; nRelMapPos < nRelMapSize; ++nRelMapPos ) { if ( ( !_bUseMirrorStr && _pMap[nRelMapPos].eStrId == _eStrId ) || @@ -597,8 +597,8 @@ namespace } } -SwFrmPage::SwFrmPage(vcl::Window *pParent, const SfxItemSet &rSet) - : SfxTabPage(pParent, "FrmTypePage", +SwFramePage::SwFramePage(vcl::Window *pParent, const SfxItemSet &rSet) + : SfxTabPage(pParent, "FrameTypePage", "modules/swriter/ui/frmtypepage.ui", &rSet) , m_bAtHorzPosModified( false ), @@ -672,53 +672,53 @@ SwFrmPage::SwFrmPage(vcl::Window *pParent, const SfxItemSet &rSet) m_pAtHorzPosED->set_width_request(m_pAtHorzPosED->GetOptimalSize().Width()); m_pAtHorzPosED->set_width_request(m_pAtVertPosED->GetOptimalSize().Width()); - setOptimalFrmWidth(); + setOptimalFrameWidth(); setOptimalRelWidth(); SetExchangeSupport(); - Link<Control&,void> aLk3 = LINK(this, SwFrmPage, RangeModifyLoseFocusHdl); + Link<Control&,void> aLk3 = LINK(this, SwFramePage, RangeModifyLoseFocusHdl); m_aWidthED.SetLoseFocusHdl( aLk3 ); m_aHeightED.SetLoseFocusHdl( aLk3 ); m_pAtHorzPosED->SetLoseFocusHdl( aLk3 ); m_pAtVertPosED->SetLoseFocusHdl( aLk3 ); - m_pFollowTextFlowCB->SetClickHdl( LINK(this, SwFrmPage, RangeModifyClickHdl) ); + m_pFollowTextFlowCB->SetClickHdl( LINK(this, SwFramePage, RangeModifyClickHdl) ); - Link<Edit&,void> aLk = LINK(this, SwFrmPage, ModifyHdl); + Link<Edit&,void> aLk = LINK(this, SwFramePage, ModifyHdl); m_aWidthED.SetModifyHdl( aLk ); m_aHeightED.SetModifyHdl( aLk ); m_pAtHorzPosED->SetModifyHdl( aLk ); m_pAtVertPosED->SetModifyHdl( aLk ); - Link<Button*,void> aLk2 = LINK(this, SwFrmPage, AnchorTypeHdl); + Link<Button*,void> aLk2 = LINK(this, SwFramePage, AnchorTypeHdl); m_pAnchorAtPageRB->SetClickHdl( aLk2 ); m_pAnchorAtParaRB->SetClickHdl( aLk2 ); m_pAnchorAtCharRB->SetClickHdl( aLk2 ); m_pAnchorAsCharRB->SetClickHdl( aLk2 ); m_pAnchorAtFrameRB->SetClickHdl( aLk2 ); - m_pHorizontalDLB->SetSelectHdl(LINK(this, SwFrmPage, PosHdl)); - m_pVerticalDLB-> SetSelectHdl(LINK(this, SwFrmPage, PosHdl)); + m_pHorizontalDLB->SetSelectHdl(LINK(this, SwFramePage, PosHdl)); + m_pVerticalDLB-> SetSelectHdl(LINK(this, SwFramePage, PosHdl)); - m_pHoriRelationLB->SetSelectHdl(LINK(this, SwFrmPage, RelHdl)); - m_pVertRelationLB->SetSelectHdl(LINK(this, SwFrmPage, RelHdl)); + m_pHoriRelationLB->SetSelectHdl(LINK(this, SwFramePage, RelHdl)); + m_pVertRelationLB->SetSelectHdl(LINK(this, SwFramePage, RelHdl)); - m_pMirrorPagesCB->SetClickHdl(LINK(this, SwFrmPage, MirrorHdl)); + m_pMirrorPagesCB->SetClickHdl(LINK(this, SwFramePage, MirrorHdl)); - aLk2 = LINK(this, SwFrmPage, RelSizeClickHdl); + aLk2 = LINK(this, SwFramePage, RelSizeClickHdl); m_pRelWidthCB->SetClickHdl( aLk2 ); m_pRelHeightCB->SetClickHdl( aLk2 ); - m_pAutoWidthCB->SetClickHdl( LINK( this, SwFrmPage, AutoWidthClickHdl ) ); - m_pAutoHeightCB->SetClickHdl( LINK( this, SwFrmPage, AutoHeightClickHdl ) ); + m_pAutoWidthCB->SetClickHdl( LINK( this, SwFramePage, AutoWidthClickHdl ) ); + m_pAutoHeightCB->SetClickHdl( LINK( this, SwFramePage, AutoHeightClickHdl ) ); } -SwFrmPage::~SwFrmPage() +SwFramePage::~SwFramePage() { disposeOnce(); } -void SwFrmPage::dispose() +void SwFramePage::dispose() { m_pWidthFT.clear(); m_pWidthAutoFT.clear(); @@ -758,16 +758,16 @@ void SwFrmPage::dispose() namespace { - struct FrmMaps + struct FrameMaps { - FrmMap *pMap; + FrameMap *pMap; size_t nCount; }; } -void SwFrmPage::setOptimalFrmWidth() +void SwFramePage::setOptimalFrameWidth() { - const FrmMaps aMaps[] = { + const FrameMaps aMaps[] = { { aHPageMap, SAL_N_ELEMENTS(aHPageMap) }, { aHPageHtmlMap, SAL_N_ELEMENTS(aHPageHtmlMap) }, { aVPageMap, SAL_N_ELEMENTS(aVPageMap) }, @@ -825,7 +825,7 @@ namespace }; } -void SwFrmPage::setOptimalRelWidth() +void SwFramePage::setOptimalRelWidth() { const RelationMaps aMaps[] = { { aRelationMap, SAL_N_ELEMENTS(aRelationMap) }, @@ -859,12 +859,12 @@ void SwFrmPage::setOptimalRelWidth() m_pHoriRelationLB->Clear(); } -VclPtr<SfxTabPage> SwFrmPage::Create(vcl::Window *pParent, const SfxItemSet *rSet) +VclPtr<SfxTabPage> SwFramePage::Create(vcl::Window *pParent, const SfxItemSet *rSet) { - return VclPtr<SwFrmPage>::Create( pParent, *rSet ); + return VclPtr<SwFramePage>::Create( pParent, *rSet ); } -void SwFrmPage::EnableGraficMode() +void SwFramePage::EnableGraficMode() { // i#39692 - mustn't be called more than once if(!m_pRealSizeBT->IsVisible()) @@ -881,15 +881,15 @@ void SwFrmPage::EnableGraficMode() } } -SwWrtShell *SwFrmPage::getFrmDlgParentShell() +SwWrtShell *SwFramePage::getFrameDlgParentShell() { - return static_cast<SwFrmDlg*>(GetParentDialog())->GetWrtShell(); + return static_cast<SwFrameDlg*>(GetParentDialog())->GetWrtShell(); } -void SwFrmPage::Reset( const SfxItemSet *rSet ) +void SwFramePage::Reset( const SfxItemSet *rSet ) { SwWrtShell* pSh = m_bFormat ? ::GetActiveWrtShell() : - getFrmDlgParentShell(); + getFrameDlgParentShell(); m_nHtmlMode = ::GetHtmlMode(pSh->GetView().GetDocShell()); m_bHtmlMode = (m_nHtmlMode & HTMLMODE_ON) != 0; @@ -920,7 +920,7 @@ void SwFrmPage::Reset( const SfxItemSet *rSet ) { if (rAnchor.GetAnchorId() != FLY_AT_FLY && !pSh->IsFlyInFly()) m_pAnchorAtFrameRB->Hide(); - if ( pSh->IsFrmVertical( true, m_bIsInRightToLeft, m_bIsVerticalL2R ) ) + if ( pSh->IsFrameVertical( true, m_bIsInRightToLeft, m_bIsVerticalL2R ) ) { OUString sHLabel = m_pHorizontalFT->GetText(); m_pHorizontalFT->SetText(m_pVerticalFT->GetText()); @@ -940,7 +940,7 @@ void SwFrmPage::Reset( const SfxItemSet *rSet ) if ( !m_bNew ) { - m_pRealSizeBT->SetClickHdl(LINK(this, SwFrmPage, RealSizeHdl)); + m_pRealSizeBT->SetClickHdl(LINK(this, SwFramePage, RealSizeHdl)); EnableGraficMode(); } @@ -956,7 +956,7 @@ void SwFrmPage::Reset( const SfxItemSet *rSet ) } else { - m_aGrfSize = static_cast<const SwFormatFrmSize&>(rSet->Get(RES_FRM_SIZE)).GetSize(); + m_aGrfSize = static_cast<const SwFormatFrameSize&>(rSet->Get(RES_FRM_SIZE)).GetSize(); } // entering procent value made possible @@ -965,14 +965,14 @@ void SwFrmPage::Reset( const SfxItemSet *rSet ) //the available space is not yet known so the RefValue has to be calculated from size and relative size values //this is needed only if relative values are already set - const SwFormatFrmSize& rFrmSize = static_cast<const SwFormatFrmSize&>(rSet->Get(RES_FRM_SIZE)); + const SwFormatFrameSize& rFrameSize = static_cast<const SwFormatFrameSize&>(rSet->Get(RES_FRM_SIZE)); m_pRelWidthRelationLB->InsertEntry(m_aFramePosString.GetString(SwFPos::FRAME)); m_pRelWidthRelationLB->InsertEntry(m_aFramePosString.GetString(SwFPos::REL_PG_FRAME)); - if (rFrmSize.GetWidthPercent() != SwFormatFrmSize::SYNCED && rFrmSize.GetWidthPercent() != 0) + if (rFrameSize.GetWidthPercent() != SwFormatFrameSize::SYNCED && rFrameSize.GetWidthPercent() != 0) { //calculate the rerference value from the with and relative width values - sal_Int32 nSpace = rFrmSize.GetWidth() * 100 / rFrmSize.GetWidthPercent(); + sal_Int32 nSpace = rFrameSize.GetWidth() * 100 / rFrameSize.GetWidthPercent(); m_aWidthED.SetRefValue( nSpace ); m_pRelWidthRelationLB->Enable(); @@ -982,10 +982,10 @@ void SwFrmPage::Reset( const SfxItemSet *rSet ) m_pRelHeightRelationLB->InsertEntry(m_aFramePosString.GetString(SwFPos::FRAME)); m_pRelHeightRelationLB->InsertEntry(m_aFramePosString.GetString(SwFPos::REL_PG_FRAME)); - if (rFrmSize.GetHeightPercent() != SwFormatFrmSize::SYNCED && rFrmSize.GetHeightPercent() != 0) + if (rFrameSize.GetHeightPercent() != SwFormatFrameSize::SYNCED && rFrameSize.GetHeightPercent() != 0) { //calculate the rerference value from the with and relative width values - sal_Int32 nSpace = rFrmSize.GetHeight() * 100 / rFrmSize.GetHeightPercent(); + sal_Int32 nSpace = rFrameSize.GetHeight() * 100 / rFrameSize.GetHeightPercent(); m_aHeightED.SetRefValue( nSpace ); m_pRelHeightRelationLB->Enable(); @@ -1060,11 +1060,11 @@ void SwFrmPage::Reset( const SfxItemSet *rSet ) } // stuff attributes into the set when OK -bool SwFrmPage::FillItemSet(SfxItemSet *rSet) +bool SwFramePage::FillItemSet(SfxItemSet *rSet) { bool bRet = false; SwWrtShell* pSh = m_bFormat ? ::GetActiveWrtShell() - : getFrmDlgParentShell(); + : getFrameDlgParentShell(); OSL_ENSURE( pSh , "shell not found"); const SfxItemSet& rOldSet = GetItemSet(); const SfxPoolItem* pOldItem = nullptr; @@ -1164,8 +1164,8 @@ bool SwFrmPage::FillItemSet(SfxItemSet *rSet) // for a graphic that isn't even loaded, are set. Then no SetSize // is done here when the size settings were not changed by the // user. - const SwFormatFrmSize& rOldSize = static_cast<const SwFormatFrmSize& >(rOldSet.Get(RES_FRM_SIZE)); - SwFormatFrmSize aSz( rOldSize ); + const SwFormatFrameSize& rOldSize = static_cast<const SwFormatFrameSize& >(rOldSet.Get(RES_FRM_SIZE)); + SwFormatFrameSize aSz( rOldSize ); sal_Int32 nRelWidthRelation = m_pRelWidthRelationLB->GetSelectEntryPos(); if (nRelWidthRelation != LISTBOX_ENTRY_NOTFOUND) @@ -1213,24 +1213,24 @@ bool SwFrmPage::FillItemSet(SfxItemSet *rSet) if (m_pFixedRatioCB->IsChecked() && (m_pRelWidthCB->IsChecked() != m_pRelHeightCB->IsChecked())) { if (m_pRelWidthCB->IsChecked()) - aSz.SetHeightPercent(SwFormatFrmSize::SYNCED); + aSz.SetHeightPercent(SwFormatFrameSize::SYNCED); else - aSz.SetWidthPercent(SwFormatFrmSize::SYNCED); + aSz.SetWidthPercent(SwFormatFrameSize::SYNCED); } } if( !IsInGraficMode() ) { if( m_pAutoHeightCB->IsValueChangedFromSaved() ) { - SwFrmSize eFrmSize = m_pAutoHeightCB->IsChecked()? ATT_MIN_SIZE : ATT_FIX_SIZE; - if( eFrmSize != aSz.GetHeightSizeType() ) - aSz.SetHeightSizeType(eFrmSize); + SwFrameSize eFrameSize = m_pAutoHeightCB->IsChecked()? ATT_MIN_SIZE : ATT_FIX_SIZE; + if( eFrameSize != aSz.GetHeightSizeType() ) + aSz.SetHeightSizeType(eFrameSize); } if( m_pAutoWidthCB->IsValueChangedFromSaved() ) { - SwFrmSize eFrmSize = m_pAutoWidthCB->IsChecked()? ATT_MIN_SIZE : ATT_FIX_SIZE; - if( eFrmSize != aSz.GetWidthSizeType() ) - aSz.SetWidthSizeType( eFrmSize ); + SwFrameSize eFrameSize = m_pAutoWidthCB->IsChecked()? ATT_MIN_SIZE : ATT_FIX_SIZE; + if( eFrameSize != aSz.GetWidthSizeType() ) + aSz.SetWidthSizeType( eFrameSize ); } } if( !m_bFormat && m_pFixedRatioCB->IsValueChangedFromSaved() ) @@ -1256,7 +1256,7 @@ bool SwFrmPage::FillItemSet(SfxItemSet *rSet) } // initialise horizonal and vertical Pos -void SwFrmPage::InitPos(RndStdIds eId, +void SwFramePage::InitPos(RndStdIds eId, sal_Int16 nH, sal_Int16 nHRel, sal_Int16 nV, @@ -1390,7 +1390,7 @@ void SwFrmPage::InitPos(RndStdIds eId, UpdateExample(); } -sal_Int32 SwFrmPage::FillPosLB(const FrmMap* _pMap, +sal_Int32 SwFramePage::FillPosLB(const FrameMap* _pMap, const sal_Int16 _nAlign, const sal_Int16 _nRel, ListBox& _rLB ) @@ -1407,7 +1407,7 @@ sal_Int32 SwFrmPage::FillPosLB(const FrmMap* _pMap, : ::lcl_GetLBRelationsForRelations( _nRel ); // fill Listbox - size_t nCount = ::lcl_GetFrmMapCount(_pMap); + size_t nCount = ::lcl_GetFrameMapCount(_pMap); for (size_t i = 0; _pMap && i < nCount; ++i) { // Why not from the left/from inside or from above? @@ -1446,7 +1446,7 @@ sal_Int32 SwFrmPage::FillPosLB(const FrmMap* _pMap, return GetMapPos(_pMap, _rLB); } -sal_uLong SwFrmPage::FillRelLB( const FrmMap* _pMap, +sal_uLong SwFramePage::FillRelLB( const FrameMap* _pMap, const sal_uInt16 _nLBSelPos, const sal_Int16 _nAlign, const sal_Int16 _nRel, @@ -1455,7 +1455,7 @@ sal_uLong SwFrmPage::FillRelLB( const FrmMap* _pMap, { OUString sSelEntry; sal_uLong nLBRelations = 0; - size_t nMapCount = ::lcl_GetFrmMapCount(_pMap); + size_t nMapCount = ::lcl_GetFrameMapCount(_pMap); _rLB.Clear(); @@ -1626,7 +1626,7 @@ sal_uLong SwFrmPage::FillRelLB( const FrmMap* _pMap, return nLBRelations; } -sal_Int16 SwFrmPage::GetRelation(FrmMap * /*pMap*/, ListBox &rRelationLB) +sal_Int16 SwFramePage::GetRelation(FrameMap * /*pMap*/, ListBox &rRelationLB) { const sal_Int32 nPos = rRelationLB.GetSelectEntryPos(); @@ -1639,13 +1639,13 @@ sal_Int16 SwFrmPage::GetRelation(FrmMap * /*pMap*/, ListBox &rRelationLB) return 0; } -sal_Int16 SwFrmPage::GetAlignment(FrmMap *pMap, sal_Int32 nMapPos, +sal_Int16 SwFramePage::GetAlignment(FrameMap *pMap, sal_Int32 nMapPos, ListBox &/*rAlignLB*/, ListBox &rRelationLB) { if (!pMap || nMapPos < 0) return 0; - const size_t nMapCount = ::lcl_GetFrmMapCount(pMap); + const size_t nMapCount = ::lcl_GetFrameMapCount(pMap); if (static_cast<size_t>(nMapPos) >= nMapCount) return 0; @@ -1672,7 +1672,7 @@ sal_Int16 SwFrmPage::GetAlignment(FrmMap *pMap, sal_Int32 nMapPos, return 0; } -sal_Int32 SwFrmPage::GetMapPos( const FrmMap *pMap, ListBox &rAlignLB ) +sal_Int32 SwFramePage::GetMapPos( const FrameMap *pMap, ListBox &rAlignLB ) { sal_Int32 nMapPos = 0; sal_Int32 nLBSelPos = rAlignLB.GetSelectEntryPos(); @@ -1681,7 +1681,7 @@ sal_Int32 SwFrmPage::GetMapPos( const FrmMap *pMap, ListBox &rAlignLB ) { if (pMap == aVAsCharHtmlMap || pMap == aVAsCharMap) { - const size_t nMapCount = ::lcl_GetFrmMapCount(pMap); + const size_t nMapCount = ::lcl_GetFrameMapCount(pMap); const OUString sSelEntry(rAlignLB.GetSelectEntry()); for (size_t i = 0; i < nMapCount; i++) @@ -1705,7 +1705,7 @@ sal_Int32 SwFrmPage::GetMapPos( const FrmMap *pMap, ListBox &rAlignLB ) return nMapPos; } -RndStdIds SwFrmPage::GetAnchor() +RndStdIds SwFramePage::GetAnchor() { RndStdIds nRet = FLY_AT_PAGE; if(m_pAnchorAtParaRB->IsChecked()) @@ -1728,7 +1728,7 @@ RndStdIds SwFrmPage::GetAnchor() } // Bsp - Update -void SwFrmPage::ActivatePage(const SfxItemSet& rSet) +void SwFramePage::ActivatePage(const SfxItemSet& rSet) { m_bNoModifyHdl = true; Init(rSet); @@ -1742,7 +1742,7 @@ void SwFrmPage::ActivatePage(const SfxItemSet& rSet) m_pFollowTextFlowCB->SaveValue(); } -SfxTabPage::sfxpg SwFrmPage::DeactivatePage(SfxItemSet * _pSet) +SfxTabPage::sfxpg SwFramePage::DeactivatePage(SfxItemSet * _pSet) { if ( _pSet ) { @@ -1751,7 +1751,7 @@ SfxTabPage::sfxpg SwFrmPage::DeactivatePage(SfxItemSet * _pSet) //FillItemSet doesn't set the anchor into the set when it matches //the original. But for the other pages we need the current anchor. SwWrtShell* pSh = m_bFormat ? ::GetActiveWrtShell() - : getFrmDlgParentShell(); + : getFrameDlgParentShell(); RndStdIds eAnchorId = (RndStdIds)GetAnchor(); SwFormatAnchor aAnc( eAnchorId, pSh->GetPhyPageNum() ); _pSet->Put( aAnc ); @@ -1761,13 +1761,13 @@ SfxTabPage::sfxpg SwFrmPage::DeactivatePage(SfxItemSet * _pSet) } // swap left/right with inside/outside -IMPL_LINK_NOARG_TYPED(SwFrmPage, MirrorHdl, Button*, void) +IMPL_LINK_NOARG_TYPED(SwFramePage, MirrorHdl, Button*, void) { RndStdIds eId = GetAnchor(); InitPos( eId, -1, 0, -1, 0, LONG_MAX, LONG_MAX); } -IMPL_LINK_TYPED( SwFrmPage, RelSizeClickHdl, Button *, p, void ) +IMPL_LINK_TYPED( SwFramePage, RelSizeClickHdl, Button *, p, void ) { CheckBox* pBtn = static_cast<CheckBox*>(p); if (pBtn == m_pRelWidthCB) @@ -1794,23 +1794,23 @@ IMPL_LINK_TYPED( SwFrmPage, RelSizeClickHdl, Button *, p, void ) } // range check -IMPL_LINK_NOARG_TYPED(SwFrmPage, RangeModifyClickHdl, Button*, void) +IMPL_LINK_NOARG_TYPED(SwFramePage, RangeModifyClickHdl, Button*, void) { RangeModifyHdl(); } -IMPL_LINK_NOARG_TYPED(SwFrmPage, RangeModifyLoseFocusHdl, Control&, void) +IMPL_LINK_NOARG_TYPED(SwFramePage, RangeModifyLoseFocusHdl, Control&, void) { RangeModifyHdl(); } -void SwFrmPage::RangeModifyHdl() +void SwFramePage::RangeModifyHdl() { if (m_bNoModifyHdl) return; SwWrtShell* pSh = m_bFormat ? ::GetActiveWrtShell() - : getFrmDlgParentShell(); + : getFrameDlgParentShell(); OSL_ENSURE(pSh , "shell not found"); - SwFlyFrmAttrMgr aMgr( m_bNew, pSh, static_cast<const SwAttrSet&>(GetItemSet()) ); + SwFlyFrameAttrMgr aMgr( m_bNew, pSh, static_cast<const SwAttrSet&>(GetItemSet()) ); SvxSwFrameValidation aVal; aVal.nAnchorType = static_cast< sal_Int16 >(GetAnchor()); @@ -1921,7 +1921,7 @@ void SwFrmPage::RangeModifyHdl() m_pAtVertPosED->SetValue(m_pAtVertPosED->Normalize(aVal.nVPos), FUNIT_TWIP); } -IMPL_LINK_NOARG_TYPED(SwFrmPage, AnchorTypeHdl, Button*, void) +IMPL_LINK_NOARG_TYPED(SwFramePage, AnchorTypeHdl, Button*, void) { m_pMirrorPagesCB->Enable(!m_pAnchorAsCharRB->IsChecked()); @@ -1948,12 +1948,12 @@ IMPL_LINK_NOARG_TYPED(SwFrmPage, AnchorTypeHdl, Button*, void) && FLY_AS_CHAR == eId) ); } -IMPL_LINK_TYPED( SwFrmPage, PosHdl, ListBox&, rLB, void ) +IMPL_LINK_TYPED( SwFramePage, PosHdl, ListBox&, rLB, void ) { bool bHori = &rLB == m_pHorizontalDLB; ListBox *pRelLB = bHori ? m_pHoriRelationLB : m_pVertRelationLB; FixedText *pRelFT = bHori ? m_pHoriRelationFT : m_pVertRelationFT; - FrmMap *pMap = bHori ? m_pHMap : m_pVMap; + FrameMap *pMap = bHori ? m_pHMap : m_pVMap; const sal_Int32 nMapPos = GetMapPos(pMap, rLB); const sal_Int16 nAlign = GetAlignment(pMap, nMapPos, rLB, *pRelLB); @@ -2050,7 +2050,7 @@ IMPL_LINK_TYPED( SwFrmPage, PosHdl, ListBox&, rLB, void ) } // horizontal Pos -IMPL_LINK_TYPED( SwFrmPage, RelHdl, ListBox&, rLB, void ) +IMPL_LINK_TYPED( SwFramePage, RelHdl, ListBox&, rLB, void ) { bool bHori = &rLB == m_pHoriRelationLB; @@ -2079,7 +2079,7 @@ IMPL_LINK_TYPED( SwFrmPage, RelHdl, ListBox&, rLB, void ) RangeModifyHdl(); } -IMPL_LINK_NOARG_TYPED(SwFrmPage, RealSizeHdl, Button*, void) +IMPL_LINK_NOARG_TYPED(SwFramePage, RealSizeHdl, Button*, void) { m_aWidthED.SetUserValue( m_aWidthED. NormalizePercent(m_aGrfSize.Width() ), FUNIT_TWIP); m_aHeightED.SetUserValue(m_aHeightED.NormalizePercent(m_aGrfSize.Height()), FUNIT_TWIP); @@ -2087,19 +2087,19 @@ IMPL_LINK_NOARG_TYPED(SwFrmPage, RealSizeHdl, Button*, void) UpdateExample(); } -IMPL_LINK_NOARG_TYPED(SwFrmPage, AutoWidthClickHdl, Button*, void) +IMPL_LINK_NOARG_TYPED(SwFramePage, AutoWidthClickHdl, Button*, void) { if( !IsInGraficMode() ) HandleAutoCB( m_pAutoWidthCB->IsChecked(), *m_pWidthFT, *m_pWidthAutoFT, *m_aWidthED.get() ); } -IMPL_LINK_NOARG_TYPED(SwFrmPage, AutoHeightClickHdl, Button*, void) +IMPL_LINK_NOARG_TYPED(SwFramePage, AutoHeightClickHdl, Button*, void) { if( !IsInGraficMode() ) HandleAutoCB( m_pAutoHeightCB->IsChecked(), *m_pHeightFT, *m_pHeightAutoFT, *m_aWidthED.get() ); } -IMPL_LINK_TYPED( SwFrmPage, ModifyHdl, Edit&, rEdit, void ) +IMPL_LINK_TYPED( SwFramePage, ModifyHdl, Edit&, rEdit, void ) { SwTwips nWidth = static_cast< SwTwips >(m_aWidthED.DenormalizePercent(m_aWidthED.GetValue(FUNIT_TWIP))); SwTwips nHeight = static_cast< SwTwips >(m_aHeightED.DenormalizePercent(m_aHeightED.GetValue(FUNIT_TWIP))); @@ -2120,7 +2120,7 @@ IMPL_LINK_TYPED( SwFrmPage, ModifyHdl, Edit&, rEdit, void ) UpdateExample(); } -void SwFrmPage::UpdateExample() +void SwFramePage::UpdateExample() { sal_Int32 nPos = m_pHorizontalDLB->GetSelectEntryPos(); if ( m_pHMap && nPos != LISTBOX_ENTRY_NOTFOUND ) @@ -2147,11 +2147,11 @@ void SwFrmPage::UpdateExample() m_pExampleWN->Invalidate(); } -void SwFrmPage::Init(const SfxItemSet& rSet, bool bReset) +void SwFramePage::Init(const SfxItemSet& rSet, bool bReset) { if(!m_bFormat) { - SwWrtShell* pSh = getFrmDlgParentShell(); + SwWrtShell* pSh = getFrameDlgParentShell(); // size const bool bSizeFixed = pSh->IsSelObjProtected( FlyProtectFlags::Fixed ) != FlyProtectFlags::NONE; @@ -2200,7 +2200,7 @@ void SwFrmPage::Init(const SfxItemSet& rSet, bool bReset) } } - const SwFormatFrmSize& rSize = static_cast<const SwFormatFrmSize&>(rSet.Get(RES_FRM_SIZE)); + const SwFormatFrameSize& rSize = static_cast<const SwFormatFrameSize&>(rSet.Get(RES_FRM_SIZE)); sal_Int64 nWidth = m_aWidthED.NormalizePercent(rSize.GetWidth()); sal_Int64 nHeight = m_aHeightED.NormalizePercent(rSize.GetHeight()); @@ -2230,7 +2230,7 @@ void SwFrmPage::Init(const SfxItemSet& rSet, bool bReset) if (!IsInGraficMode()) { - SwFrmSize eSize = rSize.GetHeightSizeType(); + SwFrameSize eSize = rSize.GetHeightSizeType(); bool bCheck = eSize != ATT_FIX_SIZE; m_pAutoHeightCB->Check( bCheck ); HandleAutoCB( bCheck, *m_pHeightFT, *m_pHeightAutoFT, *m_aWidthED.get() ); @@ -2246,7 +2246,7 @@ void SwFrmPage::Init(const SfxItemSet& rSet, bool bReset) if ( !m_bFormat ) { - SwWrtShell* pSh = getFrmDlgParentShell(); + SwWrtShell* pSh = getFrameDlgParentShell(); const SwFrameFormat* pFormat = pSh->GetFlyFrameFormat(); if( pFormat && pFormat->GetChain().GetNext() ) m_pAutoHeightCB->Enable( false ); @@ -2321,16 +2321,16 @@ void SwFrmPage::Init(const SfxItemSet& rSet, bool bReset) // switch to percent if applicable RangeModifyHdl(); // set reference values (for 100%) - if (rSize.GetWidthPercent() == SwFormatFrmSize::SYNCED || rSize.GetHeightPercent() == SwFormatFrmSize::SYNCED) + if (rSize.GetWidthPercent() == SwFormatFrameSize::SYNCED || rSize.GetHeightPercent() == SwFormatFrameSize::SYNCED) m_pFixedRatioCB->Check(); - if (rSize.GetWidthPercent() && rSize.GetWidthPercent() != SwFormatFrmSize::SYNCED && + if (rSize.GetWidthPercent() && rSize.GetWidthPercent() != SwFormatFrameSize::SYNCED && !m_pRelWidthCB->IsChecked()) { m_pRelWidthCB->Check(); RelSizeClickHdl(m_pRelWidthCB); m_aWidthED.SetPrcntValue(rSize.GetWidthPercent(), FUNIT_CUSTOM); } - if (rSize.GetHeightPercent() && rSize.GetHeightPercent() != SwFormatFrmSize::SYNCED && + if (rSize.GetHeightPercent() && rSize.GetHeightPercent() != SwFormatFrameSize::SYNCED && !m_pRelHeightCB->IsChecked()) { m_pRelHeightCB->Check(); @@ -2351,7 +2351,7 @@ void SwFrmPage::Init(const SfxItemSet& rSet, bool bReset) m_pRelHeightRelationLB->SelectEntryPos(0); } -void SwFrmPage::SetFormatUsed(bool bFormatUsed) +void SwFramePage::SetFormatUsed(bool bFormatUsed) { m_bFormat = bFormatUsed; if (m_bFormat) @@ -2360,7 +2360,7 @@ void SwFrmPage::SetFormatUsed(bool bFormatUsed) } } -void SwFrmPage::EnableVerticalPositioning( bool bEnable ) +void SwFramePage::EnableVerticalPositioning( bool bEnable ) { m_bAllowVertPositioning = bEnable; m_pVerticalFT->Enable( bEnable ); @@ -2730,8 +2730,8 @@ void BmpWindow::SetBitmapEx(const BitmapEx& rBmp) } // set URL and ImageMap at frames -SwFrmURLPage::SwFrmURLPage( vcl::Window *pParent, const SfxItemSet &rSet ) : - SfxTabPage(pParent, "FrmURLPage" , "modules/swriter/ui/frmurlpage.ui", &rSet) +SwFrameURLPage::SwFrameURLPage( vcl::Window *pParent, const SfxItemSet &rSet ) : + SfxTabPage(pParent, "FrameURLPage" , "modules/swriter/ui/frmurlpage.ui", &rSet) { get(pURLED,"url"); get(pSearchPB,"search"); @@ -2741,15 +2741,15 @@ SwFrmURLPage::SwFrmURLPage( vcl::Window *pParent, const SfxItemSet &rSet ) : get(pServerCB,"server"); get(pClientCB,"client"); - pSearchPB->SetClickHdl(LINK(this, SwFrmURLPage, InsertFileHdl)); + pSearchPB->SetClickHdl(LINK(this, SwFrameURLPage, InsertFileHdl)); } -SwFrmURLPage::~SwFrmURLPage() +SwFrameURLPage::~SwFrameURLPage() { disposeOnce(); } -void SwFrmURLPage::dispose() +void SwFrameURLPage::dispose() { pURLED.clear(); pSearchPB.clear(); @@ -2760,7 +2760,7 @@ void SwFrmURLPage::dispose() SfxTabPage::dispose(); } -void SwFrmURLPage::Reset( const SfxItemSet *rSet ) +void SwFrameURLPage::Reset( const SfxItemSet *rSet ) { const SfxPoolItem* pItem; if ( SfxItemState::SET == rSet->GetItemState( SID_DOCFRAME, true, &pItem)) @@ -2798,7 +2798,7 @@ void SwFrmURLPage::Reset( const SfxItemSet *rSet ) pClientCB->SaveValue(); } -bool SwFrmURLPage::FillItemSet(SfxItemSet *rSet) +bool SwFrameURLPage::FillItemSet(SfxItemSet *rSet) { bool bModified = false; const SwFormatURL* pOldURL = static_cast<const SwFormatURL*>(GetOldItem(*rSet, RES_URL)); @@ -2836,12 +2836,12 @@ bool SwFrmURLPage::FillItemSet(SfxItemSet *rSet) return bModified; } -VclPtr<SfxTabPage> SwFrmURLPage::Create(vcl::Window *pParent, const SfxItemSet *rSet) +VclPtr<SfxTabPage> SwFrameURLPage::Create(vcl::Window *pParent, const SfxItemSet *rSet) { - return VclPtr<SwFrmURLPage>::Create( pParent, *rSet ); + return VclPtr<SwFrameURLPage>::Create( pParent, *rSet ); } -IMPL_LINK_NOARG_TYPED(SwFrmURLPage, InsertFileHdl, Button*, void) +IMPL_LINK_NOARG_TYPED(SwFrameURLPage, InsertFileHdl, Button*, void) { FileDialogHelper aDlgHelper( ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0 ); uno::Reference < ui::dialogs::XFilePicker2 > xFP = aDlgHelper.GetFilePicker(); @@ -2862,8 +2862,8 @@ IMPL_LINK_NOARG_TYPED(SwFrmURLPage, InsertFileHdl, Button*, void) } } -SwFrmAddPage::SwFrmAddPage(vcl::Window *pParent, const SfxItemSet &rSet) - : SfxTabPage(pParent, "FrmAddPage" , "modules/swriter/ui/frmaddpage.ui", &rSet) +SwFrameAddPage::SwFrameAddPage(vcl::Window *pParent, const SfxItemSet &rSet) + : SfxTabPage(pParent, "FrameAddPage" , "modules/swriter/ui/frmaddpage.ui", &rSet) , m_pWrtSh(nullptr) , m_bHtmlMode(false) , m_bFormat(false) @@ -2895,12 +2895,12 @@ SwFrmAddPage::SwFrmAddPage(vcl::Window *pParent, const SfxItemSet &rSet) } -SwFrmAddPage::~SwFrmAddPage() +SwFrameAddPage::~SwFrameAddPage() { disposeOnce(); } -void SwFrmAddPage::dispose() +void SwFrameAddPage::dispose() { m_pNameFrame.clear(); m_pNameFT.clear(); @@ -2926,12 +2926,12 @@ void SwFrmAddPage::dispose() } -VclPtr<SfxTabPage> SwFrmAddPage::Create(vcl::Window *pParent, const SfxItemSet *rSet) +VclPtr<SfxTabPage> SwFrameAddPage::Create(vcl::Window *pParent, const SfxItemSet *rSet) { - return VclPtr<SwFrmAddPage>::Create(pParent, *rSet); + return VclPtr<SwFrameAddPage>::Create(pParent, *rSet); } -void SwFrmAddPage::Reset(const SfxItemSet *rSet ) +void SwFrameAddPage::Reset(const SfxItemSet *rSet ) { const SfxPoolItem* pItem; sal_uInt16 nHtmlMode = ::GetHtmlMode(static_cast<const SwDocShell*>(SfxObjectShell::Current())); @@ -2998,7 +2998,7 @@ void SwFrmAddPage::Reset(const SfxItemSet *rSet ) } else { - m_pNameED->SetModifyHdl(LINK(this, SwFrmAddPage, EditModifyHdl)); + m_pNameED->SetModifyHdl(LINK(this, SwFrameAddPage, EditModifyHdl)); } if (!m_bNew) @@ -3051,7 +3051,7 @@ void SwFrmAddPage::Reset(const SfxItemSet *rSet ) } else m_pNextLB->SelectEntryPos(0); - Link<ListBox&,void> aLink(LINK(this, SwFrmAddPage, ChainModifyHdl)); + Link<ListBox&,void> aLink(LINK(this, SwFrameAddPage, ChainModifyHdl)); m_pPrevLB->SetSelectHdl(aLink); m_pNextLB->SetSelectHdl(aLink); } @@ -3116,7 +3116,7 @@ void SwFrmAddPage::Reset(const SfxItemSet *rSet ) m_pVertAlignLB->SaveValue(); } -bool SwFrmAddPage::FillItemSet(SfxItemSet *rSet) +bool SwFrameAddPage::FillItemSet(SfxItemSet *rSet) { bool bRet = false; if (m_pNameED->IsValueChangedFromSaved()) @@ -3191,14 +3191,14 @@ bool SwFrmAddPage::FillItemSet(SfxItemSet *rSet) return bRet; } -IMPL_LINK_NOARG_TYPED(SwFrmAddPage, EditModifyHdl, Edit&, void) +IMPL_LINK_NOARG_TYPED(SwFrameAddPage, EditModifyHdl, Edit&, void) { bool bEnable = !m_pNameED->GetText().isEmpty(); m_pAltNameED->Enable(bEnable); m_pAltNameFT->Enable(bEnable); } -void SwFrmAddPage::SetFormatUsed(bool bFormatUsed) +void SwFrameAddPage::SetFormatUsed(bool bFormatUsed) { m_bFormat = bFormatUsed; if (m_bFormat) @@ -3207,7 +3207,7 @@ void SwFrmAddPage::SetFormatUsed(bool bFormatUsed) } } -IMPL_LINK_TYPED(SwFrmAddPage, ChainModifyHdl, ListBox&, rBox, void) +IMPL_LINK_TYPED(SwFrameAddPage, ChainModifyHdl, ListBox&, rBox, void) { OUString sCurrentPrevChain, sCurrentNextChain; if(m_pPrevLB->GetSelectEntryPos()) diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx index 2f56c86bd372..e738e7ca04ab 100644 --- a/sw/source/ui/frmdlg/wrap.cxx +++ b/sw/source/ui/frmdlg/wrap.cxx @@ -403,12 +403,12 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet) if (!m_bDrawMode) { SwWrtShell* pSh = m_bFormat ? ::GetActiveWrtShell() : m_pWrtSh; - SwFlyFrmAttrMgr aMgr( m_bNew, pSh, static_cast<const SwAttrSet&>(GetItemSet()) ); + SwFlyFrameAttrMgr aMgr( m_bNew, pSh, static_cast<const SwAttrSet&>(GetItemSet()) ); SvxSwFrameValidation aVal; // size - const SwFormatFrmSize& rFrmSize = static_cast<const SwFormatFrmSize&>(rSet.Get(RES_FRM_SIZE)); - Size aSize = rFrmSize.GetSize(); + const SwFormatFrameSize& rFrameSize = static_cast<const SwFormatFrameSize&>(rSet.Get(RES_FRM_SIZE)); + Size aSize = rFrameSize.GetSize(); // margin const SvxULSpaceItem& rUL = static_cast<const SvxULSpaceItem&>(rSet.Get(RES_UL_SPACE)); @@ -423,8 +423,8 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet) const SwFormatVertOrient& rVert = static_cast<const SwFormatVertOrient&>(rSet.Get(RES_VERT_ORIENT)); aVal.nAnchorType = static_cast< sal_Int16 >(m_nAnchorId); - aVal.bAutoHeight = rFrmSize.GetHeightSizeType() == ATT_MIN_SIZE; - aVal.bAutoWidth = rFrmSize.GetWidthSizeType() == ATT_MIN_SIZE; + aVal.bAutoHeight = rFrameSize.GetHeightSizeType() == ATT_MIN_SIZE; + aVal.bAutoWidth = rFrameSize.GetWidthSizeType() == ATT_MIN_SIZE; aVal.bMirror = rHori.IsPosToggle(); // #i18732# aVal.bFollowTextFlow = @@ -438,15 +438,15 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet) aVal.nVPos = rVert.GetPos(); aVal.nVRelOrient = rVert.GetRelationOrient(); - if (rFrmSize.GetWidthPercent() && rFrmSize.GetWidthPercent() != SwFormatFrmSize::SYNCED) - aSize.Width() = aSize.Width() * rFrmSize.GetWidthPercent() / 100; + if (rFrameSize.GetWidthPercent() && rFrameSize.GetWidthPercent() != SwFormatFrameSize::SYNCED) + aSize.Width() = aSize.Width() * rFrameSize.GetWidthPercent() / 100; - if (rFrmSize.GetHeightPercent() && rFrmSize.GetHeightPercent() != SwFormatFrmSize::SYNCED) - aSize.Height() = aSize.Height() * rFrmSize.GetHeightPercent() / 100; + if (rFrameSize.GetHeightPercent() && rFrameSize.GetHeightPercent() != SwFormatFrameSize::SYNCED) + aSize.Height() = aSize.Height() * rFrameSize.GetHeightPercent() / 100; aVal.nWidth = aSize.Width(); aVal.nHeight = aSize.Height(); - m_aFrmSize = aSize; + m_aFrameSize = aSize; aMgr.ValidateMetrics(aVal, nullptr); diff --git a/sw/source/ui/index/cntex.cxx b/sw/source/ui/index/cntex.cxx index 16ae310b60ae..68ce58fd0c36 100644 --- a/sw/source/ui/index/cntex.cxx +++ b/sw/source/ui/index/cntex.cxx @@ -172,7 +172,7 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample( throw uno::RuntimeException(); uno::Reference< text::XTextRange > xAnchor = pxIndexSectionsArr[nTOXIndex]->xContainerSection->getAnchor(); xAnchor = xAnchor->getStart(); - uno::Reference< text::XTextCursor > xCrsr = xAnchor->getText()->createTextCursorByRange(xAnchor); + uno::Reference< text::XTextCursor > xCursor = xAnchor->getText()->createTextCursorByRange(xAnchor); uno::Reference< lang::XMultiServiceFactory > xFact(xModel, uno::UNO_QUERY); @@ -180,8 +180,8 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample( nTOXIndex <= TOX_AUTHORITIES ? nTOXIndex : TOX_USER] )); pxIndexSectionsArr[nTOXIndex]->xDocumentIndex.set(xFact->createInstance(sIndexTypeName), uno::UNO_QUERY); uno::Reference< text::XTextContent > xContent(pxIndexSectionsArr[nTOXIndex]->xDocumentIndex, uno::UNO_QUERY); - uno::Reference< text::XTextRange > xRg(xCrsr, uno::UNO_QUERY); - xCrsr->getText()->insertTextContent(xRg, xContent, sal_False); + uno::Reference< text::XTextRange > xRg(xCursor, uno::UNO_QUERY); + xCursor->getText()->insertTextContent(xRg, xContent, sal_False); } for(sal_uInt16 i = 0 ; i <= TOX_AUTHORITIES; i++) { diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index b0b938ef575c..3823b67dc3fd 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -364,7 +364,7 @@ void SwMultiTOXTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) } else if(nId == m_nColumnId) { - const SwFormatFrmSize& rSize = static_cast<const SwFormatFrmSize&>(GetInputSetImpl()->Get(RES_FRM_SIZE)); + const SwFormatFrameSize& rSize = static_cast<const SwFormatFrameSize&>(GetInputSetImpl()->Get(RES_FRM_SIZE)); static_cast<SwColumnPage&>(rPage).SetPageWidth(rSize.GetWidth()); } diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index 9acc2be6a841..e11ae70fdf1b 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -214,7 +214,7 @@ void SwIndexMarkPane::InitControls() // only if there are more than one // if equal it lands at the same entry - pSh->SttCrsrMove(); + pSh->SttCursorMove(); const SwTOXMark* pMoveMark; bool bShow = false; @@ -247,7 +247,7 @@ void SwIndexMarkPane::InitControls() m_pNextSameBT->Show(); m_pPrevSameBT->Show(); } - pSh->EndCrsrMove(); + pSh->EndCursorMove(); m_pTypeFT->Show(); @@ -258,7 +258,7 @@ void SwIndexMarkPane::InitControls() } else { // display current selection (first element) ???? - if (pSh->GetCrsrCnt() < 2) + if (pSh->GetCursorCnt() < 2) { bSelected = !pSh->HasSelection(); aOrgStr = pSh->GetView().GetSelectionTextParam(true, false); @@ -266,12 +266,12 @@ void SwIndexMarkPane::InitControls() //to include all equal entries may only be allowed in the body and even there //only when a simple selection exists - const FrmTypeFlags nFrmType = pSh->GetFrmType(nullptr,true); + const FrameTypeFlags nFrameType = pSh->GetFrameType(nullptr,true); m_pApplyToAllCB->Show(); m_pSearchCaseSensitiveCB->Show(); m_pSearchCaseWordOnlyCB->Show(); m_pApplyToAllCB->Enable(!aOrgStr.isEmpty() && - !(nFrmType & ( FrmTypeFlags::HEADER | FrmTypeFlags::FOOTER | FrmTypeFlags::FLY_ANY ))); + !(nFrameType & ( FrameTypeFlags::HEADER | FrameTypeFlags::FOOTER | FrameTypeFlags::FLY_ANY ))); SearchTypeHdl(m_pApplyToAllCB); } @@ -346,7 +346,7 @@ void SwIndexMarkPane::Activate() // display current selection (first element) ???? if(bNewMark) { - if (pSh->GetCrsrCnt() < 2) + if (pSh->GetCursorCnt() < 2) { bSelected = !pSh->HasSelection(); aOrgStr = pSh->GetView().GetSelectionTextParam(true, false); @@ -354,12 +354,12 @@ void SwIndexMarkPane::Activate() //to include all equal entries may only be allowed in the body and even there //only when a simple selection exists - const FrmTypeFlags nFrmType = pSh->GetFrmType(nullptr,true); + const FrameTypeFlags nFrameType = pSh->GetFrameType(nullptr,true); m_pApplyToAllCB->Show(); m_pSearchCaseSensitiveCB->Show(); m_pSearchCaseWordOnlyCB->Show(); m_pApplyToAllCB->Enable(!aOrgStr.isEmpty() && - !(nFrmType & ( FrmTypeFlags::HEADER | FrmTypeFlags::FOOTER | FrmTypeFlags::FLY_ANY ))); + !(nFrameType & ( FrameTypeFlags::HEADER | FrameTypeFlags::FOOTER | FrameTypeFlags::FLY_ANY ))); SearchTypeHdl(m_pApplyToAllCB); } ModifyHdl(m_pTypeDCB); @@ -700,7 +700,7 @@ void SwIndexMarkPane::ModifyHdl(Control* pBox) m_pPhoneticED0->Enable(bHasText&&bIsPhoneticReadingEnabled); } m_pOKBT->Enable(!pSh->HasReadonlySel() && - (!m_pEntryED->GetText().isEmpty() || pSh->GetCrsrCnt(false))); + (!m_pEntryED->GetText().isEmpty() || pSh->GetCursorCnt(false))); } IMPL_LINK_NOARG_TYPED(SwIndexMarkPane, NextHdl, Button*, void) @@ -808,7 +808,7 @@ void SwIndexMarkPane::UpdateDialog() m_pTypeDCB->SelectEntry(pMark->GetTOXType()->GetTypeName()); // set Next - Prev - Buttons - pSh->SttCrsrMove(); + pSh->SttCursorMove(); if( m_pPrevBT->IsVisible() ) { const SwTOXMark* pMoveMark = &pSh->GotoTOXMark( *pMark, TOX_PRV ); @@ -845,7 +845,7 @@ void SwIndexMarkPane::UpdateDialog() // we need the point at the start of the attribute pSh->SwapPam(); - pSh->EndCrsrMove(); + pSh->EndCursorMove(); } // Remind whether the edit boxes for Phonetic reading are changed manually diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index 3b62c88e7ee2..4a6f61d0a953 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -1095,8 +1095,8 @@ void SwGlossaryDlg::ResumeShowAutoText() m_xAutoText = text::AutoTextContainer::create( comphelper::getProcessComponentContext() ); } - uno::Reference< XTextCursor > & xCrsr = pExampleFrame->GetTextCursor(); - if(xCrsr.is()) + uno::Reference< XTextCursor > & xCursor = pExampleFrame->GetTextCursor(); + if(xCursor.is()) { if (!sShortName.isEmpty()) { @@ -1108,7 +1108,7 @@ void SwGlossaryDlg::ResumeShowAutoText() uno::Any aEntry(xGroup->getByName(uShortName)); uno::Reference< XAutoTextEntry > xEntry; aEntry >>= xEntry; - uno::Reference< XTextRange > xRange(xCrsr, uno::UNO_QUERY); + uno::Reference< XTextRange > xRange(xCursor, uno::UNO_QUERY); xEntry->applyTo(xRange); } } diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx index e6281bafe1e3..272e789afc9f 100644 --- a/sw/source/ui/misc/num.cxx +++ b/sw/source/ui/misc/num.cxx @@ -945,7 +945,7 @@ SwSvxNumBulletTabDialog::SwSvxNumBulletTabDialog(vcl::Window* pParent, , rWrtSh(rSh) { GetUserButton()->SetClickHdl(LINK(this, SwSvxNumBulletTabDialog, RemoveNumberingHdl)); - GetUserButton()->Enable(rWrtSh.GetNumRuleAtCurrCrsrPos() != nullptr); + GetUserButton()->Enable(rWrtSh.GetNumRuleAtCurrCursorPos() != nullptr); m_nSingleNumPageId = AddTabPage("singlenum", RID_SVXPAGE_PICK_SINGLE_NUM ); m_nBulletPageId = AddTabPage("bullets", RID_SVXPAGE_PICK_BULLET ); AddTabPage("outlinenum", RID_SVXPAGE_PICK_NUM ); diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx index 7cbc05f5bacf..ee2ff2812f40 100644 --- a/sw/source/ui/misc/srtdlg.cxx +++ b/sw/source/ui/misc/srtdlg.cxx @@ -83,7 +83,7 @@ static void lcl_ClearLstBoxAndDelUserData( ListBox& rLstBox ) // determine lines and columns for table selection static bool lcl_GetSelTable( SwWrtShell &rSh, sal_uInt16& rX, sal_uInt16& rY ) { - const SwTableNode* pTableNd = rSh.IsCrsrInTable(); + const SwTableNode* pTableNd = rSh.IsCursorInTable(); if( !pTableNd ) return false; diff --git a/sw/source/ui/misc/titlepage.cxx b/sw/source/ui/misc/titlepage.cxx index 2e7f901f0cc6..ce0f1adfd61e 100644 --- a/sw/source/ui/misc/titlepage.cxx +++ b/sw/source/ui/misc/titlepage.cxx @@ -106,12 +106,12 @@ namespace { pSh->LockView( true ); pSh->StartAllAction(); - pSh->SwCrsrShell::Push(); + pSh->SwCursorShell::Push(); } void lcl_PopCursor(SwWrtShell *pSh) { - pSh->SwCrsrShell::Pop( false ); + pSh->SwCursorShell::Pop( false ); pSh->EndAllAction(); pSh->LockView( false ); } diff --git a/sw/source/ui/table/rowht.cxx b/sw/source/ui/table/rowht.cxx index 8dbec1ddb59d..fd8bebb74867 100644 --- a/sw/source/ui/table/rowht.cxx +++ b/sw/source/ui/table/rowht.cxx @@ -38,13 +38,13 @@ void SwTableHeightDlg::Apply() { SwTwips nHeight = static_cast< SwTwips >(m_pHeightEdit->Denormalize(m_pHeightEdit->GetValue(FUNIT_TWIP))); - SwFormatFrmSize aSz(ATT_FIX_SIZE, 0, nHeight); + SwFormatFrameSize aSz(ATT_FIX_SIZE, 0, nHeight); - SwFrmSize eFrmSize = m_pAutoHeightCB->IsChecked() ? + SwFrameSize eFrameSize = m_pAutoHeightCB->IsChecked() ? ATT_MIN_SIZE : ATT_FIX_SIZE; - if(eFrmSize != aSz.GetHeightSizeType()) + if(eFrameSize != aSz.GetHeightSizeType()) { - aSz.SetHeightSizeType(eFrmSize); + aSz.SetHeightSizeType(eFrameSize); } rSh.SetRowHeight( aSz ); } @@ -63,7 +63,7 @@ SwTableHeightDlg::SwTableHeightDlg(vcl::Window *pParent, SwWrtShell &rS) m_pHeightEdit->SetMin(MINLAY, FUNIT_TWIP); if(!m_pHeightEdit->GetMin()) m_pHeightEdit->SetMin(1); - SwFormatFrmSize *pSz; + SwFormatFrameSize *pSz; rSh.GetRowHeight( pSz ); if ( pSz ) { diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx index 424a47907821..14f74b82c0fa 100644 --- a/sw/source/ui/table/tabledlg.cxx +++ b/sw/source/ui/table/tabledlg.cxx @@ -1265,8 +1265,8 @@ void SwTableTabDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage) else if (nId == m_nTextFlowId) { static_cast<SwTextFlowPage&>(rPage).SetShell(pShell); - const FrmTypeFlags eType = pShell->GetFrmType(nullptr,true); - if( !(FrmTypeFlags::BODY & eType) ) + const FrameTypeFlags eType = pShell->GetFrameType(nullptr,true); + if( !(FrameTypeFlags::BODY & eType) ) static_cast<SwTextFlowPage&>(rPage).DisablePageBreak(); } } diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx index 8b35ec0c77e3..89d26ccb7db4 100644 --- a/sw/source/ui/table/tautofmt.cxx +++ b/sw/source/ui/table/tautofmt.cxx @@ -542,7 +542,7 @@ void AutoFormatPreview::Resize() void AutoFormatPreview::DetectRTL(SwWrtShell* pWrtShell) { - if (!pWrtShell->IsCrsrInTable()) // We haven't created the table yet + if (!pWrtShell->IsCursorInTable()) // We haven't created the table yet mbRTL = AllSettings::GetLayoutRTL(); else mbRTL = pWrtShell->IsTableRightToLeft(); diff --git a/sw/source/uibase/app/appenv.cxx b/sw/source/uibase/app/appenv.cxx index cb1436177854..c66094cd0b30 100644 --- a/sw/source/uibase/app/appenv.cxx +++ b/sw/source/uibase/app/appenv.cxx @@ -284,12 +284,12 @@ void SwModule::InsertEnv( SfxRequest& rReq ) // Delete frame of the first page if ( pSh->GotoFly(sSendMark) ) { - pSh->EnterSelFrmMode(); + pSh->EnterSelFrameMode(); pSh->DelRight(); } if ( pSh->GotoFly(sAddrMark) ) { - pSh->EnterSelFrmMode(); + pSh->EnterSelFrameMode(); pSh->DelRight(); } pSh->SttEndDoc(true); @@ -299,7 +299,7 @@ void SwModule::InsertEnv( SfxRequest& rReq ) pFollow = &pSh->GetPageDesc(pSh->GetCurPageDesc()); // Insert page break - if ( pSh->IsCrsrInTable() ) + if ( pSh->IsCursorInTable() ) { pSh->SplitNode(); pSh->Right( CRSR_SKIP_CHARS, false, 1, false ); @@ -390,7 +390,7 @@ void SwModule::InsertEnv( SfxRequest& rReq ) pDesc->SetUseOn(nsUseOnPage::PD_ALL); // Page size - rFormat.SetFormatAttr(SwFormatFrmSize(ATT_FIX_SIZE, + rFormat.SetFormatAttr(SwFormatFrameSize(ATT_FIX_SIZE, nPageW + lLeft, nPageH + lUpper)); // Set type of page numbering @@ -417,7 +417,7 @@ void SwModule::InsertEnv( SfxRequest& rReq ) pSh->ChgCurPageDesc(*pDesc); // Insert Frame - SwFlyFrmAttrMgr aMgr(false, pSh, FRMMGR_TYPE_ENVELP); + SwFlyFrameAttrMgr aMgr(false, pSh, FRMMGR_TYPE_ENVELP); SwFieldMgr aFieldMgr; aMgr.SetHeightSizeType(ATT_VAR_SIZE); @@ -430,14 +430,14 @@ void SwModule::InsertEnv( SfxRequest& rReq ) if (rItem.bSend) { pSh->SttEndDoc(true); - aMgr.InsertFlyFrm(FLY_AT_PAGE, + aMgr.InsertFlyFrame(FLY_AT_PAGE, Point(rItem.lSendFromLeft + lLeft, rItem.lSendFromTop + lUpper), Size (rItem.lAddrFromLeft - rItem.lSendFromLeft, 0)); - pSh->EnterSelFrmMode(); + pSh->EnterSelFrameMode(); pSh->SetFlyName(sSendMark); - pSh->UnSelectFrm(); - pSh->LeaveSelFrmMode(); + pSh->UnSelectFrame(); + pSh->LeaveSelFrameMode(); pSh->SetTextFormatColl( pSend ); InsertLabEnvText( *pSh, aFieldMgr, rItem.aSendText ); aMgr.UpdateAttrMgr(); @@ -446,13 +446,13 @@ void SwModule::InsertEnv( SfxRequest& rReq ) // Addressee pSh->SttEndDoc(true); - aMgr.InsertFlyFrm(FLY_AT_PAGE, + aMgr.InsertFlyFrame(FLY_AT_PAGE, Point(rItem.lAddrFromLeft + lLeft, rItem.lAddrFromTop + lUpper), Size (nPageW - rItem.lAddrFromLeft - 566, 0)); - pSh->EnterSelFrmMode(); + pSh->EnterSelFrameMode(); pSh->SetFlyName(sAddrMark); - pSh->UnSelectFrm(); - pSh->LeaveSelFrmMode(); + pSh->UnSelectFrame(); + pSh->LeaveSelFrameMode(); pSh->SetTextFormatColl( pAddr ); InsertLabEnvText(*pSh, aFieldMgr, rItem.aAddrText); diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx index 567a65c1bb43..39ed27367a19 100644 --- a/sw/source/uibase/app/apphdl.cxx +++ b/sw/source/uibase/app/apphdl.cxx @@ -252,8 +252,8 @@ SwView* lcl_LoadDoc(SwView* pView, const OUString& rURL) const SfxFrameItem* pItem = static_cast<const SfxFrameItem*>( pView->GetViewFrame()->GetDispatcher()->Execute(SID_NEWDOCDIRECT, SfxCallMode::SYNCHRON, &aFactory, 0L)); - SfxFrame* pFrm = pItem ? pItem->GetFrame() : nullptr; - SfxViewFrame* pViewFrame = pFrm ? pFrm->GetCurrentViewFrame() : nullptr; + SfxFrame* pFrame = pItem ? pItem->GetFrame() : nullptr; + SfxViewFrame* pViewFrame = pFrame ? pFrame->GetCurrentViewFrame() : nullptr; pNewView = pViewFrame ? dynamic_cast<SwView*>( pViewFrame->GetViewShell() ) : nullptr; } diff --git a/sw/source/uibase/app/applab.cxx b/sw/source/uibase/app/applab.cxx index 2ed4f30e23e8..d49a4e428d7a 100644 --- a/sw/source/uibase/app/applab.cxx +++ b/sw/source/uibase/app/applab.cxx @@ -96,10 +96,10 @@ static const SwFrameFormat *lcl_InsertBCText( SwWrtShell& rSh, const SwLabItem& text::HoriOrientation::NONE, text::RelOrientation::PAGE_FRAME ) ); aSet.Put( SwFormatVertOrient( rItem.m_lUpper + static_cast<SwTwips>(nRow) * rItem.m_lVDist, text::VertOrientation::NONE, text::RelOrientation::PAGE_FRAME ) ); - const SwFrameFormat *pFormat = rSh.NewFlyFrm(aSet, true, &rFormat ); // Insert Fly + const SwFrameFormat *pFormat = rSh.NewFlyFrame(aSet, true, &rFormat ); // Insert Fly OSL_ENSURE( pFormat, "Fly not inserted" ); - rSh.UnSelectFrm(); //Frame was selected automatically + rSh.UnSelectFrame(); //Frame was selected automatically rSh.SetTextFormatColl( rSh.GetTextCollFromPool( RES_POOLCOLL_STANDARD ) ); @@ -133,10 +133,10 @@ static const SwFrameFormat *lcl_InsertLabText( SwWrtShell& rSh, const SwLabItem& text::HoriOrientation::NONE, text::RelOrientation::PAGE_FRAME ) ); aSet.Put( SwFormatVertOrient( rItem.m_lUpper + static_cast<SwTwips>(nRow) * rItem.m_lVDist, text::VertOrientation::NONE, text::RelOrientation::PAGE_FRAME ) ); - const SwFrameFormat *pFormat = rSh.NewFlyFrm(aSet, true, &rFormat ); // Insert Fly + const SwFrameFormat *pFormat = rSh.NewFlyFrame(aSet, true, &rFormat ); // Insert Fly OSL_ENSURE( pFormat, "Fly not inserted" ); - rSh.UnSelectFrm(); //Frame was selected automatically + rSh.UnSelectFrame(); //Frame was selected automatically rSh.SetTextFormatColl( rSh.GetTextCollFromPool( RES_POOLCOLL_STANDARD ) ); @@ -262,7 +262,7 @@ void SwModule::InsertLab(SfxRequest& rReq, bool bLabel) long lPgWidth, lPgHeight; lPgWidth = (rItem.m_lPWidth > MINLAY ? rItem.m_lPWidth : MINLAY); lPgHeight = (rItem.m_lPHeight > MINLAY ? rItem.m_lPHeight : MINLAY); - rFormat.SetFormatAttr( SwFormatFrmSize( ATT_FIX_SIZE, lPgWidth, lPgHeight )); + rFormat.SetFormatAttr( SwFormatFrameSize( ATT_FIX_SIZE, lPgWidth, lPgHeight )); // Numbering type SvxNumberType aType; aType.SetNumberingType(SVX_NUM_NUMBER_NONE); @@ -292,21 +292,21 @@ void SwModule::InsertLab(SfxRequest& rReq, bool bLabel) sal_Int32 iResultHeight = rItem.m_lUpper + (rItem.m_nRows - 1) * rItem.m_lVDist + rItem.m_lHeight - rItem.m_lPHeight; sal_Int32 iWidth = (iResultWidth > 0 ? rItem.m_lWidth - (iResultWidth / rItem.m_nCols) - 1 : rItem.m_lWidth); sal_Int32 iHeight = (iResultHeight > 0 ? rItem.m_lHeight - (iResultHeight / rItem.m_nRows) - 1 : rItem.m_lHeight); - SwFormatFrmSize aFrmSize( ATT_FIX_SIZE, iWidth, iHeight ); - pFormat->SetFormatAttr( aFrmSize ); + SwFormatFrameSize aFrameSize( ATT_FIX_SIZE, iWidth, iHeight ); + pFormat->SetFormatAttr( aFrameSize ); //frame represents label itself, no border space - SvxULSpaceItem aFrmNoULSpace( 0, 0, RES_UL_SPACE ); - SvxLRSpaceItem aFrmNoLRSpace( 0, 0, 0, 0, RES_LR_SPACE ); - pFormat->SetFormatAttr( aFrmNoULSpace ); - pFormat->SetFormatAttr( aFrmNoLRSpace ); + SvxULSpaceItem aFrameNoULSpace( 0, 0, RES_UL_SPACE ); + SvxLRSpaceItem aFrameNoLRSpace( 0, 0, 0, 0, RES_LR_SPACE ); + pFormat->SetFormatAttr( aFrameNoULSpace ); + pFormat->SetFormatAttr( aFrameNoLRSpace ); const SwFrameFormat *pFirstFlyFormat = nullptr; if ( rItem.m_bPage ) { - SwFormatVertOrient aFrmVertOrient( pFormat->GetVertOrient() ); - aFrmVertOrient.SetVertOrient( text::VertOrientation::TOP ); - pFormat->SetFormatAttr(aFrmVertOrient); + SwFormatVertOrient aFrameVertOrient( pFormat->GetVertOrient() ); + aFrameVertOrient.SetVertOrient( text::VertOrientation::TOP ); + pFormat->SetFormatAttr(aFrameVertOrient); for ( sal_Int32 i = 0; i < rItem.m_nRows; ++i ) { diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx index 4f3d186d473b..72533e5f6f1b 100644 --- a/sw/source/uibase/app/docsh.cxx +++ b/sw/source/uibase/app/docsh.cxx @@ -160,7 +160,7 @@ bool SwDocShell::InsertGeneratedStream(SfxMedium & rMedium, // Prepare loading Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr, - SwCrsrShell *pCrsrShell, + SwCursorShell *pCursorShell, SwPaM* pPaM ) { bool bAPICall = false; @@ -189,8 +189,8 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr, : SW_STREAM_READER & pRead->GetReaderType() ) { *ppRdr = pPaM ? new SwReader( rMedium, aFileName, *pPaM ) : - pCrsrShell ? - new SwReader( rMedium, aFileName, *pCrsrShell->GetCrsr() ) + pCursorShell ? + new SwReader( rMedium, aFileName, *pCursorShell->GetCursor() ) : new SwReader( rMedium, aFileName, m_pDoc ); } else @@ -368,11 +368,11 @@ bool SwDocShell::Save() } SetError( nErr ? nErr : nVBWarning, OSL_LOG_PREFIX ); - SfxViewFrame *const pFrm = + SfxViewFrame *const pFrame = (m_pWrtShell) ? m_pWrtShell->GetView().GetViewFrame() : nullptr; - if( pFrm ) + if( pFrame ) { - pFrm->GetBindings().SetState(SfxBoolItem(SID_DOC_MODIFIED, false)); + pFrame->GetBindings().SetState(SfxBoolItem(SID_DOC_MODIFIED, false)); } return !IsError( nErr ); } @@ -516,7 +516,7 @@ bool SwDocShell::SaveAs( SfxMedium& rMedium ) // Increase RSID m_pDoc->setRsid( m_pDoc->getRsid() ); - m_pDoc->cleanupUnoCrsrTable(); + m_pDoc->cleanupUnoCursorTable(); } SetError( nErr ? nErr : nVBWarning, OSL_LOG_PREFIX ); @@ -876,7 +876,7 @@ Rectangle SwDocShell::GetVisArea( sal_uInt16 nAspect ) const SwNodeIndex aIdx( m_pDoc->GetNodes().GetEndOfExtras(), 1 ); SwContentNode* pNd = m_pDoc->GetNodes().GoNext( &aIdx ); - const SwRect aPageRect = pNd->FindPageFrmRect(); + const SwRect aPageRect = pNd->FindPageFrameRect(); Rectangle aRect(aPageRect.SVRect()); // tdf#81219 sanitize - nobody is interested in a thumbnail where's @@ -963,16 +963,16 @@ void SwDocShell::GetState(SfxItemSet& rSet) // Disable "multiple layout" if ( !bDisable ) { - SfxViewFrame *pTmpFrm = SfxViewFrame::GetFirst(this); - while (pTmpFrm) // Look for Preview + SfxViewFrame *pTmpFrame = SfxViewFrame::GetFirst(this); + while (pTmpFrame) // Look for Preview { - if ( dynamic_cast<SwView*>( pTmpFrm->GetViewShell() ) && - static_cast<SwView*>(pTmpFrm->GetViewShell())->GetWrtShell().GetViewOptions()->getBrowseMode() ) + if ( dynamic_cast<SwView*>( pTmpFrame->GetViewShell() ) && + static_cast<SwView*>(pTmpFrame->GetViewShell())->GetWrtShell().GetViewOptions()->getBrowseMode() ) { bDisable = true; break; } - pTmpFrm = SfxViewFrame::GetNext(*pTmpFrm, this); + pTmpFrame = SfxViewFrame::GetNext(*pTmpFrame, this); } } // End of disabled "multiple layout" @@ -1179,7 +1179,7 @@ void SwDocShell::RemoveOLEObjects() // When a document is loaded, SwDoc::PrtOLENotify is called to update // the sizes of math objects. However, for objects that do not have a -// SwFrm at this time, only a flag is set (bIsOLESizeInvalid) and the +// SwFrame at this time, only a flag is set (bIsOLESizeInvalid) and the // size change takes place later, while calculating the layout in the // idle handler. If this document is saved now, it is saved with invalid // sizes. For this reason, the layout has to be calculated before a document is diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index 5b2d95aa3b3e..6897ac4a7f71 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -170,16 +170,16 @@ void SwDocShell::ToggleLayoutMode(SwView* pView) if( !GetDoc()->getIDocumentDeviceAccess().getPrinter( false ) ) pView->SetPrinter( GetDoc()->getIDocumentDeviceAccess().getPrinter( false ), SfxPrinterChangeFlags::PRINTER | SfxPrinterChangeFlags::JOBSETUP ); GetDoc()->CheckDefaultPageFormat(); - SfxViewFrame *pTmpFrm = SfxViewFrame::GetFirst(this, false); - while (pTmpFrm) + SfxViewFrame *pTmpFrame = SfxViewFrame::GetFirst(this, false); + while (pTmpFrame) { - if( pTmpFrm != pView->GetViewFrame() ) + if( pTmpFrame != pView->GetViewFrame() ) { - pTmpFrm->DoClose(); - pTmpFrm = SfxViewFrame::GetFirst(this, false); + pTmpFrame->DoClose(); + pTmpFrame = SfxViewFrame::GetFirst(this, false); } else - pTmpFrm = SfxViewFrame::GetNext(*pTmpFrm, this, false); + pTmpFrame = SfxViewFrame::GetNext(*pTmpFrame, this, false); } pView->GetWrtShell().InvalidateLayout(true); @@ -410,23 +410,23 @@ void SwDocShell::Execute(SfxRequest& rReq) { bool bSet = false; bool bFound = false, bOnly = true; - SfxViewFrame *pTmpFrm = SfxViewFrame::GetFirst(this); + SfxViewFrame *pTmpFrame = SfxViewFrame::GetFirst(this); SfxViewShell* pViewShell = SfxViewShell::Current(); SwView* pCurrView = dynamic_cast< SwView *> ( pViewShell ); bool bCurrent = typeid(SwPagePreview) == typeid( pViewShell ); - while( pTmpFrm ) // search Preview + while( pTmpFrame ) // search Preview { - if( typeid(SwView) == typeid( pTmpFrm->GetViewShell()) ) + if( typeid(SwView) == typeid( pTmpFrame->GetViewShell()) ) bOnly = false; - else if( typeid(SwPagePreview) == typeid( pTmpFrm->GetViewShell())) + else if( typeid(SwPagePreview) == typeid( pTmpFrame->GetViewShell())) { - pTmpFrm->GetFrame().Appear(); + pTmpFrame->GetFrame().Appear(); bFound = true; } if( bFound && !bOnly ) break; - pTmpFrm = SfxViewFrame::GetNext(*pTmpFrm, this); + pTmpFrame = SfxViewFrame::GetNext(*pTmpFrame, this); } if( pArgs && SfxItemState::SET == @@ -449,12 +449,12 @@ void SwDocShell::Execute(SfxRequest& rReq) nSlotId = SID_VIEWSHELL2; if( pCurrView && pCurrView->GetDocShell() == this ) - pTmpFrm = pCurrView->GetViewFrame(); + pTmpFrame = pCurrView->GetViewFrame(); else - pTmpFrm = SfxViewFrame::GetFirst( this ); + pTmpFrame = SfxViewFrame::GetFirst( this ); - if (pTmpFrm) - pTmpFrm->GetDispatcher()->Execute( nSlotId, SfxCallMode::ASYNCHRON ); + if (pTmpFrame) + pTmpFrame->GetDispatcher()->Execute( nSlotId, SfxCallMode::ASYNCHRON ); } rReq.SetReturnValue(SfxBoolItem(SID_PRINTPREVIEW, bSet )); @@ -584,7 +584,7 @@ void SwDocShell::Execute(SfxRequest& rReq) SfxViewShell* pViewShell = GetView() ? static_cast<SfxViewShell*>(GetView()) : SfxViewShell::Current(); - SfxViewFrame* pViewFrm = pViewShell->GetViewFrame(); + SfxViewFrame* pViewFrame = pViewShell->GetViewFrame(); SwSrcView* pSrcView = dynamic_cast< SwSrcView *>( pViewShell ); if(!pSrcView) { @@ -603,7 +603,7 @@ void SwDocShell::Execute(SfxRequest& rReq) const SfxFilter* pFlt = GetMedium()->GetFilter(); if(!pFlt || pFlt->GetUserData() != pHtmlFlt->GetUserData()) { - ScopedVclPtrInstance<MessageDialog> aQuery(&pViewFrm->GetWindow(), + ScopedVclPtrInstance<MessageDialog> aQuery(&pViewFrame->GetWindow(), "SaveAsHTMLDialog", "modules/swriter/ui/saveashtmldialog.ui"); if(RET_YES == aQuery->Execute()) @@ -625,7 +625,7 @@ void SwDocShell::Execute(SfxRequest& rReq) SfxStringItem aName(SID_FILE_NAME, sPath); SfxStringItem aFilter(SID_FILTER_NAME, pHtmlFlt->GetName()); const SfxBoolItem* pBool = static_cast<const SfxBoolItem*>( - pViewFrm->GetDispatcher()->Execute( + pViewFrame->GetDispatcher()->Execute( SID_SAVEASDOC, SfxCallMode::SYNCHRON, &aName, &aFilter, 0L )); if(!pBool || !pBool->GetValue()) break; @@ -665,7 +665,7 @@ void SwDocShell::Execute(SfxRequest& rReq) } } if(nSlot) - pViewFrm->GetDispatcher()->Execute(nSlot, SfxCallMode::SYNCHRON); + pViewFrame->GetDispatcher()->Execute(nSlot, SfxCallMode::SYNCHRON); if(bSetModified) GetDoc()->getIDocumentState().SetModified(); if(pSavePrinter) @@ -673,10 +673,10 @@ void SwDocShell::Execute(SfxRequest& rReq) GetDoc()->getIDocumentDeviceAccess().setPrinter( pSavePrinter, true, true); //pSavePrinter must not be deleted again } - pViewFrm->GetBindings().SetState(SfxBoolItem(SID_SOURCEVIEW, nSlot == SID_VIEWSHELL2)); - pViewFrm->GetBindings().Invalidate( SID_NEWWINDOW ); - pViewFrm->GetBindings().Invalidate( SID_BROWSER_MODE ); - pViewFrm->GetBindings().Invalidate( FN_PRINT_LAYOUT ); + pViewFrame->GetBindings().SetState(SfxBoolItem(SID_SOURCEVIEW, nSlot == SID_VIEWSHELL2)); + pViewFrame->GetBindings().Invalidate( SID_NEWWINDOW ); + pViewFrame->GetBindings().Invalidate( SID_BROWSER_MODE ); + pViewFrame->GetBindings().Invalidate( FN_PRINT_LAYOUT ); } break; case SID_GET_COLORLIST: @@ -1336,8 +1336,8 @@ void SwDocShell::ReloadFromHtml( const OUString& rStreamName, SwSrcView* pSrcVie SfxViewShell* pViewShell = GetView() ? static_cast<SfxViewShell*>(GetView()) : SfxViewShell::Current(); - SfxViewFrame* pViewFrm = pViewShell->GetViewFrame(); - pViewFrm->GetDispatcher()->Execute( SID_VIEWSHELL0, SfxCallMode::SYNCHRON ); + SfxViewFrame* pViewFrame = pViewShell->GetViewFrame(); + pViewFrame->GetDispatcher()->Execute( SID_VIEWSHELL0, SfxCallMode::SYNCHRON ); SubInitNew(); @@ -1432,7 +1432,7 @@ sal_uLong SwDocShell::LoadStylesFromFile( const OUString& rURL, } else { - pReader.reset(new SwReader( aMed, rURL, *m_pWrtShell->GetCrsr() )); + pReader.reset(new SwReader( aMed, rURL, *m_pWrtShell->GetCursor() )); } pRead->GetReaderOpt().SetTextFormats( rOpt.IsTextFormats() ); diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx index 2dcb6f944397..e29f91098dce 100644 --- a/sw/source/uibase/app/docst.cxx +++ b/sw/source/uibase/app/docst.cxx @@ -127,7 +127,7 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh) case SID_STYLE_APPLY: {// here the template and its family are passed to the StyleBox // so that this family is being showed - if(pShell->IsFrmSelected()) + if(pShell->IsFrameSelected()) { SwFrameFormat* pFormat = pShell->GetSelectedFrameFormat(); if( pFormat ) @@ -143,7 +143,7 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh) } break; case SID_STYLE_FAMILY1: - if( !pShell->IsFrmSelected() ) + if( !pShell->IsFrameSelected() ) { SwCharFormat* pFormat = pShell->GetCurCharFormat(); if(pFormat) @@ -156,7 +156,7 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh) break; case SID_STYLE_FAMILY2: - if(!pShell->IsFrmSelected()) + if(!pShell->IsFrameSelected()) { SwTextFormatColl* pColl = pShell->GetCurTextFormatColl(); if(pColl) @@ -169,15 +169,15 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh) nMask = SWSTYLEBIT_HTML; else { - const FrmTypeFlags nSelection = pShell->GetFrmType(nullptr,true); + const FrameTypeFlags nSelection = pShell->GetFrameType(nullptr,true); if(pShell->GetCurTOX()) nMask = SWSTYLEBIT_IDX ; - else if(nSelection & FrmTypeFlags::HEADER || - nSelection & FrmTypeFlags::FOOTER || - nSelection & FrmTypeFlags::TABLE || - nSelection & FrmTypeFlags::FLY_ANY || - nSelection & FrmTypeFlags::FOOTNOTE || - nSelection & FrmTypeFlags::FTNPAGE) + else if(nSelection & FrameTypeFlags::HEADER || + nSelection & FrameTypeFlags::FOOTER || + nSelection & FrameTypeFlags::TABLE || + nSelection & FrameTypeFlags::FLY_ANY || + nSelection & FrameTypeFlags::FOOTNOTE || + nSelection & FrameTypeFlags::FTNPAGE) nMask = SWSTYLEBIT_EXTRA; else nMask = SWSTYLEBIT_TEXT; @@ -196,7 +196,7 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh) else { SwFrameFormat* pFormat = pShell->GetSelectedFrameFormat(); - if(pFormat && pShell->IsFrmSelected()) + if(pFormat && pShell->IsFrameSelected()) { aName = pFormat->GetName(); rSet.Put(SfxTemplateItem(nWhich, aName)); @@ -221,7 +221,7 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh) break; case SID_STYLE_FAMILY5: { - const SwNumRule* pRule = pShell->GetNumRuleAtCurrCrsrPos(); + const SwNumRule* pRule = pShell->GetNumRuleAtCurrCursorPos(); if( pRule ) aName = pRule->GetName(); @@ -237,21 +237,21 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh) } break; case SID_STYLE_UPDATE_BY_EXAMPLE: - if( pShell->IsFrmSelected() + if( pShell->IsFrameSelected() ? SFX_STYLE_FAMILY_FRAME != nActualFamily : ( SFX_STYLE_FAMILY_FRAME == nActualFamily || SFX_STYLE_FAMILY_PAGE == nActualFamily || - (SFX_STYLE_FAMILY_PSEUDO == nActualFamily && !pShell->GetNumRuleAtCurrCrsrPos())) ) + (SFX_STYLE_FAMILY_PSEUDO == nActualFamily && !pShell->GetNumRuleAtCurrCursorPos())) ) { rSet.DisableItem( nWhich ); } break; case SID_STYLE_NEW_BY_EXAMPLE: - if( (pShell->IsFrmSelected() + if( (pShell->IsFrameSelected() ? SFX_STYLE_FAMILY_FRAME != nActualFamily : SFX_STYLE_FAMILY_FRAME == nActualFamily) || - (SFX_STYLE_FAMILY_PSEUDO == nActualFamily && !pShell->GetNumRuleAtCurrCrsrPos()) ) + (SFX_STYLE_FAMILY_PSEUDO == nActualFamily && !pShell->GetNumRuleAtCurrCursorPos()) ) { rSet.DisableItem( nWhich ); } @@ -429,9 +429,9 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq ) break; case SFX_STYLE_FAMILY_FRAME: { - SwFrameFormat* pFrm = m_pWrtShell->GetSelectedFrameFormat(); - if( pFrm ) - aParam = pFrm->GetName(); + SwFrameFormat* pFrame = m_pWrtShell->GetSelectedFrameFormat(); + if( pFrame ) + aParam = pFrame->GetName(); } break; case SFX_STYLE_FAMILY_CHAR: @@ -936,7 +936,7 @@ sal_uInt16 SwDocShell::ApplyStyles(const OUString &rName, sal_uInt16 nFamily, } case SFX_STYLE_FAMILY_FRAME: { - if ( pSh->IsFrmSelected() ) + if ( pSh->IsFrameSelected() ) pSh->SetFrameFormat( pStyle->GetFrameFormat() ); break; } @@ -1051,21 +1051,21 @@ sal_uInt16 SwDocShell::UpdateStyle(const OUString &rName, sal_uInt16 nFamily, Sw } case SFX_STYLE_FAMILY_FRAME: { - SwFrameFormat* pFrm = pStyle->GetFrameFormat(); - if( pCurrWrtShell->IsFrmSelected() && pFrm && !pFrm->IsDefault() ) + SwFrameFormat* pFrame = pStyle->GetFrameFormat(); + if( pCurrWrtShell->IsFrameSelected() && pFrame && !pFrame->IsDefault() ) { SfxItemSet aSet( GetPool(), aFrameFormatSetRange ); pCurrWrtShell->StartAllAction(); - pCurrWrtShell->GetFlyFrmAttr( aSet ); + pCurrWrtShell->GetFlyFrameAttr( aSet ); // #i105535# // no update of anchor attribute aSet.ClearItem( RES_ANCHOR ); - pFrm->SetFormatAttr( aSet ); + pFrame->SetFormatAttr( aSet ); // also apply template to remove hard set attributes - pCurrWrtShell->SetFrameFormat( pFrm, true ); + pCurrWrtShell->SetFrameFormat( pFrame, true ); pCurrWrtShell->EndAllAction(); } } @@ -1087,7 +1087,7 @@ sal_uInt16 SwDocShell::UpdateStyle(const OUString &rName, sal_uInt16 nFamily, Sw { const SwNumRule* pCurRule; if( pStyle->GetNumRule() && - nullptr != ( pCurRule = pCurrWrtShell->GetNumRuleAtCurrCrsrPos() )) + nullptr != ( pCurRule = pCurrWrtShell->GetNumRuleAtCurrCursorPos() )) { SwNumRule aRule( *pCurRule ); // #i91400# @@ -1165,20 +1165,20 @@ sal_uInt16 SwDocShell::MakeByExample( const OUString &rName, sal_uInt16 nFamily, break; case SFX_STYLE_FAMILY_FRAME: { - SwFrameFormat* pFrm = pStyle->GetFrameFormat(); - if(pCurrWrtShell->IsFrmSelected() && pFrm && !pFrm->IsDefault()) + SwFrameFormat* pFrame = pStyle->GetFrameFormat(); + if(pCurrWrtShell->IsFrameSelected() && pFrame && !pFrame->IsDefault()) { pCurrWrtShell->StartAllAction(); SfxItemSet aSet(GetPool(), aFrameFormatSetRange ); - pCurrWrtShell->GetFlyFrmAttr( aSet ); + pCurrWrtShell->GetFlyFrameAttr( aSet ); SwFrameFormat* pFFormat = pCurrWrtShell->GetSelectedFrameFormat(); - pFrm->SetDerivedFrom( pFFormat ); + pFrame->SetDerivedFrom( pFFormat ); - pFrm->SetFormatAttr( aSet ); + pFrame->SetFormatAttr( aSet ); // also apply template to remove hard set attributes - pCurrWrtShell->SetFrameFormat( pFrm ); + pCurrWrtShell->SetFrameFormat( pFrame ); pCurrWrtShell->EndAllAction(); } } @@ -1225,7 +1225,7 @@ sal_uInt16 SwDocShell::MakeByExample( const OUString &rName, sal_uInt16 nFamily, case SFX_STYLE_FAMILY_PSEUDO: { - const SwNumRule* pCurRule = pCurrWrtShell->GetNumRuleAtCurrCrsrPos(); + const SwNumRule* pCurRule = pCurrWrtShell->GetNumRuleAtCurrCursorPos(); if (pCurRule) { diff --git a/sw/source/uibase/config/cfgitems.cxx b/sw/source/uibase/config/cfgitems.cxx index b80a68f422e1..5852a6d694ca 100644 --- a/sw/source/uibase/config/cfgitems.cxx +++ b/sw/source/uibase/config/cfgitems.cxx @@ -251,7 +251,7 @@ SwShadowCursorItem::SwShadowCursorItem( const SwShadowCursorItem& rCpy ) SwShadowCursorItem::SwShadowCursorItem( const SwViewOption& rVOpt, sal_uInt16 _nWhich ) : SfxPoolItem( _nWhich ), - eMode( rVOpt.GetShdwCrsrFillMode() ) + eMode( rVOpt.GetShdwCursorFillMode() ) ,bOn( rVOpt.IsShadowCursor() ) { @@ -277,7 +277,7 @@ void SwShadowCursorItem::operator=( const SwShadowCursorItem& rCpy ) void SwShadowCursorItem::FillViewOptions( SwViewOption& rVOpt ) const { rVOpt.SetShadowCursor( bOn ); - rVOpt.SetShdwCrsrFillMode( eMode ); + rVOpt.SetShdwCursorFillMode( eMode ); } #ifdef DBG_UTIL diff --git a/sw/source/uibase/config/usrpref.cxx b/sw/source/uibase/config/usrpref.cxx index e5d6df837447..cf3970ab9bbb 100644 --- a/sw/source/uibase/config/usrpref.cxx +++ b/sw/source/uibase/config/usrpref.cxx @@ -498,7 +498,7 @@ void SwCursorConfig::ImplCommit() switch(nProp) { case 0: pValues[nProp] <<= rParent.IsShadowCursor(); break;// "DirectCursor/UseDirectCursor", - case 1: pValues[nProp] <<= (sal_Int32)rParent.GetShdwCrsrFillMode(); break;// "DirectCursor/Insert", + case 1: pValues[nProp] <<= (sal_Int32)rParent.GetShdwCursorFillMode(); break;// "DirectCursor/Insert", case 2: pValues[nProp] <<= rParent.IsCursorInProtectedArea(); break;// "Option/ProtectedArea" case 3: pValues[nProp] <<= rParent.IsIgnoreProtectedArea(); break; // "Option/IgnoreProtectedArea" } @@ -528,7 +528,7 @@ void SwCursorConfig::Load() switch(nProp) { case 0: rParent.SetShadowCursor(bSet); break;// "DirectCursor/UseDirectCursor", - case 1: rParent.SetShdwCrsrFillMode((sal_uInt8)nSet); break;// "DirectCursor/Insert", + case 1: rParent.SetShdwCursorFillMode((sal_uInt8)nSet); break;// "DirectCursor/Insert", case 2: rParent.SetCursorInProtectedArea(bSet); break;// "Option/ProtectedArea" case 3: rParent.SetIgnoreProtectedArea(bSet); break; // "Option/IgnoreProtectedArea" } diff --git a/sw/source/uibase/config/viewopt.cxx b/sw/source/uibase/config/viewopt.cxx index 6c8908195441..b40e0fc17c0b 100644 --- a/sw/source/uibase/config/viewopt.cxx +++ b/sw/source/uibase/config/viewopt.cxx @@ -158,7 +158,7 @@ SwViewOption::SwViewOption() : mnViewLayoutColumns( 0 ), m_nPagePreviewRow( 1 ), m_nPagePreviewCol( 2 ), - m_nShadowCrsrFillMode( FILL_TAB ), + m_nShadowCursorFillMode( FILL_TAB ), m_bReadonly(false), m_bStarOneSetting(false), m_bIsPagePreview(false), @@ -235,7 +235,7 @@ SwViewOption::SwViewOption(const SwViewOption& rVOpt) m_nCore2Options = rVOpt.m_nCore2Options ; m_aRetouchColor = rVOpt.GetRetoucheColor(); m_sSymbolFont = rVOpt.m_sSymbolFont; - m_nShadowCrsrFillMode = rVOpt.m_nShadowCrsrFillMode; + m_nShadowCursorFillMode = rVOpt.m_nShadowCursorFillMode; m_bStarOneSetting = rVOpt.m_bStarOneSetting; mbBookView = rVOpt.mbBookView; mbBrowseMode = rVOpt.mbBrowseMode; @@ -276,7 +276,7 @@ SwViewOption& SwViewOption::operator=( const SwViewOption &rVOpt ) m_nCore2Options = rVOpt.m_nCore2Options; m_aRetouchColor = rVOpt.GetRetoucheColor(); m_sSymbolFont = rVOpt.m_sSymbolFont; - m_nShadowCrsrFillMode = rVOpt.m_nShadowCrsrFillMode; + m_nShadowCursorFillMode = rVOpt.m_nShadowCursorFillMode; m_bStarOneSetting = rVOpt.m_bStarOneSetting; mbBookView = rVOpt.mbBookView; mbBrowseMode = rVOpt.mbBrowseMode; diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index f98896acbfcd..0c0a7c7aaf2d 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -1076,11 +1076,11 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell, SfxProgress aProgress(pSourceDocSh, ::aEmptyOUStr, 1); // lock all dispatchers - SfxViewFrame* pViewFrm = SfxViewFrame::GetFirst(pSourceDocSh); - while (pViewFrm) + SfxViewFrame* pViewFrame = SfxViewFrame::GetFirst(pSourceDocSh); + while (pViewFrame) { - pViewFrm->GetDispatcher()->Lock(true); - pViewFrm = SfxViewFrame::GetNext(*pViewFrm, pSourceDocSh); + pViewFrame->GetDispatcher()->Lock(true); + pViewFrame = SfxViewFrame::GetNext(*pViewFrame, pSourceDocSh); } sal_Int32 nDocNo = 1; @@ -1565,11 +1565,11 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell, SWUnoHelper::UCB_DeleteFile( *aFileIter ); // unlock all dispatchers - pViewFrm = SfxViewFrame::GetFirst(pSourceDocSh); - while (pViewFrm) + pViewFrame = SfxViewFrame::GetFirst(pSourceDocSh); + while (pViewFrame) { - pViewFrm->GetDispatcher()->Lock(false); - pViewFrm = SfxViewFrame::GetNext(*pViewFrm, pSourceDocSh); + pViewFrame->GetDispatcher()->Lock(false); + pViewFrame = SfxViewFrame::GetNext(*pViewFrame, pSourceDocSh); } SW_MOD()->SetView(&pSourceShell->GetView()); diff --git a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx index 9093b6a5cc24..d78167a6d169 100644 --- a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx +++ b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx @@ -226,24 +226,24 @@ svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence(bool bRecheck) m_pSpellState->m_bStartedInSelection = true; } // determine if the selection is outside of the body text - bOtherText = !(pWrtShell->GetFrmType(nullptr,true) & FrmTypeFlags::BODY); + bOtherText = !(pWrtShell->GetFrameType(nullptr,true) & FrameTypeFlags::BODY); m_pSpellState->m_SpellStartPosition = bOtherText ? SPELL_START_OTHER : SPELL_START_BODY; if(bOtherText) { - m_pSpellState->pOtherCursor = new SwPaM(*pWrtShell->GetCrsr()->GetPoint()); + m_pSpellState->pOtherCursor = new SwPaM(*pWrtShell->GetCursor()->GetPoint()); m_pSpellState->m_bStartedInOther = true; pWrtShell->SpellStart( DOCPOS_OTHERSTART, DOCPOS_OTHEREND, DOCPOS_CURR ); } else { - SwPaM* pCrsr = pWrtShell->GetCrsr(); + SwPaM* pCursor = pWrtShell->GetCursor(); // mark the start position only if not at start of doc if(!pWrtShell->IsStartOfDoc()) { m_pSpellState->m_xStartRange = SwXTextRange::CreateXTextRange( *pWrtShell->GetDoc(), - *pCrsr->Start(), pCrsr->End()); + *pCursor->Start(), pCursor->End()); } pWrtShell->SpellStart( DOCPOS_START, DOCPOS_END, DOCPOS_CURR ); } @@ -323,7 +323,7 @@ The code below would only be part of the solution. if (!m_pSpellState->m_bStartedInSelection) { // find out which text has been spelled body or other - bOtherText = !(pWrtShell->GetFrmType(nullptr,true) & FrmTypeFlags::BODY); + bOtherText = !(pWrtShell->GetFrameType(nullptr,true) & FrameTypeFlags::BODY); if(bOtherText && m_pSpellState->m_bStartedInOther && m_pSpellState->pOtherCursor) { m_pSpellState->m_bStartedInOther = false; @@ -541,7 +541,7 @@ void SwSpellDialogChildWindow::GetFocus() case SHELL_MODE_TABLE_TEXT: case SHELL_MODE_TABLE_LIST_TEXT: { - SwPaM* pCursor = pWrtShell->GetCrsr(); + SwPaM* pCursor = pWrtShell->GetCursor(); if(m_pSpellState->m_pPointNode != &pCursor->GetNode() || m_pSpellState->m_pMarkNode != &pCursor->GetNode(false)|| m_pSpellState->m_nPointPos != pCursor->GetPoint()->nContent.GetIndex()|| @@ -598,7 +598,7 @@ void SwSpellDialogChildWindow::LoseFocus() case SHELL_MODE_TABLE_LIST_TEXT: { // store a node pointer and a pam-position to be able to check on next GetFocus(); - SwPaM* pCursor = pWrtShell->GetCrsr(); + SwPaM* pCursor = pWrtShell->GetCursor(); m_pSpellState->m_pPointNode = &pCursor->GetNode(); m_pSpellState->m_pMarkNode = &pCursor->GetNode(false); m_pSpellState->m_nPointPos = pCursor->GetPoint()->nContent.GetIndex(); @@ -670,8 +670,8 @@ bool SwSpellDialogChildWindow::MakeTextSelection_Impl(SwWrtShell& rShell, ShellM case SHELL_MODE_FRAME: { - rShell.UnSelectFrm(); - rShell.LeaveSelFrmMode(); + rShell.UnSelectFrame(); + rShell.LeaveSelFrameMode(); rView.AttrChangedNotify(&rShell); } break; diff --git a/sw/source/uibase/dialog/regionsw.cxx b/sw/source/uibase/dialog/regionsw.cxx index 4d632cf70564..207fb5192169 100644 --- a/sw/source/uibase/dialog/regionsw.cxx +++ b/sw/source/uibase/dialog/regionsw.cxx @@ -77,7 +77,7 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq) rSh.CalcBoundRect(aRect, FLY_AS_CHAR); long nWidth = aRect.Width(); - aSet.Put(SwFormatFrmSize(ATT_VAR_SIZE, nWidth)); + aSet.Put(SwFormatFrameSize(ATT_VAR_SIZE, nWidth)); // height=width for more consistent preview (analog to edit region) aSet.Put(SvxSizeItem(SID_ATTR_PAGE_SIZE, Size(nWidth, nWidth))); @@ -189,7 +189,7 @@ IMPL_LINK_TYPED( SwWrtShell, InsertRegionDialog, void*, p, void ) SwRect aRect; CalcBoundRect(aRect, FLY_AS_CHAR); long nWidth = aRect.Width(); - aSet.Put(SwFormatFrmSize(ATT_VAR_SIZE, nWidth)); + aSet.Put(SwFormatFrameSize(ATT_VAR_SIZE, nWidth)); // height=width for more consistent preview (analog to edit region) aSet.Put(SvxSizeItem(SID_ATTR_PAGE_SIZE, Size(nWidth, nWidth))); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); diff --git a/sw/source/uibase/dochdl/gloshdl.cxx b/sw/source/uibase/dochdl/gloshdl.cxx index da8e5ce86944..075a3c047576 100644 --- a/sw/source/uibase/dochdl/gloshdl.cxx +++ b/sw/source/uibase/dochdl/gloshdl.cxx @@ -370,7 +370,7 @@ bool SwGlossaryHdl::ExpandGlossary() OUString aShortName; // use this at text selection - if(pWrtShell->SwCrsrShell::HasSelection() && !pWrtShell->IsBlockMode()) + if(pWrtShell->SwCursorShell::HasSelection() && !pWrtShell->IsBlockMode()) { aShortName = pWrtShell->GetSelText(); } @@ -620,10 +620,10 @@ void SwGlossaryHdl::GetMacros( const OUString &rShortName, } // ctor, dtor -SwGlossaryHdl::SwGlossaryHdl(SfxViewFrame* pVwFrm, SwWrtShell *pSh) +SwGlossaryHdl::SwGlossaryHdl(SfxViewFrame* pVwFrame, SwWrtShell *pSh) : rStatGlossaries( *::GetGlossaries() ), aCurGrp( SwGlossaries::GetDefName() ), - pViewFrame( pVwFrm ), + pViewFrame( pVwFrame ), pWrtShell( pSh ), pCurGrp( nullptr ) { diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index bff00a0c9519..12d04664d4d4 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -130,7 +130,7 @@ #include <memory> -extern bool g_bFrmDrag; +extern bool g_bFrameDrag; extern bool g_bDDINetAttr; extern bool g_bExecuteDrag; @@ -472,10 +472,10 @@ bool SwTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo m_pWrtShell->SelectTextAttr( RES_TXTATR_INETFMT ); } } - if( m_pWrtShell->IsFrmSelected() ) + if( m_pWrtShell->IsFrameSelected() ) { SfxItemSet aSet( m_pWrtShell->GetAttrPool(), RES_URL, RES_URL ); - m_pWrtShell->GetFlyFrmAttr( aSet ); + m_pWrtShell->GetFlyFrameAttr( aSet ); const SwFormatURL& rURL = static_cast<const SwFormatURL&>(aSet.Get( RES_URL )); if( rURL.GetMap() ) m_pImageMap = new ImageMap( *rURL.GetMap() ); @@ -859,7 +859,7 @@ int SwTransferable::PrepareForCopy( bool bIsCut ) m_eBufferType = TRNSFR_OLE; } // Is there anything to provide anyway? - else if ( m_pWrtShell->IsSelection() || m_pWrtShell->IsFrmSelected() || + else if ( m_pWrtShell->IsSelection() || m_pWrtShell->IsFrameSelected() || m_pWrtShell->IsObjSelected() ) { std::unique_ptr<SwWait> pWait; @@ -872,8 +872,8 @@ int SwTransferable::PrepareForCopy( bool bIsCut ) // and mouse selection is possible. // In AddMode with keyboard selection, the new cursor is not created // before the cursor is moved after end of selection. - if( m_pWrtShell->IsAddMode() && m_pWrtShell->SwCrsrShell::HasSelection() ) - m_pWrtShell->CreateCrsr(); + if( m_pWrtShell->IsAddMode() && m_pWrtShell->SwCursorShell::HasSelection() ) + m_pWrtShell->CreateCursor(); SwDoc *const pTmpDoc = lcl_GetDoc(*m_pClpDocFac); @@ -989,10 +989,10 @@ int SwTransferable::PrepareForCopy( bool bIsCut ) else nRet = 0; - if( m_pWrtShell->IsFrmSelected() ) + if( m_pWrtShell->IsFrameSelected() ) { SfxItemSet aSet( m_pWrtShell->GetAttrPool(), RES_URL, RES_URL ); - m_pWrtShell->GetFlyFrmAttr( aSet ); + m_pWrtShell->GetFlyFrameAttr( aSet ); const SwFormatURL& rURL = static_cast<const SwFormatURL&>(aSet.Get( RES_URL )); if( rURL.GetMap() ) { @@ -1542,9 +1542,9 @@ bool SwTransferable::PasteData( TransferableDataHelper& rData, } } - if( !bPasteSelection && rSh.IsFrmSelected() ) + if( !bPasteSelection && rSh.IsFrameSelected() ) { - rSh.EnterSelFrmMode(); + rSh.EnterSelFrameMode(); //force ::SelectShell rSh.GetView().StopShellTimer(); } @@ -1693,11 +1693,11 @@ bool SwTransferable::_PasteFileContent( TransferableDataHelper& rData, if( pStream && pRead ) { - Link<SwCrsrShell*,void> aOldLink( rSh.GetChgLnk() ); - rSh.SetChgLnk( Link<SwCrsrShell*,void>() ); + Link<SwCursorShell*,void> aOldLink( rSh.GetChgLnk() ); + rSh.SetChgLnk( Link<SwCursorShell*,void>() ); - const SwPosition& rInsPos = *rSh.GetCrsr()->Start(); - SwReader aReader( *pStream, aEmptyOUStr, OUString(), *rSh.GetCrsr() ); + const SwPosition& rInsPos = *rSh.GetCursor()->Start(); + SwReader aReader( *pStream, aEmptyOUStr, OUString(), *rSh.GetCursor() ); rSh.SaveTableBoxContent( &rInsPos ); if( IsError( aReader.Read( *pRead )) ) nResId = STR_ERROR_CLPBRD_READ; @@ -1788,7 +1788,7 @@ bool SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh, if( pRead ) { - SwPaM &rPAM = *rSh.GetCrsr(); + SwPaM &rPAM = *rSh.GetCursor(); SwReader aReader( xStore, aEmptyOUStr, rPAM ); if( !IsError( aReader.Read( *pRead )) ) bRet = true; @@ -1982,7 +1982,7 @@ bool SwTransferable::_PasteTargetURL( TransferableDataHelper& rData, if( rSh.IsObjSelected() ) { rSh.ReplaceSdrObj( sURL, aEmptyOUStr, &aGraphic ); - Point aPt( pPt ? *pPt : rSh.GetCrsrDocPos() ); + Point aPt( pPt ? *pPt : rSh.GetCursorDocPos() ); SwTransferable::SetSelInShell( rSh, true, &aPt ); } else @@ -2012,7 +2012,7 @@ bool SwTransferable::_PasteTargetURL( TransferableDataHelper& rData, if( bRet ) { SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL ); - rSh.GetFlyFrmAttr( aSet ); + rSh.GetFlyFrameAttr( aSet ); SwFormatURL aURL( static_cast<const SwFormatURL&>(aSet.Get( RES_URL )) ); if( aURL.GetURL() != aINetImg.GetTargetURL() || @@ -2021,16 +2021,16 @@ bool SwTransferable::_PasteTargetURL( TransferableDataHelper& rData, aURL.SetURL( aINetImg.GetTargetURL(), false ); aURL.SetTargetFrameName( aINetImg.GetTargetFrame() ); aSet.Put( aURL ); - rSh.SetFlyFrmAttr( aSet ); + rSh.SetFlyFrameAttr( aSet ); } } return bRet; } -void SwTransferable::SetSelInShell( SwWrtShell& rSh, bool bSelectFrm, +void SwTransferable::SetSelInShell( SwWrtShell& rSh, bool bSelectFrame, const Point* pPt ) { - if( bSelectFrm ) + if( bSelectFrame ) { // select frames/objects if( pPt && !rSh.GetView().GetViewFrame()->GetDispatcher()->IsLocked() ) @@ -2038,27 +2038,27 @@ void SwTransferable::SetSelInShell( SwWrtShell& rSh, bool bSelectFrm, rSh.GetView().NoRotate(); if( rSh.SelectObj( *pPt )) { - rSh.HideCrsr(); - rSh.EnterSelFrmMode( pPt ); - g_bFrmDrag = true; + rSh.HideCursor(); + rSh.EnterSelFrameMode( pPt ); + g_bFrameDrag = true; } } } else { - if( rSh.IsFrmSelected() || rSh.IsObjSelected() ) + if( rSh.IsFrameSelected() || rSh.IsObjSelected() ) { - rSh.UnSelectFrm(); - rSh.LeaveSelFrmMode(); - rSh.GetView().GetEditWin().StopInsFrm(); - g_bFrmDrag = false; + rSh.UnSelectFrame(); + rSh.LeaveSelFrameMode(); + rSh.GetView().GetEditWin().StopInsFrame(); + g_bFrameDrag = false; } else if( rSh.GetView().GetDrawFuncPtr() ) - rSh.GetView().GetEditWin().StopInsFrm(); + rSh.GetView().GetEditWin().StopInsFrame(); rSh.EnterStdMode(); if( pPt ) - rSh.SwCrsrShell::SetCrsr( *pPt, true ); + rSh.SwCursorShell::SetCursor( *pPt, true ); } } @@ -2331,7 +2331,7 @@ bool SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh, if( !bRet && SwPasteSdr::SetAttr == nAction && SotClipboardFormatId::SIMPLE_FILE == nFormat && // only at frame selection - rSh.IsFrmSelected() ) + rSh.IsFrameSelected() ) { // then set as hyperlink after the graphic nFormat = SotClipboardFormatId::NETSCAPE_BOOKMARK; @@ -2381,7 +2381,7 @@ bool SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh, rSh.Paste( aGraphic, sURL ); // rSh.ReplaceSdrObj( sURL, aEmptyOUStr, &aGraphic ); - // Point aPt( pPt ? *pPt : rSh.GetCrsrDocPos() ); + // Point aPt( pPt ? *pPt : rSh.GetCursorDocPos() ); // SwTransferable::SetSelInShell( rSh, true, &aPt ); } else @@ -2397,14 +2397,14 @@ bool SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh, { if( SotClipboardFormatId::NETSCAPE_BOOKMARK == nFormat ) { - if( rSh.IsFrmSelected() ) + if( rSh.IsFrameSelected() ) { SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL ); - rSh.GetFlyFrmAttr( aSet ); + rSh.GetFlyFrameAttr( aSet ); SwFormatURL aURL( static_cast<const SwFormatURL&>(aSet.Get( RES_URL )) ); aURL.SetURL( aBkmk.GetURL(), false ); aSet.Put( aURL ); - rSh.SetFlyFrmAttr( aSet ); + rSh.SetFlyFrameAttr( aSet ); } } else if( rSh.IsObjSelected() ) @@ -2458,11 +2458,11 @@ bool SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh, aMap.GetIMapObjectCount() ) { SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL ); - rSh.GetFlyFrmAttr( aSet ); + rSh.GetFlyFrameAttr( aSet ); SwFormatURL aURL( static_cast<const SwFormatURL&>(aSet.Get( RES_URL )) ); aURL.SetMap( &aMap ); aSet.Put( aURL ); - rSh.SetFlyFrmAttr( aSet ); + rSh.SetFlyFrameAttr( aSet ); bRet = true; } } @@ -2477,7 +2477,7 @@ bool SwTransferable::_PasteImageMap( TransferableDataHelper& rData, if( rData.HasFormat( SotClipboardFormatId::SVIM )) { SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL ); - rSh.GetFlyFrmAttr( aSet ); + rSh.GetFlyFrameAttr( aSet ); SwFormatURL aURL( static_cast<const SwFormatURL&>(aSet.Get( RES_URL )) ); const ImageMap* pOld = aURL.GetMap(); @@ -2488,7 +2488,7 @@ bool SwTransferable::_PasteImageMap( TransferableDataHelper& rData, { aURL.SetMap( &aImageMap ); aSet.Put( aURL ); - rSh.SetFlyFrmAttr( aSet ); + rSh.SetFlyFrameAttr( aSet ); } bRet = true; } @@ -2518,13 +2518,13 @@ bool SwTransferable::_PasteAsHyperlink( TransferableDataHelper& rData, case OBJCNT_OLE: { SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL ); - rSh.GetFlyFrmAttr( aSet ); + rSh.GetFlyFrameAttr( aSet ); SwFormatURL aURL2( static_cast<const SwFormatURL&>(aSet.Get( RES_URL )) ); aURL2.SetURL( sFile, false ); if( aURL2.GetName().isEmpty() ) aURL2.SetName( sFile ); aSet.Put( aURL2 ); - rSh.SetFlyFrmAttr( aSet ); + rSh.SetFlyFrameAttr( aSet ); } break; @@ -2612,13 +2612,13 @@ bool SwTransferable::_PasteFileName( TransferableDataHelper& rData, case OBJCNT_OLE: { SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL ); - rSh.GetFlyFrmAttr( aSet ); + rSh.GetFlyFrameAttr( aSet ); SwFormatURL aURL2( static_cast<const SwFormatURL&>(aSet.Get( RES_URL )) ); aURL2.SetURL( sFile, false ); if( aURL2.GetName().isEmpty() ) aURL2.SetName( sFile ); aSet.Put( aURL2 ); - rSh.SetFlyFrmAttr( aSet ); + rSh.SetFlyFrameAttr( aSet ); } break; @@ -3047,7 +3047,7 @@ void SwTransferable::SetDataForDragAndDrop( const Point& rSttPos ) m_eBufferType = TRNSFR_OLE; } //Is there anything to provide anyway? - else if ( m_pWrtShell->IsSelection() || m_pWrtShell->IsFrmSelected() || + else if ( m_pWrtShell->IsSelection() || m_pWrtShell->IsFrameSelected() || m_pWrtShell->IsObjSelected() ) { if( m_pWrtShell->IsObjSelected() ) @@ -3136,10 +3136,10 @@ void SwTransferable::SetDataForDragAndDrop( const Point& rSttPos ) } } - if( m_pWrtShell->IsFrmSelected() ) + if( m_pWrtShell->IsFrameSelected() ) { SfxItemSet aSet( m_pWrtShell->GetAttrPool(), RES_URL, RES_URL ); - m_pWrtShell->GetFlyFrmAttr( aSet ); + m_pWrtShell->GetFlyFrameAttr( aSet ); const SwFormatURL& rURL = static_cast<const SwFormatURL&>(aSet.Get( RES_URL )); if( rURL.GetMap() ) { @@ -3165,8 +3165,8 @@ void SwTransferable::StartDrag( vcl::Window* pWin, const Point& rPos ) m_pWrtShell->GetViewOptions()->SetIdle( false ); - if( m_pWrtShell->IsSelFrmMode() ) - m_pWrtShell->ShowCrsr(); + if( m_pWrtShell->IsSelFrameMode() ) + m_pWrtShell->ShowCursor(); SW_MOD()->m_pDragDrop = this; @@ -3196,7 +3196,7 @@ void SwTransferable::DragFinished( sal_Int8 nAction ) m_pWrtShell->DeleteTableSel(); else { - if ( !(m_pWrtShell->IsSelFrmMode() || m_pWrtShell->IsObjSelected()) ) + if ( !(m_pWrtShell->IsSelFrameMode() || m_pWrtShell->IsObjSelected()) ) //SmartCut, take one of the blanks along m_pWrtShell->IntelligentCut( m_pWrtShell->GetSelectionType() ); m_pWrtShell->DelRight(); @@ -3210,16 +3210,16 @@ void SwTransferable::DragFinished( sal_Int8 nAction ) if( ( nsSelectionType::SEL_FRM | nsSelectionType::SEL_GRF | nsSelectionType::SEL_OLE | nsSelectionType::SEL_DRW ) & nSelection ) { - m_pWrtShell->EnterSelFrmMode(); + m_pWrtShell->EnterSelFrameMode(); } } } m_pWrtShell->GetView().GetEditWin().DragFinished(); - if( m_pWrtShell->IsSelFrmMode() ) - m_pWrtShell->HideCrsr(); + if( m_pWrtShell->IsSelFrameMode() ) + m_pWrtShell->HideCursor(); else - m_pWrtShell->ShowCrsr(); + m_pWrtShell->ShowCursor(); m_pWrtShell->GetViewOptions()->SetIdle( m_bOldIdle ); } @@ -3254,7 +3254,7 @@ bool SwTransferable::PrivatePaste( SwWrtShell& rShell ) { // position the cursor again Point aPt( rShell.GetCharRect().Pos() ); - rShell.SwCrsrShell::SetCrsr( aPt, true ); + rShell.SwCursorShell::SetCursor( aPt, true ); } rShell.SetRetainSelection( false ); } @@ -3302,11 +3302,11 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, bool bSttWrd = false; bool bSttPara = false; bool bTableSel = false; - bool bFrmSel = false; + bool bFrameSel = false; SwWrtShell& rSrcSh = *GetShell(); - rSh.UnSetVisCrsr(); + rSh.UnSetVisibleCursor(); if( TRNSFR_INETFLD == m_eBufferType ) { @@ -3319,9 +3319,9 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, // select target graphic if( rSh.SelectObj( rDragPt ) ) { - rSh.HideCrsr(); - rSh.EnterSelFrmMode( &rDragPt ); - g_bFrmDrag = true; + rSh.HideCursor(); + rSh.EnterSelFrameMode( &rDragPt ); + g_bFrameDrag = true; } const int nSelection = rSh.GetSelectionType(); @@ -3330,20 +3330,20 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, if( nsSelectionType::SEL_GRF & nSelection ) { SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL ); - rSh.GetFlyFrmAttr( aSet ); + rSh.GetFlyFrameAttr( aSet ); SwFormatURL aURL( static_cast<const SwFormatURL&>(aSet.Get( RES_URL )) ); aURL.SetURL( aTmp.GetURL(), false ); aSet.Put( aURL ); - rSh.SetFlyFrmAttr( aSet ); + rSh.SetFlyFrameAttr( aSet ); return true; } if( nsSelectionType::SEL_DRW & nSelection ) { - rSh.LeaveSelFrmMode(); - rSh.UnSelectFrm(); - rSh.ShowCrsr(); - g_bFrmDrag = false; + rSh.LeaveSelFrameMode(); + rSh.UnSelectFrame(); + rSh.ShowCursor(); + g_bFrameDrag = false; } } } @@ -3361,18 +3361,18 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, //not in selections or selected frames if( rSh.ChgCurrPam( rDragPt ) || - ( rSh.IsSelFrmMode() && rSh.IsInsideSelectedObj( rDragPt )) ) + ( rSh.IsSelFrameMode() && rSh.IsInsideSelectedObj( rDragPt )) ) return false; if( rSrcSh.IsTableMode() ) bTableSel = true; - else if( rSrcSh.IsSelFrmMode() || rSrcSh.IsObjSelected() ) + else if( rSrcSh.IsSelFrameMode() || rSrcSh.IsObjSelected() ) { // don't move position-protected objects! if( bMove && rSrcSh.IsSelObjProtected( FlyProtectFlags::Pos ) != FlyProtectFlags::NONE ) return false; - bFrmSel = true; + bFrameSel = true; } const int nSel = rSrcSh.GetSelectionType(); @@ -3393,10 +3393,10 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, if( &rSrcSh != &rSh ) { rSh.EnterStdMode(); - rSh.SwCrsrShell::SetCrsr( rDragPt, true ); + rSh.SwCursorShell::SetCursor( rDragPt, true ); cWord = rSrcSh.IntelligentCut( nSel, false ); } - else if( !bTableSel && !bFrmSel ) + else if( !bTableSel && !bFrameSel ) { if( !rSh.IsAddMode() ) { @@ -3404,15 +3404,15 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, if ( rSh.IsBlockMode() ) { // preserve order of cursors for block mode - rSh.GoPrevCrsr(); + rSh.GoPrevCursor(); } - rSh.SwCrsrShell::CreateCrsr(); + rSh.SwCursorShell::CreateCursor(); } - rSh.SwCrsrShell::SetCrsr( rDragPt, true, false ); - rSh.GoPrevCrsr(); + rSh.SwCursorShell::SetCursor( rDragPt, true, false ); + rSh.GoPrevCursor(); cWord = rSh.IntelligentCut( rSh.GetSelectionType(), false ); - rSh.GoNextCrsr(); + rSh.GoNextCursor(); } bInWrd = rSh.IsInWord(); @@ -3427,23 +3427,23 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, { if( &rSrcSh == &rSh ) { - rSh.GoPrevCrsr(); - rSh.SwCrsrShell::SetCrsr( aSttPt, true ); + rSh.GoPrevCursor(); + rSh.SwCursorShell::SetCursor( aSttPt, true ); rSh.SelectTextAttr( RES_TXTATR_INETFMT ); if( rSh.ChgCurrPam( rDragPt ) ) { // don't copy/move inside of yourself - rSh.DestroyCrsr(); + rSh.DestroyCursor(); rSh.EndUndo(); rSh.EndAction(); rSh.EndAction(); return false; } - rSh.GoNextCrsr(); + rSh.GoNextCursor(); } else { - rSrcSh.SwCrsrShell::SetCrsr( aSttPt, true ); + rSrcSh.SwCursorShell::SetCursor( aSttPt, true ); rSrcSh.SelectTextAttr( RES_TXTATR_INETFMT ); } @@ -3453,7 +3453,7 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, g_bDDINetAttr = true; } - if ( rSrcSh.IsSelFrmMode() ) + if ( rSrcSh.IsSelFrameMode() ) { //Hack: fool the special treatment aSttPt -= aSttPt - rSrcSh.GetObjRect().Pos(); @@ -3465,7 +3465,7 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, if( !bIsXSelection ) { rSrcSh.Push(); - if ( bRet && bMove && !bFrmSel ) + if ( bRet && bMove && !bFrameSel ) { if ( bTableSel ) { @@ -3475,7 +3475,7 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, else { //SmartCut, take one of the blanks along. - rSh.SwCrsrShell::DestroyCrsr(); + rSh.SwCursorShell::DestroyCursor(); if ( cWord == SwWrtShell::WORD_SPACE_BEFORE ) rSh.ExtendSelection( false ); else if ( cWord == SwWrtShell::WORD_SPACE_AFTER ) @@ -3490,12 +3490,12 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, set cursor to the drop position. */ if( &rSh == &rSrcSh && ( bTableSel || rSh.IsBlockMode() ) ) { - rSrcSh.SwCrsrShell::SetCrsr(rDragPt); - rSrcSh.GetSwCrsr()->SetMark(); + rSrcSh.SwCursorShell::SetCursor(rDragPt); + rSrcSh.GetSwCursor()->SetMark(); } } - if( bRet && !bTableSel && !bFrmSel ) + if( bRet && !bTableSel && !bFrameSel ) { if( (bInWrd || bEndWrd) && (cWord == SwWrtShell::WORD_SPACE_AFTER || @@ -3516,19 +3516,19 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, { if( &rSrcSh == &rSh && !rSh.IsAddMode() ) { - rSh.SwCrsrShell::DestroyCrsr(); - rSh.GoPrevCrsr(); + rSh.SwCursorShell::DestroyCursor(); + rSh.GoPrevCursor(); } else { rSh.SwapPam(); - rSh.SwCrsrShell::ClearMark(); + rSh.SwCursorShell::ClearMark(); } } else { if( rSh.IsAddMode() ) - rSh.SwCrsrShell::CreateCrsr(); + rSh.SwCursorShell::CreateCursor(); else { // turn on selection mode @@ -3538,16 +3538,16 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, } } - if( bRet && bMove && bFrmSel ) - rSrcSh.LeaveSelFrmMode(); + if( bRet && bMove && bFrameSel ) + rSrcSh.LeaveSelFrameMode(); if( rSrcSh.GetDoc() != rSh.GetDoc() ) rSrcSh.EndUndo(); rSh.EndUndo(); // put the shell in the right state - if( &rSrcSh != &rSh && ( rSh.IsFrmSelected() || rSh.IsObjSelected() )) - rSh.EnterSelFrmMode(); + if( &rSrcSh != &rSh && ( rSh.IsFrameSelected() || rSh.IsObjSelected() )) + rSh.EnterSelFrameMode(); rSrcSh.EndAction(); rSh.EndAction(); diff --git a/sw/source/uibase/docvw/FrameControlsManager.cxx b/sw/source/uibase/docvw/FrameControlsManager.cxx index 3735ef9217eb..f63b96a9ad77 100644 --- a/sw/source/uibase/docvw/FrameControlsManager.cxx +++ b/sw/source/uibase/docvw/FrameControlsManager.cxx @@ -46,11 +46,11 @@ const SwFrameControlsManager& SwFrameControlsManager::operator=( const SwFrameCo return *this; } -SwFrameControlPtr SwFrameControlsManager::GetControl( FrameControlType eType, const SwFrm* pFrm ) +SwFrameControlPtr SwFrameControlsManager::GetControl( FrameControlType eType, const SwFrame* pFrame ) { SwFrameControlPtrMap& rControls = m_aControls[eType]; - SwFrameControlPtrMap::iterator aIt = rControls.find(pFrm); + SwFrameControlPtrMap::iterator aIt = rControls.find(pFrame); if (aIt != rControls.end()) return aIt->second; @@ -58,22 +58,22 @@ SwFrameControlPtr SwFrameControlsManager::GetControl( FrameControlType eType, co return SwFrameControlPtr(); } -void SwFrameControlsManager::RemoveControls( const SwFrm* pFrm ) +void SwFrameControlsManager::RemoveControls( const SwFrame* pFrame ) { map< FrameControlType, SwFrameControlPtrMap >::iterator pIt = m_aControls.begin(); while ( pIt != m_aControls.end() ) { SwFrameControlPtrMap& rMap = pIt->second; - rMap.erase(pFrm); + rMap.erase(pFrame); ++pIt; } } -void SwFrameControlsManager::RemoveControlsByType( FrameControlType eType, const SwFrm* pFrm ) +void SwFrameControlsManager::RemoveControlsByType( FrameControlType eType, const SwFrame* pFrame ) { SwFrameControlPtrMap& rMap = m_aControls[eType]; - rMap.erase(pFrm); + rMap.erase(pFrame); } void SwFrameControlsManager::HideControls( FrameControlType eType ) @@ -102,7 +102,7 @@ void SwFrameControlsManager::SetReadonlyControls( bool bReadonly ) } } -void SwFrameControlsManager::SetHeaderFooterControl( const SwPageFrm* pPageFrm, FrameControlType eType, Point aOffset ) +void SwFrameControlsManager::SetHeaderFooterControl( const SwPageFrame* pPageFrame, FrameControlType eType, Point aOffset ) { OSL_ASSERT( eType == Header || eType == Footer ); @@ -112,21 +112,21 @@ void SwFrameControlsManager::SetHeaderFooterControl( const SwPageFrm* pPageFrm, SwFrameControlPtrMap& rControls = m_aControls[eType]; - SwFrameControlPtrMap::iterator lb = rControls.lower_bound(pPageFrm); - if (lb != rControls.end() && !(rControls.key_comp()(pPageFrm, lb->first))) + SwFrameControlPtrMap::iterator lb = rControls.lower_bound(pPageFrame); + if (lb != rControls.end() && !(rControls.key_comp()(pPageFrame, lb->first))) pControl = lb->second; else { SwFrameControlPtr pNewControl( new SwFrameControl( VclPtr<SwHeaderFooterWin>::Create( - m_pEditWin, pPageFrm, bHeader ).get() ) ); + m_pEditWin, pPageFrame, bHeader ).get() ) ); const SwViewOption* pViewOpt = m_pEditWin->GetView().GetWrtShell().GetViewOptions(); pNewControl->SetReadonly( pViewOpt->IsReadonly() ); - rControls.insert(lb, make_pair(pPageFrm, pNewControl)); + rControls.insert(lb, make_pair(pPageFrame, pNewControl)); pControl.swap( pNewControl ); } - Rectangle aPageRect = m_pEditWin->LogicToPixel( pPageFrm->Frm().SVRect() ); + Rectangle aPageRect = m_pEditWin->LogicToPixel( pPageFrame->Frame().SVRect() ); SwHeaderFooterWin* pWin = dynamic_cast<SwHeaderFooterWin *>(pControl->GetWindow()); assert( pWin != nullptr) ; @@ -137,24 +137,24 @@ void SwFrameControlsManager::SetHeaderFooterControl( const SwPageFrm* pPageFrm, pControl->ShowAll( true ); } -void SwFrameControlsManager::SetPageBreakControl( const SwPageFrm* pPageFrm ) +void SwFrameControlsManager::SetPageBreakControl( const SwPageFrame* pPageFrame ) { // Check if we already have the control SwFrameControlPtr pControl; SwFrameControlPtrMap& rControls = m_aControls[PageBreak]; - SwFrameControlPtrMap::iterator lb = rControls.lower_bound(pPageFrm); - if (lb != rControls.end() && !(rControls.key_comp()(pPageFrm, lb->first))) + SwFrameControlPtrMap::iterator lb = rControls.lower_bound(pPageFrame); + if (lb != rControls.end() && !(rControls.key_comp()(pPageFrame, lb->first))) pControl = lb->second; else { SwFrameControlPtr pNewControl( new SwFrameControl( - VclPtr<SwPageBreakWin>::Create( m_pEditWin, pPageFrm ).get() ) ); + VclPtr<SwPageBreakWin>::Create( m_pEditWin, pPageFrame ).get() ) ); const SwViewOption* pViewOpt = m_pEditWin->GetView().GetWrtShell().GetViewOptions(); pNewControl->SetReadonly( pViewOpt->IsReadonly() ); - rControls.insert(lb, make_pair(pPageFrm, pNewControl)); + rControls.insert(lb, make_pair(pPageFrame, pNewControl)); pControl.swap( pNewControl ); } @@ -166,22 +166,22 @@ void SwFrameControlsManager::SetPageBreakControl( const SwPageFrm* pPageFrm ) pControl->ShowAll( true ); } -SwFrameMenuButtonBase::SwFrameMenuButtonBase( SwEditWin* pEditWin, const SwFrm* pFrm ) : +SwFrameMenuButtonBase::SwFrameMenuButtonBase( SwEditWin* pEditWin, const SwFrame* pFrame ) : MenuButton( pEditWin, WB_DIALOGCONTROL ), m_pEditWin( pEditWin ), - m_pFrm( pFrm ) + m_pFrame( pFrame ) { } -const SwPageFrm* SwFrameMenuButtonBase::GetPageFrame() +const SwPageFrame* SwFrameMenuButtonBase::GetPageFrame() { - return static_cast< const SwPageFrm * >( m_pFrm ); + return static_cast< const SwPageFrame * >( m_pFrame ); } void SwFrameMenuButtonBase::dispose() { m_pEditWin.clear(); - m_pFrm = nullptr; + m_pFrame = nullptr; MenuButton::dispose(); } diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx b/sw/source/uibase/docvw/HeaderFooterWin.cxx index 2531c5d8ae5b..18b746b25977 100644 --- a/sw/source/uibase/docvw/HeaderFooterWin.cxx +++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx @@ -124,8 +124,8 @@ namespace } } -SwHeaderFooterWin::SwHeaderFooterWin( SwEditWin* pEditWin, const SwFrm *pFrm, bool bHeader ) : - SwFrameMenuButtonBase( pEditWin, pFrm ), +SwHeaderFooterWin::SwHeaderFooterWin( SwEditWin* pEditWin, const SwFrame *pFrame, bool bHeader ) : + SwFrameMenuButtonBase( pEditWin, pFrame ), m_bIsHeader( bHeader ), m_pPopupMenu( nullptr ), m_pLine( nullptr ), diff --git a/sw/source/uibase/docvw/PageBreakWin.cxx b/sw/source/uibase/docvw/PageBreakWin.cxx index 7533bce6aa8a..7a74b1cfa914 100644 --- a/sw/source/uibase/docvw/PageBreakWin.cxx +++ b/sw/source/uibase/docvw/PageBreakWin.cxx @@ -91,8 +91,8 @@ namespace } } -SwPageBreakWin::SwPageBreakWin( SwEditWin* pEditWin, const SwFrm *pFrm ) : - SwFrameMenuButtonBase( pEditWin, pFrm ), +SwPageBreakWin::SwPageBreakWin( SwEditWin* pEditWin, const SwFrame *pFrame ) : + SwFrameMenuButtonBase( pEditWin, pFrame ), m_pPopupMenu( nullptr ), m_pLine( nullptr ), m_bIsAppearing( false ), @@ -223,24 +223,24 @@ void SwPageBreakWin::Select( ) { case FN_PAGEBREAK_EDIT: { - const SwLayoutFrm* pBodyFrm = static_cast< const SwLayoutFrm* >( GetPageFrame()->Lower() ); - while ( pBodyFrm && !pBodyFrm->IsBodyFrm() ) - pBodyFrm = static_cast< const SwLayoutFrm* >( pBodyFrm->GetNext() ); + const SwLayoutFrame* pBodyFrame = static_cast< const SwLayoutFrame* >( GetPageFrame()->Lower() ); + while ( pBodyFrame && !pBodyFrame->IsBodyFrame() ) + pBodyFrame = static_cast< const SwLayoutFrame* >( pBodyFrame->GetNext() ); SwEditWin* pEditWin = GetEditWin(); - if ( pBodyFrm ) + if ( pBodyFrame ) { SwWrtShell& rSh = pEditWin->GetView().GetWrtShell(); bool bOldLock = rSh.IsViewLocked(); rSh.LockView( true ); - if ( pBodyFrm->Lower()->IsTabFrm() ) + if ( pBodyFrame->Lower()->IsTabFrame() ) { rSh.Push( ); rSh.ClearMark(); - SwContentFrm *pCnt = const_cast< SwContentFrm* >( pBodyFrm->ContainsContent() ); + SwContentFrame *pCnt = const_cast< SwContentFrame* >( pBodyFrame->ContainsContent() ); SwContentNode* pNd = pCnt->GetNode(); rSh.SetSelection( *pNd ); @@ -252,7 +252,7 @@ void SwPageBreakWin::Select( ) } else { - SwContentFrm *pCnt = const_cast< SwContentFrm* >( pBodyFrm->ContainsContent() ); + SwContentFrame *pCnt = const_cast< SwContentFrame* >( pBodyFrame->ContainsContent() ); SwContentNode* pNd = pCnt->GetNode(); SwPaM aPaM( *pNd ); @@ -268,13 +268,13 @@ void SwPageBreakWin::Select( ) break; case FN_PAGEBREAK_DELETE: { - const SwLayoutFrm* pBodyFrm = static_cast< const SwLayoutFrm* >( GetPageFrame()->Lower() ); - while ( pBodyFrm && !pBodyFrm->IsBodyFrm() ) - pBodyFrm = static_cast< const SwLayoutFrm* >( pBodyFrm->GetNext() ); + const SwLayoutFrame* pBodyFrame = static_cast< const SwLayoutFrame* >( GetPageFrame()->Lower() ); + while ( pBodyFrame && !pBodyFrame->IsBodyFrame() ) + pBodyFrame = static_cast< const SwLayoutFrame* >( pBodyFrame->GetNext() ); - if ( pBodyFrm ) + if ( pBodyFrame ) { - SwContentFrm *pCnt = const_cast< SwContentFrm* >( pBodyFrm->ContainsContent() ); + SwContentFrame *pCnt = const_cast< SwContentFrame* >( pBodyFrame->ContainsContent() ); SwContentNode* pNd = pCnt->GetNode(); pNd->GetDoc()->GetIDocumentUndoRedo( ).StartUndo( UNDO_UI_DELETE_PAGE_BREAK, nullptr ); @@ -330,37 +330,37 @@ void SwPageBreakWin::UpdatePosition( const Point* pEvtPt ) m_pMousePt = pEvtPt; } - const SwPageFrm* pPageFrm = GetPageFrame(); - const SwFrm* pPrevPage = pPageFrm; + const SwPageFrame* pPageFrame = GetPageFrame(); + const SwFrame* pPrevPage = pPageFrame; do { pPrevPage = pPrevPage->GetPrev(); } - while ( pPrevPage && ( ( pPrevPage->Frm().Top( ) == pPageFrm->Frm().Top( ) ) - || static_cast< const SwPageFrm* >( pPrevPage )->IsEmptyPage( ) ) ); + while ( pPrevPage && ( ( pPrevPage->Frame().Top( ) == pPageFrame->Frame().Top( ) ) + || static_cast< const SwPageFrame* >( pPrevPage )->IsEmptyPage( ) ) ); - Rectangle aBoundRect = GetEditWin()->LogicToPixel( pPageFrm->GetBoundRect(GetEditWin()).SVRect() ); - Rectangle aFrmRect = GetEditWin()->LogicToPixel( pPageFrm->Frm().SVRect() ); + Rectangle aBoundRect = GetEditWin()->LogicToPixel( pPageFrame->GetBoundRect(GetEditWin()).SVRect() ); + Rectangle aFrameRect = GetEditWin()->LogicToPixel( pPageFrame->Frame().SVRect() ); - long nYLineOffset = ( aBoundRect.Top() + aFrmRect.Top() ) / 2; + long nYLineOffset = ( aBoundRect.Top() + aFrameRect.Top() ) / 2; if ( pPrevPage ) { - Rectangle aPrevFrmRect = GetEditWin()->LogicToPixel( pPrevPage->Frm().SVRect() ); - nYLineOffset = ( aPrevFrmRect.Bottom() + aFrmRect.Top() ) / 2; + Rectangle aPrevFrameRect = GetEditWin()->LogicToPixel( pPrevPage->Frame().SVRect() ); + nYLineOffset = ( aPrevFrameRect.Bottom() + aFrameRect.Top() ) / 2; } // Get the page + sidebar coords - long nPgLeft = aFrmRect.Left(); - long nPgRight = aFrmRect.Right(); + long nPgLeft = aFrameRect.Left(); + long nPgRight = aFrameRect.Right(); unsigned long nSidebarWidth = 0; const SwPostItMgr* pPostItMngr = GetEditWin()->GetView().GetWrtShell().GetPostItMgr(); if ( pPostItMngr && pPostItMngr->HasNotes() && pPostItMngr->ShowNotes() ) nSidebarWidth = pPostItMngr->GetSidebarBorderWidth( true ) + pPostItMngr->GetSidebarWidth( true ); - if ( pPageFrm->SidebarPosition( ) == sw::sidebarwindows::SidebarPosition::LEFT ) + if ( pPageFrame->SidebarPosition( ) == sw::sidebarwindows::SidebarPosition::LEFT ) nPgLeft -= nSidebarWidth; - else if ( pPageFrm->SidebarPosition( ) == sw::sidebarwindows::SidebarPosition::RIGHT ) + else if ( pPageFrame->SidebarPosition( ) == sw::sidebarwindows::SidebarPosition::RIGHT ) nPgRight += nSidebarWidth; Size aBtnSize( BUTTON_WIDTH + ARROW_WIDTH, BUTTON_HEIGHT ); diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx index e994b3dbac76..d9859402ac1a 100644 --- a/sw/source/uibase/docvw/PostItMgr.cxx +++ b/sw/source/uibase/docvw/PostItMgr.cxx @@ -140,7 +140,7 @@ SwPostItMgr::SwPostItMgr(SwView* pView) , mbDeleteNote(true) , mpAnswer(nullptr) , mbIsShowAnchor( false ) - , mpFrmSidebarWinContainer( nullptr ) + , mpFrameSidebarWinContainer( nullptr ) { if(!mpView->GetDrawView() ) mpView->GetWrtShell().MakeDrawView(); @@ -178,8 +178,8 @@ SwPostItMgr::~SwPostItMgr() delete (*i); mPages.clear(); - delete mpFrmSidebarWinContainer; - mpFrmSidebarWinContainer = nullptr; + delete mpFrameSidebarWinContainer; + mpFrameSidebarWinContainer = nullptr; } void SwPostItMgr::CheckForRemovedPostIts() @@ -1675,7 +1675,7 @@ void SwPostItMgr::PrepareView(bool bIgnoreCount) if (!HasNotes() || bIgnoreCount) { mpWrtShell->StartAllAction(); - SwRootFrm* pLayout = mpWrtShell->GetLayout(); + SwRootFrame* pLayout = mpWrtShell->GetLayout(); if ( pLayout ) SwPostItHelper::setSidebarChanged( pLayout, mpWrtShell->getIDocumentSettingAccess().get( DocumentSettingId::BROWSE_MODE ) ); @@ -1696,16 +1696,16 @@ bool SwPostItMgr::IsHit(const Point &aPointPixel) if (HasNotes() && ShowNotes()) { const Point aPoint = mpEditWin->PixelToLogic(aPointPixel); - const SwRootFrm* pLayout = mpWrtShell->GetLayout(); - SwRect aPageFrm; - const unsigned long nPageNum = SwPostItHelper::getPageInfo( aPageFrm, pLayout, aPoint ); + const SwRootFrame* pLayout = mpWrtShell->GetLayout(); + SwRect aPageFrame; + const unsigned long nPageNum = SwPostItHelper::getPageInfo( aPageFrame, pLayout, aPoint ); if( nPageNum ) { Rectangle aRect; OSL_ENSURE(mPages.size()>nPageNum-1,"SwPostitMgr:: page container size wrong"); aRect = mPages[nPageNum-1]->eSidebarPosition == sw::sidebarwindows::SidebarPosition::LEFT - ? Rectangle(Point(aPageFrm.Left()-GetSidebarWidth()-GetSidebarBorderWidth(),aPageFrm.Top()),Size(GetSidebarWidth(),aPageFrm.Height())) - : Rectangle( Point(aPageFrm.Right()+GetSidebarBorderWidth(),aPageFrm.Top()) , Size(GetSidebarWidth(),aPageFrm.Height())); + ? Rectangle(Point(aPageFrame.Left()-GetSidebarWidth()-GetSidebarBorderWidth(),aPageFrame.Top()),Size(GetSidebarWidth(),aPageFrame.Height())) + : Rectangle( Point(aPageFrame.Right()+GetSidebarBorderWidth(),aPageFrame.Top()) , Size(GetSidebarWidth(),aPageFrame.Height())); if (aRect.IsInside(aPoint)) { // we hit the note's sidebar @@ -1770,7 +1770,7 @@ Rectangle SwPostItMgr::GetTopScrollRect(const unsigned long aPage) const return Rectangle(aPointTop,aSize); } -//IMPORTANT: if you change the rects here, also change SwPageFrm::PaintNotesSidebar() +//IMPORTANT: if you change the rects here, also change SwPageFrame::PaintNotesSidebar() bool SwPostItMgr::ScrollbarHit(const unsigned long aPage,const Point &aPoint) { SwRect aPageRect = mPages[aPage-1]->mPageRect; @@ -2109,10 +2109,10 @@ void SwPostItMgr::AssureStdModeAtShell() mpWrtShell->LockView( bLockView ); } - if( mpWrtShell->IsSelFrmMode() || mpWrtShell->IsObjSelected()) + if( mpWrtShell->IsSelFrameMode() || mpWrtShell->IsObjSelected()) { - mpWrtShell->UnSelectFrm(); - mpWrtShell->LeaveSelFrmMode(); + mpWrtShell->UnSelectFrame(); + mpWrtShell->LeaveSelFrameMode(); mpWrtShell->GetView().LeaveDrawCreate(); mpWrtShell->EnterStdMode(); @@ -2172,16 +2172,16 @@ void SwPostItMgr::ToggleInsModeOnActiveSidebarWin() } } -void SwPostItMgr::ConnectSidebarWinToFrm( const SwFrm& rFrm, +void SwPostItMgr::ConnectSidebarWinToFrame( const SwFrame& rFrame, const SwFormatField& rFormatField, SwSidebarWin& rSidebarWin ) { - if ( mpFrmSidebarWinContainer == nullptr ) + if ( mpFrameSidebarWinContainer == nullptr ) { - mpFrmSidebarWinContainer = new SwFrmSidebarWinContainer(); + mpFrameSidebarWinContainer = new SwFrameSidebarWinContainer(); } - const bool bInserted = mpFrmSidebarWinContainer->insert( rFrm, rFormatField, rSidebarWin ); + const bool bInserted = mpFrameSidebarWinContainer->insert( rFrame, rFormatField, rSidebarWin ); if ( bInserted && mpWrtShell->GetAccessibleMap() ) { @@ -2189,12 +2189,12 @@ void SwPostItMgr::ConnectSidebarWinToFrm( const SwFrm& rFrm, } } -void SwPostItMgr::DisconnectSidebarWinFromFrm( const SwFrm& rFrm, +void SwPostItMgr::DisconnectSidebarWinFromFrame( const SwFrame& rFrame, SwSidebarWin& rSidebarWin ) { - if ( mpFrmSidebarWinContainer != nullptr ) + if ( mpFrameSidebarWinContainer != nullptr ) { - const bool bRemoved = mpFrmSidebarWinContainer->remove( rFrm, rSidebarWin ); + const bool bRemoved = mpFrameSidebarWinContainer->remove( rFrame, rSidebarWin ); if ( bRemoved && mpWrtShell->GetAccessibleMap() ) { @@ -2203,37 +2203,37 @@ void SwPostItMgr::DisconnectSidebarWinFromFrm( const SwFrm& rFrm, } } -bool SwPostItMgr::HasFrmConnectedSidebarWins( const SwFrm& rFrm ) +bool SwPostItMgr::HasFrameConnectedSidebarWins( const SwFrame& rFrame ) { bool bRet( false ); - if ( mpFrmSidebarWinContainer != nullptr ) + if ( mpFrameSidebarWinContainer != nullptr ) { - bRet = !mpFrmSidebarWinContainer->empty( rFrm ); + bRet = !mpFrameSidebarWinContainer->empty( rFrame ); } return bRet; } -vcl::Window* SwPostItMgr::GetSidebarWinForFrmByIndex( const SwFrm& rFrm, +vcl::Window* SwPostItMgr::GetSidebarWinForFrameByIndex( const SwFrame& rFrame, const sal_Int32 nIndex ) { vcl::Window* pSidebarWin( nullptr ); - if ( mpFrmSidebarWinContainer != nullptr ) + if ( mpFrameSidebarWinContainer != nullptr ) { - pSidebarWin = mpFrmSidebarWinContainer->get( rFrm, nIndex ); + pSidebarWin = mpFrameSidebarWinContainer->get( rFrame, nIndex ); } return pSidebarWin; } -void SwPostItMgr::GetAllSidebarWinForFrm( const SwFrm& rFrm, +void SwPostItMgr::GetAllSidebarWinForFrame( const SwFrame& rFrame, std::vector< vcl::Window* >* pChildren ) { - if ( mpFrmSidebarWinContainer != nullptr ) + if ( mpFrameSidebarWinContainer != nullptr ) { - mpFrmSidebarWinContainer->getAll( rFrm, pChildren ); + mpFrameSidebarWinContainer->getAll( rFrame, pChildren ); } } diff --git a/sw/source/uibase/docvw/SidebarWin.cxx b/sw/source/uibase/docvw/SidebarWin.cxx index fc4c79091848..c0ec62d1acd5 100644 --- a/sw/source/uibase/docvw/SidebarWin.cxx +++ b/sw/source/uibase/docvw/SidebarWin.cxx @@ -187,7 +187,7 @@ SwSidebarWin::SwSidebarWin(SwEditWin& rEditWin, , mbReadonly(false) , mbIsFollow(false) , mrSidebarItem(rSidebarItem) - , mpAnchorFrm(rSidebarItem.maLayoutInfo.mpAnchorFrm) + , mpAnchorFrame(rSidebarItem.maLayoutInfo.mpAnchorFrame) { mpShadow = ShadowOverlayObject::CreateShadowOverlayObject( mrView ); if ( mpShadow ) @@ -195,7 +195,7 @@ SwSidebarWin::SwSidebarWin(SwEditWin& rEditWin, mpShadow->setVisible(false); } - mrMgr.ConnectSidebarWinToFrm( *(mrSidebarItem.maLayoutInfo.mpAnchorFrm), + mrMgr.ConnectSidebarWinToFrame( *(mrSidebarItem.maLayoutInfo.mpAnchorFrame), mrSidebarItem.GetFormatField(), *this ); } @@ -210,7 +210,7 @@ void SwSidebarWin::dispose() if (IsDisposed()) return; - mrMgr.DisconnectSidebarWinFromFrm( *(mrSidebarItem.maLayoutInfo.mpAnchorFrm), + mrMgr.DisconnectSidebarWinFromFrame( *(mrSidebarItem.maLayoutInfo.mpAnchorFrame), *this ); Disable(); @@ -898,29 +898,29 @@ void SwSidebarWin::SetPosAndSize() SwNodes& rNds = pTextNode->GetDoc()->GetNodes(); SwContentNode* const pContentNd = rNds[mrSidebarItem.maLayoutInfo.mnStartNodeIdx]->GetContentNode(); SwPosition aStartPos( *pContentNd, mrSidebarItem.maLayoutInfo.mnStartContent ); - SwShellCrsr* pTmpCrsr = nullptr; - const bool bTableCrsrNeeded = pTextNode->FindTableBoxStartNode() != pContentNd->FindTableBoxStartNode(); - if ( bTableCrsrNeeded ) + SwShellCursor* pTmpCursor = nullptr; + const bool bTableCursorNeeded = pTextNode->FindTableBoxStartNode() != pContentNd->FindTableBoxStartNode(); + if ( bTableCursorNeeded ) { - SwShellTableCrsr* pTableCrsr = new SwShellTableCrsr( DocView().GetWrtShell(), aStartPos ); - pTableCrsr->SetMark(); - pTableCrsr->GetMark()->nNode = *pTextNode; - pTableCrsr->GetMark()->nContent.Assign( pTextNode, pTextAnnotationField->GetStart()+1 ); - pTableCrsr->NewTableSelection(); - pTmpCrsr = pTableCrsr; + SwShellTableCursor* pTableCursor = new SwShellTableCursor( DocView().GetWrtShell(), aStartPos ); + pTableCursor->SetMark(); + pTableCursor->GetMark()->nNode = *pTextNode; + pTableCursor->GetMark()->nContent.Assign( pTextNode, pTextAnnotationField->GetStart()+1 ); + pTableCursor->NewTableSelection(); + pTmpCursor = pTableCursor; } else { - SwShellCrsr* pCrsr = new SwShellCrsr( DocView().GetWrtShell(), aStartPos ); - pCrsr->SetMark(); - pCrsr->GetMark()->nNode = *pTextNode; - pCrsr->GetMark()->nContent.Assign( pTextNode, pTextAnnotationField->GetStart()+1 ); - pTmpCrsr = pCrsr; + SwShellCursor* pCursor = new SwShellCursor( DocView().GetWrtShell(), aStartPos ); + pCursor->SetMark(); + pCursor->GetMark()->nNode = *pTextNode; + pCursor->GetMark()->nContent.Assign( pTextNode, pTextAnnotationField->GetStart()+1 ); + pTmpCursor = pCursor; } - std::unique_ptr<SwShellCrsr> pTmpCrsrForAnnotationTextRange( pTmpCrsr ); + std::unique_ptr<SwShellCursor> pTmpCursorForAnnotationTextRange( pTmpCursor ); - pTmpCrsrForAnnotationTextRange->FillRects(); - SwRects* pRects(pTmpCrsrForAnnotationTextRange.get()); + pTmpCursorForAnnotationTextRange->FillRects(); + SwRects* pRects(pTmpCursorForAnnotationTextRange.get()); for( size_t a(0); a < pRects->size(); ++a ) { const SwRect aNextRect((*pRects)[a]); @@ -1583,7 +1583,7 @@ void SwSidebarWin::SwitchToFieldPos() GotoPos(); sal_uInt32 aCount = MoveCaret(); if (aCount) - mrView.GetDocShell()->GetWrtShell()->SwCrsrShell::Right(aCount, 0); + mrView.GetDocShell()->GetWrtShell()->SwCursorShell::Right(aCount, 0); GrabFocusToDocument(); } @@ -1616,14 +1616,14 @@ bool SwSidebarWin::IsScrollbarVisible() const void SwSidebarWin::ChangeSidebarItem( SwSidebarItem& rSidebarItem ) { - const bool bAnchorChanged = mpAnchorFrm != rSidebarItem.maLayoutInfo.mpAnchorFrm; + const bool bAnchorChanged = mpAnchorFrame != rSidebarItem.maLayoutInfo.mpAnchorFrame; if ( bAnchorChanged ) { - mrMgr.DisconnectSidebarWinFromFrm( *(mpAnchorFrm), *this ); + mrMgr.DisconnectSidebarWinFromFrame( *(mpAnchorFrame), *this ); } mrSidebarItem = rSidebarItem; - mpAnchorFrm = mrSidebarItem.maLayoutInfo.mpAnchorFrm; + mpAnchorFrame = mrSidebarItem.maLayoutInfo.mpAnchorFrame; if ( GetWindowPeer() ) { @@ -1636,7 +1636,7 @@ void SwSidebarWin::ChangeSidebarItem( SwSidebarItem& rSidebarItem ) if ( bAnchorChanged ) { - mrMgr.ConnectSidebarWinToFrm( *(mrSidebarItem.maLayoutInfo.mpAnchorFrm), + mrMgr.ConnectSidebarWinToFrame( *(mrSidebarItem.maLayoutInfo.mpAnchorFrame), mrSidebarItem.GetFormatField(), *this ); } diff --git a/sw/source/uibase/docvw/SidebarWinAcc.cxx b/sw/source/uibase/docvw/SidebarWinAcc.cxx index 842489ede79f..2fefb0754f98 100644 --- a/sw/source/uibase/docvw/SidebarWinAcc.cxx +++ b/sw/source/uibase/docvw/SidebarWinAcc.cxx @@ -34,10 +34,10 @@ class SidebarWinAccessibleContext : public VCLXAccessibleComponent public: explicit SidebarWinAccessibleContext( SwSidebarWin& rSidebarWin, SwViewShell& rViewShell, - const SwFrm* pAnchorFrm ) + const SwFrame* pAnchorFrame ) : VCLXAccessibleComponent( rSidebarWin.GetWindowPeer() ) , mrViewShell( rViewShell ) - , mpAnchorFrm( pAnchorFrm ) + , mpAnchorFrame( pAnchorFrame ) , maMutex() { rSidebarWin.SetAccessibleRole( css::accessibility::AccessibleRole::COMMENT ); @@ -46,11 +46,11 @@ class SidebarWinAccessibleContext : public VCLXAccessibleComponent virtual ~SidebarWinAccessibleContext() {} - void ChangeAnchor( const SwFrm* pAnchorFrm ) + void ChangeAnchor( const SwFrame* pAnchorFrame ) { osl::MutexGuard aGuard(maMutex); - mpAnchorFrm = pAnchorFrm; + mpAnchorFrame = pAnchorFrame; } virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL @@ -60,10 +60,10 @@ class SidebarWinAccessibleContext : public VCLXAccessibleComponent css::uno::Reference< css::accessibility::XAccessible > xAccParent; - if ( mpAnchorFrm && + if ( mpAnchorFrame && mrViewShell.GetAccessibleMap() ) { - xAccParent = mrViewShell.GetAccessibleMap()->GetContext( mpAnchorFrm, false ); + xAccParent = mrViewShell.GetAccessibleMap()->GetContext( mpAnchorFrame, false ); } return xAccParent; @@ -75,10 +75,10 @@ class SidebarWinAccessibleContext : public VCLXAccessibleComponent sal_Int32 nIndex( -1 ); - if ( mpAnchorFrm && GetWindow() && + if ( mpAnchorFrame && GetWindow() && mrViewShell.GetAccessibleMap() ) { - nIndex = mrViewShell.GetAccessibleMap()->GetChildIndex( *mpAnchorFrm, + nIndex = mrViewShell.GetAccessibleMap()->GetChildIndex( *mpAnchorFrame, *GetWindow() ); } @@ -87,7 +87,7 @@ class SidebarWinAccessibleContext : public VCLXAccessibleComponent private: SwViewShell& mrViewShell; - const SwFrm* mpAnchorFrm; + const SwFrame* mpAnchorFrame; ::osl::Mutex maMutex; }; @@ -99,7 +99,7 @@ SidebarWinAccessible::SidebarWinAccessible( SwSidebarWin& rSidebarWin, : VCLXWindow() , mrSidebarWin( rSidebarWin ) , mrViewShell( rViewShell ) - , mpAnchorFrm( rSidebarItem.maLayoutInfo.mpAnchorFrm ) + , mpAnchorFrame( rSidebarItem.maLayoutInfo.mpAnchorFrame ) , bAccContextCreated( false ) { SetWindow( &mrSidebarWin ); @@ -121,7 +121,7 @@ void SidebarWinAccessible::ChangeSidebarItem( const SwSidebarItem& rSidebarItem dynamic_cast<SidebarWinAccessibleContext*>(xAcc.get()); if ( pAccContext ) { - pAccContext->ChangeAnchor( rSidebarItem.maLayoutInfo.mpAnchorFrm ); + pAccContext->ChangeAnchor( rSidebarItem.maLayoutInfo.mpAnchorFrame ); } } } @@ -132,7 +132,7 @@ css::uno::Reference< css::accessibility::XAccessibleContext > SidebarWinAccessib SidebarWinAccessibleContext* pAccContext = new SidebarWinAccessibleContext( mrSidebarWin, mrViewShell, - mpAnchorFrm ); + mpAnchorFrame ); css::uno::Reference< css::accessibility::XAccessibleContext > xAcc( pAccContext ); bAccContextCreated = true; return xAcc; diff --git a/sw/source/uibase/docvw/SidebarWinAcc.hxx b/sw/source/uibase/docvw/SidebarWinAcc.hxx index ed0a55402fff..7f1ae0fb9fbb 100644 --- a/sw/source/uibase/docvw/SidebarWinAcc.hxx +++ b/sw/source/uibase/docvw/SidebarWinAcc.hxx @@ -24,7 +24,7 @@ class SwViewShell; class SwSidebarItem; -class SwFrm; +class SwFrame; namespace sw { namespace sidebarwindows { @@ -46,7 +46,7 @@ class SidebarWinAccessible : public VCLXWindow private: SwSidebarWin& mrSidebarWin; SwViewShell& mrViewShell; - const SwFrm* mpAnchorFrm; + const SwFrame* mpAnchorFrame; bool bAccContextCreated; }; diff --git a/sw/source/uibase/docvw/edtdd.cxx b/sw/source/uibase/docvw/edtdd.cxx index 1a44f865795a..d95c4c81cf2f 100644 --- a/sw/source/uibase/docvw/edtdd.cxx +++ b/sw/source/uibase/docvw/edtdd.cxx @@ -44,7 +44,7 @@ using namespace ::com::sun::star; // no include "dbgoutsw.hxx" here!!!!!! extern bool g_bNoInterrupt; -extern bool g_bFrmDrag; +extern bool g_bFrameDrag; extern bool g_bDDTimerStarted; bool g_bExecuteDrag = false; @@ -61,7 +61,7 @@ void SwEditWin::StopDDTimer(SwWrtShell *pSh, const Point &rPt) { m_aTimer.Stop(); g_bDDTimerStarted = false; - if(!pSh->IsSelFrmMode()) + if(!pSh->IsSelFrameMode()) pSh->CallSetCursor(&rPt, false); m_aTimer.SetTimeoutHdl(LINK(this,SwEditWin, TimerHandler)); } @@ -87,7 +87,7 @@ void SwEditWin::StartDrag( sal_Int8 /*nAction*/, const Point& rPosPixel ) if ( !rSh.IsInSelect() && rSh.ChgCurrPam( aDocPos, true, true)) //We are not selecting and aren't at a selection bStart = true; - else if ( !g_bFrmDrag && rSh.IsSelFrmMode() && + else if ( !g_bFrameDrag && rSh.IsSelFrameMode() && rSh.IsInsideSelectedObj( aDocPos ) ) { //We are not dragging internally and are not at an @@ -95,7 +95,7 @@ void SwEditWin::StartDrag( sal_Int8 /*nAction*/, const Point& rPosPixel ) bStart = true; } - else if( !g_bFrmDrag && m_rView.GetDocShell()->IsReadOnly() && + else if( !g_bFrameDrag && m_rView.GetDocShell()->IsReadOnly() && OBJCNT_NONE != rSh.GetObjCntType( aDocPos, pObj )) { rSh.LockPaint(); @@ -115,7 +115,7 @@ void SwEditWin::StartDrag( sal_Int8 /*nAction*/, const Point& rPosPixel ) { m_bMBPressed = false; ReleaseMouse(); - g_bFrmDrag = false; + g_bFrameDrag = false; g_bExecuteDrag = true; SwEditWin::m_nDDStartPosY = aDocPos.Y(); SwEditWin::m_nDDStartPosX = aDocPos.X(); @@ -123,7 +123,7 @@ void SwEditWin::StartDrag( sal_Int8 /*nAction*/, const Point& rPosPixel ) StartExecuteDrag(); if( bDelSelect ) { - rSh.UnSelectFrm(); + rSh.UnSelectFrame(); rSh.UnlockPaint(); } } @@ -165,7 +165,7 @@ void SwEditWin::DropCleanup() if ( m_pUserMarker ) CleanupDropUserMarker(); else - rSh.UnSetVisCrsr(); + rSh.UnSetVisibleCursor(); } @@ -395,9 +395,9 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt ) //Drawing objects in Headers/Footers are not allowed SwWrtShell *pSrcSh = pMod->m_pDragDrop->GetShell(); - if( (pSrcSh->GetSelFrmType() == FrmTypeFlags::DRAWOBJ) && + if( (pSrcSh->GetSelFrameType() == FrameTypeFlags::DRAWOBJ) && pSrcSh->IsSelContainsControl() && - (rSh.GetFrmType( &aDocPt, false ) & (FrmTypeFlags::HEADER|FrmTypeFlags::FOOTER)) ) + (rSh.GetFrameType( &aDocPt, false ) & (FrameTypeFlags::HEADER|FrameTypeFlags::FOOTER)) ) { bCleanup = true; } @@ -418,7 +418,7 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt ) if ( bCleanup ) { CleanupDropUserMarker(); - rSh.UnSetVisCrsr(); + rSh.UnSetVisibleCursor(); return DND_ACTION_NONE; } } @@ -449,11 +449,11 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt ) CleanupDropUserMarker(); SwContentAtPos aCont( SwContentAtPos::SW_CONTENT_CHECK ); if(rSh.GetContentAtPos(aDocPt, aCont)) - rSh.SwCrsrShell::SetVisCrsr( aDocPt ); + rSh.SwCursorShell::SetVisibleCursor( aDocPt ); } else { - rSh.UnSetVisCrsr(); + rSh.UnSetVisibleCursor(); if ( m_pUserMarkerObj != pObj ) { @@ -470,7 +470,7 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt ) } CleanupDropUserMarker(); - rSh.UnSetVisCrsr(); + rSh.UnSetVisibleCursor(); return DND_ACTION_NONE; } @@ -481,7 +481,7 @@ IMPL_LINK_NOARG_TYPED(SwEditWin, DDHandler, Timer *, void) m_aTimer.SetTimeout(240); m_bMBPressed = false; ReleaseMouse(); - g_bFrmDrag = false; + g_bFrameDrag = false; if ( m_rView.GetViewFrame() ) { diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index f3b0fe3554a8..277934b50b28 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -172,8 +172,8 @@ extern bool g_bNoInterrupt; // in mainwn.cxx // To resolve this g_bHoldSelection is set in Down at evaluated in Up. static bool g_bHoldSelection = false; -bool g_bFrmDrag = false; -bool g_bValidCrsrPos = false; +bool g_bFrameDrag = false; +bool g_bValidCursorPos = false; bool g_bModePushed = false; bool g_bDDTimerStarted = false; bool g_bFlushCharBuffer = false; @@ -374,7 +374,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier ) m_pUserMarker = nullptr; } - rSh.SwCrsrShell::SetVisCrsr( rLPt ); + rSh.SwCursorShell::SetVisibleCursor( rLPt ); } SetPointer( eStyle ); return; @@ -427,7 +427,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier ) bool bHitHandle = false; bool bCntAtPos = false; bool bIsDocReadOnly = m_rView.GetDocShell()->IsReadOnly() && - rSh.IsCrsrReadonly(); + rSh.IsCursorReadonly(); m_aActHitType = SDRHIT_NONE; PointerStyle eStyle = PointerStyle::Text; if ( !pSdrView ) @@ -491,7 +491,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier ) // (i.e., position is not protected). bool bMovable = (!bNotInSelObj) && - (rSh.IsObjSelected() || rSh.IsFrmSelected()) && + (rSh.IsObjSelected() || rSh.IsFrameSelected()) && (rSh.IsSelObjProtected(FlyProtectFlags::Pos) == FlyProtectFlags::NONE); SdrObject* pSelectableObj = rSh.GetObjAt(rLPt); @@ -504,7 +504,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier ) } else { - if ( rSh.IsFrmSelected() && !bNotInSelObj ) + if ( rSh.IsFrameSelected() && !bNotInSelObj ) { // dvo: this branch appears to be dead and should be // removed in a future version. Reason: The condition @@ -567,8 +567,8 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier ) if ( aSwContentAtPos.pFndTextAttr != nullptr && aSwContentAtPos.pFndTextAttr->Which() == RES_TXTATR_INPUTFIELD) { - const SwField *pCrsrField = rSh.CrsrInsideInputField() ? rSh.GetCurField( true ) : nullptr; - if (!(pCrsrField && pCrsrField == aSwContentAtPos.pFndTextAttr->GetFormatField().GetField())) + const SwField *pCursorField = rSh.CursorInsideInputField() ? rSh.GetCurField( true ) : nullptr; + if (!(pCursorField && pCursorField == aSwContentAtPos.pFndTextAttr->GetFormatField().GetField())) eStyle = PointerStyle::RefHand; } } @@ -619,7 +619,7 @@ IMPL_LINK_NOARG_TYPED(SwEditWin, TimerHandler, Timer *, void) m_rView.Scroll( Rectangle(aModPt,Size(1,1)), nMaxScroll, nMaxScroll); bDone = true; } - else if ( g_bFrmDrag ) + else if ( g_bFrameDrag ) { rSh.Drag(&aModPt, false); bDone = true; @@ -627,7 +627,7 @@ IMPL_LINK_NOARG_TYPED(SwEditWin, TimerHandler, Timer *, void) if ( !bDone ) aModPt = rSh.GetContentPos( aModPt,aModPt.Y() > rSh.VisArea().Bottom() ); } - if ( !bDone && !(g_bFrmDrag || m_bInsDraw) ) + if ( !bDone && !(g_bFrameDrag || m_bInsDraw) ) { if ( m_pRowColumnSelectionStart ) { @@ -676,7 +676,7 @@ void SwEditWin::LeaveArea(const Point &rPos) JustifyAreaTimer(); if( !m_aTimer.IsActive() ) m_aTimer.Start(); - delete m_pShadCrsr, m_pShadCrsr = nullptr; + delete m_pShadCursor, m_pShadCursor = nullptr; } inline void SwEditWin::EnterArea() @@ -687,11 +687,11 @@ inline void SwEditWin::EnterArea() /** * Insert mode for frames */ -void SwEditWin::InsFrm(sal_uInt16 nCols) +void SwEditWin::InsFrame(sal_uInt16 nCols) { StdDrawMode( OBJ_NONE, false ); - m_bInsFrm = true; - m_nInsFrmColCount = nCols; + m_bInsFrame = true; + m_nInsFrameColCount = nCols; } void SwEditWin::StdDrawMode( SdrObjKind eSdrObjectKind, bool bObjSelect ) @@ -709,11 +709,11 @@ void SwEditWin::StdDrawMode( SdrObjKind eSdrObjectKind, bool bObjSelect ) m_rView.GetDrawFuncPtr()->Activate( SID_OBJECT_SELECT ); else m_rView.GetDrawFuncPtr()->Activate( sal::static_int_cast< sal_uInt16 >(eSdrObjectKind) ); - m_bInsFrm = false; - m_nInsFrmColCount = 1; + m_bInsFrame = false; + m_nInsFrameColCount = 1; } -void SwEditWin::StopInsFrm() +void SwEditWin::StopInsFrame() { if (m_rView.GetDrawFuncPtr()) { @@ -721,18 +721,18 @@ void SwEditWin::StopInsFrm() m_rView.SetDrawFuncPtr(nullptr); } m_rView.LeaveDrawCreate(); // leave construction mode - m_bInsFrm = false; - m_nInsFrmColCount = 1; + m_bInsFrame = false; + m_nInsFrameColCount = 1; } -bool SwEditWin::IsInputSequenceCheckingRequired( const OUString &rText, const SwPaM& rCrsr ) +bool SwEditWin::IsInputSequenceCheckingRequired( const OUString &rText, const SwPaM& rCursor ) { const SvtCTLOptions& rCTLOptions = SW_MOD()->GetCTLOptions(); if ( !rCTLOptions.IsCTLFontEnabled() || !rCTLOptions.IsCTLSequenceChecking() ) return false; - if ( 0 == rCrsr.Start()->nContent.GetIndex() ) /* first char needs not to be checked */ + if ( 0 == rCursor.Start()->nContent.GetIndex() ) /* first char needs not to be checked */ return false; SwBreakIt *pBreakIter = SwBreakIt::Get(); @@ -856,7 +856,7 @@ void SwEditWin::FlushInBuffer() pCheckIt = new SwCheckIt; uno::Reference < i18n::XExtendedInputSequenceChecker > xISC = pCheckIt->xCheck; - if ( xISC.is() && IsInputSequenceCheckingRequired( m_aInBuffer, *rSh.GetCrsr() ) ) + if ( xISC.is() && IsInputSequenceCheckingRequired( m_aInBuffer, *rSh.GetCursor() ) ) { // apply (Thai) input sequence checking/correction @@ -866,11 +866,11 @@ void SwEditWin::FlushInBuffer() // get text from the beginning (i.e left side) of current selection // to the start of the paragraph rSh.NormalizePam(); // make point be the first (left) one - if (!rSh.GetCrsr()->HasMark()) - rSh.GetCrsr()->SetMark(); - rSh.GetCrsr()->GetMark()->nContent = 0; + if (!rSh.GetCursor()->HasMark()) + rSh.GetCursor()->SetMark(); + rSh.GetCursor()->GetMark()->nContent = 0; - const OUString aOldText( rSh.GetCrsr()->GetText() ); + const OUString aOldText( rSh.GetCursor()->GetText() ); const sal_Int32 nOldLen = aOldText.getLength(); SvtCTLOptions& rCTLOptions = SW_MOD()->GetCTLOptions(); @@ -938,14 +938,14 @@ void SwEditWin::FlushInBuffer() // if text prior to the original selection needs to be changed // as well, we now expand the selection accordingly. - SwPaM &rCrsr = *rSh.GetCrsr(); - const sal_Int32 nCrsrStartPos = rCrsr.Start()->nContent.GetIndex(); - OSL_ENSURE( nCrsrStartPos >= nExpandSelection, "cannot expand selection as specified!!" ); - if (nExpandSelection && nCrsrStartPos >= nExpandSelection) + SwPaM &rCursor = *rSh.GetCursor(); + const sal_Int32 nCursorStartPos = rCursor.Start()->nContent.GetIndex(); + OSL_ENSURE( nCursorStartPos >= nExpandSelection, "cannot expand selection as specified!!" ); + if (nExpandSelection && nCursorStartPos >= nExpandSelection) { - if (!rCrsr.HasMark()) - rCrsr.SetMark(); - rCrsr.Start()->nContent -= nExpandSelection; + if (!rCursor.HasMark()) + rCursor.SetMark(); + rCursor.Start()->nContent -= nExpandSelection; } } @@ -1006,7 +1006,7 @@ void SwEditWin::ChangeFly( sal_uInt8 nDir, bool bWeb ) RES_COL, RES_COL, RES_PROTECT, RES_PROTECT, RES_FOLLOW_TEXT_FLOW, RES_FOLLOW_TEXT_FLOW, 0); - rSh.GetFlyFrmAttr( aSet ); + rSh.GetFlyFrameAttr( aSet ); RndStdIds eAnchorId = static_cast<const SwFormatAnchor&>(aSet.Get(RES_ANCHOR)).GetAnchorId(); Size aSnap; bool bHuge(MOVE_LEFT_HUGE == nDir || @@ -1160,7 +1160,7 @@ void SwEditWin::ChangeFly( sal_uInt8 nDir, bool bWeb ) } rSh.StartAllAction(); if( bSet ) - rSh.SetFlyFrmAttr( aSet ); + rSh.SetFlyFrameAttr( aSet ); bool bSetPos = (FLY_AS_CHAR != eAnchorId); if(bSetPos && bWeb) { @@ -1262,7 +1262,7 @@ void SwEditWin::ChangeDrawing( sal_uInt8 nDir ) { // Check if object is anchored as character and move direction bool bDummy1, bDummy2; - const bool bVertAnchor = rSh.IsFrmVertical( true, bDummy1, bDummy2 ); + const bool bVertAnchor = rSh.IsFrameVertical( true, bDummy1, bDummy2 ); bool bHoriMove = !bVertAnchor == !( nDir % 2 ); bool bMoveAllowed = !bHoriMove || (rSh.GetAnchorId() != FLY_AS_CHAR); @@ -1352,7 +1352,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) else if ( rKEvt.GetKeyCode().GetCode() == KEY_ESCAPE && rSh.IsHeaderFooterEdit( ) ) { - bool bHeader = bool(FrmTypeFlags::HEADER & rSh.GetFrmType(nullptr,false)); + bool bHeader = bool(FrameTypeFlags::HEADER & rSh.GetFrameType(nullptr,false)); if ( bHeader ) rSh.SttPg(); else @@ -1366,11 +1366,11 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) // running on a document, no order is being taken return; - delete m_pShadCrsr, m_pShadCrsr = nullptr; + delete m_pShadCursor, m_pShadCursor = nullptr; m_aKeyInputFlushTimer.Stop(); bool bIsDocReadOnly = m_rView.GetDocShell()->IsReadOnly() && - rSh.IsCrsrReadonly(); + rSh.IsCursorReadonly(); //if the language changes the buffer must be flushed LanguageType eNewLanguage = GetInputLanguage(); @@ -1395,9 +1395,9 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) return; // Event evaluated by SdrView } - if ( m_rView.GetDrawFuncPtr() && m_bInsFrm ) + if ( m_rView.GetDrawFuncPtr() && m_bInsFrame ) { - StopInsFrm(); + StopInsFrame(); rSh.Edit(); } @@ -1415,7 +1415,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) } else { - SwRootFrm* pLayout = GetView().GetDocShell()->GetWrtShell()->GetLayout(); + SwRootFrame* pLayout = GetView().GetDocShell()->GetWrtShell()->GetLayout(); pLayout->dumpAsXml( ); return; } @@ -1423,7 +1423,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) KeyEvent aKeyEvent( rKEvt ); // look for vertical mappings - if( !bIsDocReadOnly && !rSh.IsSelFrmMode() && !rSh.IsObjSelected() ) + if( !bIsDocReadOnly && !rSh.IsSelFrameMode() && !rSh.IsObjSelected() ) { // must changed from switch to if, because the Linux // compiler has problem with the code. Has to remove if the new general @@ -1440,10 +1440,10 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) // 2. Exception: For a table cursor in a vertical table, the // directions should always be mapped. const bool bVertText = rSh.IsInVerticalText(); - const bool bTableCrsr = rSh.GetTableCrsr(); + const bool bTableCursor = rSh.GetTableCursor(); const bool bVertTable = rSh.IsTableVertical(); - if( ( bVertText && ( !bTableCrsr || bVertTable ) ) || - ( bTableCrsr && bVertTable ) ) + if( ( bVertText && ( !bTableCursor || bVertTable ) ) || + ( bTableCursor && bVertTable ) ) { // Attempt to integrate cursor travelling for mongolian layout does not work. // Thus, back to previous mapping of cursor keys to direction keys. @@ -1841,7 +1841,7 @@ KEYINPUT_CHECKTABLE_INSDEL: break; case KEY_DELETE: - if ( !rSh.HasReadonlySel() || rSh.CrsrInsideInputField()) + if ( !rSh.HasReadonlySel() || rSh.CursorInsideInputField()) { if (rSh.IsInFrontOfLabel() && rSh.NumOrNoNum()) eKeyState = KS_NumOrNoNum; @@ -1878,7 +1878,7 @@ KEYINPUT_CHECKTABLE_INSDEL: case KEY_RETURN: { if ( !rSh.HasReadonlySel() - && !rSh.CrsrInsideInputField() ) + && !rSh.CursorInsideInputField() ) { const int nSelectionType = rSh.GetSelectionType(); if(nSelectionType & nsSelectionType::SEL_OLE) @@ -1895,8 +1895,8 @@ KEYINPUT_CHECKTABLE_INSDEL: //RETURN and empty paragraph in numbering -> end numbering else if( m_aInBuffer.isEmpty() && - rSh.GetNumRuleAtCurrCrsrPos() && - !rSh.GetNumRuleAtCurrCrsrPos()->IsOutlineRule() && + rSh.GetNumRuleAtCurrCursorPos() && + !rSh.GetNumRuleAtCurrCursorPos()->IsOutlineRule() && !rSh.HasSelection() && rSh.IsSttPara() && rSh.IsEndPara() ) eKeyState = KS_NumOff, eNextKeyState = KS_OutlineLvOff; @@ -1917,8 +1917,8 @@ KEYINPUT_CHECKTABLE_INSDEL: { if ( !rSh.HasReadonlySel() && !rSh.IsSttPara() - && rSh.GetNumRuleAtCurrCrsrPos() - && !rSh.CrsrInsideInputField() ) + && rSh.GetNumRuleAtCurrCursorPos() + && !rSh.CursorInsideInputField() ) { eKeyState = KS_NoNum; } @@ -1928,7 +1928,7 @@ KEYINPUT_CHECKTABLE_INSDEL: break; case KEY_BACKSPACE: case KEY_BACKSPACE | KEY_SHIFT: - if ( !rSh.HasReadonlySel() || rSh.CrsrInsideInputField()) + if ( !rSh.HasReadonlySel() || rSh.CursorInsideInputField()) { bool bDone = false; // try to add comment for code snip: @@ -1941,7 +1941,7 @@ KEYINPUT_CHECKTABLE_INSDEL: const bool bOnlyBackspaceKey( KEY_BACKSPACE == rKeyCode.GetFullCode() ); if ( rSh.IsSttPara() && !rSh.HasSelection() - && ( rSh.GetNumRuleAtCurrCrsrPos() == nullptr + && ( rSh.GetNumRuleAtCurrCursorPos() == nullptr || ( rSh.IsNoNum() && bOnlyBackspaceKey ) ) ) { bDone = rSh.TryRemoveIndent(); @@ -1995,7 +1995,7 @@ KEYINPUT_CHECKTABLE_INSDEL: && rSh.IsEndPara() && !rSh.HasSelection() ) { - const SwNumRule* pCurrNumRule( rSh.GetNumRuleAtCurrCrsrPos() ); + const SwNumRule* pCurrNumRule( rSh.GetNumRuleAtCurrCursorPos() ); if ( pCurrNumRule != nullptr && pCurrNumRule != rSh.GetOutlineNumRule() ) { @@ -2033,17 +2033,17 @@ KEYINPUT_CHECKTABLE_INSDEL: { eKeyState=KS_GotoNextFieldMark; } - else if ( !rSh.IsMultiSelection() && rSh.CrsrInsideInputField() ) + else if ( !rSh.IsMultiSelection() && rSh.CursorInsideInputField() ) { GetView().GetViewFrame()->GetDispatcher()->Execute( FN_GOTO_NEXT_INPUTFLD ); eKeyState = KS_End; } - else if( rSh.GetNumRuleAtCurrCrsrPos() + else if( rSh.GetNumRuleAtCurrCursorPos() && rSh.IsSttOfPara() && !rSh.HasReadonlySel() ) { if ( !rSh.IsMultiSelection() - && rSh.IsFirstOfNumRuleAtCrsrPos() + && rSh.IsFirstOfNumRuleAtCursorPos() && numfunc::ChangeIndentOnTabAtFirstPosOfFirstListItem() ) eKeyState = KS_NumIndentInc; else @@ -2085,17 +2085,17 @@ KEYINPUT_CHECKTABLE_INSDEL: { eKeyState=KS_GotoPrevFieldMark; } - else if ( !rSh.IsMultiSelection() && rSh.CrsrInsideInputField() ) + else if ( !rSh.IsMultiSelection() && rSh.CursorInsideInputField() ) { GetView().GetViewFrame()->GetDispatcher()->Execute( FN_GOTO_PREV_INPUTFLD ); eKeyState = KS_End; } - else if( rSh.GetNumRuleAtCurrCrsrPos() + else if( rSh.GetNumRuleAtCurrCursorPos() && rSh.IsSttOfPara() && !rSh.HasReadonlySel() ) { if ( !rSh.IsMultiSelection() - && rSh.IsFirstOfNumRuleAtCrsrPos() + && rSh.IsFirstOfNumRuleAtCursorPos() && numfunc::ChangeIndentOnTabAtFirstPosOfFirstListItem() ) eKeyState = KS_NumIndentDec; else @@ -2206,7 +2206,7 @@ KEYINPUT_CHECKTABLE_INSDEL: eKeyState = rKeyCode.GetModifier() & KEY_SHIFT ? KS_PrevObject : KS_NextObject; } - else if ( !rSh.IsMultiSelection() && rSh.CrsrInsideInputField() ) + else if ( !rSh.IsMultiSelection() && rSh.CursorInsideInputField() ) { GetView().GetViewFrame()->GetDispatcher()->Execute( KEY_SHIFT != rKeyCode.GetModifier() ? FN_GOTO_NEXT_INPUTFLD : FN_GOTO_PREV_INPUTFLD ); @@ -2303,8 +2303,8 @@ KEYINPUT_CHECKTABLE_INSDEL: } else if(nSelectionType & nsSelectionType::SEL_FRM) { - rSh.UnSelectFrm(); - rSh.LeaveSelFrmMode(); + rSh.UnSelectFrame(); + rSh.LeaveSelFrameMode(); m_rView.AttrChangedNotify(&rSh); rSh.MoveSection( fnSectionCurr, fnSectionEnd ); } @@ -2326,8 +2326,8 @@ KEYINPUT_CHECKTABLE_INSDEL: break; case KS_GoIntoFly: { - rSh.UnSelectFrm(); - rSh.LeaveSelFrmMode(); + rSh.UnSelectFrame(); + rSh.LeaveSelFrameMode(); m_rView.AttrChangedNotify(&rSh); rSh.MoveSection( fnSectionCurr, fnSectionEnd ); eKeyState = KS_End; @@ -2385,7 +2385,7 @@ KEYINPUT_CHECKTABLE_INSDEL: eKeyState = KS_End; } else if ( !rSh.HasReadonlySel() - || rSh.CrsrInsideInputField() ) + || rSh.CursorInsideInputField() ) { const bool bIsNormalChar = GetAppCharClass().isLetterNumeric( OUString( aCh ), 0 ); @@ -2538,7 +2538,7 @@ KEYINPUT_CHECKTABLE_INSDEL: case KS_PrevObject: if(rSh.GotoObj( KS_NextObject == eKeyState, GotoObjFlags::Any)) { - if( rSh.IsFrmSelected() && + if( rSh.IsFrameSelected() && m_rView.GetDrawFuncPtr() ) { m_rView.GetDrawFuncPtr()->Deactivate(); @@ -2546,8 +2546,8 @@ KEYINPUT_CHECKTABLE_INSDEL: m_rView.LeaveDrawCreate(); m_rView.AttrChangedNotify( &rSh ); } - rSh.HideCrsr(); - rSh.EnterSelFrmMode(); + rSh.HideCursor(); + rSh.EnterSelFrameMode(); } break; case KS_GlossaryExpand: @@ -2727,7 +2727,7 @@ void SwEditWin::MoveCursor( SwWrtShell &rSh, const Point& rDocPos, const bool bTmpNoInterrupt = g_bNoInterrupt; g_bNoInterrupt = false; - int nTmpSetCrsr = 0; + int nTmpSetCursor = 0; if( !rSh.IsViewLocked() && bLockView ) rSh.LockView( true ); @@ -2738,12 +2738,12 @@ void SwEditWin::MoveCursor( SwWrtShell &rSh, const Point& rDocPos, // only temporary generate move context because otherwise // the query to the content form doesn't work!!! SwMvContext aMvContext( &rSh ); - nTmpSetCrsr = rSh.CallSetCursor(&rDocPos, bOnlyText); - g_bValidCrsrPos = !(CRSR_POSCHG & nTmpSetCrsr); + nTmpSetCursor = rSh.CallSetCursor(&rDocPos, bOnlyText); + g_bValidCursorPos = !(CRSR_POSCHG & nTmpSetCursor); } // notify the edit window that from now on we do not use the input language - if ( !(CRSR_POSOLD & nTmpSetCrsr) ) + if ( !(CRSR_POSOLD & nTmpSetCursor) ) SetUseInputLanguage( false ); if( bLockView ) @@ -2755,7 +2755,7 @@ void SwEditWin::MoveCursor( SwWrtShell &rSh, const Point& rDocPos, void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) { SwWrtShell &rSh = m_rView.GetWrtShell(); - const SwField *pCrsrField = rSh.CrsrInsideInputField() ? rSh.GetCurField( true ) : nullptr; + const SwField *pCursorField = rSh.CursorInsideInputField() ? rSh.GetCurField( true ) : nullptr; // We have to check if a context menu is shown and we have an UI // active inplace client. In that case we have to ignore the mouse @@ -2796,8 +2796,8 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) _rMEvt.GetMode(), _rMEvt.GetButtons() ); } - m_bWasShdwCrsr = nullptr != m_pShadCrsr; - delete m_pShadCrsr, m_pShadCrsr = nullptr; + m_bWasShdwCursor = nullptr != m_pShadCursor; + delete m_pShadCursor, m_pShadCursor = nullptr; const Point aDocPos( PixelToLogic( rMEvt.GetPosPixel() ) ); @@ -2825,14 +2825,14 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) // Are we clicking on a blank header/footer area? if ( IsInHeaderFooter( aDocPos, eControl ) || bOverHeaderFooterFly ) { - const SwPageFrm* pPageFrm = rSh.GetLayout()->GetPageAtPos( aDocPos ); + const SwPageFrame* pPageFrame = rSh.GetLayout()->GetPageAtPos( aDocPos ); // Is it active? bool bActive = true; - const SwPageDesc* pDesc = pPageFrm->GetPageDesc(); + const SwPageDesc* pDesc = pPageFrame->GetPageDesc(); const SwFrameFormat* pFormat = pDesc->GetLeftFormat(); - if ( pPageFrm->OnRightPage() ) + if ( pPageFrame->OnRightPage() ) pFormat = pDesc->GetRightFormat(); if ( pFormat ) @@ -3074,16 +3074,16 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) g_bNoInterrupt = false; return; } - else if ( m_rView.GetDrawFuncPtr() && m_bInsFrm ) + else if ( m_rView.GetDrawFuncPtr() && m_bInsFrame ) { - StopInsFrm(); + StopInsFrame(); rSh.Edit(); } // Without SHIFT because otherwise Toggle doesn't work at selection if (rMEvt.GetClicks() == 1) { - if ( rSh.IsSelFrmMode()) + if ( rSh.IsSelFrameMode()) { SdrHdl* pHdl = rSh.GetDrawView()->PickHandle(aDocPos); bool bHitHandle = pHdl && pHdl->GetKind() != HDL_ANCHOR && @@ -3092,7 +3092,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) if ((rSh.IsInsideSelectedObj(aDocPos) || bHitHandle) && !(rMEvt.GetModifier() == KEY_SHIFT && !bHitHandle)) { - rSh.EnterSelFrmMode( &aDocPos ); + rSh.EnterSelFrameMode( &aDocPos ); if ( !m_pApplyTempl ) { // only if no position to size was hit. @@ -3102,7 +3102,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) SwEditWin::m_nDDStartPosY = aDocPos.Y(); SwEditWin::m_nDDStartPosX = aDocPos.X(); } - g_bFrmDrag = true; + g_bFrameDrag = true; } g_bNoInterrupt = false; return; @@ -3160,7 +3160,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) bHandledFlyClick = true; // only try to select frame, if pointer already was // switched accordingly - if ( m_aActHitType != SDRHIT_NONE && !rSh.IsSelFrmMode() && + if ( m_aActHitType != SDRHIT_NONE && !rSh.IsSelFrameMode() && !GetView().GetViewFrame()->GetDispatcher()->IsLocked() && !bExecDrawTextLink) { @@ -3170,7 +3170,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) if(bShould) { m_rView.NoRotate(); - rSh.HideCrsr(); + rSh.HideCursor(); bool bUnLockView = !rSh.IsViewLocked(); rSh.LockView( true ); @@ -3183,11 +3183,11 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) { // if the frame was deselected in the macro // the cursor just has to be displayed again - if( FrmTypeFlags::NONE == rSh.GetSelFrmType() ) - rSh.ShowCrsr(); + if( FrameTypeFlags::NONE == rSh.GetSelFrameType() ) + rSh.ShowCursor(); else { - if (rSh.IsFrmSelected() && m_rView.GetDrawFuncPtr()) + if (rSh.IsFrameSelected() && m_rView.GetDrawFuncPtr()) { m_rView.GetDrawFuncPtr()->Deactivate(); m_rView.SetDrawFuncPtr(nullptr); @@ -3195,8 +3195,8 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) m_rView.AttrChangedNotify( &rSh ); } - rSh.EnterSelFrmMode( &aDocPos ); - g_bFrmDrag = true; + rSh.EnterSelFrameMode( &aDocPos ); + g_bFrameDrag = true; UpdatePointer( aDocPos, rMEvt.GetModifier() ); } return; @@ -3205,12 +3205,12 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) bOnlyText = rSh.IsObjSelectable( aDocPos ); if (!m_rView.GetDrawFuncPtr()) - rSh.ShowCrsr(); + rSh.ShowCursor(); } else bOnlyText = KEY_MOD1 != rMEvt.GetModifier(); } - else if ( rSh.IsSelFrmMode() && + else if ( rSh.IsSelFrameMode() && (m_aActHitType == SDRHIT_NONE || !rSh.IsInsideSelectedObj( aDocPos ))) { @@ -3233,10 +3233,10 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) if( rMEvt.IsMod1() ) nFlag = nFlag | SW_ENTER_GROUP; - if ( rSh.IsSelFrmMode() ) + if ( rSh.IsSelFrameMode() ) { - rSh.UnSelectFrm(); - rSh.LeaveSelFrmMode(); + rSh.UnSelectFrame(); + rSh.LeaveSelFrameMode(); m_rView.AttrChangedNotify(&rSh); } @@ -3247,20 +3247,20 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) if( !bSelObj ) { // move cursor here so that it is not drawn in the - // frame first; ShowCrsr() happens in LeaveSelFrmMode() - g_bValidCrsrPos = !(CRSR_POSCHG & rSh.CallSetCursor(&aDocPos, false)); - rSh.LeaveSelFrmMode(); + // frame first; ShowCursor() happens in LeaveSelFrameMode() + g_bValidCursorPos = !(CRSR_POSCHG & rSh.CallSetCursor(&aDocPos, false)); + rSh.LeaveSelFrameMode(); m_rView.AttrChangedNotify( &rSh ); bCallBase = false; } else { - rSh.HideCrsr(); - rSh.EnterSelFrmMode( &aDocPos ); - rSh.SelFlyGrabCrsr(); + rSh.HideCursor(); + rSh.EnterSelFrameMode( &aDocPos ); + rSh.SelFlyGrabCursor(); rSh.MakeSelVisible(); - g_bFrmDrag = true; - if( rSh.IsFrmSelected() && + g_bFrameDrag = true; + if( rSh.IsFrameSelected() && m_rView.GetDrawFuncPtr() ) { m_rView.GetDrawFuncPtr()->Deactivate(); @@ -3281,7 +3281,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) break; case 2: { - g_bFrmDrag = false; + g_bFrameDrag = false; if ( !bHandledFlyClick && !bIsDocReadOnly && rSh.IsInsideSelectedObj(aDocPos) && FlyProtectFlags::NONE == rSh.IsSelObjProtected( FlyProtectFlags::Content|FlyProtectFlags::Parent ) ) { @@ -3331,7 +3331,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) // if the cursor position was corrected or if a Fly // was selected in ReadOnlyMode, no word selection, except when tiled rendering. - if ((!g_bValidCrsrPos || rSh.IsFrmSelected()) && !rSh.isTiledRendering()) + if ((!g_bValidCursorPos || rSh.IsFrameSelected()) && !rSh.isTiledRendering()) return; SwField *pField; @@ -3395,7 +3395,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) case 3: case 4: { - g_bFrmDrag = false; + g_bFrameDrag = false; // in extended mode double and triple // click has no effect. if ( rSh.IsExtMode() ) @@ -3403,7 +3403,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) // if the cursor position was corrected or if a Fly // was selected in ReadOnlyMode, no word selection. - if ( !g_bValidCrsrPos || rSh.IsFrmSelected() ) + if ( !g_bValidCursorPos || rSh.IsFrameSelected() ) return; // select line, AdditionalMode if applicable @@ -3434,7 +3434,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) case MOUSE_LEFT + KEY_SHIFT: case MOUSE_LEFT + KEY_SHIFT + KEY_MOD1: { - bool bLockView = m_bWasShdwCrsr; + bool bLockView = m_bWasShdwCursor; switch ( rMEvt.GetModifier() ) { @@ -3443,24 +3443,24 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) if ( !m_bInsDraw && IsDrawObjSelectable( rSh, aDocPos ) ) { m_rView.NoRotate(); - rSh.HideCrsr(); - if ( rSh.IsSelFrmMode() ) + rSh.HideCursor(); + if ( rSh.IsSelFrameMode() ) rSh.SelectObj(aDocPos, SW_ADD_SELECT | SW_ENTER_GROUP); else { if ( rSh.SelectObj( aDocPos, SW_ADD_SELECT | SW_ENTER_GROUP ) ) { - rSh.EnterSelFrmMode( &aDocPos ); + rSh.EnterSelFrameMode( &aDocPos ); SwEditWin::m_nDDStartPosY = aDocPos.Y(); SwEditWin::m_nDDStartPosX = aDocPos.X(); - g_bFrmDrag = true; + g_bFrameDrag = true; return; } } } - else if( rSh.IsSelFrmMode() && + else if( rSh.IsSelFrameMode() && rSh.GetDrawView()->PickHandle( aDocPos )) { - g_bFrmDrag = true; + g_bFrameDrag = true; g_bNoInterrupt = false; return; } @@ -3472,24 +3472,24 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) if ( !m_bInsDraw && IsDrawObjSelectable( rSh, aDocPos ) && !lcl_urlOverBackground( rSh, aDocPos ) ) { m_rView.NoRotate(); - rSh.HideCrsr(); - if ( rSh.IsSelFrmMode() ) + rSh.HideCursor(); + if ( rSh.IsSelFrameMode() ) rSh.SelectObj(aDocPos, SW_ENTER_GROUP); else { if ( rSh.SelectObj( aDocPos, SW_ENTER_GROUP ) ) { - rSh.EnterSelFrmMode( &aDocPos ); + rSh.EnterSelFrameMode( &aDocPos ); SwEditWin::m_nDDStartPosY = aDocPos.Y(); SwEditWin::m_nDDStartPosX = aDocPos.X(); - g_bFrmDrag = true; + g_bFrameDrag = true; return; } } } - else if( rSh.IsSelFrmMode() && + else if( rSh.IsSelFrameMode() && rSh.GetDrawView()->PickHandle( aDocPos )) { - g_bFrmDrag = true; + g_bFrameDrag = true; g_bNoInterrupt = false; return; } @@ -3530,47 +3530,47 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) if ( !m_bInsDraw && IsDrawObjSelectable( rSh, aDocPos ) ) { m_rView.NoRotate(); - rSh.HideCrsr(); - if ( rSh.IsSelFrmMode() ) + rSh.HideCursor(); + if ( rSh.IsSelFrameMode() ) { rSh.SelectObj(aDocPos, SW_ADD_SELECT); const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList(); if (rMarkList.GetMark(0) == nullptr) { - rSh.LeaveSelFrmMode(); + rSh.LeaveSelFrameMode(); m_rView.AttrChangedNotify(&rSh); - g_bFrmDrag = false; + g_bFrameDrag = false; } } else { if ( rSh.SelectObj( aDocPos ) ) { - rSh.EnterSelFrmMode( &aDocPos ); + rSh.EnterSelFrameMode( &aDocPos ); SwEditWin::m_nDDStartPosY = aDocPos.Y(); SwEditWin::m_nDDStartPosX = aDocPos.X(); - g_bFrmDrag = true; + g_bFrameDrag = true; return; } } } else { - if ( rSh.IsSelFrmMode() && + if ( rSh.IsSelFrameMode() && rSh.IsInsideSelectedObj( aDocPos ) ) { - rSh.EnterSelFrmMode( &aDocPos ); + rSh.EnterSelFrameMode( &aDocPos ); SwEditWin::m_nDDStartPosY = aDocPos.Y(); SwEditWin::m_nDDStartPosX = aDocPos.X(); - g_bFrmDrag = true; + g_bFrameDrag = true; return; } - if ( rSh.IsSelFrmMode() ) + if ( rSh.IsSelFrameMode() ) { - rSh.UnSelectFrm(); - rSh.LeaveSelFrmMode(); + rSh.UnSelectFrame(); + rSh.LeaveSelFrameMode(); m_rView.AttrChangedNotify(&rSh); - g_bFrmDrag = false; + g_bFrameDrag = false; } if ( !rSh.IsExtMode() ) { @@ -3679,12 +3679,12 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) rSh.IsObjSelectable( aDocPos ) ) && !lcl_urlOverBackground( rSh, aDocPos ) ) { SwMvContext aMvContext( &rSh ); - rSh.EnterSelFrmMode(); + rSh.EnterSelFrameMode(); bCallBase = false; } } - if ( !bOverSelect && bEditableFieldClicked && (!pCrsrField || - pCrsrField != aFieldAtPos.pFndTextAttr->GetFormatField().GetField())) + if ( !bOverSelect && bEditableFieldClicked && (!pCursorField || + pCursorField != aFieldAtPos.pFndTextAttr->GetFormatField().GetField())) { // select content of Input Field, but exclude CH_TXT_ATR_INPUTFIELDSTART // and CH_TXT_ATR_INPUTFIELDEND @@ -3706,14 +3706,14 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) SwContentAtPos aFieldAtPos(SwContentAtPos::SW_FIELD); // Are we clicking on a field? - if (g_bValidCrsrPos + if (g_bValidCursorPos && rSh.GetContentAtPos(aDocPos, aFieldAtPos) && aFieldAtPos.pFndTextAttr != nullptr && aFieldAtPos.pFndTextAttr->Which() == RES_TXTATR_INPUTFIELD - && (!pCrsrField || pCrsrField != aFieldAtPos.pFndTextAttr->GetFormatField().GetField())) + && (!pCursorField || pCursorField != aFieldAtPos.pFndTextAttr->GetFormatField().GetField())) { // Move the cursor - MoveCursor( rSh, aDocPos, rSh.IsObjSelectable( aDocPos ), m_bWasShdwCrsr ); + MoveCursor( rSh, aDocPos, rSh.IsObjSelectable( aDocPos ), m_bWasShdwCursor ); bCallBase = false; // select content of Input Field, but exclude CH_TXT_ATR_INPUTFIELDSTART @@ -3756,8 +3756,8 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) if( rSh.ActionPend() ) return ; - if( m_pShadCrsr && 0 != (rMEvt.GetModifier() + rMEvt.GetButtons() ) ) - delete m_pShadCrsr, m_pShadCrsr = nullptr; + if( m_pShadCursor && 0 != (rMEvt.GetModifier() + rMEvt.GetButtons() ) ) + delete m_pShadCursor, m_pShadCursor = nullptr; bool bIsDocReadOnly = m_rView.GetDocShell()->IsReadOnly(); @@ -3788,8 +3788,8 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) const Point aOldPt( rSh.VisArea().Pos() ); const bool bInsWin = rSh.VisArea().IsInside( aDocPt ) || rSh.isTiledRendering(); - if( m_pShadCrsr && !bInsWin ) - delete m_pShadCrsr, m_pShadCrsr = nullptr; + if( m_pShadCursor && !bInsWin ) + delete m_pShadCursor, m_pShadCursor = nullptr; if( bInsWin && m_pRowColumnSelectionStart ) { @@ -3825,7 +3825,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) EnterArea(); return; } - else if(!rSh.IsFrmSelected() && !rSh.IsObjSelected()) + else if(!rSh.IsFrameSelected() && !rSh.IsObjSelected()) { SfxBindings &rBnd = rSh.GetView().GetViewFrame()->GetBindings(); Point aRelPos = rSh.GetRelativePagePosition(aDocPt); @@ -3912,7 +3912,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) } } - bool bDelShadCrsr = true; + bool bDelShadCursor = true; switch ( rMEvt.GetModifier() + rMEvt.GetButtons() ) { @@ -3981,7 +3981,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) if ( !m_bMBPressed ) break; case MOUSE_LEFT + KEY_MOD1: - if ( g_bFrmDrag && rSh.IsSelFrmMode() ) + if ( g_bFrameDrag && rSh.IsSelFrameMode() ) { if( !m_bMBPressed ) break; @@ -4093,7 +4093,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) EnterArea(); return; } - if ( !rSh.IsSelFrmMode() && !g_bDDINetAttr && + if ( !rSh.IsSelFrameMode() && !g_bDDINetAttr && (IsMinMove( m_aStartPos,aPixPt ) || m_bIsInMove) && (rSh.IsInSelect() || !rSh.ChgCurrPam( aDocPt )) ) { @@ -4119,7 +4119,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) { rSh.Drag( &aDocPt, false ); - g_bValidCrsrPos = !(CRSR_POSCHG & rSh.CallSetCursor(&aDocPt, false)); + g_bValidCursorPos = !(CRSR_POSCHG & rSh.CallSetCursor(&aDocPt, false)); EnterArea(); } } @@ -4156,7 +4156,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) case KEY_MOD1: if ( !m_bInsDraw ) { - bool bTstShdwCrsr = true; + bool bTstShdwCursor = true; UpdatePointer( aDocPt, rMEvt.GetModifier() ); @@ -4171,7 +4171,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) if( pINet || nullptr != ( pTmp = pFormat = rSh.GetFormatFromAnyObj( aDocPt ))) { - bTstShdwCrsr = false; + bTstShdwCursor = false; if( pTmp == pINet ) m_aSaveCallEvent.Set( pINet ); else @@ -4203,8 +4203,8 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) aLastCallEvent, true ); } - if( bTstShdwCrsr && bInsWin && !bIsDocReadOnly && - !m_bInsFrm && + if( bTstShdwCursor && bInsWin && !bIsDocReadOnly && + !m_bInsFrame && !rSh.GetViewOptions()->getBrowseMode() && rSh.GetViewOptions()->IsShadowCursor() && !(rMEvt.GetModifier() + rMEvt.GetButtons()) && @@ -4212,16 +4212,16 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) { SwRect aRect; sal_Int16 eOrient; - SwFillMode eMode = (SwFillMode)rSh.GetViewOptions()->GetShdwCrsrFillMode(); - if( rSh.GetShadowCrsrPos( aDocPt, eMode, aRect, eOrient )) + SwFillMode eMode = (SwFillMode)rSh.GetViewOptions()->GetShdwCursorFillMode(); + if( rSh.GetShadowCursorPos( aDocPt, eMode, aRect, eOrient )) { - if( !m_pShadCrsr ) - m_pShadCrsr = new SwShadowCursor( *this, + if( !m_pShadCursor ) + m_pShadCursor = new SwShadowCursor( *this, SwViewOption::GetDirectCursorColor() ); if( text::HoriOrientation::RIGHT != eOrient && text::HoriOrientation::CENTER != eOrient ) eOrient = text::HoriOrientation::LEFT; - m_pShadCrsr->SetPos( aRect.Pos(), aRect.Height(), static_cast< sal_uInt16 >(eOrient) ); - bDelShadCrsr = false; + m_pShadCursor->SetPos( aRect.Pos(), aRect.Height(), static_cast< sal_uInt16 >(eOrient) ); + bDelShadCursor = false; } } } @@ -4230,15 +4230,15 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) if( rSh.IsBlockMode() && !rMEvt.IsSynthetic() ) { rSh.Drag( &aDocPt, false ); - g_bValidCrsrPos = !(CRSR_POSCHG & rSh.CallSetCursor(&aDocPt, false)); + g_bValidCursorPos = !(CRSR_POSCHG & rSh.CallSetCursor(&aDocPt, false)); EnterArea(); } break; } - if( bDelShadCrsr && m_pShadCrsr ) - delete m_pShadCrsr, m_pShadCrsr = nullptr; - m_bWasShdwCrsr = false; + if( bDelShadCursor && m_pShadCursor ) + delete m_pShadCursor, m_pShadCursor = nullptr; + m_bWasShdwCursor = false; } /** @@ -4257,10 +4257,10 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) bool bCallBase = true; - bool bCallShadowCrsr = m_bWasShdwCrsr; - m_bWasShdwCrsr = false; - if( m_pShadCrsr ) - delete m_pShadCrsr, m_pShadCrsr = nullptr; + bool bCallShadowCursor = m_bWasShdwCursor; + m_bWasShdwCursor = false; + if( m_pShadCursor ) + delete m_pShadCursor, m_pShadCursor = nullptr; if( m_pRowColumnSelectionStart ) DELETEZ( m_pRowColumnSelectionStart ); @@ -4303,10 +4303,10 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) { StopDDTimer( &rSh, aDocPt ); m_bMBPressed = false; - if ( rSh.IsSelFrmMode() ) + if ( rSh.IsSelFrameMode() ) { rSh.EndDrag( &aDocPt, false ); - g_bFrmDrag = false; + g_bFrameDrag = false; } g_bNoInterrupt = false; const Point aDocPos( PixelToLogic( rMEvt.GetPosPixel() ) ); @@ -4369,19 +4369,19 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) if ( rSh.IsObjSelected() ) { - rSh.EnterSelFrmMode(); + rSh.EnterSelFrameMode(); if (!m_rView.GetDrawFuncPtr()) StdDrawMode( OBJ_NONE, true ); } - else if ( rSh.IsFrmSelected() ) + else if ( rSh.IsFrameSelected() ) { - rSh.EnterSelFrmMode(); - StopInsFrm(); + rSh.EnterSelFrameMode(); + StopInsFrame(); } else { const Point aDocPos( PixelToLogic( m_aStartPos ) ); - g_bValidCrsrPos = !(CRSR_POSCHG & rSh.CallSetCursor(&aDocPos, false)); + g_bValidCursorPos = !(CRSR_POSCHG & rSh.CallSetCursor(&aDocPos, false)); rSh.Edit(); } @@ -4405,9 +4405,9 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) m_rView.GetDrawFuncPtr()->Deactivate(); m_rView.AttrChangedNotify( &rSh ); if ( rSh.IsObjSelected() ) - rSh.EnterSelFrmMode(); - if ( m_rView.GetDrawFuncPtr() && m_bInsFrm ) - StopInsFrm(); + rSh.EnterSelFrameMode(); + if ( m_rView.GetDrawFuncPtr() && m_bInsFrame ) + StopInsFrame(); } bCallBase = false; break; @@ -4415,7 +4415,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) case MOUSE_LEFT + KEY_MOD1: case MOUSE_LEFT + KEY_MOD2: case MOUSE_LEFT + KEY_SHIFT + KEY_MOD1: - if ( g_bFrmDrag && rSh.IsSelFrmMode() ) + if ( g_bFrameDrag && rSh.IsSelFrameMode() ) { if ( rMEvt.IsMod1() ) // copy and don't move. { @@ -4426,7 +4426,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) { rSh.BreakDrag(); Point aEndPt, aSttPt; - if ( rSh.GetSelFrmType() & FrmTypeFlags::FLY_ATCNT ) + if ( rSh.GetSelFrameType() & FrameTypeFlags::FLY_ATCNT ) { aEndPt = aRect.TopLeft(); aSttPt = rSh.GetDrawView()->GetAllMarkedRect().TopLeft(); @@ -4496,18 +4496,18 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) } rSh.EndDrag( &aDocPt, false ); } - g_bFrmDrag = false; + g_bFrameDrag = false; bCallBase = false; break; } bPopMode = true; // no break case MOUSE_LEFT + KEY_SHIFT: - if (rSh.IsSelFrmMode()) + if (rSh.IsSelFrameMode()) { rSh.EndDrag( &aDocPt, false ); - g_bFrmDrag = false; + g_bFrameDrag = false; bCallBase = false; break; } @@ -4529,7 +4529,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) // the query to the content form doesn't work!!! SwMvContext aMvContext( &rSh ); const Point aDocPos( PixelToLogic( m_aStartPos ) ); - g_bValidCrsrPos = !(CRSR_POSCHG & rSh.CallSetCursor(&aDocPos, false)); + g_bValidCursorPos = !(CRSR_POSCHG & rSh.CallSetCursor(&aDocPos, false)); } g_bNoInterrupt = bTmpNoInterrupt; @@ -4598,11 +4598,11 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) // the query to the content form doesn't work!!! SwMvContext aMvContext( &rSh ); const Point aDocPos( PixelToLogic( m_aStartPos ) ); - g_bValidCrsrPos = !(CRSR_POSCHG & rSh.CallSetCursor(&aDocPos, false)); + g_bValidCursorPos = !(CRSR_POSCHG & rSh.CallSetCursor(&aDocPos, false)); } else { - g_bValidCrsrPos = true; + g_bValidCursorPos = true; } } else @@ -4611,7 +4611,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) // a bit of a mystery what this is good for? // in this case we assume it's valid since we // just selected a field - g_bValidCrsrPos = true; + g_bValidCursorPos = true; } if (bAddMode) { @@ -4652,7 +4652,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) } rSh.LockView( bViewLocked ); - bCallShadowCrsr = false; + bCallShadowCursor = false; } else { @@ -4674,19 +4674,19 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) OUString sTarget(pField->GetTargetFrame()); ::LoadURL(rSh, sURL, nFilter, sTarget); } - bCallShadowCrsr = false; + bCallShadowCursor = false; } else { // hit graphic ReleaseMouse(); if( rSh.ClickToINetGrf( aDocPt, nFilter )) - bCallShadowCrsr = false; + bCallShadowCursor = false; } } } - if( bCallShadowCrsr && + if( bCallShadowCursor && rSh.GetViewOptions()->IsShadowCursor() && MOUSE_LEFT == (rMEvt.GetModifier() + rMEvt.GetButtons()) && !rSh.HasSelection() && @@ -4701,8 +4701,8 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) rSh.Undo(); } } - SwFillMode eMode = (SwFillMode)rSh.GetViewOptions()->GetShdwCrsrFillMode(); - rSh.SetShadowCrsrPos( aDocPt, eMode ); + SwFillMode eMode = (SwFillMode)rSh.GetViewOptions()->GetShdwCursorFillMode(); + rSh.SetShadowCursorPos( aDocPt, eMode ); } } } @@ -4778,9 +4778,9 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) rSh.SetAttrItem( SvxBrushItem( SwEditWin::m_aWaterCanTextBackColor, nId ) ); else rSh.SetAttrItem( SvxColorItem( SwEditWin::m_aWaterCanTextColor, nId ) ); - rSh.UnSetVisCrsr(); + rSh.UnSetVisibleCursor(); rSh.EnterStdMode(); - rSh.SetVisCrsr(aDocPt); + rSh.SetVisibleCursor(aDocPt); bCallBase = false; m_aTemplateIdle.Stop(); } @@ -4813,9 +4813,9 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) & eSelection ) && !rSh.HasReadonlySel() ) { rSh.SetAttrItem( SwFormatCharFormat(m_pApplyTempl->aColl.pCharFormat) ); - rSh.UnSetVisCrsr(); + rSh.UnSetVisibleCursor(); rSh.EnterStdMode(); - rSh.SetVisCrsr(aDocPt); + rSh.SetVisibleCursor(aDocPt); m_pApplyTempl->nUndo = std::min(m_pApplyTempl->nUndo, rSh.GetDoc()->GetIDocumentUndoRedo().GetUndoActionCount()); bCallBase = false; @@ -4947,10 +4947,10 @@ void SwEditWin::SetApplyTemplate(const SwApplyTemplate &rTempl) else { SetPointer( PointerStyle::Text ); - rSh.UnSetVisCrsr(); + rSh.UnSetVisibleCursor(); rSh.GetViewOptions()->SetIdle( bIdle ); - if ( !rSh.IsSelFrmMode() ) + if ( !rSh.IsSelFrameMode() ) rSh.Edit(); } @@ -4977,7 +4977,7 @@ SwEditWin::SwEditWin(vcl::Window *pParent, SwView &rMyView): m_pAnchorMarker( nullptr ), m_pUserMarker( nullptr ), m_pUserMarkerObj( nullptr ), - m_pShadCrsr( nullptr ), + m_pShadCursor( nullptr ), m_pRowColumnSelectionStart( nullptr ), m_rView( rMyView ), @@ -4988,12 +4988,12 @@ SwEditWin::SwEditWin(vcl::Window *pParent, SwView &rMyView): m_nDropDestination( SotExchangeDest::NONE ), m_eBezierMode(SID_BEZIER_INSERT), - m_nInsFrmColCount( 1 ), + m_nInsFrameColCount( 1 ), m_eDrawMode(OBJ_NONE), m_bMBPressed(false), m_bInsDraw(false), - m_bInsFrm(false), + m_bInsFrame(false), m_bIsInMove(false), m_bIsInDrag(false), m_bOldIdle(false), @@ -5001,7 +5001,7 @@ SwEditWin::SwEditWin(vcl::Window *pParent, SwView &rMyView): m_bTableInsDelMode(false), m_bTableIsInsMode(false), m_bChainMode(false), - m_bWasShdwCrsr(false), + m_bWasShdwCursor(false), m_bLockInput(false), m_bIsRowDrag(false), m_bUseInputLanguage(false), @@ -5014,8 +5014,8 @@ SwEditWin::SwEditWin(vcl::Window *pParent, SwView &rMyView): EnableChildTransparentMode(); SetDialogControlFlags( DialogControlFlags::Return | DialogControlFlags::WantFocus ); - m_bMBPressed = m_bInsDraw = m_bInsFrm = - m_bIsInDrag = m_bOldIdle = m_bOldIdleSet = m_bChainMode = m_bWasShdwCrsr = false; + m_bMBPressed = m_bInsDraw = m_bInsFrame = + m_bIsInDrag = m_bOldIdle = m_bOldIdleSet = m_bChainMode = m_bWasShdwCursor = false; // initially use the input language m_bUseInputLanguage = true; @@ -5055,8 +5055,8 @@ void SwEditWin::dispose() { m_aKeyInputTimer.Stop(); - delete m_pShadCrsr; - m_pShadCrsr = nullptr; + delete m_pShadCursor; + m_pShadCursor = nullptr; delete m_pRowColumnSelectionStart; m_pRowColumnSelectionStart = nullptr; @@ -5125,13 +5125,13 @@ bool SwEditWin::EnterDrawMode(const MouseEvent& rMEvt, const Point& aDocPos) rSh.EndTextEdit(); // clicked aside, end Edit rSh.SelectObj( aDocPos ); - if ( !rSh.IsObjSelected() && !rSh.IsFrmSelected() ) - rSh.LeaveSelFrmMode(); + if ( !rSh.IsObjSelected() && !rSh.IsFrameSelected() ) + rSh.LeaveSelFrameMode(); else { SwEditWin::m_nDDStartPosY = aDocPos.Y(); SwEditWin::m_nDDStartPosX = aDocPos.X(); - g_bFrmDrag = true; + g_bFrameDrag = true; } if( bUnLockView ) rSh.LockView( false ); @@ -5279,8 +5279,8 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) case CommandEventId::Wheel: case CommandEventId::StartAutoScroll: case CommandEventId::AutoScroll: - if( m_pShadCrsr ) - delete m_pShadCrsr, m_pShadCrsr = nullptr; + if( m_pShadCursor ) + delete m_pShadCursor, m_pShadCursor = nullptr; bCallBase = !m_rView.HandleWheelCommands( rCEvt ); break; @@ -5291,7 +5291,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) case CommandEventId::StartExtTextInput: { bool bIsDocReadOnly = m_rView.GetDocShell()->IsReadOnly() && - rSh.IsCrsrReadonly(); + rSh.IsCursorReadonly(); if(!bIsDocReadOnly) { if( rSh.HasDrawView() && rSh.GetDrawView()->IsTextEdit() ) @@ -5314,7 +5314,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) case CommandEventId::EndExtTextInput: { bool bIsDocReadOnly = m_rView.GetDocShell()->IsReadOnly() && - rSh.IsCrsrReadonly(); + rSh.IsCursorReadonly(); if(!bIsDocReadOnly) { if( rSh.HasDrawView() && rSh.GetDrawView()->IsTextEdit() ) @@ -5365,7 +5365,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) case CommandEventId::ExtTextInput: { bool bIsDocReadOnly = m_rView.GetDocShell()->IsReadOnly() && - rSh.IsCrsrReadonly(); + rSh.IsCursorReadonly(); if(!bIsDocReadOnly) { if( m_pQuickHlpData->m_bIsDisplayed ) @@ -5467,77 +5467,77 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) case CommandEventId::SelectionChange: { const CommandSelectionChangeData *pData = rCEvt.GetSelectionChangeData(); - rSh.SttCrsrMove(); + rSh.SttCursorMove(); rSh.GoStartSentence(); - rSh.GetCrsr()->GetPoint()->nContent += sal::static_int_cast<sal_uInt16, sal_uLong>(pData->GetStart()); + rSh.GetCursor()->GetPoint()->nContent += sal::static_int_cast<sal_uInt16, sal_uLong>(pData->GetStart()); rSh.SetMark(); - rSh.GetCrsr()->GetMark()->nContent += sal::static_int_cast<sal_uInt16, sal_uLong>(pData->GetEnd() - pData->GetStart()); - rSh.EndCrsrMove( true ); + rSh.GetCursor()->GetMark()->nContent += sal::static_int_cast<sal_uInt16, sal_uLong>(pData->GetEnd() - pData->GetStart()); + rSh.EndCursorMove( true ); } break; case CommandEventId::PrepareReconversion: if( rSh.HasSelection() ) { - SwPaM *pCrsr = rSh.GetCrsr(); + SwPaM *pCursor = rSh.GetCursor(); if( rSh.IsMultiSelection() ) { - if (pCrsr && !pCrsr->HasMark() && - pCrsr->GetPoint() == pCrsr->GetMark()) + if (pCursor && !pCursor->HasMark() && + pCursor->GetPoint() == pCursor->GetMark()) { - rSh.GoPrevCrsr(); - pCrsr = rSh.GetCrsr(); + rSh.GoPrevCursor(); + pCursor = rSh.GetCursor(); } // Cancel all selections other than the last selected one. - while( rSh.GetCrsr()->GetNext() != rSh.GetCrsr() ) - delete rSh.GetCrsr()->GetNext(); + while( rSh.GetCursor()->GetNext() != rSh.GetCursor() ) + delete rSh.GetCursor()->GetNext(); } - if( pCrsr ) + if( pCursor ) { - sal_uLong nPosNodeIdx = pCrsr->GetPoint()->nNode.GetIndex(); - const sal_Int32 nPosIdx = pCrsr->GetPoint()->nContent.GetIndex(); - sal_uLong nMarkNodeIdx = pCrsr->GetMark()->nNode.GetIndex(); - const sal_Int32 nMarkIdx = pCrsr->GetMark()->nContent.GetIndex(); + sal_uLong nPosNodeIdx = pCursor->GetPoint()->nNode.GetIndex(); + const sal_Int32 nPosIdx = pCursor->GetPoint()->nContent.GetIndex(); + sal_uLong nMarkNodeIdx = pCursor->GetMark()->nNode.GetIndex(); + const sal_Int32 nMarkIdx = pCursor->GetMark()->nContent.GetIndex(); - if( !rSh.GetCrsr()->HasMark() ) - rSh.GetCrsr()->SetMark(); + if( !rSh.GetCursor()->HasMark() ) + rSh.GetCursor()->SetMark(); - rSh.SttCrsrMove(); + rSh.SttCursorMove(); if( nPosNodeIdx < nMarkNodeIdx ) { - rSh.GetCrsr()->GetPoint()->nNode = nPosNodeIdx; - rSh.GetCrsr()->GetPoint()->nContent = nPosIdx; - rSh.GetCrsr()->GetMark()->nNode = nPosNodeIdx; - rSh.GetCrsr()->GetMark()->nContent = - rSh.GetCrsr()->GetContentNode()->Len(); + rSh.GetCursor()->GetPoint()->nNode = nPosNodeIdx; + rSh.GetCursor()->GetPoint()->nContent = nPosIdx; + rSh.GetCursor()->GetMark()->nNode = nPosNodeIdx; + rSh.GetCursor()->GetMark()->nContent = + rSh.GetCursor()->GetContentNode()->Len(); } else if( nPosNodeIdx == nMarkNodeIdx ) { - rSh.GetCrsr()->GetPoint()->nNode = nPosNodeIdx; - rSh.GetCrsr()->GetPoint()->nContent = nPosIdx; - rSh.GetCrsr()->GetMark()->nNode = nMarkNodeIdx; - rSh.GetCrsr()->GetMark()->nContent = nMarkIdx; + rSh.GetCursor()->GetPoint()->nNode = nPosNodeIdx; + rSh.GetCursor()->GetPoint()->nContent = nPosIdx; + rSh.GetCursor()->GetMark()->nNode = nMarkNodeIdx; + rSh.GetCursor()->GetMark()->nContent = nMarkIdx; } else { - rSh.GetCrsr()->GetMark()->nNode = nMarkNodeIdx; - rSh.GetCrsr()->GetMark()->nContent = nMarkIdx; - rSh.GetCrsr()->GetPoint()->nNode = nMarkNodeIdx; - rSh.GetCrsr()->GetPoint()->nContent = - rSh.GetCrsr()->GetContentNode( false )->Len(); + rSh.GetCursor()->GetMark()->nNode = nMarkNodeIdx; + rSh.GetCursor()->GetMark()->nContent = nMarkIdx; + rSh.GetCursor()->GetPoint()->nNode = nMarkNodeIdx; + rSh.GetCursor()->GetPoint()->nContent = + rSh.GetCursor()->GetContentNode( false )->Len(); } - rSh.EndCrsrMove( true ); + rSh.EndCursorMove( true ); } } break; case CommandEventId::QueryCharPosition: { bool bVertical = rSh.IsInVerticalText(); - const SwPosition& rPos = *rSh.GetCrsr()->GetPoint(); + const SwPosition& rPos = *rSh.GetCursor()->GetPoint(); SwDocShell* pDocSh = m_rView.GetDocShell(); SwDoc *pDoc = pDocSh->GetDoc(); SwExtTextInput* pInput = pDoc->GetExtTextInput( rPos.nNode.GetNode(), rPos.nContent.GetIndex() ); @@ -5661,15 +5661,15 @@ bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) { return true; } - if ( m_rView.GetDrawFuncPtr() && m_bInsFrm ) + if ( m_rView.GetDrawFuncPtr() && m_bInsFrame ) { - StopInsFrm(); + StopInsFrame(); rSh.Edit(); } UpdatePointer( aDocPos ); - if( !rSh.IsSelFrmMode() && + if( !rSh.IsSelFrameMode() && !GetView().GetViewFrame()->GetDispatcher()->IsLocked() ) { // Test if there is a draw object at that position and if it should be selected. @@ -5678,7 +5678,7 @@ bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) if(bShould) { m_rView.NoRotate(); - rSh.HideCrsr(); + rSh.HideCursor(); bool bUnLockView = !rSh.IsViewLocked(); rSh.LockView( true ); @@ -5691,11 +5691,11 @@ bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) bRet = true; // in case the frame was deselected in the macro // just the cursor has to be displayed again. - if( FrmTypeFlags::NONE == rSh.GetSelFrmType() ) - rSh.ShowCrsr(); + if( FrameTypeFlags::NONE == rSh.GetSelFrameType() ) + rSh.ShowCursor(); else { - if (rSh.IsFrmSelected() && m_rView.GetDrawFuncPtr()) + if (rSh.IsFrameSelected() && m_rView.GetDrawFuncPtr()) { m_rView.GetDrawFuncPtr()->Deactivate(); m_rView.SetDrawFuncPtr(nullptr); @@ -5703,18 +5703,18 @@ bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) m_rView.AttrChangedNotify( &rSh ); } - rSh.EnterSelFrmMode( &aDocPos ); - g_bFrmDrag = true; + rSh.EnterSelFrameMode( &aDocPos ); + g_bFrameDrag = true; UpdatePointer( aDocPos ); return bRet; } } if (!m_rView.GetDrawFuncPtr()) - rSh.ShowCrsr(); + rSh.ShowCursor(); } } - else if ( rSh.IsSelFrmMode() && + else if ( rSh.IsSelFrameMode() && (m_aActHitType == SDRHIT_NONE || !bIsInsideSelectedObj)) { @@ -5723,10 +5723,10 @@ bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) rSh.LockView( true ); sal_uInt8 nFlag = 0; - if ( rSh.IsSelFrmMode() ) + if ( rSh.IsSelFrameMode() ) { - rSh.UnSelectFrm(); - rSh.LeaveSelFrmMode(); + rSh.UnSelectFrame(); + rSh.LeaveSelFrameMode(); m_rView.AttrChangedNotify(&rSh); bRet = true; } @@ -5738,21 +5738,21 @@ bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) if( !bSelObj ) { // move cursor here so that it is not drawn in the - // frame at first; ShowCrsr() happens in LeaveSelFrmMode() - g_bValidCrsrPos = !(CRSR_POSCHG & rSh.CallSetCursor(&aDocPos, false)); - rSh.LeaveSelFrmMode(); + // frame at first; ShowCursor() happens in LeaveSelFrameMode() + g_bValidCursorPos = !(CRSR_POSCHG & rSh.CallSetCursor(&aDocPos, false)); + rSh.LeaveSelFrameMode(); m_rView.LeaveDrawCreate(); m_rView.AttrChangedNotify( &rSh ); bRet = true; } else { - rSh.HideCrsr(); - rSh.EnterSelFrmMode( &aDocPos ); - rSh.SelFlyGrabCrsr(); + rSh.HideCursor(); + rSh.EnterSelFrameMode( &aDocPos ); + rSh.SelFlyGrabCursor(); rSh.MakeSelVisible(); - g_bFrmDrag = true; - if( rSh.IsFrmSelected() && + g_bFrameDrag = true; + if( rSh.IsFrameSelected() && m_rView.GetDrawFuncPtr() ) { m_rView.GetDrawFuncPtr()->Deactivate(); @@ -5764,7 +5764,7 @@ bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) bRet = true; } } - else if ( rSh.IsSelFrmMode() && bIsInsideSelectedObj ) + else if ( rSh.IsSelFrameMode() && bIsInsideSelectedObj ) { // Object at the mouse cursor is already selected - do nothing return false; @@ -5796,9 +5796,9 @@ bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) nSelType == nsSelectionType::SEL_GRF ) { SwMvContext aMvContext( &rSh ); - if( !rSh.IsFrmSelected() ) + if( !rSh.IsFrameSelected() ) rSh.GotoNextFly(); - rSh.EnterSelFrmMode(); + rSh.EnterSelFrameMode(); bRet = true; } } @@ -5854,7 +5854,7 @@ IMPL_LINK_NOARG_TYPED(SwEditWin, TemplateTimerHdl, Idle *, void) void SwEditWin::SetChainMode( bool bOn ) { if ( !m_bChainMode ) - StopInsFrm(); + StopInsFrame(); if ( m_pUserMarker ) { @@ -6145,9 +6145,9 @@ void SwEditWin::ShowAutoTextCorrectQuickHelp( bool SwEditWin::IsInHeaderFooter( const Point &rDocPt, FrameControlType &rControl ) const { SwWrtShell &rSh = m_rView.GetWrtShell(); - const SwPageFrm* pPageFrm = rSh.GetLayout()->GetPageAtPos( rDocPt ); + const SwPageFrame* pPageFrame = rSh.GetLayout()->GetPageAtPos( rDocPt ); - if ( pPageFrm && pPageFrm->IsOverHeaderFooterArea( rDocPt, rControl ) ) + if ( pPageFrame && pPageFrame->IsOverHeaderFooterArea( rDocPt, rControl ) ) return true; if ( rSh.IsShowHeaderFooterSeparator( Header ) || rSh.IsShowHeaderFooterSeparator( Footer ) ) @@ -6157,7 +6157,7 @@ bool SwEditWin::IsInHeaderFooter( const Point &rDocPt, FrameControlType &rContro if ( rSh.IsShowHeaderFooterSeparator( Header ) ) { - SwFrameControlPtr pControl = rMgr.GetControl( Header, pPageFrm ); + SwFrameControlPtr pControl = rMgr.GetControl( Header, pPageFrame ); if ( pControl.get() && pControl->Contains( aPoint ) ) { rControl = Header; @@ -6167,7 +6167,7 @@ bool SwEditWin::IsInHeaderFooter( const Point &rDocPt, FrameControlType &rContro if ( rSh.IsShowHeaderFooterSeparator( Footer ) ) { - SwFrameControlPtr pControl = rMgr.GetControl( Footer, pPageFrm ); + SwFrameControlPtr pControl = rMgr.GetControl( Footer, pPageFrame ); if ( pControl.get() && pControl->Contains( aPoint ) ) { rControl = Footer; @@ -6185,7 +6185,7 @@ bool SwEditWin::IsOverHeaderFooterFly( const Point& rDocPos, FrameControlType& r Point aPt( rDocPos ); SwWrtShell &rSh = m_rView.GetWrtShell(); SwPaM aPam( *rSh.GetCurrentShellCursor().GetPoint() ); - rSh.GetLayout()->GetCrsrOfst( aPam.GetPoint(), aPt, nullptr, true ); + rSh.GetLayout()->GetCursorOfst( aPam.GetPoint(), aPt, nullptr, true ); const SwStartNode* pStartFly = aPam.GetPoint()->nNode.GetNode().FindFlyStartNode(); if ( pStartFly ) @@ -6234,11 +6234,11 @@ OUString SwEditWin::GetSurroundingText() const rSh.GetSelectedText( sReturn, GETSELTXT_PARABRK_TO_ONLYCR ); else if( !rSh.HasSelection() ) { - SwPosition *pPos = rSh.GetCrsr()->GetPoint(); + SwPosition *pPos = rSh.GetCursor()->GetPoint(); const sal_Int32 nPos = pPos->nContent.GetIndex(); // get the sentence around the cursor - rSh.HideCrsr(); + rSh.HideCursor(); rSh.GoStartSentence(); rSh.SetMark(); rSh.GoEndSentence(); @@ -6246,7 +6246,7 @@ OUString SwEditWin::GetSurroundingText() const pPos->nContent = nPos; rSh.ClearMark(); - rSh.HideCrsr(); + rSh.HideCursor(); } return sReturn; @@ -6265,16 +6265,16 @@ Selection SwEditWin::GetSurroundingTextSelection() const { // Return the position of the visible cursor in the sentence // around the visible cursor. - SwPosition *pPos = rSh.GetCrsr()->GetPoint(); + SwPosition *pPos = rSh.GetCursor()->GetPoint(); const sal_Int32 nPos = pPos->nContent.GetIndex(); - rSh.HideCrsr(); + rSh.HideCursor(); rSh.GoStartSentence(); - const sal_Int32 nStartPos = rSh.GetCrsr()->GetPoint()->nContent.GetIndex(); + const sal_Int32 nStartPos = rSh.GetCursor()->GetPoint()->nContent.GetIndex(); pPos->nContent = nPos; rSh.ClearMark(); - rSh.ShowCrsr(); + rSh.ShowCursor(); return Selection( nPos - nStartPos, nPos - nStartPos ); } @@ -6359,7 +6359,7 @@ void SwEditWin::SetCursorTwipPosition(const Point& rPosition, bool bPoint, bool } } - // Not an SwWrtShell, as that would make SwCrsrShell::GetCrsr() inaccessible. + // Not an SwWrtShell, as that would make SwCursorShell::GetCursor() inaccessible. SwEditShell& rShell = m_rView.GetWrtShell(); bool bCreateSelection = false; @@ -6376,10 +6376,10 @@ void SwEditWin::SetCursorTwipPosition(const Point& rPosition, bool bPoint, bool // If the mark is to be updated, then exchange the point and mark before // and after, as we can't easily set the mark. if (!bPoint) - rShell.getShellCrsr(/*bBlock=*/false)->Exchange(); - rShell.SetCrsr(rPosition); + rShell.getShellCursor(/*bBlock=*/false)->Exchange(); + rShell.SetCursor(rPosition); if (!bPoint) - rShell.getShellCrsr(/*bBlock=*/false)->Exchange(); + rShell.getShellCursor(/*bBlock=*/false)->Exchange(); } if (bCreateSelection) diff --git a/sw/source/uibase/docvw/edtwin2.cxx b/sw/source/uibase/docvw/edtwin2.cxx index c7d7be51932c..ba05744a930f 100644 --- a/sw/source/uibase/docvw/edtwin2.cxx +++ b/sw/source/uibase/docvw/edtwin2.cxx @@ -445,20 +445,20 @@ void SwEditWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect SwWrtShell* pWrtShell = GetView().GetWrtShellPtr(); if(!pWrtShell) return; - bool bPaintShadowCrsr = false; - if( m_pShadCrsr ) + bool bPaintShadowCursor = false; + if( m_pShadCursor ) { - Rectangle aRect( m_pShadCrsr->GetRect()); + Rectangle aRect( m_pShadCursor->GetRect()); // fully resides inside? if( rRect.IsInside( aRect ) ) // dann aufheben - delete m_pShadCrsr, m_pShadCrsr = nullptr; + delete m_pShadCursor, m_pShadCursor = nullptr; else if( rRect.IsOver( aRect )) { // resides somewhat above, then everything is clipped outside // and we have to make the "inner part" at the end of the // Paint visible again. Otherwise Paint errors occur! - bPaintShadowCrsr = true; + bPaintShadowCursor = true; } } @@ -472,8 +472,8 @@ void SwEditWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect pWrtShell->setOutputToWindow(false); } - if( bPaintShadowCrsr ) - m_pShadCrsr->Paint(); + if( bPaintShadowCursor ) + m_pShadCursor->Paint(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/docvw/edtwin3.cxx b/sw/source/uibase/docvw/edtwin3.cxx index c69ebfcbd4eb..006cf7ff109d 100644 --- a/sw/source/uibase/docvw/edtwin3.cxx +++ b/sw/source/uibase/docvw/edtwin3.cxx @@ -78,8 +78,8 @@ void PageNumNotify( SwViewShell* pVwSh, sal_uInt16 nPhyNum, sal_uInt16 nVirtNum, void FrameNotify( SwViewShell* pVwSh, FlyMode eMode ) { - if ( dynamic_cast< const SwCrsrShell *>( pVwSh ) != nullptr ) - SwBaseShell::SetFrmMode( eMode, static_cast<SwWrtShell*>(pVwSh) ); + if ( dynamic_cast< const SwCursorShell *>( pVwSh ) != nullptr ) + SwBaseShell::SetFrameMode( eMode, static_cast<SwWrtShell*>(pVwSh) ); } // Notify for page number update diff --git a/sw/source/uibase/docvw/frmsidebarwincontainer.cxx b/sw/source/uibase/docvw/frmsidebarwincontainer.cxx index 43f1fd332841..dee11c51efc0 100644 --- a/sw/source/uibase/docvw/frmsidebarwincontainer.cxx +++ b/sw/source/uibase/docvw/frmsidebarwincontainer.cxx @@ -50,56 +50,56 @@ namespace { typedef ::std::map < SidebarWinKey, VclPtr<sw::sidebarwindows::SwSidebarWin>, SidebarWinOrder > SidebarWinContainer; - struct FrmKey + struct FrameKey { - const SwFrm* mpFrm; + const SwFrame* mpFrame; - explicit FrmKey( const SwFrm* pFrm ) - : mpFrm( pFrm ) + explicit FrameKey( const SwFrame* pFrame ) + : mpFrame( pFrame ) {} - bool operator < ( const FrmKey& rFrmKey ) const + bool operator < ( const FrameKey& rFrameKey ) const { - return mpFrm < rFrmKey.mpFrm; + return mpFrame < rFrameKey.mpFrame; } }; - struct FrmOrder + struct FrameOrder { - bool operator()( const FrmKey& rFrmKeyA, - const FrmKey& rFrmKeyB ) const + bool operator()( const FrameKey& rFrameKeyA, + const FrameKey& rFrameKeyB ) const { - return rFrmKeyA < rFrmKeyB; + return rFrameKeyA < rFrameKeyB; } }; - typedef ::std::map < FrmKey, SidebarWinContainer, FrmOrder > _FrmSidebarWinContainer; + typedef ::std::map < FrameKey, SidebarWinContainer, FrameOrder > _FrameSidebarWinContainer; } namespace sw { namespace sidebarwindows { -class FrmSidebarWinContainer : public _FrmSidebarWinContainer +class FrameSidebarWinContainer : public _FrameSidebarWinContainer { }; -SwFrmSidebarWinContainer::SwFrmSidebarWinContainer() - : mpFrmSidebarWinContainer( new FrmSidebarWinContainer() ) +SwFrameSidebarWinContainer::SwFrameSidebarWinContainer() + : mpFrameSidebarWinContainer( new FrameSidebarWinContainer() ) {} -SwFrmSidebarWinContainer::~SwFrmSidebarWinContainer() +SwFrameSidebarWinContainer::~SwFrameSidebarWinContainer() { - mpFrmSidebarWinContainer->clear(); - delete mpFrmSidebarWinContainer; + mpFrameSidebarWinContainer->clear(); + delete mpFrameSidebarWinContainer; } -bool SwFrmSidebarWinContainer::insert( const SwFrm& rFrm, +bool SwFrameSidebarWinContainer::insert( const SwFrame& rFrame, const SwFormatField& rFormatField, SwSidebarWin& rSidebarWin ) { bool bInserted( false ); - FrmKey aFrmKey( &rFrm ); - SidebarWinContainer& rSidebarWinContainer = (*mpFrmSidebarWinContainer)[ aFrmKey ]; + FrameKey aFrameKey( &rFrame ); + SidebarWinContainer& rSidebarWinContainer = (*mpFrameSidebarWinContainer)[ aFrameKey ]; SidebarWinKey aSidebarWinKey( rFormatField.GetTextField()->GetStart() ); if ( rSidebarWinContainer.empty() || @@ -112,16 +112,16 @@ bool SwFrmSidebarWinContainer::insert( const SwFrm& rFrm, return bInserted; } -bool SwFrmSidebarWinContainer::remove( const SwFrm& rFrm, +bool SwFrameSidebarWinContainer::remove( const SwFrame& rFrame, const SwSidebarWin& rSidebarWin ) { bool bRemoved( false ); - FrmKey aFrmKey( &rFrm ); - FrmSidebarWinContainer::iterator aFrmIter = mpFrmSidebarWinContainer->find( aFrmKey ); - if ( aFrmIter != mpFrmSidebarWinContainer->end() ) + FrameKey aFrameKey( &rFrame ); + FrameSidebarWinContainer::iterator aFrameIter = mpFrameSidebarWinContainer->find( aFrameKey ); + if ( aFrameIter != mpFrameSidebarWinContainer->end() ) { - SidebarWinContainer& rSidebarWinContainer = (*aFrmIter).second; + SidebarWinContainer& rSidebarWinContainer = (*aFrameIter).second; for ( SidebarWinContainer::iterator aIter = rSidebarWinContainer.begin(); aIter != rSidebarWinContainer.end(); ++aIter ) @@ -138,30 +138,30 @@ bool SwFrmSidebarWinContainer::remove( const SwFrm& rFrm, return bRemoved; } -bool SwFrmSidebarWinContainer::empty( const SwFrm& rFrm ) +bool SwFrameSidebarWinContainer::empty( const SwFrame& rFrame ) { bool bEmpty( true ); - FrmKey aFrmKey( &rFrm ); - FrmSidebarWinContainer::iterator aFrmIter = mpFrmSidebarWinContainer->find( aFrmKey ); - if ( aFrmIter != mpFrmSidebarWinContainer->end() ) + FrameKey aFrameKey( &rFrame ); + FrameSidebarWinContainer::iterator aFrameIter = mpFrameSidebarWinContainer->find( aFrameKey ); + if ( aFrameIter != mpFrameSidebarWinContainer->end() ) { - bEmpty = (*aFrmIter).second.empty(); + bEmpty = (*aFrameIter).second.empty(); } return bEmpty; } -SwSidebarWin* SwFrmSidebarWinContainer::get( const SwFrm& rFrm, +SwSidebarWin* SwFrameSidebarWinContainer::get( const SwFrame& rFrame, const sal_Int32 nIndex ) { SwSidebarWin* pRet( nullptr ); - FrmKey aFrmKey( &rFrm ); - FrmSidebarWinContainer::iterator aFrmIter = mpFrmSidebarWinContainer->find( aFrmKey ); - if ( aFrmIter != mpFrmSidebarWinContainer->end() ) + FrameKey aFrameKey( &rFrame ); + FrameSidebarWinContainer::iterator aFrameIter = mpFrameSidebarWinContainer->find( aFrameKey ); + if ( aFrameIter != mpFrameSidebarWinContainer->end() ) { - SidebarWinContainer& rSidebarWinContainer = (*aFrmIter).second; + SidebarWinContainer& rSidebarWinContainer = (*aFrameIter).second; sal_Int32 nCounter( nIndex ); for ( SidebarWinContainer::iterator aIter = rSidebarWinContainer.begin(); nCounter >= 0 && aIter != rSidebarWinContainer.end(); @@ -180,16 +180,16 @@ SwSidebarWin* SwFrmSidebarWinContainer::get( const SwFrm& rFrm, return pRet; } -void SwFrmSidebarWinContainer::getAll( const SwFrm& rFrm, +void SwFrameSidebarWinContainer::getAll( const SwFrame& rFrame, std::vector< vcl::Window* >* pSidebarWins ) { pSidebarWins->clear(); - FrmKey aFrmKey( &rFrm ); - FrmSidebarWinContainer::iterator aFrmIter = mpFrmSidebarWinContainer->find( aFrmKey ); - if ( aFrmIter != mpFrmSidebarWinContainer->end() ) + FrameKey aFrameKey( &rFrame ); + FrameSidebarWinContainer::iterator aFrameIter = mpFrameSidebarWinContainer->find( aFrameKey ); + if ( aFrameIter != mpFrameSidebarWinContainer->end() ) { - SidebarWinContainer& rSidebarWinContainer = (*aFrmIter).second; + SidebarWinContainer& rSidebarWinContainer = (*aFrameIter).second; for ( SidebarWinContainer::iterator aIter = rSidebarWinContainer.begin(); aIter != rSidebarWinContainer.end(); ++aIter ) diff --git a/sw/source/uibase/docvw/frmsidebarwincontainer.hxx b/sw/source/uibase/docvw/frmsidebarwincontainer.hxx index 59aa0df6cebf..77594c969985 100644 --- a/sw/source/uibase/docvw/frmsidebarwincontainer.hxx +++ b/sw/source/uibase/docvw/frmsidebarwincontainer.hxx @@ -22,38 +22,38 @@ #include <sal/types.h> #include <vector> -class SwFrm; +class SwFrame; class SwFormatField; namespace vcl { class Window; } namespace sw { namespace sidebarwindows { class SwSidebarWin; -class FrmSidebarWinContainer; +class FrameSidebarWinContainer; -class SwFrmSidebarWinContainer +class SwFrameSidebarWinContainer { public: - SwFrmSidebarWinContainer(); - ~SwFrmSidebarWinContainer(); + SwFrameSidebarWinContainer(); + ~SwFrameSidebarWinContainer(); - bool insert( const SwFrm& rFrm, + bool insert( const SwFrame& rFrame, const SwFormatField& rFormatField, SwSidebarWin& rSidebarWin ); - bool remove( const SwFrm& rFrm, + bool remove( const SwFrame& rFrame, const SwSidebarWin& rSidebarWin ); - bool empty( const SwFrm& rFrm ); + bool empty( const SwFrame& rFrame ); - SwSidebarWin* get( const SwFrm& rFrm, + SwSidebarWin* get( const SwFrame& rFrame, const sal_Int32 nIndex ); - void getAll( const SwFrm& rFrm, + void getAll( const SwFrame& rFrame, std::vector< vcl::Window* >* pSidebarWins ); private: - FrmSidebarWinContainer* mpFrmSidebarWinContainer; + FrameSidebarWinContainer* mpFrameSidebarWinContainer; }; } } // eof of namespace sw::sidebarwindows:: diff --git a/sw/source/uibase/fldui/fldmgr.cxx b/sw/source/uibase/fldui/fldmgr.cxx index 673cac073f11..1386ba25ef19 100644 --- a/sw/source/uibase/fldui/fldmgr.cxx +++ b/sw/source/uibase/fldui/fldmgr.cxx @@ -237,10 +237,10 @@ bool SwFieldMgr::CanInsertRefMark( const OUString& rStr ) OSL_ENSURE(pSh, "no SwWrtShell found"); if(pSh) { - sal_uInt16 nCnt = pSh->GetCrsrCnt(); + sal_uInt16 nCnt = pSh->GetCursorCnt(); - // the last Crsr doesn't have to be a spanned selection - if( 1 < nCnt && !pSh->SwCrsrShell::HasSelection() ) + // the last Cursor doesn't have to be a spanned selection + if( 1 < nCnt && !pSh->SwCursorShell::HasSelection() ) --nCnt; bRet = 2 > nCnt && nullptr == pSh->GetRefMark( rStr ); @@ -1254,7 +1254,7 @@ bool SwFieldMgr::InsertField( case TYP_FORMELFLD: { - if(pCurShell->GetFrmType(nullptr,false) & FrmTypeFlags::TABLE) + if(pCurShell->GetFrameType(nullptr,false) & FrameTypeFlags::TABLE) { pCurShell->StartAllAction(); diff --git a/sw/source/uibase/frmdlg/colex.cxx b/sw/source/uibase/frmdlg/colex.cxx index 3efc0ca2e1ce..0da911b0ae84 100644 --- a/sw/source/uibase/frmdlg/colex.cxx +++ b/sw/source/uibase/frmdlg/colex.cxx @@ -357,7 +357,7 @@ VCL_BUILDER_FACTORY(SwColExample) SwColumnOnlyExample::SwColumnOnlyExample(vcl::Window* pParent) : Window(pParent) - , m_aFrmSize(1,1) + , m_aFrameSize(1,1) { SetMapMode( MapMode( MAP_TWIP ) ); m_aWinSize = GetOptimalSize(); @@ -368,10 +368,10 @@ SwColumnOnlyExample::SwColumnOnlyExample(vcl::Window* pParent) SetBorderStyle( WindowBorderStyle::MONO ); - m_aFrmSize = SvxPaperInfo::GetPaperSize(PAPER_A4);// DIN A4 - ::FitToActualSize(m_aCols, (sal_uInt16)m_aFrmSize.Width()); + m_aFrameSize = SvxPaperInfo::GetPaperSize(PAPER_A4);// DIN A4 + ::FitToActualSize(m_aCols, (sal_uInt16)m_aFrameSize.Width()); - long nHeight = m_aFrmSize.Height(); + long nHeight = m_aFrameSize.Height(); Fraction aScale( m_aWinSize.Height(), nHeight ); MapMode aMapMode( GetMapMode() ); aMapMode.SetScaleX( aScale ); @@ -398,9 +398,9 @@ void SwColumnOnlyExample::Paint(vcl::RenderContext& rRenderContext, const Rectan rRenderContext.DrawRect(aCompleteRect); rRenderContext.SetLineColor(rFieldTextColor); - Point aTL((aLogSize.Width() - m_aFrmSize.Width()) / 2, - (aLogSize.Height() - m_aFrmSize.Height()) / 2); - Rectangle aRect(aTL, m_aFrmSize); + Point aTL((aLogSize.Width() - m_aFrameSize.Width()) / 2, + (aLogSize.Height() - m_aFrameSize.Height()) / 2); + Rectangle aRect(aTL, m_aFrameSize); //draw a shadow rectangle rRenderContext.SetFillColor(Color(COL_GRAY)); @@ -446,15 +446,15 @@ void SwColumnOnlyExample::Paint(vcl::RenderContext& rRenderContext, const Rectan { rRenderContext.DrawRect(aRect); rRenderContext.SetFillColor(rFieldColor); - Rectangle aFrmRect(aTL, m_aFrmSize); + Rectangle aFrameRect(aTL, m_aFrameSize); long nSum = aTL.X(); for (sal_uInt16 i = 0; i < nColCount; i++) { const SwColumn* pCol = &rCols[i]; - aFrmRect.Left() = nSum + pCol->GetLeft(); //nSum + pCol->GetLeft() + aTL.X(); + aFrameRect.Left() = nSum + pCol->GetLeft(); //nSum + pCol->GetLeft() + aTL.X(); nSum += pCol->GetWishWidth(); - aFrmRect.Right() = nSum - pCol->GetRight(); - rRenderContext.DrawRect(aFrmRect); + aFrameRect.Right() = nSum - pCol->GetRight(); + rRenderContext.DrawRect(aFrameRect); } if (bLines) { @@ -474,7 +474,7 @@ void SwColumnOnlyExample::SetColumns(const SwFormatCol& rCol) { m_aCols = rCol; sal_uInt16 nWishSum = m_aCols.GetWishWidth(); - long nFrmWidth = m_aFrmSize.Width(); + long nFrameWidth = m_aFrameSize.Width(); SwColumns& rCols = m_aCols.GetColumns(); sal_uInt16 nColCount = rCols.size(); @@ -482,15 +482,15 @@ void SwColumnOnlyExample::SetColumns(const SwFormatCol& rCol) { SwColumn* pCol = &rCols[i]; long nWish = pCol->GetWishWidth(); - nWish *= nFrmWidth; + nWish *= nFrameWidth; nWish /= nWishSum; pCol->SetWishWidth((sal_uInt16)nWish); long nLeft = pCol->GetLeft(); - nLeft *= nFrmWidth; + nLeft *= nFrameWidth; nLeft /= nWishSum; pCol->SetLeft((sal_uInt16)nLeft); long nRight = pCol->GetRight(); - nRight *= nFrmWidth; + nRight *= nFrameWidth; nRight /= nWishSum; pCol->SetRight((sal_uInt16)nRight); } diff --git a/sw/source/uibase/frmdlg/colmgr.cxx b/sw/source/uibase/frmdlg/colmgr.cxx index 12773f181ce6..bc47c06e1bef 100644 --- a/sw/source/uibase/frmdlg/colmgr.cxx +++ b/sw/source/uibase/frmdlg/colmgr.cxx @@ -115,7 +115,7 @@ SwColMgr::SwColMgr(const SfxItemSet& rSet, sal_uInt16 nActWidth) : { if(nWidth == USHRT_MAX) { - nWidth = (sal_uInt16)static_cast<const SwFormatFrmSize&>(rSet.Get(RES_FRM_SIZE)).GetWidth(); + nWidth = (sal_uInt16)static_cast<const SwFormatFrameSize&>(rSet.Get(RES_FRM_SIZE)).GetWidth(); if (nWidth < MINLAY) nWidth = USHRT_MAX; const SvxLRSpaceItem &rLR = static_cast<const SvxLRSpaceItem&>(rSet.Get(RES_LR_SPACE)); diff --git a/sw/source/uibase/frmdlg/frmmgr.cxx b/sw/source/uibase/frmdlg/frmmgr.cxx index 8e6cbdd805d2..b6d8ed4f12cb 100644 --- a/sw/source/uibase/frmdlg/frmmgr.cxx +++ b/sw/source/uibase/frmdlg/frmmgr.cxx @@ -45,7 +45,7 @@ using namespace ::com::sun::star; -static sal_uInt16 aFrmMgrRange[] = { +static sal_uInt16 aFrameMgrRange[] = { RES_FRMATR_BEGIN, RES_FRMATR_END-1, //UUUU FillAttribute support @@ -56,15 +56,15 @@ static sal_uInt16 aFrmMgrRange[] = { 0}; // determine frame attributes via Shell -SwFlyFrmAttrMgr::SwFlyFrmAttrMgr( bool bNew, SwWrtShell* pSh, sal_uInt8 nType ) : - m_aSet( static_cast<SwAttrPool&>(pSh->GetAttrPool()), aFrmMgrRange ), +SwFlyFrameAttrMgr::SwFlyFrameAttrMgr( bool bNew, SwWrtShell* pSh, sal_uInt8 nType ) : + m_aSet( static_cast<SwAttrPool&>(pSh->GetAttrPool()), aFrameMgrRange ), m_pOwnSh( pSh ), m_bAbsPos( false ), - m_bNewFrm( bNew ), + m_bNewFrame( bNew ), m_bIsInVertical( false ), m_bIsInVerticalL2R( false ) { - if ( m_bNewFrm ) + if ( m_bNewFrame ) { // set defaults: sal_uInt16 nId = 0; @@ -75,43 +75,43 @@ SwFlyFrmAttrMgr::SwFlyFrmAttrMgr( bool bNew, SwWrtShell* pSh, sal_uInt8 nType ) case FRMMGR_TYPE_GRF: nId = RES_POOLFRM_GRAPHIC; break; } m_aSet.SetParent( &m_pOwnSh->GetFormatFromPool( nId )->GetAttrSet()); - m_aSet.Put( SwFormatFrmSize( ATT_MIN_SIZE, DFLT_WIDTH, DFLT_HEIGHT )); + m_aSet.Put( SwFormatFrameSize( ATT_MIN_SIZE, DFLT_WIDTH, DFLT_HEIGHT )); if ( 0 != ::GetHtmlMode(pSh->GetView().GetDocShell()) ) m_aSet.Put( SwFormatHoriOrient( 0, text::HoriOrientation::LEFT, text::RelOrientation::PRINT_AREA ) ); } else if ( nType == FRMMGR_TYPE_NONE ) { - m_pOwnSh->GetFlyFrmAttr( m_aSet ); + m_pOwnSh->GetFlyFrameAttr( m_aSet ); bool bRightToLeft; - m_bIsInVertical = m_pOwnSh->IsFrmVertical(true, bRightToLeft, m_bIsInVerticalL2R); + m_bIsInVertical = m_pOwnSh->IsFrameVertical(true, bRightToLeft, m_bIsInVerticalL2R); } ::PrepareBoxInfo( m_aSet, *m_pOwnSh ); } -SwFlyFrmAttrMgr::SwFlyFrmAttrMgr( bool bNew, SwWrtShell* pSh, const SfxItemSet &rSet ) : +SwFlyFrameAttrMgr::SwFlyFrameAttrMgr( bool bNew, SwWrtShell* pSh, const SfxItemSet &rSet ) : m_aSet( rSet ), m_pOwnSh( pSh ), m_bAbsPos( false ), - m_bNewFrm( bNew ), + m_bNewFrame( bNew ), m_bIsInVertical(false), m_bIsInVerticalL2R(false) { if(!bNew) { bool bRightToLeft; - m_bIsInVertical = pSh->IsFrmVertical(true, bRightToLeft, m_bIsInVerticalL2R); + m_bIsInVertical = pSh->IsFrameVertical(true, bRightToLeft, m_bIsInVerticalL2R); } } // Initialise -void SwFlyFrmAttrMgr::UpdateAttrMgr() +void SwFlyFrameAttrMgr::UpdateAttrMgr() { - if ( !m_bNewFrm && m_pOwnSh->IsFrmSelected() ) - m_pOwnSh->GetFlyFrmAttr( m_aSet ); + if ( !m_bNewFrame && m_pOwnSh->IsFrameSelected() ) + m_pOwnSh->GetFlyFrameAttr( m_aSet ); ::PrepareBoxInfo( m_aSet, *m_pOwnSh ); } -void SwFlyFrmAttrMgr::_UpdateFlyFrm() +void SwFlyFrameAttrMgr::_UpdateFlyFrame() { const SfxPoolItem* pItem = nullptr; @@ -128,19 +128,19 @@ void SwFlyFrmAttrMgr::_UpdateFlyFrm() } // change existing Fly-Frame -void SwFlyFrmAttrMgr::UpdateFlyFrm() +void SwFlyFrameAttrMgr::UpdateFlyFrame() { - OSL_ENSURE( m_pOwnSh->IsFrmSelected(), + OSL_ENSURE( m_pOwnSh->IsFrameSelected(), "no frame selected or no shell, update not possible"); - if( m_pOwnSh->IsFrmSelected() ) + if( m_pOwnSh->IsFrameSelected() ) { //JP 6.8.2001: set never an invalid anchor into the core. const SfxPoolItem *pGItem, *pItem; if( SfxItemState::SET == m_aSet.GetItemState( RES_ANCHOR, false, &pItem )) { SfxItemSet aGetSet( *m_aSet.GetPool(), RES_ANCHOR, RES_ANCHOR ); - if( m_pOwnSh->GetFlyFrmAttr( aGetSet ) && 1 == aGetSet.Count() && + if( m_pOwnSh->GetFlyFrameAttr( aGetSet ) && 1 == aGetSet.Count() && SfxItemState::SET == aGetSet.GetItemState( RES_ANCHOR, false, &pGItem ) && static_cast<const SwFormatAnchor*>(pGItem)->GetAnchorId() == static_cast<const SwFormatAnchor*>(pItem)->GetAnchorId() ) @@ -151,25 +151,25 @@ void SwFlyFrmAttrMgr::UpdateFlyFrm() if( m_aSet.Count() ) { m_pOwnSh->StartAllAction(); - m_pOwnSh->SetFlyFrmAttr( m_aSet ); - _UpdateFlyFrm(); + m_pOwnSh->SetFlyFrameAttr( m_aSet ); + _UpdateFlyFrame(); m_pOwnSh->EndAllAction(); } } } // insert frame -bool SwFlyFrmAttrMgr::InsertFlyFrm() +bool SwFlyFrameAttrMgr::InsertFlyFrame() { m_pOwnSh->StartAllAction(); - bool bRet = nullptr != m_pOwnSh->NewFlyFrm( m_aSet ); + bool bRet = nullptr != m_pOwnSh->NewFlyFrame( m_aSet ); // turn on the right mode at the shell, frame got selected automatically. if ( bRet ) { - _UpdateFlyFrm(); - m_pOwnSh->EnterSelFrmMode(); + _UpdateFlyFrame(); + m_pOwnSh->EnterSelFrameMode(); FrameNotify(m_pOwnSh, FLY_DRAG_START); } m_pOwnSh->EndAllAction(); @@ -178,7 +178,7 @@ bool SwFlyFrmAttrMgr::InsertFlyFrm() // Insert frames of type eAnchorType. Position and size are being set explicitly. // Not-allowed values of the enumeration type get corrected. -void SwFlyFrmAttrMgr::InsertFlyFrm(RndStdIds eAnchorType, +void SwFlyFrameAttrMgr::InsertFlyFrame(RndStdIds eAnchorType, const Point &rPos, const Size &rSize, bool bAbs ) @@ -196,11 +196,11 @@ void SwFlyFrmAttrMgr::InsertFlyFrm(RndStdIds eAnchorType, SetSize( rSize ); SetAnchor( eAnchorType ); - InsertFlyFrm(); + InsertFlyFrame(); } // set anchor -void SwFlyFrmAttrMgr::SetAnchor( RndStdIds eId ) +void SwFlyFrameAttrMgr::SetAnchor( RndStdIds eId ) { sal_uInt16 nPhyPageNum, nVirtPageNum; m_pOwnSh->GetPageNum( nPhyPageNum, nVirtPageNum ); @@ -219,13 +219,13 @@ void SwFlyFrmAttrMgr::SetAnchor( RndStdIds eId ) } // set the attribute for columns -void SwFlyFrmAttrMgr::SetCol( const SwFormatCol &rCol ) +void SwFlyFrameAttrMgr::SetCol( const SwFormatCol &rCol ) { m_aSet.Put( rCol ); } // set absolute position -void SwFlyFrmAttrMgr::SetAbsPos( const Point& rPoint ) +void SwFlyFrameAttrMgr::SetAbsPos( const Point& rPoint ) { m_bAbsPos = true; m_aAbsPos = rPoint; @@ -238,7 +238,7 @@ void SwFlyFrmAttrMgr::SetAbsPos( const Point& rPoint ) } // check metrics for correctness -void SwFlyFrmAttrMgr::ValidateMetrics( SvxSwFrameValidation& rVal, +void SwFlyFrameAttrMgr::ValidateMetrics( SvxSwFrameValidation& rVal, const SwPosition* pToCharContentPos, bool bOnlyPercentRefValue ) { @@ -253,7 +253,7 @@ void SwFlyFrmAttrMgr::ValidateMetrics( SvxSwFrameValidation& rVal, // OD 18.09.2003 #i18732# - adjustment for allowing vertical position // aligned to page for fly frame anchored to paragraph or to character. const RndStdIds eAnchorType = static_cast<RndStdIds >(rVal.nAnchorType); - const SwFormatFrmSize& rSize = static_cast<const SwFormatFrmSize&>(m_aSet.Get(RES_FRM_SIZE)); + const SwFormatFrameSize& rSize = static_cast<const SwFormatFrameSize&>(m_aSet.Get(RES_FRM_SIZE)); m_pOwnSh->CalcBoundRect( aBoundRect, eAnchorType, rVal.nHRelOrient, rVal.nVRelOrient, @@ -479,28 +479,28 @@ void SwFlyFrmAttrMgr::ValidateMetrics( SvxSwFrameValidation& rVal, } // correction for border -SwTwips SwFlyFrmAttrMgr::CalcTopSpace() +SwTwips SwFlyFrameAttrMgr::CalcTopSpace() { const SvxShadowItem& rShadow = GetShadow(); const SvxBoxItem& rBox = GetBox(); return rShadow.CalcShadowSpace(SvxShadowItemSide::TOP ) + rBox.CalcLineSpace(SvxBoxItemLine::TOP); } -SwTwips SwFlyFrmAttrMgr::CalcBottomSpace() +SwTwips SwFlyFrameAttrMgr::CalcBottomSpace() { const SvxShadowItem& rShadow = GetShadow(); const SvxBoxItem& rBox = GetBox(); return rShadow.CalcShadowSpace(SvxShadowItemSide::BOTTOM) + rBox.CalcLineSpace(SvxBoxItemLine::BOTTOM); } -SwTwips SwFlyFrmAttrMgr::CalcLeftSpace() +SwTwips SwFlyFrameAttrMgr::CalcLeftSpace() { const SvxShadowItem& rShadow = GetShadow(); const SvxBoxItem& rBox = GetBox(); return rShadow.CalcShadowSpace(SvxShadowItemSide::LEFT) + rBox.CalcLineSpace(SvxBoxItemLine::LEFT); } -SwTwips SwFlyFrmAttrMgr::CalcRightSpace() +SwTwips SwFlyFrameAttrMgr::CalcRightSpace() { const SvxShadowItem& rShadow = GetShadow(); const SvxBoxItem& rBox = GetBox(); @@ -508,12 +508,12 @@ SwTwips SwFlyFrmAttrMgr::CalcRightSpace() } // erase attribute from the set -void SwFlyFrmAttrMgr::DelAttr( sal_uInt16 nId ) +void SwFlyFrameAttrMgr::DelAttr( sal_uInt16 nId ) { m_aSet.ClearItem( nId ); } -void SwFlyFrmAttrMgr::SetLRSpace( long nLeft, long nRight ) +void SwFlyFrameAttrMgr::SetLRSpace( long nLeft, long nRight ) { OSL_ENSURE( LONG_MAX != nLeft && LONG_MAX != nRight, "Welchen Raend setzen?" ); @@ -525,7 +525,7 @@ void SwFlyFrmAttrMgr::SetLRSpace( long nLeft, long nRight ) m_aSet.Put( aTmp ); } -void SwFlyFrmAttrMgr::SetULSpace( long nTop, long nBottom ) +void SwFlyFrameAttrMgr::SetULSpace( long nTop, long nBottom ) { OSL_ENSURE(LONG_MAX != nTop && LONG_MAX != nBottom, "Welchen Raend setzen?" ); @@ -537,7 +537,7 @@ void SwFlyFrmAttrMgr::SetULSpace( long nTop, long nBottom ) m_aSet.Put( aTmp ); } -void SwFlyFrmAttrMgr::SetPos( const Point& rPoint ) +void SwFlyFrameAttrMgr::SetPos( const Point& rPoint ) { SwFormatVertOrient aVertOrient( GetVertOrient() ); SwFormatHoriOrient aHoriOrient( GetHoriOrient() ); @@ -552,35 +552,35 @@ void SwFlyFrmAttrMgr::SetPos( const Point& rPoint ) m_aSet.Put( aHoriOrient ); } -void SwFlyFrmAttrMgr::SetHorzOrientation( sal_Int16 eOrient ) +void SwFlyFrameAttrMgr::SetHorzOrientation( sal_Int16 eOrient ) { SwFormatHoriOrient aHoriOrient( GetHoriOrient() ); aHoriOrient.SetHoriOrient( eOrient ); m_aSet.Put( aHoriOrient ); } -void SwFlyFrmAttrMgr::SetVertOrientation( sal_Int16 eOrient ) +void SwFlyFrameAttrMgr::SetVertOrientation( sal_Int16 eOrient ) { SwFormatVertOrient aVertOrient( GetVertOrient() ); aVertOrient.SetVertOrient( eOrient ); m_aSet.Put( aVertOrient ); } -void SwFlyFrmAttrMgr::SetHeightSizeType( SwFrmSize eType ) +void SwFlyFrameAttrMgr::SetHeightSizeType( SwFrameSize eType ) { - SwFormatFrmSize aSize( GetFrmSize() ); + SwFormatFrameSize aSize( GetFrameSize() ); aSize.SetHeightSizeType( eType ); m_aSet.Put( aSize ); } -void SwFlyFrmAttrMgr::SetSize( const Size& rSize ) +void SwFlyFrameAttrMgr::SetSize( const Size& rSize ) { - SwFormatFrmSize aSize( GetFrmSize() ); + SwFormatFrameSize aSize( GetFrameSize() ); aSize.SetSize(Size(std::max(rSize.Width(), long(MINFLY)), std::max(rSize.Height(), long(MINFLY)))); m_aSet.Put( aSize ); } -void SwFlyFrmAttrMgr::SetAttrSet(const SfxItemSet& rSet) +void SwFlyFrameAttrMgr::SetAttrSet(const SfxItemSet& rSet) { m_aSet.ClearItem(); m_aSet.Put( rSet ); diff --git a/sw/source/uibase/inc/FrameControl.hxx b/sw/source/uibase/inc/FrameControl.hxx index 789345253c14..0f47498307b6 100644 --- a/sw/source/uibase/inc/FrameControl.hxx +++ b/sw/source/uibase/inc/FrameControl.hxx @@ -10,8 +10,8 @@ #define INCLUDED_SW_SOURCE_UIBASE_INC_FRAMECONTROL_HXX class SwEditWin; -class SwPageFrm; -class SwFrm; +class SwPageFrame; +class SwFrame; class Point; /// Abstract interface to be implemented by writer FrameControls @@ -25,7 +25,7 @@ public: /// Returns true if the point is inside the control. virtual bool Contains( const Point &rDocPt ) const = 0; - virtual const SwFrm* GetFrame() = 0; + virtual const SwFrame* GetFrame() = 0; virtual SwEditWin* GetEditWin() = 0; }; @@ -51,18 +51,18 @@ public: class SwFrameMenuButtonBase : public MenuButton, public ISwFrameControl { VclPtr<SwEditWin> m_pEditWin; - const SwFrm* m_pFrm; + const SwFrame* m_pFrame; protected: virtual ~SwFrameMenuButtonBase() { disposeOnce(); } virtual void dispose() override; public: - SwFrameMenuButtonBase( SwEditWin* pEditWin, const SwFrm* pFrm ); + SwFrameMenuButtonBase( SwEditWin* pEditWin, const SwFrame* pFrame ); - virtual const SwFrm* GetFrame() override { return m_pFrm; } + virtual const SwFrame* GetFrame() override { return m_pFrame; } virtual SwEditWin* GetEditWin() override { return m_pEditWin; } - const SwPageFrm* GetPageFrame(); + const SwPageFrame* GetPageFrame(); }; #endif diff --git a/sw/source/uibase/inc/FrameControlsManager.hxx b/sw/source/uibase/inc/FrameControlsManager.hxx index 0d9c726955c8..6f0c45f70bab 100644 --- a/sw/source/uibase/inc/FrameControlsManager.hxx +++ b/sw/source/uibase/inc/FrameControlsManager.hxx @@ -18,12 +18,12 @@ #include <memory> #include <vector> -class SwPageFrm; +class SwPageFrame; class SwEditWin; typedef std::shared_ptr< SwFrameControl > SwFrameControlPtr; -typedef std::map<const SwFrm*, SwFrameControlPtr> SwFrameControlPtrMap; +typedef std::map<const SwFrame*, SwFrameControlPtr> SwFrameControlPtrMap; /** A container for the Header/Footer, or PageBreak controls. */ @@ -41,15 +41,15 @@ class SwFrameControlsManager SwFrameControlsManager( const SwFrameControlsManager& rCopy ); const SwFrameControlsManager& operator=( const SwFrameControlsManager& rCopy ); - SwFrameControlPtr GetControl( FrameControlType eType, const SwFrm* pFrm ); - void RemoveControls( const SwFrm* pFrm ); - void RemoveControlsByType( FrameControlType eType, const SwFrm* pFrm ); + SwFrameControlPtr GetControl( FrameControlType eType, const SwFrame* pFrame ); + void RemoveControls( const SwFrame* pFrame ); + void RemoveControlsByType( FrameControlType eType, const SwFrame* pFrame ); void HideControls( FrameControlType eType ); void SetReadonlyControls( bool bReadonly ); // Helper methods - void SetHeaderFooterControl( const SwPageFrm* pPageFrm, FrameControlType eType, Point aOffset ); - void SetPageBreakControl( const SwPageFrm* pPageFrm ); + void SetHeaderFooterControl( const SwPageFrame* pPageFrame, FrameControlType eType, Point aOffset ); + void SetPageBreakControl( const SwPageFrame* pPageFrame ); }; #endif diff --git a/sw/source/uibase/inc/HeaderFooterWin.hxx b/sw/source/uibase/inc/HeaderFooterWin.hxx index b110421a6d38..ec0980bfaeb0 100644 --- a/sw/source/uibase/inc/HeaderFooterWin.hxx +++ b/sw/source/uibase/inc/HeaderFooterWin.hxx @@ -29,7 +29,7 @@ class SwHeaderFooterWin : public SwFrameMenuButtonBase Timer m_aFadeTimer; public: - SwHeaderFooterWin( SwEditWin *pEditWin, const SwFrm *pFrm, bool bHeader ); + SwHeaderFooterWin( SwEditWin *pEditWin, const SwFrame *pFrame, bool bHeader ); virtual ~SwHeaderFooterWin( ); virtual void dispose() override; diff --git a/sw/source/uibase/inc/PageBreakWin.hxx b/sw/source/uibase/inc/PageBreakWin.hxx index 2302966cb991..6ee987f3e333 100644 --- a/sw/source/uibase/inc/PageBreakWin.hxx +++ b/sw/source/uibase/inc/PageBreakWin.hxx @@ -13,7 +13,7 @@ #include <vcl/menubtn.hxx> -class SwPageFrm; +class SwPageFrame; /** Class for the page break control window. @@ -33,7 +33,7 @@ class SwPageBreakWin : public SwFrameMenuButtonBase const Point* m_pMousePt; public: - SwPageBreakWin( SwEditWin* pEditWin, const SwFrm *pFrm ); + SwPageBreakWin( SwEditWin* pEditWin, const SwFrame *pFrame ); virtual ~SwPageBreakWin(); virtual void dispose() override; diff --git a/sw/source/uibase/inc/basesh.hxx b/sw/source/uibase/inc/basesh.hxx index b730c04e45bf..d24a57b5568d 100644 --- a/sw/source/uibase/inc/basesh.hxx +++ b/sw/source/uibase/inc/basesh.hxx @@ -33,7 +33,7 @@ class SwWrtShell; class SwView; class SfxItemSet; -class SwCrsrShell; +class SwCursorShell; struct DBTextStruct_Impl; class SwBaseShell: public SfxShell @@ -50,7 +50,7 @@ class SwBaseShell: public SfxShell // Update-Timer for graphic std::set<sal_uInt16> aGrfUpdateSlots; - DECL_LINK_TYPED( GraphicArrivedHdl, SwCrsrShell&, void ); + DECL_LINK_TYPED( GraphicArrivedHdl, SwCursorShell&, void ); protected: SwWrtShell& GetShell(); @@ -109,9 +109,9 @@ public: void ExecField(SfxRequest& rReq); - static void SetFrmMode( FlyMode eMode, SwWrtShell *pShell ); // with update! - static void _SetFrmMode( FlyMode eMode ) { eFrameMode = eMode; } - static FlyMode GetFrmMode() { return eFrameMode; } + static void SetFrameMode( FlyMode eMode, SwWrtShell *pShell ); // with update! + static void _SetFrameMode( FlyMode eMode ) { eFrameMode = eMode; } + static FlyMode GetFrameMode() { return eFrameMode; } }; #endif diff --git a/sw/source/uibase/inc/cfgitems.hxx b/sw/source/uibase/inc/cfgitems.hxx index 2677f98bf355..41be1655e2d0 100644 --- a/sw/source/uibase/inc/cfgitems.hxx +++ b/sw/source/uibase/inc/cfgitems.hxx @@ -35,13 +35,13 @@ class SfxPrinter; class SwViewShell; class SwViewOption; class SwContentOptPage; -class SwShdwCrsrOptionsTabPage; +class SwShdwCursorOptionsTabPage; // OS 12.01.95 // Item for settings dialog - document view class SW_DLLPUBLIC SwDocDisplayItem : public SfxPoolItem { - friend class SwShdwCrsrOptionsTabPage; + friend class SwShdwCursorOptionsTabPage; friend class SwModule; bool bParagraphEnd :1; diff --git a/sw/source/uibase/inc/chrdlg.hxx b/sw/source/uibase/inc/chrdlg.hxx index cc6199355338..dbe87433b4f2 100644 --- a/sw/source/uibase/inc/chrdlg.hxx +++ b/sw/source/uibase/inc/chrdlg.hxx @@ -63,7 +63,7 @@ class SwCharURLPage : public SfxTabPage VclPtr<FixedText> m_pTextFT; VclPtr<Edit> m_pTextED; VclPtr<Edit> m_pNameED; - VclPtr<ComboBox> m_pTargetFrmLB; + VclPtr<ComboBox> m_pTargetFrameLB; VclPtr<PushButton> m_pURLPB; VclPtr<PushButton> m_pEventPB; VclPtr<ListBox> m_pVisitedLB; diff --git a/sw/source/uibase/inc/colex.hxx b/sw/source/uibase/inc/colex.hxx index 76c5ee383af5..529c682add4f 100644 --- a/sw/source/uibase/inc/colex.hxx +++ b/sw/source/uibase/inc/colex.hxx @@ -95,7 +95,7 @@ class SW_DLLPUBLIC SwColumnOnlyExample : public vcl::Window private: Size m_aWinSize; - Size m_aFrmSize; + Size m_aFrameSize; SwFormatCol m_aCols; protected: diff --git a/sw/source/uibase/inc/column.hxx b/sw/source/uibase/inc/column.hxx index d956356ba852..79e5939cbaa8 100644 --- a/sw/source/uibase/inc/column.hxx +++ b/sw/source/uibase/inc/column.hxx @@ -120,7 +120,7 @@ class SwColumnPage : public SfxTabPage // Example VclPtr<SwColExample> m_pPgeExampleWN; - VclPtr<SwColumnOnlyExample> m_pFrmExampleWN; + VclPtr<SwColumnOnlyExample> m_pFrameExampleWN; SwColMgr* pColMgr; @@ -134,7 +134,7 @@ class SwColumnPage : public SfxTabPage std::map<VclPtr<MetricField>, PercentField*> m_aPercentFieldsMap; bool bFormat; - bool bFrm; + bool bFrame; bool bHtmlMode; bool bLockUpdate; @@ -181,7 +181,7 @@ public: virtual bool FillItemSet(SfxItemSet *rSet) override; virtual void Reset(const SfxItemSet *rSet) override; - void SetFrmMode(bool bMod); + void SetFrameMode(bool bMod); void SetPageWidth(long nPageWidth); void SetFormatUsed(bool bFormatUsed) diff --git a/sw/source/uibase/inc/edtwin.hxx b/sw/source/uibase/inc/edtwin.hxx index 56cc43888832..41db7bff8f97 100644 --- a/sw/source/uibase/inc/edtwin.hxx +++ b/sw/source/uibase/inc/edtwin.hxx @@ -102,7 +102,7 @@ friend void PageNumNotify( SwViewShell* pVwSh, SdrDropMarkerOverlay *m_pUserMarker; SdrObject *m_pUserMarkerObj; - SwShadowCursor *m_pShadCrsr; + SwShadowCursor *m_pShadCursor; Point *m_pRowColumnSelectionStart; // save position where table row/column selection has been started SwView &m_rView; @@ -114,11 +114,11 @@ friend void PageNumNotify( SwViewShell* pVwSh, SotExchangeDest m_nDropDestination; // destination from the last QueryDrop sal_uInt16 m_eBezierMode; - sal_uInt16 m_nInsFrmColCount; // column number for interactive frame + sal_uInt16 m_nInsFrameColCount; // column number for interactive frame SdrObjKind m_eDrawMode; bool m_bMBPressed : 1, m_bInsDraw : 1, - m_bInsFrm : 1, + m_bInsFrame : 1, m_bIsInMove : 1, m_bIsInDrag : 1, // don't execute StartExecuteDrag twice m_bOldIdle : 1, // to stop to idle @@ -126,7 +126,7 @@ friend void PageNumNotify( SwViewShell* pVwSh, m_bTableInsDelMode : 1, m_bTableIsInsMode : 1, m_bChainMode : 1, // connect frames - m_bWasShdwCrsr : 1, // ShadowCrsr was on in MouseButtonDown + m_bWasShdwCursor : 1, // ShadowCursor was on in MouseButtonDown m_bLockInput : 1, // lock while calc panel is active m_bIsRowDrag : 1, //selection of rows is used, in combination with m_pRowColumnSelectionStart /** #i42732# display status of font size/name depending on either the input language or the @@ -230,19 +230,19 @@ public: inline void SetSdrDrawMode( SdrObjKind eSdrObjectKind ) { m_eDrawMode = eSdrObjectKind; SetObjectSelect( false ); } void StdDrawMode( SdrObjKind eSdrObjectKind, bool bObjSelect ); - bool IsFrmAction() const { return m_bInsFrm; } + bool IsFrameAction() const { return m_bInsFrame; } sal_uInt16 GetBezierMode() const { return m_eBezierMode; } void SetBezierMode(sal_uInt16 eBezMode) { m_eBezierMode = eBezMode; } void EnterDrawTextMode(const Point& aDocPos); // turn on DrawTextEditMode - void InsFrm(sal_uInt16 nCols); - void StopInsFrm(); - sal_uInt16 GetFrmColCount() const {return m_nInsFrmColCount;} // column number for interactive frame + void InsFrame(sal_uInt16 nCols); + void StopInsFrame(); + sal_uInt16 GetFrameColCount() const {return m_nInsFrameColCount;} // column number for interactive frame void SetChainMode( bool bOn ); bool IsChainMode() const { return m_bChainMode; } void FlushInBuffer(); - static bool IsInputSequenceCheckingRequired( const OUString &rText, const SwPaM& rCrsr ); + static bool IsInputSequenceCheckingRequired( const OUString &rText, const SwPaM& rCursor ); void SetApplyTemplate(const SwApplyTemplate &); SwApplyTemplate* GetApplyTemplate() const { return m_pApplyTempl; } diff --git a/sw/source/uibase/inc/frmdlg.hxx b/sw/source/uibase/inc/frmdlg.hxx index 387ba8853498..418bdcdcc4a9 100644 --- a/sw/source/uibase/inc/frmdlg.hxx +++ b/sw/source/uibase/inc/frmdlg.hxx @@ -25,7 +25,7 @@ class SwWrtShell; // frame dialog -class SwFrmDlg : public SfxTabDialog +class SwFrameDlg : public SfxTabDialog { bool m_bFormat; bool m_bNew; @@ -50,15 +50,15 @@ class SwFrmDlg : public SfxTabDialog virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) override; public: - SwFrmDlg( SfxViewFrame *pFrame, vcl::Window *pParent, + SwFrameDlg( SfxViewFrame *pFrame, vcl::Window *pParent, const SfxItemSet& rCoreSet, - bool bNewFrm = false, + bool bNewFrame = false, const OUString& sResType = OUString("FrameDialog"), bool bFormat = false, const OString& sDefPage = OString(), const OUString* pFormatStr = nullptr); - virtual ~SwFrmDlg(); + virtual ~SwFrameDlg(); SwWrtShell* GetWrtShell() { return m_pWrtShell; } }; diff --git a/sw/source/uibase/inc/frmmgr.hxx b/sw/source/uibase/inc/frmmgr.hxx index 6ee012fd3727..4093edc8bdd1 100644 --- a/sw/source/uibase/inc/frmmgr.hxx +++ b/sw/source/uibase/inc/frmmgr.hxx @@ -45,14 +45,14 @@ const SwTwips DFLT_HEIGHT = MM50; #define FRMMGR_TYPE_OLE 0x04 #define FRMMGR_TYPE_ENVELP 0x10 -class SW_DLLPUBLIC SwFlyFrmAttrMgr +class SW_DLLPUBLIC SwFlyFrameAttrMgr { SfxItemSet m_aSet; Point m_aAbsPos; SwWrtShell* m_pOwnSh; bool m_bAbsPos, - m_bNewFrm; + m_bNewFrame; bool m_bIsInVertical; // --> OD 2009-09-01 #mongolianlayout# bool m_bIsInVerticalL2R; @@ -63,13 +63,13 @@ class SW_DLLPUBLIC SwFlyFrmAttrMgr SAL_DLLPRIVATE SwTwips CalcLeftSpace(); SAL_DLLPRIVATE SwTwips CalcRightSpace(); - SAL_DLLPRIVATE void _UpdateFlyFrm(); // post-treatment after insert or update + SAL_DLLPRIVATE void _UpdateFlyFrame(); // post-treatment after insert or update public: - SwFlyFrmAttrMgr( bool bNew, SwWrtShell* pSh, sal_uInt8 nType ); + SwFlyFrameAttrMgr( bool bNew, SwWrtShell* pSh, sal_uInt8 nType ); //CopyCtor for dialogs to check the metrics - SwFlyFrmAttrMgr( bool bNew, SwWrtShell *pSh, const SfxItemSet &rSet ); + SwFlyFrameAttrMgr( bool bNew, SwWrtShell *pSh, const SfxItemSet &rSet ); void SetAnchor(RndStdIds eId); inline RndStdIds GetAnchor() const; @@ -88,7 +88,7 @@ public: void SetSize(const Size& rLSize); inline const Size& GetSize() const; - void SetHeightSizeType(SwFrmSize eType); + void SetHeightSizeType(SwFrameSize eType); // space to content void SetLRSpace( long nLeft = LONG_MAX, @@ -100,11 +100,11 @@ public: // change and query attributes void UpdateAttrMgr(); - void UpdateFlyFrm(); + void UpdateFlyFrame(); // create new frame - bool InsertFlyFrm(); - void InsertFlyFrm(RndStdIds eAnchorType, + bool InsertFlyFrame(); + void InsertFlyFrame(RndStdIds eAnchorType, const Point &rPos, const Size &rSize, bool bAbsPos = false); @@ -125,42 +125,42 @@ public: inline const SwFormatHoriOrient &GetHoriOrient() const; inline const SvxShadowItem &GetShadow() const; inline const SvxBoxItem &GetBox() const; - inline const SwFormatFrmSize &GetFrmSize() const; + inline const SwFormatFrameSize &GetFrameSize() const; long CalcWidthBorder() { return CalcLeftSpace()+CalcRightSpace(); } long CalcHeightBorder() { return CalcTopSpace()+CalcBottomSpace(); } }; -inline const Size& SwFlyFrmAttrMgr::GetSize() const +inline const Size& SwFlyFrameAttrMgr::GetSize() const { - return static_cast<const SwFormatFrmSize&>(m_aSet.Get(RES_FRM_SIZE)).GetSize(); + return static_cast<const SwFormatFrameSize&>(m_aSet.Get(RES_FRM_SIZE)).GetSize(); } -inline const SwFormatVertOrient &SwFlyFrmAttrMgr::GetVertOrient() const +inline const SwFormatVertOrient &SwFlyFrameAttrMgr::GetVertOrient() const { return static_cast<const SwFormatVertOrient&>(m_aSet.Get(RES_VERT_ORIENT)); } -inline const SwFormatHoriOrient &SwFlyFrmAttrMgr::GetHoriOrient() const +inline const SwFormatHoriOrient &SwFlyFrameAttrMgr::GetHoriOrient() const { return static_cast<const SwFormatHoriOrient &>(m_aSet.Get(RES_HORI_ORIENT)); } -inline const SwFormatFrmSize& SwFlyFrmAttrMgr::GetFrmSize() const +inline const SwFormatFrameSize& SwFlyFrameAttrMgr::GetFrameSize() const { - return static_cast<const SwFormatFrmSize&>(m_aSet.Get(RES_FRM_SIZE)); + return static_cast<const SwFormatFrameSize&>(m_aSet.Get(RES_FRM_SIZE)); } -inline const SvxShadowItem &SwFlyFrmAttrMgr::GetShadow() const +inline const SvxShadowItem &SwFlyFrameAttrMgr::GetShadow() const { return static_cast<const SvxShadowItem&>(m_aSet.Get(RES_SHADOW)); } -inline const SvxBoxItem &SwFlyFrmAttrMgr::GetBox() const +inline const SvxBoxItem &SwFlyFrameAttrMgr::GetBox() const { return static_cast<const SvxBoxItem&>(m_aSet.Get(RES_BOX)); } -inline Point SwFlyFrmAttrMgr::GetPos() const +inline Point SwFlyFrameAttrMgr::GetPos() const { return Point( GetHoriOrient().GetPos(), GetVertOrient().GetPos() ); } -inline RndStdIds SwFlyFrmAttrMgr::GetAnchor() const +inline RndStdIds SwFlyFrameAttrMgr::GetAnchor() const { return static_cast<const SwFormatAnchor&>(m_aSet.Get(RES_ANCHOR)).GetAnchorId(); } diff --git a/sw/source/uibase/inc/frmpage.hxx b/sw/source/uibase/inc/frmpage.hxx index 27ab4f4d5744..1a0594d8abc3 100644 --- a/sw/source/uibase/inc/frmpage.hxx +++ b/sw/source/uibase/inc/frmpage.hxx @@ -34,12 +34,12 @@ namespace sfx2{class FileDialogHelper;} class SwWrtShell; -struct FrmMap; +struct FrameMap; // OD 12.11.2003 #i22341# struct SwPosition; // frame dialog -class SwFrmPage: public SfxTabPage +class SwFramePage: public SfxTabPage { // size VclPtr<FixedText> m_pWidthFT; @@ -120,8 +120,8 @@ class SwFrmPage: public SfxTabPage sal_Int16 m_nOldV; sal_Int16 m_nOldVRel; - FrmMap* m_pVMap; - FrmMap* m_pHMap; + FrameMap* m_pVMap; + FrameMap* m_pHMap; bool m_bAllowVertPositioning; bool m_bIsMathOLE; @@ -154,29 +154,29 @@ class SwFrmPage: public SfxTabPage void Init(const SfxItemSet& rSet, bool bReset = false); // OD 12.11.2003 #i22341# - adjustment to handle maps, that are ambigous // in the alignment. - sal_Int32 FillPosLB( const FrmMap* _pMap, + sal_Int32 FillPosLB( const FrameMap* _pMap, const sal_Int16 _nAlign, const sal_Int16 _nRel, ListBox& _rLB ); // OD 14.11.2003 #i22341# - adjustment to handle maps, that are ambigous // in their string entries. - sal_uLong FillRelLB( const FrmMap* _pMap, + sal_uLong FillRelLB( const FrameMap* _pMap, const sal_uInt16 _nLBSelPos, const sal_Int16 _nAlign, const sal_Int16 _nRel, ListBox& _rLB, FixedText& _rFT ); - sal_Int32 GetMapPos( const FrmMap *pMap, ListBox &rAlignLB ); - static sal_Int16 GetAlignment(FrmMap *pMap, sal_Int32 nMapPos, ListBox &rAlignLB, ListBox &rRelationLB); - static sal_Int16 GetRelation(FrmMap *pMap, ListBox &rRelationLB); + sal_Int32 GetMapPos( const FrameMap *pMap, ListBox &rAlignLB ); + static sal_Int16 GetAlignment(FrameMap *pMap, sal_Int32 nMapPos, ListBox &rAlignLB, ListBox &rRelationLB); + static sal_Int16 GetRelation(FrameMap *pMap, ListBox &rRelationLB); RndStdIds GetAnchor(); - void setOptimalFrmWidth(); + void setOptimalFrameWidth(); void setOptimalRelWidth(); void EnableGraficMode(); // hides auto check boxes and re-org controls for "Real Size" button - SwWrtShell *getFrmDlgParentShell(); + SwWrtShell *getFrameDlgParentShell(); using SfxTabPage::ActivatePage; using SfxTabPage::DeactivatePage; @@ -184,8 +184,8 @@ class SwFrmPage: public SfxTabPage static const sal_uInt16 aPageRg[]; public: - SwFrmPage(vcl::Window *pParent, const SfxItemSet &rSet); - virtual ~SwFrmPage(); + SwFramePage(vcl::Window *pParent, const SfxItemSet &rSet); + virtual ~SwFramePage(); virtual void dispose() override; static VclPtr<SfxTabPage> Create(vcl::Window *pParent, const SfxItemSet *rSet); @@ -196,7 +196,7 @@ public: void SetNewFrame(bool bNewFrame) { m_bNew = bNewFrame; } void SetFormatUsed(bool bFormat); - void SetFrmType(const OUString &rType) { m_sDlgType = rType; } + void SetFrameType(const OUString &rType) { m_sDlgType = rType; } inline bool IsInGraficMode() { return m_sDlgType == "PictureDialog" || m_sDlgType == "ObjectDialog"; } void EnableVerticalPositioning( bool bEnable ); }; @@ -243,7 +243,7 @@ public: virtual sfxpg DeactivatePage(SfxItemSet *pSet) override; }; -class SwFrmURLPage : public SfxTabPage +class SwFrameURLPage : public SfxTabPage { // hyperlink VclPtr<Edit> pURLED; @@ -261,8 +261,8 @@ class SwFrmURLPage : public SfxTabPage using SfxTabPage::DeactivatePage; public: - SwFrmURLPage(vcl::Window *pParent, const SfxItemSet &rSet); - virtual ~SwFrmURLPage(); + SwFrameURLPage(vcl::Window *pParent, const SfxItemSet &rSet); + virtual ~SwFrameURLPage(); virtual void dispose() override; static VclPtr<SfxTabPage> Create(vcl::Window *pParent, const SfxItemSet *rSet); @@ -271,7 +271,7 @@ public: virtual void Reset(const SfxItemSet *rSet) override; }; -class SwFrmAddPage : public SfxTabPage +class SwFrameAddPage : public SfxTabPage { VclPtr<VclContainer> m_pNameFrame; VclPtr<FixedText> m_pNameFT; @@ -310,8 +310,8 @@ class SwFrmAddPage : public SfxTabPage static const sal_uInt16 aAddPgRg[]; public: - SwFrmAddPage(vcl::Window *pParent, const SfxItemSet &rSet); - virtual ~SwFrmAddPage(); + SwFrameAddPage(vcl::Window *pParent, const SfxItemSet &rSet); + virtual ~SwFrameAddPage(); virtual void dispose() override; static VclPtr<SfxTabPage> Create(vcl::Window *pParent, const SfxItemSet *rSet); @@ -321,7 +321,7 @@ public: virtual void Reset(const SfxItemSet *rSet) override; void SetFormatUsed(bool bFormat); - void SetFrmType(const OUString &rType) { m_sDlgType = rType; } + void SetFrameType(const OUString &rType) { m_sDlgType = rType; } void SetNewFrame(bool bNewFrame) { m_bNew = bNewFrame; } void SetShell(SwWrtShell* pSh) { m_pWrtSh = pSh; } diff --git a/sw/source/uibase/inc/initui.hxx b/sw/source/uibase/inc/initui.hxx index 1cf7a3e75454..b98220511877 100644 --- a/sw/source/uibase/inc/initui.hxx +++ b/sw/source/uibase/inc/initui.hxx @@ -39,8 +39,8 @@ SW_DLLPUBLIC OUString GetOldGrfCat(); SW_DLLPUBLIC void SetOldGrfCat(const OUString& sStr); SW_DLLPUBLIC OUString GetOldTabCat(); SW_DLLPUBLIC void SetOldTabCat(const OUString& sStr); -SW_DLLPUBLIC OUString GetOldFrmCat(); -SW_DLLPUBLIC void SetOldFrmCat(const OUString& sStr); +SW_DLLPUBLIC OUString GetOldFrameCat(); +SW_DLLPUBLIC void SetOldFrameCat(const OUString& sStr); SW_DLLPUBLIC OUString GetOldDrwCat(); SW_DLLPUBLIC void SetOldDrwCat(const OUString& sStr); diff --git a/sw/source/uibase/inc/navmgr.hxx b/sw/source/uibase/inc/navmgr.hxx index d462cf0a7736..96288ba467db 100644 --- a/sw/source/uibase/inc/navmgr.hxx +++ b/sw/source/uibase/inc/navmgr.hxx @@ -19,14 +19,14 @@ class SwWrtShell; struct SwPosition; -class SwUnoCrsr; +class SwUnoCursor; class SwNavigationMgr { private: /* * List of entries in the navigation history - * Entries are SwUnoCrsr because these gets corrected automatically + * Entries are SwUnoCursor because these gets corrected automatically * when nodes are deleted. * * The navigation history behaves as a stack, to which items are added when we jump to a new position diff --git a/sw/source/uibase/inc/optpage.hxx b/sw/source/uibase/inc/optpage.hxx index cb125f858d46..03d65cdfff5d 100644 --- a/sw/source/uibase/inc/optpage.hxx +++ b/sw/source/uibase/inc/optpage.hxx @@ -236,8 +236,8 @@ public: }; -// TabPage for ShadowCrsr -class SwShdwCrsrOptionsTabPage : public SfxTabPage +// TabPage for ShadowCursor +class SwShdwCursorOptionsTabPage : public SfxTabPage { //nonprinting characters VclPtr<CheckBox> m_pParaCB; @@ -259,7 +259,7 @@ class SwShdwCrsrOptionsTabPage : public SfxTabPage VclPtr<RadioButton> m_pFillSpaceRB; VclPtr<VclFrame> m_pCursorProtFrame; - VclPtr<CheckBox> m_pCrsrInProtCB; + VclPtr<CheckBox> m_pCursorInProtCB; VclPtr<CheckBox> m_pIgnoreProtCB; VclPtr<CheckBox> m_pMathBaselineAlignmentCB; @@ -267,8 +267,8 @@ class SwShdwCrsrOptionsTabPage : public SfxTabPage SwWrtShell * m_pWrtShell; public: - SwShdwCrsrOptionsTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); - virtual ~SwShdwCrsrOptionsTabPage(); + SwShdwCursorOptionsTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); + virtual ~SwShdwCursorOptionsTabPage(); virtual void dispose() override; static VclPtr<SfxTabPage> Create(vcl::Window* pParent, const SfxItemSet* rAttrSet); diff --git a/sw/source/uibase/inc/pview.hxx b/sw/source/uibase/inc/pview.hxx index 0c97e69b2d31..35cb5ef488fe 100644 --- a/sw/source/uibase/inc/pview.hxx +++ b/sw/source/uibase/inc/pview.hxx @@ -166,7 +166,7 @@ class SW_DLLPUBLIC SwPagePreview: public SfxViewShell //viewdata of the previous SwView and the new crsrposition OUString sSwViewData; //and the new cursor position if the user double click in the PagePreview - OUString sNewCrsrPos; + OUString sNewCursorPos; // to support keyboard the number of the page to go to can be set too sal_uInt16 nNewPage; // visible range @@ -256,8 +256,8 @@ public: bool HandleWheelCommands( const CommandEvent& ); OUString GetPrevSwViewData() const { return sSwViewData; } - void SetNewCrsrPos( const OUString& rStr ) { sNewCrsrPos = rStr; } - const OUString& GetNewCrsrPos() const { return sNewCrsrPos; } + void SetNewCursorPos( const OUString& rStr ) { sNewCursorPos = rStr; } + const OUString& GetNewCursorPos() const { return sNewCursorPos; } sal_uInt16 GetNewPage() const {return nNewPage;} void SetNewPage(sal_uInt16 nSet) {nNewPage = nSet;} diff --git a/sw/source/uibase/inc/shdwcrsr.hxx b/sw/source/uibase/inc/shdwcrsr.hxx index 96002be9516d..46dae2953a6f 100644 --- a/sw/source/uibase/inc/shdwcrsr.hxx +++ b/sw/source/uibase/inc/shdwcrsr.hxx @@ -34,7 +34,7 @@ class SwShadowCursor sal_uInt16 nOldMode; void DrawTri( const Point& rPt, long nHeight, bool bLeft ); - void DrawCrsr( const Point& rPt, long nHeight, sal_uInt16 nMode ); + void DrawCursor( const Point& rPt, long nHeight, sal_uInt16 nMode ); public: SwShadowCursor( vcl::Window& rWin, const Color& rCol ) diff --git a/sw/source/uibase/inc/tabsh.hxx b/sw/source/uibase/inc/tabsh.hxx index 1ae2653d4964..607a65b0de99 100644 --- a/sw/source/uibase/inc/tabsh.hxx +++ b/sw/source/uibase/inc/tabsh.hxx @@ -41,7 +41,7 @@ private: public: void Execute(SfxRequest &); void GetState(SfxItemSet &); - void GetFrmBorderState(SfxItemSet &rSet); + void GetFrameBorderState(SfxItemSet &rSet); void GetLineStyleState(SfxItemSet &rSet); void ExecTableStyle(SfxRequest& rReq); diff --git a/sw/source/uibase/inc/textsh.hxx b/sw/source/uibase/inc/textsh.hxx index e28067d44830..366a7ae2fed7 100644 --- a/sw/source/uibase/inc/textsh.hxx +++ b/sw/source/uibase/inc/textsh.hxx @@ -25,7 +25,7 @@ class AbstractSvxPostItDialog; class SwFieldMgr; -class SwFlyFrmAttrMgr; +class SwFlyFrameAttrMgr; class SvxHyperlinkItem; class SW_DLLPUBLIC SwTextShell: public SwBaseShell @@ -80,7 +80,7 @@ public: SwTextShell(SwView &rView); virtual ~SwTextShell(); /// Create item set for the insert frame dialog. - SfxItemSet CreateInsertFrameItemSet(SwFlyFrmAttrMgr& rMgr); + SfxItemSet CreateInsertFrameItemSet(SwFlyFrameAttrMgr& rMgr); }; void sw_CharDialog( SwWrtShell &rWrtSh, bool bUseDialog, sal_uInt16 nSlot,const SfxItemSet *pArgs, SfxRequest *pReq ); diff --git a/sw/source/uibase/inc/uivwimp.hxx b/sw/source/uibase/inc/uivwimp.hxx index 3ae07ead1bd2..7713246fc059 100644 --- a/sw/source/uibase/inc/uivwimp.hxx +++ b/sw/source/uibase/inc/uivwimp.hxx @@ -151,15 +151,15 @@ public: #endif //#i33307# restore editing position - void SetRestorePosition(const Point& rCrsrPos, bool bSelectObj) + void SetRestorePosition(const Point& rCursorPos, bool bSelectObj) { - m_aEditingPosition = rCrsrPos; + m_aEditingPosition = rCursorPos; m_bSelectObject = bSelectObj; m_bEditingPositionSet = true; } - bool GetRestorePosition(Point& rCrsrPos, bool& rbSelectObj) + bool GetRestorePosition(Point& rCursorPos, bool& rbSelectObj) { - rCrsrPos = m_aEditingPosition; + rCursorPos = m_aEditingPosition; rbSelectObj = m_bSelectObject; return m_bEditingPositionSet; } diff --git a/sw/source/uibase/inc/unotools.hxx b/sw/source/uibase/inc/unotools.hxx index 4164dd6dfe6d..f551e8f2efaa 100644 --- a/sw/source/uibase/inc/unotools.hxx +++ b/sw/source/uibase/inc/unotools.hxx @@ -36,11 +36,11 @@ class SwOneExampleFrame; -class SwFrmCtrlWindow : public VclEventBox +class SwFrameCtrlWindow : public VclEventBox { SwOneExampleFrame* pExampleFrame; public: - SwFrmCtrlWindow(vcl::Window* pParent, SwOneExampleFrame* pFrame); + SwFrameCtrlWindow(vcl::Window* pParent, SwOneExampleFrame* pFrame); virtual void Command( const CommandEvent& rCEvt ) override; virtual Size GetOptimalSize() const override; @@ -73,7 +73,7 @@ class SW_DLLPUBLIC SwOneExampleFrame css::uno::Reference< css::frame::XController > _xController; css::uno::Reference< css::text::XTextCursor > _xCursor; - VclPtr<SwFrmCtrlWindow> aTopWindow; + VclPtr<SwFrameCtrlWindow> aTopWindow; Idle aLoadedIdle; Link<SwOneExampleFrame&,void> aInitializedLink; diff --git a/sw/source/uibase/inc/wrap.hxx b/sw/source/uibase/inc/wrap.hxx index 17c2cb714c1c..940941870536 100644 --- a/sw/source/uibase/inc/wrap.hxx +++ b/sw/source/uibase/inc/wrap.hxx @@ -68,7 +68,7 @@ class SwWrapTabPage: public SfxTabPage RndStdIds m_nAnchorId; sal_uInt16 m_nHtmlMode; - Size m_aFrmSize; + Size m_aFrameSize; SwWrtShell* m_pWrtSh; bool m_bFormat; diff --git a/sw/source/uibase/inc/wrtsh.hxx b/sw/source/uibase/inc/wrtsh.hxx index 8ab49ef721d0..d5fd8817bb34 100644 --- a/sw/source/uibase/inc/wrtsh.hxx +++ b/sw/source/uibase/inc/wrtsh.hxx @@ -32,7 +32,7 @@ namespace vcl { class Window; } class SbxArray; class SwDoc; class SwViewOption; -class SwFlyFrmAttrMgr; +class SwFlyFrameAttrMgr; class SwField; class SwTOXBase; class SwView; @@ -80,22 +80,22 @@ string, and take care of undo etc. class SW_DLLPUBLIC SwWrtShell: public SwFEShell { private: - using SwCrsrShell::Left; - using SwCrsrShell::Right; - using SwCrsrShell::Up; - using SwCrsrShell::Down; - using SwCrsrShell::LeftMargin; - using SwCrsrShell::RightMargin; - using SwCrsrShell::SelectTextAttr; - using SwCrsrShell::GotoPage; + using SwCursorShell::Left; + using SwCursorShell::Right; + using SwCursorShell::Up; + using SwCursorShell::Down; + using SwCursorShell::LeftMargin; + using SwCursorShell::RightMargin; + using SwCursorShell::SelectTextAttr; + using SwCursorShell::GotoPage; using SwFEShell::InsertObject; using SwEditShell::AutoCorrect; - using SwCrsrShell::GotoMark; + using SwCursorShell::GotoMark; typedef long (SwWrtShell::*SELECTFUNC)(const Point *, bool bProp ); SELECTFUNC m_fnDrag; - SELECTFUNC m_fnSetCrsr; + SELECTFUNC m_fnSetCursor; SELECTFUNC m_fnEndDrag; SELECTFUNC m_fnKillSel; @@ -103,7 +103,7 @@ public: using SwEditShell::Insert; - long CallSetCursor(const Point* pPt, bool bProp) { return (this->*m_fnSetCrsr)(pPt, bProp); } + long CallSetCursor(const Point* pPt, bool bProp) { return (this->*m_fnSetCursor)(pPt, bProp); } long Drag (const Point* pPt, bool bProp) { return (this->*m_fnDrag)(pPt, bProp); } long EndDrag (const Point* pPt, bool bProp) { return (this->*m_fnEndDrag)(pPt, bProp); } long KillSelection(const Point* pPt, bool bProp) { return (this->*m_fnKillSel)(pPt, bProp); } @@ -124,9 +124,9 @@ public: bool IsInSelect() const { return m_bInSelect; } void SetInSelect(bool bSel = true) { m_bInSelect = bSel; } // is there a text- or frameselection? - bool HasSelection() const { return SwCrsrShell::HasSelection() || - IsMultiSelection() || IsSelFrmMode() || IsObjSelected(); } - bool Pop( bool bOldCrsr = true ); + bool HasSelection() const { return SwCursorShell::HasSelection() || + IsMultiSelection() || IsSelFrameMode() || IsObjSelected(); } + bool Pop( bool bOldCursor = true ); void EnterStdMode(); bool IsStdMode() const { return !m_bExtMode && !m_bAddMode && !m_bBlockMode; } @@ -151,11 +151,11 @@ public: bool IsInsMode() const { return m_bIns; } void SetRedlineModeAndCheckInsMode( sal_uInt16 eMode ); - void EnterSelFrmMode(const Point *pStartDrag = nullptr); - void LeaveSelFrmMode(); - bool IsSelFrmMode() const { return m_bLayoutMode; } + void EnterSelFrameMode(const Point *pStartDrag = nullptr); + void LeaveSelFrameMode(); + bool IsSelFrameMode() const { return m_bLayoutMode; } // reset selection of frames - void UnSelectFrm(); + void UnSelectFrame(); void Invalidate(); @@ -244,12 +244,12 @@ typedef bool (SwWrtShell:: *FNSimpleMove)(); // setting the cursor; remember the old position for turning back DECL_LINK_TYPED( ExecFlyMac, const SwFlyFrameFormat*, void ); - bool PageCrsr(SwTwips lOffset, bool bSelect); + bool PageCursor(SwTwips lOffset, bool bSelect); // update fields void UpdateInputFields( SwInputFieldList* pLst = nullptr ); - void NoEdit(bool bHideCrsr = true); + void NoEdit(bool bHideCursor = true); void Edit(); bool IsRetainSelection() const { return m_bRetainSelection; } @@ -264,7 +264,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)(); long DelLine(); long DelLeft(); - // also deletes the frame or sets the cursor in the frame when bDelFrm == false + // also deletes the frame or sets the cursor in the frame when bDelFrame == false long DelRight(); long DelToEndOfPara(); long DelToStartOfPara(); @@ -290,7 +290,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)(); void Insert(const OUString &); // graphic void Insert( const OUString &rPath, const OUString &rFilter, - const Graphic &, SwFlyFrmAttrMgr * = nullptr, + const Graphic &, SwFlyFrameAttrMgr * = nullptr, bool bRule = false ); void InsertByWord( const OUString & ); @@ -329,10 +329,10 @@ typedef bool (SwWrtShell:: *FNSimpleMove)(); virtual void MoveObjectIfActive( svt::EmbeddedObjectRef& xObj, const Point& rOffset ) override; virtual void CalcAndSetScale( svt::EmbeddedObjectRef& xObj, const SwRect *pFlyPrtRect = nullptr, - const SwRect *pFlyFrmRect = nullptr, - const bool bNoTextFrmPrtAreaChanged = false ) override; + const SwRect *pFlyFrameRect = nullptr, + const bool bNoTextFramePrtAreaChanged = false ) override; virtual void ConnectObj( svt::EmbeddedObjectRef& xIPObj, const SwRect &rPrt, - const SwRect &rFrm ) override; + const SwRect &rFrame ) override; // styles and formats @@ -349,7 +349,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)(); void SetPageStyle(const OUString &rCollName); - OUString GetCurPageStyle( const bool bCalcFrm = true ) const; + OUString GetCurPageStyle( const bool bCalcFrame = true ) const; // change current style using the attributes in effect void QuickUpdateStyle(); @@ -384,7 +384,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)(); // action ahead of cursor movement // resets selection if applicable, triggers timer and GCAttr() - void MoveCrsr( bool bWithSelect = false ); + void MoveCursor( bool bWithSelect = false ); // update input fields bool StartInputFieldDlg(SwField*, bool bNextButton, vcl::Window* pParentWin = nullptr, OString* pWindowState = nullptr); @@ -500,35 +500,35 @@ private: MV_PAGE_DOWN } m_ePageMove; - struct CrsrStack + struct CursorStack { Point aDocPos; - CrsrStack *pNext; + CursorStack *pNext; bool bValidCurPos : 1; - bool bIsFrmSel : 1; + bool bIsFrameSel : 1; SwTwips lOffset; - CrsrStack( bool bValid, bool bFrmSel, const Point &rDocPos, - SwTwips lOff, CrsrStack *pN ) + CursorStack( bool bValid, bool bFrameSel, const Point &rDocPos, + SwTwips lOff, CursorStack *pN ) : aDocPos(rDocPos), pNext(pN), bValidCurPos( bValid ), - bIsFrmSel( bFrmSel ), + bIsFrameSel( bFrameSel ), lOffset(lOff) { } - } *m_pCrsrStack; + } *m_pCursorStack; SwView &m_rView; SwNavigationMgr m_aNavigationMgr; Point m_aDest; bool m_bDestOnStack; - bool HasCrsrStack() const { return nullptr != m_pCrsrStack; } - SAL_DLLPRIVATE bool PushCrsr(SwTwips lOffset, bool bSelect); - SAL_DLLPRIVATE bool PopCrsr(bool bUpdate, bool bSelect = false); + bool HasCursorStack() const { return nullptr != m_pCursorStack; } + SAL_DLLPRIVATE bool PushCursor(SwTwips lOffset, bool bSelect); + SAL_DLLPRIVATE bool PopCursor(bool bUpdate, bool bSelect = false); // take END cursor along when PageUp / -Down SAL_DLLPRIVATE bool _SttWrd(); @@ -563,10 +563,10 @@ private: // resets the cursor stack after movement by PageUp/-Down SAL_DLLPRIVATE void _ResetCursorStack(); - using SwCrsrShell::SetCrsr; - SAL_DLLPRIVATE long SetCrsr(const Point *, bool bProp=false ); + using SwCursorShell::SetCursor; + SAL_DLLPRIVATE long SetCursor(const Point *, bool bProp=false ); - SAL_DLLPRIVATE long SetCrsrKillSel(const Point *, bool bProp=false ); + SAL_DLLPRIVATE long SetCursorKillSel(const Point *, bool bProp=false ); SAL_DLLPRIVATE long BeginDrag(const Point *, bool bProp=false ); SAL_DLLPRIVATE long DefaultDrag(const Point *, bool bProp=false ); @@ -575,10 +575,10 @@ private: SAL_DLLPRIVATE long ExtSelWrd(const Point *, bool bProp=false ); SAL_DLLPRIVATE long ExtSelLn(const Point *, bool bProp=false ); - SAL_DLLPRIVATE long BeginFrmDrag(const Point *, bool bProp=false ); + SAL_DLLPRIVATE long BeginFrameDrag(const Point *, bool bProp=false ); // after SSize/Move of a frame update; Point is destination. - SAL_DLLPRIVATE long UpdateLayoutFrm(const Point *, bool bProp=false ); + SAL_DLLPRIVATE long UpdateLayoutFrame(const Point *, bool bProp=false ); SAL_DLLPRIVATE long SttLeaveSelect(const Point *, bool bProp=false ); SAL_DLLPRIVATE long AddLeaveSelect(const Point *, bool bProp=false ); @@ -603,7 +603,7 @@ private: inline void SwWrtShell::ResetCursorStack() { - if ( HasCrsrStack() ) + if ( HasCursorStack() ) _ResetCursorStack(); } diff --git a/sw/source/uibase/lingu/hhcwrp.cxx b/sw/source/uibase/lingu/hhcwrp.cxx index 79cf3464c38b..95d2ece08aff 100644 --- a/sw/source/uibase/lingu/hhcwrp.cxx +++ b/sw/source/uibase/lingu/hhcwrp.cxx @@ -59,7 +59,7 @@ using namespace ::com::sun::star::i18n; static void lcl_ActivateTextShell( SwWrtShell & rWrtSh ) { - if( rWrtSh.IsSelFrmMode() || rWrtSh.IsObjSelected() ) + if( rWrtSh.IsSelFrameMode() || rWrtSh.IsObjSelected() ) rWrtSh.EnterStdMode(); } @@ -174,19 +174,19 @@ void SwHHCWrapper::GetNextPortion( m_nUnitOffset = 0; // build last pos from currently selected text - SwPaM* pCrsr = m_rWrtShell.GetCrsr(); - m_nLastPos = pCrsr->Start()->nContent.GetIndex(); + SwPaM* pCursor = m_rWrtShell.GetCursor(); + m_nLastPos = pCursor->Start()->nContent.GetIndex(); } void SwHHCWrapper::SelectNewUnit_impl( sal_Int32 nUnitStart, sal_Int32 nUnitEnd ) { - SwPaM *pCrsr = m_rWrtShell.GetCrsr(); - pCrsr->GetPoint()->nContent = m_nLastPos; - pCrsr->DeleteMark(); + SwPaM *pCursor = m_rWrtShell.GetCursor(); + pCursor->GetPoint()->nContent = m_nLastPos; + pCursor->DeleteMark(); m_rWrtShell.Right( CRSR_SKIP_CHARS, /*bExpand*/ false, (sal_uInt16) (m_nUnitOffset + nUnitStart), true ); - pCrsr->SetMark(); + pCursor->SetMark(); m_rWrtShell.Right( CRSR_SKIP_CHARS, /*bExpand*/ true, (sal_uInt16) (nUnitEnd - nUnitStart), true ); // end selection now. Otherwise SHIFT+HOME (extending the selection) @@ -215,7 +215,7 @@ void SwHHCWrapper::HandleNewUnit( void SwHHCWrapper::ChangeText( const OUString &rNewText, const OUString& rOrigText, const uno::Sequence< sal_Int32 > *pOffsets, - SwPaM *pCrsr ) + SwPaM *pCursor ) { //!! please see also TextConvWrapper::ChangeText with is a modified //!! copy of this code @@ -224,10 +224,10 @@ void SwHHCWrapper::ChangeText( const OUString &rNewText, if (rNewText.isEmpty()) return; - if (pOffsets && pCrsr) // try to keep as much attributation as possible ? + if (pOffsets && pCursor) // try to keep as much attributation as possible ? { // remember cursor start position for later setting of the cursor - const SwPosition *pStart = pCrsr->Start(); + const SwPosition *pStart = pCursor->Start(); const sal_Int32 nStartIndex = pStart->nContent.GetIndex(); const SwNodeIndex aStartNodeIndex = pStart->nNode; SwTextNode *pStartTextNode = aStartNodeIndex.GetNode().GetTextNode(); @@ -274,9 +274,9 @@ void SwHHCWrapper::ChangeText( const OUString &rNewText, // set selection to sub string to be replaced in original text sal_Int32 nChgInNodeStartIndex = nStartIndex + nCorrectionOffset + nChgPos; - OSL_ENSURE( m_rWrtShell.GetCrsr()->HasMark(), "cursor misplaced (nothing selected)" ); - m_rWrtShell.GetCrsr()->GetMark()->nContent.Assign( pStartTextNode, nChgInNodeStartIndex ); - m_rWrtShell.GetCrsr()->GetPoint()->nContent.Assign( pStartTextNode, nChgInNodeStartIndex + nChgLen ); + OSL_ENSURE( m_rWrtShell.GetCursor()->HasMark(), "cursor misplaced (nothing selected)" ); + m_rWrtShell.GetCursor()->GetMark()->nContent.Assign( pStartTextNode, nChgInNodeStartIndex ); + m_rWrtShell.GetCursor()->GetPoint()->nContent.Assign( pStartTextNode, nChgInNodeStartIndex + nChgLen ); // replace selected sub string with the corresponding // sub string from the new text while keeping as @@ -307,7 +307,7 @@ void SwHHCWrapper::ChangeText( const OUString &rNewText, // (as it would happen after ChangeText_impl (Delete and Insert) // of the whole text in the 'else' branch below) m_rWrtShell.ClearMark(); - m_rWrtShell.GetCrsr()->Start()->nContent.Assign( pStartTextNode, nStartIndex + nConvTextLen ); + m_rWrtShell.GetCursor()->Start()->nContent.Assign( pStartTextNode, nStartIndex + nConvTextLen ); } else { @@ -332,9 +332,9 @@ void SwHHCWrapper::ChangeText_impl( const OUString &rNewText, bool bKeepAttribut m_rWrtShell.Insert( rNewText ); // select new inserted text (currently the Point is right after the new text) - if (!m_rWrtShell.GetCrsr()->HasMark()) - m_rWrtShell.GetCrsr()->SetMark(); - SwPosition *pMark = m_rWrtShell.GetCrsr()->GetMark(); + if (!m_rWrtShell.GetCursor()->HasMark()) + m_rWrtShell.GetCursor()->SetMark(); + SwPosition *pMark = m_rWrtShell.GetCursor()->GetMark(); pMark->nContent = pMark->nContent.GetIndex() - rNewText.getLength(); // since 'SetAttr' below functions like merging with the attributes @@ -447,7 +447,7 @@ void SwHHCWrapper::ReplaceUnit( pRuby->SetAdjustment( RubyAdjust_CENTER ); #if OSL_DEBUG_LEVEL > 1 - SwPaM *pPaM = m_rWrtShell.GetCrsr(); + SwPaM *pPaM = m_rWrtShell.GetCursor(); (void)pPaM; #endif m_rWrtShell.SetAttrItem(*pRuby); @@ -463,7 +463,7 @@ void SwHHCWrapper::ReplaceUnit( // Thus we do this only for Chinese translation... const bool bIsChineseConversion = IsChinese( GetSourceLanguage() ); if (bIsChineseConversion) - ChangeText( aNewText, rOrigText, &rOffsets, m_rWrtShell.GetCrsr() ); + ChangeText( aNewText, rOrigText, &rOffsets, m_rWrtShell.GetCursor() ); else ChangeText( aNewText, rOrigText, nullptr, nullptr ); @@ -471,7 +471,7 @@ void SwHHCWrapper::ReplaceUnit( if (bIsChineseConversion) { m_rWrtShell.SetMark(); - m_rWrtShell.GetCrsr()->GetMark()->nContent -= aNewText.getLength(); + m_rWrtShell.GetCursor()->GetMark()->nContent -= aNewText.getLength(); OSL_ENSURE( GetTargetLanguage() == LANGUAGE_CHINESE_SIMPLIFIED || GetTargetLanguage() == LANGUAGE_CHINESE_TRADITIONAL, "SwHHCWrapper::ReplaceUnit : unexpected target language" ); @@ -520,9 +520,9 @@ void SwHHCWrapper::Convert() { OSL_ENSURE( m_pConvArgs == nullptr, "NULL pointer expected" ); { - SwPaM *pCrsr = m_pView->GetWrtShell().GetCrsr(); - SwPosition* pSttPos = pCrsr->Start(); - SwPosition* pEndPos = pCrsr->End(); + SwPaM *pCursor = m_pView->GetWrtShell().GetCursor(); + SwPosition* pSttPos = pCursor->Start(); + SwPosition* pEndPos = pCursor->End(); if (pSttPos->nNode.GetNode().IsTextNode() && pEndPos->nNode.GetNode().IsTextNode()) @@ -568,7 +568,7 @@ void SwHHCWrapper::Convert() // convertible unit in order for the text conversion to give // the correct result for that. Since it is easier to obtain // the start of the word we use that though. - if (!pCrsr->HasMark()) // is not a selection? + if (!pCursor->HasMark()) // is not a selection? { // since #118246 / #117803 still occurs if the cursor is placed // between the two chinese characters to be converted (because both diff --git a/sw/source/uibase/lingu/olmenu.cxx b/sw/source/uibase/lingu/olmenu.cxx index 3202dcee2250..66cf66f94b18 100644 --- a/sw/source/uibase/lingu/olmenu.cxx +++ b/sw/source/uibase/lingu/olmenu.cxx @@ -671,7 +671,7 @@ void SwSpellPopup::Execute( sal_uInt16 nId ) SwRewriter aRewriter; - aRewriter.AddRule(UndoArg1, m_pSh->GetCrsrDescr()); + aRewriter.AddRule(UndoArg1, m_pSh->GetCursorDescr()); aRewriter.AddRule(UndoArg2, OUString(SW_RES(STR_YIELDS))); OUString aTmpStr( SW_RES(STR_START_QUOTE) ); @@ -728,7 +728,7 @@ void SwSpellPopup::Execute( sal_uInt16 nId ) } else if (nId == MN_IGNORE_SELECTION) { - SwPaM *pPaM = m_pSh->GetCrsr(); + SwPaM *pPaM = m_pSh->GetCursor(); if (pPaM) SwEditShell::IgnoreGrammarErrorAt( *pPaM ); } @@ -742,7 +742,7 @@ void SwSpellPopup::Execute( sal_uInt16 nId ) m_xGrammarResult.aErrors[ m_nGrammarError ].aRuleIdentifier, m_xGrammarResult.aLocale ); // refresh the layout of the actual paragraph (faster) - SwPaM *pPaM = m_pSh->GetCrsr(); + SwPaM *pPaM = m_pSh->GetCursor(); if (pPaM) SwEditShell::IgnoreGrammarErrorAt( *pPaM ); // refresh the layout of all paragraphs (workaround to launch a dictionary event) diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx index c1aaf362f383..556be6dcff23 100644 --- a/sw/source/uibase/misc/redlndlg.cxx +++ b/sw/source/uibase/misc/redlndlg.cxx @@ -740,10 +740,10 @@ void SwRedlineAcceptDlg::InsertParents(sal_uInt16 nStart, sal_uInt16 nEnd) pCurrRedline = pSh->GetCurrRedline(); if( !pCurrRedline ) { - pSh->SwCrsrShell::Push(); + pSh->SwCursorShell::Push(); if( nullptr == (pCurrRedline = pSh->SelNextRedline())) pCurrRedline = pSh->SelPrevRedline(); - pSh->SwCrsrShell::Pop( false ); + pSh->SwCursorShell::Pop( false ); } } else @@ -1035,7 +1035,7 @@ IMPL_LINK_NOARG_TYPED(SwRedlineAcceptDlg, CommandHdl, SvSimpleTable*, void) // disable commenting for protected areas if (nPos != USHRT_MAX && (pRed = pSh->GotoRedline(nPos, true)) != nullptr) { - if( pSh->IsCrsrPtAtEnd() ) + if( pSh->IsCursorPtAtEnd() ) pSh->SwapPam(); pSh->SetInSelect(); } diff --git a/sw/source/uibase/ribbar/drawbase.cxx b/sw/source/uibase/ribbar/drawbase.cxx index 684a5d9360a5..adb095a7fb16 100644 --- a/sw/source/uibase/ribbar/drawbase.cxx +++ b/sw/source/uibase/ribbar/drawbase.cxx @@ -198,8 +198,8 @@ bool SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt) pSdrView->UnmarkAllPoints(); } } - if (!m_pSh->IsSelFrmMode()) - m_pSh->EnterSelFrmMode(); + if (!m_pSh->IsSelFrameMode()) + m_pSh->EnterSelFrameMode(); if( (bReturn = m_pSh->BeginMark(m_aStartPos)) ) m_pWin->SetDrawAction(true); @@ -280,18 +280,18 @@ bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt) aReq.Done(); } bAutoCap = true; - if(m_pWin->GetFrmColCount() > 1) + if(m_pWin->GetFrameColCount() > 1) { SfxItemSet aSet(m_pView->GetPool(),RES_COL,RES_COL); SwFormatCol aCol(static_cast<const SwFormatCol&>(aSet.Get(RES_COL))); - aCol.Init(m_pWin->GetFrmColCount(), aCol.GetGutterWidth(), aCol.GetWishWidth()); + aCol.Init(m_pWin->GetFrameColCount(), aCol.GetGutterWidth(), aCol.GetWishWidth()); aSet.Put(aCol); // Template AutoUpdate SwFrameFormat* pFormat = m_pSh->GetSelectedFrameFormat(); if(pFormat && pFormat->IsAutoUpdateFormat()) m_pSh->AutoUpdateFrame(pFormat, aSet); else - m_pSh->SetFlyFrmAttr( aSet ); + m_pSh->SetFlyFrameAttr( aSet ); } } if (m_pWin->GetSdrDrawMode() == OBJ_NONE) @@ -321,7 +321,7 @@ bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt) if (aPnt == m_aStartPos && m_pSh->IsObjSelectable(aPnt)) { m_pSh->SelectObj(aPnt, ( rMEvt.IsShift() && - m_pSh->IsSelFrmMode()) ? SW_ADD_SELECT : 0); + m_pSh->IsSelFrameMode()) ? SW_ADD_SELECT : 0); if (!m_pSh->IsObjSelected()) { @@ -329,8 +329,8 @@ bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt) m_pSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_INSERT_DRAW); - if (m_pSh->IsSelFrmMode()) - m_pSh->LeaveSelFrmMode(); + if (m_pSh->IsSelFrameMode()) + m_pSh->LeaveSelFrameMode(); } m_pView->NoRotate(); @@ -340,12 +340,12 @@ bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt) { if (m_pSh->IsObjSelectable(aPnt)) m_pSh->SelectObj(aPnt, ( rMEvt.IsShift() && - m_pSh->IsSelFrmMode() ) ? SW_ADD_SELECT : 0 ); + m_pSh->IsSelFrameMode() ) ? SW_ADD_SELECT : 0 ); else { m_pView->LeaveDrawCreate(); - if (m_pSh->IsSelFrmMode()) - m_pSh->LeaveSelFrmMode(); + if (m_pSh->IsSelFrameMode()) + m_pSh->LeaveSelFrameMode(); } m_pView->NoRotate(); @@ -378,7 +378,7 @@ bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt) if (!rMEvt.IsShift()) pSdrView->UnmarkAllPoints(); m_pSh->SelectObj(aPnt, (rMEvt.IsShift() && - m_pSh->IsSelFrmMode()) ? SW_ADD_SELECT :0); + m_pSh->IsSelFrameMode()) ? SW_ADD_SELECT :0); } if (!m_pSh->IsObjSelected()) @@ -387,8 +387,8 @@ bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt) m_pSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_INSERT_DRAW); - if (m_pSh->IsSelFrmMode()) - m_pSh->LeaveSelFrmMode(); + if (m_pSh->IsSelFrameMode()) + m_pSh->LeaveSelFrameMode(); } m_pView->NoRotate(); @@ -401,8 +401,8 @@ bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt) if (!m_pSh->IsObjSelected() && !m_pWin->IsDrawAction()) { m_pView->LeaveDrawCreate(); - if (m_pSh->IsSelFrmMode()) - m_pSh->LeaveSelFrmMode(); + if (m_pSh->IsSelFrameMode()) + m_pSh->LeaveSelFrameMode(); m_pView->NoRotate(); bReturn = true; @@ -583,8 +583,8 @@ void SwDrawBase::EnterSelectMode(const MouseEvent& rMEvt) else { m_pView->LeaveDrawCreate(); - if (m_pSh->IsSelFrmMode()) - m_pSh->LeaveSelFrmMode(); + if (m_pSh->IsSelFrameMode()) + m_pSh->LeaveSelFrameMode(); } m_pView->NoRotate(); } diff --git a/sw/source/uibase/ribbar/inputwin.cxx b/sw/source/uibase/ribbar/inputwin.cxx index c27b2e32d4a6..178be93a7648 100644 --- a/sw/source/uibase/ribbar/inputwin.cxx +++ b/sw/source/uibase/ribbar/inputwin.cxx @@ -206,7 +206,7 @@ void SwInputWindow::ShowWin() OSL_ENSURE(pWrtShell, "no WrtShell!"); // Cursor in table - bIsTable = pWrtShell->IsCrsrInTable(); + bIsTable = pWrtShell->IsCursorInTable(); if( bFirst ) pWrtShell->SelTableCells( LINK( this, SwInputWindow, @@ -249,13 +249,13 @@ void SwInputWindow::ShowWin() pWrtShell->DoUndo(); } - if( !pWrtShell->SwCrsrShell::HasSelection() ) + if( !pWrtShell->SwCursorShell::HasSelection() ) { pWrtShell->MoveSection( fnSectionCurr, fnSectionStart ); pWrtShell->SetMark(); pWrtShell->MoveSection( fnSectionCurr, fnSectionEnd ); } - if( pWrtShell->SwCrsrShell::HasSelection() ) + if( pWrtShell->SwCursorShell::HasSelection() ) { pWrtShell->StartUndo( UNDO_DELETE ); pWrtShell->Delete(); @@ -442,7 +442,7 @@ IMPL_LINK_TYPED( SwInputWindow, SelTableCellsNotify, SwWrtShell&, rCaller, void // positioned "in the forest" and the live update does not work! pWrtShell->StartAllAction(); - SwPaM aPam( *pWrtShell->GetStkCrsr()->GetPoint() ); + SwPaM aPam( *pWrtShell->GetStackCursor()->GetPoint() ); aPam.Move( fnMoveBackward, fnGoSection ); aPam.SetMark(); aPam.Move( fnMoveForward, fnGoSection ); diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx index 1fcfc3a68c4f..2c609e186b11 100644 --- a/sw/source/uibase/shells/basesh.cxx +++ b/sw/source/uibase/shells/basesh.cxx @@ -172,7 +172,7 @@ static void lcl_UpdateIMapDlg( SwWrtShell& rSh ) rSh.GetView().GetViewFrame()->GetTopFrame().GetTargetList(*pList); SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL ); - rSh.GetFlyFrmAttr( aSet ); + rSh.GetFlyFrameAttr( aSet ); const SwFormatURL &rURL = static_cast<const SwFormatURL&>(aSet.Get( RES_URL )); SvxIMapDlgChildWindow::UpdateIMapDlg( aGrf, rURL.GetMap(), pList.get(), pEditObj ); @@ -213,7 +213,7 @@ void SwBaseShell::ExecDelete(SfxRequest &rReq) if( rSh.IsNoNum() ) { - rSh.SttCrsrMove(); + rSh.SttCursorMove(); bool bLeft = rSh.Left( CRSR_SKIP_CHARS, true, 1, false ); if( bLeft ) { @@ -225,7 +225,7 @@ void SwBaseShell::ExecDelete(SfxRequest &rReq) // of a doc, frame, table or an area. rSh.DelNumRules(); - rSh.EndCrsrMove(); + rSh.EndCursorMove(); break; } @@ -285,8 +285,8 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq) // destroyed after the paste. SwView* pView = &rView; SwTransferable::Paste( rSh, aDataHelper ); - if( rSh.IsFrmSelected() || rSh.IsObjSelected() ) - rSh.EnterSelFrmMode(); + if( rSh.IsFrameSelected() || rSh.IsObjSelected() ) + rSh.EnterSelFrameMode(); pView->AttrChangedNotify( &rSh ); } else @@ -316,8 +316,8 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq) //Done() has to be called before the shell has been removed rReq.Done(); bIgnore = true; - if( rSh.IsFrmSelected() || rSh.IsObjSelected()) - rSh.EnterSelFrmMode(); + if( rSh.IsFrameSelected() || rSh.IsObjSelected()) + rSh.EnterSelFrameMode(); pView->AttrChangedNotify( &rSh ); } } @@ -348,8 +348,8 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq) } } - if (rSh.IsFrmSelected() || rSh.IsObjSelected()) - rSh.EnterSelFrmMode(); + if (rSh.IsFrameSelected() || rSh.IsObjSelected()) + rSh.EnterSelFrameMode(); pView->AttrChangedNotify( &rSh ); } else @@ -363,7 +363,7 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq) TransferableDataHelper::CreateFromSystemClipboard( &rSh.GetView().GetEditWin()) ); if( aDataHelper.GetXTransferable().is() && SwTransferable::IsPaste( rSh, aDataHelper ) - && !rSh.CrsrInsideInputField() ) + && !rSh.CursorInsideInputField() ) { // Temporary variables, because the shell could already be // destroyed after the paste. @@ -383,8 +383,8 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq) } } - if (rSh.IsFrmSelected() || rSh.IsObjSelected()) - rSh.EnterSelFrmMode(); + if (rSh.IsFrameSelected() || rSh.IsObjSelected()) + rSh.EnterSelFrameMode(); pView->AttrChangedNotify( &rSh ); } else @@ -435,7 +435,7 @@ void SwBaseShell::StateClpbrd(SfxItemSet &rSet) case SID_PASTE_SPECIAL: if( !GetView().IsPasteSpecialAllowed() - || rSh.CrsrInsideInputField() ) + || rSh.CursorInsideInputField() ) { rSet.DisableItem( nWhich ); } @@ -539,7 +539,7 @@ void SwBaseShell::StateUndo(SfxItemSet &rSet) case SID_REPEAT: { // Repeat is only possible if no REDO is possible - UI-Restriction if ((!rSh.GetFirstRedoInfo(nullptr)) && - !rSh.IsSelFrmMode() && + !rSh.IsSelFrameMode() && (UNDO_EMPTY != rSh.GetRepeatInfo(nullptr))) { rSet.Put(SfxStringItem(nWhich, rSh.GetRepeatString())); @@ -602,7 +602,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) rSh.EndAllTableBoxEdit(); rSh.SwViewShell::UpdateFields(true); - if( rSh.IsCrsrInTable() ) + if( rSh.IsCursorInTable() ) { if( !rSh.IsTableComplexForChart() ) SwTableFUNC( &rSh, false).UpdateChart(); @@ -655,16 +655,16 @@ void SwBaseShell::Execute(SfxRequest &rReq) if (pFieldType) { - if (rSh.IsSelFrmMode()) + if (rSh.IsSelFrameMode()) { - rSh.UnSelectFrm(); - rSh.LeaveSelFrmMode(); + rSh.UnSelectFrame(); + rSh.LeaveSelFrameMode(); } if (rSh.HasMark()) { SwMvContext aMvContext(&rSh); - if (rSh.IsCrsrPtAtEnd()) + if (rSh.IsCursorPtAtEnd()) rSh.SwapPam(); rSh.ClearMark(); rSh.EndSelect(); @@ -681,10 +681,10 @@ void SwBaseShell::Execute(SfxRequest &rReq) case FN_START_DOC_DIRECT: case FN_END_DOC_DIRECT: { - if (rSh.IsSelFrmMode()) + if (rSh.IsSelFrameMode()) { - rSh.UnSelectFrm(); - rSh.LeaveSelFrmMode(); + rSh.UnSelectFrame(); + rSh.LeaveSelFrameMode(); } rSh.EnterStdMode(); nSlot == FN_START_DOC_DIRECT ? @@ -697,10 +697,10 @@ void SwBaseShell::Execute(SfxRequest &rReq) { bool bSuccess = rSh.GotoObj( nSlot == FN_GOTO_NEXT_OBJ ); rReq.SetReturnValue(SfxBoolItem(nSlot, bSuccess)); - if (bSuccess && !rSh.IsSelFrmMode()) + if (bSuccess && !rSh.IsSelFrameMode()) { - rSh.HideCrsr(); - rSh.EnterSelFrmMode(); + rSh.HideCursor(); + rSh.EnterSelFrameMode(); GetView().AttrChangedNotify( &rSh ); } } @@ -714,7 +714,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) const int nSelType = rSh.GetSelectionType(); sal_Int8 nGalleryItemType( pGalleryItem->GetType() ); - if ( (!rSh.IsSelFrmMode() || nSelType & nsSelectionType::SEL_GRF) && + if ( (!rSh.IsSelFrameMode() || nSelType & nsSelectionType::SEL_GRF) && nGalleryItemType == css::gallery::GalleryItemType::GRAPHIC ) { SwWait aWait( *rView.GetDocShell(), true ); @@ -729,7 +729,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) GetView().GetEditWin().GrabFocus(); } - else if(!rSh.IsSelFrmMode() && + else if(!rSh.IsSelFrameMode() && nGalleryItemType == css::gallery::GalleryItemType::MEDIA ) { const SfxStringItem aMediaURLItem( SID_INSERT_AVMEDIA, pGalleryItem->GetURL() ); @@ -915,7 +915,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) pVFrame->ToggleChildWindow( nId ); pVFrame->GetBindings().Invalidate( SID_IMAP ); - if ( pVFrame->HasChildWindow( nId ) && rSh.IsFrmSelected() ) + if ( pVFrame->HasChildWindow( nId ) && rSh.IsFrameSelected() ) lcl_UpdateIMapDlg( rSh ); } break; @@ -924,15 +924,15 @@ void SwBaseShell::Execute(SfxRequest &rReq) SvxIMapDlg* pDlg = GetIMapDlg(GetView()); // Check, if the allocation is useful or allowed at all. - if ( rSh.IsFrmSelected() && + if ( rSh.IsFrameSelected() && pDlg->GetEditingObject() == rSh.GetIMapInventor() ) { SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL ); - rSh.GetFlyFrmAttr( aSet ); + rSh.GetFlyFrameAttr( aSet ); SwFormatURL aURL( static_cast<const SwFormatURL&>(aSet.Get( RES_URL )) ); aURL.SetMap( &pDlg->GetImageMap() ); aSet.Put( aURL ); - rSh.SetFlyFrmAttr( aSet ); + rSh.SetFlyFrameAttr( aSet ); } } break; @@ -963,7 +963,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) { rSh.StartAction(); SfxItemSet aSet( rSh.GetAttrPool(), RES_SURROUND, RES_SURROUND); - rSh.GetFlyFrmAttr( aSet ); + rSh.GetFlyFrameAttr( aSet ); SwFormatSurround aSur( static_cast<const SwFormatSurround&>(aSet.Get( RES_SURROUND )) ); if ( !aSur.IsContour() ) { @@ -971,7 +971,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) if ( aSur.GetSurround() == SURROUND_NONE ) aSur.SetSurround( SURROUND_PARALLEL ); aSet.Put( aSur ); - rSh.SetFlyFrmAttr( aSet ); + rSh.SetFlyFrameAttr( aSet ); } const tools::PolyPolygon aPoly( pDlg->GetPolyPolygon() ); rSh.SetGraphicPolygon( &aPoly ); @@ -1009,11 +1009,11 @@ void SwBaseShell::Execute(SfxRequest &rReq) rSh.StartUndo(); if (rSh.IsObjSelected()) rSh.ChgAnchor(eSet); - else if (rSh.IsFrmSelected()) + else if (rSh.IsFrameSelected()) { SwFormatAnchor aAnc(eSet, rSh.GetPhyPageNum()); SfxItemSet aSet(SwFEShell::makeItemSetFromFormatAnchor(GetPool(), aAnc)); - rSh.SetFlyFrmAttr(aSet); + rSh.SetFlyFrameAttr(aSet); } // if new anchor is 'as char' and it is a Math object and the usual // pre-conditions are met then align the formula to the baseline of the text @@ -1027,7 +1027,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) if( nHtmlMode ) { SfxItemSet aSet(GetPool(), RES_SURROUND, RES_HORI_ORIENT); - rSh.GetFlyFrmAttr(aSet); + rSh.GetFlyFrameAttr(aSet); const SwFormatSurround& rSurround = static_cast<const SwFormatSurround&>(aSet.Get(RES_SURROUND)); const SwFormatVertOrient& rVert = static_cast<const SwFormatVertOrient&>(aSet.Get(RES_VERT_ORIENT)); @@ -1080,7 +1080,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) } if( aSet.Count() ) - rSh.SetFlyFrmAttr( aSet ); + rSh.SetFlyFrameAttr( aSet ); } rSh.EndUndo(); @@ -1161,12 +1161,12 @@ void SwBaseShell::Execute(SfxRequest &rReq) SwFrameFormat *pFormat = rSh.GetTableFormat(); pFormat->SetFormatAttr( *pItem ); } - else if ( rSh.IsFrmSelected() ) + else if ( rSh.IsFrameSelected() ) { // Set border attributes via Frame-Manager. - SwFlyFrmAttrMgr aMgr( false, &rSh, FRMMGR_TYPE_NONE ); + SwFlyFrameAttrMgr aMgr( false, &rSh, FRMMGR_TYPE_NONE ); aMgr.SetAttrSet( *pArgs ); - aMgr.UpdateFlyFrm(); + aMgr.UpdateFlyFrame(); } else { @@ -1193,12 +1193,12 @@ void SwBaseShell::Execute(SfxRequest &rReq) // Set border attributes Get/SetTabBorders() rSh.SetTabBorders(*pArgs); } - else if ( rSh.IsFrmSelected() ) + else if ( rSh.IsFrameSelected() ) { // Set border attributes via Frame-Manager. - SwFlyFrmAttrMgr aMgr( false, &rSh, FRMMGR_TYPE_NONE ); + SwFlyFrameAttrMgr aMgr( false, &rSh, FRMMGR_TYPE_NONE ); aMgr.SetAttrSet(*pArgs); - aMgr.UpdateFlyFrm(); + aMgr.UpdateFlyFrame(); } else { @@ -1217,7 +1217,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) // Here the state fpr SID_IMAP / SID_CONTOUR will be handled // until the swapping of the graphic is finished. -IMPL_LINK_NOARG_TYPED(SwBaseShell, GraphicArrivedHdl, SwCrsrShell&, void) +IMPL_LINK_NOARG_TYPED(SwBaseShell, GraphicArrivedHdl, SwCursorShell&, void) { sal_uInt16 nGrfType; SwWrtShell &rSh = GetShell(); @@ -1275,7 +1275,7 @@ IMPL_LINK_NOARG_TYPED(SwBaseShell, GraphicArrivedHdl, SwCrsrShell&, void) if( !bProtect ) { SfxItemSet aSet(GetPool(), RES_SURROUND, RES_SURROUND); - rSh.GetFlyFrmAttr(aSet); + rSh.GetFlyFrameAttr(aSet); const SwFormatSurround& rWrap = static_cast<const SwFormatSurround&>(aSet.Get(RES_SURROUND)); bSetState = true; bState = rWrap.IsContour(); @@ -1324,7 +1324,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) { case SID_GALLERY_FORMATS: if ( rSh.IsObjSelected() || - (rSh.IsSelFrmMode() && + (rSh.IsSelFrameMode() && !(rSh.GetSelectionType() & nsSelectionType::SEL_GRF)) ) rSet.DisableItem( nWhich ); break; @@ -1338,8 +1338,8 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) break; case FN_INSERT_REGION: - if( rSh.CrsrInsideInputField() - || rSh.IsSelFrmMode() + if( rSh.CursorInsideInputField() + || rSh.IsSelFrameMode() || !rSh.IsInsRegionAvailable() ) { rSet.DisableItem( nWhich ); @@ -1348,24 +1348,24 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) case FN_CONVERT_TABLE_TO_TEXT: { - FrmTypeFlags eFrmType = rSh.GetFrmType(nullptr,true); - if( (eFrmType & FrmTypeFlags::FOOTNOTE) || + FrameTypeFlags eFrameType = rSh.GetFrameType(nullptr,true); + if( (eFrameType & FrameTypeFlags::FOOTNOTE) || !rSh.GetTableFormat() ) rSet.DisableItem( nWhich ); } break; case FN_CONVERT_TEXT_TO_TABLE: { - FrmTypeFlags eFrmType = rSh.GetFrmType(nullptr,true); - if( (eFrmType & FrmTypeFlags::FOOTNOTE) || + FrameTypeFlags eFrameType = rSh.GetFrameType(nullptr,true); + if( (eFrameType & FrameTypeFlags::FOOTNOTE) || !rSh.IsTextToTableAvailable() ) rSet.DisableItem( nWhich ); } break; case FN_CONVERT_TEXT_TABLE: { - FrmTypeFlags eFrmType = rSh.GetFrmType(nullptr,true); - if( (eFrmType & FrmTypeFlags::FOOTNOTE) || + FrameTypeFlags eFrameType = rSh.GetFrameType(nullptr,true); + if( (eFrameType & FrameTypeFlags::FOOTNOTE) || (!rSh.GetTableFormat() && !rSh.IsTextToTableAvailable() ) ) rSet.DisableItem( nWhich ); } @@ -1381,9 +1381,9 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) SwFrameFormat *pFormat = rSh.GetTableFormat(); aSet.Put(pFormat->GetFormatAttr( nWhich )); } - else if( rSh.IsFrmSelected() ) + else if( rSh.IsFrameSelected() ) { - SwFlyFrmAttrMgr aMgr( false, &rSh, FRMMGR_TYPE_NONE ); + SwFlyFrameAttrMgr aMgr( false, &rSh, FRMMGR_TYPE_NONE ); aSet.Put( aMgr.GetAttrSet() ); } else @@ -1407,7 +1407,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) { const sal_uInt16 nId = SvxIMapDlgChildWindow::GetChildWindowId(); const bool bHas = pVFrame->HasChildWindow( nId ); - const bool bFrmSel = rSh.IsFrmSelected(); + const bool bFrameSel = rSh.IsFrameSelected(); const bool bIsGraphicSelection = rSh.GetSelectionType() == nsSelectionType::SEL_GRF; @@ -1425,7 +1425,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) else { if ( !bHas && - ( !bFrmSel || + ( !bFrameSel || ( bIsGraphicSelection && rSh.GetGraphicType() == GRAPHIC_NONE ) ) ) { @@ -1434,7 +1434,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) else { SfxBoolItem aBool(nWhich, bHas); - if ( bHas && bFrmSel ) + if ( bHas && bFrameSel ) lcl_UpdateIMapDlg( rSh ); rSet.Put(aBool); } @@ -1445,7 +1445,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) case SID_IMAP_EXEC: { bool bDisable = false; - if( !rSh.IsFrmSelected()) + if( !rSh.IsFrameSelected()) bDisable = true; sal_uInt16 nId = SvxIMapDlgChildWindow::GetChildWindowId(); if(!bDisable && pVFrame->HasChildWindow( nId )) @@ -1469,7 +1469,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) case FN_BACKSPACE: case SID_DELETE: - if ( ( rSh.HasReadonlySel() && !rSh.CrsrInsideInputField() ) + if ( ( rSh.HasReadonlySel() && !rSh.CursorInsideInputField() ) || rSh.IsSelObjProtected( FlyProtectFlags::Content|FlyProtectFlags::Parent ) != FlyProtectFlags::NONE ) { rSet.DisableItem( nWhich ); @@ -1553,13 +1553,13 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) bool bObj = 0 != rSh.IsObjSelected(); bool bParentCntProt = rSh.IsSelObjProtected( FlyProtectFlags::Content|FlyProtectFlags::Parent ) != FlyProtectFlags::NONE; - if( !bParentCntProt && (bObj || rSh.IsFrmSelected())) + if( !bParentCntProt && (bObj || rSh.IsFrameSelected())) { SfxItemSet aSet(GetPool(), RES_ANCHOR, RES_ANCHOR); if(bObj) rSh.GetObjAttr(aSet); else - rSh.GetFlyFrmAttr(aSet); + rSh.GetFlyFrameAttr(aSet); RndStdIds eSet = static_cast<const SwFormatAnchor&>(aSet.Get(RES_ANCHOR)).GetAnchorId(); const bool bSet = ((nWhich == FN_TOOL_ANCHOR_PAGE) && @@ -1623,7 +1623,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) bool bObj = 0 != rSh.IsObjSelected(); bool bParentCntProt = rSh.IsSelObjProtected( FlyProtectFlags::Content|FlyProtectFlags::Parent ) != FlyProtectFlags::NONE; - if( !bParentCntProt && (bObj || rSh.IsFrmSelected())) + if( !bParentCntProt && (bObj || rSh.IsFrameSelected())) { SfxItemSet aSet(GetPool(), RES_OPAQUE, RES_ANCHOR); int nAnchorType; @@ -1634,7 +1634,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) } else { - rSh.GetFlyFrmAttr(aSet); + rSh.GetFlyFrameAttr(aSet); nAnchorType = static_cast<const SwFormatAnchor&>(aSet.Get(RES_ANCHOR)).GetAnchorId(); } const SwFormatSurround& rWrap = static_cast<const SwFormatSurround&>(aSet.Get(RES_SURROUND)); @@ -1697,7 +1697,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) if( AddGrfUpdateSlot( nWhich )) rSh.GetGraphic(false); // start the loading } - else if( rSh.IsFrmSelected() ) + else if( rSh.IsFrameSelected() ) { // #i102253# applied patch from OD (see task) bDisable = @@ -1799,13 +1799,13 @@ void SwBaseShell::SetWrapMode( sal_uInt16 nSlot ) { SwWrtShell &rSh = GetShell(); bool bObj = 0 != rSh.IsObjSelected(); - if( bObj || rSh.IsFrmSelected()) + if( bObj || rSh.IsFrameSelected()) { SfxItemSet aSet(GetPool(), RES_OPAQUE, RES_SURROUND); if(bObj) rSh.GetObjAttr(aSet); else - rSh.GetFlyFrmAttr(aSet); + rSh.GetFlyFrameAttr(aSet); SwFormatSurround aWrap( static_cast<const SwFormatSurround&>(aSet.Get(RES_SURROUND)) ); SwSurround nOldSurround(aWrap.GetSurround()); SwSurround nSurround = SURROUND_PARALLEL; @@ -1876,18 +1876,18 @@ void SwBaseShell::SetWrapMode( sal_uInt16 nSlot ) rSh.SelectionToHell(); } else - rSh.SetFlyFrmAttr(aSet); + rSh.SetFlyFrameAttr(aSet); } } //Force update of the status line -void SwBaseShell::SetFrmMode(FlyMode eMode, SwWrtShell *pSh ) +void SwBaseShell::SetFrameMode(FlyMode eMode, SwWrtShell *pSh ) { eFrameMode = eMode; SfxBindings &rBnd = pSh->GetView().GetViewFrame()->GetBindings(); - if( eMode == FLY_DRAG || pSh->IsFrmSelected() || pSh->IsObjSelected() ) + if( eMode == FLY_DRAG || pSh->IsFrameSelected() || pSh->IsObjSelected() ) { const SfxPointItem aTmp1( SID_ATTR_POSITION, pSh->GetAnchorObjDiff()); const SvxSizeItem aTmp2( SID_ATTR_SIZE, pSh->GetObjSize()); @@ -1921,9 +1921,9 @@ SwBaseShell::~SwBaseShell() if( rView.GetCurShell() == this ) rView.ResetSubShell(); - Link<SwCrsrShell&,void> aTmp( LINK( this, SwBaseShell, GraphicArrivedHdl)); + Link<SwCursorShell&,void> aTmp( LINK( this, SwBaseShell, GraphicArrivedHdl)); if( aTmp == rView.GetWrtShell().GetGrfArrivedLnk() ) - rView.GetWrtShell().SetGrfArrivedLnk( Link<SwCrsrShell&,void>() ); + rView.GetWrtShell().SetGrfArrivedLnk( Link<SwCursorShell&,void>() ); } void SwBaseShell::ExecTextCtrl( SfxRequest& rReq ) @@ -2158,7 +2158,7 @@ void SwBaseShell::GetBckColState(SfxItemSet &rSet) if(nSelType & nsSelectionType::SEL_GRF || nsSelectionType::SEL_FRM & nSelType) { - rSh.GetFlyFrmAttr(aCoreSet); + rSh.GetFlyFrameAttr(aCoreSet); } else { @@ -2217,7 +2217,7 @@ void SwBaseShell::ExecBckCol(SfxRequest& rReq) if((nsSelectionType::SEL_FRM & nSelType) || (nsSelectionType::SEL_GRF & nSelType)) { - rSh.GetFlyFrmAttr(aCoreSet); + rSh.GetFlyFrameAttr(aCoreSet); } else { @@ -2286,7 +2286,7 @@ void SwBaseShell::ExecBckCol(SfxRequest& rReq) } else { - rSh.SetFlyFrmAttr(aCoreSet); + rSh.SetFlyFrameAttr(aCoreSet); } } else @@ -2323,9 +2323,9 @@ void SwBaseShell::GetBorderState(SfxItemSet &rSet) rSh.GetTabBorders( aCoreSet ); rSet.Put( aCoreSet ); } - else if ( rSh.IsFrmSelected() ) + else if ( rSh.IsFrameSelected() ) { - SwFlyFrmAttrMgr aMgr( false, &rSh, FRMMGR_TYPE_NONE ); + SwFlyFrameAttrMgr aMgr( false, &rSh, FRMMGR_TYPE_NONE ); rSet.Put( aMgr.GetAttrSet() ); bPrepare = false; } @@ -2415,10 +2415,10 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) pOutSet = pDlg->GetOutputItemSet(); } } - else if ( rSh.IsFrmSelected() ) + else if ( rSh.IsFrameSelected() ) { // Set border attributes via Frame-Manager - SwFlyFrmAttrMgr aMgr( false, &rSh, FRMMGR_TYPE_NONE ); + SwFlyFrameAttrMgr aMgr( false, &rSh, FRMMGR_TYPE_NONE ); aSet.Put( aMgr.GetAttrSet() ); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); @@ -2429,7 +2429,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) if ( pDlg->Execute() == RET_OK ) { aMgr.SetAttrSet( *pDlg->GetOutputItemSet() ); - aMgr.UpdateFlyFrm(); + aMgr.UpdateFlyFrame(); pOutSet = pDlg->GetOutputItemSet(); } } @@ -2485,10 +2485,10 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) pOutSet = pDlg->GetOutputItemSet(); } } - else if ( rSh.IsFrmSelected() ) + else if ( rSh.IsFrameSelected() ) { - rSh.GetFlyFrmAttr( aSet ); + rSh.GetFlyFrameAttr( aSet ); pDlg.reset(pFact->CreateSfxDialog( pMDI, aSet, rView.GetViewFrame()->GetFrame().GetFrameInterface(), @@ -2496,7 +2496,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) OSL_ENSURE(pDlg, "Dialog creation failed!"); if ( pDlg->Execute() == RET_OK ) { - rSh.SetFlyFrmAttr((SfxItemSet &) *pDlg->GetOutputItemSet() ); + rSh.SetFlyFrameAttr((SfxItemSet &) *pDlg->GetOutputItemSet() ); pOutSet = pDlg->GetOutputItemSet(); } } @@ -2543,7 +2543,7 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest ) const SfxItemSet* pArgs = _rRequest.GetArgs(); SwWrtShell& rSh = GetShell(); - if ( !( rSh.GetFrmType( nullptr, true ) & FrmTypeFlags::FOOTNOTE ) ) + if ( !( rSh.GetFrameType( nullptr, true ) & FrameTypeFlags::FOOTNOTE ) ) { SwView &rTempView = GetView(); // Because GetView() does not work after the shell exchange bool bHTMLMode = 0 != (::GetHtmlMode(rTempView.GetDocShell())&HTMLMODE_ON); @@ -2733,13 +2733,13 @@ void SwBaseShell::GetGalleryState( SfxItemSet &rSet ) rLst.push_back( SW_RESSTR( STR_SWBG_OLE ) ); nOlePos = nPos++; } - const FrmTypeFlags nType = rSh.GetFrmType(nullptr,true); - if ( nType & FrmTypeFlags::HEADER ) + const FrameTypeFlags nType = rSh.GetFrameType(nullptr,true); + if ( nType & FrameTypeFlags::HEADER ) { rLst.push_back( SW_RESSTR( STR_SWBG_HEADER ) ); nHeaderPos = nPos++; } - if ( nType & FrmTypeFlags::FOOTER ) + if ( nType & FrameTypeFlags::FOOTER ) { rLst.push_back( SW_RESSTR( STR_SWBG_FOOTER ) ); nFooterPos = nPos; @@ -2793,7 +2793,7 @@ void SwBaseShell::ExecuteGallery(SfxRequest &rReq) { SfxItemSet aCoreSet(GetPool(), RES_BACKGROUND, RES_BACKGROUND); aCoreSet.Put( aBrush ); - rSh.SetFlyFrmAttr( aCoreSet ); + rSh.SetFlyFrameAttr( aCoreSet ); } else if ( nPos == nPagePos || nPos == nHeaderPos || nPos == nFooterPos ) { diff --git a/sw/source/uibase/shells/beziersh.cxx b/sw/source/uibase/shells/beziersh.cxx index fbe4f54d956a..2595441bcecb 100644 --- a/sw/source/uibase/shells/beziersh.cxx +++ b/sw/source/uibase/shells/beziersh.cxx @@ -89,9 +89,9 @@ void SwBezierShell::Execute(SfxRequest &rReq) else { pSh->DelSelectedObj(); - if (pSh->IsSelFrmMode()) + if (pSh->IsSelFrameMode()) { - pSh->LeaveSelFrmMode(); + pSh->LeaveSelFrameMode(); pSh->NoEdit(); } GetView().AttrChangedNotify(pSh); // Shell change if applicable... diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx index a5fcf6b350b7..6e76baf97afe 100644 --- a/sw/source/uibase/shells/drwbassh.cxx +++ b/sw/source/uibase/shells/drwbassh.cxx @@ -227,7 +227,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) aSet.Put(SfxInt16Item(SID_ATTR_TRANSFORM_ANCHOR, nAnchor)); bool bRTL; bool bVertL2R; - aSet.Put(SfxBoolItem(SID_ATTR_TRANSFORM_IN_VERTICAL_TEXT, pSh->IsFrmVertical(true, bRTL, bVertL2R))); + aSet.Put(SfxBoolItem(SID_ATTR_TRANSFORM_IN_VERTICAL_TEXT, pSh->IsFrameVertical(true, bRTL, bVertL2R))); aSet.Put(SfxBoolItem(SID_ATTR_TRANSFORM_IN_RTL_TEXT, bRTL)); SwFrameFormat* pFrameFormat = FindFrameFormat( pObj ); @@ -268,7 +268,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) SfxItemState::SET != pOutSet->GetItemState( SID_ATTR_TRANSFORM_POS_Y, false ); - SfxItemSet aFrmAttrSet(GetPool(), RES_FRMATR_BEGIN, RES_FRMATR_END - 1); + SfxItemSet aFrameAttrSet(GetPool(), RES_FRMATR_BEGIN, RES_FRMATR_END - 1); bool bSingleSelection = rMarkList.GetMarkCount() == 1; @@ -283,7 +283,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) { SwFormatAnchor aAnchor(pFrameFormat->GetAnchor()); aAnchor.SetType((RndStdIds)static_cast<const SfxInt16Item*>(pAnchorItem)->GetValue()); - aFrmAttrSet.Put( aAnchor ); + aFrameAttrSet.Put( aAnchor ); } } const SfxPoolItem* pHoriOrient = nullptr; @@ -306,7 +306,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) aHOrient.SetPos( static_cast<const SfxInt32Item*>(pHoriPosition)->GetValue()); if(pHoriMirror) aHOrient.SetPosToggle( static_cast<const SfxBoolItem*>(pHoriMirror)->GetValue()); - aFrmAttrSet.Put(aHOrient); + aFrameAttrSet.Put(aHOrient); } const SfxPoolItem* pVertOrient = nullptr; @@ -325,15 +325,15 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) static_cast<const SfxInt16Item*>(pVertRelation)->GetValue()); if(pVertPosition) aVOrient.SetPos( static_cast<const SfxInt32Item*>(pVertPosition)->GetValue()); - aFrmAttrSet.Put( aVOrient ); + aFrameAttrSet.Put( aVOrient ); } const SfxPoolItem* pFollowItem = nullptr; pOutSet->GetItemState(RES_FOLLOW_TEXT_FLOW, false, &pFollowItem); if(pFollowItem) - aFrmAttrSet.Put(*pFollowItem); + aFrameAttrSet.Put(*pFollowItem); - if(aFrmAttrSet.Count()) - pSh->SetDrawingAttr(aFrmAttrSet); + if(aFrameAttrSet.Count()) + pSh->SetDrawingAttr(aFrameAttrSet); rBind.InvalidateAll(false); @@ -380,9 +380,9 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) GetView().LeaveDrawCreate(); // Switch to selection mode } - if (pSh->IsSelFrmMode()) + if (pSh->IsSelFrameMode()) { - pSh->LeaveSelFrmMode(); + pSh->LeaveSelFrameMode(); // #105852# FME } } @@ -779,7 +779,7 @@ IMPL_LINK_TYPED(SwDrawBaseShell, ValidatePosition, SvxSwFrameValidation&, rValid { bool bRTL; bool bVertL2R; - bIsInVertical = pSh->IsFrmVertical(true, bRTL, bVertL2R); + bIsInVertical = pSh->IsFrameVertical(true, bRTL, bVertL2R); } if(bIsInVertical) { diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx index 3473a2ffa4ab..adc98c129b39 100644 --- a/sw/source/uibase/shells/frmsh.cxx +++ b/sw/source/uibase/shells/frmsh.cxx @@ -88,7 +88,7 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::uno; // Prototypes -static void lcl_FrmGetMaxLineWidth(const SvxBorderLine* pBorderLine, SvxBorderLine& rBorderLine); +static void lcl_FrameGetMaxLineWidth(const SvxBorderLine* pBorderLine, SvxBorderLine& rBorderLine); static const SwFrameFormat* lcl_GetFrameFormatByName(SwWrtShell& rSh, const OUString& rName) { const size_t nCount = rSh.GetFlyCount(FLYCNTTYPE_FRM); @@ -116,7 +116,7 @@ void SwFrameShell::InitInterface_Impl() void SwFrameShell::Execute(SfxRequest &rReq) { - //First those who do not need FrmMgr. + //First those who do not need FrameMgr. SwWrtShell &rSh = GetShell(); bool bMore = false; const SfxItemSet* pArgs = rReq.GetArgs(); @@ -126,7 +126,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) switch ( nSlot ) { case FN_FRAME_TO_ANCHOR: - if ( rSh.IsFrmSelected() ) + if ( rSh.IsFrameSelected() ) { rSh.GotoFlyAnchor(); rSh.EnterStdMode(); @@ -166,7 +166,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) nCols = static_cast<const SfxUInt16Item *>(pItem)->GetValue(); SfxItemSet aSet(GetPool(),RES_COL,RES_COL); - rSh.GetFlyFrmAttr( aSet ); + rSh.GetFlyFrameAttr( aSet ); SwFormatCol aCol(static_cast<const SwFormatCol&>(aSet.Get(RES_COL))); // GutterWidth will not always passed, hence get firstly // (see view2: Execute on this slot) @@ -184,7 +184,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) else { rSh.StartAllAction(); - rSh.SetFlyFrmAttr( aSet ); + rSh.SetFlyFrameAttr( aSet ); rSh.SetModified(); rSh.EndAllAction(); } @@ -201,7 +201,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) const OUString& rTarget = rHLinkItem.GetTargetFrame(); SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL ); - rSh.GetFlyFrmAttr( aSet ); + rSh.GetFlyFrameAttr( aSet ); SwFormatURL aURL( static_cast<const SwFormatURL&>(aSet.Get( RES_URL )) ); OUString sOldName(rHLinkItem.GetName().toAsciiUpperCase()); @@ -222,7 +222,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) aURL.SetTargetFrameName(rTarget); aSet.Put( aURL ); - rSh.SetFlyFrmAttr( aSet ); + rSh.SetFlyFrameAttr( aSet ); } } break; @@ -264,7 +264,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) return; } - SwFlyFrmAttrMgr aMgr( false, &rSh, FRMMGR_TYPE_NONE ); + SwFlyFrameAttrMgr aMgr( false, &rSh, FRMMGR_TYPE_NONE ); bool bUpdateMgr = true; bool bCopyToFormat = false; switch ( nSlot ) @@ -429,12 +429,12 @@ void SwFrameShell::Execute(SfxRequest &rReq) } const SwRect &rPg = rSh.GetAnyCurRect(RECT_PAGE); - SwFormatFrmSize aFrmSize(ATT_VAR_SIZE, rPg.Width(), rPg.Height()); - aFrmSize.SetWhich(GetPool().GetWhich(SID_ATTR_PAGE_SIZE)); - aSet.Put(aFrmSize); + SwFormatFrameSize aFrameSize(ATT_VAR_SIZE, rPg.Width(), rPg.Height()); + aFrameSize.SetWhich(GetPool().GetWhich(SID_ATTR_PAGE_SIZE)); + aSet.Put(aFrameSize); const SwRect &rPr = rSh.GetAnyCurRect(RECT_PAGE_PRT); - SwFormatFrmSize aPrtSize(ATT_VAR_SIZE, rPr.Width(), rPr.Height()); + SwFormatFrameSize aPrtSize(ATT_VAR_SIZE, rPr.Width(), rPr.Height()); aPrtSize.SetWhich(GetPool().GetWhich(FN_GET_PRINT_AREA)); aSet.Put(aPrtSize); @@ -442,10 +442,10 @@ void SwFrameShell::Execute(SfxRequest &rReq) aSet.SetParent( aMgr.GetAttrSet().GetParent() ); // On % values initialize size - SwFormatFrmSize& rSize = const_cast<SwFormatFrmSize&>(static_cast<const SwFormatFrmSize&>(aSet.Get(RES_FRM_SIZE))); - if (rSize.GetWidthPercent() && rSize.GetWidthPercent() != SwFormatFrmSize::SYNCED) + SwFormatFrameSize& rSize = const_cast<SwFormatFrameSize&>(static_cast<const SwFormatFrameSize&>(aSet.Get(RES_FRM_SIZE))); + if (rSize.GetWidthPercent() && rSize.GetWidthPercent() != SwFormatFrameSize::SYNCED) rSize.SetWidth(rSh.GetAnyCurRect(RECT_FLY_EMBEDDED).Width()); - if (rSize.GetHeightPercent() && rSize.GetHeightPercent() != SwFormatFrmSize::SYNCED) + if (rSize.GetHeightPercent() && rSize.GetHeightPercent() != SwFormatFrameSize::SYNCED) rSize.SetHeight(rSh.GetAnyCurRect(RECT_FLY_EMBEDDED).Height()); // disable vertical positioning for Math Objects anchored 'as char' if baseline alignment is activated @@ -463,7 +463,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric) )); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); assert(pFact); - std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateFrmTabDialog( + std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateFrameTabDialog( nSel & nsSelectionType::SEL_GRF ? OUString("PictureDialog") : nSel & nsSelectionType::SEL_OLE ? OUString("ObjectDialog"): OUString("FrameDialog"), @@ -651,7 +651,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) } else { - aMgr.UpdateFlyFrm(); + aMgr.UpdateFlyFrame(); } } @@ -661,7 +661,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet) { SwWrtShell &rSh = GetShell(); bool bHtmlMode = 0 != ::GetHtmlMode(rSh.GetView().GetDocShell()); - if (rSh.IsFrmSelected()) + if (rSh.IsFrameSelected()) { SfxItemSet aSet( rSh.GetAttrPool(), RES_LR_SPACE, RES_UL_SPACE, @@ -669,15 +669,15 @@ void SwFrameShell::GetState(SfxItemSet& rSet) RES_OPAQUE, RES_OPAQUE, RES_PRINT, RES_OPAQUE, 0 ); - rSh.GetFlyFrmAttr( aSet ); + rSh.GetFlyFrameAttr( aSet ); bool bProtect = rSh.IsSelObjProtected(FlyProtectFlags::Pos) != FlyProtectFlags::NONE; bool bParentCntProt = rSh.IsSelObjProtected( FlyProtectFlags::Content|FlyProtectFlags::Parent ) != FlyProtectFlags::NONE; bProtect |= bParentCntProt; - const FrmTypeFlags eFrmType = rSh.GetFrmType(nullptr,true); - SwFlyFrmAttrMgr aMgr( false, &rSh, FRMMGR_TYPE_NONE ); + const FrameTypeFlags eFrameType = rSh.GetFrameType(nullptr,true); + SwFlyFrameAttrMgr aMgr( false, &rSh, FRMMGR_TYPE_NONE ); SfxWhichIter aIter( rSet ); sal_uInt16 nWhich = aIter.FirstWhich(); @@ -687,7 +687,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet) { case RES_FRM_SIZE: { - SwFormatFrmSize aSz(aMgr.GetFrmSize()); + SwFormatFrameSize aSz(aMgr.GetFrameSize()); rSet.Put(aSz); } break; @@ -711,7 +711,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet) case FN_FRAME_ALIGN_HORZ_CENTER: case FN_FRAME_ALIGN_HORZ_RIGHT: case FN_FRAME_ALIGN_HORZ_LEFT: - if ( (eFrmType & FrmTypeFlags::FLY_INCNT) || + if ( (eFrameType & FrameTypeFlags::FLY_INCNT) || bProtect || ((nWhich == FN_FRAME_ALIGN_HORZ_CENTER || nWhich == SID_OBJECT_ALIGN_CENTER) && bHtmlMode )) @@ -723,7 +723,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet) case FN_FRAME_ALIGN_VERT_CHAR_TOP: case FN_FRAME_ALIGN_VERT_CHAR_CENTER: case FN_FRAME_ALIGN_VERT_CHAR_BOTTOM: - if ( !(eFrmType & FrmTypeFlags::FLY_INCNT) || bProtect + if ( !(eFrameType & FrameTypeFlags::FLY_INCNT) || bProtect || (bHtmlMode && FN_FRAME_ALIGN_VERT_CHAR_BOTTOM == nWhich) ) rSet.DisableItem( nWhich ); break; @@ -735,12 +735,12 @@ void SwFrameShell::GetState(SfxItemSet& rSet) case FN_FRAME_ALIGN_VERT_TOP: case FN_FRAME_ALIGN_VERT_CENTER: case FN_FRAME_ALIGN_VERT_BOTTOM: - if ( bProtect || (bHtmlMode && eFrmType & FrmTypeFlags::FLY_ATCNT)) + if ( bProtect || (bHtmlMode && eFrameType & FrameTypeFlags::FLY_ATCNT)) rSet.DisableItem( nWhich ); else { sal_uInt16 nId = 0; - if (eFrmType & FrmTypeFlags::FLY_INCNT) + if (eFrameType & FrameTypeFlags::FLY_INCNT) { switch (nWhich) { @@ -769,8 +769,8 @@ void SwFrameShell::GetState(SfxItemSet& rSet) const SwFrameFormat* pFormat = rSh.IsFlyInFly(); if (pFormat) { - const SwFormatFrmSize& rFrmSz = pFormat->GetFrmSize(); - if (rFrmSz.GetHeightSizeType() != ATT_FIX_SIZE) + const SwFormatFrameSize& rFrameSz = pFormat->GetFrameSize(); + if (rFrameSz.GetHeightSizeType() != ATT_FIX_SIZE) { rSet.DisableItem( nWhich ); break; @@ -801,7 +801,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet) const SfxPoolItem* pItem; SfxItemSet aURLSet(GetPool(), RES_URL, RES_URL); - rSh.GetFlyFrmAttr( aURLSet ); + rSh.GetFlyFrameAttr( aURLSet ); if(SfxItemState::SET == aURLSet.GetItemState(RES_URL, true, &pItem)) { @@ -948,7 +948,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq) { SwWrtShell &rSh = GetShell(); bool bDefault = false; - if (!rSh.IsFrmSelected()) + if (!rSh.IsFrameSelected()) return; // At first pick the default BoxItem out of the pool. // If unequal to regular box item, then it has already @@ -958,7 +958,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq) const SfxItemSet *pArgs = rReq.GetArgs(); SfxItemSet aFrameSet(rSh.GetAttrPool(), RES_BOX, RES_BOX); - rSh.GetFlyFrmAttr( aFrameSet ); + rSh.GetFlyFrameAttr( aFrameSet ); const SvxBoxItem& rBoxItem = static_cast<const SvxBoxItem&>(aFrameSet.Get(RES_BOX)); if (pPoolBoxItem == &rBoxItem) @@ -981,13 +981,13 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq) const SvxBorderLine* pBorderLine; if ((pBorderLine = aBoxItem.GetTop()) != nullptr) - lcl_FrmGetMaxLineWidth(pBorderLine, aBorderLine); + lcl_FrameGetMaxLineWidth(pBorderLine, aBorderLine); if ((pBorderLine = aBoxItem.GetBottom()) != nullptr) - lcl_FrmGetMaxLineWidth(pBorderLine, aBorderLine); + lcl_FrameGetMaxLineWidth(pBorderLine, aBorderLine); if ((pBorderLine = aBoxItem.GetLeft()) != nullptr) - lcl_FrmGetMaxLineWidth(pBorderLine, aBorderLine); + lcl_FrameGetMaxLineWidth(pBorderLine, aBorderLine); if ((pBorderLine = aBoxItem.GetRight()) != nullptr) - lcl_FrmGetMaxLineWidth(pBorderLine, aBorderLine); + lcl_FrameGetMaxLineWidth(pBorderLine, aBorderLine); if(aBorderLine.GetOutWidth() == 0) { @@ -1117,11 +1117,11 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq) rSh.AutoUpdateFrame(pFormat, aFrameSet); } else - rSh.SetFlyFrmAttr( aFrameSet ); + rSh.SetFlyFrameAttr( aFrameSet ); } -static void lcl_FrmGetMaxLineWidth(const SvxBorderLine* pBorderLine, SvxBorderLine& rBorderLine) +static void lcl_FrameGetMaxLineWidth(const SvxBorderLine* pBorderLine, SvxBorderLine& rBorderLine) { if(pBorderLine->GetWidth() > rBorderLine.GetWidth()) rBorderLine.SetWidth(pBorderLine->GetWidth()); @@ -1137,7 +1137,7 @@ void SwFrameShell::GetLineStyleState(SfxItemSet &rSet) if (bParentCntProt) { - if (rSh.IsFrmSelected()) + if (rSh.IsFrameSelected()) rSet.DisableItem( SID_FRAME_LINECOLOR ); rSet.DisableItem( SID_ATTR_BORDER ); @@ -1145,11 +1145,11 @@ void SwFrameShell::GetLineStyleState(SfxItemSet &rSet) } else { - if (rSh.IsFrmSelected()) + if (rSh.IsFrameSelected()) { SfxItemSet aFrameSet( rSh.GetAttrPool(), RES_BOX, RES_BOX ); - rSh.GetFlyFrmAttr(aFrameSet); + rSh.GetFlyFrameAttr(aFrameSet); const SvxBorderLine* pLine = static_cast<const SvxBoxItem&>(aFrameSet.Get(RES_BOX)).GetTop(); rSet.Put(SvxColorItem(pLine ? pLine->GetColor() : Color(), SID_FRAME_LINECOLOR)); @@ -1165,7 +1165,7 @@ void SwFrameShell::StateInsert(SfxItemSet &rSet) { rSet.DisableItem(FN_INSERT_FRAME); } - else if ( GetShell().CrsrInsideInputField() ) + else if ( GetShell().CursorInsideInputField() ) { rSet.DisableItem(FN_INSERT_FRAME); } @@ -1176,9 +1176,9 @@ void SwFrameShell::GetDrawAttrStateTextFrame(SfxItemSet &rSet) { SwWrtShell &rSh = GetShell(); - if(rSh.IsFrmSelected()) + if(rSh.IsFrameSelected()) { - rSh.GetFlyFrmAttr(rSet); + rSh.GetFlyFrameAttr(rSet); } else { @@ -1199,9 +1199,9 @@ void SwFrameShell::ExecDrawAttrArgsTextFrame(SfxRequest& rReq) if(pArgs) { - if(rSh.IsFrmSelected()) + if(rSh.IsFrameSelected()) { - rSh.SetFlyFrmAttr(const_cast< SfxItemSet& >(*pArgs)); + rSh.SetFlyFrameAttr(const_cast< SfxItemSet& >(*pArgs)); } else { @@ -1243,14 +1243,14 @@ void SwFrameShell::ExecDrawDlgTextFrame(SfxRequest& rReq) { SwWrtShell& rSh = GetShell(); - if(rSh.IsFrmSelected()) + if(rSh.IsFrameSelected()) { SdrView* pView = rSh.GetDrawView(); SdrModel* pDoc = pView->GetModel(); SfxItemSet aNewAttr(pDoc->GetItemPool()); // get attributes from FlyFrame - rSh.GetFlyFrmAttr(aNewAttr); + rSh.GetFlyFrameAttr(aNewAttr); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); assert(pFact); @@ -1264,7 +1264,7 @@ void SwFrameShell::ExecDrawDlgTextFrame(SfxRequest& rReq) if(RET_OK == pDlg->Execute()) { // set attributes at FlyFrame - rSh.SetFlyFrmAttr(const_cast< SfxItemSet& >(*pDlg->GetOutputItemSet())); + rSh.SetFlyFrameAttr(const_cast< SfxItemSet& >(*pDlg->GetOutputItemSet())); static sal_uInt16 aInval[] = { @@ -1304,7 +1304,7 @@ void SwFrameShell::DisableStateTextFrame(SfxItemSet &rSet) { SwWrtShell& rSh = GetShell(); - if(!rSh.IsFrmSelected()) + if(!rSh.IsFrameSelected()) { rSet.DisableItem(nWhich); } diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx index 749474d7c80f..901d9c4cfee0 100644 --- a/sw/source/uibase/shells/grfsh.cxx +++ b/sw/source/uibase/shells/grfsh.cxx @@ -85,13 +85,13 @@ class SwGrfShell::SwExternalToolEdit { private: SwWrtShell *const m_pShell; - ::std::shared_ptr<SwUnoCrsr> const m_pCursor; + ::std::shared_ptr<SwUnoCursor> const m_pCursor; public: explicit SwExternalToolEdit(SwWrtShell *const pShell) : m_pShell(pShell) , m_pCursor( // need only Point, must point to SwGrfNode - pShell->GetDoc()->CreateUnoCrsr( + pShell->GetDoc()->CreateUnoCursor( *pShell->GetCurrentShellCursor().GetPoint())) { } @@ -211,7 +211,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) case FN_FORMAT_GRAFIC_DLG: case FN_DRAW_WRAP_DLG: { - SwFlyFrmAttrMgr aMgr( false, &rSh, rSh.IsFrmSelected() ? + SwFlyFrameAttrMgr aMgr( false, &rSh, rSh.IsFrameSelected() ? FRMMGR_TYPE_NONE : FRMMGR_TYPE_GRF); const SwViewOption* pVOpt = rSh.GetViewOptions(); SwViewOption aUsrPref( *pVOpt ); @@ -259,9 +259,9 @@ void SwGrfShell::Execute(SfxRequest &rReq) SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) ); const SwRect* pRect = &rSh.GetAnyCurRect(RECT_PAGE); - SwFormatFrmSize aFrmSize( ATT_VAR_SIZE, pRect->Width(), pRect->Height()); - aFrmSize.SetWhich( GetPool().GetWhich( SID_ATTR_PAGE_SIZE ) ); - aSet.Put( aFrmSize ); + SwFormatFrameSize aFrameSize( ATT_VAR_SIZE, pRect->Width(), pRect->Height()); + aFrameSize.SetWhich( GetPool().GetWhich( SID_ATTR_PAGE_SIZE ) ); + aSet.Put( aFrameSize ); aSet.Put(SfxStringItem(FN_SET_FRM_NAME, rSh.GetFlyName())); if ( nSlot == FN_FORMAT_GRAFIC_DLG ) @@ -271,19 +271,19 @@ void SwGrfShell::Execute(SfxRequest &rReq) } pRect = &rSh.GetAnyCurRect(RECT_PAGE_PRT); - aFrmSize.SetWidth( pRect->Width() ); - aFrmSize.SetHeight( pRect->Height() ); - aFrmSize.SetWhich( GetPool().GetWhich(FN_GET_PRINT_AREA) ); - aSet.Put( aFrmSize ); + aFrameSize.SetWidth( pRect->Width() ); + aFrameSize.SetHeight( pRect->Height() ); + aFrameSize.SetWhich( GetPool().GetWhich(FN_GET_PRINT_AREA) ); + aSet.Put( aFrameSize ); aSet.Put( aMgr.GetAttrSet() ); aSet.SetParent( aMgr.GetAttrSet().GetParent() ); // At percentage values initialize size - SwFormatFrmSize aSizeCopy = static_cast<const SwFormatFrmSize&>(aSet.Get(RES_FRM_SIZE)); - if (aSizeCopy.GetWidthPercent() && aSizeCopy.GetWidthPercent() != SwFormatFrmSize::SYNCED) + SwFormatFrameSize aSizeCopy = static_cast<const SwFormatFrameSize&>(aSet.Get(RES_FRM_SIZE)); + if (aSizeCopy.GetWidthPercent() && aSizeCopy.GetWidthPercent() != SwFormatFrameSize::SYNCED) aSizeCopy.SetWidth(rSh.GetAnyCurRect(RECT_FLY_EMBEDDED).Width()); - if (aSizeCopy.GetHeightPercent() && aSizeCopy.GetHeightPercent() != SwFormatFrmSize::SYNCED) + if (aSizeCopy.GetHeightPercent() && aSizeCopy.GetHeightPercent() != SwFormatFrameSize::SYNCED) aSizeCopy.SetHeight(rSh.GetAnyCurRect(RECT_FLY_EMBEDDED).Height()); // and now set the size for "external" tabpages { @@ -291,8 +291,8 @@ void SwGrfShell::Execute(SfxRequest &rReq) aSet.Put( aSzItm ); Size aSz( aSizeCopy.GetWidthPercent(), aSizeCopy.GetHeightPercent() ); - if( SwFormatFrmSize::SYNCED == aSz.Width() ) aSz.Width() = 0; - if( SwFormatFrmSize::SYNCED == aSz.Height() ) aSz.Height() = 0; + if( SwFormatFrameSize::SYNCED == aSz.Width() ) aSz.Width() = 0; + if( SwFormatFrameSize::SYNCED == aSz.Height() ) aSz.Height() = 0; aSzItm.SetSize( aSz ); aSzItm.SetWhich( SID_ATTR_GRAF_FRMSIZE_PERCENT ); @@ -344,7 +344,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "no dialog factory!"); - std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateFrmTabDialog("PictureDialog", + std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateFrameTabDialog("PictureDialog", GetView().GetViewFrame(), GetView().GetWindow(), aSet, false)); @@ -360,11 +360,11 @@ void SwGrfShell::Execute(SfxRequest &rReq) const SfxPoolItem* pItem; SfxItemSet* pSet = const_cast<SfxItemSet*>(pDlg->GetOutputItemSet()); rReq.Done(*pSet); - // change the 2 frmsize SizeItems to the correct SwFrmSizeItem + // change the 2 frmsize SizeItems to the correct SwFrameSizeItem if( SfxItemState::SET == pSet->GetItemState( SID_ATTR_GRAF_FRMSIZE, false, &pItem )) { - SwFormatFrmSize aSize; + SwFormatFrameSize aSize; const Size& rSz = static_cast<const SvxSizeItem*>(pItem)->GetSize(); aSize.SetWidth( rSz.Width() ); aSize.SetHeight( rSz.Height() ); @@ -396,7 +396,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) { aMgr.SetAttrSet(*pSet); } - aMgr.UpdateFlyFrm(); + aMgr.UpdateFlyFrame(); bool bApplyUsrPref = false; if (SfxItemState::SET == pSet->GetItemState( @@ -665,7 +665,7 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet) if( bParentCntProt || !bIsGrfContent ) bDisable = true; else if ( nWhich == SID_INSERT_GRAPHIC - && rSh.CrsrInsideInputField() ) + && rSh.CursorInsideInputField() ) { bDisable = true; } @@ -857,12 +857,12 @@ void SwGrfShell::ExecuteRotation(SfxRequest &rReq) aTransform.rotate(aRotation); rShell.ReRead(OUString(), OUString(), const_cast<const Graphic*>(&aGraphic)); - SwFlyFrmAttrMgr aManager(false, &rShell, rShell.IsFrmSelected() ? FRMMGR_TYPE_NONE : FRMMGR_TYPE_GRF); + SwFlyFrameAttrMgr aManager(false, &rShell, rShell.IsFrameSelected() ? FRMMGR_TYPE_NONE : FRMMGR_TYPE_GRF); const long nRotatedWidth = aManager.GetSize().Height(); const long nRotatedHeight = aManager.GetSize().Width(); Size aSize(nRotatedWidth, nRotatedHeight); aManager.SetSize(aSize); - aManager.UpdateFlyFrm(); + aManager.UpdateFlyFrame(); SfxItemSet aSet( rShell.GetAttrPool(), RES_GRFATR_CROPGRF, RES_GRFATR_CROPGRF ); rShell.GetCurAttr( aSet ); diff --git a/sw/source/uibase/shells/langhelper.cxx b/sw/source/uibase/shells/langhelper.cxx index 1ded2e66fbc1..8ac54052c7c1 100644 --- a/sw/source/uibase/shells/langhelper.cxx +++ b/sw/source/uibase/shells/langhelper.cxx @@ -538,14 +538,14 @@ namespace SwLangHelper { // string for guessing language OUString aText; - SwPaM *pCrsr = rSh.GetCrsr(); - SwTextNode *pNode = pCrsr->GetNode().GetTextNode(); + SwPaM *pCursor = rSh.GetCursor(); + SwTextNode *pNode = pCursor->GetNode().GetTextNode(); if (pNode) { aText = pNode->GetText(); if (!aText.isEmpty()) { - sal_Int32 nEnd = pCrsr->GetPoint()->nContent.GetIndex(); + sal_Int32 nEnd = pCursor->GetPoint()->nContent.GetIndex(); // at most 100 chars to the left... const sal_Int32 nStt = nEnd > 100 ? nEnd - 100 : 0; // ... and 100 to the right of the cursor position diff --git a/sw/source/uibase/shells/listsh.cxx b/sw/source/uibase/shells/listsh.cxx index 91d0c7355d6d..38d26fb7f9bd 100644 --- a/sw/source/uibase/shells/listsh.cxx +++ b/sw/source/uibase/shells/listsh.cxx @@ -136,7 +136,7 @@ void SwListShell::Execute(SfxRequest &rReq) SwWrtShell& rSh = GetShell(); // #i35572# - const SwNumRule* pCurRule = rSh.GetNumRuleAtCurrCrsrPos(); + const SwNumRule* pCurRule = rSh.GetNumRuleAtCurrCursorPos(); OSL_ENSURE( pCurRule, "SwListShell::Execute without NumRule" ); bool bOutline = pCurRule && pCurRule->IsOutlineRule(); @@ -260,7 +260,7 @@ void SwListShell::GetState(SfxItemSet &rSet) break; case FN_NUM_BULLET_NONUM: - if ( rSh.CrsrInsideInputField() ) + if ( rSh.CursorInsideInputField() ) { rSet.DisableItem(nWhich); } diff --git a/sw/source/uibase/shells/mediash.cxx b/sw/source/uibase/shells/mediash.cxx index b39ade8b7b2e..34473e44c0cf 100644 --- a/sw/source/uibase/shells/mediash.cxx +++ b/sw/source/uibase/shells/mediash.cxx @@ -99,8 +99,8 @@ void SwMediaShell::ExecMedia(SfxRequest &rReq) pSh->SetModified(); pSh->DelSelectedObj(); - if( pSh->IsSelFrmMode() ) - pSh->LeaveSelFrmMode(); + if( pSh->IsSelFrameMode() ) + pSh->LeaveSelFrameMode(); GetView().AttrChangedNotify( pSh ); } diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx index 55162768b06d..c9ea88a49c18 100644 --- a/sw/source/uibase/shells/tabsh.cxx +++ b/sw/source/uibase/shells/tabsh.cxx @@ -151,7 +151,7 @@ static SwTableRep* lcl_TableParamToItemSet( SfxItemSet& rSet, SwWrtShell &rSh ) rSet.Put( SfxUInt16Item( FN_PARAM_TABLE_HEADLINE, rSh.GetRowsToRepeat() ) ); rSet.Put( pFormat->GetShadow() ); rSet.Put(SfxUInt16Item(FN_TABLE_SET_VERT_ALIGN, rSh.GetBoxAlign())); - rSet.Put( pFormat->GetFrmDir() ); + rSet.Put( pFormat->GetFrameDir() ); SvxULSpaceItem aULSpace( pFormat->GetULSpace() ); rSet.Put( aULSpace ); @@ -182,8 +182,8 @@ static SwTableRep* lcl_TableParamToItemSet( SfxItemSet& rSet, SwWrtShell &rSh ) SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER ); // Table variant: If multiple table cells are selected. - rSh.GetCrsr(); //Thus GetCrsrCnt() returns the right thing - aBoxInfo.SetTable ((rSh.IsTableMode() && rSh.GetCrsrCnt() > 1) || + rSh.GetCursor(); //Thus GetCursorCnt() returns the right thing + aBoxInfo.SetTable ((rSh.IsTableMode() && rSh.GetCursorCnt() > 1) || !bTableSel); // Always show distance field. aBoxInfo.SetDist (true); @@ -368,7 +368,7 @@ void ItemSetToTableParam( const SfxItemSet& rSet, } else { - SwFormatFrmSize aSz( ATT_VAR_SIZE, nWidth ); + SwFormatFrameSize aSz( ATT_VAR_SIZE, nWidth ); if(pRep->GetWidthPercent()) { aSz.SetWidthPercent( (sal_uInt8)pRep->GetWidthPercent() ); @@ -451,7 +451,7 @@ void SwTableShell::Execute(SfxRequest &rReq) const SfxItemSet* pArgs = rReq.GetArgs(); SwWrtShell &rSh = GetShell(); - // At first the slots which doesn't need a FrmMgr. + // At first the slots which doesn't need a FrameMgr. bool bMore = false; const SfxPoolItem* pItem = nullptr; sal_uInt16 nSlot = rReq.GetSlot(); @@ -689,7 +689,7 @@ void SwTableShell::Execute(SfxRequest &rReq) break; case FN_TABLE_OPTIMAL_HEIGHT: { - const SwFormatFrmSize aSz; + const SwFormatFrameSize aSz; rSh.SetRowHeight( aSz ); bCallDone = true; break; @@ -1240,7 +1240,7 @@ void SwTableShell::GetState(SfxItemSet &rSet) break; case FN_INSERT_TABLE: - if ( rSh.CrsrInsideInputField() ) + if ( rSh.CursorInsideInputField() ) { rSet.DisableItem( nSlot ); } @@ -1249,7 +1249,7 @@ void SwTableShell::GetState(SfxItemSet &rSet) case FN_TABLE_OPTIMAL_HEIGHT: { // Disable if auto height already is enabled. - SwFormatFrmSize *pSz; + SwFormatFrameSize *pSz; rSh.GetRowHeight( pSz ); if ( pSz ) { @@ -1381,7 +1381,7 @@ SwTableShell::SwTableShell(SwView &_rView) : SfxShell::SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_Table)); } -void SwTableShell::GetFrmBorderState(SfxItemSet &rSet) +void SwTableShell::GetFrameBorderState(SfxItemSet &rSet) { SfxItemSet aCoreSet( GetPool(), RES_BOX, RES_BOX, @@ -1444,7 +1444,7 @@ void SwTableShell::ExecNumberFormat(SfxRequest& rReq) const SfxItemSet* pArgs = rReq.GetArgs(); SwWrtShell &rSh = GetShell(); - // At first the slots, which doesn't need a FrmMgr. + // At first the slots, which doesn't need a FrameMgr. const SfxPoolItem* pItem = nullptr; const sal_uInt16 nSlot = rReq.GetSlot(); if(pArgs) diff --git a/sw/source/uibase/shells/textdrw.cxx b/sw/source/uibase/shells/textdrw.cxx index 6d3115710e58..b0b4269cd15d 100644 --- a/sw/source/uibase/shells/textdrw.cxx +++ b/sw/source/uibase/shells/textdrw.cxx @@ -120,7 +120,7 @@ void SwBaseShell::InsertURLButton(const OUString& rURL, const OUString& rTarget, if (rSh.IsObjSelected()) { - rSh.UnSelectFrm(); + rSh.UnSelectFrame(); } } rSh.EndUndo( UNDO_UI_INSERT_URLBTN ); diff --git a/sw/source/uibase/shells/textfld.cxx b/sw/source/uibase/shells/textfld.cxx index 869d845de3cc..652f607d731e 100644 --- a/sw/source/uibase/shells/textfld.cxx +++ b/sw/source/uibase/shells/textfld.cxx @@ -195,8 +195,8 @@ void SwTextShell::ExecField(SfxRequest &rReq) { rSh.SttSelect(); rSh.SelectText( - SwCrsrShell::StartOfInputFieldAtPos( *(rSh.GetCrsr()->Start()) ) + 1, - SwCrsrShell::EndOfInputFieldAtPos( *(rSh.GetCrsr()->Start()) ) - 1 ); + SwCursorShell::StartOfInputFieldAtPos( *(rSh.GetCursor()->Start()) ) + 1, + SwCursorShell::EndOfInputFieldAtPos( *(rSh.GetCursor()->Start()) ) - 1 ); } else { @@ -406,7 +406,7 @@ void SwTextShell::ExecField(SfxRequest &rReq) aFieldMgr.InsertField( aData ); rSh.Push(); - rSh.SwCrsrShell::Left(1, CRSR_SKIP_CHARS); + rSh.SwCursorShell::Left(1, CRSR_SKIP_CHARS); pPostIt = static_cast<SwPostItField*>(aFieldMgr.GetCurField()); rSh.Pop(false); // Restore cursor position } @@ -490,7 +490,7 @@ void SwTextShell::ExecField(SfxRequest &rReq) bool bNext = pActRed != nullptr; rSh.Pop(false); // Restore cursor position - if( rSh.IsCrsrPtAtEnd() ) + if( rSh.IsCursorPtAtEnd() ) rSh.SwapPam(); rSh.EndAction(); @@ -707,7 +707,7 @@ void SwTextShell::StateField( SfxItemSet &rSet ) case FN_INSERT_FIELD: { - if ( rSh.CrsrInsideInputField() ) + if ( rSh.CursorInsideInputField() ) { rSet.DisableItem(nWhich); } @@ -728,7 +728,7 @@ void SwTextShell::StateField( SfxItemSet &rSet ) { SfxViewFrame* pVFrame = GetView().GetViewFrame(); if ( !pVFrame->KnowsChildWindow(FN_INSERT_FIELD) - || rSh.CrsrInsideInputField() ) + || rSh.CursorInsideInputField() ) { rSet.DisableItem(FN_INSERT_REF_FIELD); } @@ -736,7 +736,7 @@ void SwTextShell::StateField( SfxItemSet &rSet ) break; case FN_INSERT_FIELD_CTRL: - if ( rSh.CrsrInsideInputField() ) + if ( rSh.CursorInsideInputField() ) { rSet.DisableItem(nWhich); } @@ -765,7 +765,7 @@ void SwTextShell::StateField( SfxItemSet &rSet ) { rSet.DisableItem(nWhich); } - else if ( rSh.CrsrInsideInputField() ) + else if ( rSh.CursorInsideInputField() ) { rSet.DisableItem(nWhich); } @@ -781,7 +781,7 @@ void SwTextShell::StateField( SfxItemSet &rSet ) case FN_INSERT_FLD_TITLE: case FN_INSERT_FLD_TOPIC: case FN_INSERT_DBFIELD: - if ( rSh.CrsrInsideInputField() ) + if ( rSh.CursorInsideInputField() ) { rSet.DisableItem(nWhich); } @@ -813,7 +813,7 @@ void SwTextShell::InsertHyperlink(const SvxHyperlinkItem& rHlnkItem) if(SfxItemState::SET == aSet.GetItemState(RES_TXTATR_INETFMT, false, &pItem)) { // Select links - rSh.SwCrsrShell::SelectTextAttr(RES_TXTATR_INETFMT, false); + rSh.SwCursorShell::SelectTextAttr(RES_TXTATR_INETFMT, false); } switch (nType) { @@ -864,7 +864,7 @@ IMPL_LINK_TYPED( SwTextShell, RedlineNextHdl, AbstractSvxPostItDialog&, rDlg, vo if (pRedline) { // Traveling only if more than one field. - if( !pSh->IsCrsrPtAtEnd() ) + if( !pSh->IsCursorPtAtEnd() ) pSh->SwapPam(); // Move the cursor behind the Redline. pSh->Push(); @@ -884,7 +884,7 @@ IMPL_LINK_TYPED( SwTextShell, RedlineNextHdl, AbstractSvxPostItDialog&, rDlg, vo rDlg.EnableTravel(bEnable, true); - if( pSh->IsCrsrPtAtEnd() ) + if( pSh->IsCursorPtAtEnd() ) pSh->SwapPam(); pRedline = pSh->GetCurrRedline(); diff --git a/sw/source/uibase/shells/textidx.cxx b/sw/source/uibase/shells/textidx.cxx index 7eacd872d994..851227bc3c88 100644 --- a/sw/source/uibase/shells/textidx.cxx +++ b/sw/source/uibase/shells/textidx.cxx @@ -118,7 +118,7 @@ void SwTextShell::ExecIdx(SfxRequest &rReq) rSh.CalcBoundRect(aRect, FLY_AS_CHAR); long nWidth = aRect.Width(); - aSet.Put(SwFormatFrmSize(ATT_VAR_SIZE, nWidth)); + aSet.Put(SwFormatFrameSize(ATT_VAR_SIZE, nWidth)); // Height = width for a more consistent preview (analogous to edit range) aSet.Put(SvxSizeItem(SID_ATTR_PAGE_SIZE, Size(nWidth, nWidth))); const SwTOXBase* pCurTOX = nullptr; @@ -195,7 +195,7 @@ void SwTextShell::GetIdxState(SfxItemSet &rSet) rSet.Put(SfxBoolItem(FN_INSERT_AUTH_ENTRY_DLG, true)); } - else if ( rSh.CrsrInsideInputField() ) + else if ( rSh.CursorInsideInputField() ) { rSet.DisableItem( FN_INSERT_IDX_ENTRY_DLG ); rSet.DisableItem( FN_INSERT_AUTH_ENTRY_DLG ); diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx index 2ea08ce09815..4834685bc6f1 100644 --- a/sw/source/uibase/shells/textsh.cxx +++ b/sw/source/uibase/shells/textsh.cxx @@ -138,7 +138,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) { SwWrtShell &rSh = GetShell(); - OSL_ENSURE( !rSh.IsObjSelected() && !rSh.IsFrmSelected(), + OSL_ENSURE( !rSh.IsObjSelected() && !rSh.IsFrameSelected(), "wrong shell on dispatcher" ); const SfxItemSet *pArgs = rReq.GetArgs(); @@ -155,8 +155,8 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) break; case FN_INSERT_SOFT_HYPHEN: - if( CHAR_SOFTHYPHEN != rSh.SwCrsrShell::GetChar() && - CHAR_SOFTHYPHEN != rSh.SwCrsrShell::GetChar( true, -1 )) + if( CHAR_SOFTHYPHEN != rSh.SwCursorShell::GetChar() && + CHAR_SOFTHYPHEN != rSh.SwCursorShell::GetChar( true, -1 )) rSh.Insert( OUString( CHAR_SOFTHYPHEN ) ); break; @@ -199,7 +199,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) case FN_INSERT_BREAK: { - if( !rSh.CrsrInsideInputField() ) + if( !rSh.CursorInsideInputField() ) { rSh.SplitNode(); } @@ -504,20 +504,20 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) Size aSize(16 * MM50, 8 * MM50); GetShell().LockPaint(); GetShell().StartAllAction(); - SwFlyFrmAttrMgr aMgr( true, GetShellPtr(), FRMMGR_TYPE_TEXT ); + SwFlyFrameAttrMgr aMgr( true, GetShellPtr(), FRMMGR_TYPE_TEXT ); if(nCols > 1) { SwFormatCol aCol; aCol.Init( nCols, aCol.GetGutterWidth(), aCol.GetWishWidth() ); aMgr.SetCol( aCol ); } - aMgr.InsertFlyFrm(FLY_AT_PARA, aStartPos, aSize); + aMgr.InsertFlyFrame(FLY_AT_PARA, aStartPos, aSize); GetShell().EndAllAction(); GetShell().UnlockPaint(); } else { - GetView().InsFrmMode(nCols); + GetView().InsFrameMode(nCols); } rReq.Ignore(); } @@ -535,7 +535,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) } // Create new border - SwFlyFrmAttrMgr aMgr( true, GetShellPtr(), FRMMGR_TYPE_TEXT ); + SwFlyFrameAttrMgr aMgr( true, GetShellPtr(), FRMMGR_TYPE_TEXT ); if(pArgs) { Size aSize(aMgr.GetSize()); @@ -563,7 +563,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) GetShell().LockPaint(); GetShell().StartAllAction(); - aMgr.InsertFlyFrm(eAnchor, aPos, aSize); + aMgr.InsertFlyFrame(eAnchor, aPos, aSize); GetShell().EndAllAction(); GetShell().UnlockPaint(); @@ -576,7 +576,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric))); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "Dialog creation failed!"); - std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateFrmTabDialog("FrameDialog", + std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateFrameTabDialog("FrameDialog", GetView().GetViewFrame(), &GetView().GetViewFrame()->GetWindow(), aSet)); @@ -596,7 +596,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) if( rShell.IsInClickToEdit() ) rShell.DelRight(); - aMgr.InsertFlyFrm(); + aMgr.InsertFlyFrame(); uno::Reference< frame::XDispatchRecorder > xRecorder = GetView().GetViewFrame()->GetBindings().GetRecorder(); @@ -659,11 +659,11 @@ void SwTextShell::StateInsert( SfxItemSet &rSet ) SfxObjectCreateMode eCreateMode = GetView().GetDocShell()->GetCreateMode(); - bool bCrsrInHidden = false; + bool bCursorInHidden = false; if( !rSh.HasMark() ) { rSh.Push(); - bCrsrInHidden = rSh.SelectHiddenRange(); + bCursorInHidden = rSh.SelectHiddenRange(); rSh.Pop(); } @@ -674,10 +674,10 @@ void SwTextShell::StateInsert( SfxItemSet &rSet ) case SID_INSERT_AVMEDIA: case SID_INSERT_SOUND: case SID_INSERT_VIDEO: - if ( GetShell().IsSelFrmMode() - || GetShell().CrsrInsideInputField() + if ( GetShell().IsSelFrameMode() + || GetShell().CursorInsideInputField() || SfxObjectCreateMode::EMBEDDED == eCreateMode - || bCrsrInHidden ) + || bCursorInHidden ) { rSet.DisableItem( nWhich ); } @@ -685,9 +685,9 @@ void SwTextShell::StateInsert( SfxItemSet &rSet ) case SID_INSERT_DIAGRAM: if( !aMOpt.IsChart() - || GetShell().CrsrInsideInputField() + || GetShell().CursorInsideInputField() || eCreateMode == SfxObjectCreateMode::EMBEDDED - || bCrsrInHidden ) + || bCursorInHidden ) { rSet.DisableItem( nWhich ); } @@ -696,8 +696,8 @@ void SwTextShell::StateInsert( SfxItemSet &rSet ) case FN_INSERT_SMA: if( !aMOpt.IsMath() || eCreateMode == SfxObjectCreateMode::EMBEDDED - || bCrsrInHidden - || rSh.CrsrInsideInputField() ) + || bCursorInHidden + || rSh.CursorInsideInputField() ) { rSet.DisableItem( nWhich ); } @@ -707,12 +707,12 @@ void SwTextShell::StateInsert( SfxItemSet &rSet ) case SID_INSERT_OBJECT: case SID_INSERT_PLUGIN: { - if( eCreateMode == SfxObjectCreateMode::EMBEDDED || bCrsrInHidden ) + if( eCreateMode == SfxObjectCreateMode::EMBEDDED || bCursorInHidden ) { rSet.DisableItem( nWhich ); } - else if( GetShell().IsSelFrmMode() - || GetShell().CrsrInsideInputField() ) + else if( GetShell().IsSelFrameMode() + || GetShell().CursorInsideInputField() ) { rSet.DisableItem( nWhich ); } @@ -729,10 +729,10 @@ void SwTextShell::StateInsert( SfxItemSet &rSet ) case FN_INSERT_FRAME_INTERACT_NOCOL : case FN_INSERT_FRAME_INTERACT: { - if( GetShell().IsSelFrmMode() + if( GetShell().IsSelFrameMode() || rSh.IsTableMode() - || GetShell().CrsrInsideInputField() - || bCrsrInHidden ) + || GetShell().CursorInsideInputField() + || bCursorInHidden ) rSet.DisableItem(nWhich); } break; @@ -764,12 +764,12 @@ void SwTextShell::StateInsert( SfxItemSet &rSet ) // Get the text of the Link. rSh.StartAction(); - rSh.CreateCrsr(); - rSh.SwCrsrShell::SelectTextAttr(RES_TXTATR_INETFMT,true); + rSh.CreateCursor(); + rSh.SwCursorShell::SelectTextAttr(RES_TXTATR_INETFMT,true); OUString sLinkName = rSh.GetSelText(); aHLinkItem.SetName(sLinkName); aHLinkItem.SetInsertMode(HLINK_FIELD); - rSh.DestroyCrsr(); + rSh.DestroyCursor(); rSh.EndAction(); } else @@ -789,13 +789,13 @@ void SwTextShell::StateInsert( SfxItemSet &rSet ) break; case FN_INSERT_FRAME: - if (rSh.IsSelFrmMode() ) + if (rSh.IsSelFrameMode() ) { const int nSel = rSh.GetSelectionType(); - if( ((nsSelectionType::SEL_GRF | nsSelectionType::SEL_OLE ) & nSel ) || bCrsrInHidden ) + if( ((nsSelectionType::SEL_GRF | nsSelectionType::SEL_OLE ) & nSel ) || bCursorInHidden ) rSet.DisableItem(nWhich); } - else if ( rSh.CrsrInsideInputField() ) + else if ( rSh.CursorInsideInputField() ) { rSet.DisableItem(nWhich); } @@ -936,9 +936,9 @@ SwTextShell::~SwTextShell() { } -SfxItemSet SwTextShell::CreateInsertFrameItemSet(SwFlyFrmAttrMgr& rMgr) +SfxItemSet SwTextShell::CreateInsertFrameItemSet(SwFlyFrameAttrMgr& rMgr) { - static const sal_uInt16 aFrmAttrRange[] = + static const sal_uInt16 aFrameAttrRange[] = { RES_FRMATR_BEGIN, RES_FRMATR_END-1, SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER, @@ -950,19 +950,19 @@ SfxItemSet SwTextShell::CreateInsertFrameItemSet(SwFlyFrmAttrMgr& rMgr) 0 }; - SfxItemSet aSet(GetPool(), aFrmAttrRange ); + SfxItemSet aSet(GetPool(), aFrameAttrRange ); aSet.Put(SfxUInt16Item(SID_HTML_MODE, ::GetHtmlMode(GetView().GetDocShell()))); // For the Area tab page. GetShell().GetDoc()->getIDocumentDrawModelAccess().GetDrawModel()->PutAreaListItems(aSet); const SwRect &rPg = GetShell().GetAnyCurRect(RECT_PAGE); - SwFormatFrmSize aFrmSize(ATT_VAR_SIZE, rPg.Width(), rPg.Height()); - aFrmSize.SetWhich(GetPool().GetWhich(SID_ATTR_PAGE_SIZE)); - aSet.Put(aFrmSize); + SwFormatFrameSize aFrameSize(ATT_VAR_SIZE, rPg.Width(), rPg.Height()); + aFrameSize.SetWhich(GetPool().GetWhich(SID_ATTR_PAGE_SIZE)); + aSet.Put(aFrameSize); const SwRect &rPr = GetShell().GetAnyCurRect(RECT_PAGE_PRT); - SwFormatFrmSize aPrtSize(ATT_VAR_SIZE, rPr.Width(), rPr.Height()); + SwFormatFrameSize aPrtSize(ATT_VAR_SIZE, rPr.Width(), rPr.Height()); aPrtSize.SetWhich(GetPool().GetWhich(FN_GET_PRINT_AREA)); aSet.Put(aPrtSize); @@ -1122,7 +1122,7 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq ) rSh.SetMark(); rSh.ExtendSelection( false, aChars.getLength() ); rSh.SetAttrSet( aSet, SetAttrMode::DONTEXPAND | SetAttrMode::NOFORMATATTR ); - if( !rSh.IsCrsrPtAtEnd() ) + if( !rSh.IsCursorPtAtEnd() ) rSh.SwapPam(); rSh.ClearMark(); diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index 18656e218b45..1961204eff06 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -309,7 +309,7 @@ void SwTextShell::Execute(SfxRequest &rReq) aRewriter.AddRule( UndoArg2, SW_RES(STR_YIELDS) ); aRewriter.AddRule( UndoArg3, sReplacement ); rWrtSh.StartUndo(UNDO_REPLACE, &aRewriter); - rWrtSh.GetCrsr()->Normalize(false); + rWrtSh.GetCursor()->Normalize(false); rWrtSh.ClearMark(); for( sal_uInt32 i=aToggle.CharsToDelete(); i > 0; --i ) rWrtSh.DelLeft(); @@ -753,7 +753,7 @@ void SwTextShell::Execute(SfxRequest &rReq) if(pField && pField->GetTypeId() == TYP_GETREFFLD) { rWrtSh.StartAllAction(); - rWrtSh.SwCrsrShell::GotoRefMark( static_cast<SwGetRefField*>(pField)->GetSetRefName(), + rWrtSh.SwCursorShell::GotoRefMark( static_cast<SwGetRefField*>(pField)->GetSetRefName(), static_cast<SwGetRefField*>(pField)->GetSubType(), static_cast<SwGetRefField*>(pField)->GetSeqNo() ); rWrtSh.EndAllAction(); @@ -792,7 +792,7 @@ void SwTextShell::Execute(SfxRequest &rReq) aFieldMgr.UpdateCurField( aFieldMgr.GetCurField()->GetFormat(), OUString(), sFormula ); else if( !sFormula.isEmpty() ) { - if( rWrtSh.IsCrsrInTable() ) + if( rWrtSh.IsCursorInTable() ) { SfxItemSet aSet( rWrtSh.GetAttrPool(), RES_BOXATR_FORMULA, RES_BOXATR_FORMULA ); aSet.Put( SwTableBoxFormula( sFormula )); @@ -911,7 +911,7 @@ void SwTextShell::Execute(SfxRequest &rReq) } if ( !pPaM ) - pPaM = rWrtSh.GetCrsr(); + pPaM = rWrtSh.GetCursor(); FieldUnit eMetric = ::GetDfltMetric( dynamic_cast<SwWebView*>( &GetView()) != nullptr ); SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric))); @@ -987,7 +987,7 @@ void SwTextShell::Execute(SfxRequest &rReq) ::SwToSfxPageDescAttr( aCoreSet ); // Properties of numbering - if (rWrtSh.GetNumRuleAtCurrCrsrPos()) + if (rWrtSh.GetNumRuleAtCurrCursorPos()) { SfxBoolItem aStart( FN_NUMBER_NEWSTART, rWrtSh.IsNumRuleStart( pPaM ) ); aCoreSet.Put(aStart); @@ -1160,7 +1160,7 @@ void SwTextShell::Execute(SfxRequest &rReq) //Above code demonstrates that when the cursor is at the start of a paragraph which has bullet, //press TAB will increase the bullet level. //So I copied from that ^^ - if ( rWrtSh.GetNumRuleAtCurrCrsrPos() && !rWrtSh.HasReadonlySel() ) + if ( rWrtSh.GetNumRuleAtCurrCursorPos() && !rWrtSh.HasReadonlySel() ) { rWrtSh.NumUpDown( SID_INC_INDENT == nSlot ); } @@ -1346,7 +1346,7 @@ void SwTextShell::Execute(SfxRequest &rReq) { rWrtSh.SetReadonlySelectionOption( !rWrtSh.GetViewOptions()->IsSelectionInReadonly()); - rWrtSh.ShowCrsr(); + rWrtSh.ShowCursor(); } break; case FN_SELECTION_MODE_DEFAULT: @@ -1495,7 +1495,7 @@ void SwTextShell::GetState( SfxItemSet &rSet ) break; case FN_NUMBER_NEWSTART : - if(!rSh.GetNumRuleAtCurrCrsrPos()) + if(!rSh.GetNumRuleAtCurrCursorPos()) rSet.DisableItem(nWhich); else rSet.Put(SfxBoolItem(FN_NUMBER_NEWSTART, @@ -1513,7 +1513,7 @@ void SwTextShell::GetState( SfxItemSet &rSet ) rSet.DisableItem(nWhich); } else if ( nWhich == FN_EDIT_FORMULA - && rSh.CrsrInsideInputField() ) + && rSh.CursorInsideInputField() ) { rSet.DisableItem( nWhich ); } @@ -1524,12 +1524,12 @@ void SwTextShell::GetState( SfxItemSet &rSet ) case FN_INSERT_FOOTNOTE: case FN_INSERT_FOOTNOTE_DLG: { - const FrmTypeFlags nNoType = - FrmTypeFlags::FLY_ANY | FrmTypeFlags::HEADER | FrmTypeFlags::FOOTER | FrmTypeFlags::FOOTNOTE; - if ( rSh.GetFrmType(nullptr,true) & nNoType ) + const FrameTypeFlags nNoType = + FrameTypeFlags::FLY_ANY | FrameTypeFlags::HEADER | FrameTypeFlags::FOOTER | FrameTypeFlags::FOOTNOTE; + if ( rSh.GetFrameType(nullptr,true) & nNoType ) rSet.DisableItem(nWhich); - if ( rSh.CrsrInsideInputField() ) + if ( rSh.CursorInsideInputField() ) { rSet.DisableItem( nWhich ); } @@ -1540,16 +1540,16 @@ void SwTextShell::GetState( SfxItemSet &rSet ) case SID_INSERTDOC: case FN_INSERT_GLOSSARY: case FN_EXPAND_GLOSSARY: - if ( rSh.CrsrInsideInputField() ) + if ( rSh.CursorInsideInputField() ) { rSet.DisableItem( nWhich ); } break; case FN_INSERT_TABLE: - if ( rSh.CrsrInsideInputField() + if ( rSh.CursorInsideInputField() || rSh.GetTableFormat() - || (rSh.GetFrmType(nullptr,true) & FrmTypeFlags::FOOTNOTE) ) + || (rSh.GetFrameType(nullptr,true) & FrameTypeFlags::FOOTNOTE) ) { rSet.DisableItem( nWhich ); } @@ -1578,7 +1578,7 @@ void SwTextShell::GetState( SfxItemSet &rSet ) //if the paragrah has bullet we'll do the following things: //1: if the bullet level is the first level, disable the decrease-indent button //2: if the bullet level is the last level, disable the increase-indent button - if ( rSh.GetNumRuleAtCurrCrsrPos() && !rSh.HasReadonlySel() ) + if ( rSh.GetNumRuleAtCurrCursorPos() && !rSh.HasReadonlySel() ) { const sal_uInt8 nLevel = rSh.GetNumLevel(); if ( ( nLevel == ( MAXLEVEL - 1 ) && nWhich == SID_INC_INDENT ) @@ -1648,7 +1648,7 @@ void SwTextShell::GetState( SfxItemSet &rSet ) case FN_INSERT_BOOKMARK: if( rSh.IsTableMode() - || rSh.CrsrInsideInputField() ) + || rSh.CursorInsideInputField() ) { rSet.DisableItem( nWhich ); } @@ -1656,7 +1656,7 @@ void SwTextShell::GetState( SfxItemSet &rSet ) case FN_INSERT_BREAK: if ( rSh.HasReadonlySel() - && !rSh.CrsrInsideInputField() ) + && !rSh.CursorInsideInputField() ) { rSet.DisableItem( nWhich ); } @@ -1665,7 +1665,7 @@ void SwTextShell::GetState( SfxItemSet &rSet ) case FN_INSERT_BREAK_DLG: case FN_INSERT_COLUMN_BREAK: case FN_INSERT_PAGEBREAK: - if( rSh.CrsrInsideInputField() ) + if( rSh.CursorInsideInputField() ) { rSet.DisableItem( nWhich ); } @@ -1688,7 +1688,7 @@ void SwTextShell::GetState( SfxItemSet &rSet ) { SvtCJKOptions aCJKOptions; if( !aCJKOptions.IsRubyEnabled() - || rSh.CrsrInsideInputField() ) + || rSh.CursorInsideInputField() ) { GetView().GetViewFrame()->GetBindings().SetVisibleState( nWhich, false ); rSet.DisableItem(nWhich); @@ -1702,7 +1702,7 @@ void SwTextShell::GetState( SfxItemSet &rSet ) if( GetView().GetDocShell()->IsReadOnly() || ( !GetView().GetViewFrame()->HasChildWindow(nWhich) && rSh.HasReadonlySel() ) - || rSh.CrsrInsideInputField() ) + || rSh.CursorInsideInputField() ) { rSet.DisableItem(nWhich); } @@ -1830,7 +1830,7 @@ void SwTextShell::GetState( SfxItemSet &rSet ) case FN_NUM_NUM_RULE_INDEX: case FN_OUTLINE_RULE_INDEX: { - SwNumRule* pCurRule = const_cast<SwNumRule*>(GetShell().GetNumRuleAtCurrCrsrPos()); + SwNumRule* pCurRule = const_cast<SwNumRule*>(GetShell().GetNumRuleAtCurrCursorPos()); sal_uInt16 nActNumLvl = USHRT_MAX; if( pCurRule ) { diff --git a/sw/source/uibase/shells/txtattr.cxx b/sw/source/uibase/shells/txtattr.cxx index 55aae8590a50..3d004231fa01 100644 --- a/sw/source/uibase/shells/txtattr.cxx +++ b/sw/source/uibase/shells/txtattr.cxx @@ -230,7 +230,7 @@ void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq) if ( pSize ) // selected text has one size { // must create new one, otherwise document is without pam - SwPaM* pPaM = rWrtSh.GetCrsr(); + SwPaM* pPaM = rWrtSh.GetCursor(); vItems.push_back( std::make_pair( pSize, std::unique_ptr<SwPaM>(new SwPaM( *(pPaM->GetMark()), *(pPaM->GetPoint()))) ) ); } else @@ -361,10 +361,10 @@ SET_LINESPACE: else bChgAdjust = true; - SvxFrameDirection eFrmDirection = + SvxFrameDirection eFrameDirection = (SID_ATTR_PARA_LEFT_TO_RIGHT == nSlot) ? FRMDIR_HORI_LEFT_TOP : FRMDIR_HORI_RIGHT_TOP; - aSet.Put( SvxFrameDirectionItem( eFrmDirection, RES_FRAMEDIR ) ); + aSet.Put( SvxFrameDirectionItem( eFrameDirection, RES_FRAMEDIR ) ); if (bChgAdjust) { @@ -375,7 +375,7 @@ SET_LINESPACE: aAdjust.SetWhich(SID_ATTR_PARA_ADJUST); GetView().GetViewFrame()->GetBindings().SetState( aAdjust ); // Toggle numbering alignment - const SwNumRule* pCurRule = GetShell().GetNumRuleAtCurrCrsrPos(); + const SwNumRule* pCurRule = GetShell().GetNumRuleAtCurrCursorPos(); if( pCurRule ) { SvxNumRule aRule = pCurRule->MakeSvxNumRule(); @@ -705,17 +705,17 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet) if((!(nHtmlMode & HTMLMODE_ON) || (0 != (nHtmlMode & HTMLMODE_SOME_STYLES))) && aCoreSet.GetItemState( RES_FRAMEDIR, false ) >= SfxItemState::DEFAULT) { - SvxFrameDirection eFrmDir = (SvxFrameDirection) + SvxFrameDirection eFrameDir = (SvxFrameDirection) static_cast<const SvxFrameDirectionItem& >(aCoreSet.Get(RES_FRAMEDIR)).GetValue(); - if (FRMDIR_ENVIRONMENT == eFrmDir) + if (FRMDIR_ENVIRONMENT == eFrameDir) { - eFrmDir = rSh.IsInRightToLeftText() ? + eFrameDir = rSh.IsInRightToLeftText() ? FRMDIR_HORI_RIGHT_TOP : FRMDIR_HORI_LEFT_TOP; } bFlag = (SID_ATTR_PARA_LEFT_TO_RIGHT == nSlot && - FRMDIR_HORI_LEFT_TOP == eFrmDir) || + FRMDIR_HORI_LEFT_TOP == eFrameDir) || (SID_ATTR_PARA_RIGHT_TO_LEFT == nSlot && - FRMDIR_HORI_RIGHT_TOP == eFrmDir); + FRMDIR_HORI_RIGHT_TOP == eFrameDir); } else { diff --git a/sw/source/uibase/shells/txtcrsr.cxx b/sw/source/uibase/shells/txtcrsr.cxx index 1d85bfbd188b..7b5ad39ae64d 100644 --- a/sw/source/uibase/shells/txtcrsr.cxx +++ b/sw/source/uibase/shells/txtcrsr.cxx @@ -349,21 +349,21 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq) bRet = rSh.GotoObj(true, GotoObjFlags::Any); if(bRet) { - rSh.HideCrsr(); - rSh.EnterSelFrmMode(); + rSh.HideCursor(); + rSh.EnterSelFrameMode(); } break; case FN_NEXT_FOOTNOTE: - rSh.MoveCrsr(); + rSh.MoveCursor(); bRet = rSh.GotoNextFootnoteAnchor(); break; case FN_PREV_FOOTNOTE: - rSh.MoveCrsr(); + rSh.MoveCursor(); bRet = rSh.GotoPrevFootnoteAnchor(); break; case FN_TO_HEADER: - rSh.MoveCrsr(); - if ( FrmTypeFlags::HEADER & rSh.GetFrmType(nullptr,false) ) + rSh.MoveCursor(); + if ( FrameTypeFlags::HEADER & rSh.GetFrameType(nullptr,false) ) rSh.SttPg(); else { @@ -374,8 +374,8 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq) bSetRetVal = false; break; case FN_TO_FOOTER: - rSh.MoveCrsr(); - if ( FrmTypeFlags::FOOTER & rSh.GetFrmType(nullptr,false) ) + rSh.MoveCursor(); + if ( FrameTypeFlags::FOOTER & rSh.GetFrameType(nullptr,false) ) rSh.EndPg(); else { @@ -386,8 +386,8 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq) bSetRetVal = false; break; case FN_FOOTNOTE_TO_ANCHOR: - rSh.MoveCrsr(); - if ( FrmTypeFlags::FOOTNOTE & rSh.GetFrmType(nullptr,false) ) + rSh.MoveCursor(); + if ( FrameTypeFlags::FOOTNOTE & rSh.GetFrameType(nullptr,false) ) rSh.GotoFootnoteAnchor(); else rSh.GotoFootnoteText(); diff --git a/sw/source/uibase/table/chartins.cxx b/sw/source/uibase/table/chartins.cxx index eb2931965c71..e1d39e7661c1 100644 --- a/sw/source/uibase/table/chartins.cxx +++ b/sw/source/uibase/table/chartins.cxx @@ -144,7 +144,7 @@ void SwInsertChart(vcl::Window* pParent, SfxBindings* pBindings ) uno::Reference< frame::XModel > xChartModel; OUString aRangeString; - if( rWrtShell.IsCrsrInTable()) + if( rWrtShell.IsCursorInTable()) { if (!rWrtShell.IsTableMode()) { diff --git a/sw/source/uibase/table/tablemgr.cxx b/sw/source/uibase/table/tablemgr.cxx index 96d1090138a3..b1518e1f01b9 100644 --- a/sw/source/uibase/table/tablemgr.cxx +++ b/sw/source/uibase/table/tablemgr.cxx @@ -205,13 +205,13 @@ uno::Reference< frame::XModel > SwTableFUNC::InsertChart( pSh->StartAllAction(); OUString aName; - if (pSh->IsCrsrInTable()) + if (pSh->IsCursorInTable()) { aName = pSh->GetTableFormat()->GetName(); // insert node before table pSh->MoveTable( fnTableCurr, fnTableStart ); pSh->Up( false ); - if ( pSh->IsCrsrInTable() ) + if ( pSh->IsCursorInTable() ) { if ( aName != pSh->GetTableFormat()->GetName() ) pSh->Down( false ); // two adjacent tables diff --git a/sw/source/uibase/uiview/formatclipboard.cxx b/sw/source/uibase/uiview/formatclipboard.cxx index fb16147de311..8f4117809a2b 100644 --- a/sw/source/uibase/uiview/formatclipboard.cxx +++ b/sw/source/uibase/uiview/formatclipboard.cxx @@ -118,7 +118,7 @@ void lcl_getTableAttributes( SfxItemSet& rSet, SwWrtShell &rSh ) rSet.Put( pFrameFormat->GetPageDesc() ); rSet.Put( pFrameFormat->GetLayoutSplit() ); rSet.Put( pFrameFormat->GetKeep() ); - rSet.Put( pFrameFormat->GetFrmDir() ); + rSet.Put( pFrameFormat->GetFrameDir() ); } SwFormatRowSplit* pSplit = nullptr; @@ -288,12 +288,12 @@ void SwFormatClipboard::Copy( SwWrtShell& rWrtShell, SfxItemPool& rPool, bool bP // get the current PaM, the cursor // if there several selection it currently point // on the last (sort by there creation time) selection - SwPaM* pCrsr = rWrtShell.GetCrsr(); + SwPaM* pCursor = rWrtShell.GetCursor(); - bool bHasSelection = pCrsr->HasMark(); + bool bHasSelection = pCursor->HasMark(); bool bForwardSelection = false; - if(!bHasSelection && pCrsr->IsMultiSelection()) + if(!bHasSelection && pCursor->IsMultiSelection()) { // if cursor has multiple selections @@ -301,18 +301,18 @@ void SwFormatClipboard::Copy( SwWrtShell& rWrtShell, SfxItemPool& rPool, bool bP rWrtShell.KillPams(); // reset the cursor to the remaining selection - pCrsr = rWrtShell.GetCrsr(); + pCursor = rWrtShell.GetCursor(); bHasSelection = true; } bool dontMove = false; if (bHasSelection) { - bForwardSelection = (*pCrsr->GetPoint()) > (*pCrsr->GetMark()); + bForwardSelection = (*pCursor->GetPoint()) > (*pCursor->GetMark()); // clear the selection leaving just the cursor - pCrsr->DeleteMark(); - pCrsr->SetMark(); + pCursor->DeleteMark(); + pCursor->SetMark(); } else { @@ -325,7 +325,7 @@ void SwFormatClipboard::Copy( SwWrtShell& rWrtShell, SfxItemPool& rPool, bool bP // revert left and right if ( rightToLeft ) { - if (pCrsr->GetPoint()->nContent == 0) + if (pCursor->GetPoint()->nContent == 0) dontMove = true; else bForwardSelection = !bForwardSelection; @@ -334,13 +334,13 @@ void SwFormatClipboard::Copy( SwWrtShell& rWrtShell, SfxItemPool& rPool, bool bP // move the cursor in order to select one character if (!dontMove) - pCrsr->Move( bForwardSelection ? fnMoveBackward : fnMoveForward ); + pCursor->Move( bForwardSelection ? fnMoveBackward : fnMoveForward ); } if(pItemSet_TextAttr) { if( nSelectionType & (nsSelectionType::SEL_FRM | nsSelectionType::SEL_OLE | nsSelectionType::SEL_GRF) ) - rWrtShell.GetFlyFrmAttr(*pItemSet_TextAttr); + rWrtShell.GetFlyFrameAttr(*pItemSet_TextAttr); else { // get the text attributes from named and automatic formatting @@ -556,7 +556,7 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo // apply the character automatic attributes if( nSelectionType & (nsSelectionType::SEL_FRM | nsSelectionType::SEL_OLE | nsSelectionType::SEL_GRF) ) - rWrtShell.SetFlyFrmAttr(*pTemplateItemSet); + rWrtShell.SetFlyFrameAttr(*pTemplateItemSet); else if ( !bNoCharacterFormats ) rWrtShell.SetAttrSet(*pTemplateItemSet); } diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx index dc727de22312..a3703054ff52 100644 --- a/sw/source/uibase/uiview/pview.cxx +++ b/sw/source/uibase/uiview/pview.cxx @@ -505,12 +505,12 @@ void SwPagePreviewWin::MouseButtonDown( const MouseEvent& rMEvt ) { // close page preview, set new cursor position and switch to // normal view. - OUString sNewCrsrPos = OUString::number( aDocPos.X() ) + ";" + + OUString sNewCursorPos = OUString::number( aDocPos.X() ) + ";" + OUString::number( aDocPos.Y() ) + ";"; - mrView.SetNewCrsrPos( sNewCrsrPos ); + mrView.SetNewCursorPos( sNewCursorPos ); - SfxViewFrame *pTmpFrm = mrView.GetViewFrame(); - pTmpFrm->GetBindings().Execute( SID_VIEWSHELL0, nullptr, 0, + SfxViewFrame *pTmpFrame = mrView.GetViewFrame(); + pTmpFrame->GetBindings().Execute( SID_VIEWSHELL0, nullptr, 0, SfxCallMode::ASYNCHRON ); } else if ( bIsDocPos || bPosInEmptyPage ) @@ -957,8 +957,8 @@ MOVEPAGE: if(GetViewShell()->IsDummyPage( nSelPage ) && GetViewShell()->IsDummyPage( --nSelPage )) nSelPage +=2; SetNewPage( nSelPage ); - SfxViewFrame *pTmpFrm = GetViewFrame(); - pTmpFrm->GetBindings().Execute( SID_VIEWSHELL0, nullptr, 0, + SfxViewFrame *pTmpFrame = GetViewFrame(); + pTmpFrame->GetBindings().Execute( SID_VIEWSHELL0, nullptr, 0, SfxCallMode::ASYNCHRON ); } break; @@ -1226,7 +1226,7 @@ SwPagePreview::SwPagePreview(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh): { // Set the current page as the first. sal_uInt16 nPhysPg, nVirtPg; - static_cast<SwCrsrShell*>(pVS)->GetPageNum( nPhysPg, nVirtPg, true, false ); + static_cast<SwCursorShell*>(pVS)->GetPageNum( nPhysPg, nVirtPg, true, false ); if( 1 != pViewWin->GetCol() && 1 == nPhysPg ) --nPhysPg; pViewWin->SetSttPage( nPhysPg ); diff --git a/sw/source/uibase/uiview/swcli.cxx b/sw/source/uibase/uiview/swcli.cxx index c67b46899498..93c6cfeb4394 100644 --- a/sw/source/uibase/uiview/swcli.cxx +++ b/sw/source/uibase/uiview/swcli.cxx @@ -47,7 +47,7 @@ void SwOleClient::RequestNewObjectArea( Rectangle& aLogRect ) // are set to the desired value. This value will be passed on to the // InPlaceClient. // The core accepts or formats the adjusted values not necessarily. - // If the Ole-Frm is formatted, then the CalcAndSetScale() of the WrtShell + // If the Ole-Frame is formatted, then the CalcAndSetScale() of the WrtShell // will be called. There the scaling of the SwOleClient is set if necessary. SwWrtShell &rSh = static_cast<SwView*>(GetViewShell())->GetWrtShell(); @@ -78,18 +78,18 @@ void SwOleClient::RequestNewObjectArea( Rectangle& aLogRect ) rSh.EndAllAction(); - SwRect aFrm( rSh.GetAnyCurRect( RECT_FLY_EMBEDDED, nullptr, GetObject() )), + SwRect aFrame( rSh.GetAnyCurRect( RECT_FLY_EMBEDDED, nullptr, GetObject() )), aPrt( rSh.GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, nullptr, GetObject() )); - aLogRect.SetPos( aPrt.Pos() + aFrm.Pos() ); + aLogRect.SetPos( aPrt.Pos() + aFrame.Pos() ); aLogRect.SetSize( aPrt.SSize() ); } void SwOleClient::ObjectAreaChanged() { SwWrtShell &rSh = static_cast<SwView*>(GetViewShell())->GetWrtShell(); - SwRect aFrm( rSh.GetAnyCurRect( RECT_FLY_EMBEDDED, nullptr, GetObject() )); - if ( !aFrm.IsOver( rSh.VisArea() ) ) - rSh.MakeVisible( aFrm ); + SwRect aFrame( rSh.GetAnyCurRect( RECT_FLY_EMBEDDED, nullptr, GetObject() )); + if ( !aFrame.IsOver( rSh.VisArea() ) ) + rSh.MakeVisible( aFrame ); } void SwOleClient::ViewChanged() diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx index 1c2de7cb6c98..0cd0cc34ee14 100644 --- a/sw/source/uibase/uiview/view.cxx +++ b/sw/source/uibase/uiview/view.cxx @@ -463,7 +463,7 @@ extern "C" } } -IMPL_LINK_NOARG_TYPED(SwView, AttrChangedNotify, SwCrsrShell*, void) +IMPL_LINK_NOARG_TYPED(SwView, AttrChangedNotify, SwCursorShell*, void) { if ( GetEditWin().IsChainMode() ) GetEditWin().SetChainMode( false ); @@ -546,7 +546,7 @@ void SwView::_CheckReadonlyState() eStateProtAll = rDis.QueryState( FN_EDIT_REGION, pItem ); bool bChgd = false; - if ( !m_pWrtShell->IsCrsrReadonly() ) + if ( !m_pWrtShell->IsCursorReadonly() ) { static sal_uInt16 aROIds[] = { @@ -725,7 +725,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) // If the view is switch from one to another, the 'old' view is given by // parameter <pOldSh>. - m_bCenterCrsr = m_bTopCrsr = m_bAlwaysShowSel = m_bTabColFromDoc = m_bTabRowFromDoc = + m_bCenterCursor = m_bTopCursor = m_bAlwaysShowSel = m_bTabColFromDoc = m_bTabRowFromDoc = m_bSetTabColFromDoc = m_bSetTabRowFromDoc = m_bAttrChgNotified = m_bAttrChgNotifiedWithRegistrations = m_bVerbsActive = m_bDrawRotate = m_bInOuterResizePixel = m_bInInnerResizePixel = m_bPasteState = m_bPasteSpecialState = m_bMakeSelectionVisible = false; @@ -773,10 +773,10 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) if( dynamic_cast<const SwPagePreview *>(pExistingSh) != nullptr ) { m_sSwViewData = static_cast<SwPagePreview*>(pExistingSh)->GetPrevSwViewData(); - m_sNewCrsrPos = static_cast<SwPagePreview*>(pExistingSh)->GetNewCrsrPos(); + m_sNewCursorPos = static_cast<SwPagePreview*>(pExistingSh)->GetNewCursorPos(); m_nNewPage = static_cast<SwPagePreview*>(pExistingSh)->GetNewPage(); m_bOldShellWasPagePreview = true; - m_bIsPreviewDoubleClick = !m_sNewCrsrPos.isEmpty() || m_nNewPage != USHRT_MAX; + m_bIsPreviewDoubleClick = !m_sNewCursorPos.isEmpty() || m_nNewPage != USHRT_MAX; } else if( dynamic_cast<const SwSrcView *>(pExistingSh) != nullptr ) bOldShellWasSrcView = true; @@ -1096,7 +1096,7 @@ void SwView::WriteUserData( OUString &rUserData, bool bBrowse ) rUserData += OUString::number( (sal_uInt16)m_pWrtShell->GetViewOptions()->GetZoomType());//eZoom; rUserData += ";"; - rUserData += FrmTypeFlags::NONE == m_pWrtShell->GetSelFrmType() ? OUString("0") : OUString("1"); + rUserData += FrameTypeFlags::NONE == m_pWrtShell->GetSelFrameType() ? OUString("0") : OUString("1"); } // Set CursorPos @@ -1132,7 +1132,7 @@ void SwView::ReadUserData( const OUString &rUserData, bool bBrowse ) // because which parameter is evaluated first? long nX = rUserData.getToken( 0, ';', nPos ).toInt32(), nY = rUserData.getToken( 0, ';', nPos ).toInt32(); - Point aCrsrPos( nX, nY ); + Point aCursorPos( nX, nY ); sal_uInt16 nZoomFactor = static_cast< sal_uInt16 >( rUserData.getToken(0, ';', nPos ).toInt32() ); @@ -1160,10 +1160,10 @@ void SwView::ReadUserData( const OUString &rUserData, bool bBrowse ) } bool bSelectObj = (0 != rUserData.getToken( nOff, ';', nPos ).toInt32()) - && m_pWrtShell->IsObjSelectable( aCrsrPos ); + && m_pWrtShell->IsObjSelectable( aCursorPos ); // restore editing position - m_pViewImpl->SetRestorePosition(aCrsrPos, bSelectObj); + m_pViewImpl->SetRestorePosition(aCursorPos, bSelectObj); // set flag value to avoid macro execution. bool bSavedFlagValue = m_pWrtShell->IsMacroExecAllowed(); m_pWrtShell->SetMacroExecAllowed( false ); @@ -1171,11 +1171,11 @@ void SwView::ReadUserData( const OUString &rUserData, bool bBrowse ) // go to the last editing position when opening own files if(m_bOldShellWasPagePreview || bIsOwnDocument) { - m_pWrtShell->SwCrsrShell::SetCrsr( aCrsrPos, !bSelectObj ); + m_pWrtShell->SwCursorShell::SetCursor( aCursorPos, !bSelectObj ); if( bSelectObj ) { - m_pWrtShell->SelectObj( aCrsrPos ); - m_pWrtShell->EnterSelFrmMode( &aCrsrPos ); + m_pWrtShell->SelectObj( aCursorPos ); + m_pWrtShell->EnterSelFrameMode( &aCursorPos ); } } @@ -1196,21 +1196,21 @@ void SwView::ReadUserData( const OUString &rUserData, bool bBrowse ) } //apply information from print preview - if available - if( !m_sNewCrsrPos.isEmpty() ) + if( !m_sNewCursorPos.isEmpty() ) { - long nXTmp = m_sNewCrsrPos.getToken( 0, ';' ).toInt32(), - nYTmp = m_sNewCrsrPos.getToken( 1, ';' ).toInt32(); - Point aCrsrPos2( nXTmp, nYTmp ); - bSelectObj = m_pWrtShell->IsObjSelectable( aCrsrPos2 ); + long nXTmp = m_sNewCursorPos.getToken( 0, ';' ).toInt32(), + nYTmp = m_sNewCursorPos.getToken( 1, ';' ).toInt32(); + Point aCursorPos2( nXTmp, nYTmp ); + bSelectObj = m_pWrtShell->IsObjSelectable( aCursorPos2 ); - m_pWrtShell->SwCrsrShell::SetCrsr( aCrsrPos2 ); + m_pWrtShell->SwCursorShell::SetCursor( aCursorPos2 ); if( bSelectObj ) { - m_pWrtShell->SelectObj( aCrsrPos2 ); - m_pWrtShell->EnterSelFrmMode( &aCrsrPos2 ); + m_pWrtShell->SelectObj( aCursorPos2 ); + m_pWrtShell->EnterSelFrameMode( &aCursorPos2 ); } m_pWrtShell->MakeSelVisible(); - m_sNewCrsrPos.clear(); + m_sNewCursorPos.clear(); } else if(USHRT_MAX != m_nNewPage) { @@ -1254,7 +1254,7 @@ void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue > bool bViewLayoutBookMode = pVOpt->IsViewLayoutBookMode(); sal_Int16 nViewLayoutColumns = pVOpt->GetViewLayoutColumns(); - bool bSelectedFrame = ( m_pWrtShell->GetSelFrmType() != FrmTypeFlags::NONE ), + bool bSelectedFrame = ( m_pWrtShell->GetSelFrameType() != FrameTypeFlags::NONE ), bGotVisibleLeft = false, bGotVisibleTop = false, bGotVisibleRight = false, bGotVisibleBottom = false, bGotZoomType = false, @@ -1326,7 +1326,7 @@ void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue > } if (bGotVisibleBottom) { - Point aCrsrPos( nX, nY ); + Point aCursorPos( nX, nY ); const long nAdd = m_pWrtShell->GetViewOptions()->getBrowseMode() ? DOCUMENTBORDER : DOCUMENTBORDER*2; if (nBottom <= (m_pWrtShell->GetDocSize().Height()+nAdd) ) { @@ -1342,17 +1342,17 @@ void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue > } if (bGotIsSelectedFrame) { - bool bSelectObj = bSelectedFrame && m_pWrtShell->IsObjSelectable( aCrsrPos ); + bool bSelectObj = bSelectedFrame && m_pWrtShell->IsObjSelectable( aCursorPos ); // set flag value to avoid macro execution. bool bSavedFlagValue = m_pWrtShell->IsMacroExecAllowed(); m_pWrtShell->SetMacroExecAllowed( false ); // os: changed: The user data has to be read if the view is switched back from page preview // go to the last editing position when opening own files - m_pViewImpl->SetRestorePosition(aCrsrPos, bSelectObj); + m_pViewImpl->SetRestorePosition(aCursorPos, bSelectObj); if(m_bOldShellWasPagePreview|| bIsOwnDocument) { - m_pWrtShell->SwCrsrShell::SetCrsr( aCrsrPos, !bSelectObj ); + m_pWrtShell->SwCursorShell::SetCursor( aCursorPos, !bSelectObj ); // Update the shell to toggle Header/Footer edit if needed bool bInHeader = true; @@ -1377,8 +1377,8 @@ void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue > if( bSelectObj ) { - m_pWrtShell->SelectObj( aCrsrPos ); - m_pWrtShell->EnterSelFrmMode( &aCrsrPos ); + m_pWrtShell->SelectObj( aCursorPos ); + m_pWrtShell->EnterSelFrameMode( &aCursorPos ); } } @@ -1509,7 +1509,7 @@ void SwView::WriteUserDataSequence ( uno::Sequence < beans::PropertyValue >& rSe pValue++;nIndex++; pValue->Name = "IsSelectedFrame"; - pValue->Value <<= FrmTypeFlags::NONE != m_pWrtShell->GetSelFrmType(); + pValue->Value <<= FrameTypeFlags::NONE != m_pWrtShell->GetSelFrameType(); nIndex++; assert(nIndex == NUM_VIEW_SETTINGS); @@ -1524,9 +1524,9 @@ void SwView::ShowCursor( bool bOn ) m_pWrtShell->LockView( true ); //lock visible section if( !bOn ) - m_pWrtShell->HideCrsr(); - else if( !m_pWrtShell->IsFrmSelected() && !m_pWrtShell->IsObjSelected() ) - m_pWrtShell->ShowCrsr(); + m_pWrtShell->HideCursor(); + else if( !m_pWrtShell->IsFrameSelected() && !m_pWrtShell->IsObjSelected() ) + m_pWrtShell->ShowCursor(); if( bUnlockView ) m_pWrtShell->LockView( false ); @@ -1548,7 +1548,7 @@ ErrCode SwView::DoVerb( long nVerb ) bool SwView::HasSelection( bool bText ) const { - return bText ? GetWrtShell().SwCrsrShell::HasSelection() + return bText ? GetWrtShell().SwCursorShell::HasSelection() : GetWrtShell().HasSelection(); } diff --git a/sw/source/uibase/uiview/view0.cxx b/sw/source/uibase/uiview/view0.cxx index aaa4703a9fa5..1218818e8109 100644 --- a/sw/source/uibase/uiview/view0.cxx +++ b/sw/source/uibase/uiview/view0.cxx @@ -133,7 +133,7 @@ void SwView::ApplyAccessiblityOptions(SvtAccessibilityOptions& rAccessibilityOpt m_pWrtShell->ApplyAccessiblityOptions(rAccessibilityOptions); //to enable the right state of the selection cursor in readonly documents if(GetDocShell()->IsReadOnly()) - m_pWrtShell->ShowCrsr(); + m_pWrtShell->ShowCursor(); } diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index 853120e3a8ef..a8c83ce524ce 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -249,7 +249,7 @@ int SwView::InsertGraphic( const OUString &rPath, const OUString &rFilter, } } - SwFlyFrmAttrMgr aFrameManager( true, GetWrtShellPtr(), FRMMGR_TYPE_GRF ); + SwFlyFrameAttrMgr aFrameManager( true, GetWrtShellPtr(), FRMMGR_TYPE_GRF ); SwWrtShell& rShell = GetWrtShell(); // #i123922# determine if we really want to insert or replace the graphic at a selected object @@ -324,11 +324,11 @@ bool SwView::InsertGraphicDlg( SfxRequest& rReq ) // pool formats - const ::std::vector<OUString>& rFrmPoolArr( + const ::std::vector<OUString>& rFramePoolArr( SwStyleNameMapper::GetFrameFormatUINameArray()); - for( size_t i = 0; i < rFrmPoolArr.size(); ++i ) + for( size_t i = 0; i < rFramePoolArr.size(); ++i ) { - aFormats.push_back(rFrmPoolArr[i]); + aFormats.push_back(rFramePoolArr[i]); } std::sort(aFormats.begin(), aFormats.end()); @@ -465,7 +465,7 @@ bool SwView::InsertGraphicDlg( SfxRequest& rReq ) // #i123922# no new FrameFormat for replace mode, only when new object was created, // else this would reset the current setting for the frame holding the graphic - if ( !bReplaceMode && rSh.IsFrmSelected() ) + if ( !bReplaceMode && rSh.IsFrameSelected() ) { SwFrameFormat* pFormat = pDoc->FindFrameFormatByName( sGraphicFormat ); if(!pFormat) @@ -558,9 +558,9 @@ void SwView::Execute(SfxRequest &rReq) Rectangle aVis( GetVisArea() ); SwEditWin& rTmpWin = GetEditWin(); if ( FN_PAGEUP == nSlot || FN_PAGEUP_SEL == nSlot ) - PageUpCrsr(FN_PAGEUP_SEL == nSlot); + PageUpCursor(FN_PAGEUP_SEL == nSlot); else - PageDownCrsr(FN_PAGEDOWN_SEL == nSlot); + PageDownCursor(FN_PAGEDOWN_SEL == nSlot); rReq.SetReturnValue(SfxBoolItem(nSlot, aVis != GetVisArea())); @@ -672,7 +672,7 @@ void SwView::Execute(SfxRequest &rReq) case FN_REDLINE_REJECT_DIRECT: { SwDoc *pDoc = m_pWrtShell->GetDoc(); - SwPaM *pCursor = m_pWrtShell->GetCrsr(); + SwPaM *pCursor = m_pWrtShell->GetCursor(); if( pCursor->HasMark()) { if (FN_REDLINE_ACCEPT_DIRECT == nSlot) @@ -723,7 +723,7 @@ void SwView::Execute(SfxRequest &rReq) case FN_REDLINE_PREV_CHANGE: { - const SwPaM *pCursor = m_pWrtShell->GetCrsr(); + const SwPaM *pCursor = m_pWrtShell->GetCursor(); const SwPosition initialCursorStart = *pCursor->Start(); const SwRangeRedline *pPrev = m_pWrtShell->SelPrevRedline(); @@ -807,7 +807,7 @@ void SwView::Execute(SfxRequest &rReq) if ( m_pWrtShell->HasDrawView() && m_pWrtShell->GetDrawView()->IsDragObj() ) { m_pWrtShell->BreakDrag(); - m_pWrtShell->EnterSelFrmMode(); + m_pWrtShell->EnterSelFrameMode(); } else if ( m_pWrtShell->IsDrawCreate() ) { @@ -854,8 +854,8 @@ void SwView::Execute(SfxRequest &rReq) const SwFrameFormat* pFormat = m_pWrtShell->GetFlyFrameFormat(); if(m_pWrtShell->GotoFly( pFormat->GetName(), FLYCNTTYPE_FRM )) { - m_pWrtShell->HideCrsr(); - m_pWrtShell->EnterSelFrmMode(); + m_pWrtShell->HideCursor(); + m_pWrtShell->EnterSelFrameMode(); } } else @@ -929,7 +929,7 @@ void SwView::Execute(SfxRequest &rReq) { m_pWrtShell->StartAction(); m_pWrtShell->EnterStdMode(); - bool bOldCrsrInReadOnly = m_pWrtShell->IsReadOnlyAvailable(); + bool bOldCursorInReadOnly = m_pWrtShell->IsReadOnlyAvailable(); m_pWrtShell->SetReadOnlyAvailable( true ); for( int i = 0; i < 2; ++i ) @@ -965,7 +965,7 @@ void SwView::Execute(SfxRequest &rReq) pBase = nullptr; } } - m_pWrtShell->SetReadOnlyAvailable( bOldCrsrInReadOnly ); + m_pWrtShell->SetReadOnlyAvailable( bOldCursorInReadOnly ); m_pWrtShell->EndAction(); } break; @@ -1226,15 +1226,15 @@ void SwView::Execute(SfxRequest &rReq) case SID_RESTORE_EDITING_VIEW: { //#i33307# restore editing position - Point aCrsrPos; + Point aCursorPos; bool bSelectObj; - if(m_pViewImpl->GetRestorePosition(aCrsrPos, bSelectObj)) + if(m_pViewImpl->GetRestorePosition(aCursorPos, bSelectObj)) { - m_pWrtShell->SwCrsrShell::SetCrsr( aCrsrPos, !bSelectObj ); + m_pWrtShell->SwCursorShell::SetCursor( aCursorPos, !bSelectObj ); if( bSelectObj ) { - m_pWrtShell->SelectObj( aCrsrPos ); - m_pWrtShell->EnterSelFrmMode( &aCrsrPos ); + m_pWrtShell->SelectObj( aCursorPos ); + m_pWrtShell->EnterSelFrameMode( &aCursorPos ); } } } @@ -1298,19 +1298,19 @@ void SwView::StateStatusLine(SfxItemSet &rSet) OUString sCurrentSectionName = CurrSect->GetSectionName(); if(sCurrentSectionName != m_sOldSectionName) { - SwCrsrShell::FireSectionChangeEvent(2, 1); + SwCursorShell::FireSectionChangeEvent(2, 1); } m_sOldSectionName = sCurrentSectionName; } else if (!m_sOldSectionName.isEmpty()) { - SwCrsrShell::FireSectionChangeEvent(2, 1); + SwCursorShell::FireSectionChangeEvent(2, 1); m_sOldSectionName= OUString(); } //get column change event if(rShell.bColumnChange()) { - SwCrsrShell::FireColumnChangeEvent(2, 1); + SwCursorShell::FireColumnChangeEvent(2, 1); } while( nWhich ) @@ -1321,14 +1321,14 @@ void SwView::StateStatusLine(SfxItemSet &rSet) // number of pages, log. page number sal_uInt16 nPage, nLogPage; OUString sDisplay; - rShell.GetPageNumber( -1, rShell.IsCrsrVisible(), nPage, nLogPage, sDisplay ); + rShell.GetPageNumber( -1, rShell.IsCursorVisible(), nPage, nLogPage, sDisplay ); rSet.Put( SfxStringItem( FN_STAT_PAGE, GetPageStr( nPage, nLogPage, sDisplay) )); //if existing page number is not equal to old page number, send out this event. if (m_nOldPageNum != nLogPage ) { if (m_nOldPageNum != 0) - SwCrsrShell::FirePageChangeEvent(m_nOldPageNum, nLogPage); + SwCursorShell::FirePageChangeEvent(m_nOldPageNum, nLogPage); m_nOldPageNum = nLogPage; } const sal_uInt16 nCnt = GetWrtShell().GetPageCnt(); @@ -1466,11 +1466,11 @@ void SwView::StateStatusLine(SfxItemSet &rSet) case SID_ATTR_POSITION: case SID_ATTR_SIZE: { - if( !rShell.IsFrmSelected() && !rShell.IsObjSelected() ) - SwBaseShell::_SetFrmMode( FLY_DRAG_END ); + if( !rShell.IsFrameSelected() && !rShell.IsObjSelected() ) + SwBaseShell::_SetFrameMode( FLY_DRAG_END ); else { - FlyMode eFrameMode = SwBaseShell::GetFrmMode(); + FlyMode eFrameMode = SwBaseShell::GetFrameMode(); if ( eFrameMode == FLY_DRAG_START || eFrameMode == FLY_DRAG ) { if ( nWhich == SID_ATTR_POSITION ) @@ -1485,7 +1485,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet) break; case SID_TABLE_CELL: - if( rShell.IsFrmSelected() || rShell.IsObjSelected() ) + if( rShell.IsFrameSelected() || rShell.IsObjSelected() ) { // #i39171# Don't put a SvxSizeItem into a slot which is defined as SfxStringItem. // SvxPosSizeStatusBarControl no longer resets to empty display if only one slot @@ -1495,7 +1495,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet) else { OUString sStr; - if( rShell.IsCrsrInTable() ) + if( rShell.IsCursorInTable() ) { // table name + cell coordinate sStr = rShell.GetTableFormat()->GetName(); @@ -1530,7 +1530,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet) } } - const SwNumRule* pNumRule = rShell.GetNumRuleAtCurrCrsrPos(); + const SwNumRule* pNumRule = rShell.GetNumRuleAtCurrCursorPos(); const bool bOutlineNum = pNumRule && pNumRule->IsOutlineRule(); if (pNumRule && !bOutlineNum ) // cursor in numbering @@ -1776,7 +1776,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq) case SID_ATTR_SIZE: { sal_uInt16 nId = 0; - if( rSh.IsCrsrInTable() ) + if( rSh.IsCursorInTable() ) nId = FN_FORMAT_TABLE_DLG; else if( rSh.GetCurTOX() ) nId = FN_INSERT_MULTI_TOX; @@ -1784,7 +1784,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq) nId = FN_EDIT_REGION; else { - const SwNumRule* pNumRule = rSh.GetNumRuleAtCurrCrsrPos(); + const SwNumRule* pNumRule = rSh.GetNumRuleAtCurrCursorPos(); if( pNumRule ) // cursor in numbering { if( pNumRule->IsAutoRule() ) @@ -1795,7 +1795,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq) nId = 0; } } - else if( rSh.IsFrmSelected() ) + else if( rSh.IsFrameSelected() ) nId = FN_FORMAT_FRAME_DLG; else if( rSh.IsObjSelected() ) nId = SID_ATTR_TRANSFORM; @@ -1877,15 +1877,15 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq) } } -void SwView::InsFrmMode(sal_uInt16 nCols) +void SwView::InsFrameMode(sal_uInt16 nCols) { if ( m_pWrtShell->HasWholeTabSelection() ) { - SwFlyFrmAttrMgr aMgr( true, m_pWrtShell, FRMMGR_TYPE_TEXT ); + SwFlyFrameAttrMgr aMgr( true, m_pWrtShell, FRMMGR_TYPE_TEXT ); const SwFrameFormat &rPageFormat = m_pWrtShell->GetPageDesc(m_pWrtShell->GetCurPageDesc()).GetMaster(); - SwTwips lWidth = rPageFormat.GetFrmSize().GetWidth(); + SwTwips lWidth = rPageFormat.GetFrameSize().GetWidth(); const SvxLRSpaceItem &rLR = rPageFormat.GetLRSpace(); lWidth -= rLR.GetLeft() + rLR.GetRight(); aMgr.SetSize(Size(lWidth, aMgr.GetSize().Height())); @@ -1895,10 +1895,10 @@ void SwView::InsFrmMode(sal_uInt16 nCols) aCol.Init( nCols, aCol.GetGutterWidth(), aCol.GetWishWidth() ); aMgr.SetCol( aCol ); } - aMgr.InsertFlyFrm(); + aMgr.InsertFlyFrame(); } else - GetEditWin().InsFrm(nCols); + GetEditWin().InsFrame(nCols); } /// show "edit link" dialog @@ -1919,9 +1919,9 @@ bool SwView::JumpToSwMark( const OUString& rMark ) if( !rMark.isEmpty() ) { // place bookmark at top-center - bool bSaveCC = IsCrsrAtCenter(); - bool bSaveCT = IsCrsrAtTop(); - SetCrsrAtTop( true ); + bool bSaveCC = IsCursorAtCenter(); + bool bSaveCT = IsCursorAtTop(); + SetCursorAtTop( true ); // For scrolling the FrameSet, the corresponding shell needs to have the focus. bool bHasShFocus = m_pWrtShell->HasShFcs(); @@ -2015,13 +2015,13 @@ bool SwView::JumpToSwMark( const OUString& rMark ) if( FLYCNTTYPE_FRM == eFlyType ) { // TextFrames: set Cursor in the frame - m_pWrtShell->UnSelectFrm(); - m_pWrtShell->LeaveSelFrmMode(); + m_pWrtShell->UnSelectFrame(); + m_pWrtShell->LeaveSelFrameMode(); } else { - m_pWrtShell->HideCrsr(); - m_pWrtShell->EnterSelFrmMode(); + m_pWrtShell->HideCursor(); + m_pWrtShell->EnterSelFrameMode(); } } } @@ -2035,7 +2035,7 @@ bool SwView::JumpToSwMark( const OUString& rMark ) m_bMakeSelectionVisible = true; // reset ViewStatus - SetCrsrAtTop( bSaveCT, bSaveCC ); + SetCursorAtTop( bSaveCT, bSaveCC ); if( !bHasShFocus ) m_pWrtShell->ShLooseFcs(); @@ -2200,7 +2200,7 @@ long SwView::InsertMedium( sal_uInt16 nSlotId, SfxMedium* pMedium, sal_Int16 nVe ::sw::UndoGuard const ug(pDoc->GetIDocumentUndoRedo()); uno::Reference<text::XTextRange> const xInsertPosition( SwXTextRange::CreateXTextRange(*pDoc, - *m_pWrtShell->GetCrsr()->GetPoint(), nullptr)); + *m_pWrtShell->GetCursor()->GetPoint(), nullptr)); nErrno = pDocSh->ImportFrom(*pMedium, xInsertPosition) ? 0 : ERR_SWG_READ_ERROR; } diff --git a/sw/source/uibase/uiview/viewdlg.cxx b/sw/source/uibase/uiview/viewdlg.cxx index a14eeee8037c..ef2e8345a143 100644 --- a/sw/source/uibase/uiview/viewdlg.cxx +++ b/sw/source/uibase/uiview/viewdlg.cxx @@ -53,7 +53,7 @@ void SwView::ExecDlg(SfxRequest &rReq) sal_uInt16 nOldValue = m_pWrtShell->GetPageOffset(); sal_uInt16 nPage, nLogPage; m_pWrtShell->GetPageNum( nPage, nLogPage, - m_pWrtShell->IsCrsrVisible(), false); + m_pWrtShell->IsCursorVisible(), false); if(nValue != nOldValue || nValue != nLogPage) { diff --git a/sw/source/uibase/uiview/viewdlg2.cxx b/sw/source/uibase/uiview/viewdlg2.cxx index d5ab1c5ef626..4a0273185357 100644 --- a/sw/source/uibase/uiview/viewdlg2.cxx +++ b/sw/source/uibase/uiview/viewdlg2.cxx @@ -179,10 +179,10 @@ void SwView::InsertCaption(const InsCaptionOpt *pOpt) rSh.EndAllAction(); - if ( rSh.IsFrmSelected() ) + if ( rSh.IsFrameSelected() ) { - GetEditWin().StopInsFrm(); - rSh.EnterSelFrmMode(); + GetEditWin().StopInsFrame(); + rSh.EnterSelFrameMode(); } // remember category @@ -191,9 +191,9 @@ void SwView::InsertCaption(const InsCaptionOpt *pOpt) else if( eType & nsSelectionType::SEL_TBL) SetOldTabCat(rName); else if( eType & nsSelectionType::SEL_FRM) - SetOldFrmCat(rName); + SetOldFrameCat(rName); else if( eType == nsSelectionType::SEL_TXT) - SetOldFrmCat(rName); + SetOldFrameCat(rName); else if( eType & nsSelectionType::SEL_DRW) SetOldDrwCat(rName); } diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx index a8b4cc4768fd..bdda3e628d55 100644 --- a/sw/source/uibase/uiview/viewdraw.cxx +++ b/sw/source/uibase/uiview/viewdraw.cxx @@ -240,8 +240,8 @@ void SwView::ExecDraw(SfxRequest& rReq) SetDrawFuncPtr(nullptr); } - if (m_pWrtShell->IsObjSelected() && !m_pWrtShell->IsSelFrmMode()) - m_pWrtShell->EnterSelFrmMode(); + if (m_pWrtShell->IsObjSelected() && !m_pWrtShell->IsSelFrameMode()) + m_pWrtShell->EnterSelFrameMode(); LeaveDrawCreate(); GetViewFrame()->GetBindings().Invalidate(SID_INSERT_DRAW); @@ -252,7 +252,7 @@ void SwView::ExecDraw(SfxRequest& rReq) LeaveDrawCreate(); - if (m_pWrtShell->IsFrmSelected()) + if (m_pWrtShell->IsFrameSelected()) m_pWrtShell->EnterStdMode(); // because bug #45639 SwDrawBase* pFuncPtr = nullptr; @@ -383,8 +383,8 @@ void SwView::ExecDraw(SfxRequest& rReq) } else { - if (m_pWrtShell->IsObjSelected() && !m_pWrtShell->IsSelFrmMode()) - m_pWrtShell->EnterSelFrmMode(); + if (m_pWrtShell->IsObjSelected() && !m_pWrtShell->IsSelFrameMode()) + m_pWrtShell->EnterSelFrameMode(); } if(bEndTextEdit && pSdrView && pSdrView->IsTextEdit()) @@ -411,7 +411,7 @@ void SwView::ExitDraw() } while( pTest && pTest != this && pTest != m_pShell); if(pTest == m_pShell && - // don't call LeaveSelFrmMode() etc. for the below, + // don't call LeaveSelFrameMode() etc. for the below, // because objects may still be selected: dynamic_cast< const SwDrawBaseShell *>( m_pShell ) == nullptr && dynamic_cast< const SwBezierShell *>( m_pShell ) == nullptr && @@ -429,8 +429,8 @@ void SwView::ExitDraw() if (GetDrawFuncPtr()) { - if (m_pWrtShell->IsSelFrmMode()) - m_pWrtShell->LeaveSelFrmMode(); + if (m_pWrtShell->IsSelFrameMode()) + m_pWrtShell->LeaveSelFrameMode(); GetDrawFuncPtr()->Deactivate(); SetDrawFuncPtr(nullptr); @@ -656,7 +656,7 @@ void SwView::SetSelDrawSlot() bool SwView::AreOnlyFormsSelected() const { - if ( GetWrtShell().IsFrmSelected() ) + if ( GetWrtShell().IsFrameSelected() ) return false; bool bForm = true; diff --git a/sw/source/uibase/uiview/viewling.cxx b/sw/source/uibase/uiview/viewling.cxx index b9e2ef4589a4..4b4c2a230a3d 100644 --- a/sw/source/uibase/uiview/viewling.cxx +++ b/sw/source/uibase/uiview/viewling.cxx @@ -174,7 +174,7 @@ void SwView::ExecLingu(SfxRequest &rReq) m_pWrtShell->StartAction(); // remember cursor position data for later restoration of the cursor - const SwPosition *pPoint = m_pWrtShell->GetCrsr()->GetPoint(); + const SwPosition *pPoint = m_pWrtShell->GetCursor()->GetPoint(); bool bRestoreCursor = pPoint->nNode.GetNode().IsTextNode(); const SwNodeIndex aPointNodeIndex( pPoint->nNode ); sal_Int32 nPointIndex = pPoint->nContent.GetIndex(); @@ -196,7 +196,7 @@ void SwView::ExecLingu(SfxRequest &rReq) if (!pTextNode || pTextNode->GetText().getLength() < nPointIndex) nPointIndex = 0; // restore cursor to its original position - m_pWrtShell->GetCrsr()->GetPoint()->nContent.Assign( pTextNode, nPointIndex ); + m_pWrtShell->GetCursor()->GetPoint()->nContent.Assign( pTextNode, nPointIndex ); } // enable all, restore view and cursor position @@ -243,11 +243,11 @@ void SwView::StartTextConversion( bool bOldIns = m_pWrtShell->IsInsMode(); m_pWrtShell->SetInsMode(); - const bool bSelection = static_cast<SwCrsrShell*>(m_pWrtShell)->HasSelection() || - m_pWrtShell->GetCrsr() != m_pWrtShell->GetCrsr()->GetNext(); + const bool bSelection = static_cast<SwCursorShell*>(m_pWrtShell)->HasSelection() || + m_pWrtShell->GetCursor() != m_pWrtShell->GetCursor()->GetNext(); const bool bStart = bSelection || m_pWrtShell->IsStartOfDoc(); - const bool bOther = !bSelection && !(m_pWrtShell->GetFrmType(nullptr,true) & FrmTypeFlags::BODY); + const bool bOther = !bSelection && !(m_pWrtShell->GetFrameType(nullptr,true) & FrameTypeFlags::BODY); { const uno::Reference< uno::XComponentContext > xContext( @@ -451,12 +451,12 @@ void SwView::HyphenateDocument() m_pWrtShell->StartUndo(UNDO_INSATTR); // valid later bool bHyphSpecial = xProp.is() && xProp->getIsHyphSpecial(); - bool bSelection = static_cast<SwCrsrShell*>(m_pWrtShell)->HasSelection() || - m_pWrtShell->GetCrsr() != m_pWrtShell->GetCrsr()->GetNext(); + bool bSelection = static_cast<SwCursorShell*>(m_pWrtShell)->HasSelection() || + m_pWrtShell->GetCursor() != m_pWrtShell->GetCursor()->GetNext(); bool bOther = m_pWrtShell->HasOtherCnt() && bHyphSpecial && !bSelection; bool bStart = bSelection || ( !bOther && m_pWrtShell->IsStartOfDoc() ); bool bStop = false; - if( !bOther && !(m_pWrtShell->GetFrmType(nullptr,true) & FrmTypeFlags::BODY) && !bSelection ) + if( !bOther && !(m_pWrtShell->GetFrameType(nullptr,true) & FrameTypeFlags::BODY) && !bSelection ) // turned on no special area { // I want also in special areas hyphenation @@ -488,8 +488,8 @@ bool SwView::IsValidSelectionForThesaurus() const // must not be a multi-selection, and if it is a selection it needs // to be within a single paragraph - const bool bMultiSel = m_pWrtShell->GetCrsr()->IsMultiSelection(); - const bool bSelection = static_cast<SwCrsrShell*>(m_pWrtShell)->HasSelection(); + const bool bMultiSel = m_pWrtShell->GetCursor()->IsMultiSelection(); + const bool bSelection = static_cast<SwCursorShell*>(m_pWrtShell)->HasSelection(); return !bMultiSel && (!bSelection || m_pWrtShell->IsSelOnePara() ); } @@ -527,9 +527,9 @@ void SwView::InsertThesaurusSynonym( const OUString &rSynonmText, const OUString ++nRight; // adjust existing selection - SwPaM *pCrsr = m_pWrtShell->GetCrsr(); - pCrsr->GetPoint()->nContent -= nRight; - pCrsr->GetMark()->nContent += nLeft; + SwPaM *pCursor = m_pWrtShell->GetCursor(); + pCursor->GetPoint()->nContent -= nRight; + pCursor->GetMark()->nContent += nLeft; } m_pWrtShell->Insert( rSynonmText ); @@ -566,7 +566,7 @@ void SwView::StartThesaurus() pVOpt->SetIdle( false ); // get initial LookUp text - const bool bSelection = static_cast<SwCrsrShell*>(m_pWrtShell)->HasSelection(); + const bool bSelection = static_cast<SwCursorShell*>(m_pWrtShell)->HasSelection(); OUString aTmp = GetThesaurusLookUpText( bSelection ); Reference< XThesaurus > xThes( ::GetThesaurus() ); @@ -635,31 +635,31 @@ bool SwView::ExecSpellPopup(const Point& rPt) { if (m_pWrtShell->GetSelectionType() & nsSelectionType::SEL_DRW_TXT) bRet = ExecDrwTextSpellPopup(rPt); - else if (!m_pWrtShell->IsSelFrmMode()) + else if (!m_pWrtShell->IsSelFrameMode()) { const bool bOldViewLock = m_pWrtShell->IsViewLocked(); m_pWrtShell->LockView( true ); m_pWrtShell->Push(); SwRect aToFill; - SwCrsrShell *pCrsrShell = static_cast<SwCrsrShell*>(m_pWrtShell); - SwPaM *pCrsr = pCrsrShell->GetCrsr(); - SwPosition aPoint(*pCrsr->GetPoint()); + SwCursorShell *pCursorShell = static_cast<SwCursorShell*>(m_pWrtShell); + SwPaM *pCursor = pCursorShell->GetCursor(); + SwPosition aPoint(*pCursor->GetPoint()); const SwTextNode *pNode = aPoint.nNode.GetNode().GetTextNode(); // Spell-check in case the idle jobs haven't had a chance to kick in. // This makes it possible to suggest spelling corrections for // wrong words independent of the spell-checking idle job. if (pNode && pNode->IsWrongDirty() && - !pCrsrShell->IsTableMode() && - !pCrsr->HasMark() && !pCrsr->IsMultiSelection()) + !pCursorShell->IsTableMode() && + !pCursor->HasMark() && !pCursor->IsMultiSelection()) { - SwContentFrm *pContentFrame = pCrsr->GetContentNode()->getLayoutFrm( - pCrsrShell->GetLayout(), + SwContentFrame *pContentFrame = pCursor->GetContentNode()->getLayoutFrame( + pCursorShell->GetLayout(), &rPt, &aPoint, false); if (pContentFrame) { - SwRect aRepaint(static_cast<SwTextFrm*>(pContentFrame)->_AutoSpell(nullptr, 0)); + SwRect aRepaint(static_cast<SwTextFrame*>(pContentFrame)->_AutoSpell(nullptr, 0)); if (aRepaint.HasArea()) m_pWrtShell->InvalidateWindows(aRepaint); } diff --git a/sw/source/uibase/uiview/viewmdi.cxx b/sw/source/uibase/uiview/viewmdi.cxx index 12e6596b2c3b..600ab97a8c56 100644 --- a/sw/source/uibase/uiview/viewmdi.cxx +++ b/sw/source/uibase/uiview/viewmdi.cxx @@ -61,11 +61,11 @@ using namespace ::com::sun::star::frame; void SwView::SetZoom( SvxZoomType eZoomType, short nFactor, bool bViewOnly ) { - bool const bCrsrIsVisible(m_pWrtShell->IsCrsrVisible()); + bool const bCursorIsVisible(m_pWrtShell->IsCursorVisible()); _SetZoom( GetEditWin().GetOutputSizePixel(), eZoomType, nFactor, bViewOnly ); // fdo#40465 force the cursor to stay in view whilst zooming - if (bCrsrIsVisible) - m_pWrtShell->ShowCrsr(); + if (bCursorIsVisible) + m_pWrtShell->ShowCursor(); } void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType, @@ -329,7 +329,7 @@ IMPL_LINK_TYPED( SwView, MoveNavigationHdl, void*, p, void ) case NID_GRF: case NID_OLE: { - GotoObjFlags eType = GotoObjFlags::FlyFrm; + GotoObjFlags eType = GotoObjFlags::FlyFrame; if(m_nMoveType == NID_GRF) eType = GotoObjFlags::FlyGrf; else if(m_nMoveType == NID_OLE) @@ -339,8 +339,8 @@ IMPL_LINK_TYPED( SwView, MoveNavigationHdl, void*, p, void ) rSh.GotoPrevFly(eType); if(bSuccess) { - rSh.HideCrsr(); - rSh.EnterSelFrmMode(); + rSh.HideCursor(); + rSh.EnterSelFrameMode(); } } break; @@ -370,7 +370,7 @@ IMPL_LINK_TYPED( SwView, MoveNavigationHdl, void*, p, void ) bNext ? rSh.GotoNextOutline() : rSh.GotoPrevOutline(); break; case NID_SEL : - bNext ? rSh.GoNextCrsr() : rSh.GoPrevCrsr(); + bNext ? rSh.GoNextCursor() : rSh.GoPrevCursor(); break; case NID_FTN: rSh.EnterStdMode(); @@ -381,7 +381,7 @@ IMPL_LINK_TYPED( SwView, MoveNavigationHdl, void*, p, void ) case NID_MARK: { // unselect - rSh.MoveCrsr(); + rSh.MoveCursor(); rSh.EnterStdMode(); // collect navigator reminders @@ -434,7 +434,7 @@ IMPL_LINK_TYPED( SwView, MoveNavigationHdl, void*, p, void ) if(m_pSrchItem) { bool bBackward = m_pSrchItem->GetBackward(); - if (rSh.HasSelection() && bNext != rSh.IsCrsrPtAtEnd()) + if (rSh.HasSelection() && bNext != rSh.IsCursorPtAtEnd()) rSh.SwapPam(); m_pSrchItem->SetBackward(!bNext); SfxRequest aReq(FN_REPEAT_SEARCH, SfxCallMode::SLOT, GetPool()); diff --git a/sw/source/uibase/uiview/viewport.cxx b/sw/source/uibase/uiview/viewport.cxx index bbf790402cee..41140112db6b 100644 --- a/sw/source/uibase/uiview/viewport.cxx +++ b/sw/source/uibase/uiview/viewport.cxx @@ -400,7 +400,7 @@ void SwView::CalcPt( Point *pPt, const Rectangle &rRect, bool SwView::IsScroll( const Rectangle &rRect ) const { - return m_bCenterCrsr || m_bTopCrsr || !m_aVisArea.IsInside(rRect); + return m_bCenterCursor || m_bTopCursor || !m_aVisArea.IsInside(rRect); } void SwView::Scroll( const Rectangle &rRect, sal_uInt16 nRangeX, sal_uInt16 nRangeY ) @@ -422,7 +422,7 @@ void SwView::Scroll( const Rectangle &rRect, sal_uInt16 nRangeX, sal_uInt16 nRan { // If we are not supposed to be centered, lying in the VisArea // and are not covered by the dialogue ... - if ( !m_bCenterCrsr && aOldVisArea.IsInside( rRect ) + if ( !m_bCenterCursor && aOldVisArea.IsInside( rRect ) && ( rRect.Left() > aDlgRect.Right() || rRect.Right() < aDlgRect.Left() || rRect.Top() > aDlgRect.Bottom() @@ -449,7 +449,7 @@ void SwView::Scroll( const Rectangle &rRect, sal_uInt16 nRangeX, sal_uInt16 nRan } //s.o. !IsScroll() - if( !(m_bCenterCrsr || m_bTopCrsr) && m_aVisArea.IsInside( rRect ) ) + if( !(m_bCenterCursor || m_bTopCursor) && m_aVisArea.IsInside( rRect ) ) { m_aVisArea = aOldVisArea; return; @@ -470,7 +470,7 @@ void SwView::Scroll( const Rectangle &rRect, sal_uInt16 nRangeX, sal_uInt16 nRan static_cast< sal_uInt16 >((aVisSize.Width() - aSize.Width()) / 2), static_cast< sal_uInt16 >((aVisSize.Height()- aSize.Height())/ 2) ); - if( m_bTopCrsr ) + if( m_bTopCursor ) { const long nBorder = IsDocumentBorder() ? DOCUMENTBORDER : 0; aPt.Y() = std::min( std::max( nBorder, rRect.Top() ), @@ -482,12 +482,12 @@ void SwView::Scroll( const Rectangle &rRect, sal_uInt16 nRangeX, sal_uInt16 nRan SetVisArea( aPt ); return; } - if( !m_bCenterCrsr ) + if( !m_bCenterCursor ) { Point aPt( m_aVisArea.TopLeft() ); CalcPt( &aPt, rRect, nRangeX, nRangeY ); - if( m_bTopCrsr ) + if( m_bTopCursor ) { const long nBorder = IsDocumentBorder() ? DOCUMENTBORDER : 0; aPt.Y() = std::min( std::max( nBorder, rRect.Top() ), @@ -619,14 +619,14 @@ long SwView::PhyPageDown() return 1; } -bool SwView::PageUpCrsr( bool bSelect ) +bool SwView::PageUpCursor( bool bSelect ) { if ( !bSelect ) { - const FrmTypeFlags eType = m_pWrtShell->GetFrmType(nullptr,true); - if ( eType & FrmTypeFlags::FOOTNOTE ) + const FrameTypeFlags eType = m_pWrtShell->GetFrameType(nullptr,true); + if ( eType & FrameTypeFlags::FOOTNOTE ) { - m_pWrtShell->MoveCrsr(); + m_pWrtShell->MoveCursor(); m_pWrtShell->GotoFootnoteAnchor(); m_pWrtShell->Right(CRSR_SKIP_CHARS, false, 1, false ); return true; @@ -635,8 +635,8 @@ bool SwView::PageUpCrsr( bool bSelect ) SwTwips lOff = 0; if ( GetPageScrollUpOffset( lOff ) && - (m_pWrtShell->IsCrsrReadonly() || - !m_pWrtShell->PageCrsr( lOff, bSelect )) && + (m_pWrtShell->IsCursorReadonly() || + !m_pWrtShell->PageCursor( lOff, bSelect )) && PageUp() ) { m_pWrtShell->ResetCursorStack(); @@ -645,12 +645,12 @@ bool SwView::PageUpCrsr( bool bSelect ) return false; } -bool SwView::PageDownCrsr(bool bSelect) +bool SwView::PageDownCursor(bool bSelect) { SwTwips lOff = 0; if ( GetPageScrollDownOffset( lOff ) && - (m_pWrtShell->IsCrsrReadonly() || - !m_pWrtShell->PageCrsr( lOff, bSelect )) && + (m_pWrtShell->IsCursorReadonly() || + !m_pWrtShell->PageCursor( lOff, bSelect )) && PageDown() ) { m_pWrtShell->ResetCursorStack(); diff --git a/sw/source/uibase/uiview/viewprt.cxx b/sw/source/uibase/uiview/viewprt.cxx index 308d0b89e671..dee0f3ccd5e7 100644 --- a/sw/source/uibase/uiview/viewprt.cxx +++ b/sw/source/uibase/uiview/viewprt.cxx @@ -218,7 +218,7 @@ void SwView::ExecutePrint(SfxRequest& rReq) } else if( rReq.GetSlot() == SID_PRINTDOCDIRECT && ! bSilent ) { - if( ( pSh->IsSelection() || pSh->IsFrmSelected() || pSh->IsObjSelected() ) ) + if( ( pSh->IsSelection() || pSh->IsFrameSelected() || pSh->IsObjSelected() ) ) { short nBtn = ScopedVclPtr<SvxPrtQryBox>::Create(&GetEditWin())->Execute(); if( RET_CANCEL == nBtn ) diff --git a/sw/source/uibase/uiview/viewsrch.cxx b/sw/source/uibase/uiview/viewsrch.cxx index 154b08c68747..815fbba15430 100644 --- a/sw/source/uibase/uiview/viewsrch.cxx +++ b/sw/source/uibase/uiview/viewsrch.cxx @@ -108,15 +108,15 @@ static void lcl_addContainerToJson(boost::property_tree::ptree& rTree, const OSt static void lcl_emitSearchResultCallbacks(SvxSearchItem* pSearchItem, SwWrtShell* pWrtShell) { // Emit a callback also about the selection rectangles, grouped by matches. - if (SwPaM* pPaM = pWrtShell->GetCrsr()) + if (SwPaM* pPaM = pWrtShell->GetCursor()) { std::vector<OString> aMatches; for (SwPaM& rPaM : pPaM->GetRingContainer()) { - if (SwShellCrsr* pShellCrsr = dynamic_cast<SwShellCrsr*>(&rPaM)) + if (SwShellCursor* pShellCursor = dynamic_cast<SwShellCursor*>(&rPaM)) { std::vector<OString> aSelectionRectangles; - pShellCrsr->SwSelPaintRects::Show(&aSelectionRectangles); + pShellCursor->SwSelPaintRects::Show(&aSelectionRectangles); std::vector<OString> aRect; for (size_t i = 0; i < aSelectionRectangles.size(); ++i) { @@ -313,7 +313,7 @@ void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage) m_pWrtShell->Push(); OUString aReplace( m_pSrchItem->GetReplaceString() ); SearchOptions aTmp( m_pSrchItem->GetSearchOptions() ); - OUString *pBackRef = ReplaceBackReferences( aTmp, m_pWrtShell->GetCrsr() ); + OUString *pBackRef = ReplaceBackReferences( aTmp, m_pWrtShell->GetCursor() ); if( pBackRef ) m_pSrchItem->SetReplaceString( *pBackRef ); Replace(); @@ -382,7 +382,7 @@ void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage) if (!m_pSrchItem->GetSelection()) { // create it just to overwrite it with stack cursor - m_pWrtShell->CreateCrsr(); + m_pWrtShell->CreateCursor(); // i#8288 restore the original cursor position m_pWrtShell->Pop(false); } @@ -526,7 +526,7 @@ bool SwView::SearchAndWrap(bool bApi) // selection closest to the end being searched to as to exclude the selected // region from the search. (This doesn't work in the case of multiple // selected regions as the cursor doesn't mark the selection in that case.) - m_pWrtShell->GetCrsr()->Normalize( m_pSrchItem->GetBackward() ); + m_pWrtShell->GetCursor()->Normalize( m_pSrchItem->GetBackward() ); if (!m_pWrtShell->HasSelection() && (m_pSrchItem->HasStartPoint())) { @@ -535,7 +535,7 @@ bool SwView::SearchAndWrap(bool bApi) // cursor position. SwEditShell& rShell = GetWrtShell(); Point aPosition(m_pSrchItem->GetStartPointX(), m_pSrchItem->GetStartPointY()); - rShell.SetCrsr(aPosition); + rShell.SetCursor(aPosition); } // If you want to search in selected areas, they must not be unselected. @@ -546,10 +546,10 @@ bool SwView::SearchAndWrap(bool bApi) if( FUNC_Search( aOpts ) ) { m_bFound = true; - if(m_pWrtShell->IsSelFrmMode()) + if(m_pWrtShell->IsSelFrameMode()) { - m_pWrtShell->UnSelectFrm(); - m_pWrtShell->LeaveSelFrmMode(); + m_pWrtShell->UnSelectFrame(); + m_pWrtShell->LeaveSelFrameMode(); } m_pWrtShell->Pop(); m_pWrtShell->EndAllAction(); @@ -703,8 +703,8 @@ void SwView::Replace() { /* check that the selection match the search string*/ //save state - SwPosition aStartPos = (* m_pWrtShell->GetSwCrsr()->Start()); - SwPosition aEndPos = (* m_pWrtShell->GetSwCrsr()->End()); + SwPosition aStartPos = (* m_pWrtShell->GetSwCursor()->Start()); + SwPosition aEndPos = (* m_pWrtShell->GetSwCursor()->End()); bool bHasSelection = m_pSrchItem->GetSelection(); SvxSearchCmd nOldCmd = m_pSrchItem->GetCommand(); @@ -722,13 +722,13 @@ void SwView::Replace() if(! m_pSrchItem->GetBackward() ) { - (* m_pWrtShell->GetSwCrsr()->Start()) = aStartPos; - (* m_pWrtShell->GetSwCrsr()->End()) = aEndPos; + (* m_pWrtShell->GetSwCursor()->Start()) = aStartPos; + (* m_pWrtShell->GetSwCursor()->End()) = aEndPos; } else { - (* m_pWrtShell->GetSwCrsr()->Start()) = aEndPos; - (* m_pWrtShell->GetSwCrsr()->End()) = aStartPos; + (* m_pWrtShell->GetSwCursor()->Start()) = aEndPos; + (* m_pWrtShell->GetSwCursor()->End()) = aStartPos; } bReqReplace = false; } @@ -910,8 +910,8 @@ void SwView::StateSearch(SfxItemSet &rSet) if( m_bJustOpened && m_pWrtShell->IsSelection() ) { OUString aText; - if( 1 == m_pWrtShell->GetCrsrCnt() && - !( aText = m_pWrtShell->SwCrsrShell::GetSelText() ).isEmpty() ) + if( 1 == m_pWrtShell->GetCursorCnt() && + !( aText = m_pWrtShell->SwCursorShell::GetSelText() ).isEmpty() ) { m_pSrchItem->SetSearchString( aText ); m_pSrchItem->SetSelection( false ); diff --git a/sw/source/uibase/uiview/viewstat.cxx b/sw/source/uibase/uiview/viewstat.cxx index 8da54f5a9399..c37b8d77eac2 100644 --- a/sw/source/uibase/uiview/viewstat.cxx +++ b/sw/source/uibase/uiview/viewstat.cxx @@ -68,8 +68,8 @@ void SwView::GetState(SfxItemSet &rSet) { SfxWhichIter aIter(rSet); sal_uInt16 nWhich = aIter.FirstWhich(); - FrmTypeFlags eFrmType = FrmTypeFlags::NONE; - bool bGetFrmType = false; + FrameTypeFlags eFrameType = FrameTypeFlags::NONE; + bool bGetFrameType = false; bool bWeb = dynamic_cast<SwWebView*>( this ) != nullptr; while(nWhich) @@ -79,7 +79,7 @@ void SwView::GetState(SfxItemSet &rSet) case FN_EDIT_LINK_DLG: if( m_pWrtShell->GetLinkManager().GetLinks().empty() ) rSet.DisableItem(nWhich); - else if( m_pWrtShell->IsSelFrmMode() && + else if( m_pWrtShell->IsSelFrameMode() && m_pWrtShell->IsSelObjProtected(FlyProtectFlags::Content) != FlyProtectFlags::NONE) { rSet.DisableItem(nWhich); @@ -87,7 +87,7 @@ void SwView::GetState(SfxItemSet &rSet) break; case SID_INSERT_GRAPHIC: - if( m_pWrtShell->CrsrInsideInputField() ) + if( m_pWrtShell->CursorInsideInputField() ) { rSet.DisableItem(nWhich); } @@ -96,25 +96,25 @@ void SwView::GetState(SfxItemSet &rSet) case FN_INSERT_CAPTION: { // There are captions for graphics, OLE objects, frames and tables - if( !bGetFrmType ) + if( !bGetFrameType ) { - eFrmType = m_pWrtShell->GetFrmType(nullptr, true); - bGetFrmType = true; + eFrameType = m_pWrtShell->GetFrameType(nullptr, true); + bGetFrameType = true; } - if (! ( ((eFrmType & FrmTypeFlags::FLY_ANY) && m_nSelectionType != nsSelectionType::SEL_DRW_TXT)|| + if (! ( ((eFrameType & FrameTypeFlags::FLY_ANY) && m_nSelectionType != nsSelectionType::SEL_DRW_TXT)|| m_nSelectionType & nsSelectionType::SEL_TBL || m_nSelectionType & nsSelectionType::SEL_DRW) ) { rSet.DisableItem(nWhich); } - else if((m_pWrtShell->IsObjSelected() || m_pWrtShell->IsFrmSelected()) && + else if((m_pWrtShell->IsObjSelected() || m_pWrtShell->IsFrameSelected()) && (m_pWrtShell->IsSelObjProtected( FlyProtectFlags::Parent) != FlyProtectFlags::NONE || m_pWrtShell->IsSelObjProtected( FlyProtectFlags::Content ) != FlyProtectFlags::NONE)) { rSet.DisableItem(nWhich); } else if( m_pWrtShell->IsTableMode() - || m_pWrtShell->CrsrInsideInputField() ) + || m_pWrtShell->CursorInsideInputField() ) { rSet.DisableItem(nWhich); } @@ -130,9 +130,9 @@ void SwView::GetState(SfxItemSet &rSet) case FN_CHANGE_PAGENUM: { - FrmTypeFlags nType = m_pWrtShell->GetFrmType(nullptr,true); - if( ( FrmTypeFlags::FLY_ANY | FrmTypeFlags::HEADER | FrmTypeFlags::FOOTER | - FrmTypeFlags::FOOTNOTE | FrmTypeFlags::DRAWOBJ ) & nType ) + FrameTypeFlags nType = m_pWrtShell->GetFrameType(nullptr,true); + if( ( FrameTypeFlags::FLY_ANY | FrameTypeFlags::HEADER | FrameTypeFlags::FOOTER | + FrameTypeFlags::FOOTNOTE | FrameTypeFlags::DRAWOBJ ) & nType ) rSet.DisableItem(nWhich); else rSet.Put(SfxUInt16Item(nWhich, m_pWrtShell->GetPageOffset())); @@ -193,7 +193,7 @@ void SwView::GetState(SfxItemSet &rSet) break; case FN_INSERT_OBJ_CTRL: if( bWeb - || m_pWrtShell->CrsrInsideInputField() ) + || m_pWrtShell->CursorInsideInputField() ) { rSet.DisableItem(nWhich); } @@ -272,7 +272,7 @@ void SwView::GetState(SfxItemSet &rSet) case FN_REDLINE_REJECT_DIRECT: { SwDoc *pDoc = m_pWrtShell->GetDoc(); - SwPaM *pCursor = m_pWrtShell->GetCrsr(); + SwPaM *pCursor = m_pWrtShell->GetCursor(); if (GetDocShell()->HasChangeRecordProtection()) rSet.DisableItem(nWhich); else if (pCursor->HasMark()) @@ -323,7 +323,7 @@ void SwView::GetState(SfxItemSet &rSet) case SID_THESAURUS: { SwWrtShell &rSh = GetWrtShell(); - if (2 <= rSh.GetCrsrCnt()) // multi selection? + if (2 <= rSh.GetCursorCnt()) // multi selection? rSet.DisableItem(nWhich); else { diff --git a/sw/source/uibase/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx index 3f53c38bc6e7..281a2b586a8b 100644 --- a/sw/source/uibase/uiview/viewtab.cxx +++ b/sw/source/uibase/uiview/viewtab.cxx @@ -223,10 +223,10 @@ void ResizeFrameCols(SwFormatCol& rCol, void SwView::ExecTabWin( SfxRequest& rReq ) { SwWrtShell &rSh = GetWrtShell(); - const FrmTypeFlags nFrmType = rSh.IsObjSelected() ? - FrmTypeFlags::DRAWOBJ : - rSh.GetFrmType(nullptr,true); - const bool bFrmSelection = rSh.IsFrmSelected(); + const FrameTypeFlags nFrameType = rSh.IsObjSelected() ? + FrameTypeFlags::DRAWOBJ : + rSh.GetFrameType(nullptr,true); + const bool bFrameSelection = rSh.IsFrameSelected(); const bool bBrowse = rSh.GetViewOptions()->getBrowseMode(); const sal_uInt16 nSlot = rReq.GetSlot(); @@ -241,15 +241,15 @@ void SwView::ExecTabWin( SfxRequest& rReq ) const SwFormatFooter& rFooterFormat = rDesc.GetMaster().GetFooter(); SwFrameFormat *pFooterFormat = const_cast<SwFrameFormat*>(rFooterFormat.GetFooterFormat()); - const SwFormatFrmSize &rFrmSize = rDesc.GetMaster().GetFrmSize(); + const SwFormatFrameSize &rFrameSize = rDesc.GetMaster().GetFrameSize(); const SwRect& rPageRect = rSh.GetAnyCurRect(RECT_PAGE); - const long nPageWidth = bBrowse ? rPageRect.Width() : rFrmSize.GetWidth(); - const long nPageHeight = bBrowse ? rPageRect.Height() : rFrmSize.GetHeight(); + const long nPageWidth = bBrowse ? rPageRect.Width() : rFrameSize.GetWidth(); + const long nPageHeight = bBrowse ? rPageRect.Height() : rFrameSize.GetHeight(); bool bUnlockView = false; rSh.StartAllAction(); - bool bSect = bool(nFrmType & FrmTypeFlags::COLSECT); + bool bSect = bool(nFrameType & FrameTypeFlags::COLSECT); switch (nSlot) { @@ -259,7 +259,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) SvxLongLRSpaceItem aLongLR( static_cast<const SvxLongLRSpaceItem&>(pReqArgs-> Get( SID_ATTR_LONG_LRSPACE )) ); SvxLRSpaceItem aLR(RES_LR_SPACE); - if ( !bSect && (bFrmSelection || nFrmType & FrmTypeFlags::FLY_ANY) ) + if ( !bSect && (bFrameSelection || nFrameType & FrameTypeFlags::FLY_ANY) ) { SwFrameFormat* pFormat = static_cast<SwFrameFormat*>(rSh.GetFlyFrameFormat()); const SwRect &rRect = rSh.GetAnyCurRect(RECT_FLY_EMBEDDED); @@ -268,9 +268,9 @@ void SwView::ExecTabWin( SfxRequest& rReq ) { bool bRTL; bool bVertL2R; - bVerticalFrame = ( bFrmSelection && - rSh.IsFrmVertical(true, bRTL, bVertL2R) ) || - ( !bFrmSelection && bVerticalWriting); + bVerticalFrame = ( bFrameSelection && + rSh.IsFrameVertical(true, bRTL, bVertL2R) ) || + ( !bFrameSelection && bVerticalWriting); } long nDeltaX = bVerticalFrame ? rRect.Right() - rPageRect.Right() + aLongLR.GetRight() : @@ -295,7 +295,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) aSet.Put( aHoriOrient ); } - SwFormatFrmSize aSize( pFormat->GetFrmSize() ); + SwFormatFrameSize aSize( pFormat->GetFrameSize() ); long nOldWidth = (long) aSize.GetWidth(); if(aSize.GetWidthPercent()) @@ -309,7 +309,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) aSize.SetWidth( nPageWidth - (aLongLR.GetLeft() + aLongLR.GetRight())); - if( nFrmType & FrmTypeFlags::COLUMN ) + if( nFrameType & FrameTypeFlags::COLUMN ) { SwFormatCol aCol(pFormat->GetCol()); @@ -321,17 +321,17 @@ void SwView::ExecTabWin( SfxRequest& rReq ) rSh.StartAction(); rSh.Push(); - rSh.SetFlyFrmAttr( aSet ); + rSh.SetFlyFrameAttr( aSet ); // Cancel the frame selection - if(!bFrmSelection && rSh.IsFrmSelected()) + if(!bFrameSelection && rSh.IsFrameSelected()) { - rSh.UnSelectFrm(); - rSh.LeaveSelFrmMode(); + rSh.UnSelectFrame(); + rSh.LeaveSelFrameMode(); } rSh.Pop(); rSh.EndAction(); } - else if ( nFrmType & ( FrmTypeFlags::HEADER | FrmTypeFlags::FOOTER )) + else if ( nFrameType & ( FrameTypeFlags::HEADER | FrameTypeFlags::FOOTER )) { // Subtract out page margins long nOld = rDesc.GetMaster().GetLRSpace().GetLeft(); @@ -342,12 +342,12 @@ void SwView::ExecTabWin( SfxRequest& rReq ) aLR.SetLeft(aLongLR.GetLeft()); aLR.SetRight(aLongLR.GetRight()); - if ( nFrmType & FrmTypeFlags::HEADER && pHeaderFormat ) + if ( nFrameType & FrameTypeFlags::HEADER && pHeaderFormat ) pHeaderFormat->SetFormatAttr( aLR ); - else if( nFrmType & FrmTypeFlags::FOOTER && pFooterFormat ) + else if( nFrameType & FrameTypeFlags::FOOTER && pFooterFormat ) pFooterFormat->SetFormatAttr( aLR ); } - else if( nFrmType == FrmTypeFlags::DRAWOBJ) + else if( nFrameType == FrameTypeFlags::DRAWOBJ) { SwRect aRect( rSh.GetObjRect() ); aRect.Left( aLongLR.GetLeft() + rPageRect.Left() ); @@ -418,7 +418,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) SvxLongULSpaceItem aLongULSpace( static_cast<const SvxLongULSpaceItem&>(pReqArgs-> Get( SID_ATTR_LONG_ULSPACE ))); - if( bFrmSelection || nFrmType & FrmTypeFlags::FLY_ANY ) + if( bFrameSelection || nFrameType & FrameTypeFlags::FLY_ANY ) { SwFrameFormat* pFormat = static_cast<SwFrameFormat*>(rSh.GetFlyFrameFormat()); const SwRect &rRect = rSh.GetAnyCurRect(RECT_FLY_EMBEDDED); @@ -430,9 +430,9 @@ void SwView::ExecTabWin( SfxRequest& rReq ) //which of the orientation attributes is to be put depends on the frame's environment bool bRTL; bool bVertL2R; - if ( ( bFrmSelection && - rSh.IsFrmVertical(true, bRTL, bVertL2R ) ) || - ( !bFrmSelection && bVerticalWriting ) ) + if ( ( bFrameSelection && + rSh.IsFrameVertical(true, bRTL, bVertL2R ) ) || + ( !bFrameSelection && bVerticalWriting ) ) { SwFormatHoriOrient aHoriOrient(pFormat->GetHoriOrient()); aHoriOrient.SetHoriOrient(text::HoriOrientation::NONE); @@ -446,7 +446,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) aVertOrient.SetPos(aVertOrient.GetPos() + nDeltaY ); aSet.Put( aVertOrient ); } - SwFormatFrmSize aSize(pFormat->GetFrmSize()); + SwFormatFrameSize aSize(pFormat->GetFrameSize()); if(aSize.GetHeightPercent()) { SwRect aRect; @@ -458,9 +458,9 @@ void SwView::ExecTabWin( SfxRequest& rReq ) aSize.SetHeight(nHeight ); aSet.Put( aSize ); - rSh.SetFlyFrmAttr( aSet ); + rSh.SetFlyFrameAttr( aSet ); } - else if( nFrmType == FrmTypeFlags::DRAWOBJ ) + else if( nFrameType == FrameTypeFlags::DRAWOBJ ) { SwRect aRect( rSh.GetObjRect() ); aRect.Top( aLongULSpace.GetUpper() + rPageRect.Top() ); @@ -498,10 +498,10 @@ void SwView::ExecTabWin( SfxRequest& rReq ) else { SwPageDesc aDesc( rDesc ); - if ( nFrmType & ( FrmTypeFlags::HEADER | FrmTypeFlags::FOOTER )) + if ( nFrameType & ( FrameTypeFlags::HEADER | FrameTypeFlags::FOOTER )) { - const bool bHead = bool(nFrmType & FrmTypeFlags::HEADER); + const bool bHead = bool(nFrameType & FrameTypeFlags::HEADER); SvxULSpaceItem aUL( rDesc.GetMaster().GetULSpace() ); if ( bHead ) aUL.SetUpper( (sal_uInt16)aLongULSpace.GetUpper() ); @@ -511,8 +511,8 @@ void SwView::ExecTabWin( SfxRequest& rReq ) if( (bHead && pHeaderFormat) || (!bHead && pFooterFormat) ) { - SwFormatFrmSize aSz( bHead ? pHeaderFormat->GetFrmSize() : - pFooterFormat->GetFrmSize() ); + SwFormatFrameSize aSz( bHead ? pHeaderFormat->GetFrameSize() : + pFooterFormat->GetFrameSize() ); aSz.SetHeightSizeType( ATT_FIX_SIZE ); aSz.SetHeight(nPageHeight - aLongULSpace.GetLower() - aLongULSpace.GetUpper() ); @@ -856,7 +856,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) } else { - if ( bFrmSelection || nFrmType & FrmTypeFlags::FLY_ANY || bSect) + if ( bFrameSelection || nFrameType & FrameTypeFlags::FLY_ANY || bSect) { SwSectionFormat *pSectFormat = nullptr; SfxItemSet aSet( GetPool(), RES_COL, RES_COL ); @@ -868,7 +868,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) } else { - rSh.GetFlyFrmAttr( aSet ); + rSh.GetFlyFrameAttr( aSet ); } SwFormatCol aCols( bSect ? @@ -884,12 +884,12 @@ void SwView::ExecTabWin( SfxRequest& rReq ) { rSh.StartAction(); rSh.Push(); - rSh.SetFlyFrmAttr( aSet ); + rSh.SetFlyFrameAttr( aSet ); // Cancel the frame selection again - if(!bFrmSelection && rSh.IsFrmSelected()) + if(!bFrameSelection && rSh.IsFrameSelected()) { - rSh.UnSelectFrm(); - rSh.LeaveSelFrmMode(); + rSh.UnSelectFrame(); + rSh.LeaveSelFrameMode(); } rSh.Pop(); rSh.EndAction(); @@ -996,11 +996,11 @@ void SwView::StateTabWin(SfxItemSet& rSet) SwWrtShell &rSh = GetWrtShell(); const Point* pPt = IsTabColFromDoc() || IsTabRowFromDoc() ? &m_aTabColFromDocPos : nullptr; - const FrmTypeFlags nFrmType = rSh.IsObjSelected() - ? FrmTypeFlags::DRAWOBJ - : rSh.GetFrmType( pPt, true ); + const FrameTypeFlags nFrameType = rSh.IsObjSelected() + ? FrameTypeFlags::DRAWOBJ + : rSh.GetFrameType( pPt, true ); - const bool bFrmSelection = rSh.IsFrmSelected(); + const bool bFrameSelection = rSh.IsFrameSelected(); const bool bBrowse = rSh.GetViewOptions()->getBrowseMode(); // PageOffset/limiter const SwRect& rPageRect = rSh.GetAnyCurRect( RECT_PAGE, pPt ); @@ -1012,7 +1012,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) IsTabColFromDoc() || m_bTabRowFromDoc ? rSh.GetMousePageDesc(m_aTabColFromDocPos) : rSh.GetCurPageDesc() ); - const SvxFrameDirectionItem& rFrameDir = rDesc.GetMaster().GetFrmDir(); + const SvxFrameDirectionItem& rFrameDir = rDesc.GetMaster().GetFrameDir(); const bool bVerticalWriting = rSh.IsInVerticalText(); //enable tab stop display on the rulers depending on the writing direction @@ -1092,10 +1092,10 @@ void SwView::StateTabWin(SfxItemSet& rSet) aLongLR.SetLeft(rPagePrtRect.Left()); aLongLR.SetRight(nPageWidth - rPagePrtRect.Right()); } - if ( ( nFrmType & FrmTypeFlags::HEADER || nFrmType & FrmTypeFlags::FOOTER ) && - !(nFrmType & FrmTypeFlags::COLSECT) ) + if ( ( nFrameType & FrameTypeFlags::HEADER || nFrameType & FrameTypeFlags::FOOTER ) && + !(nFrameType & FrameTypeFlags::COLSECT) ) { - SwFrameFormat *pFormat = const_cast<SwFrameFormat*>(nFrmType & FrmTypeFlags::HEADER ? + SwFrameFormat *pFormat = const_cast<SwFrameFormat*>(nFrameType & FrameTypeFlags::HEADER ? rDesc.GetMaster().GetHeader().GetHeaderFormat() : rDesc.GetMaster().GetFooter().GetFooterFormat()); if( pFormat )// #i80890# if rDesc is not the one belonging to the current page is might crash @@ -1111,16 +1111,16 @@ void SwView::StateTabWin(SfxItemSet& rSet) else { SwRect aRect; - if( !bFrmSelection && ((nFrmType & FrmTypeFlags::COLSECT) || rSh.IsDirectlyInSection()) ) + if( !bFrameSelection && ((nFrameType & FrameTypeFlags::COLSECT) || rSh.IsDirectlyInSection()) ) { aRect = rSh.GetAnyCurRect(RECT_SECTION_PRT, pPt); const SwRect aTmpRect = rSh.GetAnyCurRect(RECT_SECTION, pPt); aRect.Pos() += aTmpRect.Pos(); } - else if ( bFrmSelection || nFrmType & FrmTypeFlags::FLY_ANY ) + else if ( bFrameSelection || nFrameType & FrameTypeFlags::FLY_ANY ) aRect = rSh.GetAnyCurRect(RECT_FLY_EMBEDDED, pPt); - else if( nFrmType & FrmTypeFlags::DRAWOBJ) + else if( nFrameType & FrameTypeFlags::DRAWOBJ) aRect = rSh.GetObjRect(); if( aRect.Width() ) @@ -1163,21 +1163,21 @@ void SwView::StateTabWin(SfxItemSet& rSet) (long)aUL.GetLower(), SID_ATTR_LONG_ULSPACE); - if ( bFrmSelection || nFrmType & FrmTypeFlags::FLY_ANY ) + if ( bFrameSelection || nFrameType & FrameTypeFlags::FLY_ANY ) { // Convert document coordinates into page coordinates. const SwRect &rRect = rSh.GetAnyCurRect(RECT_FLY_EMBEDDED, pPt); aLongUL.SetUpper(rRect.Top() - rPageRect.Top()); aLongUL.SetLower(rPageRect.Bottom() - rRect.Bottom()); } - else if ( nFrmType & FrmTypeFlags::HEADER || nFrmType & FrmTypeFlags::FOOTER ) + else if ( nFrameType & FrameTypeFlags::HEADER || nFrameType & FrameTypeFlags::FOOTER ) { SwRect aRect( rSh.GetAnyCurRect( RECT_HEADERFOOTER, pPt)); aRect.Pos() -= rSh.GetAnyCurRect( RECT_PAGE, pPt ).Pos(); aLongUL.SetUpper( aRect.Top() ); aLongUL.SetLower( nPageHeight - aRect.Bottom() ); } - else if( nFrmType & FrmTypeFlags::DRAWOBJ) + else if( nFrameType & FrameTypeFlags::DRAWOBJ) { const SwRect &rRect = rSh.GetObjRect(); aLongUL.SetUpper((rRect.Top() - rPageRect.Top())); @@ -1251,7 +1251,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) if ( nSelType & nsSelectionType::SEL_GRF || nSelType & nsSelectionType::SEL_FRM || nSelType & nsSelectionType::SEL_OLE || - nFrmType == FrmTypeFlags::DRAWOBJ || + nFrameType == FrameTypeFlags::DRAWOBJ || (!bVerticalWriting && (SID_ATTR_PARA_LRSPACE_VERTICAL == nWhich)) || ( bVerticalWriting && (SID_ATTR_PARA_LRSPACE == nWhich)) ) @@ -1319,12 +1319,12 @@ void SwView::StateTabWin(SfxItemSet& rSet) if ( nSelType & nsSelectionType::SEL_GRF || nSelType & nsSelectionType::SEL_FRM || nSelType & nsSelectionType::SEL_OLE || - nFrmType == FrmTypeFlags::DRAWOBJ ) + nFrameType == FrameTypeFlags::DRAWOBJ ) rSet.DisableItem(SID_RULER_BORDER_DISTANCE); else { SvxLRSpaceItem aDistLR(SID_RULER_BORDER_DISTANCE); - if(nFrmType & FrmTypeFlags::FLY_ANY) + if(nFrameType & FrameTypeFlags::FLY_ANY) { if( IsTabColFromDoc() ) { @@ -1339,7 +1339,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER, 0 ); SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER ); aCoreSet.Put( aBoxInfo ); - rSh.GetFlyFrmAttr( aCoreSet ); + rSh.GetFlyFrameAttr( aCoreSet ); const SvxBoxItem& rBox = static_cast<const SvxBoxItem&>(aCoreSet.Get(RES_BOX)); aDistLR.SetLeft(rBox.GetDistance(SvxBoxItemLine::LEFT)); aDistLR.SetRight(rBox.GetDistance(SvxBoxItemLine::RIGHT)); @@ -1358,8 +1358,8 @@ void SwView::StateTabWin(SfxItemSet& rSet) m_nRightBorderDistance = static_cast< sal_uInt16 >(aDistLR.GetRight()); } else if ( IsTabColFromDoc() || - ( rSh.GetTableFormat() && !bFrmSelection && - !(nFrmType & FrmTypeFlags::COLSECT ) ) ) + ( rSh.GetTableFormat() && !bFrameSelection && + !(nFrameType & FrameTypeFlags::COLSECT ) ) ) { SfxItemSet aCoreSet2( GetPool(), RES_BOX, RES_BOX, @@ -1392,7 +1392,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) aDistLR.SetRight(rBox.GetDistance(SvxBoxItemLine::RIGHT)); const SvxBoxItem* pBox = nullptr; - if(nFrmType & FrmTypeFlags::HEADER) + if(nFrameType & FrameTypeFlags::HEADER) { rMaster.GetHeader(); const SwFormatHeader& rHeaderFormat = rMaster.GetHeader(); @@ -1400,7 +1400,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) if( pHeaderFormat )// #i80890# if rDesc is not the one belonging to the current page is might crash pBox = & (const SvxBoxItem&)pHeaderFormat->GetBox(); } - else if(nFrmType & FrmTypeFlags::FOOTER ) + else if(nFrameType & FrameTypeFlags::FOOTER ) { const SwFormatFooter& rFooterFormat = rMaster.GetFooter(); SwFrameFormat *pFooterFormat = const_cast<SwFrameFormat*>(rFooterFormat.GetFooterFormat()); @@ -1434,7 +1434,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) if ( nSelType & nsSelectionType::SEL_GRF || nSelType & nsSelectionType::SEL_FRM || nSelType & nsSelectionType::SEL_OLE || - nFrmType == FrmTypeFlags::DRAWOBJ) + nFrameType == FrameTypeFlags::DRAWOBJ) rSet.DisableItem(nWhich); else { @@ -1451,22 +1451,22 @@ void SwView::StateTabWin(SfxItemSet& rSet) { bool bFrameRTL; bool bFrameVertL2R; - bFrameHasVerticalColumns = rSh.IsFrmVertical(false, bFrameRTL, bFrameVertL2R) && - bFrmSelection; + bFrameHasVerticalColumns = rSh.IsFrameVertical(false, bFrameRTL, bFrameVertL2R) && + bFrameSelection; } bool bHasTable = ( IsTabColFromDoc() || - ( rSh.GetTableFormat() && !bFrmSelection && - !(nFrmType & FrmTypeFlags::COLSECT ) ) ); + ( rSh.GetTableFormat() && !bFrameSelection && + !(nFrameType & FrameTypeFlags::COLSECT ) ) ); bool bTableVertical = bHasTable && rSh.IsTableVertical(); if(((SID_RULER_BORDERS_VERTICAL == nWhich) && ((bHasTable && !bTableVertical) || - (!bVerticalWriting && !bFrmSelection && !bHasTable ) || - ( bFrmSelection && !bFrameHasVerticalColumns))) || + (!bVerticalWriting && !bFrameSelection && !bHasTable ) || + ( bFrameSelection && !bFrameHasVerticalColumns))) || ((SID_RULER_BORDERS == nWhich) && ((bHasTable && bTableVertical) || - (bVerticalWriting && !bFrmSelection&& !bHasTable) || bFrameHasVerticalColumns))) + (bVerticalWriting && !bFrameSelection&& !bHasTable) || bFrameHasVerticalColumns))) rSet.DisableItem(nWhich); else if ( bHasTable ) { @@ -1538,11 +1538,11 @@ void SwView::StateTabWin(SfxItemSet& rSet) } rSet.Put(aColItem, nWhich); } - else if ( bFrmSelection || nFrmType & ( FrmTypeFlags::COLUMN | FrmTypeFlags::COLSECT ) ) + else if ( bFrameSelection || nFrameType & ( FrameTypeFlags::COLUMN | FrameTypeFlags::COLSECT ) ) { // Out of frame or page? sal_uInt16 nNum = 0; - if(bFrmSelection) + if(bFrameSelection) { const SwFrameFormat* pFormat = rSh.GetFlyFrameFormat(); if(pFormat) @@ -1552,10 +1552,10 @@ void SwView::StateTabWin(SfxItemSet& rSet) nNum = rSh.GetCurColNum(); if( - // For that matter FrmTypeFlags::COLSECT should not be included + // For that matter FrameTypeFlags::COLSECT should not be included // if the border is selected! - !bFrmSelection && - nFrmType & FrmTypeFlags::COLSECT ) + !bFrameSelection && + nFrameType & FrameTypeFlags::COLSECT ) { const SwSection *pSect = rSh.GetAnySection(false, pPt); OSL_ENSURE( pSect, "Which section?"); @@ -1593,7 +1593,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) rSet.Put(aColItem, nWhich); } } - else if( bFrmSelection || nFrmType & FrmTypeFlags::FLY_ANY ) + else if( bFrameSelection || nFrameType & FrameTypeFlags::FLY_ANY ) { // Columns in frame if ( nNum ) @@ -1608,14 +1608,14 @@ void SwView::StateTabWin(SfxItemSet& rSet) SvxColumnItem aColItem(nNum); const SwRect &rSizeRect = rSh.GetAnyCurRect(RECT_FLY_PRT_EMBEDDED, pPt); - bool bUseVertical = bFrameHasVerticalColumns || (!bFrmSelection && bVerticalWriting); + bool bUseVertical = bFrameHasVerticalColumns || (!bFrameSelection && bVerticalWriting); const long lWidth = bUseVertical ? rSizeRect.Height() : rSizeRect.Width(); const SwRect &rRect = rSh.GetAnyCurRect(RECT_FLY_EMBEDDED, pPt); long nDist2 = ((bUseVertical ? rRect.Height() : rRect.Width()) - lWidth) /2; ::lcl_FillSvxColumn(rCol, lWidth, aColItem, nDist2); SfxItemSet aFrameSet(GetPool(), RES_LR_SPACE, RES_LR_SPACE); - rSh.GetFlyFrmAttr( aFrameSet ); + rSh.GetFlyFrameAttr( aFrameSet ); if(bUseVertical) { @@ -1698,18 +1698,18 @@ void SwView::StateTabWin(SfxItemSet& rSet) { bool bFrameRTL; bool bFrameVertL2R; - bFrameHasVerticalColumns = rSh.IsFrmVertical(false, bFrameRTL, bFrameVertL2R) && - bFrmSelection; + bFrameHasVerticalColumns = rSh.IsFrameVertical(false, bFrameRTL, bFrameVertL2R) && + bFrameSelection; } if(((SID_RULER_ROWS == nWhich) && - ((!bVerticalWriting && !bFrmSelection) || (bFrmSelection && !bFrameHasVerticalColumns))) || + ((!bVerticalWriting && !bFrameSelection) || (bFrameSelection && !bFrameHasVerticalColumns))) || ((SID_RULER_ROWS_VERTICAL == nWhich) && - ((bVerticalWriting && !bFrmSelection) || bFrameHasVerticalColumns))) + ((bVerticalWriting && !bFrameSelection) || bFrameHasVerticalColumns))) rSet.DisableItem(nWhich); else if ( IsTabRowFromDoc() || - ( rSh.GetTableFormat() && !bFrmSelection && - !(nFrmType & FrmTypeFlags::COLSECT ) ) ) + ( rSh.GetTableFormat() && !bFrameSelection && + !(nFrameType & FrameTypeFlags::COLSECT ) ) ) { SwTabCols aTabCols; if ( ( m_bSetTabRowFromDoc = IsTabRowFromDoc() ) ) @@ -1790,10 +1790,10 @@ void SwView::StateTabWin(SfxItemSet& rSet) case SID_RULER_LR_MIN_MAX: { Rectangle aRectangle; - if( ( nFrmType & FrmTypeFlags::COLSECT ) && !IsTabColFromDoc() && - ( nFrmType & ( FrmTypeFlags::TABLE|FrmTypeFlags::COLUMN ) ) ) + if( ( nFrameType & FrameTypeFlags::COLSECT ) && !IsTabColFromDoc() && + ( nFrameType & ( FrameTypeFlags::TABLE|FrameTypeFlags::COLUMN ) ) ) { - if( nFrmType & FrmTypeFlags::TABLE ) + if( nFrameType & FrameTypeFlags::TABLE ) { const size_t nNum = rSh.GetCurTabColNum(); SwTabCols aTabCols; @@ -1878,18 +1878,18 @@ void SwView::StateTabWin(SfxItemSet& rSet) } } - else if ( ((nFrmType & FrmTypeFlags::TABLE) || IsTabColFromDoc()) && - !bFrmSelection ) + else if ( ((nFrameType & FrameTypeFlags::TABLE) || IsTabColFromDoc()) && + !bFrameSelection ) { bool bColumn; if ( IsTabColFromDoc() ) bColumn = rSh.GetCurMouseColNum( m_aTabColFromDocPos ) != 0; else - bColumn = bool(nFrmType & (FrmTypeFlags::COLUMN|FrmTypeFlags::FLY_ANY|FrmTypeFlags::COLSECTOUTTAB)); + bColumn = bool(nFrameType & (FrameTypeFlags::COLUMN|FrameTypeFlags::FLY_ANY|FrameTypeFlags::COLSECTOUTTAB)); if ( !bColumn ) { - if( nFrmType & FrmTypeFlags::FLY_ANY && IsTabColFromDoc() ) + if( nFrameType & FrameTypeFlags::FLY_ANY && IsTabColFromDoc() ) { SwRect aRect( rSh.GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, pPt ) ); @@ -1912,11 +1912,11 @@ void SwView::StateTabWin(SfxItemSet& rSet) } else { // Here only for table in multi-column pages and borders. - bool bSectOutTable = bool(nFrmType & FrmTypeFlags::TABLE); - bool bFrame = bool(nFrmType & FrmTypeFlags::FLY_ANY); - bool bColSct = bool(nFrmType & ( bSectOutTable - ? FrmTypeFlags::COLSECTOUTTAB - : FrmTypeFlags::COLSECT ) + bool bSectOutTable = bool(nFrameType & FrameTypeFlags::TABLE); + bool bFrame = bool(nFrameType & FrameTypeFlags::FLY_ANY); + bool bColSct = bool(nFrameType & ( bSectOutTable + ? FrameTypeFlags::COLSECTOUTTAB + : FrameTypeFlags::COLSECT ) ); //So you can also drag with the mouse, without being in the table. CurRectType eRecType = RECT_PAGE_PRT; @@ -1994,7 +1994,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) } } } - else if ( nFrmType & ( FrmTypeFlags::HEADER | FrmTypeFlags::FOOTER )) + else if ( nFrameType & ( FrameTypeFlags::HEADER | FrameTypeFlags::FOOTER )) { aRectangle.Left() = aPageLRSpace.GetLeft(); aRectangle.Right() = aPageLRSpace.GetRight(); @@ -2009,7 +2009,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) case SID_RULER_PROTECT: { - if(bFrmSelection) + if(bFrameSelection) { FlyProtectFlags nProtect = m_pWrtShell->IsSelObjProtected( FlyProtectFlags::Size|FlyProtectFlags::Pos|FlyProtectFlags::Content ); @@ -2022,7 +2022,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) else { SvxProtectItem aProtect(SID_RULER_PROTECT); - if(bBrowse && !(nFrmType & (FrmTypeFlags::DRAWOBJ|FrmTypeFlags::COLUMN)) && !rSh.GetTableFormat()) + if(bBrowse && !(nFrameType & (FrameTypeFlags::DRAWOBJ|FrameTypeFlags::COLUMN)) && !rSh.GetTableFormat()) { aProtect.SetSizeProtect(true); aProtect.SetPosProtect(true); diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index a8ddf713f4cd..c0e865aafe7a 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -192,8 +192,8 @@ static SwPrintUIOptions * lcl_GetPrintUIOptions( SwWrtShell* pSh = pDocShell->GetWrtShell(); if (pSh) { - SwPaM* pShellCrsr = pSh->GetCrsr(); - nCurrentPage = pShellCrsr->GetPageNum(); + SwPaM* pShellCursor = pSh->GetCursor(); + nCurrentPage = pShellCursor->GetPageNum(); } else if (!bSwSrcView) { @@ -707,17 +707,17 @@ Reference< util::XReplaceDescriptor > SwXTextDocument::createReplaceDescriptor( return xRet; } -SwUnoCrsr* SwXTextDocument::CreateCursorForSearch(Reference< XTextCursor > & xCrsr) +SwUnoCursor* SwXTextDocument::CreateCursorForSearch(Reference< XTextCursor > & xCursor) { getText(); XText *const pText = xBodyText.get(); SwXBodyText* pBText = static_cast<SwXBodyText*>(pText); SwXTextCursor *const pXTextCursor = pBText->CreateTextCursor(true); - xCrsr.set( static_cast<text::XWordCursor*>(pXTextCursor) ); + xCursor.set( static_cast<text::XWordCursor*>(pXTextCursor) ); - auto& rUnoCrsr(pXTextCursor->GetCursor()); - rUnoCrsr.SetRemainInSection(false); - return &rUnoCrsr; + auto& rUnoCursor(pXTextCursor->GetCursor()); + rUnoCursor.SetRemainInSection(false); + return &rUnoCursor; } sal_Int32 SwXTextDocument::replaceAll(const Reference< util::XSearchDescriptor > & xDesc) @@ -728,8 +728,8 @@ sal_Int32 SwXTextDocument::replaceAll(const Reference< util::XSearchDescriptor > if(!IsValid() || !xDescTunnel.is() || !xDescTunnel->getSomething(SwXTextSearch::getUnoTunnelId())) throw RuntimeException(); - Reference< XTextCursor > xCrsr; - auto pUnoCrsr(CreateCursorForSearch(xCrsr)); + Reference< XTextCursor > xCursor; + auto pUnoCursor(CreateCursorForSearch(xCursor)); const SwXTextSearch* pSearch = reinterpret_cast<const SwXTextSearch*>( xDescTunnel->getSomething(SwXTextSearch::getUnoTunnelId())); @@ -743,7 +743,7 @@ sal_Int32 SwXTextDocument::replaceAll(const Reference< util::XSearchDescriptor > SwDocPositions eEnd = pSearch->bBack ? DOCPOS_START : DOCPOS_END; // Search should take place anywhere - pUnoCrsr->SetRemainInSection(false); + pUnoCursor->SetRemainInSection(false); sal_uInt32 nResult; UnoActionContext aContext(pDocShell->GetDoc()); //try attribute search first @@ -762,7 +762,7 @@ sal_Int32 SwXTextDocument::replaceAll(const Reference< util::XSearchDescriptor > pSearch->FillSearchItemSet(aSearch); pSearch->FillReplaceItemSet(aReplace); bool bCancel; - nResult = (sal_Int32)pUnoCrsr->Find( aSearch, !pSearch->bStyles, + nResult = (sal_Int32)pUnoCursor->Find( aSearch, !pSearch->bStyles, eStart, eEnd, bCancel, (FindRanges)eRanges, !pSearch->sSearchText.isEmpty() ? &aSearchOpt : nullptr, @@ -770,11 +770,11 @@ sal_Int32 SwXTextDocument::replaceAll(const Reference< util::XSearchDescriptor > } else if(pSearch->bStyles) { - SwTextFormatColl *pSearchColl = lcl_GetParaStyle(pSearch->sSearchText, pUnoCrsr->GetDoc()); - SwTextFormatColl *pReplaceColl = lcl_GetParaStyle(pSearch->sReplaceText, pUnoCrsr->GetDoc()); + SwTextFormatColl *pSearchColl = lcl_GetParaStyle(pSearch->sSearchText, pUnoCursor->GetDoc()); + SwTextFormatColl *pReplaceColl = lcl_GetParaStyle(pSearch->sReplaceText, pUnoCursor->GetDoc()); bool bCancel; - nResult = pUnoCrsr->Find( *pSearchColl, + nResult = pUnoCursor->Find( *pSearchColl, eStart, eEnd, bCancel, (FindRanges)eRanges, pReplaceColl ); @@ -784,7 +784,7 @@ sal_Int32 SwXTextDocument::replaceAll(const Reference< util::XSearchDescriptor > //todo/mba: assuming that notes should be omitted bool bSearchInNotes = false; bool bCancel; - nResult = pUnoCrsr->Find( aSearchOpt, bSearchInNotes, + nResult = pUnoCursor->Find( aSearchOpt, bSearchInNotes, eStart, eEnd, bCancel, (FindRanges)eRanges, true ); @@ -804,8 +804,8 @@ Reference< util::XSearchDescriptor > SwXTextDocument::createSearchDescriptor() // Used for findAll/First/Next -SwUnoCrsr* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor > & xDesc, - Reference< XTextCursor > & xCrsr, +SwUnoCursor* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor > & xDesc, + Reference< XTextCursor > & xCursor, bool bAll, sal_Int32& nResult, Reference< XInterface > xLastResult) @@ -814,7 +814,7 @@ SwUnoCrsr* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor > & if(!IsValid() || !xDescTunnel.is() || !xDescTunnel->getSomething(SwXTextSearch::getUnoTunnelId())) return nullptr; - auto pUnoCrsr(CreateCursorForSearch(xCrsr)); + auto pUnoCursor(CreateCursorForSearch(xCursor)); const SwXTextSearch* pSearch = reinterpret_cast<const SwXTextSearch*>( xDescTunnel->getSomething(SwXTextSearch::getUnoTunnelId())); @@ -822,17 +822,17 @@ SwUnoCrsr* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor > & if(xLastResult.is()) { Reference<XUnoTunnel> xCursorTunnel( xLastResult, UNO_QUERY); - OTextCursorHelper* pPosCrsr = nullptr; + OTextCursorHelper* pPosCursor = nullptr; if(xCursorTunnel.is()) { - pPosCrsr = reinterpret_cast<OTextCursorHelper*>(xCursorTunnel->getSomething( + pPosCursor = reinterpret_cast<OTextCursorHelper*>(xCursorTunnel->getSomething( OTextCursorHelper::getUnoTunnelId())); } - SwPaM* pCrsr = pPosCrsr ? pPosCrsr->GetPaM() : nullptr; - if(pCrsr) + SwPaM* pCursor = pPosCursor ? pPosCursor->GetPaM() : nullptr; + if(pCursor) { - *pUnoCrsr->GetPoint() = *pCrsr->End(); - pUnoCrsr->DeleteMark(); + *pUnoCursor->GetPoint() = *pCursor->End(); + pUnoCursor->DeleteMark(); } else { @@ -844,15 +844,15 @@ SwUnoCrsr* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor > & } if(!pRange) return nullptr; - pRange->GetPositions(*pUnoCrsr); - if(pUnoCrsr->HasMark()) + pRange->GetPositions(*pUnoCursor); + if(pUnoCursor->HasMark()) { - if(*pUnoCrsr->GetPoint() < *pUnoCrsr->GetMark()) - pUnoCrsr->Exchange(); - pUnoCrsr->DeleteMark(); + if(*pUnoCursor->GetPoint() < *pUnoCursor->GetMark()) + pUnoCursor->Exchange(); + pUnoCursor->DeleteMark(); } } - const SwNode& rRangeNode = pUnoCrsr->GetNode(); + const SwNode& rRangeNode = pUnoCursor->GetNode(); bParentInExtra = rRangeNode.FindFlyStartNode() || rRangeNode.FindFootnoteStartNode() || rRangeNode.FindHeaderStartNode() || @@ -892,18 +892,18 @@ SwUnoCrsr* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor > & 0); pSearch->FillSearchItemSet(aSearch); bool bCancel; - nResult = (sal_Int32)pUnoCrsr->Find( aSearch, !pSearch->bStyles, + nResult = (sal_Int32)pUnoCursor->Find( aSearch, !pSearch->bStyles, eStart, eEnd, bCancel, (FindRanges)eRanges, !pSearch->sSearchText.isEmpty() ? &aSearchOpt : nullptr ); } else if(pSearch->bStyles) { - SwTextFormatColl *pSearchColl = lcl_GetParaStyle(pSearch->sSearchText, pUnoCrsr->GetDoc()); + SwTextFormatColl *pSearchColl = lcl_GetParaStyle(pSearch->sSearchText, pUnoCursor->GetDoc()); //pSearch->sReplaceText SwTextFormatColl *pReplaceColl = nullptr; bool bCancel; - nResult = (sal_Int32)pUnoCrsr->Find( *pSearchColl, + nResult = (sal_Int32)pUnoCursor->Find( *pSearchColl, eStart, eEnd, bCancel, (FindRanges)eRanges, pReplaceColl ); } @@ -912,7 +912,7 @@ SwUnoCrsr* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor > & //todo/mba: assuming that notes should be omitted bool bSearchInNotes = false; bool bCancel; - nResult = (sal_Int32)pUnoCrsr->Find( aSearchOpt, bSearchInNotes, + nResult = (sal_Int32)pUnoCursor->Find( aSearchOpt, bSearchInNotes, eStart, eEnd, bCancel, (FindRanges)eRanges ); } @@ -921,7 +921,7 @@ SwUnoCrsr* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor > & //second step - find in other eRanges = FND_IN_OTHER; } - return pUnoCrsr; + return pUnoCursor; } Reference< XIndexAccess > @@ -931,12 +931,12 @@ Reference< XIndexAccess > SolarMutexGuard aGuard; Reference< XInterface > xTmp; sal_Int32 nResult = 0; - Reference< XTextCursor > xCrsr; - auto pResultCrsr(FindAny(xDesc, xCrsr, true, nResult, xTmp)); - if(!pResultCrsr) + Reference< XTextCursor > xCursor; + auto pResultCursor(FindAny(xDesc, xCursor, true, nResult, xTmp)); + if(!pResultCursor) throw RuntimeException(); Reference< XIndexAccess > xRet; - xRet = SwXTextRanges::Create( (nResult) ? &(*pResultCrsr) : nullptr ); + xRet = SwXTextRanges::Create( (nResult) ? &(*pResultCursor) : nullptr ); return xRet; } @@ -946,17 +946,17 @@ Reference< XInterface > SwXTextDocument::findFirst(const Reference< util::XSear SolarMutexGuard aGuard; Reference< XInterface > xTmp; sal_Int32 nResult = 0; - Reference< XTextCursor > xCrsr; - auto pResultCrsr(FindAny(xDesc, xCrsr, false, nResult, xTmp)); - if(!pResultCrsr) + Reference< XTextCursor > xCursor; + auto pResultCursor(FindAny(xDesc, xCursor, false, nResult, xTmp)); + if(!pResultCursor) throw RuntimeException(); Reference< XInterface > xRet; if(nResult) { const uno::Reference< text::XText > xParent = ::sw::CreateParentXText(*pDocShell->GetDoc(), - *pResultCrsr->GetPoint()); - xRet = *new SwXTextCursor(xParent, *pResultCrsr); + *pResultCursor->GetPoint()); + xRet = *new SwXTextCursor(xParent, *pResultCursor); } return xRet; } @@ -968,20 +968,20 @@ Reference< XInterface > SwXTextDocument::findNext(const Reference< XInterface > SolarMutexGuard aGuard; Reference< XInterface > xTmp; sal_Int32 nResult = 0; - Reference< XTextCursor > xCrsr; + Reference< XTextCursor > xCursor; if(!xStartAt.is()) throw RuntimeException(); - auto pResultCrsr(FindAny(xDesc, xCrsr, false, nResult, xStartAt)); - if(!pResultCrsr) + auto pResultCursor(FindAny(xDesc, xCursor, false, nResult, xStartAt)); + if(!pResultCursor) throw RuntimeException(); Reference< XInterface > xRet; if(nResult) { const uno::Reference< text::XText > xParent = ::sw::CreateParentXText(*pDocShell->GetDoc(), - *pResultCrsr->GetPoint()); + *pResultCursor->GetPoint()); - xRet = *new SwXTextCursor(xParent, *pResultCrsr); + xRet = *new SwXTextCursor(xParent, *pResultCursor); } return xRet; } @@ -1413,15 +1413,15 @@ void SwXTextDocument::InitNewDoc() if(mxXTextFrames.is()) { - XNameAccess* pFrms = mxXTextFrames.get(); - static_cast<SwXTextFrames*>(pFrms)->Invalidate(); + XNameAccess* pFrames = mxXTextFrames.get(); + static_cast<SwXTextFrames*>(pFrames)->Invalidate(); mxXTextFrames.clear(); } if(mxXGraphicObjects.is()) { - XNameAccess* pFrms = mxXGraphicObjects.get(); - static_cast<SwXTextGraphicObjects*>(pFrms)->Invalidate(); + XNameAccess* pFrames = mxXGraphicObjects.get(); + static_cast<SwXTextGraphicObjects*>(pFrames)->Invalidate(); mxXGraphicObjects.clear(); } @@ -3188,7 +3188,7 @@ int SwXTextDocument::getPart() sal_uInt16 nPage, nLogPage; OUString sDisplay; - pWrtShell->GetPageNumber(-1, pWrtShell->IsCrsrVisible(), nPage, nLogPage, sDisplay); + pWrtShell->GetPageNumber(-1, pWrtShell->IsCursorVisible(), nPage, nLogPage, sDisplay); return nPage - 1; } diff --git a/sw/source/uibase/uno/unotxvw.cxx b/sw/source/uibase/uno/unotxvw.cxx index dd4c778914f2..1c61342daacc 100644 --- a/sw/source/uibase/uno/unotxvw.cxx +++ b/sw/source/uibase/uno/unotxvw.cxx @@ -113,8 +113,8 @@ void SwXTextView::Invalidate() } if(mxTextViewCursor.is()) { - text::XTextViewCursor* pCrsr = mxTextViewCursor.get(); - static_cast<SwXTextViewCursor*>(pCrsr)->Invalidate(); + text::XTextViewCursor* pCursor = mxTextViewCursor.get(); + static_cast<SwXTextViewCursor*>(pCursor)->Invalidate(); mxTextViewCursor.clear(); } @@ -251,7 +251,7 @@ sal_Bool SwXTextView::select(const uno::Any& aInterface) SwPaM * pPaM(nullptr); std::pair<OUString, FlyCntType> frame; OUString tableName; - SwUnoTableCrsr const* pTableCursor(nullptr); + SwUnoTableCursor const* pTableCursor(nullptr); ::sw::mark::IMark const* pMark(nullptr); SwUnoCursorHelper::GetSelectableFromAny(xInterface, *pDoc, pPaM, frame, tableName, pTableCursor, pMark, sdrObjects); @@ -270,8 +270,8 @@ sal_Bool SwXTextView::select(const uno::Any& aInterface) bool const bSuccess(rSh.GotoFly(frame.first, frame.second)); if (bSuccess) { - rSh.HideCrsr(); - rSh.EnterSelFrmMode(); + rSh.HideCursor(); + rSh.EnterSelFrameMode(); } return sal_True; } @@ -336,12 +336,12 @@ uno::Any SwXTextView::getSelection() { case SHELL_MODE_TABLE_TEXT : { - if(rSh.GetTableCrsr()) + if(rSh.GetTableCursor()) { OSL_ENSURE(rSh.GetTableFormat(), "not a table format?"); - uno::Reference< text::XTextTableCursor > xCrsr = new SwXTextTableCursor(*rSh.GetTableFormat(), - rSh.GetTableCrsr()); - aRef.set(xCrsr, uno::UNO_QUERY); + uno::Reference< text::XTextTableCursor > xCursor = new SwXTextTableCursor(*rSh.GetTableFormat(), + rSh.GetTableCursor()); + aRef.set(xCursor, uno::UNO_QUERY); break; } @@ -352,7 +352,7 @@ uno::Any SwXTextView::getSelection() case SHELL_MODE_TABLE_LIST_TEXT: case SHELL_MODE_TEXT : { - uno::Reference< container::XIndexAccess > xPos = SwXTextRanges::Create(rSh.GetCrsr()); + uno::Reference< container::XIndexAccess > xPos = SwXTextRanges::Create(rSh.GetCursor()); aRef.set(xPos, uno::UNO_QUERY); } break; @@ -539,7 +539,7 @@ Sequence< Sequence< PropertyValue > > SwXTextView::getRubyList( sal_Bool /*bAuto SwRubyList aList; - const sal_uInt16 nCount = SwDoc::FillRubyList( *rSh.GetCrsr(), aList, 0 ); + const sal_uInt16 nCount = SwDoc::FillRubyList( *rSh.GetCursor(), aList, 0 ); Sequence< Sequence< PropertyValue > > aRet(nCount); Sequence< PropertyValue >* pRet = aRet.getArray(); OUString aString; @@ -634,7 +634,7 @@ void SAL_CALL SwXTextView::setRubyList( aList.insert(aList.begin() + nPos, std::move(pEntry)); } SwDoc* pDoc = m_pView->GetDocShell()->GetDoc(); - pDoc->SetRubyList( *rSh.GetCrsr(), aList, 0 ); + pDoc->SetRubyList( *rSh.GetCursor(), aList, 0 ); } SfxObjectShellLock SwXTextView::BuildTmpSelectionDoc() @@ -941,12 +941,12 @@ void SwXTextViewCursor::collapseToStart() SwWrtShell& rSh = m_pView->GetWrtShell(); if(rSh.HasSelection()) { - SwPaM* pShellCrsr = rSh.GetCrsr(); - if(*pShellCrsr->GetPoint() > *pShellCrsr->GetMark()) - pShellCrsr->Exchange(); - pShellCrsr->DeleteMark(); + SwPaM* pShellCursor = rSh.GetCursor(); + if(*pShellCursor->GetPoint() > *pShellCursor->GetMark()) + pShellCursor->Exchange(); + pShellCursor->DeleteMark(); rSh.EnterStdMode(); - rSh.SetSelection(*pShellCrsr); + rSh.SetSelection(*pShellCursor); } } else @@ -965,12 +965,12 @@ void SwXTextViewCursor::collapseToEnd() SwWrtShell& rSh = m_pView->GetWrtShell(); if(rSh.HasSelection()) { - SwPaM* pShellCrsr = rSh.GetCrsr(); - if(*pShellCrsr->GetPoint() < *pShellCrsr->GetMark()) - pShellCrsr->Exchange(); - pShellCrsr->DeleteMark(); + SwPaM* pShellCursor = rSh.GetCursor(); + if(*pShellCursor->GetPoint() < *pShellCursor->GetMark()) + pShellCursor->Exchange(); + pShellCursor->DeleteMark(); rSh.EnterStdMode(); - rSh.SetSelection(*pShellCrsr); + rSh.SetSelection(*pShellCursor); } } else @@ -1059,12 +1059,12 @@ void SwXTextViewCursor::gotoRange( eSelMode != SHELL_MODE_TABLE_LIST_TEXT && eSelMode != SHELL_MODE_TEXT )) rSh.EnterStdMode(); - SwPaM* pShellCrsr = rSh.GetCrsr(); - SwPaM aOwnPaM(*pShellCrsr->GetPoint()); - if(pShellCrsr->HasMark()) + SwPaM* pShellCursor = rSh.GetCursor(); + SwPaM aOwnPaM(*pShellCursor->GetPoint()); + if(pShellCursor->HasMark()) { aOwnPaM.SetMark(); - *aOwnPaM.GetMark() = *pShellCrsr->GetMark(); + *aOwnPaM.GetMark() = *pShellCursor->GetMark(); } uno::Reference<lang::XUnoTunnel> xRangeTunnel( xRange, uno::UNO_QUERY); @@ -1081,18 +1081,18 @@ void SwXTextViewCursor::gotoRange( SwXParagraph::getUnoTunnelId())); } - const FrmTypeFlags nFrmType = rSh.GetFrmType(nullptr,true); + const FrameTypeFlags nFrameType = rSh.GetFrameType(nullptr,true); SwStartNodeType eSearchNodeType = SwNormalStartNode; - if(nFrmType & FrmTypeFlags::FLY_ANY) + if(nFrameType & FrameTypeFlags::FLY_ANY) eSearchNodeType = SwFlyStartNode; - else if(nFrmType &FrmTypeFlags::HEADER) + else if(nFrameType &FrameTypeFlags::HEADER) eSearchNodeType = SwHeaderStartNode; - else if(nFrmType & FrmTypeFlags::FOOTER) + else if(nFrameType & FrameTypeFlags::FOOTER) eSearchNodeType = SwFooterStartNode; - else if(nFrmType & FrmTypeFlags::TABLE) + else if(nFrameType & FrameTypeFlags::TABLE) eSearchNodeType = SwTableBoxStartNode; - else if(nFrmType & FrmTypeFlags::FOOTNOTE) + else if(nFrameType & FrameTypeFlags::FOOTNOTE) eSearchNodeType = SwFootnoteStartNode; const SwStartNode* pOwnStartNode = aOwnPaM.GetNode(). @@ -1213,10 +1213,10 @@ sal_Bool SwXTextViewCursor::jumpToFirstPage() if(m_pView) { SwWrtShell& rSh = m_pView->GetWrtShell(); - if (rSh.IsSelFrmMode()) + if (rSh.IsSelFrameMode()) { - rSh.UnSelectFrm(); - rSh.LeaveSelFrmMode(); + rSh.UnSelectFrame(); + rSh.LeaveSelFrameMode(); } rSh.EnterStdMode(); bRet = rSh.SttEndDoc(true); @@ -1234,10 +1234,10 @@ sal_Bool SwXTextViewCursor::jumpToLastPage() if(m_pView) { SwWrtShell& rSh = m_pView->GetWrtShell(); - if (rSh.IsSelFrmMode()) + if (rSh.IsSelFrameMode()) { - rSh.UnSelectFrm(); - rSh.LeaveSelFrmMode(); + rSh.UnSelectFrame(); + rSh.LeaveSelFrameMode(); } rSh.EnterStdMode(); bRet = rSh.SttEndDoc(false); @@ -1311,8 +1311,8 @@ sal_Int16 SwXTextViewCursor::getPage() if(m_pView) { SwWrtShell& rSh = m_pView->GetWrtShell(); - SwPaM* pShellCrsr = rSh.GetCrsr(); - nRet = static_cast<sal_Int16>(pShellCrsr->GetPageNum()); + SwPaM* pShellCursor = rSh.GetCursor(); + nRet = static_cast<sal_Int16>(pShellCursor->GetPageNum()); } else throw uno::RuntimeException(); @@ -1364,9 +1364,9 @@ uno::Reference< text::XText > SwXTextViewCursor::getText() throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) ); SwWrtShell& rSh = m_pView->GetWrtShell(); - SwPaM* pShellCrsr = rSh.GetCrsr(); + SwPaM* pShellCursor = rSh.GetCursor(); SwDoc* pDoc = m_pView->GetDocShell()->GetDoc(); - xRet = ::sw::CreateParentXText(*pDoc, *pShellCrsr->Start()); + xRet = ::sw::CreateParentXText(*pDoc, *pShellCursor->Start()); } else throw uno::RuntimeException(); @@ -1384,9 +1384,9 @@ uno::Reference< text::XTextRange > SwXTextViewCursor::getStart() throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) ); SwWrtShell& rSh = m_pView->GetWrtShell(); - SwPaM* pShellCrsr = rSh.GetCrsr(); + SwPaM* pShellCursor = rSh.GetCursor(); SwDoc* pDoc = m_pView->GetDocShell()->GetDoc(); - xRet = SwXTextRange::CreateXTextRange(*pDoc, *pShellCrsr->Start(), nullptr); + xRet = SwXTextRange::CreateXTextRange(*pDoc, *pShellCursor->Start(), nullptr); } else throw uno::RuntimeException(); @@ -1404,9 +1404,9 @@ uno::Reference< text::XTextRange > SwXTextViewCursor::getEnd() throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) ); SwWrtShell& rSh = m_pView->GetWrtShell(); - SwPaM* pShellCrsr = rSh.GetCrsr(); + SwPaM* pShellCursor = rSh.GetCursor(); SwDoc* pDoc = m_pView->GetDocShell()->GetDoc(); - xRet = SwXTextRange::CreateXTextRange(*pDoc, *pShellCrsr->End(), nullptr); + xRet = SwXTextRange::CreateXTextRange(*pDoc, *pShellCursor->End(), nullptr); } else throw uno::RuntimeException(); @@ -1436,8 +1436,8 @@ OUString SwXTextViewCursor::getString() case SHELL_MODE_TEXT : { SwWrtShell& rSh = m_pView->GetWrtShell(); - SwPaM* pShellCrsr = rSh.GetCrsr(); - SwUnoCursorHelper::GetTextFromPam(*pShellCrsr, uRet); + SwPaM* pShellCursor = rSh.GetCursor(); + SwUnoCursorHelper::GetTextFromPam(*pShellCursor, uRet); } default:;//prevent warning } @@ -1467,8 +1467,8 @@ void SwXTextViewCursor::setString(const OUString& aString) case SHELL_MODE_TEXT : { SwWrtShell& rSh = m_pView->GetWrtShell(); - SwCursor* pShellCrsr = rSh.GetSwCrsr(); - SwUnoCursorHelper::SetString(*pShellCrsr, aString); + SwCursor* pShellCursor = rSh.GetSwCursor(); + SwUnoCursorHelper::SetString(*pShellCursor, aString); } default:;//prevent warning } @@ -1490,12 +1490,12 @@ void SwXTextViewCursor::setPropertyValue( const OUString& rPropertyName, const if(m_pView) { SwWrtShell& rSh = m_pView->GetWrtShell(); - SwPaM* pShellCrsr = rSh.GetCrsr(); - SwNode& rNode = pShellCrsr->GetNode(); + SwPaM* pShellCursor = rSh.GetCursor(); + SwNode& rNode = pShellCursor->GetNode(); if (rNode.IsTextNode()) { SwUnoCursorHelper::SetPropertyValue( - *pShellCrsr, *m_pPropSet, rPropertyName, aValue ); + *pShellCursor, *m_pPropSet, rPropertyName, aValue ); } else throw RuntimeException(); @@ -1513,9 +1513,9 @@ Any SwXTextViewCursor::getPropertyValue( const OUString& rPropertyName ) if(m_pView) { SwWrtShell& rSh = m_pView->GetWrtShell(); - SwPaM* pShellCrsr = rSh.GetCrsr(); + SwPaM* pShellCursor = rSh.GetCursor(); aRet = SwUnoCursorHelper::GetPropertyValue( - *pShellCrsr, *m_pPropSet, rPropertyName); + *pShellCursor, *m_pPropSet, rPropertyName); } else throw RuntimeException(); @@ -1554,9 +1554,9 @@ PropertyState SwXTextViewCursor::getPropertyState( const OUString& rPropertyNam if(m_pView) { SwWrtShell& rSh = m_pView->GetWrtShell(); - SwPaM* pShellCrsr = rSh.GetCrsr(); + SwPaM* pShellCursor = rSh.GetCursor(); eState = SwUnoCursorHelper::GetPropertyState( - *pShellCrsr, *m_pPropSet, rPropertyName); + *pShellCursor, *m_pPropSet, rPropertyName); } else throw RuntimeException(); @@ -1573,9 +1573,9 @@ Sequence< PropertyState > SwXTextViewCursor::getPropertyStates( if(m_pView) { SwWrtShell& rSh = m_pView->GetWrtShell(); - SwPaM* pShellCrsr = rSh.GetCrsr(); + SwPaM* pShellCursor = rSh.GetCursor(); aRet = SwUnoCursorHelper::GetPropertyStates( - *pShellCrsr, *m_pPropSet, rPropertyNames); + *pShellCursor, *m_pPropSet, rPropertyNames); } return aRet; } @@ -1588,9 +1588,9 @@ void SwXTextViewCursor::setPropertyToDefault( const OUString& rPropertyName ) if(m_pView) { SwWrtShell& rSh = m_pView->GetWrtShell(); - SwPaM* pShellCrsr = rSh.GetCrsr(); + SwPaM* pShellCursor = rSh.GetCursor(); SwUnoCursorHelper::SetPropertyToDefault( - *pShellCrsr, *m_pPropSet, rPropertyName); + *pShellCursor, *m_pPropSet, rPropertyName); } } @@ -1603,9 +1603,9 @@ Any SwXTextViewCursor::getPropertyDefault( const OUString& rPropertyName ) if(m_pView) { SwWrtShell& rSh = m_pView->GetWrtShell(); - SwPaM* pShellCrsr = rSh.GetCrsr(); + SwPaM* pShellCursor = rSh.GetCursor(); aRet = SwUnoCursorHelper::GetPropertyDefault( - *pShellCrsr, *m_pPropSet, rPropertyName); + *pShellCursor, *m_pPropSet, rPropertyName); } return aRet; } @@ -1762,25 +1762,25 @@ IMPLEMENT_FORWARD_XINTERFACE2(SwXTextViewCursor,SwXTextViewCursor_Base,OTextCurs const SwDoc* SwXTextViewCursor::GetDoc() const { SwWrtShell& rSh = m_pView->GetWrtShell(); - return rSh.GetCrsr() ? rSh.GetCrsr()->GetDoc() : nullptr; + return rSh.GetCursor() ? rSh.GetCursor()->GetDoc() : nullptr; } SwDoc* SwXTextViewCursor::GetDoc() { SwWrtShell& rSh = m_pView->GetWrtShell(); - return rSh.GetCrsr() ? rSh.GetCrsr()->GetDoc() : nullptr; + return rSh.GetCursor() ? rSh.GetCursor()->GetDoc() : nullptr; } const SwPaM* SwXTextViewCursor::GetPaM() const { SwWrtShell& rSh = m_pView->GetWrtShell(); - return rSh.GetCrsr(); + return rSh.GetCursor(); } SwPaM* SwXTextViewCursor::GetPaM() { SwWrtShell& rSh = m_pView->GetWrtShell(); - return rSh.GetCrsr(); + return rSh.GetCursor(); } uno::Reference< datatransfer::XTransferable > SAL_CALL SwXTextView::getTransferable() @@ -1827,8 +1827,8 @@ void SAL_CALL SwXTextView::insertTransferable( const uno::Reference< datatransfe if ( SwTransferable::IsPaste( rSh, aDataHelper ) ) { SwTransferable::Paste( rSh, aDataHelper ); - if( rSh.IsFrmSelected() || rSh.IsObjSelected() ) - rSh.EnterSelFrmMode(); + if( rSh.IsFrameSelected() || rSh.IsObjSelected() ) + rSh.EnterSelFrameMode(); GetView()->AttrChangedNotify( &rSh ); } } diff --git a/sw/source/uibase/utlui/attrdesc.cxx b/sw/source/uibase/utlui/attrdesc.cxx index 11653aa705c0..6b2e3649f903 100644 --- a/sw/source/uibase/utlui/attrdesc.cxx +++ b/sw/source/uibase/utlui/attrdesc.cxx @@ -222,7 +222,7 @@ bool SwParaConnectBorderItem::GetPresentation // Frame attribute -bool SwFormatFrmSize::GetPresentation +bool SwFormatFrameSize::GetPresentation ( SfxItemPresentation /*ePres*/, SfxMapUnit eCoreUnit, @@ -244,7 +244,7 @@ bool SwFormatFrmSize::GetPresentation } if ( ATT_VAR_SIZE != GetHeightSizeType() ) { - const sal_uInt16 nId = ATT_FIX_SIZE == m_eFrmHeightType ? + const sal_uInt16 nId = ATT_FIX_SIZE == m_eFrameHeightType ? STR_FRM_FIXEDHEIGHT : STR_FRM_MINHEIGHT; rText = rText + ", " + SW_RESSTR( nId ) + " "; if ( GetHeightPercent() ) @@ -337,7 +337,7 @@ bool SwFormatSurround::GetPresentation return true; } -//VertOrientation, how and by what orientate the FlyFrm in the vertical? +//VertOrientation, how and by what orientate the FlyFrame in the vertical? bool SwFormatVertOrient::GetPresentation ( @@ -383,7 +383,7 @@ bool SwFormatVertOrient::GetPresentation return true; } -//HoriOrientation, how and by what orientate the FlyFrm in the horizontal? +//HoriOrientation, how and by what orientate the FlyFrame in the horizontal? bool SwFormatHoriOrient::GetPresentation ( diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index e0026eb3163b..8536c4c62987 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -570,21 +570,21 @@ void SwContentType::FillMemberList(bool* pbLevelOrVisibilityChanged) for(size_t i = 0; i < nMemberCount; ++i) { const SwFrameFormat* pFrameFormat = pWrtShell->GetFlyNum(i,eType,/*bIgnoreTextBoxes=*/true); - const OUString sFrmName = pFrameFormat->GetName(); + const OUString sFrameName = pFrameFormat->GetName(); SwContent* pCnt; if(ContentTypeId::GRAPHIC == nContentType) { OUString sLink; pWrtShell->GetGrfNms( &sLink, nullptr, static_cast<const SwFlyFrameFormat*>( pFrameFormat)); - pCnt = new SwGraphicContent(this, sFrmName, + pCnt = new SwGraphicContent(this, sFrameName, INetURLObject::decode( sLink, INetURLObject::DECODE_UNAMBIGUOUS ), pFrameFormat->FindLayoutRect(false, &aNullPt).Top()); } else { - pCnt = new SwContent(this, sFrmName, + pCnt = new SwContent(this, sFrameName, pFrameFormat->FindLayoutRect(false, &aNullPt).Top() ); } if( !pFrameFormat->GetInfo( aAskItem ) && @@ -3130,8 +3130,8 @@ void SwContentTree::EditEntry(SvTreeListEntry* pEntry, EditEntryMode nMode) uno::Reference< frame::XModel > xModel = m_pActiveShell->GetView().GetDocShell()->GetBaseModel(); uno::Reference< text::XTextGraphicObjectsSupplier > xGraphics(xModel, uno::UNO_QUERY); xNameAccess = xGraphics->getGraphicObjects(); - uno::Reference< text::XTextFramesSupplier > xFrms(xModel, uno::UNO_QUERY); - xSecond = xFrms->getTextFrames(); + uno::Reference< text::XTextFramesSupplier > xFrames(xModel, uno::UNO_QUERY); + xSecond = xFrames->getTextFrames(); uno::Reference< text::XTextEmbeddedObjectsSupplier > xObjs(xModel, uno::UNO_QUERY); xThird = xObjs->getEmbeddedObjects(); } @@ -3148,17 +3148,17 @@ void SwContentTree::EditEntry(SvTreeListEntry* pEntry, EditEntryMode nMode) else if(nMode == EditEntryMode::RENAME) { uno::Reference< frame::XModel > xModel = m_pActiveShell->GetView().GetDocShell()->GetBaseModel(); - uno::Reference< text::XTextFramesSupplier > xFrms(xModel, uno::UNO_QUERY); + uno::Reference< text::XTextFramesSupplier > xFrames(xModel, uno::UNO_QUERY); uno::Reference< text::XTextEmbeddedObjectsSupplier > xObjs(xModel, uno::UNO_QUERY); if(ContentTypeId::FRAME == nType) { - xNameAccess = xFrms->getTextFrames(); + xNameAccess = xFrames->getTextFrames(); xSecond = xObjs->getEmbeddedObjects(); } else { xNameAccess = xObjs->getEmbeddedObjects(); - xSecond = xFrms->getTextFrames(); + xSecond = xFrames->getTextFrames(); } uno::Reference< text::XTextGraphicObjectsSupplier > xGraphics(xModel, uno::UNO_QUERY); xThird = xGraphics->getGraphicObjects(); @@ -3340,7 +3340,7 @@ void SwContentTree::GotoContent(SwContent* pCnt) *static_cast<SwURLFieldContent*>(pCnt)->GetINetAttr() )) { m_pActiveShell->Right( CRSR_SKIP_CHARS, true, 1, false); - m_pActiveShell->SwCrsrShell::SelectTextAttr( RES_TXTATR_INETFMT, true ); + m_pActiveShell->SwCursorShell::SelectTextAttr( RES_TXTATR_INETFMT, true ); } } @@ -3368,7 +3368,7 @@ void SwContentTree::GotoContent(SwContent* pCnt) break; case ContentTypeId::DRAWOBJECT: { - SwPosition aPos = *m_pActiveShell->GetCrsr()->GetPoint(); + SwPosition aPos = *m_pActiveShell->GetCursor()->GetPoint(); SdrView* pDrawView = m_pActiveShell->GetDrawView(); if (pDrawView) { @@ -3398,8 +3398,8 @@ void SwContentTree::GotoContent(SwContent* pCnt) } if(bSel) { - m_pActiveShell->HideCrsr(); - m_pActiveShell->EnterSelFrmMode(); + m_pActiveShell->HideCursor(); + m_pActiveShell->EnterSelFrameMode(); } SwView& rView = m_pActiveShell->GetView(); rView.StopShellTimer(); diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx index 0b114186c310..6459620a76b8 100644 --- a/sw/source/uibase/utlui/glbltree.cxx +++ b/sw/source/uibase/utlui/glbltree.cxx @@ -923,8 +923,8 @@ void SwGlobalTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry break; case CTX_INSERT_NEW_FILE: { - SfxViewFrame* pGlobFrm = pActiveShell->GetView().GetViewFrame(); - SwGlobalFrameListener_Impl aFrmListener(*pGlobFrm); + SfxViewFrame* pGlobFrame = pActiveShell->GetView().GetViewFrame(); + SwGlobalFrameListener_Impl aFrameListener(*pGlobFrame); sal_uLong nEntryPos = pEntry ? GetModel()->GetAbsPos(pEntry) : (sal_uLong)-1; // Creating a new doc @@ -936,8 +936,8 @@ void SwGlobalTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry SfxCallMode::SYNCHRON, &aFactory, 0L)); // save at - SfxFrame* pFrm = pItem ? pItem->GetFrame() : nullptr; - SfxViewFrame* pViewFrame = pFrm ? pFrm->GetCurrentViewFrame() : nullptr; + SfxFrame* pFrame = pItem ? pItem->GetFrame() : nullptr; + SfxViewFrame* pViewFrame = pFrame ? pFrame->GetCurrentViewFrame() : nullptr; if (pViewFrame) { const SfxBoolItem* pBool = static_cast<const SfxBoolItem*>( @@ -948,9 +948,9 @@ void SwGlobalTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry OUString sNewFile(pMedium->GetURLObject().GetMainURL(INetURLObject::DECODE_TO_IURI)); // Insert the area with the Doc-Name // Bring the own Doc in the foreground - if(aFrmListener.IsValid() && !sNewFile.isEmpty()) + if(aFrameListener.IsValid() && !sNewFile.isEmpty()) { - pGlobFrm->ToTop(); + pGlobFrame->ToTop(); // Due to the update the entries are invalid if(nEntryPos != (sal_uLong)-1) { diff --git a/sw/source/uibase/utlui/initui.cxx b/sw/source/uibase/utlui/initui.cxx index cf64f93fefa4..8f23fee615fc 100644 --- a/sw/source/uibase/utlui/initui.cxx +++ b/sw/source/uibase/utlui/initui.cxx @@ -51,7 +51,7 @@ enum CachedStringID { OldGrfCat, OldTabCat, - OldFrmCat, + OldFrameCat, OldDrwCat, CurrGlosGroup, CachedStrings @@ -106,14 +106,14 @@ void SetOldTabCat(const OUString& sStr) SetCachedString(OldTabCat, sStr); } -OUString GetOldFrmCat() +OUString GetOldFrameCat() { - return GetCachedString(OldFrmCat); + return GetCachedString(OldFrameCat); } -void SetOldFrmCat(const OUString& sStr) +void SetOldFrameCat(const OUString& sStr) { - SetCachedString(OldFrmCat, sStr); + SetCachedString(OldFrameCat, sStr); } OUString GetOldDrwCat() diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx index 149d047a3cb7..9439081f772d 100644 --- a/sw/source/uibase/utlui/navipi.cxx +++ b/sw/source/uibase/utlui/navipi.cxx @@ -98,7 +98,7 @@ void SwNavigationPI::MoveOutline(sal_uInt16 nSource, sal_uInt16 nTarget, if(bWithChildren && nMove > 1 && nLastOutlinePos < nTarget) { - if(!rSh.IsCrsrPtAtEnd()) + if(!rSh.IsCursorPtAtEnd()) rSh.SwapPam(); nMove -= nLastOutlinePos - nSource; } @@ -113,12 +113,12 @@ void SwNavigationPI::MoveOutline(sal_uInt16 nSource, sal_uInt16 nTarget, // After goto cancel the status frame selection -static void lcl_UnSelectFrm(SwWrtShell *pSh) +static void lcl_UnSelectFrame(SwWrtShell *pSh) { - if (pSh->IsFrmSelected()) + if (pSh->IsFrameSelected()) { - pSh->UnSelectFrm(); - pSh->LeaveSelFrmMode(); + pSh->UnSelectFrame(); + pSh->LeaveSelFrameMode(); } } @@ -243,9 +243,9 @@ IMPL_LINK_TYPED( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox, void ) case FN_SELECT_FOOTER: { - rSh.MoveCrsr(); - const FrmTypeFlags eType = rSh.GetFrmType(nullptr,false); - if (eType & FrmTypeFlags::FOOTER) + rSh.MoveCursor(); + const FrameTypeFlags eType = rSh.GetFrameType(nullptr,false); + if (eType & FrameTypeFlags::FOOTER) { if (rSh.EndPg()) nFuncId = FN_END_OF_PAGE; @@ -257,9 +257,9 @@ IMPL_LINK_TYPED( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox, void ) break; case FN_SELECT_HEADER: { - rSh.MoveCrsr(); - const FrmTypeFlags eType = rSh.GetFrmType(nullptr,false); - if (eType & FrmTypeFlags::HEADER) + rSh.MoveCursor(); + const FrameTypeFlags eType = rSh.GetFrameType(nullptr,false); + if (eType & FrameTypeFlags::HEADER) { if (rSh.SttPg()) nFuncId = FN_START_OF_PAGE; @@ -271,10 +271,10 @@ IMPL_LINK_TYPED( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox, void ) break; case FN_SELECT_FOOTNOTE: { - rSh.MoveCrsr(); - const FrmTypeFlags eFrmType = rSh.GetFrmType(nullptr,false); + rSh.MoveCursor(); + const FrameTypeFlags eFrameType = rSh.GetFrameType(nullptr,false); // Jump from the footnote to the anchor. - if (eFrmType & FrmTypeFlags::FOOTNOTE) + if (eFrameType & FrameTypeFlags::FOOTNOTE) { if (rSh.GotoFootnoteAnchor()) nFuncId = FN_FOOTNOTE_TO_ANCHOR; @@ -326,7 +326,7 @@ IMPL_LINK_TYPED( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox, void ) } if (nFuncId) { - lcl_UnSelectFrm(&rSh); + lcl_UnSelectFrame(&rSh); } if(bFocusToDoc) pView->GetEditWin().GrabFocus(); diff --git a/sw/source/uibase/utlui/shdwcrsr.cxx b/sw/source/uibase/utlui/shdwcrsr.cxx index 6e30e2ff21f5..a67eaa8e037f 100644 --- a/sw/source/uibase/utlui/shdwcrsr.cxx +++ b/sw/source/uibase/utlui/shdwcrsr.cxx @@ -28,7 +28,7 @@ using namespace ::com::sun::star; SwShadowCursor::~SwShadowCursor() { if( USHRT_MAX != nOldMode ) - DrawCrsr( aOldPt, nOldHeight, nOldMode ); + DrawCursor( aOldPt, nOldHeight, nOldMode ); } void SwShadowCursor::SetPos( const Point& rPt, long nHeight, sal_uInt16 nMode ) @@ -38,9 +38,9 @@ void SwShadowCursor::SetPos( const Point& rPt, long nHeight, sal_uInt16 nMode ) if( aOldPt != aPt || nOldHeight != nHeight || nOldMode != nMode ) { if( USHRT_MAX != nOldMode ) - DrawCrsr( aOldPt, nOldHeight, nOldMode ); + DrawCursor( aOldPt, nOldHeight, nOldMode ); - DrawCrsr( aPt, nHeight, nMode ); + DrawCursor( aPt, nHeight, nMode ); nOldMode = nMode; nOldHeight = nHeight; aOldPt = aPt; @@ -66,7 +66,7 @@ void SwShadowCursor::DrawTri( const Point& rPt, long nHeight, bool bLeft ) } } -void SwShadowCursor::DrawCrsr( const Point& rPt, long nHeight, sal_uInt16 nMode ) +void SwShadowCursor::DrawCursor( const Point& rPt, long nHeight, sal_uInt16 nMode ) { nHeight = (((nHeight / 4)+1) * 4) + 1; @@ -93,7 +93,7 @@ void SwShadowCursor::DrawCrsr( const Point& rPt, long nHeight, sal_uInt16 nMode void SwShadowCursor::Paint() { if( USHRT_MAX != nOldMode ) - DrawCrsr( aOldPt, nOldHeight, nOldMode ); + DrawCursor( aOldPt, nOldHeight, nOldMode ); } Rectangle SwShadowCursor::GetRect() const diff --git a/sw/source/uibase/utlui/tmplctrl.cxx b/sw/source/uibase/utlui/tmplctrl.cxx index 6cb0b5cdce78..d518c663ab74 100644 --- a/sw/source/uibase/utlui/tmplctrl.cxx +++ b/sw/source/uibase/utlui/tmplctrl.cxx @@ -98,8 +98,8 @@ void SwTemplateControl::Command( const CommandEvent& rCEvt ) SwView* pView = ::GetActiveView(); SwWrtShell* pWrtShell; if( pView && nullptr != (pWrtShell = pView->GetWrtShellPtr()) && - !pWrtShell->SwCrsrShell::HasSelection()&& - !pWrtShell->IsSelFrmMode() && + !pWrtShell->SwCursorShell::HasSelection()&& + !pWrtShell->IsSelFrameMode() && !pWrtShell->IsObjSelected()) { SfxStyleSheetBasePool* pPool = pView->GetDocShell()-> diff --git a/sw/source/uibase/utlui/uitool.cxx b/sw/source/uibase/utlui/uitool.cxx index 34411a54b85c..476cef8be0b2 100644 --- a/sw/source/uibase/utlui/uitool.cxx +++ b/sw/source/uibase/utlui/uitool.cxx @@ -107,8 +107,8 @@ void PrepareBoxInfo(SfxItemSet& rSet, const SwWrtShell& rSh) aBoxInfo = *static_cast<const SvxBoxInfoItem*>(pBoxInfo); // Table variant: If more than one table cells are selected - rSh.GetCrsr(); //So that GetCrsrCnt() returns the right thing - aBoxInfo.SetTable (rSh.IsTableMode() && rSh.GetCrsrCnt() > 1); + rSh.GetCursor(); //So that GetCursorCnt() returns the right thing + aBoxInfo.SetTable (rSh.IsTableMode() && rSh.GetCursorCnt() > 1); // Always show the distance field aBoxInfo.SetDist (true); // Set minimal size in tables and paragraphs @@ -224,10 +224,10 @@ void FillHdFt(SwFrameFormat* pFormat, const SfxItemSet& rSet) const SfxBoolItem& rDynamic = static_cast<const SfxBoolItem&>(rSet.Get(SID_ATTR_PAGE_DYNAMIC)); // Convert size - SwFormatFrmSize aFrmSize(rDynamic.GetValue() ? ATT_MIN_SIZE : ATT_FIX_SIZE, + SwFormatFrameSize aFrameSize(rDynamic.GetValue() ? ATT_MIN_SIZE : ATT_FIX_SIZE, rSize.GetSize().Width(), rSize.GetSize().Height()); - aSet.Put(aFrmSize); + aSet.Put(aFrameSize); pFormat->SetFormatAttr(aSet); } @@ -288,7 +288,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc ) if(rSet.GetItemState(SID_ATTR_PAGE_SIZE) == SfxItemState::SET) { const SvxSizeItem& rSizeItem = static_cast<const SvxSizeItem&>(rSet.Get(SID_ATTR_PAGE_SIZE)); - SwFormatFrmSize aSize(ATT_FIX_SIZE); + SwFormatFrameSize aSize(ATT_FIX_SIZE); aSize.SetSize(rSizeItem.GetSize()); rMaster.SetFormatAttr(aSize); } @@ -425,7 +425,7 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet) rSet.Put(aPageItem); // Size - SvxSizeItem aSizeItem(SID_ATTR_PAGE_SIZE, rMaster.GetFrmSize().GetSize()); + SvxSizeItem aSizeItem(SID_ATTR_PAGE_SIZE, rMaster.GetFrameSize().GetSize()); rSet.Put(aSizeItem); // Maximum size @@ -484,8 +484,8 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet) SfxBoolItem aOn(SID_ATTR_PAGE_ON, true); aHeaderSet.Put(aOn); - const SwFormatFrmSize &rFrmSize = pHeaderFormat->GetFrmSize(); - const SwFrmSize eSizeType = rFrmSize.GetHeightSizeType(); + const SwFormatFrameSize &rFrameSize = pHeaderFormat->GetFrameSize(); + const SwFrameSize eSizeType = rFrameSize.GetHeightSizeType(); SfxBoolItem aDynamic(SID_ATTR_PAGE_DYNAMIC, eSizeType != ATT_FIX_SIZE); aHeaderSet.Put(aDynamic); @@ -496,7 +496,7 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet) aHeaderSet.Put(aFirstShared); // Size - SvxSizeItem aSize(SID_ATTR_PAGE_SIZE, Size(rFrmSize.GetSize())); + SvxSizeItem aSize(SID_ATTR_PAGE_SIZE, Size(rFrameSize.GetSize())); aHeaderSet.Put(aSize); // Shifting frame attributes @@ -535,8 +535,8 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet) SfxBoolItem aOn(SID_ATTR_PAGE_ON, true); aFooterSet.Put(aOn); - const SwFormatFrmSize &rFrmSize = pFooterFormat->GetFrmSize(); - const SwFrmSize eSizeType = rFrmSize.GetHeightSizeType(); + const SwFormatFrameSize &rFrameSize = pFooterFormat->GetFrameSize(); + const SwFrameSize eSizeType = rFrameSize.GetHeightSizeType(); SfxBoolItem aDynamic(SID_ATTR_PAGE_DYNAMIC, eSizeType != ATT_FIX_SIZE); aFooterSet.Put(aDynamic); @@ -547,7 +547,7 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet) aFooterSet.Put(aFirstShared); // Size - SvxSizeItem aSize(SID_ATTR_PAGE_SIZE, Size(rFrmSize.GetSize())); + SvxSizeItem aSize(SID_ATTR_PAGE_SIZE, Size(rFrameSize.GetSize())); aFooterSet.Put(aSize); // Shifting Frame attributes @@ -756,7 +756,7 @@ SwTwips GetTableWidth( SwFrameFormat* pFormat, SwTabCols& rCols, sal_uInt16 *pPe case text::HoriOrientation::LEFT: case text::HoriOrientation::RIGHT: case text::HoriOrientation::CENTER: - nWidth = pFormat->GetFrmSize().GetWidth(); + nWidth = pFormat->GetFrameSize().GetWidth(); break; default: { @@ -780,7 +780,7 @@ SwTwips GetTableWidth( SwFrameFormat* pFormat, SwTabCols& rCols, sal_uInt16 *pPe } } if (pPercent) - *pPercent = pFormat->GetFrmSize().GetWidthPercent(); + *pPercent = pFormat->GetFrameSize().GetWidthPercent(); return nWidth; } diff --git a/sw/source/uibase/utlui/unotools.cxx b/sw/source/uibase/utlui/unotools.cxx index e246665e4dc8..1a2c22e66ca2 100644 --- a/sw/source/uibase/utlui/unotools.cxx +++ b/sw/source/uibase/utlui/unotools.cxx @@ -66,7 +66,7 @@ SwOneExampleFrame::SwOneExampleFrame( vcl::Window& rWin, sal_uInt32 nFlags, const Link<SwOneExampleFrame&,void>* pInitializedLink, const OUString* pURL ) : - aTopWindow(VclPtr<SwFrmCtrlWindow>::Create(&rWin, this)), + aTopWindow(VclPtr<SwFrameCtrlWindow>::Create(&rWin, this)), aMenuRes(SW_RES(RES_FRMEX_MENU)), pModuleView(SW_MOD()->GetView()), nStyleFlags(nFlags), @@ -200,10 +200,10 @@ IMPL_LINK_TYPED( SwOneExampleFrame, TimeoutHdl, Idle*, pTimer, void ) // now get the model uno::Reference< beans::XPropertySet > xPrSet(_xControl, uno::UNO_QUERY); uno::Any aFrame = xPrSet->getPropertyValue("Frame"); - uno::Reference< frame::XFrame > xFrm; - aFrame >>= xFrm; + uno::Reference< frame::XFrame > xFrame; + aFrame >>= xFrame; - uno::Reference< beans::XPropertySet > xPropSet( xFrm, uno::UNO_QUERY ); + uno::Reference< beans::XPropertySet > xPropSet( xFrame, uno::UNO_QUERY ); if ( xPropSet.is() ) { try @@ -219,7 +219,7 @@ IMPL_LINK_TYPED( SwOneExampleFrame, TimeoutHdl, Idle*, pTimer, void ) } } - _xController = xFrm->getController(); + _xController = xFrame->getController(); if(_xController.is()) { _xModel = _xController->getModel(); @@ -284,11 +284,11 @@ IMPL_LINK_TYPED( SwOneExampleFrame, TimeoutHdl, Idle*, pTimer, void ) uno::Reference< lang::XUnoTunnel> xTunnel( _xCursor, uno::UNO_QUERY); if( xTunnel.is() ) { - OTextCursorHelper* pCrsr = reinterpret_cast<OTextCursorHelper*>( xTunnel->getSomething( + OTextCursorHelper* pCursor = reinterpret_cast<OTextCursorHelper*>( xTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() )); - if( pCrsr ) + if( pCursor ) { - SwEditShell* pSh = pCrsr->GetDoc()->GetEditShell(); + SwEditShell* pSh = pCursor->GetDoc()->GetEditShell(); do { @@ -331,8 +331,8 @@ IMPL_LINK_TYPED( SwOneExampleFrame, TimeoutHdl, Idle*, pTimer, void ) } } - uno::Reference< beans::XPropertySet > xCrsrProp(_xCursor, uno::UNO_QUERY); - uno::Any aPageStyle = xCrsrProp->getPropertyValue(UNO_NAME_PAGE_STYLE_NAME); + uno::Reference< beans::XPropertySet > xCursorProp(_xCursor, uno::UNO_QUERY); + uno::Any aPageStyle = xCursorProp->getPropertyValue(UNO_NAME_PAGE_STYLE_NAME); OUString sPageStyle; aPageStyle >>= sPageStyle; @@ -370,21 +370,21 @@ IMPL_LINK_TYPED( SwOneExampleFrame, TimeoutHdl, Idle*, pTimer, void ) aInitializedLink.Call(*this); - uno::Reference< text::XTextViewCursorSupplier > xCrsrSupp(_xController, uno::UNO_QUERY); - uno::Reference< view::XScreenCursor > xScrCrsr(xCrsrSupp->getViewCursor(), uno::UNO_QUERY); - if(xScrCrsr.is()) - xScrCrsr->screenUp(); + uno::Reference< text::XTextViewCursorSupplier > xCursorSupp(_xController, uno::UNO_QUERY); + uno::Reference< view::XScreenCursor > xScrCursor(xCursorSupp->getViewCursor(), uno::UNO_QUERY); + if(xScrCursor.is()) + xScrCursor->screenUp(); xWin->setVisible( sal_True ); aTopWindow->Show(); if( xTunnel.is() ) { - OTextCursorHelper* pCrsr = reinterpret_cast<OTextCursorHelper*>( xTunnel->getSomething( + OTextCursorHelper* pCursor = reinterpret_cast<OTextCursorHelper*>( xTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() )); - if( pCrsr ) + if( pCursor ) { - SwEditShell* pSh = pCrsr->GetDoc()->GetEditShell(); + SwEditShell* pSh = pCursor->GetDoc()->GetEditShell(); if( pSh->ActionCount() ) { pSh->EndAllAction(); @@ -404,18 +404,18 @@ void SwOneExampleFrame::ClearDocument( bool bStartUpdateTimer ) uno::Reference< lang::XUnoTunnel> xTunnel( _xCursor, uno::UNO_QUERY); if( xTunnel.is() ) { - OTextCursorHelper* pCrsr = reinterpret_cast<OTextCursorHelper*>(xTunnel->getSomething( + OTextCursorHelper* pCursor = reinterpret_cast<OTextCursorHelper*>(xTunnel->getSomething( OTextCursorHelper::getUnoTunnelId()) ); - if( pCrsr ) + if( pCursor ) { - SwDoc* pDoc = pCrsr->GetDoc(); + SwDoc* pDoc = pCursor->GetDoc(); SwEditShell* pSh = pDoc->GetEditShell(); pSh->LockPaint(); pSh->StartAllAction(); pSh->KillPams(); pSh->ClearMark(); pDoc->ClearDoc(); - pSh->ClearUpCrsrs(); + pSh->ClearUpCursors(); if( aLoadedIdle.IsActive() || !bStartUpdateTimer ) { @@ -503,17 +503,17 @@ IMPL_LINK_TYPED(SwOneExampleFrame, PopupHdl, Menu*, pMenu, bool ) } else if(ITEM_UP == nId || ITEM_DOWN == nId) { - uno::Reference< text::XTextViewCursorSupplier > xCrsrSupp(_xController, uno::UNO_QUERY); - uno::Reference< view::XScreenCursor > xScrCrsr(xCrsrSupp->getViewCursor(), uno::UNO_QUERY); + uno::Reference< text::XTextViewCursorSupplier > xCursorSupp(_xController, uno::UNO_QUERY); + uno::Reference< view::XScreenCursor > xScrCursor(xCursorSupp->getViewCursor(), uno::UNO_QUERY); if(ITEM_UP == nId) - xScrCrsr->screenUp(); + xScrCursor->screenUp(); else - xScrCrsr->screenDown(); + xScrCursor->screenDown(); } return false; }; -SwFrmCtrlWindow::SwFrmCtrlWindow(vcl::Window* pParent, SwOneExampleFrame* pFrame) +SwFrameCtrlWindow::SwFrameCtrlWindow(vcl::Window* pParent, SwOneExampleFrame* pFrame) : VclEventBox(pParent) , pExampleFrame(pFrame) { @@ -521,7 +521,7 @@ SwFrmCtrlWindow::SwFrmCtrlWindow(vcl::Window* pParent, SwOneExampleFrame* pFrame set_fill(true); } -void SwFrmCtrlWindow::Command( const CommandEvent& rCEvt ) +void SwFrameCtrlWindow::Command( const CommandEvent& rCEvt ) { switch ( rCEvt.GetCommand() ) { @@ -540,12 +540,12 @@ void SwFrmCtrlWindow::Command( const CommandEvent& rCEvt ) } } -Size SwFrmCtrlWindow::GetOptimalSize() const +Size SwFrameCtrlWindow::GetOptimalSize() const { return LogicToPixel(Size(82, 124), MapMode(MAP_APPFONT)); } -void SwFrmCtrlWindow::Resize() +void SwFrameCtrlWindow::Resize() { VclEventBox::Resize(); pExampleFrame->ClearDocument(true); diff --git a/sw/source/uibase/wrtsh/delete.cxx b/sw/source/uibase/wrtsh/delete.cxx index dc3ee757940f..725d64271180 100644 --- a/sw/source/uibase/wrtsh/delete.cxx +++ b/sw/source/uibase/wrtsh/delete.cxx @@ -90,9 +90,9 @@ long SwWrtShell::DelLine() // remember the old cursor Push(); ClearMark(); - SwCrsrShell::LeftMargin(); + SwCursorShell::LeftMargin(); SetMark(); - SwCrsrShell::RightMargin(); + SwCursorShell::RightMargin(); long nRet = Delete(); Pop(false); @@ -104,7 +104,7 @@ long SwWrtShell::DelLine() long SwWrtShell::DelToStartOfLine() { OpenMark(); - SwCrsrShell::LeftMargin(); + SwCursorShell::LeftMargin(); long nRet = Delete(); CloseMark( 0 != nRet ); return nRet; @@ -113,7 +113,7 @@ long SwWrtShell::DelToStartOfLine() long SwWrtShell::DelToEndOfLine() { OpenMark(); - SwCrsrShell::RightMargin(); + SwCursorShell::RightMargin(); long nRet = Delete(); CloseMark( 0 != nRet ); return 1; @@ -132,15 +132,15 @@ long SwWrtShell::DelLeft() DelSelectedObj(); // #108205# Set cursor to remembered position. - SetCrsr(&aTmpPt); + SetCursor(&aTmpPt); - LeaveSelFrmMode(); - UnSelectFrm(); + LeaveSelFrameMode(); + UnSelectFrame(); nSelType = GetSelectionType(); if ( nCmp & nSelType ) { - EnterSelFrmMode(); + EnterSelFrameMode(); GotoNextFly(); } @@ -176,29 +176,29 @@ long SwWrtShell::DelLeft() // JP 29.06.95: never erase a table standing in front of it. bool bSwap = false; - const SwTableNode * pWasInTableNd = SwCrsrShell::IsCrsrInTable(); + const SwTableNode * pWasInTableNd = SwCursorShell::IsCursorInTable(); - if( SwCrsrShell::IsSttPara()) + if( SwCursorShell::IsSttPara()) { // #i4032# Don't actually call a 'delete' if we // changed the table cell, compare DelRight(). const SwStartNode * pSNdOld = pWasInTableNd ? - GetSwCrsr()->GetNode().FindTableBoxStartNode() : + GetSwCursor()->GetNode().FindTableBoxStartNode() : nullptr; // If the cursor is at the beginning of a paragraph, try to step // backwards. On failure we are done. - if( !SwCrsrShell::Left(1,CRSR_SKIP_CHARS) ) + if( !SwCursorShell::Left(1,CRSR_SKIP_CHARS) ) return 0; // If the cursor entered or left a table (or both) we are done. No step // back. - const SwTableNode* pIsInTableNd = SwCrsrShell::IsCrsrInTable(); + const SwTableNode* pIsInTableNd = SwCursorShell::IsCursorInTable(); if( pIsInTableNd != pWasInTableNd ) return 0; const SwStartNode* pSNdNew = pIsInTableNd ? - GetSwCrsr()->GetNode().FindTableBoxStartNode() : + GetSwCursor()->GetNode().FindTableBoxStartNode() : nullptr; // #i4032# Don't actually call a 'delete' if we @@ -207,18 +207,18 @@ long SwWrtShell::DelLeft() return 0; OpenMark(); - SwCrsrShell::Right(1,CRSR_SKIP_CHARS); - SwCrsrShell::SwapPam(); + SwCursorShell::Right(1,CRSR_SKIP_CHARS); + SwCursorShell::SwapPam(); bSwap = true; } else { OpenMark(); - SwCrsrShell::Left(1,CRSR_SKIP_CHARS); + SwCursorShell::Left(1,CRSR_SKIP_CHARS); } long nRet = Delete(); if( !nRet && bSwap ) - SwCrsrShell::SwapPam(); + SwCursorShell::SwapPam(); CloseMark( 0 != nRet ); return nRet; } @@ -270,23 +270,23 @@ long SwWrtShell::DelRight() EnterStdMode(); } - pWasInTableNd = IsCrsrInTable(); + pWasInTableNd = IsCursorInTable(); - if( nsSelectionType::SEL_TXT & nSelection && SwCrsrShell::IsSttPara() && - SwCrsrShell::IsEndPara() ) + if( nsSelectionType::SEL_TXT & nSelection && SwCursorShell::IsSttPara() && + SwCursorShell::IsEndPara() ) { // save cursor - SwCrsrShell::Push(); + SwCursorShell::Push(); bool bDelFull = false; - if ( SwCrsrShell::Right(1,CRSR_SKIP_CHARS) ) + if ( SwCursorShell::Right(1,CRSR_SKIP_CHARS) ) { - const SwTableNode * pCurrTableNd = IsCrsrInTable(); + const SwTableNode * pCurrTableNd = IsCursorInTable(); bDelFull = pCurrTableNd && pCurrTableNd != pWasInTableNd; } // restore cursor - SwCrsrShell::Pop( false ); + SwCursorShell::Pop( false ); if( bDelFull ) { @@ -299,44 +299,44 @@ long SwWrtShell::DelRight() { // #108049# Save the startnode of the current cell const SwStartNode * pSNdOld; - pSNdOld = GetSwCrsr()->GetNode().FindTableBoxStartNode(); + pSNdOld = GetSwCursor()->GetNode().FindTableBoxStartNode(); - if ( SwCrsrShell::IsEndPara() ) + if ( SwCursorShell::IsEndPara() ) { // #i41424# Introduced a couple of // Push()-Pop() pairs here. The reason for this is that a // Right()-Left() combination does not make sure, that // the cursor will be in its initial state, because there // may be a numbering in front of the next paragraph. - SwCrsrShell::Push(); + SwCursorShell::Push(); - if ( SwCrsrShell::Right(1, CRSR_SKIP_CHARS) ) + if ( SwCursorShell::Right(1, CRSR_SKIP_CHARS) ) { - if (IsCrsrInTable() || (pWasInTableNd != IsCrsrInTable())) + if (IsCursorInTable() || (pWasInTableNd != IsCursorInTable())) { /** #108049# Save the startnode of the current cell. May be different to pSNdOld as we have moved. */ - const SwStartNode * pSNdNew = GetSwCrsr() + const SwStartNode * pSNdNew = GetSwCursor() ->GetNode().FindTableBoxStartNode(); /** #108049# Only move instead of deleting if we have moved to a different cell */ if (pSNdOld != pSNdNew) { - SwCrsrShell::Pop(); + SwCursorShell::Pop(); break; } } } // restore cursor - SwCrsrShell::Pop( false ); + SwCursorShell::Pop( false ); } } OpenMark(); - SwCrsrShell::Right(1,CRSR_SKIP_CELLS); + SwCursorShell::Right(1,CRSR_SKIP_CELLS); nRet = Delete(); CloseMark( 0 != nRet ); break; @@ -354,12 +354,12 @@ long SwWrtShell::DelRight() DelSelectedObj(); // #108205# Set cursor to remembered position. - SetCrsr(&aTmpPt); + SetCursor(&aTmpPt); - LeaveSelFrmMode(); - UnSelectFrm(); - OSL_ENSURE( !IsFrmSelected(), - "<SwWrtShell::DelRight(..)> - <SwWrtShell::UnSelectFrm()> should unmark all objects" ); + LeaveSelFrameMode(); + UnSelectFrame(); + OSL_ENSURE( !IsFrameSelected(), + "<SwWrtShell::DelRight(..)> - <SwWrtShell::UnSelectFrame()> should unmark all objects" ); // leave draw mode, if necessary. { if (GetView().GetDrawFuncPtr()) @@ -374,7 +374,7 @@ long SwWrtShell::DelRight() } } - // <IsFrmSelected()> can't be true - see above. + // <IsFrameSelected()> can't be true - see above. { nSelection = GetSelectionType(); if ( nsSelectionType::SEL_FRM & nSelection || @@ -382,7 +382,7 @@ long SwWrtShell::DelRight() nsSelectionType::SEL_OLE & nSelection || nsSelectionType::SEL_DRW & nSelection ) { - EnterSelFrmMode(); + EnterSelFrameMode(); GotoNextFly(); } } @@ -454,12 +454,12 @@ long SwWrtShell::DelToEndOfSentence() { Push(); ClearMark(); - if (SwCrsrShell::Right(1,CRSR_SKIP_CHARS)) + if (SwCursorShell::Right(1,CRSR_SKIP_CHARS)) { SetMark(); if (!IsEndPara()) // can only be at the end if it's empty { // for an empty paragraph this would actually select the _next_ - SwCrsrShell::MovePara(fnParaCurr, fnParaEnd); + SwCursorShell::MovePara(fnParaCurr, fnParaEnd); } if (!IsEndOfDoc()) // do not delete last paragraph in body text { diff --git a/sw/source/uibase/wrtsh/move.cxx b/sw/source/uibase/wrtsh/move.cxx index 0ab3213a2f99..904c76697f20 100644 --- a/sw/source/uibase/wrtsh/move.cxx +++ b/sw/source/uibase/wrtsh/move.cxx @@ -38,18 +38,18 @@ const long nReadOnlyScrollOfst = 10; -class ShellMoveCrsr +class ShellMoveCursor { SwWrtShell* pSh; bool bAct; public: - inline ShellMoveCrsr( SwWrtShell* pWrtSh, bool bSel ) + inline ShellMoveCursor( SwWrtShell* pWrtSh, bool bSel ) { - bAct = !pWrtSh->ActionPend() && (pWrtSh->GetFrmType(nullptr,false) & FrmTypeFlags::FLY_ANY); - ( pSh = pWrtSh )->MoveCrsr( bSel ); + bAct = !pWrtSh->ActionPend() && (pWrtSh->GetFrameType(nullptr,false) & FrameTypeFlags::FLY_ANY); + ( pSh = pWrtSh )->MoveCursor( bSel ); pWrtSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_HYPERLINK_GETLINK); } - inline ~ShellMoveCrsr() + inline ~ShellMoveCursor() { if( bAct ) { @@ -61,7 +61,7 @@ public: } }; -void SwWrtShell::MoveCrsr( bool bWithSelect ) +void SwWrtShell::MoveCursor( bool bWithSelect ) { ResetCursorStack(); if ( IsGCAttr() ) @@ -83,20 +83,20 @@ bool SwWrtShell::SimpleMove( FNSimpleMove FnSimpleMove, bool bSelect ) bool bRet; if( bSelect ) { - SttCrsrMove(); - MoveCrsr( true ); + SttCursorMove(); + MoveCursor( true ); bRet = (this->*FnSimpleMove)(); - EndCrsrMove(); + EndCursorMove(); } else if( ( bRet = (this->*FnSimpleMove)() ) ) - MoveCrsr(); + MoveCursor(); return bRet; } bool SwWrtShell::Left( sal_uInt16 nMode, bool bSelect, sal_uInt16 nCount, bool bBasicCall, bool bVisual ) { - if ( !bSelect && !bBasicCall && IsCrsrReadonly() && !GetViewOptions()->IsSelectionInReadonly()) + if ( !bSelect && !bBasicCall && IsCursorReadonly() && !GetViewOptions()->IsSelectionInReadonly()) { Point aTmp( VisArea().Pos() ); aTmp.X() -= VisArea().Width() * nReadOnlyScrollOfst / 100; @@ -105,15 +105,15 @@ bool SwWrtShell::Left( sal_uInt16 nMode, bool bSelect, } else { - ShellMoveCrsr aTmp( this, bSelect ); - return SwCrsrShell::Left( nCount, nMode, bVisual ); + ShellMoveCursor aTmp( this, bSelect ); + return SwCursorShell::Left( nCount, nMode, bVisual ); } } bool SwWrtShell::Right( sal_uInt16 nMode, bool bSelect, sal_uInt16 nCount, bool bBasicCall, bool bVisual ) { - if ( !bSelect && !bBasicCall && IsCrsrReadonly() && !GetViewOptions()->IsSelectionInReadonly() ) + if ( !bSelect && !bBasicCall && IsCursorReadonly() && !GetViewOptions()->IsSelectionInReadonly() ) { Point aTmp( VisArea().Pos() ); aTmp.X() += VisArea().Width() * nReadOnlyScrollOfst / 100; @@ -123,14 +123,14 @@ bool SwWrtShell::Right( sal_uInt16 nMode, bool bSelect, } else { - ShellMoveCrsr aTmp( this, bSelect ); - return SwCrsrShell::Right( nCount, nMode, bVisual ); + ShellMoveCursor aTmp( this, bSelect ); + return SwCursorShell::Right( nCount, nMode, bVisual ); } } bool SwWrtShell::Up( bool bSelect, sal_uInt16 nCount, bool bBasicCall ) { - if ( !bSelect && !bBasicCall && IsCrsrReadonly() && !GetViewOptions()->IsSelectionInReadonly()) + if ( !bSelect && !bBasicCall && IsCursorReadonly() && !GetViewOptions()->IsSelectionInReadonly()) { Point aTmp( VisArea().Pos() ); aTmp.Y() -= VisArea().Height() * nReadOnlyScrollOfst / 100; @@ -138,13 +138,13 @@ bool SwWrtShell::Up( bool bSelect, sal_uInt16 nCount, bool bBasicCall ) return true; } - ShellMoveCrsr aTmp( this, bSelect ); - return SwCrsrShell::Up( nCount ); + ShellMoveCursor aTmp( this, bSelect ); + return SwCursorShell::Up( nCount ); } bool SwWrtShell::Down( bool bSelect, sal_uInt16 nCount, bool bBasicCall ) { - if ( !bSelect && !bBasicCall && IsCrsrReadonly() && !GetViewOptions()->IsSelectionInReadonly()) + if ( !bSelect && !bBasicCall && IsCursorReadonly() && !GetViewOptions()->IsSelectionInReadonly()) { Point aTmp( VisArea().Pos() ); aTmp.Y() += VisArea().Height() * nReadOnlyScrollOfst / 100; @@ -153,13 +153,13 @@ bool SwWrtShell::Down( bool bSelect, sal_uInt16 nCount, bool bBasicCall ) return true; } - ShellMoveCrsr aTmp( this, bSelect ); - return SwCrsrShell::Down( nCount ); + ShellMoveCursor aTmp( this, bSelect ); + return SwCursorShell::Down( nCount ); } bool SwWrtShell::LeftMargin( bool bSelect, bool bBasicCall ) { - if ( !bSelect && !bBasicCall && IsCrsrReadonly() ) + if ( !bSelect && !bBasicCall && IsCursorReadonly() ) { Point aTmp( VisArea().Pos() ); aTmp.X() = DOCUMENTBORDER; @@ -168,14 +168,14 @@ bool SwWrtShell::LeftMargin( bool bSelect, bool bBasicCall ) } else { - ShellMoveCrsr aTmp( this, bSelect ); - return SwCrsrShell::LeftMargin(); + ShellMoveCursor aTmp( this, bSelect ); + return SwCursorShell::LeftMargin(); } } bool SwWrtShell::RightMargin( bool bSelect, bool bBasicCall ) { - if ( !bSelect && !bBasicCall && IsCrsrReadonly() ) + if ( !bSelect && !bBasicCall && IsCursorReadonly() ) { Point aTmp( VisArea().Pos() ); aTmp.X() = GetDocSize().Width() - VisArea().Width() + DOCUMENTBORDER; @@ -186,15 +186,15 @@ bool SwWrtShell::RightMargin( bool bSelect, bool bBasicCall ) } else { - ShellMoveCrsr aTmp( this, bSelect ); - return SwCrsrShell::RightMargin(bBasicCall); + ShellMoveCursor aTmp( this, bSelect ); + return SwCursorShell::RightMargin(bBasicCall); } } bool SwWrtShell::GoStart( bool bKeepArea, bool *pMoveTable, bool bSelect, bool bDontMoveRegion ) { - if ( IsCrsrInTable() ) + if ( IsCursorInTable() ) { const bool bBoxSelection = HasBoxSelection(); if( !m_bBlockMode ) @@ -237,15 +237,15 @@ bool SwWrtShell::GoStart( bool bKeepArea, bool *pMoveTable, else SttSelect(); } - const FrmTypeFlags nFrmType = GetFrmType(nullptr,false); - if ( FrmTypeFlags::FLY_ANY & nFrmType ) + const FrameTypeFlags nFrameType = GetFrameType(nullptr,false); + if ( FrameTypeFlags::FLY_ANY & nFrameType ) { if( MoveSection( fnSectionCurr, fnSectionStart ) ) return true; - else if ( FrmTypeFlags::FLY_FREE & nFrmType || bDontMoveRegion ) + else if ( FrameTypeFlags::FLY_FREE & nFrameType || bDontMoveRegion ) return false; } - if(( FrmTypeFlags::HEADER | FrmTypeFlags::FOOTER | FrmTypeFlags::FOOTNOTE ) & nFrmType ) + if(( FrameTypeFlags::HEADER | FrameTypeFlags::FOOTER | FrameTypeFlags::FOOTNOTE ) & nFrameType ) { if ( MoveSection( fnSectionCurr, fnSectionStart ) ) return true; @@ -253,8 +253,8 @@ bool SwWrtShell::GoStart( bool bKeepArea, bool *pMoveTable, return true; } // Regions ??? - return SwCrsrShell::MoveRegion( fnRegionCurrAndSkip, fnRegionStart ) || - SwCrsrShell::SttEndDoc(true); + return SwCursorShell::MoveRegion( fnRegionCurrAndSkip, fnRegionStart ) || + SwCursorShell::SttEndDoc(true); } bool SwWrtShell::GoEnd(bool bKeepArea, bool *pMoveTable) @@ -262,7 +262,7 @@ bool SwWrtShell::GoEnd(bool bKeepArea, bool *pMoveTable) if ( pMoveTable && *pMoveTable ) return MoveTable( fnTableCurr, fnTableEnd ); - if ( IsCrsrInTable() ) + if ( IsCursorInTable() ) { if ( MoveSection( fnSectionCurr, fnSectionEnd ) || MoveTable( fnTableCurr, fnTableEnd ) ) @@ -270,15 +270,15 @@ bool SwWrtShell::GoEnd(bool bKeepArea, bool *pMoveTable) } else { - const FrmTypeFlags nFrmType = GetFrmType(nullptr,false); - if ( FrmTypeFlags::FLY_ANY & nFrmType ) + const FrameTypeFlags nFrameType = GetFrameType(nullptr,false); + if ( FrameTypeFlags::FLY_ANY & nFrameType ) { if ( MoveSection( fnSectionCurr, fnSectionEnd ) ) return true; - else if ( FrmTypeFlags::FLY_FREE & nFrmType ) + else if ( FrameTypeFlags::FLY_FREE & nFrameType ) return false; } - if(( FrmTypeFlags::HEADER | FrmTypeFlags::FOOTER | FrmTypeFlags::FOOTNOTE ) & nFrmType ) + if(( FrameTypeFlags::HEADER | FrameTypeFlags::FOOTER | FrameTypeFlags::FOOTNOTE ) & nFrameType ) { if ( MoveSection( fnSectionCurr, fnSectionEnd) ) return true; @@ -287,67 +287,67 @@ bool SwWrtShell::GoEnd(bool bKeepArea, bool *pMoveTable) } } // Regions ??? - return SwCrsrShell::MoveRegion( fnRegionCurrAndSkip, fnRegionEnd ) || - SwCrsrShell::SttEndDoc(false); + return SwCursorShell::MoveRegion( fnRegionCurrAndSkip, fnRegionEnd ) || + SwCursorShell::SttEndDoc(false); } bool SwWrtShell::SttDoc( bool bSelect ) { - ShellMoveCrsr aTmp( this, bSelect ); + ShellMoveCursor aTmp( this, bSelect ); return GoStart(false, nullptr, bSelect ); } bool SwWrtShell::EndDoc( bool bSelect) { - ShellMoveCrsr aTmp( this, bSelect ); + ShellMoveCursor aTmp( this, bSelect ); return GoEnd(); } bool SwWrtShell::SttNxtPg( bool bSelect ) { - ShellMoveCrsr aTmp( this, bSelect ); + ShellMoveCursor aTmp( this, bSelect ); return MovePage( fnPageNext, fnPageStart ); } bool SwWrtShell::SttPrvPg( bool bSelect ) { - ShellMoveCrsr aTmp( this, bSelect ); + ShellMoveCursor aTmp( this, bSelect ); return MovePage( fnPagePrev, fnPageStart ); } bool SwWrtShell::EndNxtPg( bool bSelect ) { - ShellMoveCrsr aTmp( this, bSelect ); + ShellMoveCursor aTmp( this, bSelect ); return MovePage( fnPageNext, fnPageEnd ); } bool SwWrtShell::EndPrvPg( bool bSelect ) { - ShellMoveCrsr aTmp( this, bSelect ); + ShellMoveCursor aTmp( this, bSelect ); return MovePage( fnPagePrev, fnPageEnd ); } bool SwWrtShell::SttPg( bool bSelect ) { - ShellMoveCrsr aTmp( this, bSelect ); + ShellMoveCursor aTmp( this, bSelect ); return MovePage( fnPageCurr, fnPageStart ); } bool SwWrtShell::EndPg( bool bSelect ) { - ShellMoveCrsr aTmp( this, bSelect ); + ShellMoveCursor aTmp( this, bSelect ); return MovePage( fnPageCurr, fnPageEnd ); } bool SwWrtShell::SttPara( bool bSelect ) { - ShellMoveCrsr aTmp( this, bSelect ); + ShellMoveCursor aTmp( this, bSelect ); return MovePara( fnParaCurr, fnParaStart ); } bool SwWrtShell::EndPara( bool bSelect ) { - ShellMoveCrsr aTmp( this, bSelect ); + ShellMoveCursor aTmp( this, bSelect ); return MovePara(fnParaCurr,fnParaEnd); } @@ -357,41 +357,41 @@ bool SwWrtShell::EndPara( bool bSelect ) bool SwWrtShell::StartOfColumn( bool bSelect ) { - ShellMoveCrsr aTmp( this, bSelect); + ShellMoveCursor aTmp( this, bSelect); return MoveColumn(fnColumnCurr, fnColumnStart); } bool SwWrtShell::EndOfColumn( bool bSelect ) { - ShellMoveCrsr aTmp( this, bSelect); + ShellMoveCursor aTmp( this, bSelect); return MoveColumn(fnColumnCurr, fnColumnEnd); } bool SwWrtShell::StartOfNextColumn( bool bSelect ) { - ShellMoveCrsr aTmp( this, bSelect); + ShellMoveCursor aTmp( this, bSelect); return MoveColumn( fnColumnNext, fnColumnStart); } bool SwWrtShell::EndOfNextColumn( bool bSelect ) { - ShellMoveCrsr aTmp( this, bSelect); + ShellMoveCursor aTmp( this, bSelect); return MoveColumn(fnColumnNext, fnColumnEnd); } bool SwWrtShell::StartOfPrevColumn( bool bSelect ) { - ShellMoveCrsr aTmp( this, bSelect); + ShellMoveCursor aTmp( this, bSelect); return MoveColumn(fnColumnPrev, fnColumnStart); } bool SwWrtShell::EndOfPrevColumn( bool bSelect ) { - ShellMoveCrsr aTmp( this, bSelect); + ShellMoveCursor aTmp( this, bSelect); return MoveColumn(fnColumnPrev, fnColumnEnd); } -bool SwWrtShell::PushCrsr(SwTwips lOffset, bool bSelect) +bool SwWrtShell::PushCursor(SwTwips lOffset, bool bSelect) { bool bDiff = false; SwRect aOldRect( GetCharRect() ), aTmpArea( VisArea() ); @@ -402,8 +402,8 @@ bool SwWrtShell::PushCrsr(SwTwips lOffset, bool bSelect) { Point aPt( aOldRect.Center() ); - if( !IsCrsrVisible() ) - // set CrsrPos to top-/bottom left pos. So the pagescroll is not + if( !IsCursorVisible() ) + // set CursorPos to top-/bottom left pos. So the pagescroll is not // be dependent on the current cursor, but on the visarea. aPt.Y() = aTmpArea.Top() + aTmpArea.Height() / 2; @@ -413,9 +413,9 @@ bool SwWrtShell::PushCrsr(SwTwips lOffset, bool bSelect) m_bDestOnStack = true; } - // If we had a frame selection, it must be removed after the m_fnSetCrsr + // If we had a frame selection, it must be removed after the m_fnSetCursor // and we have to remember the position on the stack to return to it later. - bool bIsFrmSel = false; + bool bIsFrameSel = false; //Target position is now within the viewable region --> //Place the cursor at the target position; remember that no target @@ -429,14 +429,14 @@ bool SwWrtShell::PushCrsr(SwTwips lOffset, bool bSelect) else EndSelect(); - bIsFrmSel = IsFrmSelected(); + bIsFrameSel = IsFrameSelected(); bool bIsObjSel = 0 != IsObjSelected(); // unselect frame - if( bIsFrmSel || bIsObjSel ) + if( bIsFrameSel || bIsObjSel ) { - UnSelectFrm(); - LeaveSelFrmMode(); + UnSelectFrame(); + LeaveSelFrameMode(); if ( bIsObjSel ) { GetView().SetDrawFuncPtr( nullptr ); @@ -446,11 +446,11 @@ bool SwWrtShell::PushCrsr(SwTwips lOffset, bool bSelect) CallChgLnk(); } - (this->*m_fnSetCrsr)( &m_aDest, true ); + (this->*m_fnSetCursor)( &m_aDest, true ); bDiff = aOldRect != GetCharRect(); - if( bIsFrmSel ) + if( bIsFrameSel ) { // In frames take only the upper corner // so that it can be re-selected. @@ -463,36 +463,36 @@ bool SwWrtShell::PushCrsr(SwTwips lOffset, bool bSelect) // Position into the stack; bDiff indicates if there is a // difference between the old and the new cursor position. - m_pCrsrStack = new CrsrStack( bDiff, bIsFrmSel, aOldRect.Center(), - lOffset, m_pCrsrStack ); + m_pCursorStack = new CursorStack( bDiff, bIsFrameSel, aOldRect.Center(), + lOffset, m_pCursorStack ); return !m_bDestOnStack && bDiff; } -bool SwWrtShell::PopCrsr(bool bUpdate, bool bSelect) +bool SwWrtShell::PopCursor(bool bUpdate, bool bSelect) { - if( nullptr == m_pCrsrStack) + if( nullptr == m_pCursorStack) return false; - const bool bValidPos = m_pCrsrStack->bValidCurPos; + const bool bValidPos = m_pCursorStack->bValidCurPos; if( bUpdate && bValidPos ) { // If a predecessor is on the stack, // use the flag for a valid position. SwRect aTmpArea(VisArea()); - aTmpArea.Pos().Y() -= m_pCrsrStack->lOffset; - if( aTmpArea.IsInside( m_pCrsrStack->aDocPos ) ) + aTmpArea.Pos().Y() -= m_pCursorStack->lOffset; + if( aTmpArea.IsInside( m_pCursorStack->aDocPos ) ) { if( bSelect ) SttSelect(); else EndSelect(); - (this->*m_fnSetCrsr)(&m_pCrsrStack->aDocPos, !m_pCrsrStack->bIsFrmSel); - if( m_pCrsrStack->bIsFrmSel && IsObjSelectable(m_pCrsrStack->aDocPos)) + (this->*m_fnSetCursor)(&m_pCursorStack->aDocPos, !m_pCursorStack->bIsFrameSel); + if( m_pCursorStack->bIsFrameSel && IsObjSelectable(m_pCursorStack->aDocPos)) { - HideCrsr(); - SelectObj( m_pCrsrStack->aDocPos ); - EnterSelFrmMode( &m_pCrsrStack->aDocPos ); + HideCursor(); + SelectObj( m_pCursorStack->aDocPos ); + EnterSelFrameMode( &m_pCursorStack->aDocPos ); } } // If a discrepancy between the visible range and the @@ -504,10 +504,10 @@ bool SwWrtShell::PopCrsr(bool bUpdate, bool bSelect) return false; } } - CrsrStack *pTmp = m_pCrsrStack; - m_pCrsrStack = m_pCrsrStack->pNext; + CursorStack *pTmp = m_pCursorStack; + m_pCursorStack = m_pCursorStack->pNext; delete pTmp; - if( nullptr == m_pCrsrStack ) + if( nullptr == m_pCursorStack ) { m_ePageMove = MV_NO; m_bDestOnStack = false; @@ -520,11 +520,11 @@ bool SwWrtShell::PopCrsr(bool bUpdate, bool bSelect) void SwWrtShell::_ResetCursorStack() { - while(m_pCrsrStack) + while(m_pCursorStack) { - CrsrStack* const pTmp = m_pCrsrStack->pNext; - delete m_pCrsrStack; - m_pCrsrStack = pTmp; + CursorStack* const pTmp = m_pCursorStack->pNext; + delete m_pCursorStack; + m_pCursorStack = pTmp; } m_ePageMove = MV_NO; m_bDestOnStack = false; @@ -538,7 +538,7 @@ void SwWrtShell::_ResetCursorStack() transpose cursor */ -bool SwWrtShell::PageCrsr(SwTwips lOffset, bool bSelect) +bool SwWrtShell::PageCursor(SwTwips lOffset, bool bSelect) { // Do nothing if an offset of 0 was indicated if(!lOffset) return false; @@ -548,29 +548,29 @@ bool SwWrtShell::PageCrsr(SwTwips lOffset, bool bSelect) // Start-/EndActionParentheses. // Because only SwViewShell::EndAction() is called at the end, // no updating of the display of the cursor position takes place. - // The CrsrShell-Actionparentheses cannot be used, because it + // The CursorShell-Actionparentheses cannot be used, because it // always leads to displaying the cursor, thus also, // if after the scroll scrolled in a region without a valid postition. // SwViewShell::StartAction(); PageMove eDir = lOffset > 0? MV_PAGE_DOWN: MV_PAGE_UP; // Change of direction and stack present - if( eDir != m_ePageMove && m_ePageMove != MV_NO && PopCrsr( true, bSelect )) + if( eDir != m_ePageMove && m_ePageMove != MV_NO && PopCursor( true, bSelect )) return true; - const bool bRet = PushCrsr(lOffset, bSelect); + const bool bRet = PushCursor(lOffset, bSelect); m_ePageMove = eDir; return bRet; } bool SwWrtShell::GotoPage(sal_uInt16 nPage, bool bRecord) { - ShellMoveCrsr aTmp( this, false); - if( SwCrsrShell::GotoPage(nPage) && bRecord) + ShellMoveCursor aTmp( this, false); + if( SwCursorShell::GotoPage(nPage) && bRecord) { - if(IsSelFrmMode()) + if(IsSelFrameMode()) { - UnSelectFrm(); - LeaveSelFrmMode(); + UnSelectFrame(); + LeaveSelFrameMode(); } return true; } @@ -579,9 +579,9 @@ bool SwWrtShell::GotoPage(sal_uInt16 nPage, bool bRecord) bool SwWrtShell::GotoMark( const ::sw::mark::IMark* const pMark, bool bSelect, bool bStart ) { - ShellMoveCrsr aTmp( this, bSelect ); - SwPosition aPos = *GetCrsr()->GetPoint(); - bool bRet = SwCrsrShell::GotoMark( pMark, bStart ); + ShellMoveCursor aTmp( this, bSelect ); + SwPosition aPos = *GetCursor()->GetPoint(); + bool bRet = SwCursorShell::GotoMark( pMark, bStart ); if (bRet) m_aNavigationMgr.addEntry(aPos); return bRet; @@ -589,7 +589,7 @@ bool SwWrtShell::GotoMark( const ::sw::mark::IMark* const pMark, bool bSelect, b bool SwWrtShell::GotoFly( const OUString& rName, FlyCntType eType, bool bSelFrame ) { - SwPosition aPos = *GetCrsr()->GetPoint(); + SwPosition aPos = *GetCursor()->GetPoint(); bool bRet = SwFEShell::GotoFly(rName, eType, bSelFrame); if (bRet) m_aNavigationMgr.addEntry(aPos); @@ -598,8 +598,8 @@ bool SwWrtShell::GotoFly( const OUString& rName, FlyCntType eType, bool bSelFram bool SwWrtShell::GotoINetAttr( const SwTextINetFormat& rAttr ) { - SwPosition aPos = *GetCrsr()->GetPoint(); - bool bRet = SwCrsrShell::GotoINetAttr(rAttr); + SwPosition aPos = *GetCursor()->GetPoint(); + bool bRet = SwCursorShell::GotoINetAttr(rAttr); if (bRet) m_aNavigationMgr.addEntry(aPos); return bRet; @@ -608,13 +608,13 @@ bool SwWrtShell::GotoINetAttr( const SwTextINetFormat& rAttr ) void SwWrtShell::GotoOutline( sal_uInt16 nIdx ) { addCurrentPosition(); - SwCrsrShell::GotoOutline (nIdx); + SwCursorShell::GotoOutline (nIdx); } bool SwWrtShell::GotoOutline( const OUString& rName ) { - SwPosition aPos = *GetCrsr()->GetPoint(); - bool bRet = SwCrsrShell::GotoOutline (rName); + SwPosition aPos = *GetCursor()->GetPoint(); + bool bRet = SwCursorShell::GotoOutline (rName); if (bRet) m_aNavigationMgr.addEntry(aPos); return bRet; @@ -622,8 +622,8 @@ bool SwWrtShell::GotoOutline( const OUString& rName ) bool SwWrtShell::GotoRegion( const OUString& rName ) { - SwPosition aPos = *GetCrsr()->GetPoint(); - bool bRet = SwCrsrShell::GotoRegion (rName); + SwPosition aPos = *GetCursor()->GetPoint(); + bool bRet = SwCursorShell::GotoRegion (rName); if (bRet) m_aNavigationMgr.addEntry(aPos); return bRet; @@ -632,8 +632,8 @@ bool SwWrtShell::GotoRegion( const OUString& rName ) bool SwWrtShell::GotoRefMark( const OUString& rRefMark, sal_uInt16 nSubType, sal_uInt16 nSeqNo ) { - SwPosition aPos = *GetCrsr()->GetPoint(); - bool bRet = SwCrsrShell::GotoRefMark(rRefMark, nSubType, nSeqNo); + SwPosition aPos = *GetCursor()->GetPoint(); + bool bRet = SwCursorShell::GotoRefMark(rRefMark, nSubType, nSeqNo); if (bRet) m_aNavigationMgr.addEntry(aPos); return bRet; @@ -641,8 +641,8 @@ bool SwWrtShell::GotoRefMark( const OUString& rRefMark, sal_uInt16 nSubType, bool SwWrtShell::GotoNextTOXBase( const OUString* pName ) { - SwPosition aPos = *GetCrsr()->GetPoint(); - bool bRet = SwCrsrShell::GotoNextTOXBase(pName); + SwPosition aPos = *GetCursor()->GetPoint(); + bool bRet = SwCursorShell::GotoNextTOXBase(pName); if (bRet) m_aNavigationMgr.addEntry(aPos); return bRet; @@ -650,24 +650,24 @@ bool SwWrtShell::GotoNextTOXBase( const OUString* pName ) bool SwWrtShell::GotoTable( const OUString& rName ) { - SwPosition aPos = *GetCrsr()->GetPoint(); - bool bRet = SwCrsrShell::GotoTable(rName); + SwPosition aPos = *GetCursor()->GetPoint(); + bool bRet = SwCursorShell::GotoTable(rName); if (bRet) m_aNavigationMgr.addEntry(aPos); return bRet; } bool SwWrtShell::GotoFormatField( const SwFormatField& rField ) { - SwPosition aPos = *GetCrsr()->GetPoint(); - bool bRet = SwCrsrShell::GotoFormatField(rField); + SwPosition aPos = *GetCursor()->GetPoint(); + bool bRet = SwCursorShell::GotoFormatField(rField); if (bRet) m_aNavigationMgr.addEntry(aPos); return bRet; } const SwRangeRedline* SwWrtShell::GotoRedline( sal_uInt16 nArrPos, bool bSelect ) { - SwPosition aPos = *GetCrsr()->GetPoint(); - const SwRangeRedline *pRedline = SwCrsrShell::GotoRedline(nArrPos, bSelect); + SwPosition aPos = *GetCursor()->GetPoint(); + const SwRangeRedline *pRedline = SwCursorShell::GotoRedline(nArrPos, bSelect); if (pRedline) m_aNavigationMgr.addEntry(aPos); return pRedline; @@ -679,7 +679,7 @@ bool SwWrtShell::SelectTextAttr( sal_uInt16 nWhich, const SwTextAttr* pAttr ) { SwMvContext aMvContext(this); SttSelect(); - bRet = SwCrsrShell::SelectTextAttr( nWhich, false, pAttr ); + bRet = SwCursorShell::SelectTextAttr( nWhich, false, pAttr ); } EndSelect(); return bRet; diff --git a/sw/source/uibase/wrtsh/navmgr.cxx b/sw/source/uibase/wrtsh/navmgr.cxx index 1811532e2d50..13888fc5bcab 100644 --- a/sw/source/uibase/wrtsh/navmgr.cxx +++ b/sw/source/uibase/wrtsh/navmgr.cxx @@ -28,7 +28,7 @@ void SwNavigationMgr::GotoSwPosition(const SwPosition &rPos) { // cursor consists of two SwPositions: Point and Mark. // Such a pair is called a PaM. SwPaM is derived from SwRing. // The Ring contains the single regions of a multi-selection. - SwPaM* pPaM = m_rMyShell.GetCrsr(); + SwPaM* pPaM = m_rMyShell.GetCursor(); if(pPaM->HasMark()) pPaM->DeleteMark(); // If there was a selection, get rid of it @@ -77,7 +77,7 @@ void SwNavigationMgr::goBack() { if (backEnabled()) { /* Trying to get the current cursor */ - SwPaM* pPaM = m_rMyShell.GetCrsr(); + SwPaM* pPaM = m_rMyShell.GetCursor(); if (!pPaM) { return; } @@ -162,14 +162,14 @@ bool SwNavigationMgr::addEntry(const SwPosition& rPos) { if (*m_entries.back()->GetPoint() != rPos) { - sw::UnoCursorPointer pCursor(m_rMyShell.GetDoc()->CreateUnoCrsr(rPos)); + sw::UnoCursorPointer pCursor(m_rMyShell.GetDoc()->CreateUnoCursor(rPos)); m_entries.push_back(pCursor); } bRet = true; } else { if ( (!m_entries.empty() && *m_entries.back()->GetPoint() != rPos) || m_entries.empty() ) { - sw::UnoCursorPointer pCursor(m_rMyShell.GetDoc()->CreateUnoCrsr(rPos)); + sw::UnoCursorPointer pCursor(m_rMyShell.GetDoc()->CreateUnoCursor(rPos)); m_entries.push_back(pCursor); bRet = true; } diff --git a/sw/source/uibase/wrtsh/select.cxx b/sw/source/uibase/wrtsh/select.cxx index d617c02ed977..805b075a05d4 100644 --- a/sw/source/uibase/wrtsh/select.cxx +++ b/sw/source/uibase/wrtsh/select.cxx @@ -76,7 +76,7 @@ bool SwWrtShell::SelWrd(const Point *pPt, bool ) { SwMvContext aMvContext(this); SttSelect(); - bRet = SwCrsrShell::SelectWord( pPt ); + bRet = SwCursorShell::SelectWord( pPt ); } EndSelect(); if( bRet ) @@ -93,9 +93,9 @@ void SwWrtShell::SelSentence(const Point *pPt, bool ) { SwMvContext aMvContext(this); ClearMark(); - SwCrsrShell::GoStartSentence(); + SwCursorShell::GoStartSentence(); SttSelect(); - SwCrsrShell::GoEndSentence(); + SwCursorShell::GoEndSentence(); } EndSelect(); if(pPt) @@ -109,9 +109,9 @@ void SwWrtShell::SelPara(const Point *pPt, bool ) { SwMvContext aMvContext(this); ClearMark(); - SwCrsrShell::MovePara( fnParaCurr, fnParaStart ); + SwCursorShell::MovePara( fnParaCurr, fnParaStart ); SttSelect(); - SwCrsrShell::MovePara( fnParaCurr, fnParaEnd ); + SwCursorShell::MovePara( fnParaCurr, fnParaEnd ); } EndSelect(); if(pPt) @@ -131,21 +131,21 @@ long SwWrtShell::SelAll() bool bMoveTable = false; std::unique_ptr<SwPosition> pStartPos; std::unique_ptr<SwPosition> pEndPos; - SwShellCrsr* pTmpCrsr = nullptr; + SwShellCursor* pTmpCursor = nullptr; // Query these early, before we move the cursor. bool bHasWholeTabSelection = HasWholeTabSelection(); - bool bIsCursorInTable = IsCrsrInTable(); + bool bIsCursorInTable = IsCursorInTable(); if (!bHasWholeTabSelection) { - if ( IsSelection() && IsCrsrPtAtEnd() ) + if ( IsSelection() && IsCursorPtAtEnd() ) SwapPam(); - pTmpCrsr = getShellCrsr( false ); - if( pTmpCrsr ) + pTmpCursor = getShellCursor( false ); + if( pTmpCursor ) { - pStartPos.reset(new SwPosition( *pTmpCrsr->GetPoint() )); - pEndPos.reset(new SwPosition( *pTmpCrsr->GetMark() )); + pStartPos.reset(new SwPosition( *pTmpCursor->GetPoint() )); + pEndPos.reset(new SwPosition( *pTmpCursor->GetMark() )); } Push(); bool bIsFullSel = !MoveSection( fnSectionCurr, fnSectionStart); @@ -173,10 +173,10 @@ long SwWrtShell::SelAll() if (bNeedsExtendedSelectAll) { - // Disable table cursor to make sure getShellCrsr() returns m_pCurCrsr, not m_pTableCrsr. + // Disable table cursor to make sure getShellCursor() returns m_pCurrentCursor, not m_pTableCursor. if (IsTableMode()) - TableCrsrToCursor(); - // Do the extended select all on m_pCurCrsr. + TableCursorToCursor(); + // Do the extended select all on m_pCurrentCursor. ExtendedSelectAll(/*bFootnotes =*/ false); } @@ -188,18 +188,18 @@ long SwWrtShell::SelAll() if( pStartPos ) { - pTmpCrsr = getShellCrsr( false ); - if( pTmpCrsr ) + pTmpCursor = getShellCursor( false ); + if( pTmpCursor ) { // Some special handling for sections (e.g. TOC) at the beginning of the document body // to avoid the selection of the first section // if the last selection was behind the first section or // if the last selection was already the first section // In this both cases we select to the end of document - if( ( *pTmpCrsr->GetPoint() < *pEndPos || - ( *pStartPos == *pTmpCrsr->GetMark() && - *pEndPos == *pTmpCrsr->GetPoint() ) ) && !bNeedsExtendedSelectAll) - SwCrsrShell::SttEndDoc(false); + if( ( *pTmpCursor->GetPoint() < *pEndPos || + ( *pStartPos == *pTmpCursor->GetMark() && + *pEndPos == *pTmpCursor->GetPoint() ) ) && !bNeedsExtendedSelectAll) + SwCursorShell::SttEndDoc(false); } } } @@ -304,7 +304,7 @@ void SwWrtShell::PopMode() // eponymous methodes in the CursorShell, the second removes // all selections at first. -long SwWrtShell::SetCrsr(const Point *pPt, bool bTextOnly) +long SwWrtShell::SetCursor(const Point *pPt, bool bTextOnly) { // Remove a possibly present selection at the position // of the mouseclick @@ -313,17 +313,17 @@ long SwWrtShell::SetCrsr(const Point *pPt, bool bTextOnly) ClearMark(); } - return SwCrsrShell::SetCrsr(*pPt, bTextOnly); + return SwCursorShell::SetCursor(*pPt, bTextOnly); } -long SwWrtShell::SetCrsrKillSel(const Point *pPt, bool bTextOnly ) +long SwWrtShell::SetCursorKillSel(const Point *pPt, bool bTextOnly ) { SwActContext aActContext(this); ResetSelect(pPt,false); - return SwCrsrShell::SetCrsr(*pPt, bTextOnly); + return SwCursorShell::SetCursor(*pPt, bTextOnly); } -void SwWrtShell::UnSelectFrm() +void SwWrtShell::UnSelectFrame() { // Remove Frame selection with guaranteed invalid position Point aPt(LONG_MIN, LONG_MIN); @@ -335,10 +335,10 @@ void SwWrtShell::UnSelectFrm() long SwWrtShell::ResetSelect(const Point *,bool) { - if(IsSelFrmMode()) + if(IsSelFrameMode()) { - UnSelectFrm(); - LeaveSelFrmMode(); + UnSelectFrame(); + LeaveSelFrameMode(); } else { @@ -352,7 +352,7 @@ long SwWrtShell::ResetSelect(const Point *,bool) KillPams(); ClearMark(); m_fnKillSel = &SwWrtShell::Ignore; - m_fnSetCrsr = &SwWrtShell::SetCrsr; + m_fnSetCursor = &SwWrtShell::SetCursor; } // After canceling of all selections an update of Attr-Controls @@ -380,12 +380,12 @@ void SwWrtShell::SttSelect() SetMark(); if( m_bBlockMode ) { - SwShellCrsr* pTmp = getShellCrsr( true ); + SwShellCursor* pTmp = getShellCursor( true ); if( !pTmp->HasMark() ) pTmp->SetMark(); } m_fnKillSel = &SwWrtShell::Ignore; - m_fnSetCrsr = &SwWrtShell::SetCrsr; + m_fnSetCursor = &SwWrtShell::SetCursor; m_bInSelect = true; Invalidate(); SwTransferable::CreateSelection( *this ); @@ -405,7 +405,7 @@ void SwWrtShell::EndSelect() else { SttLeaveSelect(nullptr); - m_fnSetCrsr = &SwWrtShell::SetCrsrKillSel; + m_fnSetCursor = &SwWrtShell::SetCursorKillSel; m_fnKillSel = &SwWrtShell::ResetSelect; } } @@ -422,41 +422,41 @@ long SwWrtShell::ExtSelWrd(const Point *pPt, bool ) // Bug 66823: actual crsr has in additional mode no selection? // Then destroy the actual an go to prev, this will be expand - if( !HasMark() && GoPrevCrsr() ) + if( !HasMark() && GoPrevCursor() ) { bool bHasMark = HasMark(); // thats wrong! - GoNextCrsr(); + GoNextCursor(); if( bHasMark ) { - DestroyCrsr(); - GoPrevCrsr(); + DestroyCursor(); + GoPrevCursor(); } } // check the direction of the selection with the new point - bool bRet = false, bMoveCrsr = true, bToTop = false; - SwCrsrShell::SelectWord( &m_aStart ); // select the startword - SwCrsrShell::Push(); // save the cursor - SwCrsrShell::SetCrsr( *pPt ); // and check the direction + bool bRet = false, bMoveCursor = true, bToTop = false; + SwCursorShell::SelectWord( &m_aStart ); // select the startword + SwCursorShell::Push(); // save the cursor + SwCursorShell::SetCursor( *pPt ); // and check the direction - switch( SwCrsrShell::CompareCursor( StackMkCurrPt )) + switch( SwCursorShell::CompareCursor( StackMkCurrPt )) { case -1: bToTop = false; break; case 1: bToTop = true; break; - default: bMoveCrsr = false; break; + default: bMoveCursor = false; break; } - SwCrsrShell::Pop( false ); // restore the saved cursor + SwCursorShell::Pop( false ); // restore the saved cursor - if( bMoveCrsr ) + if( bMoveCursor ) { // select to Top but cursor select to Bottom? or // select to Bottom but cursor select to Top? --> swap the cursor if( bToTop ) SwapPam(); - SwCrsrShell::Push(); // save cur cursor - if( SwCrsrShell::SelectWord( pPt )) // select the current word + SwCursorShell::Push(); // save cur cursor + if( SwCursorShell::SelectWord( pPt )) // select the current word { if( bToTop ) SwapPam(); @@ -465,7 +465,7 @@ long SwWrtShell::ExtSelWrd(const Point *pPt, bool ) } else { - SwCrsrShell::Pop( false ); + SwCursorShell::Pop( false ); if( bToTop ) SwapPam(); } @@ -478,25 +478,25 @@ long SwWrtShell::ExtSelWrd(const Point *pPt, bool ) long SwWrtShell::ExtSelLn(const Point *pPt, bool ) { SwMvContext aMvContext(this); - SwCrsrShell::SetCrsr(*pPt); + SwCursorShell::SetCursor(*pPt); if( IsTableMode() ) return 1; // Bug 66823: actual crsr has in additional mode no selection? // Then destroy the actual an go to prev, this will be expand - if( !HasMark() && GoPrevCrsr() ) + if( !HasMark() && GoPrevCursor() ) { bool bHasMark = HasMark(); // thats wrong! - GoNextCrsr(); + GoNextCursor(); if( bHasMark ) { - DestroyCrsr(); - GoPrevCrsr(); + DestroyCursor(); + GoPrevCursor(); } } // if applicable fit the selection to the "Mark" - bool bToTop = !IsCrsrPtAtEnd(); + bool bToTop = !IsCursorPtAtEnd(); SwapPam(); // The "Mark" has to be at the end or the beginning of the line. @@ -505,15 +505,15 @@ long SwWrtShell::ExtSelLn(const Point *pPt, bool ) if( bToTop ) { if( !IsEndPara() ) - SwCrsrShell::Right(1,CRSR_SKIP_CHARS); - SwCrsrShell::GoEndSentence(); + SwCursorShell::Right(1,CRSR_SKIP_CHARS); + SwCursorShell::GoEndSentence(); } else - SwCrsrShell::GoStartSentence(); + SwCursorShell::GoStartSentence(); } SwapPam(); - return (bToTop ? SwCrsrShell::GoStartSentence() : SwCrsrShell::GoEndSentence()) ? 1 : 0; + return (bToTop ? SwCursorShell::GoStartSentence() : SwCursorShell::GoEndSentence()) ? 1 : 0; } // Back into the standard mode: no mode, no selections. @@ -527,10 +527,10 @@ void SwWrtShell::EnterStdMode() m_bBlockMode = false; m_bExtMode = false; m_bInSelect = false; - if(IsSelFrmMode()) + if(IsSelFrameMode()) { - UnSelectFrm(); - LeaveSelFrmMode(); + UnSelectFrame(); + LeaveSelFrameMode(); } else { @@ -543,7 +543,7 @@ void SwWrtShell::EnterStdMode() if( !IsRetainSelection() ) KillPams(); ClearMark(); - m_fnSetCrsr = &SwWrtShell::SetCrsrKillSel; + m_fnSetCursor = &SwWrtShell::SetCursorKillSel; m_fnKillSel = &SwWrtShell::ResetSelect; } } @@ -578,7 +578,7 @@ void SwWrtShell::LeaveExtMode() long SwWrtShell::SttLeaveSelect(const Point *, bool ) { - if(SwCrsrShell::HasSelection() && !IsSelTableCells() && m_bClearMark) { + if(SwCursorShell::HasSelection() && !IsSelTableCells() && m_bClearMark) { return 0; } ClearMark(); @@ -590,8 +590,8 @@ long SwWrtShell::SttLeaveSelect(const Point *, bool ) long SwWrtShell::AddLeaveSelect(const Point *, bool ) { if(IsTableMode()) LeaveAddMode(); - else if(SwCrsrShell::HasSelection()) - CreateCrsr(); + else if(SwCursorShell::HasSelection()) + CreateCursor(); return 1; } @@ -603,19 +603,19 @@ void SwWrtShell::EnterAddMode() if(m_bBlockMode) LeaveBlockMode(); m_fnKillSel = &SwWrtShell::Ignore; - m_fnSetCrsr = &SwWrtShell::SetCrsr; + m_fnSetCursor = &SwWrtShell::SetCursor; m_bAddMode = true; m_bBlockMode = false; m_bExtMode = false; - if(SwCrsrShell::HasSelection()) - CreateCrsr(); + if(SwCursorShell::HasSelection()) + CreateCursor(); Invalidate(); } void SwWrtShell::LeaveAddMode() { m_fnKillSel = &SwWrtShell::ResetSelect; - m_fnSetCrsr = &SwWrtShell::SetCrsrKillSel; + m_fnSetCursor = &SwWrtShell::SetCursorKillSel; m_bAddMode = false; Invalidate(); } @@ -627,14 +627,14 @@ void SwWrtShell::EnterBlockMode() m_bBlockMode = false; EnterStdMode(); m_bBlockMode = true; - CrsrToBlockCrsr(); + CursorToBlockCursor(); Invalidate(); } void SwWrtShell::LeaveBlockMode() { m_bBlockMode = false; - BlockCrsrToCrsr(); + BlockCursorToCursor(); EndSelect(); Invalidate(); } @@ -644,7 +644,7 @@ void SwWrtShell::LeaveBlockMode() void SwWrtShell::SetInsMode( bool bOn ) { m_bIns = bOn; - SwCrsrShell::SetOverwriteCrsr( !m_bIns ); + SwCursorShell::SetOverwriteCursor( !m_bIns ); const SfxBoolItem aTmp( SID_ATTR_INSERT, m_bIns ); GetView().GetViewFrame()->GetBindings().SetState( aTmp ); StartAction(); @@ -661,7 +661,7 @@ void SwWrtShell::SetRedlineModeAndCheckInsMode( sal_uInt16 eMode ) // Edit frame -long SwWrtShell::BeginFrmDrag(const Point *pPt, bool bIsShift) +long SwWrtShell::BeginFrameDrag(const Point *pPt, bool bIsShift) { m_fnDrag = &SwFEShell::Drag; if(bStartDrag) @@ -674,7 +674,7 @@ long SwWrtShell::BeginFrmDrag(const Point *pPt, bool bIsShift) return 1; } -void SwWrtShell::EnterSelFrmMode(const Point *pPos) +void SwWrtShell::EnterSelFrameMode(const Point *pPos) { if(pPos) { @@ -683,23 +683,23 @@ void SwWrtShell::EnterSelFrmMode(const Point *pPos) bStartDrag = true; } m_bLayoutMode = true; - HideCrsr(); + HideCursor(); // equal call of BeginDrag in the SwFEShell - m_fnDrag = &SwWrtShell::BeginFrmDrag; - m_fnEndDrag = &SwWrtShell::UpdateLayoutFrm; - SwBaseShell::SetFrmMode( FLY_DRAG_START, this ); + m_fnDrag = &SwWrtShell::BeginFrameDrag; + m_fnEndDrag = &SwWrtShell::UpdateLayoutFrame; + SwBaseShell::SetFrameMode( FLY_DRAG_START, this ); Invalidate(); } -void SwWrtShell::LeaveSelFrmMode() +void SwWrtShell::LeaveSelFrameMode() { m_fnDrag = &SwWrtShell::BeginDrag; m_fnEndDrag = &SwWrtShell::DefaultEndDrag; m_bLayoutMode = false; bStartDrag = false; Edit(); - SwBaseShell::SetFrmMode( FLY_DRAG_END, this ); + SwBaseShell::SetFrameMode( FLY_DRAG_END, this ); Invalidate(); } @@ -714,18 +714,18 @@ IMPL_LINK_TYPED( SwWrtShell, ExecFlyMac, const SwFlyFrameFormat*, pFlyFormat, vo if(rFormatMac.HasMacro(SW_EVENT_OBJECT_SELECT)) { const SvxMacro &rMac = rFormatMac.GetMacro(SW_EVENT_OBJECT_SELECT); - if( IsFrmSelected() ) + if( IsFrameSelected() ) m_bLayoutMode = true; CallChgLnk(); ExecMacro( rMac ); } } -long SwWrtShell::UpdateLayoutFrm(const Point *pPt, bool ) +long SwWrtShell::UpdateLayoutFrame(const Point *pPt, bool ) { // still a dummy SwFEShell::EndDrag( pPt, false ); - m_fnDrag = &SwWrtShell::BeginFrmDrag; + m_fnDrag = &SwWrtShell::BeginFrameDrag; return 1; } @@ -759,17 +759,17 @@ long SwWrtShell::BeginDrag(const Point * /*pPt*/, bool ) if(m_bSelWrd) { m_bInSelect = true; - if( !IsCrsrPtAtEnd() ) + if( !IsCursorPtAtEnd() ) SwapPam(); m_fnDrag = &SwWrtShell::ExtSelWrd; - m_fnSetCrsr = &SwWrtShell::Ignore; + m_fnSetCursor = &SwWrtShell::Ignore; } else if(m_bSelLn) { m_bInSelect = true; m_fnDrag = &SwWrtShell::ExtSelLn; - m_fnSetCrsr = &SwWrtShell::Ignore; + m_fnSetCursor = &SwWrtShell::Ignore; } else { @@ -807,7 +807,7 @@ bool SwWrtShell::SelectTableRowCol( const Point& rPt, const Point* pEnd, bool bR SttSelect(); if(SelTableRowCol( rPt, pEnd, bRowDrag )) { - m_fnSetCrsr = &SwWrtShell::SetCrsrKillSel; + m_fnSetCursor = &SwWrtShell::SetCursorKillSel; m_fnKillSel = &SwWrtShell::ResetSelect; return true; } @@ -820,7 +820,7 @@ bool SwWrtShell::SelectTableRow() { if ( SelTableRow() ) { - m_fnSetCrsr = &SwWrtShell::SetCrsrKillSel; + m_fnSetCursor = &SwWrtShell::SetCursorKillSel; m_fnKillSel = &SwWrtShell::ResetSelect; return true; } @@ -831,7 +831,7 @@ bool SwWrtShell::SelectTableCol() { if ( SelTableCol() ) { - m_fnSetCrsr = &SwWrtShell::SetCrsrKillSel; + m_fnSetCursor = &SwWrtShell::SetCursorKillSel; m_fnKillSel = &SwWrtShell::ResetSelect; return true; } @@ -842,7 +842,7 @@ bool SwWrtShell::SelectTableCell() { if ( SelTableBox() ) { - m_fnSetCrsr = &SwWrtShell::SetCrsrKillSel; + m_fnSetCursor = &SwWrtShell::SetCursorKillSel; m_fnKillSel = &SwWrtShell::ResetSelect; return true; } @@ -893,11 +893,11 @@ int SwWrtShell::IntelligentCut(int nSelection, bool bCut) if(bCut) { Push(); - if(IsCrsrPtAtEnd()) + if(IsCursorPtAtEnd()) SwapPam(); ClearMark(); SetMark(); - SwCrsrShell::Left(1,CRSR_SKIP_CHARS); + SwCursorShell::Left(1,CRSR_SKIP_CHARS); SwFEShell::Delete(); Pop( false ); } @@ -908,10 +908,10 @@ int SwWrtShell::IntelligentCut(int nSelection, bool bCut) // delete the space behind if(bCut) { Push(); - if(!IsCrsrPtAtEnd()) SwapPam(); + if(!IsCursorPtAtEnd()) SwapPam(); ClearMark(); SetMark(); - SwCrsrShell::Right(1,CRSR_SKIP_CHARS); + SwCursorShell::Right(1,CRSR_SKIP_CHARS); SwFEShell::Delete(); Pop( false ); } @@ -924,7 +924,7 @@ int SwWrtShell::IntelligentCut(int nSelection, bool bCut) bool SwWrtShell::SelectNextPrevHyperlink( bool bNext ) { StartAction(); - bool bRet = SwCrsrShell::SelectNxtPrvHyperlink( bNext ); + bool bRet = SwCursorShell::SelectNxtPrvHyperlink( bNext ); if( !bRet ) { // will we have this feature? @@ -933,32 +933,32 @@ bool SwWrtShell::SelectNextPrevHyperlink( bool bNext ) SttEndDoc(true); else SttEndDoc(false); - bRet = SwCrsrShell::SelectNxtPrvHyperlink( bNext ); + bRet = SwCursorShell::SelectNxtPrvHyperlink( bNext ); } EndAction(); bool bCreateXSelection = false; - const bool bFrmSelected = IsFrmSelected() || IsObjSelected(); + const bool bFrameSelected = IsFrameSelected() || IsObjSelected(); if( IsSelection() ) { - if ( bFrmSelected ) - UnSelectFrm(); + if ( bFrameSelected ) + UnSelectFrame(); // Set the function pointer for the canceling of the selection // set at cursor m_fnKillSel = &SwWrtShell::ResetSelect; - m_fnSetCrsr = &SwWrtShell::SetCrsrKillSel; + m_fnSetCursor = &SwWrtShell::SetCursorKillSel; bCreateXSelection = true; } - else if( bFrmSelected ) + else if( bFrameSelected ) { - EnterSelFrmMode(); + EnterSelFrameMode(); bCreateXSelection = true; } else if( (CNT_GRF | CNT_OLE ) & GetCntType() ) { SelectObj( GetCharRect().Pos() ); - EnterSelFrmMode(); + EnterSelFrameMode(); bCreateXSelection = true; } diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx index 5bab7f7ae218..b98305fe2894 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx @@ -112,12 +112,12 @@ using namespace com::sun::star; #define COMMON_INI_LIST \ m_fnDrag(&SwWrtShell::BeginDrag),\ - m_fnSetCrsr(&SwWrtShell::SetCrsr),\ + m_fnSetCursor(&SwWrtShell::SetCursor),\ m_fnEndDrag(&SwWrtShell::DefaultEndDrag),\ m_fnKillSel(&SwWrtShell::Ignore),\ m_pModeStack(nullptr), \ m_ePageMove(MV_NO),\ - m_pCrsrStack(nullptr), \ + m_pCursorStack(nullptr), \ m_rView(rShell),\ m_aNavigationMgr(*this), \ m_bDestOnStack(false) @@ -146,17 +146,17 @@ static SvxAutoCorrect* lcl_IsAutoCorr() return pACorr; } -void SwWrtShell::NoEdit(bool bHideCrsr) +void SwWrtShell::NoEdit(bool bHideCursor) { - if(bHideCrsr) - HideCrsr(); + if(bHideCursor) + HideCursor(); } void SwWrtShell::Edit() { if (CanInsert()) { - ShowCrsr(); + ShowCursor(); } } @@ -209,7 +209,7 @@ void SwWrtShell::Insert( const OUString &rStr ) SwRewriter aRewriter; - aRewriter.AddRule(UndoArg1, GetCrsrDescr()); + aRewriter.AddRule(UndoArg1, GetCursorDescr()); aRewriter.AddRule(UndoArg2, OUString(SW_RES(STR_YIELDS))); { OUString aTmpStr; @@ -239,7 +239,7 @@ void SwWrtShell::Insert( const OUString &rStr ) // of the current frame can not be obtained. void SwWrtShell::Insert( const OUString &rPath, const OUString &rFilter, - const Graphic &rGrf, SwFlyFrmAttrMgr *pFrmMgr, + const Graphic &rGrf, SwFlyFrameAttrMgr *pFrameMgr, bool bRule ) { ResetCursorStack(); @@ -259,41 +259,41 @@ void SwWrtShell::Insert( const OUString &rPath, const OUString &rFilter, // if at the end of a non-empty paragraph. //For i120928,avoid to split node - EnterSelFrmMode(); + EnterSelFrameMode(); bool bSetGrfSize = true; bool bOwnMgr = false; - if ( !pFrmMgr ) + if ( !pFrameMgr ) { bOwnMgr = true; - pFrmMgr = new SwFlyFrmAttrMgr( true, this, FRMMGR_TYPE_GRF ); + pFrameMgr = new SwFlyFrameAttrMgr( true, this, FRMMGR_TYPE_GRF ); // CAUTION // GetAttrSet makes an adjustment - // While pasting is a SwFrmSize present + // While pasting is a SwFrameSize present // because of the DEF-Framesize // These must be removed explicitly for the optimal size. - pFrmMgr->DelAttr(RES_FRM_SIZE); + pFrameMgr->DelAttr(RES_FRM_SIZE); } else { - Size aSz( pFrmMgr->GetSize() ); + Size aSz( pFrameMgr->GetSize() ); if ( !aSz.Width() || !aSz.Height() ) { aSz.Width() = aSz.Height() = 567; - pFrmMgr->SetSize( aSz ); + pFrameMgr->SetSize( aSz ); } else if ( aSz.Width() != DFLT_WIDTH && aSz.Height() != DFLT_HEIGHT ) bSetGrfSize = false; - pFrmMgr->SetHeightSizeType(ATT_FIX_SIZE); + pFrameMgr->SetHeightSizeType(ATT_FIX_SIZE); } // Insert the graphic - SwFEShell::Insert(rPath, rFilter, &rGrf, &pFrmMgr->GetAttrSet()); + SwFEShell::Insert(rPath, rFilter, &rGrf, &pFrameMgr->GetAttrSet()); if ( bOwnMgr ) - pFrmMgr->UpdateAttrMgr(); + pFrameMgr->UpdateAttrMgr(); if( bSetGrfSize && !bRule ) { @@ -302,8 +302,8 @@ void SwWrtShell::Insert( const OUString &rPath, const OUString &rFilter, // Add the margin attributes to GrfSize, // because these counts at the margin additionally - aGrfSize.Width() += pFrmMgr->CalcWidthBorder(); - aGrfSize.Height()+= pFrmMgr->CalcHeightBorder(); + aGrfSize.Width() += pFrameMgr->CalcWidthBorder(); + aGrfSize.Height()+= pFrameMgr->CalcHeightBorder(); const BigInt aTempWidth( aGrfSize.Width() ); const BigInt aTempHeight( aGrfSize.Height()); @@ -320,11 +320,11 @@ void SwWrtShell::Insert( const OUString &rPath, const OUString &rFilter, aGrfSize.Height() = aBound.Height(); aGrfSize.Width() = BigInt(aBound.Height()) * aTempWidth / aTempHeight; } - pFrmMgr->SetSize( aGrfSize ); - pFrmMgr->UpdateFlyFrm(); + pFrameMgr->SetSize( aGrfSize ); + pFrameMgr->UpdateFlyFrame(); } if ( bOwnMgr ) - delete pFrmMgr; + delete pFrameMgr; EndUndo(); EndAllAction(); @@ -492,13 +492,13 @@ bool SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrame if ( !bStarMath ) SwFEShell::SplitNode( false, false ); - EnterSelFrmMode(); + EnterSelFrameMode(); - SwFlyFrmAttrMgr aFrmMgr( true, this, FRMMGR_TYPE_OLE ); - aFrmMgr.SetHeightSizeType(ATT_FIX_SIZE); + SwFlyFrameAttrMgr aFrameMgr( true, this, FRMMGR_TYPE_OLE ); + aFrameMgr.SetHeightSizeType(ATT_FIX_SIZE); SwRect aBound; - CalcBoundRect( aBound, aFrmMgr.GetAnchor() ); + CalcBoundRect( aBound, aFrameMgr.GetAnchor() ); //The Size should be suggested by the OLE server MapMode aMapMode( MAP_TWIP ); @@ -511,8 +511,8 @@ bool SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrame aSz.Height() = aSz.Height() * aBound.Width() / aSz.Width(); aSz.Width() = aBound.Width(); } - aFrmMgr.SetSize( aSz ); - SwFlyFrameFormat *pFormat = SwFEShell::InsertObject( xRef, &aFrmMgr.GetAttrSet() ); + aFrameMgr.SetSize( aSz ); + SwFlyFrameFormat *pFormat = SwFEShell::InsertObject( xRef, &aFrameMgr.GetAttrSet() ); // --> #i972# if ( bStarMath && mpDoc->getIDocumentSettingAccess().get( DocumentSettingId::MATH_BASELINE_ALIGNMENT ) ) @@ -614,8 +614,8 @@ void SwWrtShell::MoveObjectIfActive( svt::EmbeddedObjectRef& xObj, const Point& void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj, const SwRect *pFlyPrtRect, - const SwRect *pFlyFrmRect, - const bool bNoTextFrmPrtAreaChanged ) + const SwRect *pFlyFrameRect, + const bool bNoTextFramePrtAreaChanged ) { // Setting the scale of the client. This arises from the difference // between the VisArea of the object and the ObjArea. @@ -713,7 +713,7 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj, //|| SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE & xObj->GetMiscStatus() // --> OD #i117189# - refine condition for non-resizable objects // non-resizable objects need to be set the size back by this method - || ( bNoTextFrmPrtAreaChanged && nMisc & embed::EmbedMisc::EMBED_NEVERRESIZE ) ) + || ( bNoTextFramePrtAreaChanged && nMisc & embed::EmbedMisc::EMBED_NEVERRESIZE ) ) { pCli = new SwOleClient( &GetView(), &GetView().GetEditWin(), xObj ); } @@ -789,7 +789,7 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj, if ( pFlyPrtRect ) { aArea = *pFlyPrtRect; - aArea += pFlyFrmRect->Pos(); + aArea += pFlyFrameRect->Pos(); } else { @@ -804,7 +804,7 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj, OSL_ENSURE( pFlyFrameFormat, "Could not find fly frame." ); if ( pFlyFrameFormat ) { - const Point &rPoint = pFlyFrameFormat->GetLastFlyFrmPrtRectPos(); + const Point &rPoint = pFlyFrameFormat->GetLastFlyFramePrtRectPos(); SwRect aRect( pFlyPrtRect ? *pFlyPrtRect : GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, nullptr, xObj.GetObject() )); aArea += rPoint - aRect.Pos(); // adjust area by diff of printing area position in order to keep baseline alignment correct. @@ -823,12 +823,12 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj, } void SwWrtShell::ConnectObj( svt::EmbeddedObjectRef& xObj, const SwRect &rPrt, - const SwRect &rFrm ) + const SwRect &rFrame ) { SfxInPlaceClient* pCli = GetView().FindIPClient( xObj.GetObject(), &GetView().GetEditWin()); if ( !pCli ) new SwOleClient( &GetView(), &GetView().GetEditWin(), xObj ); - CalcAndSetScale( xObj, &rPrt, &rFrm ); + CalcAndSetScale( xObj, &rPrt, &rFrame ); } // Insert hard page break; @@ -841,13 +841,13 @@ void SwWrtShell::InsertPageBreak(const OUString *pPageDesc, const ::boost::optio SwActContext aActContext(this); StartUndo(UNDO_UI_INSERT_PAGE_BREAK); - if ( !IsCrsrInTable() ) + if ( !IsCursorInTable() ) { if(HasSelection()) DelRight(); SwFEShell::SplitNode(); // delete the numbered attribute of the last line if the last line is empty - GetDoc()->ClearLineNumAttrs( *GetCrsr()->GetPoint() ); + GetDoc()->ClearLineNumAttrs( *GetCursor()->GetPoint() ); } const SwPageDesc *pDesc = pPageDesc @@ -895,7 +895,7 @@ void SwWrtShell::InsertColumnBreak() { StartUndo(UNDO_UI_INSERT_COLUMN_BREAK); - if ( !IsCrsrInTable() ) + if ( !IsCursorInTable() ) { if(HasSelection()) DelRight(); @@ -918,11 +918,11 @@ void SwWrtShell::InsertFootnote(const OUString &rStr, bool bEndNote, bool bEdit if(HasSelection()) { //collapse cursor to the end - if(!IsCrsrPtAtEnd()) + if(!IsCursorPtAtEnd()) SwapPam(); ClearMark(); } - SwPosition aPos = *GetCrsr()->GetPoint(); + SwPosition aPos = *GetCursor()->GetPoint(); SwFormatFootnote aFootNote( bEndNote ); if(!rStr.isEmpty()) aFootNote.SetNumStr( rStr ); @@ -981,7 +981,7 @@ void SwWrtShell::SplitNode( bool bAutoFormat, bool bCheckTableStart ) void SwWrtShell::NumOrBulletOn(bool bNum) { // determine numbering rule found at current cursor position in the document. - const SwNumRule* pCurRule = GetNumRuleAtCurrCrsrPos(); + const SwNumRule* pCurRule = GetNumRuleAtCurrCursorPos(); StartUndo(UNDO_NUMORNONUM); @@ -1029,7 +1029,7 @@ void SwWrtShell::NumOrBulletOn(bool bNum) // If not, let it been counted. Then it has to be checked, // of the outline numbering has to be activated or continued. SwTextNode* pTextNode = - GetCrsr()->GetPoint()->nNode.GetNode().GetTextNode(); + GetCursor()->GetPoint()->nNode.GetNode().GetTextNode(); if ( pTextNode && !pTextNode->IsCountedInList() ) { // check, if numbering of the outline level of the paragraph @@ -1122,7 +1122,7 @@ void SwWrtShell::NumOrBulletOn(bool bNum) OUString sContinuedListId; if ( !pNumRule ) { - pNumRule = GetDoc()->SearchNumRule( *GetCrsr()->GetPoint(), + pNumRule = GetDoc()->SearchNumRule( *GetCursor()->GetPoint(), false, bNum, false, 0, sContinuedListId ); bContinueFoundNumRule = pNumRule != nullptr; @@ -1135,7 +1135,7 @@ void SwWrtShell::NumOrBulletOn(bool bNum) // do not change found numbering/bullet rule, if it should only be continued. if ( !bContinueFoundNumRule ) { - SwTextNode * pTextNode = GetCrsr()->GetPoint()->nNode.GetNode().GetTextNode(); + SwTextNode * pTextNode = GetCursor()->GetPoint()->nNode.GetNode().GetTextNode(); if (pTextNode) { @@ -1199,11 +1199,11 @@ void SwWrtShell::NumOrBulletOn(bool bNum) pChrFormat = GetCharFormatFromPool( RES_POOLCHR_BUL_LEVEL ); } - const SwTextNode* pTextNode = GetCrsr()->GetPoint()->nNode.GetNode().GetTextNode(); + const SwTextNode* pTextNode = GetCursor()->GetPoint()->nNode.GetNode().GetTextNode(); const SwTwips nWidthOfTabs = pTextNode ? pTextNode->GetWidthOfLeadingTabs() : 0; - GetDoc()->getIDocumentContentOperations().RemoveLeadingWhiteSpace( *GetCrsr()->GetPoint() ); + GetDoc()->getIDocumentContentOperations().RemoveLeadingWhiteSpace( *GetCursor()->GetPoint() ); const bool bHtml = dynamic_cast<SwWebDocShell*>( pDocSh ) != nullptr; const bool bRightToLeft = IsInRightToLeftText(); @@ -1299,7 +1299,7 @@ void SwWrtShell::NumOn() void SwWrtShell::NumOrBulletOff() { - const SwNumRule * pCurNumRule = GetNumRuleAtCurrCrsrPos(); + const SwNumRule * pCurNumRule = GetNumRuleAtCurrCursorPos(); if (pCurNumRule) { @@ -1308,7 +1308,7 @@ void SwWrtShell::NumOrBulletOff() SwNumRule aNumRule(*pCurNumRule); SwTextNode * pTextNode = - GetCrsr()->GetPoint()->nNode.GetNode().GetTextNode(); + GetCursor()->GetPoint()->nNode.GetNode().GetTextNode(); if (pTextNode) { @@ -1356,7 +1356,7 @@ SelectionType SwWrtShell::GetSelectionType() const // The value does not matter, it may be updated in endaction anyway. if ( BasicActionPend() ) - return IsSelFrmMode() ? nsSelectionType::SEL_FRM : nsSelectionType::SEL_TXT; + return IsSelFrameMode() ? nsSelectionType::SEL_FRM : nsSelectionType::SEL_TXT; SwView &_rView = const_cast<SwView&>(GetView()); if (_rView.GetPostItMgr() && _rView.GetPostItMgr()->HasActiveSidebarWin() ) @@ -1364,8 +1364,8 @@ SelectionType SwWrtShell::GetSelectionType() const // Inserting a frame is not a DrawMode int nCnt; - if ( !_rView.GetEditWin().IsFrmAction() && - (IsObjSelected() || (_rView.IsDrawMode() && !IsFrmSelected()) )) + if ( !_rView.GetEditWin().IsFrameAction() && + (IsObjSelected() || (_rView.IsDrawMode() && !IsFrameSelected()) )) { if (GetDrawView()->IsTextEdit()) nCnt = nsSelectionType::SEL_DRW_TXT; @@ -1400,7 +1400,7 @@ SelectionType SwWrtShell::GetSelectionType() const nCnt = GetCntType(); - if ( IsFrmSelected() ) + if ( IsFrameSelected() ) { if (_rView.IsDrawMode()) _rView.LeaveDrawCreate(); // clean up (Bug #45639) @@ -1408,18 +1408,18 @@ SelectionType SwWrtShell::GetSelectionType() const return nsSelectionType::SEL_FRM; } - if ( IsCrsrInTable() ) + if ( IsCursorInTable() ) nCnt |= nsSelectionType::SEL_TBL; if ( IsTableMode() ) nCnt |= (nsSelectionType::SEL_TBL | nsSelectionType::SEL_TBL_CELLS); // Do not pop up numbering toolbar, if the text node has a numbering of type SVX_NUM_NUMBER_NONE. - const SwNumRule* pNumRule = GetNumRuleAtCurrCrsrPos(); + const SwNumRule* pNumRule = GetNumRuleAtCurrCursorPos(); if ( pNumRule ) { const SwTextNode* pTextNd = - GetCrsr()->GetPoint()->nNode.GetNode().GetTextNode(); + GetCursor()->GetPoint()->nNode.GetNode().GetTextNode(); if ( pTextNd && pTextNd->IsInList() ) { @@ -1492,7 +1492,7 @@ SwFrameFormat *SwWrtShell::GetTableStyle(const OUString &rFormatName) } void SwWrtShell::addCurrentPosition() { - SwPaM* pPaM = GetCrsr(); + SwPaM* pPaM = GetCursor(); m_aNavigationMgr.addEntry(*pPaM->GetPoint()); } @@ -1500,7 +1500,7 @@ void SwWrtShell::addCurrentPosition() { void SwWrtShell::SetPageStyle(const OUString &rCollName) { - if( !SwCrsrShell::HasSelection() && !IsSelFrmMode() && !IsObjSelected() ) + if( !SwCursorShell::HasSelection() && !IsSelFrameMode() && !IsObjSelected() ) { SwPageDesc* pDesc = FindPageDescByName( rCollName, true ); if( pDesc ) @@ -1510,9 +1510,9 @@ void SwWrtShell::SetPageStyle(const OUString &rCollName) // Access templates -OUString SwWrtShell::GetCurPageStyle( const bool bCalcFrm ) const +OUString SwWrtShell::GetCurPageStyle( const bool bCalcFrame ) const { - return GetPageDesc(GetCurPageDesc( bCalcFrm )).GetName(); + return GetPageDesc(GetCurPageDesc( bCalcFrame )).GetName(); } // Change the current template referring to the existing change. @@ -1532,7 +1532,7 @@ void SwWrtShell::QuickUpdateStyle() void SwWrtShell::AutoUpdatePara(SwTextFormatColl* pColl, const SfxItemSet& rStyleSet, SwPaM* pPaM ) { - SwPaM* pCrsr = pPaM ? pPaM : GetCrsr( ); + SwPaM* pCursor = pPaM ? pPaM : GetCursor( ); SfxItemSet aCoreSet( GetAttrPool(), RES_CHRATR_BEGIN, RES_CHRATR_END - 1, RES_PARATR_BEGIN, RES_PARATR_END - 1, @@ -1544,7 +1544,7 @@ void SwWrtShell::AutoUpdatePara(SwTextFormatColl* pColl, const SfxItemSet& rStyl SID_ATTR_PARA_MODEL, SID_ATTR_PARA_KEEP, SID_ATTR_PARA_PAGENUM, SID_ATTR_PARA_PAGENUM, 0 ); - GetPaMAttr( pCrsr, aCoreSet ); + GetPaMAttr( pCursor, aCoreSet ); bool bReset = false; SfxItemIter aParaIter( aCoreSet ); const SfxPoolItem* pParaItem = aParaIter.FirstItem(); @@ -1565,8 +1565,8 @@ void SwWrtShell::AutoUpdatePara(SwTextFormatColl* pColl, const SfxItemSet& rStyl StartAction(); if(bReset) { - ResetAttr( std::set<sal_uInt16>(), pCrsr ); - SetAttrSet(aCoreSet, SetAttrMode::DEFAULT, pCrsr); + ResetAttr( std::set<sal_uInt16>(), pCursor ); + SetAttrSet(aCoreSet, SetAttrMode::DEFAULT, pCursor); } mpDoc->ChgFormat(*pColl, rStyleSet ); EndAction(); @@ -1576,7 +1576,7 @@ void SwWrtShell::AutoUpdateFrame( SwFrameFormat* pFormat, const SfxItemSet& rSty { StartAction(); - ResetFlyFrmAttr( 0, &rStyleSet ); + ResetFlyFrameAttr( 0, &rStyleSet ); pFormat->SetFormatAttr( rStyleSet ); EndAction(); @@ -1663,17 +1663,17 @@ SwWrtShell::~SwWrtShell() SET_CURR_SHELL( this ); while(IsModePushed()) PopMode(); - while(PopCrsr(false)) + while(PopCursor(false)) ; SwTransferable::ClearSelection( *this ); } -bool SwWrtShell::Pop( bool bOldCrsr ) +bool SwWrtShell::Pop( bool bOldCursor ) { - bool bRet = SwCrsrShell::Pop( bOldCrsr ); + bool bRet = SwCursorShell::Pop( bOldCursor ); if( bRet && IsSelection() ) { - m_fnSetCrsr = &SwWrtShell::SetCrsrKillSel; + m_fnSetCursor = &SwWrtShell::SetCursorKillSel; m_fnKillSel = &SwWrtShell::ResetSelect; } return bRet; @@ -1681,7 +1681,7 @@ bool SwWrtShell::Pop( bool bOldCrsr ) bool SwWrtShell::CanInsert() { - if(IsSelFrmMode()) + if(IsSelFrameMode()) { return false; } @@ -1737,7 +1737,7 @@ OUString SwWrtShell::GetSelDescr() const break; default: if (nullptr != mpDoc) - aResult = GetCrsrDescr(); + aResult = GetCursorDescr(); } return aResult; @@ -1766,7 +1766,7 @@ void SwWrtShell::ChangeHeaderOrFooter( StartAllAction(); StartUndo( UNDO_HEADER_FOOTER ); // #i7983# bool bExecute = true; - bool bCrsrSet = false; + bool bCursorSet = false; for( size_t nFrom = 0, nTo = GetPageDescCnt(); nFrom < nTo; ++nFrom ) { @@ -1816,11 +1816,11 @@ void SwWrtShell::ChangeHeaderOrFooter( { ChgPageDesc( nFrom, aDesc ); - if( !bCrsrSet && bOn ) + if( !bCursorSet && bOn ) { if ( !IsHeaderFooterEdit() ) ToggleHeaderFooterEdit(); - bCrsrSet = SetCrsrInHdFt( + bCursorSet = SetCursorInHdFt( rStyleName.isEmpty() ? SIZE_MAX : nFrom, bHeader ); } diff --git a/sw/source/uibase/wrtsh/wrtsh2.cxx b/sw/source/uibase/wrtsh/wrtsh2.cxx index bb5242b99e0b..1f88e467c616 100644 --- a/sw/source/uibase/wrtsh/wrtsh2.cxx +++ b/sw/source/uibase/wrtsh/wrtsh2.cxx @@ -143,7 +143,7 @@ void SwWrtShell::UpdateInputFields( SwInputFieldList* pLst ) const size_t nCnt = pTmp->Count(); if(nCnt) { - pTmp->PushCrsr(); + pTmp->PushCursor(); bool bCancel = false; OString aDlgPos; @@ -162,7 +162,7 @@ void SwWrtShell::UpdateInputFields( SwInputFieldList* pLst ) pTmp->GetField( i )->GetTyp()->UpdateFields(); } } - pTmp->PopCrsr(); + pTmp->PopCursor(); } if( !pLst ) @@ -379,7 +379,7 @@ void SwWrtShell::ClickToField( const SwField& rField ) case RES_GETREFFLD: StartAllAction(); - SwCrsrShell::GotoRefMark( static_cast<const SwGetRefField&>(rField).GetSetRefName(), + SwCursorShell::GotoRefMark( static_cast<const SwGetRefField&>(rField).GetSetRefName(), static_cast<const SwGetRefField&>(rField).GetSubType(), static_cast<const SwGetRefField&>(rField).GetSeqNo() ); EndAllAction(); @@ -468,7 +468,7 @@ void LoadURL( SwViewShell& rVSh, const OUString& rURL, sal_uInt16 nFilter, return ; // The shell could be 0 also!!!!! - if ( dynamic_cast<const SwCrsrShell*>( &rVSh) == nullptr ) + if ( dynamic_cast<const SwCursorShell*>( &rVSh) == nullptr ) return; // We are doing tiledRendering, let the client handles the URL loading. @@ -478,7 +478,7 @@ void LoadURL( SwViewShell& rVSh, const OUString& rURL, sal_uInt16 nFilter, return; } - //A CrsrShell is always a WrtShell + //A CursorShell is always a WrtShell SwWrtShell &rSh = static_cast<SwWrtShell&>(rVSh); SwDocShell* pDShell = rSh.GetView().GetDocShell(); @@ -497,8 +497,8 @@ void LoadURL( SwViewShell& rVSh, const OUString& rURL, sal_uInt16 nFilter, OUString sReferer; if( pDShell && pDShell->GetMedium() ) sReferer = pDShell->GetMedium()->GetName(); - SfxViewFrame* pViewFrm = rSh.GetView().GetViewFrame(); - SfxFrameItem aView( SID_DOCFRAME, pViewFrm ); + SfxViewFrame* pViewFrame = rSh.GetView().GetViewFrame(); + SfxFrameItem aView( SID_DOCFRAME, pViewFrame ); SfxStringItem aName( SID_FILE_NAME, rURL ); SfxStringItem aTargetFrameName( SID_TARGETNAME, sTargetFrame ); SfxStringItem aReferer( SID_REFERER, sReferer ); @@ -519,7 +519,7 @@ void LoadURL( SwViewShell& rVSh, const OUString& rURL, sal_uInt16 nFilter, nullptr }; - pViewFrm->GetDispatcher()->GetBindings()->Execute( SID_OPENDOC, aArr, 0, + pViewFrame->GetDispatcher()->GetBindings()->Execute( SID_OPENDOC, aArr, 0, SfxCallMode::ASYNCHRON|SfxCallMode::RECORD ); } diff --git a/sw/source/uibase/wrtsh/wrtsh3.cxx b/sw/source/uibase/wrtsh/wrtsh3.cxx index 12665242cbc1..49eb3c51c377 100644 --- a/sw/source/uibase/wrtsh/wrtsh3.cxx +++ b/sw/source/uibase/wrtsh/wrtsh3.cxx @@ -48,21 +48,21 @@ bool SwWrtShell::MoveBookMark( BookMarkMove eFuncId, const ::sw::mark::IMark* co bool bRet = true; switch(eFuncId) { - case BOOKMARK_INDEX:bRet = SwCrsrShell::GotoMark( pMark );break; - case BOOKMARK_NEXT: bRet = SwCrsrShell::GoNextBookmark();break; - case BOOKMARK_PREV: bRet = SwCrsrShell::GoPrevBookmark();break; + case BOOKMARK_INDEX:bRet = SwCursorShell::GotoMark( pMark );break; + case BOOKMARK_NEXT: bRet = SwCursorShell::GoNextBookmark();break; + case BOOKMARK_PREV: bRet = SwCursorShell::GoPrevBookmark();break; default:;//prevent warning } - if( bRet && IsSelFrmMode() ) + if( bRet && IsSelFrameMode() ) { - UnSelectFrm(); - LeaveSelFrmMode(); + UnSelectFrame(); + LeaveSelFrameMode(); } if( IsSelection() ) { m_fnKillSel = &SwWrtShell::ResetSelect; - m_fnSetCrsr = &SwWrtShell::SetCrsrKillSel; + m_fnSetCursor = &SwWrtShell::SetCursorKillSel; } return bRet; } @@ -71,17 +71,17 @@ bool SwWrtShell::GotoField( const SwFormatField& rField ) { (this->*m_fnKillSel)( nullptr, false ); - bool bRet = SwCrsrShell::GotoFormatField( rField ); - if( bRet && IsSelFrmMode() ) + bool bRet = SwCursorShell::GotoFormatField( rField ); + if( bRet && IsSelFrameMode() ) { - UnSelectFrm(); - LeaveSelFrmMode(); + UnSelectFrame(); + LeaveSelFrameMode(); } if( IsSelection() ) { m_fnKillSel = &SwWrtShell::ResetSelect; - m_fnSetCrsr = &SwWrtShell::SetCrsrKillSel; + m_fnSetCursor = &SwWrtShell::SetCursorKillSel; } return bRet; @@ -90,16 +90,16 @@ bool SwWrtShell::GotoField( const SwFormatField& rField ) bool SwWrtShell::GotoFieldmark(::sw::mark::IFieldmark const * const pMark) { (this->*m_fnKillSel)( nullptr, false ); - bool bRet = SwCrsrShell::GotoFieldmark(pMark); - if( bRet && IsSelFrmMode() ) + bool bRet = SwCursorShell::GotoFieldmark(pMark); + if( bRet && IsSelFrameMode() ) { - UnSelectFrm(); - LeaveSelFrmMode(); + UnSelectFrame(); + LeaveSelFrameMode(); } if( IsSelection() ) { m_fnKillSel = &SwWrtShell::ResetSelect; - m_fnSetCrsr = &SwWrtShell::SetCrsrKillSel; + m_fnSetCursor = &SwWrtShell::SetCursorKillSel; } return bRet; } diff --git a/sw/source/uibase/wrtsh/wrtsh4.cxx b/sw/source/uibase/wrtsh/wrtsh4.cxx index 8d6849dd553c..49e7353f6aa3 100644 --- a/sw/source/uibase/wrtsh/wrtsh4.cxx +++ b/sw/source/uibase/wrtsh/wrtsh4.cxx @@ -37,7 +37,7 @@ bool SwWrtShell::_SttWrd() ClearMark(); if( !GoStartWord() ) // not found --> go to the beginning of the paragraph. - SwCrsrShell::MovePara( fnParaCurr, fnParaStart ); + SwCursorShell::MovePara( fnParaCurr, fnParaStart ); ClearMark(); // If Mark was previously set, summarize. Combine(); @@ -58,7 +58,7 @@ bool SwWrtShell::_EndWrd() ClearMark(); if( !GoEndWord() ) // not found --> go to the end of the paragraph. - SwCrsrShell::MovePara(fnParaCurr, fnParaEnd); + SwCursorShell::MovePara(fnParaCurr, fnParaEnd); ClearMark(); // If Mark was previously set, summarize. Combine(); @@ -70,7 +70,7 @@ bool SwWrtShell::_NxtWrd() bool bRet = false; while( IsEndPara() ) // If already at the end, then the next??? { - if(!SwCrsrShell::Right(1,CRSR_SKIP_CHARS)) // Document - end ?? + if(!SwCursorShell::Right(1,CRSR_SKIP_CHARS)) // Document - end ?? { Pop( false ); return bRet; @@ -83,8 +83,8 @@ bool SwWrtShell::_NxtWrd() { if( !GoNextWord() ) { - if( (!IsEndPara() && !SwCrsrShell::MovePara( fnParaCurr, fnParaEnd ) ) - || !SwCrsrShell::Right(1,CRSR_SKIP_CHARS) ) + if( (!IsEndPara() && !SwCursorShell::MovePara( fnParaCurr, fnParaEnd ) ) + || !SwCursorShell::Right(1,CRSR_SKIP_CHARS) ) break; bRet = IsStartWord(); } @@ -101,7 +101,7 @@ bool SwWrtShell::_PrvWrd() bool bRet = false; while( IsSttPara() ) { // if already at the beginning, then the next??? - if(!SwCrsrShell::Left(1,CRSR_SKIP_CHARS)) + if(!SwCursorShell::Left(1,CRSR_SKIP_CHARS)) { // Document - beginning ?? Pop( false ); return bRet; @@ -114,8 +114,8 @@ bool SwWrtShell::_PrvWrd() { if( !GoPrevWord() ) { - if( (!IsSttPara() && !SwCrsrShell::MovePara( fnParaCurr, fnParaStart ) ) - || !SwCrsrShell::Left(1,CRSR_SKIP_CHARS) ) + if( (!IsSttPara() && !SwCursorShell::MovePara( fnParaCurr, fnParaStart ) ) + || !SwCursorShell::Left(1,CRSR_SKIP_CHARS) ) break; bRet = IsStartWord(); } @@ -133,7 +133,7 @@ bool SwWrtShell::_NxtWrdForDelete() { if ( IsEndPara() ) { - if ( !SwCrsrShell::Right(1,CRSR_SKIP_CHARS) ) + if ( !SwCursorShell::Right(1,CRSR_SKIP_CHARS) ) { Pop( false ); return false; @@ -144,7 +144,7 @@ bool SwWrtShell::_NxtWrdForDelete() ClearMark(); if ( !GoNextWord() ) { - SwCrsrShell::MovePara( fnParaCurr, fnParaEnd ); + SwCursorShell::MovePara( fnParaCurr, fnParaEnd ); } ClearMark(); Combine(); @@ -156,7 +156,7 @@ bool SwWrtShell::_PrvWrdForDelete() { if ( IsSttPara() ) { - if ( !SwCrsrShell::Left(1,CRSR_SKIP_CHARS) ) + if ( !SwCursorShell::Left(1,CRSR_SKIP_CHARS) ) { Pop( false ); return false; @@ -167,7 +167,7 @@ bool SwWrtShell::_PrvWrdForDelete() ClearMark(); if( !GoPrevWord() ) { - SwCrsrShell::MovePara( fnParaCurr, fnParaStart ); + SwCursorShell::MovePara( fnParaCurr, fnParaStart ); } ClearMark(); Combine(); @@ -178,13 +178,13 @@ bool SwWrtShell::_FwdSentence() { Push(); ClearMark(); - if(!SwCrsrShell::Right(1,CRSR_SKIP_CHARS)) + if(!SwCursorShell::Right(1,CRSR_SKIP_CHARS)) { Pop(false); return false; } if( !GoNextSentence() && !IsEndPara() ) - SwCrsrShell::MovePara(fnParaCurr, fnParaEnd); + SwCursorShell::MovePara(fnParaCurr, fnParaEnd); ClearMark(); Combine(); @@ -195,14 +195,14 @@ bool SwWrtShell::_BwdSentence() { Push(); ClearMark(); - if(!SwCrsrShell::Left(1,CRSR_SKIP_CHARS)) + if(!SwCursorShell::Left(1,CRSR_SKIP_CHARS)) { Pop(false); return false; } if( !GoStartSentence() && !IsSttPara() ) // not found --> go to the beginning of the paragraph - SwCrsrShell::MovePara( fnParaCurr, fnParaStart ); + SwCursorShell::MovePara( fnParaCurr, fnParaStart ); ClearMark(); Combine(); return true; @@ -212,7 +212,7 @@ bool SwWrtShell::_FwdPara() { Push(); ClearMark(); - bool bRet = SwCrsrShell::MovePara(fnParaNext, fnParaStart); + bool bRet = SwCursorShell::MovePara(fnParaNext, fnParaStart); ClearMark(); Combine(); @@ -224,7 +224,7 @@ bool SwWrtShell::_BwdPara() Push(); ClearMark(); - bool bRet = SwCrsrShell::MovePara(fnParaPrev, fnParaStart); + bool bRet = SwCursorShell::MovePara(fnParaPrev, fnParaStart); if ( !bRet && !IsSttOfPara() ) { SttPara(); diff --git a/sw/source/uibase/wrtsh/wrtundo.cxx b/sw/source/uibase/wrtsh/wrtundo.cxx index 1756fdd53b22..d8e7ed8498a0 100644 --- a/sw/source/uibase/wrtsh/wrtundo.cxx +++ b/sw/source/uibase/wrtsh/wrtundo.cxx @@ -62,27 +62,27 @@ void SwWrtShell::Do( DoType eDoType, sal_uInt16 nCnt ) DoUndo(bSaveDoesUndo); bool bCreateXSelection = false; - const bool bFrmSelected = IsFrmSelected() || IsObjSelected(); + const bool bFrameSelected = IsFrameSelected() || IsObjSelected(); if ( IsSelection() ) { - if ( bFrmSelected ) - UnSelectFrm(); + if ( bFrameSelected ) + UnSelectFrame(); // Set the function pointer for canceling the selection at the // cursor position. m_fnKillSel = &SwWrtShell::ResetSelect; - m_fnSetCrsr = &SwWrtShell::SetCrsrKillSel; + m_fnSetCursor = &SwWrtShell::SetCursorKillSel; bCreateXSelection = true; } - else if ( bFrmSelected ) + else if ( bFrameSelected ) { - EnterSelFrmMode(); + EnterSelFrameMode(); bCreateXSelection = true; } else if( (CNT_GRF | CNT_OLE ) & GetCntType() ) { SelectObj( GetCharRect().Pos() ); - EnterSelFrmMode(); + EnterSelFrameMode(); bCreateXSelection = true; } diff --git a/sw/uiconfig/swriter/ui/frmaddpage.ui b/sw/uiconfig/swriter/ui/frmaddpage.ui index b98b41165050..a0822a58c50f 100644 --- a/sw/uiconfig/swriter/ui/frmaddpage.ui +++ b/sw/uiconfig/swriter/ui/frmaddpage.ui @@ -23,7 +23,7 @@ </row> </data> </object> - <object class="GtkBox" id="FrmAddPage"> + <object class="GtkBox" id="FrameAddPage"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="border_width">6</property> diff --git a/sw/uiconfig/swriter/ui/frmtypepage.ui b/sw/uiconfig/swriter/ui/frmtypepage.ui index 63bdb99ebc8a..405723938d57 100644 --- a/sw/uiconfig/swriter/ui/frmtypepage.ui +++ b/sw/uiconfig/swriter/ui/frmtypepage.ui @@ -14,7 +14,7 @@ <property name="step_increment">1</property> <property name="page_increment">10</property> </object> - <object class="GtkGrid" id="FrmTypePage"> + <object class="GtkGrid" id="FrameTypePage"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="hexpand">True</property> diff --git a/sw/uiconfig/swriter/ui/frmurlpage.ui b/sw/uiconfig/swriter/ui/frmurlpage.ui index 7b60752afd0d..761596c896d2 100644 --- a/sw/uiconfig/swriter/ui/frmurlpage.ui +++ b/sw/uiconfig/swriter/ui/frmurlpage.ui @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <interface> <!-- interface-requires gtk+ 3.0 --> - <object class="GtkBox" id="FrmURLPage"> + <object class="GtkBox" id="FrameURLPage"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="border_width">6</property> |