LCOV - code coverage report
Current view: top level - sc/source/ui/inc - sortkeydlg.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 0 3 0.0 %
Date: 2015-06-13 12:38:46 Functions: 0 4 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  */
       9             : 
      10             : #ifndef INCLUDED_SC_SOURCE_UI_INC_SORTKEYDLG_HXX
      11             : #define INCLUDED_SC_SOURCE_UI_INC_SORTKEYDLG_HXX
      12             : 
      13             : #include <boost/ptr_container/ptr_vector.hpp>
      14             : 
      15             : #include "anyrefdg.hxx"
      16             : 
      17             : #include <vcl/edit.hxx>
      18             : #include <vcl/fixed.hxx>
      19             : #include <vcl/layout.hxx>
      20             : #include <vcl/lstbox.hxx>
      21             : #include <vcl/scrbar.hxx>
      22             : #include <vcl/ctrl.hxx>
      23             : #include <svtools/stdctrl.hxx>
      24             : #include <svx/langbox.hxx>
      25             : 
      26           0 : struct ScSortKeyItem : public VclBuilderContainer
      27             : {
      28             :     VclPtr<VclFrame>       m_pFrame;
      29             :     VclPtr<FixedText>      m_pFlSort;
      30             :     VclPtr<ListBox>        m_pLbSort;
      31             :     VclPtr<RadioButton>    m_pBtnUp;
      32             :     VclPtr<RadioButton>    m_pBtnDown;
      33             : 
      34             :     ScSortKeyItem(vcl::Window* pParent);
      35             : 
      36             :     void DisableField();
      37             :     void EnableField();
      38             : 
      39             :     long getItemHeight() const;
      40             : };
      41             : 
      42             : typedef boost::ptr_vector<ScSortKeyItem> ScSortKeyItems;
      43             : 
      44             : class ScSortKeyWindow
      45             : {
      46             : private:
      47             :     VclPtr<VclBox>  m_pBox;
      48             :     sal_Int32       nItemHeight;
      49             : 
      50             :     ScSortKeyItems& mrSortKeyItems;
      51             : 
      52             : public:
      53             :     ScSortKeyWindow(SfxTabPage* pParent, ScSortKeyItems& mrSortKeyItems);
      54             :     ~ScSortKeyWindow();
      55             :     void dispose();
      56             : 
      57             :     void AddSortKey( sal_uInt16 nItem );
      58             :     void DoScroll( sal_Int32 nNewPos );
      59           0 :     sal_Int32 GetItemHeight() const { return nItemHeight; }
      60             :     sal_Int32 GetTotalHeight() const { return m_pBox->GetSizePixel().Height(); }
      61             : };
      62             : 
      63           0 : class ScSortKeyCtrl
      64             : {
      65             : private:
      66             :     ScSortKeyWindow  m_aSortWin;
      67             :     VclScrolledWindow& m_rScrolledWindow;
      68             :     ScrollBar&       m_rVertScroll;
      69             : 
      70             :     DECL_LINK(ScrollHdl, ScrollBar*);
      71             : 
      72             :     void checkAutoVScroll();
      73             : 
      74             : public:
      75             :     ScSortKeyCtrl(SfxTabPage* pParent, ScSortKeyItems& mrSortKeyItems);
      76             :     void dispose();
      77             :     void setScrollRange();
      78             :     void AddSortKey( sal_uInt16 nItem );
      79             : };
      80             : 
      81             : #endif // INCLUDED_SC_SOURCE_UI_INC_SORTKEYDLG_HXX
      82             : 
      83             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11