LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/svx/source/inc - fmexpl.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 2 49 4.1 %
Date: 2013-07-09 Functions: 2 49 4.1 %
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 _SVX_FMEXPL_HXX
      20             : #define _SVX_FMEXPL_HXX
      21             : 
      22             : #include <svl/lstner.hxx>
      23             : #include <svl/brdcst.hxx>
      24             : #include <vcl/window.hxx>
      25             : #include <sfx2/childwin.hxx>
      26             : #include <svl/poolitem.hxx>
      27             : #include <sfx2/bindings.hxx>
      28             : #include <sfx2/dockwin.hxx>
      29             : #include <sfx2/ctrlitem.hxx>
      30             : #include <vcl/image.hxx>
      31             : 
      32             : #include <com/sun/star/container/XNameContainer.hpp>
      33             : #include <com/sun/star/form/XForm.hpp>
      34             : #include <com/sun/star/form/XFormComponent.hpp>
      35             : #include <com/sun/star/beans/PropertyChangeEvent.hpp>
      36             : #include <com/sun/star/container/XContainerListener.hpp>
      37             : #include <com/sun/star/container/XContainer.hpp>
      38             : #include <com/sun/star/beans/XPropertyChangeListener.hpp>
      39             : #include <com/sun/star/container/XIndexContainer.hpp>
      40             : 
      41             : #include <svtools/treelistbox.hxx>
      42             : 
      43             : #include <vcl/dialog.hxx>
      44             : #include <vcl/group.hxx>
      45             : #include <vcl/button.hxx>
      46             : #include <vcl/fixed.hxx>
      47             : #include <vcl/edit.hxx>
      48             : #include <vcl/dockwin.hxx>
      49             : #include <svx/fmview.hxx>
      50             : 
      51             : #include "fmexch.hxx"
      52             : #include <vector>
      53             : #include <set>
      54             : 
      55             : class SdrObjListIter;
      56             : class FmFormShell;
      57             : class SdrObject;
      58             : class FmFormModel;
      59             : class FmFormView;
      60             : class SdrMarkList;
      61             : 
      62             : //========================================================================
      63             : class FmEntryData;
      64             : class FmNavInsertedHint : public SfxHint
      65             : {
      66             :     FmEntryData* pEntryData;
      67             :     sal_uInt32 nPos;
      68             : 
      69             : public:
      70             :     TYPEINFO();
      71             :     FmNavInsertedHint( FmEntryData* pInsertedEntryData, sal_uInt32 nRelPos );
      72             :     virtual ~FmNavInsertedHint();
      73             : 
      74           0 :     FmEntryData* GetEntryData() const { return pEntryData; }
      75           0 :     sal_uInt32 GetRelPos() const { return nPos; }
      76             : };
      77             : 
      78             : //========================================================================
      79             : class FmNavModelReplacedHint : public SfxHint
      80             : {
      81             :     FmEntryData* pEntryData;    // die Daten des Eintrages, der ein neues Model bekommen hat
      82             : 
      83             : public:
      84             :     TYPEINFO();
      85             :     FmNavModelReplacedHint( FmEntryData* pAffectedEntryData );
      86             :     virtual ~FmNavModelReplacedHint();
      87             : 
      88           0 :     FmEntryData* GetEntryData() const { return pEntryData; }
      89             : };
      90             : 
      91             : //========================================================================
      92             : class FmNavRemovedHint : public SfxHint
      93             : {
      94             :     FmEntryData* pEntryData;
      95             : 
      96             : public:
      97             :     TYPEINFO();
      98             :     FmNavRemovedHint( FmEntryData* pInsertedEntryData );
      99             :     virtual ~FmNavRemovedHint();
     100             : 
     101           0 :     FmEntryData* GetEntryData() const { return pEntryData; }
     102             : };
     103             : 
     104             : //========================================================================
     105             : class FmNavNameChangedHint : public SfxHint
     106             : {
     107             :     FmEntryData*    pEntryData;
     108             :     OUString          aNewName;
     109             : 
     110             : public:
     111             :     TYPEINFO();
     112             :     FmNavNameChangedHint( FmEntryData* pData, const OUString& rNewName );
     113             :     virtual ~FmNavNameChangedHint();
     114             : 
     115           0 :     FmEntryData*    GetEntryData() const { return pEntryData; }
     116           0 :     OUString          GetNewName() const { return aNewName; }
     117             : };
     118             : 
     119             : //========================================================================
     120             : class FmNavClearedHint : public SfxHint
     121             : {
     122             : public:
     123             :     TYPEINFO();
     124             :     FmNavClearedHint();
     125             :     virtual ~FmNavClearedHint();
     126             : };
     127             : 
     128             : //========================================================================
     129             : class FmNavViewMarksChanged : public SfxHint
     130             : {
     131             :     FmFormView* pView;
     132             : public:
     133             :     TYPEINFO();
     134         239 :     FmNavViewMarksChanged(FmFormView* pWhichView) { pView = pWhichView; }
     135         239 :     virtual ~FmNavViewMarksChanged() {}
     136             : 
     137           0 :     FmFormView* GetAffectedView() { return pView; }
     138             : };
     139             : 
     140             : //========================================================================
     141             : class FmEntryDataList;
     142             : class FmEntryData
     143             : {
     144             : private:
     145             :     ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >       m_xNormalizedIFace;
     146             :     ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >   m_xProperties;
     147             :     ::com::sun::star::uno::Reference< ::com::sun::star::container::XChild >     m_xChild;
     148             : 
     149             : protected:
     150             :     Image               m_aNormalImage;
     151             :     OUString     aText;
     152             : 
     153             :     FmEntryDataList*    pChildList;
     154             :     FmEntryData*        pParent;
     155             : 
     156             : protected:
     157             :     void    newObject( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxIFace );
     158             : 
     159             : public:
     160             :     TYPEINFO();
     161             : 
     162             :     FmEntryData( FmEntryData* pParentData, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rIFace );
     163             :     FmEntryData( const FmEntryData& rEntryData );
     164             :     virtual ~FmEntryData();
     165             : 
     166             :     void    Clear();
     167           0 :     void    SetText( const OUString& rText ){ aText = rText; }
     168           0 :     void    SetParent( FmEntryData* pParentData ){ pParent = pParentData; }
     169             : 
     170           0 :     const Image&    GetNormalImage() const { return m_aNormalImage; }
     171             : 
     172           0 :     OUString          GetText() const { return aText; }
     173           0 :     FmEntryData*    GetParent() const { return pParent; }
     174           0 :     FmEntryDataList* GetChildList() const { return pChildList; }
     175             : 
     176             :     virtual sal_Bool IsEqualWithoutChildren( FmEntryData* pEntryData );
     177             :     virtual FmEntryData* Clone() = 0;
     178             : 
     179             :     // note that the interface returned is normalized, i.e. querying the given XInterface of the object
     180             :     // for XInterface must return the interface itself.
     181           0 :     const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& GetElement() const
     182             :     {
     183           0 :         return m_xNormalizedIFace;
     184             :     }
     185             : 
     186           0 :     const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& GetPropertySet() const
     187             :     {
     188           0 :         return m_xProperties;
     189             :     }
     190             : 
     191           0 :     const ::com::sun::star::uno::Reference< ::com::sun::star::container::XChild >& GetChildIFace() const
     192             :     {
     193           0 :         return m_xChild;
     194             :     }
     195             : };
     196             : 
     197             : //========================================================================
     198             : typedef ::std::vector< FmEntryData* > FmEntryDataBaseList;
     199             : 
     200             : class FmEntryDataList
     201             : {
     202             : private:
     203             :     FmEntryDataBaseList maEntryDataList;
     204             : 
     205             : public:
     206             :     FmEntryDataList();
     207             :     virtual ~FmEntryDataList();
     208             : 
     209           0 :     FmEntryData*    at( size_t Index )
     210           0 :         { return ( Index < maEntryDataList.size() ) ? maEntryDataList[ Index ] : NULL; }
     211             : 
     212           0 :     size_t          size() const { return maEntryDataList.size(); }
     213             :     FmEntryData*    remove( FmEntryData* pItem );
     214             :     void            insert( FmEntryData* pItem, size_t Index );
     215             :     void            clear();
     216             : };
     217             : 
     218             : //========================================================================
     219             : // FmNavRequestSelectHint - jemand teilt dem NavigatorTree mit, dass er bestimmte Eintraege selektieren soll
     220             : 
     221             : typedef std::set<FmEntryData*> FmEntryDataArray;
     222             : 
     223             : class FmNavRequestSelectHint : public SfxHint
     224             : {
     225             :     FmEntryDataArray    m_arredToSelect;
     226             :     sal_Bool                m_bMixedSelection;
     227             : public:
     228             :     TYPEINFO();
     229           0 :     FmNavRequestSelectHint() { }
     230           0 :     virtual ~FmNavRequestSelectHint() {}
     231             : 
     232           0 :     void SetMixedSelection(sal_Bool bMixedSelection) { m_bMixedSelection = bMixedSelection; }
     233           0 :     sal_Bool IsMixedSelection() { return m_bMixedSelection; }
     234           0 :     void AddItem(FmEntryData* pEntry) { m_arredToSelect.insert(pEntry); }
     235           0 :     void ClearItems() { m_arredToSelect.clear(); }
     236           0 :     FmEntryDataArray& GetItems() { return m_arredToSelect; }
     237             : };
     238             : 
     239             : //========================================================================
     240             : class FmFormData : public FmEntryData
     241             : {
     242             :     ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >           m_xForm;
     243             :     ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainer > m_xContainer;
     244             : 
     245             : public:
     246             :     TYPEINFO();
     247             : 
     248             :     FmFormData(
     249             :         const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& _rxForm,
     250             :         const ImageList& _rNormalImages,
     251             :         FmFormData* _pParent = NULL
     252             :     );
     253             : 
     254             :     FmFormData( const FmFormData& rFormData );
     255             :     virtual ~FmFormData();
     256             : 
     257             :     void SetForm( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& xForm )
     258             :     {
     259             :         m_xForm = xForm;
     260             :         m_xContainer = m_xContainer.query( m_xForm );
     261             :         newObject( m_xForm );
     262             :     }
     263             : 
     264           0 :     const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& GetFormIface() const { return m_xForm; }
     265           0 :     const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainer >& GetContainer() const { return m_xContainer; }
     266             : 
     267             :     virtual sal_Bool IsEqualWithoutChildren( FmEntryData* pEntryData );
     268             :     virtual FmEntryData* Clone();
     269             : };
     270             : 
     271             : 
     272             : //========================================================================
     273             : class FmControlData : public FmEntryData
     274             : {
     275             :     ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent >  m_xFormComponent;
     276             : 
     277             :     Image GetImage(const ImageList& ilNavigatorImages) const;
     278             : 
     279             : public:
     280             :     TYPEINFO();
     281             : 
     282             :     FmControlData(
     283             :         const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent >& _rxComponent,
     284             :         const ImageList& _rNormalImages,
     285             :         FmFormData* _pParent
     286             :     );
     287             :     FmControlData( const FmControlData& rControlData );
     288             :     virtual ~FmControlData();
     289             : 
     290           0 :     const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent >& GetFormComponent() const { return m_xFormComponent; }
     291             :     virtual sal_Bool IsEqualWithoutChildren( FmEntryData* pEntryData );
     292             :     virtual FmEntryData* Clone();
     293             : 
     294             :     void ModelReplaced(
     295             :         const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent >& _rxNew,
     296             :         const ImageList& _rNormalImages
     297             :     );
     298             : };
     299             : 
     300             : 
     301             : //========================================================================
     302             : //............................................................................
     303             : namespace svxform
     304             : {
     305             : //............................................................................
     306             : 
     307             :     class NavigatorTreeModel;
     308             :     //========================================================================
     309             :     // class OFormComponentObserver
     310             :     //========================================================================
     311           0 :     class OFormComponentObserver
     312             :         :public ::cppu::WeakImplHelper2 <   ::com::sun::star::beans::XPropertyChangeListener
     313             :                                         ,   ::com::sun::star::container::XContainerListener
     314             :                                         >
     315             :     {
     316             :         ::svxform::NavigatorTreeModel*  m_pNavModel;
     317             :         sal_uInt32 m_nLocks;
     318             :         sal_Bool   m_bCanUndo;
     319             : 
     320             :     public:
     321             :         OFormComponentObserver( ::svxform::NavigatorTreeModel* pModel );
     322             : 
     323             :     // XEventListenerListener
     324             :         virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw(::com::sun::star::uno::RuntimeException);
     325             : 
     326             :     // ::com::sun::star::beans::XPropertyChangeListener
     327             :         virtual void SAL_CALL propertyChange(const ::com::sun::star::beans::PropertyChangeEvent& evt) throw(::com::sun::star::uno::RuntimeException);
     328             : 
     329             :     // ::com::sun::star::container::XContainerListener
     330             : 
     331             :         virtual void SAL_CALL elementInserted(const  ::com::sun::star::container::ContainerEvent& rEvent) throw(::com::sun::star::uno::RuntimeException);
     332             :         virtual void SAL_CALL elementReplaced(const  ::com::sun::star::container::ContainerEvent& rEvent) throw(::com::sun::star::uno::RuntimeException);
     333             :         virtual void SAL_CALL elementRemoved(const  ::com::sun::star::container::ContainerEvent& rEvent) throw(::com::sun::star::uno::RuntimeException);
     334             : 
     335           0 :         void Lock() { m_nLocks++; }
     336           0 :         void UnLock() { m_nLocks--; }
     337           0 :         sal_Bool IsLocked() const { return m_nLocks != 0; }
     338           0 :         sal_Bool CanUndo() const { return m_bCanUndo; }
     339           0 :         void ReleaseModel() { m_pNavModel = NULL; }
     340             :     protected:
     341             :         void Insert(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xIface, sal_Int32 nIndex);
     342             :         void Remove( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxElement );
     343             :     };
     344             : 
     345             :     //========================================================================
     346             :     //= NavigatorTreeModel
     347             :     //========================================================================
     348             :     class NavigatorTreeModel : public SfxBroadcaster
     349             :                            ,public SfxListener
     350             :     {
     351             :         friend class NavigatorTree;
     352             :         friend class OFormComponentObserver;
     353             : 
     354             :         FmEntryDataList*            m_pRootList;
     355             :         FmFormShell*                m_pFormShell;
     356             :         FmFormPage*                 m_pFormPage;
     357             :         FmFormModel*                m_pFormModel;
     358             :         OFormComponentObserver*     m_pPropChangeList;
     359             : 
     360             :         ImageList                   m_aNormalImages;
     361             : 
     362             :         void UpdateContent( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForms >& xForms );
     363             :         FmControlData* CreateControlData( ::com::sun::star::form::XFormComponent* pFormComponent );
     364             : 
     365             :         void InsertForm(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& xForm, sal_uInt32 nRelPos);
     366             :         void RemoveForm(FmFormData* pFormData);
     367             : 
     368             :         void InsertFormComponent(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent >& xComp, sal_uInt32 nRelPos);
     369             :         void RemoveFormComponent(FmControlData* pControlData);
     370             :         void InsertSdrObj(const SdrObject* pSdrObj);
     371             :         void RemoveSdrObj(const SdrObject* pSdrObj);
     372             : 
     373             :         void ReplaceFormComponent(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent >& xOld, const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent >& xNew);
     374             : 
     375             :         void BroadcastMarkedObjects(const SdrMarkList& mlMarked);
     376             :             // einen RequestSelectHint mit den aktuell markierten Objekten broadcasten
     377             :         sal_Bool InsertFormComponent(FmNavRequestSelectHint& rHint, SdrObject* pObject);
     378             :             // ist ein Helper fuer vorherige, managet das Abteigen in SdrObjGroups
     379             :             // Rueckgabe sal_True, wenn das Objekt eine FormComponent ist (oder rekursiv nur aus solchen besteht)
     380             : 
     381             :     public:
     382             :         NavigatorTreeModel( const ImageList& _rNormalImages );
     383             :         virtual ~NavigatorTreeModel();
     384             : 
     385             :         void FillBranch( FmFormData* pParentData );
     386             :         void ClearBranch( FmFormData* pParentData );
     387             :         void UpdateContent( FmFormShell* pNewShell );
     388             : 
     389             :         void Insert( FmEntryData* pEntryData, sal_uLong nRelPos = LIST_APPEND,
     390             :                                               sal_Bool bAlterModel = sal_False );
     391             :         void Remove( FmEntryData* pEntryData, sal_Bool bAlterModel = sal_False );
     392             : 
     393             :         sal_Bool Rename( FmEntryData* pEntryData, const OUString& rNewText );
     394             : 
     395             :         void Clear();
     396             :         void SetModified( sal_Bool bMod=sal_True );
     397             : 
     398             :         ::com::sun::star::uno::Reference< ::com::sun::star::form::XForms >    GetForms() const;
     399           0 :         FmFormShell*        GetFormShell() const { return m_pFormShell; }
     400           0 :         FmFormPage*         GetFormPage() const { return m_pFormPage; }
     401             :         FmEntryData*        FindData( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xElement, FmEntryDataList* pDataList, sal_Bool bRecurs=sal_True );
     402             :         FmEntryData*        FindData( const OUString& rText, FmFormData* pParentData, sal_Bool bRecurs=sal_True );
     403           0 :         FmEntryDataList*    GetRootList() const { return m_pRootList; }
     404             :         ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer >   GetFormComponents( FmFormData* pParentFormData );
     405             :         SdrObject*          Search(SdrObjListIter& rIter, const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent >& xComp);
     406             : 
     407             :         virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
     408             :     };
     409             : 
     410             :     //========================================================================
     411             :     typedef std::set<SvTreeListEntry*> SvLBoxEntrySortedArray;
     412             : 
     413             :     class NavigatorTree : public SvTreeListBox, public SfxListener
     414             :     {
     415             :         enum DROP_ACTION        { DA_SCROLLUP, DA_SCROLLDOWN, DA_EXPANDNODE };
     416             :         enum SELDATA_ITEMS      { SDI_DIRTY, SDI_ALL, SDI_NORMALIZED, SDI_NORMALIZED_FORMARK };
     417             : 
     418             :         // beim Droppen will ich scrollen und Folder aufklappen koennen, dafuer :
     419             :         AutoTimer           m_aDropActionTimer;
     420             :         Timer               m_aSynchronizeTimer;
     421             :         // die Meta-Daten ueber meine aktuelle Selektion
     422             :         SvLBoxEntrySortedArray  m_arrCurrentSelection;
     423             :         // the entries which, in the view, are currently marked as "cut" (painted semi-transparent)
     424             :         ListBoxEntrySet         m_aCutEntries;
     425             :         // die Images, die ich brauche (und an FormDatas und EntryDatas weiterreiche)
     426             :         ImageList           m_aNavigatorImages;
     427             : 
     428             :         ::svxform::OControlExchangeHelper   m_aControlExchange;
     429             : 
     430             :         NavigatorTreeModel* m_pNavModel;
     431             :         SvTreeListEntry*        m_pRootEntry;
     432             :         SvTreeListEntry*        m_pEditEntry;
     433             : 
     434             :         sal_uLong               nEditEvent;
     435             : 
     436             :         SELDATA_ITEMS       m_sdiState;
     437             :         Point               m_aTimerTriggered;      // die Position, an der der DropTimer angeschaltet wurde
     438             :         DROP_ACTION         m_aDropActionType;
     439             : 
     440             :         sal_uInt16          m_nSelectLock;
     441             :         sal_uInt16          m_nFormsSelected;
     442             :         sal_uInt16          m_nControlsSelected;
     443             :         sal_uInt16          m_nHiddenControls;      // (die Zahl geht in m_nControlsSelected mit ein)
     444             : 
     445             :         unsigned short      m_aTimerCounter;
     446             : 
     447             :         sal_Bool            m_bDragDataDirty        : 1;    // dito
     448             :         sal_Bool            m_bPrevSelectionMixed   : 1;
     449             :         sal_Bool            m_bMarkingObjects       : 1;    // wenn das sal_True ist, brauche ich auf die RequestSelectHints nicht reagieren
     450             :         sal_Bool            m_bRootSelected         : 1;
     451             :         sal_Bool            m_bInitialUpdate        : 1;   // bin ich das erste Mal im UpdateContent ?
     452             :         sal_Bool            m_bKeyboardCut          : 1;
     453             : 
     454             : 
     455             :         void            UpdateContent();
     456             :         FmControlData*  NewControl( const OUString& rServiceName, SvTreeListEntry* pParentEntry, sal_Bool bEditName = sal_True );
     457             :         void            NewForm( SvTreeListEntry* pParentEntry );
     458             :         SvTreeListEntry*    Insert( FmEntryData* pEntryData, sal_uLong nRelPos=LIST_APPEND );
     459             :         void            Remove( FmEntryData* pEntryData );
     460             : 
     461             : 
     462             :         void CollectSelectionData(SELDATA_ITEMS sdiHow);
     463             :             // sammelt in m_arrCurrentSelection die aktuell selektierten Eintraege, normalisiert die Liste wenn verlangt
     464             :             // SDI_NORMALIZED bedeutet einfach, dass alle Eintraege, die schon einen selektierten Vorfahren haben, nicht mit gesammelt
     465             :             // werden.
     466             :             // SDI_NORMALIZED_FORMARK bedeutet, dass wie bei SDI_NORMALIZED verfahren wird, aber Eintraege, deren direktes Elter nicht
     467             :             // selektiert ist, aufgenommen werden (unabhaengig vom Status weiterer Vorfahren), desgleichen Formulare, die selektiert sind,
     468             :             // unabhaengig vom Status irgendwelcher Vorfahren
     469             :             // Bei beiden Normalized-Modi enthalten die m_nFormsSelected, ... die richtige Anzahl, auch wenn nicht alle dieser Eintraege
     470             :             // in m_arrCurrentSelection landen.
     471             :             // SDI_DIRTY ist natuerlich nicht erlaubt als Parameter
     472             : 
     473             :         // ein einziges Interface fuer alle selektierten Eintraege zusammensetzen
     474             :         void    ShowSelectionProperties(sal_Bool bForce = sal_False);
     475             :         // alle selektierten Elemnte loeschen
     476             :         void    DeleteSelection();
     477             : 
     478             :         void SynchronizeSelection(FmEntryDataArray& arredToSelect);
     479             :             // nach dem Aufruf dieser Methode sind genau die Eintraege selektiert, die in dem Array bezeichnet sind
     480             :         void SynchronizeSelection();
     481             :             // macht das selbe, nimmt die MarkList der ::com::sun::star::sdbcx::View
     482             :         void SynchronizeMarkList();
     483             :             // umgekehrte Richtung von SynchronizeMarkList : markiert in der ::com::sun::star::sdbcx::View alle der aktuellen Selektion entsprechenden Controls
     484             : 
     485             :         void CollectObjects(FmFormData* pFormData, sal_Bool bDeep, ::std::set< ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > >& _rObjects);
     486             : 
     487             :         // im Select aktualisiere ich normalerweise die Marklist der zugehoerigen ::com::sun::star::sdbcx::View, mit folgenden Funktionen
     488             :         // kann ich das Locking dieses Verhaltens steuern
     489           0 :         void LockSelectionHandling() { ++m_nSelectLock; }
     490           0 :         void UnlockSelectionHandling() { --m_nSelectLock; }
     491           0 :         sal_Bool IsSelectionHandlingLocked() const { return m_nSelectLock>0; }
     492             : 
     493             :         sal_Bool IsHiddenControl(FmEntryData* pEntryData);
     494             : 
     495             :         DECL_LINK( OnEdit, void* );
     496             :         DECL_LINK( OnDropActionTimer, void* );
     497             : 
     498             :         DECL_LINK(OnEntrySelDesel, NavigatorTree*);
     499             :         DECL_LINK(OnSynchronizeTimer, void*);
     500             : 
     501             :         DECL_LINK( OnClipboardAction, void* );
     502             : 
     503             :     protected:
     504             :         virtual void    Command( const CommandEvent& rEvt );
     505             : 
     506             :         virtual sal_Int8    AcceptDrop( const AcceptDropEvent& rEvt );
     507             :         virtual sal_Int8    ExecuteDrop( const ExecuteDropEvent& rEvt );
     508             :         virtual void        StartDrag( sal_Int8 nAction, const Point& rPosPixel );
     509             : 
     510             :     public:
     511             :         NavigatorTree(Window* pParent );
     512             :         virtual ~NavigatorTree();
     513             : 
     514             :         void Clear();
     515             :         void UpdateContent( FmFormShell* pFormShell );
     516             :         void MarkViewObj( FmFormData* pFormData, sal_Bool bMark, sal_Bool bDeep = sal_False );
     517             :         void MarkViewObj( FmControlData* pControlData, sal_Bool bMarkHandles, sal_Bool bMark );
     518             :         void UnmarkAllViewObj();
     519             : 
     520             :         sal_Bool IsFormEntry( SvTreeListEntry* pEntry );
     521             :         sal_Bool IsFormComponentEntry( SvTreeListEntry* pEntry );
     522             : 
     523             :         OUString GenerateName( FmEntryData* pEntryData );
     524             : 
     525           0 :         NavigatorTreeModel*    GetNavModel() const { return m_pNavModel; }
     526             :         SvTreeListEntry*        FindEntry( FmEntryData* pEntryData );
     527             : 
     528             :         virtual sal_Bool EditedEntry( SvTreeListEntry* pEntry, const OUString& rNewText );
     529             :         virtual sal_Bool Select( SvTreeListEntry* pEntry, sal_Bool bSelect=sal_True );
     530             :         virtual sal_Bool EditingEntry( SvTreeListEntry* pEntry, Selection& );
     531             :         virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
     532             :         virtual void KeyInput( const KeyEvent& rKEvt );
     533             : 
     534             :         virtual void ModelHasRemoved( SvTreeListEntry* _pEntry );
     535             : 
     536             :         using SvTreeListBox::Insert;
     537             :         using SvTreeListBox::ExecuteDrop;
     538             :         using SvTreeListBox::Select;
     539             :         using SvTreeListBox::Notify;
     540             : 
     541             :     private:
     542             :         sal_Int8    implAcceptDataTransfer( const DataFlavorExVector& _rFlavors, sal_Int8 _nAction, const Point& _rDropPos, sal_Bool _bDnD );
     543             :         sal_Int8    implAcceptDataTransfer( const DataFlavorExVector& _rFlavors, sal_Int8 _nAction, SvTreeListEntry* _pTargetEntry, sal_Bool _bDnD );
     544             : 
     545             :         sal_Int8    implExecuteDataTransfer( const OControlTransferData& _rData, sal_Int8 _nAction, const Point& _rDropPos, sal_Bool _bDnD );
     546             :         sal_Int8    implExecuteDataTransfer( const OControlTransferData& _rData, sal_Int8 _nAction, SvTreeListEntry* _pTargetEntry, sal_Bool _bDnD );
     547             : 
     548             :         // check if a cut, copy, or drag operation can be started in the current situation
     549             :         sal_Bool    implAllowExchange( sal_Int8 _nAction, sal_Bool* _pHasNonHidden = NULL );
     550             :         // check if a paste with the current clipboard content can be accepted
     551             :         sal_Bool    implAcceptPaste( );
     552             : 
     553             :         // fills m_aControlExchange in preparation of a DnD or clipboard operation
     554             :         sal_Bool    implPrepareExchange( sal_Int8 _nAction );
     555             : 
     556             :         void        doPaste();
     557             :         void        doCopy();
     558             :         void        doCut();
     559             : 
     560           0 :         sal_Bool    doingKeyboardCut( ) const { return m_bKeyboardCut; }
     561             :     };
     562             : 
     563             :     //========================================================================
     564             :     class NavigatorFrame : public SfxDockingWindow, public SfxControllerItem
     565             :     {
     566             :     private:
     567             :         ::svxform::NavigatorTree* m_pNavigatorTree;
     568             : 
     569             :     protected:
     570             :         virtual void Resize();
     571             :         virtual sal_Bool Close();
     572             :         virtual void GetFocus();
     573             :         virtual Size CalcDockingSize( SfxChildAlignment );
     574             :         virtual SfxChildAlignment CheckAlignment( SfxChildAlignment, SfxChildAlignment );
     575             : 
     576             :         using SfxDockingWindow::StateChanged;
     577             : 
     578             :     public:
     579             :         NavigatorFrame( SfxBindings *pBindings, SfxChildWindow *pMgr,
     580             :                        Window* pParent );
     581             :         virtual ~NavigatorFrame();
     582             : 
     583             :         void UpdateContent( FmFormShell* pFormShell );
     584             :         void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState );
     585             :         void FillInfo( SfxChildWinInfo& rInfo ) const;
     586             :     };
     587             : 
     588             :     //========================================================================
     589           0 :     class SVX_DLLPUBLIC NavigatorFrameManager : public SfxChildWindow
     590             :     {
     591             :     public:
     592             :         SVX_DLLPRIVATE NavigatorFrameManager( Window *pParent, sal_uInt16 nId, SfxBindings *pBindings,
     593             :                           SfxChildWinInfo *pInfo );
     594             :         SFX_DECL_CHILDWINDOW( NavigatorFrameManager );
     595             :     };
     596             : 
     597             : //............................................................................
     598             : }   // namespace svxform
     599             : //............................................................................
     600             : 
     601             : #endif // _SVX_FMEXPL_HXX
     602             : 
     603             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10