LCOV - code coverage report
Current view: top level - sc/source/ui/inc - filtdlg.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 0 1 0.0 %
Date: 2015-06-13 12:38:46 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             :     virtual void    dispose() SAL_OVERRIDE;
      60             : 
      61             :     virtual void    SetReference( const ScRange& rRef, ScDocument* pDoc ) SAL_OVERRIDE;
      62             : 
      63             :     virtual bool    IsRefInputMode() const SAL_OVERRIDE;
      64             :     virtual void    SetActive() SAL_OVERRIDE;
      65             : 
      66             :     virtual bool    Close() SAL_OVERRIDE;
      67             :     void            SliderMoved();
      68             :     size_t          GetSliderPos();
      69             :     void            RefreshEditRow( size_t nOffset );
      70             : 
      71             : private:
      72             :     VclPtr<ListBox>         pLbConnect1;
      73             :     VclPtr<ListBox>         pLbField1;
      74             :     VclPtr<ListBox>         pLbCond1;
      75             :     VclPtr<ComboBox>        pEdVal1;
      76             : 
      77             :     VclPtr<ListBox>         pLbConnect2;
      78             :     VclPtr<ListBox>         pLbField2;
      79             :     VclPtr<ListBox>         pLbCond2;
      80             :     VclPtr<ComboBox>        pEdVal2;
      81             : 
      82             :     VclPtr<ListBox>         pLbConnect3;
      83             :     VclPtr<ListBox>         pLbField3;
      84             :     VclPtr<ListBox>         pLbCond3;
      85             :     VclPtr<ComboBox>        pEdVal3;
      86             : 
      87             :     VclPtr<ListBox>         pLbConnect4;
      88             :     VclPtr<ListBox>         pLbField4;
      89             :     VclPtr<ListBox>         pLbCond4;
      90             :     VclPtr<ComboBox>        pEdVal4;
      91             : 
      92             :     VclPtr<ScrollBar>       pScrollBar;
      93             :     VclPtr<VclExpander>     pExpander;
      94             : 
      95             :     VclPtr<OKButton>        pBtnOk;
      96             :     VclPtr<CancelButton>    pBtnCancel;
      97             : 
      98             :     VclPtr<CheckBox>        pBtnCase;
      99             :     VclPtr<CheckBox>        pBtnRegExp;
     100             :     VclPtr<CheckBox>        pBtnHeader;
     101             :     VclPtr<CheckBox>        pBtnUnique;
     102             :     VclPtr<CheckBox>        pBtnCopyResult;
     103             :     VclPtr<ListBox>         pLbCopyArea;
     104             :     VclPtr<formula::RefEdit> pEdCopyArea;
     105             :     VclPtr<formula::RefButton> pRbCopyArea;
     106             :     VclPtr<CheckBox>        pBtnDestPers;
     107             :     VclPtr<FixedText>       pFtDbAreaLabel;
     108             :     VclPtr<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<VclPtr<ComboBox>> maValueEdArr;
     126             :     std::vector<VclPtr<ListBox>>  maFieldLbArr;
     127             :     std::vector<VclPtr<ListBox>>  maCondLbArr;
     128             :     std::vector<VclPtr<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_TYPED( TimeOutHdl, Timer*, void );
     159             : };
     160             : 
     161             : class ScSpecialFilterDlg : public ScAnyRefDlg
     162             : {
     163             : public:
     164             :                     ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pParent,
     165             :                                         const SfxItemSet&   rArgSet );
     166             :                     virtual ~ScSpecialFilterDlg();
     167             :     virtual void    dispose() SAL_OVERRIDE;
     168             : 
     169             :     virtual void    SetReference( const ScRange& rRef, ScDocument* pDoc ) SAL_OVERRIDE;
     170             : 
     171             :     virtual bool    IsRefInputMode() const SAL_OVERRIDE;
     172             :     virtual void    SetActive() SAL_OVERRIDE;
     173             : 
     174             :     virtual bool    Close() SAL_OVERRIDE;
     175             : 
     176             : private:
     177             :     VclPtr<ListBox>         pLbFilterArea;
     178             :     VclPtr<formula::RefEdit>   pEdFilterArea;
     179             :     VclPtr<formula::RefButton> pRbFilterArea;
     180             : 
     181             :     VclPtr<VclExpander>     pExpander;
     182             :     VclPtr<CheckBox>        pBtnCase;
     183             :     VclPtr<CheckBox>        pBtnRegExp;
     184             :     VclPtr<CheckBox>        pBtnHeader;
     185             :     VclPtr<CheckBox>        pBtnUnique;
     186             :     VclPtr<CheckBox>        pBtnCopyResult;
     187             :     VclPtr<ListBox>         pLbCopyArea;
     188             :     VclPtr<formula::RefEdit> pEdCopyArea;
     189             :     VclPtr<formula::RefButton> pRbCopyArea;
     190             :     VclPtr<CheckBox>        pBtnDestPers;
     191             :     VclPtr<FixedText>       pFtDbAreaLabel;
     192             :     VclPtr<FixedText>       pFtDbArea;
     193             :     const OUString aStrUndefined;
     194             :     const OUString aStrNoName;
     195             : 
     196             :     VclPtr<OKButton>        pBtnOk;
     197             :     VclPtr<CancelButton>    pBtnCancel;
     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             :     VclPtr<formula::RefEdit>   pRefInputEdit;
     208             :     bool                bRefInputMode;
     209             : 
     210             :     // Hack: RefInput control
     211             :     Idle*  pIdle;
     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_TYPED( TimeOutHdl, Idle*, void );
     226             : };
     227             : 
     228             : #endif // INCLUDED_SC_SOURCE_UI_INC_FILTDLG_HXX
     229             : 
     230             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11