LCOV - code coverage report
Current view: top level - sc/source/ui/inc - filtdlg.hxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 1 0.0 %
Date: 2014-04-14 Functions: 0 1 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_FILTDLG_HXX
      21             : #define SC_FILTDLG_HXX
      22             : 
      23             : #include <vcl/combobox.hxx>
      24             : #include <vcl/lstbox.hxx>
      25             : #include <vcl/layout.hxx>
      26             : #include <vcl/morebtn.hxx>
      27             : #include <svtools/stdctrl.hxx>
      28             : #include "global.hxx"
      29             : #include "address.hxx"
      30             : #include "anyrefdg.hxx"
      31             : #include "queryparam.hxx"
      32             : #include "typedstrdata.hxx"
      33             : 
      34             : #include <deque>
      35             : #include <vector>
      36             : #include <map>
      37             : #include <boost/ptr_container/ptr_map.hpp>
      38             : #include <boost/noncopyable.hpp>
      39             : #include <boost/scoped_ptr.hpp>
      40             : 
      41             : class ScFilterOptionsMgr;
      42             : class ScViewData;
      43             : class ScDocument;
      44             : class ScQueryItem;
      45             : 
      46             : class ScFilterDlg : public ScAnyRefDlg
      47             : {
      48           0 :     struct EntryList : boost::noncopyable
      49             :     {
      50             :         std::vector<ScTypedStrData> maList;
      51             :         size_t mnHeaderPos;
      52             :         EntryList();
      53             :     };
      54             :     typedef boost::ptr_map<SCCOL,EntryList> EntryListsMap;
      55             : public:
      56             :                     ScFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
      57             :                                  const SfxItemSet&  rArgSet );
      58             :                     virtual ~ScFilterDlg();
      59             : 
      60             :     virtual void    SetReference( const ScRange& rRef, ScDocument* pDoc ) SAL_OVERRIDE;
      61             : 
      62             :     virtual bool    IsRefInputMode() const SAL_OVERRIDE;
      63             :     virtual void    SetActive() SAL_OVERRIDE;
      64             : 
      65             :     virtual bool    Close() SAL_OVERRIDE;
      66             :     void            SliderMoved();
      67             :     size_t          GetSliderPos();
      68             :     void            RefreshEditRow( size_t nOffset );
      69             : 
      70             : private:
      71             :     ListBox*         pLbConnect1;
      72             :     ListBox*         pLbField1;
      73             :     ListBox*         pLbCond1;
      74             :     ComboBox*        pEdVal1;
      75             : 
      76             :     ListBox*         pLbConnect2;
      77             :     ListBox*         pLbField2;
      78             :     ListBox*         pLbCond2;
      79             :     ComboBox*        pEdVal2;
      80             : 
      81             :     ListBox*         pLbConnect3;
      82             :     ListBox*         pLbField3;
      83             :     ListBox*         pLbCond3;
      84             :     ComboBox*        pEdVal3;
      85             : 
      86             :     ListBox*         pLbConnect4;
      87             :     ListBox*         pLbField4;
      88             :     ListBox*         pLbCond4;
      89             :     ComboBox*        pEdVal4;
      90             : 
      91             :     ScrollBar*       pScrollBar;
      92             :     VclExpander*     pExpander;
      93             : 
      94             :     HelpButton*      pBtnHelp;
      95             :     OKButton*        pBtnOk;
      96             :     CancelButton*    pBtnCancel;
      97             : 
      98             :     CheckBox*        pBtnCase;
      99             :     CheckBox*        pBtnRegExp;
     100             :     CheckBox*        pBtnHeader;
     101             :     CheckBox*        pBtnUnique;
     102             :     CheckBox*        pBtnCopyResult;
     103             :     ListBox*         pLbCopyArea;
     104             :     formula::RefEdit* pEdCopyArea;
     105             :     formula::RefButton* pRbCopyArea;
     106             :     CheckBox*        pBtnDestPers;
     107             :     FixedText*       pFtDbAreaLabel;
     108             :     FixedText*       pFtDbArea;
     109             :     const OUString aStrUndefined;
     110             :     const OUString aStrNone;
     111             : 
     112             :     const OUString aStrEmpty;
     113             :     const OUString aStrNotEmpty;
     114             :     const OUString aStrColumn;
     115             : 
     116             :     ScFilterOptionsMgr* pOptionsMgr;
     117             : 
     118             :     const sal_uInt16        nWhichQuery;
     119             :     ScQueryParam        theQueryData;
     120             :     ScQueryItem*        pOutItem;
     121             :     ScViewData*         pViewData;
     122             :     ScDocument*         pDoc;
     123             :     SCTAB               nSrcTab;
     124             : 
     125             :     std::vector<ComboBox*> maValueEdArr;
     126             :     std::vector<ListBox*>  maFieldLbArr;
     127             :     std::vector<ListBox*>  maCondLbArr;
     128             :     std::vector<ListBox*>  maConnLbArr;
     129             : 
     130             :     std::deque<bool>   maHasDates;
     131             :     std::deque<bool>   maRefreshExceptQuery;
     132             :     bool                bRefInputMode;
     133             : 
     134             :     EntryListsMap maEntryLists;
     135             : 
     136             :     // Hack: RefInput control
     137             :     Timer*  pTimer;
     138             : 
     139             : private:
     140             :     void            Init            ( const SfxItemSet& rArgSet );
     141             :     void            FillFieldLists  ();
     142             :     void            FillAreaList    ();
     143             :     void            UpdateValueList ( size_t nList );
     144             :     void            UpdateHdrInValueList( size_t nList );
     145             :     void            ClearValueList  ( size_t nList );
     146             :     size_t          GetFieldSelPos  ( SCCOL nField );
     147             :     ScQueryItem*    GetOutputItem   ();
     148             : 
     149             :     // Handler:
     150             :     DECL_LINK( LbSelectHdl,  ListBox* );
     151             :     DECL_LINK( ValModifyHdl, ComboBox* );
     152             :     DECL_LINK( CheckBoxHdl,  CheckBox* );
     153             :     DECL_LINK( EndDlgHdl,    Button* );
     154             :     DECL_LINK( ScrollHdl, void* );
     155             :     DECL_LINK( MoreExpandedHdl, void* );
     156             : 
     157             :     // Hack: RefInput control
     158             :     DECL_LINK( TimeOutHdl,   Timer* );
     159             : };
     160             : 
     161             : class ScSpecialFilterDlg : public ScAnyRefDlg
     162             : {
     163             : public:
     164             :                     ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
     165             :                                         const SfxItemSet&   rArgSet );
     166             :                     virtual ~ScSpecialFilterDlg();
     167             : 
     168             :     virtual void    SetReference( const ScRange& rRef, ScDocument* pDoc ) SAL_OVERRIDE;
     169             : 
     170             :     virtual bool    IsRefInputMode() const SAL_OVERRIDE;
     171             :     virtual void    SetActive() SAL_OVERRIDE;
     172             : 
     173             :     virtual bool    Close() SAL_OVERRIDE;
     174             : 
     175             : private:
     176             :     ListBox*         pLbFilterArea;
     177             :     formula::RefEdit*   pEdFilterArea;
     178             :     formula::RefButton* pRbFilterArea;
     179             : 
     180             :     VclExpander*     pExpander;
     181             :     CheckBox*        pBtnCase;
     182             :     CheckBox*        pBtnRegExp;
     183             :     CheckBox*        pBtnHeader;
     184             :     CheckBox*        pBtnUnique;
     185             :     CheckBox*        pBtnCopyResult;
     186             :     ListBox*         pLbCopyArea;
     187             :     formula::RefEdit* pEdCopyArea;
     188             :     formula::RefButton* pRbCopyArea;
     189             :     CheckBox*        pBtnDestPers;
     190             :     FixedText*       pFtDbAreaLabel;
     191             :     FixedText*       pFtDbArea;
     192             :     const OUString aStrUndefined;
     193             :     const OUString aStrNoName;
     194             : 
     195             :     OKButton*        pBtnOk;
     196             :     CancelButton*    pBtnCancel;
     197             :     HelpButton*      pBtnHelp;
     198             : 
     199             :     ScFilterOptionsMgr* pOptionsMgr;
     200             : 
     201             :     const sal_uInt16    nWhichQuery;
     202             :     const ScQueryParam  theQueryData;
     203             :     ScQueryItem*        pOutItem;
     204             :     ScViewData*         pViewData;
     205             :     ScDocument*         pDoc;
     206             : 
     207             :     formula::RefEdit*   pRefInputEdit;
     208             :     bool                bRefInputMode;
     209             : 
     210             :     // Hack: RefInput control
     211             :     Timer*  pTimer;
     212             : 
     213             : private:
     214             :     void            Init( const SfxItemSet& rArgSet );
     215             :     ScQueryItem*    GetOutputItem( const ScQueryParam& rParam,
     216             :                                     const ScRange& rSource );
     217             : 
     218             :     // Handler
     219             :     DECL_LINK( FilterAreaSelHdl, ListBox* );
     220             :     DECL_LINK( FilterAreaModHdl, formula::RefEdit* );
     221             :     DECL_LINK( EndDlgHdl,        Button* );
     222             :     DECL_LINK( ScrollHdl, ScrollBar* );
     223             : 
     224             :     // Hack: RefInput control
     225             :     DECL_LINK( TimeOutHdl,       Timer* );
     226             : };
     227             : 
     228             : #endif // SC_FILTDLG_HXX
     229             : 
     230             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10