diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-02-07 12:28:22 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-02-07 12:36:02 +0100 |
commit | 68adf20e1e89d6e19e8122b600c0fb675eaebdbd (patch) | |
tree | 19e09bef0cd43236230e79fc8acbb79fa0b13a78 | |
parent | b48874cd54deaacd858f9eaf0557d2b01bc25806 (diff) |
loplugin:deletedspecial
Change-Id: Ib9e704c3b27dad81eea44583c99ecdbc5449dd13
-rw-r--r-- | include/sfx2/basedlgs.hxx | 12 | ||||
-rw-r--r-- | include/sfx2/controlwrapper.hxx | 5 | ||||
-rw-r--r-- | include/sfx2/docfac.hxx | 5 | ||||
-rw-r--r-- | include/sfx2/dockwin.hxx | 4 | ||||
-rw-r--r-- | include/sfx2/docstoragemodifylistener.hxx | 5 | ||||
-rw-r--r-- | include/sfx2/itemconnect.hxx | 5 | ||||
-rw-r--r-- | include/sfx2/linkmgr.hxx | 4 | ||||
-rw-r--r-- | include/sfx2/mnumgr.hxx | 5 | ||||
-rw-r--r-- | include/sfx2/opengrf.hxx | 5 | ||||
-rw-r--r-- | include/sfx2/querystatus.hxx | 5 | ||||
-rw-r--r-- | include/sfx2/request.hxx | 2 | ||||
-rw-r--r-- | include/sfx2/sfxstatuslistener.hxx | 5 | ||||
-rw-r--r-- | include/sfx2/shell.hxx | 4 | ||||
-rw-r--r-- | include/sfx2/tbxctrl.hxx | 4 | ||||
-rw-r--r-- | sfx2/source/appl/imestatuswindow.hxx | 4 | ||||
-rw-r--r-- | sfx2/source/doc/doctemplateslocal.hxx | 2 | ||||
-rw-r--r-- | sfx2/source/inc/statcach.hxx | 2 | ||||
-rw-r--r-- | sfx2/source/menu/thessubmenu.hxx | 6 | ||||
-rw-r--r-- | sfx2/source/sidebar/DeckLayouter.cxx | 79 | ||||
-rw-r--r-- | sfx2/source/sidebar/DeckLayouter.hxx | 72 |
20 files changed, 109 insertions, 126 deletions
diff --git a/include/sfx2/basedlgs.hxx b/include/sfx2/basedlgs.hxx index c7fafe3721ee..5a19603bdca8 100644 --- a/include/sfx2/basedlgs.hxx +++ b/include/sfx2/basedlgs.hxx @@ -60,8 +60,8 @@ class SFX2_DLLPUBLIC SfxModalDialog: public ModalDialog SfxItemSet* pOutputSet; private: - SAL_DLLPRIVATE SfxModalDialog(SfxModalDialog &); // not defined - SAL_DLLPRIVATE void operator =(SfxModalDialog &); // not defined + SfxModalDialog(SfxModalDialog &) SAL_DELETED_FUNCTION; + void operator =(SfxModalDialog &) SAL_DELETED_FUNCTION; SAL_DLLPRIVATE void SetDialogData_Impl(); SAL_DLLPRIVATE void GetDialogData_Impl(); @@ -93,8 +93,8 @@ class SFX2_DLLPUBLIC SfxModelessDialog: public ModelessDialog Size aSize; SfxModelessDialog_Impl* pImp; - SAL_DLLPRIVATE SfxModelessDialog(SfxModelessDialog &); // not defined - SAL_DLLPRIVATE void operator =(SfxModelessDialog &); // not defined + SfxModelessDialog(SfxModelessDialog &) SAL_DELETED_FUNCTION; + void operator =(SfxModelessDialog &) SAL_DELETED_FUNCTION; void Init(SfxBindings *pBindinx, SfxChildWindow *pCW); @@ -126,8 +126,8 @@ class SFX2_DLLPUBLIC SfxFloatingWindow: public FloatingWindow Size aSize; SfxFloatingWindow_Impl* pImp; - SAL_DLLPRIVATE SfxFloatingWindow(SfxFloatingWindow &); // not defined - SAL_DLLPRIVATE void operator =(SfxFloatingWindow &); // not defined + SfxFloatingWindow(SfxFloatingWindow &) SAL_DELETED_FUNCTION; + void operator =(SfxFloatingWindow &) SAL_DELETED_FUNCTION; protected: SfxFloatingWindow( SfxBindings *pBindings, diff --git a/include/sfx2/controlwrapper.hxx b/include/sfx2/controlwrapper.hxx index d37ffc5a0458..42aaab620fbd 100644 --- a/include/sfx2/controlwrapper.hxx +++ b/include/sfx2/controlwrapper.hxx @@ -162,9 +162,8 @@ public: virtual void SetControlDontKnow( bool bSet ) = 0; private: - /* Disable copy c'tor and assignment. */ - ControlWrapperBase( const ControlWrapperBase& ); - ControlWrapperBase& operator=( const ControlWrapperBase& ); + ControlWrapperBase( const ControlWrapperBase& ) SAL_DELETED_FUNCTION; + ControlWrapperBase& operator=( const ControlWrapperBase& ) SAL_DELETED_FUNCTION; }; diff --git a/include/sfx2/docfac.hxx b/include/sfx2/docfac.hxx index e31690779926..509de0f24464 100644 --- a/include/sfx2/docfac.hxx +++ b/include/sfx2/docfac.hxx @@ -85,9 +85,8 @@ public: SAL_DLLPRIVATE sal_uInt16 GetViewNo_Impl( const sal_uInt16 i_nViewId, const sal_uInt16 i_nFallback ) const; private: - // Kopieren verboten - SAL_DLLPRIVATE SfxObjectFactory(const SfxObjectFactory&); - SAL_DLLPRIVATE const SfxObjectFactory& operator=(const SfxObjectFactory &); + SfxObjectFactory(const SfxObjectFactory&) SAL_DELETED_FUNCTION; + const SfxObjectFactory& operator=(const SfxObjectFactory &) SAL_DELETED_FUNCTION; }; #define SFX_DECL_OBJECTFACTORY() \ diff --git a/include/sfx2/dockwin.hxx b/include/sfx2/dockwin.hxx index 6fc50597ba3d..9f2354cf0cdd 100644 --- a/include/sfx2/dockwin.hxx +++ b/include/sfx2/dockwin.hxx @@ -46,8 +46,8 @@ private: SfxChildWindow* pMgr; SfxDockingWindow_Impl* pImp; - SAL_DLLPRIVATE SfxDockingWindow(SfxDockingWindow &); // not defined - SAL_DLLPRIVATE void operator =(SfxDockingWindow &); // not defined + SfxDockingWindow(SfxDockingWindow &) SAL_DELETED_FUNCTION; + void operator =(SfxDockingWindow &) SAL_DELETED_FUNCTION; protected: SfxChildAlignment CalcAlignment(const Point& rPos, Rectangle& rRect ); diff --git a/include/sfx2/docstoragemodifylistener.hxx b/include/sfx2/docstoragemodifylistener.hxx index 53aa7e62f3d0..e2b845ed589f 100644 --- a/include/sfx2/docstoragemodifylistener.hxx +++ b/include/sfx2/docstoragemodifylistener.hxx @@ -73,9 +73,8 @@ namespace sfx2 virtual ~DocumentStorageModifyListener(); private: - DocumentStorageModifyListener(); // never implemented - DocumentStorageModifyListener( const DocumentStorageModifyListener& ); // never implemented - DocumentStorageModifyListener& operator=( const DocumentStorageModifyListener& ); // never implemented + DocumentStorageModifyListener( const DocumentStorageModifyListener& ) SAL_DELETED_FUNCTION; + DocumentStorageModifyListener& operator=( const DocumentStorageModifyListener& ) SAL_DELETED_FUNCTION; }; diff --git a/include/sfx2/itemconnect.hxx b/include/sfx2/itemconnect.hxx index 81a869edb3eb..3e49921ae659 100644 --- a/include/sfx2/itemconnect.hxx +++ b/include/sfx2/itemconnect.hxx @@ -214,9 +214,8 @@ protected: TriState GetShowState( bool bKnown ) const; private: - /* Disable copy c'tor and assignment. */ - ItemConnectionBase( const ItemConnectionBase& ); - ItemConnectionBase& operator=( const ItemConnectionBase& ); + ItemConnectionBase( const ItemConnectionBase& ) SAL_DELETED_FUNCTION; + ItemConnectionBase& operator=( const ItemConnectionBase& ) SAL_DELETED_FUNCTION; ItemConnFlags mnFlags; /// Flags for additional options. }; diff --git a/include/sfx2/linkmgr.hxx b/include/sfx2/linkmgr.hxx index 9dc778fe8f76..33aafb90a26d 100644 --- a/include/sfx2/linkmgr.hxx +++ b/include/sfx2/linkmgr.hxx @@ -160,8 +160,8 @@ public: Graphic& rGrf ); private: - LinkManager( const LinkManager& ); - LinkManager& operator=( const LinkManager& ); + LinkManager( const LinkManager& ) SAL_DELETED_FUNCTION; + LinkManager& operator=( const LinkManager& ) SAL_DELETED_FUNCTION; }; // Separator in the link name for the DDE-/File-/Graphics- links diff --git a/include/sfx2/mnumgr.hxx b/include/sfx2/mnumgr.hxx index 93106583d6ea..f752575c6415 100644 --- a/include/sfx2/mnumgr.hxx +++ b/include/sfx2/mnumgr.hxx @@ -86,9 +86,8 @@ private: // if we don't delete the pointer that got created in SfxPopupMenuManager::Popup static PopupMenu * pStaticThesSubMenu; - // only declared, but not defined: don't allow copying - SfxPopupMenuManager( const SfxPopupMenuManager& ); - SfxPopupMenuManager& operator=( const SfxPopupMenuManager& ); + SfxPopupMenuManager( const SfxPopupMenuManager& ) SAL_DELETED_FUNCTION; + SfxPopupMenuManager& operator=( const SfxPopupMenuManager& ) SAL_DELETED_FUNCTION; public: SfxPopupMenuManager( PopupMenu*, SfxBindings& ); diff --git a/include/sfx2/opengrf.hxx b/include/sfx2/opengrf.hxx index a38d8800a4bd..69d5295436b8 100644 --- a/include/sfx2/opengrf.hxx +++ b/include/sfx2/opengrf.hxx @@ -46,9 +46,8 @@ public: OUString GetCurrentFilter() const; void SetCurrentFilter(const OUString&); private: - // disable copy and assignment - SFX2_DLLPRIVATE SvxOpenGraphicDialog (const SvxOpenGraphicDialog&); - SFX2_DLLPRIVATE SvxOpenGraphicDialog& operator = ( const SvxOpenGraphicDialog & ); + SvxOpenGraphicDialog (const SvxOpenGraphicDialog&) SAL_DELETED_FUNCTION; + SvxOpenGraphicDialog& operator = ( const SvxOpenGraphicDialog & ) SAL_DELETED_FUNCTION; const std::unique_ptr< SvxOpenGrf_Impl > mpImpl; }; diff --git a/include/sfx2/querystatus.hxx b/include/sfx2/querystatus.hxx index 885baab09eeb..628fe451e3c6 100644 --- a/include/sfx2/querystatus.hxx +++ b/include/sfx2/querystatus.hxx @@ -42,9 +42,8 @@ class SFX2_DLLPUBLIC SfxQueryStatus SfxItemState QueryState( SfxPoolItem*& pPoolItem ); private: - SfxQueryStatus( const SfxQueryStatus& ); - SfxQueryStatus(); - SfxQueryStatus& operator=( const SfxQueryStatus& ); + SfxQueryStatus( const SfxQueryStatus& ) SAL_DELETED_FUNCTION; + SfxQueryStatus& operator=( const SfxQueryStatus& ) SAL_DELETED_FUNCTION; com::sun::star::uno::Reference< com::sun::star::frame::XStatusListener > m_xStatusListener; SfxQueryStatus_Impl* m_pSfxQueryStatusImpl; diff --git a/include/sfx2/request.hxx b/include/sfx2/request.hxx index f862cb0f279a..5aafc55e357f 100644 --- a/include/sfx2/request.hxx +++ b/include/sfx2/request.hxx @@ -108,7 +108,7 @@ public: void ForgetAllArgs(); private: - const SfxRequest& operator=(const SfxRequest &); // n.i.!! + const SfxRequest& operator=(const SfxRequest &) SAL_DELETED_FUNCTION; }; diff --git a/include/sfx2/sfxstatuslistener.hxx b/include/sfx2/sfxstatuslistener.hxx index 70301be57e04..f01a2e4178d7 100644 --- a/include/sfx2/sfxstatuslistener.hxx +++ b/include/sfx2/sfxstatuslistener.hxx @@ -70,9 +70,8 @@ class SFX2_DLLPUBLIC SfxStatusListener : public ::cppu::WeakImplHelper2< virtual void SAL_CALL statusChanged(const ::com::sun::star::frame::FeatureStateEvent& Event) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE; private: - SfxStatusListener( const SfxStatusListener& ); - SfxStatusListener(); - SfxStatusListener& operator=( const SfxStatusListener& ); + SfxStatusListener( const SfxStatusListener& ) SAL_DELETED_FUNCTION; + SfxStatusListener& operator=( const SfxStatusListener& ) SAL_DELETED_FUNCTION; sal_uInt16 m_nSlotID; ::com::sun::star::util::URL m_aCommand; diff --git a/include/sfx2/shell.hxx b/include/sfx2/shell.hxx index 6af0a02ede38..a691b6a44e3d 100644 --- a/include/sfx2/shell.hxx +++ b/include/sfx2/shell.hxx @@ -142,8 +142,8 @@ class SFX2_DLLPUBLIC SfxShell: public SfxBroadcaster ::svl::IUndoManager* pUndoMgr; private: - SfxShell( const SfxShell & ); // internal - SfxShell& operator = ( const SfxShell & ); // internal + SfxShell( const SfxShell & ) SAL_DELETED_FUNCTION; + SfxShell& operator = ( const SfxShell & ) SAL_DELETED_FUNCTION; protected: /** diff --git a/include/sfx2/tbxctrl.hxx b/include/sfx2/tbxctrl.hxx index 168b8c4aaebf..f0fbfdb68db5 100644 --- a/include/sfx2/tbxctrl.hxx +++ b/include/sfx2/tbxctrl.hxx @@ -113,8 +113,8 @@ class SFX2_DLLPUBLIC SfxPopupWindow: public FloatingWindow, public SfxStatusList private: SfxFrameStatusListener* GetOrCreateStatusListener(); - SAL_DLLPRIVATE SfxPopupWindow(SfxPopupWindow &); // not defined - SAL_DLLPRIVATE void operator =(SfxPopupWindow &); // not defined + SfxPopupWindow(SfxPopupWindow &) SAL_DELETED_FUNCTION; + void operator =(SfxPopupWindow &) SAL_DELETED_FUNCTION; void Delete(); protected: diff --git a/sfx2/source/appl/imestatuswindow.hxx b/sfx2/source/appl/imestatuswindow.hxx index 116812defaee..df8fe533b0c5 100644 --- a/sfx2/source/appl/imestatuswindow.hxx +++ b/sfx2/source/appl/imestatuswindow.hxx @@ -88,8 +88,8 @@ public: using ImeStatusWindow_Impl::operator delete; private: - ImeStatusWindow(ImeStatusWindow &); // not implemented - void operator =(const ImeStatusWindow&); // not implemented + ImeStatusWindow(ImeStatusWindow &) SAL_DELETED_FUNCTION; + void operator =(const ImeStatusWindow&) SAL_DELETED_FUNCTION; virtual ~ImeStatusWindow(); diff --git a/sfx2/source/doc/doctemplateslocal.hxx b/sfx2/source/doc/doctemplateslocal.hxx index d0890e070362..626f15e7d2f7 100644 --- a/sfx2/source/doc/doctemplateslocal.hxx +++ b/sfx2/source/doc/doctemplateslocal.hxx @@ -38,7 +38,7 @@ class DocTemplLocaleHelper : public cppu::WeakImplHelper1 < com::sun::star::xml: ::com::sun::star::uno::Sequence< ::com::sun::star::beans::StringPair > m_aResultSeq; ::com::sun::star::uno::Sequence< OUString > m_aElementsSeq; // stack of elements being parsed - DocTemplLocaleHelper(); // must not be created directly + DocTemplLocaleHelper(); ::com::sun::star::uno::Sequence< ::com::sun::star::beans::StringPair > GetParsingResult(); static ::com::sun::star::uno::Sequence< ::com::sun::star::beans::StringPair > SAL_CALL ReadLocalizationSequence_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xInStream, const OUString& aStringID, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xContext ) diff --git a/sfx2/source/inc/statcach.hxx b/sfx2/source/inc/statcach.hxx index 65fdb57c5e60..f2fb797edf15 100644 --- a/sfx2/source/inc/statcach.hxx +++ b/sfx2/source/inc/statcach.hxx @@ -76,7 +76,7 @@ friend class BindDispatch_Impl; bool bItemDirty; // Validity of pLastItem private: - SfxStateCache( const SfxStateCache& rOrig ); // inward + SfxStateCache( const SfxStateCache& rOrig ) SAL_DELETED_FUNCTION; void SetState_Impl( SfxItemState, const SfxPoolItem*, bool bMaybeDirty=false ); public: diff --git a/sfx2/source/menu/thessubmenu.hxx b/sfx2/source/menu/thessubmenu.hxx index 94af27e0b5c6..226e9b103af5 100644 --- a/sfx2/source/menu/thessubmenu.hxx +++ b/sfx2/source/menu/thessubmenu.hxx @@ -33,10 +33,8 @@ class SfxThesSubMenuHelper css::uno::Reference< css::linguistic2::XThesaurus > m_xThesarus; private: - - // don't use copy constructor and assignment operator - SfxThesSubMenuHelper( const SfxThesSubMenuHelper & ); - SfxThesSubMenuHelper & operator = ( const SfxThesSubMenuHelper & ); + SfxThesSubMenuHelper( const SfxThesSubMenuHelper & ) SAL_DELETED_FUNCTION; + SfxThesSubMenuHelper & operator = ( const SfxThesSubMenuHelper & ) SAL_DELETED_FUNCTION; public: SfxThesSubMenuHelper(); diff --git a/sfx2/source/sidebar/DeckLayouter.cxx b/sfx2/source/sidebar/DeckLayouter.cxx index a7639fbd6aac..9d831a7628df 100644 --- a/sfx2/source/sidebar/DeckLayouter.cxx +++ b/sfx2/source/sidebar/DeckLayouter.cxx @@ -35,6 +35,64 @@ namespace sfx2 { namespace sidebar { namespace { static const sal_Int32 MinimalPanelHeight (25); + + enum LayoutMode + { + MinimumOrLarger, + PreferredOrLarger, + Preferred + }; + class LayoutItem + { + public: + SharedPanel mpPanel; + css::ui::LayoutSize maLayoutSize; + sal_Int32 mnDistributedHeight; + sal_Int32 mnWeight; + sal_Int32 mnPanelIndex; + bool mbShowTitleBar; + + LayoutItem (void) + : mpPanel(),maLayoutSize(0,0,0),mnDistributedHeight(0),mnWeight(0),mnPanelIndex(0),mbShowTitleBar(true) + {} + }; + Rectangle LayoutPanels ( + const Rectangle aContentArea, + sal_Int32& rMinimalWidth, + ::std::vector<LayoutItem>& rLayoutItems, + vcl::Window& rScrollClipWindow, + vcl::Window& rScrollContainer, + ScrollBar& pVerticalScrollBar, + const bool bShowVerticalScrollBar); + void GetRequestedSizes ( + ::std::vector<LayoutItem>& rLayoutItem, + sal_Int32& rAvailableHeight, + sal_Int32& rMinimalWidth, + const Rectangle& rContentBox); + void DistributeHeights ( + ::std::vector<LayoutItem>& rLayoutItems, + const sal_Int32 nHeightToDistribute, + const sal_Int32 nContainerHeight, + const bool bMinimumHeightIsBase); + sal_Int32 PlacePanels ( + ::std::vector<LayoutItem>& rLayoutItems, + const sal_Int32 nWidth, + const LayoutMode eMode, + vcl::Window& rScrollContainer); + Rectangle PlaceDeckTitle ( + vcl::Window& rTittleBar, + const Rectangle& rAvailableSpace); + Rectangle PlaceVerticalScrollBar ( + ScrollBar& rVerticalScrollBar, + const Rectangle& rAvailableSpace, + const bool bShowVerticalScrollBar); + void SetupVerticalScrollBar( + ScrollBar& rVerticalScrollBar, + const sal_Int32 nContentHeight, + const sal_Int32 nVisibleHeight); + void UpdateFiller ( + vcl::Window& rFiller, + const Rectangle& rBox); } #define IterateLayoutItems(iterator_name,container) \ @@ -82,10 +140,9 @@ void DeckLayouter::LayoutDeck ( UpdateFiller(rFiller, aBox); } +namespace { - - -Rectangle DeckLayouter::LayoutPanels ( +Rectangle LayoutPanels ( const Rectangle aContentArea, sal_Int32& rMinimalWidth, ::std::vector<LayoutItem>& rLayoutItems, @@ -193,7 +250,7 @@ Rectangle DeckLayouter::LayoutPanels ( -sal_Int32 DeckLayouter::PlacePanels ( +sal_Int32 PlacePanels ( ::std::vector<LayoutItem>& rLayoutItems, const sal_Int32 nWidth, const LayoutMode eMode, @@ -288,7 +345,7 @@ sal_Int32 DeckLayouter::PlacePanels ( -void DeckLayouter::GetRequestedSizes ( +void GetRequestedSizes ( ::std::vector<LayoutItem>& rLayoutItems, sal_Int32& rAvailableHeight, sal_Int32& rMinimalWidth, @@ -343,7 +400,7 @@ void DeckLayouter::GetRequestedSizes ( -void DeckLayouter::DistributeHeights ( +void DistributeHeights ( ::std::vector<LayoutItem>& rLayoutItems, const sal_Int32 nHeightToDistribute, const sal_Int32 nContainerHeight, @@ -428,7 +485,7 @@ void DeckLayouter::DistributeHeights ( -Rectangle DeckLayouter::PlaceDeckTitle ( +Rectangle PlaceDeckTitle ( vcl::Window& rDeckTitleBar, const Rectangle& rAvailableSpace) { @@ -458,7 +515,7 @@ Rectangle DeckLayouter::PlaceDeckTitle ( -Rectangle DeckLayouter::PlaceVerticalScrollBar ( +Rectangle PlaceVerticalScrollBar ( ScrollBar& rVerticalScrollBar, const Rectangle& rAvailableSpace, const bool bShowVerticalScrollBar) @@ -488,7 +545,7 @@ Rectangle DeckLayouter::PlaceVerticalScrollBar ( -void DeckLayouter::SetupVerticalScrollBar( +void SetupVerticalScrollBar( ScrollBar& rVerticalScrollBar, const sal_Int32 nContentHeight, const sal_Int32 nVisibleHeight) @@ -503,7 +560,7 @@ void DeckLayouter::SetupVerticalScrollBar( -void DeckLayouter::UpdateFiller ( +void UpdateFiller ( vcl::Window& rFiller, const Rectangle& rBox) { @@ -521,7 +578,7 @@ void DeckLayouter::UpdateFiller ( } } - +} } } // end of namespace sfx2::sidebar diff --git a/sfx2/source/sidebar/DeckLayouter.hxx b/sfx2/source/sidebar/DeckLayouter.hxx index fa2b5ea8bcda..9421829e33b0 100644 --- a/sfx2/source/sidebar/DeckLayouter.hxx +++ b/sfx2/source/sidebar/DeckLayouter.hxx @@ -35,13 +35,12 @@ namespace sfx2 { namespace sidebar { class Panel; -/** Helper class for layouting the direct and indirect children of a +/** Helper for layouting the direct and indirect children of a deck like title bars, panels, and scroll bars. */ -class DeckLayouter +namespace DeckLayouter { -public: - static void LayoutDeck ( + void LayoutDeck ( const Rectangle aContentArea, sal_Int32& rMinimalWidth, SharedPanelContainer& rPanels, @@ -50,70 +49,7 @@ public: vcl::Window& pScrollContainer, vcl::Window& pFiller, ScrollBar& pVerticalScrollBar); - -private: - // Do not use constructor or destructor. - DeckLayouter (void); - ~DeckLayouter (void); - - enum LayoutMode - { - MinimumOrLarger, - PreferredOrLarger, - Preferred - }; - class LayoutItem - { - public: - SharedPanel mpPanel; - css::ui::LayoutSize maLayoutSize; - sal_Int32 mnDistributedHeight; - sal_Int32 mnWeight; - sal_Int32 mnPanelIndex; - bool mbShowTitleBar; - - LayoutItem (void) - : mpPanel(),maLayoutSize(0,0,0),mnDistributedHeight(0),mnWeight(0),mnPanelIndex(0),mbShowTitleBar(true) - {} - }; - static Rectangle LayoutPanels ( - const Rectangle aContentArea, - sal_Int32& rMinimalWidth, - ::std::vector<LayoutItem>& rLayoutItems, - vcl::Window& rScrollClipWindow, - vcl::Window& rScrollContainer, - ScrollBar& pVerticalScrollBar, - const bool bShowVerticalScrollBar); - static void GetRequestedSizes ( - ::std::vector<LayoutItem>& rLayoutItem, - sal_Int32& rAvailableHeight, - sal_Int32& rMinimalWidth, - const Rectangle& rContentBox); - static void DistributeHeights ( - ::std::vector<LayoutItem>& rLayoutItems, - const sal_Int32 nHeightToDistribute, - const sal_Int32 nContainerHeight, - const bool bMinimumHeightIsBase); - static sal_Int32 PlacePanels ( - ::std::vector<LayoutItem>& rLayoutItems, - const sal_Int32 nWidth, - const LayoutMode eMode, - vcl::Window& rScrollContainer); - static Rectangle PlaceDeckTitle ( - vcl::Window& rTittleBar, - const Rectangle& rAvailableSpace); - static Rectangle PlaceVerticalScrollBar ( - ScrollBar& rVerticalScrollBar, - const Rectangle& rAvailableSpace, - const bool bShowVerticalScrollBar); - static void SetupVerticalScrollBar( - ScrollBar& rVerticalScrollBar, - const sal_Int32 nContentHeight, - const sal_Int32 nVisibleHeight); - static void UpdateFiller ( - vcl::Window& rFiller, - const Rectangle& rBox); -}; +} } } // end of namespace sfx2::sidebar |