LCOV - code coverage report
Current view: top level - libreoffice/sc/source/ui/inc - filtdlg.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 1 0.0 %
Date: 2012-12-27 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/morebtn.hxx>
      24             : #include <vcl/combobox.hxx>
      25             : #include <vcl/lstbox.hxx>
      26             : #include <svtools/stdctrl.hxx>
      27             : #include "global.hxx" // -> ScQueryParam
      28             : #include "address.hxx"
      29             : #include "anyrefdg.hxx"
      30             : #include "queryparam.hxx"
      31             : #include "typedstrdata.hxx"
      32             : 
      33             : #include <deque>
      34             : #include <vector>
      35             : #include <map>
      36             : #include <boost/ptr_container/ptr_map.hpp>
      37             : #include <boost/noncopyable.hpp>
      38             : #include <boost/scoped_ptr.hpp>
      39             : 
      40             : //----------------------------------------------------------------------------
      41             : 
      42             : class ScFilterOptionsMgr;
      43             : class ScViewData;
      44             : class ScDocument;
      45             : class ScQueryItem;
      46             : 
      47             : class ScFilterDlg : public ScAnyRefDlg
      48             : {
      49           0 :     struct EntryList : boost::noncopyable
      50             :     {
      51             :         std::vector<ScTypedStrData> maList;
      52             :         size_t mnHeaderPos;
      53             :         EntryList();
      54             :     };
      55             :     typedef boost::ptr_map<SCCOL,EntryList> EntryListsMap;
      56             : public:
      57             :                     ScFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
      58             :                                  const SfxItemSet&  rArgSet );
      59             :                     ~ScFilterDlg();
      60             : 
      61             :     virtual void    SetReference( const ScRange& rRef, ScDocument* pDoc );
      62             : 
      63             :     virtual sal_Bool    IsRefInputMode() const;
      64             :     virtual void    SetActive();
      65             : 
      66             :     virtual sal_Bool    Close();
      67             :     void            SliderMoved();
      68             :     size_t          GetSliderPos();
      69             :     void            RefreshEditRow( size_t nOffset );
      70             : 
      71             : private:
      72             :     FixedLine       aFlCriteria;
      73             :     //----------------------------
      74             :     ListBox         aLbConnect1;
      75             :     ListBox         aLbField1;
      76             :     ListBox         aLbCond1;
      77             :     ComboBox        aEdVal1;
      78             :     //----------------------------
      79             :     ListBox         aLbConnect2;
      80             :     ListBox         aLbField2;
      81             :     ListBox         aLbCond2;
      82             :     ComboBox        aEdVal2;
      83             :     //----------------------------
      84             :     ListBox         aLbConnect3;
      85             :     ListBox         aLbField3;
      86             :     ListBox         aLbCond3;
      87             :     ComboBox        aEdVal3;
      88             :     //----------------------------
      89             :     ListBox         aLbConnect4;
      90             :     ListBox         aLbField4;
      91             :     ListBox         aLbCond4;
      92             :     ComboBox        aEdVal4;
      93             :     //----------------------------
      94             :     FixedText       aFtConnect;
      95             :     FixedText       aFtField;
      96             :     FixedText       aFtCond;
      97             :     FixedText       aFtVal;
      98             :     FixedLine       aFlSeparator;
      99             : 
     100             :     ScrollBar       aScrollBar;
     101             : 
     102             :     FixedLine       aFlOptions;
     103             :     MoreButton      aBtnMore;
     104             :     HelpButton      aBtnHelp;
     105             :     OKButton        aBtnOk;
     106             :     CancelButton    aBtnCancel;
     107             : 
     108             :     CheckBox        aBtnCase;
     109             :     CheckBox        aBtnRegExp;
     110             :     CheckBox        aBtnHeader;
     111             :     CheckBox        aBtnUnique;
     112             :     CheckBox        aBtnCopyResult;
     113             :     ListBox         aLbCopyArea;
     114             :     formula::RefEdit aEdCopyArea;
     115             :     formula::RefButton aRbCopyArea;
     116             :     CheckBox        aBtnDestPers;
     117             :     FixedText       aFtDbAreaLabel;
     118             :     FixedInfo       aFtDbArea;
     119             :     const rtl::OUString aStrUndefined;
     120             :     const rtl::OUString aStrNone;
     121             : 
     122             :     const rtl::OUString aStrEmpty;
     123             :     const rtl::OUString aStrNotEmpty;
     124             :     const rtl::OUString aStrRow;
     125             :     const rtl::OUString aStrColumn;
     126             : 
     127             :     ScFilterOptionsMgr* pOptionsMgr;
     128             : 
     129             :     const sal_uInt16        nWhichQuery;
     130             :     ScQueryParam        theQueryData;
     131             :     ScQueryItem*        pOutItem;
     132             :     ScViewData*         pViewData;
     133             :     ScDocument*         pDoc;
     134             :     SCTAB               nSrcTab;
     135             : 
     136             :     std::vector<ComboBox*> maValueEdArr;
     137             :     std::vector<ListBox*>  maFieldLbArr;
     138             :     std::vector<ListBox*>  maCondLbArr;
     139             :     std::vector<ListBox*>  maConnLbArr;
     140             : 
     141             :     std::deque<bool>   maHasDates;
     142             :     std::deque<bool>   maRefreshExceptQuery;
     143             :     bool                bRefInputMode;
     144             : 
     145             :     EntryListsMap maEntryLists;
     146             : 
     147             :     // Hack: RefInput control
     148             :     Timer*  pTimer;
     149             : 
     150             : #ifdef _FILTDLG_CXX
     151             : private:
     152             :     void            Init            ( const SfxItemSet& rArgSet );
     153             :     void            FillFieldLists  ();
     154             :     void            FillAreaList    ();
     155             :     void            UpdateValueList ( size_t nList );
     156             :     void            UpdateHdrInValueList( size_t nList );
     157             :     void            ClearValueList  ( size_t nList );
     158             :     size_t          GetFieldSelPos  ( SCCOL nField );
     159             :     ScQueryItem*    GetOutputItem   ();
     160             : 
     161             :     // Handler:
     162             :     DECL_LINK( LbSelectHdl,  ListBox* );
     163             :     DECL_LINK( ValModifyHdl, ComboBox* );
     164             :     DECL_LINK( CheckBoxHdl,  CheckBox* );
     165             :     DECL_LINK( EndDlgHdl,    Button* );
     166             :     DECL_LINK( MoreClickHdl, void* );
     167             :     DECL_LINK( ScrollHdl, void* );
     168             : 
     169             :     // Hack: RefInput control
     170             :     DECL_LINK( TimeOutHdl,   Timer* );
     171             : #endif
     172             : };
     173             : 
     174             : class ScSpecialFilterDlg : public ScAnyRefDlg
     175             : {
     176             : public:
     177             :                     ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
     178             :                                         const SfxItemSet&   rArgSet );
     179             :                     ~ScSpecialFilterDlg();
     180             : 
     181             :     virtual void    SetReference( const ScRange& rRef, ScDocument* pDoc );
     182             : 
     183             :     virtual sal_Bool    IsRefInputMode() const;
     184             :     virtual void    SetActive();
     185             : 
     186             :     virtual sal_Bool    Close();
     187             : 
     188             : private:
     189             :     FixedText   aFtFilterArea;
     190             :     ListBox     aLbFilterArea;
     191             :     formula::RefEdit aEdFilterArea;
     192             :     formula::RefButton aRbFilterArea;
     193             : 
     194             :     FixedLine       aFlOptions;
     195             : 
     196             :     CheckBox        aBtnCase;
     197             :     CheckBox        aBtnRegExp;
     198             :     CheckBox        aBtnHeader;
     199             :     CheckBox        aBtnUnique;
     200             :     CheckBox        aBtnCopyResult;
     201             :     ListBox         aLbCopyArea;
     202             :     formula::RefEdit aEdCopyArea;
     203             :     formula::RefButton aRbCopyArea;
     204             :     CheckBox        aBtnDestPers;
     205             :     FixedText       aFtDbAreaLabel;
     206             :     FixedInfo       aFtDbArea;
     207             :     const rtl::OUString aStrUndefined;
     208             :     const rtl::OUString aStrNoName;
     209             : 
     210             :     OKButton        aBtnOk;
     211             :     CancelButton    aBtnCancel;
     212             :     HelpButton      aBtnHelp;
     213             :     MoreButton      aBtnMore;
     214             : 
     215             :     ScFilterOptionsMgr* pOptionsMgr;
     216             : 
     217             :     const sal_uInt16    nWhichQuery;
     218             :     const ScQueryParam  theQueryData;
     219             :     ScQueryItem*        pOutItem;
     220             :     ScViewData*         pViewData;
     221             :     ScDocument*         pDoc;
     222             : 
     223             :     formula::RefEdit*   pRefInputEdit;
     224             :     bool                bRefInputMode;
     225             : 
     226             :     // Hack: RefInput control
     227             :     Timer*  pTimer;
     228             : 
     229             : #ifdef _SFILTDLG_CXX
     230             : private:
     231             :     void            Init( const SfxItemSet& rArgSet );
     232             :     ScQueryItem*    GetOutputItem( const ScQueryParam& rParam,
     233             :                                     const ScRange& rSource );
     234             : 
     235             :     // Handler
     236             :     DECL_LINK( FilterAreaSelHdl, ListBox* );
     237             :     DECL_LINK( FilterAreaModHdl, formula::RefEdit* );
     238             :     DECL_LINK( EndDlgHdl,        Button* );
     239             :     DECL_LINK( ScrollHdl, ScrollBar* );
     240             : 
     241             :     // Hack: RefInput control
     242             :     DECL_LINK( TimeOutHdl,       Timer* );
     243             : #endif
     244             : };
     245             : 
     246             : 
     247             : 
     248             : #endif // SC_FILTDLG_HXX
     249             : 
     250             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10