LCOV - code coverage report
Current view: top level - sc/source/ui/inc - tphfedit.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 0 6 0.0 %
Date: 2014-11-03 Functions: 0 7 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_TPHFEDIT_HXX
      21             : #define INCLUDED_SC_SOURCE_UI_INC_TPHFEDIT_HXX
      22             : 
      23             : #include <sfx2/tabdlg.hxx>
      24             : #include <svx/pageitem.hxx>
      25             : #include <svtools/stdctrl.hxx>
      26             : #include <vcl/group.hxx>
      27             : #include <vcl/lstbox.hxx>
      28             : #include <vcl/timer.hxx>
      29             : #include <vcl/virdev.hxx>
      30             : #include "scdllapi.h"
      31             : #include "scitems.hxx"
      32             : #include "popmenu.hxx"
      33             : #include <com/sun/star/accessibility/XAccessible.hpp>
      34             : #include <cppuhelper/weakref.hxx>
      35             : 
      36             : class ScHeaderEditEngine;
      37             : class ScPatternAttr;
      38             : class EditView;
      39             : class EditTextObject;
      40             : class SvxFieldItem;
      41             : class ScAccessibleEditObject;
      42             : class ScEditWindow;
      43             : 
      44             : SC_DLLPUBLIC ScEditWindow* GetScEditWindow ();
      45             : 
      46             : enum ScEditWindowLocation
      47             : {
      48             :     Left,
      49             :     Center,
      50             :     Right
      51             : };
      52             : 
      53             : class SC_DLLPUBLIC ScEditWindow : public Control
      54             : {
      55             : public:
      56             :             ScEditWindow( vcl::Window* pParent,  WinBits nBits , ScEditWindowLocation eLoc );
      57             :             virtual ~ScEditWindow();
      58             : 
      59             :     using Control::SetFont;
      60             :     void            SetFont( const ScPatternAttr& rPattern );
      61             :     using Control::SetText;
      62             :     void            SetText( const EditTextObject& rTextObject );
      63             :     EditTextObject* CreateTextObject();
      64             :     void            SetCharAttriutes();
      65             : 
      66             :     void            InsertField( const SvxFieldItem& rFld );
      67             : 
      68             :     void            SetNumType(SvxNumType eNumType);
      69             : 
      70             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible() SAL_OVERRIDE;
      71             : 
      72           0 :     ScHeaderEditEngine*  GetEditEngine() const { return pEdEngine; }
      73           0 :     void SetObjectSelectHdl( const Link& aLink) { aObjectSelectLink = aLink; }
      74             : 
      75           0 :     void SetLocation(ScEditWindowLocation eLoc) { eLocation = eLoc; }
      76             : protected:
      77             :     virtual void    Paint( const Rectangle& rRect ) SAL_OVERRIDE;
      78             :     virtual void    MouseMove( const MouseEvent& rMEvt ) SAL_OVERRIDE;
      79             :     virtual void    MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE;
      80             :     virtual void    MouseButtonUp( const MouseEvent& rMEvt ) SAL_OVERRIDE;
      81             :     virtual void    KeyInput( const KeyEvent& rKEvt ) SAL_OVERRIDE;
      82             :     virtual void    Command( const CommandEvent& rCEvt ) SAL_OVERRIDE;
      83             :     virtual void    GetFocus() SAL_OVERRIDE;
      84             :     virtual void    LoseFocus() SAL_OVERRIDE;
      85             :     virtual void    Resize() SAL_OVERRIDE;
      86             : 
      87             : private:
      88             :     ScHeaderEditEngine* pEdEngine;
      89             :     EditView*           pEdView;
      90             :     ScEditWindowLocation eLocation;
      91             :     bool mbRTL;
      92             : 
      93             :     com::sun::star::uno::WeakReference< ::com::sun::star::accessibility::XAccessible > xAcc;
      94             :     ScAccessibleEditObject* pAcc;
      95             : 
      96             :     Link                aObjectSelectLink;
      97             : };
      98             : 
      99           0 : class SC_DLLPUBLIC ScExtIButton : public ImageButton
     100             : {
     101             : private:
     102             : 
     103             :     Timer           aTimer;
     104             :     PopupMenu*      pPopupMenu;
     105             :     Link            aMLink;
     106             :     sal_uInt16      nSelected;
     107             :     OString         aSelectedIdent;
     108             : 
     109             :     SAL_DLLPRIVATE  DECL_LINK( TimerHdl, void*);
     110             : 
     111             : protected:
     112             : 
     113             :     virtual void    MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE;
     114             :     virtual void    MouseButtonUp( const MouseEvent& rMEvt) SAL_OVERRIDE;
     115             :     virtual void    Click() SAL_OVERRIDE;
     116             : 
     117             :     virtual void    StartPopup();
     118             : 
     119             : public:
     120             : 
     121             :     ScExtIButton(vcl::Window* pParent, WinBits nBits );
     122             : 
     123             :     void            SetPopupMenu(PopupMenu* pPopUp);
     124             : 
     125             :     sal_uInt16      GetSelected() const { return nSelected;}
     126           0 :     OString         GetSelectedIdent() const { return aSelectedIdent;}
     127             : 
     128           0 :     void            SetMenuHdl( const Link& rLink ) { aMLink = rLink; }
     129             :     const Link&     GetMenuHdl() const { return aMLink; }
     130             : 
     131             :     virtual bool    PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
     132             : };
     133             : 
     134             : #endif // INCLUDED_SC_SOURCE_UI_INC_TPHFEDIT_HXX
     135             : 
     136             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10