LCOV - code coverage report
Current view: top level - sc/source/ui/inc - condformatdlg.hxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 1 0.0 %
Date: 2014-04-14 Functions: 0 2 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 SC_CONDFORMATDLG_HXX
      11             : #define SC_CONDFORMATDLG_HXX
      12             : 
      13             : #include <vcl/button.hxx>
      14             : #include <vcl/dialog.hxx>
      15             : #include <vcl/lstbox.hxx>
      16             : #include <vcl/scrbar.hxx>
      17             : #include <vcl/fixed.hxx>
      18             : #include <vcl/edit.hxx>
      19             : #include <svx/fntctrl.hxx>
      20             : #include <svtools/ctrlbox.hxx>
      21             : 
      22             : #include "rangelst.hxx"
      23             : #include "condformathelper.hxx"
      24             : 
      25             : #include <boost/ptr_container/ptr_vector.hpp>
      26             : #include <boost/scoped_ptr.hpp>
      27             : #include "anyrefdg.hxx"
      28             : 
      29             : class ScDocument;
      30             : class ScConditionalFormat;
      31             : class ScFormatEntry;
      32             : class ScConditionalFormat;
      33             : struct ScDataBarFormatData;
      34             : class ScCondFrmtEntry;
      35             : 
      36             : namespace condformat {
      37             : 
      38             : namespace dialog {
      39             : 
      40             : enum ScCondFormatDialogType
      41             : {
      42             :     NONE,
      43             :     CONDITION,
      44             :     COLORSCALE,
      45             :     DATABAR,
      46             :     ICONSET,
      47             :     DATE
      48             : };
      49             : 
      50             : }
      51             : 
      52             : }
      53             : 
      54           0 : class ScCondFormatList : public Control
      55             : {
      56             : private:
      57             :     typedef boost::ptr_vector<ScCondFrmtEntry> EntryContainer;
      58             :     EntryContainer maEntries;
      59             : 
      60             :     bool mbHasScrollBar;
      61             :     boost::scoped_ptr<ScrollBar> mpScrollBar;
      62             : 
      63             :     ScDocument* mpDoc;
      64             :     ScAddress maPos;
      65             :     ScRangeList maRanges;
      66             : 
      67             :     void DoScroll(long nDiff);
      68             : 
      69             : public:
      70             :     ScCondFormatList(Window* pParent, WinBits nStyle);
      71             : 
      72             :     void init(ScDocument* pDoc, const ScConditionalFormat* pFormat,
      73             :         const ScRangeList& rRanges, const ScAddress& rPos,
      74             :         condformat::dialog::ScCondFormatDialogType eType);
      75             : 
      76             :     virtual Size GetOptimalSize() const SAL_OVERRIDE;
      77             :     virtual void Resize() SAL_OVERRIDE;
      78             : 
      79             :     ScConditionalFormat* GetConditionalFormat() const;
      80             :     void RecalcAll();
      81             : 
      82             :     DECL_LINK( AddBtnHdl, void* );
      83             :     DECL_LINK( RemoveBtnHdl, void* );
      84             :     DECL_LINK( ScrollHdl, void* );
      85             :     DECL_LINK( EntrySelectHdl, ScCondFrmtEntry* );
      86             : 
      87             :     DECL_LINK( TypeListHdl, ListBox*);
      88             :     DECL_LINK( ColFormatTypeHdl, ListBox*);
      89             : };
      90             : 
      91             : class ScCondFormatDlg : public ScAnyRefModalDlg
      92             : {
      93             : private:
      94             :     PushButton* mpBtnAdd;
      95             :     PushButton* mpBtnRemove;
      96             :     FixedText* mpFtRange;
      97             :     formula::RefEdit* mpEdRange;
      98             :     formula::RefButton* mpRbRange;
      99             : 
     100             :     ScCondFormatList* mpCondFormList;
     101             : 
     102             :     ScAddress maPos;
     103             :     ScDocument* mpDoc;
     104             : 
     105             :     formula::RefEdit* mpLastEdit;
     106             : 
     107             :     DECL_LINK( EdRangeModifyHdl, Edit* );
     108             : protected:
     109             : 
     110             :     virtual void RefInputDone( bool bForced = false ) SAL_OVERRIDE;
     111             : 
     112             : 
     113             : public:
     114             :     SC_DLLPUBLIC ScCondFormatDlg(Window* pWindow, ScDocument* pDoc, const ScConditionalFormat* pFormat,
     115             :             const ScRangeList& rRange, const ScAddress& rPos, condformat::dialog::ScCondFormatDialogType eType);
     116             :     virtual ~ScCondFormatDlg();
     117             : 
     118             :     SC_DLLPUBLIC ScConditionalFormat* GetConditionalFormat() const;
     119             : 
     120             :     virtual void SetReference(const ScRange&, ScDocument*) SAL_OVERRIDE;
     121             :     virtual bool IsRefInputMode() const SAL_OVERRIDE;
     122             :     virtual void SetActive() SAL_OVERRIDE;
     123             :     virtual bool IsTableLocked() const SAL_OVERRIDE;
     124             : 
     125             :     void InvalidateRefData();
     126             : 
     127             :     DECL_LINK( RangeGetFocusHdl, formula::RefEdit* );
     128             :     DECL_LINK( RangeLoseFocusHdl, void* );
     129             : };
     130             : 
     131             : #endif
     132             : 
     133             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10