LCOV - code coverage report
Current view: top level - libreoffice/dbaccess/source/ui/inc - paramdialog.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 _DBAUI_PARAMDIALOG_HXX_
      21             : #define _DBAUI_PARAMDIALOG_HXX_
      22             : 
      23             : #include "commontypes.hxx"
      24             : 
      25             : #include <vcl/dialog.hxx>
      26             : #include <vcl/button.hxx>
      27             : #include <vcl/fixed.hxx>
      28             : #include <vcl/edit.hxx>
      29             : #include <vcl/group.hxx>
      30             : #include <vcl/lstbox.hxx>
      31             : 
      32             : #include <com/sun/star/util/XNumberFormatter.hpp>
      33             : #include <com/sun/star/container/XIndexAccess.hpp>
      34             : #include <com/sun/star/sdbc/XConnection.hpp>
      35             : #include <com/sun/star/lang/XMultiServiceFactory.hpp>
      36             : #include <com/sun/star/beans/PropertyValue.hpp>
      37             : #include <connectivity/predicateinput.hxx>
      38             : #include "svx/ParseContext.hxx"
      39             : 
      40             : namespace connectivity
      41             : {
      42             :     class OSQLParseNode;
      43             : }
      44             : 
      45             : //.........................................................................
      46             : namespace dbaui
      47             : {
      48             : //.........................................................................
      49             : 
      50             :     //==================================================================
      51             :     //= OParameterDialog
      52             :     //==================================================================
      53             :     class OParameterDialog
      54             :             :public ModalDialog
      55             :             ,public ::svxform::OParseContextClient
      56             :     {
      57             :     protected:
      58             :         // the controls
      59             :         FixedLine       m_aNamesFrame;
      60             :         ListBox         m_aAllParams;
      61             :         FixedText       m_aValueFrame;
      62             :         Edit            m_aParam;
      63             :         PushButton      m_aTravelNext;
      64             :         OKButton        m_aOKBtn;
      65             :         CancelButton    m_aCancelBtn;
      66             : 
      67             :         sal_uInt16          m_nCurrentlySelected;
      68             : 
      69             :         ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >
      70             :                         m_xParams;
      71             :         ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >
      72             :                         m_xConnection;
      73             :         ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >
      74             :                         m_xFormatter;
      75             :         ::dbtools::OPredicateInputController
      76             :                         m_aPredicateInput;
      77             : 
      78             :         ByteVector      m_aVisitedParams;
      79             :         Timer       m_aResetVisitFlag;
      80             :             // we reset the "visited flag" 1 second after and entry has been selected
      81             : 
      82             :         sal_Bool    m_bNeedErrorOnCurrent;
      83             : 
      84             :         ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >
      85             :                     m_aFinalValues;     /// the final values as entered by the user
      86             : 
      87             :     public:
      88             :         OParameterDialog(Window* _pParent,
      89             :             const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > & _rParamContainer,
      90             :             const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > & _rxConnection,
      91             :             const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext);
      92             :         ~OParameterDialog();
      93             : 
      94             :         ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >
      95           0 :                     getValues() const { return m_aFinalValues; }
      96             : 
      97             : 
      98             :     protected:
      99             :         void Construct();
     100             : 
     101             :         ::connectivity::OSQLParseNode* implPredicateTree(OUString& _rErrorMessage, const OUString& _rStatement, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & _rxField);
     102             : 
     103             :     private:
     104             :         DECL_LINK(OnVisitedTimeout, Timer*);
     105             :         DECL_LINK(OnValueModified, Control*);
     106             :         DECL_LINK(OnEntrySelected, ListBox*);
     107             :         DECL_LINK(OnButtonClicked, PushButton*);
     108             :         DECL_LINK(OnValueLoseFocus, Control*);
     109             :     };
     110             : 
     111             : //.........................................................................
     112             : }   // namespace dbaui
     113             : //.........................................................................
     114             : 
     115             : #endif // _DBAUI_PARAMDIALOG_HXX_
     116             : 
     117             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10