LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/sc/source/ui/inc - dpgroupdlg.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 5 0.0 %
Date: 2013-07-09 Functions: 0 9 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             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #ifndef SC_DPGROUPDLG_HXX
      21             : #define SC_DPGROUPDLG_HXX
      22             : 
      23             : #include <vcl/fixed.hxx>
      24             : #include <vcl/dialog.hxx>
      25             : #include <vcl/button.hxx>
      26             : #include <vcl/field.hxx>
      27             : #include <svx/checklbx.hxx>
      28             : #include "editfield.hxx"
      29             : #include "dpgroup.hxx"
      30             : 
      31             : // ============================================================================
      32             : 
      33             : class ScDPGroupEditHelper
      34             : {
      35             : public:
      36             :     explicit            ScDPGroupEditHelper(
      37             :                             RadioButton& rRbAuto, RadioButton& rRbMan,
      38             :                             Edit& rEdValue );
      39             : 
      40             :     bool                IsAuto() const;
      41             :     double              GetValue() const;
      42             :     void                SetValue( bool bAuto, double fValue );
      43             : 
      44             : protected:
      45           0 :     ~ScDPGroupEditHelper() {}
      46             : 
      47             : private:
      48             :     virtual bool        ImplGetValue( double& rfValue ) const = 0;
      49             :     virtual void        ImplSetValue( double fValue ) = 0;
      50             : 
      51             :     DECL_LINK( ClickHdl, RadioButton* );
      52             : 
      53             : private:
      54             :     RadioButton&        mrRbAuto;
      55             :     RadioButton&        mrRbMan;
      56             :     Edit&               mrEdValue;
      57             : };
      58             : 
      59             : // ----------------------------------------------------------------------------
      60             : 
      61             : class ScDPNumGroupEditHelper : public ScDPGroupEditHelper
      62             : {
      63             : public:
      64             :     explicit            ScDPNumGroupEditHelper(
      65             :                             RadioButton& rRbAuto, RadioButton& rRbMan,
      66             :                             ScDoubleField& rEdValue );
      67             : 
      68           0 :     virtual ~ScDPNumGroupEditHelper() {}
      69             : 
      70             : private:
      71             :     virtual bool        ImplGetValue( double& rfValue ) const;
      72             :     virtual void        ImplSetValue( double fValue );
      73             : 
      74             : private:
      75             :     ScDoubleField&      mrEdValue;
      76             : };
      77             : 
      78             : // ----------------------------------------------------------------------------
      79             : 
      80             : class ScDPDateGroupEditHelper : public ScDPGroupEditHelper
      81             : {
      82             : public:
      83             :     explicit            ScDPDateGroupEditHelper(
      84             :                             RadioButton& rRbAuto, RadioButton& rRbMan,
      85             :                             DateField& rEdValue, const Date& rNullDate );
      86             : 
      87           0 :     virtual ~ScDPDateGroupEditHelper() {}
      88             : 
      89             : private:
      90             :     virtual bool        ImplGetValue( double& rfValue ) const;
      91             :     virtual void        ImplSetValue( double fValue );
      92             : 
      93             : private:
      94             :     DateField&          mrEdValue;
      95             :     Date                maNullDate;
      96             : };
      97             : 
      98             : // ============================================================================
      99             : // ============================================================================
     100             : 
     101           0 : class ScDPNumGroupDlg : public ModalDialog
     102             : {
     103             : public:
     104             :     explicit            ScDPNumGroupDlg( Window* pParent, const ScDPNumGroupInfo& rInfo );
     105             : 
     106             :     ScDPNumGroupInfo    GetGroupInfo() const;
     107             : 
     108             : private:
     109             :     FixedLine           maFlStart;
     110             :     RadioButton         maRbAutoStart;
     111             :     RadioButton         maRbManStart;
     112             :     ScDoubleField       maEdStart;
     113             :     FixedLine           maFlEnd;
     114             :     RadioButton         maRbAutoEnd;
     115             :     RadioButton         maRbManEnd;
     116             :     ScDoubleField       maEdEnd;
     117             :     FixedLine           maFlBy;
     118             :     ScDoubleField       maEdBy;
     119             :     OKButton            maBtnOk;
     120             :     CancelButton        maBtnCancel;
     121             :     HelpButton          maBtnHelp;
     122             :     ScDPNumGroupEditHelper maStartHelper;
     123             :     ScDPNumGroupEditHelper maEndHelper;
     124             : };
     125             : 
     126             : // ============================================================================
     127             : 
     128           0 : class ScDPDateGroupDlg : public ModalDialog
     129             : {
     130             : public:
     131             :     explicit            ScDPDateGroupDlg( Window* pParent, const ScDPNumGroupInfo& rInfo,
     132             :                             sal_Int32 nDatePart, const Date& rNullDate );
     133             : 
     134             :     ScDPNumGroupInfo    GetGroupInfo() const;
     135             :     sal_Int32           GetDatePart() const;
     136             : 
     137             : private:
     138             :     DECL_LINK( ClickHdl, RadioButton* );
     139             :     DECL_LINK( CheckHdl, SvxCheckListBox* );
     140             : 
     141             : private:
     142             :     FixedLine           maFlStart;
     143             :     RadioButton         maRbAutoStart;
     144             :     RadioButton         maRbManStart;
     145             :     DateField           maEdStart;
     146             :     FixedLine           maFlEnd;
     147             :     RadioButton         maRbAutoEnd;
     148             :     RadioButton         maRbManEnd;
     149             :     DateField           maEdEnd;
     150             :     FixedLine           maFlBy;
     151             :     RadioButton         maRbNumDays;
     152             :     RadioButton         maRbUnits;
     153             :     NumericField        maEdNumDays;
     154             :     SvxCheckListBox     maLbUnits;
     155             :     OKButton            maBtnOk;
     156             :     CancelButton        maBtnCancel;
     157             :     HelpButton          maBtnHelp;
     158             :     ScDPDateGroupEditHelper maStartHelper;
     159             :     ScDPDateGroupEditHelper maEndHelper;
     160             : };
     161             : 
     162             : // ============================================================================
     163             : 
     164             : #endif
     165             : 
     166             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10