LCOV - code coverage report
Current view: top level - svx/inc/svx - fmview.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 5 7 71.4 %
Date: 2012-08-25 Functions: 5 7 71.4 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : 
      29                 :            : #ifndef _SVX_FMVIEW_HXX
      30                 :            : #define _SVX_FMVIEW_HXX
      31                 :            : 
      32                 :            : #include <svx/view3d.hxx>
      33                 :            : #include <comphelper/uno3.hxx>
      34                 :            : #include "svx/svxdllapi.h"
      35                 :            : 
      36                 :            : namespace com { namespace sun { namespace star {
      37                 :            :     namespace beans {
      38                 :            :         class XPropertySet;
      39                 :            :     }
      40                 :            :     namespace util {
      41                 :            :         class XNumberFormats;
      42                 :            :     }
      43                 :            : }}}
      44                 :            : 
      45                 :            : class OutputDevice;
      46                 :            : class FmFormModel;
      47                 :            : class FmFormObj;
      48                 :            : class FmFormPage;
      49                 :            : class FmFormShell;
      50                 :            : class FmXFormView;
      51                 :            : 
      52                 :            : namespace svx {
      53                 :            :     class ODataAccessDescriptor;
      54                 :            :     struct OXFormsDescriptor;
      55                 :            : }
      56                 :            : 
      57                 :            : class SdrUnoObj;
      58                 :            : namespace com { namespace sun { namespace star { namespace form {
      59                 :            :     class XForm;
      60                 :            :     namespace runtime {
      61                 :            :         class XFormController;
      62                 :            :     }
      63                 :            : } } } }
      64                 :            : 
      65                 :            : class SVX_DLLPUBLIC FmFormView : public E3dView
      66                 :            : {
      67                 :            :     FmXFormView*    pImpl;
      68                 :            :     FmFormShell*    pFormShell;
      69                 :            : 
      70                 :            :     void Init();
      71                 :            : 
      72                 :            : public:
      73                 :            :     TYPEINFO();
      74                 :            : 
      75                 :            :     FmFormView(FmFormModel* pModel, OutputDevice* pOut = 0L);
      76                 :            :     virtual ~FmFormView();
      77                 :            : 
      78                 :            :     /** create a control pair (label/bound control) for the database field description given.
      79                 :            :         @param rFieldDesc
      80                 :            :             description of the field. see clipboard format SBA-FIELDFORMAT
      81                 :            :         @deprecated
      82                 :            :             This method is deprecated. Use the version with a ODataAccessDescriptor instead.
      83                 :            :     */
      84                 :            :     SdrObject*   CreateFieldControl(const UniString& rFieldDesc) const;
      85                 :            : 
      86                 :            :     /** create a control pair (label/bound control) for the database field description given.
      87                 :            :     */
      88                 :            :     SdrObject*   CreateFieldControl( const ::svx::ODataAccessDescriptor& _rColumnDescriptor );
      89                 :            : 
      90                 :            :     /** create a control pair (label/bound control) for the xforms description given.
      91                 :            :     */
      92                 :            :     SdrObject*   CreateXFormsControl( const ::svx::OXFormsDescriptor &_rDesc );
      93                 :            : 
      94                 :            :     virtual void MarkListHasChanged();
      95                 :            :     virtual void AddWindowToPaintView(OutputDevice* pNewWin);
      96                 :            :     virtual void DeleteWindowFromPaintView(OutputDevice* pOldWin);
      97                 :            : 
      98                 :            :     static void createControlLabelPair(
      99                 :            :         OutputDevice* _pOutDev,
     100                 :            :         sal_Int32 _nXOffsetMM,
     101                 :            :         sal_Int32 _nYOffsetMM,
     102                 :            :         const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxField,
     103                 :            :         const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormats >& _rxNumberFormats,
     104                 :            :         sal_uInt16 _nControlObjectID,
     105                 :            :         const ::rtl::OUString& _rFieldPostfix,
     106                 :            :         sal_uInt32 _nInventor,
     107                 :            :         sal_uInt16 _nLabelObjectID,
     108                 :            :         SdrPage* _pLabelPage,
     109                 :            :         SdrPage* _pControlPage,
     110                 :            :         SdrModel* _pModel,
     111                 :            :         SdrUnoObj*& _rpLabel,
     112                 :            :         SdrUnoObj*& _rpControl
     113                 :            :     );
     114                 :            : 
     115                 :            :     virtual SdrPageView* ShowSdrPage(SdrPage* pPage);
     116                 :            :     virtual void HideSdrPage();
     117                 :            : 
     118                 :            :     // for copying complete form structures, not only control models
     119                 :            :     virtual SdrModel* GetMarkedObjModel() const;
     120                 :            :     using E3dView::Paste;
     121                 :            :     virtual sal_Bool Paste(const SdrModel& rMod, const Point& rPos, SdrObjList* pLst=NULL, sal_uInt32 nOptions=0);
     122                 :            : 
     123                 :            :     virtual sal_Bool MouseButtonDown( const MouseEvent& _rMEvt, Window* _pWin );
     124                 :            : 
     125                 :            :     /** grab the focus to the first form control on the view
     126                 :            :         @param _bForceSync
     127                 :            :             <TRUE/> if the handling should be done synchronously.
     128                 :            :     */
     129                 :            :     SVX_DLLPRIVATE void GrabFirstControlFocus( sal_Bool _bForceSync = sal_False );
     130                 :            : 
     131                 :            :     /** returns the form controller for a given form and a given device
     132                 :            :     */
     133                 :            :     SVX_DLLPRIVATE ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController >
     134                 :            :             GetFormController( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& _rxForm, const OutputDevice& _rDevice ) const;
     135                 :            : 
     136                 :            :     // SdrView
     137                 :            :     sal_Bool KeyInput(const KeyEvent& rKEvt, Window* pWin);
     138                 :            : 
     139                 :            :     /// shortcut to "GetSdrPageView() ? PTR_CAST( FmFormPage, GetSdrPageView() ) : NULL"
     140                 :            :     FmFormPage* GetCurPage();
     141                 :            : 
     142                 :            :     SVX_DLLPRIVATE void ActivateControls(SdrPageView*);
     143                 :            :     SVX_DLLPRIVATE void DeactivateControls(SdrPageView*);
     144                 :            : 
     145                 :            :      SVX_DLLPRIVATE void ChangeDesignMode(sal_Bool bDesign);
     146                 :            : 
     147                 :       8175 :      SVX_DLLPRIVATE FmXFormView* GetImpl() const { return pImpl; }
     148                 :       6823 :     SVX_DLLPRIVATE FmFormShell* GetFormShell() const { return pFormShell; }
     149                 :            : 
     150                 :       3377 :     struct FormShellAccess { friend class FmFormShell; private: FormShellAccess() { } };
     151                 :       3377 :      void SetFormShell( FmFormShell* pShell, FormShellAccess ) { pFormShell = pShell; }
     152                 :            : 
     153                 :          0 :     struct ImplAccess { friend class FmXFormView; private: ImplAccess() { } };
     154                 :          0 :     void SetMoveOutside( bool _bMoveOutside, ImplAccess ) { E3dView::SetMoveOutside( _bMoveOutside ); }
     155                 :            :      virtual void InsertControlContainer(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer >& xCC);
     156                 :            :      virtual void RemoveControlContainer(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer >& xCC);
     157                 :            : 
     158                 :            :     virtual SdrPaintWindow* BeginCompleteRedraw(OutputDevice* pOut);
     159                 :            :     virtual void EndCompleteRedraw(SdrPaintWindow& rPaintWindow, bool bPaintFormLayer);
     160                 :            : 
     161                 :       2758 :     SVX_DLLPRIVATE const OutputDevice* GetActualOutDev() const {return pActualOutDev;}
     162                 :            :     SVX_DLLPRIVATE sal_Bool checkUnMarkAll(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xSource);
     163                 :            : 
     164                 :            : private:
     165                 :            :     SVX_DLLPRIVATE void AdjustMarks(const SdrMarkList& rMarkList);
     166                 :            :     SVX_DLLPRIVATE FmFormObj* getMarkedGrid() const;
     167                 :            :  protected:
     168                 :            :     using E3dView::SetMoveOutside;
     169                 :            : };
     170                 :            : 
     171                 :            : #endif          // _FML_FMVIEW_HXX
     172                 :            : 
     173                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10