diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-04-10 14:12:30 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-04-11 10:20:58 +0200 |
commit | bf6449230ad2b4dfb427a062663e5ff2b9ddf3b6 (patch) | |
tree | 75c9947c10b4685cb9caaaaf1b59ca3f679bcd4e /sw/inc | |
parent | 9fa75f677a7b48a2177fe11cca0d00f5a2deb7da (diff) |
loplugin:mergeclasses merge SwAnnotationWin and SwSidebarWin
Change-Id: Idaf7d7e8e4da37e0ba423dca3e22dc6711ba806a
Reviewed-on: https://gerrit.libreoffice.org/36380
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/inc')
-rw-r--r-- | sw/inc/AnnotationWin.hxx | 221 | ||||
-rw-r--r-- | sw/inc/PostItMgr.hxx | 27 | ||||
-rw-r--r-- | sw/inc/SidebarWin.hxx | 256 | ||||
-rw-r--r-- | sw/inc/pch/precompiled_sw.hxx | 1 | ||||
-rw-r--r-- | sw/inc/postithelper.hxx | 10 |
5 files changed, 222 insertions, 293 deletions
diff --git a/sw/inc/AnnotationWin.hxx b/sw/inc/AnnotationWin.hxx index 04122ce9f70b..256441bc9dfb 100644 --- a/sw/inc/AnnotationWin.hxx +++ b/sw/inc/AnnotationWin.hxx @@ -20,15 +20,44 @@ #ifndef INCLUDED_SW_INC_ANNOTATIONWIN_HXX #define INCLUDED_SW_INC_ANNOTATIONWIN_HXX +#include <basegfx/polygon/b2dpolygon.hxx> +#include <basegfx/range/b2drange.hxx> +#include <editeng/editstat.hxx> +#include <tools/date.hxx> +#include <vcl/lineinfo.hxx> +#include <vcl/window.hxx> + #include <docufld.hxx> -#include <SidebarWin.hxx> +#include <postithelper.hxx> +#include <swrect.hxx> +#include <SidebarWindowsTypes.hxx> class PopupMenu; class OutlinerParaObject; +class SwPostItMgr; +class SwPostItField; +class OutlinerView; +class Outliner; +class ScrollBar; +class SwEditWin; +class SwView; +class Edit; +class MenuButton; +class SwFrame; + +namespace sw { namespace overlay { + class OverlayRanges; +}} + +namespace sw { namespace sidebarwindows { + class SidebarTextControl; + class AnchorOverlayObject; + class ShadowOverlayObject; +}} namespace sw { namespace annotation { -class SwAnnotationWin : public sw::sidebarwindows::SwSidebarWin +class SwAnnotationWin : public vcl::Window { public: SwAnnotationWin( SwEditWin& rEditWin, @@ -39,36 +68,194 @@ class SwAnnotationWin : public sw::sidebarwindows::SwSidebarWin virtual ~SwAnnotationWin() override; virtual void dispose() override; - virtual void UpdateData() override; - virtual void SetPostItText() override; - virtual void Delete() override; - virtual void GotoPos() override; + void UpdateData(); + void SetPostItText(); + void Delete(); + void GotoPos(); const SwPostItField* GetPostItField() { return mpField; } void UpdateText(const OUString& aText); - virtual OUString GetAuthor() override; - virtual Date GetDate() override; - virtual tools::Time GetTime() override; + OUString GetAuthor(); + Date GetDate(); + tools::Time GetTime(); - virtual sal_uInt32 MoveCaret() override; + sal_uInt32 MoveCaret(); /// Calculate parent postit id of current annotation window - virtual sal_uInt32 CalcParent() override; - void InitAnswer(OutlinerParaObject* pText); + sal_uInt32 CalcParent(); + void InitAnswer(OutlinerParaObject* pText); + + bool IsProtected(); + + void SetSize( const Size& rNewSize ); + void SetPosSizePixelRect( long nX, + long nY, + long nWidth, + long nHeight, + const SwRect& aAnchorRect, + const long PageBorder); + void SetPosAndSize(); + void TranslateTopPosition(const long aAmount); + void CheckMetaText(); + + Point GetAnchorPos() { return mAnchorRect.Pos(); } + const SwRect& GetAnchorRect() { return mAnchorRect; } + bool IsAnchorRectChanged() { return mbAnchorRectChanged; } + void ResetAnchorRectChanged() { mbAnchorRectChanged = false; } + const std::vector<basegfx::B2DRange>& GetAnnotationTextRanges() { return maAnnotationTextRanges; } + SwEditWin& EditWin(); + SwSidebarItem& GetSidebarItem() { return mrSidebarItem; } + + OutlinerView* GetOutlinerView() { return mpOutlinerView;} + bool HasScrollbar() const; + bool IsScrollbarVisible() const; + ScrollBar* Scrollbar() { return mpVScrollbar; } + ::sw::sidebarwindows::AnchorOverlayObject* Anchor() { return mpAnchor;} + ::sw::sidebarwindows::ShadowOverlayObject* Shadow() { return mpShadow;} + ::sw::overlay::OverlayRanges* TextRange() { return mpTextRangeOverlay;} + + long GetPostItTextHeight(); + + void SwitchToPostIt(sal_uInt16 aDirection); + void SwitchToFieldPos(); + + void ExecuteCommand(sal_uInt16 nSlot); + void InitControls(); + void DoResize(); + void ResizeIfNecessary(long aOldHeight, long aNewHeight); + void SetScrollbar(); + + void SetVirtualPosSize( const Point& aPoint, const Size& aSize); + const Point VirtualPos() { return mPosSize.TopLeft(); } + const Size VirtualSize() { return mPosSize.GetSize(); } + + void ShowAnchorOnly(const Point &aPoint); + void ShowNote(); + void HideNote(); + void InvalidateControl(); + + void ResetAttributes(); + + void SetSidebarPosition(sw::sidebarwindows::SidebarPosition eSidebarPosition); + void SetReadonly(bool bSet); + bool IsReadOnly() + { + return mbReadonly; + } + + void SetColor(Color aColorDark,Color aColorLight, Color aColorAnchor); + const Color& ColorAnchor() { return mColorAnchor; } + const Color& ColorDark() { return mColorDark; } + const Color& ColorLight() { return mColorLight; } + void Rescale(); + + void SetViewState(::sw::sidebarwindows::ViewState bViewState); + + bool IsFollow() { return mbIsFollow; } + void SetFollow( bool bIsFollow) { mbIsFollow = bIsFollow; }; + + sal_Int32 GetMetaHeight(); + sal_Int32 GetMinimumSizeWithMeta(); + sal_Int32 GetMinimumSizeWithoutMeta(); + sal_Int32 GetMetaButtonAreaWidth(); + sal_Int32 GetScrollbarWidth(); + + void SetSpellChecking(); + + void ToggleInsMode(); + + void ActivatePostIt(); + void DeactivatePostIt(); - virtual bool IsProtected() override; + void SetChangeTracking( const SwPostItHelper::SwLayoutStatus aStatus, + const Color& aColor); + SwPostItHelper::SwLayoutStatus GetLayoutStatus() { return mLayoutStatus; } + const Color& GetChangeColor() { return mChangeColor; } - protected: - virtual VclPtr<MenuButton> CreateMenuButton() override; + DECL_LINK( WindowEventListener, VclWindowEvent&, void ); + bool IsMouseOverSidebarWin() const { return mbMouseOver; } + + void SetLanguage(const SvxLanguageItem& rNewItem); + + void ChangeSidebarItem( SwSidebarItem& rSidebarItem ); + virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override; + + virtual void Draw(OutputDevice* pDev, const Point&, const Size&, DrawFlags) override; + virtual void KeyInput(const KeyEvent& rKeyEvt) override; + virtual void MouseButtonDown(const MouseEvent& rMouseEvent) override; + virtual void MouseButtonUp(const MouseEvent& rMouseEvent) override; + virtual void MouseMove(const MouseEvent& rMouseEvent) override; + void PaintTile(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect); + /// Is there a matching sub-widget inside this sidebar widget for rPointLogic? + bool IsHitWindow(const Point& rPointLogic); + /// Allows adjusting the point or mark of the selection to a document coordinate. + void SetCursorLogicPosition(const Point& rPosition, bool bPoint, bool bClearMark); private: - virtual SvxLanguageItem GetLanguage() override; + VclPtr<MenuButton> CreateMenuButton(); + virtual void LoseFocus() override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; + virtual void GetFocus() override; + + void SetSizePixel( const Size& rNewSize ) override; + SfxItemSet DefaultItem(); + + DECL_LINK(ModifyHdl, LinkParamNone*, void); + DECL_LINK(ScrollHdl, ScrollBar*, void); + DECL_LINK(DeleteHdl, void*, void); + + SwView& DocView() { return mrView;} + SwPostItMgr& Mgr() { return mrMgr; } + Outliner* Engine() { return mpOutliner;} + sal_uInt32 CountFollowing(); + SwAnnotationWin* GetTopReplyNote(); + SvxLanguageItem GetLanguage(); + + SwPostItMgr& mrMgr; + SwView& mrView; + + ImplSVEvent * mnEventId; + + OutlinerView* mpOutlinerView; + Outliner* mpOutliner; + + VclPtr<sw::sidebarwindows::SidebarTextControl> mpSidebarTextControl; + VclPtr<ScrollBar> mpVScrollbar; + VclPtr<Edit> mpMetadataAuthor; + VclPtr<Edit> mpMetadataDate; + VclPtr<MenuButton> mpMenuButton; + + sw::sidebarwindows::AnchorOverlayObject* mpAnchor; + sw::sidebarwindows::ShadowOverlayObject* mpShadow; + sw::overlay::OverlayRanges* mpTextRangeOverlay; + + Color mColorAnchor; + Color mColorDark; + Color mColorLight; + Color mChangeColor; + + sw::sidebarwindows::SidebarPosition meSidebarPosition; + + tools::Rectangle mPosSize; + SwRect mAnchorRect; + long mPageBorder; + bool mbAnchorRectChanged; + + std::vector<basegfx::B2DRange> maAnnotationTextRanges; + + bool mbMouseOver; + SwPostItHelper::SwLayoutStatus mLayoutStatus; + + bool mbReadonly; + bool mbIsFollow; + + SwSidebarItem& mrSidebarItem; + const SwFrame* mpAnchorFrame; SwFormatField* mpFormatField; SwPostItField* mpField; VclPtr<PopupMenu> mpButtonPopup; - }; } } // end of namespace sw::annotation diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx index 137080292eb3..6f25c4cb72bd 100644 --- a/sw/inc/PostItMgr.hxx +++ b/sw/inc/PostItMgr.hxx @@ -57,7 +57,6 @@ namespace sw { namespace annotation { class SwAnnotationWin; }} namespace sw { namespace sidebarwindows { - class SwSidebarWin; class SwFrameSidebarWinContainer; }} class SwSidebarItem; @@ -151,7 +150,7 @@ class SwPostItMgr: public SfxListener std::vector<SwPostItPageItem*> mPages; ImplSVEvent * mnEventId; bool mbWaitingForCalcRects; - VclPtr<sw::sidebarwindows::SwSidebarWin> mpActivePostIt; + VclPtr<sw::annotation::SwAnnotationWin> mpActivePostIt; bool mbLayout; long mbLayoutHeight; bool mbLayouting; @@ -162,18 +161,18 @@ class SwPostItMgr: public SfxListener OUString maAnswerText; bool mbIsShowAnchor; - // data structure to collect the <SwSidebarWin> instances for certain <SwFrame> instances. + // data structure to collect the <SwAnnotationWin> instances for certain <SwFrame> instances. sw::sidebarwindows::SwFrameSidebarWinContainer* mpFrameSidebarWinContainer; - typedef std::list<sw::sidebarwindows::SwSidebarWin*>::iterator SwSidebarWin_iterator; + typedef std::list<sw::annotation::SwAnnotationWin*>::iterator SwAnnotationWin_iterator; void AddPostIts(bool bCheckExistance = true,bool bFocus = true); void RemoveSidebarWin(); void PreparePageContainer(); void Scroll(const long lScroll,const unsigned long aPage ); - void AutoScroll(const sw::sidebarwindows::SwSidebarWin* pPostIt,const unsigned long aPage ); + void AutoScroll(const sw::annotation::SwAnnotationWin* pPostIt,const unsigned long aPage ); bool ScrollbarHit(const unsigned long aPage,const Point &aPoint); - bool LayoutByPage( std::list<sw::sidebarwindows::SwSidebarWin*> &aVisiblePostItList, + bool LayoutByPage( std::list<sw::annotation::SwAnnotationWin*> &aVisiblePostItList, const tools::Rectangle& rBorder, long lNeededHeight); void CheckForRemovedPostIts(); @@ -188,7 +187,7 @@ class SwPostItMgr: public SfxListener void SetReadOnlyState(); DECL_LINK( CalcHdl, void*, void); - sw::sidebarwindows::SwSidebarWin* GetSidebarWin(const SfxBroadcaster* pBroadcaster) const; + sw::annotation::SwAnnotationWin* GetSidebarWin(const SfxBroadcaster* pBroadcaster) const; SwSidebarItem* InsertItem( SfxBroadcaster* pItem, bool bCheckExistance, bool bFocus); void RemoveItem( SfxBroadcaster* pBroadcast ); @@ -206,7 +205,7 @@ class SwPostItMgr: public SfxListener void LayoutPostIts(); bool CalcRects(); - void MakeVisible( const sw::sidebarwindows::SwSidebarWin* pPostIt); + void MakeVisible( const sw::annotation::SwAnnotationWin* pPostIt); bool ShowScrollbar(const unsigned long aPage) const; bool HasNotes() const ; @@ -244,12 +243,12 @@ class SwPostItMgr: public SfxListener sw::annotation::SwAnnotationWin* GetAnnotationWin(const SwPostItField* pField) const; sw::annotation::SwAnnotationWin* GetAnnotationWin(const sal_uInt32 nPostItId) const; - sw::sidebarwindows::SwSidebarWin* GetNextPostIt( sal_uInt16 aDirection, - sw::sidebarwindows::SwSidebarWin* aPostIt); + sw::annotation::SwAnnotationWin* GetNextPostIt( sal_uInt16 aDirection, + sw::annotation::SwAnnotationWin* aPostIt); long GetNextBorder(); - sw::sidebarwindows::SwSidebarWin* GetActiveSidebarWin() { return mpActivePostIt; } - void SetActiveSidebarWin( sw::sidebarwindows::SwSidebarWin* p); + sw::annotation::SwAnnotationWin* GetActiveSidebarWin() { return mpActivePostIt; } + void SetActiveSidebarWin( sw::annotation::SwAnnotationWin* p); bool HasActiveSidebarWin() const; bool HasActiveAnnotationWin() const; void GrabFocusOnActiveSidebarWin(); @@ -283,9 +282,9 @@ class SwPostItMgr: public SfxListener void ConnectSidebarWinToFrame( const SwFrame& rFrame, const SwFormatField& rFormatField, - sw::sidebarwindows::SwSidebarWin& rSidebarWin ); + sw::annotation::SwAnnotationWin& rSidebarWin ); void DisconnectSidebarWinFromFrame( const SwFrame& rFrame, - sw::sidebarwindows::SwSidebarWin& rSidebarWin ); + sw::annotation::SwAnnotationWin& rSidebarWin ); bool HasFrameConnectedSidebarWins( const SwFrame& rFrame ); vcl::Window* GetSidebarWinForFrameByIndex( const SwFrame& rFrame, const sal_Int32 nIndex ); diff --git a/sw/inc/SidebarWin.hxx b/sw/inc/SidebarWin.hxx deleted file mode 100644 index d4692890b153..000000000000 --- a/sw/inc/SidebarWin.hxx +++ /dev/null @@ -1,256 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_SW_INC_SIDEBARWIN_HXX -#define INCLUDED_SW_INC_SIDEBARWIN_HXX - -#include <postithelper.hxx> -#include <SidebarWindowsTypes.hxx> - -#include <vcl/window.hxx> -#include <swrect.hxx> - -#include <tools/date.hxx> - -#include <vcl/lineinfo.hxx> -#include <basegfx/polygon/b2dpolygon.hxx> -#include <basegfx/range/b2drange.hxx> -#include <editeng/editstat.hxx> - -class SwPostItMgr; -class SwPostItField; -class OutlinerView; -class Outliner; -class ScrollBar; -class SwEditWin; -class SwView; -class Edit; -class MenuButton; -class SwFrame; - -namespace sw { namespace overlay { - class OverlayRanges; -}} - -namespace sw { namespace sidebarwindows { - -class SidebarTextControl; -class AnchorOverlayObject; -class ShadowOverlayObject; - -class SwSidebarWin : public vcl::Window -{ - public: - SwSidebarWin( SwEditWin& rEditWin, - WinBits nBits, - SwPostItMgr& aMgr, - SwSidebarItem& rSidebarItem ); - virtual ~SwSidebarWin() override; - virtual void dispose() override; - - void SetSize( const Size& rNewSize ); - void SetPosSizePixelRect( long nX, - long nY, - long nWidth, - long nHeight, - const SwRect& aAnchorRect, - const long PageBorder); - void SetPosAndSize(); - void TranslateTopPosition(const long aAmount); - void CheckMetaText(); - - Point GetAnchorPos() { return mAnchorRect.Pos(); } - const SwRect& GetAnchorRect() { return mAnchorRect; } - bool IsAnchorRectChanged() { return mbAnchorRectChanged; } - void ResetAnchorRectChanged() { mbAnchorRectChanged = false; } - const std::vector<basegfx::B2DRange>& GetAnnotationTextRanges() { return maAnnotationTextRanges; } - SwEditWin& EditWin(); - SwSidebarItem& GetSidebarItem() { return mrSidebarItem; } - - OutlinerView* GetOutlinerView() { return mpOutlinerView;} - bool HasScrollbar() const; - bool IsScrollbarVisible() const; - ScrollBar* Scrollbar() { return mpVScrollbar; } - ::sw::sidebarwindows::AnchorOverlayObject* Anchor() { return mpAnchor;} - ::sw::sidebarwindows::ShadowOverlayObject* Shadow() { return mpShadow;} - ::sw::overlay::OverlayRanges* TextRange() { return mpTextRangeOverlay;} - - long GetPostItTextHeight(); - - void SwitchToPostIt(sal_uInt16 aDirection); - void SwitchToFieldPos(); - - virtual sal_uInt32 MoveCaret() = 0; - - virtual void UpdateData() = 0; - virtual void SetPostItText() = 0; - virtual void Delete(); - virtual void GotoPos() = 0; - - virtual OUString GetAuthor() = 0; - virtual Date GetDate() = 0; - virtual tools::Time GetTime() = 0; - - void ExecuteCommand(sal_uInt16 nSlot); - void InitControls(); - void DoResize(); - void ResizeIfNecessary(long aOldHeight, long aNewHeight); - void SetScrollbar(); - - void SetVirtualPosSize( const Point& aPoint, const Size& aSize); - const Point VirtualPos() { return mPosSize.TopLeft(); } - const Size VirtualSize() { return mPosSize.GetSize(); } - - void ShowAnchorOnly(const Point &aPoint); - void ShowNote(); - void HideNote(); - void InvalidateControl(); - - void ResetAttributes(); - - void SetSidebarPosition(sw::sidebarwindows::SidebarPosition eSidebarPosition); - void SetReadonly(bool bSet); - bool IsReadOnly() - { - return mbReadonly; - } - - void SetColor(Color aColorDark,Color aColorLight, Color aColorAnchor); - const Color& ColorAnchor() { return mColorAnchor; } - const Color& ColorDark() { return mColorDark; } - const Color& ColorLight() { return mColorLight; } - void Rescale(); - - void SetViewState(::sw::sidebarwindows::ViewState bViewState); - - bool IsFollow() { return mbIsFollow; } - void SetFollow( bool bIsFollow) { mbIsFollow = bIsFollow; }; - virtual sal_uInt32 CalcParent() = 0; - - sal_Int32 GetMetaHeight(); - sal_Int32 GetMinimumSizeWithMeta(); - sal_Int32 GetMinimumSizeWithoutMeta(); - sal_Int32 GetMetaButtonAreaWidth(); - sal_Int32 GetScrollbarWidth(); - - void SetSpellChecking(); - - void ToggleInsMode(); - - void ActivatePostIt(); - void DeactivatePostIt(); - - void SetChangeTracking( const SwPostItHelper::SwLayoutStatus aStatus, - const Color& aColor); - SwPostItHelper::SwLayoutStatus GetLayoutStatus() { return mLayoutStatus; } - const Color& GetChangeColor() { return mChangeColor; } - - virtual bool IsProtected() - { - return mbReadonly; - } - - DECL_LINK( WindowEventListener, VclWindowEvent&, void ); - bool IsMouseOverSidebarWin() const { return mbMouseOver; } - - void SetLanguage(const SvxLanguageItem& rNewItem); - - void ChangeSidebarItem( SwSidebarItem& rSidebarItem ); - virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override; - - virtual void Draw(OutputDevice* pDev, const Point&, const Size&, DrawFlags) override; - virtual void KeyInput(const KeyEvent& rKeyEvt) override; - virtual void MouseButtonDown(const MouseEvent& rMouseEvent) override; - virtual void MouseButtonUp(const MouseEvent& rMouseEvent) override; - virtual void MouseMove(const MouseEvent& rMouseEvent) override; - void PaintTile(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect); - /// Is there a matching sub-widget inside this sidebar widget for rPointLogic? - bool IsHitWindow(const Point& rPointLogic); - /// Allows adjusting the point or mark of the selection to a document coordinate. - void SetCursorLogicPosition(const Point& rPosition, bool bPoint, bool bClearMark); - - protected: - virtual void LoseFocus() override; - virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; - virtual void GetFocus() override; - virtual VclPtr<MenuButton> CreateMenuButton() = 0; - - void SetSizePixel( const Size& rNewSize ) override; - SfxItemSet DefaultItem(); - - DECL_LINK(ModifyHdl, LinkParamNone*, void); - DECL_LINK(ScrollHdl, ScrollBar*, void); - DECL_LINK(DeleteHdl, void*, void); - - SwView& DocView() { return mrView;} - SwPostItMgr& Mgr() { return mrMgr; } - Outliner* Engine() { return mpOutliner;} - - private: - SwSidebarWin* GetTopReplyNote(); - - virtual SvxLanguageItem GetLanguage(); - - SwPostItMgr& mrMgr; - SwView& mrView; - - ImplSVEvent * mnEventId; - - OutlinerView* mpOutlinerView; - Outliner* mpOutliner; - - VclPtr<sw::sidebarwindows::SidebarTextControl> mpSidebarTextControl; - VclPtr<ScrollBar> mpVScrollbar; - VclPtr<Edit> mpMetadataAuthor; - VclPtr<Edit> mpMetadataDate; - VclPtr<MenuButton> mpMenuButton; - - sw::sidebarwindows::AnchorOverlayObject* mpAnchor; - sw::sidebarwindows::ShadowOverlayObject* mpShadow; - sw::overlay::OverlayRanges* mpTextRangeOverlay; - - Color mColorAnchor; - Color mColorDark; - Color mColorLight; - Color mChangeColor; - - sw::sidebarwindows::SidebarPosition meSidebarPosition; - - tools::Rectangle mPosSize; - SwRect mAnchorRect; - long mPageBorder; - bool mbAnchorRectChanged; - - std::vector<basegfx::B2DRange> maAnnotationTextRanges; - - bool mbMouseOver; - SwPostItHelper::SwLayoutStatus mLayoutStatus; - - bool mbReadonly; - bool mbIsFollow; - - SwSidebarItem& mrSidebarItem; - const SwFrame* mpAnchorFrame; -}; - -} } // eof namespace sw::sidebarwindows - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx index 86738867aff1..fdd62fe29f30 100644 --- a/sw/inc/pch/precompiled_sw.hxx +++ b/sw/inc/pch/precompiled_sw.hxx @@ -146,7 +146,6 @@ #include <IDocumentUndoRedo.hxx> #include <IMark.hxx> #include <PostItMgr.hxx> -#include <SidebarWin.hxx> #include <SwNodeNum.hxx> #include <SwRewriter.hxx> #include <SwSmartTagMgr.hxx> diff --git a/sw/inc/postithelper.hxx b/sw/inc/postithelper.hxx index 90cfaf3a5d7e..26eb10186233 100644 --- a/sw/inc/postithelper.hxx +++ b/sw/inc/postithelper.hxx @@ -32,8 +32,8 @@ class SwTextField; class SwRootFrame; class SwPostItMgr; class SwEditWin; -namespace sw { namespace sidebarwindows { - class SwSidebarWin; +namespace sw { namespace annotation { + class SwAnnotationWin; } } struct SwPosition; @@ -88,7 +88,7 @@ namespace SwPostItHelper class SwSidebarItem { public: - VclPtr<sw::sidebarwindows::SwSidebarWin> pPostIt; + VclPtr<sw::annotation::SwAnnotationWin> pPostIt; bool bShow; bool bFocus; bool bPendingLayout; @@ -114,7 +114,7 @@ public: virtual bool UseElement() = 0; virtual const SwFormatField& GetFormatField() const = 0; virtual const SfxBroadcaster* GetBroadCaster() const = 0; - virtual VclPtr<sw::sidebarwindows::SwSidebarWin> GetSidebarWindow( SwEditWin& rEditWin, + virtual VclPtr<sw::annotation::SwAnnotationWin> GetSidebarWindow( SwEditWin& rEditWin, SwPostItMgr& aMgr) = 0; }; @@ -139,7 +139,7 @@ public: { return dynamic_cast<const SfxBroadcaster *> (&mrFormatField); } - virtual VclPtr<sw::sidebarwindows::SwSidebarWin> GetSidebarWindow( + virtual VclPtr<sw::annotation::SwAnnotationWin> GetSidebarWindow( SwEditWin& rEditWin, SwPostItMgr& aMgr ) override; |