LCOV - code coverage report
Current view: top level - sc/source/ui/inc - filtdlg.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 0 1 0.0 %
Date: 2014-11-03 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 INCLUDED_SC_SOURCE_UI_INC_FILTDLG_HXX
      21             : #define INCLUDED_SC_SOURCE_UI_INC_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, vcl::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             :     OKButton*        pBtnOk;
      95             :     CancelButton*    pBtnCancel;
      96             : 
      97             :     CheckBox*        pBtnCase;
      98             :     CheckBox*        pBtnRegExp;
      99             :     CheckBox*        pBtnHeader;
     100             :     CheckBox*        pBtnUnique;
     101             :     CheckBox*        pBtnCopyResult;
     102             :     ListBox*         pLbCopyArea;
     103             :     formula::RefEdit* pEdCopyArea;
     104             :     formula::RefButton* pRbCopyArea;
     105             :     CheckBox*        pBtnDestPers;
     106             :     FixedText*       pFtDbAreaLabel;
     107             :     FixedText*       pFtDbArea;
     108             :     const OUString aStrUndefined;
     109             :     const OUString aStrNone;
     110             : 
     111             :     const OUString aStrEmpty;
     112             :     const OUString aStrNotEmpty;
     113             :     const OUString aStrColumn;
     114             : 
     115             :     ScFilterOptionsMgr* pOptionsMgr;
     116             : 
     117             :     const sal_uInt16        nWhichQuery;
     118             :     ScQueryParam        theQueryData;
     119             :     ScQueryItem*        pOutItem;
     120             :     ScViewData*         pViewData;
     121             :     ScDocument*         pDoc;
     122             :     SCTAB               nSrcTab;
     123             : 
     124             :     std::vector<ComboBox*> maValueEdArr;
     125             :     std::vector<ListBox*>  maFieldLbArr;
     126             :     std::vector<ListBox*>  maCondLbArr;
     127             :     std::vector<ListBox*>  maConnLbArr;
     128             : 
     129             :     std::deque<bool>   maHasDates;
     130             :     std::deque<bool>   maRefreshExceptQuery;
     131             :     bool                bRefInputMode;
     132             : 
     133             :     EntryListsMap maEntryLists;
     134             : 
     135             :     // Hack: RefInput control
     136             :     Timer*  pTimer;
     137             : 
     138             : private:
     139             :     void            Init            ( const SfxItemSet& rArgSet );
     140             :     void            FillFieldLists  ();
     141             :     void            FillAreaList    ();
     142             :     void            UpdateValueList ( size_t nList );
     143             :     void            UpdateHdrInValueList( size_t nList );
     144             :     void            ClearValueList  ( size_t nList );
     145             :     size_t          GetFieldSelPos  ( SCCOL nField );
     146             :     ScQueryItem*    GetOutputItem   ();
     147             : 
     148             :     // Handler:
     149             :     DECL_LINK( LbSelectHdl,  ListBox* );
     150             :     DECL_LINK( ValModifyHdl, ComboBox* );
     151             :     DECL_LINK( CheckBoxHdl,  CheckBox* );
     152             :     DECL_LINK( EndDlgHdl,    Button* );
     153             :     DECL_LINK( ScrollHdl, void* );
     154             :     DECL_LINK( MoreExpandedHdl, void* );
     155             : 
     156             :     // Hack: RefInput control
     157             :     DECL_LINK( TimeOutHdl,   Timer* );
     158             : };
     159             : 
     160             : class ScSpecialFilterDlg : public ScAnyRefDlg
     161             : {
     162             : public:
     163             :                     ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pParent,
     164             :                                         const SfxItemSet&   rArgSet );
     165             :                     virtual ~ScSpecialFilterDlg();
     166             : 
     167             :     virtual void    SetReference( const ScRange& rRef, ScDocument* pDoc ) SAL_OVERRIDE;
     168             : 
     169             :     virtual bool    IsRefInputMode() const SAL_OVERRIDE;
     170             :     virtual void    SetActive() SAL_OVERRIDE;
     171             : 
     172             :     virtual bool    Close() SAL_OVERRIDE;
     173             : 
     174             : private:
     175             :     ListBox*         pLbFilterArea;
     176             :     formula::RefEdit*   pEdFilterArea;
     177             :     formula::RefButton* pRbFilterArea;
     178             : 
     179             :     VclExpander*     pExpander;
     180             :     CheckBox*        pBtnCase;
     181             :     CheckBox*        pBtnRegExp;
     182             :     CheckBox*        pBtnHeader;
     183             :     CheckBox*        pBtnUnique;
     184             :     CheckBox*        pBtnCopyResult;
     185             :     ListBox*         pLbCopyArea;
     186             :     formula::RefEdit* pEdCopyArea;
     187             :     formula::RefButton* pRbCopyArea;
     188             :     CheckBox*        pBtnDestPers;
     189             :     FixedText*       pFtDbAreaLabel;
     190             :     FixedText*       pFtDbArea;
     191             :     const OUString aStrUndefined;
     192             :     const OUString aStrNoName;
     193             : 
     194             :     OKButton*        pBtnOk;
     195             :     CancelButton*    pBtnCancel;
     196             : 
     197             :     ScFilterOptionsMgr* pOptionsMgr;
     198             : 
     199             :     const sal_uInt16    nWhichQuery;
     200             :     const ScQueryParam  theQueryData;
     201             :     ScQueryItem*        pOutItem;
     202             :     ScViewData*         pViewData;
     203             :     ScDocument*         pDoc;
     204             : 
     205             :     formula::RefEdit*   pRefInputEdit;
     206             :     bool                bRefInputMode;
     207             : 
     208             :     // Hack: RefInput control
     209             :     Timer*  pTimer;
     210             : 
     211             : private:
     212             :     void            Init( const SfxItemSet& rArgSet );
     213             :     ScQueryItem*    GetOutputItem( const ScQueryParam& rParam,
     214             :                                     const ScRange& rSource );
     215             : 
     216             :     // Handler
     217             :     DECL_LINK( FilterAreaSelHdl, ListBox* );
     218             :     DECL_LINK( FilterAreaModHdl, formula::RefEdit* );
     219             :     DECL_LINK( EndDlgHdl,        Button* );
     220             :     DECL_LINK( ScrollHdl, ScrollBar* );
     221             : 
     222             :     // Hack: RefInput control
     223             :     DECL_LINK( TimeOutHdl,       Timer* );
     224             : };
     225             : 
     226             : #endif // INCLUDED_SC_SOURCE_UI_INC_FILTDLG_HXX
     227             : 
     228             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10