LCOV - code coverage report
Current view: top level - libreoffice/sw/source/ui/inc - inputwin.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 7 0.0 %
Date: 2012-12-27 Functions: 0 6 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             : #ifndef SW_INPUTWIN_HXX
      20             : #define SW_INPUTWIN_HXX
      21             : 
      22             : #include <vcl/edit.hxx>
      23             : #include <vcl/menu.hxx>
      24             : #include <vcl/toolbox.hxx>
      25             : 
      26             : #include <sfx2/childwin.hxx>
      27             : 
      28             : class SwFldMgr;
      29             : class SwWrtShell;
      30             : class SwView;
      31             : class SfxDispatcher;
      32             : 
      33             : //========================================================================
      34           0 : class InputEdit : public Edit
      35             : {
      36             : public:
      37           0 :                     InputEdit(Window* pParent, WinBits nStyle) :
      38           0 :                         Edit(pParent , nStyle){}
      39             : 
      40             :     void            UpdateRange(const String& aSel,
      41             :                                 const String& aTblName );
      42             : 
      43             : protected:
      44             :     virtual void    KeyInput( const KeyEvent&  );
      45             : };
      46             : 
      47             : //========================================================================
      48             : 
      49             : class SwInputWindow : public ToolBox
      50             : {
      51             : friend class InputEdit;
      52             : 
      53             :     Edit            aPos;
      54             :     InputEdit       aEdit;
      55             :     PopupMenu       aPopMenu;
      56             :     SwFldMgr*       pMgr;
      57             :     SwWrtShell*     pWrtShell;
      58             :     SwView*         pView;
      59             :     SfxBindings*    pBindings;
      60             :     String          aAktTableName, sOldFml;
      61             : 
      62             :     sal_Bool        bFirst : 1;  // initialisations at first call
      63             :     sal_Bool        bActive : 1; // for hide/show when switching documents
      64             :     sal_Bool        bIsTable : 1;
      65             :     sal_Bool        bDelSel : 1;
      66             :     bool            m_bDoesUndo : 1;
      67             :     bool            m_bResetUndo : 1;
      68             :     bool            m_bCallUndo : 1;
      69             : 
      70             :     void CleanupUglyHackWithUndo();
      71             : 
      72             :     void DelBoxCntnt();
      73             :     DECL_LINK( ModifyHdl, void* );
      74             : 
      75             :     using Window::IsActive;
      76             : 
      77             : protected:
      78             :     virtual void    Resize();
      79             :     virtual void    Click();
      80             :     DECL_LINK( MenuHdl, Menu * );
      81             :     DECL_LINK( DropdownClickHdl, void* );
      82             :     void            ApplyFormula();
      83             :     void            CancelFormula();
      84             : 
      85             : public:
      86             :                     SwInputWindow( Window* pParent, SfxBindings* pBindings );
      87             :     virtual         ~SwInputWindow();
      88             : 
      89             :     virtual void    DataChanged( const DataChangedEvent& rDCEvt );
      90             : 
      91             :     void            SelectHdl( ToolBox*);
      92             : 
      93             :     void            ShowWin();
      94             : 
      95             :     sal_Bool            IsActive(){ return bActive; };
      96             : 
      97             :     DECL_LINK( SelTblCellsNotify, SwWrtShell * );
      98             : 
      99             :     void            SetFormula( const String& rFormula, sal_Bool bDelSel = sal_True );
     100           0 :     const SwView*   GetView() const{return pView;}
     101             : };
     102             : 
     103             : class SwInputChild : public SfxChildWindow
     104             : {
     105             :     SfxDispatcher*  pDispatch;
     106             : public:
     107             :     SwInputChild( Window* ,
     108             :                         sal_uInt16 nId,
     109             :                         SfxBindings*,
     110             :                         SfxChildWinInfo*  );
     111             :     ~SwInputChild();
     112             :     SFX_DECL_CHILDWINDOW_WITHID( SwInputChild );
     113           0 :     void            SetFormula( const String& rFormula, sal_Bool bDelSel = sal_True )
     114             :                         { ((SwInputWindow*)pWindow)->SetFormula(
     115           0 :                                     rFormula, bDelSel ); }
     116           0 :     const SwView*   GetView() const{return ((SwInputWindow*)pWindow)->GetView();}
     117             : 
     118             : };
     119             : 
     120             : //==================================================================
     121             : 
     122             : #endif
     123             : 
     124             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10